path
stringlengths
5
300
repo_name
stringlengths
6
76
content
stringlengths
26
1.05M
client/components/categories/delete-unused-modal.js
bnjbvr/kresus
import React from 'react'; import { connect } from 'react-redux'; import { translate as $t, NONE_CATEGORY_ID } from '../../helpers'; import { get, actions } from '../../store'; import { registerModal } from '../ui/modal'; import ModalContent from '../ui/modal/content'; import CancelAndDelete from '../ui/modal/cancel-and-delete-buttons'; const DeleteUnusedCategoriesModal = connect( state => { return { categories: get.modal(state).state }; }, dispatch => { return { deleteCategory(id) { actions.deleteCategory(dispatch, id, NONE_CATEGORY_ID); } }; }, (state, dispatch) => { let { deleteCategory, ...otherDispatch } = dispatch; return { ...state, ...otherDispatch, handleDelete() { for (let { id } of state.categories) { deleteCategory(id); } } }; } )(props => { let listItems = props.categories.map(c => <li key={c.id}>{c.title}</li>); const body = ( <React.Fragment> <p>{$t('client.deleteunusedcategoriesmodal.explanation')}</p> <ul>{listItems}</ul> <p>{$t('client.deleteunusedcategoriesmodal.question')}</p> </React.Fragment> ); return ( <ModalContent title={$t('client.deleteunusedcategoriesmodal.title')} body={body} footer={<CancelAndDelete onDelete={props.handleDelete} />} /> ); }); export const MODAL_SLUG = 'delete-unused-categories'; registerModal(MODAL_SLUG, () => <DeleteUnusedCategoriesModal />);
app/javascript/mastodon/features/ui/components/__tests__/column-test.js
lindwurm/mastodon
import { render, fireEvent, screen } from '@testing-library/react'; import React from 'react'; import Column from '../column'; describe('<Column />', () => { describe('<ColumnHeader /> click handler', () => { it('runs the scroll animation if the column contains scrollable content', () => { const scrollToMock = jest.fn(); const { container } = render( <Column heading='notifications'> <div className='scrollable' /> </Column>, ); container.querySelector('.scrollable').scrollTo = scrollToMock; fireEvent.click(screen.getByText('notifications')); expect(scrollToMock).toHaveBeenCalledWith({ behavior: 'smooth', top: 0 }); }); it('does not try to scroll if there is no scrollable content', () => { render(<Column heading='notifications' />); fireEvent.click(screen.getByText('notifications')); }); }); });
src/app/Auth/Auth.js
harsh376/Hector
import React from 'react'; import LayoutBootstrap from '../containers/LayoutBootstrap/LayoutBootstrap'; import imageUrl from './static/google_signin.png'; export default class Auth extends React.Component { componentDidMount() { if (this.props.enableAuth) { this.props.fetchAccountDetails(); } } render() { const isLoggedIn = ( !this.props.enableAuth || (this.props.enableAuth && this.props.user) ); return ( <div> {isLoggedIn && ( <LayoutBootstrap content={this.props.children} routes={this.props.routes} /> )} {!isLoggedIn && ( <div className="loggedOut"> <a href="/auth/google"> <img src={imageUrl} alt="Sign in with Google" height="40" /> </a> </div> )} </div> ); } } Auth.propTypes = { enableAuth: React.PropTypes.bool.isRequired, user: React.PropTypes.object, // eslint-disable-line react/forbid-prop-types children: React.PropTypes.oneOfType([ React.PropTypes.arrayOf(React.PropTypes.node), React.PropTypes.node, ]), routes: React.PropTypes.arrayOf(React.PropTypes.object), fetchAccountDetails: React.PropTypes.func.isRequired, }; Auth.defaultProps = { user: {}, children: null, routes: [], };
docs/src/examples/elements/Divider/Variations/DividerExampleFitted.js
Semantic-Org/Semantic-UI-React
import React from 'react' import { Divider, Segment } from 'semantic-ui-react' const DividerExampleFitted = () => ( <Segment> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede. <Divider fitted /> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede. </Segment> ) export default DividerExampleFitted
ajax/libs/react-extras/2.0.0/for.js
cdnjs/cdnjs
import React from 'react'; import PropTypes from 'prop-types'; const For = ({ render, of }) => of.map((item, index) => render(item, index)); For.propTypes = { of: PropTypes.array.isRequired, render: PropTypes.func.isRequired }; export default For;
lib/apps/roles/handlers/role.js
defact/gabbro
import React, { Component, PropTypes } from 'react'; import Radium from 'radium'; import { connect } from 'react-redux'; import { ChildContainer, Animated, Panel, layout, backTo } from 'lanai'; import { Heading } from 'comport'; @backTo @layout export default class Role extends Component { render() { const { children, layout, backTo } = this.props; return ( <div> <Panel layout={layout}> <Heading backTo={backTo}>Role</Heading> </Panel> <ChildContainer layout={layout}>{children}</ChildContainer> </div> ); } }
jenkins-design-language/src/js/components/material-ui/svg-icons/action/spellcheck.js
alvarolobato/blueocean-plugin
import React from 'react'; import SvgIcon from '../../SvgIcon'; const ActionSpellcheck = (props) => ( <SvgIcon {...props}> <path d="M12.45 16h2.09L9.43 3H7.57L2.46 16h2.09l1.12-3h5.64l1.14 3zm-6.02-5L8.5 5.48 10.57 11H6.43zm15.16.59l-8.09 8.09L9.83 16l-1.41 1.41 5.09 5.09L23 13l-1.41-1.41z"/> </SvgIcon> ); ActionSpellcheck.displayName = 'ActionSpellcheck'; ActionSpellcheck.muiName = 'SvgIcon'; export default ActionSpellcheck;
admin/client/App/screens/Item/components/RelatedItemsList.js
pr1ntr/keystone
import React from 'react'; import { Columns } from 'FieldTypes'; import { Alert, Spinner } from 'elemental'; const RelatedItemsList = React.createClass({ propTypes: { list: React.PropTypes.object.isRequired, refList: React.PropTypes.object.isRequired, relatedItemId: React.PropTypes.string.isRequired, relationship: React.PropTypes.object.isRequired, }, getInitialState () { return { columns: this.getColumns(), err: null, items: null, }; }, componentDidMount () { this.loadItems(); }, getColumns () { const { relationship, refList } = this.props; const columns = refList.expandColumns(refList.defaultColumns); return columns.filter(i => i.path !== relationship.refPath); }, loadItems () { const { refList, relatedItemId, relationship } = this.props; if (!refList.fields[relationship.refPath]) { const err = ( <Alert type="danger"> <strong>Error:</strong> Related List <strong>{refList.label}</strong> has no field <strong>{relationship.refPath}</strong> </Alert> ); return this.setState({ err }); } refList.loadItems({ columns: this.state.columns, filters: [{ field: refList.fields[relationship.refPath], value: { value: relatedItemId }, }], }, (err, items) => { // TODO: indicate pagination & link to main list view this.setState({ items }); }); }, renderItems () { return this.state.items.results.length ? ( <div className="ItemList-wrapper"> <table cellPadding="0" cellSpacing="0" className="Table ItemList"> {this.renderTableCols()} {this.renderTableHeaders()} <tbody> {this.state.items.results.map(this.renderTableRow)} </tbody> </table> </div> ) : ( <h4 className="Relationship__noresults">No related {this.props.refList.plural}</h4> ); }, renderTableCols () { const cols = this.state.columns.map((col) => <col width={col.width} key={col.path} />); return <colgroup>{cols}</colgroup>; }, renderTableHeaders () { const cells = this.state.columns.map((col) => { return <th key={col.path}>{col.label}</th>; }); return <thead><tr>{cells}</tr></thead>; }, renderTableRow (item) { const cells = this.state.columns.map((col, i) => { const ColumnType = Columns[col.type] || Columns.__unrecognised__; const linkTo = !i ? `${Keystone.adminPath}/${this.props.refList.path}/${item.id}` : undefined; return <ColumnType key={col.path} list={this.props.refList} col={col} data={item} linkTo={linkTo} />; }); return <tr key={'i' + item.id}>{cells}</tr>; }, render () { if (this.state.err) { return <div className="Relationship">{this.state.err}</div>; } const listHref = `${Keystone.adminPath}/${this.props.refList.path}`; return ( <div className="Relationship"> <h3 className="Relationship__link"><a href={listHref}>{this.props.refList.label}</a></h3> {this.state.items ? this.renderItems() : <Spinner size="sm" />} </div> ); }, }); module.exports = RelatedItemsList;
fields/components/Checkbox.js
jacargentina/keystone
import React from 'react'; import blacklist from 'blacklist'; import classnames from 'classnames'; import { fadeColor, shadeColor } from '../../admin/client/utils/color'; import E from '../../admin/client/constants'; var Checkbox = React.createClass({ displayName: 'Checkbox', propTypes: { checked: React.PropTypes.bool, component: React.PropTypes.node, onChange: React.PropTypes.func, readonly: React.PropTypes.bool, }, getDefaultProps () { return { component: 'button', }; }, getInitialState () { return { active: null, focus: null, hover: null, }; }, componentDidMount () { window.addEventListener('mouseup', this.handleMouseUp, false); }, componentWillUnmount () { window.removeEventListener('mouseup', this.handleMouseUp, false); }, getStyles () { const { checked, readonly } = this.props; const { active, focus, hover } = this.state; const checkedColor = '#3999fc'; let background = (checked && !readonly) ? checkedColor : 'white'; let borderColor = (checked && !readonly) ? 'rgba(0,0,0,0.15) rgba(0,0,0,0.1) rgba(0,0,0,0.05)' : 'rgba(0,0,0,0.3) rgba(0,0,0,0.2) rgba(0,0,0,0.15)'; let boxShadow = (checked && !readonly) ? '0 1px 0 rgba(255,255,255,0.33)' : 'inset 0 1px 0 rgba(0,0,0,0.06)'; let color = (checked && !readonly) ? 'white' : '#bbb'; const textShadow = (checked && !readonly) ? '0 1px 0 rgba(0,0,0,0.2)' : null; // pseudo state if (hover && !focus && !readonly) { borderColor = (checked) ? 'rgba(0,0,0,0.1) rgba(0,0,0,0.15) rgba(0,0,0,0.2)' : 'rgba(0,0,0,0.35) rgba(0,0,0,0.3) rgba(0,0,0,0.25)'; } if (active) { background = (checked && !readonly) ? shadeColor(checkedColor, -20) : '#eee'; borderColor = (checked && !readonly) ? 'rgba(0,0,0,0.25) rgba(0,0,0,0.3) rgba(0,0,0,0.35)' : 'rgba(0,0,0,0.4) rgba(0,0,0,0.35) rgba(0,0,0,0.3)'; boxShadow = (checked && !readonly) ? '0 1px 0 rgba(255,255,255,0.33)' : 'inset 0 1px 3px rgba(0,0,0,0.2)'; } if (focus && !active) { borderColor = (checked && !readonly) ? 'rgba(0,0,0,0.25) rgba(0,0,0,0.3) rgba(0,0,0,0.35)' : checkedColor; boxShadow = (checked && !readonly) ? `0 0 0 3px ${fadeColor(checkedColor, 15)}` : `inset 0 1px 2px rgba(0,0,0,0.15), 0 0 0 3px ${fadeColor(checkedColor, 15)}`; } // noedit if (readonly) { background = 'rgba(255,255,255,0.5)'; borderColor = 'rgba(0,0,0,0.1)'; boxShadow = 'none'; color = checked ? checkedColor : '#bbb'; } return { alignItems: 'center', background: background, border: '1px solid', borderColor: borderColor, borderRadius: E.borderRadius.sm, boxShadow: boxShadow, color: color, display: 'inline-block', fontSize: 14, height: 16, lineHeight: '15px', outline: 'none', padding: 0, textAlign: 'center', textShadow: textShadow, verticalAlign: 'middle', width: 16, msTransition: 'all 120ms ease-out', MozTransition: 'all 120ms ease-out', WebkitTransition: 'all 120ms ease-out', transition: 'all 120ms ease-out', }; }, handleKeyDown (e) { if (e.keyCode !== 32) return; this.toggleActive(true); }, handleKeyUp () { this.toggleActive(false); }, handleMouseOver () { this.toggleHover(true); }, handleMouseDown () { this.toggleActive(true); this.toggleFocus(true); }, handleMouseUp () { this.toggleActive(false); }, handleMouseOut () { this.toggleHover(false); }, toggleActive (pseudo) { this.setState({ active: pseudo }); }, toggleHover (pseudo) { this.setState({ hover: pseudo }); }, toggleFocus (pseudo) { this.setState({ focus: pseudo }); }, handleChange () { this.props.onChange(!this.props.checked); }, render () { const { checked, readonly } = this.props; const props = blacklist(this.props, 'checked', 'component', 'onChange', 'readonly'); props.style = this.getStyles(); props.ref = 'checkbox'; props.className = classnames('octicon', { 'octicon-check': checked, 'octicon-x': (typeof checked === 'boolean') && !checked && readonly, }); props.type = readonly ? null : 'button'; props.onKeyDown = this.handleKeyDown; props.onKeyUp = this.handleKeyUp; props.onMouseDown = this.handleMouseDown; props.onMouseUp = this.handleMouseUp; props.onMouseOver = this.handleMouseOver; props.onMouseOut = this.handleMouseOut; props.onClick = readonly ? null : this.handleChange; props.onFocus = readonly ? null : () => this.toggleFocus(true); props.onBlur = readonly ? null : () => this.toggleFocus(false); const node = readonly ? 'span' : this.props.component; return React.createElement(node, props); }, }); module.exports = Checkbox;
server/sonar-web/src/main/js/apps/about/components/AboutProjects.js
lbndev/sonarqube
/* * SonarQube * Copyright (C) 2009-2017 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This program 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; import { Link } from 'react-router'; import { formatMeasure } from '../../../helpers/measures'; import { translate } from '../../../helpers/l10n'; export default class AboutProjects extends React.Component { static propTypes = { count: React.PropTypes.number.isRequired }; render() { return ( <div className="about-page-projects"> <div> <div> <Link to="/projects" className="about-page-projects-link"> {formatMeasure(this.props.count, 'INT')} </Link> </div> <div> {translate('about_page.projects_analyzed')} </div> </div> </div> ); } }
packages/material-ui-icons/src/InputSharp.js
Kagami/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><g fill="none"><path d="M0 0h24v24H0V0z" /><path d="M0 0h24v24H0V0z" opacity=".87" /></g><path d="M21 3.01H3c-1.1 0-2 .9-2 2V9h2V4.99h18v14.03H3V15H1v4.01c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98v-14c0-1.11-.9-2-2-2zM11 16l4-4-4-4v3H1v2h10v3z" /><path d="M23 3.01H1V9h2V4.99h18v14.03H3V15H1v5.99h22V3.01zM11 16l4-4-4-4v3H1v2h10v3z" /></React.Fragment> , 'InputSharp');
ajax/libs/yui/3.3.0pr1/event-custom/event-custom-base.js
sympmarc/cdnjs
YUI.add('event-custom-base', function(Y) { /** * 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 */ objs: {}, /** * Execute the supplied method before the specified function * @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); }, /** * Execute the supplied method after the specified function * @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 after the specified function * @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 (! this.objs[id]) { // create a map entry for the obj if it doesn't exist this.objs[id] = {}; } o = this.objs[id]; 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 */ 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 Do.originalRetVal * @static * @since 2.3.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 Do.currentRetVal * @static * @since 2.3.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]; }; /** * Execute the wrapped method * @method exec */ 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. An example would be a service that scrubs * out illegal characters prior to executing the core business logic. * @class Do.AlterArgs */ 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 * @class Do.AlterReturn */ 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. * @class Do.Halt */ 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 * @class Do.Prevent */ 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 * @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 AFTER = 'after', CONFIGS = [ 'broadcast', 'monitored', 'bubbles', 'context', 'contextFn', 'currentTarget', 'defaultFn', 'defaultTargetOnly', 'details', 'emitFacade', 'fireOnce', 'async', 'host', 'preventable', 'preventedFn', 'queuable', 'silent', 'stoppedFn', 'target', 'type' ], YUI3_SIGNATURE = 9, YUI_LOG = 'yui:log'; /** * 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 * @type CustomEvent */ this.evt = evt; /** * The subscriber object * @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); } }; /** * 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) { // if (arguments.length > 2) { // this.log('CustomEvent context and silent are now in the config', 'warn', 'Event'); // } 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 {} */ this.subscribers = {}; /** * 'After' subscribers * @property afters * @type Subscriber {} */ 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); }; Y.CustomEvent.prototype = { hasSubs: function(when) { var s = this.subCount, a = this.afterCount, sib = this.sibling; if (sib) { s += sib.subCount; a += sib.afterCount; } 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 = Y.Array(arguments, 0, true); 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 = Y.merge(this.subscribers), a = Y.merge(this.afters), sib = this.sibling; if (sib) { Y.mix(s, sib.subscribers); Y.mix(a, sib.afters); } 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) { if (o) { Y.mix(this, o, force, CONFIGS); } }, _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[s.id] = s; this.afterCount++; } else { this.subscribers[s.id] = s; this.subCount++; } 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) ? Y.Array(arguments, 2, true) : 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) ? Y.Array(arguments, 2, true) : null; if (this.host) { this.host._monitor('attach', this.type, { 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) ? Y.Array(arguments, 2, true) : 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 = Y.merge(this.subscribers, this.afters); for (i in subs) { if (subs.hasOwnProperty(i)) { s = subs[i]; if (s && (!fn || fn === s.fn)) { this._delete(s); 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. * @private */ _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) { if (!this.silent) { } }, /** * 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 = Y.Array(arguments, 0, true); // this doesn't happen if the event isn't published // this.host._monitor('fire', this.type, args); this.fired = true; this.firedWith = args; if (this.emitFacade) { return this.fireComplex(args); } else { return this.fireSimple(args); } } }, fireSimple: function(args) { this.stopped = 0; this.prevented = 0; if (this.hasSubs()) { // this._procSubs(Y.merge(this.subscribers, this.afters), args); 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) { args[0] = args[0] || {}; return this.fireSimple(args); }, _procSubs: function(subs, args, ef) { var s, i; for (i in subs) { if (subs.hasOwnProperty(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; }, _broadcast: function(args) { if (!this.stopped && this.broadcast) { var a = Y.Array(args); 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(); }, /** * @method _delete * @param subscriber object. * @private */ _delete: function(s) { if (s) { if (this.subscribers[s.id]) { delete this.subscribers[s.id]; this.subCount--; } if (this.afters[s.id]) { delete this.afters[s.id]; this.afterCount--; } } if (this.host) { this.host._monitor('detach', this.type, { ce: this, sub: s }); } if (s) { delete s.fn; delete s.context; } } }; ///////////////////////////////////////////////////////////////////// /** * 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) { /** * 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; /** * 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 = { _notify: function(c, args, ce) { 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.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); } } }; /** * 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 * @config chain {boolean} if true, on/after/detach return the host to allow * chaining, otherwise they return an EventHandle (default false) */ var L = Y.Lang, PREFIX_DELIMITER = ':', CATEGORY_DELIMITER = '|', AFTER_PREFIX = '~AFTER~', YArray = Y.Array, _wildType = Y.cached(function(type) { return type.replace(/(.*)(:)(.*)/, "*$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 || !L.isString(type) || 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 = { /** * 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 type {string} The type of the event * @param fn {Function} The callback * @param context {object} optional execution context. * @param arg* {mixed} 0..n additional arguments to supply to the subscriber * @return the event target or a detach handle per 'chain' config */ once: function() { var handle = this.on.apply(this, arguments); handle.batch(function(hand) { if (hand.sub) { hand.sub.once = true; } }); return handle; }, /** * Subscribe to a custom event hosted by this object * @method on * @param type {string} The type of the event * @param fn {Function} The callback * @param context {object} optional execution context. * @param arg* {mixed} 0..n additional arguments to supply to the subscriber * @return the event target or a detach handle per 'chain' config */ on: function(type, fn, context) { var parts = _parseType(type, this._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 = YArray(arguments, 0, true); 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 (this._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 = YArray(arguments, 0, true); 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 = YArray(arguments, 0, true); 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 = this._yuievt.events[type] || this.publish(type); handle = ce._on(fn, context, (arguments.length > 3) ? YArray(arguments, 3, true) : null, (after) ? 'after' : true); } if (detachcategory) { store[detachcategory] = store[detachcategory] || {}; store[detachcategory][type] = store[detachcategory][type] || []; store[detachcategory][type].push(handle); } return (this._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 = YArray(arguments, 0, true); 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 = YArray(arguments, 0, true); // 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; type = (pre) ? _getType(type, pre) : type; this._monitor('publish', type, { args: arguments }); if (L.isObject(type)) { ret = {}; Y.each(type, function(v, k) { ret[k] = this.publish(k, v || opts); }, this); return ret; } events = edata.events; ce = events[type]; if (ce) { // ce.log("publish applying new config to published event: '"+type+"' exists", 'info', 'event'); if (opts) { ce.applyConfig(opts, true); } } else { defaults = edata.defaults; // apply defaults ce = new Y.CustomEvent(type, (opts) ? Y.merge(defaults, opts) : defaults); 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. * * @private */ _monitor: function(what, type, o) { var monitorevt, ce = this.getEvent(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), ce, ret, pre = this._yuievt.config.prefix, ce2, args = (typeIncluded) ? YArray(arguments, 1, true) : arguments; t = (pre) ? _getType(t, pre) : t; this._monitor('fire', t, { args: args }); ce = this.getEvent(t, true); ce2 = this.getSibling(t, ce); if (ce2 && !ce) { ce = this.publish(t); } // this event has not been published or subscribed to if (!ce) { if (this._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 (this._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 type {string} The type of the event * @param fn {Function} The callback * @param context {object} optional execution context. * @param arg* {mixed} 0..n additional arguments to supply to the subscriber * @return the event target or a detach handle per 'chain' config */ after: function(type, fn) { var a = YArray(arguments, 0, true); 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, false, false, { bubbles: false }); ET.call(Y); 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? /** * <code>YUI</code>'s <code>on</code> method is a unified interface for subscribing to * most events exposed by YUI. This includes custom events, DOM events, and * function events. <code>detach</code> is also provided to remove listeners * serviced by this function. * * The signature that <code>on</code> accepts varies depending on the type * of event being consumed. Refer to the specific methods that will * service a specific request for additional information about subscribing * to that type of event. * * <ul> * <li>Custom events. These events are defined by various * modules in the library. This type of event is delegated to * <code>EventTarget</code>'s <code>on</code> method. * <ul> * <li>The type of the event</li> * <li>The callback to execute</li> * <li>An optional context object</li> * <li>0..n additional arguments to supply the callback.</li> * </ul> * Example: * <code>Y.on('drag:drophit', function() { // start work });</code> * </li> * <li>DOM events. These are moments reported by the browser related * to browser functionality and user interaction. * This type of event is delegated to <code>Event</code>'s * <code>attach</code> method. * <ul> * <li>The type of the event</li> * <li>The callback to execute</li> * <li>The specification for the Node(s) to attach the listener * to. This can be a selector, collections, or Node/Element * refereces.</li> * <li>An optional context object</li> * <li>0..n additional arguments to supply the callback.</li> * </ul> * Example: * <code>Y.on('click', function(e) { // something was clicked }, '#someelement');</code> * </li> * <li>Function events. These events can be used to react before or after a * function is executed. This type of event is delegated to <code>Event.Do</code>'s * <code>before</code> method. * <ul> * <li>The callback to execute</li> * <li>The object that has the function that will be listened for.</li> * <li>The name of the function to listen for.</li> * <li>An optional context object</li> * <li>0..n additional arguments to supply the callback.</li> * </ul> * Example <code>Y.on(function(arg1, arg2, etc) { // obj.methodname was executed }, obj 'methodname');</code> * </li> * </ul> * * <code>on</code> corresponds to the moment before any default behavior of * the event. <code>after</code> works the same way, but these listeners * execute after the event's default behavior. <code>before</code> is an * alias for <code>on</code>. * * @method on * @param type event type (this parameter does not apply for function events) * @param fn the callback * @param context optionally change the value of 'this' in the callback * @param args* 0..n additional arguments to pass to the callback. * @return the event target or a detach handle per 'chain' config * @for YUI */ /** * Listen for an event one time. Equivalent to <code>on</code>, except that * the listener is immediately detached when executed. * @see on * @method once * @param type event type (this parameter does not apply for function events) * @param fn the callback * @param context optionally change the value of 'this' in the callback * @param args* 0..n additional arguments to pass to the callback. * @return the event target or a detach handle per 'chain' config * @for YUI */ /** * after() is a unified interface for subscribing to * most events exposed by YUI. This includes custom events, * DOM events, and AOP events. This works the same way as * the on() function, only it operates after any default * behavior for the event has executed. @see <code>on</code> for more * information. * @method after * @param type event type (this parameter does not apply for function events) * @param fn the callback * @param context optionally change the value of 'this' in the callback * @param args* 0..n additional arguments to pass to the callback. * @return the event target or a detach handle per 'chain' config * @for YUI */ }, '@VERSION@' ,{requires:['oop']});
ajax/libs/primereact/7.2.1/multistatecheckbox/multistatecheckbox.esm.min.js
cdnjs/cdnjs
import t,{createRef as e,Component as o}from"react";import{ObjectUtils as n,classNames as i}from"primereact/utils";import{tip as r}from"primereact/tooltip";function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function f(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return l(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function y(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function d(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}function b(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?d(Object(o),!0).forEach((function(e){y(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):d(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function m(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}var v=function(u){c(j,o);var a,d,v,O,g,k=(a=j,d=m(),function(){var t,e=h(a);if(d){var o=h(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return f(this,t)});function j(t){var o;return p(this,j),(o=k.call(this,t)).state={focused:!1},o.onClick=o.onClick.bind(l(o)),o.onFocus=o.onFocus.bind(l(o)),o.onBlur=o.onBlur.bind(l(o)),o.inputRef=e(o.props.inputRef),o}return v=j,(O=[{key:"onClick",value:function(t){this.props.disabled||this.props.readOnly||(this.toggle(t),this.inputRef.current.focus())}},{key:"getOptionValue",value:function(t){return this.props.optionValue?n.resolveFieldData(t,this.props.optionValue):t}},{key:"equalityKey",value:function(){return this.props.optionValue?null:this.props.dataKey}},{key:"findSelectedOptionMap",value:function(){var t,e,o=this;if(this.props.options){var i=this.equalityKey();e=this.props.options.findIndex((function(t){return n.equals(o.props.value,o.getOptionValue(t),i)})),t=this.props.options[e]}return{option:t,index:e}}},{key:"findNextOption",value:function(){if(this.props.options){var t=this.findSelectedOptionMap().index;return t===this.props.options.length-1?this.props.empty?null:this.props.options[0]:this.props.options[t+1]}return null}},{key:"toggle",value:function(t){var e=this.getOptionValue(this.findNextOption());this.props.onChange&&this.props.onChange({originalEvent:t,value:e,stopPropagation:function(){},preventDefault:function(){},target:{name:this.props.name,id:this.props.id,value:e}})}},{key:"onFocus",value:function(){this.setState({focused:!0})}},{key:"onBlur",value:function(){this.setState({focused:!1})}},{key:"updateInputRef",value:function(){var t=this.props.inputRef;t&&("function"==typeof t?t(this.inputRef.current):t.current=this.inputRef.current)}},{key:"componentDidMount",value:function(){this.updateInputRef(),this.props.tooltip&&!this.props.disabled&&this.renderTooltip(),this.props.empty||null!==this.props.value||this.toggle()}},{key:"componentDidUpdate",value:function(t){t.tooltip===this.props.tooltip&&t.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(b({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip())}},{key:"componentWillUnmount",value:function(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)}},{key:"renderTooltip",value:function(){this.tooltip=r({target:this.element,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"renderIcon",value:function(e){var o=i("p-checkbox-icon p-c",y({},"".concat(e&&e.icon||""),!0)),r=t.createElement("span",{className:o});return this.props.iconTemplate?n.getJSXElement(this.props.iconTemplate,{option:e,className:o,element:r,props:this.props}):r}},{key:"render",value:function(){var e=this,o=this.findSelectedOptionMap().option,n=i("p-multistatecheckbox p-checkbox p-component",this.props.className),r=i("p-checkbox-box",{"p-highlight":!!o,"p-disabled":this.props.disabled,"p-focus":this.state.focused},o&&o.className),p=this.renderIcon(o);return t.createElement("div",{ref:function(t){return e.element=t},id:this.props.id,className:n,style:this.props.style,onClick:this.onClick},t.createElement("div",{className:"p-hidden-accessible"},t.createElement("input",{ref:this.inputRef,type:"checkbox","aria-labelledby":this.props.ariaLabelledBy,id:this.props.inputId,name:this.props.name,onFocus:this.onFocus,onBlur:this.onBlur,disabled:this.props.disabled,readOnly:this.props.readOnly,defaultChecked:!!o})),t.createElement("div",{className:r,ref:function(t){return e.box=t},role:"checkbox","aria-checked":!!o,style:o&&o.style},p))}}])&&s(v.prototype,O),g&&s(v,g),Object.defineProperty(v,"prototype",{writable:!1}),j}();y(v,"defaultProps",{id:null,inputRef:null,inputId:null,value:null,options:null,optionValue:null,iconTemplate:null,dataKey:null,name:null,style:null,className:null,disabled:!1,readOnly:!1,empty:!0,tooltip:null,tooltipOptions:null,ariaLabelledBy:null,onChange:null});export{v as MultiStateCheckbox};
src/client/components/PollPage.js
dgrcode/FCC-Voting-App
'use strict'; import React from 'react'; import PropTypes from 'prop-types'; import { getPoll } from '../actions/connectionActions'; import { communicateTempVote, pendingVote } from '../actions/voteActions'; import EditButton from './EditButton'; import Chart from './Chart'; export default class PollPage extends React.Component { static propTypes = { polls: PropTypes.array.isRequired, tempVotes: PropTypes.array.isRequired, pendingVotes: PropTypes.array.isRequired, match: PropTypes.object.isRequired, user: PropTypes.object, ws: PropTypes.instanceOf(WebSocket).isRequired, dispatch: PropTypes.func.isRequired } constructor (props) { super(props); this.state = { fetching: true, deleted: false, modified: false, poll: false }; } componentWillMount = () => { const poll = this.filterPolls(this.props.polls); if (poll) { this.setState({ fetching: false, poll }); } else { const ws = this.props.ws; const pollId = this.props.match.params.pollId; const message = getPoll(pollId); new Promise((resolve) => { const checkConnection = () => { setTimeout(() => { if (ws.readyState !== 1) { console.log('not connected yet'); checkConnection(); } else { resolve(); } }, 500); }; if (ws.readyState === 1) { resolve(); } else { checkConnection(); } }) .then(() => { ws.send(JSON.stringify(message)); }); } } componentWillReceiveProps = (nextProps) => { const nextPoll = this.filterPolls(nextProps.polls); const prevPoll = this.state.poll; if (!nextPoll) { this.setState({ deleted: true }); } else if (!prevPoll) { this.setState({ fetching: false, poll: nextPoll }); } else if (nextPoll !== prevPoll) { // nextPoll could be modified, or just someone else voted const prevNames = [prevPoll.name, ...prevPoll.choices.map(val => val.choice)]; const nextNames = [nextPoll.name, ...nextPoll.choices.map(val => val.choice)]; let onlyVote = true; if (prevNames.length !== nextNames.length) { onlyVote = false; } for (let i = 0; i < prevNames.length; i++) { if (prevNames[i] !== nextNames[i]) { onlyVote = false; } } if (onlyVote === false) { this.modifiedPoll = nextPoll; this.setState({ fetching: false, modified: true }); } else { this.setState({ poll: nextPoll }); } } } filterPolls = (polls) => { const match = this.props.match; const pollId = match.params.pollId; let poll = polls.filter(poll => poll._id === pollId); poll = poll.length ? poll[0] : false; return poll; } updateView = () => { this.setState({ modified: false, poll: this.modifiedPoll }); this.modifiedPoll = undefined; } selectedChoice = (choiceId) => { const ws = this.props.ws; const poll = this.state.poll; const chosen = this.props.pendingVotes[poll._id] !== undefined ? this.props.pendingVotes[poll._id] : -1; if (chosen !== -1) { const voteData = communicateTempVote( this.state.poll._id, chosen, -1); ws.send(JSON.stringify(voteData)); } if (chosen !== choiceId) { const voteData = communicateTempVote(this.state.poll._id, choiceId, 1); ws.send(JSON.stringify(voteData)); } else { choiceId = -1; } this.props.dispatch(pendingVote(this.state.poll._id, choiceId)); } render () { if (this.state.fetching) { return (<h2>Connecting...</h2>); } const poll = this.state.poll; const user = this.props.user; const NotificationDelete = () => { if (this.state.deleted) { return <h3>The poll has been deleted by the owner. Submissions will not be taken into account</h3>; } return null; }; const NotificationModified = () => { if (this.state.modified) { return ( <h3 onClick={this.updateView} role="button"> The poll has been modified by the owner. Click here to update your view </h3>); } return null; }; const Choice = (props) => ( <div className="choice"> <label>{props.choice} <input type="radio" name="choices" {...props.checked} onClick={props.handler}/> </label> </div> ); const pollTempVotes = []; if (this.props.tempVotes.hasOwnProperty(poll._id)) { // This will get slow if a poll has more than 10000 choices. Not likely // to happen for (let ch = 0; ch < poll.choices.length; ch++) { pollTempVotes.push( this.props.tempVotes[poll._id] .reduce((acc, tmpv) => tmpv.choiceId === ch ? acc + tmpv.amount : acc, 0) ); } } const chosen = this.props.pendingVotes[poll._id] !== undefined ? this.props.pendingVotes[poll._id] : -1; console.log('selected id:', chosen); return ( <div className="app-content"> <h2>{poll.name}</h2> <NotificationDelete/> <NotificationModified/> <button className="btn btn-default">Share</button> <EditButton user={user} poll={poll}/> <div className="choices"> { poll.choices.map((choice, id) => <Choice key={id} choice={choice.choice} checked={chosen === id ? { checked: true } : {}} handler={this.selectedChoice.bind(this, id)}/> ) } </div> <Chart votes={poll.choices.map((val, idx) => val.votes + (idx === chosen ? 1 : 0) + (pollTempVotes[idx] || 0) )} labels={poll.choices.map(val => val.choice)} selectedHandler={this.selectedChoice} /> </div> ); } }
designs/Builder/Builder_Responsive_HTML_Template/assets/js/jquery.js
kapasofts-views/loam
/*! jQuery v1.7.2 jquery.com | jquery.org/license */ (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+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(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d=="object"){for(l in d)e.access(a,c,l,d[l],1,h,f);g=1}else if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));if(c)for(;l<m;l++)c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i);g=1}return g?a:k?c.call(a):m?c(a[0],d):h},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?n(g):h==="function"&&(!a.unique||!p.has(g))&&c.push(g)},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++)if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!i}};return p};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement("div"),q=c.documentElement;p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="<div "+n+"display:block;'><div style='"+t+"0;display:block;overflow:hidden;'></div></div>"+"<table "+n+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="<table><tr><td style='"+t+"0;display:none'></td><td>t</td></tr></table>",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="<div style='width:5px;'></div>",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(j,"parsedAttrs")){g=j.attributes;for(i=g.length;k<i;k++)h=g[k].name,h.indexOf("data-")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]));f._data(j,"parsedAttrs",!0)}}return m}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!";return f.access(this,function(c){if(c===b){m=this.triggerHandler("getData"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler("setData"+e,d),f.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length<d)return f.queue(this[0],a);return c===b?this:this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise(c)}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i<g;i++)e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,""),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},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(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function( a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},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(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),d._submit_attached=!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.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){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9||d===11){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.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(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")[\\s/>]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={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,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f .clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1></$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]==="<table>"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i<u;i++)bn(l[i]);else bn(l);l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return!a.type||be.test(a.type)};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,"script")&&(!h.type||be.test(h.type)))e.push(h.parentNode?h.parentNode.removeChild(h):h);else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName("script"),g);j.splice.apply(j,[k+1,0].concat(v))}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bp=/alpha\([^)]*\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,bu=/^([\-+])=([\-+.\de]+)/,bv=/^margin/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Top","Right","Bottom","Left"],by,bz,bA;f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),(e===""&&f.css(d,"display")==="none"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,"olddisplay",cu(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ct("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(ct("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o,p,q;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&"expand"in k){l=k.expand(a[g]),delete a[g];for(i in l)i in a||(a[i]=l[i])}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,"fxshow"+e.prop)===b&&(e.options.hide?f._data(e.elem,"fxshow"+e.prop,e.start):e.options.show&&f._data(e.elem,"fxshow"+e.prop,e.end))},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cq||cr(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(cp.concat.apply([],cp),function(a,b){b.indexOf("margin")&&(f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)})}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cv,cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?cv=function(a,b,c,d){try{d=a.getBoundingClientRect()}catch(e){}if(!d||!f.contains(c,a))return d?{top:d.top,left:d.left}:{top:0,left:0};var g=b.body,h=cy(b),i=c.clientTop||g.clientTop||0,j=c.clientLeft||g.clientLeft||0,k=h.pageYOffset||f.support.boxModel&&c.scrollTop||g.scrollTop,l=h.pageXOffset||f.support.boxModel&&c.scrollLeft||g.scrollLeft,m=d.top+k-i,n=d.left+l-j;return{top:m,left:n}}:cv=function(a,b,c){var d,e=a.offsetParent,g=a,h=b.body,i=b.defaultView,j=i?i.getComputedStyle(a,null):a.currentStyle,k=a.offsetTop,l=a.offsetLeft;while((a=a.parentNode)&&a!==h&&a!==c){if(f.support.fixedPosition&&j.position==="fixed")break;d=i?i.getComputedStyle(a,null):a.currentStyle,k-=a.scrollTop,l-=a.scrollLeft,a===e&&(k+=a.offsetTop,l+=a.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(a.nodeName))&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),g=e,e=a.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),j=d}if(j.position==="relative"||j.position==="static")k+=h.offsetTop,l+=h.offsetLeft;f.support.fixedPosition&&j.position==="fixed"&&(k+=Math.max(c.scrollTop,h.scrollTop),l+=Math.max(c.scrollLeft,h.scrollLeft));return{top:k,left:l}},f.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){f.offset.setOffset(this,a,b)});var c=this[0],d=c&&c.ownerDocument;if(!d)return null;if(c===d.body)return f.offset.bodyOffset(c);return cv(c,d,d.documentElement)},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); jQuery.noConflict();
src/components/custom/table.js
crossfield/react-drafts
import React from 'react'; import PropTypes from 'prop-types'; function Table(props) { const { title, tableData } = props.blockProps || props; const firstRowColKeys = Object.keys(tableData.r0); return ( <figure className="drafts-editor__custom-block table"> <table> <thead> { title ? ( <tr className="table-header"> <th colSpan={firstRowColKeys.length}>{title}</th> </tr> ) : null } <tr> { firstRowColKeys.map(colKey => ( <th key={colKey}>{tableData.r0[colKey]}</th> )) } </tr> </thead> <tbody> { Object.keys(tableData).map(rowKey => { if (rowKey === 'r0') { return null; } const rowData = tableData[rowKey]; return ( <tr key={rowKey}> { Object.keys(rowData).map(cellKey => ( <td key={cellKey}>{rowData[cellKey]}</td> )) } </tr> ) }) } </tbody> </table> </figure> ); } Table.propTypes = { props: PropTypes.shape({ blockProps: PropTypes.shape({ tableData: PropTypes.shape({}) }) }) }; export default Table;
js/App/Components/TabViews/SubViews/DimmerButton.js
telldus/telldus-live-mobile-v3
/** * Copyright 2016-present Telldus Technologies AB. * * This file is part of the Telldus Live! app. * * Telldus Live! app is free : 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. * * Telldus Live! app 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 Telldus Live! app. If not, see <http://www.gnu.org/licenses/>. */ // @flow 'use strict'; import React from 'react'; import { StyleSheet } from 'react-native'; import { connect } from 'react-redux'; import throttle from 'lodash/throttle'; import { View } from '../../../../BaseComponents'; import { saveDimmerInitialState, showDimmerPopup, hideDimmerPopup, setDimmerValue, showDimmerStep } from '../../../Actions/Dimmer'; import { deviceSetState } from '../../../Actions/Devices'; import DimmerOffButton from './DimmerOffButton'; import DimmerOnButton from './DimmerOnButton'; import HVSliderContainer from './Device/HVSliderContainer'; import SliderScale from './Device/SliderScale'; import { getDimmerValue, toDimmerValue, toSliderValue, shouldUpdate, } from '../../../Lib'; import Theme from '../../../Theme'; import i18n from '../../../Translations/common'; type Props = { commandON: number, commandOFF: number, commandDIM: number, device: Object, showSlider?: boolean, isOpen: boolean, screenReaderEnabled: boolean, setScrollEnabled: boolean, sensitive: number, intl: Object, isGatewayActive: boolean, onSlideActive: () => void, onSlideComplete: () => void, showDimmerStep: (number) => void, style?: Array<any> | Object, offButtonStyle?: Array<any> | Object, onButtonStyle?: Array<any> | Object, sliderStyle?: Array<any> | Object, closeSwipeRow: () => void, onDimmerSlide: number => void, saveDimmerInitialState: (deviceId: number, initalValue: number, initialState: string) => void, showDimmerPopup: (name: string, sliderValue: number) => void, hideDimmerPopup: () => void, deviceSetState: (id: number, command: number, value?: number) => void, onPressDimButton: (device: Object) => void, onPressDeviceAction?: () => void, onPressOverride?: (Object) => void, disableActionIndicator?: boolean, }; type DefaultProps = { showSlider: boolean, commandON: number, commandOFF: number, commandDIM: number, disableActionIndicator: boolean, }; class DimmerButton extends View<Props, null> { props: Props; parentScrollEnabled: boolean; onTurnOn: () => void; onTurnOff: () => void; onSlidingStart: (name: string, sliderValue: number) => void; onSlidingComplete: number => void; onValueChange: number => void; showDimmerStep: (number) => void; onPressDimButton: () => void; static defaultProps: DefaultProps = { showSlider: true, commandON: 1, commandOFF: 2, commandDIM: 16, disableActionIndicator: false, }; constructor(props: Props) { super(props); this.parentScrollEnabled = true; const { device, onDimmerSlide } = this.props; this.onValueChangeThrottled = throttle(onDimmerSlide(device.id), 100, { trailing: true, }); this.onValueChangeOverrideThrottled = throttle(this._onValueChangeOverride, 100, { trailing: true, }); this.onTurnOn = this.onTurnOn.bind(this); this.onTurnOff = this.onTurnOff.bind(this); this.onSlidingStart = this.onSlidingStart.bind(this); this.onSlidingComplete = this.onSlidingComplete.bind(this); this.onValueChange = this.onValueChange.bind(this); this.showDimmerStep = this.showDimmerStep.bind(this); this.onPressDimButton = this.onPressDimButton.bind(this); } shouldComponentUpdate(nextProps: Object, nextState: Object): boolean { const { isOpen, setScrollEnabled, ...others } = this.props; const { isOpen: isOpenN, setScrollEnabled: setScrollEnabledN, ...othersN } = nextProps; if (isOpen !== isOpenN || setScrollEnabled !== setScrollEnabledN) { return true; } const propsChange = shouldUpdate(others, othersN, [ 'device', 'showSlider', 'screenReaderEnabled', 'sensitive', 'onPressOverride', ]); if (propsChange) { return true; } return false; } _onValueChangeOverride(dimValue: number) { let { commandDIM, onPressOverride } = this.props; if (onPressOverride) { onPressOverride({ method: commandDIM, stateValues: { [commandDIM]: dimValue, }, }); } } onValueChange(sliderValue: number) { this.onValueChangeThrottled(toDimmerValue(sliderValue)); this.onValueChangeOverrideThrottled(toDimmerValue(sliderValue)); } onSlidingStart(name: string, sliderValue: number) { const { stateValues, isInState, id, value, methodRequested } = this.props.device; const stateValue = stateValues ? stateValues.DIM : value; this.props.onSlideActive(); if (methodRequested === '') { this.props.saveDimmerInitialState(id, stateValue, isInState); } this.props.showDimmerPopup(name, toDimmerValue(sliderValue)); } onSlidingComplete(sliderValue: number) { let { device, commandON, commandOFF, commandDIM, onPressOverride } = this.props; let command = commandDIM; this.props.onSlideComplete(); if (sliderValue === 100) { command = commandON; } if (sliderValue === 0) { command = commandOFF; } let dimValue = toDimmerValue(sliderValue); if (onPressOverride) { onPressOverride({ method: command, stateValues: { [commandDIM]: dimValue, }, }); this.props.hideDimmerPopup(); return; } this.props.deviceSetState(device.id, command, dimValue); this.props.hideDimmerPopup(); } onTurnOn() { const { isOpen, closeSwipeRow, onPressDeviceAction, onPressOverride, commandON, } = this.props; if (onPressOverride) { onPressOverride({ method: commandON, }); return; } if (isOpen && closeSwipeRow) { closeSwipeRow(); return; } if (onPressDeviceAction) { onPressDeviceAction(); } this.props.deviceSetState(this.props.device.id, commandON); } onTurnOff() { const { isOpen, closeSwipeRow, onPressDeviceAction, onPressOverride, commandOFF, } = this.props; if (onPressOverride) { onPressOverride({ method: commandOFF, }); return; } if (isOpen && closeSwipeRow) { closeSwipeRow(); return; } if (onPressDeviceAction) { onPressDeviceAction(); } this.props.deviceSetState(this.props.device.id, commandOFF); } showDimmerStep(id: number) { this.props.showDimmerStep(id); } onPressDimButton() { const { onPressDimButton, device, onPressDeviceAction } = this.props; if (onPressDeviceAction) { onPressDeviceAction(); } if (onPressDimButton && typeof onPressDimButton === 'function') { onPressDimButton(device); } } render(): Object { const { device: item, intl, isGatewayActive, screenReaderEnabled, showSlider, style, onButtonStyle, offButtonStyle, sliderStyle, setScrollEnabled, isOpen, closeSwipeRow, sensitive, disableActionIndicator, } = this.props; const { isInState, name, supportedMethods = {}, methodRequested, local, stateValues, value: val } = item; const { DIM } = supportedMethods; const deviceName = name ? name : intl.formatMessage(i18n.noName); const stateValue = stateValues ? stateValues.DIM : val; const value = getDimmerValue(stateValue, isInState); const sliderProps = { sensitive, thumbWidth: 10, thumbHeight: 10, fontSize: 9, value: toSliderValue(value), onSlidingStart: this.onSlidingStart, onSlidingComplete: this.onSlidingComplete, onValueChange: this.onValueChange, showDimmerStep: this.showDimmerStep, item, intl, isInState, isGatewayActive, screenReaderEnabled, setScrollEnabled, }; const sharedProps = { isInState, methodRequested, intl, isGatewayActive, local, name: deviceName, enabled: false, disableActionIndicator, }; const onButton = ( <HVSliderContainer {...sliderProps} style={[styles.buttonContainerStyle, onButtonStyle]} onPress={this.onTurnOn}> <DimmerOnButton ref={'onButton'} style={styles.buttonStyle} onPress={this.onTurnOn} {...sharedProps} /> </HVSliderContainer> ); const offButton = ( <HVSliderContainer {...sliderProps} style={[styles.buttonContainerStyle, offButtonStyle]} onPress={this.onTurnOff}> <DimmerOffButton ref={'offButton'} style={styles.buttonStyle} onPress={this.onTurnOff} {...sharedProps} /> </HVSliderContainer> ); const slider = DIM ? ( <HVSliderContainer {...sliderProps} style={sliderStyle} onPress={isOpen ? closeSwipeRow : this.onPressDimButton} > <SliderScale style={styles.slider} thumbWidth={10} thumbHeight={10} fontSize={9} {...sharedProps} importantForAccessibility={'yes'} /> </HVSliderContainer> ) : null; return ( <View style={[styles.container, style]}> { offButton } {!!showSlider && slider } { onButton } </View> ); } } const styles = StyleSheet.create({ container: { flex: 0, flexDirection: 'row', justifyContent: 'center', alignItems: 'center', height: Theme.Core.rowHeight, }, slider: { justifyContent: 'center', alignItems: 'flex-start', width: Theme.Core.buttonWidth, height: Theme.Core.rowHeight, }, buttonStyle: { flex: 1, alignItems: 'center', justifyContent: 'center', }, buttonContainerStyle: { width: Theme.Core.buttonWidth, height: Theme.Core.rowHeight, }, }); function mapDispatchToProps(dispatch: Function): Object { return { saveDimmerInitialState: (deviceId: number, initalValue: number, initialState: string) => { dispatch(saveDimmerInitialState(deviceId, initalValue, initialState)); }, showDimmerPopup: (name: string, value: number) => { dispatch(showDimmerPopup(name, value)); }, hideDimmerPopup: () => { dispatch(hideDimmerPopup()); }, onDimmerSlide: (id: number): any => (value: number): any => dispatch(setDimmerValue(id, value)), deviceSetState: (id: number, command: number, value?: number): any => dispatch(deviceSetState(id, command, value)), showDimmerStep: (id: number) => { dispatch(showDimmerStep(id)); }, }; } function mapStateToProps(store: Object, dispatch: Function): Object { const { app = {} } = store; const { screenReaderEnabled, defaultSettings = {} } = app; const { dimmerSensitivity: sensitive = 5 } = defaultSettings; return { screenReaderEnabled, sensitive, }; } module.exports = (connect(mapStateToProps, mapDispatchToProps)(DimmerButton): Object);
ajax/libs/yui/3.16.0/event-custom-base/event-custom-base-coverage.js
shelsonjava/cdnjs
/* YUI 3.16.0 (build 76f0e08) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } if (!__coverage__['build/event-custom-base/event-custom-base.js']) { __coverage__['build/event-custom-base/event-custom-base.js'] = {"path":"build/event-custom-base/event-custom-base.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":0,"141":0,"142":0,"143":0,"144":0,"145":0,"146":0,"147":0,"148":0,"149":0,"150":0,"151":0,"152":0,"153":0,"154":0,"155":0,"156":0,"157":0,"158":0,"159":0,"160":0,"161":0,"162":0,"163":0,"164":0,"165":0,"166":0,"167":0,"168":0,"169":0,"170":0,"171":0,"172":0,"173":0,"174":0,"175":0,"176":0,"177":0,"178":0,"179":0,"180":0,"181":0,"182":0,"183":0,"184":0,"185":0,"186":0,"187":0,"188":0,"189":0,"190":0,"191":0,"192":0,"193":0,"194":0,"195":0,"196":0,"197":0,"198":0,"199":0,"200":0,"201":0,"202":0,"203":0,"204":0,"205":0,"206":0,"207":0,"208":0,"209":0,"210":0,"211":0,"212":0,"213":0,"214":0,"215":0,"216":0,"217":0,"218":0,"219":0,"220":0,"221":0,"222":0,"223":0,"224":0,"225":0,"226":0,"227":0,"228":0,"229":0,"230":0,"231":0,"232":0,"233":0,"234":0,"235":0,"236":0,"237":0,"238":0,"239":0,"240":0,"241":0,"242":0,"243":0,"244":0,"245":0,"246":0,"247":0,"248":0,"249":0,"250":0,"251":0,"252":0,"253":0,"254":0,"255":0,"256":0,"257":0,"258":0,"259":0,"260":0,"261":0,"262":0,"263":0,"264":0,"265":0,"266":0,"267":0,"268":0,"269":0,"270":0,"271":0,"272":0,"273":0,"274":0,"275":0,"276":0,"277":0,"278":0,"279":0,"280":0,"281":0,"282":0,"283":0,"284":0,"285":0,"286":0,"287":0,"288":0,"289":0,"290":0,"291":0,"292":0,"293":0,"294":0,"295":0,"296":0,"297":0,"298":0,"299":0,"300":0,"301":0,"302":0,"303":0,"304":0,"305":0,"306":0,"307":0,"308":0,"309":0,"310":0,"311":0,"312":0,"313":0,"314":0,"315":0,"316":0,"317":0,"318":0,"319":0,"320":0,"321":0,"322":0,"323":0,"324":0,"325":0,"326":0,"327":0,"328":0,"329":0,"330":0,"331":0,"332":0,"333":0,"334":0,"335":0,"336":0,"337":0,"338":0,"339":0,"340":0,"341":0,"342":0,"343":0,"344":0,"345":0,"346":0,"347":0,"348":0,"349":0,"350":0,"351":0,"352":0,"353":0,"354":0,"355":0,"356":0,"357":0,"358":0,"359":0,"360":0,"361":0,"362":0,"363":0,"364":0,"365":0,"366":0,"367":0,"368":0,"369":0,"370":0,"371":0,"372":0,"373":0,"374":0,"375":0,"376":0,"377":0,"378":0,"379":0,"380":0,"381":0,"382":0,"383":0,"384":0,"385":0,"386":0,"387":0,"388":0,"389":0,"390":0,"391":0,"392":0,"393":0,"394":0,"395":0,"396":0,"397":0,"398":0,"399":0,"400":0,"401":0,"402":0,"403":0,"404":0,"405":0,"406":0,"407":0,"408":0,"409":0,"410":0,"411":0,"412":0,"413":0,"414":0,"415":0,"416":0,"417":0,"418":0,"419":0,"420":0,"421":0,"422":0,"423":0,"424":0,"425":0,"426":0,"427":0,"428":0,"429":0,"430":0,"431":0,"432":0,"433":0,"434":0,"435":0,"436":0,"437":0,"438":0,"439":0,"440":0,"441":0,"442":0,"443":0,"444":0,"445":0,"446":0,"447":0,"448":0,"449":0,"450":0,"451":0,"452":0,"453":0,"454":0,"455":0,"456":0,"457":0,"458":0,"459":0,"460":0,"461":0,"462":0,"463":0,"464":0,"465":0,"466":0,"467":0,"468":0,"469":0,"470":0,"471":0,"472":0,"473":0,"474":0,"475":0,"476":0,"477":0,"478":0,"479":0,"480":0,"481":0,"482":0,"483":0,"484":0,"485":0,"486":0,"487":0,"488":0,"489":0,"490":0,"491":0,"492":0,"493":0,"494":0,"495":0,"496":0,"497":0,"498":0,"499":0,"500":0,"501":0,"502":0,"503":0,"504":0,"505":0,"506":0,"507":0,"508":0,"509":0,"510":0,"511":0,"512":0,"513":0,"514":0,"515":0,"516":0,"517":0,"518":0,"519":0,"520":0,"521":0,"522":0,"523":0,"524":0,"525":0,"526":0,"527":0,"528":0,"529":0,"530":0,"531":0,"532":0,"533":0,"534":0,"535":0,"536":0,"537":0,"538":0,"539":0,"540":0,"541":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0,0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[0,0],"35":[0,0],"36":[0,0],"37":[0,0],"38":[0,0],"39":[0,0],"40":[0,0],"41":[0,0],"42":[0,0],"43":[0,0],"44":[0,0],"45":[0,0],"46":[0,0],"47":[0,0],"48":[0,0],"49":[0,0],"50":[0,0],"51":[0,0],"52":[0,0],"53":[0,0,0],"54":[0,0],"55":[0,0],"56":[0,0,0],"57":[0,0],"58":[0,0],"59":[0,0],"60":[0,0],"61":[0,0],"62":[0,0],"63":[0,0],"64":[0,0],"65":[0,0],"66":[0,0],"67":[0,0],"68":[0,0],"69":[0,0],"70":[0,0],"71":[0,0],"72":[0,0],"73":[0,0],"74":[0,0],"75":[0,0],"76":[0,0],"77":[0,0],"78":[0,0],"79":[0,0],"80":[0,0],"81":[0,0],"82":[0,0],"83":[0,0],"84":[0,0],"85":[0,0],"86":[0,0],"87":[0,0],"88":[0,0,0],"89":[0,0],"90":[0,0],"91":[0,0],"92":[0,0],"93":[0,0],"94":[0,0],"95":[0,0],"96":[0,0],"97":[0,0],"98":[0,0],"99":[0,0],"100":[0,0],"101":[0,0],"102":[0,0],"103":[0,0],"104":[0,0],"105":[0,0],"106":[0,0],"107":[0,0,0],"108":[0,0],"109":[0,0],"110":[0,0],"111":[0,0],"112":[0,0],"113":[0,0],"114":[0,0],"115":[0,0],"116":[0,0],"117":[0,0],"118":[0,0],"119":[0,0],"120":[0,0],"121":[0,0],"122":[0,0],"123":[0,0],"124":[0,0],"125":[0,0],"126":[0,0],"127":[0,0],"128":[0,0],"129":[0,0],"130":[0,0],"131":[0,0,0],"132":[0,0],"133":[0,0],"134":[0,0],"135":[0,0],"136":[0,0],"137":[0,0],"138":[0,0],"139":[0,0],"140":[0,0],"141":[0,0],"142":[0,0],"143":[0,0],"144":[0,0],"145":[0,0],"146":[0,0],"147":[0,0],"148":[0,0],"149":[0,0],"150":[0,0],"151":[0,0],"152":[0,0],"153":[0,0],"154":[0,0],"155":[0,0],"156":[0,0],"157":[0,0],"158":[0,0],"159":[0,0],"160":[0,0],"161":[0,0],"162":[0,0],"163":[0,0],"164":[0,0],"165":[0,0],"166":[0,0],"167":[0,0,0],"168":[0,0],"169":[0,0],"170":[0,0],"171":[0,0],"172":[0,0,0,0],"173":[0,0],"174":[0,0],"175":[0,0],"176":[0,0],"177":[0,0],"178":[0,0],"179":[0,0],"180":[0,0,0,0],"181":[0,0],"182":[0,0],"183":[0,0],"184":[0,0],"185":[0,0],"186":[0,0],"187":[0,0,0,0,0],"188":[0,0],"189":[0,0],"190":[0,0],"191":[0,0],"192":[0,0],"193":[0,0],"194":[0,0],"195":[0,0],"196":[0,0],"197":[0,0],"198":[0,0],"199":[0,0],"200":[0,0,0,0,0],"201":[0,0],"202":[0,0],"203":[0,0],"204":[0,0],"205":[0,0],"206":[0,0],"207":[0,0],"208":[0,0],"209":[0,0],"210":[0,0],"211":[0,0,0,0],"212":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":29},"end":{"line":1,"column":48}}},"2":{"name":"(anonymous_2)","line":74,"loc":{"start":{"line":74,"column":12},"end":{"line":74,"column":38}}},"3":{"name":"(anonymous_3)","line":111,"loc":{"start":{"line":111,"column":11},"end":{"line":111,"column":37}}},"4":{"name":"(anonymous_4)","line":135,"loc":{"start":{"line":135,"column":13},"end":{"line":135,"column":42}}},"5":{"name":"(anonymous_5)","line":151,"loc":{"start":{"line":151,"column":23},"end":{"line":151,"column":34}}},"6":{"name":"(anonymous_6)","line":172,"loc":{"start":{"line":172,"column":12},"end":{"line":172,"column":29}}},"7":{"name":"(anonymous_7)","line":211,"loc":{"start":{"line":211,"column":12},"end":{"line":211,"column":31}}},"8":{"name":"(anonymous_8)","line":226,"loc":{"start":{"line":226,"column":31},"end":{"line":226,"column":56}}},"9":{"name":"(anonymous_9)","line":241,"loc":{"start":{"line":241,"column":30},"end":{"line":241,"column":45}}},"10":{"name":"(anonymous_10)","line":260,"loc":{"start":{"line":260,"column":27},"end":{"line":260,"column":39}}},"11":{"name":"(anonymous_11)","line":328,"loc":{"start":{"line":328,"column":15},"end":{"line":328,"column":38}}},"12":{"name":"(anonymous_12)","line":342,"loc":{"start":{"line":342,"column":17},"end":{"line":342,"column":42}}},"13":{"name":"(anonymous_13)","line":357,"loc":{"start":{"line":357,"column":10},"end":{"line":357,"column":32}}},"14":{"name":"(anonymous_14)","line":370,"loc":{"start":{"line":370,"column":13},"end":{"line":370,"column":27}}},"15":{"name":"(anonymous_15)","line":431,"loc":{"start":{"line":431,"column":17},"end":{"line":431,"column":36}}},"16":{"name":"(anonymous_16)","line":467,"loc":{"start":{"line":467,"column":16},"end":{"line":467,"column":41}}},"17":{"name":"(anonymous_17)","line":712,"loc":{"start":{"line":712,"column":13},"end":{"line":712,"column":28}}},"18":{"name":"(anonymous_18)","line":755,"loc":{"start":{"line":755,"column":13},"end":{"line":755,"column":28}}},"19":{"name":"(anonymous_19)","line":768,"loc":{"start":{"line":768,"column":13},"end":{"line":768,"column":24}}},"20":{"name":"(anonymous_20)","line":819,"loc":{"start":{"line":819,"column":17},"end":{"line":819,"column":36}}},"21":{"name":"(anonymous_21)","line":836,"loc":{"start":{"line":836,"column":9},"end":{"line":836,"column":43}}},"22":{"name":"(anonymous_22)","line":890,"loc":{"start":{"line":890,"column":15},"end":{"line":890,"column":37}}},"23":{"name":"(anonymous_23)","line":904,"loc":{"start":{"line":904,"column":8},"end":{"line":904,"column":30}}},"24":{"name":"(anonymous_24)","line":926,"loc":{"start":{"line":926,"column":11},"end":{"line":926,"column":33}}},"25":{"name":"(anonymous_25)","line":939,"loc":{"start":{"line":939,"column":12},"end":{"line":939,"column":34}}},"26":{"name":"(anonymous_26)","line":982,"loc":{"start":{"line":982,"column":17},"end":{"line":982,"column":28}}},"27":{"name":"(anonymous_27)","line":993,"loc":{"start":{"line":993,"column":13},"end":{"line":993,"column":35}}},"28":{"name":"(anonymous_28)","line":1013,"loc":{"start":{"line":1013,"column":9},"end":{"line":1013,"column":28}}},"29":{"name":"(anonymous_29)","line":1033,"loc":{"start":{"line":1033,"column":10},"end":{"line":1033,"column":21}}},"30":{"name":"(anonymous_30)","line":1055,"loc":{"start":{"line":1055,"column":11},"end":{"line":1055,"column":26}}},"31":{"name":"(anonymous_31)","line":1086,"loc":{"start":{"line":1086,"column":16},"end":{"line":1086,"column":31}}},"32":{"name":"(anonymous_32)","line":1101,"loc":{"start":{"line":1101,"column":17},"end":{"line":1101,"column":32}}},"33":{"name":"(anonymous_33)","line":1118,"loc":{"start":{"line":1118,"column":15},"end":{"line":1118,"column":40}}},"34":{"name":"(anonymous_34)","line":1144,"loc":{"start":{"line":1144,"column":16},"end":{"line":1144,"column":31}}},"35":{"name":"(anonymous_35)","line":1166,"loc":{"start":{"line":1166,"column":20},"end":{"line":1166,"column":31}}},"36":{"name":"(anonymous_36)","line":1175,"loc":{"start":{"line":1175,"column":15},"end":{"line":1175,"column":26}}},"37":{"name":"(anonymous_37)","line":1189,"loc":{"start":{"line":1189,"column":13},"end":{"line":1189,"column":34}}},"38":{"name":"(anonymous_38)","line":1233,"loc":{"start":{"line":1233,"column":15},"end":{"line":1233,"column":49}}},"39":{"name":"(anonymous_39)","line":1284,"loc":{"start":{"line":1284,"column":13},"end":{"line":1284,"column":35}}},"40":{"name":"(anonymous_40)","line":1325,"loc":{"start":{"line":1325,"column":12},"end":{"line":1325,"column":31}}},"41":{"name":"(anonymous_41)","line":1357,"loc":{"start":{"line":1357,"column":14},"end":{"line":1357,"column":36}}},"42":{"name":"(anonymous_42)","line":1365,"loc":{"start":{"line":1365,"column":14},"end":{"line":1365,"column":25}}},"43":{"name":"(anonymous_43)","line":1377,"loc":{"start":{"line":1377,"column":16},"end":{"line":1377,"column":35}}},"44":{"name":"(anonymous_44)","line":1397,"loc":{"start":{"line":1397,"column":11},"end":{"line":1397,"column":26}}},"45":{"name":"(anonymous_45)","line":1400,"loc":{"start":{"line":1400,"column":35},"end":{"line":1400,"column":47}}},"46":{"name":"(anonymous_46)","line":1411,"loc":{"start":{"line":1411,"column":12},"end":{"line":1411,"column":23}}},"47":{"name":"(anonymous_47)","line":1436,"loc":{"start":{"line":1436,"column":13},"end":{"line":1436,"column":28}}},"48":{"name":"(anonymous_48)","line":1471,"loc":{"start":{"line":1471,"column":25},"end":{"line":1471,"column":40}}},"49":{"name":"(anonymous_49)","line":1482,"loc":{"start":{"line":1482,"column":15},"end":{"line":1482,"column":35}}},"50":{"name":"(anonymous_50)","line":1498,"loc":{"start":{"line":1498,"column":26},"end":{"line":1498,"column":46}}},"51":{"name":"(anonymous_51)","line":1527,"loc":{"start":{"line":1527,"column":9},"end":{"line":1527,"column":24}}},"52":{"name":"(anonymous_52)","line":1575,"loc":{"start":{"line":1575,"column":10},"end":{"line":1575,"column":21}}},"53":{"name":"(anonymous_53)","line":1577,"loc":{"start":{"line":1577,"column":21},"end":{"line":1577,"column":36}}},"54":{"name":"(anonymous_54)","line":1597,"loc":{"start":{"line":1597,"column":15},"end":{"line":1597,"column":26}}},"55":{"name":"(anonymous_55)","line":1599,"loc":{"start":{"line":1599,"column":21},"end":{"line":1599,"column":36}}},"56":{"name":"(anonymous_56)","line":1623,"loc":{"start":{"line":1623,"column":15},"end":{"line":1623,"column":35}}},"57":{"name":"(anonymous_57)","line":1656,"loc":{"start":{"line":1656,"column":8},"end":{"line":1656,"column":36}}},"58":{"name":"(anonymous_58)","line":1688,"loc":{"start":{"line":1688,"column":25},"end":{"line":1688,"column":40}}},"59":{"name":"(anonymous_59)","line":1778,"loc":{"start":{"line":1778,"column":15},"end":{"line":1778,"column":26}}},"60":{"name":"(anonymous_60)","line":1798,"loc":{"start":{"line":1798,"column":12},"end":{"line":1798,"column":40}}},"61":{"name":"(anonymous_61)","line":1825,"loc":{"start":{"line":1825,"column":22},"end":{"line":1825,"column":50}}},"62":{"name":"(anonymous_62)","line":1900,"loc":{"start":{"line":1900,"column":17},"end":{"line":1900,"column":28}}},"63":{"name":"(anonymous_63)","line":1911,"loc":{"start":{"line":1911,"column":15},"end":{"line":1911,"column":30}}},"64":{"name":"(anonymous_64)","line":1923,"loc":{"start":{"line":1923,"column":20},"end":{"line":1923,"column":31}}},"65":{"name":"(anonymous_65)","line":1993,"loc":{"start":{"line":1993,"column":13},"end":{"line":1993,"column":34}}},"66":{"name":"(anonymous_66)","line":2008,"loc":{"start":{"line":2008,"column":25},"end":{"line":2008,"column":40}}},"67":{"name":"(anonymous_67)","line":2033,"loc":{"start":{"line":2033,"column":19},"end":{"line":2033,"column":34}}},"68":{"name":"(anonymous_68)","line":2057,"loc":{"start":{"line":2057,"column":15},"end":{"line":2057,"column":50}}},"69":{"name":"(anonymous_69)","line":2109,"loc":{"start":{"line":2109,"column":14},"end":{"line":2109,"column":43}}},"70":{"name":"(anonymous_70)","line":2157,"loc":{"start":{"line":2157,"column":10},"end":{"line":2157,"column":25}}},"71":{"name":"(anonymous_71)","line":2232,"loc":{"start":{"line":2232,"column":16},"end":{"line":2232,"column":35}}},"72":{"name":"(anonymous_72)","line":2257,"loc":{"start":{"line":2257,"column":14},"end":{"line":2257,"column":39}}},"73":{"name":"(anonymous_73)","line":2282,"loc":{"start":{"line":2282,"column":11},"end":{"line":2282,"column":30}}},"74":{"name":"(anonymous_74)","line":2320,"loc":{"start":{"line":2320,"column":12},"end":{"line":2320,"column":23}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":2471,"column":36}},"2":{"start":{"line":9,"column":0},"end":{"line":12,"column":2}},"3":{"start":{"line":28,"column":0},"end":{"line":177,"column":2}},"4":{"start":{"line":75,"column":8},"end":{"line":75,"column":22}},"5":{"start":{"line":76,"column":8},"end":{"line":79,"column":9}},"6":{"start":{"line":77,"column":12},"end":{"line":77,"column":60}},"7":{"start":{"line":78,"column":12},"end":{"line":78,"column":36}},"8":{"start":{"line":81,"column":8},"end":{"line":81,"column":52}},"9":{"start":{"line":112,"column":8},"end":{"line":112,"column":22}},"10":{"start":{"line":113,"column":8},"end":{"line":116,"column":9}},"11":{"start":{"line":114,"column":12},"end":{"line":114,"column":60}},"12":{"start":{"line":115,"column":12},"end":{"line":115,"column":36}},"13":{"start":{"line":118,"column":8},"end":{"line":118,"column":51}},"14":{"start":{"line":137,"column":8},"end":{"line":137,"column":38}},"15":{"start":{"line":139,"column":8},"end":{"line":142,"column":9}},"16":{"start":{"line":141,"column":12},"end":{"line":141,"column":29}},"17":{"start":{"line":144,"column":8},"end":{"line":144,"column":24}},"18":{"start":{"line":146,"column":8},"end":{"line":154,"column":9}},"19":{"start":{"line":148,"column":12},"end":{"line":148,"column":47}},"20":{"start":{"line":151,"column":12},"end":{"line":153,"column":14}},"21":{"start":{"line":152,"column":16},"end":{"line":152,"column":60}},"22":{"start":{"line":157,"column":8},"end":{"line":157,"column":37}},"23":{"start":{"line":160,"column":8},"end":{"line":160,"column":39}},"24":{"start":{"line":162,"column":8},"end":{"line":162,"column":46}},"25":{"start":{"line":173,"column":8},"end":{"line":175,"column":9}},"26":{"start":{"line":174,"column":12},"end":{"line":174,"column":28}},"27":{"start":{"line":179,"column":0},"end":{"line":179,"column":10}},"28":{"start":{"line":211,"column":0},"end":{"line":217,"column":2}},"29":{"start":{"line":212,"column":4},"end":{"line":212,"column":19}},"30":{"start":{"line":213,"column":4},"end":{"line":213,"column":26}},"31":{"start":{"line":214,"column":4},"end":{"line":214,"column":27}},"32":{"start":{"line":215,"column":4},"end":{"line":215,"column":21}},"33":{"start":{"line":216,"column":4},"end":{"line":216,"column":20}},"34":{"start":{"line":226,"column":0},"end":{"line":232,"column":2}},"35":{"start":{"line":227,"column":4},"end":{"line":231,"column":5}},"36":{"start":{"line":228,"column":8},"end":{"line":228,"column":29}},"37":{"start":{"line":230,"column":8},"end":{"line":230,"column":30}},"38":{"start":{"line":241,"column":0},"end":{"line":244,"column":2}},"39":{"start":{"line":242,"column":4},"end":{"line":242,"column":28}},"40":{"start":{"line":243,"column":4},"end":{"line":243,"column":27}},"41":{"start":{"line":260,"column":0},"end":{"line":313,"column":2}},"42":{"start":{"line":262,"column":4},"end":{"line":266,"column":26}},"43":{"start":{"line":269,"column":4},"end":{"line":286,"column":5}},"44":{"start":{"line":270,"column":8},"end":{"line":285,"column":9}},"45":{"start":{"line":271,"column":12},"end":{"line":271,"column":46}},"46":{"start":{"line":272,"column":12},"end":{"line":284,"column":13}},"47":{"start":{"line":273,"column":16},"end":{"line":283,"column":17}},"48":{"start":{"line":275,"column":24},"end":{"line":275,"column":42}},"49":{"start":{"line":277,"column":24},"end":{"line":277,"column":43}},"50":{"start":{"line":278,"column":24},"end":{"line":278,"column":30}},"51":{"start":{"line":280,"column":24},"end":{"line":280,"column":41}},"52":{"start":{"line":281,"column":24},"end":{"line":281,"column":30}},"53":{"start":{"line":289,"column":4},"end":{"line":291,"column":5}},"54":{"start":{"line":290,"column":8},"end":{"line":290,"column":48}},"55":{"start":{"line":293,"column":4},"end":{"line":293,"column":28}},"56":{"start":{"line":294,"column":4},"end":{"line":294,"column":27}},"57":{"start":{"line":297,"column":4},"end":{"line":310,"column":5}},"58":{"start":{"line":298,"column":8},"end":{"line":309,"column":9}},"59":{"start":{"line":299,"column":12},"end":{"line":299,"column":49}},"60":{"start":{"line":301,"column":12},"end":{"line":308,"column":13}},"61":{"start":{"line":302,"column":16},"end":{"line":302,"column":37}},"62":{"start":{"line":304,"column":19},"end":{"line":308,"column":13}},"63":{"start":{"line":305,"column":16},"end":{"line":305,"column":39}},"64":{"start":{"line":307,"column":16},"end":{"line":307,"column":39}},"65":{"start":{"line":312,"column":4},"end":{"line":312,"column":15}},"66":{"start":{"line":328,"column":0},"end":{"line":331,"column":2}},"67":{"start":{"line":329,"column":4},"end":{"line":329,"column":19}},"68":{"start":{"line":330,"column":4},"end":{"line":330,"column":27}},"69":{"start":{"line":342,"column":0},"end":{"line":345,"column":2}},"70":{"start":{"line":343,"column":4},"end":{"line":343,"column":19}},"71":{"start":{"line":344,"column":4},"end":{"line":344,"column":31}},"72":{"start":{"line":357,"column":0},"end":{"line":360,"column":2}},"73":{"start":{"line":358,"column":4},"end":{"line":358,"column":19}},"74":{"start":{"line":359,"column":4},"end":{"line":359,"column":25}},"75":{"start":{"line":370,"column":0},"end":{"line":372,"column":2}},"76":{"start":{"line":371,"column":4},"end":{"line":371,"column":19}},"77":{"start":{"line":384,"column":0},"end":{"line":384,"column":19}},"78":{"start":{"line":398,"column":0},"end":{"line":441,"column":6}},"79":{"start":{"line":432,"column":8},"end":{"line":432,"column":14}},"80":{"start":{"line":434,"column":8},"end":{"line":438,"column":9}},"81":{"start":{"line":435,"column":12},"end":{"line":437,"column":13}},"82":{"start":{"line":436,"column":16},"end":{"line":436,"column":28}},"83":{"start":{"line":440,"column":8},"end":{"line":440,"column":17}},"84":{"start":{"line":467,"column":0},"end":{"line":497,"column":2}},"85":{"start":{"line":469,"column":4},"end":{"line":469,"column":49}},"86":{"start":{"line":471,"column":4},"end":{"line":471,"column":23}},"87":{"start":{"line":473,"column":4},"end":{"line":473,"column":21}},"88":{"start":{"line":474,"column":4},"end":{"line":474,"column":54}},"89":{"start":{"line":476,"column":4},"end":{"line":492,"column":5}},"90":{"start":{"line":490,"column":8},"end":{"line":490,"column":30}},"91":{"start":{"line":491,"column":8},"end":{"line":491,"column":25}},"92":{"start":{"line":494,"column":4},"end":{"line":496,"column":5}},"93":{"start":{"line":495,"column":8},"end":{"line":495,"column":41}},"94":{"start":{"line":522,"column":0},"end":{"line":522,"column":41}},"95":{"start":{"line":524,"column":0},"end":{"line":524,"column":38}},"96":{"start":{"line":526,"column":0},"end":{"line":1223,"column":2}},"97":{"start":{"line":713,"column":8},"end":{"line":717,"column":31}},"98":{"start":{"line":719,"column":8},"end":{"line":721,"column":9}},"99":{"start":{"line":720,"column":12},"end":{"line":720,"column":28}},"100":{"start":{"line":723,"column":8},"end":{"line":725,"column":9}},"101":{"start":{"line":724,"column":12},"end":{"line":724,"column":30}},"102":{"start":{"line":727,"column":8},"end":{"line":738,"column":9}},"103":{"start":{"line":728,"column":12},"end":{"line":728,"column":36}},"104":{"start":{"line":729,"column":12},"end":{"line":729,"column":33}},"105":{"start":{"line":731,"column":12},"end":{"line":733,"column":13}},"106":{"start":{"line":732,"column":16},"end":{"line":732,"column":33}},"107":{"start":{"line":735,"column":12},"end":{"line":737,"column":13}},"108":{"start":{"line":736,"column":16},"end":{"line":736,"column":35}},"109":{"start":{"line":740,"column":8},"end":{"line":742,"column":9}},"110":{"start":{"line":741,"column":12},"end":{"line":741,"column":46}},"111":{"start":{"line":744,"column":8},"end":{"line":744,"column":23}},"112":{"start":{"line":756,"column":8},"end":{"line":756,"column":30}},"113":{"start":{"line":757,"column":8},"end":{"line":758,"column":50}},"114":{"start":{"line":759,"column":8},"end":{"line":759,"column":23}},"115":{"start":{"line":760,"column":8},"end":{"line":760,"column":51}},"116":{"start":{"line":770,"column":8},"end":{"line":774,"column":26}},"117":{"start":{"line":776,"column":8},"end":{"line":779,"column":9}},"118":{"start":{"line":777,"column":12},"end":{"line":777,"column":47}},"119":{"start":{"line":778,"column":12},"end":{"line":778,"column":44}},"120":{"start":{"line":781,"column":8},"end":{"line":793,"column":9}},"121":{"start":{"line":782,"column":12},"end":{"line":786,"column":13}},"122":{"start":{"line":783,"column":16},"end":{"line":783,"column":48}},"123":{"start":{"line":785,"column":16},"end":{"line":785,"column":44}},"124":{"start":{"line":788,"column":12},"end":{"line":792,"column":13}},"125":{"start":{"line":789,"column":16},"end":{"line":789,"column":37}},"126":{"start":{"line":791,"column":16},"end":{"line":791,"column":26}},"127":{"start":{"line":795,"column":8},"end":{"line":807,"column":9}},"128":{"start":{"line":796,"column":12},"end":{"line":800,"column":13}},"129":{"start":{"line":797,"column":16},"end":{"line":797,"column":54}},"130":{"start":{"line":799,"column":16},"end":{"line":799,"column":48}},"131":{"start":{"line":802,"column":12},"end":{"line":806,"column":13}},"132":{"start":{"line":803,"column":16},"end":{"line":803,"column":41}},"133":{"start":{"line":805,"column":16},"end":{"line":805,"column":28}},"134":{"start":{"line":809,"column":8},"end":{"line":809,"column":30}},"135":{"start":{"line":820,"column":8},"end":{"line":820,"column":35}},"136":{"start":{"line":839,"column":8},"end":{"line":840,"column":22}},"137":{"start":{"line":842,"column":8},"end":{"line":858,"column":9}},"138":{"start":{"line":844,"column":12},"end":{"line":844,"column":39}},"139":{"start":{"line":849,"column":12},"end":{"line":851,"column":13}},"140":{"start":{"line":850,"column":16},"end":{"line":850,"column":49}},"141":{"start":{"line":853,"column":12},"end":{"line":857,"column":13}},"142":{"start":{"line":854,"column":16},"end":{"line":854,"column":72}},"143":{"start":{"line":856,"column":16},"end":{"line":856,"column":43}},"144":{"start":{"line":860,"column":8},"end":{"line":870,"column":9}},"145":{"start":{"line":861,"column":12},"end":{"line":863,"column":13}},"146":{"start":{"line":862,"column":16},"end":{"line":862,"column":34}},"147":{"start":{"line":864,"column":12},"end":{"line":864,"column":33}},"148":{"start":{"line":866,"column":12},"end":{"line":868,"column":13}},"149":{"start":{"line":867,"column":16},"end":{"line":867,"column":39}},"150":{"start":{"line":869,"column":12},"end":{"line":869,"column":38}},"151":{"start":{"line":872,"column":8},"end":{"line":878,"column":9}},"152":{"start":{"line":873,"column":12},"end":{"line":877,"column":13}},"153":{"start":{"line":874,"column":16},"end":{"line":874,"column":38}},"154":{"start":{"line":876,"column":16},"end":{"line":876,"column":43}},"155":{"start":{"line":880,"column":8},"end":{"line":880,"column":42}},"156":{"start":{"line":891,"column":8},"end":{"line":891,"column":79}},"157":{"start":{"line":892,"column":8},"end":{"line":892,"column":46}},"158":{"start":{"line":905,"column":8},"end":{"line":905,"column":79}},"159":{"start":{"line":907,"column":8},"end":{"line":911,"column":9}},"160":{"start":{"line":908,"column":12},"end":{"line":910,"column":15}},"161":{"start":{"line":912,"column":8},"end":{"line":912,"column":46}},"162":{"start":{"line":927,"column":8},"end":{"line":927,"column":79}},"163":{"start":{"line":928,"column":8},"end":{"line":928,"column":47}},"164":{"start":{"line":941,"column":8},"end":{"line":943,"column":9}},"165":{"start":{"line":942,"column":12},"end":{"line":942,"column":31}},"166":{"start":{"line":945,"column":8},"end":{"line":948,"column":34}},"167":{"start":{"line":950,"column":8},"end":{"line":958,"column":9}},"168":{"start":{"line":951,"column":12},"end":{"line":957,"column":13}},"169":{"start":{"line":952,"column":16},"end":{"line":952,"column":28}},"170":{"start":{"line":953,"column":16},"end":{"line":956,"column":17}},"171":{"start":{"line":954,"column":20},"end":{"line":954,"column":45}},"172":{"start":{"line":955,"column":20},"end":{"line":955,"column":28}},"173":{"start":{"line":960,"column":8},"end":{"line":968,"column":9}},"174":{"start":{"line":961,"column":12},"end":{"line":967,"column":13}},"175":{"start":{"line":962,"column":16},"end":{"line":962,"column":30}},"176":{"start":{"line":963,"column":16},"end":{"line":966,"column":17}},"177":{"start":{"line":964,"column":20},"end":{"line":964,"column":47}},"178":{"start":{"line":965,"column":20},"end":{"line":965,"column":28}},"179":{"start":{"line":970,"column":8},"end":{"line":970,"column":21}},"180":{"start":{"line":983,"column":8},"end":{"line":983,"column":50}},"181":{"start":{"line":996,"column":8},"end":{"line":996,"column":16}},"182":{"start":{"line":998,"column":8},"end":{"line":998,"column":35}},"183":{"start":{"line":1000,"column":8},"end":{"line":1002,"column":9}},"184":{"start":{"line":1001,"column":12},"end":{"line":1001,"column":25}},"185":{"start":{"line":1004,"column":8},"end":{"line":1004,"column":20}},"186":{"start":{"line":1039,"column":8},"end":{"line":1039,"column":22}},"187":{"start":{"line":1040,"column":8},"end":{"line":1040,"column":41}},"188":{"start":{"line":1042,"column":8},"end":{"line":1042,"column":32}},"189":{"start":{"line":1057,"column":8},"end":{"line":1075,"column":9}},"190":{"start":{"line":1058,"column":12},"end":{"line":1058,"column":24}},"191":{"start":{"line":1064,"column":12},"end":{"line":1064,"column":30}},"192":{"start":{"line":1066,"column":12},"end":{"line":1068,"column":13}},"193":{"start":{"line":1067,"column":16},"end":{"line":1067,"column":38}},"194":{"start":{"line":1070,"column":12},"end":{"line":1074,"column":13}},"195":{"start":{"line":1071,"column":16},"end":{"line":1071,"column":46}},"196":{"start":{"line":1073,"column":16},"end":{"line":1073,"column":45}},"197":{"start":{"line":1087,"column":8},"end":{"line":1087,"column":25}},"198":{"start":{"line":1088,"column":8},"end":{"line":1088,"column":27}},"199":{"start":{"line":1089,"column":8},"end":{"line":1093,"column":9}},"200":{"start":{"line":1090,"column":12},"end":{"line":1090,"column":38}},"201":{"start":{"line":1091,"column":12},"end":{"line":1091,"column":42}},"202":{"start":{"line":1092,"column":12},"end":{"line":1092,"column":42}},"203":{"start":{"line":1094,"column":8},"end":{"line":1096,"column":9}},"204":{"start":{"line":1095,"column":12},"end":{"line":1095,"column":34}},"205":{"start":{"line":1097,"column":8},"end":{"line":1097,"column":43}},"206":{"start":{"line":1102,"column":8},"end":{"line":1102,"column":32}},"207":{"start":{"line":1103,"column":8},"end":{"line":1103,"column":37}},"208":{"start":{"line":1119,"column":8},"end":{"line":1119,"column":20}},"209":{"start":{"line":1121,"column":8},"end":{"line":1131,"column":9}},"210":{"start":{"line":1122,"column":12},"end":{"line":1122,"column":24}},"211":{"start":{"line":1123,"column":12},"end":{"line":1130,"column":13}},"212":{"start":{"line":1124,"column":16},"end":{"line":1126,"column":17}},"213":{"start":{"line":1125,"column":20},"end":{"line":1125,"column":37}},"214":{"start":{"line":1127,"column":16},"end":{"line":1129,"column":17}},"215":{"start":{"line":1128,"column":20},"end":{"line":1128,"column":33}},"216":{"start":{"line":1133,"column":8},"end":{"line":1133,"column":20}},"217":{"start":{"line":1145,"column":8},"end":{"line":1157,"column":9}},"218":{"start":{"line":1147,"column":12},"end":{"line":1147,"column":34}},"219":{"start":{"line":1148,"column":12},"end":{"line":1148,"column":33}},"220":{"start":{"line":1150,"column":12},"end":{"line":1152,"column":13}},"221":{"start":{"line":1151,"column":16},"end":{"line":1151,"column":35}},"222":{"start":{"line":1154,"column":12},"end":{"line":1156,"column":13}},"223":{"start":{"line":1155,"column":16},"end":{"line":1155,"column":49}},"224":{"start":{"line":1167,"column":8},"end":{"line":1167,"column":53}},"225":{"start":{"line":1176,"column":8},"end":{"line":1176,"column":29}},"226":{"start":{"line":1190,"column":8},"end":{"line":1190,"column":27}},"227":{"start":{"line":1192,"column":8},"end":{"line":1194,"column":9}},"228":{"start":{"line":1193,"column":12},"end":{"line":1193,"column":71}},"229":{"start":{"line":1196,"column":8},"end":{"line":1202,"column":9}},"230":{"start":{"line":1197,"column":12},"end":{"line":1197,"column":43}},"231":{"start":{"line":1199,"column":12},"end":{"line":1201,"column":13}},"232":{"start":{"line":1200,"column":16},"end":{"line":1200,"column":34}},"233":{"start":{"line":1204,"column":8},"end":{"line":1210,"column":9}},"234":{"start":{"line":1205,"column":12},"end":{"line":1209,"column":13}},"235":{"start":{"line":1206,"column":16},"end":{"line":1206,"column":41}},"236":{"start":{"line":1208,"column":16},"end":{"line":1208,"column":46}},"237":{"start":{"line":1212,"column":8},"end":{"line":1217,"column":9}},"238":{"start":{"line":1213,"column":12},"end":{"line":1216,"column":15}},"239":{"start":{"line":1219,"column":8},"end":{"line":1221,"column":9}},"240":{"start":{"line":1220,"column":12},"end":{"line":1220,"column":29}},"241":{"start":{"line":1233,"column":0},"end":{"line":1279,"column":2}},"242":{"start":{"line":1241,"column":4},"end":{"line":1241,"column":17}},"243":{"start":{"line":1248,"column":4},"end":{"line":1248,"column":27}},"244":{"start":{"line":1255,"column":4},"end":{"line":1255,"column":23}},"245":{"start":{"line":1262,"column":4},"end":{"line":1262,"column":21}},"246":{"start":{"line":1264,"column":4},"end":{"line":1264,"column":22}},"247":{"start":{"line":1281,"column":0},"end":{"line":1369,"column":2}},"248":{"start":{"line":1285,"column":8},"end":{"line":1293,"column":9}},"249":{"start":{"line":1286,"column":12},"end":{"line":1292,"column":13}},"250":{"start":{"line":1287,"column":16},"end":{"line":1287,"column":31}},"251":{"start":{"line":1288,"column":16},"end":{"line":1288,"column":36}},"252":{"start":{"line":1290,"column":16},"end":{"line":1290,"column":38}},"253":{"start":{"line":1291,"column":16},"end":{"line":1291,"column":28}},"254":{"start":{"line":1294,"column":8},"end":{"line":1294,"column":31}},"255":{"start":{"line":1295,"column":8},"end":{"line":1310,"column":9}},"256":{"start":{"line":1297,"column":16},"end":{"line":1297,"column":56}},"257":{"start":{"line":1298,"column":16},"end":{"line":1298,"column":22}},"258":{"start":{"line":1300,"column":16},"end":{"line":1300,"column":58}},"259":{"start":{"line":1301,"column":16},"end":{"line":1301,"column":22}},"260":{"start":{"line":1303,"column":16},"end":{"line":1309,"column":17}},"261":{"start":{"line":1304,"column":20},"end":{"line":1304,"column":38}},"262":{"start":{"line":1305,"column":20},"end":{"line":1305,"column":52}},"263":{"start":{"line":1306,"column":20},"end":{"line":1306,"column":46}},"264":{"start":{"line":1308,"column":20},"end":{"line":1308,"column":42}},"265":{"start":{"line":1312,"column":8},"end":{"line":1314,"column":9}},"266":{"start":{"line":1313,"column":12},"end":{"line":1313,"column":29}},"267":{"start":{"line":1316,"column":8},"end":{"line":1316,"column":19}},"268":{"start":{"line":1326,"column":8},"end":{"line":1327,"column":23}},"269":{"start":{"line":1329,"column":8},"end":{"line":1331,"column":9}},"270":{"start":{"line":1330,"column":12},"end":{"line":1330,"column":61}},"271":{"start":{"line":1334,"column":8},"end":{"line":1342,"column":9}},"272":{"start":{"line":1335,"column":12},"end":{"line":1335,"column":44}},"273":{"start":{"line":1337,"column":12},"end":{"line":1341,"column":13}},"274":{"start":{"line":1338,"column":16},"end":{"line":1338,"column":48}},"275":{"start":{"line":1340,"column":16},"end":{"line":1340,"column":59}},"276":{"start":{"line":1344,"column":8},"end":{"line":1344,"column":19}},"277":{"start":{"line":1358,"column":8},"end":{"line":1362,"column":9}},"278":{"start":{"line":1359,"column":12},"end":{"line":1359,"column":66}},"279":{"start":{"line":1361,"column":12},"end":{"line":1361,"column":36}},"280":{"start":{"line":1366,"column":8},"end":{"line":1366,"column":23}},"281":{"start":{"line":1377,"column":0},"end":{"line":1394,"column":2}},"282":{"start":{"line":1385,"column":4},"end":{"line":1385,"column":19}},"283":{"start":{"line":1393,"column":4},"end":{"line":1393,"column":19}},"284":{"start":{"line":1396,"column":0},"end":{"line":1439,"column":2}},"285":{"start":{"line":1398,"column":8},"end":{"line":1398,"column":32}},"286":{"start":{"line":1399,"column":8},"end":{"line":1403,"column":9}},"287":{"start":{"line":1400,"column":12},"end":{"line":1402,"column":15}},"288":{"start":{"line":1401,"column":16},"end":{"line":1401,"column":40}},"289":{"start":{"line":1412,"column":8},"end":{"line":1412,"column":44}},"290":{"start":{"line":1413,"column":8},"end":{"line":1423,"column":9}},"291":{"start":{"line":1414,"column":12},"end":{"line":1421,"column":13}},"292":{"start":{"line":1415,"column":16},"end":{"line":1417,"column":17}},"293":{"start":{"line":1416,"column":20},"end":{"line":1416,"column":48}},"294":{"start":{"line":1419,"column":16},"end":{"line":1419,"column":38}},"295":{"start":{"line":1420,"column":16},"end":{"line":1420,"column":29}},"296":{"start":{"line":1425,"column":8},"end":{"line":1425,"column":24}},"297":{"start":{"line":1437,"column":8},"end":{"line":1437,"column":59}},"298":{"start":{"line":1465,"column":0},"end":{"line":1557,"column":6}},"299":{"start":{"line":1472,"column":8},"end":{"line":1472,"column":51}},"300":{"start":{"line":1484,"column":8},"end":{"line":1486,"column":9}},"301":{"start":{"line":1485,"column":12},"end":{"line":1485,"column":24}},"302":{"start":{"line":1488,"column":8},"end":{"line":1488,"column":45}},"303":{"start":{"line":1500,"column":8},"end":{"line":1500,"column":47}},"304":{"start":{"line":1502,"column":8},"end":{"line":1504,"column":9}},"305":{"start":{"line":1503,"column":12},"end":{"line":1503,"column":21}},"306":{"start":{"line":1506,"column":8},"end":{"line":1506,"column":36}},"307":{"start":{"line":1508,"column":8},"end":{"line":1511,"column":9}},"308":{"start":{"line":1509,"column":12},"end":{"line":1509,"column":25}},"309":{"start":{"line":1510,"column":12},"end":{"line":1510,"column":46}},"310":{"start":{"line":1513,"column":8},"end":{"line":1513,"column":42}},"311":{"start":{"line":1515,"column":8},"end":{"line":1521,"column":9}},"312":{"start":{"line":1516,"column":12},"end":{"line":1516,"column":46}},"313":{"start":{"line":1517,"column":12},"end":{"line":1517,"column":30}},"314":{"start":{"line":1518,"column":12},"end":{"line":1520,"column":13}},"315":{"start":{"line":1519,"column":16},"end":{"line":1519,"column":25}},"316":{"start":{"line":1524,"column":8},"end":{"line":1524,"column":72}},"317":{"start":{"line":1529,"column":8},"end":{"line":1530,"column":21}},"318":{"start":{"line":1532,"column":8},"end":{"line":1542,"column":9}},"319":{"start":{"line":1533,"column":12},"end":{"line":1541,"column":14}},"320":{"start":{"line":1544,"column":8},"end":{"line":1544,"column":34}},"321":{"start":{"line":1546,"column":8},"end":{"line":1556,"column":9}},"322":{"start":{"line":1547,"column":12},"end":{"line":1547,"column":45}},"323":{"start":{"line":1549,"column":12},"end":{"line":1551,"column":13}},"324":{"start":{"line":1550,"column":16},"end":{"line":1550,"column":43}},"325":{"start":{"line":1553,"column":12},"end":{"line":1555,"column":13}},"326":{"start":{"line":1554,"column":16},"end":{"line":1554,"column":46}},"327":{"start":{"line":1559,"column":0},"end":{"line":2324,"column":2}},"328":{"start":{"line":1576,"column":8},"end":{"line":1576,"column":52}},"329":{"start":{"line":1577,"column":8},"end":{"line":1581,"column":11}},"330":{"start":{"line":1578,"column":12},"end":{"line":1580,"column":13}},"331":{"start":{"line":1579,"column":16},"end":{"line":1579,"column":37}},"332":{"start":{"line":1582,"column":8},"end":{"line":1582,"column":22}},"333":{"start":{"line":1598,"column":8},"end":{"line":1598,"column":55}},"334":{"start":{"line":1599,"column":8},"end":{"line":1603,"column":11}},"335":{"start":{"line":1600,"column":12},"end":{"line":1602,"column":13}},"336":{"start":{"line":1601,"column":16},"end":{"line":1601,"column":37}},"337":{"start":{"line":1604,"column":8},"end":{"line":1604,"column":22}},"338":{"start":{"line":1624,"column":8},"end":{"line":1624,"column":67}},"339":{"start":{"line":1658,"column":8},"end":{"line":1661,"column":46}},"340":{"start":{"line":1664,"column":8},"end":{"line":1668,"column":11}},"341":{"start":{"line":1670,"column":8},"end":{"line":1706,"column":9}},"342":{"start":{"line":1672,"column":12},"end":{"line":1674,"column":13}},"343":{"start":{"line":1673,"column":16},"end":{"line":1673,"column":58}},"344":{"start":{"line":1676,"column":12},"end":{"line":1676,"column":19}},"345":{"start":{"line":1677,"column":12},"end":{"line":1677,"column":24}},"346":{"start":{"line":1678,"column":12},"end":{"line":1678,"column":50}},"347":{"start":{"line":1679,"column":12},"end":{"line":1679,"column":21}},"348":{"start":{"line":1681,"column":12},"end":{"line":1683,"column":13}},"349":{"start":{"line":1682,"column":16},"end":{"line":1682,"column":29}},"350":{"start":{"line":1685,"column":12},"end":{"line":1685,"column":32}},"351":{"start":{"line":1686,"column":12},"end":{"line":1686,"column":31}},"352":{"start":{"line":1688,"column":12},"end":{"line":1703,"column":21}},"353":{"start":{"line":1690,"column":16},"end":{"line":1693,"column":17}},"354":{"start":{"line":1691,"column":20},"end":{"line":1691,"column":60}},"355":{"start":{"line":1692,"column":20},"end":{"line":1692,"column":39}},"356":{"start":{"line":1695,"column":16},"end":{"line":1695,"column":53}},"357":{"start":{"line":1697,"column":16},"end":{"line":1697,"column":49}},"358":{"start":{"line":1698,"column":16},"end":{"line":1698,"column":28}},"359":{"start":{"line":1699,"column":16},"end":{"line":1699,"column":28}},"360":{"start":{"line":1701,"column":16},"end":{"line":1701,"column":52}},"361":{"start":{"line":1705,"column":12},"end":{"line":1705,"column":66}},"362":{"start":{"line":1708,"column":8},"end":{"line":1708,"column":34}},"363":{"start":{"line":1709,"column":8},"end":{"line":1709,"column":25}},"364":{"start":{"line":1710,"column":8},"end":{"line":1710,"column":29}},"365":{"start":{"line":1713,"column":8},"end":{"line":1717,"column":9}},"366":{"start":{"line":1714,"column":12},"end":{"line":1714,"column":50}},"367":{"start":{"line":1715,"column":12},"end":{"line":1715,"column":53}},"368":{"start":{"line":1716,"column":12},"end":{"line":1716,"column":39}},"369":{"start":{"line":1719,"column":8},"end":{"line":1719,"column":24}},"370":{"start":{"line":1721,"column":8},"end":{"line":1751,"column":9}},"371":{"start":{"line":1723,"column":12},"end":{"line":1723,"column":44}},"372":{"start":{"line":1724,"column":12},"end":{"line":1724,"column":51}},"373":{"start":{"line":1725,"column":12},"end":{"line":1725,"column":32}},"374":{"start":{"line":1727,"column":12},"end":{"line":1742,"column":13}},"375":{"start":{"line":1728,"column":16},"end":{"line":1728,"column":28}},"376":{"start":{"line":1730,"column":16},"end":{"line":1734,"column":17}},"377":{"start":{"line":1731,"column":20},"end":{"line":1731,"column":50}},"378":{"start":{"line":1732,"column":23},"end":{"line":1734,"column":17}},"379":{"start":{"line":1733,"column":20},"end":{"line":1733,"column":43}},"380":{"start":{"line":1736,"column":16},"end":{"line":1736,"column":58}},"381":{"start":{"line":1739,"column":16},"end":{"line":1741,"column":17}},"382":{"start":{"line":1740,"column":20},"end":{"line":1740,"column":32}},"383":{"start":{"line":1745,"column":12},"end":{"line":1749,"column":13}},"384":{"start":{"line":1746,"column":16},"end":{"line":1746,"column":49}},"385":{"start":{"line":1747,"column":19},"end":{"line":1749,"column":13}},"386":{"start":{"line":1748,"column":16},"end":{"line":1748,"column":47}},"387":{"start":{"line":1753,"column":8},"end":{"line":1761,"column":9}},"388":{"start":{"line":1754,"column":12},"end":{"line":1754,"column":59}},"389":{"start":{"line":1755,"column":12},"end":{"line":1755,"column":131}},"390":{"start":{"line":1758,"column":12},"end":{"line":1760,"column":13}},"391":{"start":{"line":1759,"column":16},"end":{"line":1759,"column":41}},"392":{"start":{"line":1763,"column":8},"end":{"line":1767,"column":9}},"393":{"start":{"line":1764,"column":12},"end":{"line":1764,"column":64}},"394":{"start":{"line":1765,"column":12},"end":{"line":1765,"column":76}},"395":{"start":{"line":1766,"column":12},"end":{"line":1766,"column":53}},"396":{"start":{"line":1769,"column":8},"end":{"line":1769,"column":46}},"397":{"start":{"line":1779,"column":8},"end":{"line":1779,"column":46}},"398":{"start":{"line":1800,"column":8},"end":{"line":1803,"column":56}},"399":{"start":{"line":1806,"column":8},"end":{"line":1817,"column":9}},"400":{"start":{"line":1807,"column":12},"end":{"line":1811,"column":13}},"401":{"start":{"line":1808,"column":16},"end":{"line":1810,"column":17}},"402":{"start":{"line":1809,"column":20},"end":{"line":1809,"column":48}},"403":{"start":{"line":1812,"column":12},"end":{"line":1814,"column":13}},"404":{"start":{"line":1813,"column":16},"end":{"line":1813,"column":60}},"405":{"start":{"line":1816,"column":12},"end":{"line":1816,"column":24}},"406":{"start":{"line":1819,"column":8},"end":{"line":1835,"column":10}},"407":{"start":{"line":1826,"column":12},"end":{"line":1826,"column":45}},"408":{"start":{"line":1827,"column":12},"end":{"line":1834,"column":13}},"409":{"start":{"line":1828,"column":16},"end":{"line":1833,"column":17}},"410":{"start":{"line":1829,"column":20},"end":{"line":1829,"column":40}},"411":{"start":{"line":1830,"column":20},"end":{"line":1832,"column":21}},"412":{"start":{"line":1831,"column":24},"end":{"line":1831,"column":44}},"413":{"start":{"line":1837,"column":8},"end":{"line":1867,"column":9}},"414":{"start":{"line":1839,"column":12},"end":{"line":1839,"column":40}},"415":{"start":{"line":1840,"column":12},"end":{"line":1840,"column":28}},"416":{"start":{"line":1841,"column":12},"end":{"line":1841,"column":67}},"417":{"start":{"line":1843,"column":12},"end":{"line":1855,"column":13}},"418":{"start":{"line":1844,"column":16},"end":{"line":1852,"column":17}},"419":{"start":{"line":1845,"column":20},"end":{"line":1845,"column":55}},"420":{"start":{"line":1847,"column":20},"end":{"line":1851,"column":21}},"421":{"start":{"line":1848,"column":24},"end":{"line":1850,"column":25}},"422":{"start":{"line":1849,"column":28},"end":{"line":1849,"column":60}},"423":{"start":{"line":1854,"column":16},"end":{"line":1854,"column":28}},"424":{"start":{"line":1858,"column":15},"end":{"line":1867,"column":9}},"425":{"start":{"line":1859,"column":12},"end":{"line":1859,"column":26}},"426":{"start":{"line":1860,"column":12},"end":{"line":1860,"column":24}},"427":{"start":{"line":1862,"column":15},"end":{"line":1867,"column":9}},"428":{"start":{"line":1863,"column":12},"end":{"line":1863,"column":50}},"429":{"start":{"line":1864,"column":12},"end":{"line":1864,"column":44}},"430":{"start":{"line":1865,"column":12},"end":{"line":1865,"column":36}},"431":{"start":{"line":1866,"column":12},"end":{"line":1866,"column":24}},"432":{"start":{"line":1869,"column":8},"end":{"line":1869,"column":45}},"433":{"start":{"line":1872,"column":8},"end":{"line":1884,"column":9}},"434":{"start":{"line":1873,"column":12},"end":{"line":1873,"column":50}},"435":{"start":{"line":1875,"column":12},"end":{"line":1883,"column":13}},"436":{"start":{"line":1876,"column":16},"end":{"line":1876,"column":44}},"437":{"start":{"line":1877,"column":16},"end":{"line":1877,"column":28}},"438":{"start":{"line":1879,"column":19},"end":{"line":1883,"column":13}},"439":{"start":{"line":1880,"column":16},"end":{"line":1880,"column":31}},"440":{"start":{"line":1881,"column":16},"end":{"line":1881,"column":52}},"441":{"start":{"line":1882,"column":16},"end":{"line":1882,"column":28}},"442":{"start":{"line":1887,"column":8},"end":{"line":1887,"column":28}},"443":{"start":{"line":1888,"column":8},"end":{"line":1890,"column":9}},"444":{"start":{"line":1889,"column":12},"end":{"line":1889,"column":35}},"445":{"start":{"line":1892,"column":8},"end":{"line":1892,"column":20}},"446":{"start":{"line":1901,"column":8},"end":{"line":1901,"column":50}},"447":{"start":{"line":1912,"column":8},"end":{"line":1912,"column":33}},"448":{"start":{"line":1924,"column":8},"end":{"line":1924,"column":53}},"449":{"start":{"line":1995,"column":8},"end":{"line":1998,"column":34}},"450":{"start":{"line":2000,"column":8},"end":{"line":2015,"column":9}},"451":{"start":{"line":2001,"column":12},"end":{"line":2003,"column":13}},"452":{"start":{"line":2002,"column":16},"end":{"line":2002,"column":43}},"453":{"start":{"line":2004,"column":12},"end":{"line":2004,"column":54}},"454":{"start":{"line":2006,"column":12},"end":{"line":2006,"column":21}},"455":{"start":{"line":2008,"column":12},"end":{"line":2013,"column":21}},"456":{"start":{"line":2009,"column":16},"end":{"line":2011,"column":17}},"457":{"start":{"line":2010,"column":20},"end":{"line":2010,"column":41}},"458":{"start":{"line":2012,"column":16},"end":{"line":2012,"column":63}},"459":{"start":{"line":2017,"column":8},"end":{"line":2017,"column":19}},"460":{"start":{"line":2035,"column":8},"end":{"line":2035,"column":45}},"461":{"start":{"line":2037,"column":8},"end":{"line":2041,"column":9}},"462":{"start":{"line":2038,"column":12},"end":{"line":2038,"column":49}},"463":{"start":{"line":2040,"column":12},"end":{"line":2040,"column":24}},"464":{"start":{"line":2059,"column":8},"end":{"line":2064,"column":36}},"465":{"start":{"line":2066,"column":8},"end":{"line":2066,"column":30}},"466":{"start":{"line":2069,"column":8},"end":{"line":2073,"column":9}},"467":{"start":{"line":2070,"column":12},"end":{"line":2072,"column":15}},"468":{"start":{"line":2075,"column":8},"end":{"line":2083,"column":9}},"469":{"start":{"line":2077,"column":12},"end":{"line":2077,"column":72}},"470":{"start":{"line":2079,"column":12},"end":{"line":2082,"column":13}},"471":{"start":{"line":2080,"column":16},"end":{"line":2080,"column":31}},"472":{"start":{"line":2081,"column":16},"end":{"line":2081,"column":37}},"473":{"start":{"line":2085,"column":8},"end":{"line":2087,"column":9}},"474":{"start":{"line":2086,"column":12},"end":{"line":2086,"column":41}},"475":{"start":{"line":2089,"column":8},"end":{"line":2089,"column":18}},"476":{"start":{"line":2110,"column":8},"end":{"line":2110,"column":33}},"477":{"start":{"line":2112,"column":8},"end":{"line":2126,"column":9}},"478":{"start":{"line":2113,"column":12},"end":{"line":2119,"column":13}},"479":{"start":{"line":2114,"column":16},"end":{"line":2114,"column":33}},"480":{"start":{"line":2115,"column":16},"end":{"line":2115,"column":52}},"481":{"start":{"line":2117,"column":16},"end":{"line":2117,"column":31}},"482":{"start":{"line":2118,"column":16},"end":{"line":2118,"column":38}},"483":{"start":{"line":2121,"column":12},"end":{"line":2125,"column":13}},"484":{"start":{"line":2122,"column":16},"end":{"line":2122,"column":47}},"485":{"start":{"line":2123,"column":16},"end":{"line":2123,"column":35}},"486":{"start":{"line":2124,"column":16},"end":{"line":2124,"column":52}},"487":{"start":{"line":2159,"column":8},"end":{"line":2168,"column":17}},"488":{"start":{"line":2170,"column":8},"end":{"line":2185,"column":9}},"489":{"start":{"line":2175,"column":12},"end":{"line":2181,"column":13}},"490":{"start":{"line":2176,"column":16},"end":{"line":2176,"column":38}},"491":{"start":{"line":2177,"column":19},"end":{"line":2181,"column":13}},"492":{"start":{"line":2178,"column":16},"end":{"line":2178,"column":52}},"493":{"start":{"line":2180,"column":16},"end":{"line":2180,"column":26}},"494":{"start":{"line":2184,"column":12},"end":{"line":2184,"column":73}},"495":{"start":{"line":2187,"column":8},"end":{"line":2189,"column":9}},"496":{"start":{"line":2188,"column":12},"end":{"line":2188,"column":36}},"497":{"start":{"line":2191,"column":8},"end":{"line":2193,"column":9}},"498":{"start":{"line":2192,"column":12},"end":{"line":2192,"column":33}},"499":{"start":{"line":2195,"column":8},"end":{"line":2195,"column":30}},"500":{"start":{"line":2197,"column":8},"end":{"line":2203,"column":9}},"501":{"start":{"line":2198,"column":12},"end":{"line":2198,"column":41}},"502":{"start":{"line":2200,"column":12},"end":{"line":2202,"column":13}},"503":{"start":{"line":2201,"column":16},"end":{"line":2201,"column":37}},"504":{"start":{"line":2206,"column":8},"end":{"line":2210,"column":9}},"505":{"start":{"line":2207,"column":12},"end":{"line":2209,"column":15}},"506":{"start":{"line":2213,"column":8},"end":{"line":2227,"column":9}},"507":{"start":{"line":2214,"column":12},"end":{"line":2216,"column":13}},"508":{"start":{"line":2215,"column":16},"end":{"line":2215,"column":60}},"509":{"start":{"line":2219,"column":12},"end":{"line":2219,"column":23}},"510":{"start":{"line":2222,"column":12},"end":{"line":2224,"column":13}},"511":{"start":{"line":2223,"column":16},"end":{"line":2223,"column":33}},"512":{"start":{"line":2226,"column":12},"end":{"line":2226,"column":33}},"513":{"start":{"line":2229,"column":8},"end":{"line":2229,"column":43}},"514":{"start":{"line":2233,"column":8},"end":{"line":2233,"column":16}},"515":{"start":{"line":2236,"column":8},"end":{"line":2244,"column":9}},"516":{"start":{"line":2237,"column":12},"end":{"line":2237,"column":35}},"517":{"start":{"line":2238,"column":12},"end":{"line":2238,"column":44}},"518":{"start":{"line":2239,"column":12},"end":{"line":2243,"column":13}},"519":{"start":{"line":2240,"column":16},"end":{"line":2240,"column":36}},"520":{"start":{"line":2241,"column":16},"end":{"line":2241,"column":36}},"521":{"start":{"line":2242,"column":16},"end":{"line":2242,"column":34}},"522":{"start":{"line":2246,"column":8},"end":{"line":2246,"column":19}},"523":{"start":{"line":2258,"column":8},"end":{"line":2258,"column":19}},"524":{"start":{"line":2260,"column":8},"end":{"line":2263,"column":9}},"525":{"start":{"line":2261,"column":12},"end":{"line":2261,"column":45}},"526":{"start":{"line":2262,"column":12},"end":{"line":2262,"column":54}},"527":{"start":{"line":2264,"column":8},"end":{"line":2264,"column":32}},"528":{"start":{"line":2265,"column":8},"end":{"line":2265,"column":31}},"529":{"start":{"line":2284,"column":8},"end":{"line":2284,"column":47}},"530":{"start":{"line":2286,"column":8},"end":{"line":2299,"column":9}},"531":{"start":{"line":2288,"column":16},"end":{"line":2288,"column":57}},"532":{"start":{"line":2295,"column":16},"end":{"line":2295,"column":35}},"533":{"start":{"line":2296,"column":16},"end":{"line":2296,"column":22}},"534":{"start":{"line":2298,"column":16},"end":{"line":2298,"column":43}},"535":{"start":{"line":2301,"column":8},"end":{"line":2301,"column":38}},"536":{"start":{"line":2321,"column":8},"end":{"line":2321,"column":46}},"537":{"start":{"line":2326,"column":0},"end":{"line":2326,"column":19}},"538":{"start":{"line":2329,"column":0},"end":{"line":2329,"column":23}},"539":{"start":{"line":2330,"column":0},"end":{"line":2330,"column":31}},"540":{"start":{"line":2332,"column":0},"end":{"line":2332,"column":56}},"541":{"start":{"line":2342,"column":0},"end":{"line":2342,"column":32}}},"branchMap":{"1":{"line":76,"type":"if","locations":[{"start":{"line":76,"column":8},"end":{"line":76,"column":8}},{"start":{"line":76,"column":8},"end":{"line":76,"column":8}}]},"2":{"line":113,"type":"if","locations":[{"start":{"line":113,"column":8},"end":{"line":113,"column":8}},{"start":{"line":113,"column":8},"end":{"line":113,"column":8}}]},"3":{"line":139,"type":"if","locations":[{"start":{"line":139,"column":8},"end":{"line":139,"column":8}},{"start":{"line":139,"column":8},"end":{"line":139,"column":8}}]},"4":{"line":146,"type":"if","locations":[{"start":{"line":146,"column":8},"end":{"line":146,"column":8}},{"start":{"line":146,"column":8},"end":{"line":146,"column":8}}]},"5":{"line":173,"type":"if","locations":[{"start":{"line":173,"column":8},"end":{"line":173,"column":8}},{"start":{"line":173,"column":8},"end":{"line":173,"column":8}}]},"6":{"line":227,"type":"if","locations":[{"start":{"line":227,"column":4},"end":{"line":227,"column":4}},{"start":{"line":227,"column":4},"end":{"line":227,"column":4}}]},"7":{"line":270,"type":"if","locations":[{"start":{"line":270,"column":8},"end":{"line":270,"column":8}},{"start":{"line":270,"column":8},"end":{"line":270,"column":8}}]},"8":{"line":272,"type":"if","locations":[{"start":{"line":272,"column":12},"end":{"line":272,"column":12}},{"start":{"line":272,"column":12},"end":{"line":272,"column":12}}]},"9":{"line":273,"type":"switch","locations":[{"start":{"line":274,"column":20},"end":{"line":275,"column":42}},{"start":{"line":276,"column":20},"end":{"line":278,"column":30}},{"start":{"line":279,"column":20},"end":{"line":281,"column":30}},{"start":{"line":282,"column":20},"end":{"line":282,"column":28}}]},"10":{"line":289,"type":"if","locations":[{"start":{"line":289,"column":4},"end":{"line":289,"column":4}},{"start":{"line":289,"column":4},"end":{"line":289,"column":4}}]},"11":{"line":298,"type":"if","locations":[{"start":{"line":298,"column":8},"end":{"line":298,"column":8}},{"start":{"line":298,"column":8},"end":{"line":298,"column":8}}]},"12":{"line":301,"type":"if","locations":[{"start":{"line":301,"column":12},"end":{"line":301,"column":12}},{"start":{"line":301,"column":12},"end":{"line":301,"column":12}}]},"13":{"line":301,"type":"binary-expr","locations":[{"start":{"line":301,"column":16},"end":{"line":301,"column":22}},{"start":{"line":301,"column":26},"end":{"line":301,"column":56}}]},"14":{"line":304,"type":"if","locations":[{"start":{"line":304,"column":19},"end":{"line":304,"column":19}},{"start":{"line":304,"column":19},"end":{"line":304,"column":19}}]},"15":{"line":304,"type":"binary-expr","locations":[{"start":{"line":304,"column":23},"end":{"line":304,"column":29}},{"start":{"line":304,"column":33},"end":{"line":304,"column":70}}]},"16":{"line":435,"type":"if","locations":[{"start":{"line":435,"column":12},"end":{"line":435,"column":12}},{"start":{"line":435,"column":12},"end":{"line":435,"column":12}}]},"17":{"line":435,"type":"binary-expr","locations":[{"start":{"line":435,"column":16},"end":{"line":435,"column":31}},{"start":{"line":435,"column":36},"end":{"line":435,"column":38}},{"start":{"line":435,"column":42},"end":{"line":435,"column":51}}]},"18":{"line":476,"type":"if","locations":[{"start":{"line":476,"column":4},"end":{"line":476,"column":4}},{"start":{"line":476,"column":4},"end":{"line":476,"column":4}}]},"19":{"line":494,"type":"if","locations":[{"start":{"line":494,"column":4},"end":{"line":494,"column":4}},{"start":{"line":494,"column":4},"end":{"line":494,"column":4}}]},"20":{"line":719,"type":"if","locations":[{"start":{"line":719,"column":8},"end":{"line":719,"column":8}},{"start":{"line":719,"column":8},"end":{"line":719,"column":8}}]},"21":{"line":723,"type":"if","locations":[{"start":{"line":723,"column":8},"end":{"line":723,"column":8}},{"start":{"line":723,"column":8},"end":{"line":723,"column":8}}]},"22":{"line":727,"type":"if","locations":[{"start":{"line":727,"column":8},"end":{"line":727,"column":8}},{"start":{"line":727,"column":8},"end":{"line":727,"column":8}}]},"23":{"line":731,"type":"if","locations":[{"start":{"line":731,"column":12},"end":{"line":731,"column":12}},{"start":{"line":731,"column":12},"end":{"line":731,"column":12}}]},"24":{"line":735,"type":"if","locations":[{"start":{"line":735,"column":12},"end":{"line":735,"column":12}},{"start":{"line":735,"column":12},"end":{"line":735,"column":12}}]},"25":{"line":740,"type":"if","locations":[{"start":{"line":740,"column":8},"end":{"line":740,"column":8}},{"start":{"line":740,"column":8},"end":{"line":740,"column":8}}]},"26":{"line":741,"type":"cond-expr","locations":[{"start":{"line":741,"column":40},"end":{"line":741,"column":41}},{"start":{"line":741,"column":44},"end":{"line":741,"column":45}}]},"27":{"line":776,"type":"if","locations":[{"start":{"line":776,"column":8},"end":{"line":776,"column":8}},{"start":{"line":776,"column":8},"end":{"line":776,"column":8}}]},"28":{"line":781,"type":"if","locations":[{"start":{"line":781,"column":8},"end":{"line":781,"column":8}},{"start":{"line":781,"column":8},"end":{"line":781,"column":8}}]},"29":{"line":782,"type":"if","locations":[{"start":{"line":782,"column":12},"end":{"line":782,"column":12}},{"start":{"line":782,"column":12},"end":{"line":782,"column":12}}]},"30":{"line":788,"type":"if","locations":[{"start":{"line":788,"column":12},"end":{"line":788,"column":12}},{"start":{"line":788,"column":12},"end":{"line":788,"column":12}}]},"31":{"line":795,"type":"if","locations":[{"start":{"line":795,"column":8},"end":{"line":795,"column":8}},{"start":{"line":795,"column":8},"end":{"line":795,"column":8}}]},"32":{"line":796,"type":"if","locations":[{"start":{"line":796,"column":12},"end":{"line":796,"column":12}},{"start":{"line":796,"column":12},"end":{"line":796,"column":12}}]},"33":{"line":802,"type":"if","locations":[{"start":{"line":802,"column":12},"end":{"line":802,"column":12}},{"start":{"line":802,"column":12},"end":{"line":802,"column":12}}]},"34":{"line":842,"type":"if","locations":[{"start":{"line":842,"column":8},"end":{"line":842,"column":8}},{"start":{"line":842,"column":8},"end":{"line":842,"column":8}}]},"35":{"line":842,"type":"binary-expr","locations":[{"start":{"line":842,"column":12},"end":{"line":842,"column":25}},{"start":{"line":842,"column":29},"end":{"line":842,"column":39}}]},"36":{"line":849,"type":"if","locations":[{"start":{"line":849,"column":12},"end":{"line":849,"column":12}},{"start":{"line":849,"column":12},"end":{"line":849,"column":12}}]},"37":{"line":849,"type":"binary-expr","locations":[{"start":{"line":849,"column":16},"end":{"line":849,"column":31}},{"start":{"line":849,"column":35},"end":{"line":849,"column":56}}]},"38":{"line":853,"type":"if","locations":[{"start":{"line":853,"column":12},"end":{"line":853,"column":12}},{"start":{"line":853,"column":12},"end":{"line":853,"column":12}}]},"39":{"line":860,"type":"if","locations":[{"start":{"line":860,"column":8},"end":{"line":860,"column":8}},{"start":{"line":860,"column":8},"end":{"line":860,"column":8}}]},"40":{"line":861,"type":"if","locations":[{"start":{"line":861,"column":12},"end":{"line":861,"column":12}},{"start":{"line":861,"column":12},"end":{"line":861,"column":12}}]},"41":{"line":866,"type":"if","locations":[{"start":{"line":866,"column":12},"end":{"line":866,"column":12}},{"start":{"line":866,"column":12},"end":{"line":866,"column":12}}]},"42":{"line":872,"type":"if","locations":[{"start":{"line":872,"column":8},"end":{"line":872,"column":8}},{"start":{"line":872,"column":8},"end":{"line":872,"column":8}}]},"43":{"line":873,"type":"if","locations":[{"start":{"line":873,"column":12},"end":{"line":873,"column":12}},{"start":{"line":873,"column":12},"end":{"line":873,"column":12}}]},"44":{"line":891,"type":"cond-expr","locations":[{"start":{"line":891,"column":41},"end":{"line":891,"column":71}},{"start":{"line":891,"column":74},"end":{"line":891,"column":78}}]},"45":{"line":905,"type":"cond-expr","locations":[{"start":{"line":905,"column":41},"end":{"line":905,"column":71}},{"start":{"line":905,"column":74},"end":{"line":905,"column":78}}]},"46":{"line":907,"type":"if","locations":[{"start":{"line":907,"column":8},"end":{"line":907,"column":8}},{"start":{"line":907,"column":8},"end":{"line":907,"column":8}}]},"47":{"line":907,"type":"binary-expr","locations":[{"start":{"line":907,"column":12},"end":{"line":907,"column":26}},{"start":{"line":907,"column":30},"end":{"line":907,"column":39}}]},"48":{"line":927,"type":"cond-expr","locations":[{"start":{"line":927,"column":41},"end":{"line":927,"column":71}},{"start":{"line":927,"column":74},"end":{"line":927,"column":78}}]},"49":{"line":941,"type":"if","locations":[{"start":{"line":941,"column":8},"end":{"line":941,"column":8}},{"start":{"line":941,"column":8},"end":{"line":941,"column":8}}]},"50":{"line":941,"type":"binary-expr","locations":[{"start":{"line":941,"column":12},"end":{"line":941,"column":14}},{"start":{"line":941,"column":18},"end":{"line":941,"column":27}}]},"51":{"line":950,"type":"if","locations":[{"start":{"line":950,"column":8},"end":{"line":950,"column":8}},{"start":{"line":950,"column":8},"end":{"line":950,"column":8}}]},"52":{"line":953,"type":"if","locations":[{"start":{"line":953,"column":16},"end":{"line":953,"column":16}},{"start":{"line":953,"column":16},"end":{"line":953,"column":16}}]},"53":{"line":953,"type":"binary-expr","locations":[{"start":{"line":953,"column":20},"end":{"line":953,"column":21}},{"start":{"line":953,"column":26},"end":{"line":953,"column":29}},{"start":{"line":953,"column":33},"end":{"line":953,"column":44}}]},"54":{"line":960,"type":"if","locations":[{"start":{"line":960,"column":8},"end":{"line":960,"column":8}},{"start":{"line":960,"column":8},"end":{"line":960,"column":8}}]},"55":{"line":963,"type":"if","locations":[{"start":{"line":963,"column":16},"end":{"line":963,"column":16}},{"start":{"line":963,"column":16},"end":{"line":963,"column":16}}]},"56":{"line":963,"type":"binary-expr","locations":[{"start":{"line":963,"column":20},"end":{"line":963,"column":21}},{"start":{"line":963,"column":26},"end":{"line":963,"column":29}},{"start":{"line":963,"column":33},"end":{"line":963,"column":44}}]},"57":{"line":1000,"type":"if","locations":[{"start":{"line":1000,"column":8},"end":{"line":1000,"column":8}},{"start":{"line":1000,"column":8},"end":{"line":1000,"column":8}}]},"58":{"line":1000,"type":"binary-expr","locations":[{"start":{"line":1000,"column":12},"end":{"line":1000,"column":25}},{"start":{"line":1000,"column":29},"end":{"line":1000,"column":45}}]},"59":{"line":1057,"type":"if","locations":[{"start":{"line":1057,"column":8},"end":{"line":1057,"column":8}},{"start":{"line":1057,"column":8},"end":{"line":1057,"column":8}}]},"60":{"line":1057,"type":"binary-expr","locations":[{"start":{"line":1057,"column":12},"end":{"line":1057,"column":25}},{"start":{"line":1057,"column":29},"end":{"line":1057,"column":39}}]},"61":{"line":1066,"type":"if","locations":[{"start":{"line":1066,"column":12},"end":{"line":1066,"column":12}},{"start":{"line":1066,"column":12},"end":{"line":1066,"column":12}}]},"62":{"line":1070,"type":"if","locations":[{"start":{"line":1070,"column":12},"end":{"line":1070,"column":12}},{"start":{"line":1070,"column":12},"end":{"line":1070,"column":12}}]},"63":{"line":1089,"type":"if","locations":[{"start":{"line":1089,"column":8},"end":{"line":1089,"column":8}},{"start":{"line":1089,"column":8},"end":{"line":1089,"column":8}}]},"64":{"line":1094,"type":"if","locations":[{"start":{"line":1094,"column":8},"end":{"line":1094,"column":8}},{"start":{"line":1094,"column":8},"end":{"line":1094,"column":8}}]},"65":{"line":1097,"type":"cond-expr","locations":[{"start":{"line":1097,"column":30},"end":{"line":1097,"column":35}},{"start":{"line":1097,"column":38},"end":{"line":1097,"column":42}}]},"66":{"line":1102,"type":"binary-expr","locations":[{"start":{"line":1102,"column":18},"end":{"line":1102,"column":25}},{"start":{"line":1102,"column":29},"end":{"line":1102,"column":31}}]},"67":{"line":1123,"type":"if","locations":[{"start":{"line":1123,"column":12},"end":{"line":1123,"column":12}},{"start":{"line":1123,"column":12},"end":{"line":1123,"column":12}}]},"68":{"line":1123,"type":"binary-expr","locations":[{"start":{"line":1123,"column":16},"end":{"line":1123,"column":17}},{"start":{"line":1123,"column":21},"end":{"line":1123,"column":25}}]},"69":{"line":1124,"type":"if","locations":[{"start":{"line":1124,"column":16},"end":{"line":1124,"column":16}},{"start":{"line":1124,"column":16},"end":{"line":1124,"column":16}}]},"70":{"line":1127,"type":"if","locations":[{"start":{"line":1127,"column":16},"end":{"line":1127,"column":16}},{"start":{"line":1127,"column":16},"end":{"line":1127,"column":16}}]},"71":{"line":1145,"type":"if","locations":[{"start":{"line":1145,"column":8},"end":{"line":1145,"column":8}},{"start":{"line":1145,"column":8},"end":{"line":1145,"column":8}}]},"72":{"line":1145,"type":"binary-expr","locations":[{"start":{"line":1145,"column":12},"end":{"line":1145,"column":25}},{"start":{"line":1145,"column":29},"end":{"line":1145,"column":43}}]},"73":{"line":1150,"type":"if","locations":[{"start":{"line":1150,"column":12},"end":{"line":1150,"column":12}},{"start":{"line":1150,"column":12},"end":{"line":1150,"column":12}}]},"74":{"line":1154,"type":"if","locations":[{"start":{"line":1154,"column":12},"end":{"line":1154,"column":12}},{"start":{"line":1154,"column":12},"end":{"line":1154,"column":12}}]},"75":{"line":1192,"type":"if","locations":[{"start":{"line":1192,"column":8},"end":{"line":1192,"column":8}},{"start":{"line":1192,"column":8},"end":{"line":1192,"column":8}}]},"76":{"line":1193,"type":"cond-expr","locations":[{"start":{"line":1193,"column":38},"end":{"line":1193,"column":50}},{"start":{"line":1193,"column":53},"end":{"line":1193,"column":70}}]},"77":{"line":1196,"type":"if","locations":[{"start":{"line":1196,"column":8},"end":{"line":1196,"column":8}},{"start":{"line":1196,"column":8},"end":{"line":1196,"column":8}}]},"78":{"line":1199,"type":"if","locations":[{"start":{"line":1199,"column":12},"end":{"line":1199,"column":12}},{"start":{"line":1199,"column":12},"end":{"line":1199,"column":12}}]},"79":{"line":1199,"type":"binary-expr","locations":[{"start":{"line":1199,"column":16},"end":{"line":1199,"column":17}},{"start":{"line":1199,"column":21},"end":{"line":1199,"column":34}}]},"80":{"line":1204,"type":"if","locations":[{"start":{"line":1204,"column":8},"end":{"line":1204,"column":8}},{"start":{"line":1204,"column":8},"end":{"line":1204,"column":8}}]},"81":{"line":1205,"type":"if","locations":[{"start":{"line":1205,"column":12},"end":{"line":1205,"column":12}},{"start":{"line":1205,"column":12},"end":{"line":1205,"column":12}}]},"82":{"line":1212,"type":"if","locations":[{"start":{"line":1212,"column":8},"end":{"line":1212,"column":8}},{"start":{"line":1212,"column":8},"end":{"line":1212,"column":8}}]},"83":{"line":1212,"type":"binary-expr","locations":[{"start":{"line":1212,"column":12},"end":{"line":1212,"column":26}},{"start":{"line":1212,"column":30},"end":{"line":1212,"column":39}}]},"84":{"line":1219,"type":"if","locations":[{"start":{"line":1219,"column":8},"end":{"line":1219,"column":8}},{"start":{"line":1219,"column":8},"end":{"line":1219,"column":8}}]},"85":{"line":1285,"type":"if","locations":[{"start":{"line":1285,"column":8},"end":{"line":1285,"column":8}},{"start":{"line":1285,"column":8},"end":{"line":1285,"column":8}}]},"86":{"line":1285,"type":"binary-expr","locations":[{"start":{"line":1285,"column":12},"end":{"line":1285,"column":24}},{"start":{"line":1285,"column":28},"end":{"line":1285,"column":43}}]},"87":{"line":1286,"type":"if","locations":[{"start":{"line":1286,"column":12},"end":{"line":1286,"column":12}},{"start":{"line":1286,"column":12},"end":{"line":1286,"column":12}}]},"88":{"line":1295,"type":"switch","locations":[{"start":{"line":1296,"column":12},"end":{"line":1298,"column":22}},{"start":{"line":1299,"column":12},"end":{"line":1301,"column":22}},{"start":{"line":1302,"column":12},"end":{"line":1309,"column":17}}]},"89":{"line":1300,"type":"binary-expr","locations":[{"start":{"line":1300,"column":38},"end":{"line":1300,"column":45}},{"start":{"line":1300,"column":49},"end":{"line":1300,"column":53}}]},"90":{"line":1303,"type":"if","locations":[{"start":{"line":1303,"column":16},"end":{"line":1303,"column":16}},{"start":{"line":1303,"column":16},"end":{"line":1303,"column":16}}]},"91":{"line":1303,"type":"binary-expr","locations":[{"start":{"line":1303,"column":20},"end":{"line":1303,"column":21}},{"start":{"line":1303,"column":25},"end":{"line":1303,"column":29}}]},"92":{"line":1304,"type":"binary-expr","locations":[{"start":{"line":1304,"column":27},"end":{"line":1304,"column":31}},{"start":{"line":1304,"column":35},"end":{"line":1304,"column":37}}]},"93":{"line":1305,"type":"cond-expr","locations":[{"start":{"line":1305,"column":30},"end":{"line":1305,"column":44}},{"start":{"line":1305,"column":47},"end":{"line":1305,"column":51}}]},"94":{"line":1312,"type":"if","locations":[{"start":{"line":1312,"column":8},"end":{"line":1312,"column":8}},{"start":{"line":1312,"column":8},"end":{"line":1312,"column":8}}]},"95":{"line":1329,"type":"if","locations":[{"start":{"line":1329,"column":8},"end":{"line":1329,"column":8}},{"start":{"line":1329,"column":8},"end":{"line":1329,"column":8}}]},"96":{"line":1330,"type":"cond-expr","locations":[{"start":{"line":1330,"column":33},"end":{"line":1330,"column":47}},{"start":{"line":1330,"column":50},"end":{"line":1330,"column":60}}]},"97":{"line":1334,"type":"if","locations":[{"start":{"line":1334,"column":8},"end":{"line":1334,"column":8}},{"start":{"line":1334,"column":8},"end":{"line":1334,"column":8}}]},"98":{"line":1334,"type":"binary-expr","locations":[{"start":{"line":1334,"column":12},"end":{"line":1334,"column":20}},{"start":{"line":1334,"column":24},"end":{"line":1334,"column":42}}]},"99":{"line":1358,"type":"if","locations":[{"start":{"line":1358,"column":8},"end":{"line":1358,"column":8}},{"start":{"line":1358,"column":8},"end":{"line":1358,"column":8}}]},"100":{"line":1359,"type":"binary-expr","locations":[{"start":{"line":1359,"column":21},"end":{"line":1359,"column":35}},{"start":{"line":1359,"column":40},"end":{"line":1359,"column":64}}]},"101":{"line":1398,"type":"binary-expr","locations":[{"start":{"line":1398,"column":15},"end":{"line":1398,"column":16}},{"start":{"line":1398,"column":20},"end":{"line":1398,"column":24}}]},"102":{"line":1399,"type":"if","locations":[{"start":{"line":1399,"column":8},"end":{"line":1399,"column":8}},{"start":{"line":1399,"column":8},"end":{"line":1399,"column":8}}]},"103":{"line":1401,"type":"binary-expr","locations":[{"start":{"line":1401,"column":29},"end":{"line":1401,"column":30}},{"start":{"line":1401,"column":34},"end":{"line":1401,"column":35}}]},"104":{"line":1413,"type":"if","locations":[{"start":{"line":1413,"column":8},"end":{"line":1413,"column":8}},{"start":{"line":1413,"column":8},"end":{"line":1413,"column":8}}]},"105":{"line":1414,"type":"if","locations":[{"start":{"line":1414,"column":12},"end":{"line":1414,"column":12}},{"start":{"line":1414,"column":12},"end":{"line":1414,"column":12}}]},"106":{"line":1484,"type":"if","locations":[{"start":{"line":1484,"column":8},"end":{"line":1484,"column":8}},{"start":{"line":1484,"column":8},"end":{"line":1484,"column":8}}]},"107":{"line":1484,"type":"binary-expr","locations":[{"start":{"line":1484,"column":12},"end":{"line":1484,"column":16}},{"start":{"line":1484,"column":20},"end":{"line":1484,"column":25}},{"start":{"line":1484,"column":29},"end":{"line":1484,"column":64}}]},"108":{"line":1502,"type":"if","locations":[{"start":{"line":1502,"column":8},"end":{"line":1502,"column":8}},{"start":{"line":1502,"column":8},"end":{"line":1502,"column":8}}]},"109":{"line":1508,"type":"if","locations":[{"start":{"line":1508,"column":8},"end":{"line":1508,"column":8}},{"start":{"line":1508,"column":8},"end":{"line":1508,"column":8}}]},"110":{"line":1515,"type":"if","locations":[{"start":{"line":1515,"column":8},"end":{"line":1515,"column":8}},{"start":{"line":1515,"column":8},"end":{"line":1515,"column":8}}]},"111":{"line":1518,"type":"if","locations":[{"start":{"line":1518,"column":12},"end":{"line":1518,"column":12}},{"start":{"line":1518,"column":12},"end":{"line":1518,"column":12}}]},"112":{"line":1524,"type":"cond-expr","locations":[{"start":{"line":1524,"column":40},"end":{"line":1524,"column":56}},{"start":{"line":1524,"column":59},"end":{"line":1524,"column":60}}]},"113":{"line":1532,"type":"if","locations":[{"start":{"line":1532,"column":8},"end":{"line":1532,"column":8}},{"start":{"line":1532,"column":8},"end":{"line":1532,"column":8}}]},"114":{"line":1546,"type":"if","locations":[{"start":{"line":1546,"column":8},"end":{"line":1546,"column":8}},{"start":{"line":1546,"column":8},"end":{"line":1546,"column":8}}]},"115":{"line":1549,"type":"if","locations":[{"start":{"line":1549,"column":12},"end":{"line":1549,"column":12}},{"start":{"line":1549,"column":12},"end":{"line":1549,"column":12}}]},"116":{"line":1553,"type":"if","locations":[{"start":{"line":1553,"column":12},"end":{"line":1553,"column":12}},{"start":{"line":1553,"column":12},"end":{"line":1553,"column":12}}]},"117":{"line":1578,"type":"if","locations":[{"start":{"line":1578,"column":12},"end":{"line":1578,"column":12}},{"start":{"line":1578,"column":12},"end":{"line":1578,"column":12}}]},"118":{"line":1600,"type":"if","locations":[{"start":{"line":1600,"column":12},"end":{"line":1600,"column":12}},{"start":{"line":1600,"column":12},"end":{"line":1600,"column":12}}]},"119":{"line":1624,"type":"binary-expr","locations":[{"start":{"line":1624,"column":32},"end":{"line":1624,"column":35}},{"start":{"line":1624,"column":39},"end":{"line":1624,"column":65}}]},"120":{"line":1670,"type":"if","locations":[{"start":{"line":1670,"column":8},"end":{"line":1670,"column":8}},{"start":{"line":1670,"column":8},"end":{"line":1670,"column":8}}]},"121":{"line":1672,"type":"if","locations":[{"start":{"line":1672,"column":12},"end":{"line":1672,"column":12}},{"start":{"line":1672,"column":12},"end":{"line":1672,"column":12}}]},"122":{"line":1681,"type":"if","locations":[{"start":{"line":1681,"column":12},"end":{"line":1681,"column":12}},{"start":{"line":1681,"column":12},"end":{"line":1681,"column":12}}]},"123":{"line":1690,"type":"if","locations":[{"start":{"line":1690,"column":16},"end":{"line":1690,"column":16}},{"start":{"line":1690,"column":16},"end":{"line":1690,"column":16}}]},"124":{"line":1691,"type":"binary-expr","locations":[{"start":{"line":1691,"column":24},"end":{"line":1691,"column":28}},{"start":{"line":1691,"column":33},"end":{"line":1691,"column":58}}]},"125":{"line":1691,"type":"cond-expr","locations":[{"start":{"line":1691,"column":53},"end":{"line":1691,"column":54}},{"start":{"line":1691,"column":57},"end":{"line":1691,"column":58}}]},"126":{"line":1692,"type":"binary-expr","locations":[{"start":{"line":1692,"column":24},"end":{"line":1692,"column":33}},{"start":{"line":1692,"column":37},"end":{"line":1692,"column":38}}]},"127":{"line":1695,"type":"cond-expr","locations":[{"start":{"line":1695,"column":35},"end":{"line":1695,"column":47}},{"start":{"line":1695,"column":50},"end":{"line":1695,"column":52}}]},"128":{"line":1697,"type":"cond-expr","locations":[{"start":{"line":1697,"column":42},"end":{"line":1697,"column":43}},{"start":{"line":1697,"column":46},"end":{"line":1697,"column":47}}]},"129":{"line":1705,"type":"cond-expr","locations":[{"start":{"line":1705,"column":36},"end":{"line":1705,"column":40}},{"start":{"line":1705,"column":43},"end":{"line":1705,"column":65}}]},"130":{"line":1713,"type":"if","locations":[{"start":{"line":1713,"column":8},"end":{"line":1713,"column":8}},{"start":{"line":1713,"column":8},"end":{"line":1713,"column":8}}]},"131":{"line":1713,"type":"binary-expr","locations":[{"start":{"line":1713,"column":12},"end":{"line":1713,"column":16}},{"start":{"line":1713,"column":20},"end":{"line":1713,"column":44}},{"start":{"line":1713,"column":49},"end":{"line":1713,"column":77}}]},"132":{"line":1721,"type":"if","locations":[{"start":{"line":1721,"column":8},"end":{"line":1721,"column":8}},{"start":{"line":1721,"column":8},"end":{"line":1721,"column":8}}]},"133":{"line":1727,"type":"if","locations":[{"start":{"line":1727,"column":12},"end":{"line":1727,"column":12}},{"start":{"line":1727,"column":12},"end":{"line":1727,"column":12}}]},"134":{"line":1730,"type":"if","locations":[{"start":{"line":1730,"column":16},"end":{"line":1730,"column":16}},{"start":{"line":1730,"column":16},"end":{"line":1730,"column":16}}]},"135":{"line":1732,"type":"if","locations":[{"start":{"line":1732,"column":23},"end":{"line":1732,"column":23}},{"start":{"line":1732,"column":23},"end":{"line":1732,"column":23}}]},"136":{"line":1739,"type":"if","locations":[{"start":{"line":1739,"column":16},"end":{"line":1739,"column":16}},{"start":{"line":1739,"column":16},"end":{"line":1739,"column":16}}]},"137":{"line":1745,"type":"if","locations":[{"start":{"line":1745,"column":12},"end":{"line":1745,"column":12}},{"start":{"line":1745,"column":12},"end":{"line":1745,"column":12}}]},"138":{"line":1747,"type":"if","locations":[{"start":{"line":1747,"column":19},"end":{"line":1747,"column":19}},{"start":{"line":1747,"column":19},"end":{"line":1747,"column":19}}]},"139":{"line":1747,"type":"binary-expr","locations":[{"start":{"line":1747,"column":24},"end":{"line":1747,"column":29}},{"start":{"line":1747,"column":34},"end":{"line":1747,"column":42}}]},"140":{"line":1753,"type":"if","locations":[{"start":{"line":1753,"column":8},"end":{"line":1753,"column":8}},{"start":{"line":1753,"column":8},"end":{"line":1753,"column":8}}]},"141":{"line":1754,"type":"binary-expr","locations":[{"start":{"line":1754,"column":17},"end":{"line":1754,"column":36}},{"start":{"line":1754,"column":40},"end":{"line":1754,"column":58}}]},"142":{"line":1755,"type":"cond-expr","locations":[{"start":{"line":1755,"column":66},"end":{"line":1755,"column":96}},{"start":{"line":1755,"column":99},"end":{"line":1755,"column":103}}]},"143":{"line":1755,"type":"cond-expr","locations":[{"start":{"line":1755,"column":115},"end":{"line":1755,"column":122}},{"start":{"line":1755,"column":125},"end":{"line":1755,"column":129}}]},"144":{"line":1758,"type":"if","locations":[{"start":{"line":1758,"column":12},"end":{"line":1758,"column":12}},{"start":{"line":1758,"column":12},"end":{"line":1758,"column":12}}]},"145":{"line":1763,"type":"if","locations":[{"start":{"line":1763,"column":8},"end":{"line":1763,"column":8}},{"start":{"line":1763,"column":8},"end":{"line":1763,"column":8}}]},"146":{"line":1764,"type":"binary-expr","locations":[{"start":{"line":1764,"column":36},"end":{"line":1764,"column":57}},{"start":{"line":1764,"column":61},"end":{"line":1764,"column":63}}]},"147":{"line":1765,"type":"binary-expr","locations":[{"start":{"line":1765,"column":42},"end":{"line":1765,"column":69}},{"start":{"line":1765,"column":73},"end":{"line":1765,"column":75}}]},"148":{"line":1769,"type":"cond-expr","locations":[{"start":{"line":1769,"column":32},"end":{"line":1769,"column":36}},{"start":{"line":1769,"column":39},"end":{"line":1769,"column":45}}]},"149":{"line":1803,"type":"binary-expr","locations":[{"start":{"line":1803,"column":21},"end":{"line":1803,"column":25}},{"start":{"line":1803,"column":30},"end":{"line":1803,"column":54}}]},"150":{"line":1806,"type":"if","locations":[{"start":{"line":1806,"column":8},"end":{"line":1806,"column":8}},{"start":{"line":1806,"column":8},"end":{"line":1806,"column":8}}]},"151":{"line":1806,"type":"binary-expr","locations":[{"start":{"line":1806,"column":12},"end":{"line":1806,"column":17}},{"start":{"line":1806,"column":22},"end":{"line":1806,"column":32}}]},"152":{"line":1808,"type":"if","locations":[{"start":{"line":1808,"column":16},"end":{"line":1808,"column":16}},{"start":{"line":1808,"column":16},"end":{"line":1808,"column":16}}]},"153":{"line":1812,"type":"if","locations":[{"start":{"line":1812,"column":12},"end":{"line":1812,"column":12}},{"start":{"line":1812,"column":12},"end":{"line":1812,"column":12}}]},"154":{"line":1820,"type":"cond-expr","locations":[{"start":{"line":1820,"column":44},"end":{"line":1820,"column":52}},{"start":{"line":1820,"column":55},"end":{"line":1820,"column":59}}]},"155":{"line":1821,"type":"cond-expr","locations":[{"start":{"line":1821,"column":30},"end":{"line":1821,"column":38}},{"start":{"line":1821,"column":41},"end":{"line":1821,"column":45}}]},"156":{"line":1827,"type":"if","locations":[{"start":{"line":1827,"column":12},"end":{"line":1827,"column":12}},{"start":{"line":1827,"column":12},"end":{"line":1827,"column":12}}]},"157":{"line":1830,"type":"if","locations":[{"start":{"line":1830,"column":20},"end":{"line":1830,"column":20}},{"start":{"line":1830,"column":20},"end":{"line":1830,"column":20}}]},"158":{"line":1830,"type":"binary-expr","locations":[{"start":{"line":1830,"column":24},"end":{"line":1830,"column":40}},{"start":{"line":1830,"column":44},"end":{"line":1830,"column":58}}]},"159":{"line":1837,"type":"if","locations":[{"start":{"line":1837,"column":8},"end":{"line":1837,"column":8}},{"start":{"line":1837,"column":8},"end":{"line":1837,"column":8}}]},"160":{"line":1841,"type":"cond-expr","locations":[{"start":{"line":1841,"column":36},"end":{"line":1841,"column":59}},{"start":{"line":1841,"column":62},"end":{"line":1841,"column":66}}]},"161":{"line":1843,"type":"if","locations":[{"start":{"line":1843,"column":12},"end":{"line":1843,"column":12}},{"start":{"line":1843,"column":12},"end":{"line":1843,"column":12}}]},"162":{"line":1844,"type":"if","locations":[{"start":{"line":1844,"column":16},"end":{"line":1844,"column":16}},{"start":{"line":1844,"column":16},"end":{"line":1844,"column":16}}]},"163":{"line":1848,"type":"if","locations":[{"start":{"line":1848,"column":24},"end":{"line":1848,"column":24}},{"start":{"line":1848,"column":24},"end":{"line":1848,"column":24}}]},"164":{"line":1858,"type":"if","locations":[{"start":{"line":1858,"column":15},"end":{"line":1858,"column":15}},{"start":{"line":1858,"column":15},"end":{"line":1858,"column":15}}]},"165":{"line":1858,"type":"binary-expr","locations":[{"start":{"line":1858,"column":19},"end":{"line":1858,"column":35}},{"start":{"line":1858,"column":39},"end":{"line":1858,"column":50}}]},"166":{"line":1862,"type":"if","locations":[{"start":{"line":1862,"column":15},"end":{"line":1862,"column":15}},{"start":{"line":1862,"column":15},"end":{"line":1862,"column":15}}]},"167":{"line":1862,"type":"binary-expr","locations":[{"start":{"line":1862,"column":19},"end":{"line":1862,"column":25}},{"start":{"line":1862,"column":31},"end":{"line":1862,"column":41}},{"start":{"line":1862,"column":47},"end":{"line":1862,"column":75}}]},"168":{"line":1872,"type":"if","locations":[{"start":{"line":1872,"column":8},"end":{"line":1872,"column":8}},{"start":{"line":1872,"column":8},"end":{"line":1872,"column":8}}]},"169":{"line":1875,"type":"if","locations":[{"start":{"line":1875,"column":12},"end":{"line":1875,"column":12}},{"start":{"line":1875,"column":12},"end":{"line":1875,"column":12}}]},"170":{"line":1875,"type":"binary-expr","locations":[{"start":{"line":1875,"column":16},"end":{"line":1875,"column":21}},{"start":{"line":1875,"column":25},"end":{"line":1875,"column":37}}]},"171":{"line":1879,"type":"if","locations":[{"start":{"line":1879,"column":19},"end":{"line":1879,"column":19}},{"start":{"line":1879,"column":19},"end":{"line":1879,"column":19}}]},"172":{"line":1879,"type":"binary-expr","locations":[{"start":{"line":1879,"column":23},"end":{"line":1879,"column":28}},{"start":{"line":1879,"column":33},"end":{"line":1879,"column":39}},{"start":{"line":1879,"column":43},"end":{"line":1879,"column":47}},{"start":{"line":1879,"column":52},"end":{"line":1879,"column":75}}]},"173":{"line":1888,"type":"if","locations":[{"start":{"line":1888,"column":8},"end":{"line":1888,"column":8}},{"start":{"line":1888,"column":8},"end":{"line":1888,"column":8}}]},"174":{"line":2000,"type":"if","locations":[{"start":{"line":2000,"column":8},"end":{"line":2000,"column":8}},{"start":{"line":2000,"column":8},"end":{"line":2000,"column":8}}]},"175":{"line":2001,"type":"if","locations":[{"start":{"line":2001,"column":12},"end":{"line":2001,"column":12}},{"start":{"line":2001,"column":12},"end":{"line":2001,"column":12}}]},"176":{"line":2009,"type":"if","locations":[{"start":{"line":2009,"column":16},"end":{"line":2009,"column":16}},{"start":{"line":2009,"column":16},"end":{"line":2009,"column":16}}]},"177":{"line":2012,"type":"binary-expr","locations":[{"start":{"line":2012,"column":52},"end":{"line":2012,"column":53}},{"start":{"line":2012,"column":57},"end":{"line":2012,"column":61}}]},"178":{"line":2037,"type":"if","locations":[{"start":{"line":2037,"column":8},"end":{"line":2037,"column":8}},{"start":{"line":2037,"column":8},"end":{"line":2037,"column":8}}]},"179":{"line":2069,"type":"if","locations":[{"start":{"line":2069,"column":8},"end":{"line":2069,"column":8}},{"start":{"line":2069,"column":8},"end":{"line":2069,"column":8}}]},"180":{"line":2069,"type":"binary-expr","locations":[{"start":{"line":2069,"column":13},"end":{"line":2069,"column":31}},{"start":{"line":2069,"column":35},"end":{"line":2069,"column":38}},{"start":{"line":2069,"column":44},"end":{"line":2069,"column":46}},{"start":{"line":2069,"column":50},"end":{"line":2069,"column":62}}]},"181":{"line":2075,"type":"if","locations":[{"start":{"line":2075,"column":8},"end":{"line":2075,"column":8}},{"start":{"line":2075,"column":8},"end":{"line":2075,"column":8}}]},"182":{"line":2079,"type":"if","locations":[{"start":{"line":2079,"column":12},"end":{"line":2079,"column":12}},{"start":{"line":2079,"column":12},"end":{"line":2079,"column":12}}]},"183":{"line":2085,"type":"if","locations":[{"start":{"line":2085,"column":8},"end":{"line":2085,"column":8}},{"start":{"line":2085,"column":8},"end":{"line":2085,"column":8}}]},"184":{"line":2112,"type":"if","locations":[{"start":{"line":2112,"column":8},"end":{"line":2112,"column":8}},{"start":{"line":2112,"column":8},"end":{"line":2112,"column":8}}]},"185":{"line":2113,"type":"if","locations":[{"start":{"line":2113,"column":12},"end":{"line":2113,"column":12}},{"start":{"line":2113,"column":12},"end":{"line":2113,"column":12}}]},"186":{"line":2121,"type":"if","locations":[{"start":{"line":2121,"column":12},"end":{"line":2121,"column":12}},{"start":{"line":2121,"column":12},"end":{"line":2121,"column":12}}]},"187":{"line":2121,"type":"binary-expr","locations":[{"start":{"line":2121,"column":17},"end":{"line":2121,"column":46}},{"start":{"line":2121,"column":51},"end":{"line":2121,"column":54}},{"start":{"line":2121,"column":58},"end":{"line":2121,"column":70}},{"start":{"line":2121,"column":77},"end":{"line":2121,"column":79}},{"start":{"line":2121,"column":83},"end":{"line":2121,"column":95}}]},"188":{"line":2170,"type":"if","locations":[{"start":{"line":2170,"column":8},"end":{"line":2170,"column":8}},{"start":{"line":2170,"column":8},"end":{"line":2170,"column":8}}]},"189":{"line":2170,"type":"binary-expr","locations":[{"start":{"line":2170,"column":12},"end":{"line":2170,"column":24}},{"start":{"line":2170,"column":28},"end":{"line":2170,"column":41}}]},"190":{"line":2175,"type":"if","locations":[{"start":{"line":2175,"column":12},"end":{"line":2175,"column":12}},{"start":{"line":2175,"column":12},"end":{"line":2175,"column":12}}]},"191":{"line":2177,"type":"if","locations":[{"start":{"line":2177,"column":19},"end":{"line":2177,"column":19}},{"start":{"line":2177,"column":19},"end":{"line":2177,"column":19}}]},"192":{"line":2184,"type":"cond-expr","locations":[{"start":{"line":2184,"column":65},"end":{"line":2184,"column":66}},{"start":{"line":2184,"column":69},"end":{"line":2184,"column":70}}]},"193":{"line":2187,"type":"if","locations":[{"start":{"line":2187,"column":8},"end":{"line":2187,"column":8}},{"start":{"line":2187,"column":8},"end":{"line":2187,"column":8}}]},"194":{"line":2188,"type":"binary-expr","locations":[{"start":{"line":2188,"column":17},"end":{"line":2188,"column":21}},{"start":{"line":2188,"column":25},"end":{"line":2188,"column":34}}]},"195":{"line":2191,"type":"if","locations":[{"start":{"line":2191,"column":8},"end":{"line":2191,"column":8}},{"start":{"line":2191,"column":8},"end":{"line":2191,"column":8}}]},"196":{"line":2197,"type":"if","locations":[{"start":{"line":2197,"column":8},"end":{"line":2197,"column":8}},{"start":{"line":2197,"column":8},"end":{"line":2197,"column":8}}]},"197":{"line":2200,"type":"if","locations":[{"start":{"line":2200,"column":12},"end":{"line":2200,"column":12}},{"start":{"line":2200,"column":12},"end":{"line":2200,"column":12}}]},"198":{"line":2200,"type":"binary-expr","locations":[{"start":{"line":2200,"column":16},"end":{"line":2200,"column":19}},{"start":{"line":2200,"column":23},"end":{"line":2200,"column":26}}]},"199":{"line":2206,"type":"if","locations":[{"start":{"line":2206,"column":8},"end":{"line":2206,"column":8}},{"start":{"line":2206,"column":8},"end":{"line":2206,"column":8}}]},"200":{"line":2206,"type":"binary-expr","locations":[{"start":{"line":2206,"column":13},"end":{"line":2206,"column":31}},{"start":{"line":2206,"column":36},"end":{"line":2206,"column":39}},{"start":{"line":2206,"column":43},"end":{"line":2206,"column":55}},{"start":{"line":2206,"column":62},"end":{"line":2206,"column":64}},{"start":{"line":2206,"column":68},"end":{"line":2206,"column":80}}]},"201":{"line":2207,"type":"binary-expr","locations":[{"start":{"line":2207,"column":35},"end":{"line":2207,"column":37}},{"start":{"line":2207,"column":41},"end":{"line":2207,"column":42}}]},"202":{"line":2213,"type":"if","locations":[{"start":{"line":2213,"column":8},"end":{"line":2213,"column":8}},{"start":{"line":2213,"column":8},"end":{"line":2213,"column":8}}]},"203":{"line":2214,"type":"if","locations":[{"start":{"line":2214,"column":12},"end":{"line":2214,"column":12}},{"start":{"line":2214,"column":12},"end":{"line":2214,"column":12}}]},"204":{"line":2222,"type":"if","locations":[{"start":{"line":2222,"column":12},"end":{"line":2222,"column":12}},{"start":{"line":2222,"column":12},"end":{"line":2222,"column":12}}]},"205":{"line":2229,"type":"cond-expr","locations":[{"start":{"line":2229,"column":32},"end":{"line":2229,"column":36}},{"start":{"line":2229,"column":39},"end":{"line":2229,"column":42}}]},"206":{"line":2236,"type":"if","locations":[{"start":{"line":2236,"column":8},"end":{"line":2236,"column":8}},{"start":{"line":2236,"column":8},"end":{"line":2236,"column":8}}]},"207":{"line":2239,"type":"if","locations":[{"start":{"line":2239,"column":12},"end":{"line":2239,"column":12}},{"start":{"line":2239,"column":12},"end":{"line":2239,"column":12}}]},"208":{"line":2260,"type":"if","locations":[{"start":{"line":2260,"column":8},"end":{"line":2260,"column":8}},{"start":{"line":2260,"column":8},"end":{"line":2260,"column":8}}]},"209":{"line":2262,"type":"cond-expr","locations":[{"start":{"line":2262,"column":27},"end":{"line":2262,"column":46}},{"start":{"line":2262,"column":49},"end":{"line":2262,"column":53}}]},"210":{"line":2265,"type":"binary-expr","locations":[{"start":{"line":2265,"column":15},"end":{"line":2265,"column":22}},{"start":{"line":2265,"column":26},"end":{"line":2265,"column":30}}]},"211":{"line":2286,"type":"switch","locations":[{"start":{"line":2287,"column":12},"end":{"line":2288,"column":57}},{"start":{"line":2289,"column":12},"end":{"line":2289,"column":25}},{"start":{"line":2294,"column":12},"end":{"line":2296,"column":22}},{"start":{"line":2297,"column":12},"end":{"line":2298,"column":43}}]},"212":{"line":2332,"type":"binary-expr","locations":[{"start":{"line":2332,"column":23},"end":{"line":2332,"column":43}},{"start":{"line":2332,"column":47},"end":{"line":2332,"column":55}}]}},"code":["(function () { 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 {EventHandle} 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 {EventHandle} 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 {EventHandle} 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 {EventHandle} the subscription handle"," * @static"," */"," detach: function(handle) {"," if (handle.detach) {"," handle.detach();"," }"," }","};","","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;","","","//////////////////////////////////////////////////////////////////////////","","/**"," * 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} defaults configuration object."," * @class CustomEvent"," * @constructor"," */",""," /**"," * The type of event, returned to subscribers when the event fires"," * @property type"," * @type string"," */","","/**"," * 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"," */","","Y.CustomEvent = function(type, defaults) {",""," this._kds = Y.CustomEvent.keepDeprecatedSubs;",""," this.id = Y.guid();",""," this.type = type;"," this.silent = this.logSystem = (type === YUI_LOG);",""," if (this._kds) {"," /**"," * The subscribers to this event"," * @property subscribers"," * @type Subscriber {}"," * @deprecated"," */",""," /**"," * 'After' subscribers"," * @property afters"," * @type Subscriber {}"," * @deprecated"," */"," this.subscribers = {};"," this.afters = {};"," }",""," if (defaults) {"," mixConfigs(this, defaults, true);"," }","};","","/**"," * 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,",""," /**"," * Monitor when an event is attached or detached."," *"," * @property monitored"," * @type boolean"," */",""," /**"," * 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"," */",""," /**"," * 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 event has fired if true"," *"," * @property fired"," * @type boolean"," * @default false;"," */",""," /**"," * An array containing the arguments the custom event"," * was last fired with."," * @property firedWith"," * @type Array"," */",""," /**"," * 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;"," */",""," /**"," * fireOnce listeners will fire syncronously unless async"," * is set to true"," * @property async"," * @type boolean"," * @default 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"," */",""," /**"," * Flag for preventDefault that is modified during fire()."," * if it is not 0, the default behavior for this event"," * @property prevented"," * @type int"," */",""," /**"," * Specifies the host for this custom event. This is used"," * to enable event bubbling"," * @property host"," * @type EventTarget"," */",""," /**"," * The default function to execute after event listeners"," * have fire, but only if the default action was not"," * prevented."," * @property defaultFn"," * @type Function"," */",""," /**"," * Flag for the default function to execute only if the"," * firing event is the current target. This happens only"," * when using custom event delegation and setting the"," * flag to `true` mimics the behavior of event delegation"," * in the DOM."," *"," * @property defaultTargetOnly"," * @type Boolean"," * @default false"," */",""," /**"," * The function to execute if a subscriber calls"," * stopPropagation or stopImmediatePropagation"," * @property stoppedFn"," * @type Function"," */",""," /**"," * The function to execute if a subscriber calls"," * preventDefault"," * @property preventedFn"," * @type Function"," */",""," /**"," * The subscribers to this event"," * @property _subscribers"," * @type Subscriber []"," * @private"," */",""," /**"," * 'After' subscribers"," * @property _afters"," * @type Subscriber []"," * @private"," */",""," /**"," * 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"," */",""," /**"," * Supports multiple options for listener signatures in order to"," * port YUI 2 apps."," * @property signature"," * @type int"," * @default 9"," */"," signature : YUI3_SIGNATURE,",""," /**"," * The context the the event will fire from by default. Defaults to the YUI"," * instance."," * @property context"," * @type object"," */"," context : Y,",""," /**"," * 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"," */"," 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"," */"," bubbles : true,",""," /**"," * 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 = 0,"," a = 0,"," subs = this._subscribers,"," afters = this._afters,"," sib = this.sibling;",""," if (subs) {"," s = subs.length;"," }",""," if (afters) {"," a = afters.length;"," }",""," if (sib) {"," subs = sib._subscribers;"," afters = sib._afters;",""," if (subs) {"," s += subs.length;"," }",""," if (afters) {"," a += 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 sibling = this.sibling,"," subs = this._subscribers,"," afters = this._afters,"," siblingSubs,"," siblingAfters;",""," if (sibling) {"," siblingSubs = sibling._subscribers;"," siblingAfters = sibling._afters;"," }",""," if (siblingSubs) {"," if (subs) {"," subs = subs.concat(siblingSubs);"," } else {"," subs = siblingSubs.concat();"," }"," } else {"," if (subs) {"," subs = subs.concat();"," } else {"," subs = [];"," }"," }",""," if (siblingAfters) {"," if (afters) {"," afters = afters.concat(siblingAfters);"," } else {"," afters = siblingAfters.concat();"," }"," } else {"," if (afters) {"," afters = afters.concat();"," } else {"," afters = [];"," }"," }",""," return [subs, afters];"," },",""," /**"," * 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) {","",""," var s = new Y.Subscriber(fn, context, args, when),"," firedWith;",""," if (this.fireOnce && this.fired) {",""," firedWith = this.firedWith;",""," // It's a little ugly for this to know about facades,"," // but given the current breakup, not much choice without"," // moving a whole lot of stuff around."," if (this.emitFacade && this._addFacadeToArgs) {"," this._addFacadeToArgs(firedWith);"," }",""," if (this.async) {"," setTimeout(Y.bind(this._notify, this, s, firedWith), 0);"," } else {"," this._notify(s, firedWith);"," }"," }",""," if (when === AFTER) {"," if (!this._afters) {"," this._afters = [];"," }"," this._afters.push(s);"," } else {"," if (!this._subscribers) {"," this._subscribers = [];"," }"," 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 {Number} 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;",""," if (subs) {"," for (i = subs.length; i >= 0; i--) {"," s = subs[i];"," if (s && (!fn || fn === s.fn)) {"," this._delete(s, subs, i);"," found++;"," }"," }"," }",""," if (afters) {"," 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) {","",""," var ret;",""," ret = s.notify(args, this);",""," if (false === ret || this.stopped > 1) {"," 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() {",""," // push is the fastest way to go from arguments to arrays"," // for most browsers currently"," // http://jsperf.com/push-vs-concat-vs-slice/2",""," var args = [];"," args.push.apply(args, arguments);",""," return this._fire(args);"," },",""," /**"," * Private internal implementation for `fire`, which is can be used directly by"," * `EventTarget` and other event module classes which have already converted from"," * an `arguments` list to an array, to avoid the repeated overhead."," *"," * @method _fire"," * @private"," * @param {Array} args The array of arguments passed to be passed to handlers."," * @return {boolean} false if one of the subscribers returned false, true otherwise."," */"," _fire: function(args) {",""," if (this.fireOnce && this.fired) {"," return true;"," } else {",""," // 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);"," }"," if (this.broadcast) {"," this._broadcast(args);"," }"," return this.stopped ? false : true;"," },",""," // Requires the event-custom-complex module for full funcitonality."," fireComplex: function(args) {"," 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 {Number} The number of listeners unsubscribed."," * @deprecated use detachAll."," */"," unsubscribeAll: function() {"," return this.detachAll.apply(this, arguments);"," },",""," /**"," * Removes all listeners"," * @method detachAll"," * @return {Number} 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;"," }",""," if (subs) {"," 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.guid();",""," /**"," * 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 {Number} 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 = function(type, pre) {",""," if (!pre || !type || 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 etState = this._yuievt,"," etConfig;",""," if (!etState) {"," etState = this._yuievt = {"," events: {}, // PERF: Not much point instantiating lazily. We're bound to have events"," targets: null, // PERF: Instantiate lazily, if user actually adds target,"," config: {"," host: this,"," context: this"," },"," chain: Y.config.chain"," };"," }",""," etConfig = etState.config;",""," if (opts) {"," mixConfigs(etConfig, opts, true);",""," if (opts.chain !== undefined) {"," etState.chain = opts.chain;"," }",""," if (opts.prefix) {"," etConfig.prefix = opts.prefix;"," }"," }"," };","","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] The prefix. Defaults to this._yuievt.config.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);",""," // TODO: More robust regex, accounting for category"," if (type.indexOf(\"*:\") !== -1) {"," this._hasSiblings = 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 ret,"," etState = this._yuievt,"," etConfig = etState.config,"," pre = etConfig.prefix;",""," if (typeof type === \"string\") {"," if (pre) {"," type = _getType(type, pre);"," }"," ret = this._publish(type, etConfig, opts);"," } else {"," ret = {};",""," Y.each(type, function(v, k) {"," if (pre) {"," k = _getType(k, pre);"," }"," ret[k] = this._publish(k, etConfig, v || opts);"," }, this);",""," }",""," return ret;"," },",""," /**"," * Returns the fully qualified type, given a short type string."," * That is, returns \"foo:bar\" when given \"bar\" if \"foo\" is the configured prefix."," *"," * NOTE: This method, unlike _getType, does no checking of the value passed in, and"," * is designed to be used with the low level _publish() method, for critical path"," * implementations which need to fast-track publish for performance reasons."," *"," * @method _getFullType"," * @private"," * @param {String} type The short type to prefix"," * @return {String} The prefixed type, if a prefix is set, otherwise the type passed in"," */"," _getFullType : function(type) {",""," var pre = this._yuievt.config.prefix;",""," if (pre) {"," return pre + PREFIX_DELIMITER + type;"," } else {"," return type;"," }"," },",""," /**"," * The low level event publish implementation. It expects all the massaging to have been done"," * outside of this method. e.g. the `type` to `fullType` conversion. It's designed to be a fast"," * path publish, which can be used by critical code paths to improve performance."," *"," * @method _publish"," * @private"," * @param {String} fullType The prefixed type of the event to publish."," * @param {Object} etOpts The EventTarget specific configuration to mix into the published event."," * @param {Object} ceOpts The publish specific configuration to mix into the published event."," * @return {CustomEvent} The published event. If called without `etOpts` or `ceOpts`, this will"," * be the default `CustomEvent` instance, and can be configured independently."," */"," _publish : function(fullType, etOpts, ceOpts) {",""," var ce,"," etState = this._yuievt,"," etConfig = etState.config,"," host = etConfig.host,"," context = etConfig.context,"," events = etState.events;",""," ce = events[fullType];",""," // PERF: Hate to pull the check out of monitor, but trying to keep critical path tight."," if ((etConfig.monitored && !ce) || (ce && ce.monitored)) {"," this._monitor('publish', fullType, {"," args: arguments"," });"," }",""," if (!ce) {"," // Publish event"," ce = events[fullType] = new Y.CustomEvent(fullType, etOpts);",""," if (!etOpts) {"," ce.host = host;"," ce.context = context;"," }"," }",""," if (ceOpts) {"," mixConfigs(ce, ceOpts, true);"," }",""," return ce;"," },",""," /**"," * 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."," *"," * 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."," *"," * 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."," *"," * @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 {Boolean} True if the whole lifecycle of the event went through,"," * false if at any point the event propagation was halted."," */"," fire: function(type) {",""," var typeIncluded = (typeof type === \"string\"),"," argCount = arguments.length,"," t = type,"," yuievt = this._yuievt,"," etConfig = yuievt.config,"," pre = etConfig.prefix,"," ret,"," ce,"," ce2,"," args;",""," if (typeIncluded && argCount <= 3) {",""," // PERF: Try to avoid slice/iteration for the common signatures",""," // Most common"," if (argCount === 2) {"," args = [arguments[1]]; // fire(\"foo\", {})"," } else if (argCount === 3) {"," args = [arguments[1], arguments[2]]; // fire(\"foo\", {}, opts)"," } else {"," args = []; // fire(\"foo\")"," }",""," } else {"," args = nativeSlice.call(arguments, ((typeIncluded) ? 1 : 0));"," }",""," if (!typeIncluded) {"," t = (type && type.type);"," }",""," if (pre) {"," t = _getType(t, pre);"," }",""," ce = yuievt.events[t];",""," if (this._hasSiblings) {"," ce2 = this.getSibling(t, ce);",""," if (ce2 && !ce) {"," ce = this.publish(t);"," }"," }",""," // PERF: trying to avoid function call, since this is a critical path"," if ((etConfig.monitored && (!ce || ce.monitored)) || (ce && ce.monitored)) {"," 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 {",""," if (ce2) {"," ce.sibling = ce2;"," }",""," ret = ce._fire(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);"," ce2 = this.getEvent(type, true);"," if (ce2) {"," ce2.applyConfig(ce);"," ce2.bubbles = false;"," ce2.broadcast = 0;"," }"," }",""," 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","**/","","","}, '3.16.0', {\"requires\": [\"oop\"]});","","}());"]}; } var __cov_0ShtDtxkEapLmfzOgrY8Kw = __coverage__['build/event-custom-base/event-custom-base.js']; __cov_0ShtDtxkEapLmfzOgrY8Kw.s['1']++;YUI.add('event-custom-base',function(Y,NAME){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['1']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['2']++;Y.Env.evt={handles:{},plugins:{}};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['3']++;var DO_BEFORE=0,DO_AFTER=1,DO={objs:null,before:function(fn,obj,sFn,c){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['2']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['4']++;var f=fn,a;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['5']++;if(c){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['1'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['6']++;a=[fn,c].concat(Y.Array(arguments,4,true));__cov_0ShtDtxkEapLmfzOgrY8Kw.s['7']++;f=Y.rbind.apply(Y,a);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['1'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['8']++;return this._inject(DO_BEFORE,f,obj,sFn);},after:function(fn,obj,sFn,c){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['3']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['9']++;var f=fn,a;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['10']++;if(c){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['2'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['11']++;a=[fn,c].concat(Y.Array(arguments,4,true));__cov_0ShtDtxkEapLmfzOgrY8Kw.s['12']++;f=Y.rbind.apply(Y,a);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['2'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['13']++;return this._inject(DO_AFTER,f,obj,sFn);},_inject:function(when,fn,obj,sFn){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['4']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['14']++;var id=Y.stamp(obj),o,sid;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['15']++;if(!obj._yuiaop){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['3'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['16']++;obj._yuiaop={};}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['3'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['17']++;o=obj._yuiaop;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['18']++;if(!o[sFn]){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['4'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['19']++;o[sFn]=new Y.Do.Method(obj,sFn);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['20']++;obj[sFn]=function(){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['5']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['21']++;return o[sFn].exec.apply(o[sFn],arguments);};}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['4'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['22']++;sid=id+Y.stamp(fn)+sFn;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['23']++;o[sFn].register(sid,fn,when);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['24']++;return new Y.EventHandle(o[sFn],sid);},detach:function(handle){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['6']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['25']++;if(handle.detach){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['5'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['26']++;handle.detach();}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['5'][1]++;}}};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['27']++;Y.Do=DO;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['28']++;DO.Method=function(obj,sFn){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['7']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['29']++;this.obj=obj;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['30']++;this.methodName=sFn;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['31']++;this.method=obj[sFn];__cov_0ShtDtxkEapLmfzOgrY8Kw.s['32']++;this.before={};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['33']++;this.after={};};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['34']++;DO.Method.prototype.register=function(sid,fn,when){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['8']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['35']++;if(when){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['6'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['36']++;this.after[sid]=fn;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['6'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['37']++;this.before[sid]=fn;}};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['38']++;DO.Method.prototype._delete=function(sid){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['9']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['39']++;delete this.before[sid];__cov_0ShtDtxkEapLmfzOgrY8Kw.s['40']++;delete this.after[sid];};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['41']++;DO.Method.prototype.exec=function(){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['10']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['42']++;var args=Y.Array(arguments,0,true),i,ret,newRet,bf=this.before,af=this.after,prevented=false;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['43']++;for(i in bf){__cov_0ShtDtxkEapLmfzOgrY8Kw.s['44']++;if(bf.hasOwnProperty(i)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['7'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['45']++;ret=bf[i].apply(this.obj,args);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['46']++;if(ret){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['8'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['47']++;switch(ret.constructor){case DO.Halt:__cov_0ShtDtxkEapLmfzOgrY8Kw.b['9'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['48']++;return ret.retVal;case DO.AlterArgs:__cov_0ShtDtxkEapLmfzOgrY8Kw.b['9'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['49']++;args=ret.newArgs;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['50']++;break;case DO.Prevent:__cov_0ShtDtxkEapLmfzOgrY8Kw.b['9'][2]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['51']++;prevented=true;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['52']++;break;default:__cov_0ShtDtxkEapLmfzOgrY8Kw.b['9'][3]++;}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['8'][1]++;}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['7'][1]++;}}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['53']++;if(!prevented){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['10'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['54']++;ret=this.method.apply(this.obj,args);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['10'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['55']++;DO.originalRetVal=ret;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['56']++;DO.currentRetVal=ret;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['57']++;for(i in af){__cov_0ShtDtxkEapLmfzOgrY8Kw.s['58']++;if(af.hasOwnProperty(i)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['11'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['59']++;newRet=af[i].apply(this.obj,args);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['60']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['13'][0]++,newRet)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['13'][1]++,newRet.constructor===DO.Halt)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['12'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['61']++;return newRet.retVal;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['12'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['62']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['15'][0]++,newRet)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['15'][1]++,newRet.constructor===DO.AlterReturn)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['14'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['63']++;ret=newRet.newRetVal;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['64']++;DO.currentRetVal=ret;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['14'][1]++;}}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['11'][1]++;}}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['65']++;return ret;};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['66']++;DO.AlterArgs=function(msg,newArgs){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['11']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['67']++;this.msg=msg;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['68']++;this.newArgs=newArgs;};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['69']++;DO.AlterReturn=function(msg,newRetVal){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['12']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['70']++;this.msg=msg;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['71']++;this.newRetVal=newRetVal;};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['72']++;DO.Halt=function(msg,retVal){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['13']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['73']++;this.msg=msg;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['74']++;this.retVal=retVal;};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['75']++;DO.Prevent=function(msg){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['14']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['76']++;this.msg=msg;};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['77']++;DO.Error=DO.Halt;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['78']++;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){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['15']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['79']++;var p;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['80']++;for(p in s){__cov_0ShtDtxkEapLmfzOgrY8Kw.s['81']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['17'][0]++,CONFIGS_HASH[p])&&((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['17'][1]++,ov)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['17'][2]++,!(p in r)))){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['16'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['82']++;r[p]=s[p];}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['16'][1]++;}}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['83']++;return r;};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['84']++;Y.CustomEvent=function(type,defaults){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['16']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['85']++;this._kds=Y.CustomEvent.keepDeprecatedSubs;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['86']++;this.id=Y.guid();__cov_0ShtDtxkEapLmfzOgrY8Kw.s['87']++;this.type=type;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['88']++;this.silent=this.logSystem=type===YUI_LOG;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['89']++;if(this._kds){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['18'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['90']++;this.subscribers={};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['91']++;this.afters={};}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['18'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['92']++;if(defaults){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['19'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['93']++;mixConfigs(this,defaults,true);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['19'][1]++;}};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['94']++;Y.CustomEvent.keepDeprecatedSubs=false;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['95']++;Y.CustomEvent.mixConfigs=mixConfigs;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['96']++;Y.CustomEvent.prototype={constructor:Y.CustomEvent,signature:YUI3_SIGNATURE,context:Y,preventable:true,bubbles:true,hasSubs:function(when){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['17']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['97']++;var s=0,a=0,subs=this._subscribers,afters=this._afters,sib=this.sibling;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['98']++;if(subs){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['20'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['99']++;s=subs.length;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['20'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['100']++;if(afters){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['21'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['101']++;a=afters.length;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['21'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['102']++;if(sib){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['22'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['103']++;subs=sib._subscribers;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['104']++;afters=sib._afters;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['105']++;if(subs){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['23'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['106']++;s+=subs.length;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['23'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['107']++;if(afters){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['24'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['108']++;a+=afters.length;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['24'][1]++;}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['22'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['109']++;if(when){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['25'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['110']++;return when==='after'?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['26'][0]++,a):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['26'][1]++,s);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['25'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['111']++;return s+a;},monitor:function(what){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['18']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['112']++;this.monitored=true;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['113']++;var type=this.id+'|'+this.type+'_'+what,args=nativeSlice.call(arguments,0);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['114']++;args[0]=type;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['115']++;return this.host.on.apply(this.host,args);},getSubs:function(){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['19']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['116']++;var sibling=this.sibling,subs=this._subscribers,afters=this._afters,siblingSubs,siblingAfters;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['117']++;if(sibling){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['27'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['118']++;siblingSubs=sibling._subscribers;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['119']++;siblingAfters=sibling._afters;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['27'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['120']++;if(siblingSubs){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['28'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['121']++;if(subs){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['29'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['122']++;subs=subs.concat(siblingSubs);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['29'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['123']++;subs=siblingSubs.concat();}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['28'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['124']++;if(subs){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['30'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['125']++;subs=subs.concat();}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['30'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['126']++;subs=[];}}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['127']++;if(siblingAfters){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['31'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['128']++;if(afters){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['32'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['129']++;afters=afters.concat(siblingAfters);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['32'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['130']++;afters=siblingAfters.concat();}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['31'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['131']++;if(afters){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['33'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['132']++;afters=afters.concat();}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['33'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['133']++;afters=[];}}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['134']++;return[subs,afters];},applyConfig:function(o,force){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['20']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['135']++;mixConfigs(this,o,force);},_on:function(fn,context,args,when){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['21']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['136']++;var s=new Y.Subscriber(fn,context,args,when),firedWith;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['137']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['35'][0]++,this.fireOnce)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['35'][1]++,this.fired)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['34'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['138']++;firedWith=this.firedWith;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['139']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['37'][0]++,this.emitFacade)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['37'][1]++,this._addFacadeToArgs)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['36'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['140']++;this._addFacadeToArgs(firedWith);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['36'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['141']++;if(this.async){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['38'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['142']++;setTimeout(Y.bind(this._notify,this,s,firedWith),0);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['38'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['143']++;this._notify(s,firedWith);}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['34'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['144']++;if(when===AFTER){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['39'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['145']++;if(!this._afters){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['40'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['146']++;this._afters=[];}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['40'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['147']++;this._afters.push(s);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['39'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['148']++;if(!this._subscribers){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['41'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['149']++;this._subscribers=[];}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['41'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['150']++;this._subscribers.push(s);}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['151']++;if(this._kds){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['42'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['152']++;if(when===AFTER){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['43'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['153']++;this.afters[s.id]=s;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['43'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['154']++;this.subscribers[s.id]=s;}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['42'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['155']++;return new Y.EventHandle(this,s);},subscribe:function(fn,context){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['22']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['156']++;var a=arguments.length>2?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['44'][0]++,nativeSlice.call(arguments,2)):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['44'][1]++,null);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['157']++;return this._on(fn,context,a,true);},on:function(fn,context){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['23']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['158']++;var a=arguments.length>2?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['45'][0]++,nativeSlice.call(arguments,2)):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['45'][1]++,null);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['159']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['47'][0]++,this.monitored)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['47'][1]++,this.host)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['46'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['160']++;this.host._monitor('attach',this,{args:arguments});}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['46'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['161']++;return this._on(fn,context,a,true);},after:function(fn,context){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['24']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['162']++;var a=arguments.length>2?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['48'][0]++,nativeSlice.call(arguments,2)):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['48'][1]++,null);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['163']++;return this._on(fn,context,a,AFTER);},detach:function(fn,context){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['25']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['164']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['50'][0]++,fn)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['50'][1]++,fn.detach)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['49'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['165']++;return fn.detach();}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['49'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['166']++;var i,s,found=0,subs=this._subscribers,afters=this._afters;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['167']++;if(subs){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['51'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['168']++;for(i=subs.length;i>=0;i--){__cov_0ShtDtxkEapLmfzOgrY8Kw.s['169']++;s=subs[i];__cov_0ShtDtxkEapLmfzOgrY8Kw.s['170']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['53'][0]++,s)&&((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['53'][1]++,!fn)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['53'][2]++,fn===s.fn))){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['52'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['171']++;this._delete(s,subs,i);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['172']++;found++;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['52'][1]++;}}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['51'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['173']++;if(afters){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['54'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['174']++;for(i=afters.length;i>=0;i--){__cov_0ShtDtxkEapLmfzOgrY8Kw.s['175']++;s=afters[i];__cov_0ShtDtxkEapLmfzOgrY8Kw.s['176']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['56'][0]++,s)&&((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['56'][1]++,!fn)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['56'][2]++,fn===s.fn))){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['55'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['177']++;this._delete(s,afters,i);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['178']++;found++;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['55'][1]++;}}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['54'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['179']++;return found;},unsubscribe:function(){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['26']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['180']++;return this.detach.apply(this,arguments);},_notify:function(s,args,ef){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['27']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['181']++;var ret;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['182']++;ret=s.notify(args,this);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['183']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['58'][0]++,false===ret)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['58'][1]++,this.stopped>1)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['57'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['184']++;return false;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['57'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['185']++;return true;},log:function(msg,cat){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['28']++;},fire:function(){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['29']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['186']++;var args=[];__cov_0ShtDtxkEapLmfzOgrY8Kw.s['187']++;args.push.apply(args,arguments);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['188']++;return this._fire(args);},_fire:function(args){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['30']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['189']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['60'][0]++,this.fireOnce)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['60'][1]++,this.fired)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['59'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['190']++;return true;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['59'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['191']++;this.fired=true;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['192']++;if(this.fireOnce){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['61'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['193']++;this.firedWith=args;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['61'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['194']++;if(this.emitFacade){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['62'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['195']++;return this.fireComplex(args);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['62'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['196']++;return this.fireSimple(args);}}},fireSimple:function(args){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['31']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['197']++;this.stopped=0;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['198']++;this.prevented=0;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['199']++;if(this.hasSubs()){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['63'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['200']++;var subs=this.getSubs();__cov_0ShtDtxkEapLmfzOgrY8Kw.s['201']++;this._procSubs(subs[0],args);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['202']++;this._procSubs(subs[1],args);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['63'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['203']++;if(this.broadcast){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['64'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['204']++;this._broadcast(args);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['64'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['205']++;return this.stopped?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['65'][0]++,false):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['65'][1]++,true);},fireComplex:function(args){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['32']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['206']++;args[0]=(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['66'][0]++,args[0])||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['66'][1]++,{});__cov_0ShtDtxkEapLmfzOgrY8Kw.s['207']++;return this.fireSimple(args);},_procSubs:function(subs,args,ef){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['33']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['208']++;var s,i,l;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['209']++;for(i=0,l=subs.length;i<l;i++){__cov_0ShtDtxkEapLmfzOgrY8Kw.s['210']++;s=subs[i];__cov_0ShtDtxkEapLmfzOgrY8Kw.s['211']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['68'][0]++,s)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['68'][1]++,s.fn)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['67'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['212']++;if(false===this._notify(s,args,ef)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['69'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['213']++;this.stopped=2;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['69'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['214']++;if(this.stopped===2){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['70'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['215']++;return false;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['70'][1]++;}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['67'][1]++;}}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['216']++;return true;},_broadcast:function(args){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['34']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['217']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['72'][0]++,!this.stopped)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['72'][1]++,this.broadcast)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['71'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['218']++;var a=args.concat();__cov_0ShtDtxkEapLmfzOgrY8Kw.s['219']++;a.unshift(this.type);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['220']++;if(this.host!==Y){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['73'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['221']++;Y.fire.apply(Y,a);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['73'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['222']++;if(this.broadcast===2){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['74'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['223']++;Y.Global.fire.apply(Y.Global,a);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['74'][1]++;}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['71'][1]++;}},unsubscribeAll:function(){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['35']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['224']++;return this.detachAll.apply(this,arguments);},detachAll:function(){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['36']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['225']++;return this.detach();},_delete:function(s,subs,i){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['37']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['226']++;var when=s._when;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['227']++;if(!subs){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['75'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['228']++;subs=when===AFTER?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['76'][0]++,this._afters):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['76'][1]++,this._subscribers);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['75'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['229']++;if(subs){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['77'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['230']++;i=YArray.indexOf(subs,s,0);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['231']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['79'][0]++,s)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['79'][1]++,subs[i]===s)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['78'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['232']++;subs.splice(i,1);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['78'][1]++;}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['77'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['233']++;if(this._kds){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['80'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['234']++;if(when===AFTER){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['81'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['235']++;delete this.afters[s.id];}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['81'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['236']++;delete this.subscribers[s.id];}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['80'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['237']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['83'][0]++,this.monitored)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['83'][1]++,this.host)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['82'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['238']++;this.host._monitor('detach',this,{ce:this,sub:s});}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['82'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['239']++;if(s){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['84'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['240']++;s.deleted=true;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['84'][1]++;}}};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['241']++;Y.Subscriber=function(fn,context,args,when){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['38']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['242']++;this.fn=fn;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['243']++;this.context=context;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['244']++;this.id=Y.guid();__cov_0ShtDtxkEapLmfzOgrY8Kw.s['245']++;this.args=args;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['246']++;this._when=when;};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['247']++;Y.Subscriber.prototype={constructor:Y.Subscriber,_notify:function(c,args,ce){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['39']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['248']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['86'][0]++,this.deleted)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['86'][1]++,!this.postponed)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['85'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['249']++;if(this.postponed){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['87'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['250']++;delete this.fn;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['251']++;delete this.context;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['87'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['252']++;delete this.postponed;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['253']++;return null;}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['85'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['254']++;var a=this.args,ret;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['255']++;switch(ce.signature){case 0:__cov_0ShtDtxkEapLmfzOgrY8Kw.b['88'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['256']++;ret=this.fn.call(c,ce.type,args,c);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['257']++;break;case 1:__cov_0ShtDtxkEapLmfzOgrY8Kw.b['88'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['258']++;ret=this.fn.call(c,(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['89'][0]++,args[0])||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['89'][1]++,null),c);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['259']++;break;default:__cov_0ShtDtxkEapLmfzOgrY8Kw.b['88'][2]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['260']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['91'][0]++,a)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['91'][1]++,args)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['90'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['261']++;args=(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['92'][0]++,args)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['92'][1]++,[]);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['262']++;a=a?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['93'][0]++,args.concat(a)):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['93'][1]++,args);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['263']++;ret=this.fn.apply(c,a);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['90'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['264']++;ret=this.fn.call(c);}}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['265']++;if(this.once){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['94'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['266']++;ce._delete(this);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['94'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['267']++;return ret;},notify:function(args,ce){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['40']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['268']++;var c=this.context,ret=true;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['269']++;if(!c){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['95'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['270']++;c=ce.contextFn?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['96'][0]++,ce.contextFn()):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['96'][1]++,ce.context);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['95'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['271']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['98'][0]++,Y.config)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['98'][1]++,Y.config.throwFail)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['97'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['272']++;ret=this._notify(c,args,ce);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['97'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['273']++;try{__cov_0ShtDtxkEapLmfzOgrY8Kw.s['274']++;ret=this._notify(c,args,ce);}catch(e){__cov_0ShtDtxkEapLmfzOgrY8Kw.s['275']++;Y.error(this+' failed: '+e.message,e);}}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['276']++;return ret;},contains:function(fn,context){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['41']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['277']++;if(context){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['99'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['278']++;return(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['100'][0]++,this.fn===fn)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['100'][1]++,this.context===context);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['99'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['279']++;return this.fn===fn;}},valueOf:function(){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['42']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['280']++;return this.id;}};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['281']++;Y.EventHandle=function(evt,sub){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['43']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['282']++;this.evt=evt;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['283']++;this.sub=sub;};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['284']++;Y.EventHandle.prototype={batch:function(f,c){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['44']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['285']++;f.call((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['101'][0]++,c)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['101'][1]++,this),this);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['286']++;if(Y.Lang.isArray(this.evt)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['102'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['287']++;Y.Array.each(this.evt,function(h){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['45']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['288']++;h.batch.call((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['103'][0]++,c)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['103'][1]++,h),f);});}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['102'][1]++;}},detach:function(){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['46']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['289']++;var evt=this.evt,detached=0,i;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['290']++;if(evt){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['104'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['291']++;if(Y.Lang.isArray(evt)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['105'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['292']++;for(i=0;i<evt.length;i++){__cov_0ShtDtxkEapLmfzOgrY8Kw.s['293']++;detached+=evt[i].detach();}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['105'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['294']++;evt._delete(this.sub);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['295']++;detached=1;}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['104'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['296']++;return detached;},monitor:function(what){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['47']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['297']++;return this.evt.monitor.apply(this.evt,arguments);}};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['298']++;var L=Y.Lang,PREFIX_DELIMITER=':',CATEGORY_DELIMITER='|',AFTER_PREFIX='~AFTER~',WILD_TYPE_RE=/(.*?)(:)(.*?)/,_wildType=Y.cached(function(type){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['48']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['299']++;return type.replace(WILD_TYPE_RE,'*$2$3');}),_getType=function(type,pre){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['49']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['300']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['107'][0]++,!pre)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['107'][1]++,!type)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['107'][2]++,type.indexOf(PREFIX_DELIMITER)>-1)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['106'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['301']++;return type;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['106'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['302']++;return pre+PREFIX_DELIMITER+type;},_parseType=Y.cached(function(type,pre){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['50']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['303']++;var t=type,detachcategory,after,i;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['304']++;if(!L.isString(t)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['108'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['305']++;return t;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['108'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['306']++;i=t.indexOf(AFTER_PREFIX);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['307']++;if(i>-1){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['109'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['308']++;after=true;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['309']++;t=t.substr(AFTER_PREFIX.length);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['109'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['310']++;i=t.indexOf(CATEGORY_DELIMITER);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['311']++;if(i>-1){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['110'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['312']++;detachcategory=t.substr(0,i);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['313']++;t=t.substr(i+1);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['314']++;if(t==='*'){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['111'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['315']++;t=null;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['111'][1]++;}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['110'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['316']++;return[detachcategory,pre?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['112'][0]++,_getType(t,pre)):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['112'][1]++,t),after,t];}),ET=function(opts){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['51']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['317']++;var etState=this._yuievt,etConfig;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['318']++;if(!etState){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['113'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['319']++;etState=this._yuievt={events:{},targets:null,config:{host:this,context:this},chain:Y.config.chain};}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['113'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['320']++;etConfig=etState.config;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['321']++;if(opts){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['114'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['322']++;mixConfigs(etConfig,opts,true);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['323']++;if(opts.chain!==undefined){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['115'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['324']++;etState.chain=opts.chain;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['115'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['325']++;if(opts.prefix){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['116'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['326']++;etConfig.prefix=opts.prefix;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['116'][1]++;}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['114'][1]++;}};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['327']++;ET.prototype={constructor:ET,once:function(){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['52']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['328']++;var handle=this.on.apply(this,arguments);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['329']++;handle.batch(function(hand){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['53']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['330']++;if(hand.sub){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['117'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['331']++;hand.sub.once=true;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['117'][1]++;}});__cov_0ShtDtxkEapLmfzOgrY8Kw.s['332']++;return handle;},onceAfter:function(){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['54']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['333']++;var handle=this.after.apply(this,arguments);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['334']++;handle.batch(function(hand){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['55']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['335']++;if(hand.sub){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['118'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['336']++;hand.sub.once=true;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['118'][1]++;}});__cov_0ShtDtxkEapLmfzOgrY8Kw.s['337']++;return handle;},parseType:function(type,pre){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['56']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['338']++;return _parseType(type,(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['119'][0]++,pre)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['119'][1]++,this._yuievt.config.prefix));},on:function(type,fn,context){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['57']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['339']++;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;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['340']++;this._monitor('attach',parts[1],{args:arguments,category:parts[0],after:parts[2]});__cov_0ShtDtxkEapLmfzOgrY8Kw.s['341']++;if(L.isObject(type)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['120'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['342']++;if(L.isFunction(type)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['121'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['343']++;return Y.Do.before.apply(Y.Do,arguments);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['121'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['344']++;f=fn;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['345']++;c=context;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['346']++;args=nativeSlice.call(arguments,0);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['347']++;ret=[];__cov_0ShtDtxkEapLmfzOgrY8Kw.s['348']++;if(L.isArray(type)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['122'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['349']++;isArr=true;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['122'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['350']++;after=type._after;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['351']++;delete type._after;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['352']++;Y.each(type,function(v,k){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['58']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['353']++;if(L.isObject(v)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['123'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['354']++;f=(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['124'][0]++,v.fn)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['124'][1]++,L.isFunction(v)?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['125'][0]++,v):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['125'][1]++,f));__cov_0ShtDtxkEapLmfzOgrY8Kw.s['355']++;c=(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['126'][0]++,v.context)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['126'][1]++,c);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['123'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['356']++;var nv=after?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['127'][0]++,AFTER_PREFIX):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['127'][1]++,'');__cov_0ShtDtxkEapLmfzOgrY8Kw.s['357']++;args[0]=nv+(isArr?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['128'][0]++,v):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['128'][1]++,k));__cov_0ShtDtxkEapLmfzOgrY8Kw.s['358']++;args[1]=f;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['359']++;args[2]=c;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['360']++;ret.push(this.on.apply(this,args));},this);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['361']++;return yuievt.chain?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['129'][0]++,this):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['129'][1]++,new Y.EventHandle(ret));}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['120'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['362']++;detachcategory=parts[0];__cov_0ShtDtxkEapLmfzOgrY8Kw.s['363']++;after=parts[2];__cov_0ShtDtxkEapLmfzOgrY8Kw.s['364']++;shorttype=parts[3];__cov_0ShtDtxkEapLmfzOgrY8Kw.s['365']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['131'][0]++,Node)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['131'][1]++,Y.instanceOf(this,Node))&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['131'][2]++,shorttype in Node.DOM_EVENTS)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['130'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['366']++;args=nativeSlice.call(arguments,0);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['367']++;args.splice(2,0,Node.getDOMNode(this));__cov_0ShtDtxkEapLmfzOgrY8Kw.s['368']++;return Y.on.apply(Y,args);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['130'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['369']++;type=parts[1];__cov_0ShtDtxkEapLmfzOgrY8Kw.s['370']++;if(Y.instanceOf(this,YUI)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['132'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['371']++;adapt=Y.Env.evt.plugins[type];__cov_0ShtDtxkEapLmfzOgrY8Kw.s['372']++;args=nativeSlice.call(arguments,0);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['373']++;args[0]=shorttype;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['374']++;if(Node){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['133'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['375']++;n=args[2];__cov_0ShtDtxkEapLmfzOgrY8Kw.s['376']++;if(Y.instanceOf(n,Y.NodeList)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['134'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['377']++;n=Y.NodeList.getDOMNodes(n);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['134'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['378']++;if(Y.instanceOf(n,Node)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['135'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['379']++;n=Node.getDOMNode(n);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['135'][1]++;}}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['380']++;domevent=shorttype in Node.DOM_EVENTS;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['381']++;if(domevent){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['136'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['382']++;args[2]=n;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['136'][1]++;}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['133'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['383']++;if(adapt){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['137'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['384']++;handle=adapt.on.apply(Y,args);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['137'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['385']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['139'][0]++,!type)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['139'][1]++,domevent)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['138'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['386']++;handle=Y.Event._attach(args);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['138'][1]++;}}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['132'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['387']++;if(!handle){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['140'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['388']++;ce=(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['141'][0]++,yuievt.events[type])||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['141'][1]++,this.publish(type));__cov_0ShtDtxkEapLmfzOgrY8Kw.s['389']++;handle=ce._on(fn,context,arguments.length>3?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['142'][0]++,nativeSlice.call(arguments,3)):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['142'][1]++,null),after?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['143'][0]++,'after'):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['143'][1]++,true));__cov_0ShtDtxkEapLmfzOgrY8Kw.s['390']++;if(type.indexOf('*:')!==-1){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['144'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['391']++;this._hasSiblings=true;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['144'][1]++;}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['140'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['392']++;if(detachcategory){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['145'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['393']++;store[detachcategory]=(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['146'][0]++,store[detachcategory])||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['146'][1]++,{});__cov_0ShtDtxkEapLmfzOgrY8Kw.s['394']++;store[detachcategory][type]=(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['147'][0]++,store[detachcategory][type])||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['147'][1]++,[]);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['395']++;store[detachcategory][type].push(handle);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['145'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['396']++;return yuievt.chain?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['148'][0]++,this):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['148'][1]++,handle);},subscribe:function(){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['59']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['397']++;return this.on.apply(this,arguments);},detach:function(type,fn,context){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['60']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['398']++;var evts=this._yuievt.events,i,Node=Y.Node,isNode=(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['149'][0]++,Node)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['149'][1]++,Y.instanceOf(this,Node));__cov_0ShtDtxkEapLmfzOgrY8Kw.s['399']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['151'][0]++,!type)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['151'][1]++,this!==Y)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['150'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['400']++;for(i in evts){__cov_0ShtDtxkEapLmfzOgrY8Kw.s['401']++;if(evts.hasOwnProperty(i)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['152'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['402']++;evts[i].detach(fn,context);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['152'][1]++;}}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['403']++;if(isNode){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['153'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['404']++;Y.Event.purgeElement(Node.getDOMNode(this));}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['153'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['405']++;return this;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['150'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['406']++;var parts=_parseType(type,this._yuievt.config.prefix),detachcategory=L.isArray(parts)?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['154'][0]++,parts[0]):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['154'][1]++,null),shorttype=parts?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['155'][0]++,parts[3]):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['155'][1]++,null),adapt,store=Y.Env.evt.handles,detachhost,cat,args,ce,keyDetacher=function(lcat,ltype,host){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['61']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['407']++;var handles=lcat[ltype],ce,i;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['408']++;if(handles){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['156'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['409']++;for(i=handles.length-1;i>=0;--i){__cov_0ShtDtxkEapLmfzOgrY8Kw.s['410']++;ce=handles[i].evt;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['411']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['158'][0]++,ce.host===host)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['158'][1]++,ce.el===host)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['157'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['412']++;handles[i].detach();}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['157'][1]++;}}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['156'][1]++;}};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['413']++;if(detachcategory){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['159'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['414']++;cat=store[detachcategory];__cov_0ShtDtxkEapLmfzOgrY8Kw.s['415']++;type=parts[1];__cov_0ShtDtxkEapLmfzOgrY8Kw.s['416']++;detachhost=isNode?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['160'][0]++,Y.Node.getDOMNode(this)):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['160'][1]++,this);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['417']++;if(cat){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['161'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['418']++;if(type){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['162'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['419']++;keyDetacher(cat,type,detachhost);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['162'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['420']++;for(i in cat){__cov_0ShtDtxkEapLmfzOgrY8Kw.s['421']++;if(cat.hasOwnProperty(i)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['163'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['422']++;keyDetacher(cat,i,detachhost);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['163'][1]++;}}}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['423']++;return this;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['161'][1]++;}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['159'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['424']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['165'][0]++,L.isObject(type))&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['165'][1]++,type.detach)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['164'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['425']++;type.detach();__cov_0ShtDtxkEapLmfzOgrY8Kw.s['426']++;return this;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['164'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['427']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['167'][0]++,isNode)&&((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['167'][1]++,!shorttype)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['167'][2]++,shorttype in Node.DOM_EVENTS))){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['166'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['428']++;args=nativeSlice.call(arguments,0);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['429']++;args[2]=Node.getDOMNode(this);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['430']++;Y.detach.apply(Y,args);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['431']++;return this;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['166'][1]++;}}}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['432']++;adapt=Y.Env.evt.plugins[shorttype];__cov_0ShtDtxkEapLmfzOgrY8Kw.s['433']++;if(Y.instanceOf(this,YUI)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['168'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['434']++;args=nativeSlice.call(arguments,0);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['435']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['170'][0]++,adapt)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['170'][1]++,adapt.detach)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['169'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['436']++;adapt.detach.apply(Y,args);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['437']++;return this;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['169'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['438']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['172'][0]++,!type)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['172'][1]++,!adapt)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['172'][2]++,Node)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['172'][3]++,type in Node.DOM_EVENTS)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['171'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['439']++;args[0]=type;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['440']++;Y.Event.detach.apply(Y.Event,args);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['441']++;return this;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['171'][1]++;}}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['168'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['442']++;ce=evts[parts[1]];__cov_0ShtDtxkEapLmfzOgrY8Kw.s['443']++;if(ce){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['173'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['444']++;ce.detach(fn,context);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['173'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['445']++;return this;},unsubscribe:function(){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['62']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['446']++;return this.detach.apply(this,arguments);},detachAll:function(type){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['63']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['447']++;return this.detach(type);},unsubscribeAll:function(){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['64']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['448']++;return this.detachAll.apply(this,arguments);},publish:function(type,opts){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['65']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['449']++;var ret,etState=this._yuievt,etConfig=etState.config,pre=etConfig.prefix;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['450']++;if(typeof type==='string'){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['174'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['451']++;if(pre){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['175'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['452']++;type=_getType(type,pre);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['175'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['453']++;ret=this._publish(type,etConfig,opts);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['174'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['454']++;ret={};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['455']++;Y.each(type,function(v,k){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['66']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['456']++;if(pre){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['176'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['457']++;k=_getType(k,pre);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['176'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['458']++;ret[k]=this._publish(k,etConfig,(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['177'][0]++,v)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['177'][1]++,opts));},this);}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['459']++;return ret;},_getFullType:function(type){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['67']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['460']++;var pre=this._yuievt.config.prefix;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['461']++;if(pre){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['178'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['462']++;return pre+PREFIX_DELIMITER+type;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['178'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['463']++;return type;}},_publish:function(fullType,etOpts,ceOpts){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['68']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['464']++;var ce,etState=this._yuievt,etConfig=etState.config,host=etConfig.host,context=etConfig.context,events=etState.events;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['465']++;ce=events[fullType];__cov_0ShtDtxkEapLmfzOgrY8Kw.s['466']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['180'][0]++,etConfig.monitored)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['180'][1]++,!ce)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['180'][2]++,ce)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['180'][3]++,ce.monitored)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['179'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['467']++;this._monitor('publish',fullType,{args:arguments});}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['179'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['468']++;if(!ce){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['181'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['469']++;ce=events[fullType]=new Y.CustomEvent(fullType,etOpts);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['470']++;if(!etOpts){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['182'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['471']++;ce.host=host;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['472']++;ce.context=context;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['182'][1]++;}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['181'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['473']++;if(ceOpts){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['183'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['474']++;mixConfigs(ce,ceOpts,true);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['183'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['475']++;return ce;},_monitor:function(what,eventType,o){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['69']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['476']++;var monitorevt,ce,type;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['477']++;if(eventType){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['184'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['478']++;if(typeof eventType==='string'){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['185'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['479']++;type=eventType;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['480']++;ce=this.getEvent(eventType,true);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['185'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['481']++;ce=eventType;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['482']++;type=eventType.type;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['483']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['187'][0]++,this._yuievt.config.monitored)&&((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['187'][1]++,!ce)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['187'][2]++,ce.monitored))||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['187'][3]++,ce)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['187'][4]++,ce.monitored)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['186'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['484']++;monitorevt=type+'_'+what;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['485']++;o.monitored=what;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['486']++;this.fire.call(this,monitorevt,o);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['186'][1]++;}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['184'][1]++;}},fire:function(type){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['70']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['487']++;var typeIncluded=typeof type==='string',argCount=arguments.length,t=type,yuievt=this._yuievt,etConfig=yuievt.config,pre=etConfig.prefix,ret,ce,ce2,args;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['488']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['189'][0]++,typeIncluded)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['189'][1]++,argCount<=3)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['188'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['489']++;if(argCount===2){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['190'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['490']++;args=[arguments[1]];}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['190'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['491']++;if(argCount===3){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['191'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['492']++;args=[arguments[1],arguments[2]];}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['191'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['493']++;args=[];}}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['188'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['494']++;args=nativeSlice.call(arguments,typeIncluded?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['192'][0]++,1):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['192'][1]++,0));}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['495']++;if(!typeIncluded){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['193'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['496']++;t=(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['194'][0]++,type)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['194'][1]++,type.type);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['193'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['497']++;if(pre){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['195'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['498']++;t=_getType(t,pre);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['195'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['499']++;ce=yuievt.events[t];__cov_0ShtDtxkEapLmfzOgrY8Kw.s['500']++;if(this._hasSiblings){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['196'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['501']++;ce2=this.getSibling(t,ce);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['502']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['198'][0]++,ce2)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['198'][1]++,!ce)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['197'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['503']++;ce=this.publish(t);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['197'][1]++;}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['196'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['504']++;if((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['200'][0]++,etConfig.monitored)&&((__cov_0ShtDtxkEapLmfzOgrY8Kw.b['200'][1]++,!ce)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['200'][2]++,ce.monitored))||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['200'][3]++,ce)&&(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['200'][4]++,ce.monitored)){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['199'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['505']++;this._monitor('fire',(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['201'][0]++,ce)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['201'][1]++,t),{args:args});}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['199'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['506']++;if(!ce){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['202'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['507']++;if(yuievt.hasTargets){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['203'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['508']++;return this.bubble({type:t},args,this);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['203'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['509']++;ret=true;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['202'][1]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['510']++;if(ce2){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['204'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['511']++;ce.sibling=ce2;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['204'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['512']++;ret=ce._fire(args);}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['513']++;return yuievt.chain?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['205'][0]++,this):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['205'][1]++,ret);},getSibling:function(type,ce){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['71']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['514']++;var ce2;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['515']++;if(type.indexOf(PREFIX_DELIMITER)>-1){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['206'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['516']++;type=_wildType(type);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['517']++;ce2=this.getEvent(type,true);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['518']++;if(ce2){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['207'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['519']++;ce2.applyConfig(ce);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['520']++;ce2.bubbles=false;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['521']++;ce2.broadcast=0;}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['207'][1]++;}}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['206'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['522']++;return ce2;},getEvent:function(type,prefixed){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['72']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['523']++;var pre,e;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['524']++;if(!prefixed){__cov_0ShtDtxkEapLmfzOgrY8Kw.b['208'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['525']++;pre=this._yuievt.config.prefix;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['526']++;type=pre?(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['209'][0]++,_getType(type,pre)):(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['209'][1]++,type);}else{__cov_0ShtDtxkEapLmfzOgrY8Kw.b['208'][1]++;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['527']++;e=this._yuievt.events;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['528']++;return(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['210'][0]++,e[type])||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['210'][1]++,null);},after:function(type,fn){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['73']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['529']++;var a=nativeSlice.call(arguments,0);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['530']++;switch(L.type(type)){case'function':__cov_0ShtDtxkEapLmfzOgrY8Kw.b['211'][0]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['531']++;return Y.Do.after.apply(Y.Do,arguments);case'array':__cov_0ShtDtxkEapLmfzOgrY8Kw.b['211'][1]++;case'object':__cov_0ShtDtxkEapLmfzOgrY8Kw.b['211'][2]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['532']++;a[0]._after=true;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['533']++;break;default:__cov_0ShtDtxkEapLmfzOgrY8Kw.b['211'][3]++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['534']++;a[0]=AFTER_PREFIX+type;}__cov_0ShtDtxkEapLmfzOgrY8Kw.s['535']++;return this.on.apply(this,a);},before:function(){__cov_0ShtDtxkEapLmfzOgrY8Kw.f['74']++;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['536']++;return this.on.apply(this,arguments);}};__cov_0ShtDtxkEapLmfzOgrY8Kw.s['537']++;Y.EventTarget=ET;__cov_0ShtDtxkEapLmfzOgrY8Kw.s['538']++;Y.mix(Y,ET.prototype);__cov_0ShtDtxkEapLmfzOgrY8Kw.s['539']++;ET.call(Y,{bubbles:false});__cov_0ShtDtxkEapLmfzOgrY8Kw.s['540']++;YUI.Env.globalEvents=(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['212'][0]++,YUI.Env.globalEvents)||(__cov_0ShtDtxkEapLmfzOgrY8Kw.b['212'][1]++,new ET());__cov_0ShtDtxkEapLmfzOgrY8Kw.s['541']++;Y.Global=YUI.Env.globalEvents;},'3.16.0',{'requires':['oop']});
lib/Container.js
hhhonzik/react-createjs
import React from 'react'; export default class Container extends React.Component{ static isEaselJSComponent = true; draw () { console.log('draw element'); } render() { throw new Error('Do not render CreateJS component outside of <Stage>'); } }
node_modules/react-addons-shallow-compare/index.js
aleszu/chartbuilderSB
module.exports = require('react/lib/shallowCompare');
src/svg-icons/av/radio.js
igorbt/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvRadio = (props) => ( <SvgIcon {...props}> <path d="M3.24 6.15C2.51 6.43 2 7.17 2 8v12c0 1.1.89 2 2 2h16c1.11 0 2-.9 2-2V8c0-1.11-.89-2-2-2H8.3l8.26-3.34L15.88 1 3.24 6.15zM7 20c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm13-8h-2v-2h-2v2H4V8h16v4z"/> </SvgIcon> ); AvRadio = pure(AvRadio); AvRadio.displayName = 'AvRadio'; AvRadio.muiName = 'SvgIcon'; export default AvRadio;
ajax/libs/yui/3.16.0/scrollview-base/scrollview-base.js
chrisyip/cdnjs
/* YUI 3.16.0 (build 76f0e08) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ YUI.add('scrollview-base', function (Y, NAME) { /** * The scrollview-base module provides a basic ScrollView Widget, without scrollbar indicators * * @module scrollview * @submodule scrollview-base */ // Local vars var getClassName = Y.ClassNameManager.getClassName, DOCUMENT = Y.config.doc, IE = Y.UA.ie, NATIVE_TRANSITIONS = Y.Transition.useNative, vendorPrefix = Y.Transition._VENDOR_PREFIX, // Todo: This is a private property, and alternative approaches should be investigated SCROLLVIEW = 'scrollview', CLASS_NAMES = { vertical: getClassName(SCROLLVIEW, 'vert'), horizontal: getClassName(SCROLLVIEW, 'horiz') }, EV_SCROLL_END = 'scrollEnd', FLICK = 'flick', DRAG = 'drag', MOUSEWHEEL = 'mousewheel', UI = 'ui', TOP = 'top', LEFT = 'left', PX = 'px', AXIS = 'axis', SCROLL_Y = 'scrollY', SCROLL_X = 'scrollX', BOUNCE = 'bounce', DISABLED = 'disabled', DECELERATION = 'deceleration', DIM_X = 'x', DIM_Y = 'y', BOUNDING_BOX = 'boundingBox', CONTENT_BOX = 'contentBox', GESTURE_MOVE = 'gesturemove', START = 'start', END = 'end', EMPTY = '', ZERO = '0s', SNAP_DURATION = 'snapDuration', SNAP_EASING = 'snapEasing', EASING = 'easing', FRAME_DURATION = 'frameDuration', BOUNCE_RANGE = 'bounceRange', _constrain = function (val, min, max) { return Math.min(Math.max(val, min), max); }; /** * ScrollView provides a scrollable widget, supporting flick gestures, * across both touch and mouse based devices. * * @class ScrollView * @param config {Object} Object literal with initial attribute values * @extends Widget * @constructor */ function ScrollView() { ScrollView.superclass.constructor.apply(this, arguments); } Y.ScrollView = Y.extend(ScrollView, Y.Widget, { // *** Y.ScrollView prototype /** * Flag driving whether or not we should try and force H/W acceleration when transforming. Currently enabled by default for Webkit. * Used by the _transform method. * * @property _forceHWTransforms * @type boolean * @protected */ _forceHWTransforms: Y.UA.webkit ? true : false, /** * <p>Used to control whether or not ScrollView's internal * gesturemovestart, gesturemove and gesturemoveend * event listeners should preventDefault. The value is an * object, with "start", "move" and "end" properties used to * specify which events should preventDefault and which shouldn't:</p> * * <pre> * { * start: false, * move: true, * end: false * } * </pre> * * <p>The default values are set up in order to prevent panning, * on touch devices, while allowing click listeners on elements inside * the ScrollView to be notified as expected.</p> * * @property _prevent * @type Object * @protected */ _prevent: { start: false, move: true, end: false }, /** * Contains the distance (postive or negative) in pixels by which * the scrollview was last scrolled. This is useful when setting up * click listeners on the scrollview content, which on mouse based * devices are always fired, even after a drag/flick. * * <p>Touch based devices don't currently fire a click event, * if the finger has been moved (beyond a threshold) so this * check isn't required, if working in a purely touch based environment</p> * * @property lastScrolledAmt * @type Number * @public * @default 0 */ lastScrolledAmt: 0, /** * Internal state, defines the minimum amount that the scrollview can be scrolled along the X axis * * @property _minScrollX * @type number * @protected */ _minScrollX: null, /** * Internal state, defines the maximum amount that the scrollview can be scrolled along the X axis * * @property _maxScrollX * @type number * @protected */ _maxScrollX: null, /** * Internal state, defines the minimum amount that the scrollview can be scrolled along the Y axis * * @property _minScrollY * @type number * @protected */ _minScrollY: null, /** * Internal state, defines the maximum amount that the scrollview can be scrolled along the Y axis * * @property _maxScrollY * @type number * @protected */ _maxScrollY: null, /** * Designated initializer * * @method initializer * @param {Object} Configuration object for the plugin */ initializer: function () { var sv = this; // Cache these values, since they aren't going to change. sv._bb = sv.get(BOUNDING_BOX); sv._cb = sv.get(CONTENT_BOX); // Cache some attributes sv._cAxis = sv.get(AXIS); sv._cBounce = sv.get(BOUNCE); sv._cBounceRange = sv.get(BOUNCE_RANGE); sv._cDeceleration = sv.get(DECELERATION); sv._cFrameDuration = sv.get(FRAME_DURATION); }, /** * bindUI implementation * * Hooks up events for the widget * @method bindUI */ bindUI: function () { var sv = this; // Bind interaction listers sv._bindFlick(sv.get(FLICK)); sv._bindDrag(sv.get(DRAG)); sv._bindMousewheel(true); // Bind change events sv._bindAttrs(); // IE SELECT HACK. See if we can do this non-natively and in the gesture for a future release. if (IE) { sv._fixIESelect(sv._bb, sv._cb); } // Set any deprecated static properties if (ScrollView.SNAP_DURATION) { sv.set(SNAP_DURATION, ScrollView.SNAP_DURATION); } if (ScrollView.SNAP_EASING) { sv.set(SNAP_EASING, ScrollView.SNAP_EASING); } if (ScrollView.EASING) { sv.set(EASING, ScrollView.EASING); } if (ScrollView.FRAME_STEP) { sv.set(FRAME_DURATION, ScrollView.FRAME_STEP); } if (ScrollView.BOUNCE_RANGE) { sv.set(BOUNCE_RANGE, ScrollView.BOUNCE_RANGE); } // Recalculate dimension properties // TODO: This should be throttled. // Y.one(WINDOW).after('resize', sv._afterDimChange, sv); }, /** * Bind event listeners * * @method _bindAttrs * @private */ _bindAttrs: function () { var sv = this, scrollChangeHandler = sv._afterScrollChange, dimChangeHandler = sv._afterDimChange; // Bind any change event listeners sv.after({ 'scrollEnd': sv._afterScrollEnd, 'disabledChange': sv._afterDisabledChange, 'flickChange': sv._afterFlickChange, 'dragChange': sv._afterDragChange, 'axisChange': sv._afterAxisChange, 'scrollYChange': scrollChangeHandler, 'scrollXChange': scrollChangeHandler, 'heightChange': dimChangeHandler, 'widthChange': dimChangeHandler }); }, /** * Bind (or unbind) gesture move listeners required for drag support * * @method _bindDrag * @param drag {boolean} If true, the method binds listener to enable * drag (gesturemovestart). If false, the method unbinds gesturemove * listeners for drag support. * @private */ _bindDrag: function (drag) { var sv = this, bb = sv._bb; // Unbind any previous 'drag' listeners bb.detach(DRAG + '|*'); if (drag) { bb.on(DRAG + '|' + GESTURE_MOVE + START, Y.bind(sv._onGestureMoveStart, sv)); } }, /** * Bind (or unbind) flick listeners. * * @method _bindFlick * @param flick {Object|boolean} If truthy, the method binds listeners for * flick support. If false, the method unbinds flick listeners. * @private */ _bindFlick: function (flick) { var sv = this, bb = sv._bb; // Unbind any previous 'flick' listeners bb.detach(FLICK + '|*'); if (flick) { bb.on(FLICK + '|' + FLICK, Y.bind(sv._flick, sv), flick); // Rebind Drag, becuase _onGestureMoveEnd always has to fire -after- _flick sv._bindDrag(sv.get(DRAG)); } }, /** * Bind (or unbind) mousewheel listeners. * * @method _bindMousewheel * @param mousewheel {Object|boolean} If truthy, the method binds listeners for * mousewheel support. If false, the method unbinds mousewheel listeners. * @private */ _bindMousewheel: function (mousewheel) { var sv = this, bb = sv._bb; // Unbind any previous 'mousewheel' listeners // TODO: This doesn't actually appear to work properly. Fix. #2532743 bb.detach(MOUSEWHEEL + '|*'); // Only enable for vertical scrollviews if (mousewheel) { // Bound to document, because that's where mousewheel events fire off of. Y.one(DOCUMENT).on(MOUSEWHEEL, Y.bind(sv._mousewheel, sv)); } }, /** * syncUI implementation. * * Update the scroll position, based on the current value of scrollX/scrollY. * * @method syncUI */ syncUI: function () { var sv = this, scrollDims = sv._getScrollDims(), width = scrollDims.offsetWidth, height = scrollDims.offsetHeight, scrollWidth = scrollDims.scrollWidth, scrollHeight = scrollDims.scrollHeight; // If the axis is undefined, auto-calculate it if (sv._cAxis === undefined) { // This should only ever be run once (for now). // In the future SV might post-load axis changes sv._cAxis = { x: (scrollWidth > width), y: (scrollHeight > height) }; sv._set(AXIS, sv._cAxis); } // get text direction on or inherited by scrollview node sv.rtl = (sv._cb.getComputedStyle('direction') === 'rtl'); // Cache the disabled value sv._cDisabled = sv.get(DISABLED); // Run this to set initial values sv._uiDimensionsChange(); // If we're out-of-bounds, snap back. if (sv._isOutOfBounds()) { sv._snapBack(); } }, /** * Utility method to obtain widget dimensions * * @method _getScrollDims * @return {Object} The offsetWidth, offsetHeight, scrollWidth and * scrollHeight as an array: [offsetWidth, offsetHeight, scrollWidth, * scrollHeight] * @private */ _getScrollDims: function () { var sv = this, cb = sv._cb, bb = sv._bb, TRANS = ScrollView._TRANSITION, // Ideally using CSSMatrix - don't think we have it normalized yet though. // origX = (new WebKitCSSMatrix(cb.getComputedStyle("transform"))).e, // origY = (new WebKitCSSMatrix(cb.getComputedStyle("transform"))).f, origX = sv.get(SCROLL_X), origY = sv.get(SCROLL_Y), origHWTransform, dims; // TODO: Is this OK? Just in case it's called 'during' a transition. if (NATIVE_TRANSITIONS) { cb.setStyle(TRANS.DURATION, ZERO); cb.setStyle(TRANS.PROPERTY, EMPTY); } origHWTransform = sv._forceHWTransforms; sv._forceHWTransforms = false; // the z translation was causing issues with picking up accurate scrollWidths in Chrome/Mac. sv._moveTo(cb, 0, 0); dims = { 'offsetWidth': bb.get('offsetWidth'), 'offsetHeight': bb.get('offsetHeight'), 'scrollWidth': bb.get('scrollWidth'), 'scrollHeight': bb.get('scrollHeight') }; sv._moveTo(cb, -(origX), -(origY)); sv._forceHWTransforms = origHWTransform; return dims; }, /** * This method gets invoked whenever the height or width attributes change, * allowing us to determine which scrolling axes need to be enabled. * * @method _uiDimensionsChange * @protected */ _uiDimensionsChange: function () { var sv = this, bb = sv._bb, scrollDims = sv._getScrollDims(), width = scrollDims.offsetWidth, height = scrollDims.offsetHeight, scrollWidth = scrollDims.scrollWidth, scrollHeight = scrollDims.scrollHeight, rtl = sv.rtl, svAxis = sv._cAxis, minScrollX = (rtl ? Math.min(0, -(scrollWidth - width)) : 0), maxScrollX = (rtl ? 0 : Math.max(0, scrollWidth - width)), minScrollY = 0, maxScrollY = Math.max(0, scrollHeight - height); if (svAxis && svAxis.x) { bb.addClass(CLASS_NAMES.horizontal); } if (svAxis && svAxis.y) { bb.addClass(CLASS_NAMES.vertical); } sv._setBounds({ minScrollX: minScrollX, maxScrollX: maxScrollX, minScrollY: minScrollY, maxScrollY: maxScrollY }); }, /** * Set the bounding dimensions of the ScrollView * * @method _setBounds * @protected * @param bounds {Object} [duration] ms of the scroll animation. (default is 0) * @param {Number} [bounds.minScrollX] The minimum scroll X value * @param {Number} [bounds.maxScrollX] The maximum scroll X value * @param {Number} [bounds.minScrollY] The minimum scroll Y value * @param {Number} [bounds.maxScrollY] The maximum scroll Y value */ _setBounds: function (bounds) { var sv = this; // TODO: Do a check to log if the bounds are invalid sv._minScrollX = bounds.minScrollX; sv._maxScrollX = bounds.maxScrollX; sv._minScrollY = bounds.minScrollY; sv._maxScrollY = bounds.maxScrollY; }, /** * Get the bounding dimensions of the ScrollView * * @method _getBounds * @protected */ _getBounds: function () { var sv = this; return { minScrollX: sv._minScrollX, maxScrollX: sv._maxScrollX, minScrollY: sv._minScrollY, maxScrollY: sv._maxScrollY }; }, /** * Scroll the element to a given xy coordinate * * @method scrollTo * @param x {Number} The x-position to scroll to. (null for no movement) * @param y {Number} The y-position to scroll to. (null for no movement) * @param {Number} [duration] ms of the scroll animation. (default is 0) * @param {String} [easing] An easing equation if duration is set. (default is `easing` attribute) * @param {String} [node] The node to transform. Setting this can be useful in * dual-axis paginated instances. (default is the instance's contentBox) */ scrollTo: function (x, y, duration, easing, node) { // Check to see if widget is disabled if (this._cDisabled) { return; } var sv = this, cb = sv._cb, TRANS = ScrollView._TRANSITION, callback = Y.bind(sv._onTransEnd, sv), // @Todo : cache this newX = 0, newY = 0, transition = {}, transform; // default the optional arguments duration = duration || 0; easing = easing || sv.get(EASING); // @TODO: Cache this node = node || cb; if (x !== null) { sv.set(SCROLL_X, x, {src:UI}); newX = -(x); } if (y !== null) { sv.set(SCROLL_Y, y, {src:UI}); newY = -(y); } transform = sv._transform(newX, newY); if (NATIVE_TRANSITIONS) { // ANDROID WORKAROUND - try and stop existing transition, before kicking off new one. node.setStyle(TRANS.DURATION, ZERO).setStyle(TRANS.PROPERTY, EMPTY); } // Move if (duration === 0) { if (NATIVE_TRANSITIONS) { node.setStyle('transform', transform); } else { // TODO: If both set, batch them in the same update // Update: Nope, setStyles() just loops through each property and applies it. if (x !== null) { node.setStyle(LEFT, newX + PX); } if (y !== null) { node.setStyle(TOP, newY + PX); } } } // Animate else { transition.easing = easing; transition.duration = duration / 1000; if (NATIVE_TRANSITIONS) { transition.transform = transform; } else { transition.left = newX + PX; transition.top = newY + PX; } node.transition(transition, callback); } }, /** * Utility method, to create the translate transform string with the * x, y translation amounts provided. * * @method _transform * @param {Number} x Number of pixels to translate along the x axis * @param {Number} y Number of pixels to translate along the y axis * @private */ _transform: function (x, y) { // TODO: Would we be better off using a Matrix for this? var prop = 'translate(' + x + 'px, ' + y + 'px)'; if (this._forceHWTransforms) { prop += ' translateZ(0)'; } return prop; }, /** * Utility method, to move the given element to the given xy position * * @method _moveTo * @param node {Node} The node to move * @param x {Number} The x-position to move to * @param y {Number} The y-position to move to * @private */ _moveTo : function(node, x, y) { if (NATIVE_TRANSITIONS) { node.setStyle('transform', this._transform(x, y)); } else { node.setStyle(LEFT, x + PX); node.setStyle(TOP, y + PX); } }, /** * Content box transition callback * * @method _onTransEnd * @param {EventFacade} e The event facade * @private */ _onTransEnd: function () { var sv = this; // If for some reason we're OOB, snapback if (sv._isOutOfBounds()) { sv._snapBack(); } else { /** * Notification event fired at the end of a scroll transition * * @event scrollEnd * @param e {EventFacade} The default event facade. */ sv.fire(EV_SCROLL_END); } }, /** * gesturemovestart event handler * * @method _onGestureMoveStart * @param e {EventFacade} The gesturemovestart event facade * @private */ _onGestureMoveStart: function (e) { if (this._cDisabled) { return false; } var sv = this, bb = sv._bb, currentX = sv.get(SCROLL_X), currentY = sv.get(SCROLL_Y), clientX = e.clientX, clientY = e.clientY; if (sv._prevent.start) { e.preventDefault(); } // if a flick animation is in progress, cancel it if (sv._flickAnim) { sv._cancelFlick(); sv._onTransEnd(); } // Reset lastScrolledAmt sv.lastScrolledAmt = 0; // Stores data for this gesture cycle. Cleaned up later sv._gesture = { // Will hold the axis value axis: null, // The current attribute values startX: currentX, startY: currentY, // The X/Y coordinates where the event began startClientX: clientX, startClientY: clientY, // The X/Y coordinates where the event will end endClientX: null, endClientY: null, // The current delta of the event deltaX: null, deltaY: null, // Will be populated for flicks flick: null, // Create some listeners for the rest of the gesture cycle onGestureMove: bb.on(DRAG + '|' + GESTURE_MOVE, Y.bind(sv._onGestureMove, sv)), // @TODO: Don't bind gestureMoveEnd if it's a Flick? onGestureMoveEnd: bb.on(DRAG + '|' + GESTURE_MOVE + END, Y.bind(sv._onGestureMoveEnd, sv)) }; }, /** * gesturemove event handler * * @method _onGestureMove * @param e {EventFacade} The gesturemove event facade * @private */ _onGestureMove: function (e) { var sv = this, gesture = sv._gesture, svAxis = sv._cAxis, svAxisX = svAxis.x, svAxisY = svAxis.y, startX = gesture.startX, startY = gesture.startY, startClientX = gesture.startClientX, startClientY = gesture.startClientY, clientX = e.clientX, clientY = e.clientY; if (sv._prevent.move) { e.preventDefault(); } gesture.deltaX = startClientX - clientX; gesture.deltaY = startClientY - clientY; // Determine if this is a vertical or horizontal movement // @TODO: This is crude, but it works. Investigate more intelligent ways to detect intent if (gesture.axis === null) { gesture.axis = (Math.abs(gesture.deltaX) > Math.abs(gesture.deltaY)) ? DIM_X : DIM_Y; } // Move X or Y. @TODO: Move both if dualaxis. if (gesture.axis === DIM_X && svAxisX) { sv.set(SCROLL_X, startX + gesture.deltaX); } else if (gesture.axis === DIM_Y && svAxisY) { sv.set(SCROLL_Y, startY + gesture.deltaY); } }, /** * gesturemoveend event handler * * @method _onGestureMoveEnd * @param e {EventFacade} The gesturemoveend event facade * @private */ _onGestureMoveEnd: function (e) { var sv = this, gesture = sv._gesture, flick = gesture.flick, clientX = e.clientX, clientY = e.clientY, isOOB; if (sv._prevent.end) { e.preventDefault(); } // Store the end X/Y coordinates gesture.endClientX = clientX; gesture.endClientY = clientY; // Cleanup the event handlers gesture.onGestureMove.detach(); gesture.onGestureMoveEnd.detach(); // If this wasn't a flick, wrap up the gesture cycle if (!flick) { // @TODO: Be more intelligent about this. Look at the Flick attribute to see // if it is safe to assume _flick did or didn't fire. // Then, the order _flick and _onGestureMoveEnd fire doesn't matter? // If there was movement (_onGestureMove fired) if (gesture.deltaX !== null && gesture.deltaY !== null) { isOOB = sv._isOutOfBounds(); // If we're out-out-bounds, then snapback if (isOOB) { sv._snapBack(); } // Inbounds else { // Fire scrollEnd unless this is a paginated instance and the gesture axis is the same as paginator's // Not totally confident this is ideal to access a plugin's properties from a host, @TODO revisit if (!sv.pages || (sv.pages && !sv.pages.get(AXIS)[gesture.axis])) { sv._onTransEnd(); } } } } }, /** * Execute a flick at the end of a scroll action * * @method _flick * @param e {EventFacade} The Flick event facade * @private */ _flick: function (e) { if (this._cDisabled) { return false; } var sv = this, svAxis = sv._cAxis, flick = e.flick, flickAxis = flick.axis, flickVelocity = flick.velocity, axisAttr = flickAxis === DIM_X ? SCROLL_X : SCROLL_Y, startPosition = sv.get(axisAttr); // Sometimes flick is enabled, but drag is disabled if (sv._gesture) { sv._gesture.flick = flick; } // Prevent unneccesary firing of _flickFrame if we can't scroll on the flick axis if (svAxis[flickAxis]) { sv._flickFrame(flickVelocity, flickAxis, startPosition); } }, /** * Execute a single frame in the flick animation * * @method _flickFrame * @param velocity {Number} The velocity of this animated frame * @param flickAxis {String} The axis on which to animate * @param startPosition {Number} The starting X/Y point to flick from * @protected */ _flickFrame: function (velocity, flickAxis, startPosition) { var sv = this, axisAttr = flickAxis === DIM_X ? SCROLL_X : SCROLL_Y, bounds = sv._getBounds(), // Localize cached values bounce = sv._cBounce, bounceRange = sv._cBounceRange, deceleration = sv._cDeceleration, frameDuration = sv._cFrameDuration, // Calculate newVelocity = velocity * deceleration, newPosition = startPosition - (frameDuration * newVelocity), // Some convinience conditions min = flickAxis === DIM_X ? bounds.minScrollX : bounds.minScrollY, max = flickAxis === DIM_X ? bounds.maxScrollX : bounds.maxScrollY, belowMin = (newPosition < min), belowMax = (newPosition < max), aboveMin = (newPosition > min), aboveMax = (newPosition > max), belowMinRange = (newPosition < (min - bounceRange)), withinMinRange = (belowMin && (newPosition > (min - bounceRange))), withinMaxRange = (aboveMax && (newPosition < (max + bounceRange))), aboveMaxRange = (newPosition > (max + bounceRange)), tooSlow; // If we're within the range but outside min/max, dampen the velocity if (withinMinRange || withinMaxRange) { newVelocity *= bounce; } // Is the velocity too slow to bother? tooSlow = (Math.abs(newVelocity).toFixed(4) < 0.015); // If the velocity is too slow or we're outside the range if (tooSlow || belowMinRange || aboveMaxRange) { // Cancel and delete sv._flickAnim if (sv._flickAnim) { sv._cancelFlick(); } // If we're inside the scroll area, just end if (aboveMin && belowMax) { sv._onTransEnd(); } // We're outside the scroll area, so we need to snap back else { sv._snapBack(); } } // Otherwise, animate to the next frame else { // @TODO: maybe use requestAnimationFrame instead sv._flickAnim = Y.later(frameDuration, sv, '_flickFrame', [newVelocity, flickAxis, newPosition]); sv.set(axisAttr, newPosition); } }, _cancelFlick: function () { var sv = this; if (sv._flickAnim) { // Cancel the flick (if it exists) sv._flickAnim.cancel(); // Also delete it, otherwise _onGestureMoveStart will think we're still flicking delete sv._flickAnim; } }, /** * Handle mousewheel events on the widget * * @method _mousewheel * @param e {EventFacade} The mousewheel event facade * @private */ _mousewheel: function (e) { var sv = this, scrollY = sv.get(SCROLL_Y), bounds = sv._getBounds(), bb = sv._bb, scrollOffset = 10, // 10px isForward = (e.wheelDelta > 0), scrollToY = scrollY - ((isForward ? 1 : -1) * scrollOffset); scrollToY = _constrain(scrollToY, bounds.minScrollY, bounds.maxScrollY); // Because Mousewheel events fire off 'document', every ScrollView widget will react // to any mousewheel anywhere on the page. This check will ensure that the mouse is currently // over this specific ScrollView. Also, only allow mousewheel scrolling on Y-axis, // becuase otherwise the 'prevent' will block page scrolling. if (bb.contains(e.target) && sv._cAxis[DIM_Y]) { // Reset lastScrolledAmt sv.lastScrolledAmt = 0; // Jump to the new offset sv.set(SCROLL_Y, scrollToY); // if we have scrollbars plugin, update & set the flash timer on the scrollbar // @TODO: This probably shouldn't be in this module if (sv.scrollbars) { // @TODO: The scrollbars should handle this themselves sv.scrollbars._update(); sv.scrollbars.flash(); // or just this // sv.scrollbars._hostDimensionsChange(); } // Fire the 'scrollEnd' event sv._onTransEnd(); // prevent browser default behavior on mouse scroll e.preventDefault(); } }, /** * Checks to see the current scrollX/scrollY position beyond the min/max boundary * * @method _isOutOfBounds * @param x {Number} [optional] The X position to check * @param y {Number} [optional] The Y position to check * @return {Boolean} Whether the current X/Y position is out of bounds (true) or not (false) * @private */ _isOutOfBounds: function (x, y) { var sv = this, svAxis = sv._cAxis, svAxisX = svAxis.x, svAxisY = svAxis.y, currentX = x || sv.get(SCROLL_X), currentY = y || sv.get(SCROLL_Y), bounds = sv._getBounds(), minX = bounds.minScrollX, minY = bounds.minScrollY, maxX = bounds.maxScrollX, maxY = bounds.maxScrollY; return (svAxisX && (currentX < minX || currentX > maxX)) || (svAxisY && (currentY < minY || currentY > maxY)); }, /** * Bounces back * @TODO: Should be more generalized and support both X and Y detection * * @method _snapBack * @private */ _snapBack: function () { var sv = this, currentX = sv.get(SCROLL_X), currentY = sv.get(SCROLL_Y), bounds = sv._getBounds(), minX = bounds.minScrollX, minY = bounds.minScrollY, maxX = bounds.maxScrollX, maxY = bounds.maxScrollY, newY = _constrain(currentY, minY, maxY), newX = _constrain(currentX, minX, maxX), duration = sv.get(SNAP_DURATION), easing = sv.get(SNAP_EASING); if (newX !== currentX) { sv.set(SCROLL_X, newX, {duration:duration, easing:easing}); } else if (newY !== currentY) { sv.set(SCROLL_Y, newY, {duration:duration, easing:easing}); } else { sv._onTransEnd(); } }, /** * After listener for changes to the scrollX or scrollY attribute * * @method _afterScrollChange * @param e {EventFacade} The event facade * @protected */ _afterScrollChange: function (e) { if (e.src === ScrollView.UI_SRC) { return false; } var sv = this, duration = e.duration, easing = e.easing, val = e.newVal, scrollToArgs = []; // Set the scrolled value sv.lastScrolledAmt = sv.lastScrolledAmt + (e.newVal - e.prevVal); // Generate the array of args to pass to scrollTo() if (e.attrName === SCROLL_X) { scrollToArgs.push(val); scrollToArgs.push(sv.get(SCROLL_Y)); } else { scrollToArgs.push(sv.get(SCROLL_X)); scrollToArgs.push(val); } scrollToArgs.push(duration); scrollToArgs.push(easing); sv.scrollTo.apply(sv, scrollToArgs); }, /** * After listener for changes to the flick attribute * * @method _afterFlickChange * @param e {EventFacade} The event facade * @protected */ _afterFlickChange: function (e) { this._bindFlick(e.newVal); }, /** * After listener for changes to the disabled attribute * * @method _afterDisabledChange * @param e {EventFacade} The event facade * @protected */ _afterDisabledChange: function (e) { // Cache for performance - we check during move this._cDisabled = e.newVal; }, /** * After listener for the axis attribute * * @method _afterAxisChange * @param e {EventFacade} The event facade * @protected */ _afterAxisChange: function (e) { this._cAxis = e.newVal; }, /** * After listener for changes to the drag attribute * * @method _afterDragChange * @param e {EventFacade} The event facade * @protected */ _afterDragChange: function (e) { this._bindDrag(e.newVal); }, /** * After listener for the height or width attribute * * @method _afterDimChange * @param e {EventFacade} The event facade * @protected */ _afterDimChange: function () { this._uiDimensionsChange(); }, /** * After listener for scrollEnd, for cleanup * * @method _afterScrollEnd * @param e {EventFacade} The event facade * @protected */ _afterScrollEnd: function () { var sv = this; if (sv._flickAnim) { sv._cancelFlick(); } // Ideally this should be removed, but doing so causing some JS errors with fast swiping // because _gesture is being deleted after the previous one has been overwritten // delete sv._gesture; // TODO: Move to sv.prevGesture? }, /** * Setter for 'axis' attribute * * @method _axisSetter * @param val {Mixed} A string ('x', 'y', 'xy') to specify which axis/axes to allow scrolling on * @param name {String} The attribute name * @return {Object} An object to specify scrollability on the x & y axes * * @protected */ _axisSetter: function (val) { // Turn a string into an axis object if (Y.Lang.isString(val)) { return { x: val.match(/x/i) ? true : false, y: val.match(/y/i) ? true : false }; } }, /** * The scrollX, scrollY setter implementation * * @method _setScroll * @private * @param {Number} val * @param {String} dim * * @return {Number} The value */ _setScroll : function(val) { // Just ensure the widget is not disabled if (this._cDisabled) { val = Y.Attribute.INVALID_VALUE; } return val; }, /** * Setter for the scrollX attribute * * @method _setScrollX * @param val {Number} The new scrollX value * @return {Number} The normalized value * @protected */ _setScrollX: function(val) { return this._setScroll(val, DIM_X); }, /** * Setter for the scrollY ATTR * * @method _setScrollY * @param val {Number} The new scrollY value * @return {Number} The normalized value * @protected */ _setScrollY: function(val) { return this._setScroll(val, DIM_Y); } // End prototype properties }, { // Static properties /** * The identity of the widget. * * @property NAME * @type String * @default 'scrollview' * @readOnly * @protected * @static */ NAME: 'scrollview', /** * Static property used to define the default attribute configuration of * the Widget. * * @property ATTRS * @type {Object} * @protected * @static */ ATTRS: { /** * Specifies ability to scroll on x, y, or x and y axis/axes. * * @attribute axis * @type String */ axis: { setter: '_axisSetter', writeOnce: 'initOnly' }, /** * The current scroll position in the x-axis * * @attribute scrollX * @type Number * @default 0 */ scrollX: { value: 0, setter: '_setScrollX' }, /** * The current scroll position in the y-axis * * @attribute scrollY * @type Number * @default 0 */ scrollY: { value: 0, setter: '_setScrollY' }, /** * Drag coefficent for inertial scrolling. The closer to 1 this * value is, the less friction during scrolling. * * @attribute deceleration * @default 0.93 */ deceleration: { value: 0.93 }, /** * Drag coefficient for intertial scrolling at the upper * and lower boundaries of the scrollview. Set to 0 to * disable "rubber-banding". * * @attribute bounce * @type Number * @default 0.1 */ bounce: { value: 0.1 }, /** * The minimum distance and/or velocity which define a flick. Can be set to false, * to disable flick support (note: drag support is enabled/disabled separately) * * @attribute flick * @type Object * @default Object with properties minDistance = 10, minVelocity = 0.3. */ flick: { value: { minDistance: 10, minVelocity: 0.3 } }, /** * Enable/Disable dragging the ScrollView content (note: flick support is enabled/disabled separately) * @attribute drag * @type boolean * @default true */ drag: { value: true }, /** * The default duration to use when animating the bounce snap back. * * @attribute snapDuration * @type Number * @default 400 */ snapDuration: { value: 400 }, /** * The default easing to use when animating the bounce snap back. * * @attribute snapEasing * @type String * @default 'ease-out' */ snapEasing: { value: 'ease-out' }, /** * The default easing used when animating the flick * * @attribute easing * @type String * @default 'cubic-bezier(0, 0.1, 0, 1.0)' */ easing: { value: 'cubic-bezier(0, 0.1, 0, 1.0)' }, /** * The interval (ms) used when animating the flick for JS-timer animations * * @attribute frameDuration * @type Number * @default 15 */ frameDuration: { value: 15 }, /** * The default bounce distance in pixels * * @attribute bounceRange * @type Number * @default 150 */ bounceRange: { value: 150 } }, /** * List of class names used in the scrollview's DOM * * @property CLASS_NAMES * @type Object * @static */ CLASS_NAMES: CLASS_NAMES, /** * Flag used to source property changes initiated from the DOM * * @property UI_SRC * @type String * @static * @default 'ui' */ UI_SRC: UI, /** * Object map of style property names used to set transition properties. * Defaults to the vendor prefix established by the Transition module. * The configured property names are `_TRANSITION.DURATION` (e.g. "WebkitTransitionDuration") and * `_TRANSITION.PROPERTY (e.g. "WebkitTransitionProperty"). * * @property _TRANSITION * @private */ _TRANSITION: { DURATION: (vendorPrefix ? vendorPrefix + 'TransitionDuration' : 'transitionDuration'), PROPERTY: (vendorPrefix ? vendorPrefix + 'TransitionProperty' : 'transitionProperty') }, /** * The default bounce distance in pixels * * @property BOUNCE_RANGE * @type Number * @static * @default false * @deprecated (in 3.7.0) */ BOUNCE_RANGE: false, /** * The interval (ms) used when animating the flick * * @property FRAME_STEP * @type Number * @static * @default false * @deprecated (in 3.7.0) */ FRAME_STEP: false, /** * The default easing used when animating the flick * * @property EASING * @type String * @static * @default false * @deprecated (in 3.7.0) */ EASING: false, /** * The default easing to use when animating the bounce snap back. * * @property SNAP_EASING * @type String * @static * @default false * @deprecated (in 3.7.0) */ SNAP_EASING: false, /** * The default duration to use when animating the bounce snap back. * * @property SNAP_DURATION * @type Number * @static * @default false * @deprecated (in 3.7.0) */ SNAP_DURATION: false // End static properties }); }, '3.16.0', {"requires": ["widget", "event-gestures", "event-mousewheel", "transition"], "skinnable": true});
src/index.js
wunderg/todo
import 'babel-polyfill'; import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'react-redux'; import { Router, Route, IndexRoute, browserHistory } from 'react-router'; import storeConfig from './store'; import App from './containers/app'; import Home from './containers/home'; import About from './containers/about'; const store = storeConfig(); render( <Provider store={store}> <Router history={browserHistory}> <Route path="/" component={App}> <IndexRoute component={Home} /> <Route path="/about" component={About} /> </Route> </Router> </Provider>, document.getElementById('root') );
ajax/libs/raven.js/3.24.1/angular,ember,require,vue/raven.js
sufuf3/cdnjs
/*! Raven.js 3.22.2 (1b6187b) | github.com/getsentry/raven-js */ /* * Includes TraceKit * https://github.com/getsentry/TraceKit * * Copyright 2018 Matt Robenolt and other contributors * Released under the BSD license * https://github.com/getsentry/raven-js/blob/master/LICENSE * */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global.Raven = factory()); }(this, (function () { 'use strict'; var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; function commonjsRequire () { throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs'); } function createCommonjsModule(fn, module) { return module = { exports: {} }, fn(module, module.exports), module.exports; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; }; } else { _typeof = function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } var _sPO = Object.setPrototypeOf || function _sPO(o, p) { o.__proto__ = p; return o; }; var _construct = typeof Reflect === "object" && Reflect.construct || function _construct(Parent, args, Class) { var Constructor, a = [null]; a.push.apply(a, args); Constructor = Parent.bind.apply(Parent, a); return _sPO(new Constructor(), Class.prototype); }; var _window$3 = typeof window !== 'undefined' ? window : typeof commonjsGlobal !== 'undefined' ? commonjsGlobal : typeof self !== 'undefined' ? self : {}; function isObject$1(what) { return _typeof(what) === 'object' && what !== null; } // Yanked from https://git.io/vS8DV re-used under CC0 // with some tiny modifications function isError$1(value) { switch ({}.toString.call(value)) { case '[object Error]': return true; case '[object Exception]': return true; case '[object DOMException]': return true; default: return value instanceof Error; } } function isErrorEvent$1(value) { return supportsErrorEvent() && {}.toString.call(value) === '[object ErrorEvent]'; } function isUndefined$1(what) { return what === void 0; } function isFunction$1(what) { return typeof what === 'function'; } function isPlainObject(what) { return Object.prototype.toString.call(what) === '[object Object]'; } function isString$1(what) { return Object.prototype.toString.call(what) === '[object String]'; } function isArray$1(what) { return Object.prototype.toString.call(what) === '[object Array]'; } function isEmptyObject$1(what) { if (!isPlainObject(what)) return false; for (var _ in what) { if (what.hasOwnProperty(_)) { return false; } } return true; } function supportsErrorEvent() { try { new ErrorEvent(''); // eslint-disable-line no-new return true; } catch (e) { return false; } } function supportsFetch$1() { if (!('fetch' in _window$3)) return false; try { new Headers(); // eslint-disable-line no-new new Request(''); // eslint-disable-line no-new new Response(); // eslint-disable-line no-new return true; } catch (e) { return false; } } function wrappedCallback(callback) { function dataCallback(data, original) { var normalizedData = callback(data) || data; if (original) { return original(normalizedData) || normalizedData; } return normalizedData; } return dataCallback; } function each$1(obj, callback) { var i, j; if (isUndefined$1(obj.length)) { for (i in obj) { if (hasKey$1(obj, i)) { callback.call(null, i, obj[i]); } } } else { j = obj.length; if (j) { for (i = 0; i < j; i++) { callback.call(null, i, obj[i]); } } } } function objectMerge$1(obj1, obj2) { if (!obj2) { return obj1; } each$1(obj2, function (key, value) { obj1[key] = value; }); return obj1; } /** * This function is only used for react-native. * react-native freezes object that have already been sent over the * js bridge. We need this function in order to check if the object is frozen. * So it's ok that objectFrozen returns false if Object.isFrozen is not * supported because it's not relevant for other "platforms". See related issue: * https://github.com/getsentry/react-native-sentry/issues/57 */ function objectFrozen$1(obj) { if (!Object.isFrozen) { return false; } return Object.isFrozen(obj); } function truncate$1(str, max) { return !max || str.length <= max ? str : str.substr(0, max) + "\u2026"; } /** * hasKey, a better form of hasOwnProperty * Example: hasKey(MainHostObject, property) === true/false * * @param {Object} host object to check property * @param {string} key to check */ function hasKey$1(object, key) { return Object.prototype.hasOwnProperty.call(object, key); } function joinRegExp$1(patterns) { // Combine an array of regular expressions and strings into one large regexp // Be mad. var sources = [], i = 0, len = patterns.length, pattern; for (; i < len; i++) { pattern = patterns[i]; if (isString$1(pattern)) { // If it's a string, we need to escape it // Taken from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions sources.push(pattern.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, '\\$1')); } else if (pattern && pattern.source) { // If it's a regexp already, we want to extract the source sources.push(pattern.source); } // Intentionally skip other cases } return new RegExp(sources.join('|'), 'i'); } function urlencode$1(o) { var pairs = []; each$1(o, function (key, value) { pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(value)); }); return pairs.join('&'); } // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B // intentionally using regex and not <a/> href parsing trick because React Native and other // environments where DOM might not be available function parseUrl$1(url) { if (typeof url !== 'string') return {}; var match = url.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/); // coerce to undefined values to empty string so we don't get 'undefined' var query = match[6] || ''; var fragment = match[8] || ''; return { protocol: match[2], host: match[4], path: match[5], relative: match[5] + query + fragment // everything minus origin }; } function uuid4$1() { var crypto = _window$3.crypto || _window$3.msCrypto; if (!isUndefined$1(crypto) && crypto.getRandomValues) { // Use window.crypto API if available // eslint-disable-next-line no-undef var arr = new Uint16Array(8); crypto.getRandomValues(arr); // set 4 in byte 7 arr[3] = arr[3] & 0xfff | 0x4000; // set 2 most significant bits of byte 9 to '10' arr[4] = arr[4] & 0x3fff | 0x8000; var pad = function pad(num) { var v = num.toString(16); while (v.length < 4) { v = '0' + v; } return v; }; return pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7]); } else { // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523 return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) { var r = Math.random() * 16 | 0, v = c === 'x' ? r : r & 0x3 | 0x8; return v.toString(16); }); } } /** * Given a child DOM element, returns a query-selector statement describing that * and its ancestors * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz] * @param elem * @returns {string} */ function htmlTreeAsString$1(elem) { /* eslint no-extra-parens:0*/ var MAX_TRAVERSE_HEIGHT = 5, MAX_OUTPUT_LEN = 80, out = [], height = 0, len = 0, separator = ' > ', sepLength = separator.length, nextStr; while (elem && height++ < MAX_TRAVERSE_HEIGHT) { nextStr = htmlElementAsString(elem); // bail out if // - nextStr is the 'html' element // - the length of the string that would be created exceeds MAX_OUTPUT_LEN // (ignore this limit if we are on the first iteration) if (nextStr === 'html' || height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN) { break; } out.push(nextStr); len += nextStr.length; elem = elem.parentNode; } return out.reverse().join(separator); } /** * Returns a simple, query-selector representation of a DOM element * e.g. [HTMLElement] => input#foo.btn[name=baz] * @param HTMLElement * @returns {string} */ function htmlElementAsString(elem) { var out = [], className, classes, key, attr, i; if (!elem || !elem.tagName) { return ''; } out.push(elem.tagName.toLowerCase()); if (elem.id) { out.push('#' + elem.id); } className = elem.className; if (className && isString$1(className)) { classes = className.split(/\s+/); for (i = 0; i < classes.length; i++) { out.push('.' + classes[i]); } } var attrWhitelist = ['type', 'name', 'title', 'alt']; for (i = 0; i < attrWhitelist.length; i++) { key = attrWhitelist[i]; attr = elem.getAttribute(key); if (attr) { out.push('[' + key + '="' + attr + '"]'); } } return out.join(''); } /** * Returns true if either a OR b is truthy, but not both */ function isOnlyOneTruthy(a, b) { return !!(!!a ^ !!b); } /** * Returns true if both parameters are undefined */ function isBothUndefined(a, b) { return isUndefined$1(a) && isUndefined$1(b); } /** * Returns true if the two input exception interfaces have the same content */ function isSameException$1(ex1, ex2) { if (isOnlyOneTruthy(ex1, ex2)) return false; ex1 = ex1.values[0]; ex2 = ex2.values[0]; if (ex1.type !== ex2.type || ex1.value !== ex2.value) return false; // in case both stacktraces are undefined, we can't decide so default to false if (isBothUndefined(ex1.stacktrace, ex2.stacktrace)) return false; return isSameStacktrace$1(ex1.stacktrace, ex2.stacktrace); } /** * Returns true if the two input stack trace interfaces have the same content */ function isSameStacktrace$1(stack1, stack2) { if (isOnlyOneTruthy(stack1, stack2)) return false; var frames1 = stack1.frames; var frames2 = stack2.frames; // Exit early if frame count differs if (frames1.length !== frames2.length) return false; // Iterate through every frame; bail out if anything differs var a, b; for (var i = 0; i < frames1.length; i++) { a = frames1[i]; b = frames2[i]; if (a.filename !== b.filename || a.lineno !== b.lineno || a.colno !== b.colno || a['function'] !== b['function']) return false; } return true; } /** * Polyfill a method * @param obj object e.g. `document` * @param name method name present on object e.g. `addEventListener` * @param replacement replacement function * @param track {optional} record instrumentation to an array */ function fill$1(obj, name, replacement, track) { var orig = obj[name]; obj[name] = replacement(orig); obj[name].__raven__ = true; obj[name].__orig__ = orig; if (track) { track.push([obj, name, orig]); } } /** * Join values in array * @param input array of values to be joined together * @param delimiter string to be placed in-between values * @returns {string} */ function safeJoin(input, delimiter) { if (!isArray$1(input)) return ''; var output = []; for (var i = 0; i < input.length; i++) { try { output.push(String(input[i])); } catch (e) { output.push('[value cannot be serialized]'); } } return output.join(delimiter); } var utils = { isObject: isObject$1, isError: isError$1, isErrorEvent: isErrorEvent$1, isUndefined: isUndefined$1, isFunction: isFunction$1, isPlainObject: isPlainObject, isString: isString$1, isArray: isArray$1, isEmptyObject: isEmptyObject$1, supportsErrorEvent: supportsErrorEvent, supportsFetch: supportsFetch$1, wrappedCallback: wrappedCallback, each: each$1, objectMerge: objectMerge$1, truncate: truncate$1, objectFrozen: objectFrozen$1, hasKey: hasKey$1, joinRegExp: joinRegExp$1, urlencode: urlencode$1, uuid4: uuid4$1, htmlTreeAsString: htmlTreeAsString$1, htmlElementAsString: htmlElementAsString, isSameException: isSameException$1, isSameStacktrace: isSameStacktrace$1, parseUrl: parseUrl$1, fill: fill$1, safeJoin: safeJoin }; /* TraceKit - Cross brower stack traces This was originally forked from github.com/occ/TraceKit, but has since been largely re-written and is now maintained as part of raven-js. Tests for this are in test/vendor. MIT license */ var TraceKit = { collectWindowErrors: true, debug: false }; // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785) var _window$2 = typeof window !== 'undefined' ? window : typeof commonjsGlobal !== 'undefined' ? commonjsGlobal : typeof self !== 'undefined' ? self : {}; // global reference to slice var _slice = [].slice; var UNKNOWN_FUNCTION = '?'; // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/; function getLocationHref() { if (typeof document === 'undefined' || document.location == null) return ''; return document.location.href; } /** * TraceKit.report: cross-browser processing of unhandled exceptions * * Syntax: * TraceKit.report.subscribe(function(stackInfo) { ... }) * TraceKit.report.unsubscribe(function(stackInfo) { ... }) * TraceKit.report(exception) * try { ...code... } catch(ex) { TraceKit.report(ex); } * * Supports: * - Firefox: full stack trace with line numbers, plus column number * on top frame; column number is not guaranteed * - Opera: full stack trace with line and column numbers * - Chrome: full stack trace with line and column numbers * - Safari: line and column number for the top frame only; some frames * may be missing, and column number is not guaranteed * - IE: line and column number for the top frame only; some frames * may be missing, and column number is not guaranteed * * In theory, TraceKit should work on all of the following versions: * - IE5.5+ (only 8.0 tested) * - Firefox 0.9+ (only 3.5+ tested) * - Opera 7+ (only 10.50 tested; versions 9 and earlier may require * Exceptions Have Stacktrace to be enabled in opera:config) * - Safari 3+ (only 4+ tested) * - Chrome 1+ (only 5+ tested) * - Konqueror 3.5+ (untested) * * Requires TraceKit.computeStackTrace. * * Tries to catch all unhandled exceptions and report them to the * subscribed handlers. Please note that TraceKit.report will rethrow the * exception. This is REQUIRED in order to get a useful stack trace in IE. * If the exception does not reach the top of the browser, you will only * get a stack trace from the point where TraceKit.report was called. * * Handlers receive a stackInfo object as described in the * TraceKit.computeStackTrace docs. */ TraceKit.report = function reportModuleWrapper() { var handlers = [], lastArgs = null, lastException = null, lastExceptionStack = null; /** * Add a crash handler. * @param {Function} handler */ function subscribe(handler) { installGlobalHandler(); handlers.push(handler); } /** * Remove a crash handler. * @param {Function} handler */ function unsubscribe(handler) { for (var i = handlers.length - 1; i >= 0; --i) { if (handlers[i] === handler) { handlers.splice(i, 1); } } } /** * Remove all crash handlers. */ function unsubscribeAll() { uninstallGlobalHandler(); handlers = []; } /** * Dispatch stack information to all handlers. * @param {Object.<string, *>} stack */ function notifyHandlers(stack, isWindowError) { var exception = null; if (isWindowError && !TraceKit.collectWindowErrors) { return; } for (var i in handlers) { if (handlers.hasOwnProperty(i)) { try { handlers[i].apply(null, [stack].concat(_slice.call(arguments, 2))); } catch (inner) { exception = inner; } } } if (exception) { throw exception; } } var _oldOnerrorHandler, _onErrorHandlerInstalled; /** * Ensures all global unhandled exceptions are recorded. * Supported by Gecko and IE. * @param {string} msg Error message. * @param {string} url URL of script that generated the exception. * @param {(number|string)} lineNo The line number at which the error * occurred. * @param {?(number|string)} colNo The column number at which the error * occurred. * @param {?Error} ex The actual Error object. */ function traceKitWindowOnError(msg, url, lineNo, colNo, ex) { var stack = null; // If 'ex' is ErrorEvent, get real Error from inside var exception = utils.isErrorEvent(ex) ? ex.error : ex; // If 'msg' is ErrorEvent, get real message from inside var message = utils.isErrorEvent(msg) ? msg.message : msg; if (lastExceptionStack) { TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(lastExceptionStack, url, lineNo, message); processLastException(); } else if (exception && utils.isError(exception)) { // non-string `exception` arg; attempt to extract stack trace // New chrome and blink send along a real error object // Let's just report that like a normal error. // See: https://mikewest.org/2013/08/debugging-runtime-errors-with-window-onerror stack = TraceKit.computeStackTrace(exception); notifyHandlers(stack, true); } else { var location = { url: url, line: lineNo, column: colNo }; var name = undefined; var groups; if ({}.toString.call(message) === '[object String]') { var groups = message.match(ERROR_TYPES_RE); if (groups) { name = groups[1]; message = groups[2]; } } location.func = UNKNOWN_FUNCTION; stack = { name: name, message: message, url: getLocationHref(), stack: [location] }; notifyHandlers(stack, true); } if (_oldOnerrorHandler) { return _oldOnerrorHandler.apply(this, arguments); } return false; } function installGlobalHandler() { if (_onErrorHandlerInstalled) { return; } _oldOnerrorHandler = _window$2.onerror; _window$2.onerror = traceKitWindowOnError; _onErrorHandlerInstalled = true; } function uninstallGlobalHandler() { if (!_onErrorHandlerInstalled) { return; } _window$2.onerror = _oldOnerrorHandler; _onErrorHandlerInstalled = false; _oldOnerrorHandler = undefined; } function processLastException() { var _lastExceptionStack = lastExceptionStack, _lastArgs = lastArgs; lastArgs = null; lastExceptionStack = null; lastException = null; notifyHandlers.apply(null, [_lastExceptionStack, false].concat(_lastArgs)); } /** * Reports an unhandled Error to TraceKit. * @param {Error} ex * @param {?boolean} rethrow If false, do not re-throw the exception. * Only used for window.onerror to not cause an infinite loop of * rethrowing. */ function report(ex, rethrow) { var args = _slice.call(arguments, 1); if (lastExceptionStack) { if (lastException === ex) { return; // already caught by an inner catch block, ignore } else { processLastException(); } } var stack = TraceKit.computeStackTrace(ex); lastExceptionStack = stack; lastException = ex; lastArgs = args; // If the stack trace is incomplete, wait for 2 seconds for // slow slow IE to see if onerror occurs or not before reporting // this exception; otherwise, we will end up with an incomplete // stack trace setTimeout(function () { if (lastException === ex) { processLastException(); } }, stack.incomplete ? 2000 : 0); if (rethrow !== false) { throw ex; // re-throw to propagate to the top level (and cause window.onerror) } } report.subscribe = subscribe; report.unsubscribe = unsubscribe; report.uninstall = unsubscribeAll; return report; }(); /** * TraceKit.computeStackTrace: cross-browser stack traces in JavaScript * * Syntax: * s = TraceKit.computeStackTrace(exception) // consider using TraceKit.report instead (see below) * Returns: * s.name - exception name * s.message - exception message * s.stack[i].url - JavaScript or HTML file URL * s.stack[i].func - function name, or empty for anonymous functions (if guessing did not work) * s.stack[i].args - arguments passed to the function, if known * s.stack[i].line - line number, if known * s.stack[i].column - column number, if known * * Supports: * - Firefox: full stack trace with line numbers and unreliable column * number on top frame * - Opera 10: full stack trace with line and column numbers * - Opera 9-: full stack trace with line numbers * - Chrome: full stack trace with line and column numbers * - Safari: line and column number for the topmost stacktrace element * only * - IE: no line numbers whatsoever * * Tries to guess names of anonymous functions by looking for assignments * in the source code. In IE and Safari, we have to guess source file names * by searching for function bodies inside all page scripts. This will not * work for scripts that are loaded cross-domain. * Here be dragons: some function names may be guessed incorrectly, and * duplicate functions may be mismatched. * * TraceKit.computeStackTrace should only be used for tracing purposes. * Logging of unhandled exceptions should be done with TraceKit.report, * which builds on top of TraceKit.computeStackTrace and provides better * IE support by utilizing the window.onerror event to retrieve information * about the top of the stack. * * Note: In IE and Safari, no stack trace is recorded on the Error object, * so computeStackTrace instead walks its *own* chain of callers. * This means that: * * in Safari, some methods may be missing from the stack trace; * * in IE, the topmost function in the stack trace will always be the * caller of computeStackTrace. * * This is okay for tracing (because you are likely to be calling * computeStackTrace from the function you want to be the topmost element * of the stack trace anyway), but not okay for logging unhandled * exceptions (because your catch block will likely be far away from the * inner function that actually caused the exception). * */ TraceKit.computeStackTrace = function computeStackTraceWrapper() { // Contents of Exception in various browsers. // // SAFARI: // ex.message = Can't find variable: qq // ex.line = 59 // ex.sourceId = 580238192 // ex.sourceURL = http://... // ex.expressionBeginOffset = 96 // ex.expressionCaretOffset = 98 // ex.expressionEndOffset = 98 // ex.name = ReferenceError // // FIREFOX: // ex.message = qq is not defined // ex.fileName = http://... // ex.lineNumber = 59 // ex.columnNumber = 69 // ex.stack = ...stack trace... (see the example below) // ex.name = ReferenceError // // CHROME: // ex.message = qq is not defined // ex.name = ReferenceError // ex.type = not_defined // ex.arguments = ['aa'] // ex.stack = ...stack trace... // // INTERNET EXPLORER: // ex.message = ... // ex.name = ReferenceError // // OPERA: // ex.message = ...message... (see the example below) // ex.name = ReferenceError // ex.opera#sourceloc = 11 (pretty much useless, duplicates the info in ex.message) // ex.stacktrace = n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace' /** * Computes stack trace information from the stack property. * Chrome and Gecko use this property. * @param {Error} ex * @return {?Object.<string, *>} Stack trace information. */ function computeStackTraceFromStackProp(ex) { if (typeof ex.stack === 'undefined' || !ex.stack) return; var chrome = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i, winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx(?:-web)|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i, // Used to additionally parse URL/line/column from eval frames geckoEval = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i, chromeEval = /\((\S*)(?::(\d+))(?::(\d+))\)/, lines = ex.stack.split('\n'), stack = [], submatch, parts, element, reference = /^(.*) is undefined$/.exec(ex.message); for (var i = 0, j = lines.length; i < j; ++i) { if (parts = chrome.exec(lines[i])) { var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line if (isEval && (submatch = chromeEval.exec(parts[2]))) { // throw out eval line/column and use top-most line/column number parts[2] = submatch[1]; // url parts[3] = submatch[2]; // line parts[4] = submatch[3]; // column } element = { url: !isNative ? parts[2] : null, func: parts[1] || UNKNOWN_FUNCTION, args: isNative ? [parts[2]] : [], line: parts[3] ? +parts[3] : null, column: parts[4] ? +parts[4] : null }; } else if (parts = winjs.exec(lines[i])) { element = { url: parts[2], func: parts[1] || UNKNOWN_FUNCTION, args: [], line: +parts[3], column: parts[4] ? +parts[4] : null }; } else if (parts = gecko.exec(lines[i])) { var isEval = parts[3] && parts[3].indexOf(' > eval') > -1; if (isEval && (submatch = geckoEval.exec(parts[3]))) { // throw out eval line/column and use top-most line number parts[3] = submatch[1]; parts[4] = submatch[2]; parts[5] = null; // no column when eval } else if (i === 0 && !parts[5] && typeof ex.columnNumber !== 'undefined') { // FireFox uses this awesome columnNumber property for its top frame // Also note, Firefox's column number is 0-based and everything else expects 1-based, // so adding 1 // NOTE: this hack doesn't work if top-most frame is eval stack[0].column = ex.columnNumber + 1; } element = { url: parts[3], func: parts[1] || UNKNOWN_FUNCTION, args: parts[2] ? parts[2].split(',') : [], line: parts[4] ? +parts[4] : null, column: parts[5] ? +parts[5] : null }; } else { continue; } if (!element.func && element.line) { element.func = UNKNOWN_FUNCTION; } stack.push(element); } if (!stack.length) { return null; } return { name: ex.name, message: ex.message, url: getLocationHref(), stack: stack }; } /** * Adds information about the first frame to incomplete stack traces. * Safari and IE require this to get complete data on the first frame. * @param {Object.<string, *>} stackInfo Stack trace information from * one of the compute* methods. * @param {string} url The URL of the script that caused an error. * @param {(number|string)} lineNo The line number of the script that * caused an error. * @param {string=} message The error generated by the browser, which * hopefully contains the name of the object that caused the error. * @return {boolean} Whether or not the stack information was * augmented. */ function augmentStackTraceWithInitialElement(stackInfo, url, lineNo, message) { var initial = { url: url, line: lineNo }; if (initial.url && initial.line) { stackInfo.incomplete = false; if (!initial.func) { initial.func = UNKNOWN_FUNCTION; } if (stackInfo.stack.length > 0) { if (stackInfo.stack[0].url === initial.url) { if (stackInfo.stack[0].line === initial.line) { return false; // already in stack trace } else if (!stackInfo.stack[0].line && stackInfo.stack[0].func === initial.func) { stackInfo.stack[0].line = initial.line; return false; } } } stackInfo.stack.unshift(initial); stackInfo.partial = true; return true; } else { stackInfo.incomplete = true; } return false; } /** * Computes stack trace information by walking the arguments.caller * chain at the time the exception occurred. This will cause earlier * frames to be missed but is the only way to get any stack trace in * Safari and IE. The top frame is restored by * {@link augmentStackTraceWithInitialElement}. * @param {Error} ex * @return {?Object.<string, *>} Stack trace information. */ function computeStackTraceByWalkingCallerChain(ex, depth) { var functionName = /function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i, stack = [], funcs = {}, recursion = false, parts, item; for (var curr = computeStackTraceByWalkingCallerChain.caller; curr && !recursion; curr = curr.caller) { if (curr === computeStackTrace || curr === TraceKit.report) { // console.log('skipping internal function'); continue; } item = { url: null, func: UNKNOWN_FUNCTION, line: null, column: null }; if (curr.name) { item.func = curr.name; } else if (parts = functionName.exec(curr.toString())) { item.func = parts[1]; } if (typeof item.func === 'undefined') { try { item.func = parts.input.substring(0, parts.input.indexOf('{')); } catch (e) {} } if (funcs['' + curr]) { recursion = true; } else { funcs['' + curr] = true; } stack.push(item); } if (depth) { // console.log('depth is ' + depth); // console.log('stack is ' + stack.length); stack.splice(0, depth); } var result = { name: ex.name, message: ex.message, url: getLocationHref(), stack: stack }; augmentStackTraceWithInitialElement(result, ex.sourceURL || ex.fileName, ex.line || ex.lineNumber, ex.message || ex.description); return result; } /** * Computes a stack trace for an exception. * @param {Error} ex * @param {(string|number)=} depth */ function computeStackTrace(ex, depth) { var stack = null; depth = depth == null ? 0 : +depth; try { stack = computeStackTraceFromStackProp(ex); if (stack) { return stack; } } catch (e) { if (TraceKit.debug) { throw e; } } try { stack = computeStackTraceByWalkingCallerChain(ex, depth + 1); if (stack) { return stack; } } catch (e) { if (TraceKit.debug) { throw e; } } return { name: ex.name, message: ex.message, url: getLocationHref() }; } computeStackTrace.augmentStackTraceWithInitialElement = augmentStackTraceWithInitialElement; computeStackTrace.computeStackTraceFromStackProp = computeStackTraceFromStackProp; return computeStackTrace; }(); var tracekit = TraceKit; var stringify_1 = createCommonjsModule(function (module, exports) { /* json-stringify-safe Like JSON.stringify, but doesn't throw on circular references. Originally forked from https://github.com/isaacs/json-stringify-safe version 5.0.1 on 3/8/2017 and modified to handle Errors serialization and IE8 compatibility. Tests for this are in test/vendor. ISC license: https://github.com/isaacs/json-stringify-safe/blob/master/LICENSE */ exports = module.exports = stringify; exports.getSerialize = serializer; function indexOf(haystack, needle) { for (var i = 0; i < haystack.length; ++i) { if (haystack[i] === needle) return i; } return -1; } function stringify(obj, replacer, spaces, cycleReplacer) { return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces); } // https://github.com/ftlabs/js-abbreviate/blob/fa709e5f139e7770a71827b1893f22418097fbda/index.js#L95-L106 function stringifyError(value) { var err = { // These properties are implemented as magical getters and don't show up in for in stack: value.stack, message: value.message, name: value.name }; for (var i in value) { if (Object.prototype.hasOwnProperty.call(value, i)) { err[i] = value[i]; } } return err; } function serializer(replacer, cycleReplacer) { var stack = []; var keys = []; if (cycleReplacer == null) { cycleReplacer = function cycleReplacer(key, value) { if (stack[0] === value) { return '[Circular ~]'; } return '[Circular ~.' + keys.slice(0, indexOf(stack, value)).join('.') + ']'; }; } return function (key, value) { if (stack.length > 0) { var thisPos = indexOf(stack, this); ~thisPos ? stack.splice(thisPos + 1) : stack.push(this); ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key); if (~indexOf(stack, value)) { value = cycleReplacer.call(this, key, value); } } else { stack.push(value); } return replacer == null ? value instanceof Error ? stringifyError(value) : value : replacer.call(this, key, value); }; } }); var stringify_2 = stringify_1.getSerialize; function RavenConfigError(message) { this.name = 'RavenConfigError'; this.message = message; } RavenConfigError.prototype = new Error(); RavenConfigError.prototype.constructor = RavenConfigError; var configError = RavenConfigError; var wrapMethod = function wrapMethod(console, level, callback) { var originalConsoleLevel = console[level]; var originalConsole = console; if (!(level in console)) { return; } var sentryLevel = level === 'warn' ? 'warning' : level; console[level] = function () { var args = [].slice.call(arguments); var msg = utils.safeJoin(args, ' '); var data = { level: sentryLevel, logger: 'console', extra: { arguments: args } }; if (level === 'assert') { if (args[0] === false) { // Default browsers message msg = 'Assertion failed: ' + (utils.safeJoin(args.slice(1), ' ') || 'console.assert'); data.extra.arguments = args.slice(1); callback && callback(msg, data); } } else { callback && callback(msg, data); } // this fails for some browsers. :( if (originalConsoleLevel) { // IE9 doesn't allow calling apply on console functions directly // See: https://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function#answer-5473193 Function.prototype.apply.call(originalConsoleLevel, originalConsole, args); } }; }; var console$1 = { wrapMethod: wrapMethod }; /*global XDomainRequest:false */ var isError = utils.isError; var isObject = utils.isObject; var isErrorEvent = utils.isErrorEvent; var isUndefined = utils.isUndefined; var isFunction = utils.isFunction; var isString = utils.isString; var isArray = utils.isArray; var isEmptyObject = utils.isEmptyObject; var each = utils.each; var objectMerge = utils.objectMerge; var truncate = utils.truncate; var objectFrozen = utils.objectFrozen; var hasKey = utils.hasKey; var joinRegExp = utils.joinRegExp; var urlencode = utils.urlencode; var uuid4 = utils.uuid4; var htmlTreeAsString = utils.htmlTreeAsString; var isSameException = utils.isSameException; var isSameStacktrace = utils.isSameStacktrace; var parseUrl = utils.parseUrl; var fill = utils.fill; var supportsFetch = utils.supportsFetch; var wrapConsoleMethod = console$1.wrapMethod; var dsnKeys = 'source protocol user pass host port path'.split(' '); var dsnPattern = /^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/; function now() { return +new Date(); } // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785) var _window$1 = typeof window !== 'undefined' ? window : typeof commonjsGlobal !== 'undefined' ? commonjsGlobal : typeof self !== 'undefined' ? self : {}; var _document = _window$1.document; var _navigator = _window$1.navigator; function keepOriginalCallback(original, callback) { return isFunction(callback) ? function (data) { return callback(data, original); } : callback; } // First, check for JSON support // If there is no JSON, we no-op the core features of Raven // since JSON is required to encode the payload function Raven$1() { this._hasJSON = !!(_typeof(JSON) === 'object' && JSON.stringify); // Raven can run in contexts where there's no document (react-native) this._hasDocument = !isUndefined(_document); this._hasNavigator = !isUndefined(_navigator); this._lastCapturedException = null; this._lastData = null; this._lastEventId = null; this._globalServer = null; this._globalKey = null; this._globalProject = null; this._globalContext = {}; this._globalOptions = { // SENTRY_RELEASE can be injected by https://github.com/getsentry/sentry-webpack-plugin release: _window$1.SENTRY_RELEASE && _window$1.SENTRY_RELEASE.id, logger: 'javascript', ignoreErrors: [], ignoreUrls: [], whitelistUrls: [], includePaths: [], headers: null, collectWindowErrors: true, maxMessageLength: 0, // By default, truncates URL values to 250 chars maxUrlLength: 250, stackTraceLimit: 50, autoBreadcrumbs: true, instrument: true, sampleRate: 1 }; this._fetchDefaults = { method: 'POST', keepalive: true, referrerPolicy: 'origin' }; this._ignoreOnError = 0; this._isRavenInstalled = false; this._originalErrorStackTraceLimit = Error.stackTraceLimit; // capture references to window.console *and* all its methods first // before the console plugin has a chance to monkey patch this._originalConsole = _window$1.console || {}; this._originalConsoleMethods = {}; this._plugins = []; this._startTime = now(); this._wrappedBuiltIns = []; this._breadcrumbs = []; this._lastCapturedEvent = null; this._keypressTimeout; this._location = _window$1.location; this._lastHref = this._location && this._location.href; this._resetBackoff(); // eslint-disable-next-line guard-for-in for (var method in this._originalConsole) { this._originalConsoleMethods[method] = this._originalConsole[method]; } } /* * The core Raven singleton * * @this {Raven} */ Raven$1.prototype = { // Hardcode version string so that raven source can be loaded directly via // webpack (using a build step causes webpack #1617). Grunt verifies that // this value matches package.json during build. // See: https://github.com/getsentry/raven-js/issues/465 VERSION: '3.22.2', debug: false, TraceKit: tracekit, // alias to TraceKit /* * Configure Raven with a DSN and extra options * * @param {string} dsn The public Sentry DSN * @param {object} options Set of global options [optional] * @return {Raven} */ config: function config(dsn, options) { var self = this; if (self._globalServer) { this._logDebug('error', 'Error: Raven has already been configured'); return self; } if (!dsn) return self; var globalOptions = self._globalOptions; // merge in options if (options) { each(options, function (key, value) { // tags and extra are special and need to be put into context if (key === 'tags' || key === 'extra' || key === 'user') { self._globalContext[key] = value; } else { globalOptions[key] = value; } }); } self.setDSN(dsn); // "Script error." is hard coded into browsers for errors that it can't read. // this is the result of a script being pulled in from an external domain and CORS. globalOptions.ignoreErrors.push(/^Script error\.?$/); globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/); // join regexp rules into one big rule globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors); globalOptions.ignoreUrls = globalOptions.ignoreUrls.length ? joinRegExp(globalOptions.ignoreUrls) : false; globalOptions.whitelistUrls = globalOptions.whitelistUrls.length ? joinRegExp(globalOptions.whitelistUrls) : false; globalOptions.includePaths = joinRegExp(globalOptions.includePaths); globalOptions.maxBreadcrumbs = Math.max(0, Math.min(globalOptions.maxBreadcrumbs || 100, 100)); // default and hard limit is 100 var autoBreadcrumbDefaults = { xhr: true, console: true, dom: true, location: true, sentry: true }; var autoBreadcrumbs = globalOptions.autoBreadcrumbs; if ({}.toString.call(autoBreadcrumbs) === '[object Object]') { autoBreadcrumbs = objectMerge(autoBreadcrumbDefaults, autoBreadcrumbs); } else if (autoBreadcrumbs !== false) { autoBreadcrumbs = autoBreadcrumbDefaults; } globalOptions.autoBreadcrumbs = autoBreadcrumbs; var instrumentDefaults = { tryCatch: true }; var instrument = globalOptions.instrument; if ({}.toString.call(instrument) === '[object Object]') { instrument = objectMerge(instrumentDefaults, instrument); } else if (instrument !== false) { instrument = instrumentDefaults; } globalOptions.instrument = instrument; tracekit.collectWindowErrors = !!globalOptions.collectWindowErrors; // return for chaining return self; }, /* * Installs a global window.onerror error handler * to capture and report uncaught exceptions. * At this point, install() is required to be called due * to the way TraceKit is set up. * * @return {Raven} */ install: function install() { var self = this; if (self.isSetup() && !self._isRavenInstalled) { tracekit.report.subscribe(function () { self._handleOnErrorStackInfo.apply(self, arguments); }); self._patchFunctionToString(); if (self._globalOptions.instrument && self._globalOptions.instrument.tryCatch) { self._instrumentTryCatch(); } if (self._globalOptions.autoBreadcrumbs) self._instrumentBreadcrumbs(); // Install all of the plugins self._drainPlugins(); self._isRavenInstalled = true; } Error.stackTraceLimit = self._globalOptions.stackTraceLimit; return this; }, /* * Set the DSN (can be called multiple time unlike config) * * @param {string} dsn The public Sentry DSN */ setDSN: function setDSN(dsn) { var self = this, uri = self._parseDSN(dsn), lastSlash = uri.path.lastIndexOf('/'), path = uri.path.substr(1, lastSlash); self._dsn = dsn; self._globalKey = uri.user; self._globalSecret = uri.pass && uri.pass.substr(1); self._globalProject = uri.path.substr(lastSlash + 1); self._globalServer = self._getGlobalServer(uri); self._globalEndpoint = self._globalServer + '/' + path + 'api/' + self._globalProject + '/store/'; // Reset backoff state since we may be pointing at a // new project/server this._resetBackoff(); }, /* * Wrap code within a context so Raven can capture errors * reliably across domains that is executed immediately. * * @param {object} options A specific set of options for this context [optional] * @param {function} func The callback to be immediately executed within the context * @param {array} args An array of arguments to be called with the callback [optional] */ context: function context(options, func, args) { if (isFunction(options)) { args = func || []; func = options; options = undefined; } return this.wrap(options, func).apply(this, args); }, /* * Wrap code within a context and returns back a new function to be executed * * @param {object} options A specific set of options for this context [optional] * @param {function} func The function to be wrapped in a new context * @param {function} func A function to call before the try/catch wrapper [optional, private] * @return {function} The newly wrapped functions with a context */ wrap: function wrap(options, func, _before) { var self = this; // 1 argument has been passed, and it's not a function // so just return it if (isUndefined(func) && !isFunction(options)) { return options; } // options is optional if (isFunction(options)) { func = options; options = undefined; } // At this point, we've passed along 2 arguments, and the second one // is not a function either, so we'll just return the second argument. if (!isFunction(func)) { return func; } // We don't wanna wrap it twice! try { if (func.__raven__) { return func; } // If this has already been wrapped in the past, return that if (func.__raven_wrapper__) { return func.__raven_wrapper__; } } catch (e) { // Just accessing custom props in some Selenium environments // can cause a "Permission denied" exception (see raven-js#495). // Bail on wrapping and return the function as-is (defers to window.onerror). return func; } function wrapped() { var args = [], i = arguments.length, deep = !options || options && options.deep !== false; if (_before && isFunction(_before)) { _before.apply(this, arguments); } // Recursively wrap all of a function's arguments that are // functions themselves. while (i--) { args[i] = deep ? self.wrap(options, arguments[i]) : arguments[i]; } try { // Attempt to invoke user-land function // NOTE: If you are a Sentry user, and you are seeing this stack frame, it // means Raven caught an error invoking your application code. This is // expected behavior and NOT indicative of a bug with Raven.js. return func.apply(this, args); } catch (e) { self._ignoreNextOnError(); self.captureException(e, options); throw e; } } // copy over properties of the old function for (var property in func) { if (hasKey(func, property)) { wrapped[property] = func[property]; } } wrapped.prototype = func.prototype; func.__raven_wrapper__ = wrapped; // Signal that this function has been wrapped/filled already // for both debugging and to prevent it to being wrapped/filled twice wrapped.__raven__ = true; wrapped.__orig__ = func; return wrapped; }, /* * Uninstalls the global error handler. * * @return {Raven} */ uninstall: function uninstall() { tracekit.report.uninstall(); this._unpatchFunctionToString(); this._restoreBuiltIns(); this._restoreConsole(); Error.stackTraceLimit = this._originalErrorStackTraceLimit; this._isRavenInstalled = false; return this; }, /* * Manually capture an exception and send it over to Sentry * * @param {error} ex An exception to be logged * @param {object} options A specific set of options for this error [optional] * @return {Raven} */ captureException: function captureException(ex, options) { options = objectMerge({ trimHeadFrames: 0 }, options ? options : {}); // Cases for sending ex as a message, rather than an exception var isNotError = !isError(ex); var isNotErrorEvent = !isErrorEvent(ex); var isErrorEventWithoutError = isErrorEvent(ex) && !ex.error; if (isNotError && isNotErrorEvent || isErrorEventWithoutError) { return this.captureMessage(ex, objectMerge(options, { stacktrace: true, // if we fall back to captureMessage, default to attempting a new trace trimHeadFrames: options.trimHeadFrames + 1 })); } // Get actual Error from ErrorEvent if (isErrorEvent(ex)) ex = ex.error; // Store the raw exception object for potential debugging and introspection this._lastCapturedException = ex; // TraceKit.report will re-raise any exception passed to it, // which means you have to wrap it in try/catch. Instead, we // can wrap it here and only re-raise if TraceKit.report // raises an exception different from the one we asked to // report on. try { var stack = tracekit.computeStackTrace(ex); this._handleStackInfo(stack, options); } catch (ex1) { if (ex !== ex1) { throw ex1; } } return this; }, /* * Manually send a message to Sentry * * @param {string} msg A plain message to be captured in Sentry * @param {object} options A specific set of options for this message [optional] * @return {Raven} */ captureMessage: function captureMessage(msg, options) { // config() automagically converts ignoreErrors from a list to a RegExp so we need to test for an // early call; we'll error on the side of logging anything called before configuration since it's // probably something you should see: if (!!this._globalOptions.ignoreErrors.test && this._globalOptions.ignoreErrors.test(msg)) { return; } options = options || {}; var data = objectMerge({ message: msg + '' // Make sure it's actually a string }, options); var ex; // Generate a "synthetic" stack trace from this point. // NOTE: If you are a Sentry user, and you are seeing this stack frame, it is NOT indicative // of a bug with Raven.js. Sentry generates synthetic traces either by configuration, // or if it catches a thrown object without a "stack" property. try { throw new Error(msg); } catch (ex1) { ex = ex1; } // null exception name so `Error` isn't prefixed to msg ex.name = null; var stack = tracekit.computeStackTrace(ex); // stack[0] is `throw new Error(msg)` call itself, we are interested in the frame that was just before that, stack[1] var initialCall = isArray(stack.stack) && stack.stack[1]; var fileurl = initialCall && initialCall.url || ''; if (!!this._globalOptions.ignoreUrls.test && this._globalOptions.ignoreUrls.test(fileurl)) { return; } if (!!this._globalOptions.whitelistUrls.test && !this._globalOptions.whitelistUrls.test(fileurl)) { return; } if (this._globalOptions.stacktrace || options && options.stacktrace) { options = objectMerge({ // fingerprint on msg, not stack trace (legacy behavior, could be // revisited) fingerprint: msg, // since we know this is a synthetic trace, the top N-most frames // MUST be from Raven.js, so mark them as in_app later by setting // trimHeadFrames trimHeadFrames: (options.trimHeadFrames || 0) + 1 }, options); var frames = this._prepareFrames(stack, options); data.stacktrace = { // Sentry expects frames oldest to newest frames: frames.reverse() }; } // Fire away! this._send(data); return this; }, captureBreadcrumb: function captureBreadcrumb(obj) { var crumb = objectMerge({ timestamp: now() / 1000 }, obj); if (isFunction(this._globalOptions.breadcrumbCallback)) { var result = this._globalOptions.breadcrumbCallback(crumb); if (isObject(result) && !isEmptyObject(result)) { crumb = result; } else if (result === false) { return this; } } this._breadcrumbs.push(crumb); if (this._breadcrumbs.length > this._globalOptions.maxBreadcrumbs) { this._breadcrumbs.shift(); } return this; }, addPlugin: function addPlugin(plugin /*arg1, arg2, ... argN*/ ) { var pluginArgs = [].slice.call(arguments, 1); this._plugins.push([plugin, pluginArgs]); if (this._isRavenInstalled) { this._drainPlugins(); } return this; }, /* * Set/clear a user to be sent along with the payload. * * @param {object} user An object representing user data [optional] * @return {Raven} */ setUserContext: function setUserContext(user) { // Intentionally do not merge here since that's an unexpected behavior. this._globalContext.user = user; return this; }, /* * Merge extra attributes to be sent along with the payload. * * @param {object} extra An object representing extra data [optional] * @return {Raven} */ setExtraContext: function setExtraContext(extra) { this._mergeContext('extra', extra); return this; }, /* * Merge tags to be sent along with the payload. * * @param {object} tags An object representing tags [optional] * @return {Raven} */ setTagsContext: function setTagsContext(tags) { this._mergeContext('tags', tags); return this; }, /* * Clear all of the context. * * @return {Raven} */ clearContext: function clearContext() { this._globalContext = {}; return this; }, /* * Get a copy of the current context. This cannot be mutated. * * @return {object} copy of context */ getContext: function getContext() { // lol javascript return JSON.parse(stringify_1(this._globalContext)); }, /* * Set environment of application * * @param {string} environment Typically something like 'production'. * @return {Raven} */ setEnvironment: function setEnvironment(environment) { this._globalOptions.environment = environment; return this; }, /* * Set release version of application * * @param {string} release Typically something like a git SHA to identify version * @return {Raven} */ setRelease: function setRelease(release) { this._globalOptions.release = release; return this; }, /* * Set the dataCallback option * * @param {function} callback The callback to run which allows the * data blob to be mutated before sending * @return {Raven} */ setDataCallback: function setDataCallback(callback) { var original = this._globalOptions.dataCallback; this._globalOptions.dataCallback = keepOriginalCallback(original, callback); return this; }, /* * Set the breadcrumbCallback option * * @param {function} callback The callback to run which allows filtering * or mutating breadcrumbs * @return {Raven} */ setBreadcrumbCallback: function setBreadcrumbCallback(callback) { var original = this._globalOptions.breadcrumbCallback; this._globalOptions.breadcrumbCallback = keepOriginalCallback(original, callback); return this; }, /* * Set the shouldSendCallback option * * @param {function} callback The callback to run which allows * introspecting the blob before sending * @return {Raven} */ setShouldSendCallback: function setShouldSendCallback(callback) { var original = this._globalOptions.shouldSendCallback; this._globalOptions.shouldSendCallback = keepOriginalCallback(original, callback); return this; }, /** * Override the default HTTP transport mechanism that transmits data * to the Sentry server. * * @param {function} transport Function invoked instead of the default * `makeRequest` handler. * * @return {Raven} */ setTransport: function setTransport(transport) { this._globalOptions.transport = transport; return this; }, /* * Get the latest raw exception that was captured by Raven. * * @return {error} */ lastException: function lastException() { return this._lastCapturedException; }, /* * Get the last event id * * @return {string} */ lastEventId: function lastEventId() { return this._lastEventId; }, /* * Determine if Raven is setup and ready to go. * * @return {boolean} */ isSetup: function isSetup() { if (!this._hasJSON) return false; // needs JSON support if (!this._globalServer) { if (!this.ravenNotConfiguredError) { this.ravenNotConfiguredError = true; this._logDebug('error', 'Error: Raven has not been configured.'); } return false; } return true; }, afterLoad: function afterLoad() { // TODO: remove window dependence? // Attempt to initialize Raven on load var RavenConfig = _window$1.RavenConfig; if (RavenConfig) { this.config(RavenConfig.dsn, RavenConfig.config).install(); } }, showReportDialog: function showReportDialog(options) { if (!_document // doesn't work without a document (React native) ) return; options = options || {}; var lastEventId = options.eventId || this.lastEventId(); if (!lastEventId) { throw new configError('Missing eventId'); } var dsn = options.dsn || this._dsn; if (!dsn) { throw new configError('Missing DSN'); } var encode = encodeURIComponent; var qs = ''; qs += '?eventId=' + encode(lastEventId); qs += '&dsn=' + encode(dsn); var user = options.user || this._globalContext.user; if (user) { if (user.name) qs += '&name=' + encode(user.name); if (user.email) qs += '&email=' + encode(user.email); } var globalServer = this._getGlobalServer(this._parseDSN(dsn)); var script = _document.createElement('script'); script.async = true; script.src = globalServer + '/api/embed/error-page/' + qs; (_document.head || _document.body).appendChild(script); }, /**** Private functions ****/ _ignoreNextOnError: function _ignoreNextOnError() { var self = this; this._ignoreOnError += 1; setTimeout(function () { // onerror should trigger before setTimeout self._ignoreOnError -= 1; }); }, _triggerEvent: function _triggerEvent(eventType, options) { // NOTE: `event` is a native browser thing, so let's avoid conflicting wiht it var evt, key; if (!this._hasDocument) return; options = options || {}; eventType = 'raven' + eventType.substr(0, 1).toUpperCase() + eventType.substr(1); if (_document.createEvent) { evt = _document.createEvent('HTMLEvents'); evt.initEvent(eventType, true, true); } else { evt = _document.createEventObject(); evt.eventType = eventType; } for (key in options) { if (hasKey(options, key)) { evt[key] = options[key]; } } if (_document.createEvent) { // IE9 if standards _document.dispatchEvent(evt); } else { // IE8 regardless of Quirks or Standards // IE9 if quirks try { _document.fireEvent('on' + evt.eventType.toLowerCase(), evt); } catch (e) {// Do nothing } } }, /** * Wraps addEventListener to capture UI breadcrumbs * @param evtName the event name (e.g. "click") * @returns {Function} * @private */ _breadcrumbEventHandler: function _breadcrumbEventHandler(evtName) { var self = this; return function (evt) { // reset keypress timeout; e.g. triggering a 'click' after // a 'keypress' will reset the keypress debounce so that a new // set of keypresses can be recorded self._keypressTimeout = null; // It's possible this handler might trigger multiple times for the same // event (e.g. event propagation through node ancestors). Ignore if we've // already captured the event. if (self._lastCapturedEvent === evt) return; self._lastCapturedEvent = evt; // try/catch both: // - accessing evt.target (see getsentry/raven-js#838, #768) // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly // can throw an exception in some circumstances. var target; try { target = htmlTreeAsString(evt.target); } catch (e) { target = '<unknown>'; } self.captureBreadcrumb({ category: 'ui.' + evtName, // e.g. ui.click, ui.input message: target }); }; }, /** * Wraps addEventListener to capture keypress UI events * @returns {Function} * @private */ _keypressEventHandler: function _keypressEventHandler() { var self = this, debounceDuration = 1000; // milliseconds // TODO: if somehow user switches keypress target before // debounce timeout is triggered, we will only capture // a single breadcrumb from the FIRST target (acceptable?) return function (evt) { var target; try { target = evt.target; } catch (e) { // just accessing event properties can throw an exception in some rare circumstances // see: https://github.com/getsentry/raven-js/issues/838 return; } var tagName = target && target.tagName; // only consider keypress events on actual input elements // this will disregard keypresses targeting body (e.g. tabbing // through elements, hotkeys, etc) if (!tagName || tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable) return; // record first keypress in a series, but ignore subsequent // keypresses until debounce clears var timeout = self._keypressTimeout; if (!timeout) { self._breadcrumbEventHandler('input')(evt); } clearTimeout(timeout); self._keypressTimeout = setTimeout(function () { self._keypressTimeout = null; }, debounceDuration); }; }, /** * Captures a breadcrumb of type "navigation", normalizing input URLs * @param to the originating URL * @param from the target URL * @private */ _captureUrlChange: function _captureUrlChange(from, to) { var parsedLoc = parseUrl(this._location.href); var parsedTo = parseUrl(to); var parsedFrom = parseUrl(from); // because onpopstate only tells you the "new" (to) value of location.href, and // not the previous (from) value, we need to track the value of the current URL // state ourselves this._lastHref = to; // Use only the path component of the URL if the URL matches the current // document (almost all the time when using pushState) if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) to = parsedTo.relative; if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) from = parsedFrom.relative; this.captureBreadcrumb({ category: 'navigation', data: { to: to, from: from } }); }, _patchFunctionToString: function _patchFunctionToString() { var self = this; self._originalFunctionToString = Function.prototype.toString; // eslint-disable-next-line no-extend-native Function.prototype.toString = function () { if (typeof this === 'function' && this.__raven__) { return self._originalFunctionToString.apply(this.__orig__, arguments); } return self._originalFunctionToString.apply(this, arguments); }; }, _unpatchFunctionToString: function _unpatchFunctionToString() { if (this._originalFunctionToString) { // eslint-disable-next-line no-extend-native Function.prototype.toString = this._originalFunctionToString; } }, /** * Wrap timer functions and event targets to catch errors and provide * better metadata. */ _instrumentTryCatch: function _instrumentTryCatch() { var self = this; var wrappedBuiltIns = self._wrappedBuiltIns; function wrapTimeFn(orig) { return function (fn, t) { // preserve arity // Make a copy of the arguments to prevent deoptimization // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments var args = new Array(arguments.length); for (var i = 0; i < args.length; ++i) { args[i] = arguments[i]; } var originalCallback = args[0]; if (isFunction(originalCallback)) { args[0] = self.wrap(originalCallback); } // IE < 9 doesn't support .call/.apply on setInterval/setTimeout, but it // also supports only two arguments and doesn't care what this is, so we // can just call the original function directly. if (orig.apply) { return orig.apply(this, args); } else { return orig(args[0], args[1]); } }; } var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs; function wrapEventTarget(global) { var proto = _window$1[global] && _window$1[global].prototype; if (proto && proto.hasOwnProperty && proto.hasOwnProperty('addEventListener')) { fill(proto, 'addEventListener', function (orig) { return function (evtName, fn, capture, secure) { // preserve arity try { if (fn && fn.handleEvent) { fn.handleEvent = self.wrap(fn.handleEvent); } } catch (err) {} // can sometimes get 'Permission denied to access property "handle Event' // More breadcrumb DOM capture ... done here and not in `_instrumentBreadcrumbs` // so that we don't have more than one wrapper function var before, clickHandler, keypressHandler; if (autoBreadcrumbs && autoBreadcrumbs.dom && (global === 'EventTarget' || global === 'Node')) { // NOTE: generating multiple handlers per addEventListener invocation, should // revisit and verify we can just use one (almost certainly) clickHandler = self._breadcrumbEventHandler('click'); keypressHandler = self._keypressEventHandler(); before = function before(evt) { // need to intercept every DOM event in `before` argument, in case that // same wrapped method is re-used for different events (e.g. mousemove THEN click) // see #724 if (!evt) return; var eventType; try { eventType = evt.type; } catch (e) { // just accessing event properties can throw an exception in some rare circumstances // see: https://github.com/getsentry/raven-js/issues/838 return; } if (eventType === 'click') return clickHandler(evt);else if (eventType === 'keypress') return keypressHandler(evt); }; } return orig.call(this, evtName, self.wrap(fn, undefined, before), capture, secure); }; }, wrappedBuiltIns); fill(proto, 'removeEventListener', function (orig) { return function (evt, fn, capture, secure) { try { fn = fn && (fn.__raven_wrapper__ ? fn.__raven_wrapper__ : fn); } catch (e) {// ignore, accessing __raven_wrapper__ will throw in some Selenium environments } return orig.call(this, evt, fn, capture, secure); }; }, wrappedBuiltIns); } } fill(_window$1, 'setTimeout', wrapTimeFn, wrappedBuiltIns); fill(_window$1, 'setInterval', wrapTimeFn, wrappedBuiltIns); if (_window$1.requestAnimationFrame) { fill(_window$1, 'requestAnimationFrame', function (orig) { return function (cb) { return orig(self.wrap(cb)); }; }, wrappedBuiltIns); } // event targets borrowed from bugsnag-js: // https://github.com/bugsnag/bugsnag-js/blob/master/src/bugsnag.js#L666 var eventTargets = ['EventTarget', 'Window', 'Node', 'ApplicationCache', 'AudioTrackList', 'ChannelMergerNode', 'CryptoOperation', 'EventSource', 'FileReader', 'HTMLUnknownElement', 'IDBDatabase', 'IDBRequest', 'IDBTransaction', 'KeyOperation', 'MediaController', 'MessagePort', 'ModalWindow', 'Notification', 'SVGElementInstance', 'Screen', 'TextTrack', 'TextTrackCue', 'TextTrackList', 'WebSocket', 'WebSocketWorker', 'Worker', 'XMLHttpRequest', 'XMLHttpRequestEventTarget', 'XMLHttpRequestUpload']; for (var i = 0; i < eventTargets.length; i++) { wrapEventTarget(eventTargets[i]); } }, /** * Instrument browser built-ins w/ breadcrumb capturing * - XMLHttpRequests * - DOM interactions (click/typing) * - window.location changes * - console * * Can be disabled or individually configured via the `autoBreadcrumbs` config option */ _instrumentBreadcrumbs: function _instrumentBreadcrumbs() { var self = this; var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs; var wrappedBuiltIns = self._wrappedBuiltIns; function wrapProp(prop, xhr) { if (prop in xhr && isFunction(xhr[prop])) { fill(xhr, prop, function (orig) { return self.wrap(orig); }); // intentionally don't track filled methods on XHR instances } } if (autoBreadcrumbs.xhr && 'XMLHttpRequest' in _window$1) { var xhrproto = XMLHttpRequest.prototype; fill(xhrproto, 'open', function (origOpen) { return function (method, url) { // preserve arity // if Sentry key appears in URL, don't capture if (isString(url) && url.indexOf(self._globalKey) === -1) { this.__raven_xhr = { method: method, url: url, status_code: null }; } return origOpen.apply(this, arguments); }; }, wrappedBuiltIns); fill(xhrproto, 'send', function (origSend) { return function () { // preserve arity var xhr = this; function onreadystatechangeHandler() { if (xhr.__raven_xhr && xhr.readyState === 4) { try { // touching statusCode in some platforms throws // an exception xhr.__raven_xhr.status_code = xhr.status; } catch (e) { /* do nothing */ } self.captureBreadcrumb({ type: 'http', category: 'xhr', data: xhr.__raven_xhr }); } } var props = ['onload', 'onerror', 'onprogress']; for (var j = 0; j < props.length; j++) { wrapProp(props[j], xhr); } if ('onreadystatechange' in xhr && isFunction(xhr.onreadystatechange)) { fill(xhr, 'onreadystatechange', function (orig) { return self.wrap(orig, undefined, onreadystatechangeHandler); } /* intentionally don't track this instrumentation */ ); } else { // if onreadystatechange wasn't actually set by the page on this xhr, we // are free to set our own and capture the breadcrumb xhr.onreadystatechange = onreadystatechangeHandler; } return origSend.apply(this, arguments); }; }, wrappedBuiltIns); } if (autoBreadcrumbs.xhr && supportsFetch()) { fill(_window$1, 'fetch', function (origFetch) { return function () { // preserve arity // Make a copy of the arguments to prevent deoptimization // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments var args = new Array(arguments.length); for (var i = 0; i < args.length; ++i) { args[i] = arguments[i]; } var fetchInput = args[0]; var method = 'GET'; var url; if (typeof fetchInput === 'string') { url = fetchInput; } else if ('Request' in _window$1 && fetchInput instanceof _window$1.Request) { url = fetchInput.url; if (fetchInput.method) { method = fetchInput.method; } } else { url = '' + fetchInput; } // if Sentry key appears in URL, don't capture, as it's our own request if (url.indexOf(self._globalKey) !== -1) { return origFetch.apply(this, args); } if (args[1] && args[1].method) { method = args[1].method; } var fetchData = { method: method, url: url, status_code: null }; return origFetch.apply(this, args).then(function (response) { fetchData.status_code = response.status; self.captureBreadcrumb({ type: 'http', category: 'fetch', data: fetchData }); return response; }); }; }, wrappedBuiltIns); } // Capture breadcrumbs from any click that is unhandled / bubbled up all the way // to the document. Do this before we instrument addEventListener. if (autoBreadcrumbs.dom && this._hasDocument) { if (_document.addEventListener) { _document.addEventListener('click', self._breadcrumbEventHandler('click'), false); _document.addEventListener('keypress', self._keypressEventHandler(), false); } else { // IE8 Compatibility _document.attachEvent('onclick', self._breadcrumbEventHandler('click')); _document.attachEvent('onkeypress', self._keypressEventHandler()); } } // record navigation (URL) changes // NOTE: in Chrome App environment, touching history.pushState, *even inside // a try/catch block*, will cause Chrome to output an error to console.error // borrowed from: https://github.com/angular/angular.js/pull/13945/files var chrome = _window$1.chrome; var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime; var hasPushAndReplaceState = !isChromePackagedApp && _window$1.history && history.pushState && history.replaceState; if (autoBreadcrumbs.location && hasPushAndReplaceState) { // TODO: remove onpopstate handler on uninstall() var oldOnPopState = _window$1.onpopstate; _window$1.onpopstate = function () { var currentHref = self._location.href; self._captureUrlChange(self._lastHref, currentHref); if (oldOnPopState) { return oldOnPopState.apply(this, arguments); } }; var historyReplacementFunction = function historyReplacementFunction(origHistFunction) { // note history.pushState.length is 0; intentionally not declaring // params to preserve 0 arity return function () /* state, title, url */ { var url = arguments.length > 2 ? arguments[2] : undefined; // url argument is optional if (url) { // coerce to string (this is what pushState does) self._captureUrlChange(self._lastHref, url + ''); } return origHistFunction.apply(this, arguments); }; }; fill(history, 'pushState', historyReplacementFunction, wrappedBuiltIns); fill(history, 'replaceState', historyReplacementFunction, wrappedBuiltIns); } if (autoBreadcrumbs.console && 'console' in _window$1 && console.log) { // console var consoleMethodCallback = function consoleMethodCallback(msg, data) { self.captureBreadcrumb({ message: msg, level: data.level, category: 'console' }); }; each(['debug', 'info', 'warn', 'error', 'log'], function (_, level) { wrapConsoleMethod(console, level, consoleMethodCallback); }); } }, _restoreBuiltIns: function _restoreBuiltIns() { // restore any wrapped builtins var builtin; while (this._wrappedBuiltIns.length) { builtin = this._wrappedBuiltIns.shift(); var obj = builtin[0], name = builtin[1], orig = builtin[2]; obj[name] = orig; } }, _restoreConsole: function _restoreConsole() { // eslint-disable-next-line guard-for-in for (var method in this._originalConsoleMethods) { this._originalConsole[method] = this._originalConsoleMethods[method]; } }, _drainPlugins: function _drainPlugins() { var self = this; // FIX ME TODO each(this._plugins, function (_, plugin) { var installer = plugin[0]; var args = plugin[1]; installer.apply(self, [self].concat(args)); }); }, _parseDSN: function _parseDSN(str) { var m = dsnPattern.exec(str), dsn = {}, i = 7; try { while (i--) { dsn[dsnKeys[i]] = m[i] || ''; } } catch (e) { throw new configError('Invalid DSN: ' + str); } if (dsn.pass && !this._globalOptions.allowSecretKey) { throw new configError('Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key'); } return dsn; }, _getGlobalServer: function _getGlobalServer(uri) { // assemble the endpoint from the uri pieces var globalServer = '//' + uri.host + (uri.port ? ':' + uri.port : ''); if (uri.protocol) { globalServer = uri.protocol + ':' + globalServer; } return globalServer; }, _handleOnErrorStackInfo: function _handleOnErrorStackInfo() { // if we are intentionally ignoring errors via onerror, bail out if (!this._ignoreOnError) { this._handleStackInfo.apply(this, arguments); } }, _handleStackInfo: function _handleStackInfo(stackInfo, options) { var frames = this._prepareFrames(stackInfo, options); this._triggerEvent('handle', { stackInfo: stackInfo, options: options }); this._processException(stackInfo.name, stackInfo.message, stackInfo.url, stackInfo.lineno, frames, options); }, _prepareFrames: function _prepareFrames(stackInfo, options) { var self = this; var frames = []; if (stackInfo.stack && stackInfo.stack.length) { each(stackInfo.stack, function (i, stack) { var frame = self._normalizeFrame(stack, stackInfo.url); if (frame) { frames.push(frame); } }); // e.g. frames captured via captureMessage throw if (options && options.trimHeadFrames) { for (var j = 0; j < options.trimHeadFrames && j < frames.length; j++) { frames[j].in_app = false; } } } frames = frames.slice(0, this._globalOptions.stackTraceLimit); return frames; }, _normalizeFrame: function _normalizeFrame(frame, stackInfoUrl) { // normalize the frames data var normalized = { filename: frame.url, lineno: frame.line, colno: frame.column, function: frame.func || '?' }; // Case when we don't have any information about the error // E.g. throwing a string or raw object, instead of an `Error` in Firefox // Generating synthetic error doesn't add any value here // // We should probably somehow let a user know that they should fix their code if (!frame.url) { normalized.filename = stackInfoUrl; // fallback to whole stacks url from onerror handler } normalized.in_app = !( // determine if an exception came from outside of our app // first we check the global includePaths list. !!this._globalOptions.includePaths.test && !this._globalOptions.includePaths.test(normalized.filename) || // Now we check for fun, if the function name is Raven or TraceKit /(Raven|TraceKit)\./.test(normalized['function']) || // finally, we do a last ditch effort and check for raven.min.js /raven\.(min\.)?js$/.test(normalized.filename)); return normalized; }, _processException: function _processException(type, message, fileurl, lineno, frames, options) { var prefixedMessage = (type ? type + ': ' : '') + (message || ''); if (!!this._globalOptions.ignoreErrors.test && (this._globalOptions.ignoreErrors.test(message) || this._globalOptions.ignoreErrors.test(prefixedMessage))) { return; } var stacktrace; if (frames && frames.length) { fileurl = frames[0].filename || fileurl; // Sentry expects frames oldest to newest // and JS sends them as newest to oldest frames.reverse(); stacktrace = { frames: frames }; } else if (fileurl) { stacktrace = { frames: [{ filename: fileurl, lineno: lineno, in_app: true }] }; } if (!!this._globalOptions.ignoreUrls.test && this._globalOptions.ignoreUrls.test(fileurl)) { return; } if (!!this._globalOptions.whitelistUrls.test && !this._globalOptions.whitelistUrls.test(fileurl)) { return; } var data = objectMerge({ // sentry.interfaces.Exception exception: { values: [{ type: type, value: message, stacktrace: stacktrace }] }, culprit: fileurl }, options); // Fire away! this._send(data); }, _trimPacket: function _trimPacket(data) { // For now, we only want to truncate the two different messages // but this could/should be expanded to just trim everything var max = this._globalOptions.maxMessageLength; if (data.message) { data.message = truncate(data.message, max); } if (data.exception) { var exception = data.exception.values[0]; exception.value = truncate(exception.value, max); } var request = data.request; if (request) { if (request.url) { request.url = truncate(request.url, this._globalOptions.maxUrlLength); } if (request.Referer) { request.Referer = truncate(request.Referer, this._globalOptions.maxUrlLength); } } if (data.breadcrumbs && data.breadcrumbs.values) this._trimBreadcrumbs(data.breadcrumbs); return data; }, /** * Truncate breadcrumb values (right now just URLs) */ _trimBreadcrumbs: function _trimBreadcrumbs(breadcrumbs) { // known breadcrumb properties with urls // TODO: also consider arbitrary prop values that start with (https?)?:// var urlProps = ['to', 'from', 'url'], urlProp, crumb, data; for (var i = 0; i < breadcrumbs.values.length; ++i) { crumb = breadcrumbs.values[i]; if (!crumb.hasOwnProperty('data') || !isObject(crumb.data) || objectFrozen(crumb.data)) continue; data = objectMerge({}, crumb.data); for (var j = 0; j < urlProps.length; ++j) { urlProp = urlProps[j]; if (data.hasOwnProperty(urlProp) && data[urlProp]) { data[urlProp] = truncate(data[urlProp], this._globalOptions.maxUrlLength); } } breadcrumbs.values[i].data = data; } }, _getHttpData: function _getHttpData() { if (!this._hasNavigator && !this._hasDocument) return; var httpData = {}; if (this._hasNavigator && _navigator.userAgent) { httpData.headers = { 'User-Agent': navigator.userAgent }; } // Check in `window` instead of `document`, as we may be in ServiceWorker environment if (_window$1.location && _window$1.location.href) { httpData.url = _window$1.location.href; } if (this._hasDocument && _document.referrer) { if (!httpData.headers) httpData.headers = {}; httpData.headers.Referer = _document.referrer; } return httpData; }, _resetBackoff: function _resetBackoff() { this._backoffDuration = 0; this._backoffStart = null; }, _shouldBackoff: function _shouldBackoff() { return this._backoffDuration && now() - this._backoffStart < this._backoffDuration; }, /** * Returns true if the in-process data payload matches the signature * of the previously-sent data * * NOTE: This has to be done at this level because TraceKit can generate * data from window.onerror WITHOUT an exception object (IE8, IE9, * other old browsers). This can take the form of an "exception" * data object with a single frame (derived from the onerror args). */ _isRepeatData: function _isRepeatData(current) { var last = this._lastData; if (!last || current.message !== last.message || // defined for captureMessage current.culprit !== last.culprit // defined for captureException/onerror ) return false; // Stacktrace interface (i.e. from captureMessage) if (current.stacktrace || last.stacktrace) { return isSameStacktrace(current.stacktrace, last.stacktrace); } else if (current.exception || last.exception) { // Exception interface (i.e. from captureException/onerror) return isSameException(current.exception, last.exception); } return true; }, _setBackoffState: function _setBackoffState(request) { // If we are already in a backoff state, don't change anything if (this._shouldBackoff()) { return; } var status = request.status; // 400 - project_id doesn't exist or some other fatal // 401 - invalid/revoked dsn // 429 - too many requests if (!(status === 400 || status === 401 || status === 429)) return; var retry; try { // If Retry-After is not in Access-Control-Expose-Headers, most // browsers will throw an exception trying to access it if (supportsFetch()) { retry = request.headers.get('Retry-After'); } else { retry = request.getResponseHeader('Retry-After'); } // Retry-After is returned in seconds retry = parseInt(retry, 10) * 1000; } catch (e) { /* eslint no-empty:0 */ } this._backoffDuration = retry ? // If Sentry server returned a Retry-After value, use it retry : // Otherwise, double the last backoff duration (starts at 1 sec) this._backoffDuration * 2 || 1000; this._backoffStart = now(); }, _send: function _send(data) { var globalOptions = this._globalOptions; var baseData = { project: this._globalProject, logger: globalOptions.logger, platform: 'javascript' }, httpData = this._getHttpData(); if (httpData) { baseData.request = httpData; } // HACK: delete `trimHeadFrames` to prevent from appearing in outbound payload if (data.trimHeadFrames) delete data.trimHeadFrames; data = objectMerge(baseData, data); // Merge in the tags and extra separately since objectMerge doesn't handle a deep merge data.tags = objectMerge(objectMerge({}, this._globalContext.tags), data.tags); data.extra = objectMerge(objectMerge({}, this._globalContext.extra), data.extra); // Send along our own collected metadata with extra data.extra['session:duration'] = now() - this._startTime; if (this._breadcrumbs && this._breadcrumbs.length > 0) { // intentionally make shallow copy so that additions // to breadcrumbs aren't accidentally sent in this request data.breadcrumbs = { values: [].slice.call(this._breadcrumbs, 0) }; } if (this._globalContext.user) { // sentry.interfaces.User data.user = this._globalContext.user; } // Include the environment if it's defined in globalOptions if (globalOptions.environment) data.environment = globalOptions.environment; // Include the release if it's defined in globalOptions if (globalOptions.release) data.release = globalOptions.release; // Include server_name if it's defined in globalOptions if (globalOptions.serverName) data.server_name = globalOptions.serverName; // Cleanup empty properties before sending them to the server Object.keys(data).forEach(function (key) { if (data[key] == null || data[key] === '' || isEmptyObject(data[key])) { delete data[key]; } }); if (isFunction(globalOptions.dataCallback)) { data = globalOptions.dataCallback(data) || data; } // Why?????????? if (!data || isEmptyObject(data)) { return; } // Check if the request should be filtered or not if (isFunction(globalOptions.shouldSendCallback) && !globalOptions.shouldSendCallback(data)) { return; } // Backoff state: Sentry server previously responded w/ an error (e.g. 429 - too many requests), // so drop requests until "cool-off" period has elapsed. if (this._shouldBackoff()) { this._logDebug('warn', 'Raven dropped error due to backoff: ', data); return; } if (typeof globalOptions.sampleRate === 'number') { if (Math.random() < globalOptions.sampleRate) { this._sendProcessedPayload(data); } } else { this._sendProcessedPayload(data); } }, _getUuid: function _getUuid() { return uuid4(); }, _sendProcessedPayload: function _sendProcessedPayload(data, callback) { var self = this; var globalOptions = this._globalOptions; if (!this.isSetup()) return; // Try and clean up the packet before sending by truncating long values data = this._trimPacket(data); // ideally duplicate error testing should occur *before* dataCallback/shouldSendCallback, // but this would require copying an un-truncated copy of the data packet, which can be // arbitrarily deep (extra_data) -- could be worthwhile? will revisit if (!this._globalOptions.allowDuplicates && this._isRepeatData(data)) { this._logDebug('warn', 'Raven dropped repeat event: ', data); return; } // Send along an event_id if not explicitly passed. // This event_id can be used to reference the error within Sentry itself. // Set lastEventId after we know the error should actually be sent this._lastEventId = data.event_id || (data.event_id = this._getUuid()); // Store outbound payload after trim this._lastData = data; this._logDebug('debug', 'Raven about to send:', data); var auth = { sentry_version: '7', sentry_client: 'raven-js/' + this.VERSION, sentry_key: this._globalKey }; if (this._globalSecret) { auth.sentry_secret = this._globalSecret; } var exception = data.exception && data.exception.values[0]; // only capture 'sentry' breadcrumb is autoBreadcrumbs is truthy if (this._globalOptions.autoBreadcrumbs && this._globalOptions.autoBreadcrumbs.sentry) { this.captureBreadcrumb({ category: 'sentry', message: exception ? (exception.type ? exception.type + ': ' : '') + exception.value : data.message, event_id: data.event_id, level: data.level || 'error' // presume error unless specified }); } var url = this._globalEndpoint; (globalOptions.transport || this._makeRequest).call(this, { url: url, auth: auth, data: data, options: globalOptions, onSuccess: function success() { self._resetBackoff(); self._triggerEvent('success', { data: data, src: url }); callback && callback(); }, onError: function failure(error) { self._logDebug('error', 'Raven transport failed to send: ', error); if (error.request) { self._setBackoffState(error.request); } self._triggerEvent('failure', { data: data, src: url }); error = error || new Error('Raven send failed (no additional details provided)'); callback && callback(error); } }); }, _makeRequest: function _makeRequest(opts) { // Auth is intentionally sent as part of query string (NOT as custom HTTP header) to avoid preflight CORS requests var url = opts.url + '?' + urlencode(opts.auth); var evaluatedHeaders = null; var evaluatedFetchParameters = {}; if (opts.options.headers) { evaluatedHeaders = this._evaluateHash(opts.options.headers); } if (opts.options.fetchParameters) { evaluatedFetchParameters = this._evaluateHash(opts.options.fetchParameters); } if (supportsFetch()) { evaluatedFetchParameters.body = stringify_1(opts.data); var defaultFetchOptions = objectMerge({}, this._fetchDefaults); var fetchOptions = objectMerge(defaultFetchOptions, evaluatedFetchParameters); if (evaluatedHeaders) { fetchOptions.headers = evaluatedHeaders; } return _window$1.fetch(url, fetchOptions).then(function (response) { if (response.ok) { opts.onSuccess && opts.onSuccess(); } else { var error = new Error('Sentry error code: ' + response.status); // It's called request only to keep compatibility with XHR interface // and not add more redundant checks in setBackoffState method error.request = response; opts.onError && opts.onError(error); } })['catch'](function () { opts.onError && opts.onError(new Error('Sentry error code: network unavailable')); }); } var request = _window$1.XMLHttpRequest && new _window$1.XMLHttpRequest(); if (!request) return; // if browser doesn't support CORS (e.g. IE7), we are out of luck var hasCORS = 'withCredentials' in request || typeof XDomainRequest !== 'undefined'; if (!hasCORS) return; if ('withCredentials' in request) { request.onreadystatechange = function () { if (request.readyState !== 4) { return; } else if (request.status === 200) { opts.onSuccess && opts.onSuccess(); } else if (opts.onError) { var err = new Error('Sentry error code: ' + request.status); err.request = request; opts.onError(err); } }; } else { request = new XDomainRequest(); // xdomainrequest cannot go http -> https (or vice versa), // so always use protocol relative url = url.replace(/^https?:/, ''); // onreadystatechange not supported by XDomainRequest if (opts.onSuccess) { request.onload = opts.onSuccess; } if (opts.onError) { request.onerror = function () { var err = new Error('Sentry error code: XDomainRequest'); err.request = request; opts.onError(err); }; } } request.open('POST', url); if (evaluatedHeaders) { each(evaluatedHeaders, function (key, value) { request.setRequestHeader(key, value); }); } request.send(stringify_1(opts.data)); }, _evaluateHash: function _evaluateHash(hash) { var evaluated = {}; for (var key in hash) { if (hash.hasOwnProperty(key)) { var value = hash[key]; evaluated[key] = typeof value === 'function' ? value() : value; } } return evaluated; }, _logDebug: function _logDebug(level) { if (this._originalConsoleMethods[level] && this.debug) { // In IE<10 console methods do not have their own 'apply' method Function.prototype.apply.call(this._originalConsoleMethods[level], this._originalConsole, [].slice.call(arguments, 1)); } }, _mergeContext: function _mergeContext(key, context) { if (isUndefined(context)) { delete this._globalContext[key]; } else { this._globalContext[key] = objectMerge(this._globalContext[key] || {}, context); } } }; // Deprecations Raven$1.prototype.setUser = Raven$1.prototype.setUserContext; Raven$1.prototype.setReleaseContext = Raven$1.prototype.setRelease; var raven = Raven$1; /** * Enforces a single instance of the Raven client, and the * main entry point for Raven. If you are a consumer of the * Raven library, you SHOULD load this file (vs raven.js). **/ // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785) var _window = typeof window !== 'undefined' ? window : typeof commonjsGlobal !== 'undefined' ? commonjsGlobal : typeof self !== 'undefined' ? self : {}; var _Raven = _window.Raven; var Raven = new raven(); /* * Allow multiple versions of Raven to be installed. * Strip Raven from the global context and returns the instance. * * @return {Raven} */ Raven.noConflict = function () { _window.Raven = _Raven; return Raven; }; Raven.afterLoad(); var singleton = Raven; /** * Angular.js plugin * * Provides an $exceptionHandler for Angular.js */ var wrappedCallback$1 = utils.wrappedCallback; // See https://github.com/angular/angular.js/blob/v1.4.7/src/minErr.js var angularPattern = /^\[((?:[$a-zA-Z0-9]+:)?(?:[$a-zA-Z0-9]+))\] (.*?)\n?(\S+)$/; var moduleName = 'ngRaven'; function angularPlugin(Raven, angular) { angular = angular || window.angular; if (!angular) return; function RavenProvider() { this.$get = ['$window', function ($window) { return Raven; }]; } function ExceptionHandlerProvider($provide) { $provide.decorator('$exceptionHandler', ['Raven', '$delegate', exceptionHandler]); } function exceptionHandler(R, $delegate) { return function (ex, cause) { R.captureException(ex, { extra: { cause: cause } }); $delegate(ex, cause); }; } angular.module(moduleName, []).provider('Raven', RavenProvider).config(['$provide', ExceptionHandlerProvider]); Raven.setDataCallback(wrappedCallback$1(function (data) { return angularPlugin._normalizeData(data); })); } angularPlugin._normalizeData = function (data) { // We only care about mutating an exception var exception = data.exception; if (exception) { exception = exception.values[0]; var matches = angularPattern.exec(exception.value); if (matches) { // This type now becomes something like: $rootScope:inprog exception.type = matches[1]; exception.value = matches[2]; data.message = exception.type + ': ' + exception.value; // auto set a new tag specifically for the angular error url data.extra.angularDocs = matches[3].substr(0, 250); } } return data; }; angularPlugin.moduleName = moduleName; var angular = angularPlugin; /** * Ember.js plugin * * Patches event handler callbacks and ajax callbacks. */ function emberPlugin(Raven, Ember) { Ember = Ember || window.Ember; // quit if Ember isn't on the page if (!Ember) return; var _oldOnError = Ember.onerror; Ember.onerror = function EmberOnError(error) { Raven.captureException(error); if (typeof _oldOnError === 'function') { _oldOnError.call(this, error); } }; Ember.RSVP.on('error', function (reason) { if (reason instanceof Error) { Raven.captureException(reason, { extra: { context: 'Unhandled Promise error detected' } }); } else { Raven.captureMessage('Unhandled Promise error detected', { extra: { reason: reason } }); } }); } var ember = emberPlugin; /*global define*/ /** * require.js plugin * * Automatically wrap define/require callbacks. (Experimental) */ function requirePlugin(Raven) { if (typeof undefined === 'function' && undefined.amd) { window.define = Raven.wrap({ deep: false }, undefined); window.require = Raven.wrap({ deep: false }, commonjsRequire); } } var require_1 = requirePlugin; /** * Vue.js 2.0 plugin * */ function formatComponentName(vm) { if (vm.$root === vm) { return 'root instance'; } var name = vm._isVue ? vm.$options.name || vm.$options._componentTag : vm.name; return (name ? 'component <' + name + '>' : 'anonymous component') + (vm._isVue && vm.$options.__file ? ' at ' + vm.$options.__file : ''); } function vuePlugin(Raven, Vue) { Vue = Vue || window.Vue; // quit if Vue isn't on the page if (!Vue || !Vue.config) return; var _oldOnError = Vue.config.errorHandler; Vue.config.errorHandler = function VueErrorHandler(error, vm, info) { var metaData = {}; // vm and lifecycleHook are not always available if (Object.prototype.toString.call(vm) === '[object Object]') { metaData.componentName = formatComponentName(vm); metaData.propsData = vm.$options.propsData; } if (typeof info !== 'undefined') { metaData.lifecycleHook = info; } Raven.captureException(error, { extra: metaData }); if (typeof _oldOnError === 'function') { _oldOnError.call(this, error, vm, info); } }; } var vue = vuePlugin; /* This file was generated by './scripts/generate-plugin-combinations.js'! */ singleton.addPlugin(angular).addPlugin(ember).addPlugin(require_1).addPlugin(vue); var angular_ember_require_vue = {}; return angular_ember_require_vue; })));
desenvolvimento-plataformas-moveis/pocs/poc-interfaces/App.js
mfklauberg/projetosacademicosfurb
import React from 'react'; import { StyleSheet, Text, View, ScrollView } from 'react-native'; const squareStyle = () => { return StyleSheet.create({ square: { borderWidth: 2, borderColor: randomColor(), width: 100, height: 100, alignItems: 'center', justifyContent: 'center', marginLeft: 5, marginBottom: 5 } }) }; const square = (content, style) => <View key={content} style={style}> <Text style={styles.square_text}> {content} </Text> </View>; export default class App extends React.Component { render() { const squares = []; for (let index = 0; index < 100; index++) { const style = squareStyle(); squares.push(square(index, style.square)); } return ( <View style={styles.container}> <View style={styles.header}> <Text style={styles.header_text}>POC 1 - Responsividade</Text> </View> <ScrollView> <View style={styles.content}> { squares.map(square => square) } </View> </ScrollView> </View> ); } } const randomColor = () => { const letters = '0123456789ABCDEF'; let color = ''; for (let i = 0; i < 6; i++) { color += letters[Math.floor(Math.random() * 16)]; } return '#'.concat(color); } const styles = StyleSheet.create({ container: { backgroundColor: '#fff', alignItems: 'center' }, header: { margin: 20 }, header_text: { fontSize: 24 }, content: { flexWrap: 'wrap', flexDirection: 'row' }, square: { borderWidth: 1, borderColor: randomColor(), width: 100, height: 100, alignItems: 'center', justifyContent: 'center', marginLeft: 5, marginBottom: 5 }, square_text: { fontSize: 20, } });
react-flux-mui/js/material-ui/src/svg-icons/editor/monetization-on.js
pbogdan/react-flux-mui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorMonetizationOn = (props) => ( <SvgIcon {...props}> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1.41 16.09V20h-2.67v-1.93c-1.71-.36-3.16-1.46-3.27-3.4h1.96c.1 1.05.82 1.87 2.65 1.87 1.96 0 2.4-.98 2.4-1.59 0-.83-.44-1.61-2.67-2.14-2.48-.6-4.18-1.62-4.18-3.67 0-1.72 1.39-2.84 3.11-3.21V4h2.67v1.95c1.86.45 2.79 1.86 2.85 3.39H14.3c-.05-1.11-.64-1.87-2.22-1.87-1.5 0-2.4.68-2.4 1.64 0 .84.65 1.39 2.67 1.91s4.18 1.39 4.18 3.91c-.01 1.83-1.38 2.83-3.12 3.16z"/> </SvgIcon> ); EditorMonetizationOn = pure(EditorMonetizationOn); EditorMonetizationOn.displayName = 'EditorMonetizationOn'; EditorMonetizationOn.muiName = 'SvgIcon'; export default EditorMonetizationOn;
modules/IndexRoute.js
Dodelkin/react-router
import React from 'react' import invariant from 'invariant' import warning from 'warning' import { createRouteFromReactElement } from './RouteUtils' import { component, components, falsy } from './PropTypes' const { bool, func } = React.PropTypes /** * An <IndexRoute> is used to specify its parent's <Route indexRoute> in * a JSX route config. */ const IndexRoute = React.createClass({ statics: { createRouteFromReactElement(element, parentRoute) { if (parentRoute) { parentRoute.indexRoute = createRouteFromReactElement(element) } else { warning( false, 'An <IndexRoute> does not make sense at the root of your route config' ) } } }, propTypes: { path: falsy, ignoreScrollBehavior: bool, component, components, getComponents: func }, render() { invariant( false, '<IndexRoute> elements are for router configuration only and should not be rendered' ) } }) export default IndexRoute
ui/src/components/PostMeta.js
nateinaction/nateanddanielle.love
import React from 'react'; import PropTypes from 'prop-types'; import Typography from '@material-ui/core/Typography'; import moment from 'moment'; const PostMeta = props => ( <div className="post-meta"> <Typography variant="caption" component="p" > {moment(props.date).format('dddd, MMMM Do YYYY')} </Typography> </div> ); PostMeta.propTypes = { date: PropTypes.string.isRequired, }; /* <Tags tags={props.tags} tagStore={props.tagStore} /> */ export default PostMeta;
src/components/lobby/CreateGameForm.js
ffossum/gamesite3-client
/* @flow */ import React from 'react'; type Props = { createGame: () => void, }; export default class CreateGameForm extends React.Component<Props> { handleSubmit = (e: SyntheticInputEvent<>) => { const { createGame } = this.props; e.preventDefault(); createGame(); }; render() { return ( <form onSubmit={this.handleSubmit}> <button type="submit">Create</button> </form> ); } }
Todo/components/Index.js
davejmac/test-react-native-app
import React from 'react' import { Provider } from 'react-redux' import { createStore } from 'redux' import todoApp from '../reducers' import App from './App' let store = createStore(todoApp) const Index = () => ( <Provider store={store}> <App /> </Provider> ) export default Index
app/components/AddCharacter.js
csreyes/TLCJournal
import React from 'react'; import AddCharacterStore from '../stores/AddCharacterStore'; import AddCharacterActions from '../actions/AddCharacterActions'; class AddCharacter extends React.Component { constructor(props) { super(props); this.state = AddCharacterStore.getState(); this.onChange = this.onChange.bind(this); } componentDidMount() { AddCharacterStore.listen(this.onChange); } componentWillUnmount() { AddCharacterStore.unlisten(this.onChange); } onChange(state) { this.setState(state); } handleSubmit(event) { event.preventDefault(); var name = this.state.name.trim(); var gender = this.state.gender; if (!name) { AddCharacterActions.invalidName(); this.refs.nameTextField.getDOMNode().focus(); } if (!gender) { AddCharacterActions.invalidGender(); } if (name && gender) { AddCharacterActions.addCharacter(name, gender); } } render() { return ( <div className='container'> <div className='row flipInX animated'> <div className='col-sm-8'> <div className='panel panel-default'> <div className='panel-heading'>Add Character</div> <div className='panel-body'> <form onSubmit={this.handleSubmit.bind(this)}> <div className={'form-group ' + this.state.nameValidationState}> <label className='control-label'>Character Name</label> <input type='text' className='form-control' ref='nameTextField' value={this.state.name} onChange={AddCharacterActions.updateName} autoFocus/> <span className='help-block'>{this.state.helpBlock}</span> </div> <div className={'form-group ' + this.state.genderValidationState}> <div className='radio radio-inline'> <input type='radio' name='gender' id='female' value='Female' checked={this.state.gender === 'Female'} onChange={AddCharacterActions.updateGender}/> <label htmlFor='female'>Female</label> </div> <div className='radio radio-inline'> <input type='radio' name='gender' id='male' value='Male' checked={this.state.gender === 'Male'} onChange={AddCharacterActions.updateGender}/> <label htmlFor='male'>Male</label> </div> </div> <button type='submit' className='btn btn-primary'>Submit</button> </form> </div> </div> </div> </div> </div> ); } } export default AddCharacter;
ajax/libs/redux-form/0.4.0/redux-form.js
kennynaoh/cdnjs
(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["ReduxForm"] = factory(require("react")); else root["ReduxForm"] = factory(root["React"]); })(this, function(__WEBPACK_EXTERNAL_MODULE_13__) { 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__) { 'use strict'; exports.__esModule = 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 _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 _reducer = __webpack_require__(5); var _reducer2 = _interopRequireDefault(_reducer); var _reduxForm = __webpack_require__(6); var _reduxForm2 = _interopRequireDefault(_reduxForm); var _connectReduxForm = __webpack_require__(14); var _connectReduxForm2 = _interopRequireDefault(_connectReduxForm); var _mapValues = __webpack_require__(1); var _mapValues2 = _interopRequireDefault(_mapValues); var _bindActionData = __webpack_require__(4); var _bindActionData2 = _interopRequireDefault(_bindActionData); var _actions = __webpack_require__(3); var actions = _interopRequireWildcard(_actions); // bind form as first parameter of action creators var boundActions = _extends({}, _mapValues2['default'](_extends({}, actions, { initializeWithKey: function initializeWithKey(key, data) { return _bindActionData2['default'](actions.initialize, { key: key })(data); } }), function (action) { return function (form) { for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } return _bindActionData2['default'](action, { form: form }).apply(undefined, args); }; })); var blur = boundActions.blur; var change = boundActions.change; var initialize = boundActions.initialize; var initializeWithKey = boundActions.initializeWithKey; var reset = boundActions.reset; var startAsyncValidation = boundActions.startAsyncValidation; var stopAsyncValidation = boundActions.stopAsyncValidation; var touch = boundActions.touch; var untouch = boundActions.untouch; exports.blur = blur; exports.change = change; exports.connectReduxForm = _connectReduxForm2['default']; exports.reducer = _reducer2['default']; exports.initialize = initialize; exports.initializeWithKey = initializeWithKey; exports.reset = reset; exports.startAsyncValidation = startAsyncValidation; exports.stopAsyncValidation = stopAsyncValidation; exports.touch = touch; exports.untouch = untouch; exports['default'] = _reduxForm2['default']; /***/ }, /* 1 */ /***/ function(module, exports) { /** * Maps all the values in the given object through the given function and saves them, by key, to a result object */ "use strict"; exports.__esModule = 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; }; exports["default"] = mapValues; function mapValues(obj, fn) { return Object.keys(obj).reduce(function (accumulator, key) { var _extends2; return _extends({}, accumulator, (_extends2 = {}, _extends2[key] = fn(obj[key], key), _extends2)); }, {}); } module.exports = exports["default"]; /***/ }, /* 2 */ /***/ function(module, exports) { 'use strict'; exports.__esModule = true; var BLUR = 'redux-form/BLUR'; exports.BLUR = BLUR; var CHANGE = 'redux-form/CHANGE'; exports.CHANGE = CHANGE; var INITIALIZE = 'redux-form/INITIALIZE'; exports.INITIALIZE = INITIALIZE; var RESET = 'redux-form/RESET'; exports.RESET = RESET; var START_ASYNC_VALIDATION = 'redux-form/START_ASYNC_VALIDATION'; exports.START_ASYNC_VALIDATION = START_ASYNC_VALIDATION; var START_SUBMIT = 'redux-form/START_SUBMIT'; exports.START_SUBMIT = START_SUBMIT; var STOP_ASYNC_VALIDATION = 'redux-form/STOP_ASYNC_VALIDATION'; exports.STOP_ASYNC_VALIDATION = STOP_ASYNC_VALIDATION; var STOP_SUBMIT = 'redux-form/STOP_SUBMIT'; exports.STOP_SUBMIT = STOP_SUBMIT; var TOUCH = 'redux-form/TOUCH'; exports.TOUCH = TOUCH; var UNTOUCH = 'redux-form/UNTOUCH'; exports.UNTOUCH = UNTOUCH; /***/ }, /* 3 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports.blur = blur; exports.change = change; exports.initialize = initialize; exports.reset = reset; exports.startAsyncValidation = startAsyncValidation; exports.startSubmit = startSubmit; exports.stopAsyncValidation = stopAsyncValidation; exports.stopSubmit = stopSubmit; exports.touch = touch; exports.untouch = untouch; var _actionTypes = __webpack_require__(2); function blur(field, value) { return { type: _actionTypes.BLUR, field: field, value: value }; } function change(field, value) { return { type: _actionTypes.CHANGE, field: field, value: value }; } function initialize(data) { return { type: _actionTypes.INITIALIZE, data: data }; } function reset() { return { type: _actionTypes.RESET }; } function startAsyncValidation() { return { type: _actionTypes.START_ASYNC_VALIDATION }; } function startSubmit() { return { type: _actionTypes.START_SUBMIT }; } function stopAsyncValidation(errors) { return { type: _actionTypes.STOP_ASYNC_VALIDATION, errors: errors }; } function stopSubmit() { return { type: _actionTypes.STOP_SUBMIT }; } function touch() { for (var _len = arguments.length, fields = Array(_len), _key = 0; _key < _len; _key++) { fields[_key] = arguments[_key]; } return { type: _actionTypes.TOUCH, fields: fields }; } function untouch() { for (var _len2 = arguments.length, fields = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { fields[_key2] = arguments[_key2]; } return { type: _actionTypes.UNTOUCH, fields: fields }; } /***/ }, /* 4 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = 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; }; exports['default'] = bindActionData; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _mapValues = __webpack_require__(1); var _mapValues2 = _interopRequireDefault(_mapValues); /** * Adds additional properties to the results of the function or map of functions passed */ function bindActionData(action, data) { return typeof action === 'function' ? function () { return _extends({}, action.apply(undefined, arguments), data); } : _mapValues2['default'](action, function (value) { return bindActionData(value, data); }); } module.exports = exports['default']; /***/ }, /* 5 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = 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 _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; } var _actionTypes = __webpack_require__(2); var _mapValues = __webpack_require__(1); var _mapValues2 = _interopRequireDefault(_mapValues); var initialState = { asyncErrors: { valid: true }, asyncValidating: false, data: {}, initial: {}, submitting: false, touched: {} }; exports.initialState = initialState; var reducer = function reducer() { var state = arguments.length <= 0 || arguments[0] === undefined ? initialState : arguments[0]; var _extends2, _extends4; var action = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; switch (action.type) { case _actionTypes.BLUR: var blurDiff = { data: _extends({}, state.data, (_extends2 = {}, _extends2[action.field] = action.value, _extends2)) }; if (action.touch) { var _extends3; blurDiff.touched = _extends({}, state.touched, (_extends3 = {}, _extends3[action.field] = true, _extends3)); } return _extends({}, state, blurDiff); case _actionTypes.CHANGE: var _state$asyncErrors = state.asyncErrors, oldError = _state$asyncErrors[action.field], valid = _state$asyncErrors.valid, otherErrors = _objectWithoutProperties(_state$asyncErrors, [action.field, 'valid']); var changeDiff = { data: _extends({}, state.data, (_extends4 = {}, _extends4[action.field] = action.value, _extends4)), asyncErrors: _extends({}, otherErrors, { valid: !Object.keys(otherErrors).length }) }; delete changeDiff.asyncErrors[action.field]; if (action.touch) { var _extends5; changeDiff.touched = _extends({}, state.touched, (_extends5 = {}, _extends5[action.field] = true, _extends5)); } return _extends({}, state, changeDiff); case _actionTypes.INITIALIZE: return { asyncErrors: {}, asyncValidating: false, data: action.data, initial: action.data, submitting: false, touched: {} }; case _actionTypes.RESET: return { asyncErrors: {}, asyncValidating: false, data: state.initial, initial: state.initial, submitting: false, touched: {} }; case _actionTypes.START_ASYNC_VALIDATION: return _extends({}, state, { asyncValidating: true }); case _actionTypes.START_SUBMIT: return _extends({}, state, { submitting: true }); case _actionTypes.STOP_ASYNC_VALIDATION: return _extends({}, state, { asyncValidating: false, asyncErrors: action.errors }); case _actionTypes.STOP_SUBMIT: return _extends({}, state, { submitting: false }); case _actionTypes.TOUCH: var touchDiff = {}; action.fields.forEach(function (field) { if (typeof field !== 'string') { throw new Error('fields passed to touch() must be strings'); } touchDiff[field] = true; }); return _extends({}, state, { touched: _extends({}, state.touched, touchDiff) }); case _actionTypes.UNTOUCH: var untouchDiff = {}; action.fields.forEach(function (field) { if (typeof field !== 'string') { throw new Error('fields passed to untouch() must be strings'); } untouchDiff[field] = false; }); return _extends({}, state, { touched: _extends({}, state.touched, untouchDiff) }); default: return state; } }; function formReducer() { var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; var _extends8; var action = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; var form = action.form; var key = action.key; var rest = _objectWithoutProperties(action, ['form', 'key']); if (!form) { return state; } if (key) { var _extends6, _extends7; return _extends({}, state, (_extends7 = {}, _extends7[form] = _extends({}, state[form], (_extends6 = {}, _extends6[key] = reducer((state[form] || {})[key], rest), _extends6)), _extends7)); } return _extends({}, state, (_extends8 = {}, _extends8[form] = reducer(state[form], rest), _extends8)); } formReducer.plugin = function (reducers) { return function () { var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; var action = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; var result = formReducer(state, action); return _extends({}, result, _mapValues2['default'](reducers, function (red, key) { return red(result[key] || initialState, action); })); }; }; exports['default'] = formReducer; /***/ }, /* 6 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = 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 _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['default'] = reduxForm; 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 }; } 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 _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 _react = __webpack_require__(13); var _react2 = _interopRequireDefault(_react); var _actions = __webpack_require__(3); var formActions = _interopRequireWildcard(_actions); var _util = __webpack_require__(15); var _bindActionData = __webpack_require__(4); var _bindActionData2 = _interopRequireDefault(_bindActionData); var _reducer = __webpack_require__(5); function getSubForm(form, formName, formKey) { if (form && form[formName]) { if (formKey) { if (form[formName][formKey]) { return form[formName][formKey]; } } else { return form[formName]; } } return _reducer.initialState; } function createReduxFormDecorator(formName, fields, syncValidate, touchOnBlur, touchOnChange, asyncValidate, asyncBlurFields) { function combineValidationErrors(form) { var syncErrors = syncValidate(form.data); var asyncErrors = _extends({ valid: true }, form.asyncErrors); var valid = !!(syncErrors.valid && asyncErrors.valid); // !! to convert falsy to boolean return _extends({}, syncErrors, asyncErrors, { valid: valid }); } return function (DecoratedComponent) { return (function (_Component) { _inherits(ReduxForm, _Component); function ReduxForm() { _classCallCheck(this, ReduxForm); _Component.apply(this, arguments); } ReduxForm.prototype.render = function render() { var _this = this; var _props = this.props; var formName = _props.formName; var form = _props.form; var formKey = _props.formKey; var dispatch = _props.dispatch; var passableProps = _objectWithoutProperties(_props, ['formName', 'form', 'formKey', 'dispatch']); // eslint-disable-line no-shadow var subForm = getSubForm(form, formName, formKey); var _ref = formKey ? _bindActionData2['default'](formActions, { form: formName, key: formKey }) : _bindActionData2['default'](formActions, { form: formName }); var blur = _ref.blur; var change = _ref.change; var initialize = _ref.initialize; var reset = _ref.reset; var startAsyncValidation = _ref.startAsyncValidation; var startSubmit = _ref.startSubmit; var stopAsyncValidation = _ref.stopAsyncValidation; var stopSubmit = _ref.stopSubmit; var touch = _ref.touch; var untouch = _ref.untouch; var runAsyncValidation = asyncValidate ? function () { dispatch(startAsyncValidation(formKey)); var promise = asyncValidate(subForm.data); if (!promise || typeof promise.then !== 'function') { throw new Error('asyncValidate function passed to reduxForm must return a promise!'); } return promise.then(function (asyncErrors) { dispatch(stopAsyncValidation(asyncErrors)); return !!asyncErrors.valid; }); } : undefined; var handleBlur = function handleBlur(name, value) { return function (event) { var fieldValue = value || event.target.value; var doBlur = _bindActionData2['default'](blur, { touch: touchOnBlur }); dispatch(doBlur(name, fieldValue)); if (runAsyncValidation && ~asyncBlurFields.indexOf(name)) { var _extends2; var syncError = syncValidate(_extends({}, subForm.data, (_extends2 = {}, _extends2[name] = fieldValue, _extends2)))[name]; // only dispatch async call if all synchronous client-side validation passes for this field if (!syncError) { runAsyncValidation(); } } }; }; var pristine = _util.isPristine(subForm.initial, subForm.data); var _combineValidationErrors = combineValidationErrors(subForm); var valid = _combineValidationErrors.valid; var errors = _objectWithoutProperties(_combineValidationErrors, ['valid']); var handleChange = function handleChange(name, value) { return function (event) { var doChange = _bindActionData2['default'](change, { touch: touchOnChange }); dispatch(doChange(name, value === undefined ? event.target.value : value)); }; }; var handleSubmit = function handleSubmit(submitOrEvent) { var createEventHandler = function createEventHandler(submit) { return function (event) { if (event) { event.preventDefault(); } var submitWithPromiseCheck = function submitWithPromiseCheck() { var result = submit(subForm.data); if (result && typeof result.then === 'function') { // you're showing real promise, kid! var stopAndReturn = function stopAndReturn(x) { dispatch(stopSubmit()); return x; }; dispatch(startSubmit()); result.then(stopAndReturn, stopAndReturn); } }; dispatch(touch.apply(undefined, fields)); if (runAsyncValidation) { return runAsyncValidation().then(function (asyncValid) { if (valid && asyncValid) { return submitWithPromiseCheck(subForm.data); } }); } else if (valid) { return submitWithPromiseCheck(subForm.data); } }; }; if (typeof submitOrEvent === 'function') { return createEventHandler(submitOrEvent); } var onSubmit = _this.props.onSubmit; if (!onSubmit) { throw new Error('You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop'); } createEventHandler(onSubmit)(submitOrEvent /* is event */); }; return _react2['default'].createElement(DecoratedComponent, _extends({ asyncValidate: runAsyncValidation, asyncValidating: subForm.asyncValidating, data: subForm.data, dirty: !pristine, dispatch: dispatch, errors: errors, formKey: formKey, handleBlur: handleBlur, handleChange: handleChange, handleSubmit: handleSubmit, initializeForm: function (data) { return dispatch(initialize(data)); }, invalid: !valid, pristine: pristine, resetForm: function () { return dispatch(reset()); }, submitting: subForm.submitting, touch: function () { for (var _len = arguments.length, touchFields = Array(_len), _key = 0; _key < _len; _key++) { touchFields[_key] = arguments[_key]; } return dispatch(touch.apply(undefined, touchFields)); }, touched: subForm.touched, touchAll: function () { return dispatch(touch.apply(undefined, fields)); }, untouch: function () { for (var _len2 = arguments.length, untouchFields = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { untouchFields[_key2] = arguments[_key2]; } return dispatch(untouch.apply(undefined, untouchFields)); }, untouchAll: function () { return dispatch(untouchAll.apply(undefined, fields)); }, valid: valid }, passableProps)); // pass other props }; _createClass(ReduxForm, null, [{ key: 'displayName', value: 'ReduxForm(' + _util.getDisplayName(DecoratedComponent) + ')', enumerable: true }, { key: 'DecoratedComponent', value: DecoratedComponent, enumerable: true }, { key: 'propTypes', value: { formName: _react.PropTypes.string, formKey: _react.PropTypes.string, form: _react.PropTypes.object, onSubmit: _react.PropTypes.func, dispatch: _react.PropTypes.func.isRequired }, enumerable: true }, { key: 'defaultProps', value: { formName: formName }, enumerable: true }]); return ReduxForm; })(_react.Component); }; } function reduxForm(formName, fields) { var syncValidate = arguments.length <= 2 || arguments[2] === undefined ? function () { return { valid: true }; } : arguments[2]; var touchOnBlur = arguments.length <= 3 || arguments[3] === undefined ? true : arguments[3]; var touchOnChange = arguments.length <= 4 || arguments[4] === undefined ? false : arguments[4]; var decorator = createReduxFormDecorator(formName, fields, syncValidate, !!touchOnBlur, !!touchOnChange); decorator.async = function (asyncValidate) { for (var _len3 = arguments.length, blurFields = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { blurFields[_key3 - 1] = arguments[_key3]; } return createReduxFormDecorator(formName, fields, syncValidate, !!touchOnBlur, !!touchOnChange, asyncValidate, Array.isArray(blurFields[0]) ? blurFields[0] : blurFields); }; return decorator; } module.exports = exports['default']; /***/ }, /* 7 */ /***/ function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = createStoreShape; function createStoreShape(PropTypes) { return PropTypes.shape({ subscribe: PropTypes.func.isRequired, dispatch: PropTypes.func.isRequired, getState: PropTypes.func.isRequired }); } module.exports = exports["default"]; /***/ }, /* 8 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports['default'] = createStore; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _utilsIsPlainObject = __webpack_require__(10); var _utilsIsPlainObject2 = _interopRequireDefault(_utilsIsPlainObject); /** * These are private action types reserved by Redux. * For any unknown actions, you must return the current state. * If the current state is undefined, you must return the initial state. * Do not reference these action types directly in your code. */ var ActionTypes = { INIT: '@@redux/INIT' }; exports.ActionTypes = ActionTypes; /** * Creates a Redux store that holds the state tree. * The only way to change the data in the store is to call `dispatch()` on it. * * There should only be a single store in your app. To specify how different * parts of the state tree respond to actions, you may combine several reducers * into a single reducer function by using `combineReducers`. * * @param {Function} reducer A function that returns the next state tree, given * the current state tree and the action to handle. * * @param {any} [initialState] The initial state. You may optionally specify it * to hydrate the state from the server in universal apps, or to restore a * previously serialized user session. * If you use `combineReducers` to produce the root reducer function, this must be * an object with the same shape as `combineReducers` keys. * * @returns {Store} A Redux store that lets you read the state, dispatch actions * and subscribe to changes. */ function createStore(reducer, initialState) { if (typeof reducer !== 'function') { throw new Error('Expected the reducer to be a function.'); } var currentReducer = reducer; var currentState = initialState; var listeners = []; var isDispatching = false; /** * Reads the state tree managed by the store. * * @returns {any} The current state tree of your application. */ function getState() { return currentState; } /** * Adds a change listener. It will be called any time an action is dispatched, * and some part of the state tree may potentially have changed. You may then * call `getState()` to read the current state tree inside the callback. * * @param {Function} listener A callback to be invoked on every dispatch. * @returns {Function} A function to remove this change listener. */ function subscribe(listener) { listeners.push(listener); return function unsubscribe() { var index = listeners.indexOf(listener); listeners.splice(index, 1); }; } /** * Dispatches an action. It is the only way to trigger a state change. * * The `reducer` function, used to create the store, will be called with the * current state tree and the given `action`. Its return value will * be considered the **next** state of the tree, and the change listeners * will be notified. * * The base implementation only supports plain object actions. If you want to * dispatch a Promise, an Observable, a thunk, or something else, you need to * wrap your store creating function into the corresponding middleware. For * example, see the documentation for the `redux-thunk` package. Even the * middleware will eventually dispatch plain object actions using this method. * * @param {Object} action A plain object representing “what changed”. It is * a good idea to keep actions serializable so you can record and replay user * sessions, or use the time travelling `redux-devtools`. * * @returns {Object} For convenience, the same action object you dispatched. * * Note that, if you use a custom middleware, it may wrap `dispatch()` to * return something else (for example, a Promise you can await). */ function dispatch(action) { if (!_utilsIsPlainObject2['default'](action)) { throw new Error('Actions must be plain objects. Use custom middleware for async actions.'); } if (isDispatching) { throw new Error('Reducers may not dispatch actions.'); } try { isDispatching = true; currentState = currentReducer(currentState, action); } finally { isDispatching = false; } listeners.slice().forEach(function (listener) { return listener(); }); return action; } /** * Returns the reducer currently used by the store to calculate the state. * * It is likely that you will only need this function if you implement a hot * reloading mechanism for Redux. * * @returns {Function} The reducer used by the current store. */ function getReducer() { return currentReducer; } /** * Replaces the reducer currently used by the store to calculate the state. * * You might need this if your app implements code splitting and you want to * load some of the reducers dynamically. You might also need this if you * implement a hot reloading mechanism for Redux. * * @param {Function} nextReducer The reducer for the store to use instead. * @returns {void} */ function replaceReducer(nextReducer) { currentReducer = nextReducer; dispatch({ type: ActionTypes.INIT }); } // When a store is created, an "INIT" action is dispatched so that every // reducer returns their initial state. This effectively populates // the initial state tree. dispatch({ type: ActionTypes.INIT }); return { dispatch: dispatch, subscribe: subscribe, getState: getState, getReducer: getReducer, replaceReducer: replaceReducer }; } /***/ }, /* 9 */ /***/ function(module, exports) { /** * Composes functions from left to right. * * @param {...Function} funcs - The functions to compose. Each is expected to * accept a function as an argument and to return a function. * @returns {Function} A function obtained by composing functions from left to * right. */ "use strict"; exports.__esModule = true; exports["default"] = compose; function compose() { for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { funcs[_key] = arguments[_key]; } return funcs.reduceRight(function (composed, f) { return f(composed); }); } module.exports = exports["default"]; /***/ }, /* 10 */ /***/ function(module, exports) { 'use strict'; exports.__esModule = true; exports['default'] = isPlainObject; var fnToString = function fnToString(fn) { return Function.prototype.toString.call(fn); }; /** * @param {any} obj The object to inspect. * @returns {boolean} True if the argument appears to be a plain object. */ function isPlainObject(obj) { if (!obj || typeof obj !== 'object') { return false; } var proto = typeof obj.constructor === 'function' ? Object.getPrototypeOf(obj) : Object.prototype; if (proto === null) { return true; } var constructor = proto.constructor; return typeof constructor === 'function' && constructor instanceof constructor && fnToString(constructor) === fnToString(Object); } module.exports = exports['default']; /***/ }, /* 11 */ /***/ function(module, exports) { /** * Applies a function to every key-value pair inside an object. * * @param {Object} obj The source object. * @param {Function} fn The mapper function taht receives the value and the key. * @returns {Object} A new object that contains the mapped values for the keys. */ "use strict"; exports.__esModule = true; exports["default"] = mapValues; function mapValues(obj, fn) { return Object.keys(obj).reduce(function (result, key) { result[key] = fn(obj[key], key); return result; }, {}); } module.exports = exports["default"]; /***/ }, /* 12 */ /***/ function(module, exports) { // shim for using process in browser var process = module.exports = {}; var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = setTimeout(cleanUpNextTick); draining = true; var len = queue.length; while(len) { currentQueue = queue; queue = []; while (++queueIndex < len) { currentQueue[queueIndex].run(); } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; clearTimeout(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) { setTimeout(drainQueue, 0); } }; // 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.binding = function (name) { throw new Error('process.binding is not supported'); }; // TODO(shtylman) process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; process.umask = function() { return 0; }; /***/ }, /* 13 */ /***/ function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_13__; /***/ }, /* 14 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports['default'] = connectReduxForm; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _reactRedux = __webpack_require__(19); var _reduxForm2 = __webpack_require__(6); var _reduxForm3 = _interopRequireDefault(_reduxForm2); var connector = _reactRedux.connect(function (state) { return { form: state.form }; }); function createDecorator() { for (var _len = arguments.length, decorators = Array(_len), _key = 0; _key < _len; _key++) { decorators[_key] = arguments[_key]; } return function (DecoratedComponent) { return decorators.reduce(function (accumulator, decorator) { return decorator(accumulator); }, DecoratedComponent); }; } function connectReduxForm() { for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } var decorator = createDecorator(_reduxForm3['default'].apply(undefined, args), connector); decorator.async = function () { var _reduxForm; return createDecorator((_reduxForm = _reduxForm3['default'].apply(undefined, args)).async.apply(_reduxForm, arguments), connector); }; return decorator; } module.exports = exports['default']; /***/ }, /* 15 */ /***/ function(module, exports) { 'use strict'; exports.__esModule = true; exports.getDisplayName = getDisplayName; exports.isPristine = isPristine; function getDisplayName(Comp) { return Comp.displayName || Comp.name || 'Component'; } function isPristine(initial, data) { if (initial === data) { return true; } var dataKeys = Object.keys(data); for (var i = 0; i < dataKeys.length; i++) { var key = dataKeys[i]; var value = data[key]; var initialValue = initial[key]; if ((value || initialValue) && /* allow '' to equate to undefined or null */value !== initialValue) { return false; } } return true; } /***/ }, /* 16 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports['default'] = createAll; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _createProvider = __webpack_require__(18); var _createProvider2 = _interopRequireDefault(_createProvider); var _createConnect = __webpack_require__(17); var _createConnect2 = _interopRequireDefault(_createConnect); function createAll(React) { var Provider = _createProvider2['default'](React); var connect = _createConnect2['default'](React); return { Provider: Provider, connect: connect }; } module.exports = exports['default']; /***/ }, /* 17 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {'use strict'; exports.__esModule = 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 _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['default'] = createConnect; 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 _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 _utilsCreateStoreShape = __webpack_require__(7); var _utilsCreateStoreShape2 = _interopRequireDefault(_utilsCreateStoreShape); var _utilsShallowEqual = __webpack_require__(21); var _utilsShallowEqual2 = _interopRequireDefault(_utilsShallowEqual); var _utilsIsPlainObject = __webpack_require__(20); var _utilsIsPlainObject2 = _interopRequireDefault(_utilsIsPlainObject); var _utilsWrapActionCreators = __webpack_require__(22); var _utilsWrapActionCreators2 = _interopRequireDefault(_utilsWrapActionCreators); var _invariant = __webpack_require__(23); var _invariant2 = _interopRequireDefault(_invariant); var defaultMapStateToProps = function defaultMapStateToProps() { return {}; }; var defaultMapDispatchToProps = function defaultMapDispatchToProps(dispatch) { return { dispatch: dispatch }; }; var defaultMergeProps = function defaultMergeProps(stateProps, dispatchProps, parentProps) { return _extends({}, parentProps, stateProps, dispatchProps); }; function getDisplayName(Component) { return Component.displayName || Component.name || 'Component'; } // Helps track hot reloading. var nextVersion = 0; function createConnect(React) { var Component = React.Component; var PropTypes = React.PropTypes; var storeShape = _utilsCreateStoreShape2['default'](PropTypes); return function connect(mapStateToProps, mapDispatchToProps, mergeProps) { var shouldSubscribe = Boolean(mapStateToProps); var finalMapStateToProps = mapStateToProps || defaultMapStateToProps; var finalMapDispatchToProps = _utilsIsPlainObject2['default'](mapDispatchToProps) ? _utilsWrapActionCreators2['default'](mapDispatchToProps) : mapDispatchToProps || defaultMapDispatchToProps; var finalMergeProps = mergeProps || defaultMergeProps; var shouldUpdateStateProps = finalMapStateToProps.length > 1; var shouldUpdateDispatchProps = finalMapDispatchToProps.length > 1; // Helps track hot reloading. var version = nextVersion++; function computeStateProps(store, props) { var state = store.getState(); var stateProps = shouldUpdateStateProps ? finalMapStateToProps(state, props) : finalMapStateToProps(state); _invariant2['default'](_utilsIsPlainObject2['default'](stateProps), '`mapStateToProps` must return an object. Instead received %s.', stateProps); return stateProps; } function computeDispatchProps(store, props) { var dispatch = store.dispatch; var dispatchProps = shouldUpdateDispatchProps ? finalMapDispatchToProps(dispatch, props) : finalMapDispatchToProps(dispatch); _invariant2['default'](_utilsIsPlainObject2['default'](dispatchProps), '`mapDispatchToProps` must return an object. Instead received %s.', dispatchProps); return dispatchProps; } function _computeNextState(stateProps, dispatchProps, parentProps) { var mergedProps = finalMergeProps(stateProps, dispatchProps, parentProps); _invariant2['default'](_utilsIsPlainObject2['default'](mergedProps), '`mergeProps` must return an object. Instead received %s.', mergedProps); return mergedProps; } return function wrapWithConnect(WrappedComponent) { var Connect = (function (_Component) { _inherits(Connect, _Component); Connect.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps, nextState) { return !_utilsShallowEqual2['default'](this.state.props, nextState.props); }; _createClass(Connect, null, [{ key: 'displayName', value: 'Connect(' + getDisplayName(WrappedComponent) + ')', enumerable: true }, { key: 'WrappedComponent', value: WrappedComponent, enumerable: true }, { key: 'contextTypes', value: { store: storeShape }, enumerable: true }, { key: 'propTypes', value: { store: storeShape }, enumerable: true }]); function Connect(props, context) { _classCallCheck(this, Connect); _Component.call(this, props, context); this.version = version; this.store = props.store || context.store; _invariant2['default'](this.store, 'Could not find "store" in either the context or ' + ('props of "' + this.constructor.displayName + '". ') + 'Either wrap the root component in a <Provider>, ' + ('or explicitly pass "store" as a prop to "' + this.constructor.displayName + '".')); this.stateProps = computeStateProps(this.store, props); this.dispatchProps = computeDispatchProps(this.store, props); this.state = { props: this.computeNextState() }; } Connect.prototype.computeNextState = function computeNextState() { var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0]; return _computeNextState(this.stateProps, this.dispatchProps, props); }; Connect.prototype.updateStateProps = function updateStateProps() { var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0]; var nextStateProps = computeStateProps(this.store, props); if (_utilsShallowEqual2['default'](nextStateProps, this.stateProps)) { return false; } this.stateProps = nextStateProps; return true; }; Connect.prototype.updateDispatchProps = function updateDispatchProps() { var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0]; var nextDispatchProps = computeDispatchProps(this.store, props); if (_utilsShallowEqual2['default'](nextDispatchProps, this.dispatchProps)) { return false; } this.dispatchProps = nextDispatchProps; return true; }; Connect.prototype.updateState = function updateState() { var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0]; var nextState = this.computeNextState(props); if (!_utilsShallowEqual2['default'](nextState, this.state.props)) { this.setState({ props: nextState }); } }; Connect.prototype.isSubscribed = function isSubscribed() { return typeof this.unsubscribe === 'function'; }; Connect.prototype.trySubscribe = function trySubscribe() { if (shouldSubscribe && !this.unsubscribe) { this.unsubscribe = this.store.subscribe(this.handleChange.bind(this)); this.handleChange(); } }; Connect.prototype.tryUnsubscribe = function tryUnsubscribe() { if (this.unsubscribe) { this.unsubscribe(); this.unsubscribe = null; } }; Connect.prototype.componentDidMount = function componentDidMount() { this.trySubscribe(); }; Connect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if (!_utilsShallowEqual2['default'](nextProps, this.props)) { if (shouldUpdateStateProps) { this.updateStateProps(nextProps); } if (shouldUpdateDispatchProps) { this.updateDispatchProps(nextProps); } this.updateState(nextProps); } }; Connect.prototype.componentWillUnmount = function componentWillUnmount() { this.tryUnsubscribe(); }; Connect.prototype.handleChange = function handleChange() { if (this.updateStateProps()) { this.updateState(); } }; Connect.prototype.getWrappedInstance = function getWrappedInstance() { return this.refs.wrappedInstance; }; Connect.prototype.render = function render() { return React.createElement(WrappedComponent, _extends({ ref: 'wrappedInstance' }, this.state.props)); }; return Connect; })(Component); if ( // Node-like CommonJS environments (Browserify, Webpack) typeof process !== 'undefined' && typeof process.env !== 'undefined' && (undefined) !== 'production' || // React Native typeof __DEV__ !== 'undefined' && __DEV__ //eslint-disable-line no-undef ) { Connect.prototype.componentWillUpdate = function componentWillUpdate() { if (this.version === version) { return; } // We are hot reloading! this.version = version; // Update the state and bindings. this.trySubscribe(); this.updateStateProps(); this.updateDispatchProps(); this.updateState(); }; } return Connect; }; }; } module.exports = exports['default']; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(12))) /***/ }, /* 18 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = 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; }; })(); exports['default'] = createProvider; 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 _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 _utilsCreateStoreShape = __webpack_require__(7); var _utilsCreateStoreShape2 = _interopRequireDefault(_utilsCreateStoreShape); function isUsingOwnerContext(React) { var version = React.version; if (typeof version !== 'string') { return false; } var sections = version.split('.'); var major = parseInt(sections[0], 10); var minor = parseInt(sections[1], 10); return major === 0 && minor === 13; } function createProvider(React) { var Component = React.Component; var PropTypes = React.PropTypes; var Children = React.Children; var storeShape = _utilsCreateStoreShape2['default'](PropTypes); var requireFunctionChild = isUsingOwnerContext(React); var didWarn = false; function warnAboutFunction() { if (didWarn || requireFunctionChild) { return; } didWarn = true; console.error( // eslint-disable-line no-console 'With React 0.14 and later versions, you no longer need to ' + 'wrap <Provider> child into a function.'); } function warnAboutElement() { if (didWarn || !requireFunctionChild) { return; } didWarn = true; console.error( // eslint-disable-line no-console 'With React 0.13, you need to ' + 'wrap <Provider> child into a function. ' + 'This restriction will be removed with React 0.14.'); } return (function (_Component) { _inherits(Provider, _Component); Provider.prototype.getChildContext = function getChildContext() { return { store: this.state.store }; }; _createClass(Provider, null, [{ key: 'childContextTypes', value: { store: storeShape.isRequired }, enumerable: true }, { key: 'propTypes', value: { store: storeShape.isRequired, children: (requireFunctionChild ? PropTypes.func : PropTypes.element).isRequired }, enumerable: true }]); function Provider(props, context) { _classCallCheck(this, Provider); _Component.call(this, props, context); this.state = { store: props.store }; } Provider.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { var store = this.state.store; var nextStore = nextProps.store; if (store !== nextStore) { var nextReducer = nextStore.getReducer(); store.replaceReducer(nextReducer); } }; Provider.prototype.render = function render() { var children = this.props.children; if (typeof children === 'function') { warnAboutFunction(); children = children(); } else { warnAboutElement(); } return Children.only(children); }; return Provider; })(Component); } module.exports = exports['default']; /***/ }, /* 19 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _react = __webpack_require__(13); var _react2 = _interopRequireDefault(_react); var _componentsCreateAll = __webpack_require__(16); var _componentsCreateAll2 = _interopRequireDefault(_componentsCreateAll); var _createAll = _componentsCreateAll2['default'](_react2['default']); var Provider = _createAll.Provider; var connect = _createAll.connect; exports.Provider = Provider; exports.connect = connect; /***/ }, /* 20 */ /***/ function(module, exports) { 'use strict'; exports.__esModule = true; exports['default'] = isPlainObject; var fnToString = function fnToString(fn) { return Function.prototype.toString.call(fn); }; /** * @param {any} obj The object to inspect. * @returns {boolean} True if the argument appears to be a plain object. */ function isPlainObject(obj) { if (!obj || typeof obj !== 'object') { return false; } var proto = typeof obj.constructor === 'function' ? Object.getPrototypeOf(obj) : Object.prototype; if (proto === null) { return true; } var constructor = proto.constructor; return typeof constructor === 'function' && constructor instanceof constructor && fnToString(constructor) === fnToString(Object); } module.exports = exports['default']; /***/ }, /* 21 */ /***/ function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = shallowEqual; 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; } module.exports = exports["default"]; /***/ }, /* 22 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports['default'] = wrapActionCreators; var _redux = __webpack_require__(24); function wrapActionCreators(actionCreators) { return function (dispatch) { return _redux.bindActionCreators(actionCreators, dispatch); }; } module.exports = exports['default']; /***/ }, /* 23 */ /***/ function(module, exports, __webpack_require__) { /** * 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. * * @providesModule invariant */ 'use strict'; /** * 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 ((undefined) !== 'production') { 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( 'Invariant Violation: ' + format.replace(/%s/g, function() { return args[argIndex++]; }) ); } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } }; module.exports = invariant; /***/ }, /* 24 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _createStore = __webpack_require__(8); var _createStore2 = _interopRequireDefault(_createStore); var _utilsCombineReducers = __webpack_require__(27); var _utilsCombineReducers2 = _interopRequireDefault(_utilsCombineReducers); var _utilsBindActionCreators = __webpack_require__(26); var _utilsBindActionCreators2 = _interopRequireDefault(_utilsBindActionCreators); var _utilsApplyMiddleware = __webpack_require__(25); var _utilsApplyMiddleware2 = _interopRequireDefault(_utilsApplyMiddleware); var _utilsCompose = __webpack_require__(9); var _utilsCompose2 = _interopRequireDefault(_utilsCompose); exports.createStore = _createStore2['default']; exports.combineReducers = _utilsCombineReducers2['default']; exports.bindActionCreators = _utilsBindActionCreators2['default']; exports.applyMiddleware = _utilsApplyMiddleware2['default']; exports.compose = _utilsCompose2['default']; /***/ }, /* 25 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = 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; }; exports['default'] = applyMiddleware; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _compose = __webpack_require__(9); var _compose2 = _interopRequireDefault(_compose); /** * Creates a store enhancer that applies middleware to the dispatch method * of the Redux store. This is handy for a variety of tasks, such as expressing * asynchronous actions in a concise manner, or logging every action payload. * * See `redux-thunk` package as an example of the Redux middleware. * * Because middleware is potentially asynchronous, this should be the first * store enhancer in the composition chain. * * Note that each middleware will be given the `dispatch` and `getState` functions * as named arguments. * * @param {...Function} middlewares The middleware chain to be applied. * @returns {Function} A store enhancer applying the middleware. */ function applyMiddleware() { for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { middlewares[_key] = arguments[_key]; } return function (next) { return function (reducer, initialState) { var store = next(reducer, initialState); var _dispatch = store.dispatch; var chain = []; var middlewareAPI = { getState: store.getState, dispatch: function dispatch(action) { return _dispatch(action); } }; chain = middlewares.map(function (middleware) { return middleware(middlewareAPI); }); _dispatch = _compose2['default'].apply(undefined, chain.concat([store.dispatch])); return _extends({}, store, { dispatch: _dispatch }); }; }; } module.exports = exports['default']; /***/ }, /* 26 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports['default'] = bindActionCreators; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _utilsMapValues = __webpack_require__(11); var _utilsMapValues2 = _interopRequireDefault(_utilsMapValues); function bindActionCreator(actionCreator, dispatch) { return function () { return dispatch(actionCreator.apply(undefined, arguments)); }; } /** * Turns an object whose values are action creators, into an object with the * same keys, but with every function wrapped into a `dispatch` call so they * may be invoked directly. This is just a convenience method, as you can call * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. * * For convenience, you can also pass a single function as the first argument, * and get a function in return. * * @param {Function|Object} actionCreators An object whose values are action * creator functions. One handy way to obtain it is to use ES6 `import * as` * syntax. You may also pass a single function. * * @param {Function} dispatch The `dispatch` function available on your Redux * store. * * @returns {Function|Object} The object mimicking the original object, but with * every action creator wrapped into the `dispatch` call. If you passed a * function as `actionCreators`, the return value will also be a single * function. */ function bindActionCreators(actionCreators, dispatch) { if (typeof actionCreators === 'function') { return bindActionCreator(actionCreators, dispatch); } if (typeof actionCreators !== 'object' || actionCreators == null) { throw new Error('bindActionCreators expected an object or a function, instead received ' + typeof actionCreators + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?'); } return _utilsMapValues2['default'](actionCreators, function (actionCreator) { return bindActionCreator(actionCreator, dispatch); }); } module.exports = exports['default']; /***/ }, /* 27 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {'use strict'; exports.__esModule = true; exports['default'] = combineReducers; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _createStore = __webpack_require__(8); var _utilsIsPlainObject = __webpack_require__(10); var _utilsIsPlainObject2 = _interopRequireDefault(_utilsIsPlainObject); var _utilsMapValues = __webpack_require__(11); var _utilsMapValues2 = _interopRequireDefault(_utilsMapValues); var _utilsPick = __webpack_require__(28); var _utilsPick2 = _interopRequireDefault(_utilsPick); function getErrorMessage(key, action) { var actionType = action && action.type; var actionName = actionType && '"' + actionType.toString() + '"' || 'an action'; return 'Reducer "' + key + '" returned undefined handling ' + actionName + '. ' + 'To ignore an action, you must explicitly return the previous state.'; } function verifyStateShape(initialState, currentState) { var reducerKeys = Object.keys(currentState); if (reducerKeys.length === 0) { console.error('Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'); return; } if (!_utilsIsPlainObject2['default'](initialState)) { console.error('initialState has unexpected type of "' + ({}).toString.call(initialState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected initialState to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"')); return; } var unexpectedKeys = Object.keys(initialState).filter(function (key) { return reducerKeys.indexOf(key) < 0; }); if (unexpectedKeys.length > 0) { console.error('Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" in initialState will be ignored. ') + ('Expected to find one of the known reducer keys instead: "' + reducerKeys.join('", "') + '"')); } } /** * Turns an object whose values are different reducer functions, into a single * reducer function. It will call every child reducer, and gather their results * into a single state object, whose keys correspond to the keys of the passed * reducer functions. * * @param {Object} reducers An object whose values correspond to different * reducer functions that need to be combined into one. One handy way to obtain * it is to use ES6 `import * as reducers` syntax. The reducers may never return * undefined for any action. Instead, they should return their initial state * if the state passed to them was undefined, and the current state for any * unrecognized action. * * @returns {Function} A reducer function that invokes every reducer inside the * passed object, and builds a state object with the same shape. */ function combineReducers(reducers) { var finalReducers = _utilsPick2['default'](reducers, function (val) { return typeof val === 'function'; }); Object.keys(finalReducers).forEach(function (key) { var reducer = finalReducers[key]; if (typeof reducer(undefined, { type: _createStore.ActionTypes.INIT }) === 'undefined') { throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined.'); } var type = Math.random().toString(36).substring(7).split('').join('.'); if (typeof reducer(undefined, { type: type }) === 'undefined') { throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + _createStore.ActionTypes.INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined.'); } }); var defaultState = _utilsMapValues2['default'](finalReducers, function () { return undefined; }); var stateShapeVerified; return function combination(state, action) { if (state === undefined) state = defaultState; var finalState = _utilsMapValues2['default'](finalReducers, function (reducer, key) { var newState = reducer(state[key], action); if (typeof newState === 'undefined') { throw new Error(getErrorMessage(key, action)); } return newState; }); if ( // Node-like CommonJS environments (Browserify, Webpack) typeof process !== 'undefined' && typeof process.env !== 'undefined' && (undefined) !== 'production' || // React Native typeof __DEV__ !== 'undefined' && __DEV__ //eslint-disable-line no-undef ) { if (!stateShapeVerified) { verifyStateShape(state, finalState); stateShapeVerified = true; } } return finalState; }; } module.exports = exports['default']; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(12))) /***/ }, /* 28 */ /***/ function(module, exports) { /** * Picks key-value pairs from an object where values satisfy a predicate. * * @param {Object} obj The object to pick from. * @param {Function} fn The predicate the values must satisfy to be copied. * @returns {Object} The object with the values that satisfied the predicate. */ "use strict"; exports.__esModule = true; exports["default"] = pick; function pick(obj, fn) { return Object.keys(obj).reduce(function (result, key) { if (fn(obj[key])) { result[key] = obj[key]; } return result; }, {}); } module.exports = exports["default"]; /***/ } /******/ ]) }); ;
mock/containers.js
just-paja/improtresk-web
import React from 'react' import { mount } from 'enzyme' import { Provider } from 'react-redux' import { StaticRouter } from 'react-router' import mockStore from './store' export const renderContainer = (children, state) => { const store = mockStore(state) const comp = mount( <StaticRouter context={{}}> <Provider store={store}> {children} </Provider> </StaticRouter> ) comp.store = store return comp }
src/server.js
niketpathak/npk-website
/** * @author Niket Pathak. (http://www.niketpathak.com/) * * Copyright © 2014-present. 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 path from 'path'; import express from 'express'; import cookieParser from 'cookie-parser'; import bodyParser from 'body-parser'; import expressJwt, { UnauthorizedError as Jwt401Error } from 'express-jwt'; import expressGraphQL from 'express-graphql'; import jwt from 'jsonwebtoken'; import React from 'react'; import ReactDOM from 'react-dom/server'; import PrettyError from 'pretty-error'; import App from './components/App'; import Html from './components/Html'; import { ErrorPageWithoutStyle } from './routes/error/ErrorPage'; import errorPageStyle from './routes/error/ErrorPage.css'; import createFetch from './createFetch'; import passport from './passport'; import router from './router'; import models from './data/models'; import schema from './data/schema'; import assets from './assets.json'; // eslint-disable-line import/no-unresolved import config from './config'; const app = express(); // // Tell any CSS tooling (such as Material UI) to use all vendor prefixes if the // user agent is not known. // ----------------------------------------------------------------------------- global.navigator = global.navigator || {}; global.navigator.userAgent = global.navigator.userAgent || 'all'; // // Register Node.js middleware // ----------------------------------------------------------------------------- app.use(express.static(path.resolve(__dirname, 'public'))); app.use(cookieParser()); app.use(bodyParser.urlencoded({ extended: true })); app.use(bodyParser.json()); // // Authentication // ----------------------------------------------------------------------------- app.use(expressJwt({ secret: config.auth.jwt.secret, credentialsRequired: false, getToken: req => req.cookies.id_token, })); // Error handler for express-jwt app.use((err, req, res, next) => { // eslint-disable-line no-unused-vars if (err instanceof Jwt401Error) { console.error('[express-jwt-error]', req.cookies.id_token); // `clearCookie`, otherwise user can't use web-app until cookie expires res.clearCookie('id_token'); } next(err); }); app.use(passport.initialize()); if (__DEV__) { app.enable('trust proxy'); } app.get('/login/facebook', passport.authenticate('facebook', { scope: ['email', 'user_location'], session: false }), ); app.get('/login/facebook/return', passport.authenticate('facebook', { failureRedirect: '/login', session: false }), (req, res) => { const expiresIn = 60 * 60 * 24 * 180; // 180 days const token = jwt.sign(req.user, config.auth.jwt.secret, { expiresIn }); res.cookie('id_token', token, { maxAge: 1000 * expiresIn, httpOnly: true }); res.redirect('/'); }, ); // // Register API middleware // ----------------------------------------------------------------------------- app.use('/graphql', expressGraphQL(req => ({ schema, graphiql: __DEV__, rootValue: { request: req }, pretty: __DEV__, }))); // // Register server-side rendering middleware // ----------------------------------------------------------------------------- app.get('*', async (req, res, next) => { try { const css = new Set(); // Global (context) variables that can be easily accessed from any React component // https://facebook.github.io/react/docs/context.html const context = { // Enables critical path CSS rendering // https://github.com/kriasoft/isomorphic-style-loader insertCss: (...styles) => { // eslint-disable-next-line no-underscore-dangle styles.forEach(style => css.add(style._getCss())); }, // Universal HTTP client fetch: createFetch({ baseUrl: config.api.serverUrl, cookie: req.headers.cookie, }), }; const route = await router.resolve({ ...context, path: req.path, query: req.query, }); if (route.redirect) { res.redirect(route.status || 302, route.redirect); return; } const data = { ...route }; data.children = ReactDOM.renderToString(<App context={context}>{route.component}</App>); data.styles = [ { id: 'css', cssText: [...css].join('') }, ]; data.scripts = [assets.vendor.js]; if (route.chunks) { data.scripts.push(...route.chunks.map(chunk => assets[chunk].js)); } data.scripts.push(assets.client.js); data.app = { apiUrl: config.api.clientUrl, }; const html = ReactDOM.renderToStaticMarkup(<Html {...data} />); res.status(route.status || 200); res.send(`<!doctype html>${html}`); } catch (err) { next(err); } }); // // Error handling // ----------------------------------------------------------------------------- const pe = new PrettyError(); pe.skipNodeFiles(); pe.skipPackage('express'); app.use((err, req, res, next) => { // eslint-disable-line no-unused-vars console.error(pe.render(err)); const html = ReactDOM.renderToStaticMarkup( <Html title="Internal Server Error" description={err.message} styles={[{ id: 'css', cssText: errorPageStyle._getCss() }]} // eslint-disable-line no-underscore-dangle > {ReactDOM.renderToString(<ErrorPageWithoutStyle error={err} />)} </Html>, ); res.status(err.status || 500); res.send(`<!doctype html>${html}`); }); // // Launch the server // ----------------------------------------------------------------------------- const promise = models.sync().catch(err => console.error(err.stack)); if (!module.hot) { promise.then(() => { app.listen(config.port, () => { console.info(`The server is running at http://localhost:${config.port}/`); }); }); } // // Hot Module Replacement // ----------------------------------------------------------------------------- if (module.hot) { app.hot = module.hot; module.hot.accept('./router'); } export default app;
test/helpers/shallowRenderHelper.js
sani-banani/photo-location
/** * Function to get the shallow output for a given component * As we are using phantom.js, we also need to include the fn.proto.bind shim! * * @see http://simonsmith.io/unit-testing-react-components-without-a-dom/ * @author somonsmith */ import React from 'react'; import TestUtils from 'react-addons-test-utils'; /** * Get the shallow rendered component * * @param {Object} component The component to return the output for * @param {Object} props [optional] The components properties * @param {Mixed} ...children [optional] List of children * @return {Object} Shallow rendered output */ export default function createComponent(component, props = {}, ...children) { const shallowRenderer = TestUtils.createRenderer(); shallowRenderer.render(React.createElement(component, props, children.length > 1 ? children : children[0])); return shallowRenderer.getRenderOutput(); }
web/a/bower_components/datatables/media/js/jquery.js
ivphpan/amkodorastanakz
/*! jQuery v1.11.1 | (c) 2005, 2014 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.1",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)>=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=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"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=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)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(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||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(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 I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(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 ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(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 typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),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))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),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===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(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?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.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 fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.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},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.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=fb.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=fb.selectors={cacheLength:50,createPseudo:hb,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(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===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]||fb.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]&&fb.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(cb,db).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("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.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+" ").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()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(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),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).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:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(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]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.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?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(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 sb(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 tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(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 vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(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?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(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 vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(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]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.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(cb,db),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(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(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 ab(){return!0}function bb(){return!1}function cb(){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!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&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?ab:bb):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:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,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=bb;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=bb),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 db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={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>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(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,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(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 xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(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 Bb(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?(xb(b).text=a.text,yb(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)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(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=db(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(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.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(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.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=wb(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=wb(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(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(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(ub(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(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(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(ub(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&&nb.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(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.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(qb,"")));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 Cb,Db={};function Eb(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 Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[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 Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.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&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.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 Lb(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.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 Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(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",Fb(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 Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(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 Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(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]=Ub(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=Qb.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]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[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?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(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 Nb.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(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[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}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),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=Ib(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 Vb(this,!0)},hide:function(){return Vb(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 Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,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=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):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):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.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}}},Zb.propHooks.scrollTop=Zb.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=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.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 fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(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 hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(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")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(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],ac.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?Fb(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=hc(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 jc(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 kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),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:$b||fc(),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(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,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(kc,{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],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.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=kc(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&&cc.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(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("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($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=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(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=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 lc=/\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(lc,""):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 mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=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)?nc:mc)),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)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?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}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&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=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={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}},oc.id=oc.name=oc.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:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.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 sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?: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):sc.test(a.nodeName)||tc.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 uc=/[\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(uc," "):" ")){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(uc," "):"")){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(uc," ").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 vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\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(xc,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 yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(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 Mc(a,b,c,d){var e={},f=a===Ic;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 Nc(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 Oc(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 Pc(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:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,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?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),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=Cc.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||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),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]?", "+Jc+"; 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=Mc(Ic,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=Oc(k,v,c)),u=Pc(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.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),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 Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(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)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},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")&&Uc.test(this.nodeName)&&!Tc.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(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;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 Xc[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=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){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 _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.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(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.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,_c.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 bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.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.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(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=dd(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||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),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=dd(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]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.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 ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
src/ActivityItemDefault/index.js
christianalfoni/ducky-components
import ListCompositeActivity from '../ListCompositeActivity'; import LogButton from '../LogButton'; import ActionButton from '../ActionButton'; import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import styles from './styles.css'; function ActionItemDefault(props) { return ( <div className={classNames(styles.wrapper, {[props.className]: props.className})}> <div className={styles.composite}> <ListCompositeActivity co2={props.co2} icon={props.iconSVG} points={props.points} title={props.title} /> </div> <div className={styles.compositeButton}> <ActionButton className={styles.actionButton} icon={'icon-dots-vertical'} onClick={props.onActionClick} size={'standard'} /> <LogButton icon={props.logIcon} className={styles.logButton} onClick={props.onLogClick} /> </div> </div> ); } ActionItemDefault.propTypes = { className: PropTypes.string, co2: PropTypes.number, iconSVG: PropTypes.string, logIcon: PropTypes.string, onActionClick: PropTypes.func, onLogClick: PropTypes.func, points: PropTypes.number, title: PropTypes.string }; export default ActionItemDefault;
node_modules/material-ui/svg-icons/av/subscriptions.js
acalabano/get-committed
'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 AvSubscriptions = function AvSubscriptions(props) { return _react2.default.createElement( _SvgIcon2.default, props, _react2.default.createElement('path', { d: 'M20 8H4V6h16v2zm-2-6H6v2h12V2zm4 10v8c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2v-8c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2zm-6 4l-6-3.27v6.53L16 16z' }) ); }; AvSubscriptions = (0, _pure2.default)(AvSubscriptions); AvSubscriptions.displayName = 'AvSubscriptions'; AvSubscriptions.muiName = 'SvgIcon'; exports.default = AvSubscriptions;
modules/Captures/CaptureList.js
cloudytimemachine/frontend
import React from 'react' import Capture from './Capture' export default React.createClass({ render: function() { var captureNodes = this.props.data.map(function(capture) { return ( <Capture key={capture.id} capture={capture}></Capture> ); }); return ( <div className="captureList"> <div className="table-responsive"> <table className="table"> <thead> <tr> <th>Taken</th> <th>URL</th> <th>Image</th> </tr> </thead> <tbody> {captureNodes} </tbody> </table> </div> </div> ); } })
src/renderers/dom/client/__tests__/ReactDOMIDOperations-test.js
guoshencheng/react
/** * 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. * * @emails react-core */ 'use strict'; describe('ReactDOMIDOperations', function() { var DOMPropertyOperations = require('DOMPropertyOperations'); var ReactDOMIDOperations = require('ReactDOMIDOperations'); var ReactMount = require('ReactMount'); var keyOf = require('keyOf'); it('should disallow updating special properties', function() { spyOn(ReactMount, 'getNode'); spyOn(DOMPropertyOperations, 'setValueForProperty'); expect(function() { ReactDOMIDOperations.updatePropertyByID( 'testID', keyOf({dangerouslySetInnerHTML: null}), {__html: 'testContent'} ); }).toThrow(); expect( ReactMount.getNode.argsForCall[0][0] ).toBe('testID'); expect( DOMPropertyOperations.setValueForProperty.calls.length ).toBe(0); }); it('should update innerHTML and preserve whitespace', function() { var stubNode = document.createElement('div'); spyOn(ReactMount, 'getNode').andReturn(stubNode); var html = '\n \t <span> \n testContent \t </span> \n \t'; ReactDOMIDOperations.updateInnerHTMLByID( 'testID', html ); expect( ReactMount.getNode.argsForCall[0][0] ).toBe('testID'); expect(stubNode.innerHTML).toBe(html); }); });
packages/material-ui-icons/src/FilterVintage.js
AndriusBil/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let FilterVintage = props => <SvgIcon {...props}> <path d="M18.7 12.4c-.28-.16-.57-.29-.86-.4.29-.11.58-.24.86-.4 1.92-1.11 2.99-3.12 3-5.19-1.79-1.03-4.07-1.11-6 0-.28.16-.54.35-.78.54.05-.31.08-.63.08-.95 0-2.22-1.21-4.15-3-5.19C10.21 1.85 9 3.78 9 6c0 .32.03.64.08.95-.24-.2-.5-.39-.78-.55-1.92-1.11-4.2-1.03-6 0 0 2.07 1.07 4.08 3 5.19.28.16.57.29.86.4-.29.11-.58.24-.86.4-1.92 1.11-2.99 3.12-3 5.19 1.79 1.03 4.07 1.11 6 0 .28-.16.54-.35.78-.54-.05.32-.08.64-.08.96 0 2.22 1.21 4.15 3 5.19 1.79-1.04 3-2.97 3-5.19 0-.32-.03-.64-.08-.95.24.2.5.38.78.54 1.92 1.11 4.2 1.03 6 0-.01-2.07-1.08-4.08-3-5.19zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z" /> </SvgIcon>; FilterVintage = pure(FilterVintage); FilterVintage.muiName = 'SvgIcon'; export default FilterVintage;
app/screens/login/login1.js
andry-baka/dapur-ngebul-app
import React from 'react'; import { View, Image, Dimensions, Keyboard } from 'react-native'; import { RkButton, RkText, RkTextInput, RkAvoidKeyboard, RkStyleSheet, RkTheme } from 'react-native-ui-kitten'; import {FontAwesome} from '../../assets/icons'; import {GradientButton} from '../../components/'; import {scale, scaleModerate, scaleVertical} from '../../utils/scale'; export class LoginV1 extends React.Component { static navigationOptions = { header: null, }; constructor(props) { super(props); } _renderImage(image) { let contentHeight = scaleModerate(375, 1); let height = Dimensions.get('window').height - contentHeight; let width = Dimensions.get('window').width; if (RkTheme.current.name === 'light') image = (<Image style={[styles.image, {height, width}]} source={require('../../assets/images/backgroundLoginV1.png')}/>); else image = (<Image style={[styles.image, {height, width}]} source={require('../../assets/images/backgroundLoginV1DarkTheme.png')}/>); return image; } render() { let image = this._renderImage(); return ( <RkAvoidKeyboard onStartShouldSetResponder={ (e) => true} onResponderRelease={ (e) => Keyboard.dismiss()} style={styles.screen}> {image} <View style={styles.container}> <View style={styles.buttons}> <RkButton style={styles.button} rkType='social'> <RkText rkType='awesome hero accentColor'>{FontAwesome.twitter}</RkText> </RkButton> <RkButton style={styles.button} rkType='social'> <RkText rkType='awesome hero accentColor'>{FontAwesome.google}</RkText> </RkButton> <RkButton style={styles.button} rkType='social'> <RkText rkType='awesome hero accentColor'>{FontAwesome.facebook}</RkText> </RkButton> </View> <RkTextInput rkType='rounded' placeholder='Username'/> <RkTextInput rkType='rounded' placeholder='Password' secureTextEntry={true}/> <GradientButton onPress={() => { this.props.navigation.goBack() }} rkType='large' style={styles.save} text='LOGIN'/> <View style={styles.footer}> <View style={styles.textRow}> <RkText rkType='primary3'>Don’t have an account?</RkText> <RkButton rkType='clear'> <RkText rkType='header6' onPress={() => this.props.navigation.navigate('SignUp')}> Sign up now </RkText> </RkButton> </View> </View> </View> </RkAvoidKeyboard> ) } } let styles = RkStyleSheet.create(theme => ({ screen: { flex: 1, alignItems: 'center', backgroundColor: theme.colors.screen.base }, image: { resizeMode: 'cover', marginBottom: scaleVertical(10), }, container: { paddingHorizontal: 17, paddingBottom: scaleVertical(22), alignItems: 'center', flex: -1 }, footer: { justifyContent: 'flex-end', flex: 1 }, buttons: { flexDirection: 'row', marginBottom: scaleVertical(24) }, button: { marginHorizontal: 14 }, save: { marginVertical: 9 }, textRow: { justifyContent: 'center', flexDirection: 'row', } }));
node_modules/bower/node_modules/inquirer/node_modules/rx/dist/rx.lite.js
UW-itemMirror-apps/DizCuzBoard
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. ;(function (undefined) { var objectTypes = { 'boolean': false, 'function': true, 'object': true, 'number': false, 'string': false, 'undefined': false }; var root = (objectTypes[typeof window] && window) || this, freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports, freeModule = objectTypes[typeof module] && module && !module.nodeType && module, moduleExports = freeModule && freeModule.exports === freeExports && freeExports, freeGlobal = objectTypes[typeof global] && global; if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) { root = freeGlobal; } var Rx = { internals: {}, config: { Promise: root.Promise }, helpers: { } }; // Defaults var noop = Rx.helpers.noop = function () { }, notDefined = Rx.helpers.notDefined = function (x) { return typeof x === 'undefined'; }, identity = Rx.helpers.identity = function (x) { return x; }, pluck = Rx.helpers.pluck = function (property) { return function (x) { return x[property]; }; }, just = Rx.helpers.just = function (value) { return function () { return value; }; }, defaultNow = Rx.helpers.defaultNow = Date.now, defaultComparer = Rx.helpers.defaultComparer = function (x, y) { return isEqual(x, y); }, defaultSubComparer = Rx.helpers.defaultSubComparer = function (x, y) { return x > y ? 1 : (x < y ? -1 : 0); }, defaultKeySerializer = Rx.helpers.defaultKeySerializer = function (x) { return x.toString(); }, defaultError = Rx.helpers.defaultError = function (err) { throw err; }, isPromise = Rx.helpers.isPromise = function (p) { return !!p && typeof p.then === 'function'; }, asArray = Rx.helpers.asArray = function () { return Array.prototype.slice.call(arguments); }, not = Rx.helpers.not = function (a) { return !a; }, isFunction = Rx.helpers.isFunction = (function () { var isFn = function (value) { return typeof value == 'function' || false; } // fallback for older versions of Chrome and Safari if (isFn(/x/)) { isFn = function(value) { return typeof value == 'function' && toString.call(value) == '[object Function]'; }; } return isFn; }()); function cloneArray(arr) { var len = arr.length, a = new Array(len); for(var i = 0; i < len; i++) { a[i] = arr[i]; } return a; } Rx.config.longStackSupport = false; var hasStacks = false; try { throw new Error(); } catch (e) { hasStacks = !!e.stack; } // All code after this point will be filtered from stack traces reported by RxJS var rStartingLine = captureLine(), rFileName; var STACK_JUMP_SEPARATOR = "From previous event:"; function makeStackTraceLong(error, observable) { // If possible, transform the error stack trace by removing Node and RxJS // cruft, then concatenating with the stack trace of `observable`. if (hasStacks && observable.stack && typeof error === "object" && error !== null && error.stack && error.stack.indexOf(STACK_JUMP_SEPARATOR) === -1 ) { var stacks = []; for (var o = observable; !!o; o = o.source) { if (o.stack) { stacks.unshift(o.stack); } } stacks.unshift(error.stack); var concatedStacks = stacks.join("\n" + STACK_JUMP_SEPARATOR + "\n"); error.stack = filterStackString(concatedStacks); } } function filterStackString(stackString) { var lines = stackString.split("\n"), desiredLines = []; for (var i = 0, len = lines.length; i < len; i++) { var line = lines[i]; if (!isInternalFrame(line) && !isNodeFrame(line) && line) { desiredLines.push(line); } } return desiredLines.join("\n"); } function isInternalFrame(stackLine) { var fileNameAndLineNumber = getFileNameAndLineNumber(stackLine); if (!fileNameAndLineNumber) { return false; } var fileName = fileNameAndLineNumber[0], lineNumber = fileNameAndLineNumber[1]; return fileName === rFileName && lineNumber >= rStartingLine && lineNumber <= rEndingLine; } function isNodeFrame(stackLine) { return stackLine.indexOf("(module.js:") !== -1 || stackLine.indexOf("(node.js:") !== -1; } function captureLine() { if (!hasStacks) { return; } try { throw new Error(); } catch (e) { var lines = e.stack.split("\n"); var firstLine = lines[0].indexOf("@") > 0 ? lines[1] : lines[2]; var fileNameAndLineNumber = getFileNameAndLineNumber(firstLine); if (!fileNameAndLineNumber) { return; } rFileName = fileNameAndLineNumber[0]; return fileNameAndLineNumber[1]; } } function getFileNameAndLineNumber(stackLine) { // Named functions: "at functionName (filename:lineNumber:columnNumber)" var attempt1 = /at .+ \((.+):(\d+):(?:\d+)\)$/.exec(stackLine); if (attempt1) { return [attempt1[1], Number(attempt1[2])]; } // Anonymous functions: "at filename:lineNumber:columnNumber" var attempt2 = /at ([^ ]+):(\d+):(?:\d+)$/.exec(stackLine); if (attempt2) { return [attempt2[1], Number(attempt2[2])]; } // Firefox style: "function@filename:lineNumber or @filename:lineNumber" var attempt3 = /.*@(.+):(\d+)$/.exec(stackLine); if (attempt3) { return [attempt3[1], Number(attempt3[2])]; } } var EmptyError = Rx.EmptyError = function() { this.message = 'Sequence contains no elements.'; Error.call(this); }; EmptyError.prototype = Error.prototype; var ObjectDisposedError = Rx.ObjectDisposedError = function() { this.message = 'Object has been disposed'; Error.call(this); }; ObjectDisposedError.prototype = Error.prototype; var ArgumentOutOfRangeError = Rx.ArgumentOutOfRangeError = function () { this.message = 'Argument out of range'; Error.call(this); }; ArgumentOutOfRangeError.prototype = Error.prototype; var NotSupportedError = Rx.NotSupportedError = function (message) { this.message = message || 'This operation is not supported'; Error.call(this); }; NotSupportedError.prototype = Error.prototype; var NotImplementedError = Rx.NotImplementedError = function (message) { this.message = message || 'This operation is not implemented'; Error.call(this); }; NotImplementedError.prototype = Error.prototype; var notImplemented = Rx.helpers.notImplemented = function () { throw new NotImplementedError(); }; var notSupported = Rx.helpers.notSupported = function () { throw new NotSupportedError(); }; // Shim in iterator support var $iterator$ = (typeof Symbol === 'function' && Symbol.iterator) || '_es6shim_iterator_'; // Bug for mozilla version if (root.Set && typeof new root.Set()['@@iterator'] === 'function') { $iterator$ = '@@iterator'; } var doneEnumerator = Rx.doneEnumerator = { done: true, value: undefined }; var isIterable = Rx.helpers.isIterable = function (o) { return o[$iterator$] !== undefined; } var isArrayLike = Rx.helpers.isArrayLike = function (o) { return o && o.length !== undefined; } Rx.helpers.iterator = $iterator$; var bindCallback = Rx.internals.bindCallback = function (func, thisArg, argCount) { if (typeof thisArg === 'undefined') { return func; } switch(argCount) { case 0: return function() { return func.call(thisArg) }; case 1: return function(arg) { return func.call(thisArg, arg); } case 2: return function(value, index) { return func.call(thisArg, value, index); }; case 3: return function(value, index, collection) { return func.call(thisArg, value, index, collection); }; } return function() { return func.apply(thisArg, arguments); }; }; /** Used to determine if values are of the language type Object */ var dontEnums = ['toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor'], dontEnumsLength = dontEnums.length; /** `Object#toString` result shortcuts */ var argsClass = '[object Arguments]', arrayClass = '[object Array]', boolClass = '[object Boolean]', dateClass = '[object Date]', errorClass = '[object Error]', funcClass = '[object Function]', numberClass = '[object Number]', objectClass = '[object Object]', regexpClass = '[object RegExp]', stringClass = '[object String]'; var toString = Object.prototype.toString, hasOwnProperty = Object.prototype.hasOwnProperty, supportsArgsClass = toString.call(arguments) == argsClass, // For less <IE9 && FF<4 supportNodeClass, errorProto = Error.prototype, objectProto = Object.prototype, stringProto = String.prototype, propertyIsEnumerable = objectProto.propertyIsEnumerable; try { supportNodeClass = !(toString.call(document) == objectClass && !({ 'toString': 0 } + '')); } catch (e) { supportNodeClass = true; } var nonEnumProps = {}; nonEnumProps[arrayClass] = nonEnumProps[dateClass] = nonEnumProps[numberClass] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true }; nonEnumProps[boolClass] = nonEnumProps[stringClass] = { 'constructor': true, 'toString': true, 'valueOf': true }; nonEnumProps[errorClass] = nonEnumProps[funcClass] = nonEnumProps[regexpClass] = { 'constructor': true, 'toString': true }; nonEnumProps[objectClass] = { 'constructor': true }; var support = {}; (function () { var ctor = function() { this.x = 1; }, props = []; ctor.prototype = { 'valueOf': 1, 'y': 1 }; for (var key in new ctor) { props.push(key); } for (key in arguments) { } // Detect if `name` or `message` properties of `Error.prototype` are enumerable by default. support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') || propertyIsEnumerable.call(errorProto, 'name'); // Detect if `prototype` properties are enumerable by default. support.enumPrototypes = propertyIsEnumerable.call(ctor, 'prototype'); // Detect if `arguments` object indexes are non-enumerable support.nonEnumArgs = key != 0; // Detect if properties shadowing those on `Object.prototype` are non-enumerable. support.nonEnumShadows = !/valueOf/.test(props); }(1)); var isObject = Rx.internals.isObject = function(value) { var type = typeof value; return value && (type == 'function' || type == 'object') || false; }; function keysIn(object) { var result = []; if (!isObject(object)) { return result; } if (support.nonEnumArgs && object.length && isArguments(object)) { object = slice.call(object); } var skipProto = support.enumPrototypes && typeof object == 'function', skipErrorProps = support.enumErrorProps && (object === errorProto || object instanceof Error); for (var key in object) { if (!(skipProto && key == 'prototype') && !(skipErrorProps && (key == 'message' || key == 'name'))) { result.push(key); } } if (support.nonEnumShadows && object !== objectProto) { var ctor = object.constructor, index = -1, length = dontEnumsLength; if (object === (ctor && ctor.prototype)) { var className = object === stringProto ? stringClass : object === errorProto ? errorClass : toString.call(object), nonEnum = nonEnumProps[className]; } while (++index < length) { key = dontEnums[index]; if (!(nonEnum && nonEnum[key]) && hasOwnProperty.call(object, key)) { result.push(key); } } } return result; } function internalFor(object, callback, keysFunc) { var index = -1, props = keysFunc(object), length = props.length; while (++index < length) { var key = props[index]; if (callback(object[key], key, object) === false) { break; } } return object; } function internalForIn(object, callback) { return internalFor(object, callback, keysIn); } function isNode(value) { // IE < 9 presents DOM nodes as `Object` objects except they have `toString` // methods that are `typeof` "string" and still can coerce nodes to strings return typeof value.toString != 'function' && typeof (value + '') == 'string'; } var isArguments = function(value) { return (value && typeof value == 'object') ? toString.call(value) == argsClass : false; } // fallback for browsers that can't detect `arguments` objects by [[Class]] if (!supportsArgsClass) { isArguments = function(value) { return (value && typeof value == 'object') ? hasOwnProperty.call(value, 'callee') : false; }; } var isEqual = Rx.internals.isEqual = function (x, y) { return deepEquals(x, y, [], []); }; /** @private * Used for deep comparison **/ function deepEquals(a, b, stackA, stackB) { // exit early for identical values if (a === b) { // treat `+0` vs. `-0` as not equal return a !== 0 || (1 / a == 1 / b); } var type = typeof a, otherType = typeof b; // exit early for unlike primitive values if (a === a && (a == null || b == null || (type != 'function' && type != 'object' && otherType != 'function' && otherType != 'object'))) { return false; } // compare [[Class]] names var className = toString.call(a), otherClass = toString.call(b); if (className == argsClass) { className = objectClass; } if (otherClass == argsClass) { otherClass = objectClass; } if (className != otherClass) { return false; } switch (className) { case boolClass: case dateClass: // coerce dates and booleans to numbers, dates to milliseconds and booleans // to `1` or `0` treating invalid dates coerced to `NaN` as not equal return +a == +b; case numberClass: // treat `NaN` vs. `NaN` as equal return (a != +a) ? b != +b : // but treat `-0` vs. `+0` as not equal (a == 0 ? (1 / a == 1 / b) : a == +b); case regexpClass: case stringClass: // coerce regexes to strings (http://es5.github.io/#x15.10.6.4) // treat string primitives and their corresponding object instances as equal return a == String(b); } var isArr = className == arrayClass; if (!isArr) { // exit for functions and DOM nodes if (className != objectClass || (!support.nodeClass && (isNode(a) || isNode(b)))) { return false; } // in older versions of Opera, `arguments` objects have `Array` constructors var ctorA = !support.argsObject && isArguments(a) ? Object : a.constructor, ctorB = !support.argsObject && isArguments(b) ? Object : b.constructor; // non `Object` object instances with different constructors are not equal if (ctorA != ctorB && !(hasOwnProperty.call(a, 'constructor') && hasOwnProperty.call(b, 'constructor')) && !(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) && ('constructor' in a && 'constructor' in b) ) { return false; } } // assume cyclic structures are equal // the algorithm for detecting cyclic structures is adapted from ES 5.1 // section 15.12.3, abstract operation `JO` (http://es5.github.io/#x15.12.3) var initedStack = !stackA; stackA || (stackA = []); stackB || (stackB = []); var length = stackA.length; while (length--) { if (stackA[length] == a) { return stackB[length] == b; } } var size = 0; var result = true; // add `a` and `b` to the stack of traversed objects stackA.push(a); stackB.push(b); // recursively compare objects and arrays (susceptible to call stack limits) if (isArr) { // compare lengths to determine if a deep comparison is necessary length = a.length; size = b.length; result = size == length; if (result) { // deep compare the contents, ignoring non-numeric properties while (size--) { var index = length, value = b[size]; if (!(result = deepEquals(a[size], value, stackA, stackB))) { break; } } } } else { // deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys` // which, in this case, is more costly internalForIn(b, function(value, key, b) { if (hasOwnProperty.call(b, key)) { // count the number of properties. size++; // deep compare each property value. return (result = hasOwnProperty.call(a, key) && deepEquals(a[key], value, stackA, stackB)); } }); if (result) { // ensure both objects have the same number of properties internalForIn(a, function(value, key, a) { if (hasOwnProperty.call(a, key)) { // `size` will be `-1` if `a` has more properties than `b` return (result = --size > -1); } }); } } stackA.pop(); stackB.pop(); return result; } var errorObj = {e: {}}; var tryCatchTarget; function tryCatcher() { try { return tryCatchTarget.apply(this, arguments); } catch (e) { errorObj.e = e; return errorObj; } } function tryCatch(fn) { if (!isFunction(fn)) { throw new TypeError('fn must be a function'); } tryCatchTarget = fn; return tryCatcher; } function thrower(e) { throw e; } var hasProp = {}.hasOwnProperty, slice = Array.prototype.slice; var inherits = this.inherits = Rx.internals.inherits = function (child, parent) { function __() { this.constructor = child; } __.prototype = parent.prototype; child.prototype = new __(); }; var addProperties = Rx.internals.addProperties = function (obj) { for(var sources = [], i = 1, len = arguments.length; i < len; i++) { sources.push(arguments[i]); } for (var idx = 0, ln = sources.length; idx < ln; idx++) { var source = sources[idx]; for (var prop in source) { obj[prop] = source[prop]; } } }; // Rx Utils var addRef = Rx.internals.addRef = function (xs, r) { return new AnonymousObservable(function (observer) { return new CompositeDisposable(r.getDisposable(), xs.subscribe(observer)); }); }; function arrayInitialize(count, factory) { var a = new Array(count); for (var i = 0; i < count; i++) { a[i] = factory(); } return a; } // Collections function IndexedItem(id, value) { this.id = id; this.value = value; } IndexedItem.prototype.compareTo = function (other) { var c = this.value.compareTo(other.value); c === 0 && (c = this.id - other.id); return c; }; // Priority Queue for Scheduling var PriorityQueue = Rx.internals.PriorityQueue = function (capacity) { this.items = new Array(capacity); this.length = 0; }; var priorityProto = PriorityQueue.prototype; priorityProto.isHigherPriority = function (left, right) { return this.items[left].compareTo(this.items[right]) < 0; }; priorityProto.percolate = function (index) { if (index >= this.length || index < 0) { return; } var parent = index - 1 >> 1; if (parent < 0 || parent === index) { return; } if (this.isHigherPriority(index, parent)) { var temp = this.items[index]; this.items[index] = this.items[parent]; this.items[parent] = temp; this.percolate(parent); } }; priorityProto.heapify = function (index) { +index || (index = 0); if (index >= this.length || index < 0) { return; } var left = 2 * index + 1, right = 2 * index + 2, first = index; if (left < this.length && this.isHigherPriority(left, first)) { first = left; } if (right < this.length && this.isHigherPriority(right, first)) { first = right; } if (first !== index) { var temp = this.items[index]; this.items[index] = this.items[first]; this.items[first] = temp; this.heapify(first); } }; priorityProto.peek = function () { return this.items[0].value; }; priorityProto.removeAt = function (index) { this.items[index] = this.items[--this.length]; this.items[this.length] = undefined; this.heapify(); }; priorityProto.dequeue = function () { var result = this.peek(); this.removeAt(0); return result; }; priorityProto.enqueue = function (item) { var index = this.length++; this.items[index] = new IndexedItem(PriorityQueue.count++, item); this.percolate(index); }; priorityProto.remove = function (item) { for (var i = 0; i < this.length; i++) { if (this.items[i].value === item) { this.removeAt(i); return true; } } return false; }; PriorityQueue.count = 0; /** * Represents a group of disposable resources that are disposed together. * @constructor */ var CompositeDisposable = Rx.CompositeDisposable = function () { var args = [], i, len; if (Array.isArray(arguments[0])) { args = arguments[0]; len = args.length; } else { len = arguments.length; args = new Array(len); for(i = 0; i < len; i++) { args[i] = arguments[i]; } } for(i = 0; i < len; i++) { if (!isDisposable(args[i])) { throw new TypeError('Not a disposable'); } } this.disposables = args; this.isDisposed = false; this.length = args.length; }; var CompositeDisposablePrototype = CompositeDisposable.prototype; /** * Adds a disposable to the CompositeDisposable or disposes the disposable if the CompositeDisposable is disposed. * @param {Mixed} item Disposable to add. */ CompositeDisposablePrototype.add = function (item) { if (this.isDisposed) { item.dispose(); } else { this.disposables.push(item); this.length++; } }; /** * Removes and disposes the first occurrence of a disposable from the CompositeDisposable. * @param {Mixed} item Disposable to remove. * @returns {Boolean} true if found; false otherwise. */ CompositeDisposablePrototype.remove = function (item) { var shouldDispose = false; if (!this.isDisposed) { var idx = this.disposables.indexOf(item); if (idx !== -1) { shouldDispose = true; this.disposables.splice(idx, 1); this.length--; item.dispose(); } } return shouldDispose; }; /** * Disposes all disposables in the group and removes them from the group. */ CompositeDisposablePrototype.dispose = function () { if (!this.isDisposed) { this.isDisposed = true; var len = this.disposables.length, currentDisposables = new Array(len); for(var i = 0; i < len; i++) { currentDisposables[i] = this.disposables[i]; } this.disposables = []; this.length = 0; for (i = 0; i < len; i++) { currentDisposables[i].dispose(); } } }; /** * Provides a set of static methods for creating Disposables. * @param {Function} dispose Action to run during the first call to dispose. The action is guaranteed to be run at most once. */ var Disposable = Rx.Disposable = function (action) { this.isDisposed = false; this.action = action || noop; }; /** Performs the task of cleaning up resources. */ Disposable.prototype.dispose = function () { if (!this.isDisposed) { this.action(); this.isDisposed = true; } }; /** * Creates a disposable object that invokes the specified action when disposed. * @param {Function} dispose Action to run during the first call to dispose. The action is guaranteed to be run at most once. * @return {Disposable} The disposable object that runs the given action upon disposal. */ var disposableCreate = Disposable.create = function (action) { return new Disposable(action); }; /** * Gets the disposable that does nothing when disposed. */ var disposableEmpty = Disposable.empty = { dispose: noop }; /** * Validates whether the given object is a disposable * @param {Object} Object to test whether it has a dispose method * @returns {Boolean} true if a disposable object, else false. */ var isDisposable = Disposable.isDisposable = function (d) { return d && isFunction(d.dispose); }; var checkDisposed = Disposable.checkDisposed = function (disposable) { if (disposable.isDisposed) { throw new ObjectDisposedError(); } }; // Single assignment var SingleAssignmentDisposable = Rx.SingleAssignmentDisposable = function () { this.isDisposed = false; this.current = null; }; SingleAssignmentDisposable.prototype.getDisposable = function () { return this.current; }; SingleAssignmentDisposable.prototype.setDisposable = function (value) { if (this.current) { throw new Error('Disposable has already been assigned'); } var shouldDispose = this.isDisposed; !shouldDispose && (this.current = value); shouldDispose && value && value.dispose(); }; SingleAssignmentDisposable.prototype.dispose = function () { if (!this.isDisposed) { this.isDisposed = true; var old = this.current; this.current = null; } old && old.dispose(); }; // Multiple assignment disposable var SerialDisposable = Rx.SerialDisposable = function () { this.isDisposed = false; this.current = null; }; SerialDisposable.prototype.getDisposable = function () { return this.current; }; SerialDisposable.prototype.setDisposable = function (value) { var shouldDispose = this.isDisposed; if (!shouldDispose) { var old = this.current; this.current = value; } old && old.dispose(); shouldDispose && value && value.dispose(); }; SerialDisposable.prototype.dispose = function () { if (!this.isDisposed) { this.isDisposed = true; var old = this.current; this.current = null; } old && old.dispose(); }; /** * Represents a disposable resource that only disposes its underlying disposable resource when all dependent disposable objects have been disposed. */ var RefCountDisposable = Rx.RefCountDisposable = (function () { function InnerDisposable(disposable) { this.disposable = disposable; this.disposable.count++; this.isInnerDisposed = false; } InnerDisposable.prototype.dispose = function () { if (!this.disposable.isDisposed && !this.isInnerDisposed) { this.isInnerDisposed = true; this.disposable.count--; if (this.disposable.count === 0 && this.disposable.isPrimaryDisposed) { this.disposable.isDisposed = true; this.disposable.underlyingDisposable.dispose(); } } }; /** * Initializes a new instance of the RefCountDisposable with the specified disposable. * @constructor * @param {Disposable} disposable Underlying disposable. */ function RefCountDisposable(disposable) { this.underlyingDisposable = disposable; this.isDisposed = false; this.isPrimaryDisposed = false; this.count = 0; } /** * Disposes the underlying disposable only when all dependent disposables have been disposed */ RefCountDisposable.prototype.dispose = function () { if (!this.isDisposed && !this.isPrimaryDisposed) { this.isPrimaryDisposed = true; if (this.count === 0) { this.isDisposed = true; this.underlyingDisposable.dispose(); } } }; /** * Returns a dependent disposable that when disposed decreases the refcount on the underlying disposable. * @returns {Disposable} A dependent disposable contributing to the reference count that manages the underlying disposable's lifetime. */ RefCountDisposable.prototype.getDisposable = function () { return this.isDisposed ? disposableEmpty : new InnerDisposable(this); }; return RefCountDisposable; })(); var ScheduledItem = Rx.internals.ScheduledItem = function (scheduler, state, action, dueTime, comparer) { this.scheduler = scheduler; this.state = state; this.action = action; this.dueTime = dueTime; this.comparer = comparer || defaultSubComparer; this.disposable = new SingleAssignmentDisposable(); } ScheduledItem.prototype.invoke = function () { this.disposable.setDisposable(this.invokeCore()); }; ScheduledItem.prototype.compareTo = function (other) { return this.comparer(this.dueTime, other.dueTime); }; ScheduledItem.prototype.isCancelled = function () { return this.disposable.isDisposed; }; ScheduledItem.prototype.invokeCore = function () { return this.action(this.scheduler, this.state); }; /** Provides a set of static properties to access commonly used schedulers. */ var Scheduler = Rx.Scheduler = (function () { function Scheduler(now, schedule, scheduleRelative, scheduleAbsolute) { this.now = now; this._schedule = schedule; this._scheduleRelative = scheduleRelative; this._scheduleAbsolute = scheduleAbsolute; } /** Determines whether the given object is a scheduler */ Scheduler.isScheduler = function (s) { return s instanceof Scheduler; } function invokeAction(scheduler, action) { action(); return disposableEmpty; } var schedulerProto = Scheduler.prototype; /** * Schedules an action to be executed. * @param {Function} action Action to execute. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.schedule = function (action) { return this._schedule(action, invokeAction); }; /** * Schedules an action to be executed. * @param state State passed to the action to be executed. * @param {Function} action Action to be executed. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleWithState = function (state, action) { return this._schedule(state, action); }; /** * Schedules an action to be executed after the specified relative due time. * @param {Function} action Action to execute. * @param {Number} dueTime Relative time after which to execute the action. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleWithRelative = function (dueTime, action) { return this._scheduleRelative(action, dueTime, invokeAction); }; /** * Schedules an action to be executed after dueTime. * @param state State passed to the action to be executed. * @param {Function} action Action to be executed. * @param {Number} dueTime Relative time after which to execute the action. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleWithRelativeAndState = function (state, dueTime, action) { return this._scheduleRelative(state, dueTime, action); }; /** * Schedules an action to be executed at the specified absolute due time. * @param {Function} action Action to execute. * @param {Number} dueTime Absolute time at which to execute the action. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleWithAbsolute = function (dueTime, action) { return this._scheduleAbsolute(action, dueTime, invokeAction); }; /** * Schedules an action to be executed at dueTime. * @param {Mixed} state State passed to the action to be executed. * @param {Function} action Action to be executed. * @param {Number}dueTime Absolute time at which to execute the action. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleWithAbsoluteAndState = function (state, dueTime, action) { return this._scheduleAbsolute(state, dueTime, action); }; /** Gets the current time according to the local machine's system clock. */ Scheduler.now = defaultNow; /** * Normalizes the specified TimeSpan value to a positive value. * @param {Number} timeSpan The time span value to normalize. * @returns {Number} The specified TimeSpan value if it is zero or positive; otherwise, 0 */ Scheduler.normalize = function (timeSpan) { timeSpan < 0 && (timeSpan = 0); return timeSpan; }; return Scheduler; }()); var normalizeTime = Scheduler.normalize, isScheduler = Scheduler.isScheduler; (function (schedulerProto) { function invokeRecImmediate(scheduler, pair) { var state = pair[0], action = pair[1], group = new CompositeDisposable(); function recursiveAction(state1) { action(state1, function (state2) { var isAdded = false, isDone = false, d = scheduler.scheduleWithState(state2, function (scheduler1, state3) { if (isAdded) { group.remove(d); } else { isDone = true; } recursiveAction(state3); return disposableEmpty; }); if (!isDone) { group.add(d); isAdded = true; } }); } recursiveAction(state); return group; } function invokeRecDate(scheduler, pair, method) { var state = pair[0], action = pair[1], group = new CompositeDisposable(); function recursiveAction(state1) { action(state1, function (state2, dueTime1) { var isAdded = false, isDone = false, d = scheduler[method](state2, dueTime1, function (scheduler1, state3) { if (isAdded) { group.remove(d); } else { isDone = true; } recursiveAction(state3); return disposableEmpty; }); if (!isDone) { group.add(d); isAdded = true; } }); }; recursiveAction(state); return group; } function scheduleInnerRecursive(action, self) { action(function(dt) { self(action, dt); }); } /** * Schedules an action to be executed recursively. * @param {Function} action Action to execute recursively. The parameter passed to the action is used to trigger recursive scheduling of the action. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleRecursive = function (action) { return this.scheduleRecursiveWithState(action, function (_action, self) { _action(function () { self(_action); }); }); }; /** * Schedules an action to be executed recursively. * @param {Mixed} state State passed to the action to be executed. * @param {Function} action Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in recursive invocation state. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleRecursiveWithState = function (state, action) { return this.scheduleWithState([state, action], invokeRecImmediate); }; /** * Schedules an action to be executed recursively after a specified relative due time. * @param {Function} action Action to execute recursively. The parameter passed to the action is used to trigger recursive scheduling of the action at the specified relative time. * @param {Number}dueTime Relative time after which to execute the action for the first time. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleRecursiveWithRelative = function (dueTime, action) { return this.scheduleRecursiveWithRelativeAndState(action, dueTime, scheduleInnerRecursive); }; /** * Schedules an action to be executed recursively after a specified relative due time. * @param {Mixed} state State passed to the action to be executed. * @param {Function} action Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in the recursive due time and invocation state. * @param {Number}dueTime Relative time after which to execute the action for the first time. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleRecursiveWithRelativeAndState = function (state, dueTime, action) { return this._scheduleRelative([state, action], dueTime, function (s, p) { return invokeRecDate(s, p, 'scheduleWithRelativeAndState'); }); }; /** * Schedules an action to be executed recursively at a specified absolute due time. * @param {Function} action Action to execute recursively. The parameter passed to the action is used to trigger recursive scheduling of the action at the specified absolute time. * @param {Number}dueTime Absolute time at which to execute the action for the first time. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleRecursiveWithAbsolute = function (dueTime, action) { return this.scheduleRecursiveWithAbsoluteAndState(action, dueTime, scheduleInnerRecursive); }; /** * Schedules an action to be executed recursively at a specified absolute due time. * @param {Mixed} state State passed to the action to be executed. * @param {Function} action Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in the recursive due time and invocation state. * @param {Number}dueTime Absolute time at which to execute the action for the first time. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleRecursiveWithAbsoluteAndState = function (state, dueTime, action) { return this._scheduleAbsolute([state, action], dueTime, function (s, p) { return invokeRecDate(s, p, 'scheduleWithAbsoluteAndState'); }); }; }(Scheduler.prototype)); (function (schedulerProto) { /** * Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. The periodic task will be scheduled using window.setInterval for the base implementation. * @param {Number} period Period for running the work periodically. * @param {Function} action Action to be executed. * @returns {Disposable} The disposable object used to cancel the scheduled recurring action (best effort). */ Scheduler.prototype.schedulePeriodic = function (period, action) { return this.schedulePeriodicWithState(null, period, action); }; /** * Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. The periodic task will be scheduled using window.setInterval for the base implementation. * @param {Mixed} state Initial state passed to the action upon the first iteration. * @param {Number} period Period for running the work periodically. * @param {Function} action Action to be executed, potentially updating the state. * @returns {Disposable} The disposable object used to cancel the scheduled recurring action (best effort). */ Scheduler.prototype.schedulePeriodicWithState = function(state, period, action) { if (typeof root.setInterval === 'undefined') { throw new NotSupportedError(); } period = normalizeTime(period); var s = state, id = root.setInterval(function () { s = action(s); }, period); return disposableCreate(function () { root.clearInterval(id); }); }; }(Scheduler.prototype)); /** Gets a scheduler that schedules work immediately on the current thread. */ var immediateScheduler = Scheduler.immediate = (function () { function scheduleNow(state, action) { return action(this, state); } return new Scheduler(defaultNow, scheduleNow, notSupported, notSupported); }()); /** * Gets a scheduler that schedules work as soon as possible on the current thread. */ var currentThreadScheduler = Scheduler.currentThread = (function () { var queue; function runTrampoline () { while (queue.length > 0) { var item = queue.dequeue(); !item.isCancelled() && item.invoke(); } } function scheduleNow(state, action) { var si = new ScheduledItem(this, state, action, this.now()); if (!queue) { queue = new PriorityQueue(4); queue.enqueue(si); var result = tryCatch(runTrampoline)(); queue = null; if (result === errorObj) { return thrower(result.e); } } else { queue.enqueue(si); } return si.disposable; } var currentScheduler = new Scheduler(defaultNow, scheduleNow, notSupported, notSupported); currentScheduler.scheduleRequired = function () { return !queue; }; return currentScheduler; }()); var SchedulePeriodicRecursive = Rx.internals.SchedulePeriodicRecursive = (function () { function tick(command, recurse) { recurse(0, this._period); try { this._state = this._action(this._state); } catch (e) { this._cancel.dispose(); throw e; } } function SchedulePeriodicRecursive(scheduler, state, period, action) { this._scheduler = scheduler; this._state = state; this._period = period; this._action = action; } SchedulePeriodicRecursive.prototype.start = function () { var d = new SingleAssignmentDisposable(); this._cancel = d; d.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0, this._period, tick.bind(this))); return d; }; return SchedulePeriodicRecursive; }()); var scheduleMethod, clearMethod; var localTimer = (function () { var localSetTimeout, localClearTimeout = noop; if (!!root.setTimeout) { localSetTimeout = root.setTimeout; localClearTimeout = root.clearTimeout; } else if (!!root.WScript) { localSetTimeout = function (fn, time) { root.WScript.Sleep(time); fn(); }; } else { throw new NotSupportedError(); } return { setTimeout: localSetTimeout, clearTimeout: localClearTimeout }; }()); var localSetTimeout = localTimer.setTimeout, localClearTimeout = localTimer.clearTimeout; (function () { var nextHandle = 1, tasksByHandle = {}, currentlyRunning = false; clearMethod = function (handle) { delete tasksByHandle[handle]; }; function runTask(handle) { if (currentlyRunning) { localSetTimeout(function () { runTask(handle) }, 0); } else { var task = tasksByHandle[handle]; if (task) { currentlyRunning = true; var result = tryCatch(task)(); clearMethod(handle); currentlyRunning = false; if (result === errorObj) { return thrower(result.e); } } } } var reNative = RegExp('^' + String(toString) .replace(/[.*+?^${}()|[\]\\]/g, '\\$&') .replace(/toString| for [^\]]+/g, '.*?') + '$' ); var setImmediate = typeof (setImmediate = freeGlobal && moduleExports && freeGlobal.setImmediate) == 'function' && !reNative.test(setImmediate) && setImmediate; function postMessageSupported () { // Ensure not in a worker if (!root.postMessage || root.importScripts) { return false; } var isAsync = false, oldHandler = root.onmessage; // Test for async root.onmessage = function () { isAsync = true; }; root.postMessage('', '*'); root.onmessage = oldHandler; return isAsync; } // Use in order, setImmediate, nextTick, postMessage, MessageChannel, script readystatechanged, setTimeout if (isFunction(setImmediate)) { scheduleMethod = function (action) { var id = nextHandle++; tasksByHandle[id] = action; setImmediate(function () { runTask(id); }); return id; }; } else if (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]') { scheduleMethod = function (action) { var id = nextHandle++; tasksByHandle[id] = action; process.nextTick(function () { runTask(id); }); return id; }; } else if (postMessageSupported()) { var MSG_PREFIX = 'ms.rx.schedule' + Math.random(); function onGlobalPostMessage(event) { // Only if we're a match to avoid any other global events if (typeof event.data === 'string' && event.data.substring(0, MSG_PREFIX.length) === MSG_PREFIX) { runTask(event.data.substring(MSG_PREFIX.length)); } } if (root.addEventListener) { root.addEventListener('message', onGlobalPostMessage, false); } else if (root.attachEvent) { root.attachEvent('onmessage', onGlobalPostMessage); } else { root.onmessage = onGlobalPostMessage; } scheduleMethod = function (action) { var id = nextHandle++; tasksByHandle[id] = action; root.postMessage(MSG_PREFIX + currentId, '*'); return id; }; } else if (!!root.MessageChannel) { var channel = new root.MessageChannel(); channel.port1.onmessage = function (e) { runTask(e.data); }; scheduleMethod = function (action) { var id = nextHandle++; tasksByHandle[id] = action; channel.port2.postMessage(id); return id; }; } else if ('document' in root && 'onreadystatechange' in root.document.createElement('script')) { scheduleMethod = function (action) { var scriptElement = root.document.createElement('script'); var id = nextHandle++; tasksByHandle[id] = action; scriptElement.onreadystatechange = function () { runTask(id); scriptElement.onreadystatechange = null; scriptElement.parentNode.removeChild(scriptElement); scriptElement = null; }; root.document.documentElement.appendChild(scriptElement); return id; }; } else { scheduleMethod = function (action) { var id = nextHandle++; tasksByHandle[id] = action; localSetTimeout(function () { runTask(id); }, 0); return id; }; } }()); /** * Gets a scheduler that schedules work via a timed callback based upon platform. */ var timeoutScheduler = Scheduler.timeout = Scheduler['default'] = (function () { function scheduleNow(state, action) { var scheduler = this, disposable = new SingleAssignmentDisposable(); var id = scheduleMethod(function () { !disposable.isDisposed && disposable.setDisposable(action(scheduler, state)); }); return new CompositeDisposable(disposable, disposableCreate(function () { clearMethod(id); })); } function scheduleRelative(state, dueTime, action) { var scheduler = this, dt = Scheduler.normalize(dueTime), disposable = new SingleAssignmentDisposable(); if (dt === 0) { return scheduler.scheduleWithState(state, action); } var id = localSetTimeout(function () { !disposable.isDisposed && disposable.setDisposable(action(scheduler, state)); }, dt); return new CompositeDisposable(disposable, disposableCreate(function () { localClearTimeout(id); })); } function scheduleAbsolute(state, dueTime, action) { return this.scheduleWithRelativeAndState(state, dueTime - this.now(), action); } return new Scheduler(defaultNow, scheduleNow, scheduleRelative, scheduleAbsolute); })(); /** * Represents a notification to an observer. */ var Notification = Rx.Notification = (function () { function Notification(kind, value, exception, accept, acceptObservable, toString) { this.kind = kind; this.value = value; this.exception = exception; this._accept = accept; this._acceptObservable = acceptObservable; this.toString = toString; } /** * Invokes the delegate corresponding to the notification or the observer's method corresponding to the notification and returns the produced result. * * @memberOf Notification * @param {Any} observerOrOnNext Delegate to invoke for an OnNext notification or Observer to invoke the notification on.. * @param {Function} onError Delegate to invoke for an OnError notification. * @param {Function} onCompleted Delegate to invoke for an OnCompleted notification. * @returns {Any} Result produced by the observation. */ Notification.prototype.accept = function (observerOrOnNext, onError, onCompleted) { return observerOrOnNext && typeof observerOrOnNext === 'object' ? this._acceptObservable(observerOrOnNext) : this._accept(observerOrOnNext, onError, onCompleted); }; /** * Returns an observable sequence with a single notification. * * @memberOf Notifications * @param {Scheduler} [scheduler] Scheduler to send out the notification calls on. * @returns {Observable} The observable sequence that surfaces the behavior of the notification upon subscription. */ Notification.prototype.toObservable = function (scheduler) { var self = this; isScheduler(scheduler) || (scheduler = immediateScheduler); return new AnonymousObservable(function (observer) { return scheduler.scheduleWithState(self, function (_, notification) { notification._acceptObservable(observer); notification.kind === 'N' && observer.onCompleted(); }); }); }; return Notification; })(); /** * Creates an object that represents an OnNext notification to an observer. * @param {Any} value The value contained in the notification. * @returns {Notification} The OnNext notification containing the value. */ var notificationCreateOnNext = Notification.createOnNext = (function () { function _accept(onNext) { return onNext(this.value); } function _acceptObservable(observer) { return observer.onNext(this.value); } function toString() { return 'OnNext(' + this.value + ')'; } return function (value) { return new Notification('N', value, null, _accept, _acceptObservable, toString); }; }()); /** * Creates an object that represents an OnError notification to an observer. * @param {Any} error The exception contained in the notification. * @returns {Notification} The OnError notification containing the exception. */ var notificationCreateOnError = Notification.createOnError = (function () { function _accept (onNext, onError) { return onError(this.exception); } function _acceptObservable(observer) { return observer.onError(this.exception); } function toString () { return 'OnError(' + this.exception + ')'; } return function (e) { return new Notification('E', null, e, _accept, _acceptObservable, toString); }; }()); /** * Creates an object that represents an OnCompleted notification to an observer. * @returns {Notification} The OnCompleted notification. */ var notificationCreateOnCompleted = Notification.createOnCompleted = (function () { function _accept (onNext, onError, onCompleted) { return onCompleted(); } function _acceptObservable(observer) { return observer.onCompleted(); } function toString () { return 'OnCompleted()'; } return function () { return new Notification('C', null, null, _accept, _acceptObservable, toString); }; }()); var Enumerator = Rx.internals.Enumerator = function (next) { this._next = next; }; Enumerator.prototype.next = function () { return this._next(); }; Enumerator.prototype[$iterator$] = function () { return this; } var Enumerable = Rx.internals.Enumerable = function (iterator) { this._iterator = iterator; }; Enumerable.prototype[$iterator$] = function () { return this._iterator(); }; Enumerable.prototype.concat = function () { var sources = this; return new AnonymousObservable(function (o) { var e = sources[$iterator$](); var isDisposed, subscription = new SerialDisposable(); var cancelable = immediateScheduler.scheduleRecursive(function (self) { if (isDisposed) { return; } try { var currentItem = e.next(); } catch (ex) { return o.onError(ex); } if (currentItem.done) { return o.onCompleted(); } // Check if promise var currentValue = currentItem.value; isPromise(currentValue) && (currentValue = observableFromPromise(currentValue)); var d = new SingleAssignmentDisposable(); subscription.setDisposable(d); d.setDisposable(currentValue.subscribe( function(x) { o.onNext(x); }, function(err) { o.onError(err); }, self) ); }); return new CompositeDisposable(subscription, cancelable, disposableCreate(function () { isDisposed = true; })); }); }; Enumerable.prototype.catchError = function () { var sources = this; return new AnonymousObservable(function (o) { var e = sources[$iterator$](); var isDisposed, subscription = new SerialDisposable(); var cancelable = immediateScheduler.scheduleRecursiveWithState(null, function (lastException, self) { if (isDisposed) { return; } try { var currentItem = e.next(); } catch (ex) { return observer.onError(ex); } if (currentItem.done) { if (lastException !== null) { o.onError(lastException); } else { o.onCompleted(); } return; } // Check if promise var currentValue = currentItem.value; isPromise(currentValue) && (currentValue = observableFromPromise(currentValue)); var d = new SingleAssignmentDisposable(); subscription.setDisposable(d); d.setDisposable(currentValue.subscribe( function(x) { o.onNext(x); }, self, function() { o.onCompleted(); })); }); return new CompositeDisposable(subscription, cancelable, disposableCreate(function () { isDisposed = true; })); }); }; Enumerable.prototype.catchErrorWhen = function (notificationHandler) { var sources = this; return new AnonymousObservable(function (o) { var exceptions = new Subject(), notifier = new Subject(), handled = notificationHandler(exceptions), notificationDisposable = handled.subscribe(notifier); var e = sources[$iterator$](); var isDisposed, lastException, subscription = new SerialDisposable(); var cancelable = immediateScheduler.scheduleRecursive(function (self) { if (isDisposed) { return; } try { var currentItem = e.next(); } catch (ex) { return o.onError(ex); } if (currentItem.done) { if (lastException) { o.onError(lastException); } else { o.onCompleted(); } return; } // Check if promise var currentValue = currentItem.value; isPromise(currentValue) && (currentValue = observableFromPromise(currentValue)); var outer = new SingleAssignmentDisposable(); var inner = new SingleAssignmentDisposable(); subscription.setDisposable(new CompositeDisposable(inner, outer)); outer.setDisposable(currentValue.subscribe( function(x) { o.onNext(x); }, function (exn) { inner.setDisposable(notifier.subscribe(self, function(ex) { o.onError(ex); }, function() { o.onCompleted(); })); exceptions.onNext(exn); }, function() { o.onCompleted(); })); }); return new CompositeDisposable(notificationDisposable, subscription, cancelable, disposableCreate(function () { isDisposed = true; })); }); }; var enumerableRepeat = Enumerable.repeat = function (value, repeatCount) { if (repeatCount == null) { repeatCount = -1; } return new Enumerable(function () { var left = repeatCount; return new Enumerator(function () { if (left === 0) { return doneEnumerator; } if (left > 0) { left--; } return { done: false, value: value }; }); }); }; var enumerableOf = Enumerable.of = function (source, selector, thisArg) { if (selector) { var selectorFn = bindCallback(selector, thisArg, 3); } return new Enumerable(function () { var index = -1; return new Enumerator( function () { return ++index < source.length ? { done: false, value: !selector ? source[index] : selectorFn(source[index], index, source) } : doneEnumerator; }); }); }; /** * Supports push-style iteration over an observable sequence. */ var Observer = Rx.Observer = function () { }; /** * Creates an observer from the specified OnNext, along with optional OnError, and OnCompleted actions. * @param {Function} [onNext] Observer's OnNext action implementation. * @param {Function} [onError] Observer's OnError action implementation. * @param {Function} [onCompleted] Observer's OnCompleted action implementation. * @returns {Observer} The observer object implemented using the given actions. */ var observerCreate = Observer.create = function (onNext, onError, onCompleted) { onNext || (onNext = noop); onError || (onError = defaultError); onCompleted || (onCompleted = noop); return new AnonymousObserver(onNext, onError, onCompleted); }; /** * Abstract base class for implementations of the Observer class. * This base class enforces the grammar of observers where OnError and OnCompleted are terminal messages. */ var AbstractObserver = Rx.internals.AbstractObserver = (function (__super__) { inherits(AbstractObserver, __super__); /** * Creates a new observer in a non-stopped state. */ function AbstractObserver() { this.isStopped = false; __super__.call(this); } // Must be implemented by other observers AbstractObserver.prototype.next = notImplemented; AbstractObserver.prototype.error = notImplemented; AbstractObserver.prototype.completed = notImplemented; /** * Notifies the observer of a new element in the sequence. * @param {Any} value Next element in the sequence. */ AbstractObserver.prototype.onNext = function (value) { if (!this.isStopped) { this.next(value); } }; /** * Notifies the observer that an exception has occurred. * @param {Any} error The error that has occurred. */ AbstractObserver.prototype.onError = function (error) { if (!this.isStopped) { this.isStopped = true; this.error(error); } }; /** * Notifies the observer of the end of the sequence. */ AbstractObserver.prototype.onCompleted = function () { if (!this.isStopped) { this.isStopped = true; this.completed(); } }; /** * Disposes the observer, causing it to transition to the stopped state. */ AbstractObserver.prototype.dispose = function () { this.isStopped = true; }; AbstractObserver.prototype.fail = function (e) { if (!this.isStopped) { this.isStopped = true; this.error(e); return true; } return false; }; return AbstractObserver; }(Observer)); /** * Class to create an Observer instance from delegate-based implementations of the on* methods. */ var AnonymousObserver = Rx.AnonymousObserver = (function (__super__) { inherits(AnonymousObserver, __super__); /** * Creates an observer from the specified OnNext, OnError, and OnCompleted actions. * @param {Any} onNext Observer's OnNext action implementation. * @param {Any} onError Observer's OnError action implementation. * @param {Any} onCompleted Observer's OnCompleted action implementation. */ function AnonymousObserver(onNext, onError, onCompleted) { __super__.call(this); this._onNext = onNext; this._onError = onError; this._onCompleted = onCompleted; } /** * Calls the onNext action. * @param {Any} value Next element in the sequence. */ AnonymousObserver.prototype.next = function (value) { this._onNext(value); }; /** * Calls the onError action. * @param {Any} error The error that has occurred. */ AnonymousObserver.prototype.error = function (error) { this._onError(error); }; /** * Calls the onCompleted action. */ AnonymousObserver.prototype.completed = function () { this._onCompleted(); }; return AnonymousObserver; }(AbstractObserver)); var observableProto; /** * Represents a push-style collection. */ var Observable = Rx.Observable = (function () { function Observable(subscribe) { if (Rx.config.longStackSupport && hasStacks) { try { throw new Error(); } catch (e) { this.stack = e.stack.substring(e.stack.indexOf("\n") + 1); } var self = this; this._subscribe = function (observer) { var oldOnError = observer.onError.bind(observer); observer.onError = function (err) { makeStackTraceLong(err, self); oldOnError(err); }; return subscribe.call(self, observer); }; } else { this._subscribe = subscribe; } } observableProto = Observable.prototype; /** * Subscribes an observer to the observable sequence. * @param {Mixed} [observerOrOnNext] The object that is to receive notifications or an action to invoke for each element in the observable sequence. * @param {Function} [onError] Action to invoke upon exceptional termination of the observable sequence. * @param {Function} [onCompleted] Action to invoke upon graceful termination of the observable sequence. * @returns {Diposable} A disposable handling the subscriptions and unsubscriptions. */ observableProto.subscribe = observableProto.forEach = function (observerOrOnNext, onError, onCompleted) { return this._subscribe(typeof observerOrOnNext === 'object' ? observerOrOnNext : observerCreate(observerOrOnNext, onError, onCompleted)); }; /** * Subscribes to the next value in the sequence with an optional "this" argument. * @param {Function} onNext The function to invoke on each element in the observable sequence. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Disposable} A disposable handling the subscriptions and unsubscriptions. */ observableProto.subscribeOnNext = function (onNext, thisArg) { return this._subscribe(observerCreate(typeof thisArg !== 'undefined' ? function(x) { onNext.call(thisArg, x); } : onNext)); }; /** * Subscribes to an exceptional condition in the sequence with an optional "this" argument. * @param {Function} onError The function to invoke upon exceptional termination of the observable sequence. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Disposable} A disposable handling the subscriptions and unsubscriptions. */ observableProto.subscribeOnError = function (onError, thisArg) { return this._subscribe(observerCreate(null, typeof thisArg !== 'undefined' ? function(e) { onError.call(thisArg, e); } : onError)); }; /** * Subscribes to the next value in the sequence with an optional "this" argument. * @param {Function} onCompleted The function to invoke upon graceful termination of the observable sequence. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Disposable} A disposable handling the subscriptions and unsubscriptions. */ observableProto.subscribeOnCompleted = function (onCompleted, thisArg) { return this._subscribe(observerCreate(null, null, typeof thisArg !== 'undefined' ? function() { onCompleted.call(thisArg); } : onCompleted)); }; return Observable; })(); var ScheduledObserver = Rx.internals.ScheduledObserver = (function (__super__) { inherits(ScheduledObserver, __super__); function ScheduledObserver(scheduler, observer) { __super__.call(this); this.scheduler = scheduler; this.observer = observer; this.isAcquired = false; this.hasFaulted = false; this.queue = []; this.disposable = new SerialDisposable(); } ScheduledObserver.prototype.next = function (value) { var self = this; this.queue.push(function () { self.observer.onNext(value); }); }; ScheduledObserver.prototype.error = function (e) { var self = this; this.queue.push(function () { self.observer.onError(e); }); }; ScheduledObserver.prototype.completed = function () { var self = this; this.queue.push(function () { self.observer.onCompleted(); }); }; ScheduledObserver.prototype.ensureActive = function () { var isOwner = false, parent = this; if (!this.hasFaulted && this.queue.length > 0) { isOwner = !this.isAcquired; this.isAcquired = true; } if (isOwner) { this.disposable.setDisposable(this.scheduler.scheduleRecursive(function (self) { var work; if (parent.queue.length > 0) { work = parent.queue.shift(); } else { parent.isAcquired = false; return; } try { work(); } catch (ex) { parent.queue = []; parent.hasFaulted = true; throw ex; } self(); })); } }; ScheduledObserver.prototype.dispose = function () { __super__.prototype.dispose.call(this); this.disposable.dispose(); }; return ScheduledObserver; }(AbstractObserver)); var ObservableBase = Rx.ObservableBase = (function (__super__) { inherits(ObservableBase, __super__); function fixSubscriber(subscriber) { return subscriber && isFunction(subscriber.dispose) ? subscriber : isFunction(subscriber) ? disposableCreate(subscriber) : disposableEmpty; } function setDisposable(s, state) { var ado = state[0], self = state[1]; var sub = tryCatch(self.subscribeCore).call(self, ado); if (sub === errorObj) { if(!ado.fail(errorObj.e)) { return thrower(errorObj.e); } } ado.setDisposable(fixSubscriber(sub)); } function subscribe(observer) { var ado = new AutoDetachObserver(observer), state = [ado, this]; if (currentThreadScheduler.scheduleRequired()) { currentThreadScheduler.scheduleWithState(state, setDisposable); } else { setDisposable(null, state); } return ado; } function ObservableBase() { __super__.call(this, subscribe); } ObservableBase.prototype.subscribeCore = notImplemented; return ObservableBase; }(Observable)); var ToArrayObservable = (function(__super__) { inherits(ToArrayObservable, __super__); function ToArrayObservable(source) { this.source = source; __super__.call(this); } ToArrayObservable.prototype.subscribeCore = function(observer) { return this.source.subscribe(new ToArrayObserver(observer)); }; return ToArrayObservable; }(ObservableBase)); function ToArrayObserver(observer) { this.observer = observer; this.a = []; this.isStopped = false; } ToArrayObserver.prototype.onNext = function (x) { if(!this.isStopped) { this.a.push(x); } }; ToArrayObserver.prototype.onError = function (e) { if (!this.isStopped) { this.isStopped = true; this.observer.onError(e); } }; ToArrayObserver.prototype.onCompleted = function () { if (!this.isStopped) { this.isStopped = true; this.observer.onNext(this.a); this.observer.onCompleted(); } }; ToArrayObserver.prototype.dispose = function () { this.isStopped = true; } ToArrayObserver.prototype.fail = function (e) { if (!this.isStopped) { this.isStopped = true; this.observer.onError(e); return true; } return false; }; /** * Creates an array from an observable sequence. * @returns {Observable} An observable sequence containing a single element with a list containing all the elements of the source sequence. */ observableProto.toArray = function () { return new ToArrayObservable(this); }; /** * Creates an observable sequence from a specified subscribe method implementation. * @example * var res = Rx.Observable.create(function (observer) { return function () { } ); * var res = Rx.Observable.create(function (observer) { return Rx.Disposable.empty; } ); * var res = Rx.Observable.create(function (observer) { } ); * @param {Function} subscribe Implementation of the resulting observable sequence's subscribe method, returning a function that will be wrapped in a Disposable. * @returns {Observable} The observable sequence with the specified implementation for the Subscribe method. */ Observable.create = Observable.createWithDisposable = function (subscribe, parent) { return new AnonymousObservable(subscribe, parent); }; /** * Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes. * * @example * var res = Rx.Observable.defer(function () { return Rx.Observable.fromArray([1,2,3]); }); * @param {Function} observableFactory Observable factory function to invoke for each observer that subscribes to the resulting sequence or Promise. * @returns {Observable} An observable sequence whose observers trigger an invocation of the given observable factory function. */ var observableDefer = Observable.defer = function (observableFactory) { return new AnonymousObservable(function (observer) { var result; try { result = observableFactory(); } catch (e) { return observableThrow(e).subscribe(observer); } isPromise(result) && (result = observableFromPromise(result)); return result.subscribe(observer); }); }; var EmptyObservable = (function(__super__) { inherits(EmptyObservable, __super__); function EmptyObservable(scheduler) { this.scheduler = scheduler; __super__.call(this); } EmptyObservable.prototype.subscribeCore = function (observer) { var sink = new EmptySink(observer, this); return sink.run(); }; function EmptySink(observer, parent) { this.observer = observer; this.parent = parent; } function scheduleItem(s, state) { state.onCompleted(); } EmptySink.prototype.run = function () { return this.parent.scheduler.scheduleWithState(this.observer, scheduleItem); }; return EmptyObservable; }(ObservableBase)); /** * Returns an empty observable sequence, using the specified scheduler to send out the single OnCompleted message. * * @example * var res = Rx.Observable.empty(); * var res = Rx.Observable.empty(Rx.Scheduler.timeout); * @param {Scheduler} [scheduler] Scheduler to send the termination call on. * @returns {Observable} An observable sequence with no elements. */ var observableEmpty = Observable.empty = function (scheduler) { isScheduler(scheduler) || (scheduler = immediateScheduler); return new EmptyObservable(scheduler); }; var FromObservable = (function(__super__) { inherits(FromObservable, __super__); function FromObservable(iterable, mapper, scheduler) { this.iterable = iterable; this.mapper = mapper; this.scheduler = scheduler; __super__.call(this); } FromObservable.prototype.subscribeCore = function (observer) { var sink = new FromSink(observer, this); return sink.run(); }; return FromObservable; }(ObservableBase)); var FromSink = (function () { function FromSink(observer, parent) { this.observer = observer; this.parent = parent; } FromSink.prototype.run = function () { var list = Object(this.parent.iterable), it = getIterable(list), observer = this.observer, mapper = this.parent.mapper; function loopRecursive(i, recurse) { try { var next = it.next(); } catch (e) { return observer.onError(e); } if (next.done) { return observer.onCompleted(); } var result = next.value; if (mapper) { try { result = mapper(result, i); } catch (e) { return observer.onError(e); } } observer.onNext(result); recurse(i + 1); } return this.parent.scheduler.scheduleRecursiveWithState(0, loopRecursive); }; return FromSink; }()); var maxSafeInteger = Math.pow(2, 53) - 1; function StringIterable(str) { this._s = s; } StringIterable.prototype[$iterator$] = function () { return new StringIterator(this._s); }; function StringIterator(str) { this._s = s; this._l = s.length; this._i = 0; } StringIterator.prototype[$iterator$] = function () { return this; }; StringIterator.prototype.next = function () { return this._i < this._l ? { done: false, value: this._s.charAt(this._i++) } : doneEnumerator; }; function ArrayIterable(a) { this._a = a; } ArrayIterable.prototype[$iterator$] = function () { return new ArrayIterator(this._a); }; function ArrayIterator(a) { this._a = a; this._l = toLength(a); this._i = 0; } ArrayIterator.prototype[$iterator$] = function () { return this; }; ArrayIterator.prototype.next = function () { return this._i < this._l ? { done: false, value: this._a[this._i++] } : doneEnumerator; }; function numberIsFinite(value) { return typeof value === 'number' && root.isFinite(value); } function isNan(n) { return n !== n; } function getIterable(o) { var i = o[$iterator$], it; if (!i && typeof o === 'string') { it = new StringIterable(o); return it[$iterator$](); } if (!i && o.length !== undefined) { it = new ArrayIterable(o); return it[$iterator$](); } if (!i) { throw new TypeError('Object is not iterable'); } return o[$iterator$](); } function sign(value) { var number = +value; if (number === 0) { return number; } if (isNaN(number)) { return number; } return number < 0 ? -1 : 1; } function toLength(o) { var len = +o.length; if (isNaN(len)) { return 0; } if (len === 0 || !numberIsFinite(len)) { return len; } len = sign(len) * Math.floor(Math.abs(len)); if (len <= 0) { return 0; } if (len > maxSafeInteger) { return maxSafeInteger; } return len; } /** * This method creates a new Observable sequence from an array-like or iterable object. * @param {Any} arrayLike An array-like or iterable object to convert to an Observable sequence. * @param {Function} [mapFn] Map function to call on every element of the array. * @param {Any} [thisArg] The context to use calling the mapFn if provided. * @param {Scheduler} [scheduler] Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread. */ var observableFrom = Observable.from = function (iterable, mapFn, thisArg, scheduler) { if (iterable == null) { throw new Error('iterable cannot be null.') } if (mapFn && !isFunction(mapFn)) { throw new Error('mapFn when provided must be a function'); } if (mapFn) { var mapper = bindCallback(mapFn, thisArg, 2); } isScheduler(scheduler) || (scheduler = currentThreadScheduler); return new FromObservable(iterable, mapper, scheduler); } var FromArrayObservable = (function(__super__) { inherits(FromArrayObservable, __super__); function FromArrayObservable(args, scheduler) { this.args = args; this.scheduler = scheduler; __super__.call(this); } FromArrayObservable.prototype.subscribeCore = function (observer) { var sink = new FromArraySink(observer, this); return sink.run(); }; return FromArrayObservable; }(ObservableBase)); function FromArraySink(observer, parent) { this.observer = observer; this.parent = parent; } FromArraySink.prototype.run = function () { var observer = this.observer, args = this.parent.args, len = args.length; function loopRecursive(i, recurse) { if (i < len) { observer.onNext(args[i]); recurse(i + 1); } else { observer.onCompleted(); } } return this.parent.scheduler.scheduleRecursiveWithState(0, loopRecursive); }; /** * Converts an array to an observable sequence, using an optional scheduler to enumerate the array. * @deprecated use Observable.from or Observable.of * @param {Scheduler} [scheduler] Scheduler to run the enumeration of the input sequence on. * @returns {Observable} The observable sequence whose elements are pulled from the given enumerable sequence. */ var observableFromArray = Observable.fromArray = function (array, scheduler) { isScheduler(scheduler) || (scheduler = currentThreadScheduler); return new FromArrayObservable(array, scheduler) }; var NeverObservable = (function(__super__) { inherits(NeverObservable, __super__); function NeverObservable() { __super__.call(this); } NeverObservable.prototype.subscribeCore = function (observer) { return disposableEmpty; }; return NeverObservable; }(ObservableBase)); /** * Returns a non-terminating observable sequence, which can be used to denote an infinite duration (e.g. when using reactive joins). * @returns {Observable} An observable sequence whose observers will never get called. */ var observableNever = Observable.never = function () { return new NeverObservable(); }; function observableOf (scheduler, array) { isScheduler(scheduler) || (scheduler = currentThreadScheduler); return new FromArrayObservable(array, scheduler); } /** * This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments. * @returns {Observable} The observable sequence whose elements are pulled from the given arguments. */ Observable.of = function () { var len = arguments.length, args = new Array(len); for(var i = 0; i < len; i++) { args[i] = arguments[i]; } return new FromArrayObservable(args, currentThreadScheduler); }; /** * This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments. * @param {Scheduler} scheduler A scheduler to use for scheduling the arguments. * @returns {Observable} The observable sequence whose elements are pulled from the given arguments. */ Observable.ofWithScheduler = function (scheduler) { var len = arguments.length, args = new Array(len - 1); for(var i = 1; i < len; i++) { args[i - 1] = arguments[i]; } return new FromArrayObservable(args, scheduler); }; var PairsObservable = (function(__super__) { inherits(PairsObservable, __super__); function PairsObservable(obj, scheduler) { this.obj = obj; this.keys = Object.keys(obj); this.scheduler = scheduler; __super__.call(this); } PairsObservable.prototype.subscribeCore = function (observer) { var sink = new PairsSink(observer, this); return sink.run(); }; return PairsObservable; }(ObservableBase)); function PairsSink(observer, parent) { this.observer = observer; this.parent = parent; } PairsSink.prototype.run = function () { var observer = this.observer, obj = this.parent.obj, keys = this.parent.keys, len = keys.length; function loopRecursive(i, recurse) { if (i < len) { var key = keys[i]; observer.onNext([key, obj[key]]); recurse(i + 1); } else { observer.onCompleted(); } } return this.parent.scheduler.scheduleRecursiveWithState(0, loopRecursive); }; /** * Convert an object into an observable sequence of [key, value] pairs. * @param {Object} obj The object to inspect. * @param {Scheduler} [scheduler] Scheduler to run the enumeration of the input sequence on. * @returns {Observable} An observable sequence of [key, value] pairs from the object. */ Observable.pairs = function (obj, scheduler) { scheduler || (scheduler = currentThreadScheduler); return new PairsObservable(obj, scheduler); }; var RangeObservable = (function(__super__) { inherits(RangeObservable, __super__); function RangeObservable(start, count, scheduler) { this.start = start; this.count = count; this.scheduler = scheduler; __super__.call(this); } RangeObservable.prototype.subscribeCore = function (observer) { var sink = new RangeSink(observer, this); return sink.run(); }; return RangeObservable; }(ObservableBase)); var RangeSink = (function () { function RangeSink(observer, parent) { this.observer = observer; this.parent = parent; } RangeSink.prototype.run = function () { var start = this.parent.start, count = this.parent.count, observer = this.observer; function loopRecursive(i, recurse) { if (i < count) { observer.onNext(start + i); recurse(i + 1); } else { observer.onCompleted(); } } return this.parent.scheduler.scheduleRecursiveWithState(0, loopRecursive); }; return RangeSink; }()); /** * Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to send out observer messages. * @param {Number} start The value of the first integer in the sequence. * @param {Number} count The number of sequential integers to generate. * @param {Scheduler} [scheduler] Scheduler to run the generator loop on. If not specified, defaults to Scheduler.currentThread. * @returns {Observable} An observable sequence that contains a range of sequential integral numbers. */ Observable.range = function (start, count, scheduler) { isScheduler(scheduler) || (scheduler = currentThreadScheduler); return new RangeObservable(start, count, scheduler); }; var RepeatObservable = (function(__super__) { inherits(RepeatObservable, __super__); function RepeatObservable(value, repeatCount, scheduler) { this.value = value; this.repeatCount = repeatCount == null ? -1 : repeatCount; this.scheduler = scheduler; __super__.call(this); } RepeatObservable.prototype.subscribeCore = function (observer) { var sink = new RepeatSink(observer, this); return sink.run(); }; return RepeatObservable; }(ObservableBase)); function RepeatSink(observer, parent) { this.observer = observer; this.parent = parent; } RepeatSink.prototype.run = function () { var observer = this.observer, value = this.parent.value; function loopRecursive(i, recurse) { if (i === -1 || i > 0) { observer.onNext(value); i > 0 && i--; } if (i === 0) { return observer.onCompleted(); } recurse(i); } return this.parent.scheduler.scheduleRecursiveWithState(this.parent.repeatCount, loopRecursive); }; /** * Generates an observable sequence that repeats the given element the specified number of times, using the specified scheduler to send out observer messages. * @param {Mixed} value Element to repeat. * @param {Number} repeatCount [Optiona] Number of times to repeat the element. If not specified, repeats indefinitely. * @param {Scheduler} scheduler Scheduler to run the producer loop on. If not specified, defaults to Scheduler.immediate. * @returns {Observable} An observable sequence that repeats the given element the specified number of times. */ Observable.repeat = function (value, repeatCount, scheduler) { isScheduler(scheduler) || (scheduler = currentThreadScheduler); return new RepeatObservable(value, repeatCount, scheduler); }; var JustObservable = (function(__super__) { inherits(JustObservable, __super__); function JustObservable(value, scheduler) { this.value = value; this.scheduler = scheduler; __super__.call(this); } JustObservable.prototype.subscribeCore = function (observer) { var sink = new JustSink(observer, this); return sink.run(); }; function JustSink(observer, parent) { this.observer = observer; this.parent = parent; } function scheduleItem(s, state) { var value = state[0], observer = state[1]; observer.onNext(value); observer.onCompleted(); } JustSink.prototype.run = function () { return this.parent.scheduler.scheduleWithState([this.parent.value, this.observer], scheduleItem); }; return JustObservable; }(ObservableBase)); /** * Returns an observable sequence that contains a single element, using the specified scheduler to send out observer messages. * There is an alias called 'just' or browsers <IE9. * @param {Mixed} value Single element in the resulting observable sequence. * @param {Scheduler} scheduler Scheduler to send the single element on. If not specified, defaults to Scheduler.immediate. * @returns {Observable} An observable sequence containing the single specified element. */ var observableReturn = Observable['return'] = Observable.just = Observable.returnValue = function (value, scheduler) { isScheduler(scheduler) || (scheduler = immediateScheduler); return new JustObservable(value, scheduler); }; var ThrowObservable = (function(__super__) { inherits(ThrowObservable, __super__); function ThrowObservable(error, scheduler) { this.error = error; this.scheduler = scheduler; __super__.call(this); } ThrowObservable.prototype.subscribeCore = function (observer) { var sink = new ThrowSink(observer, this); return sink.run(); }; function ThrowSink(observer, parent) { this.observer = observer; this.parent = parent; } function scheduleItem(s, state) { var error = state[0], observer = state[1]; observer.onError(error); } ThrowSink.prototype.run = function () { return this.parent.scheduler.scheduleWithState([this.parent.error, this.observer], scheduleItem); }; return ThrowObservable; }(ObservableBase)); /** * Returns an observable sequence that terminates with an exception, using the specified scheduler to send out the single onError message. * There is an alias to this method called 'throwError' for browsers <IE9. * @param {Mixed} error An object used for the sequence's termination. * @param {Scheduler} scheduler Scheduler to send the exceptional termination call on. If not specified, defaults to Scheduler.immediate. * @returns {Observable} The observable sequence that terminates exceptionally with the specified exception object. */ var observableThrow = Observable['throw'] = Observable.throwError = Observable.throwException = function (error, scheduler) { isScheduler(scheduler) || (scheduler = immediateScheduler); return new ThrowObservable(error, scheduler); }; function observableCatchHandler(source, handler) { return new AnonymousObservable(function (o) { var d1 = new SingleAssignmentDisposable(), subscription = new SerialDisposable(); subscription.setDisposable(d1); d1.setDisposable(source.subscribe(function (x) { o.onNext(x); }, function (e) { try { var result = handler(e); } catch (ex) { return o.onError(ex); } isPromise(result) && (result = observableFromPromise(result)); var d = new SingleAssignmentDisposable(); subscription.setDisposable(d); d.setDisposable(result.subscribe(o)); }, function (x) { o.onCompleted(x); })); return subscription; }, source); } /** * Continues an observable sequence that is terminated by an exception with the next observable sequence. * @example * 1 - xs.catchException(ys) * 2 - xs.catchException(function (ex) { return ys(ex); }) * @param {Mixed} handlerOrSecond Exception handler function that returns an observable sequence given the error that occurred in the first sequence, or a second observable sequence used to produce results when an error occurred in the first sequence. * @returns {Observable} An observable sequence containing the first sequence's elements, followed by the elements of the handler sequence in case an exception occurred. */ observableProto['catch'] = observableProto.catchError = observableProto.catchException = function (handlerOrSecond) { return typeof handlerOrSecond === 'function' ? observableCatchHandler(this, handlerOrSecond) : observableCatch([this, handlerOrSecond]); }; /** * Continues an observable sequence that is terminated by an exception with the next observable sequence. * @param {Array | Arguments} args Arguments or an array to use as the next sequence if an error occurs. * @returns {Observable} An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully. */ var observableCatch = Observable.catchError = Observable['catch'] = Observable.catchException = function () { var items = []; if (Array.isArray(arguments[0])) { items = arguments[0]; } else { for(var i = 0, len = arguments.length; i < len; i++) { items.push(arguments[i]); } } return enumerableOf(items).catchError(); }; /** * Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences or Promises produces an element. * This can be in the form of an argument list of observables or an array. * * @example * 1 - obs = observable.combineLatest(obs1, obs2, obs3, function (o1, o2, o3) { return o1 + o2 + o3; }); * 2 - obs = observable.combineLatest([obs1, obs2, obs3], function (o1, o2, o3) { return o1 + o2 + o3; }); * @returns {Observable} An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ observableProto.combineLatest = function () { var len = arguments.length, args = new Array(len); for(var i = 0; i < len; i++) { args[i] = arguments[i]; } if (Array.isArray(args[0])) { args[0].unshift(this); } else { args.unshift(this); } return combineLatest.apply(this, args); }; /** * Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences or Promises produces an element. * * @example * 1 - obs = Rx.Observable.combineLatest(obs1, obs2, obs3, function (o1, o2, o3) { return o1 + o2 + o3; }); * 2 - obs = Rx.Observable.combineLatest([obs1, obs2, obs3], function (o1, o2, o3) { return o1 + o2 + o3; }); * @returns {Observable} An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ var combineLatest = Observable.combineLatest = function () { var len = arguments.length, args = new Array(len); for(var i = 0; i < len; i++) { args[i] = arguments[i]; } var resultSelector = args.pop(); Array.isArray(args[0]) && (args = args[0]); return new AnonymousObservable(function (o) { var n = args.length, falseFactory = function () { return false; }, hasValue = arrayInitialize(n, falseFactory), hasValueAll = false, isDone = arrayInitialize(n, falseFactory), values = new Array(n); function next(i) { hasValue[i] = true; if (hasValueAll || (hasValueAll = hasValue.every(identity))) { try { var res = resultSelector.apply(null, values); } catch (e) { return o.onError(e); } o.onNext(res); } else if (isDone.filter(function (x, j) { return j !== i; }).every(identity)) { o.onCompleted(); } } function done (i) { isDone[i] = true; isDone.every(identity) && o.onCompleted(); } var subscriptions = new Array(n); for (var idx = 0; idx < n; idx++) { (function (i) { var source = args[i], sad = new SingleAssignmentDisposable(); isPromise(source) && (source = observableFromPromise(source)); sad.setDisposable(source.subscribe(function (x) { values[i] = x; next(i); }, function(e) { o.onError(e); }, function () { done(i); } )); subscriptions[i] = sad; }(idx)); } return new CompositeDisposable(subscriptions); }, this); }; /** * Concatenates all the observable sequences. This takes in either an array or variable arguments to concatenate. * @returns {Observable} An observable sequence that contains the elements of each given sequence, in sequential order. */ observableProto.concat = function () { for(var args = [], i = 0, len = arguments.length; i < len; i++) { args.push(arguments[i]); } args.unshift(this); return observableConcat.apply(null, args); }; /** * Concatenates all the observable sequences. * @param {Array | Arguments} args Arguments or an array to concat to the observable sequence. * @returns {Observable} An observable sequence that contains the elements of each given sequence, in sequential order. */ var observableConcat = Observable.concat = function () { var args; if (Array.isArray(arguments[0])) { args = arguments[0]; } else { args = new Array(arguments.length); for(var i = 0, len = arguments.length; i < len; i++) { args[i] = arguments[i]; } } return enumerableOf(args).concat(); }; /** * Concatenates an observable sequence of observable sequences. * @returns {Observable} An observable sequence that contains the elements of each observed inner sequence, in sequential order. */ observableProto.concatAll = observableProto.concatObservable = function () { return this.merge(1); }; var MergeObservable = (function (__super__) { inherits(MergeObservable, __super__); function MergeObservable(source, maxConcurrent) { this.source = source; this.maxConcurrent = maxConcurrent; __super__.call(this); } MergeObservable.prototype.subscribeCore = function(observer) { var g = new CompositeDisposable(); g.add(this.source.subscribe(new MergeObserver(observer, this.maxConcurrent, g))); return g; }; return MergeObservable; }(ObservableBase)); var MergeObserver = (function () { function MergeObserver(o, max, g) { this.o = o; this.max = max; this.g = g; this.done = false; this.q = []; this.activeCount = 0; this.isStopped = false; } MergeObserver.prototype.handleSubscribe = function (xs) { var sad = new SingleAssignmentDisposable(); this.g.add(sad); isPromise(xs) && (xs = observableFromPromise(xs)); sad.setDisposable(xs.subscribe(new InnerObserver(this, sad))); }; MergeObserver.prototype.onNext = function (innerSource) { if (this.isStopped) { return; } if(this.activeCount < this.max) { this.activeCount++; this.handleSubscribe(innerSource); } else { this.q.push(innerSource); } }; MergeObserver.prototype.onError = function (e) { if (!this.isStopped) { this.isStopped = true; this.o.onError(e); } }; MergeObserver.prototype.onCompleted = function () { if (!this.isStopped) { this.isStopped = true; this.done = true; this.activeCount === 0 && this.o.onCompleted(); } }; MergeObserver.prototype.dispose = function() { this.isStopped = true; }; MergeObserver.prototype.fail = function (e) { if (!this.isStopped) { this.isStopped = true; this.o.onError(e); return true; } return false; }; function InnerObserver(parent, sad) { this.parent = parent; this.sad = sad; this.isStopped = false; } InnerObserver.prototype.onNext = function (x) { if(!this.isStopped) { this.parent.o.onNext(x); } }; InnerObserver.prototype.onError = function (e) { if (!this.isStopped) { this.isStopped = true; this.parent.o.onError(e); } }; InnerObserver.prototype.onCompleted = function () { if(!this.isStopped) { this.isStopped = true; var parent = this.parent; parent.g.remove(this.sad); if (parent.q.length > 0) { parent.handleSubscribe(parent.q.shift()); } else { parent.activeCount--; parent.done && parent.activeCount === 0 && parent.o.onCompleted(); } } }; InnerObserver.prototype.dispose = function() { this.isStopped = true; }; InnerObserver.prototype.fail = function (e) { if (!this.isStopped) { this.isStopped = true; this.parent.o.onError(e); return true; } return false; }; return MergeObserver; }()); /** * Merges an observable sequence of observable sequences into an observable sequence, limiting the number of concurrent subscriptions to inner sequences. * Or merges two observable sequences into a single observable sequence. * * @example * 1 - merged = sources.merge(1); * 2 - merged = source.merge(otherSource); * @param {Mixed} [maxConcurrentOrOther] Maximum number of inner observable sequences being subscribed to concurrently or the second observable sequence. * @returns {Observable} The observable sequence that merges the elements of the inner sequences. */ observableProto.merge = function (maxConcurrentOrOther) { return typeof maxConcurrentOrOther !== 'number' ? observableMerge(this, maxConcurrentOrOther) : new MergeObservable(this, maxConcurrentOrOther); }; /** * Merges all the observable sequences into a single observable sequence. * The scheduler is optional and if not specified, the immediate scheduler is used. * @returns {Observable} The observable sequence that merges the elements of the observable sequences. */ var observableMerge = Observable.merge = function () { var scheduler, sources = [], i, len = arguments.length; if (!arguments[0]) { scheduler = immediateScheduler; for(i = 1; i < len; i++) { sources.push(arguments[i]); } } else if (isScheduler(arguments[0])) { scheduler = arguments[0]; for(i = 1; i < len; i++) { sources.push(arguments[i]); } } else { scheduler = immediateScheduler; for(i = 0; i < len; i++) { sources.push(arguments[i]); } } if (Array.isArray(sources[0])) { sources = sources[0]; } return observableOf(scheduler, sources).mergeAll(); }; var CompositeError = Rx.CompositeError = function(errors) { this.name = "NotImplementedError"; this.innerErrors = errors; this.message = 'This contains multiple errors. Check the innerErrors'; Error.call(this); } CompositeError.prototype = Error.prototype; /** * Flattens an Observable that emits Observables into one Observable, in a way that allows an Observer to * receive all successfully emitted items from all of the source Observables without being interrupted by * an error notification from one of them. * * This behaves like Observable.prototype.mergeAll except that if any of the merged Observables notify of an * error via the Observer's onError, mergeDelayError will refrain from propagating that * error notification until all of the merged Observables have finished emitting items. * @param {Array | Arguments} args Arguments or an array to merge. * @returns {Observable} an Observable that emits all of the items emitted by the Observables emitted by the Observable */ Observable.mergeDelayError = function() { var args; if (Array.isArray(arguments[0])) { args = arguments[0]; } else { var len = arguments.length; args = new Array(len); for(var i = 0; i < len; i++) { args[i] = arguments[i]; } } var source = observableOf(null, args); return new AnonymousObservable(function (o) { var group = new CompositeDisposable(), m = new SingleAssignmentDisposable(), isStopped = false, errors = []; function setCompletion() { if (errors.length === 0) { o.onCompleted(); } else if (errors.length === 1) { o.onError(errors[0]); } else { o.onError(new CompositeError(errors)); } } group.add(m); m.setDisposable(source.subscribe( function (innerSource) { var innerSubscription = new SingleAssignmentDisposable(); group.add(innerSubscription); // Check for promises support isPromise(innerSource) && (innerSource = observableFromPromise(innerSource)); innerSubscription.setDisposable(innerSource.subscribe( function (x) { o.onNext(x); }, function (e) { errors.push(e); group.remove(innerSubscription); isStopped && group.length === 1 && setCompletion(); }, function () { group.remove(innerSubscription); isStopped && group.length === 1 && setCompletion(); })); }, function (e) { errors.push(e); isStopped = true; group.length === 1 && setCompletion(); }, function () { isStopped = true; group.length === 1 && setCompletion(); })); return group; }); }; var MergeAllObservable = (function (__super__) { inherits(MergeAllObservable, __super__); function MergeAllObservable(source) { this.source = source; __super__.call(this); } MergeAllObservable.prototype.subscribeCore = function (observer) { var g = new CompositeDisposable(), m = new SingleAssignmentDisposable(); g.add(m); m.setDisposable(this.source.subscribe(new MergeAllObserver(observer, g))); return g; }; return MergeAllObservable; }(ObservableBase)); var MergeAllObserver = (function() { function MergeAllObserver(o, g) { this.o = o; this.g = g; this.isStopped = false; this.done = false; } MergeAllObserver.prototype.onNext = function(innerSource) { if(this.isStopped) { return; } var sad = new SingleAssignmentDisposable(); this.g.add(sad); isPromise(innerSource) && (innerSource = observableFromPromise(innerSource)); sad.setDisposable(innerSource.subscribe(new InnerObserver(this, this.g, sad))); }; MergeAllObserver.prototype.onError = function (e) { if(!this.isStopped) { this.isStopped = true; this.o.onError(e); } }; MergeAllObserver.prototype.onCompleted = function () { if(!this.isStopped) { this.isStopped = true; this.done = true; this.g.length === 1 && this.o.onCompleted(); } }; MergeAllObserver.prototype.dispose = function() { this.isStopped = true; }; MergeAllObserver.prototype.fail = function (e) { if (!this.isStopped) { this.isStopped = true; this.o.onError(e); return true; } return false; }; function InnerObserver(parent, g, sad) { this.parent = parent; this.g = g; this.sad = sad; this.isStopped = false; } InnerObserver.prototype.onNext = function (x) { if (!this.isStopped) { this.parent.o.onNext(x); } }; InnerObserver.prototype.onError = function (e) { if(!this.isStopped) { this.isStopped = true; this.parent.o.onError(e); } }; InnerObserver.prototype.onCompleted = function () { if(!this.isStopped) { var parent = this.parent; this.isStopped = true; parent.g.remove(this.sad); parent.done && parent.g.length === 1 && parent.o.onCompleted(); } }; InnerObserver.prototype.dispose = function() { this.isStopped = true; }; InnerObserver.prototype.fail = function (e) { if (!this.isStopped) { this.isStopped = true; this.parent.o.onError(e); return true; } return false; }; return MergeAllObserver; }()); /** * Merges an observable sequence of observable sequences into an observable sequence. * @returns {Observable} The observable sequence that merges the elements of the inner sequences. */ observableProto.mergeAll = observableProto.mergeObservable = function () { return new MergeAllObservable(this); }; /** * Returns the values from the source observable sequence only after the other observable sequence produces a value. * @param {Observable | Promise} other The observable sequence or Promise that triggers propagation of elements of the source sequence. * @returns {Observable} An observable sequence containing the elements of the source sequence starting from the point the other sequence triggered propagation. */ observableProto.skipUntil = function (other) { var source = this; return new AnonymousObservable(function (o) { var isOpen = false; var disposables = new CompositeDisposable(source.subscribe(function (left) { isOpen && o.onNext(left); }, function (e) { o.onError(e); }, function () { isOpen && o.onCompleted(); })); isPromise(other) && (other = observableFromPromise(other)); var rightSubscription = new SingleAssignmentDisposable(); disposables.add(rightSubscription); rightSubscription.setDisposable(other.subscribe(function () { isOpen = true; rightSubscription.dispose(); }, function (e) { o.onError(e); }, function () { rightSubscription.dispose(); })); return disposables; }, source); }; /** * Transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. * @returns {Observable} The observable sequence that at any point in time produces the elements of the most recent inner observable sequence that has been received. */ observableProto['switch'] = observableProto.switchLatest = function () { var sources = this; return new AnonymousObservable(function (observer) { var hasLatest = false, innerSubscription = new SerialDisposable(), isStopped = false, latest = 0, subscription = sources.subscribe( function (innerSource) { var d = new SingleAssignmentDisposable(), id = ++latest; hasLatest = true; innerSubscription.setDisposable(d); // Check if Promise or Observable isPromise(innerSource) && (innerSource = observableFromPromise(innerSource)); d.setDisposable(innerSource.subscribe( function (x) { latest === id && observer.onNext(x); }, function (e) { latest === id && observer.onError(e); }, function () { if (latest === id) { hasLatest = false; isStopped && observer.onCompleted(); } })); }, function (e) { observer.onError(e); }, function () { isStopped = true; !hasLatest && observer.onCompleted(); }); return new CompositeDisposable(subscription, innerSubscription); }, sources); }; /** * Returns the values from the source observable sequence until the other observable sequence produces a value. * @param {Observable | Promise} other Observable sequence or Promise that terminates propagation of elements of the source sequence. * @returns {Observable} An observable sequence containing the elements of the source sequence up to the point the other sequence interrupted further propagation. */ observableProto.takeUntil = function (other) { var source = this; return new AnonymousObservable(function (o) { isPromise(other) && (other = observableFromPromise(other)); return new CompositeDisposable( source.subscribe(o), other.subscribe(function () { o.onCompleted(); }, function (e) { o.onError(e); }, noop) ); }, source); }; /** * Merges the specified observable sequences into one observable sequence by using the selector function only when the (first) source observable sequence produces an element. * * @example * 1 - obs = obs1.withLatestFrom(obs2, obs3, function (o1, o2, o3) { return o1 + o2 + o3; }); * 2 - obs = obs1.withLatestFrom([obs2, obs3], function (o1, o2, o3) { return o1 + o2 + o3; }); * @returns {Observable} An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ observableProto.withLatestFrom = function () { var len = arguments.length, args = new Array(len) for(var i = 0; i < len; i++) { args[i] = arguments[i]; } var resultSelector = args.pop(), source = this; if (typeof source === 'undefined') { throw new Error('Source observable not found for withLatestFrom().'); } if (typeof resultSelector !== 'function') { throw new Error('withLatestFrom() expects a resultSelector function.'); } if (Array.isArray(args[0])) { args = args[0]; } return new AnonymousObservable(function (observer) { var falseFactory = function () { return false; }, n = args.length, hasValue = arrayInitialize(n, falseFactory), hasValueAll = false, values = new Array(n); var subscriptions = new Array(n + 1); for (var idx = 0; idx < n; idx++) { (function (i) { var other = args[i], sad = new SingleAssignmentDisposable(); isPromise(other) && (other = observableFromPromise(other)); sad.setDisposable(other.subscribe(function (x) { values[i] = x; hasValue[i] = true; hasValueAll = hasValue.every(identity); }, observer.onError.bind(observer), function () {})); subscriptions[i] = sad; }(idx)); } var sad = new SingleAssignmentDisposable(); sad.setDisposable(source.subscribe(function (x) { var res; var allValues = [x].concat(values); if (!hasValueAll) return; try { res = resultSelector.apply(null, allValues); } catch (ex) { observer.onError(ex); return; } observer.onNext(res); }, observer.onError.bind(observer), function () { observer.onCompleted(); })); subscriptions[n] = sad; return new CompositeDisposable(subscriptions); }, this); }; function zipArray(second, resultSelector) { var first = this; return new AnonymousObservable(function (observer) { var index = 0, len = second.length; return first.subscribe(function (left) { if (index < len) { var right = second[index++], result; try { result = resultSelector(left, right); } catch (e) { return observer.onError(e); } observer.onNext(result); } else { observer.onCompleted(); } }, function (e) { observer.onError(e); }, function () { observer.onCompleted(); }); }, first); } function falseFactory() { return false; } function emptyArrayFactory() { return []; } /** * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences or an array have produced an element at a corresponding index. * The last element in the arguments must be a function to invoke for each series of elements at corresponding indexes in the args. * * @example * 1 - res = obs1.zip(obs2, fn); * 1 - res = x1.zip([1,2,3], fn); * @returns {Observable} An observable sequence containing the result of combining elements of the args using the specified result selector function. */ observableProto.zip = function () { if (Array.isArray(arguments[0])) { return zipArray.apply(this, arguments); } var len = arguments.length, args = new Array(len); for(var i = 0; i < len; i++) { args[i] = arguments[i]; } var parent = this, resultSelector = args.pop(); args.unshift(parent); return new AnonymousObservable(function (observer) { var n = args.length, queues = arrayInitialize(n, emptyArrayFactory), isDone = arrayInitialize(n, falseFactory); function next(i) { var res, queuedValues; if (queues.every(function (x) { return x.length > 0; })) { try { queuedValues = queues.map(function (x) { return x.shift(); }); res = resultSelector.apply(parent, queuedValues); } catch (ex) { observer.onError(ex); return; } observer.onNext(res); } else if (isDone.filter(function (x, j) { return j !== i; }).every(identity)) { observer.onCompleted(); } }; function done(i) { isDone[i] = true; if (isDone.every(function (x) { return x; })) { observer.onCompleted(); } } var subscriptions = new Array(n); for (var idx = 0; idx < n; idx++) { (function (i) { var source = args[i], sad = new SingleAssignmentDisposable(); isPromise(source) && (source = observableFromPromise(source)); sad.setDisposable(source.subscribe(function (x) { queues[i].push(x); next(i); }, function (e) { observer.onError(e); }, function () { done(i); })); subscriptions[i] = sad; })(idx); } return new CompositeDisposable(subscriptions); }, parent); }; /** * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. * @param arguments Observable sources. * @param {Function} resultSelector Function to invoke for each series of elements at corresponding indexes in the sources. * @returns {Observable} An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ Observable.zip = function () { var len = arguments.length, args = new Array(len); for(var i = 0; i < len; i++) { args[i] = arguments[i]; } var first = args.shift(); return first.zip.apply(first, args); }; /** * Merges the specified observable sequences into one observable sequence by emitting a list with the elements of the observable sequences at corresponding indexes. * @param arguments Observable sources. * @returns {Observable} An observable sequence containing lists of elements at corresponding indexes. */ Observable.zipArray = function () { var sources; if (Array.isArray(arguments[0])) { sources = arguments[0]; } else { var len = arguments.length; sources = new Array(len); for(var i = 0; i < len; i++) { sources[i] = arguments[i]; } } return new AnonymousObservable(function (observer) { var n = sources.length, queues = arrayInitialize(n, function () { return []; }), isDone = arrayInitialize(n, function () { return false; }); function next(i) { if (queues.every(function (x) { return x.length > 0; })) { var res = queues.map(function (x) { return x.shift(); }); observer.onNext(res); } else if (isDone.filter(function (x, j) { return j !== i; }).every(identity)) { observer.onCompleted(); return; } }; function done(i) { isDone[i] = true; if (isDone.every(identity)) { observer.onCompleted(); return; } } var subscriptions = new Array(n); for (var idx = 0; idx < n; idx++) { (function (i) { subscriptions[i] = new SingleAssignmentDisposable(); subscriptions[i].setDisposable(sources[i].subscribe(function (x) { queues[i].push(x); next(i); }, function (e) { observer.onError(e); }, function () { done(i); })); })(idx); } return new CompositeDisposable(subscriptions); }); }; /** * Hides the identity of an observable sequence. * @returns {Observable} An observable sequence that hides the identity of the source sequence. */ observableProto.asObservable = function () { var source = this; return new AnonymousObservable(function (o) { return source.subscribe(o); }, this); }; /** * Dematerializes the explicit notification values of an observable sequence as implicit notifications. * @returns {Observable} An observable sequence exhibiting the behavior corresponding to the source sequence's notification values. */ observableProto.dematerialize = function () { var source = this; return new AnonymousObservable(function (o) { return source.subscribe(function (x) { return x.accept(o); }, function(e) { o.onError(e); }, function () { o.onCompleted(); }); }, this); }; /** * Returns an observable sequence that contains only distinct contiguous elements according to the keySelector and the comparer. * * var obs = observable.distinctUntilChanged(); * var obs = observable.distinctUntilChanged(function (x) { return x.id; }); * var obs = observable.distinctUntilChanged(function (x) { return x.id; }, function (x, y) { return x === y; }); * * @param {Function} [keySelector] A function to compute the comparison key for each element. If not provided, it projects the value. * @param {Function} [comparer] Equality comparer for computed key values. If not provided, defaults to an equality comparer function. * @returns {Observable} An observable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence. */ observableProto.distinctUntilChanged = function (keySelector, comparer) { var source = this; comparer || (comparer = defaultComparer); return new AnonymousObservable(function (o) { var hasCurrentKey = false, currentKey; return source.subscribe(function (value) { var key = value; if (keySelector) { try { key = keySelector(value); } catch (e) { o.onError(e); return; } } if (hasCurrentKey) { try { var comparerEquals = comparer(currentKey, key); } catch (e) { o.onError(e); return; } } if (!hasCurrentKey || !comparerEquals) { hasCurrentKey = true; currentKey = key; o.onNext(value); } }, function (e) { o.onError(e); }, function () { o.onCompleted(); }); }, this); }; /** * Invokes an action for each element in the observable sequence and invokes an action upon graceful or exceptional termination of the observable sequence. * This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline. * @param {Function | Observer} observerOrOnNext Action to invoke for each element in the observable sequence or an observer. * @param {Function} [onError] Action to invoke upon exceptional termination of the observable sequence. Used if only the observerOrOnNext parameter is also a function. * @param {Function} [onCompleted] Action to invoke upon graceful termination of the observable sequence. Used if only the observerOrOnNext parameter is also a function. * @returns {Observable} The source sequence with the side-effecting behavior applied. */ observableProto['do'] = observableProto.tap = observableProto.doAction = function (observerOrOnNext, onError, onCompleted) { var source = this; return new AnonymousObservable(function (observer) { var tapObserver = !observerOrOnNext || isFunction(observerOrOnNext) ? observerCreate(observerOrOnNext || noop, onError || noop, onCompleted || noop) : observerOrOnNext; return source.subscribe(function (x) { try { tapObserver.onNext(x); } catch (e) { observer.onError(e); } observer.onNext(x); }, function (err) { try { tapObserver.onError(err); } catch (e) { observer.onError(e); } observer.onError(err); }, function () { try { tapObserver.onCompleted(); } catch (e) { observer.onError(e); } observer.onCompleted(); }); }, this); }; /** * Invokes an action for each element in the observable sequence. * This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline. * @param {Function} onNext Action to invoke for each element in the observable sequence. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Observable} The source sequence with the side-effecting behavior applied. */ observableProto.doOnNext = observableProto.tapOnNext = function (onNext, thisArg) { return this.tap(typeof thisArg !== 'undefined' ? function (x) { onNext.call(thisArg, x); } : onNext); }; /** * Invokes an action upon exceptional termination of the observable sequence. * This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline. * @param {Function} onError Action to invoke upon exceptional termination of the observable sequence. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Observable} The source sequence with the side-effecting behavior applied. */ observableProto.doOnError = observableProto.tapOnError = function (onError, thisArg) { return this.tap(noop, typeof thisArg !== 'undefined' ? function (e) { onError.call(thisArg, e); } : onError); }; /** * Invokes an action upon graceful termination of the observable sequence. * This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline. * @param {Function} onCompleted Action to invoke upon graceful termination of the observable sequence. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Observable} The source sequence with the side-effecting behavior applied. */ observableProto.doOnCompleted = observableProto.tapOnCompleted = function (onCompleted, thisArg) { return this.tap(noop, null, typeof thisArg !== 'undefined' ? function () { onCompleted.call(thisArg); } : onCompleted); }; /** * Invokes a specified action after the source observable sequence terminates gracefully or exceptionally. * @param {Function} finallyAction Action to invoke after the source observable sequence terminates. * @returns {Observable} Source sequence with the action-invoking termination behavior applied. */ observableProto['finally'] = observableProto.ensure = function (action) { var source = this; return new AnonymousObservable(function (observer) { var subscription; try { subscription = source.subscribe(observer); } catch (e) { action(); throw e; } return disposableCreate(function () { try { subscription.dispose(); } catch (e) { throw e; } finally { action(); } }); }, this); }; /** * @deprecated use #finally or #ensure instead. */ observableProto.finallyAction = function (action) { //deprecate('finallyAction', 'finally or ensure'); return this.ensure(action); }; /** * Ignores all elements in an observable sequence leaving only the termination messages. * @returns {Observable} An empty observable sequence that signals termination, successful or exceptional, of the source sequence. */ observableProto.ignoreElements = function () { var source = this; return new AnonymousObservable(function (o) { return source.subscribe(noop, function (e) { o.onError(e); }, function () { o.onCompleted(); }); }, source); }; /** * Materializes the implicit notifications of an observable sequence as explicit notification values. * @returns {Observable} An observable sequence containing the materialized notification values from the source sequence. */ observableProto.materialize = function () { var source = this; return new AnonymousObservable(function (observer) { return source.subscribe(function (value) { observer.onNext(notificationCreateOnNext(value)); }, function (e) { observer.onNext(notificationCreateOnError(e)); observer.onCompleted(); }, function () { observer.onNext(notificationCreateOnCompleted()); observer.onCompleted(); }); }, source); }; /** * Repeats the observable sequence a specified number of times. If the repeat count is not specified, the sequence repeats indefinitely. * @param {Number} [repeatCount] Number of times to repeat the sequence. If not provided, repeats the sequence indefinitely. * @returns {Observable} The observable sequence producing the elements of the given sequence repeatedly. */ observableProto.repeat = function (repeatCount) { return enumerableRepeat(this, repeatCount).concat(); }; /** * Repeats the source observable sequence the specified number of times or until it successfully terminates. If the retry count is not specified, it retries indefinitely. * Note if you encounter an error and want it to retry once, then you must use .retry(2); * * @example * var res = retried = retry.repeat(); * var res = retried = retry.repeat(2); * @param {Number} [retryCount] Number of times to retry the sequence. If not provided, retry the sequence indefinitely. * @returns {Observable} An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully. */ observableProto.retry = function (retryCount) { return enumerableRepeat(this, retryCount).catchError(); }; /** * Repeats the source observable sequence upon error each time the notifier emits or until it successfully terminates. * if the notifier completes, the observable sequence completes. * * @example * var timer = Observable.timer(500); * var source = observable.retryWhen(timer); * @param {Observable} [notifier] An observable that triggers the retries or completes the observable with onNext or onCompleted respectively. * @returns {Observable} An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully. */ observableProto.retryWhen = function (notifier) { return enumerableRepeat(this).catchErrorWhen(notifier); }; /** * Applies an accumulator function over an observable sequence and returns each intermediate result. The optional seed value is used as the initial accumulator value. * For aggregation behavior with no intermediate results, see Observable.aggregate. * @example * var res = source.scan(function (acc, x) { return acc + x; }); * var res = source.scan(0, function (acc, x) { return acc + x; }); * @param {Mixed} [seed] The initial accumulator value. * @param {Function} accumulator An accumulator function to be invoked on each element. * @returns {Observable} An observable sequence containing the accumulated values. */ observableProto.scan = function () { var hasSeed = false, seed, accumulator, source = this; if (arguments.length === 2) { hasSeed = true; seed = arguments[0]; accumulator = arguments[1]; } else { accumulator = arguments[0]; } return new AnonymousObservable(function (o) { var hasAccumulation, accumulation, hasValue; return source.subscribe ( function (x) { !hasValue && (hasValue = true); try { if (hasAccumulation) { accumulation = accumulator(accumulation, x); } else { accumulation = hasSeed ? accumulator(seed, x) : x; hasAccumulation = true; } } catch (e) { o.onError(e); return; } o.onNext(accumulation); }, function (e) { o.onError(e); }, function () { !hasValue && hasSeed && o.onNext(seed); o.onCompleted(); } ); }, source); }; /** * Bypasses a specified number of elements at the end of an observable sequence. * @description * This operator accumulates a queue with a length enough to store the first `count` elements. As more elements are * received, elements are taken from the front of the queue and produced on the result sequence. This causes elements to be delayed. * @param count Number of elements to bypass at the end of the source sequence. * @returns {Observable} An observable sequence containing the source sequence elements except for the bypassed ones at the end. */ observableProto.skipLast = function (count) { if (count < 0) { throw new ArgumentOutOfRangeError(); } var source = this; return new AnonymousObservable(function (o) { var q = []; return source.subscribe(function (x) { q.push(x); q.length > count && o.onNext(q.shift()); }, function (e) { o.onError(e); }, function () { o.onCompleted(); }); }, source); }; /** * Prepends a sequence of values to an observable sequence with an optional scheduler and an argument list of values to prepend. * @example * var res = source.startWith(1, 2, 3); * var res = source.startWith(Rx.Scheduler.timeout, 1, 2, 3); * @param {Arguments} args The specified values to prepend to the observable sequence * @returns {Observable} The source sequence prepended with the specified values. */ observableProto.startWith = function () { var values, scheduler, start = 0; if (!!arguments.length && isScheduler(arguments[0])) { scheduler = arguments[0]; start = 1; } else { scheduler = immediateScheduler; } for(var args = [], i = start, len = arguments.length; i < len; i++) { args.push(arguments[i]); } return enumerableOf([observableFromArray(args, scheduler), this]).concat(); }; /** * Returns a specified number of contiguous elements from the end of an observable sequence. * @description * This operator accumulates a buffer with a length enough to store elements count elements. Upon completion of * the source sequence, this buffer is drained on the result sequence. This causes the elements to be delayed. * @param {Number} count Number of elements to take from the end of the source sequence. * @returns {Observable} An observable sequence containing the specified number of elements from the end of the source sequence. */ observableProto.takeLast = function (count) { if (count < 0) { throw new ArgumentOutOfRangeError(); } var source = this; return new AnonymousObservable(function (o) { var q = []; return source.subscribe(function (x) { q.push(x); q.length > count && q.shift(); }, function (e) { o.onError(e); }, function () { while (q.length > 0) { o.onNext(q.shift()); } o.onCompleted(); }); }, source); }; function concatMap(source, selector, thisArg) { var selectorFunc = bindCallback(selector, thisArg, 3); return source.map(function (x, i) { var result = selectorFunc(x, i, source); isPromise(result) && (result = observableFromPromise(result)); (isArrayLike(result) || isIterable(result)) && (result = observableFrom(result)); return result; }).concatAll(); } /** * One of the Following: * Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence. * * @example * var res = source.concatMap(function (x) { return Rx.Observable.range(0, x); }); * Or: * Projects each element of an observable sequence to an observable sequence, invokes the result selector for the source element and each of the corresponding inner sequence's elements, and merges the results into one observable sequence. * * var res = source.concatMap(function (x) { return Rx.Observable.range(0, x); }, function (x, y) { return x + y; }); * Or: * Projects each element of the source observable sequence to the other observable sequence and merges the resulting observable sequences into one observable sequence. * * var res = source.concatMap(Rx.Observable.fromArray([1,2,3])); * @param {Function} selector A transform function to apply to each element or an observable sequence to project each element from the * source sequence onto which could be either an observable or Promise. * @param {Function} [resultSelector] A transform function to apply to each element of the intermediate sequence. * @returns {Observable} An observable sequence whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of the input sequence and then mapping each of those sequence elements and their corresponding source element to a result element. */ observableProto.selectConcat = observableProto.concatMap = function (selector, resultSelector, thisArg) { if (isFunction(selector) && isFunction(resultSelector)) { return this.concatMap(function (x, i) { var selectorResult = selector(x, i); isPromise(selectorResult) && (selectorResult = observableFromPromise(selectorResult)); (isArrayLike(selectorResult) || isIterable(selectorResult)) && (selectorResult = observableFrom(selectorResult)); return selectorResult.map(function (y, i2) { return resultSelector(x, y, i, i2); }); }); } return isFunction(selector) ? concatMap(this, selector, thisArg) : concatMap(this, function () { return selector; }); }; var MapObservable = (function (__super__) { inherits(MapObservable, __super__); function MapObservable(source, selector, thisArg) { this.source = source; this.selector = bindCallback(selector, thisArg, 3); __super__.call(this); } MapObservable.prototype.internalMap = function (selector, thisArg) { var self = this; return new MapObservable(this.source, function (x, i, o) { return selector.call(this, self.selector(x, i, o), i, o); }, thisArg) }; MapObservable.prototype.subscribeCore = function (observer) { return this.source.subscribe(new MapObserver(observer, this.selector, this)); }; return MapObservable; }(ObservableBase)); function MapObserver(observer, selector, source) { this.observer = observer; this.selector = selector; this.source = source; this.i = 0; this.isStopped = false; } MapObserver.prototype.onNext = function(x) { if (this.isStopped) { return; } var result = tryCatch(this.selector).call(this, x, this.i++, this.source); if (result === errorObj) { return this.observer.onError(result.e); } this.observer.onNext(result); }; MapObserver.prototype.onError = function (e) { if(!this.isStopped) { this.isStopped = true; this.observer.onError(e); } }; MapObserver.prototype.onCompleted = function () { if(!this.isStopped) { this.isStopped = true; this.observer.onCompleted(); } }; MapObserver.prototype.dispose = function() { this.isStopped = true; }; MapObserver.prototype.fail = function (e) { if (!this.isStopped) { this.isStopped = true; this.observer.onError(e); return true; } return false; }; /** * Projects each element of an observable sequence into a new form by incorporating the element's index. * @param {Function} selector A transform function to apply to each source element; the second parameter of the function represents the index of the source element. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Observable} An observable sequence whose elements are the result of invoking the transform function on each element of source. */ observableProto.map = observableProto.select = function (selector, thisArg) { var selectorFn = typeof selector === 'function' ? selector : function () { return selector; }; return this instanceof MapObservable ? this.internalMap(selectorFn, thisArg) : new MapObservable(this, selectorFn, thisArg); }; /** * Retrieves the value of a specified nested property from all elements in * the Observable sequence. * @param {Arguments} arguments The nested properties to pluck. * @returns {Observable} Returns a new Observable sequence of property values. */ observableProto.pluck = function () { var args = arguments, len = arguments.length; if (len === 0) { throw new Error('List of properties cannot be empty.'); } return this.map(function (x) { var currentProp = x; for (var i = 0; i < len; i++) { var p = currentProp[args[i]]; if (typeof p !== 'undefined') { currentProp = p; } else { return undefined; } } return currentProp; }); }; function flatMap(source, selector, thisArg) { var selectorFunc = bindCallback(selector, thisArg, 3); return source.map(function (x, i) { var result = selectorFunc(x, i, source); isPromise(result) && (result = observableFromPromise(result)); (isArrayLike(result) || isIterable(result)) && (result = observableFrom(result)); return result; }).mergeAll(); } /** * One of the Following: * Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence. * * @example * var res = source.selectMany(function (x) { return Rx.Observable.range(0, x); }); * Or: * Projects each element of an observable sequence to an observable sequence, invokes the result selector for the source element and each of the corresponding inner sequence's elements, and merges the results into one observable sequence. * * var res = source.selectMany(function (x) { return Rx.Observable.range(0, x); }, function (x, y) { return x + y; }); * Or: * Projects each element of the source observable sequence to the other observable sequence and merges the resulting observable sequences into one observable sequence. * * var res = source.selectMany(Rx.Observable.fromArray([1,2,3])); * @param {Function} selector A transform function to apply to each element or an observable sequence to project each element from the source sequence onto which could be either an observable or Promise. * @param {Function} [resultSelector] A transform function to apply to each element of the intermediate sequence. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Observable} An observable sequence whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of the input sequence and then mapping each of those sequence elements and their corresponding source element to a result element. */ observableProto.selectMany = observableProto.flatMap = function (selector, resultSelector, thisArg) { if (isFunction(selector) && isFunction(resultSelector)) { return this.flatMap(function (x, i) { var selectorResult = selector(x, i); isPromise(selectorResult) && (selectorResult = observableFromPromise(selectorResult)); (isArrayLike(selectorResult) || isIterable(selectorResult)) && (selectorResult = observableFrom(selectorResult)); return selectorResult.map(function (y, i2) { return resultSelector(x, y, i, i2); }); }, thisArg); } return isFunction(selector) ? flatMap(this, selector, thisArg) : flatMap(this, function () { return selector; }); }; /** * Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then * transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. * @param {Function} selector A transform function to apply to each source element; the second parameter of the function represents the index of the source element. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Observable} An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences * and that at any point in time produces the elements of the most recent inner observable sequence that has been received. */ observableProto.selectSwitch = observableProto.flatMapLatest = observableProto.switchMap = function (selector, thisArg) { return this.select(selector, thisArg).switchLatest(); }; /** * Bypasses a specified number of elements in an observable sequence and then returns the remaining elements. * @param {Number} count The number of elements to skip before returning the remaining elements. * @returns {Observable} An observable sequence that contains the elements that occur after the specified index in the input sequence. */ observableProto.skip = function (count) { if (count < 0) { throw new ArgumentOutOfRangeError(); } var source = this; return new AnonymousObservable(function (o) { var remaining = count; return source.subscribe(function (x) { if (remaining <= 0) { o.onNext(x); } else { remaining--; } }, function (e) { o.onError(e); }, function () { o.onCompleted(); }); }, source); }; /** * Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. * The element's index is used in the logic of the predicate function. * * var res = source.skipWhile(function (value) { return value < 10; }); * var res = source.skipWhile(function (value, index) { return value < 10 || index < 10; }); * @param {Function} predicate A function to test each element for a condition; the second parameter of the function represents the index of the source element. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Observable} An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. */ observableProto.skipWhile = function (predicate, thisArg) { var source = this, callback = bindCallback(predicate, thisArg, 3); return new AnonymousObservable(function (o) { var i = 0, running = false; return source.subscribe(function (x) { if (!running) { try { running = !callback(x, i++, source); } catch (e) { o.onError(e); return; } } running && o.onNext(x); }, function (e) { o.onError(e); }, function () { o.onCompleted(); }); }, source); }; /** * Returns a specified number of contiguous elements from the start of an observable sequence, using the specified scheduler for the edge case of take(0). * * var res = source.take(5); * var res = source.take(0, Rx.Scheduler.timeout); * @param {Number} count The number of elements to return. * @param {Scheduler} [scheduler] Scheduler used to produce an OnCompleted message in case <paramref name="count count</paramref> is set to 0. * @returns {Observable} An observable sequence that contains the specified number of elements from the start of the input sequence. */ observableProto.take = function (count, scheduler) { if (count < 0) { throw new ArgumentOutOfRangeError(); } if (count === 0) { return observableEmpty(scheduler); } var source = this; return new AnonymousObservable(function (o) { var remaining = count; return source.subscribe(function (x) { if (remaining-- > 0) { o.onNext(x); remaining === 0 && o.onCompleted(); } }, function (e) { o.onError(e); }, function () { o.onCompleted(); }); }, source); }; /** * Returns elements from an observable sequence as long as a specified condition is true. * The element's index is used in the logic of the predicate function. * @param {Function} predicate A function to test each element for a condition; the second parameter of the function represents the index of the source element. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Observable} An observable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. */ observableProto.takeWhile = function (predicate, thisArg) { var source = this, callback = bindCallback(predicate, thisArg, 3); return new AnonymousObservable(function (o) { var i = 0, running = true; return source.subscribe(function (x) { if (running) { try { running = callback(x, i++, source); } catch (e) { o.onError(e); return; } if (running) { o.onNext(x); } else { o.onCompleted(); } } }, function (e) { o.onError(e); }, function () { o.onCompleted(); }); }, source); }; var FilterObservable = (function (__super__) { inherits(FilterObservable, __super__); function FilterObservable(source, predicate, thisArg) { this.source = source; this.predicate = bindCallback(predicate, thisArg, 3); __super__.call(this); } FilterObservable.prototype.subscribeCore = function (observer) { return this.source.subscribe(new FilterObserver(observer, this.predicate, this)); }; FilterObservable.prototype.internalFilter = function(predicate, thisArg) { var self = this; return new FilterObservable(this.source, function(x, i, o) { return self.predicate(x, i, o) && predicate.call(this, x, i, o); }, thisArg); }; return FilterObservable; }(ObservableBase)); function FilterObserver(observer, predicate, source) { this.observer = observer; this.predicate = predicate; this.source = source; this.i = 0; this.isStopped = false; } FilterObserver.prototype.onNext = function(x) { if (this.isStopped) { return; } var shouldYield = tryCatch(this.predicate).call(this, x, this.i++, this.source); if (shouldYield === errorObj) { return this.observer.onError(shouldYield.e); } shouldYield && this.observer.onNext(x); }; FilterObserver.prototype.onError = function (e) { if(!this.isStopped) { this.isStopped = true; this.observer.onError(e); } }; FilterObserver.prototype.onCompleted = function () { if(!this.isStopped) { this.isStopped = true; this.observer.onCompleted(); } }; FilterObserver.prototype.dispose = function() { this.isStopped = true; }; FilterObserver.prototype.fail = function (e) { if (!this.isStopped) { this.isStopped = true; this.observer.onError(e); return true; } return false; }; /** * Filters the elements of an observable sequence based on a predicate by incorporating the element's index. * @param {Function} predicate A function to test each source element for a condition; the second parameter of the function represents the index of the source element. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Observable} An observable sequence that contains elements from the input sequence that satisfy the condition. */ observableProto.filter = observableProto.where = function (predicate, thisArg) { return this instanceof FilterObservable ? this.internalFilter(predicate, thisArg) : new FilterObservable(this, predicate, thisArg); }; /** * Converts a callback function to an observable sequence. * * @param {Function} function Function with a callback as the last parameter to convert to an Observable sequence. * @param {Mixed} [context] The context for the func parameter to be executed. If not specified, defaults to undefined. * @param {Function} [selector] A selector which takes the arguments from the callback to produce a single item to yield on next. * @returns {Function} A function, when executed with the required parameters minus the callback, produces an Observable sequence with a single value of the arguments to the callback as an array. */ Observable.fromCallback = function (func, context, selector) { return function () { var len = arguments.length, args = new Array(len) for(var i = 0; i < len; i++) { args[i] = arguments[i]; } return new AnonymousObservable(function (observer) { function handler() { var len = arguments.length, results = new Array(len); for(var i = 0; i < len; i++) { results[i] = arguments[i]; } if (selector) { try { results = selector.apply(context, results); } catch (e) { return observer.onError(e); } observer.onNext(results); } else { if (results.length <= 1) { observer.onNext.apply(observer, results); } else { observer.onNext(results); } } observer.onCompleted(); } args.push(handler); func.apply(context, args); }).publishLast().refCount(); }; }; /** * Converts a Node.js callback style function to an observable sequence. This must be in function (err, ...) format. * @param {Function} func The function to call * @param {Mixed} [context] The context for the func parameter to be executed. If not specified, defaults to undefined. * @param {Function} [selector] A selector which takes the arguments from the callback minus the error to produce a single item to yield on next. * @returns {Function} An async function which when applied, returns an observable sequence with the callback arguments as an array. */ Observable.fromNodeCallback = function (func, context, selector) { return function () { var len = arguments.length, args = new Array(len); for(var i = 0; i < len; i++) { args[i] = arguments[i]; } return new AnonymousObservable(function (observer) { function handler(err) { if (err) { observer.onError(err); return; } var len = arguments.length, results = []; for(var i = 1; i < len; i++) { results[i - 1] = arguments[i]; } if (selector) { try { results = selector.apply(context, results); } catch (e) { return observer.onError(e); } observer.onNext(results); } else { if (results.length <= 1) { observer.onNext.apply(observer, results); } else { observer.onNext(results); } } observer.onCompleted(); } args.push(handler); func.apply(context, args); }).publishLast().refCount(); }; }; function createListener (element, name, handler) { if (element.addEventListener) { element.addEventListener(name, handler, false); return disposableCreate(function () { element.removeEventListener(name, handler, false); }); } throw new Error('No listener found'); } function createEventListener (el, eventName, handler) { var disposables = new CompositeDisposable(); // Asume NodeList if (Object.prototype.toString.call(el) === '[object NodeList]') { for (var i = 0, len = el.length; i < len; i++) { disposables.add(createEventListener(el.item(i), eventName, handler)); } } else if (el) { disposables.add(createListener(el, eventName, handler)); } return disposables; } /** * Configuration option to determine whether to use native events only */ Rx.config.useNativeEvents = false; /** * Creates an observable sequence by adding an event listener to the matching DOMElement or each item in the NodeList. * * @example * var source = Rx.Observable.fromEvent(element, 'mouseup'); * * @param {Object} element The DOMElement or NodeList to attach a listener. * @param {String} eventName The event name to attach the observable sequence. * @param {Function} [selector] A selector which takes the arguments from the event handler to produce a single item to yield on next. * @returns {Observable} An observable sequence of events from the specified element and the specified event. */ Observable.fromEvent = function (element, eventName, selector) { // Node.js specific if (element.addListener) { return fromEventPattern( function (h) { element.addListener(eventName, h); }, function (h) { element.removeListener(eventName, h); }, selector); } // Use only if non-native events are allowed if (!Rx.config.useNativeEvents) { // Handles jq, Angular.js, Zepto, Marionette, Ember.js if (typeof element.on === 'function' && typeof element.off === 'function') { return fromEventPattern( function (h) { element.on(eventName, h); }, function (h) { element.off(eventName, h); }, selector); } } return new AnonymousObservable(function (observer) { return createEventListener( element, eventName, function handler (e) { var results = e; if (selector) { try { results = selector(arguments); } catch (err) { return observer.onError(err); } } observer.onNext(results); }); }).publish().refCount(); }; /** * Creates an observable sequence from an event emitter via an addHandler/removeHandler pair. * @param {Function} addHandler The function to add a handler to the emitter. * @param {Function} [removeHandler] The optional function to remove a handler from an emitter. * @param {Function} [selector] A selector which takes the arguments from the event handler to produce a single item to yield on next. * @returns {Observable} An observable sequence which wraps an event from an event emitter */ var fromEventPattern = Observable.fromEventPattern = function (addHandler, removeHandler, selector) { return new AnonymousObservable(function (observer) { function innerHandler (e) { var result = e; if (selector) { try { result = selector(arguments); } catch (err) { return observer.onError(err); } } observer.onNext(result); } var returnValue = addHandler(innerHandler); return disposableCreate(function () { if (removeHandler) { removeHandler(innerHandler, returnValue); } }); }).publish().refCount(); }; /** * Converts a Promise to an Observable sequence * @param {Promise} An ES6 Compliant promise. * @returns {Observable} An Observable sequence which wraps the existing promise success and failure. */ var observableFromPromise = Observable.fromPromise = function (promise) { return observableDefer(function () { var subject = new Rx.AsyncSubject(); promise.then( function (value) { subject.onNext(value); subject.onCompleted(); }, subject.onError.bind(subject)); return subject; }); }; /* * Converts an existing observable sequence to an ES6 Compatible Promise * @example * var promise = Rx.Observable.return(42).toPromise(RSVP.Promise); * * // With config * Rx.config.Promise = RSVP.Promise; * var promise = Rx.Observable.return(42).toPromise(); * @param {Function} [promiseCtor] The constructor of the promise. If not provided, it looks for it in Rx.config.Promise. * @returns {Promise} An ES6 compatible promise with the last value from the observable sequence. */ observableProto.toPromise = function (promiseCtor) { promiseCtor || (promiseCtor = Rx.config.Promise); if (!promiseCtor) { throw new NotSupportedError('Promise type not provided nor in Rx.config.Promise'); } var source = this; return new promiseCtor(function (resolve, reject) { // No cancellation can be done var value, hasValue = false; source.subscribe(function (v) { value = v; hasValue = true; }, reject, function () { hasValue && resolve(value); }); }); }; /** * Invokes the asynchronous function, surfacing the result through an observable sequence. * @param {Function} functionAsync Asynchronous function which returns a Promise to run. * @returns {Observable} An observable sequence exposing the function's result value, or an exception. */ Observable.startAsync = function (functionAsync) { var promise; try { promise = functionAsync(); } catch (e) { return observableThrow(e); } return observableFromPromise(promise); } /** * Multicasts the source sequence notifications through an instantiated subject into all uses of the sequence within a selector function. Each * subscription to the resulting sequence causes a separate multicast invocation, exposing the sequence resulting from the selector function's * invocation. For specializations with fixed subject types, see Publish, PublishLast, and Replay. * * @example * 1 - res = source.multicast(observable); * 2 - res = source.multicast(function () { return new Subject(); }, function (x) { return x; }); * * @param {Function|Subject} subjectOrSubjectSelector * Factory function to create an intermediate subject through which the source sequence's elements will be multicast to the selector function. * Or: * Subject to push source elements into. * * @param {Function} [selector] Optional selector function which can use the multicasted source sequence subject to the policies enforced by the created subject. Specified only if <paramref name="subjectOrSubjectSelector" is a factory function. * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. */ observableProto.multicast = function (subjectOrSubjectSelector, selector) { var source = this; return typeof subjectOrSubjectSelector === 'function' ? new AnonymousObservable(function (observer) { var connectable = source.multicast(subjectOrSubjectSelector()); return new CompositeDisposable(selector(connectable).subscribe(observer), connectable.connect()); }, source) : new ConnectableObservable(source, subjectOrSubjectSelector); }; /** * Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence. * This operator is a specialization of Multicast using a regular Subject. * * @example * var resres = source.publish(); * var res = source.publish(function (x) { return x; }); * * @param {Function} [selector] Selector function which can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will receive all notifications of the source from the time of the subscription on. * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. */ observableProto.publish = function (selector) { return selector && isFunction(selector) ? this.multicast(function () { return new Subject(); }, selector) : this.multicast(new Subject()); }; /** * Returns an observable sequence that shares a single subscription to the underlying sequence. * This operator is a specialization of publish which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. */ observableProto.share = function () { return this.publish().refCount(); }; /** * Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence containing only the last notification. * This operator is a specialization of Multicast using a AsyncSubject. * * @example * var res = source.publishLast(); * var res = source.publishLast(function (x) { return x; }); * * @param selector [Optional] Selector function which can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will only receive the last notification of the source. * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. */ observableProto.publishLast = function (selector) { return selector && isFunction(selector) ? this.multicast(function () { return new AsyncSubject(); }, selector) : this.multicast(new AsyncSubject()); }; /** * Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence and starts with initialValue. * This operator is a specialization of Multicast using a BehaviorSubject. * * @example * var res = source.publishValue(42); * var res = source.publishValue(function (x) { return x.select(function (y) { return y * y; }) }, 42); * * @param {Function} [selector] Optional selector function which can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will receive immediately receive the initial value, followed by all notifications of the source from the time of the subscription on. * @param {Mixed} initialValue Initial value received by observers upon subscription. * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. */ observableProto.publishValue = function (initialValueOrSelector, initialValue) { return arguments.length === 2 ? this.multicast(function () { return new BehaviorSubject(initialValue); }, initialValueOrSelector) : this.multicast(new BehaviorSubject(initialValueOrSelector)); }; /** * Returns an observable sequence that shares a single subscription to the underlying sequence and starts with an initialValue. * This operator is a specialization of publishValue which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. * @param {Mixed} initialValue Initial value received by observers upon subscription. * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. */ observableProto.shareValue = function (initialValue) { return this.publishValue(initialValue).refCount(); }; /** * Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence replaying notifications subject to a maximum time length for the replay buffer. * This operator is a specialization of Multicast using a ReplaySubject. * * @example * var res = source.replay(null, 3); * var res = source.replay(null, 3, 500); * var res = source.replay(null, 3, 500, scheduler); * var res = source.replay(function (x) { return x.take(6).repeat(); }, 3, 500, scheduler); * * @param selector [Optional] Selector function which can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will receive all the notifications of the source subject to the specified replay buffer trimming policy. * @param bufferSize [Optional] Maximum element count of the replay buffer. * @param windowSize [Optional] Maximum time length of the replay buffer. * @param scheduler [Optional] Scheduler where connected observers within the selector function will be invoked on. * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. */ observableProto.replay = function (selector, bufferSize, windowSize, scheduler) { return selector && isFunction(selector) ? this.multicast(function () { return new ReplaySubject(bufferSize, windowSize, scheduler); }, selector) : this.multicast(new ReplaySubject(bufferSize, windowSize, scheduler)); }; /** * Returns an observable sequence that shares a single subscription to the underlying sequence replaying notifications subject to a maximum time length for the replay buffer. * This operator is a specialization of replay which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. * * @example * var res = source.shareReplay(3); * var res = source.shareReplay(3, 500); * var res = source.shareReplay(3, 500, scheduler); * * @param bufferSize [Optional] Maximum element count of the replay buffer. * @param window [Optional] Maximum time length of the replay buffer. * @param scheduler [Optional] Scheduler where connected observers within the selector function will be invoked on. * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. */ observableProto.shareReplay = function (bufferSize, windowSize, scheduler) { return this.replay(null, bufferSize, windowSize, scheduler).refCount(); }; var ConnectableObservable = Rx.ConnectableObservable = (function (__super__) { inherits(ConnectableObservable, __super__); function ConnectableObservable(source, subject) { var hasSubscription = false, subscription, sourceObservable = source.asObservable(); this.connect = function () { if (!hasSubscription) { hasSubscription = true; subscription = new CompositeDisposable(sourceObservable.subscribe(subject), disposableCreate(function () { hasSubscription = false; })); } return subscription; }; __super__.call(this, function (o) { return subject.subscribe(o); }); } ConnectableObservable.prototype.refCount = function () { var connectableSubscription, count = 0, source = this; return new AnonymousObservable(function (observer) { var shouldConnect = ++count === 1, subscription = source.subscribe(observer); shouldConnect && (connectableSubscription = source.connect()); return function () { subscription.dispose(); --count === 0 && connectableSubscription.dispose(); }; }); }; return ConnectableObservable; }(Observable)); function observableTimerDate(dueTime, scheduler) { return new AnonymousObservable(function (observer) { return scheduler.scheduleWithAbsolute(dueTime, function () { observer.onNext(0); observer.onCompleted(); }); }); } function observableTimerDateAndPeriod(dueTime, period, scheduler) { return new AnonymousObservable(function (observer) { var d = dueTime, p = normalizeTime(period); return scheduler.scheduleRecursiveWithAbsoluteAndState(0, d, function (count, self) { if (p > 0) { var now = scheduler.now(); d = d + p; d <= now && (d = now + p); } observer.onNext(count); self(count + 1, d); }); }); } function observableTimerTimeSpan(dueTime, scheduler) { return new AnonymousObservable(function (observer) { return scheduler.scheduleWithRelative(normalizeTime(dueTime), function () { observer.onNext(0); observer.onCompleted(); }); }); } function observableTimerTimeSpanAndPeriod(dueTime, period, scheduler) { return dueTime === period ? new AnonymousObservable(function (observer) { return scheduler.schedulePeriodicWithState(0, period, function (count) { observer.onNext(count); return count + 1; }); }) : observableDefer(function () { return observableTimerDateAndPeriod(scheduler.now() + dueTime, period, scheduler); }); } /** * Returns an observable sequence that produces a value after each period. * * @example * 1 - res = Rx.Observable.interval(1000); * 2 - res = Rx.Observable.interval(1000, Rx.Scheduler.timeout); * * @param {Number} period Period for producing the values in the resulting sequence (specified as an integer denoting milliseconds). * @param {Scheduler} [scheduler] Scheduler to run the timer on. If not specified, Rx.Scheduler.timeout is used. * @returns {Observable} An observable sequence that produces a value after each period. */ var observableinterval = Observable.interval = function (period, scheduler) { return observableTimerTimeSpanAndPeriod(period, period, isScheduler(scheduler) ? scheduler : timeoutScheduler); }; /** * Returns an observable sequence that produces a value after dueTime has elapsed and then after each period. * @param {Number} dueTime Absolute (specified as a Date object) or relative time (specified as an integer denoting milliseconds) at which to produce the first value. * @param {Mixed} [periodOrScheduler] Period to produce subsequent values (specified as an integer denoting milliseconds), or the scheduler to run the timer on. If not specified, the resulting timer is not recurring. * @param {Scheduler} [scheduler] Scheduler to run the timer on. If not specified, the timeout scheduler is used. * @returns {Observable} An observable sequence that produces a value after due time has elapsed and then each period. */ var observableTimer = Observable.timer = function (dueTime, periodOrScheduler, scheduler) { var period; isScheduler(scheduler) || (scheduler = timeoutScheduler); if (periodOrScheduler !== undefined && typeof periodOrScheduler === 'number') { period = periodOrScheduler; } else if (isScheduler(periodOrScheduler)) { scheduler = periodOrScheduler; } if (dueTime instanceof Date && period === undefined) { return observableTimerDate(dueTime.getTime(), scheduler); } if (dueTime instanceof Date && period !== undefined) { period = periodOrScheduler; return observableTimerDateAndPeriod(dueTime.getTime(), period, scheduler); } return period === undefined ? observableTimerTimeSpan(dueTime, scheduler) : observableTimerTimeSpanAndPeriod(dueTime, period, scheduler); }; function observableDelayTimeSpan(source, dueTime, scheduler) { return new AnonymousObservable(function (observer) { var active = false, cancelable = new SerialDisposable(), exception = null, q = [], running = false, subscription; subscription = source.materialize().timestamp(scheduler).subscribe(function (notification) { var d, shouldRun; if (notification.value.kind === 'E') { q = []; q.push(notification); exception = notification.value.exception; shouldRun = !running; } else { q.push({ value: notification.value, timestamp: notification.timestamp + dueTime }); shouldRun = !active; active = true; } if (shouldRun) { if (exception !== null) { observer.onError(exception); } else { d = new SingleAssignmentDisposable(); cancelable.setDisposable(d); d.setDisposable(scheduler.scheduleRecursiveWithRelative(dueTime, function (self) { var e, recurseDueTime, result, shouldRecurse; if (exception !== null) { return; } running = true; do { result = null; if (q.length > 0 && q[0].timestamp - scheduler.now() <= 0) { result = q.shift().value; } if (result !== null) { result.accept(observer); } } while (result !== null); shouldRecurse = false; recurseDueTime = 0; if (q.length > 0) { shouldRecurse = true; recurseDueTime = Math.max(0, q[0].timestamp - scheduler.now()); } else { active = false; } e = exception; running = false; if (e !== null) { observer.onError(e); } else if (shouldRecurse) { self(recurseDueTime); } })); } } }); return new CompositeDisposable(subscription, cancelable); }, source); } function observableDelayDate(source, dueTime, scheduler) { return observableDefer(function () { return observableDelayTimeSpan(source, dueTime - scheduler.now(), scheduler); }); } /** * Time shifts the observable sequence by dueTime. The relative time intervals between the values are preserved. * * @example * 1 - res = Rx.Observable.delay(new Date()); * 2 - res = Rx.Observable.delay(new Date(), Rx.Scheduler.timeout); * * 3 - res = Rx.Observable.delay(5000); * 4 - res = Rx.Observable.delay(5000, 1000, Rx.Scheduler.timeout); * @memberOf Observable# * @param {Number} dueTime Absolute (specified as a Date object) or relative time (specified as an integer denoting milliseconds) by which to shift the observable sequence. * @param {Scheduler} [scheduler] Scheduler to run the delay timers on. If not specified, the timeout scheduler is used. * @returns {Observable} Time-shifted sequence. */ observableProto.delay = function (dueTime, scheduler) { isScheduler(scheduler) || (scheduler = timeoutScheduler); return dueTime instanceof Date ? observableDelayDate(this, dueTime.getTime(), scheduler) : observableDelayTimeSpan(this, dueTime, scheduler); }; /** * Ignores values from an observable sequence which are followed by another value before dueTime. * @param {Number} dueTime Duration of the debounce period for each value (specified as an integer denoting milliseconds). * @param {Scheduler} [scheduler] Scheduler to run the debounce timers on. If not specified, the timeout scheduler is used. * @returns {Observable} The debounced sequence. */ observableProto.debounce = observableProto.throttleWithTimeout = function (dueTime, scheduler) { isScheduler(scheduler) || (scheduler = timeoutScheduler); var source = this; return new AnonymousObservable(function (observer) { var cancelable = new SerialDisposable(), hasvalue = false, value, id = 0; var subscription = source.subscribe( function (x) { hasvalue = true; value = x; id++; var currentId = id, d = new SingleAssignmentDisposable(); cancelable.setDisposable(d); d.setDisposable(scheduler.scheduleWithRelative(dueTime, function () { hasvalue && id === currentId && observer.onNext(value); hasvalue = false; })); }, function (e) { cancelable.dispose(); observer.onError(e); hasvalue = false; id++; }, function () { cancelable.dispose(); hasvalue && observer.onNext(value); observer.onCompleted(); hasvalue = false; id++; }); return new CompositeDisposable(subscription, cancelable); }, this); }; /** * @deprecated use #debounce or #throttleWithTimeout instead. */ observableProto.throttle = function(dueTime, scheduler) { //deprecate('throttle', 'debounce or throttleWithTimeout'); return this.debounce(dueTime, scheduler); }; /** * Records the timestamp for each value in an observable sequence. * * @example * 1 - res = source.timestamp(); // produces { value: x, timestamp: ts } * 2 - res = source.timestamp(Rx.Scheduler.default); * * @param {Scheduler} [scheduler] Scheduler used to compute timestamps. If not specified, the default scheduler is used. * @returns {Observable} An observable sequence with timestamp information on values. */ observableProto.timestamp = function (scheduler) { isScheduler(scheduler) || (scheduler = timeoutScheduler); return this.map(function (x) { return { value: x, timestamp: scheduler.now() }; }); }; function sampleObservable(source, sampler) { return new AnonymousObservable(function (observer) { var atEnd, value, hasValue; function sampleSubscribe() { if (hasValue) { hasValue = false; observer.onNext(value); } atEnd && observer.onCompleted(); } return new CompositeDisposable( source.subscribe(function (newValue) { hasValue = true; value = newValue; }, observer.onError.bind(observer), function () { atEnd = true; }), sampler.subscribe(sampleSubscribe, observer.onError.bind(observer), sampleSubscribe) ); }, source); } /** * Samples the observable sequence at each interval. * * @example * 1 - res = source.sample(sampleObservable); // Sampler tick sequence * 2 - res = source.sample(5000); // 5 seconds * 2 - res = source.sample(5000, Rx.Scheduler.timeout); // 5 seconds * * @param {Mixed} intervalOrSampler Interval at which to sample (specified as an integer denoting milliseconds) or Sampler Observable. * @param {Scheduler} [scheduler] Scheduler to run the sampling timer on. If not specified, the timeout scheduler is used. * @returns {Observable} Sampled observable sequence. */ observableProto.sample = observableProto.throttleLatest = function (intervalOrSampler, scheduler) { isScheduler(scheduler) || (scheduler = timeoutScheduler); return typeof intervalOrSampler === 'number' ? sampleObservable(this, observableinterval(intervalOrSampler, scheduler)) : sampleObservable(this, intervalOrSampler); }; /** * Returns the source observable sequence or the other observable sequence if dueTime elapses. * @param {Number} dueTime Absolute (specified as a Date object) or relative time (specified as an integer denoting milliseconds) when a timeout occurs. * @param {Observable} [other] Sequence to return in case of a timeout. If not specified, a timeout error throwing sequence will be used. * @param {Scheduler} [scheduler] Scheduler to run the timeout timers on. If not specified, the timeout scheduler is used. * @returns {Observable} The source sequence switching to the other sequence in case of a timeout. */ observableProto.timeout = function (dueTime, other, scheduler) { (other == null || typeof other === 'string') && (other = observableThrow(new Error(other || 'Timeout'))); isScheduler(scheduler) || (scheduler = timeoutScheduler); var source = this, schedulerMethod = dueTime instanceof Date ? 'scheduleWithAbsolute' : 'scheduleWithRelative'; return new AnonymousObservable(function (observer) { var id = 0, original = new SingleAssignmentDisposable(), subscription = new SerialDisposable(), switched = false, timer = new SerialDisposable(); subscription.setDisposable(original); function createTimer() { var myId = id; timer.setDisposable(scheduler[schedulerMethod](dueTime, function () { if (id === myId) { isPromise(other) && (other = observableFromPromise(other)); subscription.setDisposable(other.subscribe(observer)); } })); } createTimer(); original.setDisposable(source.subscribe(function (x) { if (!switched) { id++; observer.onNext(x); createTimer(); } }, function (e) { if (!switched) { id++; observer.onError(e); } }, function () { if (!switched) { id++; observer.onCompleted(); } })); return new CompositeDisposable(subscription, timer); }, source); }; /** * Returns an Observable that emits only the first item emitted by the source Observable during sequential time windows of a specified duration. * @param {Number} windowDuration time to wait before emitting another item after emitting the last item * @param {Scheduler} [scheduler] the Scheduler to use internally to manage the timers that handle timeout for each item. If not provided, defaults to Scheduler.timeout. * @returns {Observable} An Observable that performs the throttle operation. */ observableProto.throttleFirst = function (windowDuration, scheduler) { isScheduler(scheduler) || (scheduler = timeoutScheduler); var duration = +windowDuration || 0; if (duration <= 0) { throw new RangeError('windowDuration cannot be less or equal zero.'); } var source = this; return new AnonymousObservable(function (o) { var lastOnNext = 0; return source.subscribe( function (x) { var now = scheduler.now(); if (lastOnNext === 0 || now - lastOnNext >= duration) { lastOnNext = now; o.onNext(x); } },function (e) { o.onError(e); }, function () { o.onCompleted(); } ); }, source); }; var PausableObservable = (function (__super__) { inherits(PausableObservable, __super__); function subscribe(observer) { var conn = this.source.publish(), subscription = conn.subscribe(observer), connection = disposableEmpty; var pausable = this.pauser.distinctUntilChanged().subscribe(function (b) { if (b) { connection = conn.connect(); } else { connection.dispose(); connection = disposableEmpty; } }); return new CompositeDisposable(subscription, connection, pausable); } function PausableObservable(source, pauser) { this.source = source; this.controller = new Subject(); if (pauser && pauser.subscribe) { this.pauser = this.controller.merge(pauser); } else { this.pauser = this.controller; } __super__.call(this, subscribe, source); } PausableObservable.prototype.pause = function () { this.controller.onNext(false); }; PausableObservable.prototype.resume = function () { this.controller.onNext(true); }; return PausableObservable; }(Observable)); /** * Pauses the underlying observable sequence based upon the observable sequence which yields true/false. * @example * var pauser = new Rx.Subject(); * var source = Rx.Observable.interval(100).pausable(pauser); * @param {Observable} pauser The observable sequence used to pause the underlying sequence. * @returns {Observable} The observable sequence which is paused based upon the pauser. */ observableProto.pausable = function (pauser) { return new PausableObservable(this, pauser); }; function combineLatestSource(source, subject, resultSelector) { return new AnonymousObservable(function (o) { var hasValue = [false, false], hasValueAll = false, isDone = false, values = new Array(2), err; function next(x, i) { values[i] = x var res; hasValue[i] = true; if (hasValueAll || (hasValueAll = hasValue.every(identity))) { if (err) { o.onError(err); return; } try { res = resultSelector.apply(null, values); } catch (ex) { o.onError(ex); return; } o.onNext(res); } if (isDone && values[1]) { o.onCompleted(); } } return new CompositeDisposable( source.subscribe( function (x) { next(x, 0); }, function (e) { if (values[1]) { o.onError(e); } else { err = e; } }, function () { isDone = true; values[1] && o.onCompleted(); }), subject.subscribe( function (x) { next(x, 1); }, function (e) { o.onError(e); }, function () { isDone = true; next(true, 1); }) ); }, source); } var PausableBufferedObservable = (function (__super__) { inherits(PausableBufferedObservable, __super__); function subscribe(o) { var q = [], previousShouldFire; var subscription = combineLatestSource( this.source, this.pauser.distinctUntilChanged().startWith(false), function (data, shouldFire) { return { data: data, shouldFire: shouldFire }; }) .subscribe( function (results) { if (previousShouldFire !== undefined && results.shouldFire != previousShouldFire) { previousShouldFire = results.shouldFire; // change in shouldFire if (results.shouldFire) { while (q.length > 0) { o.onNext(q.shift()); } } } else { previousShouldFire = results.shouldFire; // new data if (results.shouldFire) { o.onNext(results.data); } else { q.push(results.data); } } }, function (err) { // Empty buffer before sending error while (q.length > 0) { o.onNext(q.shift()); } o.onError(err); }, function () { // Empty buffer before sending completion while (q.length > 0) { o.onNext(q.shift()); } o.onCompleted(); } ); return subscription; } function PausableBufferedObservable(source, pauser) { this.source = source; this.controller = new Subject(); if (pauser && pauser.subscribe) { this.pauser = this.controller.merge(pauser); } else { this.pauser = this.controller; } __super__.call(this, subscribe, source); } PausableBufferedObservable.prototype.pause = function () { this.controller.onNext(false); }; PausableBufferedObservable.prototype.resume = function () { this.controller.onNext(true); }; return PausableBufferedObservable; }(Observable)); /** * Pauses the underlying observable sequence based upon the observable sequence which yields true/false, * and yields the values that were buffered while paused. * @example * var pauser = new Rx.Subject(); * var source = Rx.Observable.interval(100).pausableBuffered(pauser); * @param {Observable} pauser The observable sequence used to pause the underlying sequence. * @returns {Observable} The observable sequence which is paused based upon the pauser. */ observableProto.pausableBuffered = function (subject) { return new PausableBufferedObservable(this, subject); }; var ControlledObservable = (function (__super__) { inherits(ControlledObservable, __super__); function subscribe (observer) { return this.source.subscribe(observer); } function ControlledObservable (source, enableQueue, scheduler) { __super__.call(this, subscribe, source); this.subject = new ControlledSubject(enableQueue, scheduler); this.source = source.multicast(this.subject).refCount(); } ControlledObservable.prototype.request = function (numberOfItems) { return this.subject.request(numberOfItems == null ? -1 : numberOfItems); }; return ControlledObservable; }(Observable)); var ControlledSubject = (function (__super__) { function subscribe (observer) { return this.subject.subscribe(observer); } inherits(ControlledSubject, __super__); function ControlledSubject(enableQueue, scheduler) { enableQueue == null && (enableQueue = true); __super__.call(this, subscribe); this.subject = new Subject(); this.enableQueue = enableQueue; this.queue = enableQueue ? [] : null; this.requestedCount = 0; this.requestedDisposable = disposableEmpty; this.error = null; this.hasFailed = false; this.hasCompleted = false; this.scheduler = scheduler || currentThreadScheduler; } addProperties(ControlledSubject.prototype, Observer, { onCompleted: function () { this.hasCompleted = true; if (!this.enableQueue || this.queue.length === 0) { this.subject.onCompleted(); } else { this.queue.push(Notification.createOnCompleted()); } }, onError: function (error) { this.hasFailed = true; this.error = error; if (!this.enableQueue || this.queue.length === 0) { this.subject.onError(error); } else { this.queue.push(Notification.createOnError(error)); } }, onNext: function (value) { var hasRequested = false; if (this.requestedCount === 0) { this.enableQueue && this.queue.push(Notification.createOnNext(value)); } else { (this.requestedCount !== -1 && this.requestedCount-- === 0) && this.disposeCurrentRequest(); hasRequested = true; } hasRequested && this.subject.onNext(value); }, _processRequest: function (numberOfItems) { if (this.enableQueue) { while ((this.queue.length >= numberOfItems && numberOfItems > 0) || (this.queue.length > 0 && this.queue[0].kind !== 'N')) { var first = this.queue.shift(); first.accept(this.subject); if (first.kind === 'N') { numberOfItems--; } else { this.disposeCurrentRequest(); this.queue = []; } } return { numberOfItems : numberOfItems, returnValue: this.queue.length !== 0}; } return { numberOfItems: numberOfItems, returnValue: false }; }, request: function (number) { this.disposeCurrentRequest(); var self = this; this.requestedDisposable = this.scheduler.scheduleWithState(number, function(s, i) { var r = self._processRequest(i), remaining = r.numberOfItems; if (!r.returnValue) { self.requestedCount = remaining; self.requestedDisposable = disposableCreate(function () { self.requestedCount = 0; }); } }); return this.requestedDisposable; }, disposeCurrentRequest: function () { this.requestedDisposable.dispose(); this.requestedDisposable = disposableEmpty; } }); return ControlledSubject; }(Observable)); /** * Attaches a controller to the observable sequence with the ability to queue. * @example * var source = Rx.Observable.interval(100).controlled(); * source.request(3); // Reads 3 values * @param {bool} enableQueue truthy value to determine if values should be queued pending the next request * @param {Scheduler} scheduler determines how the requests will be scheduled * @returns {Observable} The observable sequence which is paused based upon the pauser. */ observableProto.controlled = function (enableQueue, scheduler) { if (enableQueue && isScheduler(enableQueue)) { scheduler = enableQueue; enableQueue = true; } if (enableQueue == null) { enableQueue = true; } return new ControlledObservable(this, enableQueue, scheduler); }; /** * Pipes the existing Observable sequence into a Node.js Stream. * @param {Stream} dest The destination Node.js stream. * @returns {Stream} The destination stream. */ observableProto.pipe = function (dest) { var source = this.pausableBuffered(); function onDrain() { source.resume(); } dest.addListener('drain', onDrain); source.subscribe( function (x) { !dest.write(String(x)) && source.pause(); }, function (err) { dest.emit('error', err); }, function () { // Hack check because STDIO is not closable !dest._isStdio && dest.end(); dest.removeListener('drain', onDrain); }); source.resume(); return dest; }; /** * Executes a transducer to transform the observable sequence * @param {Transducer} transducer A transducer to execute * @returns {Observable} An Observable sequence containing the results from the transducer. */ observableProto.transduce = function(transducer) { var source = this; function transformForObserver(o) { return { '@@transducer/init': function() { return o; }, '@@transducer/step': function(obs, input) { return obs.onNext(input); }, '@@transducer/result': function(obs) { return obs.onCompleted(); } }; } return new AnonymousObservable(function(o) { var xform = transducer(transformForObserver(o)); return source.subscribe( function(v) { try { xform['@@transducer/step'](o, v); } catch (e) { o.onError(e); } }, function (e) { o.onError(e); }, function() { xform['@@transducer/result'](o); } ); }, source); }; var AnonymousObservable = Rx.AnonymousObservable = (function (__super__) { inherits(AnonymousObservable, __super__); // Fix subscriber to check for undefined or function returned to decorate as Disposable function fixSubscriber(subscriber) { return subscriber && isFunction(subscriber.dispose) ? subscriber : isFunction(subscriber) ? disposableCreate(subscriber) : disposableEmpty; } function setDisposable(s, state) { var ado = state[0], subscribe = state[1]; var sub = tryCatch(subscribe)(ado); if (sub === errorObj) { if(!ado.fail(errorObj.e)) { return thrower(errorObj.e); } } ado.setDisposable(fixSubscriber(sub)); } function AnonymousObservable(subscribe, parent) { this.source = parent; function s(observer) { var ado = new AutoDetachObserver(observer), state = [ado, subscribe]; if (currentThreadScheduler.scheduleRequired()) { currentThreadScheduler.scheduleWithState(state, setDisposable); } else { setDisposable(null, state); } return ado; } __super__.call(this, s); } return AnonymousObservable; }(Observable)); var AutoDetachObserver = (function (__super__) { inherits(AutoDetachObserver, __super__); function AutoDetachObserver(observer) { __super__.call(this); this.observer = observer; this.m = new SingleAssignmentDisposable(); } var AutoDetachObserverPrototype = AutoDetachObserver.prototype; AutoDetachObserverPrototype.next = function (value) { var result = tryCatch(this.observer.onNext).call(this.observer, value); if (result === errorObj) { this.dispose(); thrower(result.e); } }; AutoDetachObserverPrototype.error = function (err) { var result = tryCatch(this.observer.onError).call(this.observer, err); this.dispose(); result === errorObj && thrower(result.e); }; AutoDetachObserverPrototype.completed = function () { var result = tryCatch(this.observer.onCompleted).call(this.observer); this.dispose(); result === errorObj && thrower(result.e); }; AutoDetachObserverPrototype.setDisposable = function (value) { this.m.setDisposable(value); }; AutoDetachObserverPrototype.getDisposable = function () { return this.m.getDisposable(); }; AutoDetachObserverPrototype.dispose = function () { __super__.prototype.dispose.call(this); this.m.dispose(); }; return AutoDetachObserver; }(AbstractObserver)); var InnerSubscription = function (subject, observer) { this.subject = subject; this.observer = observer; }; InnerSubscription.prototype.dispose = function () { if (!this.subject.isDisposed && this.observer !== null) { var idx = this.subject.observers.indexOf(this.observer); this.subject.observers.splice(idx, 1); this.observer = null; } }; /** * Represents an object that is both an observable sequence as well as an observer. * Each notification is broadcasted to all subscribed observers. */ var Subject = Rx.Subject = (function (__super__) { function subscribe(observer) { checkDisposed(this); if (!this.isStopped) { this.observers.push(observer); return new InnerSubscription(this, observer); } if (this.hasError) { observer.onError(this.error); return disposableEmpty; } observer.onCompleted(); return disposableEmpty; } inherits(Subject, __super__); /** * Creates a subject. */ function Subject() { __super__.call(this, subscribe); this.isDisposed = false, this.isStopped = false, this.observers = []; this.hasError = false; } addProperties(Subject.prototype, Observer.prototype, { /** * Indicates whether the subject has observers subscribed to it. * @returns {Boolean} Indicates whether the subject has observers subscribed to it. */ hasObservers: function () { return this.observers.length > 0; }, /** * Notifies all subscribed observers about the end of the sequence. */ onCompleted: function () { checkDisposed(this); if (!this.isStopped) { this.isStopped = true; for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { os[i].onCompleted(); } this.observers.length = 0; } }, /** * Notifies all subscribed observers about the exception. * @param {Mixed} error The exception to send to all observers. */ onError: function (error) { checkDisposed(this); if (!this.isStopped) { this.isStopped = true; this.error = error; this.hasError = true; for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { os[i].onError(error); } this.observers.length = 0; } }, /** * Notifies all subscribed observers about the arrival of the specified element in the sequence. * @param {Mixed} value The value to send to all observers. */ onNext: function (value) { checkDisposed(this); if (!this.isStopped) { for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { os[i].onNext(value); } } }, /** * Unsubscribe all observers and release resources. */ dispose: function () { this.isDisposed = true; this.observers = null; } }); /** * Creates a subject from the specified observer and observable. * @param {Observer} observer The observer used to send messages to the subject. * @param {Observable} observable The observable used to subscribe to messages sent from the subject. * @returns {Subject} Subject implemented using the given observer and observable. */ Subject.create = function (observer, observable) { return new AnonymousSubject(observer, observable); }; return Subject; }(Observable)); /** * Represents the result of an asynchronous operation. * The last value before the OnCompleted notification, or the error received through OnError, is sent to all subscribed observers. */ var AsyncSubject = Rx.AsyncSubject = (function (__super__) { function subscribe(observer) { checkDisposed(this); if (!this.isStopped) { this.observers.push(observer); return new InnerSubscription(this, observer); } if (this.hasError) { observer.onError(this.error); } else if (this.hasValue) { observer.onNext(this.value); observer.onCompleted(); } else { observer.onCompleted(); } return disposableEmpty; } inherits(AsyncSubject, __super__); /** * Creates a subject that can only receive one value and that value is cached for all future observations. * @constructor */ function AsyncSubject() { __super__.call(this, subscribe); this.isDisposed = false; this.isStopped = false; this.hasValue = false; this.observers = []; this.hasError = false; } addProperties(AsyncSubject.prototype, Observer, { /** * Indicates whether the subject has observers subscribed to it. * @returns {Boolean} Indicates whether the subject has observers subscribed to it. */ hasObservers: function () { checkDisposed(this); return this.observers.length > 0; }, /** * Notifies all subscribed observers about the end of the sequence, also causing the last received value to be sent out (if any). */ onCompleted: function () { var i, len; checkDisposed(this); if (!this.isStopped) { this.isStopped = true; var os = cloneArray(this.observers), len = os.length; if (this.hasValue) { for (i = 0; i < len; i++) { var o = os[i]; o.onNext(this.value); o.onCompleted(); } } else { for (i = 0; i < len; i++) { os[i].onCompleted(); } } this.observers.length = 0; } }, /** * Notifies all subscribed observers about the error. * @param {Mixed} error The Error to send to all observers. */ onError: function (error) { checkDisposed(this); if (!this.isStopped) { this.isStopped = true; this.hasError = true; this.error = error; for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { os[i].onError(error); } this.observers.length = 0; } }, /** * Sends a value to the subject. The last value received before successful termination will be sent to all subscribed and future observers. * @param {Mixed} value The value to store in the subject. */ onNext: function (value) { checkDisposed(this); if (this.isStopped) { return; } this.value = value; this.hasValue = true; }, /** * Unsubscribe all observers and release resources. */ dispose: function () { this.isDisposed = true; this.observers = null; this.exception = null; this.value = null; } }); return AsyncSubject; }(Observable)); var AnonymousSubject = Rx.AnonymousSubject = (function (__super__) { inherits(AnonymousSubject, __super__); function subscribe(observer) { return this.observable.subscribe(observer); } function AnonymousSubject(observer, observable) { this.observer = observer; this.observable = observable; __super__.call(this, subscribe); } addProperties(AnonymousSubject.prototype, Observer.prototype, { onCompleted: function () { this.observer.onCompleted(); }, onError: function (error) { this.observer.onError(error); }, onNext: function (value) { this.observer.onNext(value); } }); return AnonymousSubject; }(Observable)); /** * Represents a value that changes over time. * Observers can subscribe to the subject to receive the last (or initial) value and all subsequent notifications. */ var BehaviorSubject = Rx.BehaviorSubject = (function (__super__) { function subscribe(observer) { checkDisposed(this); if (!this.isStopped) { this.observers.push(observer); observer.onNext(this.value); return new InnerSubscription(this, observer); } if (this.hasError) { observer.onError(this.error); } else { observer.onCompleted(); } return disposableEmpty; } inherits(BehaviorSubject, __super__); /** * Initializes a new instance of the BehaviorSubject class which creates a subject that caches its last value and starts with the specified value. * @param {Mixed} value Initial value sent to observers when no other value has been received by the subject yet. */ function BehaviorSubject(value) { __super__.call(this, subscribe); this.value = value, this.observers = [], this.isDisposed = false, this.isStopped = false, this.hasError = false; } addProperties(BehaviorSubject.prototype, Observer, { /** * Gets the current value or throws an exception. * Value is frozen after onCompleted is called. * After onError is called always throws the specified exception. * An exception is always thrown after dispose is called. * @returns {Mixed} The initial value passed to the constructor until onNext is called; after which, the last value passed to onNext. */ getValue: function () { checkDisposed(this); if (this.hasError) { throw this.error; } return this.value; }, /** * Indicates whether the subject has observers subscribed to it. * @returns {Boolean} Indicates whether the subject has observers subscribed to it. */ hasObservers: function () { return this.observers.length > 0; }, /** * Notifies all subscribed observers about the end of the sequence. */ onCompleted: function () { checkDisposed(this); if (this.isStopped) { return; } this.isStopped = true; for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { os[i].onCompleted(); } this.observers.length = 0; }, /** * Notifies all subscribed observers about the exception. * @param {Mixed} error The exception to send to all observers. */ onError: function (error) { checkDisposed(this); if (this.isStopped) { return; } this.isStopped = true; this.hasError = true; this.error = error; for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { os[i].onError(error); } this.observers.length = 0; }, /** * Notifies all subscribed observers about the arrival of the specified element in the sequence. * @param {Mixed} value The value to send to all observers. */ onNext: function (value) { checkDisposed(this); if (this.isStopped) { return; } this.value = value; for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { os[i].onNext(value); } }, /** * Unsubscribe all observers and release resources. */ dispose: function () { this.isDisposed = true; this.observers = null; this.value = null; this.exception = null; } }); return BehaviorSubject; }(Observable)); /** * Represents an object that is both an observable sequence as well as an observer. * Each notification is broadcasted to all subscribed and future observers, subject to buffer trimming policies. */ var ReplaySubject = Rx.ReplaySubject = (function (__super__) { var maxSafeInteger = Math.pow(2, 53) - 1; function createRemovableDisposable(subject, observer) { return disposableCreate(function () { observer.dispose(); !subject.isDisposed && subject.observers.splice(subject.observers.indexOf(observer), 1); }); } function subscribe(observer) { var so = new ScheduledObserver(this.scheduler, observer), subscription = createRemovableDisposable(this, so); checkDisposed(this); this._trim(this.scheduler.now()); this.observers.push(so); for (var i = 0, len = this.q.length; i < len; i++) { so.onNext(this.q[i].value); } if (this.hasError) { so.onError(this.error); } else if (this.isStopped) { so.onCompleted(); } so.ensureActive(); return subscription; } inherits(ReplaySubject, __super__); /** * Initializes a new instance of the ReplaySubject class with the specified buffer size, window size and scheduler. * @param {Number} [bufferSize] Maximum element count of the replay buffer. * @param {Number} [windowSize] Maximum time length of the replay buffer. * @param {Scheduler} [scheduler] Scheduler the observers are invoked on. */ function ReplaySubject(bufferSize, windowSize, scheduler) { this.bufferSize = bufferSize == null ? maxSafeInteger : bufferSize; this.windowSize = windowSize == null ? maxSafeInteger : windowSize; this.scheduler = scheduler || currentThreadScheduler; this.q = []; this.observers = []; this.isStopped = false; this.isDisposed = false; this.hasError = false; this.error = null; __super__.call(this, subscribe); } addProperties(ReplaySubject.prototype, Observer.prototype, { /** * Indicates whether the subject has observers subscribed to it. * @returns {Boolean} Indicates whether the subject has observers subscribed to it. */ hasObservers: function () { return this.observers.length > 0; }, _trim: function (now) { while (this.q.length > this.bufferSize) { this.q.shift(); } while (this.q.length > 0 && (now - this.q[0].interval) > this.windowSize) { this.q.shift(); } }, /** * Notifies all subscribed observers about the arrival of the specified element in the sequence. * @param {Mixed} value The value to send to all observers. */ onNext: function (value) { checkDisposed(this); if (this.isStopped) { return; } var now = this.scheduler.now(); this.q.push({ interval: now, value: value }); this._trim(now); for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { var observer = os[i]; observer.onNext(value); observer.ensureActive(); } }, /** * Notifies all subscribed observers about the exception. * @param {Mixed} error The exception to send to all observers. */ onError: function (error) { checkDisposed(this); if (this.isStopped) { return; } this.isStopped = true; this.error = error; this.hasError = true; var now = this.scheduler.now(); this._trim(now); for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { var observer = os[i]; observer.onError(error); observer.ensureActive(); } this.observers.length = 0; }, /** * Notifies all subscribed observers about the end of the sequence. */ onCompleted: function () { checkDisposed(this); if (this.isStopped) { return; } this.isStopped = true; var now = this.scheduler.now(); this._trim(now); for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { var observer = os[i]; observer.onCompleted(); observer.ensureActive(); } this.observers.length = 0; }, /** * Unsubscribe all observers and release resources. */ dispose: function () { this.isDisposed = true; this.observers = null; } }); return ReplaySubject; }(Observable)); /** * Used to pause and resume streams. */ Rx.Pauser = (function (__super__) { inherits(Pauser, __super__); function Pauser() { __super__.call(this); } /** * Pauses the underlying sequence. */ Pauser.prototype.pause = function () { this.onNext(false); }; /** * Resumes the underlying sequence. */ Pauser.prototype.resume = function () { this.onNext(true); }; return Pauser; }(Subject)); if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { root.Rx = Rx; define(function() { return Rx; }); } else if (freeExports && freeModule) { // in Node.js or RingoJS if (moduleExports) { (freeModule.exports = Rx).Rx = Rx; } else { freeExports.Rx = Rx; } } else { // in a browser or Rhino root.Rx = Rx; } // All code before this point will be filtered from stack traces. var rEndingLine = captureLine(); }.call(this));
tests/components/Counter/Counter.spec.js
vasekric/regrinder
import React from 'react' import { bindActionCreators } from 'redux' import { Counter } from 'components/Counter/Counter' import { shallow } from 'enzyme' describe('(Component) Counter', () => { let _props, _spies, _wrapper beforeEach(() => { _spies = {} _props = { counter: 5, ...bindActionCreators({ doubleAsync: (_spies.doubleAsync = sinon.spy()), increment: (_spies.increment = sinon.spy()) }, _spies.dispatch = sinon.spy()) } _wrapper = shallow(<Counter {..._props} />) }) it('Should render as a <div>.', () => { expect(_wrapper.is('div')).to.equal(true) }) it('Should render with an <h2> that includes Sample Counter text.', () => { expect(_wrapper.find('h2').text()).to.match(/Counter:/) }) it('Should render props.counter at the end of the sample counter <h2>.', () => { expect(_wrapper.find('h2').text()).to.match(/5$/) _wrapper.setProps({ counter: 8 }) expect(_wrapper.find('h2').text()).to.match(/8$/) }) it('Should render exactly two buttons.', () => { expect(_wrapper).to.have.descendants('.btn') }) // describe('An increment button...', () => { let _button beforeEach(() => { _button = _wrapper.find('button').filterWhere(a => a.text() === 'Increment') }) it('has bootstrap classes', () => { expect(_button.hasClass('btn btn-default')).to.be.true }) it('Should dispatch a `increment` action when clicked', () => { _spies.dispatch.should.have.not.been.called _button.simulate('click') _spies.dispatch.should.have.been.called _spies.increment.should.have.been.called }); }) describe('A Double (Async) button...', () => { let _button beforeEach(() => { _button = _wrapper.find('button').filterWhere(a => a.text() === 'Double (Async)') }) it('has bootstrap classes', () => { expect(_button.hasClass('btn btn-default')).to.be.true }) it('Should dispatch a `doubleAsync` action when clicked', () => { _spies.dispatch.should.have.not.been.called _button.simulate('click') _spies.dispatch.should.have.been.called _spies.doubleAsync.should.have.been.called }); }) })
ie8/src.js
aabenoja/react-bootstrap
import React from 'react'; import Button from '../src/Button'; import DropdownButton from '../src/DropdownButton'; import MenuItem from '../src/MenuItem'; import Accordion from '../src/Accordion'; import Panel from '../src/Panel'; import ButtonToolbar from '../src/ButtonToolbar'; import OverlayTrigger from '../src/OverlayTrigger'; import Tooltip from '../src/Tooltip'; import Alert from '../src/Alert'; import TabbedArea from '../src/TabbedArea'; import TabPane from '../src/TabPane'; import Modal from '../src/Modal'; import OverlayMixin from '../src/OverlayMixin'; import Popover from '../src/Popover'; import Carousel from '../src/Carousel'; import CarouselItem from '../src/CarouselItem'; import './assets/carousel.png'; const dropdownInstance = ( <DropdownButton title='Dropdown'> <MenuItem key='1'>Item 1</MenuItem> <MenuItem key='2'>Item 2</MenuItem> </DropdownButton> ); const accordionInstance = ( <Accordion> <Panel header='Collapsible Group Item #1' key={1}> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. </Panel> <Panel header='Collapsible Group Item #2' key={2}> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. </Panel> <Panel header='Collapsible Group Item #3' key={3}> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. </Panel> </Accordion> ); const positionerInstance = ( <ButtonToolbar> <OverlayTrigger placement='left' overlay={<Tooltip><strong>Holy guacamole!</strong> Check this info.</Tooltip>}> <Button bsStyle='default'>Holy guacamole!</Button> </OverlayTrigger> <OverlayTrigger placement='top' overlay={<Tooltip><strong>Holy guacamole!</strong> Check this info.</Tooltip>}> <Button bsStyle='default'>Holy guacamole!</Button> </OverlayTrigger> <OverlayTrigger placement='bottom' overlay={<Tooltip><strong>Holy guacamole!</strong> Check this info.</Tooltip>}> <Button bsStyle='default'>Holy guacamole!</Button> </OverlayTrigger> <OverlayTrigger placement='right' overlay={<Tooltip><strong>Holy guacamole!</strong> Check this info.</Tooltip>}> <Button bsStyle='default'>Holy guacamole!</Button> </OverlayTrigger> </ButtonToolbar> ); const popoverInstance = ( <ButtonToolbar> <OverlayTrigger trigger='click' placement='left' overlay={<Popover title='Popover left'><strong>Holy guacamole!</strong> Check this info.</Popover>}> <Button bsStyle='default'>Holy guacamole!</Button> </OverlayTrigger> <OverlayTrigger trigger='click' placement='top' overlay={<Popover title='Popover top'><strong>Holy guacamole!</strong> Check this info.</Popover>}> <Button bsStyle='default'>Holy guacamole!</Button> </OverlayTrigger> <OverlayTrigger trigger='click' placement='bottom' overlay={<Popover title='Popover bottom'><strong>Holy guacamole!</strong> Check this info.</Popover>}> <Button bsStyle='default'>Holy guacamole!</Button> </OverlayTrigger> <OverlayTrigger trigger='click' placement='right' overlay={<Popover title='Popover right'><strong>Holy guacamole!</strong> Check this info.</Popover>}> <Button bsStyle='default'>Holy guacamole!</Button> </OverlayTrigger> </ButtonToolbar> ); const tabbedAreaInstance = ( <TabbedArea defaultActiveKey={2}> <TabPane key={1} tab='Tab 1'>TabPane 1 content</TabPane> <TabPane key={2} tab='Tab 2'>TabPane 2 content</TabPane> </TabbedArea> ); const AlertAutoDismissable = React.createClass({ getInitialState() { return { alertVisible: false }; }, render() { if (this.state.alertVisible) { return ( <Alert bsStyle='danger' onDismiss={this.handleAlertDismiss} dismissAfter={2000}> <h4>Oh snap! You got an error!</h4> <p>But this will hide after 2 seconds.</p> </Alert> ); } return ( <Button onClick={this.handleAlertShow}>Show Alert</Button> ); }, handleAlertDismiss() { this.setState({alertVisible: false}); }, handleAlertShow() { this.setState({alertVisible: true}); } }); const CustomModalTrigger = React.createClass({ mixins: [OverlayMixin], getInitialState() { return { isModalOpen: false }; }, handleToggle() { this.setState({ isModalOpen: !this.state.isModalOpen }); }, render() { return ( <Button onClick={this.handleToggle} bsStyle='primary'>Launch</Button> ); }, // This is called by the `OverlayMixin` when this component // is mounted or updated and the return value is appended to the body. renderOverlay() { if (!this.state.isModalOpen) { return <span/>; } return ( <Modal title='Modal heading' onRequestHide={this.handleToggle}> <div className='modal-body'> This modal is controlled by our custom trigger component. </div> <div className='modal-footer'> <Button onClick={this.handleToggle}>Close</Button> </div> </Modal> ); } }); const carouselInstance = ( <Carousel style={{width: 900}}> <CarouselItem> <img width={900} height={500} alt='900x500' src='assets/carousel.png'/> <div className='carousel-caption'> <h3>First slide label</h3> <p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p> </div> </CarouselItem> <CarouselItem> <img width={900} height={500} alt='900x500' src='assets/carousel.png'/> <div className='carousel-caption'> <h3>Second slide label</h3> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p> </div> </CarouselItem> <CarouselItem> <img width={900} height={500} alt='900x500' src='assets/carousel.png'/> <div className='carousel-caption'> <h3>Third slide label</h3> <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p> </div> </CarouselItem> </Carousel> ); const allTests = ( <div> <h2>Dropdown</h2> {dropdownInstance} <h2>Tooltips</h2> {positionerInstance} <h2>Popovers</h2> {popoverInstance} <h2>Tabs</h2> {tabbedAreaInstance} <h2>Accordian</h2> {accordionInstance} <h2>Alert</h2> <AlertAutoDismissable /> <h2>Modal</h2> <CustomModalTrigger /> <h2>Carousel</h2> {carouselInstance} </div> ); React.render(allTests, document.body);
common/views/Dashboard/Dashboard.js
sauleddy/HomePortal
import React, { Component } from 'react'; import { Bar, Line } from 'react-chartjs-2'; import { Dropdown, DropdownMenu, DropdownItem, Progress } from 'reactstrap'; const brandPrimary = '#20a8d8'; const brandSuccess = '#4dbd74'; const brandInfo = '#63c2de'; const brandDanger = '#f86c6b'; // Card Chart 1 const cardChartData1 = { labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'], datasets: [ { label: 'My First dataset', backgroundColor: brandPrimary, borderColor: 'rgba(255,255,255,.55)', data: [65, 59, 84, 84, 51, 55, 40] } ], }; const cardChartOpts1 = { maintainAspectRatio: false, legend: { display: false }, scales: { xAxes: [{ gridLines: { color: 'transparent', zeroLineColor: 'transparent' }, ticks: { fontSize: 2, fontColor: 'transparent', } }], yAxes: [{ display: false, ticks: { display: false, min: Math.min.apply(Math, cardChartData1.datasets[0].data) - 5, max: Math.max.apply(Math, cardChartData1.datasets[0].data) + 5, } }], }, elements: { line: { borderWidth: 1 }, point: { radius: 4, hitRadius: 10, hoverRadius: 4, }, } } // Card Chart 2 const cardChartData2 = { labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'], datasets: [ { label: 'My First dataset', backgroundColor: brandInfo, borderColor: 'rgba(255,255,255,.55)', data: [1, 18, 9, 17, 34, 22, 11] } ], }; const cardChartOpts2 = { maintainAspectRatio: false, legend: { display: false }, scales: { xAxes: [{ gridLines: { color: 'transparent', zeroLineColor: 'transparent' }, ticks: { fontSize: 2, fontColor: 'transparent', } }], yAxes: [{ display: false, ticks: { display: false, min: Math.min.apply(Math, cardChartData2.datasets[0].data) - 5, max: Math.max.apply(Math, cardChartData2.datasets[0].data) + 5, } }], }, elements: { line: { tension: 0.00001, borderWidth: 1 }, point: { radius: 4, hitRadius: 10, hoverRadius: 4, }, } } // Card Chart 3 const cardChartData3 = { labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'], datasets: [ { label: 'My First dataset', backgroundColor: 'rgba(255,255,255,.2)', borderColor: 'rgba(255,255,255,.55)', data: [78, 81, 80, 45, 34, 12, 40] } ], }; const cardChartOpts3 = { maintainAspectRatio: false, legend: { display: false }, scales: { xAxes: [{ display: false }], yAxes: [{ display: false }], }, elements: { line: { borderWidth: 2 }, point: { radius: 0, hitRadius: 10, hoverRadius: 4, }, } } // Card Chart 4 const cardChartData4 = { labels: ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''], datasets: [ { label: 'My First dataset', backgroundColor: 'rgba(255,255,255,.3)', borderColor: 'transparent', data: [78, 81, 80, 45, 34, 12, 40, 75, 34, 89, 32, 68, 54, 72, 18, 98] } ], }; const cardChartOpts4 = { maintainAspectRatio: false, legend: { display: false }, scales: { xAxes: [{ display: false, barPercentage: 0.6, }], yAxes: [{ display: false, }] } } // Main Chart // convert Hex to RGBA function convertHex(hex,opacity) { hex = hex.replace('#',''); var r = parseInt(hex.substring(0,2), 16); var g = parseInt(hex.substring(2,4), 16); var b = parseInt(hex.substring(4,6), 16); var result = 'rgba('+r+','+g+','+b+','+opacity/100+')'; return result; } //Random Numbers function random(min,max) { return Math.floor(Math.random()*(max-min+1)+min); } var elements = 27; var data1 = []; var data2 = []; var data3 = []; for (var i = 0; i <= elements; i++) { data1.push(random(50,200)); data2.push(random(80,100)); data3.push(65); } const mainChart = { labels: ['M', 'T', 'W', 'T', 'F', 'S', 'S', 'M', 'T', 'W', 'T', 'F', 'S', 'S', 'M', 'T', 'W', 'T', 'F', 'S', 'S', 'M', 'T', 'W', 'T', 'F', 'S', 'S'], datasets: [ { label: 'My First dataset', backgroundColor: convertHex(brandInfo,10), borderColor: brandInfo, pointHoverBackgroundColor: '#fff', borderWidth: 2, data: data1 }, { label: 'My Second dataset', backgroundColor: 'transparent', borderColor: brandSuccess, pointHoverBackgroundColor: '#fff', borderWidth: 2, data: data2 }, { label: 'My Third dataset', backgroundColor: 'transparent', borderColor: brandDanger, pointHoverBackgroundColor: '#fff', borderWidth: 1, borderDash: [8, 5], data: data3 } ] } const mainChartOpts = { maintainAspectRatio: false, legend: { display: false }, scales: { xAxes: [{ gridLines: { drawOnChartArea: false, } }], yAxes: [{ ticks: { beginAtZero: true, maxTicksLimit: 5, stepSize: Math.ceil(250 / 5), max: 250 } }] }, elements: { point: { radius: 0, hitRadius: 10, hoverRadius: 4, hoverBorderWidth: 3, } } } class Dashboard extends Component { constructor(props) { super(props); this.toggle = this.toggle.bind(this); this.state = { dropdownOpen: false }; } toggle() { this.setState({ dropdownOpen: !this.state.dropdownOpen }); } render() { return ( <div className="animated fadeIn"> <div className="row"> <div className="col-sm-6 col-lg-3"> <div className="card card-inverse card-primary"> <div className="card-block pb-0"> <div className="btn-group float-right"> <Dropdown isOpen={this.state.card1} toggle={() => { this.setState({ card1: !this.state.card1 }); }}> <button onClick={() => { this.setState({ card1: !this.state.card1 }); }} className="btn btn-transparent active dropdown-toggle p-0" data-toggle="dropdown" aria-haspopup="true" aria-expanded={this.state.card1}> <i className="icon-settings"></i> </button> <DropdownMenu> <DropdownItem>Action</DropdownItem> <DropdownItem>Another action</DropdownItem> <DropdownItem>Something else here</DropdownItem> </DropdownMenu> </Dropdown> </div> <h4 className="mb-0">9.823</h4> <p>Members online</p> </div> <div className="chart-wrapper px-3"> <Line data={cardChartData1} options={cardChartOpts1} height={70}/> </div> </div> </div> <div className="col-sm-6 col-lg-3"> <div className="card card-inverse card-info"> <div className="card-block pb-0"> <div className="btn-group float-right"> <Dropdown isOpen={this.state.card2} toggle={() => { this.setState({ card2: !this.state.card2 }); }}> <button onClick={() => { this.setState({ card2: !this.state.card2 }); }} className="btn btn-transparent active dropdown-toggle p-0" data-toggle="dropdown" aria-haspopup="true" aria-expanded={this.state.card2}> <i className="icon-settings"></i> </button> <DropdownMenu> <DropdownItem>Action</DropdownItem> <DropdownItem>Another action</DropdownItem> <DropdownItem>Something else here</DropdownItem> </DropdownMenu> </Dropdown> </div> <h4 className="mb-0">9.823</h4> <p>Members online</p> </div> <div className="chart-wrapper px-3"> <Line data={cardChartData2} options={cardChartOpts2} height={70}/> </div> </div> </div> <div className="col-sm-6 col-lg-3"> <div className="card card-inverse card-warning"> <div className="card-block pb-0"> <div className="btn-group float-right"> <Dropdown isOpen={this.state.card3} toggle={() => { this.setState({ card3: !this.state.card3 }); }}> <button onClick={() => { this.setState({ card3: !this.state.card3 }); }} className="btn btn-transparent active dropdown-toggle p-0" data-toggle="dropdown" aria-haspopup="true" aria-expanded={this.state.card3}> <i className="icon-settings"></i> </button> <DropdownMenu> <DropdownItem>Action</DropdownItem> <DropdownItem>Another action</DropdownItem> <DropdownItem>Something else here</DropdownItem> </DropdownMenu> </Dropdown> </div> <h4 className="mb-0">9.823</h4> <p>Members online</p> </div> <div className="chart-wrapper"> <Line data={cardChartData3} options={cardChartOpts3} height={70}/> </div> </div> </div> <div className="col-sm-6 col-lg-3"> <div className="card card-inverse card-danger"> <div className="card-block pb-0"> <div className="btn-group float-right"> <Dropdown isOpen={this.state.card4} toggle={() => { this.setState({ card4: !this.state.card4 }); }}> <button onClick={() => { this.setState({ card4: !this.state.card4 }); }} className="btn btn-transparent active dropdown-toggle p-0" data-toggle="dropdown" aria-haspopup="true" aria-expanded={this.state.card4}> <i className="icon-settings"></i> </button> <DropdownMenu> <DropdownItem>Action</DropdownItem> <DropdownItem>Another action</DropdownItem> <DropdownItem>Something else here</DropdownItem> </DropdownMenu> </Dropdown> </div> <h4 className="mb-0">9.823</h4> <p>Members online</p> </div> <div className="chart-wrapper px-3"> <Bar data={cardChartData4} options={cardChartOpts4} height={70}/> </div> </div> </div> </div> <div className="card"> <div className="card-block"> <div className="row"> <div className="col-sm-5"> <h4 className="card-title mb-0">Traffic</h4> <div className="small text-muted">November 2015</div> </div> <div className="col-sm-7 hidden-sm-down"> <button type="button" className="btn btn-primary float-right"><i className="icon-cloud-download"></i></button> <div className="btn-toolbar float-right" role="toolbar" aria-label="Toolbar with button groups"> <div className="btn-group mr-3" data-toggle="buttons" aria-label="First group"> <label className="btn btn-outline-secondary"> <input type="radio" name="options" id="option1"/> Day </label> <label className="btn btn-outline-secondary active"> <input type="radio" name="options" id="option2" defaultChecked/> Month </label> <label className="btn btn-outline-secondary"> <input type="radio" name="options" id="option3"/> Year </label> </div> </div> </div> </div> <div className="chart-wrapper" style={{height: 300 + 'px', marginTop: 40 + 'px'}}> <Line data={mainChart} options={mainChartOpts} height={300}/> </div> </div> <div className="card-footer"> <ul> <li> <div className="text-muted">Visits</div> <strong>29.703 Users (40%)</strong> <Progress className="progress-xs mt-2" color="success" value="40" /> </li> <li className="hidden-sm-down"> <div className="text-muted">Unique</div> <strong>24.093 Users (20%)</strong> <Progress className="progress-xs mt-2" color="info" value="20" /> </li> <li> <div className="text-muted">Pageviews</div> <strong>78.706 Views (60%)</strong> <Progress className="progress-xs mt-2" color="warning" value="60" /> </li> <li className="hidden-sm-down"> <div className="text-muted">New Users</div> <strong>22.123 Users (80%)</strong> <Progress className="progress-xs mt-2" color="danger" value="80" /> </li> <li className="hidden-sm-down"> <div className="text-muted">Bounce Rate</div> <strong>40.15%</strong> <Progress className="progress-xs mt-2" color="primary" value="40" /> </li> </ul> </div> </div> <div className="row"> <div className="col-sm-6 col-lg-3"> <div className="social-box facebook"> <i className="fa fa-facebook"></i> <div className="chart-wrapper"> <canvas id="social-box-chart-1" height="90"></canvas> </div> <ul> <li> <strong>89k</strong> <span>friends</span> </li> <li> <strong>459</strong> <span>feeds</span> </li> </ul> </div> </div> <div className="col-sm-6 col-lg-3"> <div className="social-box twitter"> <i className="fa fa-twitter"></i> <div className="chart-wrapper"> <canvas id="social-box-chart-2" height="90"></canvas> </div> <ul> <li> <strong>973k</strong> <span>followers</span> </li> <li> <strong>1.792</strong> <span>tweets</span> </li> </ul> </div> </div> <div className="col-sm-6 col-lg-3"> <div className="social-box linkedin"> <i className="fa fa-linkedin"></i> <div className="chart-wrapper"> <canvas id="social-box-chart-3" height="90"></canvas> </div> <ul> <li> <strong>500+</strong> <span>contacts</span> </li> <li> <strong>292</strong> <span>feeds</span> </li> </ul> </div> </div> <div className="col-sm-6 col-lg-3"> <div className="social-box google-plus"> <i className="fa fa-google-plus"></i> <div className="chart-wrapper"> <canvas id="social-box-chart-4" height="90"></canvas> </div> <ul> <li> <strong>894</strong> <span>followers</span> </li> <li> <strong>92</strong> <span>circles</span> </li> </ul> </div> </div> </div> <div className="row"> <div className="col-md-12"> <div className="card"> <div className="card-header"> Traffic &amp; Sales </div> <div className="card-block"> <div className="row"> <div className="col-sm-12 col-lg-4"> <div className="row"> <div className="col-sm-6"> <div className="callout callout-info"> <small className="text-muted">New Clients</small><br/> <strong className="h4">9,123</strong> <div className="chart-wrapper"> <canvas id="sparkline-chart-1" width="100" height="30"></canvas> </div> </div> </div> <div className="col-sm-6"> <div className="callout callout-danger"> <small className="text-muted">Recuring Clients</small><br/> <strong className="h4">22,643</strong> <div className="chart-wrapper"> <canvas id="sparkline-chart-2" width="100" height="30"></canvas> </div> </div> </div> </div> <hr className="mt-0"/> <ul className="horizontal-bars"> <li> <div className="title"> Monday </div> <div className="bars"> <Progress className="progress-xs" color="info" value="34" /> <Progress className="progress-xs" color="danger" value="78" /> </div> </li> <li> <div className="title"> Tuesday </div> <div className="bars"> <Progress className="progress-xs" color="info" value="56" /> <Progress className="progress-xs" color="danger" value="94" /> </div> </li> <li> <div className="title"> Wednesday </div> <div className="bars"> <Progress className="progress-xs" color="info" value="12" /> <Progress className="progress-xs" color="danger" value="67" /> </div> </li> <li> <div className="title"> Thursday </div> <div className="bars"> <Progress className="progress-xs" color="info" value="43" /> <Progress className="progress-xs" color="danger" value="91" /> </div> </li> <li> <div className="title"> Friday </div> <div className="bars"> <Progress className="progress-xs" color="info" value="22" /> <Progress className="progress-xs" color="danger" value="73" /> </div> </li> <li> <div className="title"> Saturday </div> <div className="bars"> <Progress className="progress-xs" color="info" value="53" /> <Progress className="progress-xs" color="danger" value="82" /> </div> </li> <li> <div className="title"> Sunday </div> <div className="bars"> <Progress className="progress-xs" color="info" value="9" /> <Progress className="progress-xs" color="danger" value="69" /> </div> </li> <li className="legend"> <span className="badge badge-pill badge-info"></span> <small>New clients</small> &nbsp; <span className="badge badge-pill badge-danger"></span> <small>Recurring clients</small> </li> </ul> </div> <div className="col-sm-6 col-lg-4"> <div className="row"> <div className="col-sm-6"> <div className="callout callout-warning"> <small className="text-muted">Pageviews</small><br/> <strong className="h4">78,623</strong> <div className="chart-wrapper"> <canvas id="sparkline-chart-3" width="100" height="30"></canvas> </div> </div> </div> <div className="col-sm-6"> <div className="callout callout-success"> <small className="text-muted">Organic</small><br/> <strong className="h4">49,123</strong> <div className="chart-wrapper"> <canvas id="sparkline-chart-4" width="100" height="30"></canvas> </div> </div> </div> </div> <hr className="mt-0"/> <ul className="horizontal-bars type-2"> <li> <i className="icon-user"></i> <span className="title">Male</span> <span className="value">43%</span> <div className="bars"> <Progress className="progress-xs" color="warning" value="43" /> </div> </li> <li> <i className="icon-user-female"></i> <span className="title">Female</span> <span className="value">37%</span> <div className="bars"> <Progress className="progress-xs" color="warning" value="37" /> </div> </li> <li className="divider"></li> <li> <i className="icon-globe"></i> <span className="title">Organic Search</span> <span className="value">191,235 <span className="text-muted small">(56%)</span></span> <div className="bars"> <Progress className="progress-xs" color="success" value="56" /> </div> </li> <li> <i className="icon-social-facebook"></i> <span className="title">Facebook</span> <span className="value">51,223 <span className="text-muted small">(15%)</span></span> <div className="bars"> <Progress className="progress-xs" color="success" value="15" /> </div> </li> <li> <i className="icon-social-twitter"></i> <span className="title">Twitter</span> <span className="value">37,564 <span className="text-muted small">(11%)</span></span> <div className="bars"> <Progress className="progress-xs" color="success" value="11" /> </div> </li> <li> <i className="icon-social-linkedin"></i> <span className="title">LinkedIn</span> <span className="value">27,319 <span className="text-muted small">(8%)</span></span> <div className="bars"> <Progress className="progress-xs" color="success" value="8" /> </div> </li> <li className="divider text-center"> <button type="button" className="btn btn-sm btn-link text-muted" data-toggle="tooltip" data-placement="top" title="" data-original-title="show more"><i className="icon-options"></i></button> </li> </ul> </div> <div className="col-sm-6 col-lg-4"> <div className="row"> <div className="col-sm-6"> <div className="callout"> <small className="text-muted">CTR</small><br/> <strong className="h4">23%</strong> <div className="chart-wrapper"> <canvas id="sparkline-chart-5" width="100" height="30"></canvas> </div> </div> </div> <div className="col-sm-6"> <div className="callout callout-primary"> <small className="text-muted">Bounce Rate</small><br/> <strong className="h4">5%</strong> <div className="chart-wrapper"> <canvas id="sparkline-chart-6" width="100" height="30"></canvas> </div> </div> </div> </div> <hr className="mt-0"/> <ul className="icons-list"> <li> <i className="icon-screen-desktop bg-primary"></i> <div className="desc"> <div className="title">iMac 4k</div> <small>Lorem ipsum dolor sit amet</small> </div> <div className="value"> <div className="small text-muted">Sold this week</div> <strong>1.924</strong> </div> <div className="actions"> <button type="button" className="btn btn-link text-muted"><i className="icon-settings"></i></button> </div> </li> <li> <i className="icon-screen-smartphone bg-info"></i> <div className="desc"> <div className="title">Samsung Galaxy Edge</div> <small>Lorem ipsum dolor sit amet</small> </div> <div className="value"> <div className="small text-muted">Sold this week</div> <strong>1.224</strong> </div> <div className="actions"> <button type="button" className="btn btn-link text-muted"><i className="icon-settings"></i></button> </div> </li> <li> <i className="icon-screen-smartphone bg-warning"></i> <div className="desc"> <div className="title">iPhone 6S</div> <small>Lorem ipsum dolor sit amet</small> </div> <div className="value"> <div className="small text-muted">Sold this week</div> <strong>1.163</strong> </div> <div className="actions"> <button type="button" className="btn btn-link text-muted"><i className="icon-settings"></i></button> </div> </li> <li> <i className="icon-user bg-danger"></i> <div className="desc"> <div className="title">Premium accounts</div> <small>Lorem ipsum dolor sit amet</small> </div> <div className="value"> <div className="small text-muted">Sold this week</div> <strong>928</strong> </div> <div className="actions"> <button type="button" className="btn btn-link text-muted"><i className="icon-settings"></i></button> </div> </li> <li> <i className="icon-social-spotify bg-success"></i> <div className="desc"> <div className="title">Spotify Subscriptions</div> <small>Lorem ipsum dolor sit amet</small> </div> <div className="value"> <div className="small text-muted">Sold this week</div> <strong>893</strong> </div> <div className="actions"> <button type="button" className="btn btn-link text-muted"><i className="icon-settings"></i></button> </div> </li> <li> <i className="icon-cloud-download bg-danger"></i> <div className="desc"> <div className="title">Ebook</div> <small>Lorem ipsum dolor sit amet</small> </div> <div className="value"> <div className="small text-muted">Downloads</div> <strong>121.924</strong> </div> <div className="actions"> <button type="button" className="btn btn-link text-muted"><i className="icon-settings"></i></button> </div> </li> <li> <i className="icon-camera bg-warning"></i> <div className="desc"> <div className="title">Photos</div> <small>Lorem ipsum dolor sit amet</small> </div> <div className="value"> <div className="small text-muted">Uploaded</div> <strong>12.125</strong> </div> <div className="actions"> <button type="button" className="btn btn-link text-muted"><i className="icon-settings"></i></button> </div> </li> <li className="divider text-center"> <button type="button" className="btn btn-sm btn-link text-muted" data-toggle="tooltip" data-placement="top" title="show more"><i className="icon-options"></i></button> </li> </ul> </div> </div> <br/> <table className="table table-hover table-outline mb-0 hidden-sm-down"> <thead className="thead-default"> <tr> <th className="text-center"><i className="icon-people"></i></th> <th>User</th> <th className="text-center">Country</th> <th>Usage</th> <th className="text-center">Payment Method</th> <th>Activity</th> </tr> </thead> <tbody> <tr> <td className="text-center"> <div className="avatar"> <img src={'img/avatars/1.jpg'} className="img-avatar" alt="admin@bootstrapmaster.com"/> <span className="avatar-status badge-success"></span> </div> </td> <td> <div>Yiorgos Avraamu</div> <div className="small text-muted"> <span>New</span> | Registered: Jan 1, 2015 </div> </td> <td className="text-center"> <img src={'img/flags/USA.png'} alt="USA" style={{height: 24 + 'px'}}/> </td> <td> <div className="clearfix"> <div className="float-left"> <strong>50%</strong> </div> <div className="float-right"> <small className="text-muted">Jun 11, 2015 - Jul 10, 2015</small> </div> </div> <Progress className="progress-xs" color="success" value="50" /> </td> <td className="text-center"> <i className="fa fa-cc-mastercard" style={{fontSize: 24 + 'px'}}></i> </td> <td> <div className="small text-muted">Last login</div> <strong>10 sec ago</strong> </td> </tr> <tr> <td className="text-center"> <div className="avatar"> <img src={'img/avatars/2.jpg'} className="img-avatar" alt="admin@bootstrapmaster.com"/> <span className="avatar-status badge-danger"></span> </div> </td> <td> <div>Avram Tarasios</div> <div className="small text-muted"> <span>Recurring</span> | Registered: Jan 1, 2015 </div> </td> <td className="text-center"> <img src={'img/flags/Brazil.png'} alt="Brazil" style={{height: 24 + 'px'}}/> </td> <td> <div className="clearfix"> <div className="float-left"> <strong>10%</strong> </div> <div className="float-right"> <small className="text-muted">Jun 11, 2015 - Jul 10, 2015</small> </div> </div> <Progress className="progress-xs" color="info" value="10" /> </td> <td className="text-center"> <i className="fa fa-cc-visa" style={{fontSize: 24 + 'px'}}></i> </td> <td> <div className="small text-muted">Last login</div> <strong>5 minutes ago</strong> </td> </tr> <tr> <td className="text-center"> <div className="avatar"> <img src={'img/avatars/3.jpg'} className="img-avatar" alt="admin@bootstrapmaster.com"/> <span className="avatar-status badge-warning"></span> </div> </td> <td> <div>Quintin Ed</div> <div className="small text-muted"> <span>New</span> | Registered: Jan 1, 2015 </div> </td> <td className="text-center"> <img src={'img/flags/India.png'} alt="India" style={{height: 24 + 'px'}}/> </td> <td> <div className="clearfix"> <div className="float-left"> <strong>74%</strong> </div> <div className="float-right"> <small className="text-muted">Jun 11, 2015 - Jul 10, 2015</small> </div> </div> <Progress className="progress-xs" color="warning" value="74" /> </td> <td className="text-center"> <i className="fa fa-cc-stripe" style={{fontSize: 24 + 'px'}}></i> </td> <td> <div className="small text-muted">Last login</div> <strong>1 hour ago</strong> </td> </tr> <tr> <td className="text-center"> <div className="avatar"> <img src={'img/avatars/4.jpg'} className="img-avatar" alt="admin@bootstrapmaster.com"/> <span className="avatar-status badge-default"></span> </div> </td> <td> <div>Enéas Kwadwo</div> <div className="small text-muted"> <span>New</span> | Registered: Jan 1, 2015 </div> </td> <td className="text-center"> <img src={'img/flags/France.png'} alt="France" style={{height: 24 + 'px'}}/> </td> <td> <div className="clearfix"> <div className="float-left"> <strong>98%</strong> </div> <div className="float-right"> <small className="text-muted">Jun 11, 2015 - Jul 10, 2015</small> </div> </div> <Progress className="progress-xs" color="danger" value="98" /> </td> <td className="text-center"> <i className="fa fa-paypal" style={{fontSize: 24 + 'px'}}></i> </td> <td> <div className="small text-muted">Last login</div> <strong>Last month</strong> </td> </tr> <tr> <td className="text-center"> <div className="avatar"> <img src={'img/avatars/5.jpg'} className="img-avatar" alt="admin@bootstrapmaster.com"/> <span className="avatar-status badge-success"></span> </div> </td> <td> <div>Agapetus Tadeáš</div> <div className="small text-muted"> <span>New</span> | Registered: Jan 1, 2015 </div> </td> <td className="text-center"> <img src={'img/flags/Spain.png'} alt="Spain" style={{height: 24 + 'px'}}/> </td> <td> <div className="clearfix"> <div className="float-left"> <strong>22%</strong> </div> <div className="float-right"> <small className="text-muted">Jun 11, 2015 - Jul 10, 2015</small> </div> </div> <Progress className="progress-xs" color="info" value="22" /> </td> <td className="text-center"> <i className="fa fa-google-wallet" style={{fontSize: 24 + 'px'}}></i> </td> <td> <div className="small text-muted">Last login</div> <strong>Last week</strong> </td> </tr> <tr> <td className="text-center"> <div className="avatar"> <img src={'img/avatars/6.jpg'} className="img-avatar" alt="admin@bootstrapmaster.com"/> <span className="avatar-status badge-danger"></span> </div> </td> <td> <div>Friderik Dávid</div> <div className="small text-muted"> <span>New</span> | Registered: Jan 1, 2015 </div> </td> <td className="text-center"> <img src={'img/flags/Poland.png'} alt="Poland" style={{height: 24 + 'px'}}/> </td> <td> <div className="clearfix"> <div className="float-left"> <strong>43%</strong> </div> <div className="float-right"> <small className="text-muted">Jun 11, 2015 - Jul 10, 2015</small> </div> </div> <Progress className="progress-xs" color="success" value="43" /> </td> <td className="text-center"> <i className="fa fa-cc-amex" style={{fontSize: 24 + 'px'}}></i> </td> <td> <div className="small text-muted">Last login</div> <strong>Yesterday</strong> </td> </tr> </tbody> </table> </div> </div> </div> </div> </div> ) } } export default Dashboard;
packages/canvas-planner/src/dynamic-ui/__tests__/notifier.spec.js
djbender/canvas-lms
/* * Copyright (C) 2017 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distributed in the hope that they will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License along * with this program. If not, see <http://www.gnu.org/licenses/>. */ import React from 'react' import {mount} from 'enzyme' import {notifier} from '../notifier' import {DynamicUiProvider} from '../provider' class MockComponent extends React.Component { render() { return <div /> } } it('passes trigger property functions and forwards the calls to the dynamic ui manager', () => { const Wrapped = notifier(MockComponent) const mockManager = { handleAction: jest.fn(), registerAnimatable: jest.fn(), deregisterAnimatable: jest.fn(), preTriggerUpdates: jest.fn(), triggerUpdates: jest.fn() } const wrapper = mount( <DynamicUiProvider manager={mockManager}> <Wrapped /> </DynamicUiProvider> ) expect(wrapper).toMatchSnapshot() const mockComponentProps = wrapper.find('MockComponent').props() mockComponentProps.preTriggerDynamicUiUpdates('args') expect(mockManager.preTriggerUpdates).toHaveBeenCalledWith('args') mockComponentProps.triggerDynamicUiUpdates('args') expect(mockManager.triggerUpdates).toHaveBeenCalledWith('args') })
src/views/components/scaffolding/LearnerStatusEntryForm.js
Domiii/project-empire
import { hrefLearnerStatusList } from 'src/views/href'; import React from 'react'; import PropTypes from 'prop-types'; import { dataBind } from 'dbdi/react'; import Moment from 'react-moment'; import { Alert, Button, Well, Panel } from 'react-bootstrap'; import { LinkContainer } from 'react-router-bootstrap'; import Flexbox from 'flexbox-react'; import { Redirect } from 'react-router-dom'; import UserBadge from 'src/views/components/users/UserBadge'; import LoadIndicator from 'src/views/components/util/LoadIndicator'; const LearnerStatusEntryForm = dataBind({})(function LearnerEntryList( { mode, uid, scheduleId, cycleId }, { userPublic, get_learnerEntryStatus } ) { const learnerEntryId = { uid, scheduleId, cycleId }; if (!userPublic.isLoaded({ uid }) | !get_learnerEntryStatus.isLoaded({ learnerEntryId })) { return <LoadIndicator />; } else { const status = get_learnerEntryStatus({ learnerEntryId }); const user = userPublic({ uid }); if (!status || !user) { return (<Alert bsStyle="danger"> {/* <pre> {JSON.stringify(learnerEntryId, null, 2)} {JSON.stringify(status, null, 2)} </pre> */} invalid page :( <LinkContainer to={hrefLearnerStatusList()}> <Button bsStyle="primary"> Back! </Button> </LinkContainer> </Alert>); } const header = (<h3> <UserBadge uid={uid} /> learner record </h3>); return (<div> <Panel bsStyle="info" > <Panel.Heading> {header} </Panel.Heading> <Panel.Body> form </Panel.Body> </Panel> </div>); } }); export default LearnerStatusEntryForm;
pkg/interface/link/src/js/components/new.js
jfranklin9000/urbit
import React, { Component } from 'react'; import { InviteSearch } from './lib/invite-search'; import { Spinner } from './lib/icons/icon-spinner'; import { Route, Link } from 'react-router-dom'; import { makeRoutePath, isPatTa, deSig } from '/lib/util'; import urbitOb from 'urbit-ob'; export class NewScreen extends Component { constructor(props) { super(props); this.state = { title: '', description: '', idName: '', groups: [], ships: [], idError: false, inviteError: false, createGroup: false, disabled: false }; this.titleChange = this.titleChange.bind(this); this.descriptionChange = this.descriptionChange.bind(this); this.setInvite = this.setInvite.bind(this); this.createGroupChange = this.createGroupChange.bind(this); } componentDidUpdate(prevProps, prevState) { const { props, state } = this; if (prevProps !== props) { let target = `/${state.idName}`; if (target in props.associations) { props.history.push(makeRoutePath(target)); } } } titleChange(event) { let asciiSafe = event.target.value.toLowerCase() .replace(/[^a-z0-9-]/g, "-"); this.setState({ idName: asciiSafe + '-' + Math.floor(Math.random()*10000), // uniqueness title: event.target.value }); } descriptionChange(event) { this.setState({ description: event.target.value }); } setInvite(value) { this.setState({ groups: value.groups, ships: value.ships }); } createGroupChange(event) { this.setState({ createGroup: !!event.target.checked, }); } onClickCreate() { const { props, state } = this; if (!state.title) { this.setState({ idError: true, inviteError: false }); return; } let appPath = `/${state.idName}`; if (appPath in props.associations) { this.setState({ inviteError: false, idError: true, success: false }); return; } let isValid = true; let aud = state.ships.map(mem => `~${deSig(mem.trim())}`); aud.forEach((mem) => { if (!urbitOb.isValidPatp(mem)) { isValid = false; } }); if (!isValid) { this.setState({ inviteError: true, idError: false, success: false }); return; } const target = state.groups.length === 0 ? {ships: aud} : {group: state.groups[0]}; if (this.textarea) { this.textarea.value = ''; } this.setState({ error: false, success: true, group: [], ships: [], disabled: true }, () => { let submit = api.createCollection( appPath, state.title, state.description, target, state.createGroup ); submit.then(() => { this.setState({disabled: false}) props.history.push(makeRoutePath(appPath)); }) }); } render() { const { props, state } = this; let createGroupClasses = state.createGroup ? "relative checked bg-green2 br3 h1 toggle v-mid z-0" : "relative bg-gray4 bg-gray1-d br3 h1 toggle v-mid z-0"; let createClasses = !!state.idName ? "pointer db f9 mt7 green2 bg-gray0-d ba pv3 ph4 b--green2" : "pointer db f9 mt7 gray2 ba bg-gray0-d pa2 pv3 ph4 b--gray3"; let idClasses = "f7 ba b--gray3 b--gray2-d bg-gray0-d white-d pa3 db w-100 " + "focus-b--black focus-b--white-d "; let idErrElem = (<span />); if (state.idError) { idErrElem = ( <span className="f9 inter red2 db pt2"> Collection must have a valid name. </span> ); } let createGroupToggle = <div/> if (state.groups.length === 0) { createGroupToggle = ( <div className="mt7"> <input type="checkbox" style={{ WebkitAppearance: "none", width: 28 }} className={createGroupClasses} onChange={this.createGroupChange} /> <span className="dib f9 white-d inter ml3">Create Group</span> <p className="f9 gray2 pt1" style={{ paddingLeft: 40 }}> Participants will share this group across applications </p> </div> ); } return ( <div className={ "h-100 w-100 mw6 pa3 pt4 overflow-x-hidden " + "bg-gray0-d white-d flex flex-column" }> <div className="w-100 dn-m dn-l dn-xl inter pt1 pb6 f8"> <Link to="/~link">{"⟵ All Collections"}</Link> </div> <h2 className="mb3 f8">New Collection</h2> <div className="w-100"> <p className="f8 mt3 lh-copy db">Name</p> <textarea className={idClasses} placeholder="Cool Collection" rows={1} style={{ resize: "none" }} onChange={this.titleChange} /> {idErrElem} <p className="f8 mt3 lh-copy db"> Description <span className="gray3"> (Optional)</span> </p> <textarea className={idClasses} placeholder="The hippest links" rows={1} style={{ resize: "none" }} onChange={this.descriptionChange} /> <p className="f8 mt4 lh-copy db"> Invite <span className="gray3"> (Optional)</span> </p> <p className="f9 gray2 db mb2 pt1"> Selected groups or ships will be able to post to collection </p> <InviteSearch associations={props.associations.contacts} groups={props.groups} contacts={props.contacts} groupResults={true} shipResults={true} invites={{ groups: state.groups, ships: state.ships }} setInvite={this.setInvite} /> {createGroupToggle} <button onClick={this.onClickCreate.bind(this)} className={createClasses} disabled={this.state.disabled}> Create Collection </button> <Spinner awaiting={this.state.disabled} classes="mt3" text="Creating collection..." /> </div> </div> ); } }
frontend/src/components/options/forum-options.js
1905410/Misago
import React from 'react'; // jshint ignore:line import Button from 'misago/components/button'; // jshint ignore:line import Form from 'misago/components/form'; import FormGroup from 'misago/components/form-group'; // jshint ignore:line import Select from 'misago/components/select'; // jshint ignore:line import YesNoSwitch from 'misago/components/yes-no-switch'; // jshint ignore:line import { patch } from 'misago/reducers/auth'; import ajax from 'misago/services/ajax'; import title from 'misago/services/page-title'; import snackbar from 'misago/services/snackbar'; import store from 'misago/services/store'; export default class extends Form { constructor(props) { super(props); this.state = { 'isLoading': false, 'is_hiding_presence': props.user.is_hiding_presence, 'limits_private_thread_invites_to': props.user.limits_private_thread_invites_to, 'subscribe_to_started_threads': props.user.subscribe_to_started_threads, 'subscribe_to_replied_threads': props.user.subscribe_to_replied_threads, 'errors': {} }; this.privateThreadInvitesChoices = [ { 'value': 0, 'icon': 'help_outline', 'label': gettext("Everybody") }, { 'value': 1, 'icon': 'done_all', 'label': gettext("Users I follow") }, { 'value': 2, 'icon': 'highlight_off', 'label': gettext("Nobody") } ]; this.subscribeToChoices = [ { 'value': 0, 'icon': 'star_border', 'label': gettext("No") }, { 'value': 1, 'icon': 'star_half', 'label': gettext("Notify") }, { 'value': 2, 'icon': 'star', 'label': gettext("Notify with e-mail") } ]; } send() { return ajax.post(this.props.user.api_url.options, { is_hiding_presence: this.state.is_hiding_presence, limits_private_thread_invites_to: this.state.limits_private_thread_invites_to, subscribe_to_started_threads: this.state.subscribe_to_started_threads, subscribe_to_replied_threads: this.state.subscribe_to_replied_threads }); } handleSuccess() { store.dispatch(patch({ is_hiding_presence: this.state.is_hiding_presence, limits_private_thread_invites_to: this.state.limits_private_thread_invites_to, subscribe_to_started_threads: this.state.subscribe_to_started_threads, subscribe_to_replied_threads: this.state.subscribe_to_replied_threads })); snackbar.success(gettext("Your forum options have been changed.")); } handleError(rejection) { if (rejection.status === 400) { snackbar.error(gettext("Please reload page and try again.")); } else { snackbar.apiError(rejection); } } componentDidMount() { title.set({ title: gettext("Forum options"), parent: gettext("Change your options") }); } render() { /* jshint ignore:start */ return <form onSubmit={this.handleSubmit} className="form-horizontal"> <div className="panel panel-default panel-form"> <div className="panel-heading"> <h3 className="panel-title">{gettext("Change forum options")}</h3> </div> <div className="panel-body"> <fieldset> <legend>{gettext("Privacy settings")}</legend> <FormGroup label={gettext("Hide my presence")} helpText={gettext("If you hide your presence, only members with permission to see hidden users will see when you are online.")} for="id_is_hiding_presence" labelClass="col-sm-4" controlClass="col-sm-8"> <YesNoSwitch id="id_is_hiding_presence" disabled={this.state.isLoading} iconOn="visibility_off" iconOff="visibility" labelOn={gettext("Hide my presence from other users")} labelOff={gettext("Show my presence to other users")} onChange={this.bindInput('is_hiding_presence')} value={this.state.is_hiding_presence} /> </FormGroup> <FormGroup label={gettext("Private thread invitations")} for="id_limits_private_thread_invites_to" labelClass="col-sm-4" controlClass="col-sm-8"> <Select id="id_limits_private_thread_invites_to" disabled={this.state.isLoading} onChange={this.bindInput('limits_private_thread_invites_to')} value={this.state.limits_private_thread_invites_to} choices={this.privateThreadInvitesChoices} /> </FormGroup> </fieldset> <fieldset> <legend>{gettext("Automatic subscriptions")}</legend> <FormGroup label={gettext("Threads I start")} for="id_subscribe_to_started_threads" labelClass="col-sm-4" controlClass="col-sm-8"> <Select id="id_subscribe_to_started_threads" disabled={this.state.isLoading} onChange={this.bindInput('subscribe_to_started_threads')} value={this.state.subscribe_to_started_threads} choices={this.subscribeToChoices} /> </FormGroup> <FormGroup label={gettext("Threads I reply to")} for="id_subscribe_to_replied_threads" labelClass="col-sm-4" controlClass="col-sm-8"> <Select id="id_subscribe_to_replied_threads" disabled={this.state.isLoading} onChange={this.bindInput('subscribe_to_replied_threads')} value={this.state.subscribe_to_replied_threads} choices={this.subscribeToChoices} /> </FormGroup> </fieldset> </div> <div className="panel-footer"> <div className="row"> <div className="col-sm-8 col-sm-offset-4"> <Button className="btn-primary" loading={this.state.isLoading}> {gettext("Save changes")} </Button> </div> </div> </div> </div> </form> /* jshint ignore:end */ } }
src/demo/react-router/redirect.js
dadiaoguai/blog-react-demo-front
import React from 'react' import { BrowserRouter as Router, Route, Link, Redirect, withRouter } from 'react-router-dom' const fakeAuth = { isAuthenticated: false, authenticate (cb) { this.isAuthenticated = true setTimeout(cb, 100) }, signout (cb) { this.isAuthenticated = false setTimeout(cb, 100) } } const AuthButton = withRouter(({history}) => fakeAuth.isAuthenticated ? <p> Welcome! <button onClick={() => fakeAuth.signout(() => history.push('/'))}>Sign out</button> </p> : <p>You are no logged in</p> ) class PrivateRoute1 extends React.Component { constructor (props) { super(props) } render () { let {component, ...rest} = this.props return ( <Route {...rest} render={props => fakeAuth.isAuthenticated ? <component {...props}/> : <Redirect to={{ pathname: '/login', state: {from: props.location} }}/> } /> ) } } const Public = () => <h3>Public</h3> const Protected = () => <h3>Protected</h3> class Login extends React.Component { constructor (props) { super(props) this.state = {redirectToReferrer: false} this.login = this.login.bind(this) } login () { fakeAuth.authenticate(() => this.setState({redirectToReferrer: true})) } render () { const {from} = this.props.location.state || {from: {path: '/'}} const {redirectToReferrer} = this.state if (redirectToReferrer) { return ( <Redirect to={from}/> ) } return ( <div> <p>you must login to view the page at {from.pathname}</p> <button onClick={this.login}>Login in</button> </div> ) } } class AuthExample extends React.Component { constructor (props) { super(props) } render () { return ( <Router> <div> <AuthButton/> <ul> <li><Link to='/public'>Public Path</Link></li> <li><Link to='/protected'>Protected Page</Link></li> </ul> <Route path='/public' component={Public} /> <Route path='/login' component={Login} /> <PrivateRoute1 path='/protected' component={Protected} /> </div> </Router> ) } } module.exports = AuthExample
packager/react-packager/index.js
Esdeath/react-native
/** * Copyright (c) 2015-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 strict'; require('babel-core/register')({ only: /react-packager\/src/ }); useGracefulFs(); var Activity = require('./src/Activity'); var Server = require('./src/Server'); exports.middleware = function(options) { var server = new Server(options); return server.processRequest.bind(server); }; exports.buildPackage = function(options, packageOptions) { var server = createServer(options); return server.buildPackage(packageOptions) .then(function(p) { server.end(); return p; }); }; exports.buildPackageFromUrl = function(options, reqUrl) { var server = createServer(options); return server.buildPackageFromUrl(reqUrl) .then(function(p) { server.end(); return p; }); }; exports.getDependencies = function(options, main) { var server = createServer(options); return server.getDependencies(main) .then(function(r) { server.end(); return r.dependencies; }); }; function useGracefulFs() { var fs = require('fs'); var gracefulFs = require('graceful-fs'); // A bit sneaky but it's not straightforward to update all the // modules we depend on. Object.keys(fs).forEach(function(method) { if (typeof fs[method] === 'function' && gracefulFs[method]) { fs[method] = gracefulFs[method]; } }); } function createServer(options) { Activity.disable(); // Don't start the filewatcher or the cache. if (options.nonPersistent == null) { options.nonPersistent = true; } return new Server(options); }
public/components/settings/api/api-is-down.js
wazuh/wazuh-kibana-app
/* * Wazuh app - React component for the adding an API entry form. * * Copyright (C) 2015-2022 Wazuh, Inc. * * This program 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 2 of the License, or * (at your option) any later version. * * Find more information about this on the LICENSE file. */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { EuiFlexGroup, EuiFlexItem, EuiCodeBlock, EuiText, EuiSpacer, EuiCode, EuiButton, EuiButtonEmpty, EuiSteps, EuiBasicTable, EuiHealth, EuiCallOut, EuiLoadingSpinner, EuiToolTip, EuiButtonIcon, EuiPanel } from '@elastic/eui'; import { withErrorBoundary } from '../../common/hocs'; import { UI_ERROR_SEVERITIES, } from '../../../react-services/error-orchestrator/types'; import { UI_LOGGER_LEVELS, PLUGIN_PLATFORM_NAME } from '../../../../common/constants'; import { getErrorOrchestrator } from '../../../react-services/common-services'; import { getPluginDataPath } from '../../../../common/plugin'; export const ApiIsDown = withErrorBoundary (class ApiIsDown extends Component { constructor(props) { super(props); this.state = { status: 'incomplete', fetchingData: false, apiEntries: [], refreshingEntries: false }; } componentDidMount() { this.setState({ apiEntries: [...this.props.apiEntries] }); } /** * Checks again the connection in order to know the state of the API entries */ async checkConnection() { try { let status = 'complete'; this.setState({ error: false }); const hosts = await this.props.getHosts(); this.setState({ fetchingData: true, refreshingEntries: true, apiEntries: hosts }); const entries = this.state.apiEntries; let numErr = 0; for (let idx in entries) { const entry = entries[idx]; try { const data = await this.props.testApi(entry, true); // token refresh is forced const clusterInfo = data.data || {}; const id = entries[idx].id; entries[idx].status = 'online'; entries[idx].cluster_info = clusterInfo; //Updates the cluster info in the registry await this.props.updateClusterInfoInRegistry(id, clusterInfo); this.props.setDefault(entry); } catch (error) { numErr = numErr + 1; const code = ((error || {}).data || {}).code; const downReason = typeof error === 'string' ? error : (error || {}).message || ((error || {}).data || {}).message || 'Wazuh is not reachable'; const status = code === 3099 ? 'down' : 'unknown'; entries[idx].status = { status, downReason }; } } if (numErr) { status = numErr >= entries.length ? 'danger' : 'warning'; } this.setState({ apiEntries: entries, fetchingData: false, status: status, refreshingEntries: false }); } catch (error) { if ( error && error.data && error.data.message && error.data.code === 2001 ) { this.setState({ error: error.data.message, status: 'danger' }); } const options = { context: `${ApiIsDown.name}.checkConnection`, level: UI_LOGGER_LEVELS.ERROR, severity: UI_ERROR_SEVERITIES.UI, store: true, error: { error: error, message: error.message || error, title: error.message || error, }, }; getErrorOrchestrator().handleError(options); } } render() { const apiExample = `# Example Wazuh API configuration hosts: - production: url: https://172.16.1.2 port: 55000 username: wazuh-wui password: wazuh-wui run_as: false `; const checkConnectionChildren = ( <div> <EuiText> Check that the {PLUGIN_PLATFORM_NAME} server can reach the configured Wazuh API(s). </EuiText> <EuiSpacer /> <EuiButton onClick={async () => await this.checkConnection()} isLoading={this.state.fetchingData} > Check connection </EuiButton> {this.state.status !== 'danger' && this.state.status !== 'incomplete' && ( <EuiButtonEmpty onClick={() => this.props.closeApiIsDown()}> Close </EuiButtonEmpty> )} <EuiSpacer /> <EuiText>Already configured Wazuh API(s)</EuiText> <EuiSpacer /> {(!this.state.error && ( <EuiBasicTable loading={this.state.refreshingEntries} items={this.state.apiEntries} columns={[ { field: 'id', name: 'ID' }, { field: 'url', name: 'Host' }, { field: 'port', name: 'Port' }, { field: 'status', name: 'Status', render: item => { if (item) { return item === 'online' ? ( <EuiHealth color="success">Online</EuiHealth> ) : item.status === 'down' ? ( <span> <EuiHealth color="warning">Warning</EuiHealth> <EuiToolTip position="top" content={item.downReason}> <EuiButtonIcon color="primary" style={{ marginTop: '-12px' }} iconType="questionInCircle" aria-label="Info about the error" onClick={() => this.props.copyToClipBoard(item.downReason) } /> </EuiToolTip> </span> ) : ( <span> <EuiHealth color="danger">Offline</EuiHealth> <EuiToolTip position="top" content={item.downReason}> <EuiButtonIcon color="primary" style={{ marginTop: '-12px' }} iconType="questionInCircle" aria-label="Info about the error" onClick={() => this.props.copyToClipBoard(item.downReason) } /> </EuiToolTip> </span> ); } else { return ( <span> <EuiLoadingSpinner size="s" /> <span>&nbsp;&nbsp;Checking</span> </span> ); } } } ]} /> )) || ( <EuiCallOut color="danger" iconType="cross" title={this.state.error} /> )} </div> ); const steps = [ { title: 'Check the Wazuh API service status', children: ( <div> <EuiText>For Systemd</EuiText> <EuiSpacer /> <EuiCode>$ sudo systemctl status wazuh-manager</EuiCode> <EuiSpacer /> <EuiText>For SysV Init</EuiText> <EuiSpacer /> <EuiCode>$ sudo service wazuh-manager status</EuiCode> </div> ) }, { title: 'Check the configuration', children: ( <div> <EuiText> Review the settings in the{' '} <EuiCode> {getPluginDataPath('config/wazuh.yml')} </EuiCode>{' '} file. </EuiText> <EuiSpacer /> <EuiCodeBlock language="yaml">{apiExample}</EuiCodeBlock> </div> ) }, { title: 'Test the configuration', children: checkConnectionChildren, status: this.state.status } ]; return ( <EuiFlexGroup> <EuiFlexItem /> <EuiFlexItem className="min-guide-width"> <EuiPanel> <EuiText> <h2>Wazuh API seems to be down</h2> </EuiText> <EuiSpacer /> <EuiSteps firstStepNumber={1} steps={steps} /> </EuiPanel> </EuiFlexItem> <EuiFlexItem /> </EuiFlexGroup> ); } }); ApiIsDown.propTypes = { apiEntries: PropTypes.array, checkManager: PropTypes.func, setDefault: PropTypes.func, closeApiIsDown: PropTypes.func, updateClusterInfoInRegistry: PropTypes.func, getHosts: PropTypes.func, copyToClipboard: PropTypes.func };
react-app/src/components/forms/TextArea.js
floodfx/gma-village
import React, { Component } from 'react'; class TextArea extends Component { render() { const { input, label, placeholder, meta: { touched, error, warning } } = this.props; return ( <div> <label className="fw7 f3">{label}</label> <div> {touched && ((error && <span className="dark-red">{error}</span>) || (warning && <span className="gold">{warning}</span>))} </div> <div> <textarea className="w-40-ns w-100 h5" name={name} placeholder={placeholder} {...input} /> </div> </div> ) } } export default TextArea
draft-js-counter-plugin/src/LineCounter/index.js
dagopert/draft-js-plugins
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import unionClassNames from 'union-class-names'; class LineCounter extends Component { static propTypes = { theme: PropTypes.any, limit: PropTypes.number, }; getLineCount(editorState) { const blockArray = editorState.getCurrentContent().getBlocksAsArray(); return blockArray ? blockArray.length : null; } getClassNames(count, limit) { const { theme = {}, className } = this.props; const defaultStyle = unionClassNames(theme.counter, className); const overLimitStyle = unionClassNames(theme.counterOverLimit, className); return count > limit ? overLimitStyle : defaultStyle; } render() { const { store, limit } = this.props; const count = this.getLineCount(store.getEditorState()); const classNames = this.getClassNames(count, limit); return <span className={classNames}>{count}</span>; } } export default LineCounter;
setup/src/universal/features/common_ui/components/RoundedNumber/index.js
ch-apptitude/goomi
/** * * RoundedNumber * */ import React from 'react'; import PropTypes from 'prop-types'; import { FormattedNumber } from 'react-intl'; import styled from 'styled-components'; import Theme from 'assets/theme'; const Rounded = styled.div` border-radius: 50%; text-align: center; color: ${props => props.color}; background-color: ${props => props.backgroundColor}; font-size: ${props => props.size/2}px; width: ${props => props.size}px; height: ${props => props.size}px; lineHeight: ${props => props.size}px; `; const RoundedNumber = ({ value, size, color, backgroundColor }) => ( <div className={className} color={color} backgroundColor={backgroundColor}> <FormattedNumber value={value} /> </div> ); RoundedNumber.propTypes = { value: PropTypes.number.isRequired, size: PropTypes.number, color: PropTypes.string, backgroundColor: PropTypes.string, }; RoundedNumber.defaultProps = { size: 22, color: Theme.Colors.primary, backgroundColor: "transparent", }; export default RoundedNumber;
src/svg-icons/device/airplanemode-active.js
skarnecki/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceAirplanemodeActive = (props) => ( <SvgIcon {...props}> <path d="M10.18 9"/><path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z"/> </SvgIcon> ); DeviceAirplanemodeActive = pure(DeviceAirplanemodeActive); DeviceAirplanemodeActive.displayName = 'DeviceAirplanemodeActive'; export default DeviceAirplanemodeActive;
2-add-routing/src/layout/index.js
chemoish/react-universal-tutorial
import React from 'react'; import { Link } from 'react-router'; export default function Layout(props) { return ( <div> <header> <nav> <ul> <li> <Link to="/">Home</Link> </li> <li> <Link to="/about">About</Link> </li> <li> <Link to="/settings">Settings</Link> </li> </ul> </nav> </header> <main> {props.children} </main> <footer>Footer</footer> </div> ); };
frontend/src/Movie/MovieFormats.js
geogolem/Radarr
import PropTypes from 'prop-types'; import React from 'react'; import Label from 'Components/Label'; import { kinds } from 'Helpers/Props'; function MovieFormats({ formats }) { return ( <div> { formats.map((format) => { return ( <Label key={format.id} kind={kinds.INFO} > {format.name} </Label> ); }) } </div> ); } MovieFormats.propTypes = { formats: PropTypes.arrayOf(PropTypes.object).isRequired }; MovieFormats.defaultProps = { formats: [] }; export default MovieFormats;
src/js/containers/Transfer/TransferBody.js
KyberNetwork/KyberWallet
import React from "react" import { connect } from "react-redux" import ReactTooltip from 'react-tooltip' import { withRouter } from 'react-router-dom' import * as converters from "../../utils/converter" import * as validators from "../../utils/validators" import { TransferForm } from "../../components/Transaction" import { QRCode } from "../CommonElements" import { AdvanceConfigLayout } from "../../components/TransactionCommon" import { TokenSelector, AccountBalance } from "../TransactionCommon" import * as common from "../../utils/common" import * as globalActions from "../../actions/globalActions" import constansts from "../../services/constants" import * as transferActions from "../../actions/transferActions" import { getTranslate } from 'react-localize-redux' import { debounce } from 'underscore' import BLOCKCHAIN_INFO from "../../../../env"; import constants from "../../services/constants" import { TransferAccount } from "../../containers/Transfer" @connect((store) => { const transfer = store.transfer; const defaultGasLimit = transfer.tokenSymbol === 'ETH' ? transfer.gas : transfer.gas_limit; return { transfer: transfer, account: store.account, tokens: store.tokens.tokens, global: store.global, translate: getTranslate(store.locale), defaultGasLimit } }) class Transfer extends React.Component { constructor(props) { super(props); this.state = { focus: "transfer", destAddress: '' } } componentDidMount = () => { if (this.props.global.changeWalletType !== "") this.props.dispatch(globalActions.closeChangeWallet()) document.title = "KyberSwap | Instant Exchange | No Fees"; if (Object.keys(this.props.transfer.errors.sourceAmount).length > 0){ setTimeout(() => { ReactTooltip.show(document.getElementById("transfer-amount-error-trigger")) }, 300) } if (Object.keys(this.props.transfer.errors.destAddress).length > 0){ setTimeout(() => { ReactTooltip.show(document.getElementById("transfer-address-error-trigger")) }, 300) } }; componentDidUpdate(prevProps) { if (Object.keys(this.props.transfer.errors.sourceAmount).length > Object.keys(prevProps.transfer.errors.sourceAmount).length){ setTimeout(() => { ReactTooltip.show(document.getElementById("transfer-amount-error-trigger")) }, 300) } if (Object.keys(this.props.transfer.errors.destAddress).length > Object.keys(prevProps.transfer.errors.destAddress).length){ setTimeout(() => { ReactTooltip.show(document.getElementById("transfer-address-error-trigger")) }, 300) } } validateSourceAmount = (value, gasPrice) => { if (isNaN(parseFloat(value))) { return; } var tokenSymbol = this.props.transfer.tokenSymbol var token = this.props.tokens[tokenSymbol] var amountBig = converters.stringEtherToBigNumber(this.props.transfer.amount, token.decimals) if (amountBig.isGreaterThan(token.balance)) { this.props.dispatch(transferActions.throwErrorAmount(constants.TRANSFER_CONFIG.sourceErrors.input, this.props.translate("error.amount_transfer_too_hign"))) return } var testBalanceWithFee = validators.verifyBalanceForTransaction(this.props.tokens['ETH'].balance, this.props.transfer.tokenSymbol, this.props.transfer.amount, this.props.transfer.gas, gasPrice) if (testBalanceWithFee) { this.props.dispatch(transferActions.throwErrorAmount(constants.TRANSFER_CONFIG.sourceErrors.balance, this.props.translate("error.eth_balance_not_enough_for_fee"))) } } dispatchEstimateGas = (value) => { this.props.dispatch(transferActions.estimateGasWhenAmountChange(value)) } lazyUpdateValidateSourceAmount = debounce(this.validateSourceAmount, 500) lazyEstimateGas = debounce(this.dispatchEstimateGas, 500) onAddressReceiveChange = (event) => { var value = event.target.value; this.setState({ destAddress: value }) this.props.dispatch(transferActions.clearTransferError()) }; onAmountChange = (event, amount) => { var value = amount ? amount : event.target.value; this.props.dispatch(transferActions.specifyAmountTransfer(value)) if (this.props.account.account) { this.lazyEstimateGas(value) this.lazyUpdateValidateSourceAmount(value, this.props.transfer.gasPrice) } } makeNewTransfer = (changeTransactionType = false) => { this.props.dispatch(transferActions.makeNewTransfer()); if (changeTransactionType) { var swapLink = constansts.BASE_HOST + "/swap/" + this.props.swapSrcTokenSymbol.toLowerCase() + "_" + this.props.swapDestTokenSymbol.toLowerCase(); this.props.global.analytics.callTrack("trackClickNewTransaction", "Swap"); this.props.history.push(swapLink) } else { this.props.global.analytics.callTrack("trackClickNewTransaction", "Transfer"); } } onFocus = () => { this.setState({ focus: "source" }); this.props.dispatch(transferActions.setIsSelectTokenBalance(false)); this.props.global.analytics.callTrack("trackClickInputAmount", "transfer"); } onFocusAddr = () => { this.setState({ focus: "to-addr" }) this.props.global.analytics.callTrack("trackClickInputRecieveAddress"); } onBlur = () => { this.setState({ focus: "" }) } handleErrorQRCode = (err) => { } handleScanQRCode = (data) => { this.setState({ destAddress: data.trim() }); this.props.dispatch(transferActions.clearTransferError()) } toggleAdvanceContent = () => { if (this.props.transfer.isAdvanceActive) { this.props.global.analytics.callTrack("trackClickHideAdvanceOption", "Transfer") } else { this.props.global.analytics.callTrack("trackClickShowAdvanceOption", "Transfer") } this.props.dispatch(transferActions.toggleAdvanceContent()); if (!this.props.transfer.isOpenAdvance) { this.props.dispatch(transferActions.setIsOpenAdvance()); } } specifyGasPrice = (value) => { this.props.dispatch(transferActions.specifyGasPrice(value)) if (this.props.account !== false && !this.props.isChangingWallet) { this.lazyUpdateValidateSourceAmount(this.props.transfer.amount, value) } } selectedGasHandler = (value, level, levelString) => { this.props.dispatch(transferActions.setSelectedGasPrice(value, level)) this.specifyGasPrice(value) this.props.global.analytics.callTrack("trackChooseGas", "transfer", value, levelString); } getAdvanceLayout = () => { return ( <AdvanceConfigLayout selectedGas={this.props.transfer.selectedGas} selectedGasHandler={this.selectedGasHandler} gasPriceSuggest={this.props.transfer.gasPriceSuggest} translate={this.props.translate} isAdvanceActive={this.props.transfer.isAdvanceActive} toggleAdvanceContent={this.toggleAdvanceContent} reserveRoutingEnabled={null} type="transfer" /> ) } getBalanceLayout = () => { return ( <AccountBalance sourceActive={this.props.transfer.tokenSymbol} destTokenSymbol='ETH' isBalanceActive={this.props.transfer.isAdvanceActive} screen="transfer" isOnDAPP={this.props.account.isOnDAPP} walletName={this.props.account.walletName} selectToken={this.selectToken} />) } closeChangeWallet = () => { this.props.dispatch(globalActions.closeChangeWallet()) } clearSession = (e) => { this.props.dispatch(globalActions.clearSession(this.props.transfer.gasPrice)); this.props.global.analytics.callTrack("trackClickChangeWallet") } acceptTerm = () => { this.props.dispatch(globalActions.acceptTermOfService()); } clearIsOpenAdvance = () => { this.props.dispatch(transferActions.clearIsOpenAdvance()); } selectTokenBalance = () => { this.props.dispatch(transferActions.setIsSelectTokenBalance(true)); } selectToken = (sourceSymbol) => { this.props.setSrcToken(sourceSymbol, this.props.tokens[sourceSymbol].address, "source") var sourceBalance = this.props.tokens[sourceSymbol].balance var sourceDecimal = this.props.tokens[sourceSymbol].decimals var amount if (sourceSymbol !== "ETH") { amount = sourceBalance amount = converters.toT(amount, sourceDecimal) amount = amount.replace(",", "") } else { var gasLimit = this.props.transfer.gas var totalGas = converters.calculateGasFee(this.props.transfer.gasPrice, gasLimit) * Math.pow(10, 18) amount = sourceBalance - totalGas * 120 / 100 amount = converters.toEther(amount) amount = converters.roundingNumber(amount).toString(10) amount = amount.replace(",", "") } if (amount < 0) amount = 0; this.props.dispatch(transferActions.specifyAmountTransfer(amount)) this.selectTokenBalance(); this.props.global.analytics.callTrack("trackClickToken", sourceSymbol, this.props.screen); } render() { var addressBalance = "" var token = this.props.tokens[this.props.transfer.tokenSymbol] if (token) { addressBalance = { value: converters.toT(token.balance, token.decimals), roundingValue: converters.roundingNumber(converters.toT(token.balance, token.decimals)), } } var input = { destAddress: { value: this.state.destAddress, onChange: this.onAddressReceiveChange }, amount: { value: this.props.transfer.amount, onChange: this.onAmountChange } } var errors = { destAddress: this.props.transfer.errors.destAddress || '', amountTransfer: this.props.transfer.errors.amountTransfer || this.props.transfer.errors.ethBalanceError || '' } var tokenTransferSelect = ( <TokenSelector type="transfer" focusItem={this.props.transfer.tokenSymbol} listItem={this.props.tokens} chooseToken={this.props.setSrcToken} banToken={BLOCKCHAIN_INFO.promo_token} /> ) var qcCode = common.isMobile.any() ? <QRCode onError={this.handleErrorQRCode} onScan={this.handleScanQRCode} onDAPP={this.props.account.isOnDAPP} /> : "" return ( <div> <TransferForm transfer = {this.props.transfer} account={this.props.account.account} chooseToken={this.props.setSrcToken} sourceActive={this.props.transfer.tokenSymbol} step={this.props.transfer.step} tokenSymbol={this.props.transfer.tokenSymbol} tokenTransferSelect={tokenTransferSelect} input={input} errors={errors} translate={this.props.translate} onBlur={this.onBlur} onFocus={this.onFocus} focus={this.state.focus} onFocusAddr={this.onFocusAddr} advanceLayout={this.getAdvanceLayout()} balanceLayout={this.getBalanceLayout()} networkError={this.props.global.network_error} isChangingWallet={this.props.global.isChangingWallet} changeWalletType={this.props.global.changeWalletType} closeChangeWallet={this.closeChangeWallet} global={this.props.global} addressBalance={addressBalance} clearSession={this.clearSession} walletName={this.props.account.walletName} qcCode={qcCode} isAgreedTermOfService={this.props.global.termOfServiceAccepted} acceptTerm={this.acceptTerm} isBalanceActive={this.props.transfer.isBalanceActive} isAdvanceActive={this.props.transfer.isAdvanceActive} toggleAdvanceContent={this.toggleAdvanceContent} isOpenAdvance={this.props.transfer.isOpenAdvance} clearIsOpenAdvance={this.clearIsOpenAdvance} isOnDAPP={this.props.account.isOnDAPP} isSelectTokenBalance={this.props.transfer.isSelectTokenBalance} changeSourceAmount={this.onAmountChange} /> <TransferAccount selectToken = {this.selectToken}/> </div> ) } } export default withRouter(Transfer)
src/components/AboutSection/AboutColumn.js
jonahjoughin/blog.jough.in
import React from 'react'; import Markdown from '../Markdown'; const AboutColumn = ({children}) => { return ( <div className = {"mb3 mb5-m mb5-l pointer sans-serif ph3 w-100 w-50-m w-25-l dark-blue flex-grow-1"}> <Markdown text={children}/> </div> ); }; export default AboutColumn;
src/components/ContainerProgress.react.js
stoumpos/kitematic
import React from 'react'; /* Usage: <ContainerProgress pBar1={20} pBar2={70} pBar3={100} pBar4={20} /> */ var ContainerProgress = React.createClass({ render: function () { var pBar1Style = { height: this.props.pBar1 + '%' }; var pBar2Style = { height: this.props.pBar2 + '%' }; var pBar3Style = { height: this.props.pBar3 + '%' }; var pBar4Style = { height: this.props.pBar4 + '%' }; return ( <div className="container-progress"> <div className="bar-1 bar-bg"> <div className="bar-fg" style={pBar4Style}></div> </div> <div className="bar-2 bar-bg"> <div className="bar-fg" style={pBar3Style}></div> </div> <div className="bar-3 bar-bg"> <div className="bar-fg" style={pBar2Style}></div> </div> <div className="bar-4 bar-bg"> <div className="bar-fg" style={pBar1Style}></div> </div> </div> ); } }); module.exports = ContainerProgress;
superset/assets/src/theme.js
timifasubaa/incubator-superset
import '../stylesheets/react-select/select.less'; import '../stylesheets/superset.less';
src/Parser/DemonHunter/Havoc/Modules/Statistics/Spells/Momentum.js
enragednuke/WoWAnalyzer
import React from 'react'; import Analyzer from 'Parser/Core/Analyzer'; import Combatants from 'Parser/Core/Modules/Combatants'; import SPELLS from 'common/SPELLS'; import SpellIcon from 'common/SpellIcon'; import { formatPercentage, formatDuration } from 'common/format'; import StatisticBox, { STATISTIC_ORDER } from 'Main/StatisticBox'; class Momentum extends Analyzer { static dependencies = { combatants: Combatants, }; on_initialized() { this.active = this.combatants.selected.hasTalent(SPELLS.MOMENTUM_TALENT.id); } statistic() { const momentumUptime = this.combatants.selected.getBuffUptime(SPELLS.MOMENTUM_TALENT.id); const momentumUptimePercentage = momentumUptime / this.owner.fightDuration; return ( <StatisticBox icon={<SpellIcon id={SPELLS.MOMENTUM_TALENT.id} />} value={`${formatPercentage(momentumUptimePercentage)}%`} label="Momentum Uptime" tooltip={`The Momentum buff total uptime was ${formatDuration(momentumUptime / 1000)}.`} /> ); } statisticOrder = STATISTIC_ORDER.CORE(3); } export default Momentum;
ajax/libs/raven.js/3.12.0/raven.js
BenjaminVanRyseghem/cdnjs
/*! Raven.js 3.11.0 (cb87941) | github.com/getsentry/raven-js */ /* * Includes TraceKit * https://github.com/getsentry/TraceKit * * Copyright 2017 Matt Robenolt and other contributors * Released under the BSD license * https://github.com/getsentry/raven-js/blob/master/LICENSE * */ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Raven = f()}})(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){ exports = module.exports = stringify exports.getSerialize = serializer function stringify(obj, replacer, spaces, cycleReplacer) { return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces) } function serializer(replacer, cycleReplacer) { var stack = [], keys = [] if (cycleReplacer == null) cycleReplacer = function(key, value) { if (stack[0] === value) return "[Circular ~]" return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]" } return function(key, value) { if (stack.length > 0) { var thisPos = stack.indexOf(this) ~thisPos ? stack.splice(thisPos + 1) : stack.push(this) ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key) if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value) } else stack.push(value) return replacer == null ? value : replacer.call(this, key, value) } } },{}],2:[function(_dereq_,module,exports){ 'use strict'; function RavenConfigError(message) { this.name = 'RavenConfigError'; this.message = message; } RavenConfigError.prototype = new Error(); RavenConfigError.prototype.constructor = RavenConfigError; module.exports = RavenConfigError; },{}],3:[function(_dereq_,module,exports){ 'use strict'; var wrapMethod = function(console, level, callback) { var originalConsoleLevel = console[level]; var originalConsole = console; if (!(level in console)) { return; } var sentryLevel = level === 'warn' ? 'warning' : level; console[level] = function () { var args = [].slice.call(arguments); var msg = '' + args.join(' '); var data = {level: sentryLevel, logger: 'console', extra: {'arguments': args}}; callback && callback(msg, data); // this fails for some browsers. :( if (originalConsoleLevel) { // IE9 doesn't allow calling apply on console functions directly // See: https://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function#answer-5473193 Function.prototype.apply.call( originalConsoleLevel, originalConsole, args ); } }; }; module.exports = { wrapMethod: wrapMethod }; },{}],4:[function(_dereq_,module,exports){ (function (global){ /*global XDomainRequest:false, __DEV__:false*/ 'use strict'; var TraceKit = _dereq_(6); var RavenConfigError = _dereq_(2); var stringify = _dereq_(1); var wrapConsoleMethod = _dereq_(3).wrapMethod; var dsnKeys = 'source protocol user pass host port path'.split(' '), dsnPattern = /^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/; function now() { return +new Date(); } // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785) var _window = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; var _document = _window.document; var _navigator = _window.navigator; // First, check for JSON support // If there is no JSON, we no-op the core features of Raven // since JSON is required to encode the payload function Raven() { this._hasJSON = !!(typeof JSON === 'object' && JSON.stringify); // Raven can run in contexts where there's no document (react-native) this._hasDocument = !isUndefined(_document); this._hasNavigator = !isUndefined(_navigator); this._lastCapturedException = null; this._lastData = null; this._lastEventId = null; this._globalServer = null; this._globalKey = null; this._globalProject = null; this._globalContext = {}; this._globalOptions = { logger: 'javascript', ignoreErrors: [], ignoreUrls: [], whitelistUrls: [], includePaths: [], crossOrigin: 'anonymous', collectWindowErrors: true, maxMessageLength: 0, stackTraceLimit: 50, autoBreadcrumbs: true }; this._ignoreOnError = 0; this._isRavenInstalled = false; this._originalErrorStackTraceLimit = Error.stackTraceLimit; // capture references to window.console *and* all its methods first // before the console plugin has a chance to monkey patch this._originalConsole = _window.console || {}; this._originalConsoleMethods = {}; this._plugins = []; this._startTime = now(); this._wrappedBuiltIns = []; this._breadcrumbs = []; this._lastCapturedEvent = null; this._keypressTimeout; this._location = _window.location; this._lastHref = this._location && this._location.href; this._resetBackoff(); for (var method in this._originalConsole) { // eslint-disable-line guard-for-in this._originalConsoleMethods[method] = this._originalConsole[method]; } } /* * The core Raven singleton * * @this {Raven} */ Raven.prototype = { // Hardcode version string so that raven source can be loaded directly via // webpack (using a build step causes webpack #1617). Grunt verifies that // this value matches package.json during build. // See: https://github.com/getsentry/raven-js/issues/465 VERSION: '3.11.0', debug: false, TraceKit: TraceKit, // alias to TraceKit /* * Configure Raven with a DSN and extra options * * @param {string} dsn The public Sentry DSN * @param {object} options Optional set of of global options [optional] * @return {Raven} */ config: function(dsn, options) { var self = this; if (self._globalServer) { this._logDebug('error', 'Error: Raven has already been configured'); return self; } if (!dsn) return self; var globalOptions = self._globalOptions; // merge in options if (options) { each(options, function(key, value){ // tags and extra are special and need to be put into context if (key === 'tags' || key === 'extra' || key === 'user') { self._globalContext[key] = value; } else { globalOptions[key] = value; } }); } self.setDSN(dsn); // "Script error." is hard coded into browsers for errors that it can't read. // this is the result of a script being pulled in from an external domain and CORS. globalOptions.ignoreErrors.push(/^Script error\.?$/); globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/); // join regexp rules into one big rule globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors); globalOptions.ignoreUrls = globalOptions.ignoreUrls.length ? joinRegExp(globalOptions.ignoreUrls) : false; globalOptions.whitelistUrls = globalOptions.whitelistUrls.length ? joinRegExp(globalOptions.whitelistUrls) : false; globalOptions.includePaths = joinRegExp(globalOptions.includePaths); globalOptions.maxBreadcrumbs = Math.max(0, Math.min(globalOptions.maxBreadcrumbs || 100, 100)); // default and hard limit is 100 var autoBreadcrumbDefaults = { xhr: true, console: true, dom: true, location: true }; var autoBreadcrumbs = globalOptions.autoBreadcrumbs; if ({}.toString.call(autoBreadcrumbs) === '[object Object]') { autoBreadcrumbs = objectMerge(autoBreadcrumbDefaults, autoBreadcrumbs); } else if (autoBreadcrumbs !== false) { autoBreadcrumbs = autoBreadcrumbDefaults; } globalOptions.autoBreadcrumbs = autoBreadcrumbs; TraceKit.collectWindowErrors = !!globalOptions.collectWindowErrors; // return for chaining return self; }, /* * Installs a global window.onerror error handler * to capture and report uncaught exceptions. * At this point, install() is required to be called due * to the way TraceKit is set up. * * @return {Raven} */ install: function() { var self = this; if (self.isSetup() && !self._isRavenInstalled) { TraceKit.report.subscribe(function () { self._handleOnErrorStackInfo.apply(self, arguments); }); self._instrumentTryCatch(); if (self._globalOptions.autoBreadcrumbs) self._instrumentBreadcrumbs(); // Install all of the plugins self._drainPlugins(); self._isRavenInstalled = true; } Error.stackTraceLimit = self._globalOptions.stackTraceLimit; return this; }, /* * Set the DSN (can be called multiple time unlike config) * * @param {string} dsn The public Sentry DSN */ setDSN: function(dsn) { var self = this, uri = self._parseDSN(dsn), lastSlash = uri.path.lastIndexOf('/'), path = uri.path.substr(1, lastSlash); self._dsn = dsn; self._globalKey = uri.user; self._globalSecret = uri.pass && uri.pass.substr(1); self._globalProject = uri.path.substr(lastSlash + 1); self._globalServer = self._getGlobalServer(uri); self._globalEndpoint = self._globalServer + '/' + path + 'api/' + self._globalProject + '/store/'; // Reset backoff state since we may be pointing at a // new project/server this._resetBackoff(); }, /* * Wrap code within a context so Raven can capture errors * reliably across domains that is executed immediately. * * @param {object} options A specific set of options for this context [optional] * @param {function} func The callback to be immediately executed within the context * @param {array} args An array of arguments to be called with the callback [optional] */ context: function(options, func, args) { if (isFunction(options)) { args = func || []; func = options; options = undefined; } return this.wrap(options, func).apply(this, args); }, /* * Wrap code within a context and returns back a new function to be executed * * @param {object} options A specific set of options for this context [optional] * @param {function} func The function to be wrapped in a new context * @param {function} func A function to call before the try/catch wrapper [optional, private] * @return {function} The newly wrapped functions with a context */ wrap: function(options, func, _before) { var self = this; // 1 argument has been passed, and it's not a function // so just return it if (isUndefined(func) && !isFunction(options)) { return options; } // options is optional if (isFunction(options)) { func = options; options = undefined; } // At this point, we've passed along 2 arguments, and the second one // is not a function either, so we'll just return the second argument. if (!isFunction(func)) { return func; } // We don't wanna wrap it twice! try { if (func.__raven__) { return func; } // If this has already been wrapped in the past, return that if (func.__raven_wrapper__ ){ return func.__raven_wrapper__ ; } } catch (e) { // Just accessing custom props in some Selenium environments // can cause a "Permission denied" exception (see raven-js#495). // Bail on wrapping and return the function as-is (defers to window.onerror). return func; } function wrapped() { var args = [], i = arguments.length, deep = !options || options && options.deep !== false; if (_before && isFunction(_before)) { _before.apply(this, arguments); } // Recursively wrap all of a function's arguments that are // functions themselves. while(i--) args[i] = deep ? self.wrap(options, arguments[i]) : arguments[i]; try { // Attempt to invoke user-land function // NOTE: If you are a Sentry user, and you are seeing this stack frame, it // means Raven caught an error invoking your application code. This is // expected behavior and NOT indicative of a bug with Raven.js. return func.apply(this, args); } catch(e) { self._ignoreNextOnError(); self.captureException(e, options); throw e; } } // copy over properties of the old function for (var property in func) { if (hasKey(func, property)) { wrapped[property] = func[property]; } } wrapped.prototype = func.prototype; func.__raven_wrapper__ = wrapped; // Signal that this function has been wrapped already // for both debugging and to prevent it to being wrapped twice wrapped.__raven__ = true; wrapped.__inner__ = func; return wrapped; }, /* * Uninstalls the global error handler. * * @return {Raven} */ uninstall: function() { TraceKit.report.uninstall(); this._restoreBuiltIns(); Error.stackTraceLimit = this._originalErrorStackTraceLimit; this._isRavenInstalled = false; return this; }, /* * Manually capture an exception and send it over to Sentry * * @param {error} ex An exception to be logged * @param {object} options A specific set of options for this error [optional] * @return {Raven} */ captureException: function(ex, options) { // If not an Error is passed through, recall as a message instead if (!isError(ex)) { return this.captureMessage(ex, objectMerge({ trimHeadFrames: 1, stacktrace: true // if we fall back to captureMessage, default to attempting a new trace }, options)); } // Store the raw exception object for potential debugging and introspection this._lastCapturedException = ex; // TraceKit.report will re-raise any exception passed to it, // which means you have to wrap it in try/catch. Instead, we // can wrap it here and only re-raise if TraceKit.report // raises an exception different from the one we asked to // report on. try { var stack = TraceKit.computeStackTrace(ex); this._handleStackInfo(stack, options); } catch(ex1) { if(ex !== ex1) { throw ex1; } } return this; }, /* * Manually send a message to Sentry * * @param {string} msg A plain message to be captured in Sentry * @param {object} options A specific set of options for this message [optional] * @return {Raven} */ captureMessage: function(msg, options) { // config() automagically converts ignoreErrors from a list to a RegExp so we need to test for an // early call; we'll error on the side of logging anything called before configuration since it's // probably something you should see: if (!!this._globalOptions.ignoreErrors.test && this._globalOptions.ignoreErrors.test(msg)) { return; } options = options || {}; var data = objectMerge({ message: msg + '' // Make sure it's actually a string }, options); if (this._globalOptions.stacktrace || (options && options.stacktrace)) { var ex; // create a stack trace from this point; just trim // off extra frames so they don't include this function call (or // earlier Raven.js library fn calls) try { throw new Error(msg); } catch (ex1) { ex = ex1; } // null exception name so `Error` isn't prefixed to msg ex.name = null; options = objectMerge({ // fingerprint on msg, not stack trace (legacy behavior, could be // revisited) fingerprint: msg, trimHeadFrames: (options.trimHeadFrames || 0) + 1 }, options); var stack = TraceKit.computeStackTrace(ex); var frames = this._prepareFrames(stack, options); data.stacktrace = { // Sentry expects frames oldest to newest frames: frames.reverse() } } // Fire away! this._send(data); return this; }, captureBreadcrumb: function (obj) { var crumb = objectMerge({ timestamp: now() / 1000 }, obj); if (isFunction(this._globalOptions.breadcrumbCallback)) { var result = this._globalOptions.breadcrumbCallback(crumb); if (isObject(result) && !isEmptyObject(result)) { crumb = result; } else if (result === false) { return this; } } this._breadcrumbs.push(crumb); if (this._breadcrumbs.length > this._globalOptions.maxBreadcrumbs) { this._breadcrumbs.shift(); } return this; }, addPlugin: function(plugin /*arg1, arg2, ... argN*/) { var pluginArgs = [].slice.call(arguments, 1); this._plugins.push([plugin, pluginArgs]); if (this._isRavenInstalled) { this._drainPlugins(); } return this; }, /* * Set/clear a user to be sent along with the payload. * * @param {object} user An object representing user data [optional] * @return {Raven} */ setUserContext: function(user) { // Intentionally do not merge here since that's an unexpected behavior. this._globalContext.user = user; return this; }, /* * Merge extra attributes to be sent along with the payload. * * @param {object} extra An object representing extra data [optional] * @return {Raven} */ setExtraContext: function(extra) { this._mergeContext('extra', extra); return this; }, /* * Merge tags to be sent along with the payload. * * @param {object} tags An object representing tags [optional] * @return {Raven} */ setTagsContext: function(tags) { this._mergeContext('tags', tags); return this; }, /* * Clear all of the context. * * @return {Raven} */ clearContext: function() { this._globalContext = {}; return this; }, /* * Get a copy of the current context. This cannot be mutated. * * @return {object} copy of context */ getContext: function() { // lol javascript return JSON.parse(stringify(this._globalContext)); }, /* * Set environment of application * * @param {string} environment Typically something like 'production'. * @return {Raven} */ setEnvironment: function(environment) { this._globalOptions.environment = environment; return this; }, /* * Set release version of application * * @param {string} release Typically something like a git SHA to identify version * @return {Raven} */ setRelease: function(release) { this._globalOptions.release = release; return this; }, /* * Set the dataCallback option * * @param {function} callback The callback to run which allows the * data blob to be mutated before sending * @return {Raven} */ setDataCallback: function(callback) { var original = this._globalOptions.dataCallback; this._globalOptions.dataCallback = isFunction(callback) ? function (data) { return callback(data, original); } : callback; return this; }, /* * Set the breadcrumbCallback option * * @param {function} callback The callback to run which allows filtering * or mutating breadcrumbs * @return {Raven} */ setBreadcrumbCallback: function(callback) { var original = this._globalOptions.breadcrumbCallback; this._globalOptions.breadcrumbCallback = isFunction(callback) ? function (data) { return callback(data, original); } : callback; return this; }, /* * Set the shouldSendCallback option * * @param {function} callback The callback to run which allows * introspecting the blob before sending * @return {Raven} */ setShouldSendCallback: function(callback) { var original = this._globalOptions.shouldSendCallback; this._globalOptions.shouldSendCallback = isFunction(callback) ? function (data) { return callback(data, original); } : callback; return this; }, /** * Override the default HTTP transport mechanism that transmits data * to the Sentry server. * * @param {function} transport Function invoked instead of the default * `makeRequest` handler. * * @return {Raven} */ setTransport: function(transport) { this._globalOptions.transport = transport; return this; }, /* * Get the latest raw exception that was captured by Raven. * * @return {error} */ lastException: function() { return this._lastCapturedException; }, /* * Get the last event id * * @return {string} */ lastEventId: function() { return this._lastEventId; }, /* * Determine if Raven is setup and ready to go. * * @return {boolean} */ isSetup: function() { if (!this._hasJSON) return false; // needs JSON support if (!this._globalServer) { if (!this.ravenNotConfiguredError) { this.ravenNotConfiguredError = true; this._logDebug('error', 'Error: Raven has not been configured.'); } return false; } return true; }, afterLoad: function () { // TODO: remove window dependence? // Attempt to initialize Raven on load var RavenConfig = _window.RavenConfig; if (RavenConfig) { this.config(RavenConfig.dsn, RavenConfig.config).install(); } }, showReportDialog: function (options) { if (!_document) // doesn't work without a document (React native) return; options = options || {}; var lastEventId = options.eventId || this.lastEventId(); if (!lastEventId) { throw new RavenConfigError('Missing eventId'); } var dsn = options.dsn || this._dsn; if (!dsn) { throw new RavenConfigError('Missing DSN'); } var encode = encodeURIComponent; var qs = ''; qs += '?eventId=' + encode(lastEventId); qs += '&dsn=' + encode(dsn); var user = options.user || this._globalContext.user; if (user) { if (user.name) qs += '&name=' + encode(user.name); if (user.email) qs += '&email=' + encode(user.email); } var globalServer = this._getGlobalServer(this._parseDSN(dsn)); var script = _document.createElement('script'); script.async = true; script.src = globalServer + '/api/embed/error-page/' + qs; (_document.head || _document.body).appendChild(script); }, /**** Private functions ****/ _ignoreNextOnError: function () { var self = this; this._ignoreOnError += 1; setTimeout(function () { // onerror should trigger before setTimeout self._ignoreOnError -= 1; }); }, _triggerEvent: function(eventType, options) { // NOTE: `event` is a native browser thing, so let's avoid conflicting wiht it var evt, key; if (!this._hasDocument) return; options = options || {}; eventType = 'raven' + eventType.substr(0,1).toUpperCase() + eventType.substr(1); if (_document.createEvent) { evt = _document.createEvent('HTMLEvents'); evt.initEvent(eventType, true, true); } else { evt = _document.createEventObject(); evt.eventType = eventType; } for (key in options) if (hasKey(options, key)) { evt[key] = options[key]; } if (_document.createEvent) { // IE9 if standards _document.dispatchEvent(evt); } else { // IE8 regardless of Quirks or Standards // IE9 if quirks try { _document.fireEvent('on' + evt.eventType.toLowerCase(), evt); } catch(e) { // Do nothing } } }, /** * Wraps addEventListener to capture UI breadcrumbs * @param evtName the event name (e.g. "click") * @returns {Function} * @private */ _breadcrumbEventHandler: function(evtName) { var self = this; return function (evt) { // reset keypress timeout; e.g. triggering a 'click' after // a 'keypress' will reset the keypress debounce so that a new // set of keypresses can be recorded self._keypressTimeout = null; // It's possible this handler might trigger multiple times for the same // event (e.g. event propagation through node ancestors). Ignore if we've // already captured the event. if (self._lastCapturedEvent === evt) return; self._lastCapturedEvent = evt; // try/catch both: // - accessing evt.target (see getsentry/raven-js#838, #768) // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly // can throw an exception in some circumstances. var target; try { target = htmlTreeAsString(evt.target); } catch (e) { target = '<unknown>'; } self.captureBreadcrumb({ category: 'ui.' + evtName, // e.g. ui.click, ui.input message: target }); }; }, /** * Wraps addEventListener to capture keypress UI events * @returns {Function} * @private */ _keypressEventHandler: function() { var self = this, debounceDuration = 1000; // milliseconds // TODO: if somehow user switches keypress target before // debounce timeout is triggered, we will only capture // a single breadcrumb from the FIRST target (acceptable?) return function (evt) { var target; try { target = evt.target; } catch (e) { // just accessing event properties can throw an exception in some rare circumstances // see: https://github.com/getsentry/raven-js/issues/838 return; } var tagName = target && target.tagName; // only consider keypress events on actual input elements // this will disregard keypresses targeting body (e.g. tabbing // through elements, hotkeys, etc) if (!tagName || tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable) return; // record first keypress in a series, but ignore subsequent // keypresses until debounce clears var timeout = self._keypressTimeout; if (!timeout) { self._breadcrumbEventHandler('input')(evt); } clearTimeout(timeout); self._keypressTimeout = setTimeout(function () { self._keypressTimeout = null; }, debounceDuration); }; }, /** * Captures a breadcrumb of type "navigation", normalizing input URLs * @param to the originating URL * @param from the target URL * @private */ _captureUrlChange: function(from, to) { var parsedLoc = parseUrl(this._location.href); var parsedTo = parseUrl(to); var parsedFrom = parseUrl(from); // because onpopstate only tells you the "new" (to) value of location.href, and // not the previous (from) value, we need to track the value of the current URL // state ourselves this._lastHref = to; // Use only the path component of the URL if the URL matches the current // document (almost all the time when using pushState) if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) to = parsedTo.relative; if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) from = parsedFrom.relative; this.captureBreadcrumb({ category: 'navigation', data: { to: to, from: from } }); }, /** * Install any queued plugins */ _instrumentTryCatch: function() { var self = this; var wrappedBuiltIns = self._wrappedBuiltIns; function wrapTimeFn(orig) { return function (fn, t) { // preserve arity // Make a copy of the arguments to prevent deoptimization // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments var args = new Array(arguments.length); for(var i = 0; i < args.length; ++i) { args[i] = arguments[i]; } var originalCallback = args[0]; if (isFunction(originalCallback)) { args[0] = self.wrap(originalCallback); } // IE < 9 doesn't support .call/.apply on setInterval/setTimeout, but it // also supports only two arguments and doesn't care what this is, so we // can just call the original function directly. if (orig.apply) { return orig.apply(this, args); } else { return orig(args[0], args[1]); } }; } var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs; function wrapEventTarget(global) { var proto = _window[global] && _window[global].prototype; if (proto && proto.hasOwnProperty && proto.hasOwnProperty('addEventListener')) { fill(proto, 'addEventListener', function(orig) { return function (evtName, fn, capture, secure) { // preserve arity try { if (fn && fn.handleEvent) { fn.handleEvent = self.wrap(fn.handleEvent); } } catch (err) { // can sometimes get 'Permission denied to access property "handle Event' } // More breadcrumb DOM capture ... done here and not in `_instrumentBreadcrumbs` // so that we don't have more than one wrapper function var before, clickHandler, keypressHandler; if (autoBreadcrumbs && autoBreadcrumbs.dom && (global === 'EventTarget' || global === 'Node')) { // NOTE: generating multiple handlers per addEventListener invocation, should // revisit and verify we can just use one (almost certainly) clickHandler = self._breadcrumbEventHandler('click'); keypressHandler = self._keypressEventHandler(); before = function (evt) { // need to intercept every DOM event in `before` argument, in case that // same wrapped method is re-used for different events (e.g. mousemove THEN click) // see #724 if (!evt) return; var eventType; try { eventType = evt.type } catch (e) { // just accessing event properties can throw an exception in some rare circumstances // see: https://github.com/getsentry/raven-js/issues/838 return; } if (eventType === 'click') return clickHandler(evt); else if (eventType === 'keypress') return keypressHandler(evt); }; } return orig.call(this, evtName, self.wrap(fn, undefined, before), capture, secure); }; }, wrappedBuiltIns); fill(proto, 'removeEventListener', function (orig) { return function (evt, fn, capture, secure) { try { fn = fn && (fn.__raven_wrapper__ ? fn.__raven_wrapper__ : fn); } catch (e) { // ignore, accessing __raven_wrapper__ will throw in some Selenium environments } return orig.call(this, evt, fn, capture, secure); }; }, wrappedBuiltIns); } } fill(_window, 'setTimeout', wrapTimeFn, wrappedBuiltIns); fill(_window, 'setInterval', wrapTimeFn, wrappedBuiltIns); if (_window.requestAnimationFrame) { fill(_window, 'requestAnimationFrame', function (orig) { return function (cb) { return orig(self.wrap(cb)); }; }, wrappedBuiltIns); } // event targets borrowed from bugsnag-js: // https://github.com/bugsnag/bugsnag-js/blob/master/src/bugsnag.js#L666 var eventTargets = ['EventTarget', 'Window', 'Node', 'ApplicationCache', 'AudioTrackList', 'ChannelMergerNode', 'CryptoOperation', 'EventSource', 'FileReader', 'HTMLUnknownElement', 'IDBDatabase', 'IDBRequest', 'IDBTransaction', 'KeyOperation', 'MediaController', 'MessagePort', 'ModalWindow', 'Notification', 'SVGElementInstance', 'Screen', 'TextTrack', 'TextTrackCue', 'TextTrackList', 'WebSocket', 'WebSocketWorker', 'Worker', 'XMLHttpRequest', 'XMLHttpRequestEventTarget', 'XMLHttpRequestUpload']; for (var i = 0; i < eventTargets.length; i++) { wrapEventTarget(eventTargets[i]); } }, /** * Instrument browser built-ins w/ breadcrumb capturing * - XMLHttpRequests * - DOM interactions (click/typing) * - window.location changes * - console * * Can be disabled or individually configured via the `autoBreadcrumbs` config option */ _instrumentBreadcrumbs: function () { var self = this; var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs; var wrappedBuiltIns = self._wrappedBuiltIns; function wrapProp(prop, xhr) { if (prop in xhr && isFunction(xhr[prop])) { fill(xhr, prop, function (orig) { return self.wrap(orig); }); // intentionally don't track filled methods on XHR instances } } if (autoBreadcrumbs.xhr && 'XMLHttpRequest' in _window) { var xhrproto = XMLHttpRequest.prototype; fill(xhrproto, 'open', function(origOpen) { return function (method, url) { // preserve arity // if Sentry key appears in URL, don't capture if (isString(url) && url.indexOf(self._globalKey) === -1) { this.__raven_xhr = { method: method, url: url, status_code: null }; } return origOpen.apply(this, arguments); }; }, wrappedBuiltIns); fill(xhrproto, 'send', function(origSend) { return function (data) { // preserve arity var xhr = this; function onreadystatechangeHandler() { if (xhr.__raven_xhr && (xhr.readyState === 1 || xhr.readyState === 4)) { try { // touching statusCode in some platforms throws // an exception xhr.__raven_xhr.status_code = xhr.status; } catch (e) { /* do nothing */ } self.captureBreadcrumb({ type: 'http', category: 'xhr', data: xhr.__raven_xhr }); } } var props = ['onload', 'onerror', 'onprogress']; for (var j = 0; j < props.length; j++) { wrapProp(props[j], xhr); } if ('onreadystatechange' in xhr && isFunction(xhr.onreadystatechange)) { fill(xhr, 'onreadystatechange', function (orig) { return self.wrap(orig, undefined, onreadystatechangeHandler); } /* intentionally don't track this instrumentation */); } else { // if onreadystatechange wasn't actually set by the page on this xhr, we // are free to set our own and capture the breadcrumb xhr.onreadystatechange = onreadystatechangeHandler; } return origSend.apply(this, arguments); }; }, wrappedBuiltIns); } if (autoBreadcrumbs.xhr && 'fetch' in _window) { fill(_window, 'fetch', function(origFetch) { return function (fn, t) { // preserve arity // Make a copy of the arguments to prevent deoptimization // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments var args = new Array(arguments.length); for(var i = 0; i < args.length; ++i) { args[i] = arguments[i]; } var method = 'GET'; if (args[1] && args[1].method) { method = args[1].method; } var fetchData = { method: method, url: args[0], status_code: null }; self.captureBreadcrumb({ type: 'http', category: 'fetch', data: fetchData }); return origFetch.apply(this, args).then(function (response) { fetchData.status_code = response.status; return response; }); }; }, wrappedBuiltIns); } // Capture breadcrumbs from any click that is unhandled / bubbled up all the way // to the document. Do this before we instrument addEventListener. if (autoBreadcrumbs.dom && this._hasDocument) { if (_document.addEventListener) { _document.addEventListener('click', self._breadcrumbEventHandler('click'), false); _document.addEventListener('keypress', self._keypressEventHandler(), false); } else { // IE8 Compatibility _document.attachEvent('onclick', self._breadcrumbEventHandler('click')); _document.attachEvent('onkeypress', self._keypressEventHandler()); } } // record navigation (URL) changes // NOTE: in Chrome App environment, touching history.pushState, *even inside // a try/catch block*, will cause Chrome to output an error to console.error // borrowed from: https://github.com/angular/angular.js/pull/13945/files var chrome = _window.chrome; var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime; var hasPushState = !isChromePackagedApp && _window.history && history.pushState; if (autoBreadcrumbs.location && hasPushState) { // TODO: remove onpopstate handler on uninstall() var oldOnPopState = _window.onpopstate; _window.onpopstate = function () { var currentHref = self._location.href; self._captureUrlChange(self._lastHref, currentHref); if (oldOnPopState) { return oldOnPopState.apply(this, arguments); } }; fill(history, 'pushState', function (origPushState) { // note history.pushState.length is 0; intentionally not declaring // params to preserve 0 arity return function (/* state, title, url */) { var url = arguments.length > 2 ? arguments[2] : undefined; // url argument is optional if (url) { // coerce to string (this is what pushState does) self._captureUrlChange(self._lastHref, url + ''); } return origPushState.apply(this, arguments); }; }, wrappedBuiltIns); } if (autoBreadcrumbs.console && 'console' in _window && console.log) { // console var consoleMethodCallback = function (msg, data) { self.captureBreadcrumb({ message: msg, level: data.level, category: 'console' }); }; each(['debug', 'info', 'warn', 'error', 'log'], function (_, level) { wrapConsoleMethod(console, level, consoleMethodCallback); }); } }, _restoreBuiltIns: function () { // restore any wrapped builtins var builtin; while (this._wrappedBuiltIns.length) { builtin = this._wrappedBuiltIns.shift(); var obj = builtin[0], name = builtin[1], orig = builtin[2]; obj[name] = orig; } }, _drainPlugins: function() { var self = this; // FIX ME TODO each(this._plugins, function(_, plugin) { var installer = plugin[0]; var args = plugin[1]; installer.apply(self, [self].concat(args)); }); }, _parseDSN: function(str) { var m = dsnPattern.exec(str), dsn = {}, i = 7; try { while (i--) dsn[dsnKeys[i]] = m[i] || ''; } catch(e) { throw new RavenConfigError('Invalid DSN: ' + str); } if (dsn.pass && !this._globalOptions.allowSecretKey) { throw new RavenConfigError('Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key'); } return dsn; }, _getGlobalServer: function(uri) { // assemble the endpoint from the uri pieces var globalServer = '//' + uri.host + (uri.port ? ':' + uri.port : ''); if (uri.protocol) { globalServer = uri.protocol + ':' + globalServer; } return globalServer; }, _handleOnErrorStackInfo: function() { // if we are intentionally ignoring errors via onerror, bail out if (!this._ignoreOnError) { this._handleStackInfo.apply(this, arguments); } }, _handleStackInfo: function(stackInfo, options) { var frames = this._prepareFrames(stackInfo, options); this._triggerEvent('handle', { stackInfo: stackInfo, options: options }); this._processException( stackInfo.name, stackInfo.message, stackInfo.url, stackInfo.lineno, frames, options ); }, _prepareFrames: function(stackInfo, options) { var self = this; var frames = []; if (stackInfo.stack && stackInfo.stack.length) { each(stackInfo.stack, function(i, stack) { var frame = self._normalizeFrame(stack); if (frame) { frames.push(frame); } }); // e.g. frames captured via captureMessage throw if (options && options.trimHeadFrames) { for (var j = 0; j < options.trimHeadFrames && j < frames.length; j++) { frames[j].in_app = false; } } } frames = frames.slice(0, this._globalOptions.stackTraceLimit); return frames; }, _normalizeFrame: function(frame) { if (!frame.url) return; // normalize the frames data var normalized = { filename: frame.url, lineno: frame.line, colno: frame.column, 'function': frame.func || '?' }; normalized.in_app = !( // determine if an exception came from outside of our app // first we check the global includePaths list. !!this._globalOptions.includePaths.test && !this._globalOptions.includePaths.test(normalized.filename) || // Now we check for fun, if the function name is Raven or TraceKit /(Raven|TraceKit)\./.test(normalized['function']) || // finally, we do a last ditch effort and check for raven.min.js /raven\.(min\.)?js$/.test(normalized.filename) ); return normalized; }, _processException: function(type, message, fileurl, lineno, frames, options) { var stacktrace; if (!!this._globalOptions.ignoreErrors.test && this._globalOptions.ignoreErrors.test(message)) return; message += ''; if (frames && frames.length) { fileurl = frames[0].filename || fileurl; // Sentry expects frames oldest to newest // and JS sends them as newest to oldest frames.reverse(); stacktrace = {frames: frames}; } else if (fileurl) { stacktrace = { frames: [{ filename: fileurl, lineno: lineno, in_app: true }] }; } if (!!this._globalOptions.ignoreUrls.test && this._globalOptions.ignoreUrls.test(fileurl)) return; if (!!this._globalOptions.whitelistUrls.test && !this._globalOptions.whitelistUrls.test(fileurl)) return; var data = objectMerge({ // sentry.interfaces.Exception exception: { values: [{ type: type, value: message, stacktrace: stacktrace }] }, culprit: fileurl }, options); // Fire away! this._send(data); }, _trimPacket: function(data) { // For now, we only want to truncate the two different messages // but this could/should be expanded to just trim everything var max = this._globalOptions.maxMessageLength; if (data.message) { data.message = truncate(data.message, max); } if (data.exception) { var exception = data.exception.values[0]; exception.value = truncate(exception.value, max); } return data; }, _getHttpData: function() { if (!this._hasNavigator && !this._hasDocument) return; var httpData = {}; if (this._hasNavigator && _navigator.userAgent) { httpData.headers = { 'User-Agent': navigator.userAgent }; } if (this._hasDocument) { if (_document.location && _document.location.href) { httpData.url = _document.location.href; } if (_document.referrer) { if (!httpData.headers) httpData.headers = {}; httpData.headers.Referer = _document.referrer; } } return httpData; }, _resetBackoff: function() { this._backoffDuration = 0; this._backoffStart = null; }, _shouldBackoff: function() { return this._backoffDuration && now() - this._backoffStart < this._backoffDuration; }, /** * Returns true if the in-process data payload matches the signature * of the previously-sent data * * NOTE: This has to be done at this level because TraceKit can generate * data from window.onerror WITHOUT an exception object (IE8, IE9, * other old browsers). This can take the form of an "exception" * data object with a single frame (derived from the onerror args). */ _isRepeatData: function (current) { var last = this._lastData; if (!last || current.message !== last.message || // defined for captureMessage current.culprit !== last.culprit) // defined for captureException/onerror return false; // Stacktrace interface (i.e. from captureMessage) if (current.stacktrace || last.stacktrace) { return isSameStacktrace(current.stacktrace, last.stacktrace); } // Exception interface (i.e. from captureException/onerror) else if (current.exception || last.exception) { return isSameException(current.exception, last.exception); } return true; }, _setBackoffState: function(request) { // If we are already in a backoff state, don't change anything if (this._shouldBackoff()) { return; } var status = request.status; // 400 - project_id doesn't exist or some other fatal // 401 - invalid/revoked dsn // 429 - too many requests if (!(status === 400 || status === 401 || status === 429)) return; var retry; try { // If Retry-After is not in Access-Control-Expose-Headers, most // browsers will throw an exception trying to access it retry = request.getResponseHeader('Retry-After'); retry = parseInt(retry, 10) * 1000; // Retry-After is returned in seconds } catch (e) { /* eslint no-empty:0 */ } this._backoffDuration = retry // If Sentry server returned a Retry-After value, use it ? retry // Otherwise, double the last backoff duration (starts at 1 sec) : this._backoffDuration * 2 || 1000; this._backoffStart = now(); }, _send: function(data) { var globalOptions = this._globalOptions; var baseData = { project: this._globalProject, logger: globalOptions.logger, platform: 'javascript' }, httpData = this._getHttpData(); if (httpData) { baseData.request = httpData; } // HACK: delete `trimHeadFrames` to prevent from appearing in outbound payload if (data.trimHeadFrames) delete data.trimHeadFrames; data = objectMerge(baseData, data); // Merge in the tags and extra separately since objectMerge doesn't handle a deep merge data.tags = objectMerge(objectMerge({}, this._globalContext.tags), data.tags); data.extra = objectMerge(objectMerge({}, this._globalContext.extra), data.extra); // Send along our own collected metadata with extra data.extra['session:duration'] = now() - this._startTime; if (this._breadcrumbs && this._breadcrumbs.length > 0) { // intentionally make shallow copy so that additions // to breadcrumbs aren't accidentally sent in this request data.breadcrumbs = { values: [].slice.call(this._breadcrumbs, 0) }; } // If there are no tags/extra, strip the key from the payload alltogther. if (isEmptyObject(data.tags)) delete data.tags; if (this._globalContext.user) { // sentry.interfaces.User data.user = this._globalContext.user; } // Include the environment if it's defined in globalOptions if (globalOptions.environment) data.environment = globalOptions.environment; // Include the release if it's defined in globalOptions if (globalOptions.release) data.release = globalOptions.release; // Include server_name if it's defined in globalOptions if (globalOptions.serverName) data.server_name = globalOptions.serverName; if (isFunction(globalOptions.dataCallback)) { data = globalOptions.dataCallback(data) || data; } // Why?????????? if (!data || isEmptyObject(data)) { return; } // Check if the request should be filtered or not if (isFunction(globalOptions.shouldSendCallback) && !globalOptions.shouldSendCallback(data)) { return; } // Backoff state: Sentry server previously responded w/ an error (e.g. 429 - too many requests), // so drop requests until "cool-off" period has elapsed. if (this._shouldBackoff()) { this._logDebug('warn', 'Raven dropped error due to backoff: ', data); return; } this._sendProcessedPayload(data); }, _getUuid: function () { return uuid4(); }, _sendProcessedPayload: function(data, callback) { var self = this; var globalOptions = this._globalOptions; if (!this.isSetup()) return; // Send along an event_id if not explicitly passed. // This event_id can be used to reference the error within Sentry itself. // Set lastEventId after we know the error should actually be sent this._lastEventId = data.event_id || (data.event_id = this._getUuid()); // Try and clean up the packet before sending by truncating long values data = this._trimPacket(data); // ideally duplicate error testing should occur *before* dataCallback/shouldSendCallback, // but this would require copying an un-truncated copy of the data packet, which can be // arbitrarily deep (extra_data) -- could be worthwhile? will revisit if (!this._globalOptions.allowDuplicates && this._isRepeatData(data)) { this._logDebug('warn', 'Raven dropped repeat event: ', data); return; } // Store outbound payload after trim this._lastData = data; this._logDebug('debug', 'Raven about to send:', data); var auth = { sentry_version: '7', sentry_client: 'raven-js/' + this.VERSION, sentry_key: this._globalKey }; if (this._globalSecret) { auth.sentry_secret = this._globalSecret; } var exception = data.exception && data.exception.values[0]; this.captureBreadcrumb({ category: 'sentry', message: exception ? (exception.type ? exception.type + ': ' : '') + exception.value : data.message, event_id: data.event_id, level: data.level || 'error' // presume error unless specified }); var url = this._globalEndpoint; (globalOptions.transport || this._makeRequest).call(this, { url: url, auth: auth, data: data, options: globalOptions, onSuccess: function success() { self._resetBackoff(); self._triggerEvent('success', { data: data, src: url }); callback && callback(); }, onError: function failure(error) { self._logDebug('error', 'Raven transport failed to send: ', error); if (error.request) { self._setBackoffState(error.request); } self._triggerEvent('failure', { data: data, src: url }); error = error || new Error('Raven send failed (no additional details provided)'); callback && callback(error); } }); }, _makeRequest: function(opts) { var request = new XMLHttpRequest(); // if browser doesn't support CORS (e.g. IE7), we are out of luck var hasCORS = 'withCredentials' in request || typeof XDomainRequest !== 'undefined'; if (!hasCORS) return; var url = opts.url; function handler() { if (request.status === 200) { if (opts.onSuccess) { opts.onSuccess(); } } else if (opts.onError) { var err = new Error('Sentry error code: ' + request.status); err.request = request; opts.onError(err); } } if ('withCredentials' in request) { request.onreadystatechange = function () { if (request.readyState !== 4) { return; } handler(); }; } else { request = new XDomainRequest(); // xdomainrequest cannot go http -> https (or vice versa), // so always use protocol relative url = url.replace(/^https?:/, ''); // onreadystatechange not supported by XDomainRequest request.onload = handler; } // NOTE: auth is intentionally sent as part of query string (NOT as custom // HTTP header) so as to avoid preflight CORS requests request.open('POST', url + '?' + urlencode(opts.auth)); request.send(stringify(opts.data)); }, _logDebug: function(level) { if (this._originalConsoleMethods[level] && this.debug) { // In IE<10 console methods do not have their own 'apply' method Function.prototype.apply.call( this._originalConsoleMethods[level], this._originalConsole, [].slice.call(arguments, 1) ); } }, _mergeContext: function(key, context) { if (isUndefined(context)) { delete this._globalContext[key]; } else { this._globalContext[key] = objectMerge(this._globalContext[key] || {}, context); } } }; /*------------------------------------------------ * utils * * conditionally exported for test via Raven.utils ================================================= */ var objectPrototype = Object.prototype; function isUndefined(what) { return what === void 0; } function isFunction(what) { return typeof what === 'function'; } function isString(what) { return objectPrototype.toString.call(what) === '[object String]'; } function isObject(what) { return typeof what === 'object' && what !== null; } function isEmptyObject(what) { for (var _ in what) return false; // eslint-disable-line guard-for-in, no-unused-vars return true; } // Sorta yanked from https://github.com/joyent/node/blob/aa3b4b4/lib/util.js#L560 // with some tiny modifications function isError(what) { var toString = objectPrototype.toString.call(what); return isObject(what) && toString === '[object Error]' || toString === '[object Exception]' || // Firefox NS_ERROR_FAILURE Exceptions what instanceof Error; } function each(obj, callback) { var i, j; if (isUndefined(obj.length)) { for (i in obj) { if (hasKey(obj, i)) { callback.call(null, i, obj[i]); } } } else { j = obj.length; if (j) { for (i = 0; i < j; i++) { callback.call(null, i, obj[i]); } } } } function objectMerge(obj1, obj2) { if (!obj2) { return obj1; } each(obj2, function(key, value){ obj1[key] = value; }); return obj1; } function truncate(str, max) { return !max || str.length <= max ? str : str.substr(0, max) + '\u2026'; } /** * hasKey, a better form of hasOwnProperty * Example: hasKey(MainHostObject, property) === true/false * * @param {Object} host object to check property * @param {string} key to check */ function hasKey(object, key) { return objectPrototype.hasOwnProperty.call(object, key); } function joinRegExp(patterns) { // Combine an array of regular expressions and strings into one large regexp // Be mad. var sources = [], i = 0, len = patterns.length, pattern; for (; i < len; i++) { pattern = patterns[i]; if (isString(pattern)) { // If it's a string, we need to escape it // Taken from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions sources.push(pattern.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, '\\$1')); } else if (pattern && pattern.source) { // If it's a regexp already, we want to extract the source sources.push(pattern.source); } // Intentionally skip other cases } return new RegExp(sources.join('|'), 'i'); } function urlencode(o) { var pairs = []; each(o, function(key, value) { pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(value)); }); return pairs.join('&'); } // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B // intentionally using regex and not <a/> href parsing trick because React Native and other // environments where DOM might not be available function parseUrl(url) { var match = url.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/); if (!match) return {}; // coerce to undefined values to empty string so we don't get 'undefined' var query = match[6] || ''; var fragment = match[8] || ''; return { protocol: match[2], host: match[4], path: match[5], relative: match[5] + query + fragment // everything minus origin }; } function uuid4() { var crypto = _window.crypto || _window.msCrypto; if (!isUndefined(crypto) && crypto.getRandomValues) { // Use window.crypto API if available var arr = new Uint16Array(8); crypto.getRandomValues(arr); // set 4 in byte 7 arr[3] = arr[3] & 0xFFF | 0x4000; // set 2 most significant bits of byte 9 to '10' arr[4] = arr[4] & 0x3FFF | 0x8000; var pad = function(num) { var v = num.toString(16); while (v.length < 4) { v = '0' + v; } return v; }; return pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7]); } else { // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523 return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) { var r = Math.random()*16|0, v = c === 'x' ? r : r&0x3|0x8; return v.toString(16); }); } } /** * Given a child DOM element, returns a query-selector statement describing that * and its ancestors * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz] * @param elem * @returns {string} */ function htmlTreeAsString(elem) { /* eslint no-extra-parens:0*/ var MAX_TRAVERSE_HEIGHT = 5, MAX_OUTPUT_LEN = 80, out = [], height = 0, len = 0, separator = ' > ', sepLength = separator.length, nextStr; while (elem && height++ < MAX_TRAVERSE_HEIGHT) { nextStr = htmlElementAsString(elem); // bail out if // - nextStr is the 'html' element // - the length of the string that would be created exceeds MAX_OUTPUT_LEN // (ignore this limit if we are on the first iteration) if (nextStr === 'html' || height > 1 && len + (out.length * sepLength) + nextStr.length >= MAX_OUTPUT_LEN) { break; } out.push(nextStr); len += nextStr.length; elem = elem.parentNode; } return out.reverse().join(separator); } /** * Returns a simple, query-selector representation of a DOM element * e.g. [HTMLElement] => input#foo.btn[name=baz] * @param HTMLElement * @returns {string} */ function htmlElementAsString(elem) { var out = [], className, classes, key, attr, i; if (!elem || !elem.tagName) { return ''; } out.push(elem.tagName.toLowerCase()); if (elem.id) { out.push('#' + elem.id); } className = elem.className; if (className && isString(className)) { classes = className.split(/\s+/); for (i = 0; i < classes.length; i++) { out.push('.' + classes[i]); } } var attrWhitelist = ['type', 'name', 'title', 'alt']; for (i = 0; i < attrWhitelist.length; i++) { key = attrWhitelist[i]; attr = elem.getAttribute(key); if (attr) { out.push('[' + key + '="' + attr + '"]'); } } return out.join(''); } /** * Returns true if either a OR b is truthy, but not both */ function isOnlyOneTruthy(a, b) { return !!(!!a ^ !!b); } /** * Returns true if the two input exception interfaces have the same content */ function isSameException(ex1, ex2) { if (isOnlyOneTruthy(ex1, ex2)) return false; ex1 = ex1.values[0]; ex2 = ex2.values[0]; if (ex1.type !== ex2.type || ex1.value !== ex2.value) return false; return isSameStacktrace(ex1.stacktrace, ex2.stacktrace); } /** * Returns true if the two input stack trace interfaces have the same content */ function isSameStacktrace(stack1, stack2) { if (isOnlyOneTruthy(stack1, stack2)) return false; var frames1 = stack1.frames; var frames2 = stack2.frames; // Exit early if frame count differs if (frames1.length !== frames2.length) return false; // Iterate through every frame; bail out if anything differs var a, b; for (var i = 0; i < frames1.length; i++) { a = frames1[i]; b = frames2[i]; if (a.filename !== b.filename || a.lineno !== b.lineno || a.colno !== b.colno || a['function'] !== b['function']) return false; } return true; } /** * Polyfill a method * @param obj object e.g. `document` * @param name method name present on object e.g. `addEventListener` * @param replacement replacement function * @param track {optional} record instrumentation to an array */ function fill(obj, name, replacement, track) { var orig = obj[name]; obj[name] = replacement(orig); if (track) { track.push([obj, name, orig]); } } if (typeof __DEV__ !== 'undefined' && __DEV__) { Raven.utils = { isUndefined: isUndefined, isFunction: isFunction, isString: isString, isObject: isObject, isEmptyObject: isEmptyObject, isError: isError, each: each, objectMerge: objectMerge, truncate: truncate, hasKey: hasKey, joinRegExp: joinRegExp, urlencode: urlencode, uuid4: uuid4, htmlTreeAsString: htmlTreeAsString, htmlElementAsString: htmlElementAsString, parseUrl: parseUrl, fill: fill }; }; // Deprecations Raven.prototype.setUser = Raven.prototype.setUserContext; Raven.prototype.setReleaseContext = Raven.prototype.setRelease; module.exports = Raven; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{"1":1,"2":2,"3":3,"6":6}],5:[function(_dereq_,module,exports){ (function (global){ /** * Enforces a single instance of the Raven client, and the * main entry point for Raven. If you are a consumer of the * Raven library, you SHOULD load this file (vs raven.js). **/ 'use strict'; var RavenConstructor = _dereq_(4); // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785) var _window = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; var _Raven = _window.Raven; var Raven = new RavenConstructor(); /* * Allow multiple versions of Raven to be installed. * Strip Raven from the global context and returns the instance. * * @return {Raven} */ Raven.noConflict = function () { _window.Raven = _Raven; return Raven; }; Raven.afterLoad(); module.exports = Raven; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{"4":4}],6:[function(_dereq_,module,exports){ (function (global){ 'use strict'; /* TraceKit - Cross brower stack traces This was originally forked from github.com/occ/TraceKit, but has since been largely re-written and is now maintained as part of raven-js. Tests for this are in test/vendor. MIT license */ var TraceKit = { collectWindowErrors: true, debug: false }; // This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785) var _window = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; // global reference to slice var _slice = [].slice; var UNKNOWN_FUNCTION = '?'; // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types var ERROR_TYPES_RE = /^(?:Uncaught (?:exception: )?)?((?:Eval|Internal|Range|Reference|Syntax|Type|URI)Error): ?(.*)$/; function getLocationHref() { if (typeof document === 'undefined' || typeof document.location === 'undefined') return ''; return document.location.href; } /** * TraceKit.report: cross-browser processing of unhandled exceptions * * Syntax: * TraceKit.report.subscribe(function(stackInfo) { ... }) * TraceKit.report.unsubscribe(function(stackInfo) { ... }) * TraceKit.report(exception) * try { ...code... } catch(ex) { TraceKit.report(ex); } * * Supports: * - Firefox: full stack trace with line numbers, plus column number * on top frame; column number is not guaranteed * - Opera: full stack trace with line and column numbers * - Chrome: full stack trace with line and column numbers * - Safari: line and column number for the top frame only; some frames * may be missing, and column number is not guaranteed * - IE: line and column number for the top frame only; some frames * may be missing, and column number is not guaranteed * * In theory, TraceKit should work on all of the following versions: * - IE5.5+ (only 8.0 tested) * - Firefox 0.9+ (only 3.5+ tested) * - Opera 7+ (only 10.50 tested; versions 9 and earlier may require * Exceptions Have Stacktrace to be enabled in opera:config) * - Safari 3+ (only 4+ tested) * - Chrome 1+ (only 5+ tested) * - Konqueror 3.5+ (untested) * * Requires TraceKit.computeStackTrace. * * Tries to catch all unhandled exceptions and report them to the * subscribed handlers. Please note that TraceKit.report will rethrow the * exception. This is REQUIRED in order to get a useful stack trace in IE. * If the exception does not reach the top of the browser, you will only * get a stack trace from the point where TraceKit.report was called. * * Handlers receive a stackInfo object as described in the * TraceKit.computeStackTrace docs. */ TraceKit.report = (function reportModuleWrapper() { var handlers = [], lastArgs = null, lastException = null, lastExceptionStack = null; /** * Add a crash handler. * @param {Function} handler */ function subscribe(handler) { installGlobalHandler(); handlers.push(handler); } /** * Remove a crash handler. * @param {Function} handler */ function unsubscribe(handler) { for (var i = handlers.length - 1; i >= 0; --i) { if (handlers[i] === handler) { handlers.splice(i, 1); } } } /** * Remove all crash handlers. */ function unsubscribeAll() { uninstallGlobalHandler(); handlers = []; } /** * Dispatch stack information to all handlers. * @param {Object.<string, *>} stack */ function notifyHandlers(stack, isWindowError) { var exception = null; if (isWindowError && !TraceKit.collectWindowErrors) { return; } for (var i in handlers) { if (handlers.hasOwnProperty(i)) { try { handlers[i].apply(null, [stack].concat(_slice.call(arguments, 2))); } catch (inner) { exception = inner; } } } if (exception) { throw exception; } } var _oldOnerrorHandler, _onErrorHandlerInstalled; /** * Ensures all global unhandled exceptions are recorded. * Supported by Gecko and IE. * @param {string} message Error message. * @param {string} url URL of script that generated the exception. * @param {(number|string)} lineNo The line number at which the error * occurred. * @param {?(number|string)} colNo The column number at which the error * occurred. * @param {?Error} ex The actual Error object. */ function traceKitWindowOnError(message, url, lineNo, colNo, ex) { var stack = null; if (lastExceptionStack) { TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(lastExceptionStack, url, lineNo, message); processLastException(); } else if (ex) { // New chrome and blink send along a real error object // Let's just report that like a normal error. // See: https://mikewest.org/2013/08/debugging-runtime-errors-with-window-onerror stack = TraceKit.computeStackTrace(ex); notifyHandlers(stack, true); } else { var location = { 'url': url, 'line': lineNo, 'column': colNo }; var name = undefined; var msg = message; // must be new var or will modify original `arguments` var groups; if ({}.toString.call(message) === '[object String]') { var groups = message.match(ERROR_TYPES_RE); if (groups) { name = groups[1]; msg = groups[2]; } } location.func = UNKNOWN_FUNCTION; stack = { 'name': name, 'message': msg, 'url': getLocationHref(), 'stack': [location] }; notifyHandlers(stack, true); } if (_oldOnerrorHandler) { return _oldOnerrorHandler.apply(this, arguments); } return false; } function installGlobalHandler () { if (_onErrorHandlerInstalled) { return; } _oldOnerrorHandler = _window.onerror; _window.onerror = traceKitWindowOnError; _onErrorHandlerInstalled = true; } function uninstallGlobalHandler () { if (!_onErrorHandlerInstalled) { return; } _window.onerror = _oldOnerrorHandler; _onErrorHandlerInstalled = false; _oldOnerrorHandler = undefined; } function processLastException() { var _lastExceptionStack = lastExceptionStack, _lastArgs = lastArgs; lastArgs = null; lastExceptionStack = null; lastException = null; notifyHandlers.apply(null, [_lastExceptionStack, false].concat(_lastArgs)); } /** * Reports an unhandled Error to TraceKit. * @param {Error} ex * @param {?boolean} rethrow If false, do not re-throw the exception. * Only used for window.onerror to not cause an infinite loop of * rethrowing. */ function report(ex, rethrow) { var args = _slice.call(arguments, 1); if (lastExceptionStack) { if (lastException === ex) { return; // already caught by an inner catch block, ignore } else { processLastException(); } } var stack = TraceKit.computeStackTrace(ex); lastExceptionStack = stack; lastException = ex; lastArgs = args; // If the stack trace is incomplete, wait for 2 seconds for // slow slow IE to see if onerror occurs or not before reporting // this exception; otherwise, we will end up with an incomplete // stack trace setTimeout(function () { if (lastException === ex) { processLastException(); } }, (stack.incomplete ? 2000 : 0)); if (rethrow !== false) { throw ex; // re-throw to propagate to the top level (and cause window.onerror) } } report.subscribe = subscribe; report.unsubscribe = unsubscribe; report.uninstall = unsubscribeAll; return report; }()); /** * TraceKit.computeStackTrace: cross-browser stack traces in JavaScript * * Syntax: * s = TraceKit.computeStackTrace(exception) // consider using TraceKit.report instead (see below) * Returns: * s.name - exception name * s.message - exception message * s.stack[i].url - JavaScript or HTML file URL * s.stack[i].func - function name, or empty for anonymous functions (if guessing did not work) * s.stack[i].args - arguments passed to the function, if known * s.stack[i].line - line number, if known * s.stack[i].column - column number, if known * * Supports: * - Firefox: full stack trace with line numbers and unreliable column * number on top frame * - Opera 10: full stack trace with line and column numbers * - Opera 9-: full stack trace with line numbers * - Chrome: full stack trace with line and column numbers * - Safari: line and column number for the topmost stacktrace element * only * - IE: no line numbers whatsoever * * Tries to guess names of anonymous functions by looking for assignments * in the source code. In IE and Safari, we have to guess source file names * by searching for function bodies inside all page scripts. This will not * work for scripts that are loaded cross-domain. * Here be dragons: some function names may be guessed incorrectly, and * duplicate functions may be mismatched. * * TraceKit.computeStackTrace should only be used for tracing purposes. * Logging of unhandled exceptions should be done with TraceKit.report, * which builds on top of TraceKit.computeStackTrace and provides better * IE support by utilizing the window.onerror event to retrieve information * about the top of the stack. * * Note: In IE and Safari, no stack trace is recorded on the Error object, * so computeStackTrace instead walks its *own* chain of callers. * This means that: * * in Safari, some methods may be missing from the stack trace; * * in IE, the topmost function in the stack trace will always be the * caller of computeStackTrace. * * This is okay for tracing (because you are likely to be calling * computeStackTrace from the function you want to be the topmost element * of the stack trace anyway), but not okay for logging unhandled * exceptions (because your catch block will likely be far away from the * inner function that actually caused the exception). * */ TraceKit.computeStackTrace = (function computeStackTraceWrapper() { /** * Escapes special characters, except for whitespace, in a string to be * used inside a regular expression as a string literal. * @param {string} text The string. * @return {string} The escaped string literal. */ function escapeRegExp(text) { return text.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g, '\\$&'); } /** * Escapes special characters in a string to be used inside a regular * expression as a string literal. Also ensures that HTML entities will * be matched the same as their literal friends. * @param {string} body The string. * @return {string} The escaped string. */ function escapeCodeAsRegExpForMatchingInsideHTML(body) { return escapeRegExp(body).replace('<', '(?:<|&lt;)').replace('>', '(?:>|&gt;)').replace('&', '(?:&|&amp;)').replace('"', '(?:"|&quot;)').replace(/\s+/g, '\\s+'); } // Contents of Exception in various browsers. // // SAFARI: // ex.message = Can't find variable: qq // ex.line = 59 // ex.sourceId = 580238192 // ex.sourceURL = http://... // ex.expressionBeginOffset = 96 // ex.expressionCaretOffset = 98 // ex.expressionEndOffset = 98 // ex.name = ReferenceError // // FIREFOX: // ex.message = qq is not defined // ex.fileName = http://... // ex.lineNumber = 59 // ex.columnNumber = 69 // ex.stack = ...stack trace... (see the example below) // ex.name = ReferenceError // // CHROME: // ex.message = qq is not defined // ex.name = ReferenceError // ex.type = not_defined // ex.arguments = ['aa'] // ex.stack = ...stack trace... // // INTERNET EXPLORER: // ex.message = ... // ex.name = ReferenceError // // OPERA: // ex.message = ...message... (see the example below) // ex.name = ReferenceError // ex.opera#sourceloc = 11 (pretty much useless, duplicates the info in ex.message) // ex.stacktrace = n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace' /** * Computes stack trace information from the stack property. * Chrome and Gecko use this property. * @param {Error} ex * @return {?Object.<string, *>} Stack trace information. */ function computeStackTraceFromStackProp(ex) { if (typeof ex.stack === 'undefined' || !ex.stack) return; var chrome = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|<anonymous>).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, gecko = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|resource|\[native).*?)(?::(\d+))?(?::(\d+))?\s*$/i, winjs = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i, lines = ex.stack.split('\n'), stack = [], parts, element, reference = /^(.*) is undefined$/.exec(ex.message); for (var i = 0, j = lines.length; i < j; ++i) { if ((parts = chrome.exec(lines[i]))) { var isNative = parts[2] && parts[2].indexOf('native') !== -1; element = { 'url': !isNative ? parts[2] : null, 'func': parts[1] || UNKNOWN_FUNCTION, 'args': isNative ? [parts[2]] : [], 'line': parts[3] ? +parts[3] : null, 'column': parts[4] ? +parts[4] : null }; } else if ( parts = winjs.exec(lines[i]) ) { element = { 'url': parts[2], 'func': parts[1] || UNKNOWN_FUNCTION, 'args': [], 'line': +parts[3], 'column': parts[4] ? +parts[4] : null }; } else if ((parts = gecko.exec(lines[i]))) { element = { 'url': parts[3], 'func': parts[1] || UNKNOWN_FUNCTION, 'args': parts[2] ? parts[2].split(',') : [], 'line': parts[4] ? +parts[4] : null, 'column': parts[5] ? +parts[5] : null }; } else { continue; } if (!element.func && element.line) { element.func = UNKNOWN_FUNCTION; } stack.push(element); } if (!stack.length) { return null; } if (!stack[0].column && typeof ex.columnNumber !== 'undefined') { // FireFox uses this awesome columnNumber property for its top frame // Also note, Firefox's column number is 0-based and everything else expects 1-based, // so adding 1 stack[0].column = ex.columnNumber + 1; } return { 'name': ex.name, 'message': ex.message, 'url': getLocationHref(), 'stack': stack }; } /** * Adds information about the first frame to incomplete stack traces. * Safari and IE require this to get complete data on the first frame. * @param {Object.<string, *>} stackInfo Stack trace information from * one of the compute* methods. * @param {string} url The URL of the script that caused an error. * @param {(number|string)} lineNo The line number of the script that * caused an error. * @param {string=} message The error generated by the browser, which * hopefully contains the name of the object that caused the error. * @return {boolean} Whether or not the stack information was * augmented. */ function augmentStackTraceWithInitialElement(stackInfo, url, lineNo, message) { var initial = { 'url': url, 'line': lineNo }; if (initial.url && initial.line) { stackInfo.incomplete = false; if (!initial.func) { initial.func = UNKNOWN_FUNCTION; } if (stackInfo.stack.length > 0) { if (stackInfo.stack[0].url === initial.url) { if (stackInfo.stack[0].line === initial.line) { return false; // already in stack trace } else if (!stackInfo.stack[0].line && stackInfo.stack[0].func === initial.func) { stackInfo.stack[0].line = initial.line; return false; } } } stackInfo.stack.unshift(initial); stackInfo.partial = true; return true; } else { stackInfo.incomplete = true; } return false; } /** * Computes stack trace information by walking the arguments.caller * chain at the time the exception occurred. This will cause earlier * frames to be missed but is the only way to get any stack trace in * Safari and IE. The top frame is restored by * {@link augmentStackTraceWithInitialElement}. * @param {Error} ex * @return {?Object.<string, *>} Stack trace information. */ function computeStackTraceByWalkingCallerChain(ex, depth) { var functionName = /function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i, stack = [], funcs = {}, recursion = false, parts, item, source; for (var curr = computeStackTraceByWalkingCallerChain.caller; curr && !recursion; curr = curr.caller) { if (curr === computeStackTrace || curr === TraceKit.report) { // console.log('skipping internal function'); continue; } item = { 'url': null, 'func': UNKNOWN_FUNCTION, 'line': null, 'column': null }; if (curr.name) { item.func = curr.name; } else if ((parts = functionName.exec(curr.toString()))) { item.func = parts[1]; } if (typeof item.func === 'undefined') { try { item.func = parts.input.substring(0, parts.input.indexOf('{')); } catch (e) { } } if (funcs['' + curr]) { recursion = true; }else{ funcs['' + curr] = true; } stack.push(item); } if (depth) { // console.log('depth is ' + depth); // console.log('stack is ' + stack.length); stack.splice(0, depth); } var result = { 'name': ex.name, 'message': ex.message, 'url': getLocationHref(), 'stack': stack }; augmentStackTraceWithInitialElement(result, ex.sourceURL || ex.fileName, ex.line || ex.lineNumber, ex.message || ex.description); return result; } /** * Computes a stack trace for an exception. * @param {Error} ex * @param {(string|number)=} depth */ function computeStackTrace(ex, depth) { var stack = null; depth = (depth == null ? 0 : +depth); try { stack = computeStackTraceFromStackProp(ex); if (stack) { return stack; } } catch (e) { if (TraceKit.debug) { throw e; } } try { stack = computeStackTraceByWalkingCallerChain(ex, depth + 1); if (stack) { return stack; } } catch (e) { if (TraceKit.debug) { throw e; } } return { 'name': ex.name, 'message': ex.message, 'url': getLocationHref() }; } computeStackTrace.augmentStackTraceWithInitialElement = augmentStackTraceWithInitialElement; computeStackTrace.computeStackTraceFromStackProp = computeStackTraceFromStackProp; return computeStackTrace; }()); module.exports = TraceKit; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{}]},{},[5])(5) });
src/svg-icons/notification/power.js
frnk94/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationPower = (props) => ( <SvgIcon {...props}> <path d="M16.01 7L16 3h-2v4h-4V3H8v4h-.01C7 6.99 6 7.99 6 8.99v5.49L9.5 18v3h5v-3l3.5-3.51v-5.5c0-1-1-2-1.99-1.99z"/> </SvgIcon> ); NotificationPower = pure(NotificationPower); NotificationPower.displayName = 'NotificationPower'; NotificationPower.muiName = 'SvgIcon'; export default NotificationPower;
wp-content/themes/theshop/js/jquery-1.9.1.min.js
estrategasdigitales/Dagutorio
/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license //@ sourceMappingURL=jquery.min.map */(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.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]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},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(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&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(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):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,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj; return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},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)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="<a name='"+x+"'></a><div name='"+x+"'></div>",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?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)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.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+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===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]||st.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]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.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.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.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"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&&gt(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Nt=/^(?:checkbox|radio)$/i,Ct=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={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:b.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.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 b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l) }b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=ln(e,t),Pt.detach()),Gt[e]=n),n}function ln(e,t){var n=b(t.createElement(e)).appendTo(t.body),r=b.css(n[0],"display");return n.remove(),r}b.each(["height","width"],function(e,n){b.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(b.css(e,"display"))?b.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,i),i):0)}}}),b.support.opacity||(b.cssHooks.opacity={get:function(e,t){return It.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=b.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===b.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),b(function(){b.support.reliableMarginRight||(b.cssHooks.marginRight={get:function(e,n){return n?b.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!b.support.pixelPosition&&b.fn.position&&b.each(["top","left"],function(e,n){b.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?b(e).position()[n]+"px":r):t}}})}),b.expr&&b.expr.filters&&(b.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!b.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||b.css(e,"display"))},b.expr.filters.visible=function(e){return!b.expr.filters.hidden(e)}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(b.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Nt.test(e))}).map(function(e,t){var n=b(this).val();return null==n?null:b.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),b.param=function(e,n){var r,i=[],o=function(e,t){t=b.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=b.ajaxSettings&&b.ajaxSettings.traditional),b.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(b.isArray(t))b.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==b.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}b.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){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),b.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var mn,yn,vn=b.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Nn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Cn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=b.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=a.href}catch(Ln){yn=o.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];if(b.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(u){var l;return o[u]=!0,b.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||a||o[c]?a?!(l=c):t:(n.dataTypes.unshift(c),s(c),!1)}),l}return s(n.dataTypes[0])||!o["*"]&&s("*")}function Mn(e,n){var r,i,o=b.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&b.extend(!0,e,r),e}b.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),b.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&b.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?b("<div>").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,o){return b.isFunction(r)&&(o=o||i,i=r,r=t),b.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Nn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,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"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Mn(Mn(e,b.ajaxSettings),t):Mn(b.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,u,l,c,p=b.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?b(f):b.event,h=b.Deferred(),g=b.Callbacks("once memory"),m=p.statusCode||{},y={},v={},x=0,T="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else N.always(e[N.status]);return this},abort:function(e){var t=e||T;return l&&l.abort(t),k(0,t),this}};if(h.promise(N).complete=g.add,N.success=N.done,N.error=N.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=b.trim(p.dataType||"*").toLowerCase().match(w)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?80:443))==(mn[3]||("http:"===mn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),qn(An,p,n,N),2===x)return N;u=p.global,u&&0===b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Cn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(b.lastModified[o]&&N.setRequestHeader("If-Modified-Since",b.lastModified[o]),b.etag[o]&&N.setRequestHeader("If-None-Match",b.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&N.setRequestHeader("Content-Type",p.contentType),N.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)N.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,N,p)===!1||2===x))return N.abort();T="abort";for(i in{success:1,error:1,complete:1})N[i](p[i]);if(l=qn(jn,p,n,N)){N.readyState=1,u&&d.trigger("ajaxSend",[N,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){N.abort("timeout")},p.timeout));try{x=1,l.send(y,k)}catch(C){if(!(2>x))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,C=n;2!==x&&(x=2,s&&clearTimeout(s),l=t,a=i||"",N.readyState=e>0?4:0,r&&(w=_n(p,N,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=N.getResponseHeader("Last-Modified"),T&&(b.lastModified[o]=T),T=N.getResponseHeader("etag"),T&&(b.etag[o]=T)),204===e?(c=!0,C="nocontent"):304===e?(c=!0,C="notmodified"):(c=Fn(p,w),C=c.state,y=c.data,v=c.error,c=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),N.status=e,N.statusText=(n||C)+"",c?h.resolveWith(f,[y,C,N]):h.rejectWith(f,[N,C,v]),N.statusCode(m),m=t,u&&d.trigger(c?"ajaxSuccess":"ajaxError",[N,p,c?y:v]),g.fireWith(f,[N,C]),u&&(d.trigger("ajaxComplete",[N,p]),--b.active||b.event.trigger("ajaxStop")))}return N},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}});function _n(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(s in c)s in r&&(n[c[s]]=r[s]);while("*"===l[0])l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function Fn(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=u[++s];)if("*"!==r){if("*"!==l&&l!==r){if(i=a[l+" "+r]||a["* "+r],!i)for(n in a)if(o=n.split(" "),o[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){i===!0?i=a[n]:a[n]!==!0&&(r=o[0],u.splice(s--,0,r));break}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||b("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var On=[],Bn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=On.pop()||b.expando+"_"+vn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||b.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,On.push(o)),s&&b.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=b.ajaxSettings.xhr(),b.support.cors=!!Rn&&"withCredentials"in Rn,Rn=b.support.ajax=!!Rn,Rn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=b.noop,$n&&delete Pn[a]),i)4!==u.readyState&&u.abort();else{p={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(p.text=u.responseText);try{c=u.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,l)},n.async?4===u.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},b(e).unload($n)),Pn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+x+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=Yn.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(b.cssNumber[e]?"":"px"),"px"!==r&&s){s=b.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,b.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Qn[t]||[]).concat(Qn["*"]),i=0,o=r.length;for(;o>i;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,o=0,a=Gn.length,s=b.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;for(;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(tr(c,l.opts.specialEasing);a>o;o++)if(r=Gn[o].call(l,e,c,l.opts))return r;return Zn(l,c),b.isFunction(l.opts.start)&&l.opts.start.call(e,l),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function tr(e,t){var n,r,i,o,a;for(i in e)if(r=b.camelCase(i),o=t[r],n=e[i],b.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),a=b.cssHooks[r],a&&"expand"in a){n=a.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=o)}else t[r]=o}b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,u,l,c,p,f=this,d=e.style,h={},g=[],m=e.nodeType&&nn(e);n.queue||(c=b._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,p=c.empty.fire,c.empty.fire=function(){c.unqueued||p()}),c.unqueued++,f.always(function(){f.always(function(){c.unqueued--,b.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===b.css(e,"display")&&"none"===b.css(e,"float")&&(b.support.inlineBlockNeedsLayout&&"inline"!==un(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",b.support.shrinkWrapBlocks||f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in t)if(a=t[i],Vn.exec(a)){if(delete t[i],u=u||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){s=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?b(e).show():f.done(function(){b(e).hide()}),f.done(function(){var t;b._removeData(e,"fxshow");for(t in h)b.style(e,t,h[t])});for(i=0;o>i;i++)r=g[i],l=f.createTween(r,m?s[r]:0),h[r]=s[r]||b.style(e,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}b.Tween=rr,rr.prototype={constructor:rr,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||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?b.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):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=b.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[b.cssProps[e.prop]]||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),o=b.speed(t,n,r),a=function(){var t=er(this,b.extend({},e),o);a.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=b.timers,a=b._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[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)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=b.timers,a=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({},e):{complete:n||!n&&t||b.isFunction(e)&&e,duration:e,easing:n&&t||t&&!b.isFunction(t)&&t};return r.duration=b.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in b.fx.speeds?b.fx.speeds[r.duration]:b.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){b.isFunction(r.old)&&r.old.call(this),r.queue&&b.dequeue(this,r.queue)},r},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},b.timers=[],b.fx=rr.prototype.init,b.fx.tick=function(){var e,n=b.timers,r=0;for(Xn=b.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||b.fx.stop(),Xn=t},b.fx.timer=function(e){e()&&b.timers.push(e)&&b.fx.start()},b.fx.interval=13,b.fx.start=function(){Un||(Un=setInterval(b.fx.tick,b.fx.interval))},b.fx.stop=function(){clearInterval(Un),Un=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fx.step={},b.expr&&b.expr.filters&&(b.expr.filters.animated=function(e){return b.grep(b.timers,function(t){return e===t.elem}).length}),b.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){b.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,b.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},b.offset={setOffset:function(e,t,n){var r=b.css(e,"position");"static"===r&&(e.style.position="relative");var i=b(e),o=i.offset(),a=b.css(e,"top"),s=b.css(e,"left"),u=("absolute"===r||"fixed"===r)&&b.inArray("auto",[a,s])>-1,l={},c={},p,f;u?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),b.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(l.top=t.top-o.top+p),null!=t.left&&(l.left=t.left-o.left+f),"using"in t?t.using.call(e,l):i.css(l)}},b.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===b.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),b.nodeName(e[0],"html")||(n=e.offset()),n.top+=b.css(e[0],"borderTopWidth",!0),n.left+=b.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-b.css(r,"marginTop",!0),left:t.left-n.left-b.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||o.documentElement;while(e&&!b.nodeName(e,"html")&&"static"===b.css(e,"position"))e=e.offsetParent;return e||o.documentElement})}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);b.fn[e]=function(i){return b.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?b(a).scrollLeft():o,r?o:b(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return b.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}b.each({Height:"height",Width:"width"},function(e,n){b.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){b.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return b.access(this,function(n,r,i){var o;return b.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?b.css(n,r,s):b.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=b,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return b})})(window);
examples/node_modules/react-native/node_modules/react-tools/src/event/__tests__/EventPluginHub-test.js
michaelcox/react-native-swiper
/** * 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. * * @emails react-core */ 'use strict'; require('mock-modules') .dontMock('EventPluginHub') .mock('isEventSupported'); describe('EventPluginHub', function() { var EventPluginHub; var isEventSupported; beforeEach(function() { require('mock-modules').dumpCache(); EventPluginHub = require('EventPluginHub'); isEventSupported = require('isEventSupported'); isEventSupported.mockReturnValueOnce(false); }); it("should prevent non-function listeners", function() { expect(function() { EventPluginHub.putListener(1, 'onClick', 'not a function'); }).toThrow( 'Invariant Violation: Expected onClick listener to be a function, ' + 'instead got type string' ); }); });
docs/src/pages/components/use-media-query/SimpleMediaQuery.js
lgollut/material-ui
import React from 'react'; import useMediaQuery from '@material-ui/core/useMediaQuery'; export default function SimpleMediaQuery() { const matches = useMediaQuery('(min-width:600px)'); return <span>{`(min-width:600px) matches: ${matches}`}</span>; }
src/App.js
gnkatchmar/new-gkatchmar
import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from 'material-ui/styles'; import Button from 'material-ui/Button'; import UpIcon from "material-ui-icons/ArrowUpward"; import ScrollToTop from "react-scroll-up"; import NavTabs from "./NavTabs"; const styles = theme => ({ }); function App(props) { const classes = props.classes; return ( <div> <NavTabs /> <ScrollToTop showUnder={160}> <Button fab color="primary" className={classes.button}> <UpIcon/> </Button> </ScrollToTop> </div> ); } App.propTypes = { classes: PropTypes.object.isRequired, }; export default withStyles(styles)(App);
src/docs/examples/Label/ExampleRequired.js
coryhouse/ps-react
import React from 'react'; import Label from 'ps-react/Label'; /** Required label */ export default function ExampleRequired() { return <Label htmlFor="test" label="test" required /> }
ajax/libs/react/0.3.0/react.min.js
emmy41124/cdnjs
/** * React v0.3.0 * * Copyright 2013 Facebook, Inc. * * 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. */ !function(e){if("function"==typeof bootstrap)bootstrap("react",e);else if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeReact=e}else"undefined"!=typeof window?window.React=e():global.React=e()}(function(){return function(e,t,n){function o(n,i){if(!t[n]){if(!e[n]){var a="function"==typeof require&&require;if(!i&&a)return a(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var s=t[n]={exports:{}};e[n][0].call(s.exports,function(t){var r=e[n][1][t];return o(r?r:t)},s,s.exports)}return t[n].exports}for(var r="function"==typeof require&&require,i=0;i<n.length;i++)o(n[i]);return o}({1:[function(e,t){"use strict";var n=e("./ReactCompositeComponent"),o=e("./ReactComponent"),r=e("./ReactDOM"),i=e("./ReactMount"),a=e("./ReactDefaultInjection");a.inject();var s={DOM:r,initializeTouchEvents:function(e){i.useTouchEvents=e},autoBind:n.autoBind,createClass:n.createClass,createComponentRenderer:i.createComponentRenderer,constructAndRenderComponent:i.constructAndRenderComponent,constructAndRenderComponentByID:i.constructAndRenderComponentByID,renderComponent:i.renderComponent,unmountAndReleaseReactRootNode:i.unmountAndReleaseReactRootNode,isValidComponent:o.isValidComponent};t.exports=s},{"./ReactCompositeComponent":2,"./ReactComponent":3,"./ReactDOM":4,"./ReactMount":5,"./ReactDefaultInjection":6}],2:[function(e,t){!function(){"use strict";function n(e,t){var n=e.prototype;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r],a=h[r];v.hasOwnProperty(r)&&u(a===d.OVERRIDE_BASE,"ReactCompositeComponentInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",r),null!=a&&u(!i||!i.__reactAutoBind,"ReactCompositeComponentInterface: You are attempting to use `React.autoBind` on `%s`, a method that is internal to React.Internal methods are called with the component as the context.",r),n.hasOwnProperty(r)&&u(a===d.DEFINE_MANY,"ReactCompositeComponentInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",r),f.hasOwnProperty(r)?f[r](e,i):i&&i.__reactAutoBind?(n.__reactAutoBindMap||(n.__reactAutoBindMap={}),n.__reactAutoBindMap[r]=i.__reactAutoBind):n[r]=n.hasOwnProperty(r)?o(n[r],i):i}}function o(e,t){return function(n,o,r,i,a,s){u("undefined"==typeof s,"Chained function can only take a maximum of 5 arguments."),e.call(this,n,o,r,i,a),t.call(this,n,o,r,i,a)}}var r=e("./ReactComponent"),i=e("./ReactCurrentOwner"),a=e("./ReactOwner"),s=e("./ReactPropTransferer"),u=e("./invariant"),c=e("./keyMirror"),l=e("./merge"),p=e("./mixInto"),d=c({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null}),h={mixins:d.DEFINE_MANY,props:d.DEFINE_ONCE,getInitialState:d.DEFINE_ONCE,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},f={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var o=0;o<t.length;o++)n(e,t[o])},props:function(e,t){e.propDeclarations=t}},m=c({MOUNTING:null,UNMOUNTING:null,RECEIVING_PROPS:null,RECEIVING_STATE:null}),v={construct:function(e,t){r.Mixin.construct.call(this,e,t),this.state=null,this._pendingState=null,this._compositeLifeCycleState=null},mountComponent:function(e,t){return r.Mixin.mountComponent.call(this,e,t),this._lifeCycleState=r.LifeCycle.UNMOUNTED,this._compositeLifeCycleState=m.MOUNTING,this.constructor.propDeclarations&&this._assertValidProps(this.props),this.__reactAutoBindMap&&this._bindAutoBindMethods(),this.state=this.getInitialState?this.getInitialState():null,this._pendingState=null,this.componentWillMount&&(this.componentWillMount(),this._pendingState&&(this.state=this._pendingState,this._pendingState=null)),this.componentDidMount&&t.getReactOnDOMReady().enqueue(this,this.componentDidMount),this._renderedComponent=this._renderValidatedComponent(),this._compositeLifeCycleState=null,this._lifeCycleState=r.LifeCycle.MOUNTED,this._renderedComponent.mountComponent(e,t)},unmountComponent:function(){this._compositeLifeCycleState=m.UNMOUNTING,this.componentWillUnmount&&this.componentWillUnmount(),this._compositeLifeCycleState=null,r.Mixin.unmountComponent.call(this),this._renderedComponent.unmountComponent(),this._renderedComponent=null,this.refs&&(this.refs=null)},receiveProps:function(e,t){this.constructor.propDeclarations&&this._assertValidProps(e),r.Mixin.receiveProps.call(this,e,t),this._compositeLifeCycleState=m.RECEIVING_PROPS,this.componentWillReceiveProps&&this.componentWillReceiveProps(e,t),this._compositeLifeCycleState=m.RECEIVING_STATE;var n=this._pendingState||this.state;this._pendingState=null,this._receivePropsAndState(e,n,t),this._compositeLifeCycleState=null},setState:function(e){this.replaceState(l(this._pendingState||this.state,e))},replaceState:function(e){var t=this._compositeLifeCycleState;if(u(this._lifeCycleState===r.LifeCycle.MOUNTED||t===m.MOUNTING,"replaceState(...): Can only update a mounted (or mounting) component."),u(t!==m.RECEIVING_STATE&&t!==m.UNMOUNTING,"replaceState(...): Cannot update while unmounting component or during an existing state transition (such as within `render`)."),this._pendingState=e,t!==m.MOUNTING&&t!==m.RECEIVING_PROPS){this._compositeLifeCycleState=m.RECEIVING_STATE;var n=this._pendingState;this._pendingState=null;var o=r.ReactReconcileTransaction.getPooled();o.perform(this._receivePropsAndState,this,this.props,n,o),r.ReactReconcileTransaction.release(o),this._compositeLifeCycleState=null}},_receivePropsAndState:function(e,t,n){!this.shouldComponentUpdate||this.shouldComponentUpdate(e,t)?this._performComponentUpdate(e,t,n):(this.props=e,this.state=t)},_performComponentUpdate:function(e,t,n){var o=this.props,r=this.state;this.componentWillUpdate&&this.componentWillUpdate(e,t,n),this.props=e,this.state=t,this.updateComponent(n),this.componentDidUpdate&&n.getReactOnDOMReady().enqueue(this,this.componentDidUpdate.bind(this,o,r))},updateComponent:function(e){var t=this._renderedComponent,n=this._renderValidatedComponent();if(t.constructor===n.constructor)n.props.isStatic||t.receiveProps(n.props,e);else{var o=this._rootNodeID,i=t._rootNodeID;t.unmountComponent();var a=n.mountComponent(o,e);r.DOMIDOperations.dangerouslyReplaceNodeWithMarkupByID(i,a),this._renderedComponent=n}},forceUpdate:function(){var e=r.ReactReconcileTransaction.getPooled();e.perform(this._performComponentUpdate,this,this.props,this.state,e),r.ReactReconcileTransaction.release(e)},_renderValidatedComponent:function(){i.current=this;var e=this.render();return i.current=null,u(r.isValidComponent(e),"%s.render(): A valid ReactComponent must be returned.",this.constructor.displayName||"ReactCompositeComponent"),e},_assertValidProps:function(e){var t=this.constructor.propDeclarations,n=this.constructor.displayName;for(var o in t){var r=t[o];r&&r(e,o,n)}},_bindAutoBindMethods:function(){for(var e in this.__reactAutoBindMap)if(this.__reactAutoBindMap.hasOwnProperty(e)){var t=this.__reactAutoBindMap[e];this[e]=this._bindAutoBindMethod(t)}},_bindAutoBindMethod:function(e){function t(t,i,a,s,c,l){return u("undefined"==typeof l,"React.autoBind(...): Methods can only take a maximum of 5 arguments."),n._lifeCycleState===r.LifeCycle.MOUNTED?e.call(n,t,i,a,s,c):(o||(o=!0),void 0)}var n=this,o=!1;return t}},g=function(){};p(g,r.Mixin),p(g,a.Mixin),p(g,s.Mixin),p(g,v);var y={LifeCycle:m,Base:g,createClass:function(e){var t=function(e,t){this.construct(e,t)};t.prototype=new g,t.prototype.constructor=t,n(t,e),u(t.prototype.render,"createClass(...): Class specification must implement a `render` method.");var o=function(e,n){return new t(e,n)};return o.componentConstructor=t,o.originalSpec=e,o},autoBind:function(e){function t(){u(!1,"React.autoBind(...): Attempted to invoke an auto-bound method that was not correctly defined on the class specification.")}return t.__reactAutoBind=e,t}};t.exports=y}()},{"./ReactComponent":3,"./ReactCurrentOwner":7,"./ReactOwner":8,"./ReactPropTransferer":9,"./invariant":10,"./keyMirror":11,"./merge":12,"./mixInto":13}],3:[function(e,t){"use strict";function n(e){console&&console.warn&&console.warn(e)}var o=e("./ExecutionEnvironment"),r=e("./ReactCurrentOwner"),i=e("./ReactDOMIDOperations"),a=e("./ReactMount"),s=e("./ReactOwner"),u=e("./ReactReconcileTransaction"),c=e("./invariant"),l=e("./keyMirror"),p=e("./merge"),d="{owner}",h=l({MOUNTED:null,UNMOUNTED:null}),f={isValidComponent:function(e){return!(!e||"function"!=typeof e.mountComponentIntoNode||"function"!=typeof e.receiveProps)},LifeCycle:h,DOMIDOperations:i,ReactReconcileTransaction:u,setDOMOperations:function(e){f.DOMIDOperations=e},setReactReconcileTransaction:function(e){f.ReactReconcileTransaction=e},Mixin:{getDOMNode:function(){c(o.canUseDOM,"getDOMNode(): The DOM is not supported in the current environment."),c(this._lifeCycleState===h.MOUNTED,"getDOMNode(): A component must be mounted to have a DOM node.");var e=this._rootNode;return e||(e=document.getElementById(this._rootNodeID),e||(e=a.findReactRenderedDOMNodeSlow(this._rootNodeID)),this._rootNode=e),e},setProps:function(e){this.replaceProps(p(this.props,e))},replaceProps:function(e){c(!this.props[d],"replaceProps(...): You called `setProps` or `replaceProps` on a component with an owner. 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.");var t=f.ReactReconcileTransaction.getPooled();t.perform(this.receiveProps,this,e,t),f.ReactReconcileTransaction.release(t)},construct:function(e,t){this.props=e||{},"undefined"!=typeof t&&(this.props.children=t),this.props[d]=r.current,this._lifeCycleState=h.UNMOUNTED},mountComponent:function(e){c(this._lifeCycleState===h.UNMOUNTED,"mountComponent(%s, ...): Can only mount an unmounted component.",e);var t=this.props;null!=t.ref&&s.addComponentAsRefTo(this,t.ref,t[d]),this._rootNodeID=e,this._lifeCycleState=h.MOUNTED},unmountComponent:function(){c(this._lifeCycleState===h.MOUNTED,"unmountComponent(): Can only unmount a mounted component.");var e=this.props;null!=e.ref&&s.removeComponentAsRefFrom(this,e.ref,e[d]),this._rootNode=null,this._rootNodeID=null,this._lifeCycleState=h.UNMOUNTED},receiveProps:function(e){c(this._lifeCycleState===h.MOUNTED,"receiveProps(...): Can only update a mounted component.");var t=this.props;(e[d]!==t[d]||e.ref!==t.ref)&&(null!=t.ref&&s.removeComponentAsRefFrom(this,t.ref,t[d]),null!=e.ref&&s.addComponentAsRefTo(this,e.ref,e[d]))},mountComponentIntoNode:function(e,t){var n=f.ReactReconcileTransaction.getPooled();n.perform(this._mountComponentIntoNode,this,e,t,n),f.ReactReconcileTransaction.release(n)},_mountComponentIntoNode:function(e,t,n){var o=Date.now(),r=this.mountComponent(e,n);a.totalInstantiationTime+=Date.now()-o;var i=Date.now(),s=t.parentNode;if(s){var u=t.nextSibling;s.removeChild(t),t.innerHTML=r,u?s.insertBefore(t,u):s.appendChild(t)}else t.innerHTML=r;a.totalInjectionTime+=Date.now()-i},unmountComponentFromNode:function(e){for(this.unmountComponent();e.lastChild;)e.removeChild(e.lastChild)},isOwnedBy:function(e){return this.props[d]===e}}};f.Mixin.update=function(e){n("this.update() is deprecated. Use this.setProps()"),this.setProps(e)},f.Mixin.updateAll=function(e){n("this.updateAll() is deprecated. Use this.replaceProps()"),this.replaceProps(e)},t.exports=f},{"./ExecutionEnvironment":14,"./ReactCurrentOwner":7,"./ReactDOMIDOperations":15,"./ReactMount":5,"./ReactOwner":8,"./ReactReconcileTransaction":16,"./invariant":10,"./keyMirror":11,"./merge":12}],4:[function(e,t){"use strict";function n(e,t){var n=function(e,t){this.construct(e,t)};return n.prototype=new o(e,t),n.prototype.constructor=n,function(e,t){return new n(e,t)}}var o=e("./ReactNativeComponent"),r=e("./mergeInto"),i=e("./objMapKeyVal"),a=i({a:!1,abbr:!1,address:!1,audio:!1,b:!1,body:!1,br:!0,button:!1,code:!1,col:!0,colgroup:!1,dd:!1,div:!1,section:!1,dl:!1,dt:!1,em:!1,embed:!0,fieldset:!1,footer:!1,form:!1,h1:!1,h2:!1,h3:!1,h4:!1,h5:!1,h6:!1,header:!1,hr:!0,i:!1,iframe:!1,img:!0,input:!0,label:!1,legend:!1,li:!1,line:!1,nav:!1,object:!1,ol:!1,optgroup:!1,option:!1,p:!1,param:!0,pre:!1,select:!1,small:!1,source:!1,span:!1,sub:!1,sup:!1,strong:!1,table:!1,tbody:!1,td:!1,textarea:!1,tfoot:!1,th:!1,thead:!1,time:!1,title:!1,tr:!1,u:!1,ul:!1,video:!1,wbr:!1,circle:!1,g:!1,path:!1,polyline:!1,rect:!1,svg:!1,text:!1},n),s={injectComponentClasses:function(e){r(a,e)}};a.injection=s,t.exports=a},{"./ReactNativeComponent":17,"./mergeInto":18,"./objMapKeyVal":19}],5:[function(e,t){!function(){"use strict";function n(e){return e.firstChild&&e.firstChild.id}var o=e("./ReactEvent"),r=e("./ReactInstanceHandles"),i=e("./ReactEventTopLevelCallback"),a=e("./$"),s=0,u={},c={},l={totalInstantiationTime:0,totalInjectionTime:0,useTouchEvents:!1,scrollMonitor:function(e,t){t()},prepareTopLevelEvents:function(e){o.ensureListening(l.useTouchEvents,e)},renderComponent:function(e,t){var o=u[n(t)];if(o){var r=e.props;return l.scrollMonitor(t,function(){o.replaceProps(r)}),o}l.prepareTopLevelEvents(i);var a=l.registerContainer(t);return u[a]=e,e.mountComponentIntoNode(a,t),e},createComponentRenderer:function(e){return function(t){return l.renderComponent(e,t)}},constructAndRenderComponent:function(e,t,n){return l.renderComponent(e(t),n)},constructAndRenderComponentByID:function(e,t,n){return l.constructAndRenderComponent(e,t,a(n))},registerContainer:function(e){var t=n(e);return t&&(t=r.getReactRootIDFromNodeID(t)),t||(t=r.getReactRootID(s++)),c[t]=e,t},unmountAndReleaseReactRootNode:function(e){var t=n(e),o=u[t];o.unmountComponentFromNode(e),delete u[t],delete c[t]},findReactContainerForID:function(e){var t=r.getReactRootIDFromNodeID(e);return c[t]},findReactRenderedDOMNodeSlow:function(e){var t=l.findReactContainerForID(e);return r.findComponentRoot(t,e)}};t.exports=l}()},{"./ReactEvent":20,"./ReactInstanceHandles":21,"./ReactEventTopLevelCallback":22,"./$":23}],6:[function(e,t){"use strict";function n(){s.injection.injectEventPluginOrder(i),s.injection.injectInstanceHandle(u),s.injection.injectEventPluginsByName({SimpleEventPlugin:c,EnterLeaveEventPlugin:a}),o.injection.injectComponentClasses({form:r})}var o=e("./ReactDOM"),r=e("./ReactDOMForm"),i=e("./DefaultEventPluginOrder"),a=e("./EnterLeaveEventPlugin"),s=e("./EventPluginHub"),u=e("./ReactInstanceHandles"),c=e("./SimpleEventPlugin");t.exports={inject:n}},{"./ReactDOM":4,"./ReactDOMForm":24,"./DefaultEventPluginOrder":25,"./EnterLeaveEventPlugin":26,"./EventPluginHub":27,"./ReactInstanceHandles":21,"./SimpleEventPlugin":28}],7:[function(e,t){"use strict";var n={current:null};t.exports=n},{}],10:[function(e,t){function n(e){if(!e)throw new Error("Invariant Violation")}t.exports=n},{}],13:[function(e,t){"use strict";var n=function(e,t){var n;for(n in t)t.hasOwnProperty(n)&&(e.prototype[n]=t[n])};t.exports=n},{}],14:[function(e,t){!function(){"use strict";var e="undefined"!=typeof window,n={canUseDOM:e,canUseWorkers:"undefined"!=typeof Worker,isInWorker:!e,global:new Function("return this;")()};t.exports=n}()},{}],19:[function(e,t){"use strict";function n(e,t,n){if(!e)return null;var o=0,r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=t.call(n,i,e[i],o++));return r}t.exports=n},{}],8:[function(e,t){"use strict";var n=e("./invariant"),o={isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,r){n(o.isValidOwner(r),"addComponentAsRefTo(...): Only a ReactOwner can have refs."),r.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,r){n(o.isValidOwner(r),"removeComponentAsRefFrom(...): Only a ReactOwner can have refs."),r.refs[t]===e&&r.detachRef(t)},Mixin:{attachRef:function(e,t){n(t.isOwnedBy(this),"attachRef(%s, ...): Only a component's owner can store a ref to it.",e);var o=this.refs||(this.refs={});o[e]=t},detachRef:function(e){delete this.refs[e]}}};t.exports=o},{"./invariant":10}],9:[function(e,t){"use strict";function n(e){return function(t,n,o){t[n]=t.hasOwnProperty(n)?e(t[n],o):o}}var o=e("./emptyFunction"),r=e("./joinClasses"),i=e("./merge"),a={ref:o,className:n(r),style:n(i)},s={TransferStrategies:a,Mixin:{transferPropsTo:function(e){var t={};for(var n in e.props)e.props.hasOwnProperty(n)&&(t[n]=e.props[n]);for(var o in this.props)if(this.props.hasOwnProperty(o)){var r=a[o];r?r(t,o,this.props[o]):t.hasOwnProperty(o)||(t[o]=this.props[o])}return e.props=t,e}}};t.exports=s},{"./emptyFunction":29,"./joinClasses":30,"./merge":12}],11:[function(e,t){"use strict";var n=e("./throwIf"),o="NOT_OBJECT_ERROR",r=function(e){var t,r={};n(!(e instanceof Object)||Array.isArray(e),o);for(t in e)e.hasOwnProperty(t)&&(r[t]=t);return r};t.exports=r},{"./throwIf":31}],12:[function(e,t){"use strict";var n=e("./mergeInto"),o=function(e,t){var o={};return n(o,e),n(o,t),o};t.exports=o},{"./mergeInto":18}],15:[function(e,t){!function(){"use strict";var n=e("./CSSPropertyOperations"),o=e("./DOMChildrenOperations"),r=e("./DOMPropertyOperations"),i=e("./ReactDOMNodeCache"),a=e("./getTextContentAccessor"),s=e("./invariant"),u={content:"`content` must be set using `updateTextContentByID()`.",dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},c=a()||"NA",l={updatePropertyByID:function(e,t,n){var o=i.getCachedNodeByID(e);s(!u.hasOwnProperty(t),"updatePropertyByID(...): %s",u[t]),r.setValueForProperty(o,t,n)},updatePropertiesByID:function(e,t){for(var n in t)t.hasOwnProperty(n)&&l.updatePropertiesByID(e,n,t[n])},updateStylesByID:function(e,t){var o=i.getCachedNodeByID(e);n.setValueForStyles(o,t)},updateInnerHTMLByID:function(e,t){var n=i.getCachedNodeByID(e);n.innerHTML=(t&&t.__html||"").replace(/^ /g,"&nbsp;")},updateTextContentByID:function(e,t){var n=i.getCachedNodeByID(e);n[c]=t},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=i.getCachedNodeByID(e);o.dangerouslyReplaceNodeWithMarkup(n,t),i.purgeEntireCache()},manageChildrenByParentID:function(e,t){var n=i.getCachedNodeByID(e);o.manageChildren(n,t),i.purgeEntireCache()},setTextNodeValueAtIndexByParentID:function(e,t,n){var r=i.getCachedNodeByID(e);o.setTextNodeValueAtIndex(r,t,n)}};t.exports=l}()},{"./CSSPropertyOperations":32,"./DOMChildrenOperations":33,"./DOMPropertyOperations":34,"./ReactDOMNodeCache":35,"./getTextContentAccessor":36,"./invariant":10}],16:[function(e,t){"use strict";function n(){this.reinitializeTransaction(),this.reactOnDOMReady=s.getPooled(null)}var o=e("./ExecutionEnvironment"),r=e("./PooledClass"),i=e("./ReactEvent"),a=e("./ReactInputSelection"),s=e("./ReactOnDOMReady"),u=e("./Transaction"),c=e("./mixInto"),l={initialize:a.getSelectionInformation,close:a.restoreSelection},p={initialize:function(){var e=i.isEnabled();return i.setEnabled(!1),e},close:function(e){i.setEnabled(e)}},d={initialize:function(){this.reactOnDOMReady.reset()},close:function(){this.reactOnDOMReady.notifyAll()}},h=[l,p,d],f={getTransactionWrappers:function(){return o.canUseDOM?h:[]},getReactOnDOMReady:function(){return this.reactOnDOMReady},destructor:function(){s.release(this.reactOnDOMReady),this.reactOnDOMReady=null}};c(n,u.Mixin),c(n,f),r.addPoolingTo(n),t.exports=n},{"./ExecutionEnvironment":14,"./PooledClass":37,"./ReactEvent":20,"./ReactInputSelection":38,"./ReactOnDOMReady":39,"./Transaction":40,"./mixInto":13}],17:[function(e,t){"use strict";function n(e){if(e){var t=null!=e.children?1:0,n=null!=e.content?1:0,o=null!=e.dangerouslySetInnerHTML?1:0;p(1>=t+n+o,"Can only set one of `children`, `props.content`, or `props.dangerouslySetInnerHTML`."),p(null==e.style||"object"==typeof e.style,"The `style` prop expects a mapping from style properties to values, not a string.")}}function o(e,t){this._tagOpen="<"+e+" ",this._tagClose=t?"":"</"+e+">",this.tagName=e.toUpperCase()}var r=e("./CSSPropertyOperations"),i=e("./DOMPropertyOperations"),a=e("./ReactComponent"),s=e("./ReactEvent"),u=e("./ReactMultiChild"),c=e("./escapeTextForBrowser"),l=e("./flattenChildren"),p=e("./invariant"),d=e("./keyOf"),h=e("./merge"),f=e("./mixInto"),m=s.putListener,v=s.registrationNames,g={string:!0,number:!0},y=d({content:null}),E=d({dangerouslySetInnerHTML:null}),C=d({style:null});o.Mixin={mountComponent:function(e,t){return a.Mixin.mountComponent.call(this,e,t),n(this.props),this._createOpenTagMarkup()+this._createContentMarkup(t)+this._tagClose},_createOpenTagMarkup:function(){var e=this.props,t=this._tagOpen;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];if(null!=o)if(v[n])m(this._rootNodeID,n,o);else{n===C&&(o&&(o=e.style=h(e.style)),o=r.createMarkupForStyles(o));var a=i.createMarkupForProperty(n,o);a&&(t+=" "+a)}}return t+' id="'+this._rootNodeID+'">'},_createContentMarkup:function(e){var t=this.props.dangerouslySetInnerHTML;if(null!=t){if(null!=t.__html)return t.__html}else{var n=null!=this.props.content?this.props.content:g[typeof this.props.children]?this.props.children:null,o=null!=n?null:this.props.children;if(null!=n)return c(n);if(null!=o)return this.mountMultiChild(l(o),e)}return""},receiveProps:function(e,t){p(this._rootNodeID,"Trying to control a native dom element without a backing id"),n(e),a.Mixin.receiveProps.call(this,e,t),this._updateDOMProperties(e),this._updateDOMChildren(e,t),this.props=e},_updateDOMProperties:function(e){var t=this.props;for(var n in e){var o=e[n],r=t[n];if(e.hasOwnProperty(n)&&o!==r)if(n===C){o&&(o=e.style=h(o));var i;for(var s in o)o.hasOwnProperty(s)&&(r&&r[s]===o[s]||(i||(i={}),i[s]=o[s]));i&&a.DOMIDOperations.updateStylesByID(this._rootNodeID,i)}else if(n===E){var u=r&&r.__html,c=o&&o.__html;u!==c&&a.DOMIDOperations.updateInnerHTMLByID(this._rootNodeID,o)}else n===y?a.DOMIDOperations.updateTextContentByID(this._rootNodeID,""+o):v[n]?m(this._rootNodeID,n,o):a.DOMIDOperations.updatePropertyByID(this._rootNodeID,n,o)}},_updateDOMChildren:function(e,t){var n=typeof this.props.content,o=null==this.props.content||"boolean"===n,r=typeof e.content,i=null==e.content||"boolean"===r,s=o?g[typeof this.props.children]?this.props.children:null:this.props.content,u=i?g[typeof e.children]?e.children:null:e.content,c=null!=s?null:this.props.children,p=null!=u?null:e.children;if(null!=u){var d=null!=c&&null==p;d&&this.updateMultiChild(null,t),s!==u&&a.DOMIDOperations.updateTextContentByID(this._rootNodeID,""+u)}else{var h=null!=s&&null==u;h&&a.DOMIDOperations.updateTextContentByID(this._rootNodeID,""),this.updateMultiChild(l(e.children),t)}},unmountComponent:function(){a.Mixin.unmountComponent.call(this),this.unmountMultiChild(),s.deleteAllListeners(this._rootNodeID)}},f(o,a.Mixin),f(o,o.Mixin),f(o,u.Mixin),t.exports=o},{"./CSSPropertyOperations":32,"./DOMPropertyOperations":34,"./ReactComponent":3,"./ReactEvent":20,"./ReactMultiChild":41,"./escapeTextForBrowser":42,"./flattenChildren":43,"./invariant":10,"./keyOf":44,"./merge":12,"./mixInto":13}],18:[function(e,t){"use strict";function n(e,t){if(r(e),null!=t){r(t);for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}}var o=e("./mergeHelpers"),r=o.checkMergeObjectArg;t.exports=n},{"./mergeHelpers":45}],20:[function(e,t){"use strict";function n(e,t,n){C(n,t,R.TopLevelCallbackCreator.createTopLevelCallback(e))}function o(e,t,n){D(n,t,R.TopLevelCallbackCreator.createTopLevelCallback(e))}function r(){C(window,"scroll",function(e){e.target===window&&p.refreshAuthoritativeScrollValues()})}function i(){C(window,"resize",function(e){e.target===window&&p.refreshAuthoritativeScrollValues()})}function a(e){v(!M,"listenAtTopLevel(...): Cannot setup top-level listener more than once.");var t=document;r(),i(),n(E.topMouseOver,"mouseover",t),n(E.topMouseDown,"mousedown",t),n(E.topMouseUp,"mouseup",t),n(E.topMouseMove,"mousemove",t),n(E.topMouseOut,"mouseout",t),n(E.topClick,"click",t),n(E.topDoubleClick,"dblclick",t),n(E.topMouseWheel,"mousewheel",t),e&&(n(E.topTouchStart,"touchstart",t),n(E.topTouchEnd,"touchend",t),n(E.topTouchMove,"touchmove",t),n(E.topTouchCancel,"touchcancel",t)),n(E.topKeyUp,"keyup",t),n(E.topKeyPress,"keypress",t),n(E.topKeyDown,"keydown",t),n(E.topChange,"change",t),n(E.topDOMCharacterDataModified,"DOMCharacterDataModified",t),n(E.topMouseWheel,"DOMMouseScroll",t),g("scroll",!0)?o(E.topScroll,"scroll",t):n(E.topScroll,"scroll",window),g("focus",!0)?(o(E.topFocus,"focus",t),o(E.topBlur,"blur",t)):g("focusin")&&(n(E.topFocus,"focusin",t),n(E.topBlur,"focusout",t))}function s(e,t,n,o){var r=h.extractAbstractEvents(e,t,n,o);h.enqueueAbstractEvents(r),h.processAbstractEventQueue()}function u(e){v(f.canUseDOM,"setEnabled(...): Cannot toggle event listening in a Worker thread. This is likely a bug in the framework. Please report immediately."),R.TopLevelCallbackCreator.setEnabled(e)}function c(){return R.TopLevelCallbackCreator.isEnabled()}function l(e,t){v(f.canUseDOM,"ensureListening(...): Cannot toggle event listening in a Worker thread. This is likely a bug in the framework. Please report immediately."),M||(R.TopLevelCallbackCreator=t,a(e),M=!0)}var p=e("./BrowserEnv"),d=e("./EventConstants"),h=e("./EventPluginHub"),f=e("./ExecutionEnvironment"),m=e("./NormalizedEventListener"),v=e("./invariant"),g=e("./isEventSupported"),y=h.registrationNames,E=d.topLevelTypes,C=m.listen,D=m.capture,M=!1,R={TopLevelCallbackCreator:null,handleTopLevel:s,setEnabled:u,isEnabled:c,ensureListening:l,registrationNames:y,putListener:h.putListener,getListener:h.getListener,deleteAllListeners:h.deleteAllListeners,trapBubbledEvent:n,trapCapturedEvent:o};t.exports=R},{"./BrowserEnv":46,"./EventConstants":47,"./EventPluginHub":27,"./ExecutionEnvironment":14,"./NormalizedEventListener":48,"./invariant":10,"./isEventSupported":49}],21:[function(e,t){"use strict";function n(e,t){return e.charAt(t)===c||t===e.length}function o(e){return""===e||e.charAt(0)===c&&e.charAt(e.length-1)!==c}function r(e){var t=s(e);return t&&t.charAt(0)===c}function i(e){return e?e.substr(0,e.lastIndexOf(c)):""}function a(e,t,n,o,r,a){e=e||"",t=t||"",u(e!==t,"traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.",e);var s=d.getFirstCommonAncestorID(e,t),c=s===t;u(c||s===e,"traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do not have a parent path.",e,t);for(var l=0,h=c?i:d.nextDescendantID,f=e;r&&f===e||a&&f===t||n(f,c,o),f!==t;f=h(f,t))u(l++<p,"traverseParentPath(%s, %s, ...): Detected an infinite loop while traversing the React DOM ID tree. This may be due to malformed IDs: %s",e,t)}var s=e("./getDOMNodeID"),u=e("./invariant"),c=".",l=c.length,p=100,d={separator:c,getFirstReactDOM:function(e){for(var t=e;t&&t.parentNode!==t;){if(r(t))return t;t=t.parentNode}return null},findComponentRoot:function(e,t){for(var n=e.firstChild;n;){if(t===n.id)return n;if(0===t.indexOf(n.id))return d.findComponentRoot(n,t);n=n.nextSibling}},getFirstCommonAncestorID:function(e,t){var r=Math.min(e.length,t.length);if(0===r)return"";for(var i=0,a=0;r>=a;a++)if(n(e,a)&&n(t,a))i=a;else if(e.charAt(a)!==t.charAt(a))break;var s=e.substr(0,i);return u(o(s),"getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s",e,t,s),s},getReactRootID:function(e){return".reactRoot["+e+"]"},getReactRootIDFromNodeID:function(e){var t=/\.reactRoot\[[^\]]+\]/.exec(e);return t&&t[0]},traverseEnterLeave:function(e,t,n,o,r){var i=d.getFirstCommonAncestorID(e,t);i!==e&&a(e,i,n,o,!1,!0),i!==t&&a(i,t,n,r,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(a("",e,t,n,!0,!1),a(e,"",t,n,!1,!0))},nextDescendantID:function(e,t){u(o(e)&&o(t),"nextDescendantID(%s, %s): Received an invalid React DOM ID.",e,t);var r=d.getFirstCommonAncestorID(e,t);if(u(r===e,"nextDescendantID(...): React has made an invalid assumption about the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.",e,t),e===t)return e;for(var i=e.length+l,a=i;a<t.length&&!n(t,a);a++);return t.substr(0,a)}};t.exports=d},{"./getDOMNodeID":50,"./invariant":10}],22:[function(e,t){!function(){"use strict";var n=e("./ExecutionEnvironment"),o=e("./ReactEvent"),r=e("./ReactInstanceHandles"),i=e("./getDOMNodeID"),a=!0,s={setEnabled:function(e){a=!!e},isEnabled:function(){return a},createTopLevelCallback:function(e){return function(t){if(a){var s=r.getFirstReactDOM(t.target)||n.global,u=i(s),c=t,l=s;o.handleTopLevel(e,c,u,l)}}}};t.exports=s}()},{"./ExecutionEnvironment":14,"./ReactEvent":20,"./ReactInstanceHandles":21,"./getDOMNodeID":50}],23:[function(e,t){function n(e){var t=o(e);if(!t)throw"undefined"==typeof e?e="undefined":null===e&&(e="null"),new Error('Tried to get element "'+e.toString()+'" but it is not present '+"on the page.");return t}var o=e("./ge");t.exports=n},{"./ge":51}],24:[function(e,t){"use strict";var n=e("./ReactCompositeComponent"),o=e("./ReactDOM"),r=e("./ReactEvent"),i=e("./EventConstants"),a=o.form,s=n.createClass({render:function(){return this.transferPropsTo(a(null,this.props.children))},componentDidMount:function(e){r.trapBubbledEvent(i.topLevelTypes.topSubmit,"submit",e)}});t.exports=s},{"./ReactCompositeComponent":2,"./ReactDOM":4,"./ReactEvent":20,"./EventConstants":47}],25:[function(e,t){"use strict";var n=e("./keyOf"),o=[n({ResponderEventPlugin:null}),n({SimpleEventPlugin:null}),n({TapEventPlugin:null}),n({EnterLeaveEventPlugin:null}),n({AnalyticsEventPlugin:null})];t.exports=o},{"./keyOf":44}],26:[function(e,t){!function(){"use strict";var n=e("./EventPropagators"),o=e("./ExecutionEnvironment"),r=e("./AbstractEvent"),i=e("./EventConstants"),a=e("./ReactInstanceHandles"),s=e("./getDOMNodeID"),u=e("./keyOf"),c=i.topLevelTypes,l=a.getFirstReactDOM,p={mouseEnter:{registrationName:u({onMouseEnter:null})},mouseLeave:{registrationName:u({onMouseLeave:null})}},d=function(e,t,i,a){if(e!==c.topMouseOver||!t.relatedTarget&&!t.fromElement){if(e!==c.topMouseOut&&e!==c.topMouseOver)return null;var u,d;if(e===c.topMouseOut?(u=l(t.relatedTarget||t.toElement)||o.global,d=a):(u=a,d=o.global),d!==u){var h=d?s(d):"",f=u?s(u):"",m=r.getPooled(p.mouseLeave,h,e,t),v=r.getPooled(p.mouseEnter,f,e,t);return n.accumulateEnterLeaveDispatches(m,v,h,f),[m,v]}}},h={abstractEventTypes:p,extractAbstractEvents:d};t.exports=h}()},{"./EventPropagators":52,"./ExecutionEnvironment":14,"./AbstractEvent":53,"./EventConstants":47,"./ReactInstanceHandles":21,"./getDOMNodeID":50,"./keyOf":44}],27:[function(e,t){!function(){"use strict";function n(e,t){var n,o=e.phasedRegistrationNames;if(o)for(n in o)o.hasOwnProperty(n)&&(g[o[n]]=t,y.push(o[n]));else e.registrationName&&(g[e.registrationName]=t,y.push(e.registrationName))}function o(e){if(e.type.registrationName)return g[e.type.registrationName];for(var t in e.type.phasedRegistrationNames)if(e.type.phasedRegistrationNames.hasOwnProperty(t)){var n=g[e.type.phasedRegistrationNames[t]];if(n)return n}return null}var r=e("./AbstractEvent"),i=e("./CallbackRegistry"),a=e("./EventPluginUtils"),s=e("./EventPropagators"),u=e("./ExecutionEnvironment"),c=e("./accumulate"),l=e("./forEachAccumulated"),p=e("./keyMirror"),d=e("./merge"),h=e("./throwIf"),f=i.deleteListener,m=p({DOUBLE_REGISTER:null,DOUBLE_ENQUEUE:null,DEPENDENCY_ERROR:null}),v={injectInstanceHandle:function(e){s.injection.injectInstanceHandle(e)},EventPluginOrder:null,injectEventPluginOrder:function(e){v.EventPluginOrder=e,v._recomputePluginsList()},plugins:[],injectEventPluginsByName:function(e){v.pluginsByName=d(v.pluginsByName,e),v._recomputePluginsList()},pluginsByName:{},_recomputePluginsList:function(){var e=function(e,t){var o=v.EventPluginOrder.indexOf(e);if(h(-1===o,m.DEPENDENCY_ERROR+e),!v.plugins[o]){v.plugins[o]=t;for(var r in t.abstractEventTypes){var i=t.abstractEventTypes[r];n(i,t)}}};if(v.EventPluginOrder){var t=v.pluginsByName;for(var o in t)e(o,t[o])}}},g={},y=[],E=[],C=function(e){var t;for(t=0;t<y.length;t++)f(e,y[t])},D=function(e,t,n,o){for(var r,i=v.plugins,a=i.length,s=0;a>s;s++){var u=i[s],l=u&&u.extractAbstractEvents(e,t,n,o); l&&(r=c(r,l))}return r},M=function(e){e&&(E=c(E,e))},R=function(e){if(e){var t=o(e),n=t&&t.executeDispatch;a.executeDispatchesInOrder(e,n||a.executeDispatch),r.release(e)}},I=function(){var e=E;E=null,l(e,R)},O={registrationNames:g,registrationNamesArr:y,putListener:i.putListener,getListener:i.getListener,deleteAllListeners:C,extractAbstractEvents:D,enqueueAbstractEvents:M,processAbstractEventQueue:I,injection:v};u.canUseDOM&&(window.EventPluginHub=O),t.exports=O}()},{"./AbstractEvent":53,"./CallbackRegistry":54,"./EventPluginUtils":55,"./EventPropagators":52,"./ExecutionEnvironment":14,"./accumulate":56,"./forEachAccumulated":57,"./keyMirror":11,"./merge":12,"./throwIf":31}],28:[function(e,t){"use strict";var n=e("./AbstractEvent"),o=e("./EventConstants"),r=e("./EventPropagators"),i=e("./keyOf"),a=o.topLevelTypes,s={abstractEventTypes:{mouseDown:{phasedRegistrationNames:{bubbled:i({onMouseDown:!0}),captured:i({onMouseDownCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:i({onMouseUp:!0}),captured:i({onMouseUpCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:i({onMouseMove:!0}),captured:i({onMouseMoveCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:i({onDoubleClick:!0}),captured:i({onDoubleClickCapture:!0})}},click:{phasedRegistrationNames:{bubbled:i({onClick:!0}),captured:i({onClickCapture:!0})}},mouseWheel:{phasedRegistrationNames:{bubbled:i({onMouseWheel:!0}),captured:i({onMouseWheelCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:i({onTouchStart:!0}),captured:i({onTouchStartCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:i({onTouchEnd:!0}),captured:i({onTouchEndCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:i({onTouchCancel:!0}),captured:i({onTouchCancelCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:i({onTouchMove:!0}),captured:i({onTouchMoveCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:i({onKeyUp:!0}),captured:i({onKeyUpCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:i({onKeyPress:!0}),captured:i({onKeyPressCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:i({onKeyDown:!0}),captured:i({onKeyDownCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:i({onFocus:!0}),captured:i({onFocusCapture:!0})}},blur:{phasedRegistrationNames:{bubbled:i({onBlur:!0}),captured:i({onBlurCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:i({onScroll:!0}),captured:i({onScrollCapture:!0})}},change:{phasedRegistrationNames:{bubbled:i({onChange:!0}),captured:i({onChangeCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:i({onSubmit:!0}),captured:i({onSubmitCapture:!0})}},DOMCharacterDataModified:{phasedRegistrationNames:{bubbled:i({onDOMCharacterDataModified:!0}),captured:i({onDOMCharacterDataModifiedCapture:!0})}}},executeDispatch:function(e,t,n){var o=t(e,n);o===!1&&(e.stopPropagation(),e.preventDefault())},extractAbstractEvents:function(e,t,o,i){var u,c=s.topLevelTypesToAbstract[e];if(!c)return null;switch(e){case a.topMouseWheel:u=n.normalizeMouseWheelData(t);break;case a.topScroll:u=n.normalizeScrollDataFromTarget(i);break;case a.topClick:case a.topDoubleClick:case a.topChange:case a.topDOMCharacterDataModified:case a.topMouseDown:case a.topMouseUp:case a.topMouseMove:case a.topTouchMove:case a.topTouchStart:case a.topTouchEnd:u=n.normalizePointerData(t);break;default:u=null}var l=n.getPooled(c,o,e,t,u);return r.accumulateTwoPhaseDispatches(l),l}};s.topLevelTypesToAbstract={topMouseDown:s.abstractEventTypes.mouseDown,topMouseUp:s.abstractEventTypes.mouseUp,topMouseMove:s.abstractEventTypes.mouseMove,topClick:s.abstractEventTypes.click,topDoubleClick:s.abstractEventTypes.doubleClick,topMouseWheel:s.abstractEventTypes.mouseWheel,topTouchStart:s.abstractEventTypes.touchStart,topTouchEnd:s.abstractEventTypes.touchEnd,topTouchMove:s.abstractEventTypes.touchMove,topTouchCancel:s.abstractEventTypes.touchCancel,topKeyUp:s.abstractEventTypes.keyUp,topKeyPress:s.abstractEventTypes.keyPress,topKeyDown:s.abstractEventTypes.keyDown,topFocus:s.abstractEventTypes.focus,topBlur:s.abstractEventTypes.blur,topScroll:s.abstractEventTypes.scroll,topChange:s.abstractEventTypes.change,topSubmit:s.abstractEventTypes.submit,topDOMCharacterDataModified:s.abstractEventTypes.DOMCharacterDataModified},t.exports=s},{"./AbstractEvent":53,"./EventConstants":47,"./EventPropagators":52,"./keyOf":44}],30:[function(e,t){"use strict";function n(e){e||(e="");var t,n=arguments.length;if(n>1)for(var o=1;n>o;o++)t=arguments[o],t&&(e+=" "+t);return e}t.exports=n},{}],31:[function(e,t){"use strict";var n=function(e,t){if(e)throw new Error(t)};t.exports=n},{}],37:[function(e,t){"use strict";var n=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},o=function(e,t){var n=this;if(n.instancePool.length){var o=n.instancePool.pop();return n.call(o,e,t),o}return new n(e,t)},r=function(e,t,n,o,r){var i=this;if(i.instancePool.length){var a=i.instancePool.pop();return i.call(a,e,t,n,o,r),a}return new i(e,t,n,o,r)},i=function(e){var t=this;e.destructor&&e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},a=10,s=n,u=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||s,n.poolSize||(n.poolSize=a),n.release=i,n},c={addPoolingTo:u,oneArgumentPooler:n,twoArgumentPooler:o,fiveArgumentPooler:r};t.exports=c},{}],38:[function(e,t){"use strict";function n(){try{return document.activeElement}catch(e){}}var o={hasSelectionCapabilities:function(e){return e&&("INPUT"===e.nodeName&&"text"===e.type||"TEXTAREA"===e.nodeName||"true"===e.contentEditable)},getSelectionInformation:function(){var e=n();return{focusedElem:e,selectionRange:o.hasSelectionCapabilities(e)?o.getSelection(e):null}},restoreSelection:function(e){var t=n(),r=e.focusedElem,i=e.selectionRange;t!==r&&document.getElementById(r.id)&&(o.hasSelectionCapabilities(r)&&o.setSelection(r,i),r.focus())},getSelection:function(e){var t;if("true"===e.contentEditable&&window.getSelection){t=window.getSelection().getRangeAt(0);var n=t.commonAncestorContainer;return n&&3===n.nodeType&&(n=n.parentNode),n!==e?{start:0,end:0}:{start:t.startOffset,end:t.endOffset}}if(!document.selection)return{start:e.selectionStart,end:e.selectionEnd};if(t=document.selection.createRange(),t.parentElement()!==e)return{start:0,end:0};var o=e.value.length;if("INPUT"===e.nodeName)return{start:-t.moveStart("character",-o),end:-t.moveEnd("character",-o)};var r=t.duplicate();r.moveToElementText(e),r.setEndPoint("StartToEnd",t);var i=o-r.text.length;return r.setEndPoint("StartToStart",t),{start:o-r.text.length,end:i}},setSelection:function(e,t){var n,o=t.start,r=t.end;if("undefined"==typeof r&&(r=o),document.selection){if("TEXTAREA"===e.tagName){var i=(e.value.slice(0,o).match(/\r/g)||[]).length,a=(e.value.slice(o,r).match(/\r/g)||[]).length;o-=i,r-=i+a}n=e.createTextRange(),n.collapse(!0),n.moveStart("character",o),n.moveEnd("character",r-o),n.select()}else if("true"===e.contentEditable){if(1===e.childNodes.length){n=document.createRange(),n.setStart(e.childNodes[0],o),n.setEnd(e.childNodes[0],r);var s=window.getSelection();s.removeAllRanges(),s.addRange(n)}}else e.selectionStart=o,e.selectionEnd=Math.min(r,e.value.length),e.focus()}};t.exports=o},{}],44:[function(e,t){var n=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};t.exports=n},{}],46:[function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,browserInfo:null,refreshAuthoritativeScrollValues:function(){n.currentScrollLeft=document.body.scrollLeft+document.documentElement.scrollLeft,n.currentScrollTop=document.body.scrollTop+document.documentElement.scrollTop}};t.exports=n},{}],50:[function(e,t){"use strict";function n(e){if(e.getAttributeNode){var t=e.getAttributeNode("id");return t&&t.value||""}return e.id||""}t.exports=n},{}],51:[function(e,t){function n(e,t,n){return"string"!=typeof e?e:t?o(e,t,n):document.getElementById(e)}function o(e,t,n){var i,a,s;if(r(t)==e)return t;if(t.getElementsByTagName){for(a=t.getElementsByTagName(n||"*"),s=0;s<a.length;s++)if(r(a[s])==e)return a[s]}else for(a=t.childNodes,s=0;s<a.length;s++)if(i=o(e,a[s]))return i;return null}function r(e){var t=e.getAttributeNode&&e.getAttributeNode("id");return t?t.value:null}t.exports=n},{}],54:[function(e,t){"use strict";var n={},o={putListener:function(e,t,o){var r=n[t]||(n[t]={});r[e]=o},getListener:function(e,t){var o=n[t];return o&&o[e]},deleteListener:function(e,t){var o=n[t];o&&delete o[e]},__purge:function(){n={}}};t.exports=o},{}],57:[function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};t.exports=n},{}],29:[function(e,t){function n(e){return function(){return e}}function o(){}var r=e("./copyProperties");r(o,{thatReturns:n,thatReturnsFalse:n(!1),thatReturnsTrue:n(!0),thatReturnsNull:n(null),thatReturnsThis:function(){return this},thatReturnsArgument:function(e){return e},mustImplement:function(){return function(){}}}),t.exports=o},{"./copyProperties":58}],32:[function(e,t){"use strict";var n=e("./dangerousStyleValue"),o=e("./escapeTextForBrowser"),r=e("./hyphenate"),i=e("./memoizeStringOnly"),a=i(function(e){return o(r(e))}),s={createMarkupForStyles:function(e){var t="";for(var o in e)if(e.hasOwnProperty(o)){var r=e[o];"undefined"!=typeof r&&(t+=a(o)+":",t+=n(o,r)+";")}return t},setValueForStyles:function(e,t){var o=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];o[r]=n(r,i)}}};t.exports=s},{"./dangerousStyleValue":59,"./escapeTextForBrowser":42,"./hyphenate":60,"./memoizeStringOnly":61}],33:[function(e,t){!function(){"use strict";var n=e("./Danger"),o=e("./insertNodeAt"),r=e("./keyOf");e("./throwIf");var i=r({moveFrom:null}),a=r({insertMarkup:null}),s=r({removeAt:null}),u=function(e,t){for(var n,o,r,a=0;a<t.length;a++)o=t[a],i in o?(n=n||[],r=o.moveFrom,n[r]=e.childNodes[r]):s in o&&(n=n||[],r=o.removeAt,n[r]=e.childNodes[r]);return n},c=function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o&&e.removeChild(t[n])}},l=function(e,t,r){for(var u,c,l,p=0;p<t.length;p++)if(l=t[p],i in l)u=r[l.moveFrom],c=l.finalIndex,o(e,u,c);else if(s in l);else if(a in l){c=l.finalIndex;var d=l.insertMarkup;n.dangerouslyInsertMarkupAt(e,d,c)}},p=function(e,t){var n=u(e,t);n&&c(e,n),l(e,t,n)},d=function(e,t,n){e.childNodes[t].nodeValue=n},h={dangerouslyReplaceNodeWithMarkup:n.dangerouslyReplaceNodeWithMarkup,manageChildren:p,setTextNodeValueAtIndex:d};t.exports=h}()},{"./Danger":62,"./insertNodeAt":63,"./keyOf":44,"./throwIf":31}],34:[function(e,t){"use strict";var n=e("./DOMProperty"),o=e("./escapeTextForBrowser"),r=e("./memoizeStringOnly"),i=r(function(e){return o(e)+'="'}),a={createMarkupForProperty:function(e,t){if(n.isStandardName[e]){if(null==t||n.hasBooleanValue[e]&&!t)return"";var r=n.getAttributeName[e];return i(r)+o(t)+'"'}return n.isCustomAttribute(e)?null==t?"":i(e)+o(t)+'"':null},setValueForProperty:function(e,t,o){if(n.isStandardName[t]){var r=n.getMutationMethod[t];if(r)r(e,o);else if(n.mustUseAttribute[t])n.hasBooleanValue[t]&&!o?e.removeAttribute(n.getAttributeName[t]):e.setAttribute(n.getAttributeName[t],o);else{var i=n.getPropertyName[t];n.hasSideEffects[t]&&e[i]===o||(e[i]=o)}}else n.isCustomAttribute(t)&&e.setAttribute(t,o)}};t.exports=a},{"./escapeTextForBrowser":42,"./DOMProperty":64,"./memoizeStringOnly":61}],35:[function(e,t){"use strict";var n=e("./ReactMount"),o={},r={purgeEntireCache:function(){return o={}},getCachedNodeByID:function(e){return o[e]||(o[e]=document.getElementById(e)||n.findReactRenderedDOMNodeSlow(e))}};t.exports=r},{"./ReactMount":5}],36:[function(e,t){"use strict";function n(){return!r&&o.canUseDOM&&(r="innerText"in document.createElement("div")?"innerText":"textContent"),r}var o=e("./ExecutionEnvironment"),r=null;t.exports=n},{"./ExecutionEnvironment":14}],39:[function(e,t){"use strict";function n(e){this._queue=e||null}var o=e("./PooledClass"),r=e("./mixInto");r(n,{enqueue:function(e,t){this._queue=this._queue||[],this._queue.push({component:e,callback:t})},notifyAll:function(){var e=this._queue;if(e){this._queue=null;for(var t=0,n=e.length;n>t;t++){var o=e[t].component,r=e[t].callback;r.call(o,o.getDOMNode())}e.length=0}},reset:function(){this._queue=null},destructor:function(){this.reset()}}),o.addPoolingTo(n),t.exports=n},{"./PooledClass":37,"./mixInto":13}],40:[function(e,t){!function(){"use strict";var n=e("./throwIf"),o="DUAL_TRANSACTION",r="MISSING_TRANSACTION",i={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this.timingMetrics||(this.timingMetrics={}),this.timingMetrics.methodInvocationTime=0,this.timingMetrics.wrapperInitTimes?this.timingMetrics.wrapperInitTimes.length=0:this.timingMetrics.wrapperInitTimes=[],this.timingMetrics.wrapperCloseTimes?this.timingMetrics.wrapperCloseTimes.length=0:this.timingMetrics.wrapperCloseTimes=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,t,r,i,a,s,u,c){n(this.isInTransaction(),o);var l,p=Date.now(),d=null;try{this.initializeAll(),l=e.call(t,r,i,a,s,u,c)}catch(h){d=h}finally{var f=Date.now();this.methodInvocationTime+=f-p;try{this.closeAll()}catch(m){d=d||m}}if(d)throw d;return l},initializeAll:function(){this._isInTransaction=!0;for(var e=this.transactionWrappers,t=this.timingMetrics.wrapperInitTimes,n=null,o=0;o<e.length;o++){var r=Date.now(),i=e[o];try{this.wrapperInitData[o]=i.initialize?i.initialize.call(this):null}catch(s){n=n||s,this.wrapperInitData[o]=a.OBSERVED_ERROR}finally{var u=t[o],c=Date.now();t[o]=(u||0)+(c-r)}}if(n)throw n},closeAll:function(){n(!this.isInTransaction(),r);for(var e=this.transactionWrappers,t=this.timingMetrics.wrapperCloseTimes,o=null,i=0;i<e.length;i++){var s=e[i],u=Date.now(),c=this.wrapperInitData[i];try{c!==a.OBSERVED_ERROR&&s.close&&s.close.call(this,c)}catch(l){o=o||l}finally{var p=Date.now(),d=t[i];t[i]=(d||0)+(p-u)}}if(this.wrapperInitData.length=0,this._isInTransaction=!1,o)throw o}},a={Mixin:i,OBSERVED_ERROR:{}};t.exports=a}()},{"./throwIf":31}],41:[function(e,t){!function(){"use strict";function n(e,t){return e&&t&&e.constructor===t.constructor}var o=e("./ReactComponent"),r={enqueueMarkupAt:function(e,t){this.domOperations=this.domOperations||[],this.domOperations.push({insertMarkup:e,finalIndex:t})},enqueueMove:function(e,t){this.domOperations=this.domOperations||[],this.domOperations.push({moveFrom:e,finalIndex:t})},enqueueUnmountChildByName:function(e,t){o.isValidComponent(t)&&(this.domOperations=this.domOperations||[],this.domOperations.push({removeAt:t._domIndex}),t.unmountComponent&&t.unmountComponent(),delete this._renderedChildren[e])},processChildDOMOperationsQueue:function(){this.domOperations&&(o.DOMIDOperations.manageChildrenByParentID(this._rootNodeID,this.domOperations),this.domOperations=null)},unmountMultiChild:function(){var e=this._renderedChildren;for(var t in e)if(e.hasOwnProperty(t)&&e[t]){var n=e[t];n.unmountComponent&&n.unmountComponent()}this._renderedChildren=null},mountMultiChild:function(e,t){var n="",o=0;for(var r in e){var i=e[r];e.hasOwnProperty(r)&&i&&(n+=i.mountComponent(this._rootNodeID+"."+r,t),i._domIndex=o,o++)}return this._renderedChildren=e,this.domOperations=null,n},updateMultiChild:function(e,t){if(e||this._renderedChildren){e&&!this._renderedChildren?this._renderedChildren={}:!e&&this._renderedChildren&&(e={});var o=this._rootNodeID+".",r=null,i=0,a=0,s=0;for(var u in e)if(e.hasOwnProperty(u)){var c=this._renderedChildren[u],l=e[u];if(n(c,l))r&&(this.enqueueMarkupAt(r,a-i),r=null),i=0,c._domIndex<s&&this.enqueueMove(c._domIndex,a),s=Math.max(c._domIndex,s),!l.props.isStatic&&c.receiveProps(l.props,t),c._domIndex=a;else if(c&&(this.enqueueUnmountChildByName(u,c),s=Math.max(c._domIndex,s)),l){this._renderedChildren[u]=l;var p=l.mountComponent(o+u,t);r=r?r+p:p,i++,l._domIndex=a}a=l?a+1:a}r&&this.enqueueMarkupAt(r,a-i);for(var d in this._renderedChildren)if(this._renderedChildren.hasOwnProperty(d)){var h=this._renderedChildren[d];h&&!e[d]&&this.enqueueUnmountChildByName(d,h)}this.processChildDOMOperationsQueue()}}},i={Mixin:r};t.exports=i}()},{"./ReactComponent":3}],42:[function(e,t){"use strict";function n(e){return o[e]}e("./throwIf");var o={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;","/":"&#x2f;"},r=function(e){var t=typeof e,o="object"===t;return""===e||o?"":"string"===t?e.replace(/[&><"'\/]/g,n):(""+e).replace(/[&><"'\/]/g,n)};t.exports=r},{"./throwIf":31}],43:[function(e,t){"use strict";function n(e){if(null===e||void 0===e)return e;var t={};return u(t,e,""),t}var o=e("./ReactTextComponent"),r=e("./escapeTextForBrowser"),i=e("./throwIf"),a="INVALID_CHILD",s="0",u=function(e,t,n){if(Array.isArray(t))for(var c=0;c<t.length;c++)u(e,t[c],n+"["+c+"]");else{var l=typeof t,p=""===n,d=p?s:n;if(null===t||void 0===t||"boolean"===l)e[d]=null;else if(t.mountComponentIntoNode)e[d]=t;else if("object"===l){i(t&&1===t.nodeType,a);for(var h in t)t.hasOwnProperty(h)&&u(e,t[h],n+"{"+r(h)+"}")}else"string"===l?e[d]=new o(t):"number"===l&&(e[d]=new o(""+t))}};t.exports=n},{"./ReactTextComponent":65,"./escapeTextForBrowser":42,"./throwIf":31}],45:[function(e,t){"use strict";var n=e("./keyMirror"),o=e("./throwIf"),r=36,i=n({MERGE_ARRAY_FAIL:null,MERGE_CORE_FAILURE:null,MERGE_TYPE_USAGE_FAILURE:null,MERGE_DEEP_MAX_LEVELS:null,MERGE_DEEP_NO_ARR_STRATEGY:null}),a=function(e){return"object"!=typeof e||null===e},s={MAX_MERGE_DEPTH:r,isTerminal:a,normalizeMergeArg:function(e){return void 0===e||null===e?{}:e},checkMergeArrayArgs:function(e,t){o(!Array.isArray(e)||!Array.isArray(t),i.MERGE_CORE_FAILURE)},checkMergeObjectArgs:function(e,t){s.checkMergeObjectArg(e),s.checkMergeObjectArg(t)},checkMergeObjectArg:function(e){o(a(e)||Array.isArray(e),i.MERGE_CORE_FAILURE)},checkMergeLevel:function(e){o(e>=r,i.MERGE_DEEP_MAX_LEVELS)},checkArrayStrategy:function(e){o(void 0!==e&&!(e in s.ArrayStrategies),i.MERGE_DEEP_NO_ARR_STRATEGY)},ArrayStrategies:n({Clobber:!0,IndexByIndex:!0}),ERRORS:i};t.exports=s},{"./keyMirror":11,"./throwIf":31}],47:[function(e,t){"use strict";var n=e("./keyMirror"),o=n({bubbled:null,captured:null}),r=n({topBlur:null,topChange:null,topClick:null,topDOMCharacterDataModified:null,topDoubleClick:null,topFocus:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topMouseWheel:null,topScroll:null,topSubmit:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null}),i={topLevelTypes:r,PropagationPhases:o};t.exports=i},{"./keyMirror":11}],48:[function(e,t){"use strict";function n(e){var t=e||window.event,n="target"in t,o=t.target||t.srcElement||window,r=3===o.nodeType?o.parentNode:o;return n&&t.target===r||(t=Object.create(t),t.target=r),t}function o(e){return function(t){e(n(t))}}var r=e("./EventListener"),i={listen:function(e,t,n){r.listen(e,t,o(n))},capture:function(e,t,n){r.capture(e,t,o(n))}};t.exports=i},{"./EventListener":66}],49:[function(e,t){"use strict";function n(e,t){if(!o||t&&!o.addEventListener)return!1;var n=document.createElement("div"),r="on"+e,i=r in n;return i||(n.setAttribute(r,""),i="function"==typeof n[r],"undefined"!=typeof n[r]&&(n[r]=void 0),n.removeAttribute(r)),n=null,i}var o,r=e("./ExecutionEnvironment");r.canUseDOM&&(o=document.createElement("div")),t.exports=n},{"./ExecutionEnvironment":14}],52:[function(e,t){"use strict";function n(e,t,n){var o=t.type.phasedRegistrationNames[n];return f(e,o)}function o(e,t,o){var r=t?m.bubbled:m.captured,i=n(e,o,r);i&&(o._dispatchListeners=d(o._dispatchListeners,i),o._dispatchIDs=d(o._dispatchIDs,e))}function r(e){e&&e.type.phasedRegistrationNames&&v.InstanceHandle.traverseTwoPhase(e.abstractTargetID,o,e)}function i(e,t,n){if(n&&n.type.registrationName){var o=f(e,n.type.registrationName);o&&(n._dispatchListeners=d(n._dispatchListeners,o),n._dispatchIDs=d(n._dispatchIDs,e))}}function a(e){e&&e.type.registrationName&&i(e.abstractTargetID,null,e)}function s(e){h(e,r)}function u(e,t,n,o){v.InstanceHandle.traverseEnterLeave(n,o,i,e,t)}function c(e){h(e,a)}var l=e("./CallbackRegistry"),p=e("./EventConstants"),d=e("./accumulate"),h=e("./forEachAccumulated"),f=l.getListener,m=p.PropagationPhases,v={InstanceHandle:null,injectInstanceHandle:function(e){v.InstanceHandle=e},validate:function(){var e=!v.InstanceHandle||!v.InstanceHandle.traverseTwoPhase||!v.InstanceHandle.traverseEnterLeave;if(e)throw new Error("InstanceHandle not injected before use!")}},g={accumulateTwoPhaseDispatches:s,accumulateDirectDispatches:c,accumulateEnterLeaveDispatches:u,injection:v};t.exports=g},{"./CallbackRegistry":54,"./EventConstants":47,"./accumulate":56,"./forEachAccumulated":57}],53:[function(e,t){"use strict";function n(e,t,n,o,r){this.type=e,this.abstractTargetID=t||"",this.originatingTopLevelEventType=n,this.nativeEvent=o,this.data=r,this.target=o&&o.target,this._dispatchListeners=null,this._dispatchIDs=null,this.isPropagationStopped=!1}var o=e("./BrowserEnv"),r=e("./PooledClass"),i=e("./TouchEventUtils");e("./throwIf");var a=20;n.poolSize=a,n.prototype.destructor=function(){this.target=null,this._dispatchListeners=null,this._dispatchIDs=null},r.addPoolingTo(n,r.fiveArgumentPooler),n.prototype.stopPropagation=function(){this.isPropagationStopped=!0,this.nativeEvent.stopPropagation&&this.nativeEvent.stopPropagation(),this.nativeEvent.cancelBubble=!0},n.prototype.preventDefault=function(){n.preventDefaultOnNativeEvent(this.nativeEvent)},n.preventDefaultOnNativeEvent=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},n.normalizeScrollDataFromTarget=function(e){return{scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,clientWidth:e.clientWidth,clientHeight:e.clientHeight,scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth}},n.normalizeMouseWheelData=function(e){var t=0,n=0,o=0;return e.wheelDelta&&(t=e.wheelDelta/120),e.detail&&(t=-e.detail/3),o=t,void 0!==e.axis&&e.axis===e.HORIZONTAL_AXIS&&(o=0,n=-t),void 0!==e.wheelDeltaY&&(o=e.wheelDeltaY/120),void 0!==e.wheelDeltaX&&(n=-e.wheelDeltaX/120),{delta:t,deltaX:n,deltaY:o}},n.isNativeClickEventRightClick=function(e){return e.which?3===e.which:e.button?2===e.button:!1},n.normalizePointerData=function(e){return{globalX:n.eventPageX(e),globalY:n.eventPageY(e),rightMouseButton:n.isNativeClickEventRightClick(e)}},n.normalizeDragEventData=function(e,t,n,o,r){return{globalX:t,globalY:n,startX:o,startY:r}},n.eventPageY=function(e){var t=i.extractSingleTouch(e);return t?t.pageY:"undefined"!=typeof e.pageY?e.pageY:e.clientY+o.currentPageScrollTop},n.eventPageX=function(e){var t=i.extractSingleTouch(e);return t?t.pageX:"undefined"!=typeof e.pageX?e.pageX:e.clientX+o.currentPageScrollLeft},n.persistentCloneOf=function(e){return new n(e.type,e.abstractTargetID,e.originatingTopLevelEventType,e.nativeEvent,e.data,e.target)},t.exports=n},{"./BrowserEnv":46,"./PooledClass":37,"./TouchEventUtils":67,"./throwIf":31}],55:[function(e,t){"use strict";function n(e){return e===v.topMouseUp||e===v.topTouchEnd||e===v.topTouchCancel}function o(e){return e===v.topMouseMove||e===v.topTouchMove}function r(e){return e===v.topMouseDown||e===v.topTouchStart}function i(e,t){var n=f.eventPageX(t),o=f.eventPageY(t);e.pageX=n,e.pageY=o}function a(e,t){var n=f.eventPageX(t),o=f.eventPageY(t);return Math.pow(Math.pow(n-e.pageX,2)+Math.pow(o-e.pageY,2),.5)}function s(e,t){var n=e._dispatchListeners,o=e._dispatchIDs;if(Array.isArray(n)){var r;for(r=0;r<n.length&&!e.isPropagationStopped;r++)t(e,n[r],o[r])}else n&&t(e,n,o)}function u(e,t,n){t(e,n)}function c(e,t){s(e,t),e._dispatchListeners=null,e._dispatchIDs=null}function l(e){var t=e._dispatchListeners,n=e._dispatchIDs;if(Array.isArray(t)){var o;for(o=0;o<t.length&&!e.isPropagationStopped;o++)if(t[o](e,n[o]))return n[o]}else if(t&&t(e,n))return n;return null}function p(e){var t=e._dispatchListeners,n=e._dispatchIDs;m(!Array.isArray(t),"executeDirectDispatch(...): Invalid `abstractEvent`.");var o=t?t(e,n):null;return e._dispatchListeners=null,e._dispatchIDs=null,o}function d(e){return!!e._dispatchListeners}var h=e("./EventConstants"),f=e("./AbstractEvent"),m=e("./invariant"),v=h.topLevelTypes,g={isEndish:n,isMoveish:o,isStartish:r,storePageCoordsIn:i,eventDistance:a,executeDispatchesInOrder:c,executeDispatchesInOrderStopAtTrue:l,executeDirectDispatch:p,hasDispatches:d,executeDispatch:u};t.exports=g},{"./EventConstants":47,"./AbstractEvent":53,"./invariant":10}],56:[function(e,t){"use strict";function n(e,t){var n=null==e,o=null===t;if(o)return e;if(n)return t;var r=Array.isArray(e),i=Array.isArray(t);return r?e.concat(t):i?[e].concat(t):[e,t]}e("./throwIf"),t.exports=n},{"./throwIf":31}],58:[function(e,t){function n(e,t,n,o,r,i){e=e||{};for(var a,s=[t,n,o,r,i],u=0;s[u];){a=s[u++];for(var c in a)e[c]=a[c];a.hasOwnProperty&&a.hasOwnProperty("toString")&&"undefined"!=typeof a.toString&&e.toString!==a.toString&&(e.toString=a.toString)}return e}t.exports=n},{}],60:[function(e,t){function n(e){return e.replace(o,"-$1").toLowerCase()}var o=/([A-Z])/g;t.exports=n},{}],61:[function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)?t[n]:t[n]=e.call(this,n)}}t.exports=n},{}],63:[function(e,t){"use strict";function n(e,t,n){var o=e.childNodes,r=e.childNodes[n];return r===t?t:(t.parentNode&&t.parentNode.removeChild(t),n>=o.length?e.appendChild(t):e.insertBefore(t,o[n]),t)}t.exports=n},{}],66:[function(e,t){var n={listen:function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,n)},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),void 0):(console.error("You are attempting to use addEventlistener in a browser that does not support it support it.This likely means that you will not receive events that your application relies on (such as scroll)."),void 0)}};t.exports=n},{}],67:[function(e,t){var n={extractSingleTouch:function(e){var t=e.touches,n=e.changedTouches,o=t&&t.length>0,r=n&&n.length>0;return!o&&r?n[0]:o?t[0]:e}};t.exports=n},{}],59:[function(e,t){"use strict";function n(e,t){return null===t||t===!1||t===!0||""===t?"":isNaN(t)?t?""+t:"":o.isNumber[e]?""+t:t+"px"}var o=e("./CSSProperty");t.exports=n},{"./CSSProperty":68}],62:[function(e,t){"use strict";function n(e){var t=e.tagName;return s[t]||(s[t]=document.createElement(t))}function o(e,t,n){return n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.insertBefore(t,e.firstChild)}function r(e,t,n){for(var r,i=t.length,a=0;i>a;a++)r=o(e,t[0],r||n)}function i(e,t,o){var i=n(e);i.innerHTML=t;var a=i.childNodes,s=o?e.childNodes[o-1]:null;r(e,a,s)}function a(e,t){var o=e.parentNode,r=n(o);r.innerHTML=t;var i=r.childNodes;o.replaceChild(i[0],e)}e("./ExecutionEnvironment"),e("./throwIf");var s={},u={dangerouslyInsertMarkupAt:i,dangerouslyReplaceNodeWithMarkup:a};t.exports=u},{"./ExecutionEnvironment":14,"./throwIf":31}],64:[function(e,t){"use strict";var n=e("./invariant"),o={isStandardName:{},getAttributeName:{},getPropertyName:{},getMutationMethod:{},mustUseAttribute:{},mustUseProperty:{},hasBooleanValue:{},hasSideEffects:{},isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/)},r=1,i=2,a=4,s=8,u={accept:null,action:null,ajaxify:r,allowFullScreen:r|a,alt:null,autoComplete:null,autoplay:a,cellPadding:null,cellSpacing:null,checked:i|a,className:i,colSpan:null,contentEditable:null,controls:i|a,data:null,dir:null,disabled:i|a,enctype:null,height:null,href:null,htmlFor:null,method:null,multiple:i|a,name:null,poster:null,preload:null,placeholder:null,rel:null,required:a,role:r,scrollLeft:i,scrollTop:i,selected:i|a,spellCheck:null,src:null,style:null,tabIndex:null,target:null,title:null,type:null,value:i|s,width:null,wmode:r,cx:i,cy:i,d:i,fill:i,fx:i,fy:i,points:i,r:i,stroke:i,strokeLinecap:i,strokeWidth:i,transform:i,x:i,x1:i,x2:i,version:i,viewBox:i,y:i,y1:i,y2:i,spreadMethod:i,offset:i,stopColor:i,stopOpacity:i,gradientUnits:i,gradientTransform:i},c={className:"class",htmlFor:"for",strokeLinecap:"stroke-linecap",strokeWidth:"stroke-width",stopColor:"stop-color",stopOpacity:"stop-opacity"},l={autoComplete:"autocomplete",spellCheck:"spellcheck"},p={className:function(e,t){e.className=t||""}};for(var d in u){o.isStandardName[d]=!0,o.getAttributeName[d]=c[d]||d.toLowerCase(),o.getPropertyName[d]=l[d]||d;var h=p[d];h&&(o.getMutationMethod[d]=h);var f=u[d];o.mustUseAttribute[d]=f&r,o.mustUseProperty[d]=f&i,o.hasBooleanValue[d]=f&a,o.hasSideEffects[d]=f&s,n(!o.mustUseAttribute[d]||!o.mustUseProperty[d],"DOMProperty: Cannot use require using both attribute and property: %s",d),n(o.mustUseProperty[d]||!o.hasSideEffects[d],"DOMProperty: Properties that have side effects must use property: %s",d)}t.exports=o},{"./invariant":10}],65:[function(e,t){"use strict";var n=e("./ReactComponent"),o=e("./escapeTextForBrowser"),r=e("./mixInto"),i=function(e){this.construct({text:e})};r(i,n.Mixin),r(i,{mountComponent:function(e){return n.Mixin.mountComponent.call(this,e),'<span id="'+e+'">'+o(this.props.text)+"</span>"},receiveProps:function(e){e.text!==this.props.text&&(this.props.text=e.text,n.DOMIDOperations.updateTextContentByID(this._rootNodeID,e.text))}}),t.exports=i},{"./ReactComponent":3,"./escapeTextForBrowser":42,"./mixInto":13}],68:[function(e,t){"use strict";var n={fillOpacity:!0,fontWeight:!0,opacity:!0,orphans:!0,textDecoration:!0,zIndex:!0,zoom:!0},o={isNumber:n};t.exports=o},{}]},{},[1])(1)});
packages/material-ui-icons/src/FlipToFront.js
cherniavskii/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <g><path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm2 4v-2H3c0 1.1.89 2 2 2zM3 9h2V7H3v2zm12 12h2v-2h-2v2zm4-18H9c-1.11 0-2 .9-2 2v10c0 1.1.89 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 12H9V5h10v10zm-8 6h2v-2h-2v2zm-4 0h2v-2H7v2z" /></g> , 'FlipToFront');
app/App.js
ByunJaeSeok/selfStudy
import React from 'react'; // import Contacts from './Contacts'; class App extends React.Component { constructor(props) { super(props); this.state = { name: '', }; } render() { return ( <div> <button onClick={() => { this.setState({ name: 'test' }); }}>click</button> <h1>Hello! {this.state.name}</h1> </div> ); } } export default App;
src/components/phone/Vehicle.js
kairatz/resource-frontend-server
import React from 'react' import moment from 'moment' import { getValue } from './forms' import VehicleForm from './forms/vehicle' const getBody = (vehicle, onFieldSave) => { if(!vehicle.editing){ return ( <div className="panel-body"> <div> <small>VIN:</small> <span>{ getValue(vehicle.vin) }</span> </div> <div> <small>Номер двигателя:</small> <span>{ getValue(vehicle.engine_number) }</span> </div> <div> <small>Год:</small> <span>{ getValue(vehicle.year) }</span> </div> <div> <small>Объем двигателя:</small> <span>{ getValue(vehicle.engine_volume) }</span> </div> <div> <small>Производитель:</small> <span>{ getValue(vehicle.manufacture) }</span> </div> <div> <small>Модель:</small> <span>{ getValue(vehicle.model) }</span> </div> <div> <small>Тип:</small> <span>{ getValue(vehicle.model_type) }</span> </div> <div> <small>Возраст:</small> <span>{ getValue(vehicle.age) }</span> </div> <div> <small>Регион:</small> <span>{ getValue(vehicle.region) }</span> </div> <div> <small>Номер:</small> <span>{ getValue(vehicle.reg_number) }</span> </div> <div> <small>Пробег:</small> <span>{ getValue(vehicle.mileage) }</span> </div> </div> ) } else{ return ( <VehicleForm onSubmit={onFieldSave}/> ) } } const Vehicle = ({ vehicle, index, formSubmitButton, onFieldEdit, onFieldSave, onFieldToggle }) => { if(vehicle.is_hidden) return ( <div className="col-md-12"> <div className="panel panel-primary driver-info"> <div className="panel-heading"> <a style={{cursor : 'pointer', color : '#FFF'}} onClick={() => onFieldToggle('vehicles', index)}>Восстановить</a> </div> </div> </div> ) return ( <div className="col-md-12"> <div className="panel panel-primary driver-info"> <div className="panel-heading"> <div className="row"> <div className="col-md-8"> <h5><i className="glyphicon glyphicon-road"></i> {vehicle.manufacture} {vehicle.model}. {vehicle.reg_number}</h5> </div> <div className="col-md-4 text-right"> <div className="btn-group"> { !vehicle.editing ? (<button className="btn btn-warning" onClick={() => onFieldEdit('vehicles', vehicle, index)}><i className="glyphicon glyphicon-pencil"></i></button>) : (<button className="btn btn-success" onClick={() => formSubmitButton('vehicleForm')}><i className="glyphicon glyphicon-ok"></i></button>) } {/*<button className="btn btn-danger" onClick={() => onFieldToggle('vehicles', index)}><i className="glyphicon glyphicon-remove"></i></button>*/} </div> </div> </div> </div> { getBody(vehicle, onFieldSave) } </div> </div> ) } export default Vehicle
src/index.js
kevinsangnguyen/WeatherAPIReactRedux
import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import { createStore, applyMiddleware } from 'redux'; import ReduxPromise from 'redux-promise'; import App from './components/app'; import reducers from './reducers'; const createStoreWithMiddleware = applyMiddleware(ReduxPromise)(createStore); ReactDOM.render( <Provider store={createStoreWithMiddleware(reducers)}> <App /> </Provider> , document.querySelector('.container'));
src/index.js
hajush/some-things
import 'bootstrap/dist/css/bootstrap.css'; import React from 'react'; import ReactDOM from 'react-dom'; import App from './components/App'; ReactDOM.render(<App/>, document.getElementById('app'));
src/App.js
wescleymatos/iRango
import React, { Component } from 'react'; import { BrowserRouter as Router, Route } from 'react-router-dom'; import Home from './components/Home'; import Restaurantes from './components/Restaurantes'; import Sobre from './components/Sobre'; import Login from './components/Login'; import NovoRestaurante from './components/NovoRestaurante'; import CriarUsuario from './components/CriarUsuario'; class App extends Component { render() { return ( <Router> <div> <Route exact path="/" component={ Home } /> <Route exact path="/restaurantes" component={ Restaurantes } /> <Route exact path="/sobre" component={ Sobre } /> <Route exact path="/login" component={ Login } /> <Route exact path="/add-restaurante" component={ NovoRestaurante } /> <Route exact path="/add-usuario" component={ CriarUsuario } /> </div> </Router> ); } } export default App;
client/components/App.js
TobiahRex/reactTravelApp
import React, { Component } from 'react'; // import $ from 'jquery'; import Splash from './Splash.js'; import Who from './Who.js'; import When from './When.js'; import Where from './Where.js'; import Questionnaire from './Questionnaire.js'; export default class App extends Component { constructor(props){ super(props); this.state = { location: '' } this._setLocation = this._setLocation.bind(this); } _setLocation(){ let location = this.props.location.hash; this.setState({ location }); } componentDidMount() { $('#fullpage').fullpage({ anchors: ['splash', 'questionnaire'], sectionsColor: ['#121b3e'], css3: true, scrollingSpeed: 1000, afterSlideLoad: this._setLocation, }) } render() { return ( <div id='fullpage'> <Splash></Splash> <Questionnaire></Questionnaire> </div> ) } }
src/common/ResourceIcon.js
hasseboulen/WoWAnalyzer
import React from 'react'; import PropTypes from 'prop-types'; import RESOURCE_TYPES from './RESOURCE_TYPES'; import ResourceLink from './ResourceLink'; import Icon from './Icon'; const ResourceIcon = ({ id, noLink, ...others }) => { if (process.env.NODE_ENV === 'development' && !RESOURCE_TYPES[id]) { throw new Error(`Unknown spell: ${id}`); } const spell = RESOURCE_TYPES[id] || { name: 'Spell not recognized', icon: 'inv_misc_questionmark', }; const icon = ( <Icon icon={spell.icon} alt={spell.name} {...others} /> ); if (noLink) { return icon; } return ( <ResourceLink id={id}> {icon} </ResourceLink> ); }; ResourceIcon.propTypes = { id: PropTypes.number.isRequired, noLink: PropTypes.bool, }; export default ResourceIcon;
src/components/NotificationBar.js
OpenCollective/frontend
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; const logo = '/static/images/opencollective-icon.svg'; class NotificationBar extends React.Component { static propTypes = { status: PropTypes.string, title: PropTypes.string, description: PropTypes.string, error: PropTypes.string, actions: PropTypes.arrayOf(PropTypes.node), }; render() { const { status, error, title, description, actions } = this.props; return ( <div className={classNames(status, 'NotificationBar')}> <style jsx> {` .oc-message { position: fixed; top: -70px; transition: top 1s cubic-bezier(0.45, 0, 1, 1); left: 0; height: 60px; background: white; box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.5); width: 100%; z-index: 1000; } .oc-message .logo { margin: 10px; } .error .oc-message { position: fixed; top: 0; } .loading .oc-progress-bar { position: fixed; bottom: 0; top: auto; } .oc-progress-bar { position: relative; width: 100%; } .oc-bar { display: none; background-size: 23em 0.25em; height: 4px; width: 100%; position: relative; background-color: #3385ff; } .loading .oc-bar { display: block; animation: oc-cssload-width 3.45s cubic-bezier(0.45, 0, 1, 1) infinite; } .error .oc-message { display: flex; align-items: center; } .error .oc-message p { margin: 0; } @keyframes oc-cssload-width { 0%, 100% { transition-timing-function: cubic-bezier(1, 0, 0.65, 0.85); } 0% { width: 0; } 100% { width: 100%; } } .NotificationLine { background: rgba(10, 200, 10, 0.9); padding: 1rem; color: white; display: flex; align-items: center; flex-direction: column; } .NotificationLine h1 { font-size: 1.8rem; margin: 1rem; } .NotificationLine p.description { max-width: 60rem; text-align: center; } .actions { display: flex; } .actions > div { margin: 0.5rem; } `} </style> <div className="oc-message"> <img src={logo} width="40" height="40" className="logo" alt="Open Collective logo" /> {error && <p>{error}</p>} </div> {title && ( <div className="NotificationLine"> <h1>{title}</h1> <p className="description">{description}</p> {actions && ( <div className="actions"> {actions.map(action => ( <div key={action.key}>{action}</div> ))} </div> )} </div> )} <div className="oc-progress-bar"> <div className="oc-bar" /> </div> </div> ); } } export default NotificationBar;
src/Button.js
rlugojr/styleguide
const React = require('react'); const classNames = require('classnames'); const Icon = require('./Icon'); const STYLES = require('./STYLES'); const SIZES = require('./SIZES'); const warning = require('./utils/warning'); const BUTTONS_STYLES = STYLES.concat([ 'link', 'marketing-primary', 'secondary', 'count' ]); const Button = React.createClass({ propTypes: { className: React.PropTypes.string, children: React.PropTypes.node, type: React.PropTypes.string, size: React.PropTypes.oneOf(SIZES), style: React.PropTypes.oneOf(BUTTONS_STYLES), // Makes a link button href: React.PropTypes.string, // Form button value: React.PropTypes.oneOfType([ React.PropTypes.string, React.PropTypes.bool, React.PropTypes.number ]), name: React.PropTypes.string, // For links target: React.PropTypes.string, filled: React.PropTypes.bool, noBorder: React.PropTypes.bool, disabled: React.PropTypes.bool, active: React.PropTypes.bool, block: React.PropTypes.bool, dropdownToggle: React.PropTypes.bool, onClick: React.PropTypes.func, title: React.PropTypes.string, icon: React.PropTypes.string }, getInitialState() { return { clicked: false }; }, getDefaultProps() { return { style: 'default', size: 'md', type: 'button', filled: false, disabled: false, active: false }; }, onClick(e) { // Prevent any action if button is disabled const { disabled } = this.props; if (disabled) { e.preventDefault(); return; } const { clicked } = this.state; if (this.props.onClick && !clicked) { this.props.onClick(e); } if (!this.isFormButton()) { return; } else if (clicked) { return this.setState({ clicked: false }); } // Add this submitting button's value to the form as hidden // input. Only after that do the click. // This fixes issues with PJAX[1] in Firefox[2] // [1]: https://github.com/defunkt/jquery-pjax/pull/295 // [2]: http://stackoverflow.com/questions/38277900/formdata-object-does-not-add-submit-type-inputs-from-form-while-on-firefox e.preventDefault(); this.setState({ clicked: true }, () => { this.refs.button.click(); }); }, isFormButton() { const { type, name } = this.props; return type === 'submit' && name; }, render() { const { clicked } = this.state; const { title, icon, filled, block, noBorder, active, dropdownToggle, style, size, className, children, name, value, disabled, ...props } = this.props; const inner = icon ? <Icon className={icon} /> : ''; if (icon) { warning('Prop "icon" on Button is deprecated, use <Icon /> as children instead'); } props.className = classNames( 'btn', 'btn-' + style, 'btn-' + size, className, { 'btn-fill': filled, 'btn-block': block, 'btn-noborder': noBorder, active, disabled, 'dropdown-toggle': dropdownToggle, 'tooltipped': Boolean(title) } ); props['aria-label'] = title; props.role = 'button'; props.disabled = disabled; props.onClick = this.onClick; // Update href if button is disabled if (props.href) { props.href = disabled ? '#' : props.href; } let input; if (clicked && this.isFormButton()) { input = <input type="hidden" name={name} value={value} />; } if (props.href) { delete props.type; return <a {...props}>{inner} {children}</a>; } else { return <button ref="button" {...props}>{inner} {children}{input}</button>; } } }); const ButtonGroup = React.createClass({ propTypes: { className: React.PropTypes.string, children: React.PropTypes.node, pull: React.PropTypes.string, block: React.PropTypes.bool }, render() { let { className, pull, children, block, ...props } = this.props; className = classNames( 'btn-group', className, pull ? 'pull-' + pull : '', { 'btn-group-block': block } ); return <div className={className} {...props}>{children}</div>; } }); const ButtonToolbar = React.createClass({ propTypes: { className: React.PropTypes.string, children: React.PropTypes.node }, render() { const { className, children, ...props } = this.props; return <div className={'btn-toolbar ' + (className || '')} {...props}>{children}</div>; } }); const ButtonCaret = React.createClass({ render() { return <span className="caret" />; } }); const ButtonTextExpander = React.createClass({ propTypes: { onClick: React.PropTypes.func }, onClick(e) { if (this.props.onClick) { this.props.onClick(); } }, render() { return ( <span className="hidden-text-expander"> <button type="button" className="ellipsis-expander" onClick={this.onClick}>&hellip;</button> </span> ); } }); module.exports = Button; module.exports.Group = ButtonGroup; module.exports.Toolbar = ButtonToolbar; module.exports.Caret = ButtonCaret; module.exports.TextExpander = ButtonTextExpander; module.exports.STYLES = BUTTONS_STYLES;
src/components/fieldComponents/EntityContainer.js
gearz-lab/react-metaform
import React from 'react'; import metadataProvider from '../../lib/metadataProvider.js'; import MetaFormGroup from '../groupComponents/MetaFormGroup.js'; import Glyphicon from 'react-bootstrap/lib/Glyphicon.js'; import _ from 'underscore'; const EntityContainer = React.createClass({ propTypes: { name: React.PropTypes.string.isRequired, componentFactory: React.PropTypes.object.isRequired }, render: function () { var header = this.props.displayName ? <header className="metaform-group-header no-lateral-margin"> <span className="metaform-group-title"> {this.props.displayName} </span> </header> : null; return <div className="entity-container"> {header} <div className="entity-container-content"> { this.props.componentFactory.buildGroupComponent({ component: this.props.layout.component, layout: this.props.layout, fields: this.props.fields, componentFactory: this.props.componentFactory }) } </div> </div>; } }); export default EntityContainer;
packages/core/admin/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/EventInput/EventRow.js
wistityhq/strapi
import React from 'react'; import PropTypes from 'prop-types'; import { BaseCheckbox } from '@strapi/design-system/BaseCheckbox'; import { Checkbox } from '@strapi/design-system/Checkbox'; import upperFirst from 'lodash/upperFirst'; const EventRow = ({ disabledEvents, name, events, inputValue, handleChange, handleChangeAll }) => { const enabledCheckboxes = events.filter(event => { return !disabledEvents.includes(event); }); const areAllCheckboxesSelected = inputValue.length === enabledCheckboxes.length; const hasSomeCheckboxSelected = inputValue.length > 0; const onChangeAll = ({ target: { name } }) => { const valueToSet = !areAllCheckboxesSelected; handleChangeAll({ target: { name, value: valueToSet }, }); }; return ( <tr> <td> <Checkbox indeterminate={hasSomeCheckboxSelected && !areAllCheckboxesSelected} aria-label="Select all entries" name={name} onChange={onChangeAll} value={areAllCheckboxesSelected} > {upperFirst(name)} </Checkbox> </td> {events.map(event => { return ( <td key={event}> <BaseCheckbox disabled={disabledEvents.includes(event)} aria-label={event} name={event} value={inputValue.includes(event)} onValueChange={value => handleChange({ target: { name: event, value } })} /> </td> ); })} </tr> ); }; EventRow.defaultProps = { disabledEvents: [], events: [], inputValue: [], handleChange: () => {}, handleChangeAll: () => {}, }; EventRow.propTypes = { disabledEvents: PropTypes.array, events: PropTypes.array, inputValue: PropTypes.array, handleChange: PropTypes.func, handleChangeAll: PropTypes.func, name: PropTypes.string.isRequired, }; export default EventRow;
app/javascript/mastodon/components/hashtag.js
KnzkDev/mastodon
import React from 'react'; import { Sparklines, SparklinesCurve } from 'react-sparklines'; import { FormattedMessage } from 'react-intl'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Permalink from './permalink'; import { shortNumberFormat } from '../utils/numbers'; const Hashtag = ({ hashtag }) => ( <div className='trends__item'> <div className='trends__item__name'> <Permalink href={hashtag.get('url')} to={`/timelines/tag/${hashtag.get('name')}`}> #<span>{hashtag.get('name')}</span> </Permalink> <FormattedMessage id='trends.count_by_accounts' defaultMessage='{count} {rawCount, plural, one {person} other {people}} talking' values={{ rawCount: hashtag.getIn(['history', 0, 'accounts']), count: <strong>{shortNumberFormat(hashtag.getIn(['history', 0, 'accounts']))}</strong> }} /> </div> <div className='trends__item__current'> {shortNumberFormat(hashtag.getIn(['history', 0, 'uses']))} </div> <div className='trends__item__sparkline'> <Sparklines width={50} height={28} data={hashtag.get('history').reverse().map(day => day.get('uses')).toArray()}> <SparklinesCurve style={{ fill: 'none' }} /> </Sparklines> </div> </div> ); Hashtag.propTypes = { hashtag: ImmutablePropTypes.map.isRequired, }; export default Hashtag;
src/index.js
jeffgietz/ReduxReact
import _ from 'lodash'; import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import YTSearch from 'youtube-api-search'; import SearchBar from './components/search_bar'; import VideoList from './components/video_list'; import VideoDetail from './components/video_detail'; const API_KEY = 'AIzaSyDtVx0y39RsEAvcFcDsjcJYQkDTMtwSSi0'; class App extends Component { constructor(props){ super(props); this.state = { videos: [], selectedVideo: null }; // Search for giantbomb y default this.videoSearch('giantbomb'); } videoSearch(term) { YTSearch({key: API_KEY, term: term}, (videos) => { this.setState({ videos:videos, selectedVideo: videos[0] }); }); } render() { const videoSearch = _.debounce((term) => {this.videoSearch(term)}, 300); return ( <div> <SearchBar onSearchTermChange={term => this.videoSearch(term)} /> <VideoDetail video={this.state.selectedVideo}/> <VideoList onVideoSelect = { selectedVideo => this.setState({selectedVideo}) } videos={this.state.videos} /> </div> ); } } // Take this component's generated HTML and put it // on the page (in the DOM) ReactDOM.render(<App />, document.querySelector('.container'));
app/components/distance-number.js
sirbrillig/voyageur-js-client
import React from 'react'; import AnimateOnChange from 'react-animate-on-change'; const DistanceNumber = ( props ) => { const meters = props.meters; if ( meters === null ) return <span>Loading...</span>; const miles = ( meters * 0.000621371192 ).toFixed( 1 ); const km = ( meters / 1000 ).toFixed( 1 ); const number = props.useMiles ? miles : km; const units = props.useMiles ? 'miles' : 'km'; return <AnimateOnChange baseClassName="distance__number" animationClassName="animated slideInDown" animate={ true }>{ number } { units }</AnimateOnChange>; }; DistanceNumber.propTypes = { useMiles: React.PropTypes.bool.isRequired, meters: React.PropTypes.number, }; export default DistanceNumber;
ajax/libs/mobx/2.6.2/mobx.js
redmunds/cdnjs
"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; registerGlobals(); exports.extras = { allowStateChanges: allowStateChanges, getAtom: getAtom, getDebugName: getDebugName, getDependencyTree: getDependencyTree, getObserverTree: getObserverTree, isComputingDerivation: isComputingDerivation, isSpyEnabled: isSpyEnabled, resetGlobalState: resetGlobalState, spyReport: spyReport, spyReportEnd: spyReportEnd, spyReportStart: spyReportStart, trackTransitions: trackTransitions }; exports._ = { getAdministration: getAdministration, resetGlobalState: resetGlobalState }; if (typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ === 'object') { __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx(module.exports); } var actionFieldDecorator = createClassPropertyDecorator(function (target, key, value, args, originalDescriptor) { var actionName = (args && args.length === 1) ? args[0] : (value.name || key || "<unnamed action>"); var wrappedAction = action(actionName, value); addHiddenProp(target, key, wrappedAction); }, function (key) { return this[key]; }, function () { invariant(false, "It is not allowed to assign new values to @action fields"); }, false, true); function action(arg1, arg2, arg3, arg4) { if (arguments.length === 1 && typeof arg1 === "function") return createAction(arg1.name || "<unnamed action>", arg1); if (arguments.length === 2 && typeof arg2 === "function") return createAction(arg1, arg2); if (arguments.length === 1 && typeof arg1 === "string") return namedActionDecorator(arg1); return namedActionDecorator(arg2).apply(null, arguments); } exports.action = action; function namedActionDecorator(name) { return function (target, prop, descriptor) { if (descriptor && typeof descriptor.value === "function") { descriptor.value = createAction(name, descriptor.value); descriptor.enumerable = false; descriptor.configurable = true; return descriptor; } return actionFieldDecorator(name).apply(this, arguments); }; } function runInAction(arg1, arg2, arg3) { var actionName = typeof arg1 === "string" ? arg1 : arg1.name || "<unnamed action>"; var fn = typeof arg1 === "function" ? arg1 : arg2; var scope = typeof arg1 === "function" ? arg2 : arg3; invariant(typeof fn === "function", "`runInAction` expects a function"); invariant(fn.length === 0, "`runInAction` expects a function without arguments"); invariant(typeof actionName === "string" && actionName.length > 0, "actions should have valid names, got: '" + actionName + "'"); return executeAction(actionName, fn, scope, undefined); } exports.runInAction = runInAction; function isAction(thing) { return typeof thing === "function" && thing.isMobxAction === true; } exports.isAction = isAction; function autorun(arg1, arg2, arg3) { var name, view, scope; if (typeof arg1 === "string") { name = arg1; view = arg2; scope = arg3; } else if (typeof arg1 === "function") { name = arg1.name || ("Autorun@" + getNextId()); view = arg1; scope = arg2; } assertUnwrapped(view, "autorun methods cannot have modifiers"); invariant(typeof view === "function", "autorun expects a function"); invariant(isAction(view) === false, "Warning: attempted to pass an action to autorun. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action."); if (scope) view = view.bind(scope); var reaction = new Reaction(name, function () { this.track(reactionRunner); }); function reactionRunner() { view(reaction); } reaction.schedule(); return reaction.getDisposer(); } exports.autorun = autorun; function when(arg1, arg2, arg3, arg4) { var name, predicate, effect, scope; if (typeof arg1 === "string") { name = arg1; predicate = arg2; effect = arg3; scope = arg4; } else if (typeof arg1 === "function") { name = ("When@" + getNextId()); predicate = arg1; effect = arg2; scope = arg3; } var disposer = autorun(name, function (r) { if (predicate.call(scope)) { r.dispose(); var prevUntracked = untrackedStart(); effect.call(scope); untrackedEnd(prevUntracked); } }); return disposer; } exports.when = when; function autorunUntil(predicate, effect, scope) { deprecated("`autorunUntil` is deprecated, please use `when`."); return when.apply(null, arguments); } exports.autorunUntil = autorunUntil; function autorunAsync(arg1, arg2, arg3, arg4) { var name, func, delay, scope; if (typeof arg1 === "string") { name = arg1; func = arg2; delay = arg3; scope = arg4; } else if (typeof arg1 === "function") { name = arg1.name || ("AutorunAsync@" + getNextId()); func = arg1; delay = arg2; scope = arg3; } invariant(isAction(func) === false, "Warning: attempted to pass an action to autorunAsync. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action."); if (delay === void 0) delay = 1; if (scope) func = func.bind(scope); var isScheduled = false; var r = new Reaction(name, function () { if (!isScheduled) { isScheduled = true; setTimeout(function () { isScheduled = false; if (!r.isDisposed) r.track(reactionRunner); }, delay); } }); function reactionRunner() { func(r); } r.schedule(); return r.getDisposer(); } exports.autorunAsync = autorunAsync; function reaction(arg1, arg2, arg3, arg4, arg5, arg6) { var name, expression, effect, fireImmediately, delay, scope; if (typeof arg1 === "string") { name = arg1; expression = arg2; effect = arg3; fireImmediately = arg4; delay = arg5; scope = arg6; } else { name = arg1.name || arg2.name || ("Reaction@" + getNextId()); expression = arg1; effect = arg2; fireImmediately = arg3; delay = arg4; scope = arg5; } if (fireImmediately === void 0) fireImmediately = false; if (delay === void 0) delay = 0; var _a = getValueModeFromValue(expression, ValueMode.Reference), valueMode = _a[0], unwrappedExpression = _a[1]; var compareStructural = valueMode === ValueMode.Structure; if (scope) { unwrappedExpression = unwrappedExpression.bind(scope); effect = action(name, effect.bind(scope)); } var firstTime = true; var isScheduled = false; var nextValue = undefined; var r = new Reaction(name, function () { if (delay < 1) { reactionRunner(); } else if (!isScheduled) { isScheduled = true; setTimeout(function () { isScheduled = false; reactionRunner(); }, delay); } }); function reactionRunner() { if (r.isDisposed) return; var changed = false; r.track(function () { var v = unwrappedExpression(r); changed = valueDidChange(compareStructural, nextValue, v); nextValue = v; }); if (firstTime && fireImmediately) effect(nextValue, r); if (!firstTime && changed === true) effect(nextValue, r); if (firstTime) firstTime = false; } r.schedule(); return r.getDisposer(); } exports.reaction = reaction; var computedDecorator = createClassPropertyDecorator(function (target, name, _, decoratorArgs, originalDescriptor) { invariant(typeof originalDescriptor !== "undefined", "@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'. It looks like it was used on a property."); var baseValue = originalDescriptor.get; var setter = originalDescriptor.set; invariant(typeof baseValue === "function", "@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'"); var compareStructural = false; if (decoratorArgs && decoratorArgs.length === 1 && decoratorArgs[0].asStructure === true) compareStructural = true; var adm = asObservableObject(target, undefined, ValueMode.Recursive); defineObservableProperty(adm, name, compareStructural ? asStructure(baseValue) : baseValue, false, setter); }, function (name) { var observable = this.$mobx.values[name]; if (observable === undefined) return undefined; return observable.get(); }, function (name, value) { this.$mobx.values[name].set(value); }, false, true); function computed(targetOrExpr, keyOrScopeOrSetter, baseDescriptor, options) { if (typeof targetOrExpr === "function" && arguments.length < 3) { if (typeof keyOrScopeOrSetter === "function") return computedExpr(targetOrExpr, keyOrScopeOrSetter, undefined); else return computedExpr(targetOrExpr, undefined, keyOrScopeOrSetter); } return computedDecorator.apply(null, arguments); } exports.computed = computed; function computedExpr(expr, setter, scope) { var _a = getValueModeFromValue(expr, ValueMode.Recursive), mode = _a[0], value = _a[1]; return new ComputedValue(value, scope, mode === ValueMode.Structure, value.name, setter); } function createTransformer(transformer, onCleanup) { invariant(typeof transformer === "function" && transformer.length === 1, "createTransformer expects a function that accepts one argument"); var objectCache = {}; var resetId = globalState.resetId; var Transformer = (function (_super) { __extends(Transformer, _super); function Transformer(sourceIdentifier, sourceObject) { _super.call(this, function () { return transformer(sourceObject); }, null, false, "Transformer-" + transformer.name + "-" + sourceIdentifier, undefined); this.sourceIdentifier = sourceIdentifier; this.sourceObject = sourceObject; } Transformer.prototype.onBecomeUnobserved = function () { var lastValue = this.value; _super.prototype.onBecomeUnobserved.call(this); delete objectCache[this.sourceIdentifier]; if (onCleanup) onCleanup(lastValue, this.sourceObject); }; return Transformer; }(ComputedValue)); return function (object) { if (resetId !== globalState.resetId) { objectCache = {}; resetId = globalState.resetId; } var identifier = getMemoizationId(object); var reactiveTransformer = objectCache[identifier]; if (reactiveTransformer) return reactiveTransformer.get(); reactiveTransformer = objectCache[identifier] = new Transformer(identifier, object); return reactiveTransformer.get(); }; } exports.createTransformer = createTransformer; function getMemoizationId(object) { if (object === null || typeof object !== "object") throw new Error("[mobx] transform expected some kind of object, got: " + object); var tid = object.$transformId; if (tid === undefined) { tid = getNextId(); addHiddenProp(object, "$transformId", tid); } return tid; } function expr(expr, scope) { if (!isComputingDerivation()) console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."); return computed(expr, scope).get(); } exports.expr = expr; function extendObservable(target) { var properties = []; for (var _i = 1; _i < arguments.length; _i++) { properties[_i - 1] = arguments[_i]; } invariant(arguments.length >= 2, "extendObservable expected 2 or more arguments"); invariant(typeof target === "object", "extendObservable expects an object as first argument"); invariant(!(isObservableMap(target)), "extendObservable should not be used on maps, use map.merge instead"); properties.forEach(function (propSet) { invariant(typeof propSet === "object", "all arguments of extendObservable should be objects"); invariant(!isObservable(propSet), "extending an object with another observable (object) is not supported. Please construct an explicit propertymap, using `toJS` if need. See issue #540"); extendObservableHelper(target, propSet, ValueMode.Recursive, null); }); return target; } exports.extendObservable = extendObservable; function extendObservableHelper(target, properties, mode, name) { var adm = asObservableObject(target, name, mode); for (var key in properties) if (hasOwnProperty(properties, key)) { if (target === properties && !isPropertyConfigurable(target, key)) continue; var descriptor = Object.getOwnPropertyDescriptor(properties, key); setObservableObjectInstanceProperty(adm, key, descriptor); } return target; } function getDependencyTree(thing, property) { return nodeToDependencyTree(getAtom(thing, property)); } function nodeToDependencyTree(node) { var result = { name: node.name }; if (node.observing && node.observing.length > 0) result.dependencies = unique(node.observing).map(nodeToDependencyTree); return result; } function getObserverTree(thing, property) { return nodeToObserverTree(getAtom(thing, property)); } function nodeToObserverTree(node) { var result = { name: node.name }; if (hasObservers(node)) result.observers = getObservers(node).map(nodeToObserverTree); return result; } function intercept(thing, propOrHandler, handler) { if (typeof handler === "function") return interceptProperty(thing, propOrHandler, handler); else return interceptInterceptable(thing, propOrHandler); } exports.intercept = intercept; function interceptInterceptable(thing, handler) { if (isPlainObject(thing) && !isObservableObject(thing)) { deprecated("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"); return getAdministration(observable(thing)).intercept(handler); } return getAdministration(thing).intercept(handler); } function interceptProperty(thing, property, handler) { if (isPlainObject(thing) && !isObservableObject(thing)) { deprecated("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"); extendObservable(thing, { property: thing[property] }); return interceptProperty(thing, property, handler); } return getAdministration(thing, property).intercept(handler); } function isComputed(value, property) { if (value === null || value === undefined) return false; if (property !== undefined) { if (isObservableObject(value) === false) return false; var atom = getAtom(value, property); return isComputedValue(atom); } return isComputedValue(value); } exports.isComputed = isComputed; function isObservable(value, property) { if (value === null || value === undefined) return false; if (property !== undefined) { if (isObservableArray(value) || isObservableMap(value)) throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead."); else if (isObservableObject(value)) { var o = value.$mobx; return o.values && !!o.values[property]; } return false; } return !!value.$mobx || isAtom(value) || isReaction(value) || isComputedValue(value); } exports.isObservable = isObservable; var decoratorImpl = createClassPropertyDecorator(function (target, name, baseValue) { var prevA = allowStateChangesStart(true); if (typeof baseValue === "function") baseValue = asReference(baseValue); var adm = asObservableObject(target, undefined, ValueMode.Recursive); defineObservableProperty(adm, name, baseValue, true, undefined); allowStateChangesEnd(prevA); }, function (name) { var observable = this.$mobx.values[name]; if (observable === undefined) return undefined; return observable.get(); }, function (name, value) { setPropertyValue(this, name, value); }, true, false); function observableDecorator(target, key, baseDescriptor) { invariant(arguments.length >= 2 && arguments.length <= 3, "Illegal decorator config", key); assertPropertyConfigurable(target, key); invariant(!baseDescriptor || !baseDescriptor.get, "@observable can not be used on getters, use @computed instead"); return decoratorImpl.apply(null, arguments); } function observable(v, keyOrScope) { if (v === void 0) { v = undefined; } if (typeof arguments[1] === "string") return observableDecorator.apply(null, arguments); invariant(arguments.length < 3, "observable expects zero, one or two arguments"); if (isObservable(v)) return v; var _a = getValueModeFromValue(v, ValueMode.Recursive), mode = _a[0], value = _a[1]; var sourceType = mode === ValueMode.Reference ? ValueType.Reference : getTypeOfValue(value); switch (sourceType) { case ValueType.Array: case ValueType.PlainObject: return makeChildObservable(value, mode); case ValueType.Reference: case ValueType.ComplexObject: return new ObservableValue(value, mode); case ValueType.ComplexFunction: throw new Error("[mobx.observable] To be able to make a function reactive it should not have arguments. If you need an observable reference to a function, use `observable(asReference(f))`"); case ValueType.ViewFunction: deprecated("Use `computed(expr)` instead of `observable(expr)`"); return computed(v, keyOrScope); } invariant(false, "Illegal State"); } exports.observable = observable; var ValueType; (function (ValueType) { ValueType[ValueType["Reference"] = 0] = "Reference"; ValueType[ValueType["PlainObject"] = 1] = "PlainObject"; ValueType[ValueType["ComplexObject"] = 2] = "ComplexObject"; ValueType[ValueType["Array"] = 3] = "Array"; ValueType[ValueType["ViewFunction"] = 4] = "ViewFunction"; ValueType[ValueType["ComplexFunction"] = 5] = "ComplexFunction"; })(ValueType || (ValueType = {})); function getTypeOfValue(value) { if (value === null || value === undefined) return ValueType.Reference; if (typeof value === "function") return value.length ? ValueType.ComplexFunction : ValueType.ViewFunction; if (isArrayLike(value)) return ValueType.Array; if (typeof value === "object") return isPlainObject(value) ? ValueType.PlainObject : ValueType.ComplexObject; return ValueType.Reference; } function observe(thing, propOrCb, cbOrFire, fireImmediately) { if (typeof cbOrFire === "function") return observeObservableProperty(thing, propOrCb, cbOrFire, fireImmediately); else return observeObservable(thing, propOrCb, cbOrFire); } exports.observe = observe; function observeObservable(thing, listener, fireImmediately) { if (isPlainObject(thing) && !isObservableObject(thing)) { deprecated("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"); return getAdministration(observable(thing)).observe(listener, fireImmediately); } return getAdministration(thing).observe(listener, fireImmediately); } function observeObservableProperty(thing, property, listener, fireImmediately) { if (isPlainObject(thing) && !isObservableObject(thing)) { deprecated("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"); extendObservable(thing, { property: thing[property] }); return observeObservableProperty(thing, property, listener, fireImmediately); } return getAdministration(thing, property).observe(listener, fireImmediately); } function toJS(source, detectCycles, __alreadySeen) { if (detectCycles === void 0) { detectCycles = true; } if (__alreadySeen === void 0) { __alreadySeen = null; } function cache(value) { if (detectCycles) __alreadySeen.push([source, value]); return value; } if (isObservable(source)) { if (detectCycles && __alreadySeen === null) __alreadySeen = []; if (detectCycles && source !== null && typeof source === "object") { for (var i = 0, l = __alreadySeen.length; i < l; i++) if (__alreadySeen[i][0] === source) return __alreadySeen[i][1]; } if (isObservableArray(source)) { var res = cache([]); var toAdd = source.map(function (value) { return toJS(value, detectCycles, __alreadySeen); }); res.length = toAdd.length; for (var i = 0, l = toAdd.length; i < l; i++) res[i] = toAdd[i]; return res; } if (isObservableObject(source)) { var res = cache({}); for (var key in source) res[key] = toJS(source[key], detectCycles, __alreadySeen); return res; } if (isObservableMap(source)) { var res_1 = cache({}); source.forEach(function (value, key) { return res_1[key] = toJS(value, detectCycles, __alreadySeen); }); return res_1; } if (isObservableValue(source)) return toJS(source.get(), detectCycles, __alreadySeen); } return source; } exports.toJS = toJS; function toJSlegacy(source, detectCycles, __alreadySeen) { if (detectCycles === void 0) { detectCycles = true; } if (__alreadySeen === void 0) { __alreadySeen = null; } deprecated("toJSlegacy is deprecated and will be removed in the next major. Use `toJS` instead. See #566"); function cache(value) { if (detectCycles) __alreadySeen.push([source, value]); return value; } if (source instanceof Date || source instanceof RegExp) return source; if (detectCycles && __alreadySeen === null) __alreadySeen = []; if (detectCycles && source !== null && typeof source === "object") { for (var i = 0, l = __alreadySeen.length; i < l; i++) if (__alreadySeen[i][0] === source) return __alreadySeen[i][1]; } if (!source) return source; if (isArrayLike(source)) { var res = cache([]); var toAdd = source.map(function (value) { return toJSlegacy(value, detectCycles, __alreadySeen); }); res.length = toAdd.length; for (var i = 0, l = toAdd.length; i < l; i++) res[i] = toAdd[i]; return res; } if (isObservableMap(source)) { var res_2 = cache({}); source.forEach(function (value, key) { return res_2[key] = toJSlegacy(value, detectCycles, __alreadySeen); }); return res_2; } if (isObservableValue(source)) return toJSlegacy(source.get(), detectCycles, __alreadySeen); if (typeof source === "object") { var res = cache({}); for (var key in source) res[key] = toJSlegacy(source[key], detectCycles, __alreadySeen); return res; } return source; } exports.toJSlegacy = toJSlegacy; function toJSON(source, detectCycles, __alreadySeen) { if (detectCycles === void 0) { detectCycles = true; } if (__alreadySeen === void 0) { __alreadySeen = null; } deprecated("toJSON is deprecated. Use toJS instead"); return toJSlegacy.apply(null, arguments); } exports.toJSON = toJSON; function log(msg) { console.log(msg); return msg; } function whyRun(thing, prop) { switch (arguments.length) { case 0: thing = globalState.trackingDerivation; if (!thing) return log("whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested it's value."); break; case 2: thing = getAtom(thing, prop); break; } thing = getAtom(thing); if (isComputedValue(thing)) return log(thing.whyRun()); else if (isReaction(thing)) return log(thing.whyRun()); else invariant(false, "whyRun can only be used on reactions and computed values"); } exports.whyRun = whyRun; function createAction(actionName, fn) { invariant(typeof fn === "function", "`action` can only be invoked on functions"); invariant(typeof actionName === "string" && actionName.length > 0, "actions should have valid names, got: '" + actionName + "'"); var res = function () { return executeAction(actionName, fn, this, arguments); }; res.isMobxAction = true; return res; } function executeAction(actionName, fn, scope, args) { invariant(!isComputedValue(globalState.trackingDerivation), "Computed values or transformers should not invoke actions or trigger other side effects"); var notifySpy = isSpyEnabled(); var startTime; if (notifySpy) { startTime = Date.now(); var l = (args && args.length) || 0; var flattendArgs = new Array(l); if (l > 0) for (var i = 0; i < l; i++) flattendArgs[i] = args[i]; spyReportStart({ type: "action", name: actionName, fn: fn, target: scope, arguments: flattendArgs }); } var prevUntracked = untrackedStart(); transactionStart(actionName, scope, false); var prevAllowStateChanges = allowStateChangesStart(true); try { return fn.apply(scope, args); } finally { allowStateChangesEnd(prevAllowStateChanges); transactionEnd(false); untrackedEnd(prevUntracked); if (notifySpy) spyReportEnd({ time: Date.now() - startTime }); } } function useStrict(strict) { if (arguments.length === 0) { deprecated("`useStrict` without arguments is deprecated, use `isStrictModeEnabled()` instead"); return globalState.strictMode; } else { invariant(globalState.trackingDerivation === null, "It is not allowed to set `useStrict` when a derivation is running"); globalState.strictMode = strict; globalState.allowStateChanges = !strict; } } exports.useStrict = useStrict; function isStrictModeEnabled() { return globalState.strictMode; } exports.isStrictModeEnabled = isStrictModeEnabled; function allowStateChanges(allowStateChanges, func) { var prev = allowStateChangesStart(allowStateChanges); var res = func(); allowStateChangesEnd(prev); return res; } function allowStateChangesStart(allowStateChanges) { var prev = globalState.allowStateChanges; globalState.allowStateChanges = allowStateChanges; return prev; } function allowStateChangesEnd(prev) { globalState.allowStateChanges = prev; } var BaseAtom = (function () { function BaseAtom(name) { if (name === void 0) { name = "Atom@" + getNextId(); } this.name = name; this.isPendingUnobservation = true; this.observers = []; this.observersIndexes = {}; this.diffValue = 0; this.lastAccessedBy = 0; this.lowestObserverState = IDerivationState.NOT_TRACKING; } BaseAtom.prototype.onBecomeUnobserved = function () { }; BaseAtom.prototype.reportObserved = function () { reportObserved(this); }; BaseAtom.prototype.reportChanged = function () { transactionStart("propagatingAtomChange", null, false); propagateChanged(this); transactionEnd(false); }; BaseAtom.prototype.toString = function () { return this.name; }; return BaseAtom; }()); exports.BaseAtom = BaseAtom; var Atom = (function (_super) { __extends(Atom, _super); function Atom(name, onBecomeObservedHandler, onBecomeUnobservedHandler) { if (name === void 0) { name = "Atom@" + getNextId(); } if (onBecomeObservedHandler === void 0) { onBecomeObservedHandler = noop; } if (onBecomeUnobservedHandler === void 0) { onBecomeUnobservedHandler = noop; } _super.call(this, name); this.name = name; this.onBecomeObservedHandler = onBecomeObservedHandler; this.onBecomeUnobservedHandler = onBecomeUnobservedHandler; this.isPendingUnobservation = false; this.isBeingTracked = false; } Atom.prototype.reportObserved = function () { startBatch(); _super.prototype.reportObserved.call(this); if (!this.isBeingTracked) { this.isBeingTracked = true; this.onBecomeObservedHandler(); } endBatch(); return !!globalState.trackingDerivation; }; Atom.prototype.onBecomeUnobserved = function () { this.isBeingTracked = false; this.onBecomeUnobservedHandler(); }; return Atom; }(BaseAtom)); exports.Atom = Atom; var isAtom = createInstanceofPredicate("Atom", BaseAtom); var ComputedValue = (function () { function ComputedValue(derivation, scope, compareStructural, name, setter) { this.derivation = derivation; this.scope = scope; this.compareStructural = compareStructural; this.dependenciesState = IDerivationState.NOT_TRACKING; this.observing = []; this.newObserving = null; this.isPendingUnobservation = false; this.observers = []; this.observersIndexes = {}; this.diffValue = 0; this.runId = 0; this.lastAccessedBy = 0; this.lowestObserverState = IDerivationState.UP_TO_DATE; this.unboundDepsCount = 0; this.__mapid = "#" + getNextId(); this.value = undefined; this.isComputing = false; this.isRunningSetter = false; this.name = name || "ComputedValue@" + getNextId(); if (setter) this.setter = createAction(name + "-setter", setter); } ComputedValue.prototype.peek = function () { this.isComputing = true; var prevAllowStateChanges = allowStateChangesStart(false); var res = this.derivation.call(this.scope); allowStateChangesEnd(prevAllowStateChanges); this.isComputing = false; return res; }; ; ComputedValue.prototype.peekUntracked = function () { var hasError = true; try { var res = this.peek(); hasError = false; return res; } finally { if (hasError) handleExceptionInDerivation(this); } }; ComputedValue.prototype.onBecomeStale = function () { propagateMaybeChanged(this); }; ComputedValue.prototype.onBecomeUnobserved = function () { invariant(this.dependenciesState !== IDerivationState.NOT_TRACKING, "INTERNAL ERROR only onBecomeUnobserved shouldn't be called twice in a row"); clearObserving(this); this.value = undefined; }; ComputedValue.prototype.get = function () { invariant(!this.isComputing, "Cycle detected in computation " + this.name, this.derivation); startBatch(); if (globalState.inBatch === 1) { if (shouldCompute(this)) this.value = this.peekUntracked(); } else { reportObserved(this); if (shouldCompute(this)) if (this.trackAndCompute()) propagateChangeConfirmed(this); } var result = this.value; endBatch(); return result; }; ComputedValue.prototype.recoverFromError = function () { this.isComputing = false; }; ComputedValue.prototype.set = function (value) { if (this.setter) { invariant(!this.isRunningSetter, "The setter of computed value '" + this.name + "' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"); this.isRunningSetter = true; try { this.setter.call(this.scope, value); } finally { this.isRunningSetter = false; } } else invariant(false, "[ComputedValue '" + this.name + "'] It is not possible to assign a new value to a computed value."); }; ComputedValue.prototype.trackAndCompute = function () { if (isSpyEnabled()) { spyReport({ object: this, type: "compute", fn: this.derivation, target: this.scope }); } var oldValue = this.value; var newValue = this.value = trackDerivedFunction(this, this.peek); return valueDidChange(this.compareStructural, newValue, oldValue); }; ComputedValue.prototype.observe = function (listener, fireImmediately) { var _this = this; var firstTime = true; var prevValue = undefined; return autorun(function () { var newValue = _this.get(); if (!firstTime || fireImmediately) { var prevU = untrackedStart(); listener(newValue, prevValue); untrackedEnd(prevU); } firstTime = false; prevValue = newValue; }); }; ComputedValue.prototype.toJSON = function () { return this.get(); }; ComputedValue.prototype.toString = function () { return this.name + "[" + this.derivation.toString() + "]"; }; ComputedValue.prototype.whyRun = function () { var isTracking = Boolean(globalState.trackingDerivation); var observing = unique(this.isComputing ? this.newObserving : this.observing).map(function (dep) { return dep.name; }); var observers = unique(getObservers(this).map(function (dep) { return dep.name; })); return (("\nWhyRun? computation '" + this.name + "':\n * Running because: " + (isTracking ? "[active] the value of this computation is needed by a reaction" : this.isComputing ? "[get] The value of this computed was requested outside a reaction" : "[idle] not running at the moment") + "\n") + (this.dependenciesState === IDerivationState.NOT_TRACKING ? " * This computation is suspended (not in use by any reaction) and won't run automatically.\n\tDidn't expect this computation to be suspended at this point?\n\t 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n\t 2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).\n" : " * This computation will re-run if any of the following observables changes:\n " + joinStrings(observing) + "\n " + ((this.isComputing && isTracking) ? " (... or any observable accessed during the remainder of the current run)" : "") + "\n\tMissing items in this list?\n\t 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n\t 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n * If the outcome of this computation changes, the following observers will be re-run:\n " + joinStrings(observers) + "\n")); }; return ComputedValue; }()); var isComputedValue = createInstanceofPredicate("ComputedValue", ComputedValue); var IDerivationState; (function (IDerivationState) { IDerivationState[IDerivationState["NOT_TRACKING"] = -1] = "NOT_TRACKING"; IDerivationState[IDerivationState["UP_TO_DATE"] = 0] = "UP_TO_DATE"; IDerivationState[IDerivationState["POSSIBLY_STALE"] = 1] = "POSSIBLY_STALE"; IDerivationState[IDerivationState["STALE"] = 2] = "STALE"; })(IDerivationState || (IDerivationState = {})); exports.IDerivationState = IDerivationState; function shouldCompute(derivation) { switch (derivation.dependenciesState) { case IDerivationState.UP_TO_DATE: return false; case IDerivationState.NOT_TRACKING: case IDerivationState.STALE: return true; case IDerivationState.POSSIBLY_STALE: { var hasError = true; var prevUntracked = untrackedStart(); try { var obs = derivation.observing, l = obs.length; for (var i = 0; i < l; i++) { var obj = obs[i]; if (isComputedValue(obj)) { obj.get(); if (derivation.dependenciesState === IDerivationState.STALE) { hasError = false; untrackedEnd(prevUntracked); return true; } } } hasError = false; changeDependenciesStateTo0(derivation); untrackedEnd(prevUntracked); return false; } finally { if (hasError) { changeDependenciesStateTo0(derivation); } } } } } function isComputingDerivation() { return globalState.trackingDerivation !== null; } function checkIfStateModificationsAreAllowed() { if (!globalState.allowStateChanges) { invariant(false, globalState.strictMode ? "It is not allowed to create or change state outside an `action` when MobX is in strict mode. Wrap the current method in `action` if this state change is intended" : "It is not allowed to change the state when a computed value or transformer is being evaluated. Use 'autorun' to create reactive functions with side-effects."); } } function trackDerivedFunction(derivation, f) { changeDependenciesStateTo0(derivation); derivation.newObserving = new Array(derivation.observing.length + 100); derivation.unboundDepsCount = 0; derivation.runId = ++globalState.runId; var prevTracking = globalState.trackingDerivation; globalState.trackingDerivation = derivation; var hasException = true; var result; try { result = f.call(derivation); hasException = false; } finally { if (hasException) { handleExceptionInDerivation(derivation); } else { globalState.trackingDerivation = prevTracking; bindDependencies(derivation); } } return result; } function handleExceptionInDerivation(derivation) { var message = ("[mobx] An uncaught exception occurred while calculating your computed value, autorun or transformer. Or inside the render() method of an observer based React component. " + "These functions should never throw exceptions as MobX will not always be able to recover from them. " + ("Please fix the error reported after this message or enable 'Pause on (caught) exceptions' in your debugger to find the root cause. In: '" + derivation.name + "'. ") + "For more details see https://github.com/mobxjs/mobx/issues/462"); if (isSpyEnabled()) { spyReport({ type: "error", message: message }); } console.warn(message); changeDependenciesStateTo0(derivation); derivation.newObserving = null; derivation.unboundDepsCount = 0; derivation.recoverFromError(); endBatch(); resetGlobalState(); } function bindDependencies(derivation) { var prevObserving = derivation.observing; var observing = derivation.observing = derivation.newObserving; derivation.newObserving = null; var i0 = 0, l = derivation.unboundDepsCount; for (var i = 0; i < l; i++) { var dep = observing[i]; if (dep.diffValue === 0) { dep.diffValue = 1; if (i0 !== i) observing[i0] = dep; i0++; } } observing.length = i0; l = prevObserving.length; while (l--) { var dep = prevObserving[l]; if (dep.diffValue === 0) { removeObserver(dep, derivation); } dep.diffValue = 0; } while (i0--) { var dep = observing[i0]; if (dep.diffValue === 1) { dep.diffValue = 0; addObserver(dep, derivation); } } } function clearObserving(derivation) { var obs = derivation.observing; var i = obs.length; while (i--) removeObserver(obs[i], derivation); derivation.dependenciesState = IDerivationState.NOT_TRACKING; obs.length = 0; } function untracked(action) { var prev = untrackedStart(); var res = action(); untrackedEnd(prev); return res; } exports.untracked = untracked; function untrackedStart() { var prev = globalState.trackingDerivation; globalState.trackingDerivation = null; return prev; } function untrackedEnd(prev) { globalState.trackingDerivation = prev; } function changeDependenciesStateTo0(derivation) { if (derivation.dependenciesState === IDerivationState.UP_TO_DATE) return; derivation.dependenciesState = IDerivationState.UP_TO_DATE; var obs = derivation.observing; var i = obs.length; while (i--) obs[i].lowestObserverState = IDerivationState.UP_TO_DATE; } var persistentKeys = ["mobxGuid", "resetId", "spyListeners", "strictMode", "runId"]; var MobXGlobals = (function () { function MobXGlobals() { this.version = 4; this.trackingDerivation = null; this.runId = 0; this.mobxGuid = 0; this.inTransaction = 0; this.isRunningReactions = false; this.inBatch = 0; this.pendingUnobservations = []; this.pendingReactions = []; this.allowStateChanges = true; this.strictMode = false; this.resetId = 0; this.spyListeners = []; } return MobXGlobals; }()); var globalState = (function () { var res = new MobXGlobals(); if (global.__mobservableTrackingStack || global.__mobservableViewStack) throw new Error("[mobx] An incompatible version of mobservable is already loaded."); if (global.__mobxGlobal && global.__mobxGlobal.version !== res.version) throw new Error("[mobx] An incompatible version of mobx is already loaded."); if (global.__mobxGlobal) return global.__mobxGlobal; return global.__mobxGlobal = res; })(); function registerGlobals() { } function resetGlobalState() { globalState.resetId++; var defaultGlobals = new MobXGlobals(); for (var key in defaultGlobals) if (persistentKeys.indexOf(key) === -1) globalState[key] = defaultGlobals[key]; globalState.allowStateChanges = !globalState.strictMode; } function hasObservers(observable) { return observable.observers && observable.observers.length > 0; } function getObservers(observable) { return observable.observers; } function invariantObservers(observable) { var list = observable.observers; var map = observable.observersIndexes; var l = list.length; for (var i = 0; i < l; i++) { var id = list[i].__mapid; if (i) { invariant(map[id] === i, "INTERNAL ERROR maps derivation.__mapid to index in list"); } else { invariant(!(id in map), "INTERNAL ERROR observer on index 0 shouldnt be held in map."); } } invariant(list.length === 0 || Object.keys(map).length === list.length - 1, "INTERNAL ERROR there is no junk in map"); } function addObserver(observable, node) { var l = observable.observers.length; if (l) { observable.observersIndexes[node.__mapid] = l; } observable.observers[l] = node; if (observable.lowestObserverState > node.dependenciesState) observable.lowestObserverState = node.dependenciesState; } function removeObserver(observable, node) { if (observable.observers.length === 1) { observable.observers.length = 0; queueForUnobservation(observable); } else { var list = observable.observers; var map_1 = observable.observersIndexes; var filler = list.pop(); if (filler !== node) { var index = map_1[node.__mapid] || 0; if (index) { map_1[filler.__mapid] = index; } else { delete map_1[filler.__mapid]; } list[index] = filler; } delete map_1[node.__mapid]; } } function queueForUnobservation(observable) { if (!observable.isPendingUnobservation) { observable.isPendingUnobservation = true; globalState.pendingUnobservations.push(observable); } } function startBatch() { globalState.inBatch++; } function endBatch() { if (globalState.inBatch === 1) { var list = globalState.pendingUnobservations; for (var i = 0; i < list.length; i++) { var observable_1 = list[i]; observable_1.isPendingUnobservation = false; if (observable_1.observers.length === 0) { observable_1.onBecomeUnobserved(); } } globalState.pendingUnobservations = []; } globalState.inBatch--; } function reportObserved(observable) { var derivation = globalState.trackingDerivation; if (derivation !== null) { if (derivation.runId !== observable.lastAccessedBy) { observable.lastAccessedBy = derivation.runId; derivation.newObserving[derivation.unboundDepsCount++] = observable; } } else if (observable.observers.length === 0) { queueForUnobservation(observable); } } function invariantLOS(observable, msg) { var min = getObservers(observable).reduce(function (a, b) { return Math.min(a, b.dependenciesState); }, 2); if (min >= observable.lowestObserverState) return; throw new Error("lowestObserverState is wrong for " + msg + " because " + min + " < " + observable.lowestObserverState); } function propagateChanged(observable) { if (observable.lowestObserverState === IDerivationState.STALE) return; observable.lowestObserverState = IDerivationState.STALE; var observers = observable.observers; var i = observers.length; while (i--) { var d = observers[i]; if (d.dependenciesState === IDerivationState.UP_TO_DATE) d.onBecomeStale(); d.dependenciesState = IDerivationState.STALE; } } function propagateChangeConfirmed(observable) { if (observable.lowestObserverState === IDerivationState.STALE) return; observable.lowestObserverState = IDerivationState.STALE; var observers = observable.observers; var i = observers.length; while (i--) { var d = observers[i]; if (d.dependenciesState === IDerivationState.POSSIBLY_STALE) d.dependenciesState = IDerivationState.STALE; else if (d.dependenciesState === IDerivationState.UP_TO_DATE) observable.lowestObserverState = IDerivationState.UP_TO_DATE; } } function propagateMaybeChanged(observable) { if (observable.lowestObserverState !== IDerivationState.UP_TO_DATE) return; observable.lowestObserverState = IDerivationState.POSSIBLY_STALE; var observers = observable.observers; var i = observers.length; while (i--) { var d = observers[i]; if (d.dependenciesState === IDerivationState.UP_TO_DATE) { d.dependenciesState = IDerivationState.POSSIBLY_STALE; d.onBecomeStale(); } } } var Reaction = (function () { function Reaction(name, onInvalidate) { if (name === void 0) { name = "Reaction@" + getNextId(); } this.name = name; this.onInvalidate = onInvalidate; this.observing = []; this.newObserving = []; this.dependenciesState = IDerivationState.NOT_TRACKING; this.diffValue = 0; this.runId = 0; this.unboundDepsCount = 0; this.__mapid = "#" + getNextId(); this.isDisposed = false; this._isScheduled = false; this._isTrackPending = false; this._isRunning = false; } Reaction.prototype.onBecomeStale = function () { this.schedule(); }; Reaction.prototype.schedule = function () { if (!this._isScheduled) { this._isScheduled = true; globalState.pendingReactions.push(this); startBatch(); runReactions(); endBatch(); } }; Reaction.prototype.isScheduled = function () { return this._isScheduled; }; Reaction.prototype.runReaction = function () { if (!this.isDisposed) { this._isScheduled = false; if (shouldCompute(this)) { this._isTrackPending = true; this.onInvalidate(); if (this._isTrackPending && isSpyEnabled()) { spyReport({ object: this, type: "scheduled-reaction" }); } } } }; Reaction.prototype.track = function (fn) { startBatch(); var notify = isSpyEnabled(); var startTime; if (notify) { startTime = Date.now(); spyReportStart({ object: this, type: "reaction", fn: fn }); } this._isRunning = true; trackDerivedFunction(this, fn); this._isRunning = false; this._isTrackPending = false; if (this.isDisposed) { clearObserving(this); } if (notify) { spyReportEnd({ time: Date.now() - startTime }); } endBatch(); }; Reaction.prototype.recoverFromError = function () { this._isRunning = false; this._isTrackPending = false; }; Reaction.prototype.dispose = function () { if (!this.isDisposed) { this.isDisposed = true; if (!this._isRunning) { startBatch(); clearObserving(this); endBatch(); } } }; Reaction.prototype.getDisposer = function () { var r = this.dispose.bind(this); r.$mobx = this; return r; }; Reaction.prototype.toString = function () { return "Reaction[" + this.name + "]"; }; Reaction.prototype.whyRun = function () { var observing = unique(this._isRunning ? this.newObserving : this.observing).map(function (dep) { return dep.name; }); return ("\nWhyRun? reaction '" + this.name + "':\n * Status: [" + (this.isDisposed ? "stopped" : this._isRunning ? "running" : this.isScheduled() ? "scheduled" : "idle") + "]\n * This reaction will re-run if any of the following observables changes:\n " + joinStrings(observing) + "\n " + ((this._isRunning) ? " (... or any observable accessed during the remainder of the current run)" : "") + "\n\tMissing items in this list?\n\t 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n\t 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n"); }; return Reaction; }()); exports.Reaction = Reaction; var MAX_REACTION_ITERATIONS = 100; function runReactions() { if (globalState.isRunningReactions === true || globalState.inTransaction > 0) return; globalState.isRunningReactions = true; var allReactions = globalState.pendingReactions; var iterations = 0; while (allReactions.length > 0) { if (++iterations === MAX_REACTION_ITERATIONS) { resetGlobalState(); throw new Error(("Reaction doesn't converge to a stable state after " + MAX_REACTION_ITERATIONS + " iterations.") + (" Probably there is a cycle in the reactive function: " + allReactions[0])); } var remainingReactions = allReactions.splice(0); for (var i = 0, l = remainingReactions.length; i < l; i++) remainingReactions[i].runReaction(); } globalState.isRunningReactions = false; } var isReaction = createInstanceofPredicate("Reaction", Reaction); function isSpyEnabled() { return !!globalState.spyListeners.length; } function spyReport(event) { if (!globalState.spyListeners.length) return false; var listeners = globalState.spyListeners; for (var i = 0, l = listeners.length; i < l; i++) listeners[i](event); } function spyReportStart(event) { var change = objectAssign({}, event, { spyReportStart: true }); spyReport(change); } var END_EVENT = { spyReportEnd: true }; function spyReportEnd(change) { if (change) spyReport(objectAssign({}, change, END_EVENT)); else spyReport(END_EVENT); } function spy(listener) { globalState.spyListeners.push(listener); return once(function () { var idx = globalState.spyListeners.indexOf(listener); if (idx !== -1) globalState.spyListeners.splice(idx, 1); }); } exports.spy = spy; function trackTransitions(onReport) { deprecated("trackTransitions is deprecated. Use mobx.spy instead"); if (typeof onReport === "boolean") { deprecated("trackTransitions only takes a single callback function. If you are using the mobx-react-devtools, please update them first"); onReport = arguments[1]; } if (!onReport) { deprecated("trackTransitions without callback has been deprecated and is a no-op now. If you are using the mobx-react-devtools, please update them first"); return function () { }; } return spy(onReport); } function transaction(action, thisArg, report) { if (thisArg === void 0) { thisArg = undefined; } if (report === void 0) { report = true; } transactionStart((action.name) || "anonymous transaction", thisArg, report); var res = action.call(thisArg); transactionEnd(report); return res; } exports.transaction = transaction; function transactionStart(name, thisArg, report) { if (thisArg === void 0) { thisArg = undefined; } if (report === void 0) { report = true; } startBatch(); globalState.inTransaction += 1; if (report && isSpyEnabled()) { spyReportStart({ type: "transaction", target: thisArg, name: name }); } } function transactionEnd(report) { if (report === void 0) { report = true; } if (--globalState.inTransaction === 0) { runReactions(); } if (report && isSpyEnabled()) spyReportEnd(); endBatch(); } function hasInterceptors(interceptable) { return (interceptable.interceptors && interceptable.interceptors.length > 0); } function registerInterceptor(interceptable, handler) { var interceptors = interceptable.interceptors || (interceptable.interceptors = []); interceptors.push(handler); return once(function () { var idx = interceptors.indexOf(handler); if (idx !== -1) interceptors.splice(idx, 1); }); } function interceptChange(interceptable, change) { var prevU = untrackedStart(); var interceptors = interceptable.interceptors; for (var i = 0, l = interceptors.length; i < l; i++) { change = interceptors[i](change); invariant(!change || change.type, "Intercept handlers should return nothing or a change object"); if (!change) return null; } untrackedEnd(prevU); return change; } function hasListeners(listenable) { return listenable.changeListeners && listenable.changeListeners.length > 0; } function registerListener(listenable, handler) { var listeners = listenable.changeListeners || (listenable.changeListeners = []); listeners.push(handler); return once(function () { var idx = listeners.indexOf(handler); if (idx !== -1) listeners.splice(idx, 1); }); } function notifyListeners(listenable, change) { var prevU = untrackedStart(); var listeners = listenable.changeListeners; if (!listeners) return; listeners = listeners.slice(); for (var i = 0, l = listeners.length; i < l; i++) { if (Array.isArray(change)) { listeners[i].apply(null, change); } else { listeners[i](change); } } untrackedEnd(prevU); } var ValueMode; (function (ValueMode) { ValueMode[ValueMode["Recursive"] = 0] = "Recursive"; ValueMode[ValueMode["Reference"] = 1] = "Reference"; ValueMode[ValueMode["Structure"] = 2] = "Structure"; ValueMode[ValueMode["Flat"] = 3] = "Flat"; })(ValueMode || (ValueMode = {})); function withModifier(modifier, value) { assertUnwrapped(value, "Modifiers are not allowed to be nested"); return { mobxModifier: modifier, value: value }; } function getModifier(value) { if (value) { return value.mobxModifier || null; } return null; } function asReference(value) { return withModifier(ValueMode.Reference, value); } exports.asReference = asReference; asReference.mobxModifier = ValueMode.Reference; function asStructure(value) { return withModifier(ValueMode.Structure, value); } exports.asStructure = asStructure; asStructure.mobxModifier = ValueMode.Structure; function asFlat(value) { return withModifier(ValueMode.Flat, value); } exports.asFlat = asFlat; asFlat.mobxModifier = ValueMode.Flat; function asMap(data, modifierFunc) { return map(data, modifierFunc); } exports.asMap = asMap; function getValueModeFromValue(value, defaultMode) { var mode = getModifier(value); if (mode) return [mode, value.value]; return [defaultMode, value]; } function getValueModeFromModifierFunc(func) { if (func === undefined) return ValueMode.Recursive; var mod = getModifier(func); invariant(mod !== null, "Cannot determine value mode from function. Please pass in one of these: mobx.asReference, mobx.asStructure or mobx.asFlat, got: " + func); return mod; } function makeChildObservable(value, parentMode, name) { var childMode; if (isObservable(value)) return value; switch (parentMode) { case ValueMode.Reference: return value; case ValueMode.Flat: assertUnwrapped(value, "Items inside 'asFlat' cannot have modifiers"); childMode = ValueMode.Reference; break; case ValueMode.Structure: assertUnwrapped(value, "Items inside 'asStructure' cannot have modifiers"); childMode = ValueMode.Structure; break; case ValueMode.Recursive: _a = getValueModeFromValue(value, ValueMode.Recursive), childMode = _a[0], value = _a[1]; break; default: invariant(false, "Illegal State"); } if (Array.isArray(value)) return createObservableArray(value, childMode, name); if (isPlainObject(value) && Object.isExtensible(value)) return extendObservableHelper(value, value, childMode, name); return value; var _a; } function assertUnwrapped(value, message) { if (getModifier(value) !== null) throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. " + message); } var safariPrototypeSetterInheritanceBug = (function () { var v = false; var p = {}; Object.defineProperty(p, "0", { set: function () { v = true; } }); Object.create(p)["0"] = 1; return v === false; })(); var OBSERVABLE_ARRAY_BUFFER_SIZE = 0; var StubArray = (function () { function StubArray() { } return StubArray; }()); StubArray.prototype = []; var ObservableArrayAdministration = (function () { function ObservableArrayAdministration(name, mode, array, owned) { this.mode = mode; this.array = array; this.owned = owned; this.lastKnownLength = 0; this.interceptors = null; this.changeListeners = null; this.atom = new BaseAtom(name || ("ObservableArray@" + getNextId())); } ObservableArrayAdministration.prototype.makeReactiveArrayItem = function (value) { assertUnwrapped(value, "Array values cannot have modifiers"); if (this.mode === ValueMode.Flat || this.mode === ValueMode.Reference) return value; return makeChildObservable(value, this.mode, this.atom.name + "[..]"); }; ObservableArrayAdministration.prototype.intercept = function (handler) { return registerInterceptor(this, handler); }; ObservableArrayAdministration.prototype.observe = function (listener, fireImmediately) { if (fireImmediately === void 0) { fireImmediately = false; } if (fireImmediately) { listener({ object: this.array, type: "splice", index: 0, added: this.values.slice(), addedCount: this.values.length, removed: [], removedCount: 0 }); } return registerListener(this, listener); }; ObservableArrayAdministration.prototype.getArrayLength = function () { this.atom.reportObserved(); return this.values.length; }; ObservableArrayAdministration.prototype.setArrayLength = function (newLength) { if (typeof newLength !== "number" || newLength < 0) throw new Error("[mobx.array] Out of range: " + newLength); var currentLength = this.values.length; if (newLength === currentLength) return; else if (newLength > currentLength) this.spliceWithArray(currentLength, 0, new Array(newLength - currentLength)); else this.spliceWithArray(newLength, currentLength - newLength); }; ObservableArrayAdministration.prototype.updateArrayLength = function (oldLength, delta) { if (oldLength !== this.lastKnownLength) throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?"); this.lastKnownLength += delta; if (delta > 0 && oldLength + delta + 1 > OBSERVABLE_ARRAY_BUFFER_SIZE) reserveArrayBuffer(oldLength + delta + 1); }; ObservableArrayAdministration.prototype.spliceWithArray = function (index, deleteCount, newItems) { checkIfStateModificationsAreAllowed(); var length = this.values.length; if (index === undefined) index = 0; else if (index > length) index = length; else if (index < 0) index = Math.max(0, length + index); if (arguments.length === 1) deleteCount = length - index; else if (deleteCount === undefined || deleteCount === null) deleteCount = 0; else deleteCount = Math.max(0, Math.min(deleteCount, length - index)); if (newItems === undefined) newItems = []; if (hasInterceptors(this)) { var change = interceptChange(this, { object: this.array, type: "splice", index: index, removedCount: deleteCount, added: newItems }); if (!change) return EMPTY_ARRAY; deleteCount = change.removedCount; newItems = change.added; } newItems = newItems.map(this.makeReactiveArrayItem, this); var lengthDelta = newItems.length - deleteCount; this.updateArrayLength(length, lengthDelta); var res = (_a = this.values).splice.apply(_a, [index, deleteCount].concat(newItems)); if (deleteCount !== 0 || newItems.length !== 0) this.notifyArraySplice(index, newItems, res); return res; var _a; }; ObservableArrayAdministration.prototype.notifyArrayChildUpdate = function (index, newValue, oldValue) { var notifySpy = !this.owned && isSpyEnabled(); var notify = hasListeners(this); var change = notify || notifySpy ? { object: this.array, type: "update", index: index, newValue: newValue, oldValue: oldValue } : null; if (notifySpy) spyReportStart(change); this.atom.reportChanged(); if (notify) notifyListeners(this, change); if (notifySpy) spyReportEnd(); }; ObservableArrayAdministration.prototype.notifyArraySplice = function (index, added, removed) { var notifySpy = !this.owned && isSpyEnabled(); var notify = hasListeners(this); var change = notify || notifySpy ? { object: this.array, type: "splice", index: index, removed: removed, added: added, removedCount: removed.length, addedCount: added.length } : null; if (notifySpy) spyReportStart(change); this.atom.reportChanged(); if (notify) notifyListeners(this, change); if (notifySpy) spyReportEnd(); }; return ObservableArrayAdministration; }()); var ObservableArray = (function (_super) { __extends(ObservableArray, _super); function ObservableArray(initialValues, mode, name, owned) { if (owned === void 0) { owned = false; } _super.call(this); var adm = new ObservableArrayAdministration(name, mode, this, owned); addHiddenFinalProp(this, "$mobx", adm); if (initialValues && initialValues.length) { adm.updateArrayLength(0, initialValues.length); adm.values = initialValues.map(adm.makeReactiveArrayItem, adm); adm.notifyArraySplice(0, adm.values.slice(), EMPTY_ARRAY); } else { adm.values = []; } if (safariPrototypeSetterInheritanceBug) { Object.defineProperty(adm.array, "0", ENTRY_0); } } ObservableArray.prototype.intercept = function (handler) { return this.$mobx.intercept(handler); }; ObservableArray.prototype.observe = function (listener, fireImmediately) { if (fireImmediately === void 0) { fireImmediately = false; } return this.$mobx.observe(listener, fireImmediately); }; ObservableArray.prototype.clear = function () { return this.splice(0); }; ObservableArray.prototype.concat = function () { var arrays = []; for (var _i = 0; _i < arguments.length; _i++) { arrays[_i - 0] = arguments[_i]; } this.$mobx.atom.reportObserved(); return Array.prototype.concat.apply(this.slice(), arrays.map(function (a) { return isObservableArray(a) ? a.slice() : a; })); }; ObservableArray.prototype.replace = function (newItems) { return this.$mobx.spliceWithArray(0, this.$mobx.values.length, newItems); }; ObservableArray.prototype.toJS = function () { return this.slice(); }; ObservableArray.prototype.toJSON = function () { return this.toJS(); }; ObservableArray.prototype.peek = function () { return this.$mobx.values; }; ObservableArray.prototype.find = function (predicate, thisArg, fromIndex) { if (fromIndex === void 0) { fromIndex = 0; } this.$mobx.atom.reportObserved(); var items = this.$mobx.values, l = items.length; for (var i = fromIndex; i < l; i++) if (predicate.call(thisArg, items[i], i, this)) return items[i]; return undefined; }; ObservableArray.prototype.splice = function (index, deleteCount) { var newItems = []; for (var _i = 2; _i < arguments.length; _i++) { newItems[_i - 2] = arguments[_i]; } switch (arguments.length) { case 0: return []; case 1: return this.$mobx.spliceWithArray(index); case 2: return this.$mobx.spliceWithArray(index, deleteCount); } return this.$mobx.spliceWithArray(index, deleteCount, newItems); }; ObservableArray.prototype.push = function () { var items = []; for (var _i = 0; _i < arguments.length; _i++) { items[_i - 0] = arguments[_i]; } var adm = this.$mobx; adm.spliceWithArray(adm.values.length, 0, items); return adm.values.length; }; ObservableArray.prototype.pop = function () { return this.splice(Math.max(this.$mobx.values.length - 1, 0), 1)[0]; }; ObservableArray.prototype.shift = function () { return this.splice(0, 1)[0]; }; ObservableArray.prototype.unshift = function () { var items = []; for (var _i = 0; _i < arguments.length; _i++) { items[_i - 0] = arguments[_i]; } var adm = this.$mobx; adm.spliceWithArray(0, 0, items); return adm.values.length; }; ObservableArray.prototype.reverse = function () { this.$mobx.atom.reportObserved(); var clone = this.slice(); return clone.reverse.apply(clone, arguments); }; ObservableArray.prototype.sort = function (compareFn) { this.$mobx.atom.reportObserved(); var clone = this.slice(); return clone.sort.apply(clone, arguments); }; ObservableArray.prototype.remove = function (value) { var idx = this.$mobx.values.indexOf(value); if (idx > -1) { this.splice(idx, 1); return true; } return false; }; ObservableArray.prototype.toString = function () { return "[mobx.array] " + Array.prototype.toString.apply(this.$mobx.values, arguments); }; ObservableArray.prototype.toLocaleString = function () { return "[mobx.array] " + Array.prototype.toLocaleString.apply(this.$mobx.values, arguments); }; return ObservableArray; }(StubArray)); declareIterator(ObservableArray.prototype, function () { return arrayAsIterator(this.slice()); }); makeNonEnumerable(ObservableArray.prototype, [ "constructor", "intercept", "observe", "clear", "concat", "replace", "toJS", "toJSON", "peek", "find", "splice", "push", "pop", "shift", "unshift", "reverse", "sort", "remove", "toString", "toLocaleString" ]); Object.defineProperty(ObservableArray.prototype, "length", { enumerable: false, configurable: true, get: function () { return this.$mobx.getArrayLength(); }, set: function (newLength) { this.$mobx.setArrayLength(newLength); } }); [ "every", "filter", "forEach", "indexOf", "join", "lastIndexOf", "map", "reduce", "reduceRight", "slice", "some" ].forEach(function (funcName) { var baseFunc = Array.prototype[funcName]; invariant(typeof baseFunc === "function", "Base function not defined on Array prototype: '" + funcName + "'"); addHiddenProp(ObservableArray.prototype, funcName, function () { this.$mobx.atom.reportObserved(); return baseFunc.apply(this.$mobx.values, arguments); }); }); var ENTRY_0 = { configurable: true, enumerable: false, set: createArraySetter(0), get: createArrayGetter(0) }; function createArrayBufferItem(index) { var set = createArraySetter(index); var get = createArrayGetter(index); Object.defineProperty(ObservableArray.prototype, "" + index, { enumerable: false, configurable: true, set: set, get: get }); } function createArraySetter(index) { return function (newValue) { var adm = this.$mobx; var values = adm.values; assertUnwrapped(newValue, "Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."); if (index < values.length) { checkIfStateModificationsAreAllowed(); var oldValue = values[index]; if (hasInterceptors(adm)) { var change = interceptChange(adm, { type: "update", object: adm.array, index: index, newValue: newValue }); if (!change) return; newValue = change.newValue; } newValue = adm.makeReactiveArrayItem(newValue); var changed = (adm.mode === ValueMode.Structure) ? !deepEquals(oldValue, newValue) : oldValue !== newValue; if (changed) { values[index] = newValue; adm.notifyArrayChildUpdate(index, newValue, oldValue); } } else if (index === values.length) { adm.spliceWithArray(index, 0, [newValue]); } else throw new Error("[mobx.array] Index out of bounds, " + index + " is larger than " + values.length); }; } function createArrayGetter(index) { return function () { var impl = this.$mobx; if (impl && index < impl.values.length) { impl.atom.reportObserved(); return impl.values[index]; } console.warn("[mobx.array] Attempt to read an array index (" + index + ") that is out of bounds (" + impl.values.length + "). Please check length first. Out of bound indices will not be tracked by MobX"); return undefined; }; } function reserveArrayBuffer(max) { for (var index = OBSERVABLE_ARRAY_BUFFER_SIZE; index < max; index++) createArrayBufferItem(index); OBSERVABLE_ARRAY_BUFFER_SIZE = max; } reserveArrayBuffer(1000); function createObservableArray(initialValues, mode, name) { return new ObservableArray(initialValues, mode, name); } function fastArray(initialValues) { deprecated("fastArray is deprecated. Please use `observable(asFlat([]))`"); return createObservableArray(initialValues, ValueMode.Flat, null); } exports.fastArray = fastArray; var isObservableArrayAdministration = createInstanceofPredicate("ObservableArrayAdministration", ObservableArrayAdministration); function isObservableArray(thing) { return isObject(thing) && isObservableArrayAdministration(thing.$mobx); } exports.isObservableArray = isObservableArray; var ObservableMapMarker = {}; var ObservableMap = (function () { function ObservableMap(initialData, valueModeFunc) { var _this = this; this.$mobx = ObservableMapMarker; this._data = {}; this._hasMap = {}; this.name = "ObservableMap@" + getNextId(); this._keys = new ObservableArray(null, ValueMode.Reference, this.name + ".keys()", true); this.interceptors = null; this.changeListeners = null; this._valueMode = getValueModeFromModifierFunc(valueModeFunc); if (this._valueMode === ValueMode.Flat) this._valueMode = ValueMode.Reference; allowStateChanges(true, function () { if (isPlainObject(initialData)) _this.merge(initialData); else if (Array.isArray(initialData)) initialData.forEach(function (_a) { var key = _a[0], value = _a[1]; return _this.set(key, value); }); }); } ObservableMap.prototype._has = function (key) { return typeof this._data[key] !== "undefined"; }; ObservableMap.prototype.has = function (key) { if (!this.isValidKey(key)) return false; key = "" + key; if (this._hasMap[key]) return this._hasMap[key].get(); return this._updateHasMapEntry(key, false).get(); }; ObservableMap.prototype.set = function (key, value) { this.assertValidKey(key); key = "" + key; var hasKey = this._has(key); assertUnwrapped(value, "[mobx.map.set] Expected unwrapped value to be inserted to key '" + key + "'. If you need to use modifiers pass them as second argument to the constructor"); if (hasInterceptors(this)) { var change = interceptChange(this, { type: hasKey ? "update" : "add", object: this, newValue: value, name: key }); if (!change) return; value = change.newValue; } if (hasKey) { this._updateValue(key, value); } else { this._addValue(key, value); } }; ObservableMap.prototype.delete = function (key) { var _this = this; this.assertValidKey(key); key = "" + key; if (hasInterceptors(this)) { var change = interceptChange(this, { type: "delete", object: this, name: key }); if (!change) return false; } if (this._has(key)) { var notifySpy = isSpyEnabled(); var notify = hasListeners(this); var change = notify || notifySpy ? { type: "delete", object: this, oldValue: this._data[key].value, name: key } : null; if (notifySpy) spyReportStart(change); transaction(function () { _this._keys.remove(key); _this._updateHasMapEntry(key, false); var observable = _this._data[key]; observable.setNewValue(undefined); _this._data[key] = undefined; }, undefined, false); if (notify) notifyListeners(this, change); if (notifySpy) spyReportEnd(); return true; } return false; }; ObservableMap.prototype._updateHasMapEntry = function (key, value) { var entry = this._hasMap[key]; if (entry) { entry.setNewValue(value); } else { entry = this._hasMap[key] = new ObservableValue(value, ValueMode.Reference, this.name + "." + key + "?", false); } return entry; }; ObservableMap.prototype._updateValue = function (name, newValue) { var observable = this._data[name]; newValue = observable.prepareNewValue(newValue); if (newValue !== UNCHANGED) { var notifySpy = isSpyEnabled(); var notify = hasListeners(this); var change = notify || notifySpy ? { type: "update", object: this, oldValue: observable.value, name: name, newValue: newValue } : null; if (notifySpy) spyReportStart(change); observable.setNewValue(newValue); if (notify) notifyListeners(this, change); if (notifySpy) spyReportEnd(); } }; ObservableMap.prototype._addValue = function (name, newValue) { var _this = this; transaction(function () { var observable = _this._data[name] = new ObservableValue(newValue, _this._valueMode, _this.name + "." + name, false); newValue = observable.value; _this._updateHasMapEntry(name, true); _this._keys.push(name); }, undefined, false); var notifySpy = isSpyEnabled(); var notify = hasListeners(this); var change = notify || notifySpy ? { type: "add", object: this, name: name, newValue: newValue } : null; if (notifySpy) spyReportStart(change); if (notify) notifyListeners(this, change); if (notifySpy) spyReportEnd(); }; ObservableMap.prototype.get = function (key) { key = "" + key; if (this.has(key)) return this._data[key].get(); return undefined; }; ObservableMap.prototype.keys = function () { return arrayAsIterator(this._keys.slice()); }; ObservableMap.prototype.values = function () { return arrayAsIterator(this._keys.map(this.get, this)); }; ObservableMap.prototype.entries = function () { var _this = this; return arrayAsIterator(this._keys.map(function (key) { return [key, _this.get(key)]; })); }; ObservableMap.prototype.forEach = function (callback, thisArg) { var _this = this; this.keys().forEach(function (key) { return callback.call(thisArg, _this.get(key), key); }); }; ObservableMap.prototype.merge = function (other) { var _this = this; transaction(function () { if (isObservableMap(other)) other.keys().forEach(function (key) { return _this.set(key, other.get(key)); }); else Object.keys(other).forEach(function (key) { return _this.set(key, other[key]); }); }, undefined, false); return this; }; ObservableMap.prototype.clear = function () { var _this = this; transaction(function () { untracked(function () { _this.keys().forEach(_this.delete, _this); }); }, undefined, false); }; Object.defineProperty(ObservableMap.prototype, "size", { get: function () { return this._keys.length; }, enumerable: true, configurable: true }); ObservableMap.prototype.toJS = function () { var _this = this; var res = {}; this.keys().forEach(function (key) { return res[key] = _this.get(key); }); return res; }; ObservableMap.prototype.toJs = function () { deprecated("toJs is deprecated, use toJS instead"); return this.toJS(); }; ObservableMap.prototype.toJSON = function () { return this.toJS(); }; ObservableMap.prototype.isValidKey = function (key) { if (key === null || key === undefined) return false; if (typeof key !== "string" && typeof key !== "number" && typeof key !== "boolean") return false; return true; }; ObservableMap.prototype.assertValidKey = function (key) { if (!this.isValidKey(key)) throw new Error("[mobx.map] Invalid key: '" + key + "'"); }; ObservableMap.prototype.toString = function () { var _this = this; return this.name + "[{ " + this.keys().map(function (key) { return (key + ": " + ("" + _this.get(key))); }).join(", ") + " }]"; }; ObservableMap.prototype.observe = function (listener, fireImmediately) { invariant(fireImmediately !== true, "`observe` doesn't support the fire immediately property for observable maps."); return registerListener(this, listener); }; ObservableMap.prototype.intercept = function (handler) { return registerInterceptor(this, handler); }; return ObservableMap; }()); exports.ObservableMap = ObservableMap; declareIterator(ObservableMap.prototype, function () { return this.entries(); }); function map(initialValues, valueModifier) { return new ObservableMap(initialValues, valueModifier); } exports.map = map; var isObservableMap = createInstanceofPredicate("ObservableMap", ObservableMap); exports.isObservableMap = isObservableMap; var ObservableObjectAdministration = (function () { function ObservableObjectAdministration(target, name, mode) { this.target = target; this.name = name; this.mode = mode; this.values = {}; this.changeListeners = null; this.interceptors = null; } ObservableObjectAdministration.prototype.observe = function (callback, fireImmediately) { invariant(fireImmediately !== true, "`observe` doesn't support the fire immediately property for observable objects."); return registerListener(this, callback); }; ObservableObjectAdministration.prototype.intercept = function (handler) { return registerInterceptor(this, handler); }; return ObservableObjectAdministration; }()); function asObservableObject(target, name, mode) { if (mode === void 0) { mode = ValueMode.Recursive; } if (isObservableObject(target)) return target.$mobx; if (!isPlainObject(target)) name = target.constructor.name + "@" + getNextId(); if (!name) name = "ObservableObject@" + getNextId(); var adm = new ObservableObjectAdministration(target, name, mode); addHiddenFinalProp(target, "$mobx", adm); return adm; } function setObservableObjectInstanceProperty(adm, propName, descriptor) { if (adm.values[propName]) { invariant("value" in descriptor, "cannot redefine property " + propName); adm.target[propName] = descriptor.value; } else { if ("value" in descriptor) defineObservableProperty(adm, propName, descriptor.value, true, undefined); else defineObservableProperty(adm, propName, descriptor.get, true, descriptor.set); } } function defineObservableProperty(adm, propName, newValue, asInstanceProperty, setter) { if (asInstanceProperty) assertPropertyConfigurable(adm.target, propName); var observable; var name = adm.name + "." + propName; var isComputed = true; if (isComputedValue(newValue)) { observable = newValue; newValue.name = name; if (!newValue.scope) newValue.scope = adm.target; } else if (typeof newValue === "function" && newValue.length === 0 && !isAction(newValue)) { observable = new ComputedValue(newValue, adm.target, false, name, setter); } else if (getModifier(newValue) === ValueMode.Structure && typeof newValue.value === "function" && newValue.value.length === 0) { observable = new ComputedValue(newValue.value, adm.target, true, name, setter); } else { isComputed = false; if (hasInterceptors(adm)) { var change = interceptChange(adm, { object: adm.target, name: propName, type: "add", newValue: newValue }); if (!change) return; newValue = change.newValue; } observable = new ObservableValue(newValue, adm.mode, name, false); newValue = observable.value; } adm.values[propName] = observable; if (asInstanceProperty) { Object.defineProperty(adm.target, propName, isComputed ? generateComputedPropConfig(propName) : generateObservablePropConfig(propName)); } if (!isComputed) notifyPropertyAddition(adm, adm.target, propName, newValue); } var observablePropertyConfigs = {}; var computedPropertyConfigs = {}; function generateObservablePropConfig(propName) { var config = observablePropertyConfigs[propName]; if (config) return config; return observablePropertyConfigs[propName] = { configurable: true, enumerable: true, get: function () { return this.$mobx.values[propName].get(); }, set: function (v) { setPropertyValue(this, propName, v); } }; } function generateComputedPropConfig(propName) { var config = computedPropertyConfigs[propName]; if (config) return config; return computedPropertyConfigs[propName] = { configurable: true, enumerable: false, get: function () { return this.$mobx.values[propName].get(); }, set: function (v) { return this.$mobx.values[propName].set(v); } }; } function setPropertyValue(instance, name, newValue) { var adm = instance.$mobx; var observable = adm.values[name]; if (hasInterceptors(adm)) { var change = interceptChange(adm, { type: "update", object: instance, name: name, newValue: newValue }); if (!change) return; newValue = change.newValue; } newValue = observable.prepareNewValue(newValue); if (newValue !== UNCHANGED) { var notify = hasListeners(adm); var notifySpy = isSpyEnabled(); var change = notify || notifySpy ? { type: "update", object: instance, oldValue: observable.value, name: name, newValue: newValue } : null; if (notifySpy) spyReportStart(change); observable.setNewValue(newValue); if (notify) notifyListeners(adm, change); if (notifySpy) spyReportEnd(); } } function notifyPropertyAddition(adm, object, name, newValue) { var notify = hasListeners(adm); var notifySpy = isSpyEnabled(); var change = notify || notifySpy ? { type: "add", object: object, name: name, newValue: newValue } : null; if (notifySpy) spyReportStart(change); if (notify) notifyListeners(adm, change); if (notifySpy) spyReportEnd(); } var isObservableObjectAdministration = createInstanceofPredicate("ObservableObjectAdministration", ObservableObjectAdministration); function isObservableObject(thing) { if (isObject(thing)) { runLazyInitializers(thing); return isObservableObjectAdministration(thing.$mobx); } return false; } exports.isObservableObject = isObservableObject; var UNCHANGED = {}; var ObservableValue = (function (_super) { __extends(ObservableValue, _super); function ObservableValue(value, mode, name, notifySpy) { if (name === void 0) { name = "ObservableValue@" + getNextId(); } if (notifySpy === void 0) { notifySpy = true; } _super.call(this, name); this.mode = mode; this.hasUnreportedChange = false; this.value = undefined; var _a = getValueModeFromValue(value, ValueMode.Recursive), childmode = _a[0], unwrappedValue = _a[1]; if (this.mode === ValueMode.Recursive) this.mode = childmode; this.value = makeChildObservable(unwrappedValue, this.mode, this.name); if (notifySpy && isSpyEnabled()) { spyReport({ type: "create", object: this, newValue: this.value }); } } ObservableValue.prototype.set = function (newValue) { var oldValue = this.value; newValue = this.prepareNewValue(newValue); if (newValue !== UNCHANGED) { var notifySpy = isSpyEnabled(); if (notifySpy) { spyReportStart({ type: "update", object: this, newValue: newValue, oldValue: oldValue }); } this.setNewValue(newValue); if (notifySpy) spyReportEnd(); } }; ObservableValue.prototype.prepareNewValue = function (newValue) { assertUnwrapped(newValue, "Modifiers cannot be used on non-initial values."); checkIfStateModificationsAreAllowed(); if (hasInterceptors(this)) { var change = interceptChange(this, { object: this, type: "update", newValue: newValue }); if (!change) return UNCHANGED; newValue = change.newValue; } var changed = valueDidChange(this.mode === ValueMode.Structure, this.value, newValue); if (changed) return makeChildObservable(newValue, this.mode, this.name); return UNCHANGED; }; ObservableValue.prototype.setNewValue = function (newValue) { var oldValue = this.value; this.value = newValue; this.reportChanged(); if (hasListeners(this)) notifyListeners(this, [newValue, oldValue]); }; ObservableValue.prototype.get = function () { this.reportObserved(); return this.value; }; ObservableValue.prototype.intercept = function (handler) { return registerInterceptor(this, handler); }; ObservableValue.prototype.observe = function (listener, fireImmediately) { if (fireImmediately) listener(this.value, undefined); return registerListener(this, listener); }; ObservableValue.prototype.toJSON = function () { return this.get(); }; ObservableValue.prototype.toString = function () { return this.name + "[" + this.value + "]"; }; return ObservableValue; }(BaseAtom)); var isObservableValue = createInstanceofPredicate("ObservableValue", ObservableValue); function getAtom(thing, property) { if (typeof thing === "object" && thing !== null) { if (isObservableArray(thing)) { invariant(property === undefined, "It is not possible to get index atoms from arrays"); return thing.$mobx.atom; } if (isObservableMap(thing)) { if (property === undefined) return getAtom(thing._keys); var observable_2 = thing._data[property] || thing._hasMap[property]; invariant(!!observable_2, "the entry '" + property + "' does not exist in the observable map '" + getDebugName(thing) + "'"); return observable_2; } runLazyInitializers(thing); if (isObservableObject(thing)) { invariant(!!property, "please specify a property"); var observable_3 = thing.$mobx.values[property]; invariant(!!observable_3, "no observable property '" + property + "' found on the observable object '" + getDebugName(thing) + "'"); return observable_3; } if (isAtom(thing) || isComputedValue(thing) || isReaction(thing)) { return thing; } } else if (typeof thing === "function") { if (isReaction(thing.$mobx)) { return thing.$mobx; } } invariant(false, "Cannot obtain atom from " + thing); } function getAdministration(thing, property) { invariant(thing, "Expecting some object"); if (property !== undefined) return getAdministration(getAtom(thing, property)); if (isAtom(thing) || isComputedValue(thing) || isReaction(thing)) return thing; if (isObservableMap(thing)) return thing; runLazyInitializers(thing); if (thing.$mobx) return thing.$mobx; invariant(false, "Cannot obtain administration from " + thing); } function getDebugName(thing, property) { var named; if (property !== undefined) named = getAtom(thing, property); else if (isObservableObject(thing) || isObservableMap(thing)) named = getAdministration(thing); else named = getAtom(thing); return named.name; } function createClassPropertyDecorator(onInitialize, get, set, enumerable, allowCustomArguments) { function classPropertyDecorator(target, key, descriptor, customArgs, argLen) { invariant(allowCustomArguments || quacksLikeADecorator(arguments), "This function is a decorator, but it wasn't invoked like a decorator"); if (!descriptor) { var newDescriptor = { enumerable: enumerable, configurable: true, get: function () { if (!this.__mobxInitializedProps || this.__mobxInitializedProps[key] !== true) typescriptInitializeProperty(this, key, undefined, onInitialize, customArgs, descriptor); return get.call(this, key); }, set: function (v) { if (!this.__mobxInitializedProps || this.__mobxInitializedProps[key] !== true) { typescriptInitializeProperty(this, key, v, onInitialize, customArgs, descriptor); } else { set.call(this, key, v); } } }; if (arguments.length < 3 || arguments.length === 5 && argLen < 3) { Object.defineProperty(target, key, newDescriptor); } return newDescriptor; } else { if (!hasOwnProperty(target, "__mobxLazyInitializers")) { addHiddenProp(target, "__mobxLazyInitializers", (target.__mobxLazyInitializers && target.__mobxLazyInitializers.slice()) || []); } var value_1 = descriptor.value, initializer_1 = descriptor.initializer; target.__mobxLazyInitializers.push(function (instance) { onInitialize(instance, key, (initializer_1 ? initializer_1.call(instance) : value_1), customArgs, descriptor); }); return { enumerable: enumerable, configurable: true, get: function () { if (this.__mobxDidRunLazyInitializers !== true) runLazyInitializers(this); return get.call(this, key); }, set: function (v) { if (this.__mobxDidRunLazyInitializers !== true) runLazyInitializers(this); set.call(this, key, v); } }; } } if (allowCustomArguments) { return function () { if (quacksLikeADecorator(arguments)) return classPropertyDecorator.apply(null, arguments); var outerArgs = arguments; var argLen = arguments.length; return function (target, key, descriptor) { return classPropertyDecorator(target, key, descriptor, outerArgs, argLen); }; }; } return classPropertyDecorator; } function typescriptInitializeProperty(instance, key, v, onInitialize, customArgs, baseDescriptor) { if (!hasOwnProperty(instance, "__mobxInitializedProps")) addHiddenProp(instance, "__mobxInitializedProps", {}); instance.__mobxInitializedProps[key] = true; onInitialize(instance, key, v, customArgs, baseDescriptor); } function runLazyInitializers(instance) { if (instance.__mobxDidRunLazyInitializers === true) return; if (instance.__mobxLazyInitializers) { addHiddenProp(instance, "__mobxDidRunLazyInitializers", true); instance.__mobxDidRunLazyInitializers && instance.__mobxLazyInitializers.forEach(function (initializer) { return initializer(instance); }); } } function quacksLikeADecorator(args) { return (args.length === 2 || args.length === 3) && typeof args[1] === "string"; } function iteratorSymbol() { return (typeof Symbol === "function" && Symbol.iterator) || "@@iterator"; } var IS_ITERATING_MARKER = "__$$iterating"; function arrayAsIterator(array) { invariant(array[IS_ITERATING_MARKER] !== true, "Illegal state: cannot recycle array as iterator"); addHiddenFinalProp(array, IS_ITERATING_MARKER, true); var idx = -1; addHiddenFinalProp(array, "next", function next() { idx++; return { done: idx >= this.length, value: idx < this.length ? this[idx] : undefined }; }); return array; } function declareIterator(prototType, iteratorFactory) { addHiddenFinalProp(prototType, iteratorSymbol(), iteratorFactory); } var SimpleEventEmitter = (function () { function SimpleEventEmitter() { this.listeners = []; deprecated("extras.SimpleEventEmitter is deprecated and will be removed in the next major release"); } SimpleEventEmitter.prototype.emit = function () { var listeners = this.listeners.slice(); for (var i = 0, l = listeners.length; i < l; i++) listeners[i].apply(null, arguments); }; SimpleEventEmitter.prototype.on = function (listener) { var _this = this; this.listeners.push(listener); return once(function () { var idx = _this.listeners.indexOf(listener); if (idx !== -1) _this.listeners.splice(idx, 1); }); }; SimpleEventEmitter.prototype.once = function (listener) { var subscription = this.on(function () { subscription(); listener.apply(this, arguments); }); return subscription; }; return SimpleEventEmitter; }()); exports.SimpleEventEmitter = SimpleEventEmitter; var EMPTY_ARRAY = []; Object.freeze(EMPTY_ARRAY); function getNextId() { return ++globalState.mobxGuid; } function invariant(check, message, thing) { if (!check) throw new Error("[mobx] Invariant failed: " + message + (thing ? " in '" + thing + "'" : "")); } var deprecatedMessages = []; function deprecated(msg) { if (deprecatedMessages.indexOf(msg) !== -1) return; deprecatedMessages.push(msg); console.error("[mobx] Deprecated: " + msg); } function once(func) { var invoked = false; return function () { if (invoked) return; invoked = true; return func.apply(this, arguments); }; } var noop = function () { }; function unique(list) { var res = []; list.forEach(function (item) { if (res.indexOf(item) === -1) res.push(item); }); return res; } function joinStrings(things, limit, separator) { if (limit === void 0) { limit = 100; } if (separator === void 0) { separator = " - "; } if (!things) return ""; var sliced = things.slice(0, limit); return "" + sliced.join(separator) + (things.length > limit ? " (... and " + (things.length - limit) + "more)" : ""); } function isObject(value) { return value !== null && typeof value === "object"; } function isPlainObject(value) { if (value === null || typeof value !== "object") return false; var proto = Object.getPrototypeOf(value); return proto === Object.prototype || proto === null; } function objectAssign() { var res = arguments[0]; for (var i = 1, l = arguments.length; i < l; i++) { var source = arguments[i]; for (var key in source) if (hasOwnProperty(source, key)) { res[key] = source[key]; } } return res; } function valueDidChange(compareStructural, oldValue, newValue) { return compareStructural ? !deepEquals(oldValue, newValue) : oldValue !== newValue; } var prototypeHasOwnProperty = Object.prototype.hasOwnProperty; function hasOwnProperty(object, propName) { return prototypeHasOwnProperty.call(object, propName); } function makeNonEnumerable(object, propNames) { for (var i = 0; i < propNames.length; i++) { addHiddenProp(object, propNames[i], object[propNames[i]]); } } function addHiddenProp(object, propName, value) { Object.defineProperty(object, propName, { enumerable: false, writable: true, configurable: true, value: value }); } function addHiddenFinalProp(object, propName, value) { Object.defineProperty(object, propName, { enumerable: false, writable: false, configurable: true, value: value }); } function isPropertyConfigurable(object, prop) { var descriptor = Object.getOwnPropertyDescriptor(object, prop); return !descriptor || (descriptor.configurable !== false && descriptor.writable !== false); } function assertPropertyConfigurable(object, prop) { invariant(isPropertyConfigurable(object, prop), "Cannot make property '" + prop + "' observable, it is not configurable and writable in the target object"); } function getEnumerableKeys(obj) { var res = []; for (var key in obj) res.push(key); return res; } function deepEquals(a, b) { if (a === null && b === null) return true; if (a === undefined && b === undefined) return true; var aIsArray = isArrayLike(a); if (aIsArray !== isArrayLike(b)) { return false; } else if (aIsArray) { if (a.length !== b.length) return false; for (var i = a.length - 1; i >= 0; i--) if (!deepEquals(a[i], b[i])) return false; return true; } else if (typeof a === "object" && typeof b === "object") { if (a === null || b === null) return false; if (getEnumerableKeys(a).length !== getEnumerableKeys(b).length) return false; for (var prop in a) { if (!(prop in b)) return false; if (!deepEquals(a[prop], b[prop])) return false; } return true; } return a === b; } function createInstanceofPredicate(name, clazz) { var propName = "isMobX" + name; clazz.prototype[propName] = true; return function (x) { return isObject(x) && x[propName] === true; }; } function isArrayLike(x) { return Array.isArray(x) || isObservableArray(x); } exports.isArrayLike = isArrayLike;
examples/real-world/containers/DevTools.js
paulkogel/redux
import React from 'react' import { createDevTools } from 'redux-devtools' import LogMonitor from 'redux-devtools-log-monitor' import DockMonitor from 'redux-devtools-dock-monitor' export default createDevTools( <DockMonitor toggleVisibilityKey="ctrl-h" changePositionKey="ctrl-w"> <LogMonitor /> </DockMonitor> )
website/core/Site.js
ljhsai/react-native
/** * Copyright (c) 2015-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. * * @providesModule Site */ var React = require('React'); var HeaderLinks = require('HeaderLinks'); var Site = React.createClass({ render: function() { var title = this.props.title ? this.props.title + ' – ' : ''; title += 'React Native | A framework for building native apps using React'; return ( <html> <head> <meta charSet="utf-8" /> <meta httpEquiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <title>{title}</title> <meta name="viewport" content="width=device-width" /> <meta property="og:title" content={title} /> <meta property="og:type" content="website" /> <meta property="og:url" content="http://facebook.github.io/react-native/index.html" /> <meta property="og:image" content="http://facebook.github.io/react-native/img/opengraph.png?2" /> <meta property="og:description" content="A framework for building native apps using React" /> <link rel="shortcut icon" href="/react-native/img/favicon.png?2" /> <link rel="stylesheet" href="/react-native/css/react-native.css" /> <script type="text/javascript" src="//use.typekit.net/vqa1hcx.js"></script> <script type="text/javascript">{'try{Typekit.load();}catch(e){}'}</script> </head> <body> <div className="container"> <div className="nav-main"> <div className="wrap"> <a className="nav-home" href="/react-native/"> <img src="/react-native/img/header_logo.png" /> React Native </a> <HeaderLinks section={this.props.section} /> </div> </div> {this.props.children} <footer className="wrap"> <div className="right">© 2015 Facebook Inc.</div> </footer> </div> <div id="fb-root" /> <script dangerouslySetInnerHTML={{__html: ` (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-41298772-2', 'facebook.github.io'); ga('send', 'pageview'); !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id) ){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); `}} /> </body> </html> ); } }); module.exports = Site;
ajax/libs/redux-form/0.0.4/react-redux.min.js
viskin/cdnjs
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReduxForm=t(require("react")):e.ReduxForm=t(e.React)}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=r(6),u=n(o),a=r(7),i=n(a);t.default=i.default,t.createFormReducer=u.default},function(e,t){"use strict";t.__esModule=!0;var r="REDUX_FORM_CHANGE";t.CHANGE=r;var n="REDUX_FORM_SHOW_ALL";t.SHOW_ALL=n;var o="REDUX_FORM_RESET";t.RESET=o},function(e,t){"use strict";function r(e){return e.shape({subscribe:e.func.isRequired,dispatch:e.func.isRequired,getState:e.func.isRequired})}t.__esModule=!0,t.default=r,e.exports=t.default},function(e,t){"use strict";function r(e){return e.displayName||e.name||"Component"}t.__esModule=!0,t.default=r,e.exports=t.default},function(t,r){t.exports=e},function(e,t,r){"use strict";function n(e,t,r){return{type:a.CHANGE,form:e,field:t,value:r}}function o(e){return{type:a.SHOW_ALL,form:e}}function u(e){return{type:a.RESET,form:e}}t.__esModule=!0,t.change=n,t.showAll=o,t.reset=u;var a=r(1)},function(e,t,r){"use strict";function n(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n={data:r,visited:{}};return function(){var r,a,i=arguments.length<=0||void 0===arguments[0]?n:arguments[0],c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(c.form!==e)return i;switch(c.type){case u.CHANGE:var s=o({},i.data,(r={},r[c.field]=c.value,r));return o({},i,{data:s,visited:o({},i.visited,(a={},a[c.field]=!0,a))});case u.SHOW_ALL:var l={};return t.forEach(function(e){return l[e]=!0}),o({},i,{visited:l});case u.RESET:return n;default:return i}}}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t.default=n;var u=r(1);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){return function(r){return function(n){function a(){o(this,y),n.apply(this,arguments)}u(a,n),a.prototype.render=function(){var n=this.props,o=n.slice,u=n.dispatch,a=i({},this.props);delete a.slice,delete a.dispatch;var c=function(t){return function(r){return u(p.change(e,t,r.target.value))}};return l.default.createElement(r,i({handleChange:c,showAll:function(){return u(p.showAll(e))},reset:function(){return u(p.reset(e))},errors:t(o.data),data:o.data},a))},c(a,null,[{key:"displayName",value:"ReduxForm("+d(r)+")",enumerable:!0},{key:"DecoratedComponent",value:r,enumerable:!0},{key:"propTypes",value:{slice:s.PropTypes.object,dispatch:s.PropTypes.func.isRequired},enumerable:!0}]);var y=a;return a=f.connect(function(t){return{slice:t[e]}})(a)||a}(s.Component)}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c=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}}();t.default=a;var s=r(4),l=n(s),f=r(13),p=r(5),d=function(e){return e.displayName||e.name||"Component"};e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=a.default(e),r=l.default(e),n=c.default(e,t),o=p.default(e,r);return{Provider:t,Connector:r,provide:n,connect:o}}t.__esModule=!0,t.default=o;var u=r(12),a=n(u),i=r(11),c=n(i),s=r(10),l=n(s),f=r(9),p=n(f);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(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&&(e.__proto__=t)}function a(e,t){var r=e.Component;return function(n){return function(a){return function(r){function s(){o(this,s),r.apply(this,arguments)}return u(s,r),s.prototype.shouldComponentUpdate=function(e){return!p.default(this.props,e)},s.prototype.render=function(){var r=this;return e.createElement(t,{select:function(e){return n(e,r.props)}},function(t){return e.createElement(a,i({},t,r.props))})},c(s,null,[{key:"displayName",value:"Connector("+l.default(a)+")",enumerable:!0},{key:"DecoratedComponent",value:a,enumerable:!0}]),s}(r)}}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c=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}}();t.default=a;var s=r(3),l=n(s),f=r(16),p=n(f);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(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&&(e.__proto__=t)}function a(e){var t=e.Component,r=e.PropTypes,n=l.default(r);return function(e){function t(r,n){o(this,t),e.call(this,r,n),this.state=this.selectState(r,n)}return u(t,e),t.prototype.shouldComponentUpdate=function(e,t){return!this.isSliceEqual(this.state.slice,t.slice)||!p.default(this.props,e)},t.prototype.isSliceEqual=function(e,t){var r=e===t;return r?!0:"object"!=typeof e||"object"!=typeof t?r:p.default(e,t)},t.prototype.componentDidMount=function(){this.unsubscribe=this.context.store.subscribe(this.handleChange.bind(this)),this.handleChange()},t.prototype.componentWillReceiveProps=function(e){e.select!==this.props.select&&this.handleChange(e)},t.prototype.componentWillUnmount=function(){this.unsubscribe()},t.prototype.handleChange=function(){var e=void 0===arguments[0]?this.props:arguments[0],t=this.selectState(e,this.context);this.isSliceEqual(this.state.slice,t.slice)||this.setState(t)},t.prototype.selectState=function(e,t){var r=t.store.getState(),n=e.select(r);return h.default(y.default(n),"The return value of `select` prop must be an object. Instead received %s.",n),{slice:n}},t.prototype.render=function(){var e=this.props.children,t=this.state.slice,r=this.context.store.dispatch;return e(i({dispatch:r},t))},c(t,null,[{key:"contextTypes",value:{store:n.isRequired},enumerable:!0},{key:"propTypes",value:{children:r.func.isRequired,select:r.func.isRequired},enumerable:!0},{key:"defaultProps",value:{select:function(e){return e}},enumerable:!0}]),t}(t)}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c=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}}();t.default=a;var s=r(2),l=n(s),f=r(15),p=n(f),d=r(14),y=n(d),v=r(17),h=n(v);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(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&&(e.__proto__=t)}function a(e,t){var r=e.Component;return function(n){return function(a){return function(r){function c(){o(this,c),r.apply(this,arguments)}return u(c,r),c.prototype.render=function(){var r=this;return e.createElement(t,{store:n},function(){return e.createElement(a,r.props)})},i(c,null,[{key:"displayName",value:"Provider("+s.default(a)+")",enumerable:!0},{key:"DecoratedComponent",value:a,enumerable:!0}]),c}(r)}}}t.__esModule=!0;var i=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}}();t.default=a;var c=r(3),s=n(c);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(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&&(e.__proto__=t)}function a(e){var t=e.Component,r=e.PropTypes,n=s.default(r);return function(e){function t(r,n){o(this,t),e.call(this,r,n),this.state={store:r.store}}return u(t,e),t.prototype.getChildContext=function(){return{store:this.state.store}},t.prototype.componentWillReceiveProps=function(e){var t=this.state.store,r=e.store;if(t!==r){var n=r.getReducer();t.replaceReducer(n)}},t.prototype.render=function(){var e=this.props.children;return e()},i(t,null,[{key:"childContextTypes",value:{store:n.isRequired},enumerable:!0},{key:"propTypes",value:{children:r.func.isRequired},enumerable:!0}]),t}(t)}t.__esModule=!0;var i=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}}();t.default=a;var c=r(2),s=n(c);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=r(4),u=n(o),a=r(8),i=n(a),c=i.default(u.default),s=c.Provider,l=c.Connector,f=c.provide,p=c.connect;t.Provider=s,t.Connector=l,t.provide=f,t.connect=p},function(e,t){"use strict";function r(e){return e?"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype:!1}t.__esModule=!0,t.default=r,e.exports=t.default},function(e,t){"use strict";function r(e,t){if(e===t)return!0;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var o=Object.prototype.hasOwnProperty,u=0;u<r.length;u++)if(!o.call(t,r[u])||e[r[u]]!==t[r[u]])return!1;return!0}t.__esModule=!0,t.default=r,e.exports=t.default},function(e,t){"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 r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var o=Object.prototype.hasOwnProperty,u=0;u<r.length;u++){if(!o.call(t,r[u]))return!1;var a=e[r[u]],i=t[r[u]];if(a!==i||"object"==typeof a||"object"==typeof i)return!1}return!0}t.__esModule=!0,t.default=r,e.exports=t.default},function(e,t,r){"use strict";var n=function(e,t,r,n,o,u,a,i){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[r,n,o,u,a,i],l=0;c=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return s[l++]}))}throw c.framesToPop=1,c}};e.exports=n}])});
packages/mineral-ui-icons/src/IconScanner.js
mineral-ui/mineral-ui
/* @flow */ import React from 'react'; import Icon from 'mineral-ui/Icon'; import type { IconProps } from 'mineral-ui/Icon/types'; /* eslint-disable prettier/prettier */ export default function IconScanner(props: IconProps) { const iconProps = { rtl: false, ...props }; return ( <Icon {...iconProps}> <g> <path d="M19.8 10.7L4.2 5l-.7 1.9L17.6 12H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5.5c0-.8-.5-1.6-1.2-1.8zM7 17H5v-2h2v2zm12 0H9v-2h10v2z"/> </g> </Icon> ); } IconScanner.displayName = 'IconScanner'; IconScanner.category = 'hardware';
src/containers/App.js
germohn/tarkvaraprojekt
/* eslint-disable no-undef */ import React from 'react'; import {getStages, getTags} from './util/UniqueTagsAndStages'; import HeaderBlock from './HeaderBlock/HeaderBlock'; const App = () => { return ( <div className="app"> <div className="container"> <HeaderBlock data={data} tags={getTags(data)} stages={getStages(data)}/> </div> <div className="funderbeam"> <p id="funderbeamLink">Powered by</p> <a href="https://markets.funderbeam.com" target="_blank"> <img id="funderbeamLogo" src="https://raw.githubusercontent.com/germohn/tarkvaraprojekt/master/styles/img/funderbeam2.png" alt="funderbeam"/> </a> </div> </div> ); }; export default App;
ajax/libs/jQRangeSlider/5.3.0/jQRangeSliderBar.min.js
dlueth/cdnjs
(function(a,b){a.widget("ui.rangeSliderBar",a.ui.rangeSliderDraggable,{options:{leftHandle:null,rightHandle:null,bounds:{min:0,max:100},type:"rangeSliderHandle",range:false,drag:function(){},stop:function(){},values:{min:0,max:20},wheelSpeed:4,wheelMode:null},_values:{min:0,max:20},_waitingToInit:2,_wheelTimeout:false,_create:function(){a.ui.rangeSliderDraggable.prototype._create.apply(this);this.element.css("position","absolute").css("top",0).addClass("ui-rangeSlider-bar");this.options.leftHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this));this.options.rightHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this));this._bindHandles();this._values=this.options.values;this._setWheelModeOption(this.options.wheelMode)},destroy:function(){this.options.leftHandle.unbind(".bar");this.options.rightHandle.unbind(".bar");this.options=null;a.ui.rangeSliderDraggable.prototype.destroy.apply(this)},_setOption:function(c,d){if(c==="range"){this._setRangeOption(d)}else{if(c==="wheelSpeed"){this._setWheelSpeedOption(d)}else{if(c==="wheelMode"){this._setWheelModeOption(d)}}}},_setRangeOption:function(e){if(typeof e!=="object"||e===null){e=false}if(e===false&&this.options.range===false){return}if(e!==false){var d=typeof e.min==="undefined"?this.options.range.min||false:e.min,c=typeof e.max==="undefined"?this.options.range.max||false:e.max;this.options.range={min:d,max:c}}else{this.options.range=false}this._setLeftRange();this._setRightRange()},_setWheelSpeedOption:function(c){if(typeof c==="number"&&c>0){this.options.wheelSpeed=c}},_setWheelModeOption:function(c){if(c===null||c===false||c==="zoom"||c==="scroll"){if(this.options.wheelMode!==c){this.element.parent().unbind("mousewheel.bar")}this._bindMouseWheel(c);this.options.wheelMode=c}},_bindMouseWheel:function(c){if(c==="zoom"){this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelZoom,this))}else{if(c==="scroll"){this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelScroll,this))}}},_setLeftRange:function(){if(this.options.range===false){return false}var c=this._values.max,d={min:false,max:false};if((this.options.range.min||false)!==false){d.max=this._leftHandle("substract",c,this.options.range.min)}else{d.max=false}if((this.options.range.max||false)!==false){d.min=this._leftHandle("substract",c,this.options.range.max)}else{d.min=false}this._leftHandle("option","range",d)},_setRightRange:function(){var d=this._values.min,c={min:false,max:false};if((this.options.range.min||false)!==false){c.min=this._rightHandle("add",d,this.options.range.min)}else{c.min=false}if((this.options.range.max||false)!==false){c.max=this._rightHandle("add",d,this.options.range.max)}else{c.max=false}this._rightHandle("option","range",c)},_deactivateRange:function(){this._leftHandle("option","range",false);this._rightHandle("option","range",false)},_reactivateRange:function(){this._setRangeOption(this.options.range)},_onInitialized:function(){this._waitingToInit--;if(this._waitingToInit===0){this._initMe()}},_initMe:function(){this._cache();this.min(this._values.min);this.max(this._values.max);var d=this._leftHandle("position"),c=this._rightHandle("position")+this.options.rightHandle.width();this.element.offset({left:d});this.element.css("width",c-d)},_leftHandle:function(){return this._handleProxy(this.options.leftHandle,arguments)},_rightHandle:function(){return this._handleProxy(this.options.rightHandle,arguments)},_handleProxy:function(d,c){var e=Array.prototype.slice.call(c);return d[this.options.type].apply(d,e)},_cache:function(){a.ui.rangeSliderDraggable.prototype._cache.apply(this);this._cacheHandles()},_cacheHandles:function(){this.cache.rightHandle={};this.cache.rightHandle.width=this.options.rightHandle.width();this.cache.rightHandle.offset=this.options.rightHandle.offset();this.cache.leftHandle={};this.cache.leftHandle.offset=this.options.leftHandle.offset()},_mouseStart:function(c){a.ui.rangeSliderDraggable.prototype._mouseStart.apply(this,[c]);this._deactivateRange()},_mouseStop:function(c){a.ui.rangeSliderDraggable.prototype._mouseStop.apply(this,[c]);this._cacheHandles();this._values.min=this._leftHandle("value");this._values.max=this._rightHandle("value");this._reactivateRange();this._leftHandle().trigger("stop");this._rightHandle().trigger("stop")},_onDragLeftHandle:function(c,d){this._cacheIfNecessary();if(this._switchedValues()){this._switchHandles();this._onDragRightHandle(c,d);return}this._values.min=d.value;this.cache.offset.left=d.offset.left;this.cache.leftHandle.offset=d.offset;this._positionBar()},_onDragRightHandle:function(c,d){this._cacheIfNecessary();if(this._switchedValues()){this._switchHandles();this._onDragLeftHandle(c,d);return}this._values.max=d.value;this.cache.rightHandle.offset=d.offset;this._positionBar()},_positionBar:function(){var c=this.cache.rightHandle.offset.left+this.cache.rightHandle.width-this.cache.leftHandle.offset.left;this.cache.width.inner=c;this.element.css("width",c).offset({left:this.cache.leftHandle.offset.left})},_onHandleStop:function(){this._setLeftRange();this._setRightRange()},_switchedValues:function(){if(this.min()>this.max()){var c=this._values.min;this._values.min=this._values.max;this._values.max=c;return true}return false},_switchHandles:function(){var c=this.options.leftHandle;this.options.leftHandle=this.options.rightHandle;this.options.rightHandle=c;this._leftHandle("option","isLeft",true);this._rightHandle("option","isLeft",false);this._bindHandles();this._cacheHandles()},_bindHandles:function(){this.options.leftHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragLeftHandle,this));this.options.rightHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragRightHandle,this))},_constraintPosition:function(e){var c={},d;c.left=a.ui.rangeSliderDraggable.prototype._constraintPosition.apply(this,[e]);c.left=this._leftHandle("position",c.left);d=this._rightHandle("position",c.left+this.cache.width.outer-this.cache.rightHandle.width);c.width=d-c.left+this.cache.rightHandle.width;return c},_applyPosition:function(c){a.ui.rangeSliderDraggable.prototype._applyPosition.apply(this,[c.left]);this.element.width(c.width)},_mouseWheelZoom:function(h,i,d,c){var e=this._values.min+(this._values.max-this._values.min)/2,f={},g={};if(this.options.range===false||this.options.range.min===false){f.max=e;g.min=e}else{f.max=e-this.options.range.min/2;g.min=e+this.options.range.min/2}if(this.options.range!==false&&this.options.range.max!==false){f.min=e-this.options.range.max/2;g.max=e+this.options.range.max/2}this._leftHandle("option","range",f);this._rightHandle("option","range",g);clearTimeout(this._wheelTimeout);this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200);this.zoomOut(c*this.options.wheelSpeed);return false},_mouseWheelScroll:function(e,f,d,c){if(this._wheelTimeout===false){this.startScroll()}else{clearTimeout(this._wheelTimeout)}this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200);this.scrollLeft(c*this.options.wheelSpeed);return false},_wheelStop:function(){this.stopScroll();this._wheelTimeout=false},min:function(c){return this._leftHandle("value",c)},max:function(c){return this._rightHandle("value",c)},startScroll:function(){this._deactivateRange()},stopScroll:function(){this._reactivateRange();this._triggerMouseEvent("stop");this._leftHandle().trigger("stop");this._rightHandle().trigger("stop")},scrollLeft:function(c){c=c||1;if(c<0){return this.scrollRight(-c)}c=this._leftHandle("moveLeft",c);this._rightHandle("moveLeft",c);this.update();this._triggerMouseEvent("scroll")},scrollRight:function(c){c=c||1;if(c<0){return this.scrollLeft(-c)}c=this._rightHandle("moveRight",c);this._leftHandle("moveRight",c);this.update();this._triggerMouseEvent("scroll")},zoomIn:function(d){d=d||1;if(d<0){return this.zoomOut(-d)}var c=this._rightHandle("moveLeft",d);if(d>c){c=c/2;this._rightHandle("moveRight",c)}this._leftHandle("moveRight",c);this.update();this._triggerMouseEvent("zoom")},zoomOut:function(d){d=d||1;if(d<0){return this.zoomIn(-d)}var c=this._rightHandle("moveRight",d);if(d>c){c=c/2;this._rightHandle("moveLeft",c)}this._leftHandle("moveLeft",c);this.update();this._triggerMouseEvent("zoom")},values:function(d,c){if(typeof d!=="undefined"&&typeof c!=="undefined"){var e=Math.min(d,c),f=Math.max(d,c);this._deactivateRange();this.options.leftHandle.unbind(".bar");this.options.rightHandle.unbind(".bar");this._values.min=this._leftHandle("value",e);this._values.max=this._rightHandle("value",f);this._bindHandles();this._reactivateRange();this.update()}return{min:this._values.min,max:this._values.max}},update:function(){this._values.min=this.min();this._values.max=this.max();this._cache();this._positionBar()}})}(jQuery));
packages/material-ui-icons/src/KeyboardArrowDown.js
allanalexandre/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" /><path fill="none" d="M0 0h24v24H0V0z" /></React.Fragment> , 'KeyboardArrowDown');
ajax/libs/semantic-ui-react/0.53.0/semantic-ui-react.min.js
sreym/cdnjs
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports.semanticUIReact=t(require("React"),require("ReactDOM")):e.semanticUIReact=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="/",t(0)}([/*!********************!*\ !*** ./src/umd.js ***! \********************/ 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}var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=r(/*! ./addons */29),s=n(a),l=r(/*! ./collections */248),i=n(l),u=r(/*! ./elements */4),p=n(u),c=r(/*! ./modules */21),d=n(c),f=r(/*! ./views */281),y=n(f);e.exports=o({},s,i,p,d,y)},/*!************************!*\ !*** external "React" ***! \************************/ function(t,r){t.exports=e},/*!**************************!*\ !*** ./src/lib/index.js ***! \**************************/ 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 o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.objectDiff=t.numberToWord=t.numberToWordMap=t.keyboardKey=t.SUI=t.META=t.getElementType=t.getUnhandledProps=t.makeDebugger=t.debug=t.customPropTypes=t.useVerticalAlignProp=t.useTextAlignProp=t.useWidthProp=t.useKeyOrValueAndKey=t.useValueAndKey=t.useKeyOnly=t.childrenUtils=t.AutoControlledComponent=void 0;var a=r(/*! ./AutoControlledComponent */261);Object.defineProperty(t,"AutoControlledComponent",{enumerable:!0,get:function(){return o(a)["default"]}});var s=r(/*! ./classNameBuilders */265);Object.defineProperty(t,"useKeyOnly",{enumerable:!0,get:function(){return s.useKeyOnly}}),Object.defineProperty(t,"useValueAndKey",{enumerable:!0,get:function(){return s.useValueAndKey}}),Object.defineProperty(t,"useKeyOrValueAndKey",{enumerable:!0,get:function(){return s.useKeyOrValueAndKey}}),Object.defineProperty(t,"useWidthProp",{enumerable:!0,get:function(){return s.useWidthProp}}),Object.defineProperty(t,"useTextAlignProp",{enumerable:!0,get:function(){return s.useTextAlignProp}}),Object.defineProperty(t,"useVerticalAlignProp",{enumerable:!0,get:function(){return s.useVerticalAlignProp}});var l=r(/*! ./debug */267);Object.defineProperty(t,"debug",{enumerable:!0,get:function(){return l.debug}}),Object.defineProperty(t,"makeDebugger",{enumerable:!0,get:function(){return l.makeDebugger}});var i=r(/*! ./factories */268);Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})});var u=r(/*! ./getUnhandledProps */270);Object.defineProperty(t,"getUnhandledProps",{enumerable:!0,get:function(){return o(u)["default"]}});var p=r(/*! ./getElementType */269);Object.defineProperty(t,"getElementType",{enumerable:!0,get:function(){return o(p)["default"]}});var c=r(/*! ./keyboardKey */271);Object.defineProperty(t,"keyboardKey",{enumerable:!0,get:function(){return o(c)["default"]}});var d=r(/*! ./numberToWord */68);Object.defineProperty(t,"numberToWordMap",{enumerable:!0,get:function(){return d.numberToWordMap}}),Object.defineProperty(t,"numberToWord",{enumerable:!0,get:function(){return d.numberToWord}});var f=r(/*! ./objectDiff */272);Object.defineProperty(t,"objectDiff",{enumerable:!0,get:function(){return f.objectDiff}});var y=r(/*! ./childrenUtils */264),m=n(y),v=r(/*! ./customPropTypes */266),h=n(v),T=r(/*! ./META */262),P=n(T),g=r(/*! ./SUI */263),b=n(g);t.childrenUtils=m,t.customPropTypes=h,t.META=P,t.SUI=b},/*!*******************************!*\ !*** ./~/classnames/index.js ***! \*******************************/ function(e,t,r){var n,o;/*! Copyright (c) 2016 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ !function(){"use strict";function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n))e.push(r.apply(null,n));else if("object"===o)for(var s in n)a.call(n,s)&&n[s]&&e.push(s)}}return e.join(" ")}var a={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=r:(n=[],o=function(){return r}.apply(t,n),!(void 0!==o&&(e.exports=o)))}()},/*!*******************************!*\ !*** ./src/elements/index.js ***! \*******************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(/*! ./Button/Button */249);Object.defineProperty(t,"Button",{enumerable:!0,get:function(){return n(o)["default"]}});var a=r(/*! ./Button/ButtonContent */134);Object.defineProperty(t,"ButtonContent",{enumerable:!0,get:function(){return n(a)["default"]}});var s=r(/*! ./Button/ButtonGroup */135);Object.defineProperty(t,"ButtonGroup",{enumerable:!0,get:function(){return n(s)["default"]}});var l=r(/*! ./Button/ButtonOr */136);Object.defineProperty(t,"ButtonOr",{enumerable:!0,get:function(){return n(l)["default"]}});var i=r(/*! ./Container/Container */250);Object.defineProperty(t,"Container",{enumerable:!0,get:function(){return n(i)["default"]}});var u=r(/*! ./Divider/Divider */251);Object.defineProperty(t,"Divider",{enumerable:!0,get:function(){return n(u)["default"]}});var p=r(/*! ./Flag/Flag */252);Object.defineProperty(t,"Flag",{enumerable:!0,get:function(){return n(p)["default"]}});var c=r(/*! ./Header/Header */253);Object.defineProperty(t,"Header",{enumerable:!0,get:function(){return n(c)["default"]}});var d=r(/*! ./Header/HeaderContent */137);Object.defineProperty(t,"HeaderContent",{enumerable:!0,get:function(){return n(d)["default"]}});var f=r(/*! ./Header/HeaderSubheader */138);Object.defineProperty(t,"HeaderSubheader",{enumerable:!0,get:function(){return n(f)["default"]}});var y=r(/*! ./Icon/Icon */254);Object.defineProperty(t,"Icon",{enumerable:!0,get:function(){return n(y)["default"]}});var m=r(/*! ./Icon/IconGroup */139);Object.defineProperty(t,"IconGroup",{enumerable:!0,get:function(){return n(m)["default"]}});var v=r(/*! ./Image/Image */140);Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return n(v)["default"]}});var h=r(/*! ./Image/ImageGroup */141);Object.defineProperty(t,"ImageGroup",{enumerable:!0,get:function(){return n(h)["default"]}});var T=r(/*! ./Input/Input */255);Object.defineProperty(t,"Input",{enumerable:!0,get:function(){return n(T)["default"]}});var P=r(/*! ./Label/Label */256);Object.defineProperty(t,"Label",{enumerable:!0,get:function(){return n(P)["default"]}});var g=r(/*! ./Label/LabelDetail */142);Object.defineProperty(t,"LabelDetail",{enumerable:!0,get:function(){return n(g)["default"]}});var b=r(/*! ./Label/LabelGroup */143);Object.defineProperty(t,"LabelGroup",{enumerable:!0,get:function(){return n(b)["default"]}});var O=r(/*! ./List/List */257);Object.defineProperty(t,"List",{enumerable:!0,get:function(){return n(O)["default"]}});var _=r(/*! ./List/ListContent */144);Object.defineProperty(t,"ListContent",{enumerable:!0,get:function(){return n(_)["default"]}});var E=r(/*! ./List/ListDescription */145);Object.defineProperty(t,"ListDescription",{enumerable:!0,get:function(){return n(E)["default"]}});var w=r(/*! ./List/ListHeader */146);Object.defineProperty(t,"ListHeader",{enumerable:!0,get:function(){return n(w)["default"]}});var j=r(/*! ./List/ListIcon */147);Object.defineProperty(t,"ListIcon",{enumerable:!0,get:function(){return n(j)["default"]}});var S=r(/*! ./List/ListItem */148);Object.defineProperty(t,"ListItem",{enumerable:!0,get:function(){return n(S)["default"]}});var x=r(/*! ./List/ListList */149);Object.defineProperty(t,"ListList",{enumerable:!0,get:function(){return n(x)["default"]}});var M=r(/*! ./Loader/Loader */258);Object.defineProperty(t,"Loader",{enumerable:!0,get:function(){return n(M)["default"]}});var A=r(/*! ./Rail/Rail */259);Object.defineProperty(t,"Rail",{enumerable:!0,get:function(){return n(A)["default"]}});var N=r(/*! ./Segment/Segment */260);Object.defineProperty(t,"Segment",{enumerable:!0,get:function(){return n(N)["default"]}});var I=r(/*! ./Segment/SegmentGroup */150);Object.defineProperty(t,"SegmentGroup",{enumerable:!0,get:function(){return n(I)["default"]}});var k=r(/*! ./Step/Step */151);Object.defineProperty(t,"Step",{enumerable:!0,get:function(){return n(k)["default"]}});var C=r(/*! ./Step/StepContent */152);Object.defineProperty(t,"StepContent",{enumerable:!0,get:function(){return n(C)["default"]}});var K=r(/*! ./Step/StepDescription */66);Object.defineProperty(t,"StepDescription",{enumerable:!0,get:function(){return n(K)["default"]}});var L=r(/*! ./Step/StepGroup */153);Object.defineProperty(t,"StepGroup",{enumerable:!0,get:function(){return n(L)["default"]}});var U=r(/*! ./Step/StepTitle */67);Object.defineProperty(t,"StepTitle",{enumerable:!0,get:function(){return n(U)["default"]}})},/*!*****************************!*\ !*** ./~/lodash/isArray.js ***! \*****************************/ function(e,t){var r=Array.isArray;e.exports=r},/*!************************************!*\ !*** ./~/lodash/fp/placeholder.js ***! \************************************/ function(e,t){e.exports={}},/*!*****************************!*\ !*** ./~/lodash/without.js ***! \*****************************/ function(e,t,r){var n=r(/*! ./_baseDifference */89),o=r(/*! ./_baseRest */12),a=r(/*! ./isArrayLikeObject */38),s=o(function(e,t){return a(e)?n(e,t):[]});e.exports=s},/*!********************************!*\ !*** ./~/lodash/fp/convert.js ***! \********************************/ function(e,t,r){function n(e,t,r){return o(a,e,t,r)}var o=r(/*! ./_baseConvert */402),a=r(/*! ./_util */404);e.exports=n},/*!***************************!*\ !*** ./~/lodash/_root.js ***! \***************************/ function(e,t,r){var n=r(/*! ./_freeGlobal */204),o="object"==typeof self&&self&&self.Object===Object&&self,a=n||o||Function("return this")();e.exports=a},/*!**************************!*\ !*** ./~/lodash/keys.js ***! \**************************/ function(e,t,r){function n(e){return s(e)?o(e):a(e)}var o=r(/*! ./_arrayLikeKeys */182),a=r(/*! ./_baseKeys */192),s=r(/*! ./isArrayLike */16);e.exports=n},/*!******************************!*\ !*** ./~/lodash/isObject.js ***! \******************************/ function(e,t){function r(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=r},/*!*******************************!*\ !*** ./~/lodash/_baseRest.js ***! \*******************************/ function(e,t,r){function n(e,t){return t=a(void 0===t?e.length-1:t,0),function(){for(var r=arguments,n=-1,s=a(r.length-t,0),l=Array(s);++n<s;)l[n]=r[t+n];n=-1;for(var i=Array(t+1);++n<t;)i[n]=r[n];return i[t]=l,o(e,this,i)}}var o=r(/*! ./_apply */30),a=Math.max;e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_baseIteratee.js ***! \***********************************/ function(e,t,r){function n(e){return"function"==typeof e?e:null==e?s:"object"==typeof e?l(e)?a(e[0],e[1]):o(e):i(e)}var o=r(/*! ./_baseMatches */309),a=r(/*! ./_baseMatchesProperty */310),s=r(/*! ./identity */105),l=r(/*! ./isArray */5),i=r(/*! ./property */431);e.exports=n},/*!*************************!*\ !*** ./~/lodash/map.js ***! \*************************/ function(e,t,r){function n(e,t){var r=l(e)?o:s;return r(e,a(t,3))}var o=r(/*! ./_arrayMap */18),a=r(/*! ./_baseIteratee */13),s=r(/*! ./_baseMap */308),l=r(/*! ./isArray */5);e.exports=n},/*!*******************************************!*\ !*** ./src/collections/Form/FormField.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.control,r=e.children,n=e.className,s=e.disabled,f=e.error,y=e.inline,m=e.label,v=e.required,h=e.type,T=e.width,P=(0,l["default"])((0,p.useKeyOnly)(f,"error"),(0,p.useKeyOnly)(s,"disabled"),(0,p.useKeyOnly)(y,"inline"),(0,p.useKeyOnly)(v,"required"),(0,p.useWidthProp)(T,"wide"),"field",n),g=(0,p.getUnhandledProps)(o,e),b=(0,p.getElementType)(o,e);if(!t)return m?u["default"].createElement(b,a({},g,{className:P}),u["default"].createElement("label",null,m)):u["default"].createElement(b,a({},g,{className:P}),r);var O=a({},g,{children:r,type:h});return"input"!==t||"checkbox"!==h&&"radio"!==h?t===c.Checkbox||t===d.Radio?u["default"].createElement(b,{className:P},(0,i.createElement)(t,a({},O,{label:m}))):t&&m?u["default"].createElement(b,{className:P},u["default"].createElement("label",null,m),(0,i.createElement)(t,O)):t&&!m?u["default"].createElement(b,{className:P},(0,i.createElement)(t,O)):void 0:u["default"].createElement(b,{className:P},u["default"].createElement("label",null,(0,i.createElement)(t,O)," ",m))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ../../modules */21),d=r(/*! ../../addons */29);o._meta={name:"FormField",parent:"Form",type:p.META.TYPES.COLLECTION,props:{width:p.SUI.WIDTHS,control:["button","input","select","textarea"]}},o.propTypes={as:p.customPropTypes.as,control:p.customPropTypes.some([i.PropTypes.func,i.PropTypes.oneOf(o._meta.props.control)]),children:i.PropTypes.node,className:i.PropTypes.string,disabled:i.PropTypes.bool,error:i.PropTypes.bool,inline:i.PropTypes.bool,label:i.PropTypes.string,required:p.customPropTypes.every([p.customPropTypes.demand(["label"]),i.PropTypes.bool]),type:p.customPropTypes.every([p.customPropTypes.demand(["control"])]),width:i.PropTypes.oneOf(o._meta.props.width)},t["default"]=o},/*!*********************************!*\ !*** ./~/lodash/isArrayLike.js ***! \*********************************/ function(e,t,r){function n(e){return null!=e&&a(e.length)&&!o(e)}var o=r(/*! ./isFunction */23),a=r(/*! ./isLength */108);e.exports=n},/*!*******************************!*\ !*** ./~/lodash/toInteger.js ***! \*******************************/ function(e,t,r){function n(e){var t=o(e),r=t%1;return t===t?r?t-r:t:0}var o=r(/*! ./toFinite */234);e.exports=n},/*!*******************************!*\ !*** ./~/lodash/_arrayMap.js ***! \*******************************/ function(e,t){function r(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}e.exports=r},/*!****************************!*\ !*** ./~/lodash/_toKey.js ***! \****************************/ function(e,t,r){function n(e){if("string"==typeof e||o(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}var o=r(/*! ./isSymbol */39),a=1/0;e.exports=n},/*!**********************************!*\ !*** ./~/lodash/isObjectLike.js ***! \**********************************/ function(e,t){function r(e){return!!e&&"object"==typeof e}e.exports=r},/*!******************************!*\ !*** ./src/modules/index.js ***! \******************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(/*! ./Accordion/Accordion */273);Object.defineProperty(t,"Accordion",{enumerable:!0,get:function(){return n(o)["default"]}});var a=r(/*! ./Accordion/AccordionContent */154);Object.defineProperty(t,"AccordionContent",{enumerable:!0,get:function(){return n(a)["default"]}});var s=r(/*! ./Accordion/AccordionTitle */155);Object.defineProperty(t,"AccordionTitle",{enumerable:!0,get:function(){return n(s)["default"]}});var l=r(/*! ./Checkbox/Checkbox */274);Object.defineProperty(t,"Checkbox",{enumerable:!0,get:function(){return n(l)["default"]}});var i=r(/*! ./Dropdown/Dropdown */275);Object.defineProperty(t,"Dropdown",{enumerable:!0,get:function(){return n(i)["default"]}});var u=r(/*! ./Dropdown/DropdownDivider */156);Object.defineProperty(t,"DropdownDivider",{enumerable:!0,get:function(){return n(u)["default"]}});var p=r(/*! ./Dropdown/DropdownHeader */157);Object.defineProperty(t,"DropdownHeader",{enumerable:!0,get:function(){return n(p)["default"]}});var c=r(/*! ./Dropdown/DropdownItem */158);Object.defineProperty(t,"DropdownItem",{enumerable:!0,get:function(){return n(c)["default"]}});var d=r(/*! ./Dropdown/DropdownMenu */159);Object.defineProperty(t,"DropdownMenu",{enumerable:!0,get:function(){return n(d)["default"]}});var f=r(/*! ./Modal/Modal */276);Object.defineProperty(t,"Modal",{enumerable:!0,get:function(){return n(f)["default"]}});var y=r(/*! ./Modal/ModalActions */160);Object.defineProperty(t,"ModalActions",{enumerable:!0,get:function(){return n(y)["default"]}});var m=r(/*! ./Modal/ModalContent */161);Object.defineProperty(t,"ModalContent",{enumerable:!0,get:function(){return n(m)["default"]}});var v=r(/*! ./Modal/ModalDescription */162);Object.defineProperty(t,"ModalDescription",{enumerable:!0,get:function(){return n(v)["default"]}});var h=r(/*! ./Modal/ModalHeader */163);Object.defineProperty(t,"ModalHeader",{enumerable:!0,get:function(){return n(h)["default"]}});var T=r(/*! ./Progress/Progress */277);Object.defineProperty(t,"Progress",{enumerable:!0,get:function(){return n(T)["default"]}});var P=r(/*! ./Rating/Rating */278);Object.defineProperty(t,"Rating",{enumerable:!0,get:function(){return n(P)["default"]}});var g=r(/*! ./Search/Search */279);Object.defineProperty(t,"Search",{enumerable:!0,get:function(){return n(g)["default"]}});var b=r(/*! ./Search/SearchCategory */164);Object.defineProperty(t,"SearchCategory",{enumerable:!0,get:function(){return n(b)["default"]}});var O=r(/*! ./Search/SearchResult */165);Object.defineProperty(t,"SearchResult",{enumerable:!0,get:function(){return n(O)["default"]}});var _=r(/*! ./Search/SearchResults */166);Object.defineProperty(t,"SearchResults",{enumerable:!0,get:function(){return n(_)["default"]}})},/*!********************************!*\ !*** ./~/lodash/_getNative.js ***! \********************************/ function(e,t,r){function n(e,t){var r=a(e,t);return o(r)?r:void 0}var o=r(/*! ./_baseIsNative */305),a=r(/*! ./_getValue */349);e.exports=n},/*!********************************!*\ !*** ./~/lodash/isFunction.js ***! \********************************/ function(e,t,r){function n(e){var t=o(e)?i.call(e):"";return t==a||t==s}var o=r(/*! ./isObject */11),a="[object Function]",s="[object GeneratorFunction]",l=Object.prototype,i=l.toString;e.exports=n},/*!******************************!*\ !*** ./~/lodash/toString.js ***! \******************************/ function(e,t,r){function n(e){return null==e?"":o(e)}var o=r(/*! ./_baseToString */196);e.exports=n},/*!*******************************!*\ !*** ./~/lodash/_baseEach.js ***! \*******************************/ function(e,t,r){var n=r(/*! ./_baseForOwn */189),o=r(/*! ./_createBaseEach */330),a=o(n);e.exports=a},/*!**********************************!*\ !*** ./~/lodash/_baseFlatten.js ***! \**********************************/ function(e,t,r){function n(e,t,r,s,l){var i=-1,u=e.length;for(r||(r=a),l||(l=[]);++i<u;){var p=e[i];t>0&&r(p)?t>1?n(p,t-1,r,s,l):o(l,p):s||(l[l.length]=p)}return l}var o=r(/*! ./_arrayPush */46),a=r(/*! ./_isFlattenable */361);e.exports=n},/*!**************************************!*\ !*** ./~/lodash/fp/_falseOptions.js ***! \**************************************/ function(e,t){e.exports={cap:!1,curry:!1,fixed:!1,immutable:!1,rearg:!1}},/*!*************************!*\ !*** ./~/lodash/has.js ***! \*************************/ function(e,t,r){function n(e,t){return null!=e&&a(e,t,o)}var o=r(/*! ./_baseHas */297),a=r(/*! ./_hasPath */206);e.exports=n},/*!*****************************!*\ !*** ./src/addons/index.js ***! \*****************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(/*! ./Confirm/Confirm */238);Object.defineProperty(t,"Confirm",{enumerable:!0,get:function(){return n(o)["default"]}});var a=r(/*! ./Portal/Portal */111);Object.defineProperty(t,"Portal",{enumerable:!0,get:function(){return n(a)["default"]}});var s=r(/*! ./Radio/Radio */239);Object.defineProperty(t,"Radio",{enumerable:!0,get:function(){return n(s)["default"]}});var l=r(/*! ./Select/Select */240);Object.defineProperty(t,"Select",{enumerable:!0,get:function(){return n(l)["default"]}});var i=r(/*! ./TextArea/TextArea */241);Object.defineProperty(t,"TextArea",{enumerable:!0,get:function(){return n(i)["default"]}})},/*!****************************!*\ !*** ./~/lodash/_apply.js ***! \****************************/ function(e,t){function r(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}e.exports=r},/*!********************************!*\ !*** ./~/lodash/_arrayEach.js ***! \********************************/ function(e,t){function r(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}e.exports=r},/*!*********************************!*\ !*** ./~/lodash/_baseCreate.js ***! \*********************************/ function(e,t,r){function n(e){return o(e)?a(e):{}}var o=r(/*! ./isObject */11),a=Object.create;e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_createWrap.js ***! \*********************************/ function(e,t,r){function n(e,t,r,n,O,_,E,w){var j=t&v;if(!j&&"function"!=typeof e)throw new TypeError(y);var S=n?n.length:0;if(S||(t&=~(P|g),n=O=void 0),E=void 0===E?E:b(f(E),0),w=void 0===w?w:f(w),S-=O?O.length:0,t&g){var x=n,M=O;n=O=void 0}var A=j?void 0:u(e),N=[e,t,r,n,O,x,M,_,E,w];if(A&&p(N,A),e=N[0],t=N[1],r=N[2],n=N[3],O=N[4],w=N[9]=null==N[9]?j?0:e.length:b(N[9]-S,0),!w&&t&(h|T)&&(t&=~(h|T)),t&&t!=m)I=t==h||t==T?s(e,t,w):t!=P&&t!=(m|P)||O.length?l.apply(void 0,N):i(e,t,r,n);else var I=a(e,t,r);var k=A?o:c;return d(k(I,N),e,t)}var o=r(/*! ./_baseSetData */194),a=r(/*! ./_createBind */332),s=r(/*! ./_createCurry */335),l=r(/*! ./_createHybrid */201),i=r(/*! ./_createPartial */338),u=r(/*! ./_getData */98),p=r(/*! ./_mergeData */374),c=r(/*! ./_setData */215),d=r(/*! ./_setWrapToString */216),f=r(/*! ./toInteger */17),y="Expected a function",m=1,v=2,h=8,T=16,P=32,g=64,b=Math.max;e.exports=n},/*!****************************!*\ !*** ./~/lodash/_isKey.js ***! \****************************/ function(e,t,r){function n(e,t){if(o(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!a(e))||(l.test(e)||!s.test(e)||null!=t&&e in Object(t))}var o=r(/*! ./isArray */5),a=r(/*! ./isSymbol */39),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/;e.exports=n},/*!*************************************!*\ !*** ./~/lodash/_replaceHolders.js ***! \*************************************/ function(e,t){function r(e,t){for(var r=-1,o=e.length,a=0,s=[];++r<o;){var l=e[r];l!==t&&l!==n||(e[r]=n,s[a++]=r)}return s}var n="__lodash_placeholder__";e.exports=r},/*!************************!*\ !*** ./~/lodash/eq.js ***! \************************/ function(e,t){function r(e,t){return e===t||e!==e&&t!==t}e.exports=r},/*!*************************!*\ !*** ./~/lodash/get.js ***! \*************************/ function(e,t,r){function n(e,t,r){var n=null==e?void 0:o(e,t);return void 0===n?r:n}var o=r(/*! ./_baseGet */90);e.exports=n},/*!***************************************!*\ !*** ./~/lodash/isArrayLikeObject.js ***! \***************************************/ function(e,t,r){function n(e){return a(e)&&o(e)}var o=r(/*! ./isArrayLike */16),a=r(/*! ./isObjectLike */20);e.exports=n},/*!******************************!*\ !*** ./~/lodash/isSymbol.js ***! \******************************/ function(e,t,r){function n(e){return"symbol"==typeof e||o(e)&&l.call(e)==a}var o=r(/*! ./isObjectLike */20),a="[object Symbol]",s=Object.prototype,l=s.toString;e.exports=n},/*!********************************************!*\ !*** ./src/collections/Table/TableCell.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.active,r=e.children,n=e.className,s=e.collapsing,i=e.content,d=e.disabled,f=e.error,y=e.icon,m=e.negative,v=e.positive,h=e.singleLine,T=e.textAlign,P=e.verticalAlign,g=e.warning,b=e.width,O=(0,l["default"])((0,p.useKeyOnly)(t,"active"),(0,p.useKeyOnly)(s,"collapsing"),(0,p.useKeyOnly)(d,"disabled"),(0,p.useKeyOnly)(f,"error"),(0,p.useKeyOnly)(m,"negative"),(0,p.useKeyOnly)(v,"positive"),(0,p.useKeyOnly)(h,"single line"),(0,p.useKeyOnly)(g,"warning"),(0,p.useTextAlignProp)(T),(0,p.useVerticalAlignProp)(P),(0,p.useWidthProp)(b,"wide"),n),_=(0,p.getElementType)(o,e),E=(0,p.getUnhandledProps)(o,e);return r?u["default"].createElement(_,a({},E,{className:O}),r):u["default"].createElement(_,a({},E,{className:O}),c.Icon.create(y),i)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ../../elements */4);o._meta={name:"TableCell",type:p.META.TYPES.COLLECTION,parent:"Table",props:{textAlign:p.SUI.TEXT_ALIGNMENTS,verticalAlign:p.SUI.VERTICAL_ALIGNMENTS,width:p.SUI.WIDTHS}},o.defaultProps={as:"td"},o.propTypes={as:p.customPropTypes.as,active:i.PropTypes.bool,children:p.customPropTypes.every([p.customPropTypes.disallow(["content","icon"]),i.PropTypes.node]),className:i.PropTypes.string,collapsing:i.PropTypes.bool,content:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.string]),disabled:i.PropTypes.bool,error:i.PropTypes.bool,icon:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.number,i.PropTypes.string,i.PropTypes.element])]),negative:i.PropTypes.bool,positive:i.PropTypes.bool,singleLine:i.PropTypes.bool,textAlign:i.PropTypes.oneOf(o._meta.props.textAlign),verticalAlign:i.PropTypes.oneOf(o._meta.props.verticalAlign),warning:i.PropTypes.bool,width:i.PropTypes.oneOf(o._meta.props.width)},o.create=(0,p.createShorthandFactory)(o,function(e){return{content:e}}),t["default"]=o},/*!************************************!*\ !*** ./src/views/Feed/FeedDate.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])(r,"date"),i=(0,p.getUnhandledProps)(o,e),c=(0,p.getElementType)(o,e);return u["default"].createElement(c,a({},i,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"FeedDate",parent:"Feed",type:p.META.TYPES.VIEW},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["content"]),i.PropTypes.node]),className:i.PropTypes.string,content:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number])])},t["default"]=o},/*!********************************!*\ !*** ./~/lodash/_ListCache.js ***! \********************************/ function(e,t,r){function n(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var o=r(/*! ./_listCacheClear */364),a=r(/*! ./_listCacheDelete */365),s=r(/*! ./_listCacheGet */366),l=r(/*! ./_listCacheHas */367),i=r(/*! ./_listCacheSet */368);n.prototype.clear=o,n.prototype["delete"]=a,n.prototype.get=s,n.prototype.has=l,n.prototype.set=i,e.exports=n},/*!*******************************!*\ !*** ./~/lodash/_SetCache.js ***! \*******************************/ function(e,t,r){function n(e){var t=-1,r=e?e.length:0;for(this.__data__=new o;++t<r;)this.add(e[t])}var o=r(/*! ./_MapCache */86),a=r(/*! ./_setCacheAdd */380),s=r(/*! ./_setCacheHas */381);n.prototype.add=n.prototype.push=a,n.prototype.has=s,e.exports=n},/*!*****************************!*\ !*** ./~/lodash/_Symbol.js ***! \*****************************/ function(e,t,r){var n=r(/*! ./_root */9),o=n.Symbol;e.exports=o},/*!************************************!*\ !*** ./~/lodash/_arrayIncludes.js ***! \************************************/ function(e,t,r){function n(e,t){var r=e?e.length:0;return!!r&&o(e,t,0)>-1}var o=r(/*! ./_baseIndexOf */191);e.exports=n},/*!********************************!*\ !*** ./~/lodash/_arrayPush.js ***! \********************************/ function(e,t){function r(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}e.exports=r},/*!**********************************!*\ !*** ./~/lodash/_arrayReduce.js ***! \**********************************/ function(e,t){function r(e,t,r,n){var o=-1,a=e?e.length:0;for(n&&a&&(r=e[++o]);++o<a;)r=t(r,e[o],o,e);return r}e.exports=r},/*!***********************************!*\ !*** ./~/lodash/_assocIndexOf.js ***! \***********************************/ function(e,t,r){function n(e,t){for(var r=e.length;r--;)if(o(e[r][0],t))return r;return-1}var o=r(/*! ./eq */36);e.exports=n},/*!********************************!*\ !*** ./~/lodash/_copyArray.js ***! \********************************/ function(e,t){function r(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}e.exports=r},/*!*********************************!*\ !*** ./~/lodash/_createCtor.js ***! \*********************************/ function(e,t,r){function n(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 r=o(e.prototype),n=e.apply(r,t);return a(n)?n:r}}var o=r(/*! ./_baseCreate */32),a=r(/*! ./isObject */11);e.exports=n},/*!********************************!*\ !*** ./~/lodash/_getHolder.js ***! \********************************/ function(e,t){function r(e){var t=e;return t.placeholder}e.exports=r},/*!*********************************!*\ !*** ./~/lodash/_getMapData.js ***! \*********************************/ function(e,t,r){function n(e,t){var r=e.__data__;return o(t)?r["string"==typeof t?"string":"hash"]:r.map}var o=r(/*! ./_isKeyable */362);e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_getPrototype.js ***! \***********************************/ function(e,t,r){var n=r(/*! ./_overArg */101),o=n(Object.getPrototypeOf,Object);e.exports=o},/*!***********************************!*\ !*** ./~/lodash/_isHostObject.js ***! \***********************************/ function(e,t){function r(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(r){}return t}e.exports=r},/*!******************************!*\ !*** ./~/lodash/_isIndex.js ***! \******************************/ function(e,t){function r(e,t){return t=null==t?n:t,!!t&&("number"==typeof e||o.test(e))&&e>-1&&e%1==0&&e<t}var n=9007199254740991,o=/^(?:0|[1-9]\d*)$/;e.exports=r},/*!**********************************!*\ !*** ./~/lodash/_isPrototype.js ***! \**********************************/ function(e,t){function r(e){var t=e&&e.constructor,r="function"==typeof t&&t.prototype||n;return e===r}var n=Object.prototype;e.exports=r},/*!***********************************!*\ !*** ./~/lodash/_nativeCreate.js ***! \***********************************/ function(e,t,r){var n=r(/*! ./_getNative */22),o=n(Object,"create");e.exports=o},/*!*********************************!*\ !*** ./~/lodash/_setToArray.js ***! \*********************************/ function(e,t){function r(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}e.exports=r},/*!*********************************!*\ !*** ./~/lodash/isArguments.js ***! \*********************************/ function(e,t,r){function n(e){return o(e)&&l.call(e,"callee")&&(!u.call(e,"callee")||i.call(e)==a)}var o=r(/*! ./isArrayLikeObject */38),a="[object Arguments]",s=Object.prototype,l=s.hasOwnProperty,i=s.toString,u=s.propertyIsEnumerable;e.exports=n},/*!*****************************!*\ !*** ./~/lodash/isEqual.js ***! \*****************************/ function(e,t,r){function n(e,t){return o(e,t)}var o=r(/*! ./_baseIsEqual */91);e.exports=n},/*!**************************!*\ !*** ./~/lodash/pick.js ***! \**************************/ function(e,t,r){var n=r(/*! ./_arrayMap */18),o=r(/*! ./_baseFlatten */26),a=r(/*! ./_basePick */193),s=r(/*! ./_baseRest */12),l=r(/*! ./_toKey */19),i=s(function(e,t){return null==e?{}:a(e,n(o(t,1),l))});e.exports=i},/*!******************************!*\ !*** ./~/lodash/toNumber.js ***! \******************************/ function(e,t,r){function n(e){if("number"==typeof e)return e;if(a(e))return s;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(l,"");var r=u.test(e);return r||p.test(e)?c(e.slice(2),r?2:8):i.test(e)?s:+e}var o=r(/*! ./isObject */11),a=r(/*! ./isSymbol */39),s=NaN,l=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,p=/^0o[0-7]+$/i,c=parseInt;e.exports=n},/*!**************************************************!*\ !*** ./~/node-libs-browser/~/process/browser.js ***! \**************************************************/ function(e,t){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(e){if(p===setTimeout)return setTimeout(e,0);if((p===r||!p)&&setTimeout)return p=setTimeout,setTimeout(e,0);try{return p(e,0)}catch(t){try{return p.call(null,e,0)}catch(t){return p.call(this,e,0)}}}function a(e){if(c===clearTimeout)return clearTimeout(e);if((c===n||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(e);try{return c(e)}catch(t){try{return c.call(null,e)}catch(t){return c.call(this,e)}}}function s(){m&&f&&(m=!1,f.length?y=f.concat(y):v=-1,y.length&&l())}function l(){if(!m){var e=o(s);m=!0;for(var t=y.length;t;){for(f=y,y=[];++v<t;)f&&f[v].run();v=-1,t=y.length}f=null,m=!1,a(e)}}function i(e,t){this.fun=e,this.array=t}function u(){}var p,c,d=e.exports={};!function(){try{p="function"==typeof setTimeout?setTimeout:r}catch(e){p=r}try{c="function"==typeof clearTimeout?clearTimeout:n}catch(e){c=n}}();var f,y=[],m=!1,v=-1;d.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];y.push(new i(e,t)),1!==y.length||m||o(l)},i.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=u,d.addListener=u,d.once=u,d.off=u,d.removeListener=u,d.removeAllListeners=u,d.emit=u,d.binding=function(e){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(e){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},/*!************************************************!*\ !*** ./src/collections/Message/MessageItem.js ***! \************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=(0,l.getUnhandledProps)(o,e),n=(0,l.getElementType)(o,e);return s["default"].createElement(n,r,t)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! react */1),s=n(a),l=r(/*! ../../lib */2);o._meta={name:"MessageItem",parent:"Message",type:l.META.TYPES.COLLECTION},o.propTypes={as:l.customPropTypes.as,children:a.PropTypes.node},o.defaultProps={as:"li"},t["default"]=o},/*!**********************************************!*\ !*** ./src/collections/Table/TableHeader.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.fullWidth,s=(0,l["default"])((0,p.useKeyOnly)(n,"full-width"),r),i=(0,p.getElementType)(o,e),c=(0,p.getUnhandledProps)(o,e);return u["default"].createElement(i,a({},c,{className:s}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"TableHeader",type:p.META.TYPES.COLLECTION,parent:"Table"},o.defaultProps={as:"thead"},o.propTypes={as:p.customPropTypes.as,children:i.PropTypes.node,className:i.PropTypes.string,fullWidth:i.PropTypes.bool},t["default"]=o},/*!**********************************************!*\ !*** ./src/elements/Step/StepDescription.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=e.description,s=(0,l["default"])(t,"description"),i=(0,p.getUnhandledProps)(o,e),c=(0,p.getElementType)(o,e);return u["default"].createElement(c,a({},i,{className:s}),r||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"StepDescription",parent:"Step",type:p.META.TYPES.ELEMENT},o.propTypes={as:p.customPropTypes.as,className:i.PropTypes.string,children:p.customPropTypes.every([p.customPropTypes.disallow(["description"]),i.PropTypes.node]),description:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.node])},t["default"]=o},/*!****************************************!*\ !*** ./src/elements/Step/StepTitle.js ***! \****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=e.title,s=(0,l["default"])(t,"title"),i=(0,p.getUnhandledProps)(o,e),c=(0,p.getElementType)(o,e);return u["default"].createElement(c,a({},i,{className:s}),r||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"StepTitle",parent:"Step",type:p.META.TYPES.ELEMENT},o.propTypes={as:p.customPropTypes.as,className:i.PropTypes.string,children:p.customPropTypes.every([p.customPropTypes.disallow(["title"]),i.PropTypes.node]),title:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.node])},t["default"]=o},/*!*********************************!*\ !*** ./src/lib/numberToWord.js ***! \*********************************/ function(e,t){"use strict";function r(e){var t="undefined"==typeof e?"undefined":n(e);return"string"===t||"number"===t?o[e]||e:""}Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t.numberToWord=r;var o=t.numberToWordMap={1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine",10:"ten",11:"eleven",12:"twelve",13:"thirteen",14:"fourteen",15:"fifteen",16:"sixteen"}},/*!*******************************************!*\ !*** ./src/views/Card/CardDescription.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=e.content,s=(0,l["default"])(t,"description"),i=(0,p.getUnhandledProps)(o,e),c=(0,p.getElementType)(o,e);return u["default"].createElement(c,a({},i,{className:s}),r||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"CardDescription",parent:"Card",type:p.META.TYPES.VIEW},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["content"]),i.PropTypes.node]),className:i.PropTypes.string,content:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number])])},t["default"]=o},/*!**************************************!*\ !*** ./src/views/Card/CardHeader.js ***! \**************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=e.content,s=(0,l["default"])(t,"header"),i=(0,p.getUnhandledProps)(o,e),c=(0,p.getElementType)(o,e);return u["default"].createElement(c,a({},i,{className:s}),r||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"CardHeader",parent:"Card",type:p.META.TYPES.VIEW},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["content"]),i.PropTypes.node]),className:i.PropTypes.string,content:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.node])},t["default"]=o},/*!************************************!*\ !*** ./src/views/Card/CardMeta.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=e.content,s=(0,l["default"])(t,"meta"),i=(0,p.getUnhandledProps)(o,e),c=(0,p.getElementType)(o,e);return u["default"].createElement(c,a({},i,{className:s}),r||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"CardMeta",parent:"Card",type:p.META.TYPES.VIEW},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["content"]),i.PropTypes.node]),className:i.PropTypes.string,content:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number])])},t["default"]=o},/*!***************************************!*\ !*** ./src/views/Feed/FeedContent.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=e.extraImages,i=e.extraText,c=e.date,f=e.meta,m=e.summary,h=(0,l["default"])(r,"content"),P=(0,p.getUnhandledProps)(o,e),g=(0,p.getElementType)(o,e);return t?u["default"].createElement(g,a({},P,{className:h}),t):u["default"].createElement(g,a({},P,{className:h}),(0,p.createShorthand)(d["default"],function(e){return{content:e}},c),(0,p.createShorthand)(T["default"],function(e){return{content:e}},m),n,(0,p.createShorthand)(y["default"],function(e){return{text:!0,content:e}},i),(0,p.createShorthand)(y["default"],function(e){return{images:e}},s),(0,p.createShorthand)(v["default"],function(e){return{content:e}},f))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ./FeedDate */41),d=n(c),f=r(/*! ./FeedExtra */73),y=n(f),m=r(/*! ./FeedMeta */76),v=n(m),h=r(/*! ./FeedSummary */77),T=n(h);o._meta={name:"FeedContent",parent:"Feed",type:p.META.TYPES.VIEW},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["date","extraImages","extraText","meta","summary"]),i.PropTypes.node]),className:i.PropTypes.string,content:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number])]),date:d["default"].propTypes.content,extraImages:y["default"].propTypes.images,extraText:y["default"].propTypes.content,meta:v["default"].propTypes.content,summary:T["default"].propTypes.content},t["default"]=o},/*!*************************************!*\ !*** ./src/views/Feed/FeedExtra.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,a=e.images,i=e.text,p=(0,u["default"])(r,(0,d.useKeyOnly)(a,"images"),(0,d.useKeyOnly)(n||i,"text"),"extra"),f=(0,d.getUnhandledProps)(o,e),y=(0,d.getElementType)(o,e);if(t)return c["default"].createElement(y,l({},f,{className:p}),t);var m=(0,s["default"])(a,function(e,t){var r=[t,e].join("-");return(0,d.createHTMLImage)(e,{key:r})});return c["default"].createElement(y,l({},f,{className:p}),n,m)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/map */14),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(/*! classnames */3),u=n(i),p=r(/*! react */1),c=n(p),d=r(/*! ../../lib */2);o._meta={name:"FeedExtra",parent:"Feed",type:d.META.TYPES.VIEW},o.propTypes={as:d.customPropTypes.as,children:p.PropTypes.node,content:d.customPropTypes.every([d.customPropTypes.disallow(["children"]),p.PropTypes.string]),className:p.PropTypes.string,images:d.customPropTypes.every([d.customPropTypes.disallow(["text"]),p.PropTypes.oneOfType([p.PropTypes.bool,p.PropTypes.arrayOf(p.PropTypes.string)]),d.customPropTypes.givenProps({images:p.PropTypes.arrayOf(p.PropTypes.string).isRequired},d.customPropTypes.disallow(["children"]))]),text:p.PropTypes.bool},t["default"]=o},/*!*************************************!*\ !*** ./src/views/Feed/FeedLabel.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=e.icon,i=e.image,d=(0,l["default"])(r,"label"),f=(0,p.getUnhandledProps)(o,e),y=(0,p.getElementType)(o,e);return t?u["default"].createElement(y,a({},f,{className:d}),t):u["default"].createElement(y,a({},f,{className:d}),n,c.Icon.create(s),(0,p.createHTMLImage)(i))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ../../elements */4);o._meta={name:"FeedLabel",parent:"Feed",type:p.META.TYPES.VIEW},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["content","icon","image"]),i.PropTypes.node]),className:i.PropTypes.string,content:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number])]),icon:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number,i.PropTypes.object,i.PropTypes.element])]),image:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number,i.PropTypes.object,i.PropTypes.element])])},t["default"]=o},/*!************************************!*\ !*** ./src/views/Feed/FeedLike.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=e.icon,i=(0,l["default"])(r,"like"),d=(0,p.getUnhandledProps)(o,e),f=(0,p.getElementType)(o,e);return t?u["default"].createElement(f,a({},d,{className:i}),t):u["default"].createElement(f,a({},d,{className:i}),c.Icon.create(s),n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ../../elements */4);o._meta={name:"FeedLike",parent:"Feed",type:p.META.TYPES.VIEW},o.defaultProps={as:"a"},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["content","icon"]),i.PropTypes.node]),className:i.PropTypes.string,content:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number])]),icon:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number,i.PropTypes.object,i.PropTypes.element])])},t["default"]=o},/*!************************************!*\ !*** ./src/views/Feed/FeedMeta.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=e.like,i=(0,l["default"])(r,"meta"),c=(0,p.getUnhandledProps)(o,e),f=(0,p.getElementType)(o,e);return t?u["default"].createElement(f,a({},c,{className:i}),t):u["default"].createElement(f,a({},c,{className:i}),(0,p.createShorthand)(d["default"],function(e){return{content:e}},s),n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ./FeedLike */75),d=n(c);o._meta={name:"FeedMeta",parent:"Feed",type:p.META.TYPES.VIEW},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["content","like"]),i.PropTypes.node]),className:i.PropTypes.string,content:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number])]),like:d["default"].propTypes.content},t["default"]=o},/*!***************************************!*\ !*** ./src/views/Feed/FeedSummary.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=e.date,i=e.user,c=(0,l["default"])(r,"summary"),f=(0,p.getUnhandledProps)(o,e),m=(0,p.getElementType)(o,e);return t?u["default"].createElement(m,a({},f,{className:c}),t):u["default"].createElement(m,a({},f,{className:c}),(0,p.createShorthand)(y["default"],function(e){return{content:e}},i),n,(0,p.createShorthand)(d["default"],function(e){return{content:e}},s))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ./FeedDate */41),d=n(c),f=r(/*! ./FeedUser */78),y=n(f);o._meta={name:"FeedSummary",parent:"Feed",type:p.META.TYPES.VIEW},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["content","date","user"]),i.PropTypes.node]),className:i.PropTypes.string,content:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number])]),date:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number])]),user:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number])])},t["default"]=o},/*!************************************!*\ !*** ./src/views/Feed/FeedUser.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])(r,"user"),i=(0,p.getUnhandledProps)(o,e),c=(0,p.getElementType)(o,e);return u["default"].createElement(c,a({},i,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"FeedUser",parent:"Feed",type:p.META.TYPES.VIEW},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["content"]),i.PropTypes.node]),className:i.PropTypes.string,content:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number])])},o.defaultProps={as:"a"},t["default"]=o},/*!*******************************************!*\ !*** ./src/views/Item/ItemDescription.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])(r,"description"),i=(0,p.getUnhandledProps)(o,e),c=(0,p.getElementType)(o,e);return u["default"].createElement(c,a({},i,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"ItemDescription",parent:"Item",type:p.META.TYPES.VIEW},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["content"]),i.PropTypes.node]),className:i.PropTypes.string,content:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.string])},t["default"]=o},/*!*************************************!*\ !*** ./src/views/Item/ItemExtra.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])(r,"extra"),i=(0,p.getUnhandledProps)(o,e),c=(0,p.getElementType)(o,e);return u["default"].createElement(c,a({},i,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"ItemExtra",parent:"Item",type:p.META.TYPES.VIEW},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["content"]),i.PropTypes.node]),className:i.PropTypes.string,content:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.string])},t["default"]=o},/*!**************************************!*\ !*** ./src/views/Item/ItemHeader.js ***! \**************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])(r,"header"),i=(0,p.getUnhandledProps)(o,e),c=(0,p.getElementType)(o,e);return u["default"].createElement(c,a({},i,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"ItemHeader",parent:"Item",type:p.META.TYPES.VIEW},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["content"]),i.PropTypes.node]),className:i.PropTypes.string,content:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.string])},t["default"]=o},/*!************************************!*\ !*** ./src/views/Item/ItemMeta.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])(r,"meta"),i=(0,p.getUnhandledProps)(o,e),c=(0,p.getElementType)(o,e);return u["default"].createElement(c,a({},i,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"ItemMeta",parent:"Item",type:p.META.TYPES.VIEW},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["content"]),i.PropTypes.node]),className:i.PropTypes.string,content:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.string])},t["default"]=o},/*!**********************************!*\ !*** ./~/lodash/_LazyWrapper.js ***! \**********************************/ function(e,t,r){function n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=s,this.__views__=[]}var o=r(/*! ./_baseCreate */32),a=r(/*! ./_baseLodash */92),s=4294967295;n.prototype=o(a.prototype),n.prototype.constructor=n,e.exports=n},/*!************************************!*\ !*** ./~/lodash/_LodashWrapper.js ***! \************************************/ function(e,t,r){function n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}var o=r(/*! ./_baseCreate */32),a=r(/*! ./_baseLodash */92);n.prototype=o(a.prototype),n.prototype.constructor=n,e.exports=n},/*!**************************!*\ !*** ./~/lodash/_Map.js ***! \**************************/ function(e,t,r){var n=r(/*! ./_getNative */22),o=r(/*! ./_root */9),a=n(o,"Map");e.exports=a},/*!*******************************!*\ !*** ./~/lodash/_MapCache.js ***! \*******************************/ function(e,t,r){function n(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var o=r(/*! ./_mapCacheClear */369),a=r(/*! ./_mapCacheDelete */370),s=r(/*! ./_mapCacheGet */371),l=r(/*! ./_mapCacheHas */372),i=r(/*! ./_mapCacheSet */373);n.prototype.clear=o,n.prototype["delete"]=a,n.prototype.get=s,n.prototype.has=l,n.prototype.set=i,e.exports=n},/*!****************************!*\ !*** ./~/lodash/_Stack.js ***! \****************************/ function(e,t,r){function n(e){this.__data__=new o(e)}var o=r(/*! ./_ListCache */42),a=r(/*! ./_stackClear */382),s=r(/*! ./_stackDelete */383),l=r(/*! ./_stackGet */384),i=r(/*! ./_stackHas */385),u=r(/*! ./_stackSet */386);n.prototype.clear=a,n.prototype["delete"]=s,n.prototype.get=l,n.prototype.has=i,n.prototype.set=u,e.exports=n},/*!****************************************!*\ !*** ./~/lodash/_arrayIncludesWith.js ***! \****************************************/ function(e,t){function r(e,t,r){for(var n=-1,o=e?e.length:0;++n<o;)if(r(t,e[n]))return!0;return!1}e.exports=r},/*!*************************************!*\ !*** ./~/lodash/_baseDifference.js ***! \*************************************/ function(e,t,r){function n(e,t,r,n){var c=-1,d=a,f=!0,y=e.length,m=[],v=t.length;if(!y)return m;r&&(t=l(t,i(r))),n?(d=s,f=!1):t.length>=p&&(d=u,f=!1,t=new o(t));e:for(;++c<y;){var h=e[c],T=r?r(h):h;if(h=n||0!==h?h:0,f&&T===T){for(var P=v;P--;)if(t[P]===T)continue e;m.push(h)}else d(t,T,n)||m.push(h)}return m}var o=r(/*! ./_SetCache */43),a=r(/*! ./_arrayIncludes */45),s=r(/*! ./_arrayIncludesWith */88),l=r(/*! ./_arrayMap */18),i=r(/*! ./_baseUnary */94),u=r(/*! ./_cacheHas */95),p=200;e.exports=n},/*!******************************!*\ !*** ./~/lodash/_baseGet.js ***! \******************************/ function(e,t,r){function n(e,t){t=a(t,e)?[t]:o(t);for(var r=0,n=t.length;null!=e&&r<n;)e=e[s(t[r++])];return r&&r==n?e:void 0}var o=r(/*! ./_castPath */96),a=r(/*! ./_isKey */34),s=r(/*! ./_toKey */19);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_baseIsEqual.js ***! \**********************************/ function(e,t,r){function n(e,t,r,l,i){return e===t||(null==e||null==t||!a(e)&&!s(t)?e!==e&&t!==t:o(e,t,n,r,l,i))}var o=r(/*! ./_baseIsEqualDeep */302),a=r(/*! ./isObject */11),s=r(/*! ./isObjectLike */20);e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_baseLodash.js ***! \*********************************/ function(e,t){function r(){}e.exports=r},/*!********************************!*\ !*** ./~/lodash/_baseSlice.js ***! \********************************/ function(e,t){function r(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n<o;)a[n]=e[n+t];return a}e.exports=r},/*!********************************!*\ !*** ./~/lodash/_baseUnary.js ***! \********************************/ function(e,t){function r(e){return function(t){return e(t)}}e.exports=r},/*!*******************************!*\ !*** ./~/lodash/_cacheHas.js ***! \*******************************/ function(e,t){function r(e,t){return e.has(t)}e.exports=r},/*!*******************************!*\ !*** ./~/lodash/_castPath.js ***! \*******************************/ function(e,t,r){function n(e){return o(e)?e:a(e)}var o=r(/*! ./isArray */5),a=r(/*! ./_stringToPath */217);e.exports=n},/*!***************************************!*\ !*** ./~/lodash/_cloneArrayBuffer.js ***! \***************************************/ function(e,t,r){function n(e){var t=new e.constructor(e.byteLength);return new o(t).set(new o(e)),t}var o=r(/*! ./_Uint8Array */180);e.exports=n},/*!******************************!*\ !*** ./~/lodash/_getData.js ***! \******************************/ function(e,t,r){var n=r(/*! ./_metaMap */213),o=r(/*! ./noop */229),a=n?function(e){return n.get(e)}:o;e.exports=a},/*!*********************************!*\ !*** ./~/lodash/_getSymbols.js ***! \*********************************/ function(e,t,r){var n=r(/*! ./_overArg */101),o=r(/*! ./stubArray */232),a=Object.getOwnPropertySymbols,s=a?n(a,Object):o;e.exports=s},/*!*****************************!*\ !*** ./~/lodash/_getTag.js ***! \*****************************/ function(e,t,r){var n=r(/*! ./_DataView */284),o=r(/*! ./_Map */85),a=r(/*! ./_Promise */286),s=r(/*! ./_Set */179),l=r(/*! ./_WeakMap */181),i=r(/*! ./_baseGetTag */296),u=r(/*! ./_toSource */218),p="[object Map]",c="[object Object]",d="[object Promise]",f="[object Set]",y="[object WeakMap]",m="[object DataView]",v=Object.prototype,h=v.toString,T=u(n),P=u(o),g=u(a),b=u(s),O=u(l),_=i;(n&&_(new n(new ArrayBuffer(1)))!=m||o&&_(new o)!=p||a&&_(a.resolve())!=d||s&&_(new s)!=f||l&&_(new l)!=y)&&(_=function(e){var t=h.call(e),r=t==c?e.constructor:void 0,n=r?u(r):void 0;if(n)switch(n){case T:return m;case P:return p;case g:return d;case b:return f;case O:return y}return t}),e.exports=_},/*!******************************!*\ !*** ./~/lodash/_overArg.js ***! \******************************/ function(e,t){function r(e,t){return function(r){return e(t(r))}}e.exports=r},/*!**************************!*\ !*** ./~/lodash/each.js ***! \**************************/ function(e,t,r){e.exports=r(/*! ./forEach */401)},/*!****************************!*\ !*** ./~/lodash/filter.js ***! \****************************/ function(e,t,r){function n(e,t){var r=l(e)?o:a;return r(e,s(t,3))}var o=r(/*! ./_arrayFilter */290),a=r(/*! ./_baseFilter */294),s=r(/*! ./_baseIteratee */13),l=r(/*! ./isArray */5);e.exports=n},/*!**************************!*\ !*** ./~/lodash/find.js ***! \**************************/ function(e,t,r){var n=r(/*! ./_createFind */336),o=r(/*! ./findIndex */222),a=n(o);e.exports=a},/*!******************************!*\ !*** ./~/lodash/identity.js ***! \******************************/ function(e,t){function r(e){return e}e.exports=r},/*!******************************!*\ !*** ./~/lodash/includes.js ***! \******************************/ function(e,t,r){function n(e,t,r,n){e=a(e)?e:i(e),r=r&&!n?l(r):0;var p=e.length;return r<0&&(r=u(p+r,0)),s(e)?r<=p&&e.indexOf(t,r)>-1:!!p&&o(e,t,r)>-1}var o=r(/*! ./_baseIndexOf */191),a=r(/*! ./isArrayLike */16),s=r(/*! ./isString */227),l=r(/*! ./toInteger */17),i=r(/*! ./values */110),u=Math.max;e.exports=n},/*!*****************************!*\ !*** ./~/lodash/isEmpty.js ***! \*****************************/ function(e,t,r){function n(e){if(l(e)&&(s(e)||"string"==typeof e||"function"==typeof e.splice||i(e)||a(e)))return!e.length;var t=o(e);if(t==c||t==d)return!e.size;if(v||u(e))return!p(e).length;for(var r in e)if(y.call(e,r))return!1;return!0}var o=r(/*! ./_getTag */100),a=r(/*! ./isArguments */59),s=r(/*! ./isArray */5),l=r(/*! ./isArrayLike */16),i=r(/*! ./isBuffer */225),u=r(/*! ./_isPrototype */56),p=r(/*! ./_nativeKeys */214),c="[object Map]",d="[object Set]",f=Object.prototype,y=f.hasOwnProperty,m=f.propertyIsEnumerable,v=!m.call({valueOf:1},"valueOf");e.exports=n},/*!******************************!*\ !*** ./~/lodash/isLength.js ***! \******************************/ function(e,t){function r(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}var n=9007199254740991;e.exports=r},/*!**************************!*\ !*** ./~/lodash/omit.js ***! \**************************/ function(e,t,r){var n=r(/*! ./_arrayMap */18),o=r(/*! ./_baseDifference */89),a=r(/*! ./_baseFlatten */26),s=r(/*! ./_basePick */193),l=r(/*! ./_baseRest */12),i=r(/*! ./_getAllKeysIn */346),u=r(/*! ./_toKey */19),p=l(function(e,t){return null==e?{}:(t=n(a(t,1),u),s(e,o(i(e),t)))});e.exports=p},/*!****************************!*\ !*** ./~/lodash/values.js ***! \****************************/ function(e,t,r){function n(e){return e?o(e,a(e)):[]}var o=r(/*! ./_baseValues */318),a=r(/*! ./keys */10);e.exports=n},/*!*************************************!*\ !*** ./src/addons/Portal/Portal.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=r(/*! lodash/invoke */224),i=n(l),u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p=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}}(),c=r(/*! react */1),d=n(c),f=r(/*! react-dom */443),y=n(f),m=r(/*! ../../lib */2),v=(0,m.makeDebugger)("portal"),h={name:"Portal",type:m.META.TYPES.ADDON},T=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,p=Array(l),c=0;c<l;c++)p[c]=arguments[c];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(p))),n.closeOnDocumentClick=function(e){n.props.closeOnDocumentClick&&(n.portal.contains(e.target)||(v("closeOnDocumentClick()"),e.stopPropagation(),n.close(e)))},n.closeOnEscape=function(e){n.props.closeOnEscape&&m.keyboardKey.getCode(e)===m.keyboardKey.Escape&&(v("closeOnEscape()"),e.preventDefault(),n.close(e))},n.handlePortalMouseLeave=function(e){var t=n.props,r=t.closeOnPortalMouseLeave,o=t.mouseLeaveDelay;r&&(v("handlePortalMouseLeave()"),n.mouseLeaveTimer=n.closeWithTimeout(e,o))},n.handlePortalMouseOver=function(e){var t=n.props.closeOnPortalMouseLeave;t&&(v("handlePortalMouseOver()"),clearTimeout(n.mouseLeaveTimer))},n.handleTriggerBlur=function(e){var t=n.props,r=t.trigger,o=t.closeOnTriggerBlur;(0,i["default"])(r,"props.onBlur",e),o&&(v("handleTriggerBlur()"),n.close(e))},n.handleTriggerClick=function(e){var t=n.props,r=t.trigger,o=t.closeOnTriggerClick,a=t.openOnTriggerClick,s=n.state.open;(0,i["default"])(r,"props.onClick",e),s&&o?(e.stopPropagation(),n.close(e)):!s&&a&&(e.nativeEvent.stopImmediatePropagation(),e.stopPropagation(),n.open(e))},n.handleTriggerFocus=function(e){var t=n.props,r=t.trigger,o=t.openOnTriggerFocus;(0,i["default"])(r,"props.onFocus",e),o&&(v("handleTriggerFocus()"),n.open(e))},n.handleTriggerMouseLeave=function(e){clearTimeout(n.mouseOverTimer);var t=n.props,r=t.trigger,o=t.closeOnTriggerMouseLeave,a=t.mouseLeaveDelay;(0,i["default"])(r,"props.onMouseLeave",e),o&&(v("handleTriggerMouseLeave()"),n.mouseLeaveTimer=n.closeWithTimeout(e,a))},n.handleTriggerMouseOver=function(e){clearTimeout(n.mouseLeaveTimer);var t=n.props,r=t.trigger,o=t.mouseOverDelay,a=t.openOnTriggerMouseOver;(0,i["default"])(r,"props.onMouseOver",e),a&&(v("handleTriggerMouseOver()"),n.mouseOverTimer=n.openWithTimeout(e,o))},n.open=function(e){v("open()");var t=n.props.onOpen;t&&t(e),n.trySetState({open:!0})},n.openWithTimeout=function(e,t){var r=u({},e);return setTimeout(function(){return n.open(r)},t||0)},n.close=function(e){v("close()");var t=n.props.onClose;t&&t(e),n.trySetState({open:!1})},n.closeWithTimeout=function(e,t){var r=u({},e);return setTimeout(function(){return n.close(r)},t||0)},n.mountPortal=function(){if(!n.node){var e=n.props.mountNode,t=void 0===e?document.body:e;n.node=document.createElement("div"),t.appendChild(n.node),document.addEventListener("keydown",n.closeOnEscape),document.addEventListener("click",n.closeOnDocumentClick);var r=n.props.onMount;r&&r()}},n.unmountPortal=function(){if(n.node){y["default"].unmountComponentAtNode(n.node),n.node.parentNode.removeChild(n.node),n.portal.removeEventListener("mouseleave",n.handlePortalMouseLeave),n.portal.removeEventListener("mouseover",n.handlePortalMouseOver),n.node=null,n.portal=null,document.removeEventListener("keydown",n.closeOnEscape),document.removeEventListener("click",n.closeOnDocumentClick);var e=n.props.onUnmount;e&&e()}},s=r,a(n,s)}return s(t,e),p(t,[{key:"componentDidMount",value:function(){this.state.open&&this.renderPortal()}},{key:"componentDidUpdate",value:function(e,t){this.state.open&&this.renderPortal(),t.open&&!this.state.open&&(v("portal closed"),this.unmountPortal())}},{key:"componentWillUnmount",value:function(){this.unmountPortal(),clearTimeout(this.mouseOverTimer),clearTimeout(this.mouseLeaveTimer)}},{key:"renderPortal",value:function(){var e=this.props,t=e.children,r=e.className;this.mountPortal(),this.node.className=r,this.portal=y["default"].unstable_renderSubtreeIntoContainer(this,c.Children.only(t),this.node),this.portal.addEventListener("mouseleave",this.handlePortalMouseLeave),this.portal.addEventListener("mouseover",this.handlePortalMouseOver)}},{key:"render",value:function(){var e=this.props.trigger;return e?d["default"].cloneElement(e,{onBlur:this.handleTriggerBlur,onClick:this.handleTriggerClick,onFocus:this.handleTriggerFocus,onMouseLeave:this.handleTriggerMouseLeave,onMouseOver:this.handleTriggerMouseOver}):null}}]),t}(m.AutoControlledComponent);T.propTypes={children:c.PropTypes.node.isRequired,className:c.PropTypes.string,closeOnDocumentClick:c.PropTypes.bool,closeOnEscape:c.PropTypes.bool,closeOnPortalMouseLeave:c.PropTypes.bool,closeOnTriggerBlur:c.PropTypes.bool,closeOnTriggerClick:c.PropTypes.bool,closeOnTriggerMouseLeave:c.PropTypes.bool,defaultOpen:c.PropTypes.bool,mountNode:c.PropTypes.any,mouseLeaveDelay:c.PropTypes.number,mouseOverDelay:c.PropTypes.number,onClose:c.PropTypes.func,onMount:c.PropTypes.func,onOpen:c.PropTypes.func,onUnmount:c.PropTypes.func,open:c.PropTypes.bool,openOnTriggerClick:c.PropTypes.bool,openOnTriggerFocus:c.PropTypes.bool,openOnTriggerMouseOver:c.PropTypes.bool,trigger:c.PropTypes.node},T.defaultProps={closeOnEscape:!0,closeOnDocumentClick:!0,openOnTriggerClick:!0},T.autoControlledProps=["open"],T._meta=h,t["default"]=T},/*!*********************************************************!*\ !*** ./src/collections/Breadcrumb/BreadcrumbDivider.js ***! \*********************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.icon,n=e.className,s=(0,p.getUnhandledProps)(o,e),i=(0,l["default"])(n,"divider"),d=(0,p.getElementType)(o,e);return r?c.Icon.create(r,a({},s,{className:i})):u["default"].createElement(d,a({},s,{className:i}),t||"/")}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ../../elements */4);o._meta={name:"BreadcrumbDivider",type:p.META.TYPES.COLLECTION,parent:"Breadcrumb"},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["icon"]),i.PropTypes.node]),className:i.PropTypes.string,icon:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.node])},t["default"]=o},/*!*********************************************************!*\ !*** ./src/collections/Breadcrumb/BreadcrumbSection.js ***! \*********************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.active,r=e.children,n=e.className,s=e.href,i=e.link,c=e.onClick,d=(0,l["default"])((0,p.useKeyOnly)(t,"active"),n,"section"),f=(0,p.getUnhandledProps)(o,e),y=(0,p.getElementType)(o,e,function(){if(i||c)return"a"}),m=function(e){c&&c(e)};return u["default"].createElement(y,a({},f,{className:d,href:s,onClick:m}),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"BreadcrumbSection",type:p.META.TYPES.COLLECTION,parent:"Breadcrumb"},o.propTypes={as:p.customPropTypes.as,active:i.PropTypes.bool,children:i.PropTypes.node,className:i.PropTypes.string,link:p.customPropTypes.every([p.customPropTypes.disallow(["href"]),i.PropTypes.bool]),href:p.customPropTypes.every([p.customPropTypes.disallow(["link"]),i.PropTypes.string]),onClick:i.PropTypes.func},t["default"]=o},/*!********************************************!*\ !*** ./src/collections/Form/FormButton.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.control,r=(0,i.getUnhandledProps)(o,e),n=(0,i.getElementType)(o,e);return l["default"].createElement(n,a({},r,{control:t}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! ../../lib */2),u=r(/*! ./FormField */15),p=n(u),c=r(/*! ../../elements */4);o._meta={name:"FormButton",parent:"Form",type:i.META.TYPES.COLLECTION},o.propTypes={as:i.customPropTypes.as,control:p["default"].propTypes.control},o.defaultProps={as:p["default"],control:c.Button},t["default"]=o},/*!**********************************************!*\ !*** ./src/collections/Form/FormCheckbox.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.control,r=(0,i.getUnhandledProps)(o,e),n=(0,i.getElementType)(o,e);return l["default"].createElement(n,a({},r,{control:t}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! ../../lib */2),u=r(/*! ./FormField */15),p=n(u),c=r(/*! ../../modules */21);o._meta={name:"FormCheckbox",parent:"Form",type:i.META.TYPES.COLLECTION},o.propTypes={as:i.customPropTypes.as,control:p["default"].propTypes.control},o.defaultProps={as:p["default"],control:c.Checkbox},t["default"]=o},/*!**********************************************!*\ !*** ./src/collections/Form/FormDropdown.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.control,r=(0,i.getUnhandledProps)(o,e),n=(0,i.getElementType)(o,e);return l["default"].createElement(n,a({},r,{control:t}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! ../../lib */2),u=r(/*! ./FormField */15),p=n(u),c=r(/*! ../../modules */21);o._meta={name:"FormDropdown",parent:"Form",type:i.META.TYPES.COLLECTION},o.propTypes={as:i.customPropTypes.as,control:p["default"].propTypes.control},o.defaultProps={as:p["default"],control:c.Dropdown},t["default"]=o},/*!*******************************************!*\ !*** ./src/collections/Form/FormGroup.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function a(e){var t=e.children,r=e.className,n=e.grouped,o=e.inline,l=e.widths,u=(0,p["default"])((0,c.useWidthProp)(l,null,!0),(0,c.useKeyOnly)(o,"inline"),(0,c.useKeyOnly)(n,"grouped"),"fields",r),d=(0,c.getUnhandledProps)(a,e),f=(0,c.getElementType)(a,e);return i["default"].createElement(f,s({},d,{className:u}),t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l=r(/*! react */1),i=n(l),u=r(/*! classnames */3),p=n(u),c=r(/*! ../../lib */2);a._meta={name:"FormGroup",parent:"Form",type:c.META.TYPES.COLLECTION,props:{widths:[].concat(o(c.SUI.WIDTHS),["equal"])}},a.propTypes={as:c.customPropTypes.as,children:l.PropTypes.node,className:l.PropTypes.string,grouped:c.customPropTypes.every([c.customPropTypes.disallow(["inline"]),l.PropTypes.bool]),inline:c.customPropTypes.every([c.customPropTypes.disallow(["grouped"]),l.PropTypes.bool]),widths:l.PropTypes.oneOf(a._meta.props.widths)},a.defaultProps={as:"div"},t["default"]=a},/*!*******************************************!*\ !*** ./src/collections/Form/FormInput.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.control,r=(0,i.getUnhandledProps)(o,e),n=(0,i.getElementType)(o,e);return l["default"].createElement(n,a({},r,{control:t}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! ../../lib */2),u=r(/*! ./FormField */15),p=n(u),c=r(/*! ../../elements */4);o._meta={name:"FormInput",parent:"Form",type:i.META.TYPES.COLLECTION},o.propTypes={as:i.customPropTypes.as,control:p["default"].propTypes.control},o.defaultProps={as:p["default"],control:c.Input},t["default"]=o},/*!*******************************************!*\ !*** ./src/collections/Form/FormRadio.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.control,r=(0,i.getUnhandledProps)(o,e),n=(0,i.getElementType)(o,e);return l["default"].createElement(n,a({},r,{control:t}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! ../../lib */2),u=r(/*! ./FormField */15),p=n(u),c=r(/*! ../../addons */29);o._meta={name:"FormRadio",parent:"Form",type:i.META.TYPES.COLLECTION},o.propTypes={as:i.customPropTypes.as,control:p["default"].propTypes.control},o.defaultProps={as:p["default"],control:c.Radio},t["default"]=o},/*!********************************************!*\ !*** ./src/collections/Form/FormSelect.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.control,r=(0,i.getUnhandledProps)(o,e),n=(0,i.getElementType)(o,e);return l["default"].createElement(n,a({},r,{control:t}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! ../../lib */2),u=r(/*! ./FormField */15),p=n(u),c=r(/*! ../../addons */29);o._meta={name:"FormSelect",parent:"Form",type:i.META.TYPES.COLLECTION},o.propTypes={as:i.customPropTypes.as,control:p["default"].propTypes.control},o.defaultProps={as:p["default"],control:c.Select},t["default"]=o},/*!**********************************************!*\ !*** ./src/collections/Form/FormTextArea.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.control,r=(0,i.getUnhandledProps)(o,e),n=(0,i.getElementType)(o,e);return l["default"].createElement(n,a({},r,{control:t}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! ../../lib */2),u=r(/*! ./FormField */15),p=n(u),c=r(/*! ../../addons */29);o._meta={name:"FormTextArea",parent:"Form",type:i.META.TYPES.COLLECTION},o.propTypes={as:i.customPropTypes.as,control:p["default"].propTypes.control},o.defaultProps={as:p["default"],control:c.TextArea},t["default"]=o},/*!********************************************!*\ !*** ./src/collections/Grid/GridColumn.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.computer,n=e.className,s=e.color,i=e.floated,c=e.largeScreen,d=e.mobile,f=e.only,y=e.stretched,m=e.tablet,v=e.textAlign,h=e.verticalAlign,T=e.widescreen,P=e.width,g=(0,l["default"])(n,s,(0,p.useWidthProp)(r,"wide computer"),(0,p.useValueAndKey)(i,"floated"),(0,p.useWidthProp)(c,"wide large screen"),(0,p.useWidthProp)(d,"wide mobile"),(0,p.useValueAndKey)(f,"only"),(0,p.useKeyOnly)(y,"stretched"),(0,p.useWidthProp)(m,"wide tablet"),(0,p.useTextAlignProp)(v),(0,p.useVerticalAlignProp)(h),(0,p.useWidthProp)(T,"wide widescreen"),(0,p.useWidthProp)(P,"wide"),"column"),b=(0,p.getUnhandledProps)(o,e),O=(0,p.getElementType)(o,e);return u["default"].createElement(O,a({},b,{className:g}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"GridColumn",parent:"Grid",type:p.META.TYPES.COLLECTION,props:{color:p.SUI.COLORS,computer:p.SUI.WIDTHS,floated:p.SUI.FLOATS,largeScreen:p.SUI.WIDTHS,mobile:p.SUI.WIDTHS,only:["computer","large screen","mobile","tablet mobile","tablet","widescreen"],tablet:p.SUI.WIDTHS,textAlign:p.SUI.TEXT_ALIGNMENTS,verticalAlign:p.SUI.VERTICAL_ALIGNMENTS,widescreen:p.SUI.WIDTHS,width:p.SUI.WIDTHS}},o.propTypes={as:p.customPropTypes.as,children:i.PropTypes.node,className:i.PropTypes.string,computer:i.PropTypes.oneOf(o._meta.props.width),color:i.PropTypes.oneOf(o._meta.props.color),floated:i.PropTypes.oneOf(o._meta.props.floated),largeScreen:i.PropTypes.oneOf(o._meta.props.width),mobile:i.PropTypes.oneOf(o._meta.props.width),only:i.PropTypes.oneOf(o._meta.props.only),stretched:i.PropTypes.bool,tablet:i.PropTypes.oneOf(o._meta.props.width),textAlign:i.PropTypes.oneOf(o._meta.props.textAlign),verticalAlign:i.PropTypes.oneOf(o._meta.props.verticalAlign),widescreen:i.PropTypes.oneOf(o._meta.props.width),width:i.PropTypes.oneOf(o._meta.props.width)},t["default"]=o},/*!*****************************************!*\ !*** ./src/collections/Grid/GridRow.js ***! \*****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.centered,r=e.children,n=e.className,s=e.color,i=e.columns,c=e.divided,d=e.only,f=e.reversed,y=e.stretched,m=e.textAlign,v=e.verticalAlign,h=(0,l["default"])(n,s,(0,p.useKeyOnly)(t,"centered"),(0,p.useWidthProp)(i,"column",!0),(0,p.useKeyOnly)(c,"divided"),(0,p.useValueAndKey)(d,"only"),(0,p.useValueAndKey)(f,"reversed"),(0,p.useKeyOnly)(y,"stretched"),(0,p.useTextAlignProp)(m),(0,p.useVerticalAlignProp)(v),"row"),T=(0,p.getUnhandledProps)(o,e),P=(0,p.getElementType)(o,e);return u["default"].createElement(P,a({},T,{className:h}),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"GridRow",parent:"Grid",type:p.META.TYPES.COLLECTION,props:{color:p.SUI.COLORS,columns:p.SUI.WIDTHS,only:["computer","large screen","mobile","tablet mobile","tablet","widescreen"],reversed:["computer","computer vertically","mobile","mobile vertically","tablet","tablet vertically"],textAlign:p.SUI.TEXT_ALIGNMENTS,verticalAlign:p.SUI.VERTICAL_ALIGNMENTS}},o.propTypes={as:p.customPropTypes.as,centered:i.PropTypes.bool,children:i.PropTypes.node,className:i.PropTypes.string,color:i.PropTypes.oneOf(o._meta.props.color),columns:i.PropTypes.oneOf(o._meta.props.columns),divided:i.PropTypes.bool,only:i.PropTypes.oneOf(o._meta.props.only),reversed:i.PropTypes.oneOf(o._meta.props.reversed),stretched:i.PropTypes.bool,textAlign:i.PropTypes.oneOf(o._meta.props.textAlign),verticalAlign:i.PropTypes.oneOf(o._meta.props.verticalAlign)},t["default"]=o},/*!********************************************!*\ !*** ./src/collections/Menu/MenuHeader.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])(r,"header"),i=(0,p.getElementType)(o,e),c=(0,p.getUnhandledProps)(o,e);return u["default"].createElement(i,a({},c,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"MenuHeader",type:p.META.TYPES.COLLECTION,parent:"Menu"},o.propTypes={as:p.customPropTypes.as,children:i.PropTypes.node,className:i.PropTypes.string,content:i.PropTypes.oneOfType([i.PropTypes.number,i.PropTypes.string])},t["default"]=o},/*!******************************************!*\ !*** ./src/collections/Menu/MenuItem.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.active,r=e.children,n=e.className,a=e.color,i=e.content,p=e.fitted,y=e.header,m=e.icon,v=e.index,h=e.link,T=e.name,P=e.onClick,g=e.position,b=(0,u["default"])((0,d.useKeyOnly)(t,"active"),(0,d.useKeyOrValueAndKey)(p,"fitted"),(0,d.useKeyOnly)(m===!0||m&&!(T||i),"icon"),(0,d.useKeyOnly)(y,"header"),(0,d.useKeyOnly)(h,"link"),a,g,n,"item"),O=(0,d.getElementType)(o,e,function(){if(P)return"a"}),_=function(e){P&&P(e,{name:T,index:v})},E=(0,d.getUnhandledProps)(o,e);return r?c["default"].createElement(O,l({},E,{className:b,onClick:_}),r):c["default"].createElement(O,l({},E,{className:b,onClick:_}),f.Icon.create(m),i||(0,s["default"])(T))}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/startCase */435),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(/*! classnames */3),u=n(i),p=r(/*! react */1),c=n(p),d=r(/*! ../../lib */2),f=r(/*! ../../elements */4);o._meta={name:"MenuItem",type:d.META.TYPES.COLLECTION,parent:"Menu",props:{color:d.SUI.COLORS,fitted:["horizontally","vertically"],position:["right"]}},o.propTypes={as:d.customPropTypes.as,active:p.PropTypes.bool,children:d.customPropTypes.every([d.customPropTypes.disallow(["content"]),p.PropTypes.node]),className:p.PropTypes.string,color:p.PropTypes.oneOf(o._meta.props.color),content:d.customPropTypes.every([d.customPropTypes.disallow(["children"]),p.PropTypes.string]),fitted:p.PropTypes.oneOfType([p.PropTypes.bool,p.PropTypes.oneOf(o._meta.props.fitted)]),header:p.PropTypes.bool,icon:p.PropTypes.bool,index:p.PropTypes.number,link:p.PropTypes.bool,name:p.PropTypes.string,onClick:p.PropTypes.func,position:p.PropTypes.oneOf(o._meta.props.position)},t["default"]=o},/*!******************************************!*\ !*** ./src/collections/Menu/MenuMenu.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.position,s=(0,l["default"])(r,n,"menu"),i=(0,p.getElementType)(o,e),c=(0,p.getUnhandledProps)(o,e);return u["default"].createElement(i,a({},c,{className:s}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"MenuMenu",type:p.META.TYPES.COLLECTION,parent:"Menu",props:{position:["right"]}},o.propTypes={as:p.customPropTypes.as,children:i.PropTypes.node,className:i.PropTypes.string,position:i.PropTypes.oneOf(o._meta.props.position)},t["default"]=o},/*!***************************************************!*\ !*** ./src/collections/Message/MessageContent.js ***! \***************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=(0,p.getUnhandledProps)(o,e),s=(0,l["default"])("content",t),i=(0,p.getElementType)(o,e);return u["default"].createElement(i,a({},n,{className:s}),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"MessageContent",parent:"Message",type:p.META.TYPES.COLLECTION},o.propTypes={as:p.customPropTypes.as,children:i.PropTypes.node,className:i.PropTypes.node},t["default"]=o},/*!**************************************************!*\ !*** ./src/collections/Message/MessageHeader.js ***! \**************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=(0,p.getUnhandledProps)(o,e),s=(0,l["default"])("header",t),i=(0,p.getElementType)(o,e);return u["default"].createElement(i,a({},n,{className:s}),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"MessageHeader",parent:"Message",type:p.META.TYPES.COLLECTION},o.propTypes={as:p.customPropTypes.as,children:i.PropTypes.node,className:i.PropTypes.node},t["default"]=o},/*!************************************************!*\ !*** ./src/collections/Message/MessageList.js ***! \************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=e.items,s=(0,p.getUnhandledProps)(o,e),i=(0,l["default"])("list",t),c=(0,p.getElementType)(o,e),f=n&&n.map(function(e){return u["default"].createElement(d["default"],{key:e},e)});return u["default"].createElement(c,a({},s,{className:i}),f||r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ./MessageItem */64),d=n(c);o._meta={name:"MessageList",parent:"Message",type:p.META.TYPES.COLLECTION},o.propTypes={as:p.customPropTypes.as,children:i.PropTypes.node,className:i.PropTypes.node,items:i.PropTypes.arrayOf(i.PropTypes.string)},o.defaultProps={as:"ul"},t["default"]=o},/*!********************************************!*\ !*** ./src/collections/Table/TableBody.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,l["default"])(r),s=(0,p.getElementType)(o,e),i=(0,p.getUnhandledProps)(o,e);return u["default"].createElement(s,a({},i,{className:n}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"TableBody",type:p.META.TYPES.COLLECTION,parent:"Table"},o.defaultProps={as:"tbody"},o.propTypes={as:p.customPropTypes.as,children:i.PropTypes.node,className:i.PropTypes.string},t["default"]=o},/*!**********************************************!*\ !*** ./src/collections/Table/TableFooter.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return s["default"].createElement(u["default"],e)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! react */1),s=n(a),l=r(/*! ../../lib */2),i=r(/*! ./TableHeader */65),u=n(i);o._meta={name:"TableFooter",type:l.META.TYPES.COLLECTION,parent:"Table"},o.defaultProps={as:"tfoot"},t["default"]=o},/*!**************************************************!*\ !*** ./src/collections/Table/TableHeaderCell.js ***! \**************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return s["default"].createElement(u["default"],e)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! react */1),s=n(a),l=r(/*! ../../lib */2),i=r(/*! ./TableCell */40),u=n(i);o._meta={name:"TableHeaderCell",type:l.META.TYPES.COLLECTION,parent:"Table"},o.defaultProps={as:"th"},t["default"]=o},/*!*******************************************!*\ !*** ./src/collections/Table/TableRow.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.active,r=e.cellAs,n=e.cells,a=e.children,i=e.className,p=e.disabled,f=e.error,m=e.negative,v=e.positive,h=e.textAlign,T=e.verticalAlign,P=e.warning,g=(0,u["default"])((0,d.useKeyOnly)(t,"active"),(0,d.useKeyOnly)(p,"disabled"),(0,d.useKeyOnly)(f,"error"),(0,d.useKeyOnly)(m,"negative"),(0,d.useKeyOnly)(v,"positive"),(0,d.useKeyOnly)(P,"warning"),(0,d.useTextAlignProp)(h),(0,d.useVerticalAlignProp)(T),i),b=(0,d.getElementType)(o,e),O=(0,d.getUnhandledProps)(o,e);return a?c["default"].createElement(b,l({},O,{className:g}),a):c["default"].createElement(b,l({},O,{className:g}),(0,s["default"])(n,function(e){return y["default"].create(e,{as:r})}))}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/map */14),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(/*! classnames */3),u=n(i),p=r(/*! react */1),c=n(p),d=r(/*! ../../lib */2),f=r(/*! ./TableCell */40),y=n(f);o._meta={name:"TableRow",type:d.META.TYPES.COLLECTION,parent:"Table",props:{textAlign:d.SUI.TEXT_ALIGNMENTS,verticalAlign:d.SUI.VERTICAL_ALIGNMENTS}},o.defaultProps={as:"tr",cellAs:"td"},o.propTypes={as:d.customPropTypes.as,active:p.PropTypes.bool,cellAs:d.customPropTypes.as,cells:d.customPropTypes.every([d.customPropTypes.disallow(["children"]),p.PropTypes.arrayOf(p.PropTypes.oneOfType([p.PropTypes.string,p.PropTypes.element,p.PropTypes.object]))]),children:d.customPropTypes.every([d.customPropTypes.disallow(["content","icon"]),p.PropTypes.node]),className:p.PropTypes.string,disabled:p.PropTypes.bool,error:p.PropTypes.bool,negative:p.PropTypes.bool,positive:p.PropTypes.bool,textAlign:p.PropTypes.oneOf(o._meta.props.textAlign),verticalAlign:p.PropTypes.oneOf(o._meta.props.verticalAlign),warning:p.PropTypes.bool},o.create=(0,d.createShorthandFactory)(o,function(e){return{cells:e}}),t["default"]=o},/*!**********************************************!*\ !*** ./src/elements/Button/ButtonContent.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.hidden,s=e.visible,i=(0,l["default"])((0,p.useKeyOnly)(s,"visible"),(0,p.useKeyOnly)(n,"hidden"),"content",r),c=(0,p.getUnhandledProps)(o,e),d=(0,p.getElementType)(o,e);return u["default"].createElement(d,a({className:i},c),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"ButtonContent",parent:"Button",type:p.META.TYPES.ELEMENT},o.propTypes={as:p.customPropTypes.as,visible:i.PropTypes.bool,hidden:i.PropTypes.bool,className:i.PropTypes.string,children:i.PropTypes.any},t["default"]=o},/*!********************************************!*\ !*** ./src/elements/Button/ButtonGroup.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.attached,r=e.basic,n=e.children,s=e.className,i=e.color,c=e.icon,d=e.labeled,f=e.size,y=e.vertical,m=e.widths,v=(0,l["default"])("ui",f,i,(0,p.useValueAndKey)(t,"attached"),(0,p.useKeyOnly)(r,"basic"),(0,p.useKeyOnly)(c,"icon"),(0,p.useKeyOnly)(d,"labeled"),(0,p.useKeyOnly)(y,"vertical"),(0,p.useWidthProp)(m),"buttons",s),h=(0,p.getUnhandledProps)(o,e),T=(0,p.getElementType)(o,e);return u["default"].createElement(T,a({className:v},h),n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"ButtonGroup",parent:"Button",type:p.META.TYPES.ELEMENT,props:{attached:["left","right","top","bottom"],color:p.SUI.COLORS,size:p.SUI.SIZES,widths:p.SUI.WIDTHS}},o.propTypes={as:p.customPropTypes.as,attached:i.PropTypes.oneOf(o._meta.props.attached),basic:i.PropTypes.bool,className:i.PropTypes.string,children:i.PropTypes.any,color:i.PropTypes.oneOf(o._meta.props.color),icon:i.PropTypes.bool,labeled:i.PropTypes.bool,size:i.PropTypes.oneOf(o._meta.props.size),vertical:i.PropTypes.bool,widths:i.PropTypes.oneOf(o._meta.props.widths)},t["default"]=o},/*!*****************************************!*\ !*** ./src/elements/Button/ButtonOr.js ***! \*****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=(0,l["default"])("or",t),n=(0,p.getUnhandledProps)(o,e),s=(0,p.getElementType)(o,e);return u["default"].createElement(s,a({className:r},n))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"ButtonOr",parent:"Button",type:p.META.TYPES.ELEMENT},o.propTypes={as:p.customPropTypes.as,className:i.PropTypes.string},t["default"]=o},/*!**********************************************!*\ !*** ./src/elements/Header/HeaderContent.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=(0,l["default"])(t,"content"),s=(0,p.getUnhandledProps)(o,e),i=(0,p.getElementType)(o,e);return u["default"].createElement(i,a({},s,{className:n}),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"HeaderContent",parent:"Header",type:p.META.TYPES.VIEW},o.propTypes={as:p.customPropTypes.as,children:i.PropTypes.node,className:i.PropTypes.string},t["default"]=o},/*!************************************************!*\ !*** ./src/elements/Header/HeaderSubheader.js ***! \************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])("sub header",r),i=(0,p.getUnhandledProps)(o,e),c=(0,p.getElementType)(o,e);return u["default"].createElement(c,a({className:s},i),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"HeaderSubheader",parent:"Header",type:p.META.TYPES.ELEMENT},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["content"]),i.PropTypes.node]),className:i.PropTypes.string,content:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.string])},t["default"]=o},/*!****************************************!*\ !*** ./src/elements/Icon/IconGroup.js ***! \****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=e.size,s=(0,l["default"])(n,"icons",t),i=(0,p.getUnhandledProps)(o,e),c=(0,p.getElementType)(o,e);return u["default"].createElement(c,a({className:s},i),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"IconGroup",parent:"Icon",type:p.META.TYPES.ELEMENT,props:{size:p.SUI.SIZES}},o.propTypes={as:p.customPropTypes.as,className:i.PropTypes.string,children:i.PropTypes.any,size:i.PropTypes.oneOf(o._meta.props.size)},o.defaultProps={as:"i"},t["default"]=o},/*!*************************************!*\ !*** ./src/elements/Image/Image.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.alt,r=e.avatar,n=e.bordered,s=e.centered,i=e.className,d=e.disabled,f=e.floated,y=e.fluid,m=e.height,v=e.hidden,h=e.href,T=e.inline,P=e.label,g=e.shape,b=e.size,O=e.spaced,_=e.src,E=e.verticalAlign,w=e.width,j=e.wrapped,S=e.ui,x=(0,l["default"])((0,p.useKeyOnly)(S,"ui"),b,(0,p.useVerticalAlignProp)(E,"aligned"),(0,p.useKeyOnly)(r,"avatar"),(0,p.useKeyOnly)(n,"bordered"),(0,p.useKeyOnly)(s,"centered"),(0,p.useKeyOnly)(d,"disabled"),(0,p.useValueAndKey)(f,"floated"),(0,p.useKeyOnly)(y,"fluid"),(0,p.useKeyOnly)(v,"hidden"),(0,p.useKeyOnly)(T,"inline"),(0,p.useKeyOrValueAndKey)(O,"spaced"),g,i,"image"),M=(0,p.getUnhandledProps)(o,e),A=a({className:x},M),N={src:_,alt:t,width:w,height:m},I=(0,p.getElementType)(o,e,function(){if(P||j)return"div"});return"img"===I?u["default"].createElement(I,a({},A,N)):u["default"].createElement(I,a({},A,{href:h}),c.Label.create(P),u["default"].createElement("img",N))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ../../elements */4),d=r(/*! ./ImageGroup */141),f=n(d);o.Group=f["default"],o._meta={name:"Image",type:p.META.TYPES.ELEMENT,props:{verticalAlign:p.SUI.VERTICAL_ALIGNMENTS,floated:p.SUI.FLOATS,shape:["rounded","circular"],size:p.SUI.SIZES,spaced:["left","right"]}},o.propTypes={as:p.customPropTypes.as,verticalAlign:i.PropTypes.oneOf(o._meta.props.verticalAlign),alt:i.PropTypes.string,avatar:i.PropTypes.bool,bordered:i.PropTypes.bool,centered:i.PropTypes.bool,className:i.PropTypes.string,disabled:i.PropTypes.bool,floated:i.PropTypes.oneOf(o._meta.props.floated),fluid:p.customPropTypes.every([i.PropTypes.bool,p.customPropTypes.disallow(["size"])]),hidden:i.PropTypes.bool,height:i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number]),href:i.PropTypes.string,inline:i.PropTypes.bool,label:p.customPropTypes.some([i.PropTypes.string,i.PropTypes.number,i.PropTypes.object,i.PropTypes.element]),shape:i.PropTypes.oneOf(o._meta.props.shape),size:i.PropTypes.oneOf(o._meta.props.size),spaced:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(o._meta.props.spaced)]),src:i.PropTypes.string,ui:i.PropTypes.bool,width:i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number]),wrapped:p.customPropTypes.every([i.PropTypes.bool,p.customPropTypes.disallow(["href"])])},o.defaultProps={as:"img",ui:!0},o.create=(0,p.createShorthandFactory)(o,function(e){return{src:e}}),t["default"]=o},/*!******************************************!*\ !*** ./src/elements/Image/ImageGroup.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=e.size,s=(0,u["default"])("ui",n,t,"images"),i=(0,p.getUnhandledProps)(o,e),c=(0,p.getElementType)(o,e);return l["default"].createElement(c,a({className:s},i),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! classnames */3),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"ImageGroup",parent:"Image",type:p.META.TYPES.ELEMENT,props:{size:p.SUI.SIZES}},o.propTypes={as:p.customPropTypes.as,children:s.PropTypes.any,className:s.PropTypes.string,size:s.PropTypes.oneOf(o._meta.props.size)},t["default"]=o},/*!*******************************************!*\ !*** ./src/elements/Label/LabelDetail.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])("detail",r),i=(0,p.getElementType)(o,e),c=(0,p.getUnhandledProps)(o,e);return u["default"].createElement(i,a({className:s},c),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"LabelDetail",parent:"Label",type:p.META.TYPES.ELEMENT},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["content"]),i.PropTypes.node]),className:i.PropTypes.string,content:p.customPropTypes.every([p.customPropTypes.disallow(["content"]),i.PropTypes.string])},t["default"]=o},/*!******************************************!*\ !*** ./src/elements/Label/LabelGroup.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.circular,n=e.className,s=e.color,i=e.size,c=e.tag,d=(0,l["default"])("ui",s,i,(0,p.useKeyOnly)(r,"circular"),(0,p.useKeyOnly)(c,"tag"),"labels",n),f=(0,p.getElementType)(o,e),y=(0,p.getUnhandledProps)(o,e);return u["default"].createElement(f,a({className:d},y),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"LabelGroup",parent:"Label",type:p.META.TYPES.ELEMENT,props:{color:p.SUI.COLORS,size:p.SUI.SIZES}},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["content"]),i.PropTypes.node]),circular:i.PropTypes.bool,className:i.PropTypes.string,color:i.PropTypes.oneOf(o._meta.props.color),size:i.PropTypes.oneOf(o._meta.props.size),tag:i.PropTypes.bool},t["default"]=o},/*!******************************************!*\ !*** ./src/elements/List/ListContent.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.floated,s=e.verticalAlign,i=(0,l["default"])((0,p.useValueAndKey)(n,"floated"),(0,p.useVerticalAlignProp)(s),"content",r),c=(0,p.getElementType)(o,e),d=(0,p.getUnhandledProps)(o,e);return u["default"].createElement(c,a({},d,{className:i}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"ListContent",parent:"List",type:p.META.TYPES.ELEMENT,props:{floated:p.SUI.FLOATS,verticalAlign:p.SUI.VERTICAL_ALIGNMENTS}},o.propTypes={as:p.customPropTypes.as,children:i.PropTypes.node,className:i.PropTypes.string,floated:i.PropTypes.oneOf(o._meta.props.floated),verticalAlign:i.PropTypes.oneOf(o._meta.props.verticalAlign)},t["default"]=o},/*!**********************************************!*\ !*** ./src/elements/List/ListDescription.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,l["default"])(r,"description"),s=(0,p.getElementType)(o,e),i=(0,p.getUnhandledProps)(o,e);return u["default"].createElement(s,a({},i,{className:n}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"ListDescription",parent:"List",type:p.META.TYPES.ELEMENT},o.propTypes={as:p.customPropTypes.as,children:i.PropTypes.node,className:i.PropTypes.string},t["default"]=o},/*!*****************************************!*\ !*** ./src/elements/List/ListHeader.js ***! \*****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,l["default"])(r,"header"),s=(0,p.getElementType)(o,e),i=(0,p.getUnhandledProps)(o,e);return u["default"].createElement(s,a({},i,{className:n}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"ListHeader",parent:"List",type:p.META.TYPES.ELEMENT},o.propTypes={as:p.customPropTypes.as,children:i.PropTypes.node,className:i.PropTypes.string},t["default"]=o},/*!***************************************!*\ !*** ./src/elements/List/ListIcon.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.verticalAlign,n=(0,l["default"])((0,p.useVerticalAlignProp)(r),t),s=(0,p.getUnhandledProps)(o,e);return u["default"].createElement(c.Icon,a({},s,{className:n}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ../ */4);o._meta={name:"ListIcon",parent:"List",type:p.META.TYPES.ELEMENT,props:{verticalAlign:p.SUI.VERTICAL_ALIGNMENTS}},o.propTypes={className:i.PropTypes.string,verticalAlign:i.PropTypes.oneOf(o._meta.props.verticalAlign)},t["default"]=o},/*!***************************************!*\ !*** ./src/elements/List/ListItem.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.active,r=e.children,n=e.className,s=e.disabled,i=e.value,c=(0,p.getElementType)(o,e),d=(0,l["default"])((0,p.useKeyOnly)(t,"active"),(0,p.useKeyOnly)(s,"disabled"),(0,p.useKeyOnly)("li"!==c,"item"),n),f=(0,p.getUnhandledProps)(o,e),y="li"===c?{value:i}:{"data-value":i};return u["default"].createElement(c,a({},f,y,{className:d}),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"ListItem",parent:"List",type:p.META.TYPES.ELEMENT},o.propTypes={as:p.customPropTypes.as,active:i.PropTypes.bool,children:i.PropTypes.node,className:i.PropTypes.string,disabled:i.PropTypes.bool,value:i.PropTypes.string},t["default"]=o},/*!***************************************!*\ !*** ./src/elements/List/ListList.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,p.getElementType)(o,e),s=(0,l["default"])((0,p.useKeyOnly)("ul"!==n&&"ol"!==n,"list"),r),i=(0,p.getUnhandledProps)(o,e);return u["default"].createElement(n,a({},i,{className:s}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"ListList",parent:"List",type:p.META.TYPES.ELEMENT},o.propTypes={as:p.customPropTypes.as,children:i.PropTypes.node,className:i.PropTypes.string},t["default"]=o},/*!**********************************************!*\ !*** ./src/elements/Segment/SegmentGroup.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.compact,a=e.horizontal,s=e.piled,i=e.raised,p=e.size,f=e.stacked,y=(0,u["default"])("ui",p,(0,d.useKeyOnly)(a,"horizontal"),(0,d.useKeyOnly)(n,"compact"),(0,d.useKeyOnly)(s,"piled"),(0,d.useKeyOnly)(i,"raised"),(0,d.useKeyOnly)(f,"stacked"),r,"segments"),m=(0,d.getUnhandledProps)(o,e),v=(0,d.getElementType)(o,e);return c["default"].createElement(v,l({className:y},m),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/without */7),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(/*! classnames */3),u=n(i),p=r(/*! react */1),c=n(p),d=r(/*! ../../lib */2);o._meta={name:"SegmentGroup",parent:"Segment",type:d.META.TYPES.ELEMENT,props:{size:(0,s["default"])(d.SUI.SIZES,"medium")}},o.propTypes={as:d.customPropTypes.as,className:p.PropTypes.string,children:p.PropTypes.node,compact:p.PropTypes.bool,horizontal:p.PropTypes.bool,piled:p.PropTypes.bool,raised:p.PropTypes.bool,size:p.PropTypes.oneOf(o._meta.props.size),stacked:p.PropTypes.bool},t["default"]=o},/*!***********************************!*\ !*** ./src/elements/Step/Step.js ***! \***********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.active,r=e.className,n=e.children,s=e.completed,i=e.description,d=e.disabled,y=e.icon,m=e.href,v=e.link,h=e.onClick,T=e.title,P=(0,l["default"])((0,p.useKeyOnly)(t,"active"),(0,p.useKeyOnly)(s,"completed"),(0,p.useKeyOnly)(d,"disabled"),(0,p.useKeyOnly)(v,"link"),r,"step"),g=(0,p.getUnhandledProps)(o,e),b=function(e){h&&h(e)},O=(0,p.getElementType)(o,e,function(){if(h)return"a"});return u["default"].createElement(O,a({},g,{className:P,href:m,onClick:b}),!n&&c.Icon.create(y),n||u["default"].createElement(f["default"],{description:i,title:T}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ../../elements */4),d=r(/*! ./StepContent */152),f=n(d),y=r(/*! ./StepDescription */66),m=n(y),v=r(/*! ./StepGroup */153),h=n(v),T=r(/*! ./StepTitle */67),P=n(T);o._meta={name:"Step",type:p.META.TYPES.ELEMENT},o.propTypes={as:p.customPropTypes.as,active:i.PropTypes.bool,className:i.PropTypes.string,children:p.customPropTypes.every([p.customPropTypes.disallow(["description","title"]),i.PropTypes.node]),completed:i.PropTypes.bool,description:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.node]),disabled:i.PropTypes.bool,icon:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.node]),link:i.PropTypes.bool,href:i.PropTypes.string,onClick:i.PropTypes.func,ordered:i.PropTypes.bool,title:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.node])},o.Content=f["default"],o.Description=m["default"],o.Group=h["default"],o.Title=P["default"],t["default"]=o},/*!******************************************!*\ !*** ./src/elements/Step/StepContent.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=e.description,s=e.title,i=(0,u["default"])(t,"content"),c=(0,p.getUnhandledProps)(o,e),f=(0,p.getElementType)(o,e);return r?l["default"].createElement("div",a({},c,{className:i}),r):l["default"].createElement(f,a({},c,{className:i}),(0,p.createShorthand)(y["default"],function(e){return{title:e}},s),(0,p.createShorthand)(d["default"],function(e){return{description:e}},n))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! classnames */3),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ./StepDescription */66),d=n(c),f=r(/*! ./StepTitle */67),y=n(f);o._meta={name:"StepContent",parent:"Step",type:p.META.TYPES.ELEMENT},o.propTypes={as:p.customPropTypes.as,className:s.PropTypes.string,children:p.customPropTypes.every([p.customPropTypes.disallow(["description","title"]),s.PropTypes.node]),description:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),s.PropTypes.node]),title:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),s.PropTypes.oneOfType([s.PropTypes.string,s.PropTypes.number,s.PropTypes.object])])},t["default"]=o},/*!****************************************!*\ !*** ./src/elements/Step/StepGroup.js ***! \****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=e.fluid,a=e.items,s=e.ordered,i=e.size,p=e.stackable,f=e.vertical,m=(0,u["default"])("ui",(0,d.useKeyOnly)(n,"fluid"),(0,d.useKeyOnly)(s,"ordered"),(0,d.useValueAndKey)(p,"stackable"),(0,d.useKeyOnly)(f,"vertical"),i,t,"steps"),v=(0,d.getUnhandledProps)(o,e),h=(0,d.getElementType)(o,e),T=a?a.map(function(e){var t=e.key||[e.title,e.description].join("-");return c["default"].createElement(y["default"],l({key:t},e))}):r;return c["default"].createElement(h,l({},v,{className:m}),T)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/without */7),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(/*! classnames */3),u=n(i),p=r(/*! react */1),c=n(p),d=r(/*! ../../lib */2),f=r(/*! ./Step */151),y=n(f);o._meta={name:"StepGroup",parent:"Step",props:{sizes:(0,s["default"])(d.SUI.SIZES,"medium"),stackable:["tablet"]},type:d.META.TYPES.ELEMENT},o.propTypes={as:d.customPropTypes.as,className:p.PropTypes.string,children:d.customPropTypes.every([d.customPropTypes.disallow(["items"]),p.PropTypes.node]),fluid:p.PropTypes.bool,items:d.customPropTypes.every([d.customPropTypes.disallow(["description","title"]),p.PropTypes.arrayOf(p.PropTypes.shape({description:p.PropTypes.node,icon:p.PropTypes.node,key:p.PropTypes.string,title:p.PropTypes.node}))]),ordered:p.PropTypes.bool,size:p.PropTypes.oneOf(o._meta.props.sizes),stackable:p.PropTypes.oneOf(o._meta.props.stackable),vertical:p.PropTypes.bool},t["default"]=o},/*!***************************************************!*\ !*** ./src/modules/Accordion/AccordionContent.js ***! \***************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.active,r=e.children,n=e.className,s=(0,u["default"])("content",(0,p.useKeyOnly)(t,"active"),n),i=(0,p.getUnhandledProps)(o,e),c=(0,p.getElementType)(o,e);return l["default"].createElement(c,a({},i,{className:s}),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! classnames */3),u=n(i),p=r(/*! ../../lib */2);o.displayName="AccordionContent",o.propTypes={as:p.customPropTypes.as,active:s.PropTypes.bool,children:s.PropTypes.node,className:s.PropTypes.string},o._meta={name:"AccordionContent",type:p.META.TYPES.MODULE,parent:"Accordion"},t["default"]=o},/*!*************************************************!*\ !*** ./src/modules/Accordion/AccordionTitle.js ***! \*************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.active,r=e.children,n=e.className,s=e.onClick,i=(0,u["default"])("title",(0,p.useKeyOnly)(t,"active"),n),c=function(e){s&&s(e)},d=(0,p.getElementType)(o,e),f=(0,p.getUnhandledProps)(o,e);return l["default"].createElement(d,a({},f,{className:i,onClick:c}),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! classnames */3),u=n(i),p=r(/*! ../../lib */2);o.displayName="AccordionTitle",o.propTypes={as:p.customPropTypes.as,active:s.PropTypes.bool,children:s.PropTypes.node,className:s.PropTypes.string,onClick:s.PropTypes.func},o._meta={name:"AccordionTitle",type:p.META.TYPES.MODULE,parent:"Accordion"},t["default"]=o},/*!*************************************************!*\ !*** ./src/modules/Dropdown/DropdownDivider.js ***! \*************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=(0,l["default"])("divider",t),n=(0,p.getUnhandledProps)(o,e),s=(0,p.getElementType)(o,e);return u["default"].createElement(s,a({className:r},n))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"DropdownDivider",parent:"Dropdown",type:p.META.TYPES.MODULE},o.propTypes={as:p.customPropTypes.as,className:i.PropTypes.node},t["default"]=o},/*!************************************************!*\ !*** ./src/modules/Dropdown/DropdownHeader.js ***! \************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=e.content,s=e.icon,i=(0,l["default"])("header",t),d=(0,p.getUnhandledProps)(o,e),f=(0,p.getElementType)(o,e);return r?u["default"].createElement(f,a({className:i},d),r):u["default"].createElement(f,a({className:i},d),c.Icon.create(s),n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ../../elements */4);o._meta={name:"DropdownHeader",parent:"Dropdown",type:p.META.TYPES.MODULE},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["content","icon"]),i.PropTypes.node]),className:i.PropTypes.node,content:i.PropTypes.node,icon:i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.element,i.PropTypes.object])},t["default"]=o},/*!**********************************************!*\ !*** ./src/modules/Dropdown/DropdownItem.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.active,r=e.children,n=e.className,s=e.disabled,i=e.description,d=e.icon,f=e.onClick,y=e.selected,m=e.text,v=e.value,h=function(e){f&&f(e,v)},T=(0,u["default"])((0,p.useKeyOnly)(t,"active"),(0,p.useKeyOnly)(s,"disabled"),(0,p.useKeyOnly)(y,"selected"),"item",n),P=d||p.childrenUtils.someByType(r,"DropdownMenu")&&"dropdown",g=(0,p.getElementType)(o,e),b=(0,p.getUnhandledProps)(o,e);return l["default"].createElement(g,a({},b,{className:T,onClick:h}),(0,p.createShorthand)("span",function(e){return{className:"description",children:e}},i),c.Icon.create(P),m,r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! classnames */3),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ../../elements */4);o._meta={name:"DropdownItem",parent:"Dropdown",type:p.META.TYPES.MODULE},o.propTypes={as:p.customPropTypes.as,active:s.PropTypes.bool,children:p.customPropTypes.every([p.customPropTypes.disallow(["text"]),s.PropTypes.node]),className:s.PropTypes.string,description:s.PropTypes.string,disabled:s.PropTypes.bool,icon:s.PropTypes.string,selected:s.PropTypes.bool,text:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),s.PropTypes.oneOfType([s.PropTypes.number,s.PropTypes.string])]),value:s.PropTypes.oneOfType([s.PropTypes.number,s.PropTypes.string]),onClick:s.PropTypes.func},t["default"]=o},/*!**********************************************!*\ !*** ./src/modules/Dropdown/DropdownMenu.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,u["default"])("menu transition",r),s=(0,p.getUnhandledProps)(o,e),i=(0,p.getElementType)(o,e);return l["default"].createElement(i,a({},s,{className:n}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! classnames */3),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"DropdownMenu",parent:"Dropdown",type:p.META.TYPES.MODULE},o.propTypes={as:p.customPropTypes.as,children:s.PropTypes.node,className:s.PropTypes.string},t["default"]=o},/*!*******************************************!*\ !*** ./src/modules/Modal/ModalActions.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,u["default"])(r,"actions"),s=(0,p.getUnhandledProps)(o,e),i=(0,p.getElementType)(o,e);return l["default"].createElement(i,a({className:n},s),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! classnames */3),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"ModalActions",type:p.META.TYPES.MODULE,parent:"Modal"},o.propTypes={as:p.customPropTypes.as,children:s.PropTypes.any,className:s.PropTypes.string},t["default"]=o},/*!*******************************************!*\ !*** ./src/modules/Modal/ModalContent.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.image,n=e.className,s=(0,u["default"])(n,(0,p.useKeyOnly)(r,"image"),"content"),i=(0,p.getUnhandledProps)(o,e),c=(0,p.getElementType)(o,e);return l["default"].createElement(c,a({className:s},i),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! classnames */3),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"ModalContent",type:p.META.TYPES.MODULE,parent:"Modal"},o.propTypes={as:p.customPropTypes.as,children:s.PropTypes.any,className:s.PropTypes.string,image:s.PropTypes.bool},t["default"]=o},/*!***********************************************!*\ !*** ./src/modules/Modal/ModalDescription.js ***! \***********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,u["default"])(r,"description"),s=(0,p.getUnhandledProps)(o,e),i=(0,p.getElementType)(o,e);return l["default"].createElement(i,a({className:n},s),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! classnames */3),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"ModalDescription",type:p.META.TYPES.MODULE,parent:"Modal"},o.propTypes={as:p.customPropTypes.as,children:s.PropTypes.any,className:s.PropTypes.string},t["default"]=o},/*!******************************************!*\ !*** ./src/modules/Modal/ModalHeader.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,u["default"])(r,"header"),s=(0,p.getUnhandledProps)(o,e),i=(0,p.getElementType)(o,e);return l["default"].createElement(i,a({className:n},s),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! classnames */3),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"ModalHeader",type:p.META.TYPES.MODULE,parent:"Modal"},o.propTypes={as:p.customPropTypes.as,children:s.PropTypes.any,className:s.PropTypes.string},t["default"]=o},/*!**********************************************!*\ !*** ./src/modules/Search/SearchCategory.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.active,r=e.className,n=e.children,s=e.renderer,i=(0,u["default"])((0,p.useKeyOnly)(t,"active"),"category",r),d=(0,p.getUnhandledProps)(o,e),f=(0,p.getElementType)(o,e);return l["default"].createElement(f,a({},d,{className:i}),l["default"].createElement("div",{className:"name"},s?s(e):c(e)),n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! classnames */3),u=n(i),p=r(/*! ../../lib */2),c=function(e){var t=e.name;return t};o._meta={name:"SearchCategory",parent:"Search",type:p.META.TYPES.MODULE},o.propTypes={as:p.customPropTypes.as,active:s.PropTypes.bool,children:s.PropTypes.node,className:s.PropTypes.string,name:s.PropTypes.string,renderer:s.PropTypes.func,results:s.PropTypes.array},t["default"]=o},/*!********************************************!*\ !*** ./src/modules/Search/SearchResult.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.active,r=e.className,n=e.id,s=e.onClick,i=e.renderer,d=function(e){s&&s(e,n)},f=(0,u["default"])((0,p.useKeyOnly)(t,"active"),"result",r),y=(0,p.getElementType)(o,e),m=(0,p.getUnhandledProps)(o,e);return l["default"].createElement(y,a({},m,{className:f,onClick:d}),i?i(e):c(e))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! classnames */3),u=n(i),p=r(/*! ../../lib */2),c=function(e){var t=e.image,r=e.price,n=e.title,o=e.description;return[t&&l["default"].createElement("div",{key:"image",className:"image"},(0,p.createHTMLImage)(t)),l["default"].createElement("div",{key:"content",className:"content"},r&&l["default"].createElement("div",{className:"price"},r),n&&l["default"].createElement("div",{className:"title"},n),o&&l["default"].createElement("div",{className:"description"},o))]};o._meta={name:"SearchResult",parent:"Search",type:p.META.TYPES.MODULE},o.propTypes={as:p.customPropTypes.as,active:s.PropTypes.bool,className:s.PropTypes.string,description:s.PropTypes.string,id:s.PropTypes.number,image:s.PropTypes.string,price:s.PropTypes.string,renderer:s.PropTypes.func,title:s.PropTypes.string,onClick:s.PropTypes.func},t["default"]=o},/*!*********************************************!*\ !*** ./src/modules/Search/SearchResults.js ***! \*********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,u["default"])("results transition",r),s=(0,p.getUnhandledProps)(o,e),i=(0,p.getElementType)(o,e);return l["default"].createElement(i,a({},s,{className:n}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! classnames */3),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"SearchResults",parent:"Search",type:p.META.TYPES.MODULE},o.propTypes={as:p.customPropTypes.as,children:s.PropTypes.node,className:s.PropTypes.string},t["default"]=o},/*!********************************!*\ !*** ./src/views/Card/Card.js ***! \********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.centered,r=e.children,n=e.className,s=e.color,i=e.description,d=e.extra,y=e.fluid,m=e.header,v=e.href,h=e.image,T=e.meta,P=e.onClick,g=e.raised,b=(0,l["default"])("ui",(0,p.useKeyOnly)(t,"centered"),(0,p.useKeyOnly)(y,"fluid"),(0,p.useKeyOnly)(g,"raised"),s,"card",n),O=(0,p.getUnhandledProps)(o,e),_=function(e){P&&P(e)},E=(0,p.getElementType)(o,e,function(){if(P)return"a"});return r?u["default"].createElement(E,a({},O,{className:b,href:v,onClick:_}),r):u["default"].createElement(E,a({},O,{className:b,href:v,onClick:_}),c.Image.create(h),(i||m||T)&&u["default"].createElement(f["default"],{description:i,header:m,meta:T}),d&&u["default"].createElement(f["default"],{extra:!0},d))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ../../elements */4),d=r(/*! ./CardContent */168),f=n(d),y=r(/*! ./CardDescription */69),m=n(y),v=r(/*! ./CardGroup */169),h=n(v),T=r(/*! ./CardHeader */70),P=n(T),g=r(/*! ./CardMeta */71),b=n(g);o._meta={name:"Card",type:p.META.TYPES.VIEW,props:{color:p.SUI.COLORS}},o.propTypes={as:p.customPropTypes.as,centered:i.PropTypes.bool,children:p.customPropTypes.every([p.customPropTypes.disallow(["description","header","image","meta"]),i.PropTypes.node]),className:i.PropTypes.string,color:i.PropTypes.oneOf(o._meta.props.color),description:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.node]),extra:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.node]),fluid:i.PropTypes.bool,header:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.node]),href:i.PropTypes.string,image:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.node]),meta:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.node]),onClick:i.PropTypes.func,raised:i.PropTypes.bool},o.Content=f["default"],o.Description=m["default"],o.Group=h["default"],o.Header=P["default"],o.Meta=b["default"],t["default"]=o},/*!***************************************!*\ !*** ./src/views/Card/CardContent.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=e.description,s=e.extra,i=e.header,c=e.meta,f=(0,l["default"])(t,(0,p.useKeyOnly)(s,"extra"),"content"),m=(0,p.getUnhandledProps)(o,e),h=(0,p.getElementType)(o,e);return r?u["default"].createElement("div",a({},m,{className:f}),r):u["default"].createElement(h,a({},m,{className:f}),(0,p.createShorthand)(y["default"],function(e){return{content:e}},i),(0,p.createShorthand)(v["default"],function(e){return{content:e}},c),(0,p.createShorthand)(d["default"],function(e){return{content:e}},n))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ./CardDescription */69),d=n(c),f=r(/*! ./CardHeader */70),y=n(f),m=r(/*! ./CardMeta */71),v=n(m);o._meta={name:"CardContent",parent:"Card",type:p.META.TYPES.VIEW},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["description","header","meta"]),i.PropTypes.node]),className:i.PropTypes.string,description:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number])]),extra:i.PropTypes.bool,header:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number])]),meta:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number])])},t["default"]=o},/*!*************************************!*\ !*** ./src/views/Card/CardGroup.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=e.doubling,s=e.items,i=e.itemsPerRow,c=e.stackable,f=(0,l["default"])("ui",(0,p.useWidthProp)(i),(0,p.useKeyOnly)(n,"doubling"),(0,p.useKeyOnly)(c,"stackable"),t,"cards"),y=(0,p.getUnhandledProps)(o,e),m=(0,p.getElementType)(o,e),v=s?s.map(function(e){var t=e.key||[e.header,e.description].join("-");return u["default"].createElement(d["default"],a({key:t},e))}):r;return u["default"].createElement(m,a({},y,{className:f}),v)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ./Card */167),d=n(c);o._meta={name:"CardGroup",parent:"Card",props:{itemsPerRow:p.SUI.WIDTHS},type:p.META.TYPES.VIEW},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["items"]),i.PropTypes.node]),className:i.PropTypes.string,doubling:i.PropTypes.bool,items:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.arrayOf(i.PropTypes.shape({description:i.PropTypes.node,meta:i.PropTypes.node,key:i.PropTypes.string,header:i.PropTypes.node}))]),itemsPerRow:i.PropTypes.oneOf(o._meta.props.itemsPerRow),stackable:i.PropTypes.bool},t["default"]=o},/*!*************************************!*\ !*** ./src/views/Feed/FeedEvent.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.content,r=e.children,n=e.className,s=e.date,i=e.extraImages,c=e.extraText,f=e.image,m=e.icon,v=e.meta,h=e.summary,T=(0,l["default"])(n,"event"),P=(0,p.getUnhandledProps)(o,e),g=(0,p.getElementType)(o,e),b=t||s||i||c||v||h,O={content:t,date:s,extraImages:i,extraText:c,meta:v,summary:h};return u["default"].createElement(g,a({},P,{className:T}),(0,p.createShorthand)(y["default"],function(e){return{icon:e}},m),(0,p.createShorthand)(y["default"],function(e){return{image:e}},f),b&&u["default"].createElement(d["default"],O),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ./FeedContent */72),d=n(c),f=r(/*! ./FeedLabel */74),y=n(f);o._meta={name:"FeedEvent",parent:"Feed",type:p.META.TYPES.VIEW},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["date","extraImages","extraText","icon","image","meta","summary"]),i.PropTypes.node]),className:i.PropTypes.string,content:d["default"].propTypes.content,date:d["default"].propTypes.date,extraImages:d["default"].propTypes.extraImages,extraText:d["default"].propTypes.extraText,icon:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number,i.PropTypes.object,i.PropTypes.element])]),image:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.number,i.PropTypes.object,i.PropTypes.element])]),meta:d["default"].propTypes.meta,summary:d["default"].propTypes.summary},t["default"]=o},/*!********************************!*\ !*** ./src/views/Item/Item.js ***! \********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=e.description,i=e.extra,c=e.header,f=e.image,y=e.meta,m=(0,l["default"])(r,"item"),v=(0,p.getUnhandledProps)(o,e),h=(0,p.getElementType)(o,e);return t?u["default"].createElement(h,a({},v,{className:m}),t):u["default"].createElement(h,a({},v,{className:m}),(0,p.createShorthand)(O["default"],function(e){return{src:e}},f),u["default"].createElement(d["default"],{content:n,description:s,extra:i,header:c,meta:y}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ./ItemContent */172),d=n(c),f=r(/*! ./ItemDescription */79),y=n(f),m=r(/*! ./ItemExtra */80),v=n(m),h=r(/*! ./ItemGroup */173),T=n(h),P=r(/*! ./ItemHeader */81),g=n(P),b=r(/*! ./ItemImage */174),O=n(b),_=r(/*! ./ItemMeta */82),E=n(_);o._meta={name:"Item",type:p.META.TYPES.VIEW},o.Content=d["default"],o.Description=y["default"],o.Extra=v["default"],o.Group=T["default"],o.Header=g["default"],o.Image=O["default"],o.Meta=E["default"],o.propTypes={as:p.customPropTypes.as,children:i.PropTypes.node,className:i.PropTypes.string,content:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.string]),description:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.string]),extra:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.string]),image:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.string]),header:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.string]),meta:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.string])},t["default"]=o},/*!***************************************!*\ !*** ./src/views/Item/ItemContent.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=e.description,i=e.extra,c=e.header,f=e.meta,m=e.verticalAlign,h=(0,l["default"])(r,(0,p.useVerticalAlignProp)(m),"content"),P=(0,p.getUnhandledProps)(o,e),g=(0,p.getElementType)(o,e);return u["default"].createElement(g,a({},P,{className:h}),(0,p.createShorthand)(d["default"],function(e){return{content:e}},c),(0,p.createShorthand)(T["default"],function(e){return{content:e}},f),(0,p.createShorthand)(y["default"],function(e){return{content:e}},s),(0,p.createShorthand)(v["default"],function(e){return{content:e}},i),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ./ItemHeader */81),d=n(c),f=r(/*! ./ItemDescription */79),y=n(f),m=r(/*! ./ItemExtra */80),v=n(m),h=r(/*! ./ItemMeta */82),T=n(h);o._meta={name:"ItemContent",parent:"Item",type:p.META.TYPES.VIEW,props:{verticalAlign:p.SUI.VERTICAL_ALIGNMENTS}},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["content"]),i.PropTypes.node]),className:i.PropTypes.string,content:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.string]),description:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.string]),extra:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.string]),header:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.string]),meta:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.string]),verticalAlign:i.PropTypes.oneOf(o._meta.props.verticalAlign)},t["default"]=o},/*!*************************************!*\ !*** ./src/views/Item/ItemGroup.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e){var t=e.className,r=e.children,n=e.divided,s=e.items,u=e.link,c=e.relaxed,y=(0,p["default"])("ui",t,(0,f.useKeyOnly)(n,"divided"),(0,f.useKeyOnly)(u,"link"),(0,f.useKeyOrValueAndKey)(c,"relaxed"),"items"),v=(0,f.getUnhandledProps)(a,e),h=(0,f.getElementType)(a,e);if(!s)return d["default"].createElement(h,i({},v,{className:y}),r);var T=(0,l["default"])(s,function(e){var t=e.childKey,r=o(e,["childKey"]),n=t||[r.content,r.description,r.header,r.meta].join("-");return d["default"].createElement(m["default"],i({},r,{key:n}))});return d["default"].createElement(h,i({},v,{className:y}),T)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(/*! lodash/map */14),l=n(s),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(/*! classnames */3),p=n(u),c=r(/*! react */1),d=n(c),f=r(/*! ../../lib */2),y=r(/*! ./Item */171),m=n(y);a._meta={name:"ItemGroup",type:f.META.TYPES.VIEW,parent:"Item",props:{relaxed:["very"]}},a.propTypes={as:f.customPropTypes.as,children:c.PropTypes.node,className:c.PropTypes.string,divided:c.PropTypes.bool,items:f.customPropTypes.every([f.customPropTypes.disallow(["children"]),c.PropTypes.arrayOf(c.PropTypes.shape({childKey:c.PropTypes.oneOfType([c.PropTypes.number,c.PropTypes.string])}))]),link:c.PropTypes.bool,relaxed:c.PropTypes.oneOfType([c.PropTypes.bool,c.PropTypes.oneOf(a._meta.props.relaxed)])},t["default"]=a},/*!*************************************!*\ !*** ./src/views/Item/ItemImage.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=(0,i.getElementType)(o,e),r=(0,i.getUnhandledProps)(o,e);return l["default"].createElement(p["default"],a({},r,{as:t,ui:!1}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! ../../lib */2),u=r(/*! ../../elements/Image/Image */140),p=n(u);o._meta={name:"ItemImage",parent:"Item",type:i.META.TYPES.VIEW},t["default"]=o},/*!******************************************!*\ !*** ./src/views/Statistic/Statistic.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.color,a=e.floated,s=e.horizontal,i=e.inverted,p=e.label,f=e.size,y=e.text,m=e.value,h=(0,u["default"])("ui",n,(0,d.useValueAndKey)(a,"floated"),(0,d.useKeyOnly)(s,"horizontal"),(0,d.useKeyOnly)(i,"inverted"),f,r,"statistic"),P=(0,d.getUnhandledProps)(o,e),g=(0,d.getElementType)(o,e);return t?c["default"].createElement(g,l({},P,{className:h}),t):c["default"].createElement(g,l({},P,{className:h}),c["default"].createElement(T["default"],{text:y,value:m}),c["default"].createElement(v["default"],{label:p}))}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/without */7),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(/*! classnames */3),u=n(i),p=r(/*! react */1),c=n(p),d=r(/*! ../../lib */2),f=r(/*! ./StatisticGroup */176),y=n(f),m=r(/*! ./StatisticLabel */177),v=n(m),h=r(/*! ./StatisticValue */178),T=n(h);o._meta={name:"Statistic",type:d.META.TYPES.VIEW,props:{color:d.SUI.COLORS,floated:d.SUI.FLOATS,size:(0,s["default"])(d.SUI.SIZES,"big","massive","medium")}},o.propTypes={as:d.customPropTypes.as,children:d.customPropTypes.every([d.customPropTypes.disallow(["label","value"]),p.PropTypes.node]),className:p.PropTypes.string,color:p.PropTypes.oneOf(o._meta.props.color),floated:p.PropTypes.oneOf(o._meta.props.floated),horizontal:p.PropTypes.bool,inverted:p.PropTypes.bool,label:d.customPropTypes.every([d.customPropTypes.disallow(["children"]),p.PropTypes.string]),size:p.PropTypes.oneOf(o._meta.props.size),text:p.PropTypes.bool,value:d.customPropTypes.every([d.customPropTypes.disallow(["children"]),p.PropTypes.oneOfType([p.PropTypes.string,p.PropTypes.number])])},o.Group=y["default"],o.Label=v["default"],o.Value=T["default"],t["default"]=o},/*!***********************************************!*\ !*** ./src/views/Statistic/StatisticGroup.js ***! \***********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.horizontal,a=e.items,i=e.widths,p=(0,u["default"])("ui",(0,d.useKeyOnly)(n,"horizontal"),(0,d.useWidthProp)(i),"statistics",r),f=(0,d.getUnhandledProps)(o,e),m=(0,d.getElementType)(o,e);if(t)return c["default"].createElement(m,l({},f,{className:p}),t);var v=(0,s["default"])(a,function(e){return c["default"].createElement(y["default"],l({key:e.childKey||[e.label,e.title].join("-")},e))});return c["default"].createElement(m,l({},f,{className:p}),v)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/map */14),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(/*! classnames */3),u=n(i),p=r(/*! react */1),c=n(p),d=r(/*! ../../lib */2),f=r(/*! ./Statistic */175),y=n(f);o._meta={name:"StatisticGroup",type:d.META.TYPES.VIEW,parent:"Statistic",props:{widths:d.SUI.WIDTHS}},o.propTypes={as:d.customPropTypes.as,children:d.customPropTypes.every([d.customPropTypes.disallow(["content"]),p.PropTypes.node]),className:p.PropTypes.string,horizontal:p.PropTypes.bool,items:d.customPropTypes.every([d.customPropTypes.disallow(["children"]),p.PropTypes.arrayOf(p.PropTypes.shape({childKey:p.PropTypes.string}))]),widths:p.PropTypes.oneOf(o._meta.props.widths)},t["default"]=o},/*!***********************************************!*\ !*** ./src/views/Statistic/StatisticLabel.js ***! \***********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.label,s=(0,l["default"])(r,"label"),i=(0,p.getUnhandledProps)(o,e),c=(0,p.getElementType)(o,e);return u["default"].createElement(c,a({},i,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"StatisticLabel",parent:"Statistic",type:p.META.TYPES.VIEW},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["content"]),i.PropTypes.node]),className:i.PropTypes.string,label:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.string])},t["default"]=o},/*!***********************************************!*\ !*** ./src/views/Statistic/StatisticValue.js ***! \***********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.text,s=e.value,i=(0,l["default"])((0,p.useKeyOnly)(n,"text"),r,"value"),c=(0,p.getUnhandledProps)(o,e),d=(0,p.getElementType)(o,e);return u["default"].createElement(d,a({},c,{className:i}),t||s)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"StatisticValue",parent:"Statistic",type:p.META.TYPES.VIEW},o.propTypes={as:p.customPropTypes.as,children:p.customPropTypes.every([p.customPropTypes.disallow(["content"]),i.PropTypes.node]),className:i.PropTypes.string,text:i.PropTypes.bool,value:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.string])},t["default"]=o},/*!**************************!*\ !*** ./~/lodash/_Set.js ***! \**************************/ function(e,t,r){var n=r(/*! ./_getNative */22),o=r(/*! ./_root */9),a=n(o,"Set");e.exports=a},/*!*********************************!*\ !*** ./~/lodash/_Uint8Array.js ***! \*********************************/ function(e,t,r){var n=r(/*! ./_root */9),o=n.Uint8Array;e.exports=o},/*!******************************!*\ !*** ./~/lodash/_WeakMap.js ***! \******************************/ function(e,t,r){var n=r(/*! ./_getNative */22),o=r(/*! ./_root */9),a=n(o,"WeakMap");e.exports=a},/*!************************************!*\ !*** ./~/lodash/_arrayLikeKeys.js ***! \************************************/ function(e,t,r){function n(e,t){var r=s(e)||a(e)?o(e.length,String):[],n=r.length,i=!!n;for(var p in e)!t&&!u.call(e,p)||i&&("length"==p||l(p,n))||r.push(p);return r}var o=r(/*! ./_baseTimes */195),a=r(/*! ./isArguments */59),s=r(/*! ./isArray */5),l=r(/*! ./_isIndex */55),i=Object.prototype,u=i.hasOwnProperty;e.exports=n},/*!********************************!*\ !*** ./~/lodash/_arraySome.js ***! \********************************/ function(e,t){function r(e,t){for(var r=-1,n=e?e.length:0;++r<n;)if(t(e[r],r,e))return!0;return!1}e.exports=r},/*!**********************************!*\ !*** ./~/lodash/_assignValue.js ***! \**********************************/ function(e,t,r){function n(e,t,r){var n=e[t];s.call(e,t)&&o(n,r)&&(void 0!==r||t in e)||(e[t]=r)}var o=r(/*! ./eq */36),a=Object.prototype,s=a.hasOwnProperty;e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_baseAssign.js ***! \*********************************/ function(e,t,r){function n(e,t){return e&&o(t,a(t),e)}var o=r(/*! ./_copyObject */200),a=r(/*! ./keys */10);e.exports=n},/*!********************************!*\ !*** ./~/lodash/_baseClamp.js ***! \********************************/ function(e,t){function r(e,t,r){return e===e&&(void 0!==r&&(e=e<=r?e:r),void 0!==t&&(e=e>=t?e:t)),e}e.exports=r},/*!********************************!*\ !*** ./~/lodash/_baseClone.js ***! \********************************/ function(e,t,r){function n(e,t,r,O,_,E,w){var x;if(O&&(x=E?O(e,_,E,w):O(e)),void 0!==x)return x;if(!P(e))return e;var M=v(e);if(M){if(x=f(e),!t)return u(e,x)}else{var N=d(e),I=N==j||N==S;if(h(e))return i(e,t);if(N==A||N==b||I&&!E){if(T(e))return E?e:{};if(x=m(I?{}:e),!t)return p(e,l(x,e))}else{if(!H[N])return E?e:{};x=y(e,N,n,t)}}w||(w=new o);var k=w.get(e);if(k)return k;if(w.set(e,x),!M)var C=r?c(e):g(e);return a(C||e,function(o,a){C&&(a=o,o=e[a]),s(x,a,n(o,t,r,O,a,e,w))}),x}var o=r(/*! ./_Stack */87),a=r(/*! ./_arrayEach */31),s=r(/*! ./_assignValue */184),l=r(/*! ./_baseAssign */185),i=r(/*! ./_cloneBuffer */320),u=r(/*! ./_copyArray */49),p=r(/*! ./_copySymbols */327),c=r(/*! ./_getAllKeys */345),d=r(/*! ./_getTag */100),f=r(/*! ./_initCloneArray */357),y=r(/*! ./_initCloneByTag */358),m=r(/*! ./_initCloneObject */359),v=r(/*! ./isArray */5),h=r(/*! ./isBuffer */225),T=r(/*! ./_isHostObject */54),P=r(/*! ./isObject */11),g=r(/*! ./keys */10),b="[object Arguments]",O="[object Array]",_="[object Boolean]",E="[object Date]",w="[object Error]",j="[object Function]",S="[object GeneratorFunction]",x="[object Map]",M="[object Number]",A="[object Object]",N="[object RegExp]",I="[object Set]",k="[object String]",C="[object Symbol]",K="[object WeakMap]",L="[object ArrayBuffer]",U="[object DataView]",D="[object Float32Array]",R="[object Float64Array]",z="[object Int8Array]",W="[object Int16Array]",F="[object Int32Array]",V="[object Uint8Array]",B="[object Uint8ClampedArray]",Y="[object Uint16Array]",q="[object Uint32Array]",H={};H[b]=H[O]=H[L]=H[U]=H[_]=H[E]=H[D]=H[R]=H[z]=H[W]=H[F]=H[x]=H[M]=H[A]=H[N]=H[I]=H[k]=H[C]=H[V]=H[B]=H[Y]=H[q]=!0,H[w]=H[j]=H[K]=!1,e.exports=n},/*!************************************!*\ !*** ./~/lodash/_baseFindIndex.js ***! \************************************/ function(e,t){function r(e,t,r,n){for(var o=e.length,a=r+(n?1:-1);n?a--:++a<o;)if(t(e[a],a,e))return a;return-1}e.exports=r},/*!*********************************!*\ !*** ./~/lodash/_baseForOwn.js ***! \*********************************/ function(e,t,r){function n(e,t){return e&&o(e,t,a)}var o=r(/*! ./_baseFor */295),a=r(/*! ./keys */10);e.exports=n},/*!*************************************!*\ !*** ./~/lodash/_baseGetAllKeys.js ***! \*************************************/ function(e,t,r){function n(e,t,r){var n=t(e);return a(e)?n:o(n,r(e))}var o=r(/*! ./_arrayPush */46),a=r(/*! ./isArray */5);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_baseIndexOf.js ***! \**********************************/ function(e,t,r){function n(e,t,r){if(t!==t)return o(e,a,r);for(var n=r-1,s=e.length;++n<s;)if(e[n]===t)return n;return-1}var o=r(/*! ./_baseFindIndex */188),a=r(/*! ./_baseIsNaN */304);e.exports=n},/*!*******************************!*\ !*** ./~/lodash/_baseKeys.js ***! \*******************************/ function(e,t,r){function n(e){if(!o(e))return a(e);var t=[];for(var r in Object(e))l.call(e,r)&&"constructor"!=r&&t.push(r);return t}var o=r(/*! ./_isPrototype */56),a=r(/*! ./_nativeKeys */214),s=Object.prototype,l=s.hasOwnProperty;e.exports=n},/*!*******************************!*\ !*** ./~/lodash/_basePick.js ***! \*******************************/ function(e,t,r){function n(e,t){return e=Object(e),o(e,t,function(t,r){return r in e})}var o=r(/*! ./_basePickBy */311);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_baseSetData.js ***! \**********************************/ function(e,t,r){var n=r(/*! ./identity */105),o=r(/*! ./_metaMap */213),a=o?function(e,t){return o.set(e,t),e}:n;e.exports=a},/*!********************************!*\ !*** ./~/lodash/_baseTimes.js ***! \********************************/ function(e,t){function r(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}e.exports=r},/*!***********************************!*\ !*** ./~/lodash/_baseToString.js ***! \***********************************/ function(e,t,r){function n(e){if("string"==typeof e)return e;if(a(e))return i?i.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}var o=r(/*! ./_Symbol */44),a=r(/*! ./isSymbol */39),s=1/0,l=o?o.prototype:void 0,i=l?l.toString:void 0;e.exports=n},/*!********************************!*\ !*** ./~/lodash/_castSlice.js ***! \********************************/ function(e,t,r){function n(e,t,r){var n=e.length;return r=void 0===r?n:r,!t&&r>=n?e:o(e,t,r)}var o=r(/*! ./_baseSlice */93);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_composeArgs.js ***! \**********************************/ function(e,t){function r(e,t,r,o){for(var a=-1,s=e.length,l=r.length,i=-1,u=t.length,p=n(s-l,0),c=Array(u+p),d=!o;++i<u;)c[i]=t[i];for(;++a<l;)(d||a<s)&&(c[r[a]]=e[a]);for(;p--;)c[i++]=e[a++];return c}var n=Math.max;e.exports=r},/*!***************************************!*\ !*** ./~/lodash/_composeArgsRight.js ***! \***************************************/ function(e,t){function r(e,t,r,o){for(var a=-1,s=e.length,l=-1,i=r.length,u=-1,p=t.length,c=n(s-i,0),d=Array(c+p),f=!o;++a<c;)d[a]=e[a];for(var y=a;++u<p;)d[y+u]=t[u];for(;++l<i;)(f||a<s)&&(d[y+r[l]]=e[a++]);return d}var n=Math.max;e.exports=r},/*!*********************************!*\ !*** ./~/lodash/_copyObject.js ***! \*********************************/ function(e,t,r){function n(e,t,r,n){r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],i=n?n(r[l],e[l],l,r,e):void 0;o(r,l,void 0===i?e[l]:i)}return r}var o=r(/*! ./_assignValue */184);e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_createHybrid.js ***! \***********************************/ function(e,t,r){function n(e,t,r,P,g,b,O,_,E,w){function j(){for(var f=arguments.length,y=Array(f),m=f;m--;)y[m]=arguments[m];if(A)var v=u(j),h=s(y,v);if(P&&(y=o(y,P,g,A)),b&&(y=a(y,b,O,A)),f-=h,A&&f<w){var T=c(y,v);return i(e,t,n,j.placeholder,r,y,T,_,E,w-f)}var k=x?r:this,C=M?k[e]:e;return f=y.length,_?y=p(y,_):N&&f>1&&y.reverse(),S&&E<f&&(y.length=E),this&&this!==d&&this instanceof j&&(C=I||l(C)),C.apply(k,y)}var S=t&h,x=t&f,M=t&y,A=t&(m|v),N=t&T,I=M?void 0:l(e);return j}var o=r(/*! ./_composeArgs */198),a=r(/*! ./_composeArgsRight */199),s=r(/*! ./_countHolders */329),l=r(/*! ./_createCtor */50),i=r(/*! ./_createRecurry */202),u=r(/*! ./_getHolder */51),p=r(/*! ./_reorder */379),c=r(/*! ./_replaceHolders */35),d=r(/*! ./_root */9),f=1,y=2,m=8,v=16,h=128,T=512;e.exports=n},/*!************************************!*\ !*** ./~/lodash/_createRecurry.js ***! \************************************/ function(e,t,r){function n(e,t,r,n,f,y,m,v,h,T){var P=t&p,g=P?m:void 0,b=P?void 0:m,O=P?y:void 0,_=P?void 0:y;t|=P?c:d,t&=~(P?d:c),t&u||(t&=~(l|i));var E=[e,t,f,O,g,_,b,v,h,T],w=r.apply(void 0,E);return o(e)&&a(w,E),w.placeholder=n,s(w,e,t)}var o=r(/*! ./_isLaziable */209),a=r(/*! ./_setData */215),s=r(/*! ./_setWrapToString */216),l=1,i=2,u=4,p=8,c=32,d=64;e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_equalArrays.js ***! \**********************************/ function(e,t,r){function n(e,t,r,n,i,u){var p=i&l,c=e.length,d=t.length;if(c!=d&&!(p&&d>c))return!1;var f=u.get(e);if(f&&u.get(t))return f==t;var y=-1,m=!0,v=i&s?new o:void 0;for(u.set(e,t),u.set(t,e);++y<c;){var h=e[y],T=t[y];if(n)var P=p?n(T,h,y,t,e,u):n(h,T,y,e,t,u);if(void 0!==P){if(P)continue;m=!1;break}if(v){if(!a(t,function(e,t){if(!v.has(t)&&(h===e||r(h,e,n,i,u)))return v.add(t)})){m=!1;break}}else if(h!==T&&!r(h,T,n,i,u)){m=!1;break}}return u["delete"](e),u["delete"](t),m}var o=r(/*! ./_SetCache */43),a=r(/*! ./_arraySome */183),s=1,l=2;e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_freeGlobal.js ***! \*********************************/ function(e,t){(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.exports=r}).call(t,function(){return this}())},/*!**********************************!*\ !*** ./~/lodash/_getFuncName.js ***! \**********************************/ function(e,t,r){function n(e){for(var t=e.name+"",r=o[t],n=s.call(o,t)?r.length:0;n--;){var a=r[n],l=a.func;if(null==l||l==e)return a.name}return t}var o=r(/*! ./_realNames */378),a=Object.prototype,s=a.hasOwnProperty;e.exports=n},/*!******************************!*\ !*** ./~/lodash/_hasPath.js ***! \******************************/ function(e,t,r){function n(e,t,r){t=i(t,e)?[t]:o(t);for(var n,c=-1,d=t.length;++c<d;){var f=p(t[c]);if(!(n=null!=e&&r(e,f)))break;e=e[f]}if(n)return n;var d=e?e.length:0;return!!d&&u(d)&&l(f,d)&&(s(e)||a(e))}var o=r(/*! ./_castPath */96),a=r(/*! ./isArguments */59),s=r(/*! ./isArray */5),l=r(/*! ./_isIndex */55),i=r(/*! ./_isKey */34),u=r(/*! ./isLength */108),p=r(/*! ./_toKey */19);e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_hasUnicode.js ***! \*********************************/ function(e,t){function r(e){return i.test(e)}var n="\\ud800-\\udfff",o="\\u0300-\\u036f\\ufe20-\\ufe23",a="\\u20d0-\\u20f0",s="\\ufe0e\\ufe0f",l="\\u200d",i=RegExp("["+l+n+o+a+s+"]");e.exports=r},/*!*************************************!*\ !*** ./~/lodash/_isIterateeCall.js ***! \*************************************/ function(e,t,r){function n(e,t,r){if(!l(r))return!1;var n=typeof t;return!!("number"==n?a(r)&&s(t,r.length):"string"==n&&t in r)&&o(r[t],e)}var o=r(/*! ./eq */36),a=r(/*! ./isArrayLike */16),s=r(/*! ./_isIndex */55),l=r(/*! ./isObject */11);e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_isLaziable.js ***! \*********************************/ function(e,t,r){function n(e){var t=s(e),r=l[t];if("function"!=typeof r||!(t in o.prototype))return!1;if(e===r)return!0;var n=a(r);return!!n&&e===n[0]}var o=r(/*! ./_LazyWrapper */83),a=r(/*! ./_getData */98),s=r(/*! ./_getFuncName */205),l=r(/*! ./wrapperLodash */441);e.exports=n},/*!*****************************************!*\ !*** ./~/lodash/_isStrictComparable.js ***! \*****************************************/ function(e,t,r){function n(e){return e===e&&!o(e)}var o=r(/*! ./isObject */11);e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_mapToArray.js ***! \*********************************/ function(e,t){function r(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}e.exports=r},/*!**********************************************!*\ !*** ./~/lodash/_matchesStrictComparable.js ***! \**********************************************/ function(e,t){function r(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}e.exports=r},/*!******************************!*\ !*** ./~/lodash/_metaMap.js ***! \******************************/ function(e,t,r){var n=r(/*! ./_WeakMap */181),o=n&&new n;e.exports=o},/*!*********************************!*\ !*** ./~/lodash/_nativeKeys.js ***! \*********************************/ function(e,t,r){var n=r(/*! ./_overArg */101),o=n(Object.keys,Object);e.exports=o},/*!******************************!*\ !*** ./~/lodash/_setData.js ***! \******************************/ function(e,t,r){var n=r(/*! ./_baseSetData */194),o=r(/*! ./now */428),a=150,s=16,l=function(){var e=0,t=0;return function(r,l){var i=o(),u=s-(i-t);if(t=i,u>0){if(++e>=a)return r}else e=0;return n(r,l)}}();e.exports=l},/*!**************************************!*\ !*** ./~/lodash/_setWrapToString.js ***! \**************************************/ function(e,t,r){var n=r(/*! ./constant */395),o=r(/*! ./_defineProperty */342),a=r(/*! ./_getWrapDetails */350),s=r(/*! ./identity */105),l=r(/*! ./_insertWrapDetails */360),i=r(/*! ./_updateWrapDetails */390),u=o?function(e,t,r){var s=t+"";return o(e,"toString",{configurable:!0,enumerable:!1,value:n(l(s,i(a(s),r)))})}:s;e.exports=u},/*!***********************************!*\ !*** ./~/lodash/_stringToPath.js ***! \***********************************/ function(e,t,r){var n=r(/*! ./memoize */427),o=r(/*! ./toString */24),a=/^\./,s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,i=n(function(e){e=o(e);var t=[];return a.test(e)&&t.push(""),e.replace(s,function(e,r,n,o){t.push(n?o.replace(l,"$1"):r||e)}),t});e.exports=i},/*!*******************************!*\ !*** ./~/lodash/_toSource.js ***! \*******************************/ function(e,t){function r(e){if(null!=e){try{return o.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var n=Function.prototype,o=n.toString;e.exports=r},/*!*****************************!*\ !*** ./~/lodash/compact.js ***! \*****************************/ function(e,t){function r(e){for(var t=-1,r=e?e.length:0,n=0,o=[];++t<r;){var a=e[t];a&&(o[n++]=a)}return o}e.exports=r},/*!***************************!*\ !*** ./~/lodash/curry.js ***! \***************************/ function(e,t,r){function n(e,t,r){t=r?void 0:t;var s=o(e,a,void 0,void 0,void 0,void 0,void 0,t);return s.placeholder=n.placeholder,s}var o=r(/*! ./_createWrap */33),a=8;n.placeholder={},e.exports=n},/*!***************************!*\ !*** ./~/lodash/every.js ***! \***************************/ function(e,t,r){function n(e,t,r){var n=l(e)?o:a;return r&&i(e,t,r)&&(t=void 0),n(e,s(t,3))}var o=r(/*! ./_arrayEvery */289),a=r(/*! ./_baseEvery */293),s=r(/*! ./_baseIteratee */13),l=r(/*! ./isArray */5),i=r(/*! ./_isIterateeCall */208);e.exports=n},/*!*******************************!*\ !*** ./~/lodash/findIndex.js ***! \*******************************/ function(e,t,r){function n(e,t,r){var n=e?e.length:0;if(!n)return-1;var i=null==r?0:s(r);return i<0&&(i=l(n+i,0)),o(e,a(t,3),i)}var o=r(/*! ./_baseFindIndex */188),a=r(/*! ./_baseIteratee */13),s=r(/*! ./toInteger */17),l=Math.max;e.exports=n},/*!*****************************!*\ !*** ./~/lodash/fp/flow.js ***! \*****************************/ function(e,t,r){var n=r(/*! ./convert */8),o=n("flow",r(/*! ../flow */400));o.placeholder=r(/*! ./placeholder */6),e.exports=o},/*!****************************!*\ !*** ./~/lodash/invoke.js ***! \****************************/ function(e,t,r){var n=r(/*! ./_baseInvoke */301),o=r(/*! ./_baseRest */12),a=o(n);e.exports=a},/*!******************************!*\ !*** ./~/lodash/isBuffer.js ***! \******************************/ function(e,t,r){(function(e){var n=r(/*! ./_root */9),o=r(/*! ./stubFalse */437),a="object"==typeof t&&t&&!t.nodeType&&t,s=a&&"object"==typeof e&&e&&!e.nodeType&&e,l=s&&s.exports===a,i=l?n.Buffer:void 0,u=i?i.isBuffer:void 0,p=u||o;e.exports=p}).call(t,r(/*! ./../webpack/buildin/module.js */237)(e))},/*!***********************************!*\ !*** ./~/lodash/isPlainObject.js ***! \***********************************/ function(e,t,r){function n(e){if(!s(e)||f.call(e)!=l||a(e))return!1;var t=o(e);if(null===t)return!0;var r=c.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&p.call(r)==d}var o=r(/*! ./_getPrototype */53),a=r(/*! ./_isHostObject */54),s=r(/*! ./isObjectLike */20),l="[object Object]",i=Function.prototype,u=Object.prototype,p=i.toString,c=u.hasOwnProperty,d=p.call(Object),f=u.toString;e.exports=n},/*!******************************!*\ !*** ./~/lodash/isString.js ***! \******************************/ function(e,t,r){function n(e){return"string"==typeof e||!o(e)&&a(e)&&i.call(e)==s}var o=r(/*! ./isArray */5),a=r(/*! ./isObjectLike */20),s="[object String]",l=Object.prototype,i=l.toString;e.exports=n},/*!**********************************!*\ !*** ./~/lodash/isTypedArray.js ***! \**********************************/ function(e,t,r){var n=r(/*! ./_baseIsTypedArray */306),o=r(/*! ./_baseUnary */94),a=r(/*! ./_nodeUtil */376),s=a&&a.isTypedArray,l=s?o(s):n;e.exports=l},/*!**************************!*\ !*** ./~/lodash/noop.js ***! \**************************/ function(e,t){function r(){}e.exports=r},/*!****************************!*\ !*** ./~/lodash/reduce.js ***! \****************************/ function(e,t,r){function n(e,t,r){var n=i(e)?o:l,u=arguments.length<3;return n(e,s(t,4),r,u,a)}var o=r(/*! ./_arrayReduce */47),a=r(/*! ./_baseEach */25),s=r(/*! ./_baseIteratee */13),l=r(/*! ./_baseReduce */315),i=r(/*! ./isArray */5);e.exports=n},/*!**************************!*\ !*** ./~/lodash/some.js ***! \**************************/ function(e,t,r){function n(e,t,r){var n=l(e)?o:s;return r&&i(e,t,r)&&(t=void 0),n(e,a(t,3))}var o=r(/*! ./_arraySome */183),a=r(/*! ./_baseIteratee */13),s=r(/*! ./_baseSome */316),l=r(/*! ./isArray */5),i=r(/*! ./_isIterateeCall */208);e.exports=n},/*!*******************************!*\ !*** ./~/lodash/stubArray.js ***! \*******************************/ function(e,t){function r(){return[]}e.exports=r},/*!***************************!*\ !*** ./~/lodash/times.js ***! \***************************/ function(e,t,r){function n(e,t){if(e=s(e),e<1||e>l)return[];var r=i,n=u(e,i);t=o(t),e-=i;for(var p=a(n,t);++r<e;)t(r);return p}var o=r(/*! ./_baseIteratee */13),a=r(/*! ./_baseTimes */195),s=r(/*! ./toInteger */17),l=9007199254740991,i=4294967295,u=Math.min;e.exports=n},/*!******************************!*\ !*** ./~/lodash/toFinite.js ***! \******************************/ function(e,t,r){function n(e){if(!e)return 0===e?e:0;if(e=o(e),e===a||e===-a){var t=e<0?-1:1;return t*s}return e===e?e:0}var o=r(/*! ./toNumber */62),a=1/0,s=1.7976931348623157e308;e.exports=n},/*!*******************************!*\ !*** ./~/lodash/transform.js ***! \*******************************/ function(e,t,r){function n(e,t,r){var n=u(e)||d(e);if(t=l(t,4),null==r)if(n||c(e)){var f=e.constructor;r=n?u(e)?new f:[]:p(f)?a(i(e)):{}}else r={};return(n?o:s)(e,function(e,n,o){return t(r,e,n,o)}),r}var o=r(/*! ./_arrayEach */31),a=r(/*! ./_baseCreate */32),s=r(/*! ./_baseForOwn */189),l=r(/*! ./_baseIteratee */13),i=r(/*! ./_getPrototype */53),u=r(/*! ./isArray */5),p=r(/*! ./isFunction */23),c=r(/*! ./isObject */11),d=r(/*! ./isTypedArray */228);e.exports=n},/*!***************************!*\ !*** ./~/lodash/union.js ***! \***************************/ function(e,t,r){var n=r(/*! ./_baseFlatten */26),o=r(/*! ./_baseRest */12),a=r(/*! ./_baseUniq */317),s=r(/*! ./isArrayLikeObject */38),l=o(function(e){return a(n(e,1,s,!0))});e.exports=l},/*!***********************************!*\ !*** (webpack)/buildin/module.js ***! \***********************************/ function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},/*!***************************************!*\ !*** ./src/addons/Confirm/Confirm.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.active,r=e.cancelButton,n=e.confirmButton,s=e.header,c=e.content,d=e.onConfirm,f=e.onCancel,y=(0,p.getUnhandledProps)(o,e);return l["default"].createElement(u.Modal,a({active:t,size:"small",onHide:f},y),s&&l["default"].createElement(u.Modal.Header,null,s),c&&l["default"].createElement(u.Modal.Content,null,c),l["default"].createElement(u.Modal.Actions,null,l["default"].createElement(i.Button,{onClick:f},r),l["default"].createElement(i.Button,{primary:!0,onClick:d},n)))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! ../../elements */4),u=r(/*! ../../modules */21),p=r(/*! ../../lib */2);o._meta={name:"Confirm",type:p.META.TYPES.ADDON},o.propTypes={active:s.PropTypes.bool,cancelButton:s.PropTypes.string,confirmButton:s.PropTypes.string,header:s.PropTypes.string,content:s.PropTypes.string,onConfirm:s.PropTypes.func,onCancel:s.PropTypes.func},o.defaultProps={cancelButton:"Cancel",confirmButton:"OK",content:"Are you sure?"},t["default"]=o},/*!***********************************!*\ !*** ./src/addons/Radio/Radio.js ***! \***********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.slider,r=e.toggle,n=e.type,s=(0,i.getUnhandledProps)(o,e),p=!(t||r)||void 0;return l["default"].createElement(u.Checkbox,a({},s,{type:n,radio:p,slider:t,toggle:r}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! ../../lib */2),u=r(/*! ../../modules */21);o._meta={name:"Radio",type:i.META.TYPES.ADDON,props:{type:u.Checkbox._meta.props.type}},o.propTypes={slider:u.Checkbox.propTypes.slider,toggle:u.Checkbox.propTypes.toggle,type:s.PropTypes.oneOf(o._meta.props.type)},o.defaultProps={type:"radio"},t["default"]=o},/*!*************************************!*\ !*** ./src/addons/Select/Select.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.selection,r=(0,i.getUnhandledProps)(o,e);return l["default"].createElement(u.Dropdown,a({},r,{selection:t}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! ../../lib */2),u=r(/*! ../../modules */21);o._meta={name:"Select",type:i.META.TYPES.ADDON},o.propTypes={selection:s.PropTypes.bool},o.defaultProps={selection:!0},t["default"]=o},/*!*****************************************!*\ !*** ./src/addons/TextArea/TextArea.js ***! \*****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=(0,l.getUnhandledProps)(o,e),r=(0,l.getElementType)(o,e);return s["default"].createElement(r,t)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! react */1),s=n(a),l=r(/*! ../../lib */2);o._meta={name:"TextArea",type:l.META.TYPES.ADDON},o.propTypes={as:l.customPropTypes.as},o.defaultProps={as:"textarea"},t["default"]=o},/*!**************************************************!*\ !*** ./src/collections/Breadcrumb/Breadcrumb.js ***! \**************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e){var t=e.children,r=e.className,n=e.divider,s=e.icon,l=e.size,u=e.sections,c=(0,f.getUnhandledProps)(a,e),y=(0,p["default"])("ui",r,l,"breadcrumb"),v=(0,f.getElementType)(a,e);if(!u)return d["default"].createElement(v,i({},c,{className:y}),t);var T=d["default"].createElement(m["default"],{icon:s},n),P=[];return u.forEach(function(e,t){var r=e.text,n=e.key,a=o(e,["text","key"]),s=n||r,l=s+"-divider";P.push(d["default"].createElement(h["default"],i({},a,{key:s}),r)),t!==u.length-1&&P.push(d["default"].cloneElement(T,{key:l}))}),d["default"].createElement(v,i({},c,{className:y}),P)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(/*! lodash/without */7),l=n(s),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(/*! classnames */3),p=n(u),c=r(/*! react */1),d=n(c),f=r(/*! ../../lib */2),y=r(/*! ./BreadcrumbDivider */112),m=n(y),v=r(/*! ./BreadcrumbSection */113),h=n(v);a._meta={name:"Breadcrumb",type:f.META.TYPES.COLLECTION,props:{size:(0,l["default"])(f.SUI.SIZES,"medium")}},a.propTypes={as:f.customPropTypes.as,children:f.customPropTypes.every([f.customPropTypes.disallow(["sections","icon","divider"]),c.PropTypes.node]),className:c.PropTypes.string,divider:f.customPropTypes.every([f.customPropTypes.disallow(["icon"]),c.PropTypes.string]),icon:f.customPropTypes.every([f.customPropTypes.disallow(["divider"]),c.PropTypes.node]),sections:f.customPropTypes.every([f.customPropTypes.disallow(["children"]),d["default"].PropTypes.array]),size:c.PropTypes.oneOf(a._meta.props.size)},a.Divider=m["default"],a.Section=h["default"],t["default"]=a},/*!**************************************!*\ !*** ./src/collections/Form/Form.js ***! \**************************************/ function(e,t,r){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(t){W("formSerializer()");var r={};return t?((0,v["default"])(t.querySelectorAll('input[type="checkbox"]'),function(n,o,a){var s=F(n),l=(0,y["default"])(a,{name:s});if(1===l.length)return r[s]=n.checked&&"on"!==n.value?n.value:n.checked,void V(r,s,n);if(Array.isArray(r[s])||(r[s]=[]),n.checked&&r[s].push(n.value),V(r,s,n),"production"!==e.NODE_ENV&&"on"===n.value){var i=["Encountered a checkbox in a group with the default browser value 'on'.","Each checkbox in a group should have a unique value.","Otherwise, the checkbox value will serialize as ['on', ...]."].join(" ");console.error(i,n,t)}}),(0,v["default"])(t.querySelectorAll('input[type="radio"]'),function(n,o,a){var s=F(n),l=(0,d["default"])(a,{name:s,checked:!0});if(l?r[s]=l.value:r[s]=null,V(r,s,n),"production"!==e.NODE_ENV&&"on"===n.value){var i=["Encountered a radio with the default browser value 'on'.","Each radio should have a unique value.","Otherwise, the radio value will serialize as { [name]: 'on' }."].join(" ");console.error(i,n,t)}}),(0,v["default"])(t.querySelectorAll('input:not([type="radio"]):not([type="checkbox"])'),function(e){var t=F(e);r[t]=e.value,V(r,t,e)}),(0,v["default"])(t.querySelectorAll("textarea"),function(e){var t=F(e);r[t]=e.value,V(r,t,e)}),(0,v["default"])(t.querySelectorAll("select"),function(e){var t=F(e);e.multiple?r[t]=(0,p["default"])((0,y["default"])(e.querySelectorAll("option"),"selected"),"value"):r[t]=e.value,V(r,t,e)}),r):r}function s(e){var t=e.className,r=e.children,n=e.error,o=e.loading,a=e.onSubmit,l=e.size,i=e.success,u=e.warning,p=e.widths,c=(0,P["default"])("ui",l,(0,O.useKeyOnly)(o,"loading"),(0,O.useKeyOnly)(i,"success"),(0,O.useKeyOnly)(n,"error"),(0,O.useKeyOnly)(u,"warning"),(0,O.useWidthProp)(p,null,!0),"form",t),d=(0,O.getUnhandledProps)(s,e),f=(0,O.getElementType)(s,e),y=void 0,m=function(t){a&&a(t,e.serializer(y))};return b["default"].createElement(f,h({},d,{className:c,onSubmit:m,ref:function(e){return y=y||e}}),r)}Object.defineProperty(t,"__esModule",{value:!0});var l=r(/*! lodash/without */7),i=n(l),u=r(/*! lodash/map */14),p=n(u),c=r(/*! lodash/find */104),d=n(c),f=r(/*! lodash/filter */103),y=n(f),m=r(/*! lodash/each */102),v=n(m),h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},T=r(/*! classnames */3),P=n(T),g=r(/*! react */1),b=n(g),O=r(/*! ../../lib */2),_=r(/*! ./FormButton */114),E=n(_),w=r(/*! ./FormCheckbox */115),j=n(w),S=r(/*! ./FormDropdown */116),x=n(S),M=r(/*! ./FormField */15),A=n(M),N=r(/*! ./FormGroup */117),I=n(N),k=r(/*! ./FormInput */118),C=n(k),K=r(/*! ./FormRadio */119),L=n(K),U=r(/*! ./FormSelect */120),D=n(U),R=r(/*! ./FormTextArea */121),z=n(R),W=(0,O.makeDebugger)("form"),F=function(e){var t=e.name;return t},V=function(){};"production"!==e.NODE_ENV&&(V=function(e,t,r){W("serialized "+JSON.stringify(o({},t,e[t]))+" from:",r)},F=function(e){var t=e.name;if(!t){var r=["Encountered a form control node without a name attribute.","Each node in a group should have a name.",'Otherwise, the node will serialize as { "undefined": <value> }.'].join(" ");console.error(r,e)}return t}),s.Field=A["default"],s.Button=E["default"],s.Checkbox=j["default"],s.Dropdown=x["default"],s.Group=I["default"],s.Input=C["default"],s.Radio=L["default"],s.Select=D["default"],s.TextArea=z["default"],s._meta={name:"Form",type:O.META.TYPES.COLLECTION,props:{widths:["equal"],size:(0,i["default"])(O.SUI.SIZES,"medium")}},s.propTypes={as:O.customPropTypes.as,children:g.PropTypes.node,className:g.PropTypes.string,loading:g.PropTypes.bool,success:g.PropTypes.bool,error:g.PropTypes.bool,warning:g.PropTypes.bool,size:g.PropTypes.oneOf(s._meta.props.size),widths:g.PropTypes.oneOf(s._meta.props.widths),serializer:g.PropTypes.func,onSubmit:g.PropTypes.func},s.defaultProps={as:"form",serializer:a},t["default"]=s}).call(t,r(/*! ./~/node-libs-browser/~/process/browser.js */63))},/*!**************************************!*\ !*** ./src/collections/Grid/Grid.js ***! \**************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function a(e){var t=e.children,r=e.className,n=e.celled,o=e.centered,l=e.columns,u=e.divided,d=e.doubling,f=e.padded,y=e.relaxed,m=e.reversed,v=e.stackable,h=e.stretched,T=e.textAlign,P=e.verticalAlign,g=(0,i["default"])("ui",r,(0,c.useWidthProp)(l,"column",!0),(0,c.useKeyOrValueAndKey)(n,"celled"),(0,c.useKeyOnly)(o,"centered"),(0,c.useKeyOrValueAndKey)(u,"divided"),(0,c.useKeyOnly)(d,"doubling"),(0,c.useKeyOrValueAndKey)(f,"padded"),(0,c.useKeyOrValueAndKey)(y,"relaxed"),(0,c.useValueAndKey)(m,"reversed"),(0,c.useKeyOnly)(v,"stackable"),(0,c.useKeyOnly)(h,"stretched"),(0,c.useTextAlignProp)(T),(0,c.useVerticalAlignProp)(P),"grid"),b=(0,c.getUnhandledProps)(a,e),O=(0,c.getElementType)(a,e);return p["default"].createElement(O,s({},b,{className:g}),t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l=r(/*! classnames */3),i=n(l),u=r(/*! react */1),p=n(u),c=r(/*! ../../lib */2),d=r(/*! ./GridColumn */122),f=n(d),y=r(/*! ./GridRow */123),m=n(y);a.Column=f["default"],a.Row=m["default"],a._meta={name:"Grid",type:c.META.TYPES.COLLECTION,props:{celled:["internally"],columns:[].concat(o(c.SUI.WIDTHS),["equal"]),divided:["vertically"],padded:["horizontally","vertically"],relaxed:["very"],reversed:["computer","computer vertically","mobile","mobile vertically","tablet","tablet vertically"],textAlign:c.SUI.TEXT_ALIGNMENTS,verticalAlign:c.SUI.VERTICAL_ALIGNMENTS}},a.propTypes={as:c.customPropTypes.as,celled:u.PropTypes.oneOfType([u.PropTypes.bool,u.PropTypes.oneOf(a._meta.props.celled)]),centered:u.PropTypes.bool,children:u.PropTypes.node,className:u.PropTypes.string,columns:u.PropTypes.oneOf(a._meta.props.columns),divided:u.PropTypes.oneOfType([u.PropTypes.bool,u.PropTypes.oneOf(a._meta.props.divided)]),doubling:u.PropTypes.bool,padded:u.PropTypes.oneOfType([u.PropTypes.bool,u.PropTypes.oneOf(a._meta.props.padded)]),relaxed:u.PropTypes.oneOfType([u.PropTypes.bool,u.PropTypes.oneOf(a._meta.props.relaxed)]),reversed:u.PropTypes.oneOf(a._meta.props.reversed),stackable:u.PropTypes.bool,stretched:u.PropTypes.bool,textAlign:u.PropTypes.oneOf(a._meta.props.textAlign),verticalAlign:u.PropTypes.oneOf(f["default"]._meta.props.verticalAlign)},t["default"]=a},/*!**************************************!*\ !*** ./src/collections/Menu/Menu.js ***! \**************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=r(/*! lodash/map */14),i=n(l),u=r(/*! lodash/get */37),p=n(u),c=r(/*! lodash/without */7),d=n(c),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},y=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}}(),m=r(/*! classnames */3),v=n(m),h=r(/*! react */1),T=n(h),P=r(/*! ../../lib */2),g=r(/*! ./MenuHeader */124),b=n(g),O=r(/*! ./MenuItem */125),_=n(O),E=r(/*! ./MenuMenu */126),w=n(E),j={name:"Menu",type:P.META.TYPES.COLLECTION,props:{attached:["top","bottom"],color:P.SUI.COLORS,floated:["right"],icon:["labeled"],fixed:["left","right","bottom","top"],size:(0,d["default"])(P.SUI.SIZES,"medium","big"),tabular:["right"],widths:P.SUI.WIDTHS}},S=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,i=Array(l),u=0;u<l;u++)i[u]=arguments[u];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),n.handleItemClick=function(e,t){var r=t.name,o=t.index;n.trySetState({activeIndex:o});var a=n.props,s=a.items,l=a.onItemClick;(0,p["default"])(s[o],"onClick")&&s[o].onClick(e,{name:r,index:o}),l&&l(e,{name:r,index:o})},s=r,a(n,s)}return s(t,e),y(t,[{key:"renderItems",value:function(){var e=this,t=this.props.items,r=this.state.activeIndex;return(0,i["default"])(t,function(t,n){return(0,P.createShorthand)(_["default"],function(e){return{content:e}},t,{active:r===n,childKey:function(e){var t=e.content,r=e.name;return[t,r].join("-")},index:n,onClick:e.handleItemClick})})}},{key:"render",value:function(){var e=this.props,r=e.attached,n=e.borderless,o=e.className,a=e.children,s=e.color,l=e.compact,i=e.fixed,u=e.floated,p=e.fluid,c=e.icon,d=e.inverted,y=e.pagination,m=e.pointing,h=e.secondary,g=e.stackable,b=e.tabular,O=e.text,_=e.vertical,E=e.size,w=e.widths,j=(0,v["default"])("ui",s,E,(0,P.useWidthProp)(w,"item"),(0,P.useKeyOrValueAndKey)(r,"attached"),(0,P.useKeyOnly)(n,"borderless"),(0,P.useKeyOnly)(l,"compact"),(0,P.useValueAndKey)(i,"fixed"),(0,P.useKeyOrValueAndKey)(u,"floated"),(0,P.useKeyOnly)(p,"fluid"),(0,P.useKeyOrValueAndKey)(c,"icon"),(0,P.useKeyOnly)(d,"inverted"),(0,P.useKeyOnly)(y,"pagination"),(0,P.useKeyOnly)(m,"pointing"),(0,P.useKeyOnly)(h,"secondary"),(0,P.useKeyOnly)(g,"stackable"),(0,P.useKeyOrValueAndKey)(b,"tabular"),(0,P.useKeyOnly)(O,"text"),(0,P.useKeyOnly)(_,"vertical"),o,"menu"),S=(0,P.getUnhandledProps)(t,this.props),x=(0,P.getElementType)(t,this.props);return T["default"].createElement(x,f({},S,{className:j}),a||this.renderItems())}}]),t}(P.AutoControlledComponent);S.propTypes={as:P.customPropTypes.as,activeIndex:h.PropTypes.number,attached:h.PropTypes.oneOfType([h.PropTypes.bool,h.PropTypes.oneOf(j.props.attached)]),borderless:h.PropTypes.bool,children:h.PropTypes.node,className:h.PropTypes.string,color:h.PropTypes.oneOf(j.props.color),compact:h.PropTypes.bool,defaultActiveIndex:h.PropTypes.number,fixed:h.PropTypes.oneOf(j.props.fixed),floated:h.PropTypes.oneOfType([h.PropTypes.bool,h.PropTypes.oneOf(j.props.floated)]),fluid:h.PropTypes.bool,icon:h.PropTypes.oneOfType([h.PropTypes.bool,h.PropTypes.oneOf(j.props.icon)]),inverted:h.PropTypes.bool,items:P.customPropTypes.every([P.customPropTypes.disallow(["children"]),h.PropTypes.arrayOf(h.PropTypes.oneOfType([h.PropTypes.string,h.PropTypes.element,h.PropTypes.object]))]),onItemClick:P.customPropTypes.every([P.customPropTypes.disallow(["children"]),h.PropTypes.func]),pagination:h.PropTypes.bool,pointing:h.PropTypes.bool,secondary:h.PropTypes.bool,stackable:h.PropTypes.bool,tabular:h.PropTypes.oneOfType([h.PropTypes.bool,h.PropTypes.oneOf(j.props.tabular)]),text:h.PropTypes.bool,vertical:h.PropTypes.bool,size:h.PropTypes.oneOf(j.props.size),widths:h.PropTypes.oneOf(j.props.widths)},S._meta=j,S.autoControlledProps=["activeIndex"],S.Header=b["default"],S.Item=_["default"],S.Menu=w["default"],t["default"]=S},/*!********************************************!*\ !*** ./src/collections/Message/Message.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,a=e.header,s=e.icon,i=e.list,p=e.onDismiss,y=e.hidden,v=e.visible,T=e.floating,g=e.compact,b=e.attached,O=e.warning,_=e.info,E=e.positive,w=e.success,j=e.negative,S=e.error,x=e.color,M=e.size,A=(0,c["default"])("ui",M,x,(0,d.useKeyOnly)(s,"icon"),(0,d.useKeyOnly)(y,"hidden"),(0,d.useKeyOnly)(v,"visible"),(0,d.useKeyOnly)(T,"floating"),(0,d.useKeyOnly)(g,"compact"),(0,d.useKeyOrValueAndKey)(b,"attached"),(0,d.useKeyOnly)(O,"warning"),(0,d.useKeyOnly)(_,"info"),(0,d.useKeyOnly)(E,"positive"),(0,d.useKeyOnly)(w,"success"),(0,d.useKeyOnly)(j,"negative"),(0,d.useKeyOnly)(S,"error"),"message",r),N=p&&u["default"].createElement(f.Icon,{name:"close",onClick:p}),I=(0,d.getUnhandledProps)(o,e),k=(0,d.getElementType)(o,e);return n||a||s&&s!==!0||i?u["default"].createElement(k,l({},I,{className:A}),N,f.Icon.create(s),(a||n||i)&&u["default"].createElement(m["default"],null,(0,d.createShorthand)(h["default"],function(e){return{children:e}},a),(0,d.createShorthand)(P["default"],function(e){return{items:e}},i),(0,d.createShorthand)("p",function(e){return{children:e}},n))):u["default"].createElement(k,l({},I,{className:A}),N,t)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/without */7),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(/*! react */1),u=n(i),p=r(/*! classnames */3),c=n(p),d=r(/*! ../../lib */2),f=r(/*! ../../elements */4),y=r(/*! ./MessageContent */127),m=n(y),v=r(/*! ./MessageHeader */128),h=n(v),T=r(/*! ./MessageList */129),P=n(T),g=r(/*! ./MessageItem */64),b=n(g);o._meta={name:"Message",type:d.META.TYPES.COLLECTION,props:{attached:["bottom"],color:d.SUI.COLORS,size:(0,s["default"])(d.SUI.SIZES,"medium")}},o.propTypes={as:d.customPropTypes.as,children:d.customPropTypes.every([i.PropTypes.node,d.customPropTypes.disallow(["header","content"]),d.customPropTypes.givenProps({icon:i.PropTypes.node.isRequired},d.customPropTypes.disallow(["icon"]))]),className:i.PropTypes.string,content:i.PropTypes.string,header:d.customPropTypes.every([d.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.node])]),icon:d.customPropTypes.every([d.customPropTypes.givenProps({children:i.PropTypes.node.isRequired},i.PropTypes.bool),d.customPropTypes.givenProps({icon:i.PropTypes.string.isRequired},d.customPropTypes.disallow(["children"]))]),list:d.customPropTypes.every([d.customPropTypes.disallow(["children"]),i.PropTypes.arrayOf(i.PropTypes.string)]),onDismiss:i.PropTypes.func,hidden:i.PropTypes.bool,visible:i.PropTypes.bool,floating:i.PropTypes.bool,compact:i.PropTypes.bool,attached:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(o._meta.props.attached)]),warning:i.PropTypes.bool,info:i.PropTypes.bool,positive:i.PropTypes.bool,success:i.PropTypes.bool,negative:i.PropTypes.bool,error:i.PropTypes.bool,color:i.PropTypes.oneOf(o._meta.props.color),size:i.PropTypes.oneOf(o._meta.props.size)},o.Content=m["default"],o.Header=h["default"],o.List=P["default"],o.Item=b["default"],t["default"]=o},/*!****************************************!*\ !*** ./src/collections/Table/Table.js ***! \****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.basic,r=e.attached,n=e.renderBodyRow,a=e.celled,s=e.children,l=e.className,p=e.collapsing,d=e.color,m=e.columns,h=e.compact,T=e.definition,P=e.fixed,b=e.footerRow,_=e.headerRow,E=e.inverted,w=e.padded,S=e.selectable,x=e.singleLine,M=e.size,A=e.stackable,N=e.striped,I=e.structured,k=e.tableData,C=e.unstackable,K=(0,c["default"])("ui",d,M,(0,y.useKeyOrValueAndKey)(r,"attached"),(0,y.useKeyOrValueAndKey)(t,"basic"),(0,y.useKeyOnly)(a,"celled"),(0,y.useKeyOnly)(p,"collapsing"),(0,y.useKeyOrValueAndKey)(h,"compact"),(0,y.useKeyOnly)(T,"definition"),(0,y.useKeyOnly)(P,"fixed"),(0,y.useKeyOnly)(E,"inverted"),(0,y.useKeyOrValueAndKey)(w,"padded"),(0,y.useKeyOnly)(S,"selectable"),(0,y.useKeyOnly)(x,"single line"),(0,y.useKeyOnly)(A,"stackable"),(0,y.useKeyOnly)(N,"striped"),(0,y.useKeyOnly)(I,"structured"),(0,y.useKeyOnly)(C,"unstackable"),(0,y.useWidthProp)(m,"column"),l,"table"),L=(0,y.getElementType)(o,e),U=(0,y.getUnhandledProps)(o,e);return s?f["default"].createElement(L,u({},U,{className:K}),s):f["default"].createElement(L,u({},U,{className:K}),_&&f["default"].createElement(O["default"],null,j["default"].create(_,{cellAs:"th"})),f["default"].createElement(v["default"],null,(0,i["default"])(k,function(e,t){return j["default"].create(n(e,t))})),b&&f["default"].createElement(g["default"],null,j["default"].create(b)))}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/without */7),s=n(a),l=r(/*! lodash/map */14),i=n(l),u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p=r(/*! classnames */3),c=n(p),d=r(/*! react */1),f=n(d),y=r(/*! ../../lib */2),m=r(/*! ./TableBody */130),v=n(m),h=r(/*! ./TableCell */40),T=n(h),P=r(/*! ./TableFooter */131),g=n(P),b=r(/*! ./TableHeader */65),O=n(b),_=r(/*! ./TableHeaderCell */132),E=n(_),w=r(/*! ./TableRow */133),j=n(w);o._meta={name:"Table",type:y.META.TYPES.COLLECTION,props:{attached:["top","bottom"],basic:["very"],color:y.SUI.COLORS,columns:y.SUI.WIDTHS,compact:["very"],padded:["very"],size:(0,s["default"])(y.SUI.SIZES,"mini","tiny","medium","big","huge","massive")}},o.defaultProps={as:"table"},o.propTypes={as:y.customPropTypes.as,attached:d.PropTypes.oneOfType([d.PropTypes.oneOf(o._meta.props.attached),d.PropTypes.bool]),basic:d.PropTypes.oneOfType([d.PropTypes.bool,d.PropTypes.oneOf(o._meta.props.basic)]),celled:d.PropTypes.bool,children:y.customPropTypes.every([y.customPropTypes.disallow(["headerRow","renderBodyRow","footerRow","tableData"]),d.PropTypes.node]),className:d.PropTypes.string,collapsing:d.PropTypes.bool,color:d.PropTypes.oneOf(o._meta.props.color),columns:d.PropTypes.oneOf(o._meta.props.columns),compact:d.PropTypes.oneOfType([d.PropTypes.bool,d.PropTypes.oneOf(o._meta.props.compact)]),definition:d.PropTypes.bool,fixed:d.PropTypes.bool,footerRow:d.PropTypes.oneOfType([d.PropTypes.array,d.PropTypes.element]),headerRow:d.PropTypes.oneOfType([d.PropTypes.array,d.PropTypes.element]),inverted:d.PropTypes.bool,padded:d.PropTypes.oneOfType([d.PropTypes.bool,d.PropTypes.oneOf(o._meta.props.padded)]),renderBodyRow:y.customPropTypes.every([y.customPropTypes.demand(["tableData"]),d.PropTypes.func]),selectable:d.PropTypes.bool,singleLine:d.PropTypes.bool,size:d.PropTypes.oneOf(o._meta.props.size),stackable:d.PropTypes.bool,striped:d.PropTypes.bool,structured:d.PropTypes.bool,tableData:y.customPropTypes.every([y.customPropTypes.demand(["renderBodyRow"]),d.PropTypes.array]),unstackable:d.PropTypes.bool},o.Body=v["default"],o.Cell=T["default"],o.Footer=g["default"],o.Header=O["default"],o.HeaderCell=E["default"],o.Row=j["default"],t["default"]=o},/*!**********************************!*\ !*** ./src/collections/index.js ***! \**********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(/*! ./Breadcrumb/Breadcrumb */242);Object.defineProperty(t,"Breadcrumb",{enumerable:!0,get:function(){return n(o)["default"]}});var a=r(/*! ./Breadcrumb/BreadcrumbDivider */112);Object.defineProperty(t,"BreadcrumbDivider",{enumerable:!0,get:function(){return n(a)["default"]}});var s=r(/*! ./Breadcrumb/BreadcrumbSection */113);Object.defineProperty(t,"BreadcrumbSection",{enumerable:!0,get:function(){return n(s)["default"]}});var l=r(/*! ./Form/Form */243);Object.defineProperty(t,"Form",{enumerable:!0,get:function(){return n(l)["default"]}});var i=r(/*! ./Form/FormButton */114);Object.defineProperty(t,"FormButton",{enumerable:!0,get:function(){return n(i)["default"]}});var u=r(/*! ./Form/FormCheckbox */115);Object.defineProperty(t,"FormCheckbox",{enumerable:!0,get:function(){return n(u)["default"]}});var p=r(/*! ./Form/FormDropdown */116);Object.defineProperty(t,"FormDropdown",{enumerable:!0,get:function(){return n(p)["default"]}});var c=r(/*! ./Form/FormField */15);Object.defineProperty(t,"FormField",{enumerable:!0,get:function(){return n(c)["default"]}});var d=r(/*! ./Form/FormGroup */117);Object.defineProperty(t,"FormGroup",{enumerable:!0,get:function(){return n(d)["default"]}});var f=r(/*! ./Form/FormInput */118);Object.defineProperty(t,"FormInput",{enumerable:!0,get:function(){return n(f)["default"]}});var y=r(/*! ./Form/FormRadio */119);Object.defineProperty(t,"FormRadio",{enumerable:!0,get:function(){return n(y)["default"]}});var m=r(/*! ./Form/FormSelect */120);Object.defineProperty(t,"FormSelect",{enumerable:!0,get:function(){return n(m)["default"]}});var v=r(/*! ./Form/FormTextArea */121);Object.defineProperty(t,"FormTextArea",{enumerable:!0,get:function(){return n(v)["default"]}});var h=r(/*! ./Grid/Grid */244);Object.defineProperty(t,"Grid",{enumerable:!0,get:function(){return n(h)["default"]}});var T=r(/*! ./Grid/GridColumn */122);Object.defineProperty(t,"GridColumn",{enumerable:!0,get:function(){return n(T)["default"]}});var P=r(/*! ./Grid/GridRow */123);Object.defineProperty(t,"GridRow",{enumerable:!0,get:function(){return n(P)["default"]}});var g=r(/*! ./Menu/Menu */245);Object.defineProperty(t,"Menu",{enumerable:!0,get:function(){return n(g)["default"]}});var b=r(/*! ./Menu/MenuHeader */124);Object.defineProperty(t,"MenuHeader",{enumerable:!0,get:function(){return n(b)["default"]}});var O=r(/*! ./Menu/MenuItem */125);Object.defineProperty(t,"MenuItem",{enumerable:!0,get:function(){return n(O)["default"]}});var _=r(/*! ./Menu/MenuMenu */126);Object.defineProperty(t,"MenuMenu",{enumerable:!0,get:function(){return n(_)["default"]}});var E=r(/*! ./Message/Message */246);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return n(E)["default"]}});var w=r(/*! ./Message/MessageContent */127);Object.defineProperty(t,"MessageContent",{enumerable:!0,get:function(){return n(w)["default"]}});var j=r(/*! ./Message/MessageHeader */128);Object.defineProperty(t,"MessageHeader",{enumerable:!0,get:function(){return n(j)["default"]}});var S=r(/*! ./Message/MessageItem */64);Object.defineProperty(t,"MessageItem",{enumerable:!0,get:function(){return n(S)["default"]}});var x=r(/*! ./Message/MessageList */129);Object.defineProperty(t,"MessageList",{enumerable:!0,get:function(){return n(x)["default"]}});var M=r(/*! ./Table/Table */247);Object.defineProperty(t,"Table",{enumerable:!0,get:function(){return n(M)["default"]}});var A=r(/*! ./Table/TableBody */130);Object.defineProperty(t,"TableBody",{enumerable:!0,get:function(){return n(A)["default"]}});var N=r(/*! ./Table/TableCell */40);Object.defineProperty(t,"TableCell",{enumerable:!0,get:function(){return n(N)["default"]}});var I=r(/*! ./Table/TableFooter */131);Object.defineProperty(t,"TableFooter",{enumerable:!0,get:function(){return n(I)["default"]}});var k=r(/*! ./Table/TableHeader */65);Object.defineProperty(t,"TableHeader",{enumerable:!0,get:function(){return n(k)["default"]}});var C=r(/*! ./Table/TableHeaderCell */132);Object.defineProperty(t,"TableHeaderCell",{enumerable:!0,get:function(){return n(C)["default"]}});var K=r(/*! ./Table/TableRow */133);Object.defineProperty(t,"TableRow",{enumerable:!0,get:function(){return n(K)["default"]}})},/*!***************************************!*\ !*** ./src/elements/Button/Button.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function a(e){var t=e.active,r=e.animated,n=e.attached,o=e.basic,l=e.children,u=e.circular,f=e.className,y=e.color,m=e.compact,v=e.content,h=e.disabled,T=e.floated,g=e.fluid,b=e.icon,O=e.inverted,_=e.label,E=e.labeled,w=e.loading,j=e.negative,S=e.positive,x=e.primary,M=e.secondary,A=e.size,N=e.toggle,I=(0,i["default"])((0,c.useKeyOrValueAndKey)(E||!!_,"labeled")),k=(0,i["default"])(y,A,(0,c.useKeyOnly)(t,"active"),(0,c.useKeyOrValueAndKey)(r,"animated"),(0,c.useKeyOrValueAndKey)(n,"attached"),(0,c.useKeyOnly)(o,"basic"),(0,c.useKeyOnly)(u,"circular"),(0,c.useKeyOnly)(m,"compact"),(0,c.useKeyOnly)(h,"disabled"),(0,c.useValueAndKey)(T,"floated"),(0,c.useKeyOnly)(g,"fluid"),(0,c.useKeyOnly)(b===!0||(E||!l&&!v)&&b,"icon"),(0,c.useKeyOnly)(O,"inverted"),(0,c.useKeyOnly)(w,"loading"),(0,c.useKeyOnly)(j,"negative"),(0,c.useKeyOnly)(S,"positive"),(0,c.useKeyOnly)(x,"primary"),(0,c.useKeyOnly)(M,"secondary"),(0,c.useKeyOnly)(N,"toggle")),C=(0,c.getUnhandledProps)(a,e),K=(0,c.getElementType)(a,e,function(){if(_||n)return"div"}),L="div"===K?0:void 0;if(l){var U=(0,i["default"])("ui",k,I,"button",f);return P("render children:",{classes:U}),p["default"].createElement(K,s({},C,{className:U,tabIndex:L}),l)}if(_){var D=(0,i["default"])("ui",k,"button",f),R=(0,i["default"])("ui",I,"button",f);P("render label:",{classes:D,containerClasses:R},e);var z=d.Label.create(_,{basic:!0,pointing:"left"===E?"right":"left"});return p["default"].createElement(K,s({},C,{className:R}),"left"===E&&z,p["default"].createElement("button",{className:D},d.Icon.create(b)," ",v),("right"===E||!E)&&z)}if(b&&!_){var W=(0,i["default"])("ui",I,k,"button",f);return P("render icon && !label:",{classes:W}),p["default"].createElement(K,s({},C,{className:W,tabIndex:L}),d.Icon.create(b)," ",v)}var F=(0,i["default"])("ui",I,k,"button",f);return P("render default:",{classes:F}),p["default"].createElement(K,s({},C,{className:F,tabIndex:L}),v)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l=r(/*! classnames */3),i=n(l),u=r(/*! react */1),p=n(u),c=r(/*! ../../lib */2),d=r(/*! ../ */4),f=r(/*! ./ButtonContent */134),y=n(f),m=r(/*! ./ButtonGroup */135),v=n(m),h=r(/*! ./ButtonOr */136),T=n(h),P=(0,c.makeDebugger)("button");a.Content=y["default"],a.Group=v["default"],a.Or=T["default"],a._meta={name:"Button",type:c.META.TYPES.ELEMENT,props:{animated:["fade","vertical"],attached:["left","right","top","bottom"],color:[].concat(o(c.SUI.COLORS),["facebook","twitter","google plus","vk","linkedin","instagram","youtube"]),floated:c.SUI.FLOATS,labeled:["right","left"],size:c.SUI.SIZES}},a.propTypes={as:c.customPropTypes.as,active:u.PropTypes.bool,animated:u.PropTypes.oneOfType([u.PropTypes.bool,u.PropTypes.oneOf(a._meta.props.animated)]),attached:u.PropTypes.oneOf(a._meta.props.attached),basic:u.PropTypes.bool,children:c.customPropTypes.every([u.PropTypes.node,c.customPropTypes.disallow(["label"]),c.customPropTypes.givenProps({icon:u.PropTypes.oneOfType([u.PropTypes.string.isRequired,u.PropTypes.object.isRequired,u.PropTypes.element.isRequired])},c.customPropTypes.disallow(["icon"]))]),circular:u.PropTypes.bool,className:u.PropTypes.string,content:c.customPropTypes.every([c.customPropTypes.disallow(["children"]),u.PropTypes.string]),color:u.PropTypes.oneOf(a._meta.props.color),compact:u.PropTypes.bool,disabled:u.PropTypes.bool,floated:u.PropTypes.oneOf(a._meta.props.floated),fluid:u.PropTypes.bool,icon:c.customPropTypes.some([u.PropTypes.bool,u.PropTypes.string,u.PropTypes.object,u.PropTypes.element]),inverted:u.PropTypes.bool,labeled:c.customPropTypes.some([u.PropTypes.bool,u.PropTypes.oneOf(a._meta.props.labeled)]),label:c.customPropTypes.some([u.PropTypes.string,u.PropTypes.object,u.PropTypes.element]),loading:u.PropTypes.bool,negative:u.PropTypes.bool,positive:u.PropTypes.bool,primary:u.PropTypes.bool,secondary:u.PropTypes.bool,toggle:u.PropTypes.bool,size:u.PropTypes.oneOf(a._meta.props.size)},a.defaultProps={as:"button"},a.create=(0,c.createShorthandFactory)(a,function(e){return{content:e}}),t["default"]=a},/*!*********************************************!*\ !*** ./src/elements/Container/Container.js ***! \*********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.text,r=e.textAlign,n=e.fluid,s=e.children,i=e.className,c=(0,l["default"])("ui",(0,p.useKeyOnly)(t,"text"),(0,p.useKeyOnly)(n,"fluid"),(0,p.useTextAlignProp)(r),"container",i),d=(0,p.getUnhandledProps)(o,e),f=(0,p.getElementType)(o,e);return u["default"].createElement(f,a({className:c},d),s)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"Container",type:p.META.TYPES.ELEMENT,props:{textAlign:p.SUI.TEXT_ALIGNMENTS}},o.propTypes={as:p.customPropTypes.as,children:i.PropTypes.node,className:i.PropTypes.string,text:i.PropTypes.bool,fluid:i.PropTypes.bool,textAlign:i.PropTypes.oneOf(o._meta.props.textAlign)},t["default"]=o},/*!*****************************************!*\ !*** ./src/elements/Divider/Divider.js ***! \*****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.horizontal,r=e.vertical,n=e.inverted,s=e.fitted,i=e.hidden,c=e.section,d=e.clearing,f=e.children,y=e.className,m=(0,l["default"])("ui",(0,p.useKeyOnly)(t,"horizontal"),(0,p.useKeyOnly)(r,"vertical"),(0,p.useKeyOnly)(n,"inverted"),(0,p.useKeyOnly)(s,"fitted"),(0,p.useKeyOnly)(i,"hidden"),(0,p.useKeyOnly)(c,"section"),(0,p.useKeyOnly)(d,"clearing"),"divider",y),v=(0,p.getElementType)(o,e),h=(0,p.getUnhandledProps)(o,e);return u["default"].createElement(v,a({className:m},h),f)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"Divider",type:p.META.TYPES.ELEMENT},o.propTypes={as:p.customPropTypes.as,children:i.PropTypes.node,className:i.PropTypes.string,horizontal:i.PropTypes.bool,vertical:i.PropTypes.bool,inverted:i.PropTypes.bool,fitted:i.PropTypes.bool,hidden:i.PropTypes.bool,section:i.PropTypes.bool,clearing:i.PropTypes.bool},t["default"]=o},/*!***********************************!*\ !*** ./src/elements/Flag/Flag.js ***! \***********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.name,n=(0,p.getUnhandledProps)(o,e),s=(0,l["default"])(r,t,"flag"),i=(0,p.getElementType)(o,e);return u["default"].createElement(i,a({className:s},n))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=["ad","andorra","ae","united arab emirates","uae","af","afghanistan","ag","antigua","ai","anguilla","al","albania","am","armenia","an","netherlands antilles","ao","angola","ar","argentina","as","american samoa","at","austria","au","australia","aw","aruba","ax","aland islands","az","azerbaijan","ba","bosnia","bb","barbados","bd","bangladesh","be","belgium","bf","burkina faso","bg","bulgaria","bh","bahrain","bi","burundi","bj","benin","bm","bermuda","bn","brunei","bo","bolivia","br","brazil","bs","bahamas","bt","bhutan","bv","bouvet island","bw","botswana","by","belarus","bz","belize","ca","canada","cc","cocos islands","cd","congo","cf","central african republic","cg","congo brazzaville","ch","switzerland","ci","cote divoire","ck","cook islands","cl","chile","cm","cameroon","cn","china","co","colombia","cr","costa rica","cs","cu","cuba","cv","cape verde","cx","christmas island","cy","cyprus","cz","czech republic","de","germany","dj","djibouti","dk","denmark","dm","dominica","do","dominican republic","dz","algeria","ec","ecuador","ee","estonia","eg","egypt","eh","western sahara","er","eritrea","es","spain","et","ethiopia","eu","european union","fi","finland","fj","fiji","fk","falkland islands","fm","micronesia","fo","faroe islands","fr","france","ga","gabon","gb","united kingdom","gd","grenada","ge","georgia","gf","french guiana","gh","ghana","gi","gibraltar","gl","greenland","gm","gambia","gn","guinea","gp","guadeloupe","gq","equatorial guinea","gr","greece","gs","sandwich islands","gt","guatemala","gu","guam","gw","guinea-bissau","gy","guyana","hk","hong kong","hm","heard island","hn","honduras","hr","croatia","ht","haiti","hu","hungary","id","indonesia","ie","ireland","il","israel","in","india","io","indian ocean territory","iq","iraq","ir","iran","is","iceland","it","italy","jm","jamaica","jo","jordan","jp","japan","ke","kenya","kg","kyrgyzstan","kh","cambodia","ki","kiribati","km","comoros","kn","saint kitts and nevis","kp","north korea","kr","south korea","kw","kuwait","ky","cayman islands","kz","kazakhstan","la","laos","lb","lebanon","lc","saint lucia","li","liechtenstein","lk","sri lanka","lr","liberia","ls","lesotho","lt","lithuania","lu","luxembourg","lv","latvia","ly","libya","ma","morocco","mc","monaco","md","moldova","me","montenegro","mg","madagascar","mh","marshall islands","mk","macedonia","ml","mali","mm","myanmar","burma","mn","mongolia","mo","macau","mp","northern mariana islands","mq","martinique","mr","mauritania","ms","montserrat","mt","malta","mu","mauritius","mv","maldives","mw","malawi","mx","mexico","my","malaysia","mz","mozambique","na","namibia","nc","new caledonia","ne","niger","nf","norfolk island","ng","nigeria","ni","nicaragua","nl","netherlands","no","norway","np","nepal","nr","nauru","nu","niue","nz","new zealand","om","oman","pa","panama","pe","peru","pf","french polynesia","pg","new guinea","ph","philippines","pk","pakistan","pl","poland","pm","saint pierre","pn","pitcairn islands","pr","puerto rico","ps","palestine","pt","portugal","pw","palau","py","paraguay","qa","qatar","re","reunion","ro","romania","rs","serbia","ru","russia","rw","rwanda","sa","saudi arabia","sb","solomon islands","sc","seychelles","gb sct","scotland","sd","sudan","se","sweden","sg","singapore","sh","saint helena","si","slovenia","sj","svalbard","jan mayen","sk","slovakia","sl","sierra leone","sm","san marino","sn","senegal","so","somalia","sr","suriname","st","sao tome","sv","el salvador","sy","syria","sz","swaziland","tc","caicos islands","td","chad","tf","french territories","tg","togo","th","thailand","tj","tajikistan","tk","tokelau","tl","timorleste","tm","turkmenistan","tn","tunisia","to","tonga","tr","turkey","tt","trinidad","tv","tuvalu","tw","taiwan","tz","tanzania","ua","ukraine","ug","uganda","um","us minor islands","us","america","united states","uy","uruguay","uz","uzbekistan","va","vatican city","vc","saint vincent","ve","venezuela","vg","british virgin islands","vi","us virgin islands","vn","vietnam","vu","vanuatu","gb wls","wales","wf","wallis and futuna","ws","samoa","ye","yemen","yt","mayotte","za","south africa","zm","zambia","zw","zimbabwe"];o._meta={name:"Flag",type:p.META.TYPES.ELEMENT,props:{name:c}},o.propTypes={as:p.customPropTypes.as,className:i.PropTypes.string,name:i.PropTypes.oneOf(o._meta.props.name).isRequired},o.defaultProps={as:"i"},t["default"]=o},/*!***************************************!*\ !*** ./src/elements/Header/Header.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.color,r=e.content,n=e.dividing,a=e.block,s=e.attached,i=e.floated,p=e.inverted,y=e.disabled,v=e.sub,T=e.size,P=e.textAlign,g=e.icon,b=e.image,O=e.children,_=e.className,E=e.subheader,w=(0,u["default"])("ui",T,t,(0,d.useKeyOrValueAndKey)(s,"attached"),(0,d.useKeyOnly)(a,"block"),(0,d.useKeyOnly)(y,"disabled"),(0,d.useKeyOnly)(n,"dividing"),(0,d.useValueAndKey)(i,"floated"),(0,d.useKeyOnly)(g===!0,"icon"),(0,d.useKeyOnly)(b===!0,"image"),(0,d.useKeyOnly)(p,"inverted"),(0,d.useKeyOnly)(v,"sub"),(0,d.useTextAlignProp)(P),_,"header"),j=(0,d.getElementType)(o,e),S=(0,d.getUnhandledProps)(o,e);return O?c["default"].createElement(j,l({},S,{className:w}),O):b&&"boolean"!=typeof b||g&&"boolean"!=typeof g?c["default"].createElement(j,l({},S,{className:w}),f.Icon.create(g)||f.Image.create(b),(r||E)&&c["default"].createElement(h["default"],null,r,(0,d.createShorthand)(m["default"],function(e){return{content:e}},E))):c["default"].createElement(j,l({},S,{className:w}),r,(0,d.createShorthand)(m["default"],function(e){return{content:e}},E))}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/without */7),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(/*! classnames */3),u=n(i),p=r(/*! react */1),c=n(p),d=r(/*! ../../lib */2),f=r(/*! ../../elements */4),y=r(/*! ./HeaderSubheader */138),m=n(y),v=r(/*! ./HeaderContent */137),h=n(v);o._meta={name:"Header",type:d.META.TYPES.ELEMENT,props:{attached:["top","bottom"],color:d.SUI.COLORS,size:(0,s["default"])(d.SUI.SIZES,"big","massive"),floated:d.SUI.FLOATS,textAlign:d.SUI.TEXT_ALIGNMENTS}},o.propTypes={as:d.customPropTypes.as,className:p.PropTypes.string,children:p.PropTypes.node,content:d.customPropTypes.every([d.customPropTypes.disallow(["children"]),p.PropTypes.string]),icon:d.customPropTypes.every([d.customPropTypes.disallow(["image"]),d.customPropTypes.givenProps({icon:p.PropTypes.oneOfType([p.PropTypes.string,p.PropTypes.element,p.PropTypes.object]).isRequired},d.customPropTypes.disallow(["children"]))]),image:d.customPropTypes.every([d.customPropTypes.disallow(["icon"]),d.customPropTypes.givenProps({image:p.PropTypes.oneOfType([p.PropTypes.string,p.PropTypes.element,p.PropTypes.object]).isRequired},d.customPropTypes.disallow(["children"]))]),color:p.PropTypes.oneOf(o._meta.props.color),dividing:p.PropTypes.bool,block:p.PropTypes.bool,attached:p.PropTypes.oneOfType([p.PropTypes.oneOf(o._meta.props.attached),p.PropTypes.bool]),floated:p.PropTypes.oneOf(o._meta.props.floated),inverted:p.PropTypes.bool,disabled:p.PropTypes.bool,sub:p.PropTypes.bool,size:p.PropTypes.oneOf(o._meta.props.size),subheader:d.customPropTypes.every([d.customPropTypes.disallow(["children"]),p.PropTypes.string]),textAlign:p.PropTypes.oneOf(o._meta.props.textAlign)},o.Content=h["default"],o.Subheader=m["default"],t["default"]=o},/*!***********************************!*\ !*** ./src/elements/Icon/Icon.js ***! \***********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.bordered,r=e.className,n=e.circular,s=e.color,i=e.corner,c=e.disabled,d=e.fitted,f=e.flipped,y=e.inverted,m=e.link,v=e.loading,h=e.name,T=e.rotated,P=e.size,g=(0,l["default"])(P,s,(0,p.useKeyOnly)(t,"bordered"),(0,p.useKeyOnly)(n,"circular"),(0,p.useKeyOnly)(i,"corner"),(0,p.useKeyOnly)(c,"disabled"),(0,p.useKeyOnly)(d,"fitted"),(0,p.useValueAndKey)(f,"flipped"),(0,p.useKeyOnly)(y,"inverted"),(0,p.useKeyOnly)(m,"link"),(0,p.useKeyOnly)(v,"loading"),(0,p.useValueAndKey)(T,"rotated"),h,r,"icon"),b=(0,p.getUnhandledProps)(o,e),O=(0,p.getElementType)(o,e);return u["default"].createElement(O,a({className:g},b))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ./IconGroup */139),d=n(c);o.Group=d["default"],o._meta={name:"Icon",type:p.META.TYPES.ELEMENT,props:{color:p.SUI.COLORS,flipped:["horizontally","vertically"],name:p.SUI.ICONS,rotated:["clockwise","counterclockwise"],size:p.SUI.SIZES}},o.propTypes={as:p.customPropTypes.as,bordered:i.PropTypes.bool,className:i.PropTypes.string,circular:i.PropTypes.bool,color:i.PropTypes.oneOf(o._meta.props.color),corner:i.PropTypes.bool,disabled:i.PropTypes.bool,fitted:i.PropTypes.bool,flipped:i.PropTypes.oneOf(o._meta.props.flipped),inverted:i.PropTypes.bool,name:i.PropTypes.string,link:i.PropTypes.bool,loading:i.PropTypes.bool,rotated:i.PropTypes.oneOf(o._meta.props.rotated),size:i.PropTypes.oneOf(o._meta.props.size)},o.defaultProps={as:"i"},o.create=(0,p.createShorthandFactory)(o,function(e){return{name:e}}),t["default"]=o},/*!*************************************!*\ !*** ./src/elements/Input/Input.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.action,r=e.actionPosition,n=e.children,a=e.className,l=e.disabled,p=e.error,d=e.focus,h=e.fluid,T=e.icon,P=e.iconPosition,g=e.inverted,b=e.label,O=e.labelPosition,_=e.loading,E=e.size,w=e.type,j=e.input,S=e.transparent,x=(0,f["default"])("ui",E,(0,y.useValueAndKey)(r,"action")||(0,y.useKeyOnly)(t,"action"),(0,y.useKeyOnly)(l,"disabled"),(0,y.useKeyOnly)(p,"error"),(0,y.useKeyOnly)(d,"focus"),(0,y.useKeyOnly)(h,"fluid"),(0,y.useKeyOnly)(g,"inverted"),(0,y.useValueAndKey)(O,"labeled")||(0,y.useKeyOnly)(b,"labeled"),(0,y.useKeyOnly)(_,"loading"),(0,y.useKeyOnly)(S,"transparent"),(0,y.useValueAndKey)(P,"icon")||(0,y.useKeyOnly)(T,"icon"),a,"input"),M=(0,y.getUnhandledProps)(o,e),A=(0,y.getElementType)(o,e),N=(0,i["default"])(e,v);if(n)return c["default"].createElement(A,u({},M,{className:x}),n);var I=m.Button.create(t,function(e){return{className:(0,f["default"])(!(0,s["default"])(e.className,"button")&&"button")}}),k=m.Icon.create(T),C=m.Label.create(b,function(e){return{className:(0,f["default"])(!(0,s["default"])(e.className,"label")&&"label",(0,s["default"])(O,"corner")&&O)}});return c["default"].createElement(A,u({},M,{className:x}),"left"===r&&I,"left"===P&&k,"right"!==O&&C,(0,y.createHTMLInput)(j||w,N),"left"!==r&&I,"left"!==P&&k,"right"===O&&C)}Object.defineProperty(t,"__esModule",{value:!0}),t.htmlInputPropNames=void 0;var a=r(/*! lodash/includes */106),s=n(a),l=r(/*! lodash/pick */61),i=n(l),u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p=r(/*! react */1),c=n(p),d=r(/*! classnames */3),f=n(d),y=r(/*! ../../lib */2),m=r(/*! ../../elements */4),v=t.htmlInputPropNames=["selected","defaultValue","defaultChecked","autoComplete","autoFocus","checked","form","max","maxLength","min","name","pattern","placeholder","readOnly","required","step","type","value"];o._meta={name:"Input",type:y.META.TYPES.ELEMENT,props:{actionPosition:["left"],iconPosition:["left"],labelPosition:["left","right","left corner","right corner"],size:y.SUI.SIZES}},o.defaultProps={type:"text"},o.propTypes={as:y.customPropTypes.as,action:y.customPropTypes.some([p.PropTypes.bool,y.customPropTypes.every([y.customPropTypes.disallow(["children"]),p.PropTypes.oneOfType([p.PropTypes.string,p.PropTypes.object,p.PropTypes.element])])]),actionPosition:p.PropTypes.oneOf(o._meta.props.actionPosition),children:y.customPropTypes.every([y.customPropTypes.disallow(["input","label"]),y.customPropTypes.givenProps({action:p.PropTypes.oneOfType([p.PropTypes.string,p.PropTypes.object,p.PropTypes.element]).isRequired},y.customPropTypes.disallow(["action"])),y.customPropTypes.givenProps({icon:p.PropTypes.oneOfType([p.PropTypes.string,p.PropTypes.object,p.PropTypes.element]).isRequired},y.customPropTypes.disallow(["icon"])),p.PropTypes.node]),className:p.PropTypes.string,disabled:p.PropTypes.bool,error:p.PropTypes.bool,focus:p.PropTypes.bool,fluid:p.PropTypes.bool,icon:y.customPropTypes.some([p.PropTypes.bool,y.customPropTypes.every([y.customPropTypes.disallow(["children"]),p.PropTypes.oneOfType([p.PropTypes.string,p.PropTypes.object,p.PropTypes.element])])]),iconPosition:p.PropTypes.oneOf(o._meta.props.iconPosition),inverted:p.PropTypes.bool,input:y.customPropTypes.every([y.customPropTypes.disallow(["children"]),p.PropTypes.oneOfType([p.PropTypes.string,p.PropTypes.object,p.PropTypes.element])]),label:y.customPropTypes.every([y.customPropTypes.disallow(["children"]),p.PropTypes.oneOfType([p.PropTypes.string,p.PropTypes.object,p.PropTypes.element])]),labelPosition:p.PropTypes.oneOf(o._meta.props.labelPosition),loading:p.PropTypes.bool,size:p.PropTypes.oneOf(o._meta.props.size),transparent:p.PropTypes.bool,type:p.PropTypes.string},t["default"]=o},/*!*************************************!*\ !*** ./src/elements/Label/Label.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.attached,r=e.basic,n=e.children,s=e.circular,i=e.className,d=e.color,y=e.content,m=e.corner,v=e.detail,h=e.empty,T=e.floating,P=e.horizontal,g=e.icon,b=e.image,O=e.onClick,_=e.onRemove,E=e.pointing,w=e.removable,j=e.ribbon,S=e.size,x=e.tag,M=function(t){return O&&O(t,e)},A=function(t){return _&&_(t,e)},N=E===!0&&"pointing"||("left"===E||"right"===E)&&E+" pointing"||("above"===E||"below"===E)&&"pointing "+E,I=(0,l["default"])("ui",d,N,S,(0,p.useKeyOnly)(r,"basic"),(0,p.useKeyOnly)(s,"circular"),(0,p.useKeyOnly)(h,"empty"),(0,p.useKeyOnly)(T,"floating"),(0,p.useKeyOnly)(P,"horizontal"),(0,p.useKeyOnly)(b===!0,"image"),(0,p.useKeyOnly)(x,"tag"),(0,p.useKeyOrValueAndKey)(m,"corner"),(0,p.useKeyOrValueAndKey)(j,"ribbon"),(0,p.useValueAndKey)(t,"attached"),"label",i),k=(0,p.getElementType)(o,e),C=(0,p.getUnhandledProps)(o,e);return n?u["default"].createElement(k,a({},C,{className:I,onClick:M}),n):u["default"].createElement(k,a({className:I,onClick:M},C),c.Icon.create(g),"boolean"!=typeof b&&c.Image.create(b),y,(0,p.createShorthand)(f["default"],function(e){return{content:e}},v),(w||_)&&u["default"].createElement(c.Icon,{name:"delete",onClick:A}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ../ */4),d=r(/*! ./LabelDetail */142),f=n(d),y=r(/*! ./LabelGroup */143),m=n(y);o._meta={name:"Label",type:p.META.TYPES.ELEMENT,props:{attached:["top","bottom","top right","top left","bottom left","bottom right"],color:p.SUI.COLORS,corner:["left","right"],pointing:["above","below","left","right"],ribbon:["right"],size:p.SUI.SIZES}},o.propTypes={as:p.customPropTypes.as,attached:i.PropTypes.oneOf(o._meta.props.attached),basic:i.PropTypes.bool,children:p.customPropTypes.every([p.customPropTypes.disallow(["content","detail","icon"]),i.PropTypes.node]),circular:i.PropTypes.bool,className:i.PropTypes.string,color:i.PropTypes.oneOf(o._meta.props.color),content:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.number,i.PropTypes.string])]),corner:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(o._meta.props.corner)]),detail:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.number,i.PropTypes.string])]),empty:p.customPropTypes.every([p.customPropTypes.demand(["circular"]),i.PropTypes.bool]),floating:i.PropTypes.bool,horizontal:i.PropTypes.bool,icon:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),i.PropTypes.oneOfType([i.PropTypes.number,i.PropTypes.string])]),image:p.customPropTypes.every([p.customPropTypes.givenProps({children:i.PropTypes.node.isRequired},i.PropTypes.bool),p.customPropTypes.givenProps({image:i.PropTypes.oneOfType([i.PropTypes.string,i.PropTypes.element,i.PropTypes.object])},p.customPropTypes.disallow(["children"]))]),pointing:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(o._meta.props.pointing)]),onClick:i.PropTypes.func,onRemove:i.PropTypes.func,removable:i.PropTypes.bool,ribbon:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(o._meta.props.ribbon)]),size:i.PropTypes.oneOf(o._meta.props.size),tag:i.PropTypes.bool},o.create=(0,p.createShorthandFactory)(o,function(e){return{content:e}}),o.Detail=f["default"],o.Group=m["default"],t["default"]=o},/*!***********************************!*\ !*** ./src/elements/List/List.js ***! \***********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.animated,r=e.bulleted,n=e.celled,s=e.children,i=e.className,c=e.divided,d=e.floated,f=e.horizontal,y=e.inverted,m=e.link,v=e.ordered,h=e.relaxed,T=e.size,P=e.selection,g=e.verticalAlign,b=(0,l["default"])("ui",T,(0,p.useKeyOnly)(t,"animated"),(0,p.useKeyOnly)(r,"bulleted"),(0,p.useKeyOnly)(n,"celled"),(0,p.useKeyOnly)(c,"divided"),(0,p.useKeyOnly)(f,"horizontal"),(0,p.useKeyOnly)(y,"inverted"),(0,p.useKeyOnly)(m,"link"),(0,p.useKeyOnly)(v,"ordered"),(0,p.useKeyOnly)(P,"selection"),(0,p.useKeyOrValueAndKey)(h,"relaxed"),(0,p.useValueAndKey)(d,"floated"),(0,p.useVerticalAlignProp)(g),"list",i),O=(0,p.getElementType)(o,e),_=(0,p.getUnhandledProps)(o,e);return u["default"].createElement(O,a({},_,{className:b}),s)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),i=r(/*! react */1),u=n(i),p=r(/*! ../../lib */2),c=r(/*! ./ListContent */144),d=n(c),f=r(/*! ./ListDescription */145),y=n(f),m=r(/*! ./ListHeader */146),v=n(m),h=r(/*! ./ListIcon */147),T=n(h),P=r(/*! ./ListItem */148),g=n(P),b=r(/*! ./ListList */149),O=n(b);o._meta={name:"List",type:p.META.TYPES.ELEMENT,props:{floated:p.SUI.FLOATS,relaxed:["very"],size:p.SUI.SIZES,verticalAlign:p.SUI.VERTICAL_ALIGNMENTS}},o.propTypes={as:p.customPropTypes.as,animated:i.PropTypes.bool,bulleted:i.PropTypes.bool,celled:i.PropTypes.bool,children:i.PropTypes.node,className:i.PropTypes.string,divided:i.PropTypes.bool,floated:i.PropTypes.oneOf(o._meta.props.floated),horizontal:i.PropTypes.bool,inverted:i.PropTypes.bool,link:i.PropTypes.bool,ordered:i.PropTypes.bool,relaxed:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(o._meta.props.relaxed)]),selection:i.PropTypes.bool,size:i.PropTypes.oneOf(o._meta.props.size),verticalAlign:i.PropTypes.oneOf(o._meta.props.verticalAlign)},o.Content=d["default"],o.Description=y["default"],o.Header=v["default"],o.Icon=T["default"],o.Item=g["default"],o.List=O["default"],t["default"]=o},/*!***************************************!*\ !*** ./src/elements/Loader/Loader.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.active,s=e.disabled,i=e.indeterminate,c=e.inline,d=e.inverted,f=e.size,y=e.text,m=(0,u["default"])("ui",(0,p.useKeyOnly)(n,"active"),(0,p.useKeyOnly)(s,"disabled"),(0,p.useKeyOnly)(i,"indeterminate"),(0,p.useKeyOrValueAndKey)(c,"inline"),(0,p.useKeyOnly)(d,"inverted"),(0,p.useKeyOnly)(y,"text")||(0,p.useKeyOnly)(t,"text"),f,r,"loader"),v=(0,p.getUnhandledProps)(o,e),h=(0,p.getElementType)(o,e);return l["default"].createElement(h,a({className:m},v),t||y)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),i=r(/*! classnames */3),u=n(i),p=r(/*! ../../lib */2);o._meta={name:"Loader",type:p.META.TYPES.ELEMENT,props:{inline:["centered"],size:p.SUI.SIZES}},o.propTypes={as:p.customPropTypes.as,active:s.PropTypes.bool,className:s.PropTypes.string,children:p.customPropTypes.every([p.customPropTypes.disallow(["text"]),s.PropTypes.node]),disabled:s.PropTypes.bool,indeterminate:s.PropTypes.bool,inverted:s.PropTypes.bool,inline:s.PropTypes.oneOfType([s.PropTypes.bool,s.PropTypes.oneOf(o._meta.props.inline)]),size:s.PropTypes.oneOf(o._meta.props.size),text:p.customPropTypes.every([p.customPropTypes.disallow(["children"]),s.PropTypes.node])},t["default"]=o},/*!***********************************!*\ !*** ./src/elements/Rail/Rail.js ***! \***********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.attached,r=e.className,n=e.close,a=e.children,s=e.dividing,i=e.internal,p=e.position,f=e.size,y=(0,c["default"])("ui",p,(0,d.useKeyOnly)(t,"attached"),(0,d.useKeyOrValueAndKey)(n,"close"),(0,d.useKeyOnly)(s,"dividing"),(0,d.useKeyOnly)(i,"internal"),f,r,"rail"),m=(0,d.getUnhandledProps)(o,e),v=(0,d.getElementType)(o,e);return u["default"].createElement(v,l({className:y},m),a)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/without */7),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(/*! react */1),u=n(i),p=r(/*! classnames */3),c=n(p),d=r(/*! ../../lib */2);o._meta={name:"Rail",props:{close:["very"],position:d.SUI.FLOATS,size:(0,s["default"])(d.SUI.SIZES,"medium")},type:d.META.TYPES.ELEMENT},o.propTypes={as:d.customPropTypes.as,attached:i.PropTypes.bool,className:i.PropTypes.string,close:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(o._meta.props.close)]),children:i.PropTypes.node,dividing:i.PropTypes.bool,internal:i.PropTypes.bool,position:i.PropTypes.oneOf(o._meta.props.position).isRequired,size:i.PropTypes.oneOf(o._meta.props.size)},t["default"]=o},/*!*****************************************!*\ !*** ./src/elements/Segment/Segment.js ***! \*****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.attached,r=e.basic,n=e.children,a=e.circular,s=e.className,i=e.clearing,p=e.color,f=e.compact,y=e.disabled,m=e.floated,v=e.inverted,h=e.loading,T=e.padded,P=e.piled,g=e.raised,b=e.secondary,O=e.size,_=e.stacked,E=e.tertiary,w=e.textAlign,j=e.vertical,S=(0,u["default"])("ui",p,O,(0,d.useKeyOrValueAndKey)(t,"attached"),(0,d.useKeyOnly)(r,"basic"),(0,d.useKeyOnly)(a,"circular"),(0,d.useKeyOnly)(i,"clearing"),(0,d.useKeyOnly)(f,"compact"),(0,d.useKeyOnly)(y,"disabled"),(0,d.useValueAndKey)(m,"floated"),(0,d.useKeyOnly)(v,"inverted"),(0,d.useKeyOnly)(h,"loading"),(0,d.useKeyOrValueAndKey)(T,"padded"),(0,d.useKeyOnly)(P,"piled"),(0,d.useKeyOnly)(g,"raised"),(0,d.useKeyOnly)(b,"secondary"),(0,d.useKeyOnly)(_,"stacked"),(0,d.useKeyOnly)(E,"tertiary"),(0,d.useTextAlignProp)(w),(0,d.useKeyOnly)(j,"vertical"),s,"segment"),x=(0,d.getUnhandledProps)(o,e),M=(0,d.getElementType)(o,e);return c["default"].createElement(M,l({},x,{className:S}),n)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/without */7),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(/*! classnames */3),u=n(i),p=r(/*! react */1),c=n(p),d=r(/*! ../../lib */2),f=r(/*! ./SegmentGroup */150),y=n(f);o.Group=y["default"],o._meta={name:"Segment",type:d.META.TYPES.ELEMENT,props:{attached:["top","bottom"],color:d.SUI.COLORS,floated:d.SUI.FLOATS,padded:["very"],size:(0,s["default"])(d.SUI.SIZES,"medium"),textAlign:d.SUI.TEXT_ALIGNMENTS}},o.propTypes={as:d.customPropTypes.as,attached:p.PropTypes.oneOfType([p.PropTypes.oneOf(o._meta.props.attached),p.PropTypes.bool]),basic:p.PropTypes.bool,children:p.PropTypes.any,circular:p.PropTypes.bool,className:p.PropTypes.string,clearing:p.PropTypes.bool,color:p.PropTypes.oneOf(o._meta.props.color),compact:p.PropTypes.bool,disabled:p.PropTypes.bool,floated:p.PropTypes.oneOf(o._meta.props.floated),inverted:p.PropTypes.bool,loading:p.PropTypes.bool,padded:p.PropTypes.oneOfType([p.PropTypes.bool,p.PropTypes.oneOf(o._meta.props.padded)]),piled:p.PropTypes.bool,raised:p.PropTypes.bool,secondary:p.PropTypes.bool,size:p.PropTypes.oneOf(o._meta.props.size),stacked:p.PropTypes.bool,tertiary:p.PropTypes.bool,textAlign:p.PropTypes.oneOf(o._meta.props.textAlign),vertical:p.PropTypes.bool},t["default"]=o},/*!********************************************!*\ !*** ./src/lib/AutoControlledComponent.js ***! \********************************************/ function(e,t,r){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=r(/*! lodash/omit */109),i=n(l),u=r(/*! lodash/difference */397),p=n(u),c=r(/*! lodash/pick */61),d=n(c),f=r(/*! lodash/filter */103),y=n(f),m=r(/*! lodash/isEmpty */107),v=n(m),h=r(/*! lodash/keys */10),T=n(h),P=r(/*! lodash/intersection */421),g=n(P),b=r(/*! lodash/each */102),O=n(b),_=r(/*! lodash/has */28),E=n(_),w=r(/*! lodash/transform */235),j=n(w),S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},x=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}}(),M=function k(e,t,r){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,t);if(void 0===n){var o=Object.getPrototypeOf(e);return null===o?void 0:k(o,t,r)}if("value"in n)return n.value;var a=n.get;if(void 0!==a)return a.call(r)},A=r(/*! react */1),N=function(e){return"default"+(e[0].toUpperCase()+e.slice(1))},I=function(t){function r(){var t,n,s,l;o(this,r);for(var u=arguments.length,c=Array(u),f=0;f<u;f++)c[f]=arguments[f];return n=s=a(this,(t=r.__proto__||Object.getPrototypeOf(r)).call.apply(t,[this].concat(c))),s.trySetState=function(t,r){var n=s.constructor.autoControlledProps;if("production"!==e.env.NODE_ENV){var o=s.constructor.name,a=(0,p["default"])((0,T["default"])(t),n);(0,v["default"])(a)||console.error([o+' called trySetState() with controlled props: "'+a+'".',"State will not be set.","Only props in static autoControlledProps will be set on state."].join(" "))}var l=(0,i["default"])((0,d["default"])(t,n),(0,T["default"])(s.props));r&&(l=S({},l,r)),(0,v["default"])(l)||s.setState(l)},l=n,a(s,l)}return s(r,t),x(r,[{key:"componentWillMount",value:function(){var t=this;M(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"componentWillMount",this)&&M(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"componentWillMount",this).call(this);var n=this.constructor.autoControlledProps;this.state=(0,j["default"])(n,function(r,n){var o=N(n);if((0,E["default"])(t.props,o)?r[n]=t.props[o]:(0,E["default"])(t.props,n)?r[n]=t.props[n]:"checked"===n?r[n]=!1:"value"===n&&(r[n]=t.props.multiple?[]:""),"production"!==e.env.NODE_ENV){var a=t.constructor.name;o in t.props&&n in t.props&&console.error(a+' prop "'+n+'" is auto controlled. Specify either '+o+" or "+n+", but not both.")}},{}),"production"!==e.env.NODE_ENV&&!function(){var e=t.constructor,r=e.defaultProps,o=e.name,a=e.propTypes;n||console.error("Auto controlled "+o+" must specify a static autoControlledProps array."),(0,O["default"])(n,function(e){var t=N(e);(0,E["default"])(a,t)||console.error(o+' is missing "'+t+'" propTypes validation for auto controlled prop "'+e+'".'),(0,E["default"])(a,e)||console.error(o+' is missing propTypes validation for auto controlled prop "'+e+'".')});var s=(0,g["default"])(n,(0,T["default"])(r));(0,v["default"])(s)||console.error(["Do not set defaultProps for autoControlledProps,","use trySetState() in constructor() or componentWillMount() instead.","See "+o+' props: "'+s+'".'].join(" "));var l=(0,y["default"])(n,function(e){return e.startsWith("default")});(0,v["default"])(l)||console.error(["Do not add default props to autoControlledProps.","Default props are automatically handled.","See "+o+' autoControlledProps: "'+l+'".'].join(" "))}()}},{key:"componentWillReceiveProps",value:function(e){M(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"componentWillReceiveProps",this)&&M(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"componentWillReceiveProps",this).call(this,e);var t=(0,d["default"])(e,this.constructor.autoControlledProps);(0,v["default"])(t)||this.setState(t)}}]),r}(A.Component);t["default"]=I}).call(t,r(/*! ./~/node-libs-browser/~/process/browser.js */63))},/*!*************************!*\ !*** ./src/lib/META.js ***! \*************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.isPrivate=t.isChild=t.isParent=t.isModule=t.isView=t.isElement=t.isCollection=t.isAddon=t.isType=t.isMeta=t.TYPES=void 0;var o=r(/*! lodash/fp/startsWith */417),a=n(o),s=r(/*! lodash/fp/has */409),l=n(s),i=r(/*! lodash/fp/eq */407),u=n(i),p=r(/*! lodash/fp/flow */223),c=n(p),d=r(/*! lodash/fp/curry */406),f=n(d),y=r(/*! lodash/fp/get */408),m=n(y),v=r(/*! lodash/fp/includes */410),h=n(v),T=r(/*! lodash/fp/values */418),P=n(T),g=t.TYPES={ADDON:"addon",COLLECTION:"collection",ELEMENT:"element",VIEW:"view",MODULE:"module"},b=(0,P["default"])(g),O=t.isMeta=function(e){return(0,h["default"])((0,m["default"])("type",e),b)},_=function(e){return O(e)?e:O((0,m["default"])("_meta",e))?e._meta:O((0,m["default"])("constructor._meta",e))?e.constructor._meta:void 0},E=(0,f["default"])(function(e,t,r){return(0,c["default"])(_,(0,m["default"])(e),(0,u["default"])(t))(r)}),w=t.isType=E("type");t.isAddon=w(g.ADDON),t.isCollection=w(g.COLLECTION),t.isElement=w(g.ELEMENT),t.isView=w(g.VIEW),t.isModule=w(g.MODULE),t.isParent=(0,c["default"])(_,(0,l["default"])("parent"),(0,u["default"])(!1)),t.isChild=(0,c["default"])(_,(0,l["default"])("parent")),t.isPrivate=(0,c["default"])(_,(0,m["default"])("name"),(0,a["default"])("_"))},/*!************************!*\ !*** ./src/lib/SUI.js ***! \************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.ICONS=t.BRANDS_ICONS=t.ACCESSIBILITY_ICONS=t.PAYMENT_OPTIONS_ICONS=t.CURRENCY_ICONS=t.TEXT_EDITOR_ICONS=t.TABLES_ICONS=t.MAP_ICONS=t.AUDIO_ICONS=t.RATING_ICONS=t.TECHNOLOGIES_ICONS=t.COMPUTER_AND_FILE_SYSTEM_ICONS=t.COMPUTER_ICONS=t.MOBILE_ICONS=t.POINTERS_ICONS=t.MEDIA_ICONS=t.ITEM_SELECTION_ICONS=t.SHAPES_ICONS=t.OBJECTS_ICONS=t.LAYOUT_ADJUSTMENT_ICONS=t.GENDER_AND_SEXUALITY_ICONS=t.USER_TYPES_ICONS=t.MESSAGE_ICONS=t.USER_ACTIONS_ICONS=t.WEB_CONTENT_ICONS=t.WIDTHS=t.VERTICAL_ALIGNMENTS=t.TEXT_ALIGNMENTS=t.SIZES=t.FLOATS=t.COLORS=void 0;var a=r(/*! lodash/values */110),s=n(a),l=r(/*! lodash/keys */10),i=n(l),u=r(/*! ./numberToWord */68),p=(t.COLORS=["red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","black"],t.FLOATS=["left","right"],t.SIZES=["mini","tiny","small","medium","large","big","huge","massive"],t.TEXT_ALIGNMENTS=["left","center","right","justified"],t.VERTICAL_ALIGNMENTS=["bottom","middle","top"],t.WIDTHS=[].concat(o((0,i["default"])(u.numberToWordMap)),o((0,i["default"])(u.numberToWordMap).map(Number)),o((0,s["default"])(u.numberToWordMap))),t.WEB_CONTENT_ICONS=["add to calendar","alarm outline","alarm mute outline","alarm mute","alarm","at","browser","bug","calendar outline","calendar","checked calendar","cloud","code","comment outline","comment","comments outline","comments","copyright","creative commons","dashboard","delete calendar","external square","external","eyedropper","feed","find","hand pointer","hashtag","heartbeat","history","home","hourglass empty","hourglass end","hourglass full","hourglass half","hourglass start","idea","image","inbox","industry","lab","mail outline","mail square","mail","mouse pointer","options","paint brush","payment","percent","privacy","protect","registered","remove from calendar","search","setting","settings","shop","shopping bag","shopping basket","signal","sitemap","tag","tags","tasks","terminal","text telephone","ticket","trademark","trophy","wifi"]),c=t.USER_ACTIONS_ICONS=["add to cart","add user","adjust","archive","ban","bookmark","call","call square","clone","cloud download","cloud upload","talk","talk outline","compress","configure","download","edit","erase","exchange","expand","external share","filter","hide","in cart","lock","mail forward","object group","object ungroup","pin","print","random","recycle","refresh","remove bookmark","remove user","repeat","reply all","reply","retweet","send","send outline","share alternate","share alternate square","share","share square","sign in","sign out","theme","translate","undo","unhide","unlock alternate","unlock","upload","wait","wizard","write","write square"],d=t.MESSAGE_ICONS=["announcement","birthday","help circle","help","info circle","info","warning circle","warning","warning sign"],f=t.USER_TYPES_ICONS=["child","doctor","handicap","spy","student","user","users"],y=t.GENDER_AND_SEXUALITY_ICONS=["female","gay","genderless","heterosexual","intergender","lesbian","male","man","neuter","non binary transgender","other gender horizontal","other gender","other gender vertical","transgender","woman"],m=t.LAYOUT_ADJUSTMENT_ICONS=["block layout","crop","grid layout","list layout","maximize","resize horizontal","resize vertical","zoom","zoom out"],v=t.OBJECTS_ICONS=["anchor","bar","bomb","book","bullseye","calculator","cocktail","diamond","fax","fire extinguisher","fire","flag checkered","flag","flag outline","gift","hand lizard","hand peace","hand paper","hand rock","hand scissors","hand spock","law","leaf","legal","lemon","life ring","lightning","magnet","money","moon","plane","puzzle","road","rocket","shipping","soccer","sticky note","sticky note outline","suitcase","sun","travel","treatment","umbrella","world"],h=t.SHAPES_ICONS=["asterisk","certificate","circle","circle notched","circle thin","crosshairs","cube","cubes","ellipsis horizontal","ellipsis vertical","quote left","quote right","spinner","square","square outline"],T=t.ITEM_SELECTION_ICONS=["add circle","add square","check circle","check circle outline","check square","checkmark box","checkmark","minus circle","minus","minus square","minus square outline","move","plus","plus square outline","radio","remove circle","remove circle outline","remove","selected radio","toggle off","toggle on"],P=t.MEDIA_ICONS=["area chart","bar chart","camera retro","film","line chart","newspaper","photo","pie chart","sound"],g=t.POINTERS_ICONS=["angle double down","angle double left","angle double right","angle double up","angle down","angle left","angle right","angle up","arrow circle down","arrow circle left","arrow circle outline down","arrow circle outline left","arrow circle outline right","arrow circle outline up","arrow circle right","arrow circle up","arrow down","arrow left","arrow right","arrow up","caret down","caret left","caret right","caret up","chevron circle down","chevron circle left","chevron circle right","chevron circle up","chevron down","chevron left","chevron right","chevron up","long arrow down","long arrow left","long arrow right","long arrow up","pointing down","pointing left","pointing right","pointing up","toggle down","toggle left","toggle right","toggle up"],b=t.MOBILE_ICONS=["mobile","tablet","battery empty","battery full","battery low","battery medium"],O=t.COMPUTER_ICONS=["desktop","disk outline","game","high battery","keyboard","laptop","plug","power"],_=t.COMPUTER_AND_FILE_SYSTEM_ICONS=["file archive outline","file audio outline","file code outline","file excel outline","file","file image outline","file outline","file pdf outline","file powerpoint outline","file text","file text outline","file video outline","file word outline","folder","folder open","folder open outline","folder outline","level down","level up","trash","trash outline"],E=t.TECHNOLOGIES_ICONS=["barcode","bluetooth alternative","bluetooth","css3","database","fork","html5","openid","qrcode","rss","rss square","server","usb"],w=t.RATING_ICONS=["empty heart","empty star","frown","heart","meh","smile","star half empty","star half","star","thumbs down","thumbs outline down","thumbs outline up","thumbs up"],j=t.AUDIO_ICONS=["backward","closed captioning","eject","fast backward","fast forward","forward","music","mute","pause circle","pause circle outline","pause","play","record","step backward","step forward","stop circle","stop circle outline","stop","unmute","video play","video play outline","volume down","volume off","volume up"],S=t.MAP_ICONS=["bicycle","building","building outline","bus","car","coffee","compass","emergency","first aid","food","h","hospital","hotel","location arrow","map","map outline","map pin","map signs","marker","military","motorcycle","paw","ship","space shuttle","spoon","street view","subway","taxi","train","television","tree","university"],x=t.TABLES_ICONS=["columns","sort alphabet ascending","sort alphabet descending","sort ascending","sort content ascending","sort content descending","sort descending","sort","sort numeric ascending","sort numeric descending","table"],M=t.TEXT_EDITOR_ICONS=["align center","align justify","align left","align right","attach","bold","content","copy","cut","font","header","indent","italic","linkify","list","ordered list","outdent","paragraph","paste","save","strikethrough","subscript","superscript","text cursor","text height","text width","underline","unlinkify","unordered list"],A=t.CURRENCY_ICONS=["bitcoin","dollar","euro","lira","pound","ruble","rupee","shekel","won","yen"],N=t.PAYMENT_OPTIONS_ICONS=["american express","credit card alternative","diners club","discover","google wallet","japan credit bureau","mastercard","paypal card","paypal","stripe","visa"],I=t.ACCESSIBILITY_ICONS=["wheelchair","asl interpreting","assistive listening systems","audio description","blind","braille","deafness","low vision","sign language","universal access","volume control phone"],k=t.BRANDS_ICONS=["500px","adn","amazon","android","angellist","apple","behance","behance square","bitbucket","bitbucket square","black tie","buysellads","chrome","codepen","codiepie","connectdevelop","contao","dashcube","delicious","deviantart","digg","dribbble","dropbox","drupal","empire","envira gallery","expeditedssl","facebook","facebook f","facebook square","firefox","first order","flickr","font awesome","fonticons","fort awesome","forumbee","foursquare","gg","gg circle","git","git square","github","github alternate","github square","gitlab","gittip","glide","glide g","google","google plus","google plus circle","google plus square","hacker news","houzz","instagram","internet explorer","ioxhost","joomla","jsfiddle","lastfm","lastfm square","leanpub","linkedin","linkedin square","linux","maxcdn","meanpath","medium","microsoft edge","mixcloud","modx","odnoklassniki","odnoklassniki square","opencart","opera","optinmonster","pagelines","pied piper","pied piper alternate","pied piper hat","pinterest","pinterest square","pocket","product hunt","qq","rebel","reddit","reddit alien","reddit square","renren","safari","scribd","sellsy","shirtsinbulk","simplybuilt","skyatlas","skype","slack","slideshare","snapchat","snapchat ghost","snapchat square","soundcloud","spotify","stack exchange","stack overflow","steam","steam square","stumbleupon","stumbleupon circle","tencent weibo","themeisle","trello","tripadvisor","tumblr","tumblr square","twitch","twitter","twitter square","viacoin","viadeo","viadeo square","vimeo","vimeo square","vine","vk","wechat","weibo","whatsapp","wikipedia","windows","wordpress","wpbeginner","wpforms","xing","xing square","y combinator","yahoo","yelp","yoast","youtube","youtube play","youtube square"];t.ICONS=[].concat(p,c,d,f,y,m,v,h,T,P,g,b,O,_,E,w,j,S,x,M,A,N,I,k)},/*!**********************************!*\ !*** ./src/lib/childrenUtils.js ***! \**********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.findByType=t.someByType=void 0;var o=r(/*! lodash/find */104),a=n(o),s=r(/*! lodash/some */231),l=n(s),i=r(/*! react */1);t.someByType=function(e,t){return(0,l["default"])(i.Children.toArray(e),{type:t})},t.findByType=function(e,t){return(0,a["default"])(i.Children.toArray(e),{type:t})}},/*!**************************************!*\ !*** ./src/lib/classNameBuilders.js ***! \**************************************/ function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useVerticalAlignProp=t.useTextAlignProp=t.useWidthProp=t.useKeyOrValueAndKey=t.useValueAndKey=t.useKeyOnly=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},o=r(/*! ./numberToWord */68),a=(t.useKeyOnly=function(e,t){return e&&t},t.useValueAndKey=function(e,t){return e&&e!==!0&&e+" "+t});t.useKeyOrValueAndKey=function(e,t){return e&&(e===!0?t:e+" "+t)},t.useWidthProp=function(e){var t=arguments.length<=1||void 0===arguments[1]?"":arguments[1],r=!(arguments.length<=2||void 0===arguments[2])&&arguments[2];if(r&&"equal"===e)return"equal width";var a="undefined"==typeof e?"undefined":n(e);return"string"!==a&&"number"!==a||!t?(0,o.numberToWord)(e):(0,o.numberToWord)(e)+" "+t},t.useTextAlignProp=function(e){return"justified"===e?"justified":a(e,"aligned")},t.useVerticalAlignProp=function(e){return a(e,"aligned")}},/*!************************************!*\ !*** ./src/lib/customPropTypes.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function a(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Object.defineProperty(t,"__esModule",{value:!0}),t.deprecate=t.demand=t.givenProps=t.some=t.every=t.disallow=t.as=void 0;var s=r(/*! lodash/fp/isObject */412),l=n(s),i=r(/*! lodash/fp/pick */416),u=n(i),p=r(/*! lodash/fp/keys */414),c=n(p),d=r(/*! lodash/fp/isPlainObject */413),f=n(d),y=r(/*! lodash/fp/isFunction */411),m=n(y),v=r(/*! lodash/fp/compact */405),h=n(v),T=r(/*! lodash/fp/map */415),P=n(T),g=r(/*! lodash/fp/flow */223),b=n(g),O=a([" See `","` prop in `","`."],[" See \\`","\\` prop in \\`","\\`."]),_=r(/*! react */1),E=function(){var e;return(e=Object.prototype.toString).call.apply(e,arguments)};t.as=function(){return _.PropTypes.oneOfType([_.PropTypes.string,_.PropTypes.func]).apply(void 0,arguments)},t.disallow=function(e){return function(t,r,n){if(!Array.isArray(e))throw new Error(["Invalid argument supplied to disallow, expected an instance of array."(O,r,n)].join(""));if(void 0!==t[r]){var a=e.reduce(function(e,r){return void 0!==t[r]?[].concat(o(e),[r]):e},[]);return a.length>0?new Error(["Prop `"+r+"` in `"+n+"` conflicts with props: `"+a.join("`, `")+"`.","They cannot be defined together, choose one or the other."].join(" ")):void 0}}},t.every=function(e){return function(t,r,n){for(var o=arguments.length,a=Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=arguments[s];if(!Array.isArray(e))throw new Error(["Invalid argument supplied to every, expected an instance of array.","See `"+r+"` prop in `"+n+"`."].join(" "));var l=(0,b["default"])((0,P["default"])(function(e){if("function"!=typeof e)throw new Error('every() argument "validators" should contain functions, found: '+E(e)+".");return e.apply(void 0,[t,r,n].concat(a))}),h["default"])(e);return l[0]}},t.some=function(e){return function(t,r,n){for(var o=arguments.length,a=Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=arguments[s];if(!Array.isArray(e))throw new Error(["Invalid argument supplied to some, expected an instance of array.","See `"+r+"` prop in `"+n+"`."].join(" "));var l=(0,h["default"])((0,P["default"])(e,function(e){if(!(0,m["default"])(e))throw new Error('some() argument "validators" should contain functions, found: '+E(e)+".");return e.apply(void 0,[t,r,n].concat(a))}));if(l.length===e.length){var i=new Error("One of these validators must pass:");return i.message+="\n"+(0,P["default"])(l,function(e,t){return"["+(t+1)+"]: "+e.message}).join("\n"),i}}},t.givenProps=function(e,t){return function(r,n,o){for(var a=arguments.length,s=Array(a>3?a-3:0),i=3;i<a;i++)s[i-3]=arguments[i];if(!(0,f["default"])(e))throw new Error(["Invalid argument supplied to givenProps, expected an object.","See `"+n+"` prop in `"+o+"`."].join(" "));if("function"!=typeof t)throw new Error(["Invalid argument supplied to givenProps, expected a function.","See `"+n+"` prop in `"+o+"`."].join(" "));var p=(0,c["default"])(e).every(function(t){var a=e[t];return"function"==typeof a?!a.apply(void 0,[r,t,o].concat(s)):a===r[n]});if(p){var d=t.apply(void 0,[r,n,o].concat(s));if(d){var y="{ "+(0,c["default"])((0,u["default"])((0,c["default"])(e),r)).map(function(e){var t=r[e],n=t;return"string"==typeof t?n='"'+t+'"':Array.isArray(t)?n="["+t.join(", ")+"]":(0,l["default"])(t)&&(n="{...}"),e+": "+n}).join(", ")+" }";return d.message="Given props "+y+": "+d.message,d}}}},t.demand=function(e){return function(t,r,n){if(!Array.isArray(e))throw new Error(["Invalid `requiredProps` argument supplied to require, expected an instance of array."(O,r,n)].join(""));if(void 0!==t[r]){var o=e.filter(function(e){return void 0===t[e]});return o.length>0?new Error("`"+r+"` prop in `"+n+"` requires props: `"+o.join("`, `")+"`."):void 0}}},t.deprecate=function(e,t){return function(r,n,o){for(var a=arguments.length,s=Array(a>3?a-3:0),l=3;l<a;l++)s[l-3]=arguments[l];if("string"!=typeof e)throw new Error(["Invalid `help` argument supplied to deprecate, expected a string.","See `"+n+"` prop in `"+o+"`."].join(" "));if(void 0!==r[n]){var i=new Error("The `"+n+"` prop in `"+o+"` is deprecated.");if(e&&(i.message+=" "+e),t){if("function"!=typeof t)throw new Error(["Invalid argument supplied to deprecate, expected a function.","See `"+n+"` prop in `"+o+"`."].join(" "));var u=t.apply(void 0,[r,n,o].concat(s));u&&(i.message=i.message+" "+u.message)}return i}}}},/*!**************************!*\ !*** ./src/lib/debug.js ***! \**************************/ function(e,t,r){(function(e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=void 0,o=function(){};n="production"!==e.env.NODE_ENV&&"test"!==e.env.NODE_ENV?r(/*! debug */282):function(){return o};var a=t.makeDebugger=function(e){return n("semanticUIReact:"+e)};t.debug=a("log")}).call(t,r(/*! ./~/node-libs-browser/~/process/browser.js */63))},/*!******************************!*\ !*** ./src/lib/factories.js ***! \******************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e,t,r){var n=arguments.length<=3||void 0===arguments[3]?{}:arguments[3];if(null===r)return null;var o=void 0,a={};(0,E.isValidElement)(r)?(o="element",a=r.props):(0,v["default"])(r)?(o="props",a=r):((0,y["default"])(r)||(0,d["default"])(r)||(0,p["default"])(r))&&(o="literal",a=t(r)),n=(0,T["default"])(n)?n(a):n;var s=j(n,a);return"element"===o?w["default"].cloneElement(r,s):"props"===o||"literal"===o?w["default"].createElement(e,s):null}function s(e,t){return(0,i["default"])(a,e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.createHTMLInput=t.createHTMLImage=void 0;var l=r(/*! lodash/partial */429),i=n(l),u=r(/*! lodash/isArray */5),p=n(u),c=r(/*! lodash/isNumber */422),d=n(c),f=r(/*! lodash/isString */227),y=n(f),m=r(/*! lodash/isPlainObject */226),v=n(m),h=r(/*! lodash/isFunction */23),T=n(h),P=r(/*! lodash/has */28),g=n(P),b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t.createShorthand=a,t.createShorthandFactory=s;var O=r(/*! classnames */3),_=n(O),E=r(/*! react */1),w=n(E),j=function(e,t){var r=b({},e,t),n=r.childKey,a=o(r,["childKey"]);return((0,g["default"])(t,"className")||(0,g["default"])(e.className))&&(a.className=(0,_["default"])(e.className,t.className)),a.key||(a.key=(0,T["default"])(n)?n(a):n),a};t.createHTMLImage=s("img",function(e){return{src:e}}),t.createHTMLInput=s("input",function(e){return{type:e}})},/*!***********************************!*\ !*** ./src/lib/getElementType.js ***! \***********************************/ function(e,t){"use strict";function r(e,t,r){var n=e.defaultProps,o=void 0===n?{}:n;if(t.as&&t.as!==o.as)return t.as;if(r){var a=r();if(a)return a}return t.href?"a":o.as||"div"}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=r},/*!**************************************!*\ !*** ./src/lib/getUnhandledProps.js ***! \**************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(/*! lodash/omit */109),a=n(o),s=r(/*! lodash/keys */10),l=n(s),i=r(/*! lodash/union */236),u=n(i),p=function(e,t){var r=(0,u["default"])(e.autoControlledProps,(0,l["default"])(e.defaultProps),(0,l["default"])(e.propTypes));return(0,a["default"])(t,r)};t["default"]=p},/*!********************************!*\ !*** ./src/lib/keyboardKey.js ***! \********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(/*! lodash/isObject */11),a=n(o),s=r(/*! lodash/times */233),l=n(s),i={3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"};(0,l["default"])(24,function(e){return i[112+e]="F"+(e+1)}),(0,l["default"])(26,function(e){var t=e+65;i[t]=[String.fromCharCode(t+32),String.fromCharCode(t)]});var u={codes:i,getCode:function(e){return(0,a["default"])(e)?e.keyCode||e.which||this[e.key]:this[e]},getName:function(e){var t=(0,a["default"])(e),r=i[t?e.keyCode||e.which:e];return Array.isArray(r)&&(r=t?r[e.shiftKey?1:0]:r[0]),r},Cancel:3,Help:6,Backspace:8,Tab:9,Clear:12,Enter:13,Shift:16,Control:17,Alt:18,Pause:19,CapsLock:20,Escape:27,Convert:28,NonConvert:29,Accept:30,ModeChange:31," ":32,PageUp:33,PageDown:34,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Select:41,Print:42,Execute:43,PrintScreen:44,Insert:45,Delete:46,0:48,")":48,1:49,"!":49,2:50,"@":50,3:51,"#":51,4:52,$:52,5:53,"%":53,6:54,"^":54,7:55,"&":55,8:56,"*":56,9:57,"(":57,a:65,A:65,b:66,B:66,c:67,C:67,d:68,D:68,e:69,E:69,f:70,F:70,g:71,G:71,h:72,H:72,i:73,I:73,j:74,J:74,k:75,K:75,l:76,L:76,m:77,M:77,n:78,N:78,o:79,O:79,p:80,P:80,q:81,Q:81,r:82,R:82,s:83,S:83,t:84,T:84,u:85,U:85,v:86,V:86,w:87,W:87,x:88,X:88,y:89,Y:89,z:90,Z:90,OS:91,ContextMenu:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,F20:131,F21:132,F22:133,F23:134,F24:135,NumLock:144,ScrollLock:145,VolumeMute:181,VolumeDown:182,VolumeUp:183,";":186,":":186,"=":187,"+":187,",":188,"<":188,"-":189,_:189,".":190,">":190,"/":191,"?":191,"`":192,"~":192,"[":219,"{":219,"\\":220,"|":220,"]":221,"}":221,"'":222,'"':222,Meta:224,AltGraph:225,Attn:246,CrSel:247,ExSel:248,EraseEof:249,Play:250,ZoomOut:251};u.Spacebar=u[" "],u.Digit0=u[0],u.Digit1=u[1],u.Digit2=u[2],u.Digit3=u[3],u.Digit4=u[4],u.Digit5=u[5],u.Digit6=u[6],u.Digit7=u[7],u.Digit8=u[8],u.Digit9=u[9],u.Tilde=u["~"],u.GraveAccent=u["`"],u.ExclamationPoint=u["!"],u.AtSign=u["@"],u.PoundSign=u["#"],u.PercentSign=u["%"],u.Caret=u["^"],u.Ampersand=u["&"],u.PlusSign=u["+"],u.MinusSign=u["-"],u.EqualsSign=u["="],u.DivisionSign=u["/"],u.MultiplicationSign=u["*"],u.Comma=u[","],u.Decimal=u["."],u.Colon=u[":"],u.Semicolon=u[";"],u.Pipe=u["|"],u.BackSlash=u["\\"],u.QuestionMark=u["?"],u.SingleQuote=u['"'],u.DoubleQuote=u['"'],u.LeftCurlyBrace=u["{"],u.RightCurlyBrace=u["}"],u.LeftParenthesis=u["("],u.RightParenthesis=u[")"],u.LeftAngleBracket=u["<"],u.RightAngleBracket=u[">"],u.LeftSquareBracket=u["["],u.RightSquareBracket=u["]"],t["default"]=u},/*!*******************************!*\ !*** ./src/lib/objectDiff.js ***! \*******************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.objectDiff=void 0;var o=r(/*! lodash/isEqual */60),a=n(o),s=r(/*! lodash/has */28),l=n(s),i=r(/*! lodash/transform */235),u=n(i);t.objectDiff=function(e,t){return(0,u["default"])(e,function(e,r,n){(0,l["default"])(t,n)?(0,a["default"])(r,t[n])||(e[n]=t[n]):e[n]="[DELETED]"},{})}},/*!********************************************!*\ !*** ./src/modules/Accordion/Accordion.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=r(/*! lodash/keys */10),i=n(l),u=r(/*! lodash/omit */109),p=n(u),c=r(/*! lodash/each */102),d=n(c),f=r(/*! lodash/has */28),y=n(f),m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},v=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}}(),h=function M(e,t,r){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,t);if(void 0===n){var o=Object.getPrototypeOf(e);return null===o?void 0:M(o,t,r)}if("value"in n)return n.value;var a=n.get;if(void 0!==a)return a.call(r)},T=r(/*! classnames */3),P=n(T),g=r(/*! react */1),b=n(g),O=r(/*! ../../lib */2),_=r(/*! ../../elements */4),E=r(/*! ../../modules/Accordion/AccordionContent */154),w=n(E),j=r(/*! ../../modules/Accordion/AccordionTitle */155),S=n(j),x=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,i=Array(l),u=0;u<l;u++)i[u]=arguments[u];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),n.state={},n.handleTitleClick=function(e,t){var r=n.props.onTitleClick,o=n.state.activeIndex;n.trySetState({activeIndex:t===o?-1:t}),r&&r(e,t)},n.renderChildren=function(){var e=n.props.children,t=n.state.activeIndex;return g.Children.map(e,function(e,r){var o=e.type===S["default"],a=e.type===w["default"];if(o){var s=(0,y["default"])(e,"props.active")?e.props.active:t===r,l=function(t){n.handleTitleClick(t,r),e.props.onClick&&e.props.onClick(t,r)};return(0,g.cloneElement)(e,m({},e.props,{active:s,onClick:l}))}if(a){var i=(0,y["default"])(e,"props.active")?e.props.active:t===r-1;return(0,g.cloneElement)(e,m({},e.props,{active:i}))}return e})},n.renderPanels=function(){var e=n.props.panels,t=n.state.activeIndex,r=[];return(0,d["default"])(e,function(e,o){var a=(0,y["default"])(e,"active")?e.active:t===o,s=function(t){n.handleTitleClick(t,o),e.onClick&&e.onClick(t,o)};r.push(b["default"].createElement(S["default"],{key:e.title+"-title",active:a,onClick:s},b["default"].createElement(_.Icon,{name:"dropdown"}),e.title)),r.push(b["default"].createElement(w["default"],{key:e.title+"-content",active:a},e.content))}),r},s=r,a(n,s)}return s(t,e),v(t,[{key:"componentWillMount",value:function(){h(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillMount",this).call(this),this.trySetState({activeIndex:-1})}},{key:"render",value:function(){var e=this.props,r=e.className,n=e.fluid,o=e.inverted,a=e.panels,s=e.styled,l=(0,P["default"])(r,"ui",(0,O.useKeyOnly)(n,"fluid"),(0,O.useKeyOnly)(o,"inverted"),(0,O.useKeyOnly)(s,"styled"),"accordion"),u=(0,p["default"])(this.props,(0,i["default"])(t.propTypes)),c=(0,O.getElementType)(t,this.props);return b["default"].createElement(c,m({},u,{className:l}),a?this.renderPanels():this.renderChildren())}}]),t}(O.AutoControlledComponent);x.autoControlledProps=["activeIndex"],x.propTypes={as:O.customPropTypes.as,activeIndex:g.PropTypes.number,children:O.customPropTypes.every([O.customPropTypes.disallow(["panels"]),g.PropTypes.node]),className:g.PropTypes.string,defaultActiveIndex:g.PropTypes.number,fluid:g.PropTypes.bool,inverted:g.PropTypes.bool,onTitleClick:g.PropTypes.func,panels:O.customPropTypes.every([O.customPropTypes.disallow(["children"]),g.PropTypes.arrayOf(g.PropTypes.shape({active:g.PropTypes.bool,title:g.PropTypes.string,content:g.PropTypes.string,onClick:g.PropTypes.func}))]),styled:g.PropTypes.bool},x._meta={name:"Accordion",type:O.META.TYPES.MODULE},x.Content=w["default"],x.Title=S["default"],t["default"]=x},/*!******************************************!*\ !*** ./src/modules/Checkbox/Checkbox.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=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=r(/*! react */1),p=n(u),c=r(/*! classnames */3),d=n(c),f=r(/*! ../../lib */2),y=(0,f.makeDebugger)("checkbox"),m={name:"Checkbox",type:f.META.TYPES.MODULE,props:{type:["checkbox","radio"]}},v=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,i=Array(l),u=0;u<l;u++)i[u]=arguments[u];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),n.state={},n.canToggle=function(){var e=n.props,t=e.disabled,r=e.radio,o=e.readOnly,a=n.state.checked;return!(t||o||r&&a)},n.handleClick=function(e){y("handleClick()");var t=n.props,r=t.onChange,o=t.onClick,a=t.name,s=t.value,l=n.state.checked;y(" name: "+a),y(" value: "+s),y(" checked: "+l),o&&o(e,{name:a,value:s,checked:!!l}),r&&r(e,{name:a,value:s,checked:!l}),n.canToggle()&&n.trySetState({checked:!l})},s=r,a(n,s)}return s(t,e),i(t,[{key:"render",value:function(){var e=this.props,r=e.className,n=e.label,o=e.name,a=e.radio,s=e.slider,i=e.toggle,u=e.type,c=e.value,y=this.state.checked,m=(0,d["default"])("ui",(0,f.useKeyOnly)(y,"checked"),(0,f.useKeyOnly)(!n,"fitted"),(0,f.useKeyOnly)(a,"radio"),(0,f.useKeyOnly)(s,"slider"),(0,f.useKeyOnly)(i,"toggle"),"checkbox",r),v=(0,f.getUnhandledProps)(t,this.props),h=(0,f.getElementType)(t,this.props);return p["default"].createElement(h,l({},v,{className:m,onClick:this.handleClick,onChange:this.handleClick}),p["default"].createElement("input",{type:u,name:o,checked:y,className:"hidden",readOnly:!0,tabIndex:0,value:c}),p["default"].createElement("label",null,n))}}]),t}(f.AutoControlledComponent);v.propTypes={as:f.customPropTypes.as,className:u.PropTypes.string,checked:u.PropTypes.bool,defaultChecked:u.PropTypes.bool,slider:f.customPropTypes.every([u.PropTypes.bool,f.customPropTypes.disallow(["radio","toggle"])]),radio:f.customPropTypes.every([u.PropTypes.bool,f.customPropTypes.disallow(["slider","toggle"])]),toggle:f.customPropTypes.every([u.PropTypes.bool,f.customPropTypes.disallow(["radio","slider"])]),disabled:u.PropTypes.bool,fitted:u.PropTypes.bool,label:u.PropTypes.string,type:u.PropTypes.oneOf(m.props.type),name:u.PropTypes.string,onChange:u.PropTypes.func,onClick:u.PropTypes.func,readOnly:u.PropTypes.bool,value:u.PropTypes.string},v.defaultProps={type:"checkbox"},v.autoControlledProps=["checked"],v._meta=m,t["default"]=v},/*!******************************************!*\ !*** ./src/modules/Dropdown/Dropdown.js ***! \******************************************/ function(e,t,r){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=r(/*! lodash/compact */219),i=n(l),u=r(/*! lodash/map */14),p=n(u),c=r(/*! lodash/every */221),d=n(c),f=r(/*! lodash/without */7),y=n(f),m=r(/*! lodash/findIndex */222),v=n(m),h=r(/*! lodash/find */104),T=n(h),P=r(/*! lodash/reduce */230),g=n(P),b=r(/*! lodash/escapeRegExp */399),O=n(b),_=r(/*! lodash/isFunction */23),E=n(_),w=r(/*! lodash/filter */103),j=n(w),S=r(/*! lodash/dropRight */398),x=n(S),M=r(/*! lodash/isEmpty */107),A=n(M),N=r(/*! lodash/union */236),I=n(N),k=r(/*! lodash/some */231),C=n(k),K=r(/*! lodash/get */37),L=n(K),U=r(/*! lodash/includes */106),D=n(U),R=r(/*! lodash/has */28),z=n(R),W=r(/*! lodash/isEqual */60),F=n(W),V=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},B=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}}(),Y=function ue(e,t,r){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,t);if(void 0===n){var o=Object.getPrototypeOf(e);return null===o?void 0:ue(o,t,r)}if("value"in n)return n.value;var a=n.get;if(void 0!==a)return a.call(r)},q=r(/*! classnames */3),H=n(q),G=r(/*! react */1),Z=n(G),$=r(/*! ../../lib */2),X=r(/*! ../../elements */4),Q=r(/*! ./DropdownDivider */156),J=n(Q),ee=r(/*! ./DropdownItem */158),te=n(ee),re=r(/*! ./DropdownHeader */157),ne=n(re),oe=r(/*! ./DropdownMenu */159),ae=n(oe),se=(0,$.makeDebugger)("dropdown"),le={name:"Dropdown",type:$.META.TYPES.MODULE,props:{pointing:["left","right","top","top left","top right","bottom","bottom left","bottom right"],additionPosition:["top","bottom"]}},ie=function(t){function r(){var e,t,n,s;o(this,r);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return t=n=a(this,(e=r.__proto__||Object.getPrototypeOf(r)).call.apply(e,[this].concat(u))),n.handleChange=function(e,t){se("handleChange()"),se(t);var r=n.props,o=r.name,a=r.onChange;a&&a(e,{name:o,value:t})},n.closeOnEscape=function(e){$.keyboardKey.getCode(e)===$.keyboardKey.Escape&&(e.preventDefault(),n.close())},n.moveSelectionOnKeyDown=function(e){switch(se("moveSelectionOnKeyDown()"),se($.keyboardKey.getName(e)),$.keyboardKey.getCode(e)){case $.keyboardKey.ArrowDown:e.preventDefault(),n.moveSelectionBy(1);break;case $.keyboardKey.ArrowUp:e.preventDefault(),n.moveSelectionBy(-1)}},n.openOnSpace=function(e){se("openOnSpace()"),$.keyboardKey.getCode(e)===$.keyboardKey.Spacebar&&(n.state.open||(e.preventDefault(),n.trySetState({open:!0})))},n.openOnArrow=function(e){var t=$.keyboardKey.getCode(e);se("openOnArrow()"),(0,D["default"])([$.keyboardKey.ArrowDown,$.keyboardKey.ArrowUp],t)&&(n.state.open||(e.preventDefault(),n.trySetState({open:!0})))},n.selectHighlightedItem=function(e){var t=n.state.open,r=n.props,o=r.multiple,a=r.name,s=r.onAddItem,l=r.options,i=(0,L["default"])(n.getSelectedItem(),"value");if(i&&t)if(s&&!(0,C["default"])(l,{text:i})&&s(e,{name:a,value:i}),o){var u=(0,I["default"])(n.state.value,[i]);n.setValue(u),n.handleChange(e,u)}else n.setValue(i),n.handleChange(e,i),n.close()},n.selectItemOnEnter=function(e){se("selectItemOnEnter()"),se($.keyboardKey.getName(e)),$.keyboardKey.getCode(e)===$.keyboardKey.Enter&&(e.preventDefault(),n.selectHighlightedItem(e))},n.removeItemOnBackspace=function(e){if(se("removeItemOnBackspace()"),se($.keyboardKey.getName(e)),$.keyboardKey.getCode(e)===$.keyboardKey.Backspace){var t=n.props,r=t.multiple,o=t.search,a=n.state,s=a.searchQuery,l=a.value;if(!s&&o&&r&&!(0,A["default"])(l)){e.preventDefault();var i=(0,x["default"])(l);n.setValue(i),n.handleChange(e,i)}}},n.closeOnDocumentClick=function(e){se("closeOnDocumentClick()"),se(e),n.close()},n.handleMouseDown=function(e){se("handleMouseDown()");var t=n.props.onMouseDown;t&&t(e),n.isMouseDown=!0,document.addEventListener("mouseup",n.handleDocumentMouseUp)},n.handleDocumentMouseUp=function(){se("handleDocumentMouseUp()"),n.isMouseDown=!1,document.removeEventListener("mouseup",n.handleDocumentMouseUp)},n.handleClick=function(e){se("handleClick()",e);var t=n.props.onClick;t&&t(e),e.stopPropagation(),n.toggle()},n.handleItemClick=function(e,t){se("handleItemClick()"),se(t);var r=n.props,o=r.multiple,a=r.name,s=r.onAddItem,l=r.options,i=n.getItemByValue(t)||{};if(e.stopPropagation(),(o||i.disabled)&&e.nativeEvent.stopImmediatePropagation(),!i.disabled)if(s&&!(0,C["default"])(l,{text:t})&&s(e,{name:a,value:t}),o){var u=(0,I["default"])(n.state.value,[t]);n.setValue(u),n.handleChange(e,u)}else n.setValue(t),n.handleChange(e,t),n.close()},n.handleFocus=function(e){se("handleFocus()");var t=n.props.onFocus;t&&t(e),n.setState({focus:!0})},n.handleBlur=function(e){se("handleBlur()");var t=n.props,r=t.multiple,o=t.onBlur,a=t.selectOnBlur;n.isMouseDown||(o&&o(e),a&&!r&&n.selectHighlightedItem(e),n.setState({focus:!1}))},n.handleSearchChange=function(e){se("handleSearchChange()"),se(e.target.value),e.stopPropagation();var t=n.props,r=t.search,o=t.onSearchChange,a=n.state.open,s=e.target.value;o&&o(e,s),r&&s&&!a&&n.open(),n.setState({selectedIndex:n.getEnabledIndices()[0],searchQuery:s})},n.getMenuOptions=function(){var e=arguments.length<=0||void 0===arguments[0]?n.state.value:arguments[0],t=n.props,r=t.multiple,o=t.search,a=t.allowAdditions,s=t.additionPosition,l=t.additionLabel,i=t.options,u=n.state.searchQuery,p=i;if(r&&(p=(0,j["default"])(p,function(t){return!(0,D["default"])(e,t.value)})),o&&u&&((0,E["default"])(o)?p=o(p,u):!function(){var e=new RegExp((0,O["default"])(u),"i");p=(0,j["default"])(p,function(t){return e.test(t.text)})}()),a&&o&&u&&!(0,C["default"])(p,{text:u})){var c={text:l?l+" "+u:u,value:u};"top"===s?p.unshift(c):p.push(c)}return p},n.getSelectedItem=function(){var e=n.state.selectedIndex,t=n.getMenuOptions();return(0,L["default"])(t,"["+e+"]")},n.getEnabledIndices=function(e){var t=e||n.getMenuOptions();return(0,g["default"])(t,function(e,t,r){return t.disabled||e.push(r),e},[])},n.getItemByValue=function(e){var t=n.props.options;return(0,T["default"])(t,{value:e})},n.getMenuItemIndexByValue=function(e){var t=n.getMenuOptions();return(0,v["default"])(t,["value",e])},n.setValue=function(e){se("setValue()"),se("value",e);var t=n.props.multiple,r=n.state.selectedIndex,o=n.getMenuOptions(e),a=n.getEnabledIndices(o),s={searchQuery:""};if(r)if(t)r>=o.length-1&&(s.selectedIndex=a[a.length-1]);else{var l=n.getMenuItemIndexByValue(e);s.selectedIndex=(0,D["default"])(a,l)?l:void 0}else{var i=a[0];s.selectedIndex=t?i:n.getMenuItemIndexByValue(e||(0,L["default"])(o,"["+i+"].value"))}n.trySetState({value:e},s)},n.handleLabelRemove=function(e,t){se("handleLabelRemove()"),e.stopPropagation();var r=n.state.value,o=(0,y["default"])(r,t.value);se("label props:",t),se("current value:",r),se("remove value:",t.value),se("new value:",o),n.setValue(o),n.handleChange(e,o)},n.moveSelectionBy=function(e){var t=arguments.length<=1||void 0===arguments[1]?n.state.selectedIndex:arguments[1];se("moveSelectionBy()"),se("offset: "+e);var r=n.getMenuOptions(),o=r.length-1;if(!(0,d["default"])(r,"disabled")){var a=t+e;if(a>o?a=0:a<0&&(a=o),r[a].disabled)return n.moveSelectionBy(e,a);n.setState({selectedIndex:a}),n.scrollSelectedItemIntoView()}},n.scrollSelectedItemIntoView=function(){se("scrollSelectedItemIntoView()");var e=document.querySelector(".ui.dropdown.active.visible .menu.visible"),t=e.querySelector(".item.selected");se("menu: "+e),se("item: "+t);var r=t.offsetTop<e.scrollTop,n=t.offsetTop+t.clientHeight>e.scrollTop+e.clientHeight;(r||n)&&(e.scrollTop=t.offsetTop)},n.open=function(){se("open()");var e=n.props.search;e&&n._search.focus(),n.trySetState({open:!0})},n.close=function(){se("close()"),n.trySetState({open:!1})},n.toggle=function(){return n.state.open?n.close():n.open()},n.renderText=function(){var e=n.props,t=e.multiple,r=e.placeholder,o=e.search,a=e.text,s=n.state,l=s.searchQuery,i=s.value,u=s.open,p=t?!(0,A["default"])(i):!!i,c=(0,H["default"])(r&&!p&&"default","text",o&&l&&"filtered"),d=r;return l?d=null:a?d=a:u&&!t?d=(0,L["default"])(n.getSelectedItem(),"text"):p&&(d=(0,L["default"])(n.getItemByValue(i),"text")),Z["default"].createElement("div",{className:c},d)},n.renderHiddenInput=function(){se("renderHiddenInput()");var e=n.state.value,t=n.props,r=t.multiple,o=t.name,a=t.options,s=t.selection;return se("name: "+o),se("selection: "+s),se("value: "+e),s?Z["default"].createElement("select",{type:"hidden",name:o,value:e,multiple:r},(0,p["default"])(a,function(e){return Z["default"].createElement("option",{key:e.value,value:e.value},e.text)})):null},n.renderSearchInput=function(){var e=n.props,t=e.search,r=e.name,o=n.state.searchQuery;if(!t)return null;var a=void 0;return n._sizer&&o&&(n._sizer.style.display="inline",n._sizer.textContent=o,a=Math.ceil(n._sizer.getBoundingClientRect().width),n._sizer.style.removeProperty("display")),Z["default"].createElement("input",{value:o,onChange:n.handleSearchChange,className:"search",name:[r,"search"].join("-"),autoComplete:"off",tabIndex:"0",style:{width:a},ref:function(e){return n._search=e}})},n.renderSearchSizer=function(){var e=n.props,t=e.search,r=e.multiple;return t&&r?Z["default"].createElement("span",{className:"sizer",ref:function(e){return n._sizer=e}}):null},n.renderLabels=function(){se("renderLabels()");var e=n.props.multiple,t=n.state.value;if(e&&!(0,A["default"])(t)){var r=(0,p["default"])(t,n.getItemByValue);return se("selectedItems",r),(0,p["default"])((0,i["default"])(r),function(e){return Z["default"].createElement(X.Label,{key:e.value,as:"a",content:e.text,value:e.value,onRemove:n.handleLabelRemove})})}},n.renderOptions=function(){var e=n.props,t=e.multiple,r=e.search,o=e.noResultsMessage,a=n.state,s=a.selectedIndex,l=a.value,i=n.getMenuOptions();if(r&&(0,A["default"])(i))return Z["default"].createElement("div",{className:"message"},o);var u=t?function(e){return(0,D["default"])(l,e)}:function(e){return e===l};return(0,p["default"])(i,function(e,t){return Z["default"].createElement(te["default"],V({key:e.value+"-"+t,active:u(e.value),onClick:n.handleItemClick,selected:s===t},e,{style:V({},e.style,{pointerEvents:"all"})}))})},n.renderMenu=function(){var e=n.props,t=e.children,r=e.header,o=n.state.open,a=o?"visible":"";if(t){var s=G.Children.only(t),l=(0,H["default"])(a,s.props.className);return(0,G.cloneElement)(s,{className:l})}return Z["default"].createElement(ae["default"],{className:a},(0,$.createShorthand)(ne["default"],function(e){return{content:e}},r),n.renderOptions())},s=t,a(n,s)}return s(r,t),B(r,[{key:"componentWillMount",value:function(){Y(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"componentWillMount",this)&&Y(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"componentWillMount",this).call(this),se("componentWillMount()");var e=this.state,t=e.open,n=e.value;this.setValue(n),t&&this.open()}},{key:"shouldComponentUpdate",value:function(e,t){return!(0,F["default"])(e,this.props)||!(0,F["default"])(t,this.state)}},{key:"componentWillReceiveProps",value:function(t){if(Y(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"componentWillReceiveProps",this).call(this,t),se("componentWillReceiveProps()"),se("to props:",(0,$.objectDiff)(this.props,t)),"production"!==e.env.NODE_ENV){var n=Array.isArray(t.value),o=(0,z["default"])(t,"value");o&&t.multiple&&!n?console.error("Dropdown `value` must be an array when `multiple` is set."+(" Received type: `"+Object.prototype.toString.call(t.value)+"`.")):o&&!t.multiple&&n&&console.error("Dropdown `value` must not be an array when `multiple` is not set. Either set `multiple={true}` or use a string or number value.")}(0,F["default"])(t.value,this.props.value)||(se("value changed, setting",t.value),this.setValue(t.value))}},{key:"componentDidUpdate",value:function(e,t){se("componentDidUpdate()"),se("to state:",(0,$.objectDiff)(t,this.state)),!t.focus&&this.state.focus?(se("dropdown focused"),this.isMouseDown||(se("mouse is not down, opening"),this.open()),this.state.open?(document.addEventListener("keydown",this.moveSelectionOnKeyDown),document.addEventListener("keydown",this.selectItemOnEnter),document.addEventListener("keydown",this.removeItemOnBackspace)):(document.addEventListener("keydown",this.openOnArrow),document.addEventListener("keydown",this.openOnSpace))):t.focus&&!this.state.focus&&(se("dropdown blurred"),this.isMouseDown||(se("mouse is not down, closing"),this.close()),document.removeEventListener("keydown",this.openOnArrow),document.removeEventListener("keydown",this.openOnSpace),document.removeEventListener("keydown",this.moveSelectionOnKeyDown),document.removeEventListener("keydown",this.selectItemOnEnter),document.removeEventListener("keydown",this.removeItemOnBackspace)),!t.open&&this.state.open?(se("dropdown opened"),this.open(),document.addEventListener("keydown",this.closeOnEscape),document.addEventListener("keydown",this.moveSelectionOnKeyDown),document.addEventListener("keydown",this.selectItemOnEnter),document.addEventListener("keydown",this.removeItemOnBackspace),document.addEventListener("click",this.closeOnDocumentClick),document.removeEventListener("keydown",this.openOnArrow),document.removeEventListener("keydown",this.openOnSpace)):t.open&&!this.state.open&&(se("dropdown closed"),this.close(),document.removeEventListener("keydown",this.closeOnEscape),document.removeEventListener("keydown",this.moveSelectionOnKeyDown),document.removeEventListener("keydown",this.selectItemOnEnter),document.removeEventListener("keydown",this.removeItemOnBackspace),document.removeEventListener("click",this.closeOnDocumentClick),t.focus&&this.state.focus&&(document.addEventListener("keydown",this.openOnArrow),document.addEventListener("keydown",this.openOnSpace)))}},{key:"componentWillUnmount",value:function(){se("componentWillUnmount()"),document.removeEventListener("keydown",this.openOnArrow),document.removeEventListener("keydown",this.openOnSpace),document.removeEventListener("keydown",this.moveSelectionOnKeyDown),document.removeEventListener("keydown",this.selectItemOnEnter),document.removeEventListener("keydown",this.removeItemOnBackspace),document.removeEventListener("keydown",this.closeOnEscape),document.removeEventListener("click",this.closeOnDocumentClick)}},{key:"render",value:function(){var e=this;se("render()"),se("props",this.props),se("state",this.state);var t=this.state.open,n=this.props,o=n.basic,a=n.button,s=n.className,l=n.compact,i=n.fluid,u=n.floating,p=n.icon,c=n.inline,d=n.labeled,f=n.multiple,y=n.pointing,m=n.search,v=n.selection,h=n.simple,T=n.loading,P=n.error,g=n.disabled,b=n.scrolling,O=n.trigger,_=(0,H["default"])("ui",(0,$.useKeyOnly)(t,"active visible"),(0,$.useKeyOnly)(g,"disabled"),(0,$.useKeyOnly)(P,"error"),(0,$.useKeyOnly)(T,"loading"),(0,$.useKeyOnly)(o,"basic"),(0,$.useKeyOnly)(a,"button"),(0,$.useKeyOnly)(l,"compact"),(0,$.useKeyOnly)(i,"fluid"),(0,$.useKeyOnly)(u,"floating"),(0,$.useKeyOnly)(c,"inline"),(0,$.useKeyOnly)(d,"labeled"),(0,$.useKeyOnly)(f,"multiple"),(0,$.useKeyOnly)(m,"search"),(0,$.useKeyOnly)(v,"selection"),(0,$.useKeyOnly)(h,"simple"),(0,$.useKeyOnly)(b,"scrolling"),(0,$.useKeyOrValueAndKey)(y,"pointing"),s,"dropdown"),E=(0,$.getUnhandledProps)(r,this.props),w=(0,$.getElementType)(r,this.props);return Z["default"].createElement(w,V({},E,{className:_,onBlur:this.handleBlur,onClick:this.handleClick,onMouseDown:this.handleMouseDown,onFocus:this.handleFocus,onChange:this.handleChange,tabIndex:m?void 0:0,ref:function(t){return e._dropdown=t}}),this.renderHiddenInput(),this.renderLabels(),this.renderSearchInput(),this.renderSearchSizer(),O||this.renderText(),X.Icon.create(p),this.renderMenu())}}]),r}($.AutoControlledComponent);ie.propTypes={as:$.customPropTypes.as,icon:G.PropTypes.oneOfType([G.PropTypes.element,G.PropTypes.string]),options:$.customPropTypes.every([$.customPropTypes.disallow(["children"]),$.customPropTypes.demand(["selection"]),G.PropTypes.arrayOf(G.PropTypes.shape(te["default"].propTypes))]),open:G.PropTypes.bool,defaultOpen:G.PropTypes.bool,children:$.customPropTypes.every([$.customPropTypes.disallow(["options","selection"]),$.customPropTypes.demand(["text"]),$.customPropTypes.givenProps({children:G.PropTypes.any.isRequired},Z["default"].PropTypes.element.isRequired)]),value:G.PropTypes.oneOfType([G.PropTypes.string,G.PropTypes.number,G.PropTypes.arrayOf(G.PropTypes.oneOfType([G.PropTypes.string,G.PropTypes.number]))]),defaultValue:G.PropTypes.oneOfType([G.PropTypes.string,G.PropTypes.number,G.PropTypes.arrayOf(G.PropTypes.oneOfType([G.PropTypes.string,G.PropTypes.number]))]),placeholder:G.PropTypes.string,name:G.PropTypes.string,trigger:$.customPropTypes.every([$.customPropTypes.disallow(["selection","text"]),G.PropTypes.node]),allowAdditions:$.customPropTypes.every([$.customPropTypes.demand(["options","selection","search"]),G.PropTypes.bool]),additionPosition:G.PropTypes.oneOf(le.props.additionPosition),additionLabel:G.PropTypes.string,noResultsMessage:G.PropTypes.string,selectOnBlur:G.PropTypes.bool,search:G.PropTypes.oneOfType([G.PropTypes.bool,G.PropTypes.func]),onAddItem:G.PropTypes.func,onBlur:G.PropTypes.func,onChange:G.PropTypes.func,onSearchChange:G.PropTypes.func,onClick:G.PropTypes.func,onFocus:G.PropTypes.func,onMouseDown:G.PropTypes.func,basic:G.PropTypes.bool,button:G.PropTypes.bool,className:G.PropTypes.string,compact:G.PropTypes.bool,fluid:G.PropTypes.bool,floating:G.PropTypes.bool,header:G.PropTypes.node,inline:G.PropTypes.bool,labeled:G.PropTypes.bool,multiple:G.PropTypes.bool,pointing:G.PropTypes.oneOfType([G.PropTypes.bool,G.PropTypes.oneOf(le.props.pointing)]),text:G.PropTypes.string,selection:$.customPropTypes.every([$.customPropTypes.disallow(["children"]),$.customPropTypes.demand(["options"]),G.PropTypes.bool]),simple:G.PropTypes.bool,loading:G.PropTypes.bool,error:G.PropTypes.bool,disabled:G.PropTypes.bool,scrolling:G.PropTypes.bool},ie.defaultProps={icon:"dropdown",additionLabel:"Add:",noResultsMessage:"No results found.",selectOnBlur:!0},ie.autoControlledProps=["open","value"],ie._meta=le,ie.Divider=J["default"],ie.Header=ne["default"],ie.Item=te["default"],ie.Menu=ae["default"],t["default"]=ie}).call(t,r(/*! ./~/node-libs-browser/~/process/browser.js */63))},/*!************************************!*\ !*** ./src/modules/Modal/Modal.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=r(/*! lodash/keys */10),i=n(l),u=r(/*! lodash/pick */61),p=n(u),c=r(/*! lodash/isEqual */60),d=n(c),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},y=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}}(),m=r(/*! react */1),v=n(m),h=r(/*! classnames */3),T=n(h),P=r(/*! ./ModalHeader */163),g=n(P),b=r(/*! ./ModalContent */161),O=n(b),_=r(/*! ./ModalActions */160),E=n(_),w=r(/*! ./ModalDescription */162),j=n(w),S=r(/*! ./../../addons/Portal/Portal */111),x=n(S),M=r(/*! ../../lib */2),A=(0,M.makeDebugger)("modal"),N={name:"Modal",type:M.META.TYPES.MODULE,props:{size:["fullscreen","large","small"],dimmer:["inverted","blurring"]}},I=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,i=Array(l),u=0;u<l;u++)i[u]=arguments[u];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),n.state={},n.handleMount=function(){A("handleOpen()");var e=n.props.dimmer,t=n.getMountNode();e&&(A("adding dimmer"),t.classList.add("dimmable","dimmed"),"blurring"===e&&(A("adding blurred dimmer"),t.classList.add("blurring")))},n.handleUnmount=function(){A("handleUnmount()");var e=n.getMountNode();e.classList.remove("blurring","dimmable","dimmed","scrollable")},n.getMountNode=function(){return n.props.mountNode||document.body},n.setPosition=function(){if(n._modalNode){var e=n.getMountNode(),t=n._modalNode.getBoundingClientRect(),r=t.height,o=r>=window.innerHeight,a={marginTop:-Math.round(r/2),scrolling:o};!n.state.scrolling&&o?e.classList.add("scrolling"):n.state.scrolling&&!o&&e.classList.remove("scrolling"),(0,d["default"])(a,n.state)||n.setState(a)}requestAnimationFrame(n.setPosition)},s=r,a(n,s)}return s(t,e),y(t,[{key:"componentDidMount",value:function(){A("componentDidMount()"),this.setPosition()}},{key:"componentWillUnmount",value:function(){A("componentWillUnmount()"),this.handleUnmount()}},{key:"render",value:function(){var e=this,r=this.props,n=r.basic,o=r.children,a=r.className,s=r.dimmer,l=r.size,u=this.state,c=u.marginTop,d=u.scrolling,y=(0,T["default"])("ui",l,(0,M.useKeyOnly)(n,"basic"),(0,M.useKeyOnly)(d,"scrolling"),"modal transition visible active",a),m=(0,M.getUnhandledProps)(t,this.props),h=(0,M.getElementType)(t,this.props),P=(0,p["default"])(m,(0,i["default"])(x["default"].propTypes)),g=v["default"].createElement(h,f({},m,{className:y,style:{marginTop:c},ref:function(t){return e._modalNode=t}}),o),b=s?(0,T["default"])("ui","inverted"===s&&"inverted","page modals dimmer transition visible active"):null;return v["default"].createElement(x["default"],f({},P,{className:b,mountNode:this.getMountNode(),onMount:this.handleMount,onUnmount:this.handleUnmount}),g)}}]),t}(m.Component);I.propTypes={as:M.customPropTypes.as,children:m.PropTypes.node,className:m.PropTypes.string,basic:m.PropTypes.bool,dimmer:m.PropTypes.oneOfType([m.PropTypes.bool,m.PropTypes.oneOf(N.props.dimmer)]),mountNode:m.PropTypes.any,size:m.PropTypes.oneOf(N.props.size)},I.defaultProps={dimmer:!0},I._meta=N,I.Header=g["default"],I.Content=O["default"],I.Description=j["default"],I.Actions=E["default"],t["default"]=I},/*!******************************************!*\ !*** ./src/modules/Progress/Progress.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.active,r=e.attached,n=e.autoSuccess,a=e.color,s=e.children,l=e.className,u=e.disabled,c=e.error,f=e.indicating,v=e.inverted,T=e.label,b=e.percent,O=e.precision,_=e.progress,E=e.size,w=e.success,j=e.total,S=e.value,x=e.warning,M=n&&(b>=100||S>=j),A=_||T||!(0,y["default"])(O)||!(0,d["default"])([j,S],y["default"]),N=void 0;(0,y["default"])(b)?(0,y["default"])(j)||(0,y["default"])(S)||(N=S/j*100):N=b,N=(0,p["default"])(N,0,100),(0,y["default"])(O)||(N=(0,i["default"])(N,O));var I=void 0;"percent"===T||T===!0||(0,y["default"])(T)?I=N+"%":"ratio"===T&&(I=S+"/"+j);var k=(0,h["default"])("ui",E,a,(0,g.useKeyOnly)(t||f,"active"),(0,g.useKeyOnly)(M||w,"success"),(0,g.useKeyOnly)(x,"warning"),(0,g.useKeyOnly)(c,"error"),(0,g.useKeyOnly)(u,"disabled"),(0,g.useKeyOnly)(f,"indicating"),(0,g.useKeyOnly)(v,"inverted"),(0,g.useValueAndKey)(r,"attached"),l,"progress"),C=(0,g.getUnhandledProps)(o,e),K=(0,g.getElementType)(o,e);return P["default"].createElement(K,m({},C,{className:k}),P["default"].createElement("div",{className:"bar",style:{width:N+"%"}},A&&P["default"].createElement("div",{className:"progress"},I)),s&&P["default"].createElement("div",{className:"label"},s))}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/without */7),s=n(a),l=r(/*! lodash/round */433),i=n(l),u=r(/*! lodash/clamp */393),p=n(u),c=r(/*! lodash/every */221),d=n(c),f=r(/*! lodash/isUndefined */423),y=n(f),m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},v=r(/*! classnames */3),h=n(v),T=r(/*! react */1),P=n(T),g=r(/*! ../../lib */2);o._meta={name:"Progress",type:g.META.TYPES.MODULE,props:{attached:["top","bottom"],color:g.SUI.COLORS,label:["ratio","percent"],size:(0,s["default"])(g.SUI.SIZES,"mini","huge","massive")}},o.propTypes={as:g.customPropTypes.as,active:T.PropTypes.bool,attached:T.PropTypes.oneOf(o._meta.props.attached),autoSuccess:T.PropTypes.bool,color:T.PropTypes.oneOf(o._meta.props.color),children:T.PropTypes.node,className:T.PropTypes.string,disabled:T.PropTypes.bool,error:T.PropTypes.bool,indicating:T.PropTypes.bool,inverted:T.PropTypes.bool,label:g.customPropTypes.every([g.customPropTypes.some([g.customPropTypes.demand(["percent"]),g.customPropTypes.demand(["total","value"])]),T.PropTypes.oneOfType([T.PropTypes.bool,T.PropTypes.oneOf(o._meta.props.label)])]),percent:g.customPropTypes.every([g.customPropTypes.disallow(["total","value"]),T.PropTypes.oneOfType([T.PropTypes.string,T.PropTypes.number])]),progress:T.PropTypes.bool,precision:T.PropTypes.number,size:T.PropTypes.oneOf(o._meta.props.size),success:T.PropTypes.bool,total:g.customPropTypes.every([g.customPropTypes.demand(["value"]),g.customPropTypes.disallow(["percent"]),T.PropTypes.oneOfType([T.PropTypes.string,T.PropTypes.number])]),value:g.customPropTypes.every([g.customPropTypes.demand(["total"]),g.customPropTypes.disallow(["percent"]),T.PropTypes.oneOfType([T.PropTypes.string,T.PropTypes.number])]),warning:T.PropTypes.bool},t["default"]=o},/*!**************************************!*\ !*** ./src/modules/Rating/Rating.js ***! \**************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=r(/*! lodash/times */233),i=n(l),u=r(/*! lodash/invoke */224),p=n(u),c=r(/*! lodash/without */7),d=n(c),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},y=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}}(),m=r(/*! classnames */3),v=n(m),h=r(/*! react */1),T=n(h),P=r(/*! ../../lib */2),g={name:"Rating",type:P.META.TYPES.MODULE,props:{clearable:["auto"],icon:["star","heart"],size:(0,d["default"])(P.SUI.SIZES,"medium","big")}},b=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,i=Array(l),u=0;u<l;u++)i[u]=arguments[u];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),O.call(n),s=r,a(n,s)}return s(t,e),y(t,[{key:"render",value:function(){var e=this.props,r=e.className,n=e.disabled,o=e.icon,a=e.size,s=this.state,l=s.selectedIndex,i=s.isSelecting,u=(0,v["default"])("ui",a,o,n&&"disabled",i&&!n&&l>=0&&"selected","rating",r),p=(0,P.getUnhandledProps)(t,this.props),c=(0,P.getElementType)(t,this.props);return T["default"].createElement(c,f({},p,{className:u,onMouseLeave:this.handleMouseLeave}),this.renderIcons())}}]),t}(P.AutoControlledComponent);b.propTypes={as:P.customPropTypes.as,className:h.PropTypes.string,clearable:h.PropTypes.oneOfType([h.PropTypes.oneOf(g.props.clearable),h.PropTypes.bool]),icon:h.PropTypes.oneOf(g.props.icon),maxRating:h.PropTypes.oneOfType([h.PropTypes.string,h.PropTypes.number]),rating:h.PropTypes.oneOfType([h.PropTypes.string,h.PropTypes.number]),defaultRating:h.PropTypes.oneOfType([h.PropTypes.string,h.PropTypes.number]),size:h.PropTypes.oneOf(g.props.size),disabled:h.PropTypes.bool,onRate:h.PropTypes.func},b.defaultProps={clearable:"auto",maxRating:1},b._meta=g,b.autoControlledProps=["rating"];var O=function(){var e=this;this.handleMouseLeave=function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];p["default"].apply(void 0,[e.props,"onMouseLeave"].concat(r)),e.props.disabled||e.setState({selectedIndex:-1,isSelecting:!1})},this.handleIconMouseEnter=function(t){e.props.disabled||e.setState({selectedIndex:t,isSelecting:!0})},this.handleIconClick=function(t,r){var n=e.props,o=n.clearable,a=n.disabled,s=n.maxRating,l=n.onRate,i=e.state.rating;if(!a){var u=r+1;"auto"===o&&1===s?u=+!i:o===!0&&u===i&&(u=0),e.trySetState({rating:u},{isSelecting:!1}),l&&l(t,{rating:u,maxRating:s})}},this.renderIcons=function(){var t=e.props.maxRating,r=e.state,n=r.rating,o=r.selectedIndex,a=r.isSelecting;return(0,i["default"])(t,function(t){var r=(0,v["default"])(o>=t&&a&&"selected",n>=t+1&&"active","icon");return T["default"].createElement("i",{key:t,className:r,onClick:function(r){return e.handleIconClick(r,t)},onMouseEnter:function(){return e.handleIconMouseEnter(t)}})})}};t["default"]=b},/*!**************************************!*\ !*** ./src/modules/Search/Search.js ***! \**************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=r(/*! lodash/isEmpty */107),u=n(i),p=r(/*! lodash/partialRight */430),c=n(p),d=r(/*! lodash/inRange */420),f=n(d),y=r(/*! lodash/map */14),m=n(y),v=r(/*! lodash/get */37),h=n(v),T=r(/*! lodash/reduce */230),P=n(T),g=r(/*! lodash/isEqual */60),b=n(g),O=r(/*! lodash/without */7),_=n(O),E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},w=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}}(),j=function F(e,t,r){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,t);if(void 0===n){var o=Object.getPrototypeOf(e);return null===o?void 0:F(o,t,r)}if("value"in n)return n.value;var a=n.get;if(void 0!==a)return a.call(r)},S=r(/*! classnames */3),x=n(S),M=r(/*! react */1),A=n(M),N=r(/*! ../../lib */2),I=r(/*! ../../elements */4),k=r(/*! ./SearchCategory */164),C=n(k),K=r(/*! ./SearchResult */165),L=n(K),U=r(/*! ./SearchResults */166),D=n(U),R=(0,N.makeDebugger)("search"),z={name:"Search",type:N.META.TYPES.MODULE,props:{size:(0,_["default"])(N.SUI.SIZES,"medium")}},W=function(e){function t(){var e,r,n,l;a(this,t);for(var i=arguments.length,p=Array(i),d=0;d<i;d++)p[d]=arguments[d];return r=n=s(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(p))),n.handleChange=function(e,t){R("handleChange()"),R(t);var r=n.props.onChange;r&&r(e,t)},n.closeOnEscape=function(e){N.keyboardKey.getCode(e)===N.keyboardKey.Escape&&(e.preventDefault(),n.close())},n.moveSelectionOnKeyDown=function(e){switch(R("moveSelectionOnKeyDown()"),R(N.keyboardKey.getName(e)),N.keyboardKey.getCode(e)){case N.keyboardKey.ArrowDown:e.preventDefault(),n.moveSelectionBy(1);break;case N.keyboardKey.ArrowUp:e.preventDefault(),n.moveSelectionBy(-1)}},n.selectItemOnEnter=function(e){if(R("selectItemOnEnter()"),R(N.keyboardKey.getName(e)),N.keyboardKey.getCode(e)===N.keyboardKey.Enter){e.preventDefault();var t=n.getSelectedResult();t&&(n.setValue(t.title),n.handleChange(e,t),n.close())}},n.closeOnDocumentClick=function(e){R("closeOnDocumentClick()"),R(e),n.close()},n.handleMouseDown=function(e){R("handleMouseDown()");var t=n.props.onMouseDown;t&&t(e),n.isMouseDown=!0,document.addEventListener("mouseup",n.handleDocumentMouseUp)},n.handleDocumentMouseUp=function(){R("handleDocumentMouseUp()"),n.isMouseDown=!1,document.removeEventListener("mouseup",n.handleDocumentMouseUp)},n.handleInputClick=function(e){R("handleInputClick()",e),e.nativeEvent.stopImmediatePropagation(),n.tryOpen()},n.handleItemClick=function(e,t){R("handleItemClick()"),R(t);var r=n.getSelectedResult(t);e.nativeEvent.stopImmediatePropagation(),n.setValue(r.title),n.handleChange(e,r),n.close()},n.handleFocus=function(e){R("handleFocus()");var t=n.props.onFocus;t&&t(e),n.setState({focus:!0})},n.handleBlur=function(e){R("handleBlur()");var t=n.props.onBlur;t&&t(e),n.setState({focus:!1})},n.handleSearchChange=function(e){R("handleSearchChange()"),R(e.target.value),e.stopPropagation();var t=n.props,r=t.onSearchChange,o=t.minCharacters,a=n.state.open,s=e.target.value;r&&r(e,s),s.length<o?n.close():a||n.tryOpen(s),n.setValue(s)},n.getFlattenedResults=function(){var e=n.props,t=e.category,r=e.results;return t?(0,P["default"])(r,function(e,t){return e.concat(t.results)},[]):r},n.getSelectedResult=function(){var e=arguments.length<=0||void 0===arguments[0]?n.state.selectedIndex:arguments[0],t=n.getFlattenedResults();return(0,h["default"])(t,e)},n.setValue=function(e){R("setValue()"),R("value",e);var t=n.props.selectFirstResult;n.trySetState({value:e},{selectedIndex:t?0:-1})},n.moveSelectionBy=function(e){R("moveSelectionBy()"),R("offset: "+e);var t=n.state.selectedIndex,r=n.getFlattenedResults(),o=r.length-1,a=t+e;a>o?a=0:a<0&&(a=o),n.setState({selectedIndex:a}),n.scrollSelectedItemIntoView()},n.scrollSelectedItemIntoView=function(){R("scrollSelectedItemIntoView()");var e=document.querySelector(".ui.search.active.visible .results.visible"),t=e.querySelector(".result.active");R("menu (results): "+e),R("item (result): "+t);var r=t.offsetTop<e.scrollTop,n=t.offsetTop+t.clientHeight>e.scrollTop+e.clientHeight;(r||n)&&(e.scrollTop=t.offsetTop)},n.tryOpen=function(){var e=arguments.length<=0||void 0===arguments[0]?n.state.value:arguments[0];R("open()");var t=n.props.minCharacters;e.length<t||n.open()},n.open=function(){R("open()"),n.trySetState({open:!0})},n.close=function(){R("close()"),n.trySetState({open:!1})},n.renderSearchInput=function(){var e=n.props,t=e.icon,r=e.placeholder,o=n.state.value;return A["default"].createElement(I.Input,{value:o,placeholder:r,onBlur:n.handleBlur,onChange:n.handleSearchChange,onFocus:n.handleFocus,onClick:n.handleInputClick,input:{className:"prompt",tabIndex:"0",autoComplete:"off"},icon:t})},n.renderNoResults=function(){var e=n.props,t=e.noResultsMessage,r=e.noResultsDescription;return A["default"].createElement("div",{className:"message empty"},A["default"].createElement("div",{className:"header"},t),r&&A["default"].createElement("div",{className:"description"},r))},n.renderResult=function(e,t,r){var a=e.childKey,s=o(e,["childKey"]),l=arguments.length<=3||void 0===arguments[3]?0:arguments[3],i=n.props.resultRenderer,u=n.state.selectedIndex,p=t+l;return A["default"].createElement(L["default"],E({key:a||s.title,active:u===p,onClick:n.handleItemClick,onMouseDown:function(e){return e.preventDefault()},renderer:i},s,{id:p}))},n.renderResults=function(){var e=n.props.results;return(0,m["default"])(e,n.renderResult)},n.renderCategories=function(){var e=n.props,t=e.categoryRenderer,r=e.results,a=n.state.selectedIndex,s=0;return(0,m["default"])(r,function(e,r,l){var i=e.childKey,u=o(e,["childKey"]),p=E({key:i||u.name,active:(0,f["default"])(a,s,s+u.results.length),renderer:t},u),d=(0,c["default"])(n.renderResult,s);return s+=u.results.length,A["default"].createElement(C["default"],p,u.results.map(d))})},n.renderMenuContent=function(){var e=n.props,t=e.category,r=e.showNoResults,o=e.results;return(0,u["default"])(o)?r?n.renderNoResults():null:t?n.renderCategories():n.renderResults()},n.renderResultsMenu=function(){var e=n.state.open,t=e?"visible":"",r=n.renderMenuContent();if(r)return A["default"].createElement(D["default"],{className:t},r)},l=r,s(n,l)}return l(t,e),w(t,[{key:"componentWillMount",value:function(){j(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillMount",this)&&j(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillMount",this).call(this),R("componentWillMount()");var e=this.state,r=e.open,n=e.value;this.setValue(n),r&&this.open()}},{key:"shouldComponentUpdate",value:function(e,t){return!(0,b["default"])(e,this.props)||!(0,b["default"])(t,this.state)}},{key:"componentWillReceiveProps",value:function(e){j(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillReceiveProps",this).call(this,e),R("componentWillReceiveProps()"),R("changed props:",(0,N.objectDiff)(e,this.props)),(0,b["default"])(e.value,this.props.value)||(R("value changed, setting",e.value),this.setValue(e.value))}},{key:"componentDidUpdate",value:function(e,t){R("componentDidUpdate()"),R("to state:",(0,N.objectDiff)(t,this.state)),!t.focus&&this.state.focus?(R("search focused"),this.isMouseDown||(R("mouse is not down, opening"),this.tryOpen()),this.state.open&&(document.addEventListener("keydown",this.moveSelectionOnKeyDown),document.addEventListener("keydown",this.selectItemOnEnter))):t.focus&&!this.state.focus&&(R("search blurred"),this.isMouseDown||(R("mouse is not down, closing"),this.close()),document.removeEventListener("keydown",this.moveSelectionOnKeyDown),document.removeEventListener("keydown",this.selectItemOnEnter)),!t.open&&this.state.open?(R("search opened"),this.open(),document.addEventListener("keydown",this.closeOnEscape),document.addEventListener("keydown",this.moveSelectionOnKeyDown),document.addEventListener("keydown",this.selectItemOnEnter),document.addEventListener("click",this.closeOnDocumentClick)):t.open&&!this.state.open&&(R("search closed"),this.close(),document.removeEventListener("keydown",this.closeOnEscape),document.removeEventListener("keydown",this.moveSelectionOnKeyDown),document.removeEventListener("keydown",this.selectItemOnEnter),document.removeEventListener("click",this.closeOnDocumentClick))}},{key:"componentWillUnmount",value:function(){R("componentWillUnmount()"),document.removeEventListener("keydown",this.moveSelectionOnKeyDown),document.removeEventListener("keydown",this.selectItemOnEnter),document.removeEventListener("keydown",this.closeOnEscape),document.removeEventListener("click",this.closeOnDocumentClick)}},{key:"render",value:function(){R("render()"),R("props",this.props),R("state",this.state);var e=this.state,r=e.searchClasses,n=e.focus,o=e.open,a=this.props,s=a.aligned,l=a.category,i=a.className,u=a.fluid,p=a.loading,c=a.size,d=(0,x["default"])("ui",o&&"active visible",c,r,(0,N.useKeyOnly)(p,"loading"),(0,N.useValueAndKey)(s,"aligned"),(0,N.useKeyOnly)(l,"category"),(0,N.useKeyOnly)(n,"focus"),(0,N.useKeyOnly)(u,"fluid"),i,"search"),f=(0,N.getElementType)(t,this.props),y=(0,N.getUnhandledProps)(t,this.props);return A["default"].createElement(f,E({},y,{className:d,onBlur:this.handleBlur,onFocus:this.handleFocus,onChange:this.handleChange,onMouseDown:this.handleMouseDown}),this.renderSearchInput(),this.renderResultsMenu())}}]),t}(N.AutoControlledComponent);W.propTypes={as:N.customPropTypes.as,icon:M.PropTypes.oneOfType([M.PropTypes.element,M.PropTypes.string]),results:M.PropTypes.oneOfType([M.PropTypes.arrayOf(M.PropTypes.shape(L["default"].propTypes)),M.PropTypes.object]),open:M.PropTypes.bool,defaultOpen:M.PropTypes.bool,value:M.PropTypes.string,defaultValue:M.PropTypes.string,placeholder:M.PropTypes.string,minCharacters:M.PropTypes.number,noResultsMessage:M.PropTypes.string,noResultsDescription:M.PropTypes.string,selectFirstResult:M.PropTypes.bool,showNoResults:M.PropTypes.bool,categoryRenderer:M.PropTypes.func,resultRenderer:M.PropTypes.func,onBlur:M.PropTypes.func,onChange:M.PropTypes.func,onSearchChange:M.PropTypes.func,onFocus:M.PropTypes.func,onMouseDown:M.PropTypes.func,aligned:M.PropTypes.string,category:M.PropTypes.bool,className:M.PropTypes.string,fluid:M.PropTypes.bool,size:M.PropTypes.oneOf(z.props.size),loading:M.PropTypes.bool},W.defaultProps={icon:"search",minCharacters:1,noResultsMessage:"No results found.",showNoResults:!0},W.autoControlledProps=["open","value"],W._meta=z,W.Result=L["default"],W.Results=D["default"],W.Category=C["default"],t["default"]=W},/*!********************************!*\ !*** ./src/views/Feed/Feed.js ***! \********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e){var t=e.children,r=e.className,n=e.events,s=e.size,l=(0,d["default"])("ui",r,s,"feed"),i=(0,m.getUnhandledProps)(a,e),c=(0,m.getElementType)(a,e);if(t)return y["default"].createElement(c,p({},i,{className:l}),t);var f=(0,u["default"])(n,function(e){var t=e.childKey,r=e.date,n=e.meta,a=e.summary,s=o(e,["childKey","date","meta","summary"]),l=t||[r,n,a].join("-");return y["default"].createElement(b["default"],p({date:r,key:l,meta:n,summary:a},s))});return y["default"].createElement(c,p({},i,{className:l}),f)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(/*! lodash/without */7),l=n(s),i=r(/*! lodash/map */14),u=n(i),p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c=r(/*! classnames */3),d=n(c),f=r(/*! react */1),y=n(f),m=r(/*! ../../lib */2),v=r(/*! ./FeedContent */72),h=n(v),T=r(/*! ./FeedDate */41),P=n(T),g=r(/*! ./FeedEvent */170),b=n(g),O=r(/*! ./FeedExtra */73),_=n(O),E=r(/*! ./FeedLabel */74),w=n(E),j=r(/*! ./FeedLike */75),S=n(j),x=r(/*! ./FeedMeta */76),M=n(x),A=r(/*! ./FeedSummary */77),N=n(A),I=r(/*! ./FeedUser */78),k=n(I);a._meta={name:"Feed",type:m.META.TYPES.VIEW,props:{size:(0,l["default"])(m.SUI.SIZES,"mini","tiny","medium","big","huge","massive")}},a.propTypes={as:m.customPropTypes.as,children:m.customPropTypes.every([m.customPropTypes.disallow(["events"]),f.PropTypes.node]),className:f.PropTypes.string,events:m.customPropTypes.every([m.customPropTypes.disallow(["children"]),f.PropTypes.arrayOf(f.PropTypes.shape({childKey:f.PropTypes.childKey}))]),size:f.PropTypes.oneOf(a._meta.props.size)},a.Content=h["default"],a.Date=P["default"],a.Event=b["default"],a.Extra=_["default"],a.Label=w["default"],a.Like=S["default"],a.Meta=M["default"],a.Summary=N["default"],a.User=k["default"],t["default"]=a},/*!****************************!*\ !*** ./src/views/index.js ***! \****************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(/*! ./Card/Card */167);Object.defineProperty(t,"Card",{enumerable:!0,get:function(){return n(o)["default"]}});var a=r(/*! ./Card/CardContent */168);Object.defineProperty(t,"CardContent",{enumerable:!0,get:function(){return n(a)["default"]}});var s=r(/*! ./Card/CardDescription */69);Object.defineProperty(t,"CardDescription",{enumerable:!0,get:function(){return n(s)["default"]}});var l=r(/*! ./Card/CardGroup */169);Object.defineProperty(t,"CardGroup",{enumerable:!0,get:function(){return n(l)["default"]}});var i=r(/*! ./Card/CardHeader */70);Object.defineProperty(t,"CardHeader",{enumerable:!0,get:function(){return n(i)["default"]}});var u=r(/*! ./Card/CardMeta */71);Object.defineProperty(t,"CardMeta",{enumerable:!0,get:function(){return n(u)["default"]}});var p=r(/*! ./Feed/Feed */280);Object.defineProperty(t,"Feed",{enumerable:!0,get:function(){return n(p)["default"]}});var c=r(/*! ./Feed/FeedContent */72);Object.defineProperty(t,"FeedContent",{enumerable:!0,get:function(){return n(c)["default"]}});var d=r(/*! ./Feed/FeedDate */41);Object.defineProperty(t,"FeedDate",{enumerable:!0,get:function(){return n(d)["default"]}});var f=r(/*! ./Feed/FeedEvent */170);Object.defineProperty(t,"FeedEvent",{enumerable:!0,get:function(){return n(f)["default"]}});var y=r(/*! ./Feed/FeedExtra */73);Object.defineProperty(t,"FeedExtra",{enumerable:!0,get:function(){return n(y)["default"]}});var m=r(/*! ./Feed/FeedLabel */74);Object.defineProperty(t,"FeedLabel",{enumerable:!0,get:function(){return n(m)["default"]}});var v=r(/*! ./Feed/FeedLike */75);Object.defineProperty(t,"FeedLike",{enumerable:!0,get:function(){return n(v)["default"]}});var h=r(/*! ./Feed/FeedMeta */76);Object.defineProperty(t,"FeedMeta",{enumerable:!0,get:function(){return n(h)["default"]}});var T=r(/*! ./Feed/FeedSummary */77);Object.defineProperty(t,"FeedSummary",{enumerable:!0,get:function(){return n(T)["default"]}});var P=r(/*! ./Feed/FeedUser */78);Object.defineProperty(t,"FeedUser",{enumerable:!0,get:function(){return n(P)["default"]}});var g=r(/*! ./Item/Item */171);Object.defineProperty(t,"Item",{enumerable:!0,get:function(){return n(g)["default"]}});var b=r(/*! ./Item/ItemContent */172);Object.defineProperty(t,"ItemContent",{enumerable:!0,get:function(){return n(b)["default"]}});var O=r(/*! ./Item/ItemDescription */79);Object.defineProperty(t,"ItemDescription",{enumerable:!0,get:function(){return n(O)["default"]}});var _=r(/*! ./Item/ItemExtra */80);Object.defineProperty(t,"ItemExtra",{enumerable:!0,get:function(){return n(_)["default"]}});var E=r(/*! ./Item/ItemGroup */173);Object.defineProperty(t,"ItemGroup",{enumerable:!0,get:function(){return n(E)["default"]}});var w=r(/*! ./Item/ItemHeader */81);Object.defineProperty(t,"ItemHeader",{enumerable:!0,get:function(){return n(w)["default"]}});var j=r(/*! ./Item/ItemImage */174);Object.defineProperty(t,"ItemImage",{enumerable:!0,get:function(){return n(j)["default"]}});var S=r(/*! ./Item/ItemMeta */82);Object.defineProperty(t,"ItemMeta",{enumerable:!0,get:function(){return n(S)["default"]}});var x=r(/*! ./Statistic/Statistic */175);Object.defineProperty(t,"Statistic",{enumerable:!0,get:function(){return n(x)["default"]}});var M=r(/*! ./Statistic/StatisticGroup */176);Object.defineProperty(t,"StatisticGroup",{enumerable:!0,get:function(){return n(M)["default"]}});var A=r(/*! ./Statistic/StatisticLabel */177);Object.defineProperty(t,"StatisticLabel",{enumerable:!0,get:function(){return n(A)["default"]}});var N=r(/*! ./Statistic/StatisticValue */178);Object.defineProperty(t,"StatisticValue",{enumerable:!0,get:function(){return n(N)["default"]}})},/*!****************************!*\ !*** ./~/debug/browser.js ***! \****************************/ function(e,t,r){function n(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function o(){var e=arguments,r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),!r)return e;var n="color: "+this.color;e=[e[0],n,"color: inherit"].concat(Array.prototype.slice.call(e,1));var o=0,a=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(a=o))}),e.splice(a,0,n),e}function a(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(r){}}function l(){var e;try{e=t.storage.debug}catch(r){}return e}function i(){try{return window.localStorage}catch(e){}}t=e.exports=r(/*! ./debug */283),t.log=a,t.formatArgs=o,t.save=s,t.load=l,t.useColors=n,t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:i(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){return JSON.stringify(e)},t.enable(l())},/*!**************************!*\ !*** ./~/debug/debug.js ***! \**************************/ function(e,t,r){function n(){return t.colors[p++%t.colors.length]}function o(e){function r(){}function o(){var e=o,r=+new Date,a=r-(u||r);e.diff=a,e.prev=u,e.curr=r,u=r,null==e.useColors&&(e.useColors=t.useColors()),null==e.color&&e.useColors&&(e.color=n());var s=Array.prototype.slice.call(arguments);s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var l=0;s[0]=s[0].replace(/%([a-z%])/g,function(r,n){if("%%"===r)return r;l++;var o=t.formatters[n];if("function"==typeof o){var a=s[l];r=o.call(e,a),s.splice(l,1),l--}return r}),"function"==typeof t.formatArgs&&(s=t.formatArgs.apply(e,s));var i=o.log||t.log||console.log.bind(console);i.apply(e,s)}r.enabled=!1,o.enabled=!0;var a=t.enabled(e)?o:r;return a.namespace=e,a}function a(e){t.save(e);for(var r=(e||"").split(/[\s,]+/),n=r.length,o=0;o<n;o++)r[o]&&(e=r[o].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))}function s(){t.enable("")}function l(e){var r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1}function i(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=o,t.coerce=i,t.disable=s,t.enable=a,t.enabled=l,t.humanize=r(/*! ms */442),t.names=[],t.skips=[],t.formatters={};var u,p=0},/*!*******************************!*\ !*** ./~/lodash/_DataView.js ***! \*******************************/ function(e,t,r){var n=r(/*! ./_getNative */22),o=r(/*! ./_root */9),a=n(o,"DataView");e.exports=a},/*!***************************!*\ !*** ./~/lodash/_Hash.js ***! \***************************/ function(e,t,r){function n(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var o=r(/*! ./_hashClear */352),a=r(/*! ./_hashDelete */353),s=r(/*! ./_hashGet */354),l=r(/*! ./_hashHas */355),i=r(/*! ./_hashSet */356);n.prototype.clear=o,n.prototype["delete"]=a,n.prototype.get=s,n.prototype.has=l,n.prototype.set=i,e.exports=n},/*!******************************!*\ !*** ./~/lodash/_Promise.js ***! \******************************/ function(e,t,r){var n=r(/*! ./_getNative */22),o=r(/*! ./_root */9),a=n(o,"Promise");e.exports=a},/*!**********************************!*\ !*** ./~/lodash/_addMapEntry.js ***! \**********************************/ function(e,t){function r(e,t){return e.set(t[0],t[1]),e}e.exports=r},/*!**********************************!*\ !*** ./~/lodash/_addSetEntry.js ***! \**********************************/ function(e,t){function r(e,t){return e.add(t),e}e.exports=r},/*!*********************************!*\ !*** ./~/lodash/_arrayEvery.js ***! \*********************************/ function(e,t){function r(e,t){for(var r=-1,n=e?e.length:0;++r<n;)if(!t(e[r],r,e))return!1;return!0}e.exports=r},/*!**********************************!*\ !*** ./~/lodash/_arrayFilter.js ***! \**********************************/ function(e,t){function r(e,t){for(var r=-1,n=e?e.length:0,o=0,a=[];++r<n;){var s=e[r];t(s,r,e)&&(a[o++]=s)}return a}e.exports=r},/*!***********************************!*\ !*** ./~/lodash/_asciiToArray.js ***! \***********************************/ function(e,t){function r(e){return e.split("")}e.exports=r},/*!*********************************!*\ !*** ./~/lodash/_asciiWords.js ***! \*********************************/ function(e,t){function r(e){return e.match(n)||[]}var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=r},/*!********************************!*\ !*** ./~/lodash/_baseEvery.js ***! \********************************/ function(e,t,r){function n(e,t){var r=!0;return o(e,function(e,n,o){return r=!!t(e,n,o)}),r}var o=r(/*! ./_baseEach */25);e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_baseFilter.js ***! \*********************************/ function(e,t,r){function n(e,t){var r=[];return o(e,function(e,n,o){t(e,n,o)&&r.push(e)}),r}var o=r(/*! ./_baseEach */25);e.exports=n},/*!******************************!*\ !*** ./~/lodash/_baseFor.js ***! \******************************/ function(e,t,r){var n=r(/*! ./_createBaseFor */331),o=n();e.exports=o},/*!*********************************!*\ !*** ./~/lodash/_baseGetTag.js ***! \*********************************/ function(e,t){function r(e){return o.call(e)}var n=Object.prototype,o=n.toString;e.exports=r},/*!******************************!*\ !*** ./~/lodash/_baseHas.js ***! \******************************/ function(e,t){function r(e,t){return null!=e&&o.call(e,t)}var n=Object.prototype,o=n.hasOwnProperty;e.exports=r},/*!********************************!*\ !*** ./~/lodash/_baseHasIn.js ***! \********************************/ function(e,t){function r(e,t){return null!=e&&t in Object(e)}e.exports=r},/*!**********************************!*\ !*** ./~/lodash/_baseInRange.js ***! \**********************************/ function(e,t){function r(e,t,r){return e>=o(t,r)&&e<n(t,r)}var n=Math.max,o=Math.min;e.exports=r},/*!***************************************!*\ !*** ./~/lodash/_baseIntersection.js ***! \***************************************/ function(e,t,r){function n(e,t,r){for(var n=r?s:a,c=e[0].length,d=e.length,f=d,y=Array(d),m=1/0,v=[];f--;){var h=e[f];f&&t&&(h=l(h,i(t))),m=p(h.length,m),y[f]=!r&&(t||c>=120&&h.length>=120)?new o(f&&h):void 0}h=e[0];var T=-1,P=y[0];e:for(;++T<c&&v.length<m;){var g=h[T],b=t?t(g):g;if(g=r||0!==g?g:0,!(P?u(P,b):n(v,b,r))){for(f=d;--f;){var O=y[f];if(!(O?u(O,b):n(e[f],b,r)))continue e}P&&P.push(b),v.push(g)}}return v}var o=r(/*! ./_SetCache */43),a=r(/*! ./_arrayIncludes */45),s=r(/*! ./_arrayIncludesWith */88),l=r(/*! ./_arrayMap */18),i=r(/*! ./_baseUnary */94),u=r(/*! ./_cacheHas */95),p=Math.min;e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_baseInvoke.js ***! \*********************************/ function(e,t,r){function n(e,t,r){s(t,e)||(t=a(t),e=i(e,t),t=l(t));var n=null==e?e:e[u(t)];return null==n?void 0:o(n,e,r)}var o=r(/*! ./_apply */30),a=r(/*! ./_castPath */96),s=r(/*! ./_isKey */34),l=r(/*! ./last */426),i=r(/*! ./_parent */377),u=r(/*! ./_toKey */19);e.exports=n},/*!**************************************!*\ !*** ./~/lodash/_baseIsEqualDeep.js ***! \**************************************/ function(e,t,r){function n(e,t,r,n,v,T){var P=u(e),g=u(t),b=y,O=y;P||(b=i(e),b=b==f?m:b),g||(O=i(t),O=O==f?m:O);var _=b==m&&!p(e),E=O==m&&!p(t),w=b==O;if(w&&!_)return T||(T=new o),P||c(e)?a(e,t,r,n,v,T):s(e,t,b,r,n,v,T);if(!(v&d)){var j=_&&h.call(e,"__wrapped__"),S=E&&h.call(t,"__wrapped__");if(j||S){var x=j?e.value():e,M=S?t.value():t;return T||(T=new o),r(x,M,n,v,T)}}return!!w&&(T||(T=new o),l(e,t,r,n,v,T))}var o=r(/*! ./_Stack */87),a=r(/*! ./_equalArrays */203),s=r(/*! ./_equalByTag */343),l=r(/*! ./_equalObjects */344),i=r(/*! ./_getTag */100),u=r(/*! ./isArray */5),p=r(/*! ./_isHostObject */54),c=r(/*! ./isTypedArray */228),d=2,f="[object Arguments]",y="[object Array]",m="[object Object]",v=Object.prototype,h=v.hasOwnProperty;e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_baseIsMatch.js ***! \**********************************/ function(e,t,r){function n(e,t,r,n){var i=r.length,u=i,p=!n;if(null==e)return!u;for(e=Object(e);i--;){var c=r[i];if(p&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<u;){c=r[i];var d=c[0],f=e[d],y=c[1];if(p&&c[2]){if(void 0===f&&!(d in e))return!1}else{var m=new o;if(n)var v=n(f,y,d,e,t,m);if(!(void 0===v?a(y,f,n,s|l,m):v))return!1}}return!0}var o=r(/*! ./_Stack */87),a=r(/*! ./_baseIsEqual */91),s=1,l=2;e.exports=n},/*!********************************!*\ !*** ./~/lodash/_baseIsNaN.js ***! \********************************/ function(e,t){function r(e){return e!==e}e.exports=r},/*!***********************************!*\ !*** ./~/lodash/_baseIsNative.js ***! \***********************************/ function(e,t,r){function n(e){if(!l(e)||s(e))return!1;var t=o(e)||a(e)?m:p;return t.test(i(e))}var o=r(/*! ./isFunction */23),a=r(/*! ./_isHostObject */54),s=r(/*! ./_isMasked */363),l=r(/*! ./isObject */11),i=r(/*! ./_toSource */218),u=/[\\^$.*+?()[\]{}|]/g,p=/^\[object .+?Constructor\]$/,c=Function.prototype,d=Object.prototype,f=c.toString,y=d.hasOwnProperty,m=RegExp("^"+f.call(y).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=n},/*!***************************************!*\ !*** ./~/lodash/_baseIsTypedArray.js ***! \***************************************/ function(e,t,r){function n(e){return a(e)&&o(e.length)&&!!A[I.call(e)]}var o=r(/*! ./isLength */108),a=r(/*! ./isObjectLike */20),s="[object Arguments]",l="[object Array]",i="[object Boolean]",u="[object Date]",p="[object Error]",c="[object Function]",d="[object Map]",f="[object Number]",y="[object Object]",m="[object RegExp]",v="[object Set]",h="[object String]",T="[object WeakMap]",P="[object ArrayBuffer]",g="[object DataView]",b="[object Float32Array]",O="[object Float64Array]",_="[object Int8Array]",E="[object Int16Array]",w="[object Int32Array]",j="[object Uint8Array]",S="[object Uint8ClampedArray]",x="[object Uint16Array]",M="[object Uint32Array]",A={};A[b]=A[O]=A[_]=A[E]=A[w]=A[j]=A[S]=A[x]=A[M]=!0,A[s]=A[l]=A[P]=A[i]=A[g]=A[u]=A[p]=A[c]=A[d]=A[f]=A[y]=A[m]=A[v]=A[h]=A[T]=!1;var N=Object.prototype,I=N.toString;e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_baseKeysIn.js ***! \*********************************/ function(e,t,r){function n(e){if(!o(e))return s(e);var t=a(e),r=[];for(var n in e)("constructor"!=n||!t&&i.call(e,n))&&r.push(n);return r}var o=r(/*! ./isObject */11),a=r(/*! ./_isPrototype */56),s=r(/*! ./_nativeKeysIn */375),l=Object.prototype,i=l.hasOwnProperty;e.exports=n},/*!******************************!*\ !*** ./~/lodash/_baseMap.js ***! \******************************/ function(e,t,r){function n(e,t){var r=-1,n=a(e)?Array(e.length):[];return o(e,function(e,o,a){n[++r]=t(e,o,a)}),n}var o=r(/*! ./_baseEach */25),a=r(/*! ./isArrayLike */16);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_baseMatches.js ***! \**********************************/ function(e,t,r){function n(e){var t=a(e);return 1==t.length&&t[0][2]?s(t[0][0],t[0][1]):function(r){return r===e||o(r,e,t)}}var o=r(/*! ./_baseIsMatch */303),a=r(/*! ./_getMatchData */347),s=r(/*! ./_matchesStrictComparable */212);e.exports=n},/*!******************************************!*\ !*** ./~/lodash/_baseMatchesProperty.js ***! \******************************************/ function(e,t,r){function n(e,t){return l(e)&&i(t)?u(p(e),t):function(r){var n=a(r,e);return void 0===n&&n===t?s(r,e):o(t,n,void 0,c|d)}}var o=r(/*! ./_baseIsEqual */91),a=r(/*! ./get */37),s=r(/*! ./hasIn */419),l=r(/*! ./_isKey */34),i=r(/*! ./_isStrictComparable */210),u=r(/*! ./_matchesStrictComparable */212),p=r(/*! ./_toKey */19),c=1,d=2;e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_basePickBy.js ***! \*********************************/ function(e,t){function r(e,t,r){for(var n=-1,o=t.length,a={};++n<o;){var s=t[n],l=e[s];r(l,s)&&(a[s]=l)}return a}e.exports=r},/*!***********************************!*\ !*** ./~/lodash/_baseProperty.js ***! \***********************************/ function(e,t){function r(e){return function(t){return null==t?void 0:t[e]}}e.exports=r},/*!***************************************!*\ !*** ./~/lodash/_basePropertyDeep.js ***! \***************************************/ function(e,t,r){function n(e){return function(t){return o(t,e)}}var o=r(/*! ./_baseGet */90);e.exports=n},/*!*************************************!*\ !*** ./~/lodash/_basePropertyOf.js ***! \*************************************/ function(e,t){function r(e){return function(t){return null==e?void 0:e[t]}}e.exports=r},/*!*********************************!*\ !*** ./~/lodash/_baseReduce.js ***! \*********************************/ function(e,t){function r(e,t,r,n,o){return o(e,function(e,o,a){r=n?(n=!1,e):t(r,e,o,a)}),r}e.exports=r},/*!*******************************!*\ !*** ./~/lodash/_baseSome.js ***! \*******************************/ function(e,t,r){function n(e,t){var r;return o(e,function(e,n,o){return r=t(e,n,o),!r}),!!r}var o=r(/*! ./_baseEach */25);e.exports=n},/*!*******************************!*\ !*** ./~/lodash/_baseUniq.js ***! \*******************************/ function(e,t,r){function n(e,t,r){var n=-1,c=a,d=e.length,f=!0,y=[],m=y;if(r)f=!1,c=s;else if(d>=p){var v=t?null:i(e);if(v)return u(v);f=!1,c=l,m=new o}else m=t?[]:y;e:for(;++n<d;){var h=e[n],T=t?t(h):h;if(h=r||0!==h?h:0,f&&T===T){for(var P=m.length;P--;)if(m[P]===T)continue e;t&&m.push(T),y.push(h)}else c(m,T,r)||(m!==y&&m.push(T),y.push(h))}return y}var o=r(/*! ./_SetCache */43),a=r(/*! ./_arrayIncludes */45),s=r(/*! ./_arrayIncludesWith */88),l=r(/*! ./_cacheHas */95),i=r(/*! ./_createSet */340),u=r(/*! ./_setToArray */58),p=200;e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_baseValues.js ***! \*********************************/ function(e,t,r){function n(e,t){return o(t,function(t){return e[t]})}var o=r(/*! ./_arrayMap */18);e.exports=n},/*!******************************************!*\ !*** ./~/lodash/_castArrayLikeObject.js ***! \******************************************/ function(e,t,r){function n(e){return o(e)?e:[]}var o=r(/*! ./isArrayLikeObject */38);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_cloneBuffer.js ***! \**********************************/ function(e,t){function r(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}e.exports=r},/*!************************************!*\ !*** ./~/lodash/_cloneDataView.js ***! \************************************/ function(e,t,r){function n(e,t){var r=t?o(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var o=r(/*! ./_cloneArrayBuffer */97);e.exports=n},/*!*******************************!*\ !*** ./~/lodash/_cloneMap.js ***! \*******************************/ function(e,t,r){function n(e,t,r){var n=t?r(s(e),!0):s(e);return a(n,o,new e.constructor)}var o=r(/*! ./_addMapEntry */287),a=r(/*! ./_arrayReduce */47),s=r(/*! ./_mapToArray */211);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_cloneRegExp.js ***! \**********************************/ function(e,t){function r(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}var n=/\w*$/;e.exports=r},/*!*******************************!*\ !*** ./~/lodash/_cloneSet.js ***! \*******************************/ function(e,t,r){function n(e,t,r){var n=t?r(s(e),!0):s(e);return a(n,o,new e.constructor)}var o=r(/*! ./_addSetEntry */288),a=r(/*! ./_arrayReduce */47),s=r(/*! ./_setToArray */58);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_cloneSymbol.js ***! \**********************************/ function(e,t,r){function n(e){return s?Object(s.call(e)):{}}var o=r(/*! ./_Symbol */44),a=o?o.prototype:void 0,s=a?a.valueOf:void 0;e.exports=n},/*!**************************************!*\ !*** ./~/lodash/_cloneTypedArray.js ***! \**************************************/ function(e,t,r){function n(e,t){var r=t?o(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var o=r(/*! ./_cloneArrayBuffer */97);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_copySymbols.js ***! \**********************************/ function(e,t,r){function n(e,t){return o(e,a(e),t)}var o=r(/*! ./_copyObject */200),a=r(/*! ./_getSymbols */99);e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_coreJsData.js ***! \*********************************/ function(e,t,r){var n=r(/*! ./_root */9),o=n["__core-js_shared__"];e.exports=o},/*!***********************************!*\ !*** ./~/lodash/_countHolders.js ***! \***********************************/ function(e,t){function r(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&n++;return n}e.exports=r},/*!*************************************!*\ !*** ./~/lodash/_createBaseEach.js ***! \*************************************/ function(e,t,r){function n(e,t){return function(r,n){if(null==r)return r;if(!o(r))return e(r,n);for(var a=r.length,s=t?a:-1,l=Object(r);(t?s--:++s<a)&&n(l[s],s,l)!==!1;);return r}}var o=r(/*! ./isArrayLike */16);e.exports=n},/*!************************************!*\ !*** ./~/lodash/_createBaseFor.js ***! \************************************/ function(e,t){function r(e){return function(t,r,n){for(var o=-1,a=Object(t),s=n(t),l=s.length;l--;){var i=s[e?l:++o];if(r(a[i],i,a)===!1)break}return t}}e.exports=r},/*!*********************************!*\ !*** ./~/lodash/_createBind.js ***! \*********************************/ function(e,t,r){function n(e,t,r){function n(){var t=this&&this!==a&&this instanceof n?i:e;return t.apply(l?r:this,arguments)}var l=t&s,i=o(e);return n}var o=r(/*! ./_createCtor */50),a=r(/*! ./_root */9),s=1;e.exports=n},/*!**************************************!*\ !*** ./~/lodash/_createCaseFirst.js ***! \**************************************/ function(e,t,r){function n(e){return function(t){t=l(t);var r=a(t)?s(t):void 0,n=r?r[0]:t.charAt(0),i=r?o(r,1).join(""):t.slice(1);return n[e]()+i}}var o=r(/*! ./_castSlice */197),a=r(/*! ./_hasUnicode */207),s=r(/*! ./_stringToArray */387),l=r(/*! ./toString */24);e.exports=n},/*!***************************************!*\ !*** ./~/lodash/_createCompounder.js ***! \***************************************/ function(e,t,r){function n(e){return function(t){return o(s(a(t).replace(i,"")),e,"")}}var o=r(/*! ./_arrayReduce */47),a=r(/*! ./deburr */396),s=r(/*! ./words */440),l="['’]",i=RegExp(l,"g");e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_createCurry.js ***! \**********************************/ function(e,t,r){function n(e,t,r){function n(){for(var a=arguments.length,d=Array(a),f=a,y=i(n);f--;)d[f]=arguments[f];var m=a<3&&d[0]!==y&&d[a-1]!==y?[]:u(d,y);if(a-=m.length,a<r)return l(e,t,s,n.placeholder,void 0,d,m,void 0,void 0,r-a);var v=this&&this!==p&&this instanceof n?c:e;return o(v,this,d)}var c=a(e);return n}var o=r(/*! ./_apply */30),a=r(/*! ./_createCtor */50),s=r(/*! ./_createHybrid */201),l=r(/*! ./_createRecurry */202),i=r(/*! ./_getHolder */51),u=r(/*! ./_replaceHolders */35),p=r(/*! ./_root */9);e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_createFind.js ***! \*********************************/ function(e,t,r){function n(e){return function(t,r,n){var l=Object(t);if(!a(t)){var i=o(r,3);t=s(t),r=function(e){return i(l[e],e,l)}}var u=e(t,r,n);return u>-1?l[i?t[u]:u]:void 0}}var o=r(/*! ./_baseIteratee */13),a=r(/*! ./isArrayLike */16),s=r(/*! ./keys */10);e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_createFlow.js ***! \*********************************/ function(e,t,r){function n(e){return s(function(t){t=a(t,1);var r=t.length,n=r,s=o.prototype.thru;for(e&&t.reverse();n--;){var h=t[n];if("function"!=typeof h)throw new TypeError(d);if(s&&!T&&"wrapper"==i(h))var T=new o([],(!0))}for(n=T?n:r;++n<r;){h=t[n];var P=i(h),g="wrapper"==P?l(h):void 0;T=g&&p(g[0])&&g[1]==(m|f|y|v)&&!g[4].length&&1==g[9]?T[i(g[0])].apply(T,g[3]):1==h.length&&p(h)?T[P]():T.thru(h)}return function(){var e=arguments,n=e[0];if(T&&1==e.length&&u(n)&&n.length>=c)return T.plant(n).value();for(var o=0,a=r?t[o].apply(this,e):n;++o<r;)a=t[o].call(this,a);return a}})}var o=r(/*! ./_LodashWrapper */84),a=r(/*! ./_baseFlatten */26),s=r(/*! ./_baseRest */12),l=r(/*! ./_getData */98),i=r(/*! ./_getFuncName */205),u=r(/*! ./isArray */5),p=r(/*! ./_isLaziable */209),c=200,d="Expected a function",f=8,y=32,m=128,v=256;e.exports=n},/*!************************************!*\ !*** ./~/lodash/_createPartial.js ***! \************************************/ function(e,t,r){function n(e,t,r,n){function i(){for(var t=-1,a=arguments.length,l=-1,c=n.length,d=Array(c+a),f=this&&this!==s&&this instanceof i?p:e;++l<c;)d[l]=n[l];for(;a--;)d[l++]=arguments[++t];return o(f,u?r:this,d)}var u=t&l,p=a(e);return i}var o=r(/*! ./_apply */30),a=r(/*! ./_createCtor */50),s=r(/*! ./_root */9),l=1;e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_createRound.js ***! \**********************************/ function(e,t,r){function n(e){var t=Math[e];return function(e,r){if(e=a(e),r=l(o(r),292)){var n=(s(e)+"e").split("e"),i=t(n[0]+"e"+(+n[1]+r));return n=(s(i)+"e").split("e"),+(n[0]+"e"+(+n[1]-r))}return t(e)}}var o=r(/*! ./toInteger */17),a=r(/*! ./toNumber */62),s=r(/*! ./toString */24),l=Math.min;e.exports=n},/*!********************************!*\ !*** ./~/lodash/_createSet.js ***! \********************************/ function(e,t,r){var n=r(/*! ./_Set */179),o=r(/*! ./noop */229),a=r(/*! ./_setToArray */58),s=1/0,l=n&&1/a(new n([,-0]))[1]==s?function(e){return new n(e)}:o;e.exports=l},/*!***********************************!*\ !*** ./~/lodash/_deburrLetter.js ***! \***********************************/ function(e,t,r){var n=r(/*! ./_basePropertyOf */314),o={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"},a=n(o);e.exports=a},/*!*************************************!*\ !*** ./~/lodash/_defineProperty.js ***! \*************************************/ function(e,t,r){var n=r(/*! ./_getNative */22),o=function(){var e=n(Object,"defineProperty"),t=n.name;return t&&t.length>2?e:void 0}();e.exports=o},/*!*********************************!*\ !*** ./~/lodash/_equalByTag.js ***! \*********************************/ function(e,t,r){function n(e,t,r,n,o,_,w){switch(r){case O:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case b:return!(e.byteLength!=t.byteLength||!n(new a(e),new a(t)));case d:case f:case v:return s(+e,+t);case y:return e.name==t.name&&e.message==t.message;case h:case P:return e==t+"";case m:var j=i;case T:var S=_&c;if(j||(j=u),e.size!=t.size&&!S)return!1;var x=w.get(e);if(x)return x==t;_|=p,w.set(e,t);var M=l(j(e),j(t),n,o,_,w);return w["delete"](e),M;case g:if(E)return E.call(e)==E.call(t)}return!1}var o=r(/*! ./_Symbol */44),a=r(/*! ./_Uint8Array */180),s=r(/*! ./eq */36),l=r(/*! ./_equalArrays */203),i=r(/*! ./_mapToArray */211),u=r(/*! ./_setToArray */58),p=1,c=2,d="[object Boolean]",f="[object Date]",y="[object Error]",m="[object Map]",v="[object Number]",h="[object RegExp]",T="[object Set]",P="[object String]",g="[object Symbol]",b="[object ArrayBuffer]",O="[object DataView]",_=o?o.prototype:void 0,E=_?_.valueOf:void 0;e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_equalObjects.js ***! \***********************************/ function(e,t,r){function n(e,t,r,n,s,i){var u=s&a,p=o(e),c=p.length,d=o(t),f=d.length;if(c!=f&&!u)return!1;for(var y=c;y--;){var m=p[y];if(!(u?m in t:l.call(t,m)))return!1}var v=i.get(e);if(v&&i.get(t))return v==t;var h=!0;i.set(e,t),i.set(t,e);for(var T=u;++y<c;){m=p[y];var P=e[m],g=t[m];if(n)var b=u?n(g,P,m,t,e,i):n(P,g,m,e,t,i);if(!(void 0===b?P===g||r(P,g,n,s,i):b)){h=!1;break}T||(T="constructor"==m)}if(h&&!T){var O=e.constructor,_=t.constructor;O!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof O&&O instanceof O&&"function"==typeof _&&_ instanceof _)&&(h=!1)}return i["delete"](e),i["delete"](t),h}var o=r(/*! ./keys */10),a=2,s=Object.prototype,l=s.hasOwnProperty;e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_getAllKeys.js ***! \*********************************/ function(e,t,r){function n(e){return o(e,s,a)}var o=r(/*! ./_baseGetAllKeys */190),a=r(/*! ./_getSymbols */99),s=r(/*! ./keys */10);e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_getAllKeysIn.js ***! \***********************************/ function(e,t,r){function n(e){return o(e,s,a)}var o=r(/*! ./_baseGetAllKeys */190),a=r(/*! ./_getSymbolsIn */348),s=r(/*! ./keysIn */425);e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_getMatchData.js ***! \***********************************/ function(e,t,r){function n(e){for(var t=a(e),r=t.length;r--;){var n=t[r],s=e[n];t[r]=[n,s,o(s)]}return t}var o=r(/*! ./_isStrictComparable */210),a=r(/*! ./keys */10);e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_getSymbolsIn.js ***! \***********************************/ function(e,t,r){var n=r(/*! ./_arrayPush */46),o=r(/*! ./_getPrototype */53),a=r(/*! ./_getSymbols */99),s=r(/*! ./stubArray */232),l=Object.getOwnPropertySymbols,i=l?function(e){for(var t=[];e;)n(t,a(e)),e=o(e);return t}:s;e.exports=i},/*!*******************************!*\ !*** ./~/lodash/_getValue.js ***! \*******************************/ function(e,t){function r(e,t){return null==e?void 0:e[t]}e.exports=r},/*!*************************************!*\ !*** ./~/lodash/_getWrapDetails.js ***! \*************************************/ function(e,t){function r(e){var t=e.match(n);return t?t[1].split(o):[]}var n=/\{\n\/\* \[wrapped with (.+)\] \*/,o=/,? & /;e.exports=r},/*!*************************************!*\ !*** ./~/lodash/_hasUnicodeWord.js ***! \*************************************/ function(e,t){function r(e){return n.test(e)}var n=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=r},/*!********************************!*\ !*** ./~/lodash/_hashClear.js ***! \********************************/ function(e,t,r){function n(){this.__data__=o?o(null):{}}var o=r(/*! ./_nativeCreate */57);e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_hashDelete.js ***! \*********************************/ function(e,t){function r(e){return this.has(e)&&delete this.__data__[e]}e.exports=r},/*!******************************!*\ !*** ./~/lodash/_hashGet.js ***! \******************************/ function(e,t,r){function n(e){var t=this.__data__;if(o){var r=t[e];return r===a?void 0:r}return l.call(t,e)?t[e]:void 0}var o=r(/*! ./_nativeCreate */57),a="__lodash_hash_undefined__",s=Object.prototype,l=s.hasOwnProperty;e.exports=n},/*!******************************!*\ !*** ./~/lodash/_hashHas.js ***! \******************************/ function(e,t,r){function n(e){var t=this.__data__;return o?void 0!==t[e]:s.call(t,e)}var o=r(/*! ./_nativeCreate */57),a=Object.prototype,s=a.hasOwnProperty;e.exports=n},/*!******************************!*\ !*** ./~/lodash/_hashSet.js ***! \******************************/ function(e,t,r){function n(e,t){var r=this.__data__;return r[e]=o&&void 0===t?a:t,this}var o=r(/*! ./_nativeCreate */57),a="__lodash_hash_undefined__";e.exports=n},/*!*************************************!*\ !*** ./~/lodash/_initCloneArray.js ***! \*************************************/ function(e,t){function r(e){var t=e.length,r=e.constructor(t);return t&&"string"==typeof e[0]&&o.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var n=Object.prototype,o=n.hasOwnProperty;e.exports=r},/*!*************************************!*\ !*** ./~/lodash/_initCloneByTag.js ***! \*************************************/ function(e,t,r){function n(e,t,r,n){var A=e.constructor;switch(t){case P:return o(e);case c:case d:return new A((+e));case g:return a(e,n);case b:case O:case _:case E:case w:case j:case S:case x:case M:return p(e,n);case f:return s(e,n,r);case y:case h:return new A(e);case m:return l(e);case v:return i(e,n,r);case T:return u(e)}}var o=r(/*! ./_cloneArrayBuffer */97),a=r(/*! ./_cloneDataView */321),s=r(/*! ./_cloneMap */322),l=r(/*! ./_cloneRegExp */323),i=r(/*! ./_cloneSet */324),u=r(/*! ./_cloneSymbol */325),p=r(/*! ./_cloneTypedArray */326),c="[object Boolean]",d="[object Date]",f="[object Map]",y="[object Number]",m="[object RegExp]",v="[object Set]",h="[object String]",T="[object Symbol]",P="[object ArrayBuffer]",g="[object DataView]",b="[object Float32Array]",O="[object Float64Array]",_="[object Int8Array]",E="[object Int16Array]",w="[object Int32Array]",j="[object Uint8Array]",S="[object Uint8ClampedArray]",x="[object Uint16Array]",M="[object Uint32Array]";e.exports=n},/*!**************************************!*\ !*** ./~/lodash/_initCloneObject.js ***! \**************************************/ function(e,t,r){function n(e){return"function"!=typeof e.constructor||s(e)?{}:o(a(e))}var o=r(/*! ./_baseCreate */32),a=r(/*! ./_getPrototype */53),s=r(/*! ./_isPrototype */56);e.exports=n},/*!****************************************!*\ !*** ./~/lodash/_insertWrapDetails.js ***! \****************************************/ function(e,t){function r(e,t){var r=t.length,o=r-1;return t[o]=(r>1?"& ":"")+t[o],t=t.join(r>2?", ":" "),e.replace(n,"{\n/* [wrapped with "+t+"] */\n")}var n=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;e.exports=r},/*!************************************!*\ !*** ./~/lodash/_isFlattenable.js ***! \************************************/ function(e,t,r){function n(e){return s(e)||a(e)||!!(l&&e&&e[l])}var o=r(/*! ./_Symbol */44),a=r(/*! ./isArguments */59),s=r(/*! ./isArray */5),l=o?o.isConcatSpreadable:void 0;e.exports=n},/*!********************************!*\ !*** ./~/lodash/_isKeyable.js ***! \********************************/ function(e,t){function r(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=r},/*!*******************************!*\ !*** ./~/lodash/_isMasked.js ***! \*******************************/ function(e,t,r){function n(e){return!!a&&a in e}var o=r(/*! ./_coreJsData */328),a=function(){var e=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=n},/*!*************************************!*\ !*** ./~/lodash/_listCacheClear.js ***! \*************************************/ function(e,t){function r(){this.__data__=[]}e.exports=r},/*!**************************************!*\ !*** ./~/lodash/_listCacheDelete.js ***! \**************************************/ function(e,t,r){function n(e){var t=this.__data__,r=o(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():s.call(t,r,1),!0}var o=r(/*! ./_assocIndexOf */48),a=Array.prototype,s=a.splice;e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_listCacheGet.js ***! \***********************************/ function(e,t,r){function n(e){var t=this.__data__,r=o(t,e);return r<0?void 0:t[r][1]}var o=r(/*! ./_assocIndexOf */48);e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_listCacheHas.js ***! \***********************************/ function(e,t,r){function n(e){return o(this.__data__,e)>-1}var o=r(/*! ./_assocIndexOf */48);e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_listCacheSet.js ***! \***********************************/ function(e,t,r){function n(e,t){var r=this.__data__,n=o(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}var o=r(/*! ./_assocIndexOf */48);e.exports=n},/*!************************************!*\ !*** ./~/lodash/_mapCacheClear.js ***! \************************************/ function(e,t,r){function n(){this.__data__={hash:new o,map:new(s||a),string:new o}}var o=r(/*! ./_Hash */285),a=r(/*! ./_ListCache */42),s=r(/*! ./_Map */85);e.exports=n},/*!*************************************!*\ !*** ./~/lodash/_mapCacheDelete.js ***! \*************************************/ function(e,t,r){function n(e){return o(this,e)["delete"](e)}var o=r(/*! ./_getMapData */52);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_mapCacheGet.js ***! \**********************************/ function(e,t,r){function n(e){return o(this,e).get(e)}var o=r(/*! ./_getMapData */52);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_mapCacheHas.js ***! \**********************************/ function(e,t,r){function n(e){return o(this,e).has(e)}var o=r(/*! ./_getMapData */52);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_mapCacheSet.js ***! \**********************************/ function(e,t,r){function n(e,t){return o(this,e).set(e,t),this}var o=r(/*! ./_getMapData */52);e.exports=n},/*!********************************!*\ !*** ./~/lodash/_mergeData.js ***! \********************************/ function(e,t,r){function n(e,t){var r=e[1],n=t[1],m=r|n,v=m<(i|u|d),h=n==d&&r==c||n==d&&r==f&&e[7].length<=t[8]||n==(d|f)&&t[7].length<=t[8]&&r==c;if(!v&&!h)return e;n&i&&(e[2]=t[2],m|=r&i?0:p);var T=t[3];if(T){var P=e[3];e[3]=P?o(P,T,t[4]):T,e[4]=P?s(e[3],l):t[4]}return T=t[5],T&&(P=e[5],e[5]=P?a(P,T,t[6]):T,e[6]=P?s(e[5],l):t[6]),T=t[7],T&&(e[7]=T),n&d&&(e[8]=null==e[8]?t[8]:y(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=m,e}var o=r(/*! ./_composeArgs */198),a=r(/*! ./_composeArgsRight */199),s=r(/*! ./_replaceHolders */35),l="__lodash_placeholder__",i=1,u=2,p=4,c=8,d=128,f=256,y=Math.min;e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_nativeKeysIn.js ***! \***********************************/ function(e,t){function r(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}e.exports=r},/*!*******************************!*\ !*** ./~/lodash/_nodeUtil.js ***! \*******************************/ function(e,t,r){(function(e){var n=r(/*! ./_freeGlobal */204),o="object"==typeof t&&t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,s=a&&a.exports===o,l=s&&n.process,i=function(){try{return l&&l.binding("util")}catch(e){}}();e.exports=i}).call(t,r(/*! ./../webpack/buildin/module.js */237)(e))},/*!*****************************!*\ !*** ./~/lodash/_parent.js ***! \*****************************/ function(e,t,r){function n(e,t){return 1==t.length?e:o(e,a(t,0,-1))}var o=r(/*! ./_baseGet */90),a=r(/*! ./_baseSlice */93);e.exports=n},/*!********************************!*\ !*** ./~/lodash/_realNames.js ***! \********************************/ function(e,t){var r={};e.exports=r},/*!******************************!*\ !*** ./~/lodash/_reorder.js ***! \******************************/ function(e,t,r){function n(e,t){for(var r=e.length,n=s(t.length,r),l=o(e);n--;){var i=t[n];e[n]=a(i,r)?l[i]:void 0}return e}var o=r(/*! ./_copyArray */49),a=r(/*! ./_isIndex */55),s=Math.min;e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_setCacheAdd.js ***! \**********************************/ function(e,t){function r(e){return this.__data__.set(e,n),this}var n="__lodash_hash_undefined__";e.exports=r},/*!**********************************!*\ !*** ./~/lodash/_setCacheHas.js ***! \**********************************/ function(e,t){function r(e){return this.__data__.has(e)}e.exports=r},/*!*********************************!*\ !*** ./~/lodash/_stackClear.js ***! \*********************************/ function(e,t,r){function n(){this.__data__=new o}var o=r(/*! ./_ListCache */42);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_stackDelete.js ***! \**********************************/ function(e,t){function r(e){return this.__data__["delete"](e)}e.exports=r},/*!*******************************!*\ !*** ./~/lodash/_stackGet.js ***! \*******************************/ function(e,t){function r(e){return this.__data__.get(e)}e.exports=r},/*!*******************************!*\ !*** ./~/lodash/_stackHas.js ***! \*******************************/ function(e,t){function r(e){return this.__data__.has(e)}e.exports=r},/*!*******************************!*\ !*** ./~/lodash/_stackSet.js ***! \*******************************/ function(e,t,r){function n(e,t){var r=this.__data__;if(r instanceof o){var n=r.__data__;if(!a||n.length<l-1)return n.push([e,t]),this;r=this.__data__=new s(n)}return r.set(e,t),this}var o=r(/*! ./_ListCache */42),a=r(/*! ./_Map */85),s=r(/*! ./_MapCache */86),l=200;e.exports=n},/*!************************************!*\ !*** ./~/lodash/_stringToArray.js ***! \************************************/ function(e,t,r){function n(e){return a(e)?s(e):o(e)}var o=r(/*! ./_asciiToArray */291),a=r(/*! ./_hasUnicode */207),s=r(/*! ./_unicodeToArray */388);e.exports=n},/*!*************************************!*\ !*** ./~/lodash/_unicodeToArray.js ***! \*************************************/ function(e,t){function r(e){return e.match(g)||[]}var n="\\ud800-\\udfff",o="\\u0300-\\u036f\\ufe20-\\ufe23",a="\\u20d0-\\u20f0",s="\\ufe0e\\ufe0f",l="["+n+"]",i="["+o+a+"]",u="\\ud83c[\\udffb-\\udfff]",p="(?:"+i+"|"+u+")",c="[^"+n+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",y="\\u200d",m=p+"?",v="["+s+"]?",h="(?:"+y+"(?:"+[c,d,f].join("|")+")"+v+m+")*",T=v+m+h,P="(?:"+[c+i+"?",i,d,f,l].join("|")+")",g=RegExp(u+"(?="+u+")|"+P+T,"g");e.exports=r},/*!***********************************!*\ !*** ./~/lodash/_unicodeWords.js ***! \***********************************/ function(e,t){function r(e){return e.match(D)||[]}var n="\\ud800-\\udfff",o="\\u0300-\\u036f\\ufe20-\\ufe23",a="\\u20d0-\\u20f0",s="\\u2700-\\u27bf",l="a-z\\xdf-\\xf6\\xf8-\\xff",i="\\xac\\xb1\\xd7\\xf7",u="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",p="\\u2000-\\u206f",c=" \\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",d="A-Z\\xc0-\\xd6\\xd8-\\xde",f="\\ufe0e\\ufe0f",y=i+u+p+c,m="['’]",v="["+y+"]",h="["+o+a+"]",T="\\d+",P="["+s+"]",g="["+l+"]",b="[^"+n+y+T+s+l+d+"]",O="\\ud83c[\\udffb-\\udfff]",_="(?:"+h+"|"+O+")",E="[^"+n+"]",w="(?:\\ud83c[\\udde6-\\uddff]){2}",j="[\\ud800-\\udbff][\\udc00-\\udfff]",S="["+d+"]",x="\\u200d",M="(?:"+g+"|"+b+")",A="(?:"+S+"|"+b+")",N="(?:"+m+"(?:d|ll|m|re|s|t|ve))?",I="(?:"+m+"(?:D|LL|M|RE|S|T|VE))?",k=_+"?",C="["+f+"]?",K="(?:"+x+"(?:"+[E,w,j].join("|")+")"+C+k+")*",L=C+k+K,U="(?:"+[P,w,j].join("|")+")"+L,D=RegExp([S+"?"+g+"+"+N+"(?="+[v,S,"$"].join("|")+")",A+"+"+I+"(?="+[v,S+M,"$"].join("|")+")",S+"?"+M+"+"+N,S+"+"+I,T,U].join("|"),"g");e.exports=r},/*!****************************************!*\ !*** ./~/lodash/_updateWrapDetails.js ***! \****************************************/ function(e,t,r){function n(e,t){return o(m,function(r){var n="_."+r[0];t&r[1]&&!a(e,n)&&e.push(n)}),e.sort()}var o=r(/*! ./_arrayEach */31),a=r(/*! ./_arrayIncludes */45),s=1,l=2,i=8,u=16,p=32,c=64,d=128,f=256,y=512,m=[["ary",d],["bind",s],["bindKey",l],["curry",i],["curryRight",u],["flip",y],["partial",p],["partialRight",c],["rearg",f]];e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_wrapperClone.js ***! \***********************************/ function(e,t,r){function n(e){if(e instanceof o)return e.clone();var t=new a(e.__wrapped__,e.__chain__);return t.__actions__=s(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var o=r(/*! ./_LazyWrapper */83),a=r(/*! ./_LodashWrapper */84),s=r(/*! ./_copyArray */49);e.exports=n},/*!*************************!*\ !*** ./~/lodash/ary.js ***! \*************************/ function(e,t,r){function n(e,t,r){return t=r?void 0:t,t=e&&null==t?e.length:t,o(e,a,void 0,void 0,void 0,void 0,t)}var o=r(/*! ./_createWrap */33),a=128;e.exports=n},/*!***************************!*\ !*** ./~/lodash/clamp.js ***! \***************************/ function(e,t,r){function n(e,t,r){return void 0===r&&(r=t,t=void 0),void 0!==r&&(r=a(r),r=r===r?r:0),void 0!==t&&(t=a(t),t=t===t?t:0),o(a(e),t,r)}var o=r(/*! ./_baseClamp */186),a=r(/*! ./toNumber */62);e.exports=n},/*!***************************!*\ !*** ./~/lodash/clone.js ***! \***************************/ function(e,t,r){function n(e){return o(e,!1,!0)}var o=r(/*! ./_baseClone */187);e.exports=n},/*!******************************!*\ !*** ./~/lodash/constant.js ***! \******************************/ function(e,t){function r(e){return function(){return e}}e.exports=r},/*!****************************!*\ !*** ./~/lodash/deburr.js ***! \****************************/ function(e,t,r){function n(e){return e=a(e),e&&e.replace(s,o).replace(p,"")}var o=r(/*! ./_deburrLetter */341),a=r(/*! ./toString */24),s=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,l="\\u0300-\\u036f\\ufe20-\\ufe23",i="\\u20d0-\\u20f0",u="["+l+i+"]",p=RegExp(u,"g");e.exports=n},/*!********************************!*\ !*** ./~/lodash/difference.js ***! \********************************/ function(e,t,r){var n=r(/*! ./_baseDifference */89),o=r(/*! ./_baseFlatten */26),a=r(/*! ./_baseRest */12),s=r(/*! ./isArrayLikeObject */38),l=a(function(e,t){return s(e)?n(e,o(t,1,s,!0)):[]});e.exports=l},/*!*******************************!*\ !*** ./~/lodash/dropRight.js ***! \*******************************/ function(e,t,r){function n(e,t,r){var n=e?e.length:0;return n?(t=r||void 0===t?1:a(t),t=n-t,o(e,0,t<0?0:t)):[]}var o=r(/*! ./_baseSlice */93),a=r(/*! ./toInteger */17);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/escapeRegExp.js ***! \**********************************/ function(e,t,r){function n(e){return e=o(e),e&&s.test(e)?e.replace(a,"\\$&"):e}var o=r(/*! ./toString */24),a=/[\\^$.*+?()[\]{}|]/g,s=RegExp(a.source);e.exports=n},/*!**************************!*\ !*** ./~/lodash/flow.js ***! \**************************/ function(e,t,r){var n=r(/*! ./_createFlow */337),o=n();e.exports=o},/*!*****************************!*\ !*** ./~/lodash/forEach.js ***! \*****************************/ function(e,t,r){function n(e,t){var r=l(e)?o:a;return r(e,s(t,3))}var o=r(/*! ./_arrayEach */31),a=r(/*! ./_baseEach */25),s=r(/*! ./_baseIteratee */13),l=r(/*! ./isArray */5);e.exports=n},/*!*************************************!*\ !*** ./~/lodash/fp/_baseConvert.js ***! \*************************************/ function(e,t,r){function n(e,t){return 2==t?function(t,r){return e.apply(void 0,arguments)}:function(t){return e.apply(void 0,arguments)}}function o(e,t){return 2==t?function(t,r){return e(t,r)}:function(t){return e(t)}}function a(e){for(var t=e?e.length:0,r=Array(t);t--;)r[t]=e[t];return r}function s(e){return function(t){return e({},t)}}function l(e,t){return function(){var r=arguments.length;if(r){for(var n=Array(r);r--;)n[r]=arguments[r];var o=n[0]=t.apply(void 0,n);return e.apply(void 0,n),o}}}function i(e,t,r,d){function f(e,t){if(S.cap){var r=u.iterateeRearg[e];if(r)return b(t,r);var n=!w&&u.iterateeAry[e];if(n)return g(t,n)}return t}function y(e,t,r){return x||S.curry&&r>1?U(t,r):t}function m(e,t,r){if(S.fixed&&(M||!u.skipFixed[e])){var n=u.methodSpread[e],o=n&&n.start;return void 0===o?C(t,r):V(t,o)}return t}function v(e,t,r){return S.rearg&&r>1&&(A||!u.skipRearg[e])?F(t,u.methodRearg[e]||u.aryRearg[r]):t}function h(e,t){t=Y(t);for(var r=-1,n=t.length,o=n-1,a=L(Object(e)),s=a;null!=s&&++r<n;){var l=t[r],i=s[l];null!=i&&(s[t[r]]=L(r==o?i:Object(i))),s=s[l]}return a}function T(e){return G.runInContext.convert(e)(void 0)}function P(e,t){var r=d;return function(n){var o=w?I:k,a=w?I[e]:t,s=K(K({},r),n);return i(o,e,a,s)}}function g(e,t){return O(e,function(e){return"function"==typeof e?o(e,t):e})}function b(e,t){return O(e,function(e){var r=t.length;return n(F(o(e,r),t),r)})}function O(e,t){return function(){var r=arguments.length;if(!r)return e();for(var n=Array(r);r--;)n[r]=arguments[r];var o=S.rearg?0:r-1;return n[o]=t(n[o]),e.apply(void 0,n)}}function _(e,t){e=u.aliasToReal[e]||e;var r,n=t,o=H[e];return o?n=o(t):S.immutable&&(p.array[e]?n=l(t,a):p.object[e]?n=l(t,s(t)):p.set[e]&&(n=l(t,h))),D(q,function(t){return D(u.aryMethod[t],function(o){if(e==o){var a=u.methodSpread[e],s=a&&a.afterRearg;return r=s?m(e,v(e,n,t),t):v(e,m(e,n,t),t),r=f(e,r),r=y(e,r,t),!1}}),!r}),r||(r=n),r==t&&(r=x?U(r,1):function(){return t.apply(this,arguments)}),r.convert=P(e,t),u.placeholder[e]&&(E=!0,r.placeholder=t.placeholder=N),r}var E,w="function"==typeof t,j=t===Object(t);if(j&&(d=r,r=t,t=void 0),null==r)throw new TypeError;d||(d={});var S={cap:!("cap"in d)||d.cap,curry:!("curry"in d)||d.curry,fixed:!("fixed"in d)||d.fixed,immutable:!("immutable"in d)||d.immutable,rearg:!("rearg"in d)||d.rearg},x="curry"in d&&d.curry,M="fixed"in d&&d.fixed,A="rearg"in d&&d.rearg,N=w?r:c,I=w?r.runInContext():void 0,k=w?r:{ary:e.ary,assign:e.assign,clone:e.clone,curry:e.curry,forEach:e.forEach,isArray:e.isArray,isFunction:e.isFunction,iteratee:e.iteratee,keys:e.keys,rearg:e.rearg,spread:e.spread,toInteger:e.toInteger,toPath:e.toPath},C=k.ary,K=k.assign,L=k.clone,U=k.curry,D=k.forEach,R=k.isArray,z=k.isFunction,W=k.keys,F=k.rearg,V=k.spread,B=k.toInteger,Y=k.toPath,q=W(u.aryMethod),H={castArray:function(e){return function(){var t=arguments[0];return R(t)?e(a(t)):e.apply(void 0,arguments)}},iteratee:function(e){return function(){var t=arguments[0],r=arguments[1],n=e(t,r),a=n.length;return S.cap&&"number"==typeof r?(r=r>2?r-2:1,a&&a<=r?n:o(n,r)):n}},mixin:function(e){return function(t){var r=this;if(!z(r))return e(r,Object(t));var n=[];return D(W(t),function(e){z(t[e])&&n.push([e,r.prototype[e]])}),e(r,Object(t)),D(n,function(e){var t=e[1];z(t)?r.prototype[e[0]]=t:delete r.prototype[e[0]]}),r}},nthArg:function(e){return function(t){var r=t<0?1:B(t)+1;return U(e(t),r)}},rearg:function(e){return function(t,r){var n=r?r.length:0;return U(e(t,r),n)}},runInContext:function(t){return function(r){return i(e,t(r),d)}}};if(!j)return _(t,r);var G=r,Z=[];return D(q,function(e){D(u.aryMethod[e],function(e){var t=G[u.remap[e]||e];t&&Z.push([e,_(e,t)])})}),D(W(G),function(e){var t=G[e];if("function"==typeof t){for(var r=Z.length;r--;)if(Z[r][0]==e)return;t.convert=P(e,t),Z.push([e,t])}}),D(Z,function(e){G[e[0]]=e[1]}),G.convert=T,E&&(G.placeholder=N),D(W(G),function(e){D(u.realToAlias[e]||[],function(t){G[t]=G[e]})}),G}var u=r(/*! ./_mapping */403),p=u.mutate,c=r(/*! ./placeholder */6);e.exports=i},/*!*********************************!*\ !*** ./~/lodash/fp/_mapping.js ***! \*********************************/ function(e,t){t.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},t.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},t.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},t.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},t.iterateeRearg={mapKeys:[1]},t.methodRearg={assignInAllWith:[1,2,0],assignInWith:[1,2,0],assignAllWith:[1,2,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,2,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},t.methodSpread={assignAll:{start:0},assignAllWith:{afterRearg:!0,start:1},assignInAll:{start:0},assignInAllWith:{afterRearg:!0,start:1},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{afterRearg:!0,start:1},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},t.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},t.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},t.realToAlias=function(){var e=Object.prototype.hasOwnProperty,r=t.aliasToReal,n={};for(var o in r){var a=r[o];e.call(n,a)?n[a].push(o):n[a]=[o]}return n}(),t.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},t.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},t.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},/*!******************************!*\ !*** ./~/lodash/fp/_util.js ***! \******************************/ function(e,t,r){e.exports={ary:r(/*! ../ary */392),assign:r(/*! ../_baseAssign */185),clone:r(/*! ../clone */394),curry:r(/*! ../curry */220),forEach:r(/*! ../_arrayEach */31),isArray:r(/*! ../isArray */5),isFunction:r(/*! ../isFunction */23),iteratee:r(/*! ../iteratee */424),keys:r(/*! ../_baseKeys */192),rearg:r(/*! ../rearg */432),spread:r(/*! ../spread */434),toInteger:r(/*! ../toInteger */17),toPath:r(/*! ../toPath */438)}},/*!********************************!*\ !*** ./~/lodash/fp/compact.js ***! \********************************/ function(e,t,r){var n=r(/*! ./convert */8),o=n("compact",r(/*! ../compact */219),r(/*! ./_falseOptions */27));o.placeholder=r(/*! ./placeholder */6),e.exports=o},/*!******************************!*\ !*** ./~/lodash/fp/curry.js ***! \******************************/ function(e,t,r){var n=r(/*! ./convert */8),o=n("curry",r(/*! ../curry */220));o.placeholder=r(/*! ./placeholder */6),e.exports=o},/*!***************************!*\ !*** ./~/lodash/fp/eq.js ***! \***************************/ function(e,t,r){var n=r(/*! ./convert */8),o=n("eq",r(/*! ../eq */36));o.placeholder=r(/*! ./placeholder */6),e.exports=o},/*!****************************!*\ !*** ./~/lodash/fp/get.js ***! \****************************/ function(e,t,r){var n=r(/*! ./convert */8),o=n("get",r(/*! ../get */37));o.placeholder=r(/*! ./placeholder */6),e.exports=o},/*!****************************!*\ !*** ./~/lodash/fp/has.js ***! \****************************/ function(e,t,r){var n=r(/*! ./convert */8),o=n("has",r(/*! ../has */28));o.placeholder=r(/*! ./placeholder */6),e.exports=o},/*!*********************************!*\ !*** ./~/lodash/fp/includes.js ***! \*********************************/ function(e,t,r){var n=r(/*! ./convert */8),o=n("includes",r(/*! ../includes */106));o.placeholder=r(/*! ./placeholder */6),e.exports=o},/*!***********************************!*\ !*** ./~/lodash/fp/isFunction.js ***! \***********************************/ function(e,t,r){var n=r(/*! ./convert */8),o=n("isFunction",r(/*! ../isFunction */23),r(/*! ./_falseOptions */27));o.placeholder=r(/*! ./placeholder */6),e.exports=o},/*!*********************************!*\ !*** ./~/lodash/fp/isObject.js ***! \*********************************/ function(e,t,r){var n=r(/*! ./convert */8),o=n("isObject",r(/*! ../isObject */11),r(/*! ./_falseOptions */27));o.placeholder=r(/*! ./placeholder */6),e.exports=o},/*!**************************************!*\ !*** ./~/lodash/fp/isPlainObject.js ***! \**************************************/ function(e,t,r){var n=r(/*! ./convert */8),o=n("isPlainObject",r(/*! ../isPlainObject */226),r(/*! ./_falseOptions */27));o.placeholder=r(/*! ./placeholder */6),e.exports=o},/*!*****************************!*\ !*** ./~/lodash/fp/keys.js ***! \*****************************/ function(e,t,r){var n=r(/*! ./convert */8),o=n("keys",r(/*! ../keys */10),r(/*! ./_falseOptions */27));o.placeholder=r(/*! ./placeholder */6),e.exports=o},/*!****************************!*\ !*** ./~/lodash/fp/map.js ***! \****************************/ function(e,t,r){var n=r(/*! ./convert */8),o=n("map",r(/*! ../map */14));o.placeholder=r(/*! ./placeholder */6),e.exports=o},/*!*****************************!*\ !*** ./~/lodash/fp/pick.js ***! \*****************************/ function(e,t,r){var n=r(/*! ./convert */8),o=n("pick",r(/*! ../pick */61));o.placeholder=r(/*! ./placeholder */6),e.exports=o},/*!***********************************!*\ !*** ./~/lodash/fp/startsWith.js ***! \***********************************/ function(e,t,r){var n=r(/*! ./convert */8),o=n("startsWith",r(/*! ../startsWith */436));o.placeholder=r(/*! ./placeholder */6),e.exports=o},/*!*******************************!*\ !*** ./~/lodash/fp/values.js ***! \*******************************/ function(e,t,r){var n=r(/*! ./convert */8),o=n("values",r(/*! ../values */110),r(/*! ./_falseOptions */27));o.placeholder=r(/*! ./placeholder */6),e.exports=o},/*!***************************!*\ !*** ./~/lodash/hasIn.js ***! \***************************/ function(e,t,r){function n(e,t){return null!=e&&a(e,t,o)}var o=r(/*! ./_baseHasIn */298),a=r(/*! ./_hasPath */206);e.exports=n},/*!*****************************!*\ !*** ./~/lodash/inRange.js ***! \*****************************/ function(e,t,r){function n(e,t,r){return t=a(t),void 0===r?(r=t,t=0):r=a(r),e=s(e),o(e,t,r)}var o=r(/*! ./_baseInRange */299),a=r(/*! ./toFinite */234),s=r(/*! ./toNumber */62);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/intersection.js ***! \**********************************/ function(e,t,r){var n=r(/*! ./_arrayMap */18),o=r(/*! ./_baseIntersection */300),a=r(/*! ./_baseRest */12),s=r(/*! ./_castArrayLikeObject */319),l=a(function(e){var t=n(e,s);return t.length&&t[0]===e[0]?o(t):[]});e.exports=l},/*!******************************!*\ !*** ./~/lodash/isNumber.js ***! \******************************/ function(e,t,r){function n(e){return"number"==typeof e||o(e)&&l.call(e)==a}var o=r(/*! ./isObjectLike */20),a="[object Number]",s=Object.prototype,l=s.toString;e.exports=n},/*!*********************************!*\ !*** ./~/lodash/isUndefined.js ***! \*********************************/ function(e,t){function r(e){return void 0===e}e.exports=r},/*!******************************!*\ !*** ./~/lodash/iteratee.js ***! \******************************/ function(e,t,r){function n(e){return a("function"==typeof e?e:o(e,!0))}var o=r(/*! ./_baseClone */187),a=r(/*! ./_baseIteratee */13);e.exports=n},/*!****************************!*\ !*** ./~/lodash/keysIn.js ***! \****************************/ function(e,t,r){function n(e){return s(e)?o(e,!0):a(e)}var o=r(/*! ./_arrayLikeKeys */182),a=r(/*! ./_baseKeysIn */307),s=r(/*! ./isArrayLike */16);e.exports=n},/*!**************************!*\ !*** ./~/lodash/last.js ***! \**************************/ function(e,t){function r(e){var t=e?e.length:0;return t?e[t-1]:void 0}e.exports=r},/*!*****************************!*\ !*** ./~/lodash/memoize.js ***! \*****************************/ function(e,t,r){function n(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(a);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var s=e.apply(this,n);return r.cache=a.set(o,s),s};return r.cache=new(n.Cache||o),r}var o=r(/*! ./_MapCache */86),a="Expected a function";n.Cache=o,e.exports=n},/*!*************************!*\ !*** ./~/lodash/now.js ***! \*************************/ function(e,t,r){var n=r(/*! ./_root */9),o=function(){return n.Date.now()};e.exports=o},/*!*****************************!*\ !*** ./~/lodash/partial.js ***! \*****************************/ function(e,t,r){var n=r(/*! ./_baseRest */12),o=r(/*! ./_createWrap */33),a=r(/*! ./_getHolder */51),s=r(/*! ./_replaceHolders */35),l=32,i=n(function(e,t){var r=s(t,a(i));return o(e,l,void 0,t,r)});i.placeholder={},e.exports=i},/*!**********************************!*\ !*** ./~/lodash/partialRight.js ***! \**********************************/ function(e,t,r){var n=r(/*! ./_baseRest */12),o=r(/*! ./_createWrap */33),a=r(/*! ./_getHolder */51),s=r(/*! ./_replaceHolders */35),l=64,i=n(function(e,t){var r=s(t,a(i));return o(e,l,void 0,t,r)});i.placeholder={},e.exports=i},/*!******************************!*\ !*** ./~/lodash/property.js ***! \******************************/ function(e,t,r){function n(e){return s(e)?o(l(e)):a(e)}var o=r(/*! ./_baseProperty */312),a=r(/*! ./_basePropertyDeep */313),s=r(/*! ./_isKey */34),l=r(/*! ./_toKey */19);e.exports=n},/*!***************************!*\ !*** ./~/lodash/rearg.js ***! \***************************/ function(e,t,r){var n=r(/*! ./_baseFlatten */26),o=r(/*! ./_baseRest */12),a=r(/*! ./_createWrap */33),s=256,l=o(function(e,t){return a(e,s,void 0,void 0,void 0,n(t,1))});e.exports=l},/*!***************************!*\ !*** ./~/lodash/round.js ***! \***************************/ function(e,t,r){var n=r(/*! ./_createRound */339),o=n("round");e.exports=o},/*!****************************!*\ !*** ./~/lodash/spread.js ***! \****************************/ function(e,t,r){function n(e,t){if("function"!=typeof e)throw new TypeError(u);return t=void 0===t?0:p(i(t),0),s(function(r){var n=r[t],s=l(r,0,t);return n&&a(s,n),o(e,this,s)})}var o=r(/*! ./_apply */30),a=r(/*! ./_arrayPush */46),s=r(/*! ./_baseRest */12),l=r(/*! ./_castSlice */197),i=r(/*! ./toInteger */17),u="Expected a function",p=Math.max;e.exports=n},/*!*******************************!*\ !*** ./~/lodash/startCase.js ***! \*******************************/ function(e,t,r){var n=r(/*! ./_createCompounder */334),o=r(/*! ./upperFirst */439),a=n(function(e,t,r){return e+(r?" ":"")+o(t)});e.exports=a},/*!********************************!*\ !*** ./~/lodash/startsWith.js ***! \********************************/ function(e,t,r){function n(e,t,r){return e=l(e),r=o(s(r),0,e.length),t=a(t),e.slice(r,r+t.length)==t}var o=r(/*! ./_baseClamp */186),a=r(/*! ./_baseToString */196),s=r(/*! ./toInteger */17),l=r(/*! ./toString */24);e.exports=n},/*!*******************************!*\ !*** ./~/lodash/stubFalse.js ***! \*******************************/ function(e,t){function r(){return!1}e.exports=r},/*!****************************!*\ !*** ./~/lodash/toPath.js ***! \****************************/ function(e,t,r){function n(e){return s(e)?o(e,u):l(e)?[e]:a(i(e))}var o=r(/*! ./_arrayMap */18),a=r(/*! ./_copyArray */49),s=r(/*! ./isArray */5),l=r(/*! ./isSymbol */39),i=r(/*! ./_stringToPath */217),u=r(/*! ./_toKey */19);e.exports=n},/*!********************************!*\ !*** ./~/lodash/upperFirst.js ***! \********************************/ function(e,t,r){var n=r(/*! ./_createCaseFirst */333),o=n("toUpperCase");e.exports=o},/*!***************************!*\ !*** ./~/lodash/words.js ***! \***************************/ function(e,t,r){function n(e,t,r){return e=s(e),t=r?void 0:t,void 0===t?a(e)?l(e):o(e):e.match(t)||[]}var o=r(/*! ./_asciiWords */292),a=r(/*! ./_hasUnicodeWord */351),s=r(/*! ./toString */24),l=r(/*! ./_unicodeWords */389);e.exports=n},/*!***********************************!*\ !*** ./~/lodash/wrapperLodash.js ***! \***********************************/ function(e,t,r){function n(e){if(i(e)&&!l(e)&&!(e instanceof o)){if(e instanceof a)return e;if(c.call(e,"__wrapped__"))return u(e)}return new a(e)}var o=r(/*! ./_LazyWrapper */83),a=r(/*! ./_LodashWrapper */84),s=r(/*! ./_baseLodash */92),l=r(/*! ./isArray */5),i=r(/*! ./isObjectLike */20),u=r(/*! ./_wrapperClone */391),p=Object.prototype,c=p.hasOwnProperty;n.prototype=s.prototype,n.prototype.constructor=n,e.exports=n},/*!***********************!*\ !*** ./~/ms/index.js ***! \***********************/ function(e,t){function r(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*p;case"days":case"day":case"d":return r*u;case"hours":case"hour":case"hrs":case"hr":case"h":return r*i;case"minutes":case"minute":case"mins":case"min":case"m":return r*l;case"seconds":case"second":case"secs":case"sec":case"s":return r*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r}}}}function n(e){return e>=u?Math.round(e/u)+"d":e>=i?Math.round(e/i)+"h":e>=l?Math.round(e/l)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}function o(e){return a(e,u,"day")||a(e,i,"hour")||a(e,l,"minute")||a(e,s,"second")||e+" ms"}function a(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}var s=1e3,l=60*s,i=60*l,u=24*i,p=365.25*u;e.exports=function(e,t){return t=t||{},"string"==typeof e?r(e):t["long"]?o(e):n(e)}},/*!***************************!*\ !*** external "ReactDOM" ***! \***************************/ function(e,r){e.exports=t}])});
src/svg-icons/action/perm-contact-calendar.js
kasra-co/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionPermContactCalendar = (props) => ( <SvgIcon {...props}> <path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1z"/> </SvgIcon> ); ActionPermContactCalendar = pure(ActionPermContactCalendar); ActionPermContactCalendar.displayName = 'ActionPermContactCalendar'; ActionPermContactCalendar.muiName = 'SvgIcon'; export default ActionPermContactCalendar;
ajax/libs/react-slick/0.3.1/react-slick.min.js
Dervisevic/cdnjs
var Slider=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){var r=n(2),i=n(3),o=n(7),s=n(4),a=(n(5),n(6)),u=r.createClass({displayName:"Slider",mixins:[a],getInitialState:function(){return{breakpoint:null}},componentDidMount:function(){{var t=o.sortBy(o.pluck(this.props.responsive,"breakpoint"));this.props}t.forEach(function(e,n){var r;r=s(0===n?{minWidth:0,maxWidth:e}:{minWidth:t[n-1],maxWidth:e}),this.media(r,function(){this.setState({breakpoint:e})}.bind(this))}.bind(this));var e=s({minWidth:t.slice(-1)[0]});this.media(e,function(){this.setState({breakpoint:null})}.bind(this))},render:function(){var t,e;return this.state.breakpoint?(e=o.filter(this.props.responsive,{breakpoint:this.state.breakpoint}),t=o.assign({},this.props,e[0].settings)):t=this.props,r.createElement(i,r.__spread({},t))}});t.exports=u},function(t){t.exports=React},function(t,e,n){var r=n(2),i=n(12),o=n(13),s=n(8),a=n(9),u=n(10),l=n(11),c=n(7),f=r.createClass({displayName:"Slider",mixins:[s,a],getInitialState:function(){return u},getDefaultProps:function(){return l},componentDidMount:function(){this.initialize(this.props)},componentWillReceiveProps:function(t){this.initialize(t)},renderDots:function(){var t,e,n=[];if(this.props.dots===!0&&this.state.slideCount>this.props.slidesToShow){for(var i=0;i<=this.getDotCount();i+=1)t={"slick-active":this.state.currentSlide===i*this.props.slidesToScroll},e={message:"index",index:i},n.push(r.createElement("li",{key:i,className:o(t)},r.createElement("button",{onClick:this.changeSlide.bind(this,e)},i)));return r.createElement("ul",{className:this.props.dotsClass,style:{display:"block"}},n)}return null},renderSlides:function(){var t,e=[],n=[],o=[],s=r.Children.count(this.props.children);return r.Children.forEach(this.props.children,function(r,a){e.push(i(r,{key:a,"data-index":a,className:this.getSlideClasses(a),style:c.assign({},this.getSlideStyle(),r.props.style)})),this.props.infinite===!0&&(infiniteCount=this.props.centerMode===!0?this.props.slidesToShow+1:this.props.slidesToShow,a>=s-infiniteCount&&(t=-(s-a),n.push(i(r,{key:t,"data-index":t,className:this.getSlideClasses(t),style:c.assign({},this.getSlideStyle(),r.props.style)}))),a<infiniteCount&&(t=s+a,o.push(i(r,{key:t,"data-index":t,className:this.getSlideClasses(t),style:c.assign({},this.getSlideStyle(),r.props.style)}))))}.bind(this)),n.concat(e,o)},renderTrack:function(){return r.createElement("div",{ref:"track",className:"slick-track",style:this.state.trackStyle},this.renderSlides())},renderArrows:function(){var t={"slick-prev":!0},e={"slick-next":!0},n=this.changeSlide.bind(this,{message:"previous"}),i=this.changeSlide.bind(this,{message:"next"});this.props.infinite===!1&&(0===this.state.currentSlide&&(t["slick-disabled"]=!0,n=null),this.state.currentSlide>=this.state.slideCount-this.props.slidesToShow&&(e["slick-disabled"]=!0,i=null));var s=r.createElement("button",{key:0,ref:"previous",type:"button","data-role":"none",className:o(t),style:{display:"block"},onClick:n}," Previous"),a=r.createElement("button",{key:1,ref:"next",type:"button","data-role":"none",className:o(e),style:{display:"block"},onClick:i},"Next");return[s,a]},render:function(){return r.createElement("div",{className:"slick-initialized slick-slider "+this.props.className},r.createElement("div",{ref:"list",className:"slick-list",style:this.getListStyle(),onMouseDown:this.swipeStart,onMouseMove:this.state.dragging?this.swipeMove:null,onMouseUp:this.swipeEnd,onMouseLeave:this.state.dragging?this.swipeEnd:null,onTouchStart:this.swipeStart,onTouchMove:this.state.dragging?this.swipeMove:null,onTouchEnd:this.swipeEnd,onTouchCancel:this.state.dragging?this.swipeEnd:null},this.renderTrack()),this.renderArrows(),this.renderDots())}});t.exports=f},function(t,e,n){var r=n(16),i=function(t){var e=/[height|width]$/;return e.test(t)},o=function(t){var e="",n=Object.keys(t);return n.forEach(function(o,s){var a=t[o];o=r(o),i(o)&&"number"==typeof a&&(a+="px"),e+=a===!0?o:a===!1?"not "+o:"("+o+": "+a+")",s<n.length-1&&(e+=" and ")}),e},s=function(t){var e="";return"string"==typeof t?t:t instanceof Array?(t.forEach(function(n,r){e+=o(n),r<t.length-1&&(e+=", ")}),e):o(t)};t.exports=s},function(t){"use strict";function e(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=Object.assign||function(t){for(var n,r,i=e(t),o=1;o<arguments.length;o++){n=arguments[o],r=Object.keys(Object(n));for(var s=0;s<r.length;s++)i[r[s]]=n[r[s]]}return i}},function(t,e,n){var r=n(18),i=n(15),o={media:function(t,e){t=i(t),"function"==typeof e&&(e={match:e}),r.register(t,e),this._responsiveMediaHandlers||(this._responsiveMediaHandlers=[]),this._responsiveMediaHandlers.push({query:t,handler:e})},componentWillUnmount:function(){this._responsiveMediaHandlers.forEach(function(t){r.unregister(t.query,t.handler)})}};t.exports=o},function(t,e,n){var r;(function(t,i){(function(){function o(t,e,n){for(var r=(n||0)-1,i=t?t.length:0;++r<i;)if(t[r]===e)return r;return-1}function s(t,e){var n=typeof e;if(t=t.cache,"boolean"==n||null==e)return t[e]?0:-1;"number"!=n&&"string"!=n&&(n="object");var r="number"==n?e:C+e;return t=(t=t[n])&&t[r],"object"==n?t&&o(t,e)>-1?0:-1:t?0:-1}function a(t){var e=this.cache,n=typeof t;if("boolean"==n||null==t)e[t]=!0;else{"number"!=n&&"string"!=n&&(n="object");var r="number"==n?t:C+t,i=e[n]||(e[n]={});"object"==n?(i[r]||(i[r]=[])).push(t):i[r]=!0}}function u(t){return t.charCodeAt(0)}function l(t,e){for(var n=t.criteria,r=e.criteria,i=-1,o=n.length;++i<o;){var s=n[i],a=r[i];if(s!==a){if(s>a||"undefined"==typeof s)return 1;if(a>s||"undefined"==typeof a)return-1}}return t.index-e.index}function c(t){var e=-1,n=t.length,r=t[0],i=t[n/2|0],o=t[n-1];if(r&&"object"==typeof r&&i&&"object"==typeof i&&o&&"object"==typeof o)return!1;var s=h();s["false"]=s["null"]=s["true"]=s.undefined=!1;var u=h();for(u.array=t,u.cache=s,u.push=a;++e<n;)u.push(t[e]);return u}function f(t){return"\\"+ie[t]}function p(){return w.pop()||[]}function h(){return S.pop()||{array:null,cache:null,criteria:null,"false":!1,index:0,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1,value:null}}function d(t){return"function"!=typeof t.toString&&"string"==typeof(t+"")}function g(t){t.length=0,w.length<j&&w.push(t)}function v(t){var e=t.cache;e&&v(e),t.array=t.cache=t.criteria=t.object=t.number=t.string=t.value=null,S.length<j&&S.push(t)}function y(t,e,n){e||(e=0),"undefined"==typeof n&&(n=t?t.length:0);for(var r=-1,i=n-e||0,o=Array(0>i?0:i);++r<i;)o[r]=t[e+r];return o}function m(t){function e(t){return t&&"object"==typeof t&&!fi(t)&&Br.call(t,"__wrapped__")?t:new n(t)}function n(t,e){this.__chain__=!!e,this.__wrapped__=t}function r(t){function e(){if(r){var t=y(r);Ur.apply(t,arguments)}if(this instanceof e){var o=a(n.prototype),s=n.apply(o,t||arguments);return Ie(s)?s:o}return n.apply(i,t||arguments)}var n=t[0],r=t[2],i=t[4];return ci(e,t),e}function i(t,e,n,r,o){if(n){var s=n(t);if("undefined"!=typeof s)return s}var a=Ie(t);if(!a)return t;var u=Ir.call(t);if(!Q[u]||!ui.nodeClass&&d(t))return t;var l=si[u];switch(u){case U:case $:return new l(+t);case K:case J:return new l(t);case G:return s=l(t.source,L.exec(t)),s.lastIndex=t.lastIndex,s}var c=fi(t);if(e){var f=!r;r||(r=p()),o||(o=p());for(var h=r.length;h--;)if(r[h]==t)return o[h];s=c?l(t.length):{}}else s=c?y(t):_i({},t);return c&&(Br.call(t,"index")&&(s.index=t.index),Br.call(t,"input")&&(s.input=t.input)),e?(r.push(t),o.push(s),(c?Si:Ci)(t,function(t,a){s[a]=i(t,e,n,r,o)}),f&&(g(r),g(o)),s):s}function a(t){return Ie(t)?Gr(t):{}}function w(t,e,n){if("function"!=typeof t)return or;if("undefined"==typeof e||!("prototype"in t))return t;var r=t.__bindData__;if("undefined"==typeof r&&(ui.funcNames&&(r=!t.name),r=r||!ui.funcDecomp,!r)){var i=Xr.call(t);ui.funcNames||(r=!A.test(i)),r||(r=R.test(i),ci(t,r))}if(r===!1||r!==!0&&1&r[1])return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return Xn(t,e)}function S(t){function e(){var t=l?s:this;if(i){var d=y(i);Ur.apply(d,arguments)}if((o||f)&&(d||(d=y(arguments)),o&&Ur.apply(d,o),f&&d.length<u))return r|=16,S([n,p?r:-4&r,d,null,s,u]);if(d||(d=arguments),c&&(n=t[h]),this instanceof e){t=a(n.prototype);var g=n.apply(t,d);return Ie(g)?g:t}return n.apply(t,d)}var n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],u=t[5],l=1&r,c=2&r,f=4&r,p=8&r,h=n;return ci(e,t),e}function j(t,e){var n=-1,r=ge(),i=t?t.length:0,a=i>=E&&r===o,u=[];if(a){var l=c(e);l?(r=s,e=l):a=!1}for(;++n<i;){var f=t[n];r(e,f)<0&&u.push(f)}return a&&v(e),u}function ie(t,e,n,r){for(var i=(r||0)-1,o=t?t.length:0,s=[];++i<o;){var a=t[i];if(a&&"object"==typeof a&&"number"==typeof a.length&&(fi(a)||be(a))){e||(a=ie(a,e,n));var u=-1,l=a.length,c=s.length;for(s.length+=l;++u<l;)s[c++]=a[u]}else n||s.push(a)}return s}function se(t,e,n,r,i,o){if(n){var s=n(t,e);if("undefined"!=typeof s)return!!s}if(t===e)return 0!==t||1/t==1/e;var a=typeof t,u=typeof e;if(!(t!==t||t&&re[a]||e&&re[u]))return!1;if(null==t||null==e)return t===e;var l=Ir.call(t),c=Ir.call(e);if(l==Y&&(l=Z),c==Y&&(c=Z),l!=c)return!1;switch(l){case U:case $:return+t==+e;case K:return t!=+t?e!=+e:0==t?1/t==1/e:t==+e;case G:case J:return t==Pr(e)}var f=l==B;if(!f){var h=Br.call(t,"__wrapped__"),v=Br.call(e,"__wrapped__");if(h||v)return se(h?t.__wrapped__:t,v?e.__wrapped__:e,n,r,i,o);if(l!=Z||!ui.nodeClass&&(d(t)||d(e)))return!1;var y=!ui.argsObject&&be(t)?Tr:t.constructor,m=!ui.argsObject&&be(e)?Tr:e.constructor;if(y!=m&&!(De(y)&&y instanceof y&&De(m)&&m instanceof m)&&"constructor"in t&&"constructor"in e)return!1}var b=!i;i||(i=p()),o||(o=p());for(var w=i.length;w--;)if(i[w]==t)return o[w]==e;var S=0;if(s=!0,i.push(t),o.push(e),f){if(w=t.length,S=e.length,s=S==w,s||r)for(;S--;){var _=w,x=e[S];if(r)for(;_--&&!(s=se(t[_],x,n,r,i,o)););else if(!(s=se(t[S],x,n,r,i,o)))break}}else ki(e,function(e,a,u){return Br.call(u,a)?(S++,s=Br.call(t,a)&&se(t[a],e,n,r,i,o)):void 0}),s&&!r&&ki(t,function(t,e,n){return Br.call(n,e)?s=--S>-1:void 0});return i.pop(),o.pop(),b&&(g(i),g(o)),s}function ae(t,e,n,r,i){(fi(e)?rn:Ci)(e,function(e,o){var s,a,u=e,l=t[o];if(e&&((a=fi(e))||Ei(e))){for(var c=r.length;c--;)if(s=r[c]==e){l=i[c];break}if(!s){var f;n&&(u=n(l,e),(f="undefined"!=typeof u)&&(l=u)),f||(l=a?fi(l)?l:[]:Ei(l)?l:{}),r.push(e),i.push(l),f||ae(l,e,n,r,i)}}else n&&(u=n(l,e),"undefined"==typeof u&&(u=e)),"undefined"!=typeof u&&(l=u);t[o]=l})}function ue(t,e){return t+zr(oi()*(e-t+1))}function ce(t,e,n){var r=-1,i=ge(),a=t?t.length:0,u=[],l=!e&&a>=E&&i===o,f=n||l?p():u;if(l){var h=c(f);i=s,f=h}for(;++r<a;){var d=t[r],y=n?n(d,r,t):d;(e?!r||f[f.length-1]!==y:i(f,y)<0)&&((n||l)&&f.push(y),u.push(d))}return l?(g(f.array),v(f)):n&&g(f),u}function fe(t){return function(n,r,i){var o={};if(r=e.createCallback(r,i,3),fi(n))for(var s=-1,a=n.length;++s<a;){var u=n[s];t(o,u,r(u,s,n),n)}else Si(n,function(e,n,i){t(o,e,r(e,n,i),i)});return o}}function pe(t,e,n,i,o,s){var a=1&e,u=2&e,l=4&e,c=16&e,f=32&e;if(!u&&!De(t))throw new Mr;c&&!n.length&&(e&=-17,c=n=!1),f&&!i.length&&(e&=-33,f=i=!1);var p=t&&t.__bindData__;if(p&&p!==!0)return p=y(p),p[2]&&(p[2]=y(p[2])),p[3]&&(p[3]=y(p[3])),!a||1&p[1]||(p[4]=o),!a&&1&p[1]&&(e|=8),!l||4&p[1]||(p[5]=s),c&&Ur.apply(p[2]||(p[2]=[]),n),f&&Kr.apply(p[3]||(p[3]=[]),i),p[1]|=e,pe.apply(null,p);var h=1==e||17===e?r:S;return h([t,e,n,i,o,s])}function he(){ne.shadowedProps=z,ne.array=ne.bottom=ne.loop=ne.top="",ne.init="iterable",ne.useHas=!0;for(var t,e=0;t=arguments[e];e++)for(var n in t)ne[n]=t[n];var r=ne.args;ne.firstArg=/^[^,]+/.exec(r)[0];var i=Cr("baseCreateCallback, errorClass, errorProto, hasOwnProperty, indicatorObject, isArguments, isArray, isString, keys, objectProto, objectTypes, nonEnumProps, stringClass, stringProto, toString","return function("+r+") {\n"+li(ne)+"\n}");return i(w,F,Lr,Br,x,be,fi,Xe,ne.keys,Ar,re,ai,J,Wr,Ir)}function de(t){return yi[t]}function ge(){var t=(t=e.indexOf)===Cn?o:t;return t}function ve(t){return"function"==typeof t&&Rr.test(t)}function ye(t){var e,n;return!t||Ir.call(t)!=Z||(e=t.constructor,De(e)&&!(e instanceof e))||!ui.argsClass&&be(t)||!ui.nodeClass&&d(t)?!1:ui.ownLast?(ki(t,function(t,e,r){return n=Br.call(r,e),!1}),n!==!1):(ki(t,function(t,e){n=e}),"undefined"==typeof n||Br.call(t,n))}function me(t){return mi[t]}function be(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Ir.call(t)==Y||!1}function we(t,e,n,r){return"boolean"!=typeof e&&null!=e&&(r=n,n=e,e=!1),i(t,e,"function"==typeof n&&w(n,r,1))}function Se(t,e,n){return i(t,!0,"function"==typeof e&&w(e,n,1))}function _e(t,e){var n=a(t);return e?_i(n,e):n}function xe(t,n,r){var i;return n=e.createCallback(n,r,3),Ci(t,function(t,e,r){return n(t,e,r)?(i=e,!1):void 0}),i}function ke(t,n,r){var i;return n=e.createCallback(n,r,3),Ee(t,function(t,e,r){return n(t,e,r)?(i=e,!1):void 0}),i}function Ce(t,e,n){var r=[];ki(t,function(t,e){r.push(e,t)});var i=r.length;for(e=w(e,n,3);i--&&e(r[i--],r[i],t)!==!1;);return t}function Ee(t,e,n){var r=hi(t),i=r.length;for(e=w(e,n,3);i--;){var o=r[i];if(e(t[o],o,t)===!1)break}return t}function je(t){var e=[];return ki(t,function(t,n){De(t)&&e.push(n)}),e.sort()}function Te(t,e){return t?Br.call(t,e):!1}function Oe(t){for(var e=-1,n=hi(t),r=n.length,i={};++e<r;){var o=n[e];i[t[o]]=o}return i}function Pe(t){return t===!0||t===!1||t&&"object"==typeof t&&Ir.call(t)==U||!1}function Me(t){return t&&"object"==typeof t&&Ir.call(t)==$||!1}function Ne(t){return t&&1===t.nodeType||!1}function Le(t){var e=!0;if(!t)return e;var n=Ir.call(t),r=t.length;return n==B||n==J||(ui.argsClass?n==Y:be(t))||n==Z&&"number"==typeof r&&De(t.splice)?!r:(Ci(t,function(){return e=!1}),e)}function Ae(t,e,n,r){return se(t,e,"function"==typeof n&&w(n,r,2))}function We(t){return Qr(t)&&!ti(parseFloat(t))}function De(t){return"function"==typeof t}function Ie(t){return!(!t||!re[typeof t])}function Re(t){return qe(t)&&t!=+t}function He(t){return null===t}function qe(t){return"number"==typeof t||t&&"object"==typeof t&&Ir.call(t)==K||!1}function ze(t){return t&&re[typeof t]&&Ir.call(t)==G||!1}function Xe(t){return"string"==typeof t||t&&"object"==typeof t&&Ir.call(t)==J||!1}function Ye(t){return"undefined"==typeof t}function Be(t,n,r){var i={};return n=e.createCallback(n,r,3),Ci(t,function(t,e,r){i[e]=n(t,e,r)}),i}function Ue(t){var e=arguments,n=2;if(!Ie(t))return t;if("number"!=typeof e[2]&&(n=e.length),n>3&&"function"==typeof e[n-2])var r=w(e[--n-1],e[n--],2);else n>2&&"function"==typeof e[n-1]&&(r=e[--n]);for(var i=y(arguments,1,n),o=-1,s=p(),a=p();++o<n;)ae(t,i[o],r,s,a);return g(s),g(a),t}function $e(t,n,r){var i={};if("function"!=typeof n){var o=[];ki(t,function(t,e){o.push(e)}),o=j(o,ie(arguments,!0,!1,1));for(var s=-1,a=o.length;++s<a;){var u=o[s];i[u]=t[u]}}else n=e.createCallback(n,r,3),ki(t,function(t,e,r){n(t,e,r)||(i[e]=t)});return i}function Fe(t){for(var e=-1,n=hi(t),r=n.length,i=Sr(r);++e<r;){var o=n[e];i[e]=[o,t[o]]}return i}function Ve(t,n,r){var i={};if("function"!=typeof n)for(var o=-1,s=ie(arguments,!0,!1,1),a=Ie(t)?s.length:0;++o<a;){var u=s[o];u in t&&(i[u]=t[u])}else n=e.createCallback(n,r,3),ki(t,function(t,e,r){n(t,e,r)&&(i[e]=t)});return i}function Ke(t,n,r,i){var o=fi(t);if(null==r)if(o)r=[];else{var s=t&&t.constructor,u=s&&s.prototype;r=a(u)}return n&&(n=e.createCallback(n,i,4),(o?Si:Ci)(t,function(t,e,i){return n(r,t,e,i)})),r}function Ze(t){for(var e=-1,n=hi(t),r=n.length,i=Sr(r);++e<r;)i[e]=t[n[e]];return i}function Ge(t){var e=arguments,n=-1,r=ie(e,!0,!1,1),i=e[2]&&e[2][e[1]]===t?1:r.length,o=Sr(i);for(ui.unindexedChars&&Xe(t)&&(t=t.split(""));++n<i;)o[n]=t[r[n]];return o}function Je(t,e,n){var r=-1,i=ge(),o=t?t.length:0,s=!1;return n=(0>n?ni(0,o+n):n)||0,fi(t)?s=i(t,e,n)>-1:"number"==typeof o?s=(Xe(t)?t.indexOf(e,n):i(t,e,n))>-1:Si(t,function(t){return++r>=n?!(s=t===e):void 0}),s}function Qe(t,n,r){var i=!0;if(n=e.createCallback(n,r,3),fi(t))for(var o=-1,s=t.length;++o<s&&(i=!!n(t[o],o,t)););else Si(t,function(t,e,r){return i=!!n(t,e,r)});return i}function tn(t,n,r){var i=[];if(n=e.createCallback(n,r,3),fi(t))for(var o=-1,s=t.length;++o<s;){var a=t[o];n(a,o,t)&&i.push(a)}else Si(t,function(t,e,r){n(t,e,r)&&i.push(t)});return i}function en(t,n,r){if(n=e.createCallback(n,r,3),!fi(t)){var i;return Si(t,function(t,e,r){return n(t,e,r)?(i=t,!1):void 0}),i}for(var o=-1,s=t.length;++o<s;){var a=t[o];if(n(a,o,t))return a}}function nn(t,n,r){var i;return n=e.createCallback(n,r,3),on(t,function(t,e,r){return n(t,e,r)?(i=t,!1):void 0}),i}function rn(t,e,n){if(e&&"undefined"==typeof n&&fi(t))for(var r=-1,i=t.length;++r<i&&e(t[r],r,t)!==!1;);else Si(t,e,n);return t}function on(t,e,n){var r=t,i=t?t.length:0;if(e=e&&"undefined"==typeof n?e:w(e,n,3),fi(t))for(;i--&&e(t[i],i,t)!==!1;);else{if("number"!=typeof i){var o=hi(t);i=o.length}else ui.unindexedChars&&Xe(t)&&(r=t.split(""));Si(t,function(t,n,s){return n=o?o[--i]:--i,e(r[n],n,s)})}return t}function sn(t,e){var n=y(arguments,2),r=-1,i="function"==typeof e,o=t?t.length:0,s=Sr("number"==typeof o?o:0);return rn(t,function(t){s[++r]=(i?e:t[e]).apply(t,n)}),s}function an(t,n,r){var i=-1,o=t?t.length:0,s=Sr("number"==typeof o?o:0);if(n=e.createCallback(n,r,3),fi(t))for(;++i<o;)s[i]=n(t[i],i,t);else Si(t,function(t,e,r){s[++i]=n(t,e,r)});return s}function un(t,n,r){var i=-1/0,o=i;if("function"!=typeof n&&r&&r[n]===t&&(n=null),null==n&&fi(t))for(var s=-1,a=t.length;++s<a;){var l=t[s];l>o&&(o=l)}else n=null==n&&Xe(t)?u:e.createCallback(n,r,3),Si(t,function(t,e,r){var s=n(t,e,r);s>i&&(i=s,o=t)});return o}function ln(t,n,r){var i=1/0,o=i;if("function"!=typeof n&&r&&r[n]===t&&(n=null),null==n&&fi(t))for(var s=-1,a=t.length;++s<a;){var l=t[s];o>l&&(o=l)}else n=null==n&&Xe(t)?u:e.createCallback(n,r,3),Si(t,function(t,e,r){var s=n(t,e,r);i>s&&(i=s,o=t)});return o}function cn(t,n,r,i){var o=arguments.length<3;if(n=e.createCallback(n,i,4),fi(t)){var s=-1,a=t.length;for(o&&(r=t[++s]);++s<a;)r=n(r,t[s],s,t)}else Si(t,function(t,e,i){r=o?(o=!1,t):n(r,t,e,i)});return r}function fn(t,n,r,i){var o=arguments.length<3;return n=e.createCallback(n,i,4),on(t,function(t,e,i){r=o?(o=!1,t):n(r,t,e,i)}),r}function pn(t,n,r){return n=e.createCallback(n,r,3),tn(t,function(t,e,r){return!n(t,e,r)})}function hn(t,e,n){if(t&&"number"!=typeof t.length?t=Ze(t):ui.unindexedChars&&Xe(t)&&(t=t.split("")),null==e||n)return t?t[ue(0,t.length-1)]:b;var r=dn(t);return r.length=ri(ni(0,e),r.length),r}function dn(t){var e=-1,n=t?t.length:0,r=Sr("number"==typeof n?n:0);return rn(t,function(t){var n=ue(0,++e);r[e]=r[n],r[n]=t}),r}function gn(t){var e=t?t.length:0;return"number"==typeof e?e:hi(t).length}function vn(t,n,r){var i;if(n=e.createCallback(n,r,3),fi(t))for(var o=-1,s=t.length;++o<s&&!(i=n(t[o],o,t)););else Si(t,function(t,e,r){return!(i=n(t,e,r))});return!!i}function yn(t,n,r){var i=-1,o=fi(n),s=t?t.length:0,a=Sr("number"==typeof s?s:0);for(o||(n=e.createCallback(n,r,3)),rn(t,function(t,e,r){var s=a[++i]=h();o?s.criteria=an(n,function(e){return t[e]}):(s.criteria=p())[0]=n(t,e,r),s.index=i,s.value=t}),s=a.length,a.sort(l);s--;){var u=a[s];a[s]=u.value,o||g(u.criteria),v(u)}return a}function mn(t){return t&&"number"==typeof t.length?ui.unindexedChars&&Xe(t)?t.split(""):y(t):Ze(t)}function bn(t){for(var e=-1,n=t?t.length:0,r=[];++e<n;){var i=t[e];i&&r.push(i)}return r}function wn(t){return j(t,ie(arguments,!0,!0,1))}function Sn(t,n,r){var i=-1,o=t?t.length:0;for(n=e.createCallback(n,r,3);++i<o;)if(n(t[i],i,t))return i;return-1}function _n(t,n,r){var i=t?t.length:0;for(n=e.createCallback(n,r,3);i--;)if(n(t[i],i,t))return i;return-1}function xn(t,n,r){var i=0,o=t?t.length:0;if("number"!=typeof n&&null!=n){var s=-1;for(n=e.createCallback(n,r,3);++s<o&&n(t[s],s,t);)i++}else if(i=n,null==i||r)return t?t[0]:b;return y(t,0,ri(ni(0,i),o))}function kn(t,e,n,r){return"boolean"!=typeof e&&null!=e&&(r=n,n="function"!=typeof e&&r&&r[e]===t?null:e,e=!1),null!=n&&(t=an(t,n,r)),ie(t,e)}function Cn(t,e,n){if("number"==typeof n){var r=t?t.length:0;n=0>n?ni(0,r+n):n||0}else if(n){var i=An(t,e);return t[i]===e?i:-1}return o(t,e,n)}function En(t,n,r){var i=0,o=t?t.length:0;if("number"!=typeof n&&null!=n){var s=o;for(n=e.createCallback(n,r,3);s--&&n(t[s],s,t);)i++}else i=null==n||r?1:n||i;return y(t,0,ri(ni(0,o-i),o))}function jn(){for(var t=[],e=-1,n=arguments.length,r=p(),i=ge(),a=i===o,u=p();++e<n;){var l=arguments[e];(fi(l)||be(l))&&(t.push(l),r.push(a&&l.length>=E&&c(e?t[e]:u)))}var f=t[0],h=-1,d=f?f.length:0,y=[];t:for(;++h<d;){var m=r[0];if(l=f[h],(m?s(m,l):i(u,l))<0){for(e=n,(m||u).push(l);--e;)if(m=r[e],(m?s(m,l):i(t[e],l))<0)continue t;y.push(l)}}for(;n--;)m=r[n],m&&v(m);return g(r),g(u),y}function Tn(t,n,r){var i=0,o=t?t.length:0;if("number"!=typeof n&&null!=n){var s=o;for(n=e.createCallback(n,r,3);s--&&n(t[s],s,t);)i++}else if(i=n,null==i||r)return t?t[o-1]:b;return y(t,ni(0,o-i))}function On(t,e,n){var r=t?t.length:0;for("number"==typeof n&&(r=(0>n?ni(0,r+n):ri(n,r-1))+1);r--;)if(t[r]===e)return r;return-1}function Pn(t){for(var e=arguments,n=0,r=e.length,i=t?t.length:0;++n<r;)for(var o=-1,s=e[n];++o<i;)t[o]===s&&(Vr.call(t,o--,1),i--);return t}function Mn(t,e,n){t=+t||0,n="number"==typeof n?n:+n||1,null==e&&(e=t,t=0);for(var r=-1,i=ni(0,Hr((e-t)/(n||1))),o=Sr(i);++r<i;)o[r]=t,t+=n;return o}function Nn(t,n,r){var i=-1,o=t?t.length:0,s=[];for(n=e.createCallback(n,r,3);++i<o;){var a=t[i];n(a,i,t)&&(s.push(a),Vr.call(t,i--,1),o--)}return s}function Ln(t,n,r){if("number"!=typeof n&&null!=n){var i=0,o=-1,s=t?t.length:0;for(n=e.createCallback(n,r,3);++o<s&&n(t[o],o,t);)i++}else i=null==n||r?1:ni(0,n);return y(t,i)}function An(t,n,r,i){var o=0,s=t?t.length:o;for(r=r?e.createCallback(r,i,1):or,n=r(n);s>o;){var a=o+s>>>1;r(t[a])<n?o=a+1:s=a}return o}function Wn(){return ce(ie(arguments,!0,!0))}function Dn(t,n,r,i){return"boolean"!=typeof n&&null!=n&&(i=r,r="function"!=typeof n&&i&&i[n]===t?null:n,n=!1),null!=r&&(r=e.createCallback(r,i,3)),ce(t,n,r)}function In(t){return j(t,y(arguments,1))}function Rn(){for(var t=-1,e=arguments.length;++t<e;){var n=arguments[t];if(fi(n)||be(n))var r=r?ce(j(r,n).concat(j(n,r))):n}return r||[]}function Hn(){for(var t=arguments.length>1?arguments:arguments[0],e=-1,n=t?un(Pi(t,"length")):0,r=Sr(0>n?0:n);++e<n;)r[e]=Pi(t,e);return r}function qn(t,e){var n=-1,r=t?t.length:0,i={};for(e||!r||fi(t[0])||(e=[]);++n<r;){var o=t[n];e?i[o]=e[n]:o&&(i[o[0]]=o[1])}return i}function zn(t,e){if(!De(e))throw new Mr;return function(){return--t<1?e.apply(this,arguments):void 0}}function Xn(t,e){return arguments.length>2?pe(t,17,y(arguments,2),null,e):pe(t,1,null,null,e)}function Yn(t){for(var e=arguments.length>1?ie(arguments,!0,!1,1):je(t),n=-1,r=e.length;++n<r;){var i=e[n];t[i]=pe(t[i],1,null,null,t)}return t}function Bn(t,e){return arguments.length>2?pe(e,19,y(arguments,2),null,t):pe(e,3,null,null,t)}function Un(){for(var t=arguments,e=t.length;e--;)if(!De(t[e]))throw new Mr;return function(){for(var e=arguments,n=t.length;n--;)e=[t[n].apply(this,e)];return e[0]}}function $n(t,e){return e="number"==typeof e?e:+e||t.length,pe(t,4,null,null,null,e)}function Fn(t,e,n){var r,i,o,s,a,u,l,c=0,f=!1,p=!0;if(!De(t))throw new Mr;if(e=ni(0,e)||0,n===!0){var h=!0;p=!1}else Ie(n)&&(h=n.leading,f="maxWait"in n&&(ni(e,n.maxWait)||0),p="trailing"in n?n.trailing:p);var d=function(){var n=e-(Ni()-s);if(0>=n){i&&qr(i);var f=l;i=u=l=b,f&&(c=Ni(),o=t.apply(a,r),u||i||(r=a=null))}else u=Fr(d,n)},g=function(){u&&qr(u),i=u=l=b,(p||f!==e)&&(c=Ni(),o=t.apply(a,r),u||i||(r=a=null))};return function(){if(r=arguments,s=Ni(),a=this,l=p&&(u||!h),f===!1)var n=h&&!u;else{i||h||(c=s);var v=f-(s-c),y=0>=v;y?(i&&(i=qr(i)),c=s,o=t.apply(a,r)):i||(i=Fr(g,v))}return y&&u?u=qr(u):u||e===f||(u=Fr(d,e)),n&&(y=!0,o=t.apply(a,r)),!y||u||i||(r=a=null),o}}function Vn(t){if(!De(t))throw new Mr;var e=y(arguments,1);return Fr(function(){t.apply(b,e)},1)}function Kn(t,e){if(!De(t))throw new Mr;var n=y(arguments,2);return Fr(function(){t.apply(b,n)},e)}function Zn(t,e){if(!De(t))throw new Mr;var n=function(){var r=n.cache,i=e?e.apply(this,arguments):C+arguments[0];return Br.call(r,i)?r[i]:r[i]=t.apply(this,arguments)};return n.cache={},n}function Gn(t){var e,n;if(!De(t))throw new Mr;return function(){return e?n:(e=!0,n=t.apply(this,arguments),t=null,n)}}function Jn(t){return pe(t,16,y(arguments,1))}function Qn(t){return pe(t,32,null,y(arguments,1))}function tr(t,e,n){var r=!0,i=!0;if(!De(t))throw new Mr;return n===!1?r=!1:Ie(n)&&(r="leading"in n?n.leading:r,i="trailing"in n?n.trailing:i),te.leading=r,te.maxWait=e,te.trailing=i,Fn(t,e,te)}function er(t,e){return pe(e,16,[t])}function nr(t){return function(){return t}}function rr(t,e,n){var r=typeof t;if(null==t||"function"==r)return w(t,e,n);if("object"!=r)return lr(t);var i=hi(t),o=i[0],s=t[o];return 1!=i.length||s!==s||Ie(s)?function(e){for(var n=i.length,r=!1;n--&&(r=se(e[i[n]],t[i[n]],null,!0)););return r}:function(t){var e=t[o];return s===e&&(0!==s||1/s==1/e)}}function ir(t){return null==t?"":Pr(t).replace(wi,de)}function or(t){return t}function sr(t,r,i){var o=!0,s=r&&je(r);r&&(i||s.length)||(null==i&&(i=r),a=n,r=t,t=e,s=je(r)),i===!1?o=!1:Ie(i)&&"chain"in i&&(o=i.chain);var a=t,u=De(a);rn(s,function(e){var n=t[e]=r[e];u&&(a.prototype[e]=function(){var e=this.__chain__,r=this.__wrapped__,i=[r];Ur.apply(i,arguments);var s=n.apply(t,i);if(o||e){if(r===s&&Ie(s))return this;s=new a(s),s.__chain__=e}return s})})}function ar(){return t._=Dr,this}function ur(){}function lr(t){return function(e){return e[t]}}function cr(t,e,n){var r=null==t,i=null==e;if(null==n&&("boolean"==typeof t&&i?(n=t,t=1):i||"boolean"!=typeof e||(n=e,i=!0)),r&&i&&(e=1),t=+t||0,i?(e=t,t=0):e=+e||0,n||t%1||e%1){var o=oi();return ri(t+o*(e-t+parseFloat("1e-"+((o+"").length-1))),e)}return ue(t,e)}function fr(t,e){if(t){var n=t[e];return De(n)?t[e]():n}}function pr(t,n,r){var i=e.templateSettings;t=Pr(t||""),r=xi({},r,i);var o,s=xi({},r.imports,i.imports),a=hi(s),u=Ze(s),l=0,c=r.interpolate||I,p="__p += '",h=Or((r.escape||I).source+"|"+c.source+"|"+(c===W?N:I).source+"|"+(r.evaluate||I).source+"|$","g");t.replace(h,function(e,n,r,i,s,a){return r||(r=i),p+=t.slice(l,a).replace(H,f),n&&(p+="' +\n__e("+n+") +\n'"),s&&(o=!0,p+="';\n"+s+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=a+e.length,e}),p+="';\n";var d=r.variable,g=d;g||(d="obj",p="with ("+d+") {\n"+p+"\n}\n"),p=(o?p.replace(O,""):p).replace(P,"$1").replace(M,"$1;"),p="function("+d+") {\n"+(g?"":d+" || ("+d+" = {});\n")+"var __t, __p = '', __e = _.escape"+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var v="\n/*\n//# sourceURL="+(r.sourceURL||"/lodash/template/source["+X++ +"]")+"\n*/";try{var y=Cr(a,"return "+p+v).apply(b,u)}catch(m){throw m.source=p,m}return n?y(n):(y.source=p,y)}function hr(t,e,n){t=(t=+t)>-1?t:0;var r=-1,i=Sr(t);for(e=w(e,n,1);++r<t;)i[r]=e(r);return i}function dr(t){return null==t?"":Pr(t).replace(bi,me)}function gr(t){var e=++_;return Pr(null==t?"":t)+e}function vr(t){return t=new n(t),t.__chain__=!0,t}function yr(t,e){return e(t),t}function mr(){return this.__chain__=!0,this}function br(){return Pr(this.__wrapped__)}function wr(){return this.__wrapped__}t=t?le.defaults(oe.Object(),t,le.pick(oe,q)):oe;var Sr=t.Array,_r=t.Boolean,xr=t.Date,kr=t.Error,Cr=t.Function,Er=t.Math,jr=t.Number,Tr=t.Object,Or=t.RegExp,Pr=t.String,Mr=t.TypeError,Nr=[],Lr=kr.prototype,Ar=Tr.prototype,Wr=Pr.prototype,Dr=t._,Ir=Ar.toString,Rr=Or("^"+Pr(Ir).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),Hr=Er.ceil,qr=t.clearTimeout,zr=Er.floor,Xr=Cr.prototype.toString,Yr=ve(Yr=Tr.getPrototypeOf)&&Yr,Br=Ar.hasOwnProperty,Ur=Nr.push,$r=Ar.propertyIsEnumerable,Fr=t.setTimeout,Vr=Nr.splice,Kr=Nr.unshift,Zr=function(){try{var t={},e=ve(e=Tr.defineProperty)&&e,n=e(t,t,t)&&e}catch(r){}return n}(),Gr=ve(Gr=Tr.create)&&Gr,Jr=ve(Jr=Sr.isArray)&&Jr,Qr=t.isFinite,ti=t.isNaN,ei=ve(ei=Tr.keys)&&ei,ni=Er.max,ri=Er.min,ii=t.parseInt,oi=Er.random,si={};si[B]=Sr,si[U]=_r,si[$]=xr,si[V]=Cr,si[Z]=Tr,si[K]=jr,si[G]=Or,si[J]=Pr;var ai={};ai[B]=ai[$]=ai[K]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},ai[U]=ai[J]={constructor:!0,toString:!0,valueOf:!0},ai[F]=ai[V]=ai[G]={constructor:!0,toString:!0},ai[Z]={constructor:!0},function(){for(var t=z.length;t--;){var e=z[t];for(var n in ai)Br.call(ai,n)&&!Br.call(ai[n],e)&&(ai[n][e]=!1)}}(),n.prototype=e.prototype;var ui=e.support={};!function(){var e=function(){this.x=1},n={0:1,length:1},r=[];e.prototype={valueOf:1,y:1};for(var i in new e)r.push(i);for(i in arguments);ui.argsClass=Ir.call(arguments)==Y,ui.argsObject=arguments.constructor==Tr&&!(arguments instanceof Sr),ui.enumErrorProps=$r.call(Lr,"message")||$r.call(Lr,"name"),ui.enumPrototypes=$r.call(e,"prototype"),ui.funcDecomp=!ve(t.WinRTError)&&R.test(m),ui.funcNames="string"==typeof Cr.name,ui.nonEnumArgs=0!=i,ui.nonEnumShadows=!/valueOf/.test(r),ui.ownLast="x"!=r[0],ui.spliceObjects=(Nr.splice.call(n,0,1),!n[0]),ui.unindexedChars="x"[0]+Tr("x")[0]!="xx";try{ui.nodeClass=!(Ir.call(document)==Z&&!({toString:0}+""))}catch(o){ui.nodeClass=!0}}(1),e.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:W,variable:"",imports:{_:e}};var li=function(t){var e="var index, iterable = "+t.firstArg+", result = "+t.init+";\nif (!iterable) return result;\n"+t.top+";";t.array?(e+="\nvar length = iterable.length; index = -1;\nif ("+t.array+") { ",ui.unindexedChars&&(e+="\n if (isString(iterable)) {\n iterable = iterable.split('')\n } "),e+="\n while (++index < length) {\n "+t.loop+";\n }\n}\nelse { "):ui.nonEnumArgs&&(e+="\n var length = iterable.length; index = -1;\n if (length && isArguments(iterable)) {\n while (++index < length) {\n index += '';\n "+t.loop+";\n }\n } else { "),ui.enumPrototypes&&(e+="\n var skipProto = typeof iterable == 'function';\n "),ui.enumErrorProps&&(e+="\n var skipErrorProps = iterable === errorProto || iterable instanceof Error;\n ");var n=[];if(ui.enumPrototypes&&n.push('!(skipProto && index == "prototype")'),ui.enumErrorProps&&n.push('!(skipErrorProps && (index == "message" || index == "name"))'),t.useHas&&t.keys)e+="\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] && keys(iterable),\n length = ownProps ? ownProps.length : 0;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n",n.length&&(e+=" if ("+n.join(" && ")+") {\n "),e+=t.loop+"; ",n.length&&(e+="\n }"),e+="\n } ";else if(e+="\n for (index in iterable) {\n",t.useHas&&n.push("hasOwnProperty.call(iterable, index)"),n.length&&(e+=" if ("+n.join(" && ")+") {\n "),e+=t.loop+"; ",n.length&&(e+="\n }"),e+="\n } ",ui.nonEnumShadows){for(e+="\n\n if (iterable !== objectProto) {\n var ctor = iterable.constructor,\n isProto = iterable === (ctor && ctor.prototype),\n className = iterable === stringProto ? stringClass : iterable === errorProto ? errorClass : toString.call(iterable),\n nonEnum = nonEnumProps[className];\n ",k=0;k<7;k++)e+="\n index = '"+t.shadowedProps[k]+"';\n if ((!(isProto && nonEnum[index]) && hasOwnProperty.call(iterable, index))",t.useHas||(e+=" || (!nonEnum[index] && iterable[index] !== objectProto[index])"),e+=") {\n "+t.loop+";\n } ";e+="\n } "}return(t.array||ui.nonEnumArgs)&&(e+="\n}"),e+=t.bottom+";\nreturn result"};Gr||(a=function(){function e(){}return function(n){if(Ie(n)){e.prototype=n;var r=new e;e.prototype=null}return r||t.Object()}}());var ci=Zr?function(t,e){ee.value=e,Zr(t,"__bindData__",ee)}:ur;ui.argsClass||(be=function(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Br.call(t,"callee")&&!$r.call(t,"callee")||!1 });var fi=Jr||function(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Ir.call(t)==B||!1},pi=he({args:"object",init:"[]",top:"if (!(objectTypes[typeof object])) return result",loop:"result.push(index)"}),hi=ei?function(t){return Ie(t)?ui.enumPrototypes&&"function"==typeof t||ui.nonEnumArgs&&t.length&&be(t)?pi(t):ei(t):[]}:pi,di={args:"collection, callback, thisArg",top:"callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)",array:"typeof length == 'number'",keys:hi,loop:"if (callback(iterable[index], index, collection) === false) return result"},gi={args:"object, source, guard",top:"var args = arguments,\n argsIndex = 0,\n argsLength = typeof guard == 'number' ? 2 : args.length;\nwhile (++argsIndex < argsLength) {\n iterable = args[argsIndex];\n if (iterable && objectTypes[typeof iterable]) {",keys:hi,loop:"if (typeof result[index] == 'undefined') result[index] = iterable[index]",bottom:" }\n}"},vi={top:"if (!objectTypes[typeof iterable]) return result;\n"+di.top,array:!1},yi={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},mi=Oe(yi),bi=Or("("+hi(mi).join("|")+")","g"),wi=Or("["+hi(yi).join("")+"]","g"),Si=he(di),_i=he(gi,{top:gi.top.replace(";",";\nif (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);\n} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n callback = args[--argsLength];\n}"),loop:"result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]"}),xi=he(gi),ki=he(di,vi,{useHas:!1}),Ci=he(di,vi);De(/x/)&&(De=function(t){return"function"==typeof t&&Ir.call(t)==V});var Ei=Yr?function(t){if(!t||Ir.call(t)!=Z||!ui.argsClass&&be(t))return!1;var e=t.valueOf,n=ve(e)&&(n=Yr(e))&&Yr(n);return n?t==n||Yr(t)==n:ye(t)}:ye,ji=fe(function(t,e,n){Br.call(t,n)?t[n]++:t[n]=1}),Ti=fe(function(t,e,n){(Br.call(t,n)?t[n]:t[n]=[]).push(e)}),Oi=fe(function(t,e,n){t[n]=e}),Pi=an,Mi=tn,Ni=ve(Ni=xr.now)&&Ni||function(){return(new xr).getTime()},Li=8==ii(T+"08")?ii:function(t,e){return ii(Xe(t)?t.replace(D,""):t,e||0)};return e.after=zn,e.assign=_i,e.at=Ge,e.bind=Xn,e.bindAll=Yn,e.bindKey=Bn,e.chain=vr,e.compact=bn,e.compose=Un,e.constant=nr,e.countBy=ji,e.create=_e,e.createCallback=rr,e.curry=$n,e.debounce=Fn,e.defaults=xi,e.defer=Vn,e.delay=Kn,e.difference=wn,e.filter=tn,e.flatten=kn,e.forEach=rn,e.forEachRight=on,e.forIn=ki,e.forInRight=Ce,e.forOwn=Ci,e.forOwnRight=Ee,e.functions=je,e.groupBy=Ti,e.indexBy=Oi,e.initial=En,e.intersection=jn,e.invert=Oe,e.invoke=sn,e.keys=hi,e.map=an,e.mapValues=Be,e.max=un,e.memoize=Zn,e.merge=Ue,e.min=ln,e.omit=$e,e.once=Gn,e.pairs=Fe,e.partial=Jn,e.partialRight=Qn,e.pick=Ve,e.pluck=Pi,e.property=lr,e.pull=Pn,e.range=Mn,e.reject=pn,e.remove=Nn,e.rest=Ln,e.shuffle=dn,e.sortBy=yn,e.tap=yr,e.throttle=tr,e.times=hr,e.toArray=mn,e.transform=Ke,e.union=Wn,e.uniq=Dn,e.values=Ze,e.where=Mi,e.without=In,e.wrap=er,e.xor=Rn,e.zip=Hn,e.zipObject=qn,e.collect=an,e.drop=Ln,e.each=rn,e.eachRight=on,e.extend=_i,e.methods=je,e.object=qn,e.select=tn,e.tail=Ln,e.unique=Dn,e.unzip=Hn,sr(e),e.clone=we,e.cloneDeep=Se,e.contains=Je,e.escape=ir,e.every=Qe,e.find=en,e.findIndex=Sn,e.findKey=xe,e.findLast=nn,e.findLastIndex=_n,e.findLastKey=ke,e.has=Te,e.identity=or,e.indexOf=Cn,e.isArguments=be,e.isArray=fi,e.isBoolean=Pe,e.isDate=Me,e.isElement=Ne,e.isEmpty=Le,e.isEqual=Ae,e.isFinite=We,e.isFunction=De,e.isNaN=Re,e.isNull=He,e.isNumber=qe,e.isObject=Ie,e.isPlainObject=Ei,e.isRegExp=ze,e.isString=Xe,e.isUndefined=Ye,e.lastIndexOf=On,e.mixin=sr,e.noConflict=ar,e.noop=ur,e.now=Ni,e.parseInt=Li,e.random=cr,e.reduce=cn,e.reduceRight=fn,e.result=fr,e.runInContext=m,e.size=gn,e.some=vn,e.sortedIndex=An,e.template=pr,e.unescape=dr,e.uniqueId=gr,e.all=Qe,e.any=vn,e.detect=en,e.findWhere=en,e.foldl=cn,e.foldr=fn,e.include=Je,e.inject=cn,sr(function(){var t={};return Ci(e,function(n,r){e.prototype[r]||(t[r]=n)}),t}(),!1),e.first=xn,e.last=Tn,e.sample=hn,e.take=xn,e.head=xn,Ci(e,function(t,r){var i="sample"!==r;e.prototype[r]||(e.prototype[r]=function(e,r){var o=this.__chain__,s=t(this.__wrapped__,e,r);return o||null!=e&&(!r||i&&"function"==typeof e)?new n(s,o):s})}),e.VERSION="2.4.1",e.prototype.chain=mr,e.prototype.toString=br,e.prototype.value=wr,e.prototype.valueOf=wr,Si(["join","pop","shift"],function(t){var r=Nr[t];e.prototype[t]=function(){var t=this.__chain__,e=r.apply(this.__wrapped__,arguments);return t?new n(e,t):e}}),Si(["push","reverse","sort","unshift"],function(t){var n=Nr[t];e.prototype[t]=function(){return n.apply(this.__wrapped__,arguments),this}}),Si(["concat","slice","splice"],function(t){var r=Nr[t];e.prototype[t]=function(){return new n(r.apply(this.__wrapped__,arguments),this.__chain__)}}),ui.spliceObjects||Si(["pop","shift","splice"],function(t){var r=Nr[t],i="splice"==t;e.prototype[t]=function(){var t=this.__chain__,e=this.__wrapped__,o=r.apply(e,arguments);return 0===e.length&&delete e[0],t||i?new n(o,t):o}}),e}var b,w=[],S=[],_=0,x={},C=+new Date+"",E=75,j=40,T=" \f \n\r\u2028\u2029 ᠎              ",O=/\b__p \+= '';/g,P=/\b(__p \+=) '' \+/g,M=/(__e\(.*?\)|\b__t\)) \+\n'';/g,N=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,L=/\w*$/,A=/^\s*function[ \n\r\t]+\w/,W=/<%=([\s\S]+?)%>/g,D=RegExp("^["+T+"]*0+(?=.$)"),I=/($^)/,R=/\bthis\b/,H=/['\n\r\t\u2028\u2029\\]/g,q=["Array","Boolean","Date","Error","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],z=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],X=0,Y="[object Arguments]",B="[object Array]",U="[object Boolean]",$="[object Date]",F="[object Error]",V="[object Function]",K="[object Number]",Z="[object Object]",G="[object RegExp]",J="[object String]",Q={};Q[V]=!1,Q[Y]=Q[B]=Q[U]=Q[$]=Q[K]=Q[Z]=Q[G]=Q[J]=!0;var te={leading:!1,maxWait:0,trailing:!1},ee={configurable:!1,enumerable:!1,value:null,writable:!1},ne={args:"",array:null,bottom:"",firstArg:"",init:"",keys:null,loop:"",shadowedProps:null,support:null,top:"",useHas:!1},re={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},ie={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},oe=re[typeof window]&&window||this,se=re[typeof e]&&e&&!e.nodeType&&e,ae=re[typeof t]&&t&&!t.nodeType&&t,ue=(ae&&ae.exports===se&&se,re[typeof i]&&i);!ue||ue.global!==ue&&ue.window!==ue||(oe=ue);var le=m();oe._=le,r=function(){return le}.call(e,n,e,t),!(r!==b&&(t.exports=r))}).call(this)}).call(e,n(17)(t),function(){return this}())},function(t){var e={changeSlide:function(t){var e,n,r;if(r=this.state.slideCount%this.props.slidesToScroll!==0,e=r?0:(this.state.slideCount-this.state.currentSlide)%this.props.slidesToScroll,"previous"===t.message)n=0===e?this.props.slidesToScroll:this.props.slidesToShow-e,this.state.slideCount>this.props.slidesToShow&&this.slideHandler(this.state.currentSlide-n,!1);else if("next"===t.message)n=0===e?this.props.slidesToScroll:e,this.state.slideCount>this.props.slidesToShow&&this.slideHandler(this.state.currentSlide+n,!1);else if("index"===t.message){var i=t.index*this.props.slidesToScroll;i!==this.state.currentSlide&&this.slideHandler(i)}this.autoPlay()},keyHandler:function(){},selectHandler:function(){},swipeStart:function(t){var e,n;this.props.swipe===!1||"ontouchend"in document&&this.props.swipe===!1||(this.props.draggable!==!1||-1===t.type.indexOf("mouse"))&&(e=void 0!==t.touches?t.touches[0].pageX:t.clientX,n=void 0!==t.touches?t.touches[0].pageY:t.clientY,this.setState({dragging:!0,touchObject:{startX:e,startY:n,curX:e,curY:n}}),t.preventDefault())},swipeMove:function(t){if(this.state.dragging&&!this.state.animating){var e,n,r=this.state.touchObject;n=this.getLeft(this.state.currentSlide),r.curX=t.touches?t.touches[0].pageX:t.clientX,r.curY=t.touches?t.touches[0].pageY:t.clientY,r.swipeLength=Math.round(Math.sqrt(Math.pow(r.curX-r.startX,2))),positionOffset=(this.props.rtl===!1?1:-1)*(r.curX>r.startX?1:-1),e=n+r.swipeLength*positionOffset,this.setState({touchObject:r,swipeLeft:e,trackStyle:this.getCSS(e)}),t.preventDefault()}},swipeEnd:function(t){if(this.state.dragging){var e=this.state.touchObject,n=this.state.listWidth/this.props.touchThreshold,r=this.swipeDirection(e);this.setState({dragging:!1,touchObject:{}}),e.swipeLength>n?"left"===r?this.slideHandler(this.state.currentSlide+this.props.slidesToScroll):"right"===r?this.slideHandler(this.state.currentSlide-this.props.slidesToScroll):this.slideHandler(this.state.currentSlide,null,!0):this.slideHandler(this.state.currentSlide,null,!0),t.preventDefault()}}};t.exports=e},function(t,e,n){var r=(n(5),n(2)),i=n(13),o=n(14),s={initialize:function(t){var e=r.Children.count(t.children),n=this.refs.list.getDOMNode().getBoundingClientRect().width,i=this.refs.track.getDOMNode().getBoundingClientRect().width,o=this.getDOMNode().getBoundingClientRect().width/t.slidesToShow;this.setState({slideCount:e,slideWidth:o,listWidth:n,trackWidth:i,currentSlide:0},function(){var t=this.getCSS(this.getLeft(0));this.setState({trackStyle:t})})},getDotCount:function(){var t;return t=Math.ceil(this.state.slideCount/this.props.slidesToScroll),t-1},getLeft:function(t){var e,n,r=0;if(this.props.infinite===!0&&(this.state.slideCount>this.props.slidesToShow&&(r=this.state.slideWidth*this.props.slidesToShow*-1),this.state.slideCount%this.props.slidesToScroll!==0&&t+this.props.slidesToScroll>this.state.slideCount&&this.state.slideCount>this.props.slidesToShow&&(r=t>this.state.slideCount?(this.props.slidesToShow-(t-this.state.slideCount))*this.state.slideWidth*-1:this.state.slideCount%this.props.slidesToScroll*this.state.slideWidth*-1)),this.props.centerMode===!0&&this.props.infinite===!0?r+=this.state.slideWidth*Math.floor(this.props.slidesToShow/2)-this.state.slideWidth:this.props.centerMode===!0&&(r=this.state.slideWidth*Math.floor(this.props.slidesToShow/2)),e=t*this.state.slideWidth*-1+r,this.props.variableWidth===!0){var i;this.state.slideCount<=this.props.slidesToShow||this.props.infinite===!1?n=this.refs.track.getDOMNode().childNodes[t]:(i=t+this.props.slidesToShow,n=this.refs.track.getDOMNode().childNodes[i]),e=n?-1*n.offsetLeft:0,this.props.centerMode===!0&&(n=this.props.infinite===!1?this.refs.track.getDOMNode().childNodes[t]:this.refs.track.getDOMNode().childNodes[t+this.props.slidesToShow+1],e=n?-1*n.offsetLeft:0,e+=(this.state.listWidth-n.offsetWidth)/2)}return e},getAnimateCSS:function(t){var e=this.getCSS(t);return e.transition="transform "+this.props.speed+"ms "+this.props.cssEase,e},getCSS:function(t){var e;e=this.props.variableWidth?(this.state.slideCount+2*this.props.slidesToShow)*this.state.slideWidth:this.props.centerMode?(this.state.slideCount+2*(this.props.slidesToShow+1))*this.state.slideWidth:(this.state.slideCount+2*this.props.slidesToShow)*this.state.slideWidth;var n={opacity:1,width:e,WebkitTransform:"translate3d("+t+"px, 0px, 0px)",transform:"translate3d("+t+"px, 0px, 0px)"};return n},getSlideStyle:function(){return{width:this.state.slideWidth}},getSlideClasses:function(t){var e,n,r,o,s,a,u,l=!1;return r=0>t||t>=this.state.slideCount,this.props.centerMode?(this.refs.track&&(a=this.refs.track.getDOMNode().childNodes.length),o=Math.floor(this.props.slidesToShow/2),s=this.state.currentSlide+this.props.slidesToShow,u=this.state.currentSlide+o,n=u-1===t,this.state.currentSlide>=o&&this.state.currentSlide<=this.props.slideCount-1-o&&(l=!0),l&&t>this.state.currentSlide-o&&t<=this.state.currentSlide+o+1&&(e=!0)):e=this.state.currentSlide===t,i({"slick-slide":!0,"slick-active":e,"slick-center":n,"slick-cloned":r})},getListStyle:function(){var t={};if(this.props.adaptiveHeight){var e='[data-index="'+this.state.currentSlide+'"]';this.refs.list&&(t.height=this.refs.list.getDOMNode().querySelector(e).offsetHeight)}return t},slideHandler:function(t){var e,n,r,i;this.state.animating!==!0&&(this.props.fade!==!0||this.state.currentSlide!==t)&&(this.state.slideCount<=this.props.slidesToShow||(e=t,n=0>e?this.state.slideCount%this.props.slidesToScroll!==0?this.state.slideCount-this.state.slideCount%this.props.slidesToScroll:this.state.slideCount+e:e>=this.state.slideCount?this.state.slideCount%this.props.slidesToScroll!==0?0:e-this.state.slideCount:e,r=this.getLeft(e,this.state),i=this.getLeft(n,this.state),this.props.infinite===!1&&(r=i),this.setState({animating:!0,currentSlide:n,currentLeft:i,trackStyle:this.getAnimateCSS(r)},function(){o.addEndEventListener(this.refs.track.getDOMNode(),function(){this.setState({animating:!1,trackStyle:this.getCSS(i),swipeLeft:null})}.bind(this))})))},swipeDirection:function(t){var e,n,r,i;return e=t.startX-t.curX,n=t.startY-t.curY,r=Math.atan2(n,e),i=Math.round(180*r/Math.PI),0>i&&(i=360-Math.abs(i)),45>=i&&i>=0?this.props.rtl===!1?"left":"right":360>=i&&i>=315?this.props.rtl===!1?"left":"right":i>=135&&225>=i?this.props.rtl===!1?"right":"left":"vertical"},autoPlay:function(){var t=function(){this.slideHandler(this.state.currentSlide+this.props.slidesToScroll)}.bind(this);this.props.autoplay&&window.setInterval(t,this.props.autoplaySpeed)}};t.exports=s},function(t){var e={animating:!1,dragging:!1,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,slideCount:null,slideWidth:null,swipeLeft:null,touchObject:{startX:0,startY:0,curX:0,curY:0},initialized:!1,trackStyle:{},trackWidth:0};t.exports=e},function(t){var e={className:"",adaptiveHeight:!1,arrows:!0,autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,responsive:null,rtl:!1,slide:"div",slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,variableWidth:!1,vertical:!1};t.exports=e},function(t,e,n){"use strict";function r(t,e){a(!t.ref,"You are calling cloneWithProps() on a child with a ref. This is dangerous because you're creating a new child which will not be added as a ref to its parent.");var n=o.mergeProps(e,t.props);return!n.hasOwnProperty(u)&&t.props.hasOwnProperty(u)&&(n.children=t.props.children),i.createElement(t.type,n)}var i=n(19),o=n(20),s=n(21),a=n(22),u=s({children:null});t.exports=r},function(t){function e(t){return"object"==typeof t?Object.keys(t).filter(function(e){return t[e]}).join(" "):Array.prototype.join.call(arguments," ")}t.exports=e},function(t,e,n){"use strict";function r(){var t=document.createElement("div"),e=t.style;"AnimationEvent"in window||delete a.animationend.animation,"TransitionEvent"in window||delete a.transitionend.transition;for(var n in a){var r=a[n];for(var i in r)if(i in e){u.push(r[i]);break}}}function i(t,e,n){t.addEventListener(e,n,!1)}function o(t,e,n){t.removeEventListener(e,n,!1)}var s=n(23),a={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}},u=[];s.canUseDOM&&r();var l={addEndEventListener:function(t,e){return 0===u.length?void window.setTimeout(e,0):void u.forEach(function(n){i(t,n,e)})},removeEndEventListener:function(t,e){0!==u.length&&u.forEach(function(n){o(t,n,e)})}};t.exports=l},function(t,e,n){var r=n(30),i=function(t){var e=/[height|width]$/;return e.test(t)},o=function(t){var e="",n=Object.keys(t);return n.forEach(function(o,s){var a=t[o];o=r(o),i(o)&&"number"==typeof a&&(a+="px"),e+=a===!0?o:a===!1?"not "+o:"("+o+": "+a+")",s<n.length-1&&(e+=" and ")}),e},s=function(t){var e="";return"string"==typeof t?t:t instanceof Array?(t.forEach(function(n,r){e+=o(n),r<t.length-1&&(e+=", ")}),e):o(t)};t.exports=s},function(t){var e=function(t){return t.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()}).toLowerCase()};t.exports=e},function(t){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,n){var r;!function(i,o,s){var a=window.matchMedia;"undefined"!=typeof t&&t.exports?t.exports=s(a):(r=function(){return o[i]=s(a)}.call(e,n,e,t),!(void 0!==r&&(t.exports=r)))}("enquire",this,function(t){"use strict";function e(t,e){var n,r=0,i=t.length;for(r;i>r&&(n=e(t[r],r),n!==!1);r++);}function n(t){return"[object Array]"===Object.prototype.toString.apply(t)}function r(t){return"function"==typeof t}function i(t){this.options=t,!t.deferSetup&&this.setup()}function o(e,n){this.query=e,this.isUnconditional=n,this.handlers=[],this.mql=t(e);var r=this;this.listener=function(t){r.mql=t,r.assess()},this.mql.addListener(this.listener)}function s(){if(!t)throw new Error("matchMedia not present, legacy browsers require a polyfill");this.queries={},this.browserIsIncapable=!t("only all").matches}return i.prototype={setup:function(){this.options.setup&&this.options.setup(),this.initialised=!0},on:function(){!this.initialised&&this.setup(),this.options.match&&this.options.match()},off:function(){this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(t){return this.options===t||this.options.match===t}},o.prototype={addHandler:function(t){var e=new i(t);this.handlers.push(e),this.matches()&&e.on()},removeHandler:function(t){var n=this.handlers;e(n,function(e,r){return e.equals(t)?(e.destroy(),!n.splice(r,1)):void 0})},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){e(this.handlers,function(t){t.destroy()}),this.mql.removeListener(this.listener),this.handlers.length=0},assess:function(){var t=this.matches()?"on":"off";e(this.handlers,function(e){e[t]()})}},s.prototype={register:function(t,i,s){var a=this.queries,u=s&&this.browserIsIncapable;return a[t]||(a[t]=new o(t,u)),r(i)&&(i={match:i}),n(i)||(i=[i]),e(i,function(e){a[t].addHandler(e)}),this},unregister:function(t,e){var n=this.queries[t];return n&&(e?n.removeHandler(e):(n.clear(),delete this.queries[t])),this}},new s})},function(t,e,n){"use strict";function r(t,e){Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:function(){return this._store?this._store[e]:null},set:function(t){a(!1,"Don't set the "+e+" property of the component. Mutate the existing props object instead."),this._store[e]=t}})}function i(t){try{var e={props:!0};for(var n in e)r(t,n);l=!0}catch(i){}}var o=n(28),s=n(29),a=n(22),u={key:!0,ref:!0},l=!1,c=function(t,e,n,r,i,o){return this.type=t,this.key=e,this.ref=n,this._owner=r,this._context=i,this._store={validated:!1,props:o},l?void Object.freeze(this):void(this.props=o)};c.prototype={_isReactElement:!0},i(c.prototype),c.createElement=function(t,e,n){var r,i={},l=null,f=null;if(null!=e){f=void 0===e.ref?null:e.ref,a(null!==e.key,"createElement(...): Encountered component with a `key` of null. In a future version, this will be treated as equivalent to the string 'null'; instead, provide an explicit key or use undefined."),l=null==e.key?null:""+e.key;for(r in e)e.hasOwnProperty(r)&&!u.hasOwnProperty(r)&&(i[r]=e[r])}var p=arguments.length-2;if(1===p)i.children=n;else if(p>1){for(var h=Array(p),d=0;p>d;d++)h[d]=arguments[d+2];i.children=h}if(t&&t.defaultProps){var g=t.defaultProps;for(r in g)"undefined"==typeof i[r]&&(i[r]=g[r])}return new c(t,l,f,s.current,o.current,i)},c.createFactory=function(t){var e=c.createElement.bind(null,t);return e.type=t,e},c.cloneAndReplaceProps=function(t,e){var n=new c(t.type,t.key,t.ref,t._owner,t._context,e);return n._store.validated=t._store.validated,n},c.isValidElement=function(t){var e=!(!t||!t._isReactElement);return e},t.exports=c},function(t,e,n){"use strict";function r(t){return function(e,n,r){e[n]=e.hasOwnProperty(n)?t(e[n],r):r}}function i(t,e){for(var n in e)if(e.hasOwnProperty(n)){var r=p[n];r&&p.hasOwnProperty(n)?r(t,n,e[n]):t.hasOwnProperty(n)||(t[n]=e[n])}return t}var o=n(24),s=n(25),a=n(26),u=n(27),l=n(22),c=!1,f=r(function(t,e){return o({},e,t)}),p={children:s,className:r(u),style:f},h={TransferStrategies:p,mergeProps:function(t,e){return i(o({},t),e)},Mixin:{transferPropsTo:function(t){return a(t._owner===this,"%s: You can't call transferPropsTo() on a component that you don't own, %s. This usually means you are calling transferPropsTo() on a component passed in as props or children.",this.constructor.displayName,"string"==typeof t.type?t.type:t.type.displayName),c||(c=!0,l(!1,"transferPropsTo is deprecated. See http://fb.me/react-transferpropsto for more information.")),i(t.props,this.props),t}}};t.exports=h},function(t){var e=function(t){var e;for(e in t)if(t.hasOwnProperty(e))return e;return null};t.exports=e},function(t,e,n){"use strict";var r=n(25),i=r;i=function(t,e){for(var n=[],r=2,i=arguments.length;i>r;r++)n.push(arguments[r]);if(void 0===e)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(!t){var o=0;console.warn("Warning: "+e.replace(/%s/g,function(){return n[o++]}))}},t.exports=i},function(t){"use strict";var e=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:e,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:e&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:e&&!!window.screen,isInWorker:!e};t.exports=n},function(t){function e(t){if(null==t)throw new TypeError("Object.assign target cannot be null or undefined");for(var e=Object(t),n=Object.prototype.hasOwnProperty,r=1;r<arguments.length;r++){var i=arguments[r];if(null!=i){var o=Object(i);for(var s in o)n.call(o,s)&&(e[s]=o[s])}}return e}t.exports=e},function(t){function e(t){return function(){return t}}function n(){}n.thatReturns=e,n.thatReturnsFalse=e(!1),n.thatReturnsTrue=e(!0),n.thatReturnsNull=e(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(t){return t},t.exports=n},function(t){"use strict";var e=function(t,e,n,r,i,o,s,a){if(void 0===e)throw new Error("invariant requires an error message argument");if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,s,a],c=0;u=new Error("Invariant Violation: "+e.replace(/%s/g,function(){return l[c++]}))}throw u.framesToPop=1,u}};t.exports=e},function(t){"use strict";function e(t){t||(t="");var e,n=arguments.length;if(n>1)for(var r=1;n>r;r++)e=arguments[r],e&&(t=(t?t+" ":"")+e);return t}t.exports=e},function(t,e,n){"use strict";var r=n(24),i={current:{},withContext:function(t,e){var n,o=i.current;i.current=r({},o,t);try{n=e()}finally{i.current=o}return n}};t.exports=i},function(t){"use strict";var e={current:null};t.exports=e},function(t){var e=function(t){return t.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()}).toLowerCase()};t.exports=e}]);
js/components/AddQuiz/Answer.js
xuorig/insyto
import React from 'react'; import Relay from 'react-relay'; import 'babel/polyfill'; import globalStyles from '../Shared/GlobalStyles.css'; import styles from './AddQuiz.css'; class Answer extends React.Component { constructor(props) { super(props); this.state = {}; } onAddAnswer(e) { e.preventDefault(); } render() { return ( <div className={'form-field-container'}> <input name="answer[]" type="text" placeholder="Answer Choice" className='insyte-field' ref='content'/> </div> ); } } export default Answer;
ajax/libs/forerunnerdb/1.3.750/fdb-core+persist.min.js
pombredanne/cdnjs
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){var d=a("./core");a("../lib/Persist");"undefined"!=typeof window&&(window.ForerunnerDB=d),b.exports=d},{"../lib/Persist":28,"./core":2}],2:[function(a,b,c){var d=a("../lib/Core");a("../lib/Shim.IE8");"undefined"!=typeof window&&(window.ForerunnerDB=d),b.exports=d},{"../lib/Core":7,"../lib/Shim.IE8":34}],3:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=new e,g=function(a,b,c){this.init.apply(this,arguments)};g.prototype.init=function(a,b,c,d,e){this._store=[],this._keys=[],void 0!==c&&this.primaryKey(c),void 0!==b&&this.index(b),void 0!==d&&this.compareFunc(d),void 0!==e&&this.hashFunc(e),void 0!==a&&this.data(a)},d.addModule("BinaryTree",g),d.mixin(g.prototype,"Mixin.ChainReactor"),d.mixin(g.prototype,"Mixin.Sorting"),d.mixin(g.prototype,"Mixin.Common"),d.synthesize(g.prototype,"compareFunc"),d.synthesize(g.prototype,"hashFunc"),d.synthesize(g.prototype,"indexDir"),d.synthesize(g.prototype,"primaryKey"),d.synthesize(g.prototype,"keys"),d.synthesize(g.prototype,"index",function(a){return void 0!==a&&(this.debug()&&console.log("Setting index",a,f.parse(a,!0)),this.keys(f.parse(a,!0))),this.$super.call(this,a)}),g.prototype.clear=function(){delete this._data,delete this._left,delete this._right,this._store=[]},g.prototype.data=function(a){return void 0!==a?(this._data=a,this._hashFunc&&(this._hash=this._hashFunc(a)),this):this._data},g.prototype.push=function(a){return void 0!==a?(this._store.push(a),this):!1},g.prototype.pull=function(a){if(void 0!==a){var b=this._store.indexOf(a);if(b>-1)return this._store.splice(b,1),this}return!1},g.prototype._compareFunc=function(a,b){var c,d,e=0;for(c=0;c<this._keys.length;c++)if(d=this._keys[c],1===d.value?e=this.sortAsc(f.get(a,d.path),f.get(b,d.path)):-1===d.value&&(e=this.sortDesc(f.get(a,d.path),f.get(b,d.path))),this.debug()&&console.log("Compared %s with %s order %d in path %s and result was %d",f.get(a,d.path),f.get(b,d.path),d.value,d.path,e),0!==e)return this.debug()&&console.log("Retuning result %d",e),e;return this.debug()&&console.log("Retuning result %d",e),e},g.prototype._hashFunc=function(a){return a[this._keys[0].path]},g.prototype.removeChildNode=function(a){this._left===a?delete this._left:this._right===a&&delete this._right},g.prototype.nodeBranch=function(a){return this._left===a?"left":this._right===a?"right":void 0},g.prototype.insert=function(a){var b,c,d,e;if(a instanceof Array){for(c=[],d=[],e=0;e<a.length;e++)this.insert(a[e])?c.push(a[e]):d.push(a[e]);return{inserted:c,failed:d}}return this.debug()&&console.log("Inserting",a),this._data?(b=this._compareFunc(this._data,a),0===b?(this.debug()&&console.log("Data is equal (currrent, new)",this._data,a),this._left?this._left.insert(a):(this._left=new g(a,this._index,this._binaryTree,this._compareFunc,this._hashFunc),this._left._parent=this),!0):-1===b?(this.debug()&&console.log("Data is greater (currrent, new)",this._data,a),this._right?this._right.insert(a):(this._right=new g(a,this._index,this._binaryTree,this._compareFunc,this._hashFunc),this._right._parent=this),!0):1===b?(this.debug()&&console.log("Data is less (currrent, new)",this._data,a),this._left?this._left.insert(a):(this._left=new g(a,this._index,this._binaryTree,this._compareFunc,this._hashFunc),this._left._parent=this),!0):!1):(this.debug()&&console.log("Node has no data, setting data",a),this.data(a),!0)},g.prototype.remove=function(a){var b,c,d,e=this.primaryKey();if(a instanceof Array){for(c=[],d=0;d<a.length;d++)this.remove(a[d])&&c.push(a[d]);return c}return this.debug()&&console.log("Removing",a),this._data[e]===a[e]?this._remove(this):(b=this._compareFunc(this._data,a),-1===b&&this._right?this._right.remove(a):1===b&&this._left?this._left.remove(a):!1)},g.prototype._remove=function(a){var b,c;return this._left?(b=this._left,c=this._right,this._left=b._left,this._right=b._right,this._data=b._data,this._store=b._store,c&&(b.rightMost()._right=c)):this._right?(c=this._right,this._left=c._left,this._right=c._right,this._data=c._data,this._store=c._store):this.clear(),!0},g.prototype.leftMost=function(){return this._left?this._left.leftMost():this},g.prototype.rightMost=function(){return this._right?this._right.rightMost():this},g.prototype.lookup=function(a,b,c){var d=this._compareFunc(this._data,a);return c=c||[],0===d&&(this._left&&this._left.lookup(a,b,c),c.push(this._data),this._right&&this._right.lookup(a,b,c)),-1===d&&this._right&&this._right.lookup(a,b,c),1===d&&this._left&&this._left.lookup(a,b,c),c},g.prototype.inOrder=function(a,b){switch(b=b||[],this._left&&this._left.inOrder(a,b),a){case"hash":b.push(this._hash);break;case"data":b.push(this._data);break;default:b.push({key:this._data,arr:this._store})}return this._right&&this._right.inOrder(a,b),b},g.prototype.startsWith=function(a,b,c,d){var e,g,h=f.get(this._data,a),i=h.substr(0,b.length);return c=c||new RegExp("^"+b),d=d||[],void 0===d._visited&&(d._visited=0),d._visited++,g=this.sortAsc(h,b),e=i===b,0===g&&(this._left&&this._left.startsWith(a,b,c,d),e&&d.push(this._data),this._right&&this._right.startsWith(a,b,c,d)),-1===g&&(e&&d.push(this._data),this._right&&this._right.startsWith(a,b,c,d)),1===g&&(this._left&&this._left.startsWith(a,b,c,d),e&&d.push(this._data)),d},g.prototype.findRange=function(a,b,c,d,f,g){f=f||[],g=g||new e(b),this._left&&this._left.findRange(a,b,c,d,f,g);var h=g.value(this._data),i=this.sortAsc(h,c),j=this.sortAsc(h,d);if(!(0!==i&&1!==i||0!==j&&-1!==j))switch(a){case"hash":f.push(this._hash);break;case"data":f.push(this._data);break;default:f.push({key:this._data,arr:this._store})}return this._right&&this._right.findRange(a,b,c,d,f,g),f},g.prototype.match=function(a,b,c){var d,e,g,h=[],i=0;for(d=f.parseArr(this._index,{verbose:!0}),e=f.parseArr(a,c&&c.pathOptions?c.pathOptions:{ignore:/\$/,verbose:!0}),g=0;g<d.length;g++)e[g]===d[g]&&(i++,h.push(e[g]));return{matchedKeys:h,totalKeyCount:e.length,score:i}},d.finishModule("BinaryTree"),b.exports=g},{"./Path":27,"./Shared":33}],4:[function(a,b,c){"use strict";var d,e;d=function(){var a,b,c,d=[];for(b=0;256>b;b++){for(a=b,c=0;8>c;c++)a=1&a?3988292384^a>>>1:a>>>1;d[b]=a}return d}(),e=function(a){var b,c=-1;for(b=0;b<a.length;b++)c=c>>>8^d[255&(c^a.charCodeAt(b))];return(-1^c)>>>0},b.exports=e},{}],5:[function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m,n;d=a("./Shared");var o=function(a,b){this.init.apply(this,arguments)};o.prototype.init=function(a,b){this.sharedPathSolver=n,this._primaryKey="_id",this._primaryIndex=new g("primary"),this._primaryCrc=new g("primaryCrc"),this._crcLookup=new g("crcLookup"),this._name=a,this._data=[],this._metrics=new f,this._options=b||{changeTimestamp:!1},this._options.db&&this.db(this._options.db),this._metaData={},this._deferQueue={insert:[],update:[],remove:[],upsert:[],async:[]},this._deferThreshold={insert:100,update:100,remove:100,upsert:100},this._deferTime={insert:1,update:1,remove:1,upsert:1},this._deferredCalls=!0,this.subsetOf(this)},d.addModule("Collection",o),d.mixin(o.prototype,"Mixin.Common"),d.mixin(o.prototype,"Mixin.Events"),d.mixin(o.prototype,"Mixin.ChainReactor"),d.mixin(o.prototype,"Mixin.CRUD"),d.mixin(o.prototype,"Mixin.Constants"),d.mixin(o.prototype,"Mixin.Triggers"),d.mixin(o.prototype,"Mixin.Sorting"),d.mixin(o.prototype,"Mixin.Matching"),d.mixin(o.prototype,"Mixin.Updating"),d.mixin(o.prototype,"Mixin.Tags"),f=a("./Metrics"),g=a("./KeyValueStore"),h=a("./Path"),i=a("./IndexHashMap"),j=a("./IndexBinaryTree"),k=a("./Index2d"),e=d.modules.Db,l=a("./Overload"),m=a("./ReactorIO"),n=new h,d.synthesize(o.prototype,"deferredCalls"),d.synthesize(o.prototype,"state"),d.synthesize(o.prototype,"name"),d.synthesize(o.prototype,"metaData"),d.synthesize(o.prototype,"capped"),d.synthesize(o.prototype,"cappedSize"),o.prototype._asyncPending=function(a){this._deferQueue.async.push(a)},o.prototype._asyncComplete=function(a){for(var b=this._deferQueue.async.indexOf(a);b>-1;)this._deferQueue.async.splice(b,1),b=this._deferQueue.async.indexOf(a);0===this._deferQueue.async.length&&this.deferEmit("ready")},o.prototype.data=function(){return this._data},o.prototype.drop=function(a){var b;if(this.isDropped())return a&&a.call(this,!1,!0),!0;if(this._db&&this._db._collection&&this._name){if(this.debug()&&console.log(this.logIdentifier()+" Dropping"),this._state="dropped",this.emit("drop",this),delete this._db._collection[this._name],this._collate)for(b in this._collate)this._collate.hasOwnProperty(b)&&this.collateRemove(b);return delete this._primaryKey,delete this._primaryIndex,delete this._primaryCrc,delete this._crcLookup,delete this._data,delete this._metrics,delete this._listeners,a&&a.call(this,!1,!0),!0}return a&&a.call(this,!1,!0),!1},o.prototype.primaryKey=function(a){if(void 0!==a){if(this._primaryKey!==a){var b=this._primaryKey;this._primaryKey=a,this._primaryIndex.primaryKey(a),this.rebuildPrimaryKeyIndex(),this.chainSend("primaryKey",{keyName:a,oldData:b})}return this}return this._primaryKey},o.prototype._onInsert=function(a,b){this.emit("insert",a,b)},o.prototype._onUpdate=function(a){this.emit("update",a)},o.prototype._onRemove=function(a){this.emit("remove",a)},o.prototype._onChange=function(){this._options.changeTimestamp&&(this._metaData.lastChange=this.serialiser.convert(new Date))},d.synthesize(o.prototype,"db",function(a){return a&&"_id"===this.primaryKey()&&(this.primaryKey(a.primaryKey()),this.debug(a.debug())),this.$super.apply(this,arguments)}),d.synthesize(o.prototype,"mongoEmulation"),o.prototype.setData=new l("Collection.prototype.setData",{"*":function(a){return this.$main.call(this,a,{})},"*, object":function(a,b){return this.$main.call(this,a,b)},"*, function":function(a,b){return this.$main.call(this,a,{},b)},"*, *, function":function(a,b,c){return this.$main.call(this,a,b,c)},"*, *, *":function(a,b,c){return this.$main.call(this,a,b,c)},$main:function(a,b,c){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";if(a){var d=this.deferredCalls(),e=[].concat(this._data);this.deferredCalls(!1),b=this.options(b),b.$decouple&&(a=this.decouple(a)),a instanceof Array||(a=[a]),this.remove({}),this.insert(a),this.deferredCalls(d),this._onChange(),this.emit("setData",this._data,e)}return c&&c.call(this),this}}),o.prototype.rebuildPrimaryKeyIndex=function(a){a=a||{$ensureKeys:void 0,$violationCheck:void 0};var b,c,d,e,f=a&&void 0!==a.$ensureKeys?a.$ensureKeys:!0,g=a&&void 0!==a.$violationCheck?a.$violationCheck:!0,h=this._primaryIndex,i=this._primaryCrc,j=this._crcLookup,k=this._primaryKey;for(h.truncate(),i.truncate(),j.truncate(),b=this._data,c=b.length;c--;){if(d=b[c],f&&this.ensurePrimaryKey(d),g){if(!h.uniqueSet(d[k],d))throw this.logIdentifier()+" Call to setData on collection failed because your data violates the primary key unique constraint. One or more documents are using the same primary key: "+d[this._primaryKey]}else h.set(d[k],d);e=this.hash(d),i.set(d[k],e),j.set(e,d)}},o.prototype.ensurePrimaryKey=function(a){void 0===a[this._primaryKey]&&(a[this._primaryKey]=this.objectId())},o.prototype.truncate=function(){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";return this.emit("truncate",this._data),this._data.length=0,this._primaryIndex=new g("primary"),this._primaryCrc=new g("primaryCrc"),this._crcLookup=new g("crcLookup"),this._onChange(),this.emit("immediateChange",{type:"truncate"}),this.deferEmit("change",{type:"truncate"}),this},o.prototype.upsert=function(a,b){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";if(a){var c,d,e=this._deferQueue.upsert,f=this._deferThreshold.upsert,g={};if(a instanceof Array){if(this._deferredCalls&&a.length>f)return this._deferQueue.upsert=e.concat(a),this._asyncPending("upsert"),this.processQueue("upsert",b),{};for(g=[],d=0;d<a.length;d++)g.push(this.upsert(a[d]));return b&&b.call(this),g}switch(a[this._primaryKey]?(c={},c[this._primaryKey]=a[this._primaryKey],this._primaryIndex.lookup(c)[0]?g.op="update":g.op="insert"):g.op="insert",g.op){case"insert":g.result=this.insert(a,b);break;case"update":g.result=this.update(c,a,{},b)}return g}return b&&b.call(this),{}},o.prototype.filter=function(a,b,c){return this.find(a,c).filter(b)},o.prototype.filterUpdate=function(a,b,c){var d,e,f,g,h=this.find(a,c),i=[],j=this.primaryKey();for(g=0;g<h.length;g++)d=h[g],f=b(d),f&&(e={},e[j]=d[j],i.push(this.update(e,f)));return i},o.prototype.update=function(a,b,c,d){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";return this.mongoEmulation()?(this.convertToFdb(a),this.convertToFdb(b)):b=this.decouple(b),b=this.transformIn(b),this._handleUpdate(a,b,c,d)},o.prototype._handleUpdate=function(a,b,c,d){var e,f,g=this,h=this._metrics.create("update"),i=function(d){var e,f,i,j=g.decouple(d);return g.willTrigger(g.TYPE_UPDATE,g.PHASE_BEFORE)||g.willTrigger(g.TYPE_UPDATE,g.PHASE_AFTER)?(e=g.decouple(d),f={type:"update",query:g.decouple(a),update:g.decouple(b),options:g.decouple(c),op:h},i=g.updateObject(e,f.update,f.query,f.options,""),g.processTrigger(f,g.TYPE_UPDATE,g.PHASE_BEFORE,d,e)!==!1?(i=g.updateObject(d,e,f.query,f.options,""),g.processTrigger(f,g.TYPE_UPDATE,g.PHASE_AFTER,j,e)):i=!1):i=g.updateObject(d,b,a,c,""),g._updateIndexes(j,d),i};return h.start(),h.time("Retrieve documents to update"),e=this.find(a,{$decouple:!1}),h.time("Retrieve documents to update"),e.length&&(h.time("Update documents"),f=e.filter(i),h.time("Update documents"),f.length&&(this.debug()&&console.log(this.logIdentifier()+" Updated some data"),h.time("Resolve chains"),this.chainWillSend()&&this.chainSend("update",{query:a,update:b,dataSet:this.decouple(f)},c),h.time("Resolve chains"),this._onUpdate(f),this._onChange(),d&&d.call(this),this.emit("immediateChange",{type:"update",data:f}),this.deferEmit("change",{type:"update",data:f}))),h.stop(),f||[]},o.prototype._replaceObj=function(a,b){var c;this._removeFromIndexes(a);for(c in a)a.hasOwnProperty(c)&&delete a[c];for(c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);if(!this._insertIntoIndexes(a))throw this.logIdentifier()+" Primary key violation in update! Key violated: "+a[this._primaryKey];return this},o.prototype.updateById=function(a,b){var c={};return c[this._primaryKey]=a,this.update(c,b)[0]},o.prototype.updateObject=function(a,b,c,d,e,f){b=this.decouple(b),e=e||"","."===e.substr(0,1)&&(e=e.substr(1,e.length-1));var g,i,j,k,l,m,n,o,p,q,r,s,t=!1,u=!1;for(s in b)if(b.hasOwnProperty(s)){if(g=!1,"$"===s.substr(0,1))switch(s){case"$key":case"$index":case"$data":case"$min":case"$max":g=!0;break;case"$each":for(g=!0,k=b.$each.length,j=0;k>j;j++)u=this.updateObject(a,b.$each[j],c,d,e),u&&(t=!0);t=t||u;break;case"$replace":g=!0,n=b.$replace,o=this.primaryKey();for(m in a)a.hasOwnProperty(m)&&m!==o&&void 0===n[m]&&(this._updateUnset(a,m),t=!0);for(m in n)n.hasOwnProperty(m)&&m!==o&&(this._updateOverwrite(a,m,n[m]),t=!0);break;default:g=!0,u=this.updateObject(a,b[s],c,d,e,s),t=t||u}if(this._isPositionalKey(s)&&(g=!0,s=s.substr(0,s.length-2),p=new h(e+"."+s),a[s]&&a[s]instanceof Array&&a[s].length)){for(i=[],j=0;j<a[s].length;j++)this._match(a[s][j],p.value(c)[0],d,"",{})&&i.push(j);for(j=0;j<i.length;j++)u=this.updateObject(a[s][i[j]],b[s+".$"],c,d,e+"."+s,f),t=t||u}if(!g)if(f||"object"!=typeof b[s])switch(f){case"$inc":var v=!0;b[s]>0?b.$max&&a[s]>=b.$max&&(v=!1):b[s]<0&&b.$min&&a[s]<=b.$min&&(v=!1),v&&(this._updateIncrement(a,s,b[s]),t=!0);break;case"$cast":switch(b[s]){case"array":a[s]instanceof Array||(this._updateProperty(a,s,b.$data||[]),t=!0);break;case"object":a[s]instanceof Object&&!(a[s]instanceof Array)||(this._updateProperty(a,s,b.$data||{}),t=!0);break;case"number":"number"!=typeof a[s]&&(this._updateProperty(a,s,Number(a[s])),t=!0);break;case"string":"string"!=typeof a[s]&&(this._updateProperty(a,s,String(a[s])),t=!0);break;default:throw this.logIdentifier()+" Cannot update cast to unknown type: "+b[s]}break;case"$push":if(void 0===a[s]&&this._updateProperty(a,s,[]),!(a[s]instanceof Array))throw this.logIdentifier()+" Cannot push to a key that is not an array! ("+s+")";if(void 0!==b[s].$position&&b[s].$each instanceof Array)for(l=b[s].$position,k=b[s].$each.length,j=0;k>j;j++)this._updateSplicePush(a[s],l+j,b[s].$each[j]);else if(b[s].$each instanceof Array)for(k=b[s].$each.length,j=0;k>j;j++)this._updatePush(a[s],b[s].$each[j]);else this._updatePush(a[s],b[s]);t=!0;break;case"$pull":if(a[s]instanceof Array){for(i=[],j=0;j<a[s].length;j++)this._match(a[s][j],b[s],d,"",{})&&i.push(j);for(k=i.length;k--;)this._updatePull(a[s],i[k]),t=!0}break;case"$pullAll":if(a[s]instanceof Array){if(!(b[s]instanceof Array))throw this.logIdentifier()+" Cannot pullAll without being given an array of values to pull! ("+s+")";if(i=a[s],k=i.length,k>0)for(;k--;){for(l=0;l<b[s].length;l++)i[k]===b[s][l]&&(this._updatePull(a[s],k),k--,t=!0);if(0>k)break}}break;case"$addToSet":if(void 0===a[s]&&this._updateProperty(a,s,[]),!(a[s]instanceof Array))throw this.logIdentifier()+" Cannot addToSet on a key that is not an array! ("+s+")";var w,x,y,z,A=a[s],B=A.length,C=!0,D=d&&d.$addToSet;for(b[s].$key?(y=!1,z=new h(b[s].$key),x=z.value(b[s])[0],delete b[s].$key):D&&D.key?(y=!1,z=new h(D.key),x=z.value(b[s])[0]):(x=this.jStringify(b[s]),y=!0),w=0;B>w;w++)if(y){if(this.jStringify(A[w])===x){C=!1;break}}else if(x===z.value(A[w])[0]){C=!1;break}C&&(this._updatePush(a[s],b[s]),t=!0);break;case"$splicePush":if(void 0===a[s]&&this._updateProperty(a,s,[]),!(a[s]instanceof Array))throw this.logIdentifier()+" Cannot splicePush with a key that is not an array! ("+s+")";if(l=b.$index,void 0===l)throw this.logIdentifier()+" Cannot splicePush without a $index integer value!";delete b.$index,l>a[s].length&&(l=a[s].length),this._updateSplicePush(a[s],l,b[s]),t=!0;break;case"$move":if(!(a[s]instanceof Array))throw this.logIdentifier()+" Cannot move on a key that is not an array! ("+s+")";for(j=0;j<a[s].length;j++)if(this._match(a[s][j],b[s],d,"",{})){var E=b.$index;if(void 0===E)throw this.logIdentifier()+" Cannot move without a $index integer value!";delete b.$index,this._updateSpliceMove(a[s],j,E),t=!0;break}break;case"$mul":this._updateMultiply(a,s,b[s]),t=!0;break;case"$rename":this._updateRename(a,s,b[s]),t=!0;break;case"$overwrite":this._updateOverwrite(a,s,b[s]),t=!0;break;case"$unset":this._updateUnset(a,s),t=!0;break;case"$clear":this._updateClear(a,s),t=!0;break;case"$pop":if(!(a[s]instanceof Array))throw this.logIdentifier()+" Cannot pop from a key that is not an array! ("+s+")";this._updatePop(a[s],b[s])&&(t=!0);break;case"$toggle":this._updateProperty(a,s,!a[s]),t=!0;break;default:a[s]!==b[s]&&(this._updateProperty(a,s,b[s]),t=!0)}else if(null!==a[s]&&"object"==typeof a[s])if(q=a[s]instanceof Array,r=b[s]instanceof Array,q||r)if(!r&&q)for(j=0;j<a[s].length;j++)u=this.updateObject(a[s][j],b[s],c,d,e+"."+s,f),t=t||u;else a[s]!==b[s]&&(this._updateProperty(a,s,b[s]),t=!0);else u=this.updateObject(a[s],b[s],c,d,e+"."+s,f),t=t||u;else a[s]!==b[s]&&(this._updateProperty(a,s,b[s]),t=!0)}return t},o.prototype._isPositionalKey=function(a){return".$"===a.substr(a.length-2,2)},o.prototype.remove=function(a,b,c){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";var d,e,f,g,h,i,j,k,l=this;if("function"==typeof b&&(c=b,b={}),this.mongoEmulation()&&this.convertToFdb(a),a instanceof Array){for(g=[],f=0;f<a.length;f++)g.push(this.remove(a[f],{noEmit:!0}));return(!b||b&&!b.noEmit)&&this._onRemove(g),c&&c.call(this,!1,g),g}if(g=[],d=this.find(a,{$decouple:!1}),d.length){h=function(a){l._removeFromIndexes(a),e=l._data.indexOf(a),l._dataRemoveAtIndex(e),g.push(a)};for(var m=0;m<d.length;m++)j=d[m],l.willTrigger(l.TYPE_REMOVE,l.PHASE_BEFORE)||l.willTrigger(l.TYPE_REMOVE,l.PHASE_AFTER)?(i={type:"remove"},k=l.decouple(j),l.processTrigger(i,l.TYPE_REMOVE,l.PHASE_BEFORE,k,k)!==!1&&(h(j),l.processTrigger(i,l.TYPE_REMOVE,l.PHASE_AFTER,k,k))):h(j);g.length&&(l.chainSend("remove",{query:a,dataSet:g},b),(!b||b&&!b.noEmit)&&this._onRemove(g),this._onChange(),this.emit("immediateChange",{type:"remove",data:g}),this.deferEmit("change",{type:"remove",data:g}))}return c&&c.call(this,!1,g),g},o.prototype.removeById=function(a){var b={};return b[this._primaryKey]=a,this.remove(b)[0]},o.prototype.processQueue=function(a,b,c){var d,e,f=this,g=this._deferQueue[a],h=this._deferThreshold[a],i=this._deferTime[a];if(c=c||{deferred:!0},g.length){switch(d=g.length>h?g.splice(0,h):g.splice(0,g.length),e=f[a](d),a){case"insert":c.inserted=c.inserted||[],c.failed=c.failed||[],c.inserted=c.inserted.concat(e.inserted),c.failed=c.failed.concat(e.failed)}setTimeout(function(){f.processQueue.call(f,a,b,c)},i)}else b&&b.call(this,c),this._asyncComplete(a);this.isProcessingQueue()||this.deferEmit("queuesComplete")},o.prototype.isProcessingQueue=function(){var a;for(a in this._deferQueue)if(this._deferQueue.hasOwnProperty(a)&&this._deferQueue[a].length)return!0;return!1},o.prototype.insert=function(a,b,c){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";return"function"==typeof b?(c=b,b=this._data.length):void 0===b&&(b=this._data.length),a=this.transformIn(a),this._insertHandle(a,b,c)},o.prototype._insertHandle=function(a,b,c){var d,e,f,g=this._deferQueue.insert,h=this._deferThreshold.insert,i=[],j=[];if(a instanceof Array){if(this._deferredCalls&&a.length>h)return this._deferQueue.insert=g.concat(a),this._asyncPending("insert"),void this.processQueue("insert",c);for(f=0;f<a.length;f++)d=this._insert(a[f],b+f),d===!0?i.push(a[f]):j.push({doc:a[f],reason:d})}else d=this._insert(a,b),d===!0?i.push(a):j.push({doc:a,reason:d});return e={deferred:!1,inserted:i,failed:j},this._onInsert(i,j),c&&c.call(this,e),this._onChange(),this.emit("immediateChange",{type:"insert",data:i}),this.deferEmit("change",{type:"insert",data:i}),e},o.prototype._insert=function(a,b){if(a){var c,d,e,f,g=this,h=this.capped(),i=this.cappedSize();if(this.ensurePrimaryKey(a),c=this.insertIndexViolation(a),e=function(a){g._insertIntoIndexes(a),b>g._data.length&&(b=g._data.length),g._dataInsertAtIndex(b,a),h&&g._data.length>i&&g.removeById(g._data[0][g._primaryKey]),g.chainWillSend()&&g.chainSend("insert",{dataSet:g.decouple([a])},{index:b})},c)return"Index violation in index: "+c;if(g.willTrigger(g.TYPE_INSERT,g.PHASE_BEFORE)||g.willTrigger(g.TYPE_INSERT,g.PHASE_AFTER)){if(d={type:"insert"},g.processTrigger(d,g.TYPE_INSERT,g.PHASE_BEFORE,{},a)===!1)return"Trigger cancelled operation";e(a),g.willTrigger(g.TYPE_INSERT,g.PHASE_AFTER)&&(f=g.decouple(a),g.processTrigger(d,g.TYPE_INSERT,g.PHASE_AFTER,{},f))}else e(a);return!0}return"No document passed to insert"},o.prototype._dataInsertAtIndex=function(a,b){this._data.splice(a,0,b)},o.prototype._dataRemoveAtIndex=function(a){this._data.splice(a,1)},o.prototype._dataReplace=function(a){for(;this._data.length;)this._data.pop();this._data=this._data.concat(a)},o.prototype._insertIntoIndexes=function(a){var b,c,d=this._indexByName,e=this.hash(a),f=this._primaryKey;c=this._primaryIndex.uniqueSet(a[f],a),this._primaryCrc.uniqueSet(a[f],e),this._crcLookup.uniqueSet(e,a);for(b in d)d.hasOwnProperty(b)&&d[b].insert(a);return c},o.prototype._removeFromIndexes=function(a){var b,c=this._indexByName,d=this.hash(a),e=this._primaryKey;this._primaryIndex.unSet(a[e]),this._primaryCrc.unSet(a[e]),this._crcLookup.unSet(d);for(b in c)c.hasOwnProperty(b)&&c[b].remove(a)},o.prototype._updateIndexes=function(a,b){this._removeFromIndexes(a),this._insertIntoIndexes(b)},o.prototype._rebuildIndexes=function(){var a,b=this._indexByName;for(a in b)b.hasOwnProperty(a)&&b[a].rebuild()},o.prototype.subset=function(a,b){var c,d=this.find(a,b);return c=new o,c.db(this._db),c.subsetOf(this).primaryKey(this._primaryKey).setData(d),c},d.synthesize(o.prototype,"subsetOf"),o.prototype.isSubsetOf=function(a){return this._subsetOf===a},o.prototype.distinct=function(a,b,c){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";var d,e,f=this.find(b,c),g=new h(a),i={},j=[];for(e=0;e<f.length;e++)d=g.value(f[e])[0],d&&!i[d]&&(i[d]=!0,j.push(d));return j},o.prototype.findById=function(a,b){var c={};return c[this._primaryKey]=a,this.find(c,b)[0]},o.prototype.peek=function(a,b){var c,d,e=this._data,f=e.length,g=new o,h=typeof a;if("string"===h){for(c=0;f>c;c++)d=this.jStringify(e[c]),d.indexOf(a)>-1&&g.insert(e[c]);return g.find({},b)}return this.find(a,b)},o.prototype.explain=function(a,b){var c=this.find(a,b);return c.__fdbOp._data},o.prototype.options=function(a){return a=a||{},a.$decouple=void 0!==a.$decouple?a.$decouple:!0,a.$explain=void 0!==a.$explain?a.$explain:!1,a},o.prototype.find=function(a,b,c){return this.mongoEmulation()&&this.convertToFdb(a),c?(c.call(this,"Callbacks for the find() operation are not yet implemented!",[]),[]):this._find.call(this,a,b,c)},o.prototype._find=function(a,b){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";a=a||{};var c,d,e,f,g,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x=this._metrics.create("find"),y=this.primaryKey(),z=this,A=!0,B={},C=[],D=[],E=[],F={},G={};if(b instanceof Array||(b=this.options(b)),w=function(c){return z._match(c,a,b,"and",F)},x.start(),a){if(a instanceof Array){for(v=this,n=0;n<a.length;n++)v=v.subset(a[n],b&&b[n]?b[n]:{});return v.find()}if(a.$findSub){if(!a.$findSub.$path)throw"$findSub missing $path property!";return this.findSub(a.$findSub.$query,a.$findSub.$path,a.$findSub.$subQuery,a.$findSub.$subOptions)}if(a.$findSubOne){if(!a.$findSubOne.$path)throw"$findSubOne missing $path property!";return this.findSubOne(a.$findSubOne.$query,a.$findSubOne.$path,a.$findSubOne.$subQuery,a.$findSubOne.$subOptions)}if(x.time("analyseQuery"),c=this._analyseQuery(z.decouple(a),b,x),x.time("analyseQuery"),x.data("analysis",c),c.hasJoin&&c.queriesJoin){for(x.time("joinReferences"),f=0;f<c.joinsOn.length;f++)m=c.joinsOn[f],j=m.key,k=m.type,l=m.id,i=new h(c.joinQueries[j]),g=i.value(a)[0],B[l]=this._db[k](j).subset(g),delete a[c.joinQueries[j]];x.time("joinReferences")}if(c.indexMatch.length&&(!b||b&&!b.$skipIndex)?(x.data("index.potential",c.indexMatch),x.data("index.used",c.indexMatch[0].index),x.time("indexLookup"),e=c.indexMatch[0].lookup||[],x.time("indexLookup"),c.indexMatch[0].keyData.totalKeyCount===c.indexMatch[0].keyData.score&&(A=!1)):x.flag("usedIndex",!1),A&&(e&&e.length?(d=e.length,x.time("tableScan: "+d),e=e.filter(w)):(d=this._data.length,x.time("tableScan: "+d),e=this._data.filter(w)),x.time("tableScan: "+d)),b.$orderBy&&(x.time("sort"),e=this.sort(b.$orderBy,e),x.time("sort")),void 0!==b.$page&&void 0!==b.$limit&&(G.page=b.$page,G.pages=Math.ceil(e.length/b.$limit),G.records=e.length,b.$page&&b.$limit>0&&(x.data("cursor",G),e.splice(0,b.$page*b.$limit))),b.$skip&&(G.skip=b.$skip,e.splice(0,b.$skip),x.data("skip",b.$skip)),b.$limit&&e&&e.length>b.$limit&&(G.limit=b.$limit,e.length=b.$limit,x.data("limit",b.$limit)),b.$decouple&&(x.time("decouple"),e=this.decouple(e),x.time("decouple"),x.data("flag.decouple",!0)),b.$join&&(C=C.concat(this.applyJoin(e,b.$join,B)),x.data("flag.join",!0)),C.length&&(x.time("removalQueue"),this.spliceArrayByIndexList(e,C),x.time("removalQueue")),b.$transform){for(x.time("transform"),n=0;n<e.length;n++)e.splice(n,1,b.$transform(e[n]));x.time("transform"),x.data("flag.transform",!0)}this._transformEnabled&&this._transformOut&&(x.time("transformOut"),e=this.transformOut(e),x.time("transformOut")),x.data("results",e.length)}else e=[];if(!b.$aggregate){x.time("scanFields");for(n in b)b.hasOwnProperty(n)&&0!==n.indexOf("$")&&(1===b[n]?D.push(n):0===b[n]&&E.push(n));if(x.time("scanFields"),D.length||E.length){for(x.data("flag.limitFields",!0),x.data("limitFields.on",D),x.data("limitFields.off",E),x.time("limitFields"),n=0;n<e.length;n++){t=e[n];for(o in t)t.hasOwnProperty(o)&&(D.length&&o!==y&&-1===D.indexOf(o)&&delete t[o],E.length&&E.indexOf(o)>-1&&delete t[o])}x.time("limitFields")}if(b.$elemMatch){x.data("flag.elemMatch",!0),x.time("projection-elemMatch");for(n in b.$elemMatch)if(b.$elemMatch.hasOwnProperty(n))for(q=new h(n),o=0;o<e.length;o++)if(r=q.value(e[o])[0],r&&r.length)for(p=0;p<r.length;p++)if(z._match(r[p],b.$elemMatch[n],b,"",{})){q.set(e[o],n,[r[p]]);break}x.time("projection-elemMatch")}if(b.$elemsMatch){x.data("flag.elemsMatch",!0),x.time("projection-elemsMatch");for(n in b.$elemsMatch)if(b.$elemsMatch.hasOwnProperty(n))for(q=new h(n),o=0;o<e.length;o++)if(r=q.value(e[o])[0],r&&r.length){for(s=[],p=0;p<r.length;p++)z._match(r[p],b.$elemsMatch[n],b,"",{})&&s.push(r[p]);q.set(e[o],n,s)}x.time("projection-elemsMatch")}}return b.$aggregate&&(x.data("flag.aggregate",!0),x.time("aggregate"),u=new h(b.$aggregate),e=u.value(e),x.time("aggregate")),x.stop(),e.__fdbOp=x,e.$cursor=G,e},o.prototype.findOne=function(){return this.find.apply(this,arguments)[0]},o.prototype.indexOf=function(a,b){var c,d=this.find(a,{$decouple:!1})[0];return d?!b||b&&!b.$orderBy?this._data.indexOf(d):(b.$decouple=!1,c=this.find(a,b),c.indexOf(d)):-1},o.prototype.indexOfDocById=function(a,b){var c,d;return c="object"!=typeof a?this._primaryIndex.get(a):this._primaryIndex.get(a[this._primaryKey]),c?!b||b&&!b.$orderBy?this._data.indexOf(c):(b.$decouple=!1,d=this.find({},b),d.indexOf(c)):-1},o.prototype.removeByIndex=function(a){var b,c;return b=this._data[a],void 0!==b?(b=this.decouple(b),c=b[this.primaryKey()],this.removeById(c)):!1},o.prototype.transform=function(a){return void 0!==a?("object"==typeof a?(void 0!==a.enabled&&(this._transformEnabled=a.enabled),void 0!==a.dataIn&&(this._transformIn=a.dataIn),void 0!==a.dataOut&&(this._transformOut=a.dataOut)):this._transformEnabled=a!==!1,this):{enabled:this._transformEnabled,dataIn:this._transformIn,dataOut:this._transformOut}},o.prototype.transformIn=function(a){if(this._transformEnabled&&this._transformIn){if(a instanceof Array){var b,c,d=[];for(c=0;c<a.length;c++)b=this._transformIn(a[c]),b instanceof Array?d=d.concat(b):d.push(b);return d}return this._transformIn(a)}return a},o.prototype.transformOut=function(a){if(this._transformEnabled&&this._transformOut){if(a instanceof Array){var b,c,d=[];for(c=0;c<a.length;c++)b=this._transformOut(a[c]),b instanceof Array?d=d.concat(b):d.push(b);return d}return this._transformOut(a)}return a},o.prototype.sort=function(a,b){var c=this,d=n.parse(a,!0);return d.length&&b.sort(function(a,b){var e,f,g=0;for(e=0;e<d.length;e++)if(f=d[e],1===f.value?g=c.sortAsc(n.get(a,f.path),n.get(b,f.path)):-1===f.value&&(g=c.sortDesc(n.get(a,f.path),n.get(b,f.path))),0!==g)return g;return g}),b},o.prototype._sort=function(a,b){var c,d=this,e=new h,f=e.parse(a,!0)[0];if(e.path(f.path),1===f.value)c=function(a,b){var c=e.value(a)[0],f=e.value(b)[0];return d.sortAsc(c,f)};else{if(-1!==f.value)throw this.logIdentifier()+" $orderBy clause has invalid direction: "+f.value+", accepted values are 1 or -1 for ascending or descending!";c=function(a,b){var c=e.value(a)[0],f=e.value(b)[0];return d.sortDesc(c,f)}}return b.sort(c)},o.prototype._analyseQuery=function(a,b,c){var d,e,f,g,i,j,k,l,m,n,o,p,q,r,s,t,u={queriesOn:[{id:"$collection."+this._name,type:"colletion",key:this._name}],indexMatch:[],hasJoin:!1,queriesJoin:!1,joinQueries:{},query:a,options:b},v=[],w=[];if(c.time("checkIndexes"),p=new h,q=p.parseArr(a,{ignore:/\$/,verbose:!0}).length){void 0!==a[this._primaryKey]&&(r=typeof a[this._primaryKey],("string"===r||"number"===r||a[this._primaryKey]instanceof Array)&&(c.time("checkIndexMatch: Primary Key"),s=this._primaryIndex.lookup(a,b),u.indexMatch.push({lookup:s,keyData:{matchedKeys:[this._primaryKey],totalKeyCount:q,score:1 },index:this._primaryIndex}),c.time("checkIndexMatch: Primary Key")));for(t in this._indexById)if(this._indexById.hasOwnProperty(t)&&(m=this._indexById[t],n=m.name(),c.time("checkIndexMatch: "+n),l=m.match(a,b),l.score>0&&(o=m.lookup(a,b),u.indexMatch.push({lookup:o,keyData:l,index:m})),c.time("checkIndexMatch: "+n),l.score===q))break;c.time("checkIndexes"),u.indexMatch.length>1&&(c.time("findOptimalIndex"),u.indexMatch.sort(function(a,b){return a.keyData.score>b.keyData.score?-1:a.keyData.score<b.keyData.score?1:a.keyData.score===b.keyData.score?a.lookup.length-b.lookup.length:void 0}),c.time("findOptimalIndex"))}if(b.$join){for(u.hasJoin=!0,d=0;d<b.$join.length;d++)for(e in b.$join[d])b.$join[d].hasOwnProperty(e)&&(i=b.$join[d][e],f=i.$sourceType||"collection",g="$"+f+"."+e,v.push({id:g,type:f,key:e}),void 0!==b.$join[d][e].$as?w.push(b.$join[d][e].$as):w.push(e));for(k=0;k<w.length;k++)j=this._queryReferencesSource(a,w[k],""),j&&(u.joinQueries[v[k].key]=j,u.queriesJoin=!0);u.joinsOn=v,u.queriesOn=u.queriesOn.concat(v)}return u},o.prototype._queryReferencesSource=function(a,b,c){var d;for(d in a)if(a.hasOwnProperty(d)){if(d===b)return c&&(c+="."),c+d;if("object"==typeof a[d])return c&&(c+="."),c+=d,this._queryReferencesSource(a[d],b,c)}return!1},o.prototype.count=function(a,b){return a?this.find(a,b).length:this._data.length},o.prototype.findSub=function(a,b,c,d){return this._findSub(this.find(a),b,c,d)},o.prototype._findSub=function(a,b,c,d){var e,f,g,i=new h(b),j=a.length,k=new o("__FDB_temp_"+this.objectId()).db(this._db),l={parents:j,subDocTotal:0,subDocs:[],pathFound:!1,err:""};for(d=d||{},e=0;j>e;e++)if(f=i.value(a[e])[0]){if(k.setData(f),g=k.find(c,d),d.returnFirst&&g.length)return g[0];d.$split?l.subDocs.push(g):l.subDocs=l.subDocs.concat(g),l.subDocTotal+=g.length,l.pathFound=!0}return k.drop(),l.pathFound||(l.err="No objects found in the parent documents with a matching path of: "+b),d.$stats?l:l.subDocs},o.prototype.findSubOne=function(a,b,c,d){return this.findSub(a,b,c,d)[0]},o.prototype.insertIndexViolation=function(a){var b,c,d,e=this._indexByName;if(this._primaryIndex.get(a[this._primaryKey]))b=this._primaryIndex;else for(c in e)if(e.hasOwnProperty(c)&&(d=e[c],d.unique()&&d.violation(a))){b=d;break}return b?b.name():!1},o.prototype.ensureIndex=function(a,b){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";this._indexByName=this._indexByName||{},this._indexById=this._indexById||{};var c,e={start:(new Date).getTime()};if(b)if(b.type){if(!d.index[b.type])throw this.logIdentifier()+' Cannot create index of type "'+b.type+'", type not found in the index type register (Shared.index)';c=new d.index[b.type](a,b,this)}else c=new i(a,b,this);else c=new i(a,b,this);return this._indexByName[c.name()]?{err:"Index with that name already exists"}:(c.rebuild(),this._indexByName[c.name()]=c,this._indexById[c.id()]=c,e.end=(new Date).getTime(),e.total=e.end-e.start,this._lastOp={type:"ensureIndex",stats:{time:e}},{index:c,id:c.id(),name:c.name(),state:c.state()})},o.prototype.index=function(a){return this._indexByName?this._indexByName[a]:void 0},o.prototype.lastOp=function(){return this._metrics.list()},o.prototype.diff=function(a){var b,c,d,e,f={insert:[],update:[],remove:[]},g=this.primaryKey();if(g!==a.primaryKey())throw this.logIdentifier()+" Diffing requires that both collections have the same primary key!";for(b=a._data;b&&!(b instanceof Array);)a=b,b=a._data;for(e=b.length,c=0;e>c;c++)d=b[c],this._primaryIndex.get(d[g])?this._primaryCrc.get(d[g])!==a._primaryCrc.get(d[g])&&f.update.push(d):f.insert.push(d);for(b=this._data,e=b.length,c=0;e>c;c++)d=b[c],a._primaryIndex.get(d[g])||f.remove.push(d);return f},o.prototype.collateAdd=new l("Collection.prototype.collateAdd",{"object, string":function(a,b){var c=this;c.collateAdd(a,function(d){var e,f;switch(d.type){case"insert":b?(e={$push:{}},e.$push[b]=c.decouple(d.data.dataSet),c.update({},e)):c.insert(d.data.dataSet);break;case"update":b?(e={},f={},e[b]=d.data.query,f[b+".$"]=d.data.update,c.update(e,f)):c.update(d.data.query,d.data.update);break;case"remove":b?(e={$pull:{}},e.$pull[b]={},e.$pull[b][c.primaryKey()]=d.data.dataSet[0][a.primaryKey()],c.update({},e)):c.remove(d.data.dataSet)}})},"object, function":function(a,b){if("string"==typeof a&&(a=this._db.collection(a,{autoCreate:!1,throwError:!1})),a)return this._collate=this._collate||{},this._collate[a.name()]=new m(a,this,b),this;throw"Cannot collate from a non-existent collection!"}}),o.prototype.collateRemove=function(a){if("object"==typeof a&&(a=a.name()),a)return this._collate[a].drop(),delete this._collate[a],this;throw"No collection name passed to collateRemove() or collection not found!"},e.prototype.collection=new l("Db.prototype.collection",{"":function(){return this.$main.call(this,{name:this.objectId()})},object:function(a){return a instanceof o?"droppped"!==a.state()?a:this.$main.call(this,{name:a.name()}):this.$main.call(this,a)},string:function(a){return this.$main.call(this,{name:a})},"string, string":function(a,b){return this.$main.call(this,{name:a,primaryKey:b})},"string, object":function(a,b){return b.name=a,this.$main.call(this,b)},"string, string, object":function(a,b,c){return c.name=a,c.primaryKey=b,this.$main.call(this,c)},$main:function(a){var b=this,c=a.name;if(c){if(this._collection[c])return this._collection[c];if(a&&a.autoCreate===!1){if(a&&a.throwError!==!1)throw this.logIdentifier()+" Cannot get collection "+c+" because it does not exist and auto-create has been disabled!";return}if(this.debug()&&console.log(this.logIdentifier()+" Creating collection "+c),this._collection[c]=this._collection[c]||new o(c,a).db(this),this._collection[c].mongoEmulation(this.mongoEmulation()),void 0!==a.primaryKey&&this._collection[c].primaryKey(a.primaryKey),void 0!==a.capped){if(void 0===a.size)throw this.logIdentifier()+" Cannot create a capped collection without specifying a size!";this._collection[c].capped(a.capped),this._collection[c].cappedSize(a.size)}return b._collection[c].on("change",function(){b.emit("change",b._collection[c],"collection",c)}),b.emit("create",b._collection[c],"collection",c),this._collection[c]}if(!a||a&&a.throwError!==!1)throw this.logIdentifier()+" Cannot get collection with undefined name!"}}),e.prototype.collectionExists=function(a){return Boolean(this._collection[a])},e.prototype.collections=function(a){var b,c,d=[],e=this._collection;a&&(a instanceof RegExp||(a=new RegExp(a)));for(c in e)e.hasOwnProperty(c)&&(b=e[c],a?a.exec(c)&&d.push({name:c,count:b.count(),linked:void 0!==b.isLinked?b.isLinked():!1}):d.push({name:c,count:b.count(),linked:void 0!==b.isLinked?b.isLinked():!1}));return d.sort(function(a,b){return a.name.localeCompare(b.name)}),d},d.finishModule("Collection"),b.exports=o},{"./Index2d":10,"./IndexBinaryTree":11,"./IndexHashMap":12,"./KeyValueStore":13,"./Metrics":14,"./Overload":26,"./Path":27,"./ReactorIO":31,"./Shared":33}],6:[function(a,b,c){"use strict";var d,e,f,g;d=a("./Shared");var h=function(){this.init.apply(this,arguments)};h.prototype.init=function(a){var b=this;b._name=a,b._data=new g("__FDB__cg_data_"+b._name),b._collections=[],b._view=[]},d.addModule("CollectionGroup",h),d.mixin(h.prototype,"Mixin.Common"),d.mixin(h.prototype,"Mixin.ChainReactor"),d.mixin(h.prototype,"Mixin.Constants"),d.mixin(h.prototype,"Mixin.Triggers"),d.mixin(h.prototype,"Mixin.Tags"),d.mixin(h.prototype,"Mixin.Events"),g=a("./Collection"),e=d.modules.Db,f=d.modules.Db.prototype.init,h.prototype.on=function(){this._data.on.apply(this._data,arguments)},h.prototype.off=function(){this._data.off.apply(this._data,arguments)},h.prototype.emit=function(){this._data.emit.apply(this._data,arguments)},h.prototype.primaryKey=function(a){return void 0!==a?(this._primaryKey=a,this):this._primaryKey},d.synthesize(h.prototype,"state"),d.synthesize(h.prototype,"db"),d.synthesize(h.prototype,"name"),h.prototype.addCollection=function(a){if(a&&-1===this._collections.indexOf(a)){if(this._collections.length){if(this._primaryKey!==a.primaryKey())throw this.logIdentifier()+" All collections in a collection group must have the same primary key!"}else this.primaryKey(a.primaryKey());this._collections.push(a),a._groups=a._groups||[],a._groups.push(this),a.chain(this),a.on("drop",function(){if(a._groups&&a._groups.length){var b,c=[];for(b=0;b<a._groups.length;b++)c.push(a._groups[b]);for(b=0;b<c.length;b++)a._groups[b].removeCollection(a)}delete a._groups}),this._data.insert(a.find())}return this},h.prototype.removeCollection=function(a){if(a){var b,c=this._collections.indexOf(a);-1!==c&&(a.unChain(this),this._collections.splice(c,1),a._groups=a._groups||[],b=a._groups.indexOf(this),-1!==b&&a._groups.splice(b,1),a.off("drop")),0===this._collections.length&&delete this._primaryKey}return this},h.prototype._chainHandler=function(a){switch(a.type){case"setData":a.data.dataSet=this.decouple(a.data.dataSet),this._data.remove(a.data.oldData),this._data.insert(a.data.dataSet);break;case"insert":a.data.dataSet=this.decouple(a.data.dataSet),this._data.insert(a.data.dataSet);break;case"update":this._data.update(a.data.query,a.data.update,a.options);break;case"remove":this._data.remove(a.data.query,a.options)}},h.prototype.insert=function(){this._collectionsRun("insert",arguments)},h.prototype.update=function(){this._collectionsRun("update",arguments)},h.prototype.updateById=function(){this._collectionsRun("updateById",arguments)},h.prototype.remove=function(){this._collectionsRun("remove",arguments)},h.prototype._collectionsRun=function(a,b){for(var c=0;c<this._collections.length;c++)this._collections[c][a].apply(this._collections[c],b)},h.prototype.find=function(a,b){return this._data.find(a,b)},h.prototype.removeById=function(a){for(var b=0;b<this._collections.length;b++)this._collections[b].removeById(a)},h.prototype.subset=function(a,b){var c=this.find(a,b);return(new g).subsetOf(this).primaryKey(this._primaryKey).setData(c)},h.prototype.drop=function(a){if(!this.isDropped()){var b,c,d;if(this._debug&&console.log(this.logIdentifier()+" Dropping"),this._state="dropped",this._collections&&this._collections.length)for(c=[].concat(this._collections),b=0;b<c.length;b++)this.removeCollection(c[b]);if(this._view&&this._view.length)for(d=[].concat(this._view),b=0;b<d.length;b++)this._removeView(d[b]);this.emit("drop",this),delete this._listeners,a&&a(!1,!0)}return!0},e.prototype.init=function(){this._collectionGroup={},f.apply(this,arguments)},e.prototype.collectionGroup=function(a){var b=this;return a?a instanceof h?a:this._collectionGroup&&this._collectionGroup[a]?this._collectionGroup[a]:(this._collectionGroup[a]=new h(a).db(this),b.emit("create",b._collectionGroup[a],"collectionGroup",a),this._collectionGroup[a]):this._collectionGroup},e.prototype.collectionGroups=function(){var a,b=[];for(a in this._collectionGroup)this._collectionGroup.hasOwnProperty(a)&&b.push({name:a});return b},b.exports=h},{"./Collection":5,"./Shared":33}],7:[function(a,b,c){"use strict";var d,e,f,g,h=[];d=a("./Shared"),g=a("./Overload");var i=function(a){this.init.apply(this,arguments)};i.prototype.init=function(a){this._db={},this._debug={},this._name=a||"ForerunnerDB",h.push(this)},i.prototype.instantiatedCount=function(){return h.length},i.prototype.instances=function(a){return void 0!==a?h[a]:h},i.prototype.namedInstances=function(a){var b,c;{if(void 0===a){for(c=[],b=0;b<h.length;b++)c.push(h[b].name);return c}for(b=0;b<h.length;b++)if(h[b].name===a)return h[b]}},i.prototype.moduleLoaded=new g({string:function(a){if(void 0!==a){a=a.replace(/ /g,"");var b,c=a.split(",");for(b=0;b<c.length;b++)if(!d.modules[c[b]])return!1;return!0}return!1},"string, function":function(a,b){if(void 0!==a){a=a.replace(/ /g,"");var c,e=a.split(",");for(c=0;c<e.length;c++)if(!d.modules[e[c]])return!1;b&&b()}},"array, function":function(a,b){var c,e;for(e=0;e<a.length;e++)if(c=a[e],void 0!==c){c=c.replace(/ /g,"");var f,g=c.split(",");for(f=0;f<g.length;f++)if(!d.modules[g[f]])return!1}b&&b()},"string, function, function":function(a,b,c){if(void 0!==a){a=a.replace(/ /g,"");var e,f=a.split(",");for(e=0;e<f.length;e++)if(!d.modules[f[e]])return c(),!1;b()}}}),i.prototype.version=function(a,b){return void 0!==a?0===d.version.indexOf(a)?(b&&b(),!0):!1:d.version},i.moduleLoaded=i.prototype.moduleLoaded,i.version=i.prototype.version,i.instances=i.prototype.instances,i.instantiatedCount=i.prototype.instantiatedCount,i.shared=d,i.prototype.shared=d,d.addModule("Core",i),d.mixin(i.prototype,"Mixin.Common"),d.mixin(i.prototype,"Mixin.Constants"),e=a("./Db.js"),f=a("./Metrics.js"),d.synthesize(i.prototype,"name"),d.synthesize(i.prototype,"mongoEmulation"),i.prototype._isServer=!1,i.prototype.isClient=function(){return!this._isServer},i.prototype.isServer=function(){return this._isServer},i.prototype.collection=function(){throw"ForerunnerDB's instantiation has changed since version 1.3.36 to support multiple database instances. Please see the readme.md file for the minor change you have to make to get your project back up and running, or see the issue related to this change at https://github.com/Irrelon/ForerunnerDB/issues/44"},b.exports=i},{"./Db.js":8,"./Metrics.js":14,"./Overload":26,"./Shared":33}],8:[function(a,b,c){"use strict";var d,e,f,g,h,i;d=a("./Shared"),i=a("./Overload");var j=function(a,b){this.init.apply(this,arguments)};j.prototype.init=function(a,b){this.core(b),this._primaryKey="_id",this._name=a,this._collection={},this._debug={}},d.addModule("Db",j),j.prototype.moduleLoaded=new i({string:function(a){if(void 0!==a){a=a.replace(/ /g,"");var b,c=a.split(",");for(b=0;b<c.length;b++)if(!d.modules[c[b]])return!1;return!0}return!1},"string, function":function(a,b){if(void 0!==a){a=a.replace(/ /g,"");var c,e=a.split(",");for(c=0;c<e.length;c++)if(!d.modules[e[c]])return!1;b&&b()}},"string, function, function":function(a,b,c){if(void 0!==a){a=a.replace(/ /g,"");var e,f=a.split(",");for(e=0;e<f.length;e++)if(!d.modules[f[e]])return c(),!1;b()}}}),j.prototype.version=function(a,b){return void 0!==a?0===d.version.indexOf(a)?(b&&b(),!0):!1:d.version},j.moduleLoaded=j.prototype.moduleLoaded,j.version=j.prototype.version,j.shared=d,j.prototype.shared=d,d.addModule("Db",j),d.mixin(j.prototype,"Mixin.Common"),d.mixin(j.prototype,"Mixin.ChainReactor"),d.mixin(j.prototype,"Mixin.Constants"),d.mixin(j.prototype,"Mixin.Tags"),e=d.modules.Core,f=a("./Collection.js"),g=a("./Metrics.js"),h=a("./Checksum.js"),j.prototype._isServer=!1,d.synthesize(j.prototype,"core"),d.synthesize(j.prototype,"primaryKey"),d.synthesize(j.prototype,"state"),d.synthesize(j.prototype,"name"),d.synthesize(j.prototype,"mongoEmulation"),j.prototype.isClient=function(){return!this._isServer},j.prototype.isServer=function(){return this._isServer},j.prototype.Checksum=h,j.prototype.isClient=function(){return!this._isServer},j.prototype.isServer=function(){return this._isServer},j.prototype.arrayToCollection=function(a){return(new f).setData(a)},j.prototype.on=function(a,b){return this._listeners=this._listeners||{},this._listeners[a]=this._listeners[a]||[],this._listeners[a].push(b),this},j.prototype.off=function(a,b){if(a in this._listeners){var c=this._listeners[a],d=c.indexOf(b);d>-1&&c.splice(d,1)}return this},j.prototype.emit=function(a,b){if(this._listeners=this._listeners||{},a in this._listeners){var c,d=this._listeners[a],e=d.length;for(c=0;e>c;c++)d[c].apply(this,Array.prototype.slice.call(arguments,1))}return this},j.prototype.peek=function(a){var b,c,d=[],e=typeof a;for(b in this._collection)this._collection.hasOwnProperty(b)&&(c=this._collection[b],d="string"===e?d.concat(c.peek(a)):d.concat(c.find(a)));return d},j.prototype.peek=function(a){var b,c,d=[],e=typeof a;for(b in this._collection)this._collection.hasOwnProperty(b)&&(c=this._collection[b],d="string"===e?d.concat(c.peek(a)):d.concat(c.find(a)));return d},j.prototype.peekCat=function(a){var b,c,d,e={},f=typeof a;for(b in this._collection)this._collection.hasOwnProperty(b)&&(c=this._collection[b],"string"===f?(d=c.peek(a),d&&d.length&&(e[c.name()]=d)):(d=c.find(a),d&&d.length&&(e[c.name()]=d)));return e},j.prototype.drop=new i({"":function(){if(!this.isDropped()){var a,b=this.collections(),c=b.length;for(this._state="dropped",a=0;c>a;a++)this.collection(b[a].name).drop(),delete this._collection[b[a].name];this.emit("drop",this),delete this._listeners,delete this._core._db[this._name]}return!0},"function":function(a){if(!this.isDropped()){var b,c=this.collections(),d=c.length,e=0,f=function(){e++,e===d&&a&&a()};for(this._state="dropped",b=0;d>b;b++)this.collection(c[b].name).drop(f),delete this._collection[c[b].name];this.emit("drop",this),delete this._listeners,delete this._core._db[this._name]}return!0},"boolean":function(a){if(!this.isDropped()){var b,c=this.collections(),d=c.length;for(this._state="dropped",b=0;d>b;b++)this.collection(c[b].name).drop(a),delete this._collection[c[b].name];this.emit("drop",this),delete this._listeners,delete this._core._db[this._name]}return!0},"boolean, function":function(a,b){if(!this.isDropped()){var c,d=this.collections(),e=d.length,f=0,g=function(){f++,f===e&&b&&b()};for(this._state="dropped",c=0;e>c;c++)this.collection(d[c].name).drop(a,g),delete this._collection[d[c].name];this.emit("drop",this),delete this._listeners,delete this._core._db[this._name]}return!0}}),e.prototype.db=function(a){return a instanceof j?a:(a||(a=this.objectId()),this._db[a]=this._db[a]||new j(a,this),this._db[a].mongoEmulation(this.mongoEmulation()),this._db[a])},e.prototype.databases=function(a){var b,c,d,e=[];a&&(a instanceof RegExp||(a=new RegExp(a)));for(d in this._db)this._db.hasOwnProperty(d)&&(c=!0,a&&(a.exec(d)||(c=!1)),c&&(b={name:d,children:[]},this.shared.moduleExists("Collection")&&b.children.push({module:"collection",moduleName:"Collections",count:this._db[d].collections().length}),this.shared.moduleExists("CollectionGroup")&&b.children.push({module:"collectionGroup",moduleName:"Collection Groups",count:this._db[d].collectionGroups().length}),this.shared.moduleExists("Document")&&b.children.push({module:"document",moduleName:"Documents",count:this._db[d].documents().length}),this.shared.moduleExists("Grid")&&b.children.push({module:"grid",moduleName:"Grids",count:this._db[d].grids().length}),this.shared.moduleExists("Overview")&&b.children.push({module:"overview",moduleName:"Overviews",count:this._db[d].overviews().length}),this.shared.moduleExists("View")&&b.children.push({module:"view",moduleName:"Views",count:this._db[d].views().length}),e.push(b)));return e.sort(function(a,b){return a.name.localeCompare(b.name)}),e},d.finishModule("Db"),b.exports=j},{"./Checksum.js":4,"./Collection.js":5,"./Metrics.js":14,"./Overload":26,"./Shared":33}],9:[function(a,b,c){"use strict";var d,e,f,g;d=[16,8,4,2,1],e="0123456789bcdefghjkmnpqrstuvwxyz",f={right:{even:"bc01fg45238967deuvhjyznpkmstqrwx"},left:{even:"238967debc01fg45kmstqrwxuvhjyznp"},top:{even:"p0r21436x8zb9dcf5h7kjnmqesgutwvy"},bottom:{even:"14365h7k9dcfesgujnmqp0r2twvyx8zb"}},g={right:{even:"bcfguvyz"},left:{even:"0145hjnp"},top:{even:"prxz"},bottom:{even:"028b"}},f.bottom.odd=f.left.even,f.top.odd=f.right.even,f.left.odd=f.bottom.even,f.right.odd=f.top.even,g.bottom.odd=g.left.even,g.top.odd=g.right.even,g.left.odd=g.bottom.even,g.right.odd=g.top.even;var h=function(){};h.prototype.refineInterval=function(a,b,c){b&c?a[0]=(a[0]+a[1])/2:a[1]=(a[0]+a[1])/2},h.prototype.calculateNeighbours=function(a,b){var c;return b&&"object"!==b.type?(c=[],c[4]=a,c[3]=this.calculateAdjacent(a,"left"),c[5]=this.calculateAdjacent(a,"right"),c[1]=this.calculateAdjacent(a,"top"),c[7]=this.calculateAdjacent(a,"bottom"),c[0]=this.calculateAdjacent(c[3],"top"),c[2]=this.calculateAdjacent(c[5],"top"),c[6]=this.calculateAdjacent(c[3],"bottom"),c[8]=this.calculateAdjacent(c[5],"bottom")):(c={center:a,left:this.calculateAdjacent(a,"left"),right:this.calculateAdjacent(a,"right"),top:this.calculateAdjacent(a,"top"),bottom:this.calculateAdjacent(a,"bottom")},c.topLeft=this.calculateAdjacent(c.left,"top"),c.topRight=this.calculateAdjacent(c.right,"top"),c.bottomLeft=this.calculateAdjacent(c.left,"bottom"),c.bottomRight=this.calculateAdjacent(c.right,"bottom")),c},h.prototype.calculateAdjacent=function(a,b){a=a.toLowerCase();var c=a.charAt(a.length-1),d=a.length%2?"odd":"even",h=a.substring(0,a.length-1);return-1!==g[b][d].indexOf(c)&&(h=this.calculateAdjacent(h,b)),h+e[f[b][d].indexOf(c)]},h.prototype.decode=function(a){var b,c,f,g,h,i,j,k=1,l=[],m=[];for(l[0]=-90,l[1]=90,m[0]=-180,m[1]=180,i=90,j=180,b=0;b<a.length;b++)for(c=a[b],f=e.indexOf(c),g=0;5>g;g++)h=d[g],k?(j/=2,this.refineInterval(m,f,h)):(i/=2,this.refineInterval(l,f,h)),k=!k;return l[2]=(l[0]+l[1])/2,m[2]=(m[0]+m[1])/2,{latitude:l,longitude:m}},h.prototype.encode=function(a,b,c){var f,g=1,h=[],i=[],j=0,k=0,l="";for(c||(c=12),h[0]=-90,h[1]=90,i[0]=-180,i[1]=180;l.length<c;)g?(f=(i[0]+i[1])/2,b>f?(k|=d[j],i[0]=f):i[1]=f):(f=(h[0]+h[1])/2,a>f?(k|=d[j],h[0]=f):h[1]=f),g=!g,4>j?j++:(l+=e[k],j=0,k=0);return l},b.exports=h},{}],10:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=a("./BinaryTree"),g=a("./GeoHash"),h=new e,i=new g,j=[5e3,1250,156,39.1,4.89,1.22,.153,.0382,.00477,.00119,149e-6,372e-7],k=function(){this.init.apply(this,arguments)};k.prototype.init=function(a,b,c){this._btree=new f,this._btree.index(a),this._size=0,this._id=this._itemKeyHash(a,a),this._debug=b&&b.debug?b.debug:!1,this.unique(b&&b.unique?b.unique:!1),void 0!==a&&this.keys(a),void 0!==c&&(this.collection(c),this._btree.primaryKey(c.primaryKey())),this.name(b&&b.name?b.name:this._id),this._btree.debug(this._debug)},d.addModule("Index2d",k),d.mixin(k.prototype,"Mixin.Common"),d.mixin(k.prototype,"Mixin.ChainReactor"),d.mixin(k.prototype,"Mixin.Sorting"),k.prototype.id=function(){return this._id},k.prototype.state=function(){return this._state},k.prototype.size=function(){return this._size},d.synthesize(k.prototype,"data"),d.synthesize(k.prototype,"name"),d.synthesize(k.prototype,"collection"),d.synthesize(k.prototype,"type"),d.synthesize(k.prototype,"unique"),k.prototype.keys=function(a){return void 0!==a?(this._keys=a,this._keyCount=h.parse(this._keys).length,this):this._keys},k.prototype.rebuild=function(){if(this._collection){var a,b=this._collection.subset({},{$decouple:!1,$orderBy:this._keys}),c=b.find(),d=c.length;for(this._btree.clear(),this._size=0,this._unique&&(this._uniqueLookup={}),a=0;d>a;a++)this.insert(c[a])}this._state={name:this._name,keys:this._keys,indexSize:this._size,built:new Date,updated:new Date,ok:!0}},k.prototype.insert=function(a,b){var c,d=this._unique;a=this.decouple(a),d&&(c=this._itemHash(a,this._keys),this._uniqueLookup[c]=a);var e,f,g,j,k,l=this._btree.keys();for(k=0;k<l.length;k++)e=h.get(a,l[k].path),e instanceof Array&&(g=e[0],j=e[1],f=i.encode(g,j),h.set(a,l[k].path,f));return this._btree.insert(a)?(this._size++,!0):!1},k.prototype.remove=function(a,b){var c,d=this._unique;return d&&(c=this._itemHash(a,this._keys),delete this._uniqueLookup[c]),this._btree.remove(a)?(this._size--,!0):!1},k.prototype.violation=function(a){var b=this._itemHash(a,this._keys);return Boolean(this._uniqueLookup[b])},k.prototype.hashViolation=function(a){return Boolean(this._uniqueLookup[a])},k.prototype.lookup=function(a,b){var c,d,e,f,g=this._btree.keys();for(f=0;f<g.length;f++)if(c=g[f].path,d=h.get(a,c),"object"==typeof d)return d.$near&&(e=[],e=e.concat(this.near(c,d.$near,b))),d.$geoWithin&&(e=[],e=e.concat(this.geoWithin(c,d.$geoWithin,b))),e;return this._btree.lookup(a,b)},k.prototype.near=function(a,b,c){var d,e,f,g,k,l,m,n,o,p,q,r=this,s=[],t=this._collection.primaryKey();if("km"===b.$distanceUnits){for(m=b.$maxDistance,q=0;q<j.length;q++)if(m>j[q]){l=q;break}0===l&&(l=1)}else if("miles"===b.$distanceUnits){for(m=1.60934*b.$maxDistance,q=0;q<j.length;q++)if(m>j[q]){l=q;break}0===l&&(l=1)}for(d=i.encode(b.$point[0],b.$point[1],l),e=i.calculateNeighbours(d,{type:"array"}),k=[],f=0,q=0;9>q;q++)g=this._btree.startsWith(a,e[q]),f+=g._visited,k=k.concat(g);if(k=this._collection._primaryIndex.lookup(k),k.length){for(n={},q=0;q<k.length;q++)p=h.get(k[q],a),o=n[k[q][t]]=this.distanceBetweenPoints(b.$point[0],b.$point[1],p[0],p[1]),m>=o&&s.push(k[q]);s.sort(function(a,b){return r.sortAsc(n[a[t]],n[b[t]])})}return s},k.prototype.geoWithin=function(a,b,c){return[]},k.prototype.distanceBetweenPoints=function(a,b,c,d){var e=6371,f=this.toRadians(a),g=this.toRadians(c),h=this.toRadians(c-a),i=this.toRadians(d-b),j=Math.sin(h/2)*Math.sin(h/2)+Math.cos(f)*Math.cos(g)*Math.sin(i/2)*Math.sin(i/2),k=2*Math.atan2(Math.sqrt(j),Math.sqrt(1-j));return e*k},k.prototype.toRadians=function(a){return.01747722222222*a},k.prototype.match=function(a,b){return this._btree.match(a,b)},k.prototype._itemHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.value(a,c[d].path).join(":");return g},k.prototype._itemKeyHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.keyValue(a,c[d].path);return g},k.prototype._itemHashArr=function(a,b){var c,d,f,g,h,i=new e,j=[];for(c=i.parse(b),g=0;g<c.length;g++)for(d=i.value(a,c[g].path),f=0;f<d.length;f++)if(0===g)j.push(d[f]);else for(h=0;h<j.length;h++)j[h]=j[h]+"_"+d[f];return j},d.index["2d"]=k,d.finishModule("Index2d"),b.exports=k},{"./BinaryTree":3,"./GeoHash":9,"./Path":27,"./Shared":33}],11:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=a("./BinaryTree"),g=function(){this.init.apply(this,arguments)};g.prototype.init=function(a,b,c){this._btree=new f,this._btree.index(a),this._size=0,this._id=this._itemKeyHash(a,a),this._debug=b&&b.debug?b.debug:!1,this.unique(b&&b.unique?b.unique:!1),void 0!==a&&this.keys(a),void 0!==c&&(this.collection(c),this._btree.primaryKey(c.primaryKey())),this.name(b&&b.name?b.name:this._id),this._btree.debug(this._debug)},d.addModule("IndexBinaryTree",g),d.mixin(g.prototype,"Mixin.ChainReactor"),d.mixin(g.prototype,"Mixin.Sorting"),g.prototype.id=function(){return this._id},g.prototype.state=function(){return this._state},g.prototype.size=function(){return this._size},d.synthesize(g.prototype,"data"),d.synthesize(g.prototype,"name"),d.synthesize(g.prototype,"collection"),d.synthesize(g.prototype,"type"),d.synthesize(g.prototype,"unique"),g.prototype.keys=function(a){return void 0!==a?(this._keys=a,this._keyCount=(new e).parse(this._keys).length,this):this._keys},g.prototype.rebuild=function(){if(this._collection){var a,b=this._collection.subset({},{$decouple:!1,$orderBy:this._keys}),c=b.find(),d=c.length;for(this._btree.clear(),this._size=0,this._unique&&(this._uniqueLookup={}),a=0;d>a;a++)this.insert(c[a])}this._state={name:this._name,keys:this._keys,indexSize:this._size,built:new Date,updated:new Date,ok:!0}},g.prototype.insert=function(a,b){var c,d=this._unique;return d&&(c=this._itemHash(a,this._keys),this._uniqueLookup[c]=a),this._btree.insert(a)?(this._size++,!0):!1},g.prototype.remove=function(a,b){var c,d=this._unique;return d&&(c=this._itemHash(a,this._keys),delete this._uniqueLookup[c]),this._btree.remove(a)?(this._size--,!0):!1},g.prototype.violation=function(a){var b=this._itemHash(a,this._keys);return Boolean(this._uniqueLookup[b])},g.prototype.hashViolation=function(a){return Boolean(this._uniqueLookup[a])},g.prototype.lookup=function(a,b){return this._btree.lookup(a,b)},g.prototype.match=function(a,b){return this._btree.match(a,b)},g.prototype._itemHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.value(a,c[d].path).join(":");return g},g.prototype._itemKeyHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.keyValue(a,c[d].path);return g},g.prototype._itemHashArr=function(a,b){var c,d,f,g,h,i=new e,j=[];for(c=i.parse(b),g=0;g<c.length;g++)for(d=i.value(a,c[g].path),f=0;f<d.length;f++)if(0===g)j.push(d[f]);else for(h=0;h<j.length;h++)j[h]=j[h]+"_"+d[f];return j},d.index.btree=g,d.finishModule("IndexBinaryTree"),b.exports=g},{"./BinaryTree":3,"./Path":27,"./Shared":33}],12:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=function(){this.init.apply(this,arguments)};f.prototype.init=function(a,b,c){this._crossRef={},this._size=0,this._id=this._itemKeyHash(a,a),this.data({}),this.unique(b&&b.unique?b.unique:!1),void 0!==a&&this.keys(a),void 0!==c&&this.collection(c),this.name(b&&b.name?b.name:this._id)},d.addModule("IndexHashMap",f),d.mixin(f.prototype,"Mixin.ChainReactor"),f.prototype.id=function(){return this._id},f.prototype.state=function(){return this._state},f.prototype.size=function(){return this._size},d.synthesize(f.prototype,"data"),d.synthesize(f.prototype,"name"),d.synthesize(f.prototype,"collection"),d.synthesize(f.prototype,"type"),d.synthesize(f.prototype,"unique"),f.prototype.keys=function(a){return void 0!==a?(this._keys=a,this._keyCount=(new e).parse(this._keys).length,this):this._keys},f.prototype.rebuild=function(){if(this._collection){var a,b=this._collection.subset({},{$decouple:!1,$orderBy:this._keys}),c=b.find(),d=c.length;for(this._data={},this._size=0,this._unique&&(this._uniqueLookup={}),a=0;d>a;a++)this.insert(c[a])}this._state={name:this._name,keys:this._keys,indexSize:this._size,built:new Date,updated:new Date,ok:!0}},f.prototype.insert=function(a,b){var c,d,e,f=this._unique;for(f&&(c=this._itemHash(a,this._keys),this._uniqueLookup[c]=a),d=this._itemHashArr(a,this._keys),e=0;e<d.length;e++)this.pushToPathValue(d[e],a)},f.prototype.update=function(a,b){},f.prototype.remove=function(a,b){var c,d,e,f=this._unique;for(f&&(c=this._itemHash(a,this._keys),delete this._uniqueLookup[c]),d=this._itemHashArr(a,this._keys),e=0;e<d.length;e++)this.pullFromPathValue(d[e],a)},f.prototype.violation=function(a){var b=this._itemHash(a,this._keys);return Boolean(this._uniqueLookup[b])},f.prototype.hashViolation=function(a){return Boolean(this._uniqueLookup[a])},f.prototype.pushToPathValue=function(a,b){var c=this._data[a]=this._data[a]||[];-1===c.indexOf(b)&&(c.push(b),this._size++,this.pushToCrossRef(b,c))},f.prototype.pullFromPathValue=function(a,b){var c,d=this._data[a];c=d.indexOf(b),c>-1&&(d.splice(c,1),this._size--,this.pullFromCrossRef(b,d)),d.length||delete this._data[a]},f.prototype.pull=function(a){var b,c,d=a[this._collection.primaryKey()],e=this._crossRef[d],f=e.length;for(b=0;f>b;b++)c=e[b],this._pullFromArray(c,a);this._size--,delete this._crossRef[d]},f.prototype._pullFromArray=function(a,b){for(var c=a.length;c--;)a[c]===b&&a.splice(c,1)},f.prototype.pushToCrossRef=function(a,b){var c,d=a[this._collection.primaryKey()];this._crossRef[d]=this._crossRef[d]||[],c=this._crossRef[d],-1===c.indexOf(b)&&c.push(b)},f.prototype.pullFromCrossRef=function(a,b){var c=a[this._collection.primaryKey()];delete this._crossRef[c]},f.prototype.lookup=function(a){return this._data[this._itemHash(a,this._keys)]||[]},f.prototype.match=function(a,b){var c,d=new e,f=d.parseArr(this._keys),g=d.parseArr(a),h=[],i=0;for(c=0;c<f.length;c++){if(g[c]!==f[c])return{matchedKeys:[],totalKeyCount:g.length,score:0};i++,h.push(g[c])}return{matchedKeys:h,totalKeyCount:g.length,score:i}},f.prototype._itemHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.value(a,c[d].path).join(":");return g},f.prototype._itemKeyHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.keyValue(a,c[d].path);return g},f.prototype._itemHashArr=function(a,b){var c,d,f,g,h,i=new e,j=[];for(c=i.parse(b),g=0;g<c.length;g++)for(d=i.value(a,c[g].path),f=0;f<d.length;f++)if(0===g)j.push(d[f]);else for(h=0;h<j.length;h++)j[h]=j[h]+"_"+d[f];return j},d.index.hashed=f,d.finishModule("IndexHashMap"),b.exports=f},{"./Path":27,"./Shared":33}],13:[function(a,b,c){"use strict";var d=a("./Shared"),e=function(a){this.init.apply(this,arguments)};e.prototype.init=function(a){this._name=a,this._data={},this._primaryKey="_id"},d.addModule("KeyValueStore",e),d.mixin(e.prototype,"Mixin.ChainReactor"), d.synthesize(e.prototype,"name"),e.prototype.primaryKey=function(a){return void 0!==a?(this._primaryKey=a,this):this._primaryKey},e.prototype.truncate=function(){return this._data={},this},e.prototype.set=function(a,b){return this._data[a]=b?b:!0,this},e.prototype.get=function(a){return this._data[a]},e.prototype.lookup=function(a){var b,c,d,e=this._primaryKey,f=typeof a,g=[];if("string"===f||"number"===f)return d=this.get(a),void 0!==d?[d]:[];if("object"===f){if(a instanceof Array){for(c=a.length,g=[],b=0;c>b;b++)d=this.lookup(a[b]),d&&(d instanceof Array?g=g.concat(d):g.push(d));return g}if(a[e])return this.lookup(a[e])}},e.prototype.unSet=function(a){return delete this._data[a],this},e.prototype.uniqueSet=function(a,b){return void 0===this._data[a]?(this._data[a]=b,!0):!1},d.finishModule("KeyValueStore"),b.exports=e},{"./Shared":33}],14:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Operation"),f=function(){this.init.apply(this,arguments)};f.prototype.init=function(){this._data=[]},d.addModule("Metrics",f),d.mixin(f.prototype,"Mixin.ChainReactor"),f.prototype.create=function(a){var b=new e(a);return this._enabled&&this._data.push(b),b},f.prototype.start=function(){return this._enabled=!0,this},f.prototype.stop=function(){return this._enabled=!1,this},f.prototype.clear=function(){return this._data=[],this},f.prototype.list=function(){return this._data},d.finishModule("Metrics"),b.exports=f},{"./Operation":25,"./Shared":33}],15:[function(a,b,c){"use strict";var d={preSetData:function(){},postSetData:function(){}};b.exports=d},{}],16:[function(a,b,c){"use strict";var d={chain:function(a){this.debug&&this.debug()&&(a._reactorIn&&a._reactorOut?console.log(a._reactorIn.logIdentifier()+' Adding target "'+a._reactorOut.instanceIdentifier()+'" to the chain reactor target list'):console.log(this.logIdentifier()+' Adding target "'+a.instanceIdentifier()+'" to the chain reactor target list')),this._chain=this._chain||[];var b=this._chain.indexOf(a);-1===b&&this._chain.push(a)},unChain:function(a){if(this.debug&&this.debug()&&(a._reactorIn&&a._reactorOut?console.log(a._reactorIn.logIdentifier()+' Removing target "'+a._reactorOut.instanceIdentifier()+'" from the chain reactor target list'):console.log(this.logIdentifier()+' Removing target "'+a.instanceIdentifier()+'" from the chain reactor target list')),this._chain){var b=this._chain.indexOf(a);b>-1&&this._chain.splice(b,1)}},chainWillSend:function(){return Boolean(this._chain)},chainSend:function(a,b,c){if(this._chain){var d,e,f=this._chain,g=f.length,h=this.decouple(b,g);for(e=0;g>e;e++){if(d=f[e],d._state&&(!d._state||d.isDropped()))throw console.log("Reactor Data:",a,b,c),console.log("Reactor Node:",d),"Chain reactor attempting to send data to target reactor node that is in a dropped state!";this.debug&&this.debug()&&(d._reactorIn&&d._reactorOut?console.log(d._reactorIn.logIdentifier()+' Sending data down the chain reactor pipe to "'+d._reactorOut.instanceIdentifier()+'"'):console.log(this.logIdentifier()+' Sending data down the chain reactor pipe to "'+d.instanceIdentifier()+'"')),d.chainReceive&&d.chainReceive(this,a,h[e],c)}}},chainReceive:function(a,b,c,d){var e={sender:a,type:b,data:c,options:d},f=!1;this.debug&&this.debug()&&console.log(this.logIdentifier()+" Received data from parent reactor node"),this._chainHandler&&(f=this._chainHandler(e)),f||this.chainSend(e.type,e.data,e.options)}};b.exports=d},{}],17:[function(a,b,c){"use strict";var d,e=0,f=a("./Overload"),g=a("./Serialiser"),h=new g;d={serialiser:h,make:function(a){return h.convert(a)},store:function(a,b){if(void 0!==a){if(void 0!==b)return this._store=this._store||{},this._store[a]=b,this;if(this._store)return this._store[a]}},unStore:function(a){return void 0!==a&&delete this._store[a],this},decouple:function(a,b){if(void 0!==a&&""!==a){if(b){var c,d=this.jStringify(a),e=[];for(c=0;b>c;c++)e.push(this.jParse(d));return e}return this.jParse(this.jStringify(a))}},jParse:function(a){return JSON.parse(a,h.reviver())},jStringify:function(a){return JSON.stringify(a)},objectId:function(a){var b,c=Math.pow(10,17);if(a){var d,f=0,g=a.length;for(d=0;g>d;d++)f+=a.charCodeAt(d)*c;b=f.toString(16)}else e++,b=(e+(Math.random()*c+Math.random()*c+Math.random()*c+Math.random()*c)).toString(16);return b},hash:function(a){return JSON.stringify(a)},debug:new f([function(){return this._debug&&this._debug.all},function(a){return void 0!==a?"boolean"==typeof a?(this._debug=this._debug||{},this._debug.all=a,this.chainSend("debug",this._debug),this):this._debug&&this._debug[a]||this._db&&this._db._debug&&this._db._debug[a]||this._debug&&this._debug.all:this._debug&&this._debug.all},function(a,b){return void 0!==a?void 0!==b?(this._debug=this._debug||{},this._debug[a]=b,this.chainSend("debug",this._debug),this):this._debug&&this._debug[b]||this._db&&this._db._debug&&this._db._debug[a]:this._debug&&this._debug.all}]),classIdentifier:function(){return"ForerunnerDB."+this.className},instanceIdentifier:function(){return"["+this.className+"]"+this.name()},logIdentifier:function(){return"ForerunnerDB "+this.instanceIdentifier()},convertToFdb:function(a){var b,c,d,e;for(e in a)if(a.hasOwnProperty(e)&&(d=a,e.indexOf(".")>-1)){for(e=e.replace(".$","[|$|]"),c=e.split(".");b=c.shift();)b=b.replace("[|$|]",".$"),c.length?d[b]={}:d[b]=a[e],d=d[b];delete a[e]}},isDropped:function(){return"dropped"===this._state},debounce:function(a,b,c){var d,e=this;e._debounce=e._debounce||{},e._debounce[a]&&clearTimeout(e._debounce[a].timeout),d={callback:b,timeout:setTimeout(function(){delete e._debounce[a],b()},c)},e._debounce[a]=d}},b.exports=d},{"./Overload":26,"./Serialiser":32}],18:[function(a,b,c){"use strict";var d={TYPE_INSERT:0,TYPE_UPDATE:1,TYPE_REMOVE:2,PHASE_BEFORE:0,PHASE_AFTER:1};b.exports=d},{}],19:[function(a,b,c){"use strict";var d=a("./Overload"),e={on:new d({"string, function":function(a,b){return this._listeners=this._listeners||{},this._listeners[a]=this._listeners[a]||{},this._listeners[a]["*"]=this._listeners[a]["*"]||[],this._listeners[a]["*"].push(b),this},"string, *, function":function(a,b,c){return this._listeners=this._listeners||{},this._listeners[a]=this._listeners[a]||{},this._listeners[a][b]=this._listeners[a][b]||[],this._listeners[a][b].push(c),this}}),once:new d({"string, function":function(a,b){var c=this,d=function(){c.off(a,d),b.apply(c,arguments)};return this.on(a,d)},"string, *, function":function(a,b,c){var d=this,e=function(){d.off(a,b,e),c.apply(d,arguments)};return this.on(a,b,e)}}),off:new d({string:function(a){return this._listeners&&this._listeners[a]&&a in this._listeners&&delete this._listeners[a],this},"string, function":function(a,b){var c,d;return"string"==typeof b?this._listeners&&this._listeners[a]&&this._listeners[a][b]&&delete this._listeners[a][b]:this._listeners&&a in this._listeners&&(c=this._listeners[a]["*"],d=c.indexOf(b),d>-1&&c.splice(d,1)),this},"string, *, function":function(a,b,c){if(this._listeners&&a in this._listeners&&b in this.listeners[a]){var d=this._listeners[a][b],e=d.indexOf(c);e>-1&&d.splice(e,1)}},"string, *":function(a,b){this._listeners&&a in this._listeners&&b in this._listeners[a]&&delete this._listeners[a][b]}}),emit:function(a,b){if(this._listeners=this._listeners||{},a in this._listeners){var c,d,e,f,g,h,i;if(this._listeners[a]["*"])for(f=this._listeners[a]["*"],d=f.length,c=0;d>c;c++)e=f[c],"function"==typeof e&&e.apply(this,Array.prototype.slice.call(arguments,1));if(b instanceof Array&&b[0]&&b[0][this._primaryKey])for(g=this._listeners[a],d=b.length,c=0;d>c;c++)if(g[b[c][this._primaryKey]])for(h=g[b[c][this._primaryKey]].length,i=0;h>i;i++)e=g[b[c][this._primaryKey]][i],"function"==typeof e&&g[b[c][this._primaryKey]][i].apply(this,Array.prototype.slice.call(arguments,1))}return this},deferEmit:function(a,b){var c,d=this;return this._noEmitDefer||this._db&&(!this._db||this._db._noEmitDefer)?this.emit.apply(this,arguments):(c=arguments,this._deferTimeout=this._deferTimeout||{},this._deferTimeout[a]&&clearTimeout(this._deferTimeout[a]),this._deferTimeout[a]=setTimeout(function(){d.debug()&&console.log(d.logIdentifier()+" Emitting "+c[0]),d.emit.apply(d,c)},1)),this}};b.exports=e},{"./Overload":26}],20:[function(a,b,c){"use strict";var d={_match:function(a,b,c,d,e){var f,g,h,i,j,k,l=d,m=typeof a,n=typeof b,o=!0;if("object"===m&&null===a&&(m="null"),"object"===n&&null===b&&(n="null"),e=e||{},c=c||{},e.$rootQuery||(e.$rootQuery=b),e.$rootSource||(e.$rootSource=a),e.$currentQuery=b,e.$rootData=e.$rootData||{},"string"!==m&&"number"!==m&&"null"!==m||"string"!==n&&"number"!==n&&"null"!==n){if(("string"===m||"number"===m)&&"object"===n&&b instanceof RegExp)b.test(a)||(o=!1);else for(k in b)if(b.hasOwnProperty(k)){if(e.$previousQuery=e.$parent,e.$parent={query:b[k],key:k,parent:e.$previousQuery},f=!1,j=k.substr(0,2),"//"===j)continue;if(0===j.indexOf("$")&&(i=this._matchOp(k,a,b[k],c,e),i>-1)){if(i){if("or"===d)return!0}else o=i;f=!0}if(!f&&b[k]instanceof RegExp)if(f=!0,"object"===m&&void 0!==a[k]&&b[k].test(a[k])){if("or"===d)return!0}else o=!1;if(!f)if("object"==typeof b[k])if(void 0!==a[k])if(a[k]instanceof Array&&!(b[k]instanceof Array)){for(g=!1,h=0;h<a[k].length&&!(g=this._match(a[k][h],b[k],c,l,e));h++);if(g){if("or"===d)return!0}else o=!1}else if(!(a[k]instanceof Array)&&b[k]instanceof Array){for(g=!1,h=0;h<b[k].length&&!(g=this._match(a[k],b[k][h],c,l,e));h++);if(g){if("or"===d)return!0}else o=!1}else if("object"==typeof a)if(g=this._match(a[k],b[k],c,l,e)){if("or"===d)return!0}else o=!1;else if(g=this._match(void 0,b[k],c,l,e)){if("or"===d)return!0}else o=!1;else if(b[k]&&void 0!==b[k].$exists)if(g=this._match(void 0,b[k],c,l,e)){if("or"===d)return!0}else o=!1;else o=!1;else if(a&&a[k]===b[k]){if("or"===d)return!0}else if(a&&a[k]&&a[k]instanceof Array&&b[k]&&"object"!=typeof b[k]){for(g=!1,h=0;h<a[k].length&&!(g=this._match(a[k][h],b[k],c,l,e));h++);if(g){if("or"===d)return!0}else o=!1}else o=!1;if("and"===d&&!o)return!1}}else"number"===m||"null"===m||"null"===n?a!==b&&(o=!1):a.localeCompare(b)&&(o=!1);return o},_matchOp:function(a,b,c,d,e){switch(a){case"$gt":return b>c;case"$gte":return b>=c;case"$lt":return c>b;case"$lte":return c>=b;case"$exists":return void 0===b!==c;case"$eq":return b==c;case"$eeq":return b===c;case"$ne":return b!=c;case"$nee":return b!==c;case"$or":for(var f=0;f<c.length;f++)if(this._match(b,c[f],d,"and",e))return!0;return!1;case"$and":for(var g=0;g<c.length;g++)if(!this._match(b,c[g],d,"and",e))return!1;return!0;case"$in":if(c instanceof Array){var h,i=c,j=i.length;for(h=0;j>h;h++)if(this._match(b,i[h],d,"and",e))return!0;return!1}return"object"==typeof c?this._match(b,c,d,"and",e):(console.log(this.logIdentifier()+" Cannot use an $in operator on a non-array key: "+a,e.$rootQuery),!1);case"$nin":if(c instanceof Array){var k,l=c,m=l.length;for(k=0;m>k;k++)if(this._match(b,l[k],d,"and",e))return!1;return!0}return"object"==typeof c?this._match(b,c,d,"and",e):(console.log(this.logIdentifier()+" Cannot use a $nin operator on a non-array key: "+a,e.$rootQuery),!1);case"$distinct":e.$rootData["//distinctLookup"]=e.$rootData["//distinctLookup"]||{};for(var n in c)if(c.hasOwnProperty(n))return e.$rootData["//distinctLookup"][n]=e.$rootData["//distinctLookup"][n]||{},e.$rootData["//distinctLookup"][n][b[n]]?!1:(e.$rootData["//distinctLookup"][n][b[n]]=!0,!0);break;case"$count":var o,p,q;for(o in c)if(c.hasOwnProperty(o)&&(p=b[o],q="object"==typeof p&&p instanceof Array?p.length:0,!this._match(q,c[o],d,"and",e)))return!1;return!0;case"$find":case"$findOne":case"$findSub":var r,s,t,u,v,w,x="collection",y={};if(!c.$from)throw a+" missing $from property!";if(c.$fromType&&(x=c.$fromType,!this.db()[x]||"function"!=typeof this.db()[x]))throw a+' cannot operate against $fromType "'+x+'" because the database does not recognise this type of object!';if(r=c.$query||{},s=c.$options||{},"$findSub"===a){if(!c.$path)throw a+" missing $path property!";if(v=c.$path,t=c.$subQuery||{},u=c.$subOptions||{},!(e.$parent&&e.$parent.parent&&e.$parent.parent.key))return this._match(b,r,{},"and",e)&&(w=this._findSub([b],v,t,u)),w&&w.length>0;w=this.db()[x](c.$from).findSub(r,v,t,u)}else w=this.db()[x](c.$from)[a.substr(1)](r,s);return y[e.$parent.parent.key]=w,this._match(b,y,d,"and",e)}return-1},applyJoin:function(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x=this,y=[];for(a instanceof Array||(a=[a]),e=0;e<b.length;e++)for(f in b[e])if(b[e].hasOwnProperty(f))for(g=b[e][f],h=g.$sourceType||"collection",i="$"+h+"."+f,j=f,c[i]?k=c[i]:this._db[h]&&"function"==typeof this._db[h]&&(k=this._db[h](f)),l=0;l<a.length;l++){m={},n=!1,o=!1,p="";for(q in g)if(g.hasOwnProperty(q))if(r=g[q],"$"===q.substr(0,1))switch(q){case"$where":if(!r.$query&&!r.$options)throw'$join $where clause requires "$query" and / or "$options" keys to work!';r.$query&&(m=x.resolveDynamicQuery(r.$query,a[l])),r.$options&&(s=r.$options);break;case"$as":j=r;break;case"$multi":n=r;break;case"$require":o=r;break;case"$prefix":p=r}else m[q]=x.resolveDynamicQuery(r,a[l]);if(t=k.find(m,s),!o||o&&t[0])if("$root"===j){if(n!==!1)throw this.logIdentifier()+' Cannot combine [$as: "$root"] with [$multi: true] in $join clause!';u=t[0],v=a[l];for(w in u)u.hasOwnProperty(w)&&void 0===v[p+w]&&(v[p+w]=u[w])}else a[l][j]=n===!1?t[0]:t;else y.push(l)}return y},resolveDynamicQuery:function(a,b){var c,d,e,f,g,h=this;if("string"==typeof a)return f="$$."===a.substr(0,3)?this.sharedPathSolver.value(b,a.substr(3,a.length-3)):this.sharedPathSolver.value(b,a),f.length>1?{$in:f}:f[0];c={};for(g in a)if(a.hasOwnProperty(g))switch(d=typeof a[g],e=a[g],d){case"string":"$$."===e.substr(0,3)?c[g]=this.sharedPathSolver.value(b,e.substr(3,e.length-3))[0]:c[g]=e;break;case"object":c[g]=h.resolveDynamicQuery(e,b);break;default:c[g]=e}return c},spliceArrayByIndexList:function(a,b){var c;for(c=b.length-1;c>=0;c--)a.splice(b[c],1)}};b.exports=d},{}],21:[function(a,b,c){"use strict";var d={sortAsc:function(a,b){return"string"==typeof a&&"string"==typeof b?a.localeCompare(b):a>b?1:b>a?-1:0},sortDesc:function(a,b){return"string"==typeof a&&"string"==typeof b?b.localeCompare(a):a>b?-1:b>a?1:0}};b.exports=d},{}],22:[function(a,b,c){"use strict";var d,e={};d={tagAdd:function(a){var b,c=this,d=e[a]=e[a]||[];for(b=0;b<d.length;b++)if(d[b]===c)return!0;return d.push(c),c.on&&c.on("drop",function(){c.tagRemove(a)}),!0},tagRemove:function(a){var b,c=e[a];if(c)for(b=0;b<c.length;b++)if(c[b]===this)return c.splice(b,1),!0;return!1},tagLookup:function(a){return e[a]||[]},tagDrop:function(a,b){var c,d,e,f=this.tagLookup(a);if(c=function(){d--,b&&0===d&&b(!1)},f.length)for(d=f.length,e=f.length-1;e>=0;e--)f[e].drop(c);return!0}},b.exports=d},{}],23:[function(a,b,c){"use strict";var d=a("./Overload"),e={addTrigger:function(a,b,c,d){var e,f=this;return e=f._triggerIndexOf(a,b,c),-1===e?(f.triggerStack={},f._trigger=f._trigger||{},f._trigger[b]=f._trigger[b]||{},f._trigger[b][c]=f._trigger[b][c]||[],f._trigger[b][c].push({id:a,method:d,enabled:!0}),!0):!1},removeTrigger:function(a,b,c){var d,e=this;return d=e._triggerIndexOf(a,b,c),d>-1&&e._trigger[b][c].splice(d,1),!1},ignoreTriggers:function(a){return void 0!==a?(this._ignoreTriggers=a,this):this._ignoreTriggers},addLinkIO:function(a,b){var c,d,e,f,g,h,i,j,k,l=this;if(l._linkIO=l._linkIO||{},l._linkIO[a]=b,d=b["export"],e=b["import"],d&&(h=l.db().collection(d.to)),e&&(i=l.db().collection(e.from)),j=[l.TYPE_INSERT,l.TYPE_UPDATE,l.TYPE_REMOVE],c=function(a,b){b(!1,!0)},d&&(d.match||(d.match=c),d.types||(d.types=j),f=function(a,b,c){d.match(c,function(b,e){!b&&e&&d.data(c,a.type,function(b,c,d){!b&&c&&(h.ignoreTriggers(!0),"remove"!==a.type?h.upsert(c,d):h.remove(c,d),h.ignoreTriggers(!1))})})}),e&&(e.match||(e.match=c),e.types||(e.types=j),g=function(a,b,c){e.match(c,function(b,d){!b&&d&&e.data(c,a.type,function(b,c,d){!b&&c&&(h.ignoreTriggers(!0),"remove"!==a.type?l.upsert(c,d):l.remove(c,d),h.ignoreTriggers(!1))})})}),d)for(k=0;k<d.types.length;k++)l.addTrigger(a+"export"+d.types[k],d.types[k],l.PHASE_AFTER,f);if(e)for(k=0;k<e.types.length;k++)i.addTrigger(a+"import"+e.types[k],e.types[k],l.PHASE_AFTER,g)},removeLinkIO:function(a){var b,c,d,e,f=this,g=f._linkIO[a];if(g){if(b=g["export"],c=g["import"],b)for(e=0;e<b.types.length;e++)f.removeTrigger(a+"export"+b.types[e],b.types[e],f.db.PHASE_AFTER);if(c)for(d=f.db().collection(c.from),e=0;e<c.types.length;e++)d.removeTrigger(a+"import"+c.types[e],c.types[e],f.db.PHASE_AFTER);return delete f._linkIO[a],!0}return!1},enableTrigger:new d({string:function(a){var b,c,d,e,f,g=this,h=g._trigger,i=!1;if(h)for(f in h)if(h.hasOwnProperty(f)&&(b=h[f]))for(d in b)if(b.hasOwnProperty(d))for(c=b[d],e=0;e<c.length;e++)c[e].id===a&&(c[e].enabled=!0,i=!0);return i},number:function(a){var b,c,d,e=this,f=e._trigger[a],g=!1;if(f)for(c in f)if(f.hasOwnProperty(c))for(b=f[c],d=0;d<b.length;d++)b[d].enabled=!0,g=!0;return g},"number, number":function(a,b){var c,d,e=this,f=e._trigger[a],g=!1;if(f&&(c=f[b]))for(d=0;d<c.length;d++)c[d].enabled=!0,g=!0;return g},"string, number, number":function(a,b,c){var d=this,e=d._triggerIndexOf(a,b,c);return e>-1?(d._trigger[b][c][e].enabled=!0,!0):!1}}),disableTrigger:new d({string:function(a){var b,c,d,e,f,g=this,h=g._trigger,i=!1;if(h)for(f in h)if(h.hasOwnProperty(f)&&(b=h[f]))for(d in b)if(b.hasOwnProperty(d))for(c=b[d],e=0;e<c.length;e++)c[e].id===a&&(c[e].enabled=!1,i=!0);return i},number:function(a){var b,c,d,e=this,f=e._trigger[a],g=!1;if(f)for(c in f)if(f.hasOwnProperty(c))for(b=f[c],d=0;d<b.length;d++)b[d].enabled=!1,g=!0;return g},"number, number":function(a,b){var c,d,e=this,f=e._trigger[a],g=!1;if(f&&(c=f[b]))for(d=0;d<c.length;d++)c[d].enabled=!1,g=!0;return g},"string, number, number":function(a,b,c){var d=this,e=d._triggerIndexOf(a,b,c);return e>-1?(d._trigger[b][c][e].enabled=!1,!0):!1}}),willTrigger:function(a,b){if(!this._ignoreTriggers&&this._trigger&&this._trigger[a]&&this._trigger[a][b]&&this._trigger[a][b].length){var c,d=this._trigger[a][b];for(c=0;c<d.length;c++)if(d[c].enabled)return!0}return!1},processTrigger:function(a,b,c,d,e){var f,g,h,i,j,k,l,m=this;if(!m._ignoreTriggers&&m._trigger&&m._trigger[b]&&m._trigger[b][c]){for(f=m._trigger[b][c],h=f.length,g=0;h>g;g++)if(i=f[g],i.enabled){if(m.debug()){switch(b){case this.TYPE_INSERT:k="insert";break;case this.TYPE_UPDATE:k="update";break;case this.TYPE_REMOVE:k="remove";break;default:k=""}switch(c){case this.PHASE_BEFORE:l="before";break;case this.PHASE_AFTER:l="after";break;default:l=""}console.log('Triggers: Processing trigger "'+i.id+'" for '+k+' in phase "'+l+'"')}if(m.triggerStack&&m.triggerStack[b]&&m.triggerStack[b][c]&&m.triggerStack[b][c][i.id]){m.debug()&&console.log('Triggers: Will not run trigger "'+i.id+'" for '+k+' in phase "'+l+'" as it is already in the stack!');continue}if(m.triggerStack=m.triggerStack||{},m.triggerStack[b]={},m.triggerStack[b][c]={},m.triggerStack[b][c][i.id]=!0,j=i.method.call(m,a,d,e),m.triggerStack=m.triggerStack||{},m.triggerStack[b]={},m.triggerStack[b][c]={},m.triggerStack[b][c][i.id]=!1,j===!1)return!1;if(void 0!==j&&j!==!0&&j!==!1)throw"ForerunnerDB.Mixin.Triggers: Trigger error: "+j}return!0}},_triggerIndexOf:function(a,b,c){var d,e,f,g=this;if(g._trigger&&g._trigger[b]&&g._trigger[b][c])for(d=g._trigger[b][c],e=d.length,f=0;e>f;f++)if(d[f].id===a)return f;return-1}};b.exports=e},{"./Overload":26}],24:[function(a,b,c){"use strict";var d={_updateProperty:function(a,b,c){a[b]=c,this.debug()&&console.log(this.logIdentifier()+' Setting non-data-bound document property "'+b+'" to val "'+c+'"')},_updateIncrement:function(a,b,c){a[b]+=c},_updateSpliceMove:function(a,b,c){a.splice(c,0,a.splice(b,1)[0]),this.debug()&&console.log(this.logIdentifier()+' Moving non-data-bound document array index from "'+b+'" to "'+c+'"')},_updateSplicePush:function(a,b,c){a.length>b?a.splice(b,0,c):a.push(c)},_updatePush:function(a,b){a.push(b)},_updatePull:function(a,b){a.splice(b,1)},_updateMultiply:function(a,b,c){a[b]*=c},_updateRename:function(a,b,c){a[c]=a[b],delete a[b]},_updateOverwrite:function(a,b,c){a[b]=c},_updateUnset:function(a,b){delete a[b]},_updateClear:function(a,b){var c,d=a[b];if(d&&"object"==typeof d)for(c in d)d.hasOwnProperty(c)&&this._updateUnset(d,c)},_updatePop:function(a,b){var c,d=!1;if(a.length>0)if(b>0){for(c=0;b>c;c++)a.pop();d=!0}else if(0>b){for(c=0;c>b;c--)a.shift();d=!0}return d}};b.exports=d},{}],25:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=function(a){this.pathSolver=new e,this.counter=0,this.init.apply(this,arguments)};f.prototype.init=function(a){this._data={operation:a,index:{potential:[],used:!1},steps:[],time:{startMs:0,stopMs:0,totalMs:0,process:{}},flag:{},log:[]}},d.addModule("Operation",f),d.mixin(f.prototype,"Mixin.ChainReactor"),f.prototype.start=function(){this._data.time.startMs=(new Date).getTime()},f.prototype.log=function(a){if(a){var b=this._log.length>0?this._data.log[this._data.log.length-1].time:0,c={event:a,time:(new Date).getTime(),delta:0};return this._data.log.push(c),b&&(c.delta=c.time-b),this}return this._data.log},f.prototype.time=function(a){if(void 0!==a){var b=this._data.time.process,c=b[a]=b[a]||{};return c.startMs?(c.stopMs=(new Date).getTime(),c.totalMs=c.stopMs-c.startMs,c.stepObj.totalMs=c.totalMs,delete c.stepObj):(c.startMs=(new Date).getTime(),c.stepObj={name:a},this._data.steps.push(c.stepObj)),this}return this._data.time},f.prototype.flag=function(a,b){return void 0===a||void 0===b?void 0!==a?this._data.flag[a]:this._data.flag:void(this._data.flag[a]=b)},f.prototype.data=function(a,b,c){return void 0!==b?(this.pathSolver.set(this._data,a,b),this):this.pathSolver.get(this._data,a)},f.prototype.pushData=function(a,b,c){this.pathSolver.push(this._data,a,b)},f.prototype.stop=function(){this._data.time.stopMs=(new Date).getTime(),this._data.time.totalMs=this._data.time.stopMs-this._data.time.startMs},d.finishModule("Operation"),b.exports=f},{"./Path":27,"./Shared":33}],26:[function(a,b,c){"use strict";var d=function(a,b){if(b||(b=a,a=void 0),b){var c,d,e,f,g,h,i=this;if(!(b instanceof Array)){e={};for(c in b)if(b.hasOwnProperty(c))if(f=c.replace(/ /g,""),-1===f.indexOf("*"))e[f]=b[c];else for(h=this.generateSignaturePermutations(f),g=0;g<h.length;g++)e[h[g]]||(e[h[g]]=b[c]);b=e}return function(){var e,f,g,h=[];if(b instanceof Array){for(d=b.length,c=0;d>c;c++)if(b[c].length===arguments.length)return i.callExtend(this,"$main",b,b[c],arguments)}else{for(c=0;c<arguments.length&&(f=typeof arguments[c],"object"===f&&arguments[c]instanceof Array&&(f="array"),1!==arguments.length||"undefined"!==f);c++)h.push(f);if(e=h.join(","),b[e])return i.callExtend(this,"$main",b,b[e],arguments);for(c=h.length;c>=0;c--)if(e=h.slice(0,c).join(","),b[e+",..."])return i.callExtend(this,"$main",b,b[e+",..."],arguments)}throw g=void 0!==a?a:"function"==typeof this.name?this.name():"Unknown",console.log("Overload Definition:",b),'ForerunnerDB.Overload "'+g+'": Overloaded method does not have a matching signature "'+e+'" for the passed arguments: '+this.jStringify(h)}}return function(){}};d.prototype.generateSignaturePermutations=function(a){var b,c,d=[],e=["array","string","object","number","function","undefined"];if(a.indexOf("*")>-1)for(c=0;c<e.length;c++)b=a.replace("*",e[c]),d=d.concat(this.generateSignaturePermutations(b));else d.push(a);return d},d.prototype.callExtend=function(a,b,c,d,e){var f,g;return a&&c[b]?(f=a[b],a[b]=c[b],g=d.apply(a,e),a[b]=f,g):d.apply(a,e)},b.exports=d},{}],27:[function(a,b,c){"use strict";var d=a("./Shared"),e=function(a){this.init.apply(this,arguments)};e.prototype.init=function(a){a&&this.path(a)},d.addModule("Path",e),d.mixin(e.prototype,"Mixin.Common"),d.mixin(e.prototype,"Mixin.ChainReactor"),e.prototype.path=function(a){return void 0!==a?(this._path=this.clean(a),this._pathParts=this._path.split("."),this):this._path},e.prototype.hasObjectPaths=function(a,b){var c,d=!0;for(c in a)if(a.hasOwnProperty(c)){if(void 0===b[c])return!1;if("object"==typeof a[c]&&(d=this.hasObjectPaths(a[c],b[c]),!d))return!1}return d},e.prototype.countKeys=function(a){var b,c=0;for(b in a)a.hasOwnProperty(b)&&void 0!==a[b]&&("object"!=typeof a[b]?c++:c+=this.countKeys(a[b]));return c},e.prototype.countObjectPaths=function(a,b){var c,d,e={},f=0,g=0;for(d in b)b.hasOwnProperty(d)&&("object"==typeof b[d]?(c=this.countObjectPaths(a[d],b[d]),e[d]=c.matchedKeys,g+=c.totalKeyCount,f+=c.matchedKeyCount):(g++,a&&a[d]&&"object"!=typeof a[d]?(e[d]=!0,f++):e[d]=!1));return{matchedKeys:e,matchedKeyCount:f,totalKeyCount:g}},e.prototype.parse=function(a,b){var c,d,e,f=[],g="";for(d in a)if(a.hasOwnProperty(d))if(g=d,"object"==typeof a[d])if(b)for(c=this.parse(a[d],b),e=0;e<c.length;e++)f.push({path:g+"."+c[e].path,value:c[e].value});else for(c=this.parse(a[d]),e=0;e<c.length;e++)f.push({path:g+"."+c[e].path});else b?f.push({path:g,value:a[d]}):f.push({path:g});return f},e.prototype.parseArr=function(a,b){return b=b||{},this._parseArr(a,"",[],b)},e.prototype._parseArr=function(a,b,c,d){var e,f="";b=b||"",c=c||[];for(e in a)a.hasOwnProperty(e)&&(!d.ignore||d.ignore&&!d.ignore.test(e))&&(f=b?b+"."+e:e,"object"==typeof a[e]?(d.verbose&&c.push(f),this._parseArr(a[e],f,c,d)):c.push(f));return c},e.prototype.set=function(a,b,c){if(void 0!==a&&void 0!==b){var d,e;b=this.clean(b),d=b.split("."),e=d.shift(),d.length?(a[e]=a[e]||{},this.set(a[e],d.join("."),c)):a[e]=c}return a},e.prototype.get=function(a,b){return this.value(a,b)[0]},e.prototype.value=function(a,b,c){var d,e,f,g,h,i,j,k,l;if(b&&-1===b.indexOf("."))return[a[b]];if(void 0!==a&&"object"==typeof a){if((!c||c&&!c.skipArrCheck)&&a instanceof Array){for(j=[],k=0;k<a.length;k++)j.push(this.get(a[k],b));return j}for(i=[],void 0!==b&&(b=this.clean(b),d=b.split(".")),e=d||this._pathParts,f=e.length,g=a,k=0;f>k;k++){if(g=g[e[k]],h instanceof Array){for(l=0;l<h.length;l++)i=i.concat(this.value(h,l+"."+e[k],{skipArrCheck:!0}));return i}if(!g||"object"!=typeof g)break;h=g}return[g]}return[]},e.prototype.push=function(a,b,c){if(void 0!==a&&void 0!==b){var d,e;if(b=this.clean(b),d=b.split("."),e=d.shift(),d.length)a[e]=a[e]||{},this.set(a[e],d.join("."),c);else{if(a[e]=a[e]||[],!(a[e]instanceof Array))throw"ForerunnerDB.Path: Cannot push to a path whose endpoint is not an array!";a[e].push(c)}}return a},e.prototype.keyValue=function(a,b){var c,d,e,f,g,h,i;for(void 0!==b&&(b=this.clean(b),c=b.split(".")),d=c||this._pathParts,e=d.length,f=a,i=0;e>i;i++){if(f=f[d[i]],!f||"object"!=typeof f){h=d[i]+":"+f;break}g=f}return h},e.prototype.set=function(a,b,c){if(void 0!==a&&void 0!==b){var d,e;b=this.clean(b),d=b.split("."),e=d.shift(),d.length?(a[e]=a[e]||{},this.set(a[e],d.join("."),c)):a[e]=c}return a},e.prototype.clean=function(a){return"."===a.substr(0,1)&&(a=a.substr(1,a.length-1)),a},d.finishModule("Path"),b.exports=e},{"./Shared":33}],28:[function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m=a("./Shared"),n=a("async"),o=a("localforage");a("./PersistCompress"),a("./PersistCrypto");k=function(){this.init.apply(this,arguments)},k.prototype.localforage=o,k.prototype.init=function(a){var b=this;this._encodeSteps=[function(){return b._encode.apply(b,arguments)}],this._decodeSteps=[function(){return b._decode.apply(b,arguments)}],a.isClient()&&void 0!==window.Storage&&(this.mode("localforage"),o.config({driver:[o.INDEXEDDB,o.WEBSQL,o.LOCALSTORAGE],name:String(a.core().name()),storeName:"FDB"}))},m.addModule("Persist",k),m.mixin(k.prototype,"Mixin.ChainReactor"),m.mixin(k.prototype,"Mixin.Common"),d=m.modules.Db,e=a("./Collection"),f=e.prototype.drop,g=a("./CollectionGroup"),h=e.prototype.init,i=d.prototype.init,j=d.prototype.drop,l=m.overload,m.synthesize(k.prototype,"auto",function(a){var b=this;return void 0!==a&&(a?(this._db.on("create",function(){b._autoLoad.apply(b,arguments)}),this._db.on("change",function(){b._autoSave.apply(b,arguments)}),this._db.debug()&&console.log(this._db.logIdentifier()+" Automatic load/save enabled")):(this._db.off("create",this._autoLoad),this._db.off("change",this._autoSave),this._db.debug()&&console.log(this._db.logIdentifier()+" Automatic load/save disbled"))),this.$super.call(this,a)}),k.prototype._autoLoad=function(a,b,c){var d=this;"function"==typeof a.load?(d._db.debug()&&console.log(d._db.logIdentifier()+" Auto-loading data for "+b+":",c),a.load(function(a,b){a&&d._db.debug()&&console.log(d._db.logIdentifier()+" Automatic load failed:",a),d.emit("load",a,b)})):d._db.debug()&&console.log(d._db.logIdentifier()+" Auto-load for "+b+":",c,"no load method, skipping")},k.prototype._autoSave=function(a,b,c){var d=this;"function"==typeof a.save&&(d._db.debug()&&console.log(d._db.logIdentifier()+" Auto-saving data for "+b+":",c),a.save(function(a,b){a&&d._db.debug()&&console.log(d._db.logIdentifier()+" Automatic save failed:",a),d.emit("save",a,b)}))},k.prototype.mode=function(a){return void 0!==a?(this._mode=a,this):this._mode},k.prototype.driver=function(a){if(void 0!==a){switch(a.toUpperCase()){case"LOCALSTORAGE":o.setDriver(o.LOCALSTORAGE);break;case"WEBSQL":o.setDriver(o.WEBSQL);break;case"INDEXEDDB":o.setDriver(o.INDEXEDDB);break;default:throw"ForerunnerDB.Persist: The persistence driver you have specified is not found. Please use either IndexedDB, WebSQL or LocalStorage!"}return this}return o.driver()},k.prototype.decode=function(a,b){n.waterfall([function(b){b&&b(!1,a,{})}].concat(this._decodeSteps),b)},k.prototype.encode=function(a,b){n.waterfall([function(b){b&&b(!1,a,{})}].concat(this._encodeSteps),b)},m.synthesize(k.prototype,"encodeSteps"),m.synthesize(k.prototype,"decodeSteps"),k.prototype.addStep=new l({object:function(a){this.$main.call(this,function(){a.encode.apply(a,arguments)},function(){a.decode.apply(a,arguments)},0)},"function, function":function(a,b){this.$main.call(this,a,b,0)},"function, function, number":function(a,b,c){this.$main.call(this,a,b,c)},$main:function(a,b,c){0===c||void 0===c?(this._encodeSteps.push(a),this._decodeSteps.unshift(b)):(this._encodeSteps.splice(c,0,a),this._decodeSteps.splice(this._decodeSteps.length-c,0,b))}}),k.prototype.unwrap=function(a){var b,c=a.split("::fdb::");switch(c[0]){case"json":b=this.jParse(c[1]);break;case"raw":b=c[1]}},k.prototype._decode=function(a,b,c){var d,e;if(a){switch(d=a.split("::fdb::"),d[0]){case"json":e=this.jParse(d[1]);break;case"raw":e=d[1]}e?(b.foundData=!0,b.rowCount=e.length||0):(b.foundData=!1,b.rowCount=0),c&&c(!1,e,b)}else b.foundData=!1,b.rowCount=0,c&&c(!1,a,b)},k.prototype._encode=function(a,b,c){var d=a;a="object"==typeof a?"json::fdb::"+this.jStringify(a):"raw::fdb::"+a,d?(b.foundData=!0,b.rowCount=d.length||0):(b.foundData=!1,b.rowCount=0),c&&c(!1,a,b)},k.prototype.save=function(a,b,c){switch(this.mode()){case"localforage":this.encode(b,function(b,d,e){b?c(b):o.setItem(a,d).then(function(a){c&&c(!1,a,e)},function(a){c&&c(a)})});break;default:c&&c("No data handler.")}},k.prototype.load=function(a,b){var c=this;switch(this.mode()){case"localforage":o.getItem(a).then(function(a){c.decode(a,b)},function(a){b&&b(a)});break;default:b&&b("No data handler or unrecognised data type.")}},k.prototype.drop=function(a,b){switch(this.mode()){case"localforage":o.removeItem(a).then(function(){b&&b(!1)},function(a){b&&b(a)});break;default:b&&b("No data handler or unrecognised data type.")}},e.prototype.drop=new l({"":function(){this.isDropped()||this.drop(!0)},"function":function(a){this.isDropped()||this.drop(!0,a)},"boolean":function(a){if(!this.isDropped()){if(a){if(!this._name)throw"ForerunnerDB.Persist: Cannot drop a collection's persistent storage when no name assigned to collection!";this._db&&(this._db.persist.drop(this._db._name+"-"+this._name),this._db.persist.drop(this._db._name+"-"+this._name+"-metaData"))}f.call(this)}},"boolean, function":function(a,b){var c=this;if(!this.isDropped()){if(!a)return f.call(this,b);if(this._name){if(this._db)return this._db.persist.drop(this._db._name+"-"+this._name,function(){c._db.persist.drop(c._db._name+"-"+c._name+"-metaData",b)}),f.call(this);b&&b("Cannot drop a collection's persistent storage when the collection is not attached to a database!"); }else b&&b("Cannot drop a collection's persistent storage when no name assigned to collection!")}}}),e.prototype.save=function(a){var b,c=this;c._name?c._db?(b=function(){c._db.persist.save(c._db._name+"-"+c._name,c._data,function(b,d,e){b?a&&a(b):c._db.persist.save(c._db._name+"-"+c._name+"-metaData",c.metaData(),function(b,c,d){a&&a(b,c,e,d)})})},c.isProcessingQueue()?c.on("queuesComplete",function(){b()}):b()):a&&a("Cannot save a collection that is not attached to a database!"):a&&a("Cannot save a collection with no assigned name!")},e.prototype.load=function(a){var b=this;b._name?b._db?b._db.persist.load(b._db._name+"-"+b._name,function(c,d,e){c?a&&a(c):(d&&(b.remove({}),b.insert(d)),b._db.persist.load(b._db._name+"-"+b._name+"-metaData",function(c,d,f){c||d&&b.metaData(d),a&&a(c,e,f)}))}):a&&a("Cannot load a collection that is not attached to a database!"):a&&a("Cannot load a collection with no assigned name!")},e.prototype.saveCustom=function(a){var b,c=this,d={};c._name?c._db?(b=function(){c.encode(c._data,function(b,e,f){b?a(b):(d.data={name:c._db._name+"-"+c._name,store:e,tableStats:f},c.encode(c._data,function(b,e,f){b?a(b):(d.metaData={name:c._db._name+"-"+c._name+"-metaData",store:e,tableStats:f},a(!1,d))}))})},c.isProcessingQueue()?c.on("queuesComplete",function(){b()}):b()):a&&a("Cannot save a collection that is not attached to a database!"):a&&a("Cannot save a collection with no assigned name!")},e.prototype.loadCustom=function(a,b){var c=this;c._name?c._db?a.data&&a.data.store?a.metaData&&a.metaData.store?c.decode(a.data.store,function(d,e,f){d?b(d):e&&(c.remove({}),c.insert(e),c.decode(a.metaData.store,function(a,d,e){a?b(a):d&&(c.metaData(d),b&&b(a,f,e))}))}):b('No "metaData" key found in passed object!'):b('No "data" key found in passed object!'):b&&b("Cannot load a collection that is not attached to a database!"):b&&b("Cannot load a collection with no assigned name!")},d.prototype.init=function(){i.apply(this,arguments),this.persist=new k(this)},d.prototype.load=new l({"function":function(a){this.$main.call(this,{},a)},"object, function":function(a,b){this.$main.call(this,a,b)},$main:function(a,b){var c,d,e=this._collection,f=e.keys(),g=f.length;c=function(a){a?b&&b(a):(g--,0===g&&b&&b(!1))};for(d in e)e.hasOwnProperty(d)&&(a?e[d].loadCustom(a,c):e[d].load(c))}}),d.prototype.save=new l({"function":function(a){this.$main.call(this,{},a)},"object, function":function(a,b){this.$main.call(this,a,b)},$main:function(a,b){var c,d,e=this._collection,f=e.keys(),g=f.length;c=function(a){a?b&&b(a):(g--,0===g&&b&&b(!1))};for(d in e)e.hasOwnProperty(d)&&(a.custom?e[d].saveCustom(c):e[d].save(c))}}),m.finishModule("Persist"),b.exports=k},{"./Collection":5,"./CollectionGroup":6,"./PersistCompress":29,"./PersistCrypto":30,"./Shared":33,async:35,localforage:70}],29:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("pako"),f=function(){this.init.apply(this,arguments)};f.prototype.init=function(a){},d.mixin(f.prototype,"Mixin.Common"),f.prototype.encode=function(a,b,c){var d,f,g,h={data:a,type:"fdbCompress",enabled:!1};d=a.length,g=e.deflate(a,{to:"string"}),f=g.length,d>f&&(h.data=g,h.enabled=!0),b.compression={enabled:h.enabled,compressedBytes:f,uncompressedBytes:d,effect:Math.round(100/d*f)+"%"},c(!1,this.jStringify(h),b)},f.prototype.decode=function(a,b,c){var d,f=!1;a?(a=this.jParse(a),a.enabled?(d=e.inflate(a.data,{to:"string"}),f=!0):(d=a.data,f=!1),b.compression={enabled:f},c&&c(!1,d,b)):c&&c(!1,d,b)},d.plugins.FdbCompress=f,b.exports=f},{"./Shared":33,pako:71}],30:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("crypto-js"),f=function(){this.init.apply(this,arguments)};f.prototype.init=function(a){if(!a||!a.pass)throw'Cannot initialise persistent storage encryption without a passphrase provided in the passed options object as the "pass" field.';this._algo=a.algo||"AES",this._pass=a.pass},d.mixin(f.prototype,"Mixin.Common"),d.synthesize(f.prototype,"pass"),f.prototype.stringify=function(a){var b={ct:a.ciphertext.toString(e.enc.Base64)};return a.iv&&(b.iv=a.iv.toString()),a.salt&&(b.s=a.salt.toString()),this.jStringify(b)},f.prototype.parse=function(a){var b=this.jParse(a),c=e.lib.CipherParams.create({ciphertext:e.enc.Base64.parse(b.ct)});return b.iv&&(c.iv=e.enc.Hex.parse(b.iv)),b.s&&(c.salt=e.enc.Hex.parse(b.s)),c},f.prototype.encode=function(a,b,c){var d,f=this,g={type:"fdbCrypto"};d=e[this._algo].encrypt(a,this._pass,{format:{stringify:function(){return f.stringify.apply(f,arguments)},parse:function(){return f.parse.apply(f,arguments)}}}),g.data=d.toString(),g.enabled=!0,b.encryption={enabled:g.enabled},c&&c(!1,this.jStringify(g),b)},f.prototype.decode=function(a,b,c){var d,f=this;a?(a=this.jParse(a),d=e[this._algo].decrypt(a.data,this._pass,{format:{stringify:function(){return f.stringify.apply(f,arguments)},parse:function(){return f.parse.apply(f,arguments)}}}).toString(e.enc.Utf8),c&&c(!1,d,b)):c&&c(!1,a,b)},d.plugins.FdbCrypto=f,b.exports=f},{"./Shared":33,"crypto-js":44}],31:[function(a,b,c){"use strict";var d=a("./Shared"),e=function(a,b,c){if(!(a&&b&&c))throw"ForerunnerDB.ReactorIO: ReactorIO requires in, out and process arguments to instantiate!";if(this._reactorIn=a,this._reactorOut=b,this._chainHandler=c,!a.chain)throw"ForerunnerDB.ReactorIO: ReactorIO requires passed in and out objects to implement the ChainReactor mixin!";a.chain(this),this.chain(b)};d.addModule("ReactorIO",e),e.prototype.drop=function(){return this.isDropped()||(this._state="dropped",this._reactorIn&&this._reactorIn.unChain(this),this._reactorOut&&this.unChain(this._reactorOut),delete this._reactorIn,delete this._reactorOut,delete this._chainHandler,this.emit("drop",this),delete this._listeners),!0},d.synthesize(e.prototype,"state"),d.mixin(e.prototype,"Mixin.Common"),d.mixin(e.prototype,"Mixin.ChainReactor"),d.mixin(e.prototype,"Mixin.Events"),d.finishModule("ReactorIO"),b.exports=e},{"./Shared":33}],32:[function(a,b,c){"use strict";var d=function(){this.init.apply(this,arguments)};d.prototype.init=function(){var a=this;this._encoder=[],this._decoder=[],this.registerHandler("$date",function(a){return a instanceof Date?(a.toJSON=function(){return"$date:"+this.toISOString()},!0):!1},function(b){return"string"==typeof b&&0===b.indexOf("$date:")?a.convert(new Date(b.substr(6))):void 0}),this.registerHandler("$regexp",function(a){return a instanceof RegExp?(a.toJSON=function(){return"$regexp:"+this.source.length+":"+this.source+":"+(this.global?"g":"")+(this.ignoreCase?"i":"")},!0):!1},function(b){if("string"==typeof b&&0===b.indexOf("$regexp:")){var c=b.substr(8),d=c.indexOf(":"),e=Number(c.substr(0,d)),f=c.substr(d+1,e),g=c.substr(d+e+2);return a.convert(new RegExp(f,g))}})},d.prototype.registerHandler=function(a,b,c){void 0!==a&&(this._encoder.push(b),this._decoder.push(c))},d.prototype.convert=function(a){var b,c=this._encoder;for(b=0;b<c.length;b++)if(c[b](a))return a;return a},d.prototype.reviver=function(){var a=this._decoder;return function(b,c){var d,e;for(e=0;e<a.length;e++)if(d=a[e](c),void 0!==d)return d;return c}},b.exports=d},{}],33:[function(a,b,c){"use strict";var d=a("./Overload"),e={version:"1.3.750",modules:{},plugins:{},index:{},_synth:{},addModule:function(a,b){this.modules[a]=b,this.emit("moduleLoad",[a,b])},finishModule:function(a){if(!this.modules[a])throw"ForerunnerDB.Shared: finishModule called on a module that has not been registered with addModule(): "+a;this.modules[a]._fdbFinished=!0,this.modules[a].prototype?this.modules[a].prototype.className=a:this.modules[a].className=a,this.emit("moduleFinished",[a,this.modules[a]])},moduleFinished:function(a,b){this.modules[a]&&this.modules[a]._fdbFinished?b&&b(a,this.modules[a]):this.on("moduleFinished",b)},moduleExists:function(a){return Boolean(this.modules[a])},mixin:new d({"object, string":function(a,b){var c;if("string"==typeof b&&(c=this.mixins[b],!c))throw"ForerunnerDB.Shared: Cannot find mixin named: "+b;return this.$main.call(this,a,c)},"object, *":function(a,b){return this.$main.call(this,a,b)},$main:function(a,b){if(b&&"object"==typeof b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}}),synthesize:function(a,b,c){if(this._synth[b]=this._synth[b]||function(a){return void 0!==a?(this["_"+b]=a,this):this["_"+b]},c){var d=this;a[b]=function(){var a,e=this.$super;return this.$super=d._synth[b],a=c.apply(this,arguments),this.$super=e,a}}else a[b]=this._synth[b]},overload:d,mixins:{"Mixin.Common":a("./Mixin.Common"),"Mixin.Events":a("./Mixin.Events"),"Mixin.ChainReactor":a("./Mixin.ChainReactor"),"Mixin.CRUD":a("./Mixin.CRUD"),"Mixin.Constants":a("./Mixin.Constants"),"Mixin.Triggers":a("./Mixin.Triggers"),"Mixin.Sorting":a("./Mixin.Sorting"),"Mixin.Matching":a("./Mixin.Matching"),"Mixin.Updating":a("./Mixin.Updating"),"Mixin.Tags":a("./Mixin.Tags")}};e.mixin(e,"Mixin.Events"),b.exports=e},{"./Mixin.CRUD":15,"./Mixin.ChainReactor":16,"./Mixin.Common":17,"./Mixin.Constants":18,"./Mixin.Events":19,"./Mixin.Matching":20,"./Mixin.Sorting":21,"./Mixin.Tags":22,"./Mixin.Triggers":23,"./Mixin.Updating":24,"./Overload":26}],34:[function(a,b,c){Array.prototype.filter||(Array.prototype.filter=function(a){if(void 0===this||null===this)throw new TypeError;var b=Object(this),c=b.length>>>0;if("function"!=typeof a)throw new TypeError;for(var d=[],e=arguments.length>=2?arguments[1]:void 0,f=0;c>f;f++)if(f in b){var g=b[f];a.call(e,g,f,b)&&d.push(g)}return d}),"function"!=typeof Object.create&&(Object.create=function(){var a=function(){};return function(b){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof b)throw TypeError("Argument must be an object");a.prototype=b;var c=new a;return a.prototype=null,c}}()),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null===this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;var f=+b||0;if(Math.abs(f)===1/0&&(f=0),f>=e)return-1;for(c=Math.max(f>=0?f:e-Math.abs(f),0);e>c;){if(c in d&&d[c]===a)return c;c++}return-1}),b.exports={}},{}],35:[function(a,b,c){(function(a,c){!function(){function d(){}function e(a){return a}function f(a){return!!a}function g(a){return!a}function h(a){return function(){if(null===a)throw new Error("Callback was already called.");a.apply(this,arguments),a=null}}function i(a){return function(){null!==a&&(a.apply(this,arguments),a=null)}}function j(a){return N(a)||"number"==typeof a.length&&a.length>=0&&a.length%1===0}function k(a,b){for(var c=-1,d=a.length;++c<d;)b(a[c],c,a)}function l(a,b){for(var c=-1,d=a.length,e=Array(d);++c<d;)e[c]=b(a[c],c,a);return e}function m(a){return l(Array(a),function(a,b){return b})}function n(a,b,c){return k(a,function(a,d,e){c=b(c,a,d,e)}),c}function o(a,b){k(P(a),function(c){b(a[c],c)})}function p(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1}function q(a){var b,c,d=-1;return j(a)?(b=a.length,function(){return d++,b>d?d:null}):(c=P(a),b=c.length,function(){return d++,b>d?c[d]:null})}function r(a,b){return b=null==b?a.length-1:+b,function(){for(var c=Math.max(arguments.length-b,0),d=Array(c),e=0;c>e;e++)d[e]=arguments[e+b];switch(b){case 0:return a.call(this,d);case 1:return a.call(this,arguments[0],d)}}}function s(a){return function(b,c,d){return a(b,d)}}function t(a){return function(b,c,e){e=i(e||d),b=b||[];var f=q(b);if(0>=a)return e(null);var g=!1,j=0,k=!1;!function l(){if(g&&0>=j)return e(null);for(;a>j&&!k;){var d=f();if(null===d)return g=!0,void(0>=j&&e(null));j+=1,c(b[d],d,h(function(a){j-=1,a?(e(a),k=!0):l()}))}}()}}function u(a){return function(b,c,d){return a(K.eachOf,b,c,d)}}function v(a){return function(b,c,d,e){return a(t(c),b,d,e)}}function w(a){return function(b,c,d){return a(K.eachOfSeries,b,c,d)}}function x(a,b,c,e){e=i(e||d),b=b||[];var f=j(b)?[]:{};a(b,function(a,b,d){c(a,function(a,c){f[b]=c,d(a)})},function(a){e(a,f)})}function y(a,b,c,d){var e=[];a(b,function(a,b,d){c(a,function(c){c&&e.push({index:b,value:a}),d()})},function(){d(l(e.sort(function(a,b){return a.index-b.index}),function(a){return a.value}))})}function z(a,b,c,d){y(a,b,function(a,b){c(a,function(a){b(!a)})},d)}function A(a,b,c){return function(d,e,f,g){function h(){g&&g(c(!1,void 0))}function i(a,d,e){return g?void f(a,function(d){g&&b(d)&&(g(c(!0,a)),g=f=!1),e()}):e()}arguments.length>3?a(d,e,i,h):(g=f,f=e,a(d,i,h))}}function B(a,b){return b}function C(a,b,c){c=c||d;var e=j(b)?[]:{};a(b,function(a,b,c){a(r(function(a,d){d.length<=1&&(d=d[0]),e[b]=d,c(a)}))},function(a){c(a,e)})}function D(a,b,c,d){var e=[];a(b,function(a,b,d){c(a,function(a,b){e=e.concat(b||[]),d(a)})},function(a){d(a,e)})}function E(a,b,c){function e(a,b,c,e){if(null!=e&&"function"!=typeof e)throw new Error("task callback must be a function");return a.started=!0,N(b)||(b=[b]),0===b.length&&a.idle()?K.setImmediate(function(){a.drain()}):(k(b,function(b){var f={data:b,callback:e||d};c?a.tasks.unshift(f):a.tasks.push(f),a.tasks.length===a.concurrency&&a.saturated()}),void K.setImmediate(a.process))}function f(a,b){return function(){g-=1;var c=!1,d=arguments;k(b,function(a){k(i,function(b,d){b!==a||c||(i.splice(d,1),c=!0)}),a.callback.apply(a,d)}),a.tasks.length+g===0&&a.drain(),a.process()}}if(null==b)b=1;else if(0===b)throw new Error("Concurrency must not be zero");var g=0,i=[],j={tasks:[],concurrency:b,payload:c,saturated:d,empty:d,drain:d,started:!1,paused:!1,push:function(a,b){e(j,a,!1,b)},kill:function(){j.drain=d,j.tasks=[]},unshift:function(a,b){e(j,a,!0,b)},process:function(){for(;!j.paused&&g<j.concurrency&&j.tasks.length;){var b=j.payload?j.tasks.splice(0,j.payload):j.tasks.splice(0,j.tasks.length),c=l(b,function(a){return a.data});0===j.tasks.length&&j.empty(),g+=1,i.push(b[0]);var d=h(f(j,b));a(c,d)}},length:function(){return j.tasks.length},running:function(){return g},workersList:function(){return i},idle:function(){return j.tasks.length+g===0},pause:function(){j.paused=!0},resume:function(){if(j.paused!==!1){j.paused=!1;for(var a=Math.min(j.concurrency,j.tasks.length),b=1;a>=b;b++)K.setImmediate(j.process)}}};return j}function F(a){return r(function(b,c){b.apply(null,c.concat([r(function(b,c){"object"==typeof console&&(b?console.error&&console.error(b):console[a]&&k(c,function(b){console[a](b)}))})]))})}function G(a){return function(b,c,d){a(m(b),c,d)}}function H(a){return r(function(b,c){var d=r(function(c){var d=this,e=c.pop();return a(b,function(a,b,e){a.apply(d,c.concat([e]))},e)});return c.length?d.apply(this,c):d})}function I(a){return r(function(b){var c=b.pop();b.push(function(){var a=arguments;d?K.setImmediate(function(){c.apply(null,a)}):c.apply(null,a)});var d=!0;a.apply(this,b),d=!1})}var J,K={},L="object"==typeof self&&self.self===self&&self||"object"==typeof c&&c.global===c&&c||this;null!=L&&(J=L.async),K.noConflict=function(){return L.async=J,K};var M=Object.prototype.toString,N=Array.isArray||function(a){return"[object Array]"===M.call(a)},O=function(a){var b=typeof a;return"function"===b||"object"===b&&!!a},P=Object.keys||function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b},Q="function"==typeof setImmediate&&setImmediate,R=Q?function(a){Q(a)}:function(a){setTimeout(a,0)};"object"==typeof a&&"function"==typeof a.nextTick?K.nextTick=a.nextTick:K.nextTick=R,K.setImmediate=Q?R:K.nextTick,K.forEach=K.each=function(a,b,c){return K.eachOf(a,s(b),c)},K.forEachSeries=K.eachSeries=function(a,b,c){return K.eachOfSeries(a,s(b),c)},K.forEachLimit=K.eachLimit=function(a,b,c,d){return t(b)(a,s(c),d)},K.forEachOf=K.eachOf=function(a,b,c){function e(a){j--,a?c(a):null===f&&0>=j&&c(null)}c=i(c||d),a=a||[];for(var f,g=q(a),j=0;null!=(f=g());)j+=1,b(a[f],f,h(e));0===j&&c(null)},K.forEachOfSeries=K.eachOfSeries=function(a,b,c){function e(){var d=!0;return null===g?c(null):(b(a[g],g,h(function(a){if(a)c(a);else{if(g=f(),null===g)return c(null);d?K.setImmediate(e):e()}})),void(d=!1))}c=i(c||d),a=a||[];var f=q(a),g=f();e()},K.forEachOfLimit=K.eachOfLimit=function(a,b,c,d){t(b)(a,c,d)},K.map=u(x),K.mapSeries=w(x),K.mapLimit=v(x),K.inject=K.foldl=K.reduce=function(a,b,c,d){K.eachOfSeries(a,function(a,d,e){c(b,a,function(a,c){b=c,e(a)})},function(a){d(a,b)})},K.foldr=K.reduceRight=function(a,b,c,d){var f=l(a,e).reverse();K.reduce(f,b,c,d)},K.transform=function(a,b,c,d){3===arguments.length&&(d=c,c=b,b=N(a)?[]:{}),K.eachOf(a,function(a,d,e){c(b,a,d,e)},function(a){d(a,b)})},K.select=K.filter=u(y),K.selectLimit=K.filterLimit=v(y),K.selectSeries=K.filterSeries=w(y),K.reject=u(z),K.rejectLimit=v(z),K.rejectSeries=w(z),K.any=K.some=A(K.eachOf,f,e),K.someLimit=A(K.eachOfLimit,f,e),K.all=K.every=A(K.eachOf,g,g),K.everyLimit=A(K.eachOfLimit,g,g),K.detect=A(K.eachOf,e,B),K.detectSeries=A(K.eachOfSeries,e,B),K.detectLimit=A(K.eachOfLimit,e,B),K.sortBy=function(a,b,c){function d(a,b){var c=a.criteria,d=b.criteria;return d>c?-1:c>d?1:0}K.map(a,function(a,c){b(a,function(b,d){b?c(b):c(null,{value:a,criteria:d})})},function(a,b){return a?c(a):void c(null,l(b.sort(d),function(a){return a.value}))})},K.auto=function(a,b,c){function e(a){s.unshift(a)}function f(a){var b=p(s,a);b>=0&&s.splice(b,1)}function g(){j--,k(s.slice(0),function(a){a()})}"function"==typeof arguments[1]&&(c=b,b=null),c=i(c||d);var h=P(a),j=h.length;if(!j)return c(null);b||(b=j);var l={},m=0,q=!1,s=[];e(function(){j||c(null,l)}),k(h,function(d){function h(){return b>m&&n(t,function(a,b){return a&&l.hasOwnProperty(b)},!0)&&!l.hasOwnProperty(d)}function i(){h()&&(m++,f(i),k[k.length-1](s,l))}if(!q){for(var j,k=N(a[d])?a[d]:[a[d]],s=r(function(a,b){if(m--,b.length<=1&&(b=b[0]),a){var e={};o(l,function(a,b){e[b]=a}),e[d]=b,q=!0,c(a,e)}else l[d]=b,K.setImmediate(g)}),t=k.slice(0,k.length-1),u=t.length;u--;){if(!(j=a[t[u]]))throw new Error("Has nonexistent dependency in "+t.join(", "));if(N(j)&&p(j,d)>=0)throw new Error("Has cyclic dependencies")}h()?(m++,k[k.length-1](s,l)):e(i)}})},K.retry=function(a,b,c){function d(a,b){if("number"==typeof b)a.times=parseInt(b,10)||f;else{if("object"!=typeof b)throw new Error("Unsupported argument type for 'times': "+typeof b);a.times=parseInt(b.times,10)||f,a.interval=parseInt(b.interval,10)||g}}function e(a,b){function c(a,c){return function(d){a(function(a,b){d(!a||c,{err:a,result:b})},b)}}function d(a){return function(b){setTimeout(function(){b(null)},a)}}for(;i.times;){var e=!(i.times-=1);h.push(c(i.task,e)),!e&&i.interval>0&&h.push(d(i.interval))}K.series(h,function(b,c){c=c[c.length-1],(a||i.callback)(c.err,c.result)})}var f=5,g=0,h=[],i={times:f,interval:g},j=arguments.length;if(1>j||j>3)throw new Error("Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)");return 2>=j&&"function"==typeof a&&(c=b,b=a),"function"!=typeof a&&d(i,a),i.callback=c,i.task=b,i.callback?e():e},K.waterfall=function(a,b){function c(a){return r(function(d,e){if(d)b.apply(null,[d].concat(e));else{var f=a.next();f?e.push(c(f)):e.push(b),I(a).apply(null,e)}})}if(b=i(b||d),!N(a)){var e=new Error("First argument to waterfall must be an array of functions");return b(e)}return a.length?void c(K.iterator(a))():b()},K.parallel=function(a,b){C(K.eachOf,a,b)},K.parallelLimit=function(a,b,c){C(t(b),a,c)},K.series=function(a,b){C(K.eachOfSeries,a,b)},K.iterator=function(a){function b(c){function d(){return a.length&&a[c].apply(null,arguments),d.next()}return d.next=function(){return c<a.length-1?b(c+1):null},d}return b(0)},K.apply=r(function(a,b){return r(function(c){return a.apply(null,b.concat(c))})}),K.concat=u(D),K.concatSeries=w(D),K.whilst=function(a,b,c){if(c=c||d,a()){var e=r(function(d,f){d?c(d):a.apply(this,f)?b(e):c.apply(null,[null].concat(f))});b(e)}else c(null)},K.doWhilst=function(a,b,c){var d=0;return K.whilst(function(){return++d<=1||b.apply(this,arguments)},a,c)},K.until=function(a,b,c){return K.whilst(function(){return!a.apply(this,arguments)},b,c)},K.doUntil=function(a,b,c){return K.doWhilst(a,function(){return!b.apply(this,arguments)},c)},K.during=function(a,b,c){c=c||d;var e=r(function(b,d){b?c(b):(d.push(f),a.apply(this,d))}),f=function(a,d){a?c(a):d?b(e):c(null)};a(f)},K.doDuring=function(a,b,c){var d=0;K.during(function(a){d++<1?a(null,!0):b.apply(this,arguments)},a,c)},K.queue=function(a,b){var c=E(function(b,c){a(b[0],c)},b,1);return c},K.priorityQueue=function(a,b){function c(a,b){return a.priority-b.priority}function e(a,b,c){for(var d=-1,e=a.length-1;e>d;){var f=d+(e-d+1>>>1);c(b,a[f])>=0?d=f:e=f-1}return d}function f(a,b,f,g){if(null!=g&&"function"!=typeof g)throw new Error("task callback must be a function");return a.started=!0,N(b)||(b=[b]),0===b.length?K.setImmediate(function(){a.drain()}):void k(b,function(b){var h={data:b,priority:f,callback:"function"==typeof g?g:d};a.tasks.splice(e(a.tasks,h,c)+1,0,h),a.tasks.length===a.concurrency&&a.saturated(),K.setImmediate(a.process)})}var g=K.queue(a,b);return g.push=function(a,b,c){f(g,a,b,c)},delete g.unshift,g},K.cargo=function(a,b){return E(a,1,b)},K.log=F("log"),K.dir=F("dir"),K.memoize=function(a,b){var c={},d={},f=Object.prototype.hasOwnProperty;b=b||e;var g=r(function(e){var g=e.pop(),h=b.apply(null,e);f.call(c,h)?K.setImmediate(function(){g.apply(null,c[h])}):f.call(d,h)?d[h].push(g):(d[h]=[g],a.apply(null,e.concat([r(function(a){c[h]=a;var b=d[h];delete d[h];for(var e=0,f=b.length;f>e;e++)b[e].apply(null,a)})])))});return g.memo=c,g.unmemoized=a,g},K.unmemoize=function(a){return function(){return(a.unmemoized||a).apply(null,arguments)}},K.times=G(K.map),K.timesSeries=G(K.mapSeries),K.timesLimit=function(a,b,c,d){return K.mapLimit(m(a),b,c,d)},K.seq=function(){var a=arguments;return r(function(b){var c=this,e=b[b.length-1];"function"==typeof e?b.pop():e=d,K.reduce(a,b,function(a,b,d){b.apply(c,a.concat([r(function(a,b){d(a,b)})]))},function(a,b){e.apply(c,[a].concat(b))})})},K.compose=function(){return K.seq.apply(null,Array.prototype.reverse.call(arguments))},K.applyEach=H(K.eachOf),K.applyEachSeries=H(K.eachOfSeries),K.forever=function(a,b){function c(a){return a?e(a):void f(c)}var e=h(b||d),f=I(a);c()},K.ensureAsync=I,K.constant=r(function(a){var b=[null].concat(a);return function(a){return a.apply(this,b)}}),K.wrapSync=K.asyncify=function(a){return r(function(b){var c,d=b.pop();try{c=a.apply(this,b)}catch(e){return d(e)}O(c)&&"function"==typeof c.then?c.then(function(a){d(null,a)})["catch"](function(a){d(a.message?a:new Error(a))}):d(null,c)})},"object"==typeof b&&b.exports?b.exports=K:"function"==typeof define&&define.amd?define([],function(){return K}):L.async=K}()}).call(this,a("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:87}],36:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./enc-base64"),a("./md5"),a("./evpkdf"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;256>b;b++)128>b?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;256>b;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;e>h;h++)if(c>h)g[h]=b[h];else{var i=g[h-1];h%c?c>6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;e>k;k++){var h=e-k;if(k%4)var i=g[h];else var i=g[h-4];4>k||4>=h?j[k]=i:j[k]=l[f[i>>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;i>o;o++){var p=d[j>>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),a.AES})},{"./cipher-core":37,"./core":38,"./enc-base64":39,"./evpkdf":41,"./md5":46}],37:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){a.lib.Cipher||function(b){var c=a,d=c.lib,e=d.Base,f=d.WordArray,g=d.BufferedBlockAlgorithm,h=c.enc,i=(h.Utf8,h.Base64),j=c.algo,k=j.EvpKDF,l=d.Cipher=g.extend({cfg:e.extend(),createEncryptor:function(a,b){return this.create(this._ENC_XFORM_MODE,a,b)},createDecryptor:function(a,b){return this.create(this._DEC_XFORM_MODE,a,b)},init:function(a,b,c){this.cfg=this.cfg.extend(c),this._xformMode=a,this._key=b,this.reset()},reset:function(){g.reset.call(this),this._doReset()},process:function(a){return this._append(a),this._process()},finalize:function(a){a&&this._append(a);var b=this._doFinalize();return b},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function a(a){return"string"==typeof a?x:u}return function(b){return{encrypt:function(c,d,e){return a(d).encrypt(b,c,d,e)},decrypt:function(c,d,e){return a(d).decrypt(b,c,d,e)}}}}()}),m=(d.StreamCipher=l.extend({_doFinalize:function(){var a=this._process(!0);return a},blockSize:1}),c.mode={}),n=d.BlockCipherMode=e.extend({createEncryptor:function(a,b){return this.Encryptor.create(a,b)},createDecryptor:function(a,b){return this.Decryptor.create(a,b)},init:function(a,b){this._cipher=a,this._iv=b}}),o=m.CBC=function(){function a(a,c,d){var e=this._iv;if(e){var f=e;this._iv=b}else var f=this._prevBlock;for(var g=0;d>g;g++)a[c+g]^=f[g]}var c=n.extend();return c.Encryptor=c.extend({processBlock:function(b,c){var d=this._cipher,e=d.blockSize;a.call(this,b,c,e),d.encryptBlock(b,c),this._prevBlock=b.slice(c,c+e)}}),c.Decryptor=c.extend({processBlock:function(b,c){var d=this._cipher,e=d.blockSize,f=b.slice(c,c+e);d.decryptBlock(b,c),a.call(this,b,c,e),this._prevBlock=f}}),c}(),p=c.pad={},q=p.Pkcs7={pad:function(a,b){for(var c=4*b,d=c-a.sigBytes%c,e=d<<24|d<<16|d<<8|d,g=[],h=0;d>h;h+=4)g.push(e);var i=f.create(g,d);a.concat(i)},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}()})},{"./core":38}],38:[function(a,b,c){!function(a,d){"object"==typeof c?b.exports=c=d():"function"==typeof define&&define.amd?define([],d):a.CryptoJS=d()}(this,function(){var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;e>f;f++){var g=c[f>>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else for(var f=0;e>f;f+=4)b[d+f>>>2]=c[f>>>2];return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c,d=[],e=function(b){var b=b,c=987654321,d=4294967295;return function(){c=36969*(65535&c)+(c>>16)&d,b=18e3*(65535&b)+(b>>16)&d;var e=(c<<16)+b&d;return e/=4294967296,e+=.5,e*(a.random()>.5?1:-1)}},g=0;b>g;g+=4){var h=e(4294967296*(c||a.random()));c=987654071*h(),d.push(4294967296*h()|0)}return new f.init(d,b)}}),g=c.enc={},h=g.Hex={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;c>e;e++){var f=b[e>>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;c>e;e++){var f=b[e>>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0); var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;j>l;l+=g)this._doProcessBlock(d,l);var m=d.splice(0,j);c.sigBytes-=k}return new f.init(m,k)},clone:function(){var a=e.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0}),l=(d.Hasher=k.extend({cfg:e.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){k.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){a&&this._append(a);var b=this._doFinalize();return b},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new l.HMAC.init(a,c).finalize(b)}}}),c.algo={});return c}(Math);return a})},{}],39:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(){var b=a,c=b.lib,d=c.WordArray,e=b.enc;e.Base64={stringify:function(a){var b=a.words,c=a.sigBytes,d=this._map;a.clamp();for(var e=[],f=0;c>f;f+=3)for(var g=b[f>>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;4>k&&c>f+.75*k;k++)e.push(d.charAt(j>>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);-1!=f&&(b=f)}for(var g=[],h=0,i=0;b>i;i++)if(i%4){var j=c.indexOf(a.charAt(i-1))<<i%4*2,k=c.indexOf(a.charAt(i))>>>6-i%4*2,l=j|k;g[h>>>2]|=l<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),a.enc.Base64})},{"./core":38}],40:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(){function b(a){return a<<8&4278255360|a>>>8&16711935}var c=a,d=c.lib,e=d.WordArray,f=c.enc;f.Utf16=f.Utf16BE={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;c>e;e+=2){var f=b[e>>>2]>>>16-e%4*8&65535;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>1]|=a.charCodeAt(d)<<16-d%2*16;return e.create(c,2*b)}};f.Utf16LE={stringify:function(a){for(var c=a.words,d=a.sigBytes,e=[],f=0;d>f;f+=2){var g=b(c[f>>>2]>>>16-f%4*8&65535);e.push(String.fromCharCode(g))}return e.join("")},parse:function(a){for(var c=a.length,d=[],f=0;c>f;f++)d[f>>>1]|=b(a.charCodeAt(f)<<16-f%2*16);return e.create(d,2*c)}}}(),a.enc.Utf16})},{"./core":38}],41:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./sha1"),a("./hmac")):"function"==typeof define&&define.amd?define(["./core","./sha1","./hmac"],e):e(d.CryptoJS)}(this,function(a){return function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length<h;){j&&d.update(j);var j=d.update(a).finalize(b);d.reset();for(var k=1;i>k;k++)j=d.finalize(j),d.reset();f.concat(j)}return f.sigBytes=4*h,f}});b.EvpKDF=function(a,b,c){return h.create(c).compute(a,b)}}(),a.EvpKDF})},{"./core":38,"./hmac":43,"./sha1":62}],42:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return function(b){var c=a,d=c.lib,e=d.CipherParams,f=c.enc,g=f.Hex,h=c.format;h.Hex={stringify:function(a){return a.ciphertext.toString(g)},parse:function(a){var b=g.parse(a);return e.create({ciphertext:b})}}}(),a.format.Hex})},{"./cipher-core":37,"./core":38}],43:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){!function(){var b=a,c=b.lib,d=c.Base,e=b.enc,f=e.Utf8,g=b.algo;g.HMAC=d.extend({init:function(a,b){a=this._hasher=new a.init,"string"==typeof b&&(b=f.parse(b));var c=a.blockSize,d=4*c;b.sigBytes>d&&(b=a.finalize(b)),b.clamp();for(var e=this._oKey=b.clone(),g=this._iKey=b.clone(),h=e.words,i=g.words,j=0;c>j;j++)h[j]^=1549556828,i[j]^=909522486;e.sigBytes=g.sigBytes=d,this.reset()},reset:function(){var a=this._hasher;a.reset(),a.update(this._iKey)},update:function(a){return this._hasher.update(a),this},finalize:function(a){var b=this._hasher,c=b.finalize(a);b.reset();var d=b.finalize(this._oKey.clone().concat(c));return d}})}()})},{"./core":38}],44:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./x64-core"),a("./lib-typedarrays"),a("./enc-utf16"),a("./enc-base64"),a("./md5"),a("./sha1"),a("./sha256"),a("./sha224"),a("./sha512"),a("./sha384"),a("./sha3"),a("./ripemd160"),a("./hmac"),a("./pbkdf2"),a("./evpkdf"),a("./cipher-core"),a("./mode-cfb"),a("./mode-ctr"),a("./mode-ctr-gladman"),a("./mode-ofb"),a("./mode-ecb"),a("./pad-ansix923"),a("./pad-iso10126"),a("./pad-iso97971"),a("./pad-zeropadding"),a("./pad-nopadding"),a("./format-hex"),a("./aes"),a("./tripledes"),a("./rc4"),a("./rabbit"),a("./rabbit-legacy")):"function"==typeof define&&define.amd?define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy"],e):d.CryptoJS=e(d.CryptoJS)}(this,function(a){return a})},{"./aes":36,"./cipher-core":37,"./core":38,"./enc-base64":39,"./enc-utf16":40,"./evpkdf":41,"./format-hex":42,"./hmac":43,"./lib-typedarrays":45,"./md5":46,"./mode-cfb":47,"./mode-ctr":49,"./mode-ctr-gladman":48,"./mode-ecb":50,"./mode-ofb":51,"./pad-ansix923":52,"./pad-iso10126":53,"./pad-iso97971":54,"./pad-nopadding":55,"./pad-zeropadding":56,"./pbkdf2":57,"./rabbit":59,"./rabbit-legacy":58,"./rc4":60,"./ripemd160":61,"./sha1":62,"./sha224":63,"./sha256":64,"./sha3":65,"./sha384":66,"./sha512":67,"./tripledes":68,"./x64-core":69}],45:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(){if("function"==typeof ArrayBuffer){var b=a,c=b.lib,d=c.WordArray,e=d.init,f=d.init=function(a){if(a instanceof ArrayBuffer&&(a=new Uint8Array(a)),(a instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&a instanceof Uint8ClampedArray||a instanceof Int16Array||a instanceof Uint16Array||a instanceof Int32Array||a instanceof Uint32Array||a instanceof Float32Array||a instanceof Float64Array)&&(a=new Uint8Array(a.buffer,a.byteOffset,a.byteLength)),a instanceof Uint8Array){for(var b=a.byteLength,c=[],d=0;b>d;d++)c[d>>>2]|=a[d]<<24-d%4*8;e.call(this,c,b)}else e.apply(this,arguments)};f.prototype=d}}(),a.lib.WordArray})},{"./core":38}],46:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<<f|h>>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<<f|h>>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<<f|h>>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<<f|h>>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;64>a;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;16>g;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;4>j;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),a.MD5})},{"./core":38}],47:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.mode.CFB=function(){function b(a,b,c,d){var e=this._iv;if(e){var f=e.slice(0);this._iv=void 0}else var f=this._prevBlock;d.encryptBlock(f,0);for(var g=0;c>g;g++)a[b+g]^=f[g]}var c=a.lib.BlockCipherMode.extend();return c.Encryptor=c.extend({processBlock:function(a,c){var d=this._cipher,e=d.blockSize;b.call(this,a,c,e,d),this._prevBlock=a.slice(c,c+e)}}),c.Decryptor=c.extend({processBlock:function(a,c){var d=this._cipher,e=d.blockSize,f=a.slice(c,c+e);b.call(this,a,c,e,d),this._prevBlock=f}}),c}(),a.mode.CFB})},{"./cipher-core":37,"./core":38}],48:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.mode.CTRGladman=function(){function b(a){if(255===(a>>24&255)){var b=a>>16&255,c=a>>8&255,d=255&a;255===b?(b=0,255===c?(c=0,255===d?d=0:++d):++c):++b,a=0,a+=b<<16,a+=c<<8,a+=d}else a+=1<<24;return a}function c(a){return 0===(a[0]=b(a[0]))&&(a[1]=b(a[1])),a}var d=a.lib.BlockCipherMode.extend(),e=d.Encryptor=d.extend({processBlock:function(a,b){var d=this._cipher,e=d.blockSize,f=this._iv,g=this._counter;f&&(g=this._counter=f.slice(0),this._iv=void 0),c(g);var h=g.slice(0);d.encryptBlock(h,0);for(var i=0;e>i;i++)a[b+i]^=h[i]}});return d.Decryptor=e,d}(),a.mode.CTRGladman})},{"./cipher-core":37,"./core":38}],49:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.mode.CTR=function(){var b=a.lib.BlockCipherMode.extend(),c=b.Encryptor=b.extend({processBlock:function(a,b){var c=this._cipher,d=c.blockSize,e=this._iv,f=this._counter;e&&(f=this._counter=e.slice(0),this._iv=void 0);var g=f.slice(0);c.encryptBlock(g,0),f[d-1]=f[d-1]+1|0;for(var h=0;d>h;h++)a[b+h]^=g[h]}});return b.Decryptor=c,b}(),a.mode.CTR})},{"./cipher-core":37,"./core":38}],50:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),a.mode.ECB})},{"./cipher-core":37,"./core":38}],51:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.mode.OFB=function(){var b=a.lib.BlockCipherMode.extend(),c=b.Encryptor=b.extend({processBlock:function(a,b){var c=this._cipher,d=c.blockSize,e=this._iv,f=this._keystream;e&&(f=this._keystream=e.slice(0),this._iv=void 0),c.encryptBlock(f,0);for(var g=0;d>g;g++)a[b+g]^=f[g]}});return b.Decryptor=c,b}(),a.mode.OFB})},{"./cipher-core":37,"./core":38}],52:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.pad.AnsiX923={pad:function(a,b){var c=a.sigBytes,d=4*b,e=d-c%d,f=c+e-1;a.clamp(),a.words[f>>>2]|=e<<24-f%4*8,a.sigBytes+=e},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},a.pad.Ansix923})},{"./cipher-core":37,"./core":38}],53:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.pad.Iso10126={pad:function(b,c){var d=4*c,e=d-b.sigBytes%d;b.concat(a.lib.WordArray.random(e-1)).concat(a.lib.WordArray.create([e<<24],1))},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},a.pad.Iso10126})},{"./cipher-core":37,"./core":38}],54:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.pad.Iso97971={pad:function(b,c){b.concat(a.lib.WordArray.create([2147483648],1)),a.pad.ZeroPadding.pad(b,c)},unpad:function(b){a.pad.ZeroPadding.unpad(b),b.sigBytes--}},a.pad.Iso97971})},{"./cipher-core":37,"./core":38}],55:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.pad.NoPadding={pad:function(){},unpad:function(){}},a.pad.NoPadding})},{"./cipher-core":37,"./core":38}],56:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.pad.ZeroPadding={pad:function(a,b){var c=4*b;a.clamp(),a.sigBytes+=c-(a.sigBytes%c||c)},unpad:function(a){for(var b=a.words,c=a.sigBytes-1;!(b[c>>>2]>>>24-c%4*8&255);)c--;a.sigBytes=c+1}},a.pad.ZeroPadding})},{"./cipher-core":37,"./core":38}],57:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./sha1"),a("./hmac")):"function"==typeof define&&define.amd?define(["./core","./sha1","./hmac"],e):e(d.CryptoJS)}(this,function(a){return function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.SHA1,h=f.HMAC,i=f.PBKDF2=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=h.create(c.hasher,a),f=e.create(),g=e.create([1]),i=f.words,j=g.words,k=c.keySize,l=c.iterations;i.length<k;){var m=d.update(b).finalize(g);d.reset();for(var n=m.words,o=n.length,p=m,q=1;l>q;q++){p=d.finalize(p),d.reset();for(var r=p.words,s=0;o>s;s++)n[s]^=r[s]}f.concat(m),j[0]++}return f.sigBytes=4*k,f}});b.PBKDF2=function(a,b,c){return i.create(c).compute(a,b)}}(),a.PBKDF2})},{"./core":38,"./hmac":43,"./sha1":62}],58:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./enc-base64"),a("./md5"),a("./evpkdf"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return function(){function b(){for(var a=this._X,b=this._C,c=0;8>c;c++)h[c]=b[c];b[0]=b[0]+1295307597+this._b|0,b[1]=b[1]+3545052371+(b[0]>>>0<h[0]>>>0?1:0)|0,b[2]=b[2]+886263092+(b[1]>>>0<h[1]>>>0?1:0)|0,b[3]=b[3]+1295307597+(b[2]>>>0<h[2]>>>0?1:0)|0,b[4]=b[4]+3545052371+(b[3]>>>0<h[3]>>>0?1:0)|0,b[5]=b[5]+886263092+(b[4]>>>0<h[4]>>>0?1:0)|0,b[6]=b[6]+1295307597+(b[5]>>>0<h[5]>>>0?1:0)|0,b[7]=b[7]+3545052371+(b[6]>>>0<h[6]>>>0?1:0)|0,this._b=b[7]>>>0<h[7]>>>0?1:0;for(var c=0;8>c;c++){var d=a[c]+b[c],e=65535&d,f=d>>>16,g=((e*e>>>17)+e*f>>>15)+f*f,j=((4294901760&d)*d|0)+((65535&d)*d|0);i[c]=g^j}a[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,a[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,a[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,a[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,a[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,a[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,a[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,a[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}var c=a,d=c.lib,e=d.StreamCipher,f=c.algo,g=[],h=[],i=[],j=f.RabbitLegacy=e.extend({_doReset:function(){var a=this._key.words,c=this.cfg.iv,d=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],e=this._C=[a[2]<<16|a[2]>>>16,4294901760&a[0]|65535&a[1],a[3]<<16|a[3]>>>16,4294901760&a[1]|65535&a[2],a[0]<<16|a[0]>>>16,4294901760&a[2]|65535&a[3],a[1]<<16|a[1]>>>16,4294901760&a[3]|65535&a[0]];this._b=0;for(var f=0;4>f;f++)b.call(this);for(var f=0;8>f;f++)e[f]^=d[f+4&7];if(c){var g=c.words,h=g[0],i=g[1],j=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),k=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),l=j>>>16|4294901760&k,m=k<<16|65535&j;e[0]^=j,e[1]^=l,e[2]^=k,e[3]^=m,e[4]^=j,e[5]^=l,e[6]^=k,e[7]^=m;for(var f=0;4>f;f++)b.call(this)}},_doProcessBlock:function(a,c){var d=this._X;b.call(this),g[0]=d[0]^d[5]>>>16^d[3]<<16,g[1]=d[2]^d[7]>>>16^d[5]<<16,g[2]=d[4]^d[1]>>>16^d[7]<<16,g[3]=d[6]^d[3]>>>16^d[1]<<16;for(var e=0;4>e;e++)g[e]=16711935&(g[e]<<8|g[e]>>>24)|4278255360&(g[e]<<24|g[e]>>>8),a[c+e]^=g[e]},blockSize:4,ivSize:2});c.RabbitLegacy=e._createHelper(j)}(),a.RabbitLegacy})},{"./cipher-core":37,"./core":38,"./enc-base64":39,"./evpkdf":41,"./md5":46}],59:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./enc-base64"),a("./md5"),a("./evpkdf"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return function(){function b(){for(var a=this._X,b=this._C,c=0;8>c;c++)h[c]=b[c];b[0]=b[0]+1295307597+this._b|0,b[1]=b[1]+3545052371+(b[0]>>>0<h[0]>>>0?1:0)|0,b[2]=b[2]+886263092+(b[1]>>>0<h[1]>>>0?1:0)|0,b[3]=b[3]+1295307597+(b[2]>>>0<h[2]>>>0?1:0)|0,b[4]=b[4]+3545052371+(b[3]>>>0<h[3]>>>0?1:0)|0,b[5]=b[5]+886263092+(b[4]>>>0<h[4]>>>0?1:0)|0,b[6]=b[6]+1295307597+(b[5]>>>0<h[5]>>>0?1:0)|0,b[7]=b[7]+3545052371+(b[6]>>>0<h[6]>>>0?1:0)|0,this._b=b[7]>>>0<h[7]>>>0?1:0;for(var c=0;8>c;c++){var d=a[c]+b[c],e=65535&d,f=d>>>16,g=((e*e>>>17)+e*f>>>15)+f*f,j=((4294901760&d)*d|0)+((65535&d)*d|0);i[c]=g^j}a[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,a[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,a[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,a[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,a[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,a[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,a[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,a[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}var c=a,d=c.lib,e=d.StreamCipher,f=c.algo,g=[],h=[],i=[],j=f.Rabbit=e.extend({_doReset:function(){for(var a=this._key.words,c=this.cfg.iv,d=0;4>d;d++)a[d]=16711935&(a[d]<<8|a[d]>>>24)|4278255360&(a[d]<<24|a[d]>>>8);var e=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],f=this._C=[a[2]<<16|a[2]>>>16,4294901760&a[0]|65535&a[1],a[3]<<16|a[3]>>>16,4294901760&a[1]|65535&a[2],a[0]<<16|a[0]>>>16,4294901760&a[2]|65535&a[3],a[1]<<16|a[1]>>>16,4294901760&a[3]|65535&a[0]];this._b=0;for(var d=0;4>d;d++)b.call(this);for(var d=0;8>d;d++)f[d]^=e[d+4&7];if(c){var g=c.words,h=g[0],i=g[1],j=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),k=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),l=j>>>16|4294901760&k,m=k<<16|65535&j;f[0]^=j,f[1]^=l,f[2]^=k,f[3]^=m,f[4]^=j,f[5]^=l,f[6]^=k,f[7]^=m;for(var d=0;4>d;d++)b.call(this)}},_doProcessBlock:function(a,c){var d=this._X;b.call(this),g[0]=d[0]^d[5]>>>16^d[3]<<16,g[1]=d[2]^d[7]>>>16^d[5]<<16,g[2]=d[4]^d[1]>>>16^d[7]<<16,g[3]=d[6]^d[3]>>>16^d[1]<<16;for(var e=0;4>e;e++)g[e]=16711935&(g[e]<<8|g[e]>>>24)|4278255360&(g[e]<<24|g[e]>>>8),a[c+e]^=g[e]},blockSize:4,ivSize:2});c.Rabbit=e._createHelper(j)}(),a.Rabbit})},{"./cipher-core":37,"./core":38,"./enc-base64":39,"./evpkdf":41,"./md5":46}],60:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./enc-base64"),a("./md5"),a("./evpkdf"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return function(){function b(){for(var a=this._S,b=this._i,c=this._j,d=0,e=0;4>e;e++){b=(b+1)%256,c=(c+a[b])%256;var f=a[b];a[b]=a[c],a[c]=f,d|=a[(a[b]+a[c])%256]<<24-8*e}return this._i=b,this._j=c,d}var c=a,d=c.lib,e=d.StreamCipher,f=c.algo,g=f.RC4=e.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes,d=this._S=[],e=0;256>e;e++)d[e]=e;for(var e=0,f=0;256>e;e++){var g=e%c,h=b[g>>>2]>>>24-g%4*8&255;f=(f+d[e]+h)%256;var i=d[e];d[e]=d[f],d[f]=i}this._i=this._j=0},_doProcessBlock:function(a,c){a[c]^=b.call(this)},keySize:8,ivSize:0});c.RC4=e._createHelper(g);var h=f.RC4Drop=g.extend({cfg:g.cfg.extend({drop:192}),_doReset:function(){g._doReset.call(this);for(var a=this.cfg.drop;a>0;a--)b.call(this)}});c.RC4Drop=e._createHelper(h)}(),a.RC4})},{"./cipher-core":37,"./core":38,"./enc-base64":39,"./evpkdf":41,"./md5":46}],61:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(b){function c(a,b,c){return a^b^c}function d(a,b,c){return a&b|~a&c}function e(a,b,c){return(a|~b)^c}function f(a,b,c){return a&c|b&~c}function g(a,b,c){return a^(b|~c)}function h(a,b){return a<<b|a>>>32-b}var i=a,j=i.lib,k=j.WordArray,l=j.Hasher,m=i.algo,n=k.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),o=k.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),p=k.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),q=k.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),r=k.create([0,1518500249,1859775393,2400959708,2840853838]),s=k.create([1352829926,1548603684,1836072691,2053994217,0]),t=m.RIPEMD160=l.extend({_doReset:function(){this._hash=k.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var i=0;16>i;i++){var j=b+i,k=a[j];a[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}var l,m,t,u,v,w,x,y,z,A,B=this._hash.words,C=r.words,D=s.words,E=n.words,F=o.words,G=p.words,H=q.words;w=l=B[0],x=m=B[1],y=t=B[2],z=u=B[3],A=v=B[4];for(var I,i=0;80>i;i+=1)I=l+a[b+E[i]]|0,I+=16>i?c(m,t,u)+C[0]:32>i?d(m,t,u)+C[1]:48>i?e(m,t,u)+C[2]:64>i?f(m,t,u)+C[3]:g(m,t,u)+C[4],I=0|I,I=h(I,G[i]),I=I+v|0,l=v,v=u,u=h(t,10),t=m,m=I,I=w+a[b+F[i]]|0,I+=16>i?g(x,y,z)+D[0]:32>i?f(x,y,z)+D[1]:48>i?e(x,y,z)+D[2]:64>i?d(x,y,z)+D[3]:c(x,y,z)+D[4],I=0|I,I=h(I,H[i]),I=I+A|0,w=A,A=z,z=h(y,10),y=x,x=I;I=B[1]+t+z|0,B[1]=B[2]+u+A|0,B[2]=B[3]+v+w|0,B[3]=B[4]+l+x|0,B[4]=B[0]+m+y|0,B[0]=I},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),a.sigBytes=4*(b.length+1),this._process();for(var e=this._hash,f=e.words,g=0;5>g;g++){var h=f[g];f[g]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return e},clone:function(){var a=l.clone.call(this);return a._hash=this._hash.clone(),a}});i.RIPEMD160=l._createHelper(t),i.HmacRIPEMD160=l._createHmacHelper(t)}(Math),a.RIPEMD160})},{"./core":38}],62:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(){var b=a,c=b.lib,d=c.WordArray,e=c.Hasher,f=b.algo,g=[],h=f.SHA1=e.extend({_doReset:function(){this._hash=new d.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],h=c[3],i=c[4],j=0;80>j;j++){if(16>j)g[j]=0|a[b+j];else{var k=g[j-3]^g[j-8]^g[j-14]^g[j-16];g[j]=k<<1|k>>>31}var l=(d<<5|d>>>27)+i+g[j];l+=20>j?(e&f|~e&h)+1518500249:40>j?(e^f^h)+1859775393:60>j?(e&f|e&h|f&h)-1894007588:(e^f^h)-899497514,i=h,h=f,f=e<<30|e>>>2,e=d,d=l}c[0]=c[0]+d|0,c[1]=c[1]+e|0,c[2]=c[2]+f|0,c[3]=c[3]+h|0,c[4]=c[4]+i|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;return b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=Math.floor(c/4294967296),b[(d+64>>>9<<4)+15]=c,a.sigBytes=4*b.length,this._process(),this._hash},clone:function(){var a=e.clone.call(this);return a._hash=this._hash.clone(),a}});b.SHA1=e._createHelper(h),b.HmacSHA1=e._createHmacHelper(h)}(),a.SHA1})},{"./core":38}],63:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./sha256")):"function"==typeof define&&define.amd?define(["./core","./sha256"],e):e(d.CryptoJS)}(this,function(a){return function(){var b=a,c=b.lib,d=c.WordArray,e=b.algo,f=e.SHA256,g=e.SHA224=f.extend({_doReset:function(){this._hash=new d.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=f._doFinalize.call(this);return a.sigBytes-=4,a}});b.SHA224=f._createHelper(g),b.HmacSHA224=f._createHmacHelper(g)}(),a.SHA224})},{"./core":38,"./sha256":64}],64:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(b){var c=a,d=c.lib,e=d.WordArray,f=d.Hasher,g=c.algo,h=[],i=[];!function(){function a(a){for(var c=b.sqrt(a),d=2;c>=d;d++)if(!(a%d))return!1;return!0}function c(a){return 4294967296*(a-(0|a))|0}for(var d=2,e=0;64>e;)a(d)&&(8>e&&(h[e]=c(b.pow(d,.5))),i[e]=c(b.pow(d,1/3)),e++),d++}();var j=[],k=g.SHA256=f.extend({_doReset:function(){this._hash=new e.init(h.slice(0))},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],g=c[3],h=c[4],k=c[5],l=c[6],m=c[7],n=0;64>n;n++){if(16>n)j[n]=0|a[b+n];else{var o=j[n-15],p=(o<<25|o>>>7)^(o<<14|o>>>18)^o>>>3,q=j[n-2],r=(q<<15|q>>>17)^(q<<13|q>>>19)^q>>>10;j[n]=p+j[n-7]+r+j[n-16]}var s=h&k^~h&l,t=d&e^d&f^e&f,u=(d<<30|d>>>2)^(d<<19|d>>>13)^(d<<10|d>>>22),v=(h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25),w=m+v+s+i[n]+j[n],x=u+t;m=l,l=k,k=h,h=g+w|0,g=f,f=e,e=d,d=w+x|0}c[0]=c[0]+d|0,c[1]=c[1]+e|0,c[2]=c[2]+f|0,c[3]=c[3]+g|0,c[4]=c[4]+h|0,c[5]=c[5]+k|0,c[6]=c[6]+l|0,c[7]=c[7]+m|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;return c[e>>>5]|=128<<24-e%32,c[(e+64>>>9<<4)+14]=b.floor(d/4294967296),c[(e+64>>>9<<4)+15]=d,a.sigBytes=4*c.length,this._process(),this._hash},clone:function(){var a=f.clone.call(this);return a._hash=this._hash.clone(),a}});c.SHA256=f._createHelper(k),c.HmacSHA256=f._createHmacHelper(k)}(Math),a.SHA256})},{"./core":38}],65:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./x64-core")):"function"==typeof define&&define.amd?define(["./core","./x64-core"],e):e(d.CryptoJS)}(this,function(a){return function(b){var c=a,d=c.lib,e=d.WordArray,f=d.Hasher,g=c.x64,h=g.Word,i=c.algo,j=[],k=[],l=[];!function(){for(var a=1,b=0,c=0;24>c;c++){j[a+5*b]=(c+1)*(c+2)/2%64;var d=b%5,e=(2*a+3*b)%5;a=d,b=e}for(var a=0;5>a;a++)for(var b=0;5>b;b++)k[a+5*b]=b+(2*a+3*b)%5*5;for(var f=1,g=0;24>g;g++){for(var i=0,m=0,n=0;7>n;n++){if(1&f){var o=(1<<n)-1;32>o?m^=1<<o:i^=1<<o-32}128&f?f=f<<1^113:f<<=1}l[g]=h.create(i,m)}}();var m=[];!function(){for(var a=0;25>a;a++)m[a]=h.create()}();var n=i.SHA3=f.extend({cfg:f.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state=[],b=0;25>b;b++)a[b]=new h.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(a,b){for(var c=this._state,d=this.blockSize/2,e=0;d>e;e++){var f=a[b+2*e],g=a[b+2*e+1];f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),g=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8);var h=c[e];h.high^=g,h.low^=f}for(var i=0;24>i;i++){for(var n=0;5>n;n++){for(var o=0,p=0,q=0;5>q;q++){var h=c[n+5*q];o^=h.high,p^=h.low}var r=m[n];r.high=o,r.low=p}for(var n=0;5>n;n++)for(var s=m[(n+4)%5],t=m[(n+1)%5],u=t.high,v=t.low,o=s.high^(u<<1|v>>>31),p=s.low^(v<<1|u>>>31),q=0;5>q;q++){var h=c[n+5*q];h.high^=o,h.low^=p}for(var w=1;25>w;w++){var h=c[w],x=h.high,y=h.low,z=j[w];if(32>z)var o=x<<z|y>>>32-z,p=y<<z|x>>>32-z;else var o=y<<z-32|x>>>64-z,p=x<<z-32|y>>>64-z;var A=m[k[w]];A.high=o,A.low=p}var B=m[0],C=c[0];B.high=C.high,B.low=C.low;for(var n=0;5>n;n++)for(var q=0;5>q;q++){var w=n+5*q,h=c[w],D=m[w],E=m[(n+1)%5+5*q],F=m[(n+2)%5+5*q];h.high=D.high^~E.high&F.high,h.low=D.low^~E.low&F.low}var h=c[0],G=l[i];h.high^=G.high,h.low^=G.low}},_doFinalize:function(){var a=this._data,c=a.words,d=(8*this._nDataBytes,8*a.sigBytes),f=32*this.blockSize;c[d>>>5]|=1<<24-d%32,c[(b.ceil((d+1)/f)*f>>>5)-1]|=128,a.sigBytes=4*c.length,this._process();for(var g=this._state,h=this.cfg.outputLength/8,i=h/8,j=[],k=0;i>k;k++){var l=g[k],m=l.high,n=l.low;m=16711935&(m<<8|m>>>24)|4278255360&(m<<24|m>>>8),n=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),j.push(n),j.push(m)}return new e.init(j,h)},clone:function(){for(var a=f.clone.call(this),b=a._state=this._state.slice(0),c=0;25>c;c++)b[c]=b[c].clone();return a}});c.SHA3=f._createHelper(n),c.HmacSHA3=f._createHmacHelper(n)}(Math),a.SHA3})},{"./core":38,"./x64-core":69}],66:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./x64-core"),a("./sha512")):"function"==typeof define&&define.amd?define(["./core","./x64-core","./sha512"],e):e(d.CryptoJS)}(this,function(a){return function(){var b=a,c=b.x64,d=c.Word,e=c.WordArray,f=b.algo,g=f.SHA512,h=f.SHA384=g.extend({_doReset:function(){this._hash=new e.init([new d.init(3418070365,3238371032),new d.init(1654270250,914150663),new d.init(2438529370,812702999),new d.init(355462360,4144912697),new d.init(1731405415,4290775857),new d.init(2394180231,1750603025),new d.init(3675008525,1694076839),new d.init(1203062813,3204075428)]); },_doFinalize:function(){var a=g._doFinalize.call(this);return a.sigBytes-=16,a}});b.SHA384=g._createHelper(h),b.HmacSHA384=g._createHmacHelper(h)}(),a.SHA384})},{"./core":38,"./sha512":67,"./x64-core":69}],67:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./x64-core")):"function"==typeof define&&define.amd?define(["./core","./x64-core"],e):e(d.CryptoJS)}(this,function(a){return function(){function b(){return g.create.apply(g,arguments)}var c=a,d=c.lib,e=d.Hasher,f=c.x64,g=f.Word,h=f.WordArray,i=c.algo,j=[b(1116352408,3609767458),b(1899447441,602891725),b(3049323471,3964484399),b(3921009573,2173295548),b(961987163,4081628472),b(1508970993,3053834265),b(2453635748,2937671579),b(2870763221,3664609560),b(3624381080,2734883394),b(310598401,1164996542),b(607225278,1323610764),b(1426881987,3590304994),b(1925078388,4068182383),b(2162078206,991336113),b(2614888103,633803317),b(3248222580,3479774868),b(3835390401,2666613458),b(4022224774,944711139),b(264347078,2341262773),b(604807628,2007800933),b(770255983,1495990901),b(1249150122,1856431235),b(1555081692,3175218132),b(1996064986,2198950837),b(2554220882,3999719339),b(2821834349,766784016),b(2952996808,2566594879),b(3210313671,3203337956),b(3336571891,1034457026),b(3584528711,2466948901),b(113926993,3758326383),b(338241895,168717936),b(666307205,1188179964),b(773529912,1546045734),b(1294757372,1522805485),b(1396182291,2643833823),b(1695183700,2343527390),b(1986661051,1014477480),b(2177026350,1206759142),b(2456956037,344077627),b(2730485921,1290863460),b(2820302411,3158454273),b(3259730800,3505952657),b(3345764771,106217008),b(3516065817,3606008344),b(3600352804,1432725776),b(4094571909,1467031594),b(275423344,851169720),b(430227734,3100823752),b(506948616,1363258195),b(659060556,3750685593),b(883997877,3785050280),b(958139571,3318307427),b(1322822218,3812723403),b(1537002063,2003034995),b(1747873779,3602036899),b(1955562222,1575990012),b(2024104815,1125592928),b(2227730452,2716904306),b(2361852424,442776044),b(2428436474,593698344),b(2756734187,3733110249),b(3204031479,2999351573),b(3329325298,3815920427),b(3391569614,3928383900),b(3515267271,566280711),b(3940187606,3454069534),b(4118630271,4000239992),b(116418474,1914138554),b(174292421,2731055270),b(289380356,3203993006),b(460393269,320620315),b(685471733,587496836),b(852142971,1086792851),b(1017036298,365543100),b(1126000580,2618297676),b(1288033470,3409855158),b(1501505948,4234509866),b(1607167915,987167468),b(1816402316,1246189591)],k=[];!function(){for(var a=0;80>a;a++)k[a]=b()}();var l=i.SHA512=e.extend({_doReset:function(){this._hash=new h.init([new g.init(1779033703,4089235720),new g.init(3144134277,2227873595),new g.init(1013904242,4271175723),new g.init(2773480762,1595750129),new g.init(1359893119,2917565137),new g.init(2600822924,725511199),new g.init(528734635,4215389547),new g.init(1541459225,327033209)])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],g=c[3],h=c[4],i=c[5],l=c[6],m=c[7],n=d.high,o=d.low,p=e.high,q=e.low,r=f.high,s=f.low,t=g.high,u=g.low,v=h.high,w=h.low,x=i.high,y=i.low,z=l.high,A=l.low,B=m.high,C=m.low,D=n,E=o,F=p,G=q,H=r,I=s,J=t,K=u,L=v,M=w,N=x,O=y,P=z,Q=A,R=B,S=C,T=0;80>T;T++){var U=k[T];if(16>T)var V=U.high=0|a[b+2*T],W=U.low=0|a[b+2*T+1];else{var X=k[T-15],Y=X.high,Z=X.low,$=(Y>>>1|Z<<31)^(Y>>>8|Z<<24)^Y>>>7,_=(Z>>>1|Y<<31)^(Z>>>8|Y<<24)^(Z>>>7|Y<<25),aa=k[T-2],ba=aa.high,ca=aa.low,da=(ba>>>19|ca<<13)^(ba<<3|ca>>>29)^ba>>>6,ea=(ca>>>19|ba<<13)^(ca<<3|ba>>>29)^(ca>>>6|ba<<26),fa=k[T-7],ga=fa.high,ha=fa.low,ia=k[T-16],ja=ia.high,ka=ia.low,W=_+ha,V=$+ga+(_>>>0>W>>>0?1:0),W=W+ea,V=V+da+(ea>>>0>W>>>0?1:0),W=W+ka,V=V+ja+(ka>>>0>W>>>0?1:0);U.high=V,U.low=W}var la=L&N^~L&P,ma=M&O^~M&Q,na=D&F^D&H^F&H,oa=E&G^E&I^G&I,pa=(D>>>28|E<<4)^(D<<30|E>>>2)^(D<<25|E>>>7),qa=(E>>>28|D<<4)^(E<<30|D>>>2)^(E<<25|D>>>7),ra=(L>>>14|M<<18)^(L>>>18|M<<14)^(L<<23|M>>>9),sa=(M>>>14|L<<18)^(M>>>18|L<<14)^(M<<23|L>>>9),ta=j[T],ua=ta.high,va=ta.low,wa=S+sa,xa=R+ra+(S>>>0>wa>>>0?1:0),wa=wa+ma,xa=xa+la+(ma>>>0>wa>>>0?1:0),wa=wa+va,xa=xa+ua+(va>>>0>wa>>>0?1:0),wa=wa+W,xa=xa+V+(W>>>0>wa>>>0?1:0),ya=qa+oa,za=pa+na+(qa>>>0>ya>>>0?1:0);R=P,S=Q,P=N,Q=O,N=L,O=M,M=K+wa|0,L=J+xa+(K>>>0>M>>>0?1:0)|0,J=H,K=I,H=F,I=G,F=D,G=E,E=wa+ya|0,D=xa+za+(wa>>>0>E>>>0?1:0)|0}o=d.low=o+E,d.high=n+D+(E>>>0>o>>>0?1:0),q=e.low=q+G,e.high=p+F+(G>>>0>q>>>0?1:0),s=f.low=s+I,f.high=r+H+(I>>>0>s>>>0?1:0),u=g.low=u+K,g.high=t+J+(K>>>0>u>>>0?1:0),w=h.low=w+M,h.high=v+L+(M>>>0>w>>>0?1:0),y=i.low=y+O,i.high=x+N+(O>>>0>y>>>0?1:0),A=l.low=A+Q,l.high=z+P+(Q>>>0>A>>>0?1:0),C=m.low=C+S,m.high=B+R+(S>>>0>C>>>0?1:0)},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32,b[(d+128>>>10<<5)+30]=Math.floor(c/4294967296),b[(d+128>>>10<<5)+31]=c,a.sigBytes=4*b.length,this._process();var e=this._hash.toX32();return e},clone:function(){var a=e.clone.call(this);return a._hash=this._hash.clone(),a},blockSize:32});c.SHA512=e._createHelper(l),c.HmacSHA512=e._createHmacHelper(l)}(),a.SHA512})},{"./core":38,"./x64-core":69}],68:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./enc-base64"),a("./md5"),a("./evpkdf"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return function(){function b(a,b){var c=(this._lBlock>>>a^this._rBlock)&b;this._rBlock^=c,this._lBlock^=c<<a}function c(a,b){var c=(this._rBlock>>>a^this._lBlock)&b;this._lBlock^=c,this._rBlock^=c<<a}var d=a,e=d.lib,f=e.WordArray,g=e.BlockCipher,h=d.algo,i=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],j=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],k=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],m=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],n=h.DES=g.extend({_doReset:function(){for(var a=this._key,b=a.words,c=[],d=0;56>d;d++){var e=i[d]-1;c[d]=b[e>>>5]>>>31-e%32&1}for(var f=this._subKeys=[],g=0;16>g;g++){for(var h=f[g]=[],l=k[g],d=0;24>d;d++)h[d/6|0]|=c[(j[d]-1+l)%28]<<31-d%6,h[4+(d/6|0)]|=c[28+(j[d+24]-1+l)%28]<<31-d%6;h[0]=h[0]<<1|h[0]>>>31;for(var d=1;7>d;d++)h[d]=h[d]>>>4*(d-1)+3;h[7]=h[7]<<5|h[7]>>>27}for(var m=this._invSubKeys=[],d=0;16>d;d++)m[d]=f[15-d]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._subKeys)},decryptBlock:function(a,b){this._doCryptBlock(a,b,this._invSubKeys)},_doCryptBlock:function(a,d,e){this._lBlock=a[d],this._rBlock=a[d+1],b.call(this,4,252645135),b.call(this,16,65535),c.call(this,2,858993459),c.call(this,8,16711935),b.call(this,1,1431655765);for(var f=0;16>f;f++){for(var g=e[f],h=this._lBlock,i=this._rBlock,j=0,k=0;8>k;k++)j|=l[k][((i^g[k])&m[k])>>>0];this._lBlock=i,this._rBlock=h^j}var n=this._lBlock;this._lBlock=this._rBlock,this._rBlock=n,b.call(this,1,1431655765),c.call(this,8,16711935),c.call(this,2,858993459),b.call(this,16,65535),b.call(this,4,252645135),a[d]=this._lBlock,a[d+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});d.DES=g._createHelper(n);var o=h.TripleDES=g.extend({_doReset:function(){var a=this._key,b=a.words;this._des1=n.createEncryptor(f.create(b.slice(0,2))),this._des2=n.createEncryptor(f.create(b.slice(2,4))),this._des3=n.createEncryptor(f.create(b.slice(4,6)))},encryptBlock:function(a,b){this._des1.encryptBlock(a,b),this._des2.decryptBlock(a,b),this._des3.encryptBlock(a,b)},decryptBlock:function(a,b){this._des3.decryptBlock(a,b),this._des2.encryptBlock(a,b),this._des1.decryptBlock(a,b)},keySize:6,ivSize:2,blockSize:2});d.TripleDES=g._createHelper(o)}(),a.TripleDES})},{"./cipher-core":37,"./core":38,"./enc-base64":39,"./evpkdf":41,"./md5":46}],69:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(b){var c=a,d=c.lib,e=d.Base,f=d.WordArray,g=c.x64={};g.Word=e.extend({init:function(a,b){this.high=a,this.low=b}}),g.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=8*a.length},toX32:function(){for(var a=this.words,b=a.length,c=[],d=0;b>d;d++){var e=a[d];c.push(e.high),c.push(e.low)}return f.create(c,this.sigBytes)},clone:function(){for(var a=e.clone.call(this),b=a.words=this.words.slice(0),c=b.length,d=0;c>d;d++)b[d]=b[d].clone();return a}})}(),a})},{"./core":38}],70:[function(a,b,c){(function(a,d){!function(){var b,c,e,f;!function(){var a={},d={};b=function(b,c,d){a[b]={deps:c,callback:d}},f=e=c=function(b){function e(a){if("."!==a.charAt(0))return a;for(var c=a.split("/"),d=b.split("/").slice(0,-1),e=0,f=c.length;f>e;e++){var g=c[e];if(".."===g)d.pop();else{if("."===g)continue;d.push(g)}}return d.join("/")}if(f._eak_seen=a,d[b])return d[b];if(d[b]={},!a[b])throw new Error("Could not find module "+b);for(var g,h=a[b],i=h.deps,j=h.callback,k=[],l=0,m=i.length;m>l;l++)"exports"===i[l]?k.push(g={}):k.push(c(e(i[l])));var n=j.apply(this,k);return d[b]=g||n}}(),b("promise/all",["./utils","exports"],function(a,b){"use strict";function c(a){var b=this;if(!d(a))throw new TypeError("You must pass an array to all.");return new b(function(b,c){function d(a){return function(b){f(a,b)}}function f(a,c){h[a]=c,0===--i&&b(h)}var g,h=[],i=a.length;0===i&&b([]);for(var j=0;j<a.length;j++)g=a[j],g&&e(g.then)?g.then(d(j),c):f(j,g)})}var d=a.isArray,e=a.isFunction;b.all=c}),b("promise/asap",["exports"],function(b){"use strict";function c(){return function(){a.nextTick(g)}}function e(){var a=0,b=new k(g),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function f(){return function(){l.setTimeout(g,1)}}function g(){for(var a=0;a<m.length;a++){var b=m[a],c=b[0],d=b[1];c(d)}m=[]}function h(a,b){var c=m.push([a,b]);1===c&&i()}var i,j="undefined"!=typeof window?window:{},k=j.MutationObserver||j.WebKitMutationObserver,l="undefined"!=typeof d?d:void 0===this?window:this,m=[];i="undefined"!=typeof a&&"[object process]"==={}.toString.call(a)?c():k?e():f(),b.asap=h}),b("promise/config",["exports"],function(a){"use strict";function b(a,b){return 2!==arguments.length?c[a]:void(c[a]=b)}var c={instrument:!1};a.config=c,a.configure=b}),b("promise/polyfill",["./promise","./utils","exports"],function(a,b,c){"use strict";function e(){var a;a="undefined"!=typeof d?d:"undefined"!=typeof window&&window.document?window:self;var b="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var b;return new a.Promise(function(a){b=a}),g(b)}();b||(a.Promise=f)}var f=a.Promise,g=b.isFunction;c.polyfill=e}),b("promise/promise",["./config","./utils","./all","./race","./resolve","./reject","./asap","exports"],function(a,b,c,d,e,f,g,h){"use strict";function i(a){if(!v(a))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof i))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._subscribers=[],j(a,this)}function j(a,b){function c(a){o(b,a)}function d(a){q(b,a)}try{a(c,d)}catch(e){d(e)}}function k(a,b,c,d){var e,f,g,h,i=v(c);if(i)try{e=c(d),g=!0}catch(j){h=!0,f=j}else e=d,g=!0;n(b,e)||(i&&g?o(b,e):h?q(b,f):a===D?o(b,e):a===E&&q(b,e))}function l(a,b,c,d){var e=a._subscribers,f=e.length;e[f]=b,e[f+D]=c,e[f+E]=d}function m(a,b){for(var c,d,e=a._subscribers,f=a._detail,g=0;g<e.length;g+=3)c=e[g],d=e[g+b],k(b,c,d,f);a._subscribers=null}function n(a,b){var c,d=null;try{if(a===b)throw new TypeError("A promises callback cannot return that same promise.");if(u(b)&&(d=b.then,v(d)))return d.call(b,function(d){return c?!0:(c=!0,void(b!==d?o(a,d):p(a,d)))},function(b){return c?!0:(c=!0,void q(a,b))}),!0}catch(e){return c?!0:(q(a,e),!0)}return!1}function o(a,b){a===b?p(a,b):n(a,b)||p(a,b)}function p(a,b){a._state===B&&(a._state=C,a._detail=b,t.async(r,a))}function q(a,b){a._state===B&&(a._state=C,a._detail=b,t.async(s,a))}function r(a){m(a,a._state=D)}function s(a){m(a,a._state=E)}var t=a.config,u=(a.configure,b.objectOrFunction),v=b.isFunction,w=(b.now,c.all),x=d.race,y=e.resolve,z=f.reject,A=g.asap;t.async=A;var B=void 0,C=0,D=1,E=2;i.prototype={constructor:i,_state:void 0,_detail:void 0,_subscribers:void 0,then:function(a,b){var c=this,d=new this.constructor(function(){});if(this._state){var e=arguments;t.async(function(){k(c._state,d,e[c._state-1],c._detail)})}else l(this,d,a,b);return d},"catch":function(a){return this.then(null,a)}},i.all=w,i.race=x,i.resolve=y,i.reject=z,h.Promise=i}),b("promise/race",["./utils","exports"],function(a,b){"use strict";function c(a){var b=this;if(!d(a))throw new TypeError("You must pass an array to race.");return new b(function(b,c){for(var d,e=0;e<a.length;e++)d=a[e],d&&"function"==typeof d.then?d.then(b,c):b(d)})}var d=a.isArray;b.race=c}),b("promise/reject",["exports"],function(a){"use strict";function b(a){var b=this;return new b(function(b,c){c(a)})}a.reject=b}),b("promise/resolve",["exports"],function(a){"use strict";function b(a){if(a&&"object"==typeof a&&a.constructor===this)return a;var b=this;return new b(function(b){b(a)})}a.resolve=b}),b("promise/utils",["exports"],function(a){"use strict";function b(a){return c(a)||"object"==typeof a&&null!==a}function c(a){return"function"==typeof a}function d(a){return"[object Array]"===Object.prototype.toString.call(a)}var e=Date.now||function(){return(new Date).getTime()};a.objectOrFunction=b,a.isFunction=c,a.isArray=d,a.now=e}),c("promise/polyfill").polyfill()}(),function(a,d){"object"==typeof c&&"object"==typeof b?b.exports=d():"function"==typeof define&&define.amd?define([],d):"object"==typeof c?c.localforage=d():a.localforage=d()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}b.__esModule=!0;var e=function(a){function b(a,b){a[b]=function(){var c=arguments;return a.ready().then(function(){return a[b].apply(a,c)})}}function e(){for(var a=1;a<arguments.length;a++){var b=arguments[a];if(b)for(var c in b)b.hasOwnProperty(c)&&(m(b[c])?arguments[0][c]=b[c].slice():arguments[0][c]=b[c])}return arguments[0]}function f(a){for(var b in h)if(h.hasOwnProperty(b)&&h[b]===a)return!0;return!1}var g={},h={INDEXEDDB:"asyncStorage",LOCALSTORAGE:"localStorageWrapper",WEBSQL:"webSQLStorage"},i=[h.INDEXEDDB,h.WEBSQL,h.LOCALSTORAGE],j=["clear","getItem","iterate","key","keys","length","removeItem","setItem"],k={description:"",driver:i.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1},l=function(a){var b={};return b[h.INDEXEDDB]=!!function(){try{var b=b||a.indexedDB||a.webkitIndexedDB||a.mozIndexedDB||a.OIndexedDB||a.msIndexedDB;return"undefined"!=typeof a.openDatabase&&a.navigator&&a.navigator.userAgent&&/Safari/.test(a.navigator.userAgent)&&!/Chrome/.test(a.navigator.userAgent)?!1:b&&"function"==typeof b.open&&"undefined"!=typeof a.IDBKeyRange}catch(c){return!1}}(),b[h.WEBSQL]=!!function(){try{return a.openDatabase}catch(b){return!1}}(),b[h.LOCALSTORAGE]=!!function(){try{return a.localStorage&&"setItem"in a.localStorage&&a.localStorage.setItem}catch(b){return!1}}(),b}(a),m=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)},n=function(){function a(b){d(this,a),this.INDEXEDDB=h.INDEXEDDB,this.LOCALSTORAGE=h.LOCALSTORAGE,this.WEBSQL=h.WEBSQL,this._defaultConfig=e({},k),this._config=e({},this._defaultConfig,b),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver)}return a.prototype.config=function(a){if("object"==typeof a){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var b in a)"storeName"===b&&(a[b]=a[b].replace(/\W/g,"_")),this._config[b]=a[b];return"driver"in a&&a.driver&&this.setDriver(this._config.driver),!0}return"string"==typeof a?this._config[a]:this._config},a.prototype.defineDriver=function(a,b,c){var d=new Promise(function(b,c){try{var d=a._driver,e=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver"),h=new Error("Custom driver name already in use: "+a._driver);if(!a._driver)return void c(e);if(f(a._driver))return void c(h);for(var i=j.concat("_initStorage"),k=0;k<i.length;k++){var m=i[k];if(!m||!a[m]||"function"!=typeof a[m])return void c(e)}var n=Promise.resolve(!0);"_support"in a&&(n=a._support&&"function"==typeof a._support?a._support():Promise.resolve(!!a._support)),n.then(function(c){l[d]=c,g[d]=a,b()},c)}catch(o){c(o)}});return d.then(b,c),d},a.prototype.driver=function(){return this._driver||null},a.prototype.getDriver=function(a,b,d){var e=this,h=function(){if(f(a))switch(a){case e.INDEXEDDB:return new Promise(function(a,b){a(c(1))});case e.LOCALSTORAGE:return new Promise(function(a,b){a(c(2))});case e.WEBSQL:return new Promise(function(a,b){a(c(4))})}else if(g[a])return Promise.resolve(g[a]);return Promise.reject(new Error("Driver not found."))}();return h.then(b,d),h},a.prototype.getSerializer=function(a){var b=new Promise(function(a,b){a(c(3))});return a&&"function"==typeof a&&b.then(function(b){a(b)}),b},a.prototype.ready=function(a){var b=this,c=b._driverSet.then(function(){return null===b._ready&&(b._ready=b._initDriver()),b._ready});return c.then(a,a),c},a.prototype.setDriver=function(a,b,c){function d(){f._config.driver=f.driver()}function e(a){return function(){function b(){for(;c<a.length;){var e=a[c];return c++,f._dbInfo=null,f._ready=null,f.getDriver(e).then(function(a){return f._extend(a),d(),f._ready=f._initStorage(f._config),f._ready})["catch"](b)}d();var g=new Error("No available storage method found.");return f._driverSet=Promise.reject(g),f._driverSet}var c=0;return b()}}var f=this;m(a)||(a=[a]);var g=this._getSupportedDrivers(a),h=null!==this._driverSet?this._driverSet["catch"](function(){return Promise.resolve()}):Promise.resolve();return this._driverSet=h.then(function(){var a=g[0];return f._dbInfo=null,f._ready=null,f.getDriver(a).then(function(a){f._driver=a._driver,d(),f._wrapLibraryMethodsWithReady(),f._initDriver=e(g)})})["catch"](function(){d();var a=new Error("No available storage method found.");return f._driverSet=Promise.reject(a),f._driverSet}),this._driverSet.then(b,c),this._driverSet},a.prototype.supports=function(a){return!!l[a]},a.prototype._extend=function(a){e(this,a)},a.prototype._getSupportedDrivers=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];this.supports(e)&&b.push(e)}return b},a.prototype._wrapLibraryMethodsWithReady=function(){for(var a=0;a<j.length;a++)b(this,j[a])},a.prototype.createInstance=function(b){return new a(b)},a}();return new n}("undefined"!=typeof window?window:self);b["default"]=e,a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0;var c=function(a){function b(b,c){b=b||[],c=c||{};try{return new Blob(b,c)}catch(d){if("TypeError"!==d.name)throw d;for(var e=a.BlobBuilder||a.MSBlobBuilder||a.MozBlobBuilder||a.WebKitBlobBuilder,f=new e,g=0;g<b.length;g+=1)f.append(b[g]);return f.getBlob(c.type)}}function c(a){for(var b=a.length,c=new ArrayBuffer(b),d=new Uint8Array(c),e=0;b>e;e++)d[e]=a.charCodeAt(e);return c}function d(a){return new Promise(function(b,c){var d=new XMLHttpRequest;d.open("GET",a),d.withCredentials=!0,d.responseType="arraybuffer",d.onreadystatechange=function(){return 4===d.readyState?200===d.status?b({response:d.response,type:d.getResponseHeader("Content-Type")}):void c({status:d.status,response:d.response}):void 0},d.send()})}function e(a){return new Promise(function(c,e){var f=b([""],{type:"image/png"}),g=a.transaction([D],"readwrite");g.objectStore(D).put(f,"key"),g.oncomplete=function(){var b=a.transaction([D],"readwrite"),f=b.objectStore(D).get("key");f.onerror=e,f.onsuccess=function(a){var b=a.target.result,e=URL.createObjectURL(b);d(e).then(function(a){c(!(!a||"image/png"!==a.type))},function(){c(!1)}).then(function(){URL.revokeObjectURL(e)})}},g.onerror=g.onabort=e})["catch"](function(){return!1})}function f(a){return"boolean"==typeof B?Promise.resolve(B):e(a).then(function(a){return B=a})}function g(a){return new Promise(function(b,c){var d=new FileReader;d.onerror=c,d.onloadend=function(c){var d=btoa(c.target.result||"");b({__local_forage_encoded_blob:!0,data:d,type:a.type})},d.readAsBinaryString(a)})}function h(a){var d=c(atob(a.data));return b([d],{type:a.type})}function i(a){return a&&a.__local_forage_encoded_blob}function j(a){var b=this,c=b._initReady().then(function(){var a=C[b._dbInfo.name];return a&&a.dbReady?a.dbReady:void 0});return c.then(a,a),c}function k(a){var b=C[a.name],c={};c.promise=new Promise(function(a){c.resolve=a}),b.deferredOperations.push(c),b.dbReady?b.dbReady=b.dbReady.then(function(){return c.promise}):b.dbReady=c.promise}function l(a){var b=C[a.name],c=b.deferredOperations.pop();c&&c.resolve()}function m(a){function b(){return Promise.resolve()}var c=this,d={db:null};if(a)for(var e in a)d[e]=a[e];C||(C={});var f=C[d.name];f||(f={forages:[],db:null,dbReady:null,deferredOperations:[]},C[d.name]=f),f.forages.push(c),c._initReady||(c._initReady=c.ready,c.ready=j);for(var g=[],h=0;h<f.forages.length;h++){var i=f.forages[h];i!==c&&g.push(i._initReady()["catch"](b))}var k=f.forages.slice(0);return Promise.all(g).then(function(){return d.db=f.db,n(d)}).then(function(a){return d.db=a,q(d,c._defaultConfig.version)?o(d):a}).then(function(a){d.db=f.db=a,c._dbInfo=d;for(var b=0;b<k.length;b++){var e=k[b];e!==c&&(e._dbInfo.db=d.db,e._dbInfo.version=d.version)}})}function n(a){return p(a,!1)}function o(a){return p(a,!0)}function p(b,c){return new Promise(function(d,e){if(b.db){if(!c)return d(b.db);k(b),b.db.close()}var f=[b.name];c&&f.push(b.version);var g=A.open.apply(A,f);c&&(g.onupgradeneeded=function(c){var d=g.result;try{d.createObjectStore(b.storeName),c.oldVersion<=1&&d.createObjectStore(D)}catch(e){if("ConstraintError"!==e.name)throw e;a.console.warn('The database "'+b.name+'" has been upgraded from version '+c.oldVersion+" to version "+c.newVersion+', but the storage "'+b.storeName+'" already exists.')}}),g.onerror=function(){e(g.error)},g.onsuccess=function(){d(g.result),l(b)}})}function q(b,c){if(!b.db)return!0;var d=!b.db.objectStoreNames.contains(b.storeName),e=b.version<b.db.version,f=b.version>b.db.version;if(e&&(b.version!==c&&a.console.warn('The database "'+b.name+"\" can't be downgraded from version "+b.db.version+" to version "+b.version+"."),b.version=b.db.version),f||d){if(d){var g=b.db.version+1;g>b.version&&(b.version=g)}return!0}return!1}function r(b,c){var d=this;"string"!=typeof b&&(a.console.warn(b+" used as a key, but it is not a string."),b=String(b));var e=new Promise(function(a,c){d.ready().then(function(){var e=d._dbInfo,f=e.db.transaction(e.storeName,"readonly").objectStore(e.storeName),g=f.get(b);g.onsuccess=function(){var b=g.result;void 0===b&&(b=null),i(b)&&(b=h(b)),a(b)},g.onerror=function(){c(g.error)}})["catch"](c)});return z(e,c),e}function s(a,b){var c=this,d=new Promise(function(b,d){c.ready().then(function(){var e=c._dbInfo,f=e.db.transaction(e.storeName,"readonly").objectStore(e.storeName),g=f.openCursor(),j=1;g.onsuccess=function(){var c=g.result;if(c){var d=c.value;i(d)&&(d=h(d));var e=a(d,c.key,j++);void 0!==e?b(e):c["continue"]()}else b()},g.onerror=function(){d(g.error)}})["catch"](d)});return z(d,b),d}function t(b,c,d){var e=this;"string"!=typeof b&&(a.console.warn(b+" used as a key, but it is not a string."),b=String(b));var h=new Promise(function(a,d){var h;e.ready().then(function(){return h=e._dbInfo,c instanceof Blob?f(h.db).then(function(a){return a?c:g(c)}):c}).then(function(c){var e=h.db.transaction(h.storeName,"readwrite"),f=e.objectStore(h.storeName);null===c&&(c=void 0),e.oncomplete=function(){void 0===c&&(c=null),a(c)},e.onabort=e.onerror=function(){var a=g.error?g.error:g.transaction.error;d(a)};var g=f.put(c,b)})["catch"](d)});return z(h,d),h}function u(b,c){var d=this;"string"!=typeof b&&(a.console.warn(b+" used as a key, but it is not a string."), b=String(b));var e=new Promise(function(a,c){d.ready().then(function(){var e=d._dbInfo,f=e.db.transaction(e.storeName,"readwrite"),g=f.objectStore(e.storeName),h=g["delete"](b);f.oncomplete=function(){a()},f.onerror=function(){c(h.error)},f.onabort=function(){var a=h.error?h.error:h.transaction.error;c(a)}})["catch"](c)});return z(e,c),e}function v(a){var b=this,c=new Promise(function(a,c){b.ready().then(function(){var d=b._dbInfo,e=d.db.transaction(d.storeName,"readwrite"),f=e.objectStore(d.storeName),g=f.clear();e.oncomplete=function(){a()},e.onabort=e.onerror=function(){var a=g.error?g.error:g.transaction.error;c(a)}})["catch"](c)});return z(c,a),c}function w(a){var b=this,c=new Promise(function(a,c){b.ready().then(function(){var d=b._dbInfo,e=d.db.transaction(d.storeName,"readonly").objectStore(d.storeName),f=e.count();f.onsuccess=function(){a(f.result)},f.onerror=function(){c(f.error)}})["catch"](c)});return z(c,a),c}function x(a,b){var c=this,d=new Promise(function(b,d){return 0>a?void b(null):void c.ready().then(function(){var e=c._dbInfo,f=e.db.transaction(e.storeName,"readonly").objectStore(e.storeName),g=!1,h=f.openCursor();h.onsuccess=function(){var c=h.result;return c?void(0===a?b(c.key):g?b(c.key):(g=!0,c.advance(a))):void b(null)},h.onerror=function(){d(h.error)}})["catch"](d)});return z(d,b),d}function y(a){var b=this,c=new Promise(function(a,c){b.ready().then(function(){var d=b._dbInfo,e=d.db.transaction(d.storeName,"readonly").objectStore(d.storeName),f=e.openCursor(),g=[];f.onsuccess=function(){var b=f.result;return b?(g.push(b.key),void b["continue"]()):void a(g)},f.onerror=function(){c(f.error)}})["catch"](c)});return z(c,a),c}function z(a,b){b&&a.then(function(a){b(null,a)},function(a){b(a)})}var A=A||a.indexedDB||a.webkitIndexedDB||a.mozIndexedDB||a.OIndexedDB||a.msIndexedDB;if(A){var B,C,D="local-forage-detect-blob-support",E={_driver:"asyncStorage",_initStorage:m,iterate:s,getItem:r,setItem:t,removeItem:u,clear:v,length:w,key:x,keys:y};return E}}("undefined"!=typeof window?window:self);b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=function(a){function b(a){var b=this,d={};if(a)for(var e in a)d[e]=a[e];return d.keyPrefix=d.name+"/",d.storeName!==b._defaultConfig.storeName&&(d.keyPrefix+=d.storeName+"/"),b._dbInfo=d,new Promise(function(a,b){a(c(3))}).then(function(a){return d.serializer=a,Promise.resolve()})}function d(a){var b=this,c=b.ready().then(function(){for(var a=b._dbInfo.keyPrefix,c=m.length-1;c>=0;c--){var d=m.key(c);0===d.indexOf(a)&&m.removeItem(d)}});return l(c,a),c}function e(b,c){var d=this;"string"!=typeof b&&(a.console.warn(b+" used as a key, but it is not a string."),b=String(b));var e=d.ready().then(function(){var a=d._dbInfo,c=m.getItem(a.keyPrefix+b);return c&&(c=a.serializer.deserialize(c)),c});return l(e,c),e}function f(a,b){var c=this,d=c.ready().then(function(){for(var b=c._dbInfo,d=b.keyPrefix,e=d.length,f=m.length,g=1,h=0;f>h;h++){var i=m.key(h);if(0===i.indexOf(d)){var j=m.getItem(i);if(j&&(j=b.serializer.deserialize(j)),j=a(j,i.substring(e),g++),void 0!==j)return j}}});return l(d,b),d}function g(a,b){var c=this,d=c.ready().then(function(){var b,d=c._dbInfo;try{b=m.key(a)}catch(e){b=null}return b&&(b=b.substring(d.keyPrefix.length)),b});return l(d,b),d}function h(a){var b=this,c=b.ready().then(function(){for(var a=b._dbInfo,c=m.length,d=[],e=0;c>e;e++)0===m.key(e).indexOf(a.keyPrefix)&&d.push(m.key(e).substring(a.keyPrefix.length));return d});return l(c,a),c}function i(a){var b=this,c=b.keys().then(function(a){return a.length});return l(c,a),c}function j(b,c){var d=this;"string"!=typeof b&&(a.console.warn(b+" used as a key, but it is not a string."),b=String(b));var e=d.ready().then(function(){var a=d._dbInfo;m.removeItem(a.keyPrefix+b)});return l(e,c),e}function k(b,c,d){var e=this;"string"!=typeof b&&(a.console.warn(b+" used as a key, but it is not a string."),b=String(b));var f=e.ready().then(function(){void 0===c&&(c=null);var a=c;return new Promise(function(d,f){var g=e._dbInfo;g.serializer.serialize(c,function(c,e){if(e)f(e);else try{m.setItem(g.keyPrefix+b,c),d(a)}catch(h){"QuotaExceededError"!==h.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==h.name||f(h),f(h)}})})});return l(f,d),f}function l(a,b){b&&a.then(function(a){b(null,a)},function(a){b(a)})}var m=null;try{if(!(a.localStorage&&"setItem"in a.localStorage))return;m=a.localStorage}catch(n){return}var o={_driver:"localStorageWrapper",_initStorage:b,iterate:f,getItem:e,setItem:k,removeItem:j,clear:d,length:i,key:g,keys:h};return o}("undefined"!=typeof window?window:self);b["default"]=d,a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0;var c=function(a){function b(b,c){b=b||[],c=c||{};try{return new Blob(b,c)}catch(d){if("TypeError"!==d.name)throw d;for(var e=a.BlobBuilder||a.MSBlobBuilder||a.MozBlobBuilder||a.WebKitBlobBuilder,f=new e,g=0;g<b.length;g+=1)f.append(b[g]);return f.getBlob(c.type)}}function c(a,b){var c="";if(a&&(c=a.toString()),a&&("[object ArrayBuffer]"===a.toString()||a.buffer&&"[object ArrayBuffer]"===a.buffer.toString())){var d,e=j;a instanceof ArrayBuffer?(d=a,e+=l):(d=a.buffer,"[object Int8Array]"===c?e+=n:"[object Uint8Array]"===c?e+=o:"[object Uint8ClampedArray]"===c?e+=p:"[object Int16Array]"===c?e+=q:"[object Uint16Array]"===c?e+=s:"[object Int32Array]"===c?e+=r:"[object Uint32Array]"===c?e+=t:"[object Float32Array]"===c?e+=u:"[object Float64Array]"===c?e+=v:b(new Error("Failed to get type for BinaryArray"))),b(e+f(d))}else if("[object Blob]"===c){var g=new FileReader;g.onload=function(){var c=h+a.type+"~"+f(this.result);b(j+m+c)},g.readAsArrayBuffer(a)}else try{b(JSON.stringify(a))}catch(i){console.error("Couldn't convert value into a JSON string: ",a),b(null,i)}}function d(a){if(a.substring(0,k)!==j)return JSON.parse(a);var c,d=a.substring(w),f=a.substring(k,w);if(f===m&&i.test(d)){var g=d.match(i);c=g[1],d=d.substring(g[0].length)}var h=e(d);switch(f){case l:return h;case m:return b([h],{type:c});case n:return new Int8Array(h);case o:return new Uint8Array(h);case p:return new Uint8ClampedArray(h);case q:return new Int16Array(h);case s:return new Uint16Array(h);case r:return new Int32Array(h);case t:return new Uint32Array(h);case u:return new Float32Array(h);case v:return new Float64Array(h);default:throw new Error("Unkown type: "+f)}}function e(a){var b,c,d,e,f,h=.75*a.length,i=a.length,j=0;"="===a[a.length-1]&&(h--,"="===a[a.length-2]&&h--);var k=new ArrayBuffer(h),l=new Uint8Array(k);for(b=0;i>b;b+=4)c=g.indexOf(a[b]),d=g.indexOf(a[b+1]),e=g.indexOf(a[b+2]),f=g.indexOf(a[b+3]),l[j++]=c<<2|d>>4,l[j++]=(15&d)<<4|e>>2,l[j++]=(3&e)<<6|63&f;return k}function f(a){var b,c=new Uint8Array(a),d="";for(b=0;b<c.length;b+=3)d+=g[c[b]>>2],d+=g[(3&c[b])<<4|c[b+1]>>4],d+=g[(15&c[b+1])<<2|c[b+2]>>6],d+=g[63&c[b+2]];return c.length%3===2?d=d.substring(0,d.length-1)+"=":c.length%3===1&&(d=d.substring(0,d.length-2)+"=="),d}var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h="~~local_forage_type~",i=/^~~local_forage_type~([^~]+)~/,j="__lfsc__:",k=j.length,l="arbf",m="blob",n="si08",o="ui08",p="uic8",q="si16",r="si32",s="ur16",t="ui32",u="fl32",v="fl64",w=k+l.length,x={serialize:c,deserialize:d,stringToBuffer:e,bufferToString:f};return x}("undefined"!=typeof window?window:self);b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=function(a){function b(a){var b=this,d={db:null};if(a)for(var e in a)d[e]="string"!=typeof a[e]?a[e].toString():a[e];var f=new Promise(function(a,c){try{d.db=m(d.name,String(d.version),d.description,d.size)}catch(e){return c(e)}d.db.transaction(function(e){e.executeSql("CREATE TABLE IF NOT EXISTS "+d.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],function(){b._dbInfo=d,a()},function(a,b){c(b)})})});return new Promise(function(a,b){a(c(3))}).then(function(a){return d.serializer=a,f})}function d(b,c){var d=this;"string"!=typeof b&&(a.console.warn(b+" used as a key, but it is not a string."),b=String(b));var e=new Promise(function(a,c){d.ready().then(function(){var e=d._dbInfo;e.db.transaction(function(d){d.executeSql("SELECT * FROM "+e.storeName+" WHERE key = ? LIMIT 1",[b],function(b,c){var d=c.rows.length?c.rows.item(0).value:null;d&&(d=e.serializer.deserialize(d)),a(d)},function(a,b){c(b)})})})["catch"](c)});return l(e,c),e}function e(a,b){var c=this,d=new Promise(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("SELECT * FROM "+e.storeName,[],function(c,d){for(var f=d.rows,g=f.length,h=0;g>h;h++){var i=f.item(h),j=i.value;if(j&&(j=e.serializer.deserialize(j)),j=a(j,i.key,h+1),void 0!==j)return void b(j)}b()},function(a,b){d(b)})})})["catch"](d)});return l(d,b),d}function f(b,c,d){var e=this;"string"!=typeof b&&(a.console.warn(b+" used as a key, but it is not a string."),b=String(b));var f=new Promise(function(a,d){e.ready().then(function(){void 0===c&&(c=null);var f=c,g=e._dbInfo;g.serializer.serialize(c,function(c,e){e?d(e):g.db.transaction(function(e){e.executeSql("INSERT OR REPLACE INTO "+g.storeName+" (key, value) VALUES (?, ?)",[b,c],function(){a(f)},function(a,b){d(b)})},function(a){a.code===a.QUOTA_ERR&&d(a)})})})["catch"](d)});return l(f,d),f}function g(b,c){var d=this;"string"!=typeof b&&(a.console.warn(b+" used as a key, but it is not a string."),b=String(b));var e=new Promise(function(a,c){d.ready().then(function(){var e=d._dbInfo;e.db.transaction(function(d){d.executeSql("DELETE FROM "+e.storeName+" WHERE key = ?",[b],function(){a()},function(a,b){c(b)})})})["catch"](c)});return l(e,c),e}function h(a){var b=this,c=new Promise(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){b.executeSql("DELETE FROM "+d.storeName,[],function(){a()},function(a,b){c(b)})})})["catch"](c)});return l(c,a),c}function i(a){var b=this,c=new Promise(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){b.executeSql("SELECT COUNT(key) as c FROM "+d.storeName,[],function(b,c){var d=c.rows.item(0).c;a(d)},function(a,b){c(b)})})})["catch"](c)});return l(c,a),c}function j(a,b){var c=this,d=new Promise(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("SELECT key FROM "+e.storeName+" WHERE id = ? LIMIT 1",[a+1],function(a,c){var d=c.rows.length?c.rows.item(0).key:null;b(d)},function(a,b){d(b)})})})["catch"](d)});return l(d,b),d}function k(a){var b=this,c=new Promise(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){b.executeSql("SELECT key FROM "+d.storeName,[],function(b,c){for(var d=[],e=0;e<c.rows.length;e++)d.push(c.rows.item(e).key);a(d)},function(a,b){c(b)})})})["catch"](c)});return l(c,a),c}function l(a,b){b&&a.then(function(a){b(null,a)},function(a){b(a)})}var m=a.openDatabase;if(m){var n={_driver:"webSQLStorage",_initStorage:b,iterate:e,getItem:d,setItem:f,removeItem:g,clear:h,length:i,key:j,keys:k};return n}}("undefined"!=typeof window?window:self);b["default"]=d,a.exports=b["default"]}])})}).call(this,a("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:87}],71:[function(a,b,c){"use strict";var d=a("./lib/utils/common").assign,e=a("./lib/deflate"),f=a("./lib/inflate"),g=a("./lib/zlib/constants"),h={};d(h,e,f,g),b.exports=h},{"./lib/deflate":72,"./lib/inflate":73,"./lib/utils/common":74,"./lib/zlib/constants":77}],72:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))return new d(a);this.options=i.assign({level:s,method:u,chunkSize:16384,windowBits:15,memLevel:8,strategy:t,to:""},a||{});var b=this.options;b.raw&&b.windowBits>0?b.windowBits=-b.windowBits:b.gzip&&b.windowBits>0&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var c=h.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(c!==p)throw new Error(k[c]);b.header&&h.deflateSetHeader(this.strm,b.header)}function e(a,b){var c=new d(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function f(a,b){return b=b||{},b.raw=!0,e(a,b)}function g(a,b){return b=b||{},b.gzip=!0,e(a,b)}var h=a("./zlib/deflate"),i=a("./utils/common"),j=a("./utils/strings"),k=a("./zlib/messages"),l=a("./zlib/zstream"),m=Object.prototype.toString,n=0,o=4,p=0,q=1,r=2,s=-1,t=0,u=8;d.prototype.push=function(a,b){var c,d,e=this.strm,f=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?o:n,"string"==typeof a?e.input=j.string2buf(a):"[object ArrayBuffer]"===m.call(a)?e.input=new Uint8Array(a):e.input=a,e.next_in=0,e.avail_in=e.input.length;do{if(0===e.avail_out&&(e.output=new i.Buf8(f),e.next_out=0,e.avail_out=f),c=h.deflate(e,d),c!==q&&c!==p)return this.onEnd(c),this.ended=!0,!1;0!==e.avail_out&&(0!==e.avail_in||d!==o&&d!==r)||("string"===this.options.to?this.onData(j.buf2binstring(i.shrinkBuf(e.output,e.next_out))):this.onData(i.shrinkBuf(e.output,e.next_out)))}while((e.avail_in>0||0===e.avail_out)&&c!==q);return d===o?(c=h.deflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===p):d===r?(this.onEnd(p),e.avail_out=0,!0):!0},d.prototype.onData=function(a){this.chunks.push(a)},d.prototype.onEnd=function(a){a===p&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Deflate=d,c.deflate=e,c.deflateRaw=f,c.gzip=g},{"./utils/common":74,"./utils/strings":75,"./zlib/deflate":79,"./zlib/messages":84,"./zlib/zstream":86}],73:[function(a,b,c){"use strict";function d(a){if(!(this instanceof d))return new d(a);this.options=h.assign({chunkSize:16384,windowBits:0,to:""},a||{});var b=this.options;b.raw&&b.windowBits>=0&&b.windowBits<16&&(b.windowBits=-b.windowBits,0===b.windowBits&&(b.windowBits=-15)),!(b.windowBits>=0&&b.windowBits<16)||a&&a.windowBits||(b.windowBits+=32),b.windowBits>15&&b.windowBits<48&&0===(15&b.windowBits)&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var c=g.inflateInit2(this.strm,b.windowBits);if(c!==j.Z_OK)throw new Error(k[c]);this.header=new m,g.inflateGetHeader(this.strm,this.header)}function e(a,b){var c=new d(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function f(a,b){return b=b||{},b.raw=!0,e(a,b)}var g=a("./zlib/inflate"),h=a("./utils/common"),i=a("./utils/strings"),j=a("./zlib/constants"),k=a("./zlib/messages"),l=a("./zlib/zstream"),m=a("./zlib/gzheader"),n=Object.prototype.toString;d.prototype.push=function(a,b){var c,d,e,f,k,l=this.strm,m=this.options.chunkSize,o=!1;if(this.ended)return!1;d=b===~~b?b:b===!0?j.Z_FINISH:j.Z_NO_FLUSH,"string"==typeof a?l.input=i.binstring2buf(a):"[object ArrayBuffer]"===n.call(a)?l.input=new Uint8Array(a):l.input=a,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new h.Buf8(m),l.next_out=0,l.avail_out=m),c=g.inflate(l,j.Z_NO_FLUSH),c===j.Z_BUF_ERROR&&o===!0&&(c=j.Z_OK,o=!1),c!==j.Z_STREAM_END&&c!==j.Z_OK)return this.onEnd(c),this.ended=!0,!1;l.next_out&&(0!==l.avail_out&&c!==j.Z_STREAM_END&&(0!==l.avail_in||d!==j.Z_FINISH&&d!==j.Z_SYNC_FLUSH)||("string"===this.options.to?(e=i.utf8border(l.output,l.next_out),f=l.next_out-e,k=i.buf2string(l.output,e),l.next_out=f,l.avail_out=m-f,f&&h.arraySet(l.output,l.output,e,f,0),this.onData(k)):this.onData(h.shrinkBuf(l.output,l.next_out)))),0===l.avail_in&&0===l.avail_out&&(o=!0)}while((l.avail_in>0||0===l.avail_out)&&c!==j.Z_STREAM_END);return c===j.Z_STREAM_END&&(d=j.Z_FINISH),d===j.Z_FINISH?(c=g.inflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===j.Z_OK):d===j.Z_SYNC_FLUSH?(this.onEnd(j.Z_OK),l.avail_out=0,!0):!0},d.prototype.onData=function(a){this.chunks.push(a)},d.prototype.onEnd=function(a){a===j.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=h.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Inflate=d,c.inflate=e,c.inflateRaw=f,c.ungzip=e},{"./utils/common":74,"./utils/strings":75,"./zlib/constants":77,"./zlib/gzheader":80,"./zlib/inflate":82,"./zlib/messages":84,"./zlib/zstream":86}],74:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;c.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},c.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var e={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;c>b;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;c>b;b++)f=a[b],g.set(f,e),e+=f.length;return g}},f={arraySet:function(a,b,c,d,e){for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};c.setTyped=function(a){a?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,e)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,f))},c.setTyped(d)},{}],75:[function(a,b,c){"use strict";function d(a,b){if(65537>b&&(a.subarray&&g||!a.subarray&&f))return String.fromCharCode.apply(null,e.shrinkBuf(a,b));for(var c="",d=0;b>d;d++)c+=String.fromCharCode(a[d]);return c}var e=a("./common"),f=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch(h){f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(h){g=!1}for(var i=new e.Buf8(256),j=0;256>j;j++)i[j]=j>=252?6:j>=248?5:j>=240?4:j>=224?3:j>=192?2:1;i[254]=i[254]=1,c.string2buf=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=new e.Buf8(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},c.buf2binstring=function(a){return d(a,a.length)},c.binstring2buf=function(a){for(var b=new e.Buf8(a.length),c=0,d=b.length;d>c;c++)b[c]=a.charCodeAt(c);return b},c.buf2string=function(a,b){var c,e,f,g,h=b||a.length,j=new Array(2*h);for(e=0,c=0;h>c;)if(f=a[c++],128>f)j[e++]=f;else if(g=i[f],g>4)j[e++]=65533,c+=g-1;else{for(f&=2===g?31:3===g?15:7;g>1&&h>c;)f=f<<6|63&a[c++],g--;g>1?j[e++]=65533:65536>f?j[e++]=f:(f-=65536,j[e++]=55296|f>>10&1023,j[e++]=56320|1023&f)}return d(j,e)},c.utf8border=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+i[a[c]]>b?c:b}},{"./common":74}],76:[function(a,b,c){"use strict";function d(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}b.exports=d},{}],77:[function(a,b,c){"use strict";b.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],78:[function(a,b,c){"use strict";function d(){for(var a,b=[],c=0;256>c;c++){a=c;for(var d=0;8>d;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function e(a,b,c,d){var e=f,g=d+c;a^=-1;for(var h=d;g>h;h++)a=a>>>8^e[255&(a^b[h])];return-1^a}var f=d();b.exports=e},{}],79:[function(a,b,c){"use strict";function d(a,b){return a.msg=H[b],b}function e(a){return(a<<1)-(a>4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(D.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){E._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,D.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=F(a.adler,b,e,c):2===a.state.wrap&&(a.adler=G(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-ka?a.strstart-(a.w_size-ka):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ja,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&m>f);if(d=ja-(m-f),f=m-ja,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-ka)){D.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=ia)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+1])&a.hash_mask;a.insert&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+ia-1])&a.hash_mask,a.prev[f&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=f,f++,a.insert--,!(a.lookahead+a.insert<ia)););}while(a.lookahead<ka&&0!==a.strm.avail_in)}function n(a,b){var c=65535;for(c>a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===I)return ta;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return ta;if(a.strstart-a.block_start>=a.w_size-ka&&(h(a,!1),0===a.strm.avail_out))return ta}return a.insert=0,b===L?(h(a,!0),0===a.strm.avail_out?va:wa):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?ta:ta}function o(a,b){for(var c,d;;){if(a.lookahead<ka){if(m(a),a.lookahead<ka&&b===I)return ta;if(0===a.lookahead)break}if(c=0,a.lookahead>=ia&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ia-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),0!==c&&a.strstart-c<=a.w_size-ka&&(a.match_length=l(a,c)),a.match_length>=ia)if(d=E._tr_tally(a,a.strstart-a.match_start,a.match_length-ia),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=ia){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ia-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart;while(0!==--a.match_length);a.strstart++}else a.strstart+=a.match_length,a.match_length=0,a.ins_h=a.window[a.strstart],a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+1])&a.hash_mask;else d=E._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++;if(d&&(h(a,!1),0===a.strm.avail_out))return ta}return a.insert=a.strstart<ia-1?a.strstart:ia-1,b===L?(h(a,!0),0===a.strm.avail_out?va:wa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ta:ua}function p(a,b){for(var c,d,e;;){if(a.lookahead<ka){if(m(a),a.lookahead<ka&&b===I)return ta;if(0===a.lookahead)break}if(c=0,a.lookahead>=ia&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ia-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),a.prev_length=a.match_length,a.prev_match=a.match_start,a.match_length=ia-1,0!==c&&a.prev_length<a.max_lazy_match&&a.strstart-c<=a.w_size-ka&&(a.match_length=l(a,c),a.match_length<=5&&(a.strategy===T||a.match_length===ia&&a.strstart-a.match_start>4096)&&(a.match_length=ia-1)),a.prev_length>=ia&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-ia,d=E._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-ia),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ia-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart);while(0!==--a.prev_length);if(a.match_available=0,a.match_length=ia-1,a.strstart++,d&&(h(a,!1),0===a.strm.avail_out))return ta}else if(a.match_available){if(d=E._tr_tally(a,0,a.window[a.strstart-1]),d&&h(a,!1),a.strstart++,a.lookahead--,0===a.strm.avail_out)return ta}else a.match_available=1,a.strstart++,a.lookahead--}return a.match_available&&(d=E._tr_tally(a,0,a.window[a.strstart-1]),a.match_available=0),a.insert=a.strstart<ia-1?a.strstart:ia-1,b===L?(h(a,!0),0===a.strm.avail_out?va:wa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ta:ua}function q(a,b){for(var c,d,e,f,g=a.window;;){if(a.lookahead<=ja){if(m(a),a.lookahead<=ja&&b===I)return ta;if(0===a.lookahead)break}if(a.match_length=0,a.lookahead>=ia&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ja;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&f>e);a.match_length=ja-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=ia?(c=E._tr_tally(a,1,a.match_length-ia),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=E._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return ta}return a.insert=0,b===L?(h(a,!0),0===a.strm.avail_out?va:wa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ta:ua}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===I)return ta;break}if(a.match_length=0,c=E._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return ta}return a.insert=0,b===L?(h(a,!0),0===a.strm.avail_out?va:wa):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?ta:ua}function s(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e}function t(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=C[a.level].max_lazy,a.good_match=C[a.level].good_length,a.nice_match=C[a.level].nice_length,a.max_chain_length=C[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=ia-1,a.match_available=0,a.ins_h=0}function u(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new D.Buf16(2*ga),this.dyn_dtree=new D.Buf16(2*(2*ea+1)),this.bl_tree=new D.Buf16(2*(2*fa+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new D.Buf16(ha+1),this.heap=new D.Buf16(2*da+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new D.Buf16(2*da+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function v(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=Y,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?ma:ra,a.adler=2===b.wrap?0:1,b.last_flush=I,E._tr_init(b),N):d(a,P)}function w(a){var b=v(a);return b===N&&t(a.state),b}function x(a,b){return a&&a.state?2!==a.state.wrap?P:(a.state.gzhead=b,N):P}function y(a,b,c,e,f,g){if(!a)return P;var h=1;if(b===S&&(b=6),0>e?(h=0,e=-e):e>15&&(h=2,e-=16),1>f||f>$||c!==Z||8>e||e>15||0>b||b>9||0>g||g>W)return d(a,P);8===e&&(e=9);var i=new u;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<<i.w_bits,i.w_mask=i.w_size-1,i.hash_bits=f+7,i.hash_size=1<<i.hash_bits,i.hash_mask=i.hash_size-1,i.hash_shift=~~((i.hash_bits+ia-1)/ia),i.window=new D.Buf8(2*i.w_size),i.head=new D.Buf16(i.hash_size),i.prev=new D.Buf16(i.w_size),i.lit_bufsize=1<<f+6,i.pending_buf_size=4*i.lit_bufsize,i.pending_buf=new D.Buf8(i.pending_buf_size),i.d_buf=i.lit_bufsize>>1,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,w(a)}function z(a,b){return y(a,b,Z,_,aa,X)}function A(a,b){var c,h,k,l;if(!a||!a.state||b>M||0>b)return a?d(a,P):P;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===sa&&b!==L)return d(a,0===a.avail_out?R:P);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===ma)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=U||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=G(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=na):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=U||h.level<2?4:0),i(h,xa),h.status=ra);else{var m=Z+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=U||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=la),m+=31-m%31,h.status=ra,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===na)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=G(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=G(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=oa)}else h.status=oa;if(h.status===oa)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=G(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.name.length?255&h.gzhead.name.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=G(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=pa)}else h.status=pa;if(h.status===pa)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=G(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.comment.length?255&h.gzhead.comment.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=G(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=qa)}else h.status=qa;if(h.status===qa&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=ra)):h.status=ra),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,N}else if(0===a.avail_in&&e(b)<=e(c)&&b!==L)return d(a,R);if(h.status===sa&&0!==a.avail_in)return d(a,R);if(0!==a.avail_in||0!==h.lookahead||b!==I&&h.status!==sa){var o=h.strategy===U?r(h,b):h.strategy===V?q(h,b):C[h.level].func(h,b);if(o!==va&&o!==wa||(h.status=sa),o===ta||o===va)return 0===a.avail_out&&(h.last_flush=-1), N;if(o===ua&&(b===J?E._tr_align(h):b!==M&&(E._tr_stored_block(h,0,0,!1),b===K&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,N}return b!==L?N:h.wrap<=0?O:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?N:O)}function B(a){var b;return a&&a.state?(b=a.state.status,b!==ma&&b!==na&&b!==oa&&b!==pa&&b!==qa&&b!==ra&&b!==sa?d(a,P):(a.state=null,b===ra?d(a,Q):N)):P}var C,D=a("../utils/common"),E=a("./trees"),F=a("./adler32"),G=a("./crc32"),H=a("./messages"),I=0,J=1,K=3,L=4,M=5,N=0,O=1,P=-2,Q=-3,R=-5,S=-1,T=1,U=2,V=3,W=4,X=0,Y=2,Z=8,$=9,_=15,aa=8,ba=29,ca=256,da=ca+1+ba,ea=30,fa=19,ga=2*da+1,ha=15,ia=3,ja=258,ka=ja+ia+1,la=32,ma=42,na=69,oa=73,pa=91,qa=103,ra=113,sa=666,ta=1,ua=2,va=3,wa=4,xa=3;C=[new s(0,0,0,0,n),new s(4,4,8,4,o),new s(4,5,16,8,o),new s(4,6,32,32,o),new s(4,4,16,16,p),new s(8,16,32,32,p),new s(8,16,128,128,p),new s(8,32,128,256,p),new s(32,128,258,1024,p),new s(32,258,258,4096,p)],c.deflateInit=z,c.deflateInit2=y,c.deflateReset=w,c.deflateResetKeep=v,c.deflateSetHeader=x,c.deflate=A,c.deflateEnd=B,c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":74,"./adler32":76,"./crc32":78,"./messages":84,"./trees":85}],80:[function(a,b,c){"use strict";function d(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}b.exports=d},{}],81:[function(a,b,c){"use strict";var d=30,e=12;b.exports=function(a,b){var c,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C;c=a.state,f=a.next_in,B=a.input,g=f+(a.avail_in-5),h=a.next_out,C=a.output,i=h-(b-a.avail_out),j=h+(a.avail_out-257),k=c.dmax,l=c.wsize,m=c.whave,n=c.wnext,o=c.window,p=c.hold,q=c.bits,r=c.lencode,s=c.distcode,t=(1<<c.lenbits)-1,u=(1<<c.distbits)-1;a:do{15>q&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=r[p&t];b:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<<w)-1)];continue b}if(32&w){c.mode=e;break a}a.msg="invalid literal/length code",c.mode=d;break a}x=65535&v,w&=15,w&&(w>q&&(p+=B[f++]<<q,q+=8),x+=p&(1<<w)-1,p>>>=w,q-=w),15>q&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=s[p&u];c:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<<w)-1)];continue c}a.msg="invalid distance code",c.mode=d;break a}if(y=65535&v,w&=15,w>q&&(p+=B[f++]<<q,q+=8,w>q&&(p+=B[f++]<<q,q+=8)),y+=p&(1<<w)-1,y>k){a.msg="invalid distance too far back",c.mode=d;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&c.sane){a.msg="invalid distance too far back",c.mode=d;break a}if(z=0,A=o,0===n){if(z+=l-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(w>n){if(z+=l+n-w,w-=n,x>w){x-=w;do C[h++]=o[z++];while(--w);if(z=0,x>n){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(g>f&&j>h);x=q>>3,f-=x,q-=x<<3,p&=(1<<q)-1,a.next_in=f,a.next_out=h,a.avail_in=g>f?5+(g-f):5-(f-g),a.avail_out=j>h?257+(j-h):257-(h-j),c.hold=p,c.bits=q}},{}],82:[function(a,b,c){"use strict";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=K,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new r.Buf32(oa),b.distcode=b.distdyn=new r.Buf32(pa),b.sane=1,b.back=-1,C):F}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):F}function h(a,b){var c,d;return a&&a.state?(d=a.state,0>b?(c=0,b=-b):(c=(b>>4)+1,48>b&&(b&=15)),b&&(8>b||b>15)?F:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):F}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==C&&(a.state=null),c):F}function j(a){return i(a,ra)}function k(a){if(sa){var b;for(p=new r.Buf32(512),q=new r.Buf32(32),b=0;144>b;)a.lens[b++]=8;for(;256>b;)a.lens[b++]=9;for(;280>b;)a.lens[b++]=7;for(;288>b;)a.lens[b++]=8;for(v(x,a.lens,0,288,p,0,a.work,{bits:9}),b=0;32>b;)a.lens[b++]=5;v(y,a.lens,0,32,q,0,a.work,{bits:5}),sa=!1}a.lencode=p,a.lenbits=9,a.distcode=q,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<<f.wbits,f.wnext=0,f.whave=0,f.window=new r.Buf8(f.wsize)),d>=f.wsize?(r.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),r.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(r.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whave<f.wsize&&(f.whave+=e))),0}function m(a,b){var c,e,f,g,h,i,j,m,n,o,p,q,oa,pa,qa,ra,sa,ta,ua,va,wa,xa,ya,za,Aa=0,Ba=new r.Buf8(4),Ca=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!a||!a.state||!a.output||!a.input&&0!==a.avail_in)return F;c=a.state,c.mode===V&&(c.mode=W),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,o=i,p=j,xa=C;a:for(;;)switch(c.mode){case K:if(0===c.wrap){c.mode=W;break}for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(2&c.wrap&&35615===m){c.check=0,Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0),m=0,n=0,c.mode=L;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=la;break}if((15&m)!==J){a.msg="unknown compression method",c.mode=la;break}if(m>>>=4,n-=4,wa=(15&m)+8,0===c.wbits)c.wbits=wa;else if(wa>c.wbits){a.msg="invalid window size",c.mode=la;break}c.dmax=1<<wa,a.adler=c.check=1,c.mode=512&m?T:V,m=0,n=0;break;case L:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.flags=m,(255&c.flags)!==J){a.msg="unknown compression method",c.mode=la;break}if(57344&c.flags){a.msg="unknown header flags set",c.mode=la;break}c.head&&(c.head.text=m>>8&1),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0,c.mode=M;case M:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.time=m),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,Ba[2]=m>>>16&255,Ba[3]=m>>>24&255,c.check=t(c.check,Ba,4,0)),m=0,n=0,c.mode=N;case N:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.xflags=255&m,c.head.os=m>>8),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0,c.mode=O;case O:if(1024&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length=m,c.head&&(c.head.extra_len=m),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=P;case P:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wa=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),r.arraySet(c.head.extra,e,g,q,wa)),512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=Q;case Q:if(2048&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.name+=String.fromCharCode(wa));while(wa&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=R;case R:if(4096&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.comment+=String.fromCharCode(wa));while(wa&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.comment=null);c.mode=S;case S:if(512&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(65535&c.check)){a.msg="header crc mismatch",c.mode=la;break}m=0,n=0}c.head&&(c.head.hcrc=c.flags>>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=V;break;case T:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}a.adler=c.check=d(m),m=0,n=0,c.mode=U;case U:if(0===c.havedict)return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,E;a.adler=c.check=1,c.mode=V;case V:if(b===A||b===B)break a;case W:if(c.last){m>>>=7&n,n-=7&n,c.mode=ia;break}for(;3>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}switch(c.last=1&m,m>>>=1,n-=1,3&m){case 0:c.mode=X;break;case 1:if(k(c),c.mode=ba,b===B){m>>>=2,n-=2;break a}break;case 2:c.mode=$;break;case 3:a.msg="invalid block type",c.mode=la}m>>>=2,n-=2;break;case X:for(m>>>=7&n,n-=7&n;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if((65535&m)!==(m>>>16^65535)){a.msg="invalid stored block lengths",c.mode=la;break}if(c.length=65535&m,m=0,n=0,c.mode=Y,b===B)break a;case Y:c.mode=Z;case Z:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;r.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=V;break;case $:for(;14>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.nlen=(31&m)+257,m>>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=la;break}c.have=0,c.mode=_;case _:for(;c.have<c.ncode;){for(;3>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.lens[Ca[c.have++]]=7&m,m>>>=3,n-=3}for(;c.have<19;)c.lens[Ca[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ya={bits:c.lenbits},xa=v(w,c.lens,0,19,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid code lengths set",c.mode=la;break}c.have=0,c.mode=aa;case aa:for(;c.have<c.nlen+c.ndist;){for(;Aa=c.lencode[m&(1<<c.lenbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(16>sa)m>>>=qa,n-=qa,c.lens[c.have++]=sa;else{if(16===sa){for(za=qa+2;za>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m>>>=qa,n-=qa,0===c.have){a.msg="invalid bit length repeat",c.mode=la;break}wa=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sa){for(za=qa+3;za>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qa,n-=qa,wa=0,q=3+(7&m),m>>>=3,n-=3}else{for(za=qa+7;za>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qa,n-=qa,wa=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=la;break}for(;q--;)c.lens[c.have++]=wa}}if(c.mode===la)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=la;break}if(c.lenbits=9,ya={bits:c.lenbits},xa=v(x,c.lens,0,c.nlen,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid literal/lengths set",c.mode=la;break}if(c.distbits=6,c.distcode=c.distdyn,ya={bits:c.distbits},xa=v(y,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ya),c.distbits=ya.bits,xa){a.msg="invalid distances set",c.mode=la;break}if(c.mode=ba,b===B)break a;case ba:c.mode=ca;case ca:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,u(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===V&&(c.back=-1);break}for(c.back=0;Aa=c.lencode[m&(1<<c.lenbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(ra&&0===(240&ra)){for(ta=qa,ua=ra,va=sa;Aa=c.lencode[va+((m&(1<<ta+ua)-1)>>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=ta+qa);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,c.length=sa,0===ra){c.mode=ha;break}if(32&ra){c.back=-1,c.mode=V;break}if(64&ra){a.msg="invalid literal/length code",c.mode=la;break}c.extra=15&ra,c.mode=da;case da:if(c.extra){for(za=c.extra;za>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=ea;case ea:for(;Aa=c.distcode[m&(1<<c.distbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(0===(240&ra)){for(ta=qa,ua=ra,va=sa;Aa=c.distcode[va+((m&(1<<ta+ua)-1)>>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=ta+qa);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,64&ra){a.msg="invalid distance code",c.mode=la;break}c.offset=sa,c.extra=15&ra,c.mode=fa;case fa:if(c.extra){for(za=c.extra;za>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.offset+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=la;break}c.mode=ga;case ga:if(0===j)break a;if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=la;break}q>c.wnext?(q-=c.wnext,oa=c.wsize-q):oa=c.wnext-q,q>c.length&&(q=c.length),pa=c.window}else pa=f,oa=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pa[oa++];while(--q);0===c.length&&(c.mode=ca);break;case ha:if(0===j)break a;f[h++]=c.length,j--,c.mode=ca;break;case ia:if(c.wrap){for(;32>n;){if(0===i)break a;i--,m|=e[g++]<<n,n+=8}if(p-=j,a.total_out+=p,c.total+=p,p&&(a.adler=c.check=c.flags?t(c.check,f,p,h-p):s(c.check,f,p,h-p)),p=j,(c.flags?m:d(m))!==c.check){a.msg="incorrect data check",c.mode=la;break}m=0,n=0}c.mode=ja;case ja:if(c.wrap&&c.flags){for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(4294967295&c.total)){a.msg="incorrect length check",c.mode=la;break}m=0,n=0}c.mode=ka;case ka:xa=D;break a;case la:xa=G;break a;case ma:return H;case na:default:return F}return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,(c.wsize||p!==a.avail_out&&c.mode<la&&(c.mode<ia||b!==z))&&l(a,a.output,a.next_out,p-a.avail_out)?(c.mode=ma,H):(o-=a.avail_in,p-=a.avail_out,a.total_in+=o,a.total_out+=p,c.total+=p,c.wrap&&p&&(a.adler=c.check=c.flags?t(c.check,f,p,a.next_out-p):s(c.check,f,p,a.next_out-p)),a.data_type=c.bits+(c.last?64:0)+(c.mode===V?128:0)+(c.mode===ba||c.mode===Y?256:0),(0===o&&0===p||b===z)&&xa===C&&(xa=I),xa)}function n(a){if(!a||!a.state)return F;var b=a.state;return b.window&&(b.window=null),a.state=null,C}function o(a,b){var c;return a&&a.state?(c=a.state,0===(2&c.wrap)?F:(c.head=b,b.done=!1,C)):F}var p,q,r=a("../utils/common"),s=a("./adler32"),t=a("./crc32"),u=a("./inffast"),v=a("./inftrees"),w=0,x=1,y=2,z=4,A=5,B=6,C=0,D=1,E=2,F=-2,G=-3,H=-4,I=-5,J=8,K=1,L=2,M=3,N=4,O=5,P=6,Q=7,R=8,S=9,T=10,U=11,V=12,W=13,X=14,Y=15,Z=16,$=17,_=18,aa=19,ba=20,ca=21,da=22,ea=23,fa=24,ga=25,ha=26,ia=27,ja=28,ka=29,la=30,ma=31,na=32,oa=852,pa=592,qa=15,ra=qa,sa=!0;c.inflateReset=g,c.inflateReset2=h,c.inflateResetKeep=f,c.inflateInit=j,c.inflateInit2=i,c.inflate=m,c.inflateEnd=n,c.inflateGetHeader=o,c.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":74,"./adler32":76,"./crc32":78,"./inffast":81,"./inftrees":83}],83:[function(a,b,c){"use strict";var d=a("../utils/common"),e=15,f=852,g=592,h=0,i=1,j=2,k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],n=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];b.exports=function(a,b,c,o,p,q,r,s){var t,u,v,w,x,y,z,A,B,C=s.bits,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=null,O=0,P=new d.Buf16(e+1),Q=new d.Buf16(e+1),R=null,S=0;for(D=0;e>=D;D++)P[D]=0;for(E=0;o>E;E++)P[b[c+E]]++;for(H=C,G=e;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;G>F&&0===P[F];F++);for(F>H&&(H=F),K=1,D=1;e>=D;D++)if(K<<=1,K-=P[D],0>K)return-1;if(K>0&&(a===h||1!==G))return-1;for(Q[1]=0,D=1;e>D;D++)Q[D+1]=Q[D]+P[D];for(E=0;o>E;E++)0!==b[c+E]&&(r[Q[b[c+E]]++]=E);if(a===h?(N=R=r,y=19):a===i?(N=k,O-=257,R=l,S-=257,y=256):(N=m,R=n,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<<H,w=L-1,a===i&&L>f||a===j&&L>g)return 1;for(var T=0;;){T++,z=D-J,r[E]<y?(A=0,B=r[E]):r[E]>y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<<D-J,u=1<<I,F=u;do u-=t,p[x+(M>>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<<D-1;M&t;)t>>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[c+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<<I;G>I+J&&(K-=P[I+J],!(0>=K));)I++,K<<=1;if(L+=1<<I,a===i&&L>f||a===j&&L>g)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},{"../utils/common":74}],84:[function(a,b,c){"use strict";b.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],85:[function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length}function f(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b}function g(a){return 256>a?ia[a]:ia[256+(a>>>7)]}function h(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function i(a,b,c){a.bi_valid>X-c?(a.bi_buf|=b<<a.bi_valid&65535,h(a,a.bi_buf),a.bi_buf=b>>X-a.bi_valid,a.bi_valid+=c-X):(a.bi_buf|=b<<a.bi_valid&65535,a.bi_valid+=c)}function j(a,b,c){i(a,c[2*b],c[2*b+1])}function k(a,b){var c=0;do c|=1&a,a>>>=1,c<<=1;while(--b>0);return c>>>1}function l(a){16===a.bi_valid?(h(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function m(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;W>=f;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;V>c;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function n(a,b,c){var d,e,f=new Array(W+1),g=0;for(d=1;W>=d;d++)f[d]=g=g+c[d-1]<<1;for(e=0;b>=e;e++){var h=a[2*e+1];0!==h&&(a[2*e]=k(f[h]++,h))}}function o(){var a,b,c,d,f,g=new Array(W+1);for(c=0,d=0;Q-1>d;d++)for(ka[d]=c,a=0;a<1<<ba[d];a++)ja[c++]=d;for(ja[c-1]=d,f=0,d=0;16>d;d++)for(la[d]=f,a=0;a<1<<ca[d];a++)ia[f++]=d;for(f>>=7;T>d;d++)for(la[d]=f<<7,a=0;a<1<<ca[d]-7;a++)ia[256+f++]=d;for(b=0;W>=b;b++)g[b]=0;for(a=0;143>=a;)ga[2*a+1]=8,a++,g[8]++;for(;255>=a;)ga[2*a+1]=9,a++,g[9]++;for(;279>=a;)ga[2*a+1]=7,a++,g[7]++;for(;287>=a;)ga[2*a+1]=8,a++,g[8]++;for(n(ga,S+1,g),a=0;T>a;a++)ha[2*a+1]=5,ha[2*a]=k(a,5);ma=new e(ga,ba,R+1,S,W),na=new e(ha,ca,0,T,W),oa=new e(new Array(0),da,0,U,Y)}function p(a){var b;for(b=0;S>b;b++)a.dyn_ltree[2*b]=0;for(b=0;T>b;b++)a.dyn_dtree[2*b]=0;for(b=0;U>b;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*Z]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function q(a){a.bi_valid>8?h(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function r(a,b,c,d){q(a),d&&(h(a,c),h(a,~c)),G.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function s(a,b,c,d){var e=2*b,f=2*c;return a[e]<a[f]||a[e]===a[f]&&d[b]<=d[c]}function t(a,b,c){for(var d=a.heap[c],e=c<<1;e<=a.heap_len&&(e<a.heap_len&&s(b,a.heap[e+1],a.heap[e],a.depth)&&e++,!s(b,d,a.heap[e],a.depth));)a.heap[c]=a.heap[e],c=e,e<<=1;a.heap[c]=d}function u(a,b,c){var d,e,f,h,k=0;if(0!==a.last_lit)do d=a.pending_buf[a.d_buf+2*k]<<8|a.pending_buf[a.d_buf+2*k+1],e=a.pending_buf[a.l_buf+k],k++,0===d?j(a,e,b):(f=ja[e],j(a,f+R+1,b),h=ba[f],0!==h&&(e-=ka[f],i(a,e,h)),d--,f=g(d),j(a,f,c),h=ca[f],0!==h&&(d-=la[f],i(a,d,h)));while(k<a.last_lit);j(a,Z,b)}function v(a,b){var c,d,e,f=b.dyn_tree,g=b.stat_desc.static_tree,h=b.stat_desc.has_stree,i=b.stat_desc.elems,j=-1;for(a.heap_len=0,a.heap_max=V,c=0;i>c;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=2>j?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)t(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],t(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,t(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],m(a,b),n(f,j,a.bl_count)}function w(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;c>=d;d++)e=g,g=b[2*(d+1)+1],++h<i&&e===g||(j>h?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*$]++):10>=h?a.bl_tree[2*_]++:a.bl_tree[2*aa]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function x(a,b,c){var d,e,f=-1,g=b[1],h=0,k=7,l=4;for(0===g&&(k=138,l=3),d=0;c>=d;d++)if(e=g,g=b[2*(d+1)+1],!(++h<k&&e===g)){if(l>h){do j(a,e,a.bl_tree);while(0!==--h)}else 0!==e?(e!==f&&(j(a,e,a.bl_tree),h--),j(a,$,a.bl_tree),i(a,h-3,2)):10>=h?(j(a,_,a.bl_tree),i(a,h-3,3)):(j(a,aa,a.bl_tree),i(a,h-11,7));h=0,f=e,0===g?(k=138,l=3):e===g?(k=6,l=3):(k=7,l=4)}}function y(a){var b;for(w(a,a.dyn_ltree,a.l_desc.max_code),w(a,a.dyn_dtree,a.d_desc.max_code),v(a,a.bl_desc),b=U-1;b>=3&&0===a.bl_tree[2*ea[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function z(a,b,c,d){var e;for(i(a,b-257,5),i(a,c-1,5),i(a,d-4,4),e=0;d>e;e++)i(a,a.bl_tree[2*ea[e]+1],3);x(a,a.dyn_ltree,b-1),x(a,a.dyn_dtree,c-1)}function A(a){var b,c=4093624447;for(b=0;31>=b;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return I;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return J;for(b=32;R>b;b++)if(0!==a.dyn_ltree[2*b])return J;return I}function B(a){pa||(o(),pa=!0),a.l_desc=new f(a.dyn_ltree,ma),a.d_desc=new f(a.dyn_dtree,na),a.bl_desc=new f(a.bl_tree,oa),a.bi_buf=0,a.bi_valid=0,p(a)}function C(a,b,c,d){i(a,(L<<1)+(d?1:0),3),r(a,b,c,!0)}function D(a){i(a,M<<1,3),j(a,Z,ga),l(a)}function E(a,b,c,d){var e,f,g=0;a.level>0?(a.strm.data_type===K&&(a.strm.data_type=A(a)),v(a,a.l_desc),v(a,a.d_desc),g=y(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,e>=f&&(e=f)):e=f=c+5,e>=c+4&&-1!==b?C(a,b,c,d):a.strategy===H||f===e?(i(a,(M<<1)+(d?1:0),3),u(a,ga,ha)):(i(a,(N<<1)+(d?1:0),3),z(a,a.l_desc.max_code+1,a.d_desc.max_code+1,g+1),u(a,a.dyn_ltree,a.dyn_dtree)),p(a),d&&q(a)}function F(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(ja[c]+R+1)]++,a.dyn_dtree[2*g(b)]++),a.last_lit===a.lit_bufsize-1}var G=a("../utils/common"),H=4,I=0,J=1,K=2,L=0,M=1,N=2,O=3,P=258,Q=29,R=256,S=R+1+Q,T=30,U=19,V=2*S+1,W=15,X=16,Y=7,Z=256,$=16,_=17,aa=18,ba=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ca=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],da=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ea=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],fa=512,ga=new Array(2*(S+2));d(ga);var ha=new Array(2*T);d(ha);var ia=new Array(fa);d(ia);var ja=new Array(P-O+1);d(ja);var ka=new Array(Q);d(ka);var la=new Array(T);d(la);var ma,na,oa,pa=!1;c._tr_init=B,c._tr_stored_block=C,c._tr_flush_block=E,c._tr_tally=F,c._tr_align=D},{"../utils/common":74}],86:[function(a,b,c){"use strict";function d(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}b.exports=d},{}],87:[function(a,b,c){function d(){k=!1,h.length?j=h.concat(j):l=-1,j.length&&e()}function e(){if(!k){var a=setTimeout(d);k=!0;for(var b=j.length;b;){for(h=j,j=[];++l<b;)h&&h[l].run();l=-1,b=j.length}h=null,k=!1,clearTimeout(a)}}function f(a,b){this.fun=a,this.array=b}function g(){}var h,i=b.exports={},j=[],k=!1,l=-1;i.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];j.push(new f(a,b)),1!==j.length||k||setTimeout(e,0)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.binding=function(a){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(a){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}]},{},[1]);