path
stringlengths
5
300
repo_name
stringlengths
6
76
content
stringlengths
26
1.05M
aaf-enrollment/src/components/enrollment/method-authenticators/EmailOTPMethod.js
MicroFocus/CX
import React from 'react'; import Authenticator from '../Authenticator'; import {generateFormChangeHandler} from '../../../utils/form-handler'; import TextField from '../../TextField'; import t from '../../../i18n/locale-keys'; class EmailOTPMethod extends React.PureComponent { constructor(props) { super(props); const {isEnrolled, data} = props.template; let email = ''; if (isEnrolled && data) { email = data.email || ''; } const initialOtherState = {defaultRecipient: null}; generateFormChangeHandler(this, {email}, initialOtherState); this.props.getDefaultRecipient(this.props.template.methodId).then(({defaultRecipient}) => { this.setState({defaultRecipient}); }); } authenticationInfoChanged() { return this.state.dataDirty; } authenticationInfoSavable() { return !this.props.template.isEnrolled || this.authenticationInfoChanged(); } finishEnroll() { const {email} = this.state.form; if (!email.length && !this.state.defaultRecipient) { return Promise.reject(this.props.policies.emailOTPMethod.data.enrollNoRecipientMsg); } const formData = email.length ? {email} : null; return this.props.doEnrollWithBeginProcess(formData) .then((response) => { if (response.status !== 'FAILED') { return Promise.resolve(response); } else { throw response.msg; } }); }; renderOverrideElements() { return ( <React.Fragment> <div> <label>{t.emailOverride()}</label> </div> <TextField disabled={this.props.readonlyMode} id="Email_Input_Field" label={t.emailOverrideLabel()} name="email" value={this.state.form.email} onChange={this.handleChange} /> </React.Fragment> ); } render() { const userEmail = this.state.defaultRecipient || t.recipientUnknown(); const overrideElements = this.props.policies.emailOTPMethod.data.allowOverrideRecipient ? this.renderOverrideElements() : null; return ( <Authenticator description={t.emailOTPMethodDescription()} {...this.props} > <div> <label>{t.emailPossessive()}</label> <span className="directory-data">{userEmail}</span> </div> <div> <label>{t.directoryFrom()}</label> </div> {overrideElements} </Authenticator> ); } } export default EmailOTPMethod;
components/AppFooter.js
Meadowcottage/meadowcottagexyz
import React from 'react' import { BounceUp } from 'animate-components' export default class AppFooter extends React.Component { render () { return ( <BounceUp as='div' duration='2s' className='appFooter'> <a href='https://github.com/meadowcottage/meadowcottagexyz'> <i className='fa fa-code' /> made with <i className='fa fa-heart' /> </a> </BounceUp> ) } }
ui/src/components/Menu.js
nateinaction/nateanddanielle.love
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import AppBar from '@material-ui/core/AppBar'; import Drawer from '@material-ui/core/Drawer'; import Hidden from '@material-ui/core/Hidden'; import IconButton from '@material-ui/core/IconButton'; import Link from '@material-ui/core/Link'; import List from '@material-ui/core/List'; import ListItem from '@material-ui/core/ListItem'; import ListItemText from '@material-ui/core/ListItemText'; import MenuIcon from '@material-ui/icons/Menu'; import Toolbar from '@material-ui/core/Toolbar'; import Typography from '@material-ui/core/Typography'; import toggleMenu from '../actions/toggleMenu'; import './Menu.css'; const Menu = props => ( <div className="menu"> <AppBar position="static" style={{ backgroundColor: 'white' }}> <Toolbar> <Hidden mdUp> <IconButton edge="end" color="primary" aria-label="Menu" onClick={() => props.toggleMenu()}> <MenuIcon /> </IconButton> </Hidden> <Typography variant="h6" color="textPrimary" className="flex"> {props.title} </Typography> <Hidden smDown> {props.menu.items.map(menuItem => ( <li className="nav-item" key={menuItem.ID} href={menuItem.url}> <Link href={menuItem.url}>{menuItem.title}</Link> </li> ))} </Hidden> </Toolbar> </AppBar> <Drawer open={props.menu.open} onClose={props.toggleMenu} onClick={() => props.toggleMenu()}> <List disablePadding> {props.menu.items.map(menuItem => ( <ListItem key={menuItem.ID} href={menuItem.url} color="primary" button> <ListItemText primary={menuItem.title} /> </ListItem> ))} </List> </Drawer> </div> ); Menu.propTypes = { title: PropTypes.string.isRequired, menu: PropTypes.shape({ open: PropTypes.bool.isRequired, items: PropTypes.arrayOf(PropTypes.object), }).isRequired, toggleMenu: PropTypes.func.isRequired, }; const mapStateToProps = state => ({ title: state.fromLocal.title, menu: state.fromLocal.menu, }); const mapDispatchToProps = dispatch => ({ toggleMenu: () => dispatch(toggleMenu()), }); const MenuContainer = connect( mapStateToProps, mapDispatchToProps, )(Menu); export default MenuContainer;
js/App/Components/Settings/SubViews/LogoutButton.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, { useCallback } from 'react'; import { useIntl } from 'react-intl'; import { useSelector } from 'react-redux'; import { TouchableButton, } from '../../../../BaseComponents'; import Theme from '../../../Theme'; import i18n from '../../../Translations/common'; const LogoutButton = (props: Object): Object => { const { toggleDialogueBox, buttonAccessibleProp = true, onConfirmLogout: onConfirmLogoutP, isLoggingOut = false, label, postScript, } = props; const { formatMessage } = useIntl(); const { app: { layout } } = useSelector((state: Object): Object => state); const { buttonStyle, } = getStyles(layout); const logout = useCallback(() => { function onConfirmLogout() { onConfirmLogoutP(); } (() => { toggleDialogueBox({ show: true, showHeader: true, header: `${formatMessage(i18n.logout)}?`, text: formatMessage(i18n.contentLogoutConfirm), showPositive: true, showNegative: true, positiveText: formatMessage(i18n.logout), onPressPositive: onConfirmLogout, closeOnPressPositive: true, timeoutToCallPositive: 400, }); })(); // eslint-disable-next-line react-hooks/exhaustive-deps }, [onConfirmLogoutP]); const labelButton = formatMessage(i18n.button); const labelButtondefaultDescription = `${formatMessage(i18n.defaultDescriptionButton)}`; const labelLogOut = `${label} ${labelButton}. ${labelButtondefaultDescription}`; const logoutButText = isLoggingOut ? formatMessage(i18n.loggingout) : label; const buttonAccessible = !isLoggingOut && buttonAccessibleProp; return ( <TouchableButton onPress={isLoggingOut ? null : logout} text={logoutButText} postScript={isLoggingOut ? '...' : postScript} accessibilityLabel={labelLogOut} accessible={buttonAccessible} style={buttonStyle} textProps={{ numberOfLines: 1, }} disabled={isLoggingOut} /> ); }; const getStyles = (appLayout: Object): Object => { const { height, width } = appLayout; const isPortrait = height > width; const deviceWidth = isPortrait ? width : height; const { paddingFactor, } = Theme.Core; const padding = deviceWidth * paddingFactor; return { buttonStyle: { marginTop: padding, width: width * 0.9, }, }; }; export default (React.memo<Object>(LogoutButton): Object);
test/integration/client-navigation/pages/snap-scroll-position.js
azukaru/next.js
import React from 'react' export default class SnapScrollPosition extends React.Component { constructor(props) { super(props) this.state = { positionY: -1 } } componentDidMount() { this.setState({ positionY: window.scrollY }) } render() { return ( <main> {Array.from({ length: 500 }, (x, i) => i + 1).map((i) => { return ( <div key={`item-${i}`} id={`item-${i}`}> {i} </div> ) })} <span id="scroll-pos-y">{this.state.positionY}</span> </main> ) } }
docs/app/Examples/modules/Dropdown/Usage/DropdownExampleCloseOnBlur.js
shengnian/shengnian-ui-react
import React from 'react' import { Dropdown } from 'shengnian-ui-react' import { friendOptions } from '../common' const DropdownExampleCloseOnBlur = () => ( <div> <Dropdown placeholder='I close on blur' closeOnBlur selection options={friendOptions} /> {' '} <Dropdown placeholder='I stay open on blur' closeOnBlur={false} selection options={friendOptions} /> </div> ) export default DropdownExampleCloseOnBlur
src/retired_code/app/app.js
PrimeLens/react-boiler-create-react-app-with-multipage-and-complex-UI
// dependancies for this component import React, { Component } from 'react'; import './app.css'; // ESSENTIAL tools for vanilla javascript control that need to be mounted to the window // assignemts to window should only appear ONCE in the app codebase afterwhich // each component should already have access import dispatcher from 'libraries/bevent.js'; window.dispatcher = dispatcher; import _ from 'lodash'; window._ = _; // to control the flow of this app and state management import maincontrol from 'controllers/maincontrol.js'; // to interpret the URL import routerwrapper from 'router/routerwrapper.js'; // child components import Header from 'components/header/header.jsx'; import Nav from 'components/nav/nav.jsx'; import Pagecontainer from 'components/pagecontainer/pagecontainer.jsx'; import Footer from 'components/footer/footer.jsx'; import Modalcontainer from 'components/modalcontainer/modalcontainer.jsx'; import Loadercontainer from 'components/spinner/spinner.jsx'; class App extends Component { componentDidMount(){ // fire up the main controller maincontrol.setup(); // start the router routerwrapper.setup(); window.dispatcher.off('hello').on('hello', (payload)=>{ console.log('App component received message', payload); }); } render() { return ( <div id="app"> <Header/> <Nav/> <Pagecontainer/> <Footer/> <Modalcontainer/> <Loadercontainer/> </div> ); } } export default App;
packages/reactor-tests/src/tests/rel/RelGridColumn.js
sencha/extjs-reactor
import React, { Component } from 'react'; import { Container, Grid, Column, WidgetCell, SparkLineLine } from '@extjs/ext-react'; export default class RelGridColumn extends Component { store = Ext.create('Ext.data.Store', { data: [ { first: 'Mark', last: 'Brocato', trend: [1,2,3,4,3,2,1] } ] }); render() { return ( <Container layout="vbox"> <div>This tests that grid columns, cells, and widgets can be defined using children. The test should pass if both columns show up and the sparkline is rendered.</div> <Grid itemId="grid" flex={1} store={this.store} itemConfig={{ viewModel: { } }} > <Column text="Name"> <Column text="First" dataIndex="first"/> <Column text="Last" dataIndex="last"/> </Column> <Column text="Trend" dataIndex="trend"> <WidgetCell forceWidth> <SparkLineLine itemId="sparkLine"/> </WidgetCell> </Column> </Grid> </Container> ) } }
src/js/components/parameters/ParameterInputList.js
knowncitizen/tripleo-ui
/** * Copyright 2018 Red Hat 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. */ import { defineMessages, injectIntl } from 'react-intl'; import PropTypes from 'prop-types'; import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import InlineNotification from '../ui/InlineNotification'; import ParameterInput from './ParameterInput'; const messages = defineMessages({ noParameters: { id: 'ParameterInputList.noParameters', defaultMessage: 'There are currently no parameters to configure in this section.' } }); class ParameterInputList extends React.Component { render() { const emptyParametersMessage = this.props.emptyParametersMessage || this.props.intl.formatMessage(messages.noParameters); const parameters = this.props.parameters.map(parameter => ( <ParameterInput key={parameter.name} name={parameter.name} label={parameter.label} description={parameter.description} defaultValue={parameter.default} value={parameter.value} type={parameter.type} /> )); if (parameters.isEmpty()) { return ( <fieldset> <InlineNotification type="info"> {emptyParametersMessage} </InlineNotification> </fieldset> ); } else { return <fieldset>{parameters}</fieldset>; } } } ParameterInputList.propTypes = { emptyParametersMessage: PropTypes.string, intl: PropTypes.object, mistralParameters: ImmutablePropTypes.map, parameters: ImmutablePropTypes.list.isRequired }; export default injectIntl(ParameterInputList);
src/Work/Work.js
ZhaoShouLiang/big-demo
import React from 'react'; import WorkCard from '../component/WorkCard'; import { getJson1 } from '../utils/helpers'; class Work extends React.Component { constructor(){ super(); this.state={ data:[], wait:true } } componentDidMount(){ getJson1() .then( (Recdata)=>{ this.setState({ data:Recdata.getJson1, wait:false }) }) } render () { let cards = this.state.data.map( (item,i) => <WorkCard {...item} key={i} /> ); return( <div className="container-fluid"> <div className="row" style={{marginTop:'20px'}}> {this.state.wait ? '请稍等' : cards} </div> </div> ) } } export default Work;
docs/src/pages/premium-themes/onepirate/modules/components/Paper.js
allanalexandre/material-ui
import React from 'react'; import clsx from 'clsx'; import PropTypes from 'prop-types'; import MuiPaper from '@material-ui/core/Paper'; import { capitalize } from '@material-ui/core/utils/helpers'; import { withStyles } from '@material-ui/core/styles'; const styles = theme => ({ backgroundLight: { backgroundColor: theme.palette.secondary.light, }, backgroundMain: { backgroundColor: theme.palette.secondary.main, }, backgroundDark: { backgroundColor: theme.palette.secondary.dark, }, padding: { padding: theme.spacing(1), }, }); function Paper(props) { const { background, classes, className, padding, ...other } = props; return ( <MuiPaper elevation={0} square className={clsx( classes[`background${capitalize(background)}`], { [classes.padding]: padding, }, className, )} {...other} /> ); } Paper.propTypes = { background: PropTypes.oneOf(['light', 'main', 'dark']), classes: PropTypes.object.isRequired, className: PropTypes.string, padding: PropTypes.bool, }; Paper.defaultProps = { background: 'light', padding: false, }; export default withStyles(styles)(Paper);
pages/arrange/index.js
southern-ground/stack-shellybrown.com
/** * React Static Boilerplate * https://github.com/kriasoft/react-static-boilerplate * * Copyright © 2015-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import _ from '../../node_modules/lodash'; import React from 'react'; import Layout from '../../components/Layout'; import s from './styles.css'; import {title, html} from './index.md'; import history from '../../core/history'; import store from '../../core/store'; import StackItem from '../../components/StackItem/StackItem'; import Sortable from 'sortablejs'; import { UPDATE_INVENTORY, REMOVE_ITEM, TOGGLE_ITEM, GET_PRICE, ADD_TO_CART, SET_STACK_ORDER } from "../../core/action-types"; import { NUM_SELECTED_REQUIRED } from "../../core/constants"; import DetailsItem from "../../components/Layout/DetailsItem"; class StackPage extends React.Component { constructor(props) { super(props); this.orderUpdate = this.orderUpdate.bind(this); this.toggleDetails = this.toggleDetails.bind(this); this.removeInventoryItem = this.removeInventoryItem.bind(this); this.updateProps = this.updateProps.bind(this); this.backClick = this.backClick.bind(this); this.addToCart = this.addToCart.bind(this); this.checkOut = this.checkOut.bind(this); this.updateTwitter = this.updateTwitter.bind(this); this.state = { inventory: [], enoughSelected: true, showDetails: false, processingStoreRequest: false, urlCart: '' }; } componentWillMount() { this.unsubscribeFunction = store.subscribe(this.updateProps); } componentDidMount() { this.updateProps(); var findPos = (obj) => { var curtop = 0; if (obj.offsetParent) { do { curtop += obj.offsetTop; } while (obj = obj.offsetParent); return [curtop]; } }; window.scroll(0, findPos(document.getElementById("container"))); } componentWillUnmount() { this.unsubscribeFunction(); } updateProps() { var newState = store.getState(), localizedInventory = newState.inventory .filter((item) => { return item.selected; }) .sort((a, b) => { if (a.stackOrder > b.stackOrder) { return 1; } return -1; }); this.setState({ ...this.state, inventory: localizedInventory, enoughSelected: localizedInventory.length >= NUM_SELECTED_REQUIRED, processingStoreRequest: newState.processingStoreRequest || false, urlCart: newState.urlCart || '' }); // clearTimeout(this.twitterTimeout); // this.twitterTimeout = setTimeout(this.updateTwitter, 5000); } sortableContainersDecorator = (componentBackingInstance) => { // check if backing instance not null if (componentBackingInstance) { let options = { draggable: ".stack-item", // Restricts sort start click/touch to the specified element group: "stack", onUpdate: this.orderUpdate }; Sortable.create(componentBackingInstance, options); } }; orderUpdate(e) { var els = ((htmlCollection) => { let a = [], i = 0; for (i; i < htmlCollection.length; i++) { a.push(htmlCollection[i]); } return a; })(e.to.children), newOrder = els.map((item) => { return item.getAttribute('data-sku'); }), reorderedInventory = this.state.inventory.map((item) => { item.stackOrder = _.findIndex(newOrder, (sku) => { return sku === item.sku; }) || 0; return item; }); store.dispatch({type: SET_STACK_ORDER, data: reorderedInventory}); } backClick() { var newInventory = this.state.alternateInventory || this.state.inventory; store.dispatch({ type: UPDATE_INVENTORY, items: newInventory }); history.push({pathname: "/stack"}); } addToCart() { store.dispatch( { type: ADD_TO_CART } ); } checkOut() { window.location = this.state.urlCart; } toggleDetails() { if (!this.state.showDetails) { store.dispatch({ type: GET_PRICE }); } this.setState({ showDetails: !this.state.showDetails }); } removeInventoryItem(e) { e.preventDefault(); store.dispatch({ type: TOGGLE_ITEM, sku: e.target.getAttribute('data-sku') }); } updateTwitter(){ window.twttr = (function (d, s, id) { var js, fjs = d.getElementsByTagName(s)[0], t = window.twttr || {}; if (d.getElementById(id)) return t; js = d.createElement(s); js.id = id; js.src = "https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs); t._e = []; t.ready = function (f) { t._e.push(f); }; return t; }(document, "script", "twitter-wjs")) } render() { var totalCost = 0, skus = this.state.inventory .filter((item) => { return item.selected }) .map((item) => { return item.sku; }) .join('_'), shareURL = "http://www.shellybrown.com/ss/ref=" + skus, twitterURL = encodeURI("I just built a Shelly Brown stack, and it's A-MAZ-ING! " + shareURL); if (!this.state.enoughSelected) { history.push({pathname: "/stack"}); return <div/> } this.state.inventory.map(item => { totalCost += item.price; }); return <Layout className={s.content + " " + s.stackContainer}> <div id="fb-root"></div> <div className={s.stackTop}> <h2>Your Stack</h2> </div> <button className={s.button + " " + s.backButton} onClick={this.backClick}>Back</button> <div className={s.instructions}> Drag to Rearrange </div> <div className={s.stackWrapper + " sortable"} ref={this.sortableContainersDecorator}> {this.state.inventory.map(item => { return <StackItem className="stack-item" image={item.image} sku={item.sku} key={'stackItem-' + item.sku} /> })} {} </div> <div className={s.stackDetailsWrapper}> <button className={s.stackDetailsButton + " " + s.button + " " + (this.state.showDetails ? s.buttonActive : "")} onClick={this.toggleDetails}>Details </button> <div className={s.stackDetails + " " + (this.state.showDetails ? s.stackDetailsVisible : "")}> <DetailsItem name="Name" sku="SKU" quanity="QTY" price="Price" isHR={true} /> {this.state.inventory.map((item, index) => { return ( <DetailsItem name={item.name} sku={item.sku} quanity={item.quantity || 1} price={item.price} key={'itemDetail-' + index} /> ); })} <DetailsItem price={totalCost} isTotal={true} /> </div> </div> <div className={s.cartNavigation}> <button className={s.stackAddToCartButton + " " + s.button} disabled={this.state.processingStoreRequest} onClick={this.addToCart}>Buy Now </button> <div className={s.socialButton}> <iframe src={"https://www.facebook.com/plugins/share_button.php?href=http%3A%2F%2Fwww.shellybrown.com%2Fss%2Fref%3D" + skus + "&layout=button&size=small&mobile_iframe=true&appId=175518545791503&width=59&height=20"} width="59" height="20" scrolling="no" frameBorder="0" allowTransparency="true"> </iframe> </div> <div className={s.socialButton}> <a className={s.twitterShareButton} href={"https://twitter.com/intent/tweet?text=" + twitterURL} data-size="small"><i className={s.twitterIcon}></i> Tweet </a> </div> </div> </Layout> ; } } export default StackPage;
ajax/libs/yui/3.18.1/event-focus/event-focus-min.js
bspaulding/cdnjs
YUI.add("event-focus",function(e,t){function u(t,r,u){var a="_"+t+"Notifiers";e.Event.define(t,{_useActivate:o,_attach:function(i,s,o){return e.DOM.isWindow(i)?n._attach([t,function(e){s.fire(e)},i]):n._attach([r,this._proxy,i,this,s,o],{capture:!0})},_proxy:function(t,r,i){var s=t.target,f=t.currentTarget,l=s.getData(a),c=e.stamp(f._node),h=o||s!==f,p;r.currentTarget=i?s:f,r.container=i?f:null,l?h=!0:(l={},s.setData(a,l),h&&(p=n._attach([u,this._notify,s._node]).sub,p.once=!0)),l[c]||(l[c]=[]),l[c].push(r),h||this._notify(t)},_notify:function(t,n){var r=t.currentTarget,i=r.getData(a),o=r.ancestors(),u=r.get("ownerDocument"),f=[],l=i?e.Object.keys(i).length:0,c,h,p,d,v,m,g,y,b,w;r.clearData(a),o.push(r),u&&o.unshift(u),o._nodes.reverse(),l&&(m=l,o.some(function(t){var n=e.stamp(t),r=i[n],s,o;if(r){l--;for(s=0,o=r.length;s<o;++s)r[s].handle.sub.filter&&f.push(r[s])}return!l}),l=m);while(l&&(c=o.shift())){d=e.stamp(c),h=i[d];if(h){for(g=0,y=h.length;g<y;++g){p=h[g],b=p.handle.sub,v=!0,t.currentTarget=c,b.filter&&(v=b.filter.apply(c,[c,t].concat(b.args||[])),f.splice(s(f,p),1)),v&&(t.container=p.container,w=p.fire(t));if(w===!1||t.stopped===2)break}delete h[d],l--}if(t.stopped!==2)for(g=0,y=f.length;g<y;++g){p=f[g],b=p.handle.sub,b.filter.apply(c,[c,t].concat(b.args||[]))&&(t.container=p.container,t.currentTarget=c,w=p.fire(t));if(w===!1||t.stopped===2||t.stopped&&f[g+1]&&f[g+1].container!==p.container)break}if(t.stopped)break}},on:function(e,t,n){t.handle=this._attach(e._node,n)},detach:function(e,t){t.handle.detach()},delegate:function(t,n,r,s){i(s)&&(n.filter=function(n){return e.Selector.test(n._node,s,t===n?null:t._node)}),n.handle=this._attach(t._node,r,!0)},detachDelegate:function(e,t){t.handle.detach()}},!0)}var n=e.Event,r=e.Lang,i=r.isString,s=e.Array.indexOf,o=function(){var t=!1,n=e.config.doc,r;return n&&(r=n.createElement("p"),r.setAttribute("onbeforeactivate",";"),t=r.onbeforeactivate!==undefined),t}();o?(u("focus","beforeactivate","focusin"),u("blur","beforedeactivate","focusout")):(u("focus","focus","focus"),u("blur","blur","blur"))},"@VERSION@",{requires:["event-synthetic"]});
www/imports/component/Namer.js
terraswat/hexagram
// Namer.js // A modal to prompt the user to name something. // If you want something more complex use Modal.js instead. import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Modal from './Modal.js'; export default class Namer extends Component { constructor (props) { super(props); this.state = props; this.handleCloseModal = this.handleCloseModal.bind(this); this.handleTextKeyPress = this.handleTextKeyPress.bind(this); this.handleTextChange = this.handleTextChange.bind(this); this.handleOkButtonClick = this.handleOkButtonClick.bind(this); this.componentDidUpdate = this.componentDidUpdate.bind(this); } handleCloseModal (response) { // We handle the callback here, rather than in Modal, so we can // fix up the response. this.setState({ isOpen: false }); if (this.state.callback) { if (_.isUndefined(response) || typeof response !== 'string') { this.state.callback(); } else { this.state.callback(response); } } } handleOkButtonClick () { this.handleCloseModal(this.state.textInputStr.trim()); } handleTextKeyPress (event) { // Allow an 'Enter' key press to trigger the button. if (event.key === "Enter") { this.handleOkButtonClick(); } } handleTextChange (event) { this.setState({ textInputStr: event.target.value }); } componentDidUpdate () { var self = this; // Set the text value here to force the cursor to the end. setTimeout(function () { if (self.$text) { self.$text.val(self.state.textInputStr).focus(); } }, 300); } renderButton (self) { // Build the button. var button = <button onClick = {self.handleOkButtonClick} className = 'defaultButton' > OK </button> ; return button; } renderTextInput (self) { // Build the text input box. var input = <input type = 'text' onKeyPress = {self.handleTextKeyPress} onChange = {self.handleTextChange} style={{ width: '20em' }} ref={(input) => { this.$text = $(input); }} /> ; return input; } renderPromptStr (self) { // Convert any single string msg to an array of one msg. var msg = self.state.promptStr, msgArray = (typeof msg === 'string') ? [msg] : msg; return msgArray.map((str, i) => <p key = {i} > {str} </p> ); } render () { // Only show when isOpen state is true. if (!this.state.isOpen) { return null; } var self = this; return ( <Modal isOpen = {self.state.isOpen} onRequestClose = {self.handleCloseModal} body = { <div> {this.renderPromptStr(self)} {this.renderTextInput(self)} </div> } buttons = {this.renderButton(self)} /> ); } } Namer.propTypes = { // The text to display as a prompt to the user; either a string // or an array of strings, one per paragraph. promptStr: PropTypes.string.isRequired, // Controls the modal visibility. isOpen: PropTypes.bool, // The default text to display in the text input box. textInputStr: PropTypes.string, // Function to call upon modal close. callback: PropTypes.func, }; Namer.defaultProps = { isOpen: true, textInputStr: '', };
ajax/libs/gitalk/1.2.2/gitalk.js
extend1994/cdnjs
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["Gitalk"] = factory(); else root["Gitalk"] = factory(); })(this, function() { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "/dist"; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 75); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports) { var core = module.exports = {version: '2.4.0'}; if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { var store = __webpack_require__(39)('wks') , uid = __webpack_require__(24) , Symbol = __webpack_require__(2).Symbol , USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function(name){ return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store; /***/ }), /* 2 */ /***/ (function(module, exports) { // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var bind = __webpack_require__(68); var isBuffer = __webpack_require__(164); /*global toString:true*/ // utils is a library of generic helper functions non-specific to axios var toString = Object.prototype.toString; /** * Determine if a value is an Array * * @param {Object} val The value to test * @returns {boolean} True if value is an Array, otherwise false */ function isArray(val) { return toString.call(val) === '[object Array]'; } /** * Determine if a value is an ArrayBuffer * * @param {Object} val The value to test * @returns {boolean} True if value is an ArrayBuffer, otherwise false */ function isArrayBuffer(val) { return toString.call(val) === '[object ArrayBuffer]'; } /** * Determine if a value is a FormData * * @param {Object} val The value to test * @returns {boolean} True if value is an FormData, otherwise false */ function isFormData(val) { return (typeof FormData !== 'undefined') && (val instanceof FormData); } /** * Determine if a value is a view on an ArrayBuffer * * @param {Object} val The value to test * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false */ function isArrayBufferView(val) { var result; if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { result = ArrayBuffer.isView(val); } else { result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer); } return result; } /** * Determine if a value is a String * * @param {Object} val The value to test * @returns {boolean} True if value is a String, otherwise false */ function isString(val) { return typeof val === 'string'; } /** * Determine if a value is a Number * * @param {Object} val The value to test * @returns {boolean} True if value is a Number, otherwise false */ function isNumber(val) { return typeof val === 'number'; } /** * Determine if a value is undefined * * @param {Object} val The value to test * @returns {boolean} True if the value is undefined, otherwise false */ function isUndefined(val) { return typeof val === 'undefined'; } /** * Determine if a value is an Object * * @param {Object} val The value to test * @returns {boolean} True if value is an Object, otherwise false */ function isObject(val) { return val !== null && typeof val === 'object'; } /** * Determine if a value is a Date * * @param {Object} val The value to test * @returns {boolean} True if value is a Date, otherwise false */ function isDate(val) { return toString.call(val) === '[object Date]'; } /** * Determine if a value is a File * * @param {Object} val The value to test * @returns {boolean} True if value is a File, otherwise false */ function isFile(val) { return toString.call(val) === '[object File]'; } /** * Determine if a value is a Blob * * @param {Object} val The value to test * @returns {boolean} True if value is a Blob, otherwise false */ function isBlob(val) { return toString.call(val) === '[object Blob]'; } /** * Determine if a value is a Function * * @param {Object} val The value to test * @returns {boolean} True if value is a Function, otherwise false */ function isFunction(val) { return toString.call(val) === '[object Function]'; } /** * Determine if a value is a Stream * * @param {Object} val The value to test * @returns {boolean} True if value is a Stream, otherwise false */ function isStream(val) { return isObject(val) && isFunction(val.pipe); } /** * Determine if a value is a URLSearchParams object * * @param {Object} val The value to test * @returns {boolean} True if value is a URLSearchParams object, otherwise false */ function isURLSearchParams(val) { return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; } /** * Trim excess whitespace off the beginning and end of a string * * @param {String} str The String to trim * @returns {String} The String freed of excess whitespace */ function trim(str) { return str.replace(/^\s*/, '').replace(/\s*$/, ''); } /** * Determine if we're running in a standard browser environment * * This allows axios to run in a web worker, and react-native. * Both environments support XMLHttpRequest, but not fully standard globals. * * web workers: * typeof window -> undefined * typeof document -> undefined * * react-native: * navigator.product -> 'ReactNative' */ function isStandardBrowserEnv() { if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { return false; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ); } /** * Iterate over an Array or an Object invoking a function for each item. * * If `obj` is an Array callback will be called passing * the value, index, and complete array for each item. * * If 'obj' is an Object callback will be called passing * the value, key, and complete object for each property. * * @param {Object|Array} obj The object to iterate * @param {Function} fn The callback to invoke for each item */ function forEach(obj, fn) { // Don't bother if no value provided if (obj === null || typeof obj === 'undefined') { return; } // Force an array if not already something iterable if (typeof obj !== 'object' && !isArray(obj)) { /*eslint no-param-reassign:0*/ obj = [obj]; } if (isArray(obj)) { // Iterate over array values for (var i = 0, l = obj.length; i < l; i++) { fn.call(null, obj[i], i, obj); } } else { // Iterate over object keys for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { fn.call(null, obj[key], key, obj); } } } } /** * Accepts varargs expecting each argument to be an object, then * immutably merges the properties of each object and returns result. * * When multiple objects contain the same key the later object in * the arguments list will take precedence. * * Example: * * ```js * var result = merge({foo: 123}, {foo: 456}); * console.log(result.foo); // outputs 456 * ``` * * @param {Object} obj1 Object to merge * @returns {Object} Result of all merge properties */ function merge(/* obj1, obj2, obj3, ... */) { var result = {}; function assignValue(val, key) { if (typeof result[key] === 'object' && typeof val === 'object') { result[key] = merge(result[key], val); } else { result[key] = val; } } for (var i = 0, l = arguments.length; i < l; i++) { forEach(arguments[i], assignValue); } return result; } /** * Extends object a by mutably adding to it the properties of object b. * * @param {Object} a The object to be extended * @param {Object} b The object to copy properties from * @param {Object} thisArg The object to bind function to * @return {Object} The resulting value of object a */ function extend(a, b, thisArg) { forEach(b, function assignValue(val, key) { if (thisArg && typeof val === 'function') { a[key] = bind(val, thisArg); } else { a[key] = val; } }); return a; } module.exports = { isArray: isArray, isArrayBuffer: isArrayBuffer, isBuffer: isBuffer, isFormData: isFormData, isArrayBufferView: isArrayBufferView, isString: isString, isNumber: isNumber, isObject: isObject, isUndefined: isUndefined, isDate: isDate, isFile: isFile, isBlob: isBlob, isFunction: isFunction, isStream: isStream, isURLSearchParams: isURLSearchParams, isStandardBrowserEnv: isStandardBrowserEnv, forEach: forEach, merge: merge, extend: extend, trim: trim }; /***/ }), /* 4 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return version; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DOM", function() { return DOM; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Children", function() { return Children; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render$1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createClass", function() { return createClass; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createFactory", function() { return createFactory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createElement", function() { return createElement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cloneElement", function() { return cloneElement$1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidElement", function() { return isValidElement; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findDOMNode", function() { return findDOMNode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unmountComponentAtNode", function() { return unmountComponentAtNode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Component", function() { return Component$1; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PureComponent", function() { return PureComponent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unstable_renderSubtreeIntoContainer", function() { return renderSubtreeIntoContainer; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(79); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_preact__ = __webpack_require__(83); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_preact___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_preact__); /* harmony reexport (default from non-hamory) */ __webpack_require__.d(__webpack_exports__, "PropTypes", function() { return __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a; }); var version = '15.1.0'; // trick libraries to think we are react var ELEMENTS = 'a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan'.split(' '); var REACT_ELEMENT_TYPE = (typeof Symbol!=='undefined' && Symbol.for && Symbol.for('react.element')) || 0xeac7; var COMPONENT_WRAPPER_KEY = typeof Symbol!=='undefined' ? Symbol.for('__preactCompatWrapper') : '__preactCompatWrapper'; // don't autobind these methods since they already have guaranteed context. var AUTOBIND_BLACKLIST = { constructor: 1, render: 1, shouldComponentUpdate: 1, componentWillReceiveProps: 1, componentWillUpdate: 1, componentDidUpdate: 1, componentWillMount: 1, componentDidMount: 1, componentWillUnmount: 1, componentDidUnmount: 1 }; var CAMEL_PROPS = /^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vert|word|writing|x)[A-Z]/; var BYPASS_HOOK = {}; /*global process*/ var DEV = typeof process==='undefined' || !process.env || process.env.NODE_ENV!=='production'; // a component that renders nothing. Used to replace components for unmountComponentAtNode. function EmptyComponent() { return null; } // make react think we're react. var VNode = __WEBPACK_IMPORTED_MODULE_1_preact__["h"]('a', null).constructor; VNode.prototype.$$typeof = REACT_ELEMENT_TYPE; VNode.prototype.preactCompatUpgraded = false; VNode.prototype.preactCompatNormalized = false; Object.defineProperty(VNode.prototype, 'type', { get: function() { return this.nodeName; }, set: function(v) { this.nodeName = v; }, configurable:true }); Object.defineProperty(VNode.prototype, 'props', { get: function() { return this.attributes; }, set: function(v) { this.attributes = v; }, configurable:true }); var oldEventHook = __WEBPACK_IMPORTED_MODULE_1_preact__["options"].event; __WEBPACK_IMPORTED_MODULE_1_preact__["options"].event = function (e) { if (oldEventHook) { e = oldEventHook(e); } e.persist = Object; e.nativeEvent = e; return e; }; var oldVnodeHook = __WEBPACK_IMPORTED_MODULE_1_preact__["options"].vnode; __WEBPACK_IMPORTED_MODULE_1_preact__["options"].vnode = function (vnode) { if (!vnode.preactCompatUpgraded) { vnode.preactCompatUpgraded = true; var tag = vnode.nodeName, attrs = vnode.attributes = extend({}, vnode.attributes); if (typeof tag==='function') { if (tag[COMPONENT_WRAPPER_KEY]===true || (tag.prototype && 'isReactComponent' in tag.prototype)) { if (vnode.children && String(vnode.children)==='') { vnode.children = undefined; } if (vnode.children) { attrs.children = vnode.children; } if (!vnode.preactCompatNormalized) { normalizeVNode(vnode); } handleComponentVNode(vnode); } } else { if (vnode.children && String(vnode.children)==='') { vnode.children = undefined; } if (vnode.children) { attrs.children = vnode.children; } if (attrs.defaultValue) { if (!attrs.value && attrs.value!==0) { attrs.value = attrs.defaultValue; } delete attrs.defaultValue; } handleElementVNode(vnode, attrs); } } if (oldVnodeHook) { oldVnodeHook(vnode); } }; function handleComponentVNode(vnode) { var tag = vnode.nodeName, a = vnode.attributes; vnode.attributes = {}; if (tag.defaultProps) { extend(vnode.attributes, tag.defaultProps); } if (a) { extend(vnode.attributes, a); } } function handleElementVNode(vnode, a) { var shouldSanitize, attrs, i; if (a) { for (i in a) { if ((shouldSanitize = CAMEL_PROPS.test(i))) { break; } } if (shouldSanitize) { attrs = vnode.attributes = {}; for (i in a) { if (a.hasOwnProperty(i)) { attrs[ CAMEL_PROPS.test(i) ? i.replace(/([A-Z0-9])/, '-$1').toLowerCase() : i ] = a[i]; } } } } } // proxy render() since React returns a Component reference. function render$1(vnode, parent, callback) { var prev = parent && parent._preactCompatRendered && parent._preactCompatRendered.base; // ignore impossible previous renders if (prev && prev.parentNode!==parent) { prev = null; } // default to first Element child if (!prev) { prev = parent.children[0]; } // remove unaffected siblings for (var i=parent.childNodes.length; i--; ) { if (parent.childNodes[i]!==prev) { parent.removeChild(parent.childNodes[i]); } } var out = __WEBPACK_IMPORTED_MODULE_1_preact__["render"](vnode, parent, prev); if (parent) { parent._preactCompatRendered = out && (out._component || { base: out }); } if (typeof callback==='function') { callback(); } return out && out._component || out; } var ContextProvider = function () {}; ContextProvider.prototype.getChildContext = function () { return this.props.context; }; ContextProvider.prototype.render = function (props) { return props.children[0]; }; function renderSubtreeIntoContainer(parentComponent, vnode, container, callback) { var wrap = __WEBPACK_IMPORTED_MODULE_1_preact__["h"](ContextProvider, { context: parentComponent.context }, vnode); var c = render$1(wrap, container); if (callback) { callback(c); } return c._component || c.base; } function unmountComponentAtNode(container) { var existing = container._preactCompatRendered && container._preactCompatRendered.base; if (existing && existing.parentNode===container) { __WEBPACK_IMPORTED_MODULE_1_preact__["render"](__WEBPACK_IMPORTED_MODULE_1_preact__["h"](EmptyComponent), container, existing); return true; } return false; } var ARR = []; // This API is completely unnecessary for Preact, so it's basically passthrough. var Children = { map: function(children, fn, ctx) { if (children == null) { return null; } children = Children.toArray(children); if (ctx && ctx!==children) { fn = fn.bind(ctx); } return children.map(fn); }, forEach: function(children, fn, ctx) { if (children == null) { return null; } children = Children.toArray(children); if (ctx && ctx!==children) { fn = fn.bind(ctx); } children.forEach(fn); }, count: function(children) { return children && children.length || 0; }, only: function(children) { children = Children.toArray(children); if (children.length!==1) { throw new Error('Children.only() expects only one child.'); } return children[0]; }, toArray: function(children) { if (children == null) { return []; } return Array.isArray && Array.isArray(children) ? children : ARR.concat(children); } }; /** Track current render() component for ref assignment */ var currentComponent; function createFactory(type) { return createElement.bind(null, type); } var DOM = {}; for (var i=ELEMENTS.length; i--; ) { DOM[ELEMENTS[i]] = createFactory(ELEMENTS[i]); } function upgradeToVNodes(arr, offset) { for (var i=offset || 0; i<arr.length; i++) { var obj = arr[i]; if (Array.isArray(obj)) { upgradeToVNodes(obj); } else if (obj && typeof obj==='object' && !isValidElement(obj) && ((obj.props && obj.type) || (obj.attributes && obj.nodeName) || obj.children)) { arr[i] = createElement(obj.type || obj.nodeName, obj.props || obj.attributes, obj.children); } } } function isStatelessComponent(c) { return typeof c==='function' && !(c.prototype && c.prototype.render); } // wraps stateless functional components in a PropTypes validator function wrapStatelessComponent(WrappedComponent) { return createClass({ displayName: WrappedComponent.displayName || WrappedComponent.name, render: function() { return WrappedComponent(this.props, this.context); } }); } function statelessComponentHook(Ctor) { var Wrapped = Ctor[COMPONENT_WRAPPER_KEY]; if (Wrapped) { return Wrapped===true ? Ctor : Wrapped; } Wrapped = wrapStatelessComponent(Ctor); Object.defineProperty(Wrapped, COMPONENT_WRAPPER_KEY, { configurable:true, value:true }); Wrapped.displayName = Ctor.displayName; Wrapped.propTypes = Ctor.propTypes; Wrapped.defaultProps = Ctor.defaultProps; Object.defineProperty(Ctor, COMPONENT_WRAPPER_KEY, { configurable:true, value:Wrapped }); return Wrapped; } function createElement() { var args = [], len = arguments.length; while ( len-- ) args[ len ] = arguments[ len ]; upgradeToVNodes(args, 2); return normalizeVNode(__WEBPACK_IMPORTED_MODULE_1_preact__["h"].apply(void 0, args)); } function normalizeVNode(vnode) { vnode.preactCompatNormalized = true; applyClassName(vnode); if (isStatelessComponent(vnode.nodeName)) { vnode.nodeName = statelessComponentHook(vnode.nodeName); } var ref = vnode.attributes.ref, type = ref && typeof ref; if (currentComponent && (type==='string' || type==='number')) { vnode.attributes.ref = createStringRefProxy(ref, currentComponent); } applyEventNormalization(vnode); return vnode; } function cloneElement$1(element, props) { var children = [], len = arguments.length - 2; while ( len-- > 0 ) children[ len ] = arguments[ len + 2 ]; if (!isValidElement(element)) { return element; } var elementProps = element.attributes || element.props; var node = __WEBPACK_IMPORTED_MODULE_1_preact__["h"]( element.nodeName || element.type, elementProps, element.children || elementProps && elementProps.children ); // Only provide the 3rd argument if needed. // Arguments 3+ overwrite element.children in preactCloneElement var cloneArgs = [node, props]; if (children && children.length) { cloneArgs.push(children); } else if (props && props.children) { cloneArgs.push(props.children); } return normalizeVNode(__WEBPACK_IMPORTED_MODULE_1_preact__["cloneElement"].apply(void 0, cloneArgs)); } function isValidElement(element) { return element && ((element instanceof VNode) || element.$$typeof===REACT_ELEMENT_TYPE); } function createStringRefProxy(name, component) { return component._refProxies[name] || (component._refProxies[name] = function (resolved) { if (component && component.refs) { component.refs[name] = resolved; if (resolved===null) { delete component._refProxies[name]; component = null; } } }); } function applyEventNormalization(ref) { var nodeName = ref.nodeName; var attributes = ref.attributes; if (!attributes || typeof nodeName!=='string') { return; } var props = {}; for (var i in attributes) { props[i.toLowerCase()] = i; } if (props.ondoubleclick) { attributes.ondblclick = attributes[props.ondoubleclick]; delete attributes[props.ondoubleclick]; } // for *textual inputs* (incl textarea), normalize `onChange` -> `onInput`: if (props.onchange && (nodeName==='textarea' || (nodeName.toLowerCase()==='input' && !/^fil|che|rad/i.test(attributes.type)))) { var normalized = props.oninput || 'oninput'; if (!attributes[normalized]) { attributes[normalized] = multihook([attributes[normalized], attributes[props.onchange]]); delete attributes[props.onchange]; } } } function applyClassName(ref) { var attributes = ref.attributes; if (!attributes) { return; } var cl = attributes.className || attributes.class; if (cl) { attributes.className = cl; } } function extend(base, props) { for (var key in props) { if (props.hasOwnProperty(key)) { base[key] = props[key]; } } return base; } function shallowDiffers(a, b) { for (var i in a) { if (!(i in b)) { return true; } } for (var i$1 in b) { if (a[i$1]!==b[i$1]) { return true; } } return false; } function findDOMNode(component) { return component && component.base || component; } function F(){} function createClass(obj) { function cl(props, context) { bindAll(this); Component$1.call(this, props, context, BYPASS_HOOK); newComponentHook.call(this, props, context); } obj = extend({ constructor: cl }, obj); // We need to apply mixins here so that getDefaultProps is correctly mixed if (obj.mixins) { applyMixins(obj, collateMixins(obj.mixins)); } if (obj.statics) { extend(cl, obj.statics); } if (obj.propTypes) { cl.propTypes = obj.propTypes; } if (obj.defaultProps) { cl.defaultProps = obj.defaultProps; } if (obj.getDefaultProps) { cl.defaultProps = obj.getDefaultProps(); } F.prototype = Component$1.prototype; cl.prototype = extend(new F(), obj); cl.displayName = obj.displayName || 'Component'; return cl; } // Flatten an Array of mixins to a map of method name to mixin implementations function collateMixins(mixins) { var keyed = {}; for (var i=0; i<mixins.length; i++) { var mixin = mixins[i]; for (var key in mixin) { if (mixin.hasOwnProperty(key) && typeof mixin[key]==='function') { (keyed[key] || (keyed[key]=[])).push(mixin[key]); } } } return keyed; } // apply a mapping of Arrays of mixin methods to a component prototype function applyMixins(proto, mixins) { for (var key in mixins) { if (mixins.hasOwnProperty(key)) { proto[key] = multihook( mixins[key].concat(proto[key] || ARR), key==='getDefaultProps' || key==='getInitialState' || key==='getChildContext' ); } } } function bindAll(ctx) { for (var i in ctx) { var v = ctx[i]; if (typeof v==='function' && !v.__bound && !AUTOBIND_BLACKLIST.hasOwnProperty(i)) { (ctx[i] = v.bind(ctx)).__bound = true; } } } function callMethod(ctx, m, args) { if (typeof m==='string') { m = ctx.constructor.prototype[m]; } if (typeof m==='function') { return m.apply(ctx, args); } } function multihook(hooks, skipDuplicates) { return function() { var arguments$1 = arguments; var this$1 = this; var ret; for (var i=0; i<hooks.length; i++) { var r = callMethod(this$1, hooks[i], arguments$1); if (skipDuplicates && r!=null) { if (!ret) { ret = {}; } for (var key in r) { if (r.hasOwnProperty(key)) { ret[key] = r[key]; } } } else if (typeof r!=='undefined') { ret = r; } } return ret; }; } function newComponentHook(props, context) { propsHook.call(this, props, context); this.componentWillReceiveProps = multihook([propsHook, this.componentWillReceiveProps || 'componentWillReceiveProps']); this.render = multihook([propsHook, beforeRender, this.render || 'render', afterRender]); } function propsHook(props, context) { if (!props) { return; } // React annoyingly special-cases single children, and some react components are ridiculously strict about this. var c = props.children; if (c && Array.isArray(c) && c.length===1) { props.children = c[0]; // but its totally still going to be an Array. if (props.children && typeof props.children==='object') { props.children.length = 1; props.children[0] = props.children; } } // add proptype checking if (DEV) { var ctor = typeof this==='function' ? this : this.constructor, propTypes = this.propTypes || ctor.propTypes; var displayName = this.displayName || ctor.name; if (propTypes) { __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.checkPropTypes(propTypes, props, 'prop', displayName); } } } function beforeRender(props) { currentComponent = this; } function afterRender() { if (currentComponent===this) { currentComponent = null; } } function Component$1(props, context, opts) { __WEBPACK_IMPORTED_MODULE_1_preact__["Component"].call(this, props, context); this.state = this.getInitialState ? this.getInitialState() : {}; this.refs = {}; this._refProxies = {}; if (opts!==BYPASS_HOOK) { newComponentHook.call(this, props, context); } } extend(Component$1.prototype = new __WEBPACK_IMPORTED_MODULE_1_preact__["Component"](), { constructor: Component$1, isReactComponent: {}, replaceState: function(state, callback) { var this$1 = this; this.setState(state, callback); for (var i in this$1.state) { if (!(i in state)) { delete this$1.state[i]; } } }, getDOMNode: function() { return this.base; }, isMounted: function() { return !!this.base; } }); function PureComponent(props, context) { Component$1.call(this, props, context); } F.prototype = Component$1.prototype; PureComponent.prototype = new F(); PureComponent.prototype.isPureReactComponent = true; PureComponent.prototype.shouldComponentUpdate = function(props, state) { return shallowDiffers(this.props, props) || shallowDiffers(this.state, state); }; var index = { version: version, DOM: DOM, PropTypes: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a, Children: Children, render: render$1, createClass: createClass, createFactory: createFactory, createElement: createElement, cloneElement: cloneElement$1, isValidElement: isValidElement, findDOMNode: findDOMNode, unmountComponentAtNode: unmountComponentAtNode, Component: Component$1, PureComponent: PureComponent, unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer }; /* harmony default export */ __webpack_exports__["default"] = (index); //# sourceMappingURL=preact-compat.es.js.map /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(5))) /***/ }), /* 5 */ /***/ (function(module, exports) { // shim for using process in browser var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it // don't break things. But we need to wrap it in a try catch in case it is // wrapped in strict mode code which doesn't define any globals. It's inside a // function because try/catches deoptimize in certain engines. var cachedSetTimeout; var cachedClearTimeout; function defaultSetTimout() { throw new Error('setTimeout has not been defined'); } function defaultClearTimeout () { throw new Error('clearTimeout has not been defined'); } (function () { try { if (typeof setTimeout === 'function') { cachedSetTimeout = setTimeout; } else { cachedSetTimeout = defaultSetTimout; } } catch (e) { cachedSetTimeout = defaultSetTimout; } try { if (typeof clearTimeout === 'function') { cachedClearTimeout = clearTimeout; } else { cachedClearTimeout = defaultClearTimeout; } } catch (e) { cachedClearTimeout = defaultClearTimeout; } } ()) function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { //normal enviroments in sane situations return setTimeout(fun, 0); } // if setTimeout wasn't available but was latter defined if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { cachedSetTimeout = setTimeout; return setTimeout(fun, 0); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun, 0); } catch(e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedSetTimeout.call(null, fun, 0); } catch(e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error return cachedSetTimeout.call(this, fun, 0); } } } function runClearTimeout(marker) { if (cachedClearTimeout === clearTimeout) { //normal enviroments in sane situations return clearTimeout(marker); } // if clearTimeout wasn't available but was latter defined if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { cachedClearTimeout = clearTimeout; return clearTimeout(marker); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); } catch (e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedClearTimeout.call(null, marker); } catch (e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. // Some versions of I.E. have different rules for clearTimeout vs setTimeout return cachedClearTimeout.call(this, marker); } } } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { if (!draining || !currentQueue) { return; } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = runTimeout(cleanUpNextTick); draining = true; var len = queue.length; while(len) { currentQueue = queue; queue = []; while (++queueIndex < len) { if (currentQueue) { currentQueue[queueIndex].run(); } } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; runClearTimeout(timeout); } process.nextTick = function (fun) { var args = new Array(arguments.length - 1); if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { runTimeout(drainQueue); } }; // v8 likes predictible objects function Item(fun, array) { this.fun = fun; this.array = array; } Item.prototype.run = function () { this.fun.apply(null, this.array); }; process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; process.version = ''; // empty string to avoid regexp issues process.versions = {}; function noop() {} process.on = noop; process.addListener = noop; process.once = noop; process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; process.prependListener = noop; process.prependOnceListener = noop; process.listeners = function (name) { return [] } process.binding = function (name) { throw new Error('process.binding is not supported'); }; process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; process.umask = function() { return 0; }; /***/ }), /* 6 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , core = __webpack_require__(0) , ctx = __webpack_require__(13) , hide = __webpack_require__(10) , PROTOTYPE = 'prototype'; var $export = function(type, name, source){ var IS_FORCED = type & $export.F , IS_GLOBAL = type & $export.G , IS_STATIC = type & $export.S , IS_PROTO = type & $export.P , IS_BIND = type & $export.B , IS_WRAP = type & $export.W , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) , expProto = exports[PROTOTYPE] , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] , key, own, out; if(IS_GLOBAL)source = name; for(key in source){ // contains in native own = !IS_FORCED && target && target[key] !== undefined; if(own && key in exports)continue; // export native or passed out = own ? target[key] : source[key]; // prevent global pollution for namespaces exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] // bind timers to global for call from export context : IS_BIND && own ? ctx(out, global) // wrap global constructors for prevent change them in library : IS_WRAP && target[key] == out ? (function(C){ var F = function(a, b, c){ if(this instanceof C){ switch(arguments.length){ case 0: return new C; case 1: return new C(a); case 2: return new C(a, b); } return new C(a, b, c); } return C.apply(this, arguments); }; F[PROTOTYPE] = C[PROTOTYPE]; return F; // make static versions for prototype methods })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% if(IS_PROTO){ (exports.virtual || (exports.virtual = {}))[key] = out; // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out); } } }; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }), /* 7 */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(8) , IE8_DOM_DEFINE = __webpack_require__(50) , toPrimitive = __webpack_require__(30) , dP = Object.defineProperty; exports.f = __webpack_require__(9) ? Object.defineProperty : function defineProperty(O, P, Attributes){ anObject(O); P = toPrimitive(P, true); anObject(Attributes); if(IE8_DOM_DEFINE)try { return dP(O, P, Attributes); } catch(e){ /* empty */ } if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); if('value' in Attributes)O[P] = Attributes.value; return O; }; /***/ }), /* 8 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(14); module.exports = function(it){ if(!isObject(it))throw TypeError(it + ' is not an object!'); return it; }; /***/ }), /* 9 */ /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty module.exports = !__webpack_require__(15)(function(){ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; }); /***/ }), /* 10 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(7) , createDesc = __webpack_require__(19); module.exports = __webpack_require__(9) ? function(object, key, value){ return dP.f(object, key, createDesc(1, value)); } : function(object, key, value){ object[key] = value; return object; }; /***/ }), /* 11 */ /***/ (function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function(it, key){ return hasOwnProperty.call(it, key); }; /***/ }), /* 12 */ /***/ (function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(56) , defined = __webpack_require__(35); module.exports = function(it){ return IObject(defined(it)); }; /***/ }), /* 13 */ /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding var aFunction = __webpack_require__(28); module.exports = function(fn, that, length){ aFunction(fn); if(that === undefined)return fn; switch(length){ case 1: return function(a){ return fn.call(that, a); }; case 2: return function(a, b){ return fn.call(that, a, b); }; case 3: return function(a, b, c){ return fn.call(that, a, b, c); }; } return function(/* ...args */){ return fn.apply(that, arguments); }; }; /***/ }), /* 14 */ /***/ (function(module, exports) { module.exports = function(it){ return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }), /* 15 */ /***/ (function(module, exports) { module.exports = function(exec){ try { return !!exec(); } catch(e){ return true; } }; /***/ }), /* 16 */ /***/ (function(module, exports) { module.exports = {}; /***/ }), /* 17 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__(55) , enumBugKeys = __webpack_require__(40); module.exports = Object.keys || function keys(O){ return $keys(O, enumBugKeys); }; /***/ }), /* 18 */ /***/ (function(module, exports, __webpack_require__) { var isDate = __webpack_require__(195) var MILLISECONDS_IN_HOUR = 3600000 var MILLISECONDS_IN_MINUTE = 60000 var DEFAULT_ADDITIONAL_DIGITS = 2 var parseTokenDateTimeDelimeter = /[T ]/ var parseTokenPlainTime = /:/ // year tokens var parseTokenYY = /^(\d{2})$/ var parseTokensYYY = [ /^([+-]\d{2})$/, // 0 additional digits /^([+-]\d{3})$/, // 1 additional digit /^([+-]\d{4})$/ // 2 additional digits ] var parseTokenYYYY = /^(\d{4})/ var parseTokensYYYYY = [ /^([+-]\d{4})/, // 0 additional digits /^([+-]\d{5})/, // 1 additional digit /^([+-]\d{6})/ // 2 additional digits ] // date tokens var parseTokenMM = /^-(\d{2})$/ var parseTokenDDD = /^-?(\d{3})$/ var parseTokenMMDD = /^-?(\d{2})-?(\d{2})$/ var parseTokenWww = /^-?W(\d{2})$/ var parseTokenWwwD = /^-?W(\d{2})-?(\d{1})$/ // time tokens var parseTokenHH = /^(\d{2}([.,]\d*)?)$/ var parseTokenHHMM = /^(\d{2}):?(\d{2}([.,]\d*)?)$/ var parseTokenHHMMSS = /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/ // timezone tokens var parseTokenTimezone = /([Z+-].*)$/ var parseTokenTimezoneZ = /^(Z)$/ var parseTokenTimezoneHH = /^([+-])(\d{2})$/ var parseTokenTimezoneHHMM = /^([+-])(\d{2}):?(\d{2})$/ /** * @category Common Helpers * @summary Convert the given argument to an instance of Date. * * @description * Convert the given argument to an instance of Date. * * If the argument is an instance of Date, the function returns its clone. * * If the argument is a number, it is treated as a timestamp. * * If an argument is a string, the function tries to parse it. * Function accepts complete ISO 8601 formats as well as partial implementations. * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601 * * If all above fails, the function passes the given argument to Date constructor. * * @param {Date|String|Number} argument - the value to convert * @param {Object} [options] - the object with options * @param {0 | 1 | 2} [options.additionalDigits=2] - the additional number of digits in the extended year format * @returns {Date} the parsed date in the local time zone * * @example * // Convert string '2014-02-11T11:30:30' to date: * var result = parse('2014-02-11T11:30:30') * //=> Tue Feb 11 2014 11:30:30 * * @example * // Parse string '+02014101', * // if the additional number of digits in the extended year format is 1: * var result = parse('+02014101', {additionalDigits: 1}) * //=> Fri Apr 11 2014 00:00:00 */ function parse (argument, dirtyOptions) { if (isDate(argument)) { // Prevent the date to lose the milliseconds when passed to new Date() in IE10 return new Date(argument.getTime()) } else if (typeof argument !== 'string') { return new Date(argument) } var options = dirtyOptions || {} var additionalDigits = options.additionalDigits if (additionalDigits == null) { additionalDigits = DEFAULT_ADDITIONAL_DIGITS } else { additionalDigits = Number(additionalDigits) } var dateStrings = splitDateString(argument) var parseYearResult = parseYear(dateStrings.date, additionalDigits) var year = parseYearResult.year var restDateString = parseYearResult.restDateString var date = parseDate(restDateString, year) if (date) { var timestamp = date.getTime() var time = 0 var offset if (dateStrings.time) { time = parseTime(dateStrings.time) } if (dateStrings.timezone) { offset = parseTimezone(dateStrings.timezone) } else { // get offset accurate to hour in timezones that change offset offset = new Date(timestamp + time).getTimezoneOffset() offset = new Date(timestamp + time + offset * MILLISECONDS_IN_MINUTE).getTimezoneOffset() } return new Date(timestamp + time + offset * MILLISECONDS_IN_MINUTE) } else { return new Date(argument) } } function splitDateString (dateString) { var dateStrings = {} var array = dateString.split(parseTokenDateTimeDelimeter) var timeString if (parseTokenPlainTime.test(array[0])) { dateStrings.date = null timeString = array[0] } else { dateStrings.date = array[0] timeString = array[1] } if (timeString) { var token = parseTokenTimezone.exec(timeString) if (token) { dateStrings.time = timeString.replace(token[1], '') dateStrings.timezone = token[1] } else { dateStrings.time = timeString } } return dateStrings } function parseYear (dateString, additionalDigits) { var parseTokenYYY = parseTokensYYY[additionalDigits] var parseTokenYYYYY = parseTokensYYYYY[additionalDigits] var token // YYYY or ±YYYYY token = parseTokenYYYY.exec(dateString) || parseTokenYYYYY.exec(dateString) if (token) { var yearString = token[1] return { year: parseInt(yearString, 10), restDateString: dateString.slice(yearString.length) } } // YY or ±YYY token = parseTokenYY.exec(dateString) || parseTokenYYY.exec(dateString) if (token) { var centuryString = token[1] return { year: parseInt(centuryString, 10) * 100, restDateString: dateString.slice(centuryString.length) } } // Invalid ISO-formatted year return { year: null } } function parseDate (dateString, year) { // Invalid ISO-formatted year if (year === null) { return null } var token var date var month var week // YYYY if (dateString.length === 0) { date = new Date(0) date.setUTCFullYear(year) return date } // YYYY-MM token = parseTokenMM.exec(dateString) if (token) { date = new Date(0) month = parseInt(token[1], 10) - 1 date.setUTCFullYear(year, month) return date } // YYYY-DDD or YYYYDDD token = parseTokenDDD.exec(dateString) if (token) { date = new Date(0) var dayOfYear = parseInt(token[1], 10) date.setUTCFullYear(year, 0, dayOfYear) return date } // YYYY-MM-DD or YYYYMMDD token = parseTokenMMDD.exec(dateString) if (token) { date = new Date(0) month = parseInt(token[1], 10) - 1 var day = parseInt(token[2], 10) date.setUTCFullYear(year, month, day) return date } // YYYY-Www or YYYYWww token = parseTokenWww.exec(dateString) if (token) { week = parseInt(token[1], 10) - 1 return dayOfISOYear(year, week) } // YYYY-Www-D or YYYYWwwD token = parseTokenWwwD.exec(dateString) if (token) { week = parseInt(token[1], 10) - 1 var dayOfWeek = parseInt(token[2], 10) - 1 return dayOfISOYear(year, week, dayOfWeek) } // Invalid ISO-formatted date return null } function parseTime (timeString) { var token var hours var minutes // hh token = parseTokenHH.exec(timeString) if (token) { hours = parseFloat(token[1].replace(',', '.')) return (hours % 24) * MILLISECONDS_IN_HOUR } // hh:mm or hhmm token = parseTokenHHMM.exec(timeString) if (token) { hours = parseInt(token[1], 10) minutes = parseFloat(token[2].replace(',', '.')) return (hours % 24) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE } // hh:mm:ss or hhmmss token = parseTokenHHMMSS.exec(timeString) if (token) { hours = parseInt(token[1], 10) minutes = parseInt(token[2], 10) var seconds = parseFloat(token[3].replace(',', '.')) return (hours % 24) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE + seconds * 1000 } // Invalid ISO-formatted time return null } function parseTimezone (timezoneString) { var token var absoluteOffset // Z token = parseTokenTimezoneZ.exec(timezoneString) if (token) { return 0 } // ±hh token = parseTokenTimezoneHH.exec(timezoneString) if (token) { absoluteOffset = parseInt(token[2], 10) * 60 return (token[1] === '+') ? -absoluteOffset : absoluteOffset } // ±hh:mm or ±hhmm token = parseTokenTimezoneHHMM.exec(timezoneString) if (token) { absoluteOffset = parseInt(token[2], 10) * 60 + parseInt(token[3], 10) return (token[1] === '+') ? -absoluteOffset : absoluteOffset } return 0 } function dayOfISOYear (isoYear, week, day) { week = week || 0 day = day || 0 var date = new Date(0) date.setUTCFullYear(isoYear, 0, 4) var fourthOfJanuaryDay = date.getUTCDay() || 7 var diff = week * 7 + day + 1 - fourthOfJanuaryDay date.setUTCDate(date.getUTCDate() + diff) return date } module.exports = parse /***/ }), /* 19 */ /***/ (function(module, exports) { module.exports = function(bitmap, value){ return { enumerable : !(bitmap & 1), configurable: !(bitmap & 2), writable : !(bitmap & 4), value : value }; }; /***/ }), /* 20 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $at = __webpack_require__(91)(true); // 21.1.3.27 String.prototype[@@iterator]() __webpack_require__(53)(String, 'String', function(iterated){ this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function(){ var O = this._t , index = this._i , point; if(index >= O.length)return {value: undefined, done: true}; point = $at(O, index); this._i += point.length; return {value: point, done: false}; }); /***/ }), /* 21 */ /***/ (function(module, exports) { var toString = {}.toString; module.exports = function(it){ return toString.call(it).slice(8, -1); }; /***/ }), /* 22 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) var defined = __webpack_require__(35); module.exports = function(it){ return Object(defined(it)); }; /***/ }), /* 23 */ /***/ (function(module, exports) { module.exports = true; /***/ }), /* 24 */ /***/ (function(module, exports) { var id = 0 , px = Math.random(); module.exports = function(key){ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; /***/ }), /* 25 */ /***/ (function(module, exports, __webpack_require__) { var def = __webpack_require__(7).f , has = __webpack_require__(11) , TAG = __webpack_require__(1)('toStringTag'); module.exports = function(it, tag, stat){ if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); }; /***/ }), /* 26 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(96); var global = __webpack_require__(2) , hide = __webpack_require__(10) , Iterators = __webpack_require__(16) , TO_STRING_TAG = __webpack_require__(1)('toStringTag'); for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ var NAME = collections[i] , Collection = global[NAME] , proto = Collection && Collection.prototype; if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); Iterators[NAME] = Iterators.Array; } /***/ }), /* 27 */ /***/ (function(module, exports) { exports.f = {}.propertyIsEnumerable; /***/ }), /* 28 */ /***/ (function(module, exports) { module.exports = function(it){ if(typeof it != 'function')throw TypeError(it + ' is not a function!'); return it; }; /***/ }), /* 29 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(14) , document = __webpack_require__(2).document // in old IE typeof document.createElement is 'object' , is = isObject(document) && isObject(document.createElement); module.exports = function(it){ return is ? document.createElement(it) : {}; }; /***/ }), /* 30 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __webpack_require__(14); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function(it, S){ if(!isObject(it))return it; var fn, val; if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }), /* 31 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * */ function makeEmptyFunction(arg) { return function () { return arg; }; } /** * This function accepts and discards inputs; it has no side effects. This is * primarily useful idiomatically for overridable function endpoints which * always need to be callable, since JS lacks a null-call idiom ala Cocoa. */ var emptyFunction = function emptyFunction() {}; emptyFunction.thatReturns = makeEmptyFunction; emptyFunction.thatReturnsFalse = makeEmptyFunction(false); emptyFunction.thatReturnsTrue = makeEmptyFunction(true); emptyFunction.thatReturnsNull = makeEmptyFunction(null); emptyFunction.thatReturnsThis = function () { return this; }; emptyFunction.thatReturnsArgument = function (arg) { return arg; }; module.exports = emptyFunction; /***/ }), /* 32 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments * to provide information about what broke and what you were * expecting. * * The invariant message will be stripped in production, but the invariant * will remain to ensure logic does not differ in production. */ var validateFormat = function validateFormat(format) {}; if (process.env.NODE_ENV !== 'production') { validateFormat = function validateFormat(format) { if (format === undefined) { throw new Error('invariant requires an error message argument'); } }; } function invariant(condition, format, a, b, c, d, e, f) { validateFormat(format); if (!condition) { var error; if (format === undefined) { error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error(format.replace(/%s/g, function () { return args[argIndex++]; })); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } } module.exports = invariant; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }), /* 33 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /* 34 */ /***/ (function(module, exports) { // 7.1.4 ToInteger var ceil = Math.ceil , floor = Math.floor; module.exports = function(it){ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }), /* 35 */ /***/ (function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) module.exports = function(it){ if(it == undefined)throw TypeError("Can't call method on " + it); return it; }; /***/ }), /* 36 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(8) , dPs = __webpack_require__(93) , enumBugKeys = __webpack_require__(40) , IE_PROTO = __webpack_require__(38)('IE_PROTO') , Empty = function(){ /* empty */ } , PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function(){ // Thrash, waste and sodomy: IE GC bug var iframe = __webpack_require__(29)('iframe') , i = enumBugKeys.length , lt = '<' , gt = '>' , iframeDocument; iframe.style.display = 'none'; __webpack_require__(57).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; module.exports = Object.create || function create(O, Properties){ var result; if(O !== null){ Empty[PROTOTYPE] = anObject(O); result = new Empty; Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : dPs(result, Properties); }; /***/ }), /* 37 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.15 ToLength var toInteger = __webpack_require__(34) , min = Math.min; module.exports = function(it){ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; /***/ }), /* 38 */ /***/ (function(module, exports, __webpack_require__) { var shared = __webpack_require__(39)('keys') , uid = __webpack_require__(24); module.exports = function(key){ return shared[key] || (shared[key] = uid(key)); }; /***/ }), /* 39 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , SHARED = '__core-js_shared__' , store = global[SHARED] || (global[SHARED] = {}); module.exports = function(key){ return store[key] || (store[key] = {}); }; /***/ }), /* 40 */ /***/ (function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }), /* 41 */ /***/ (function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() var cof = __webpack_require__(21) , TAG = __webpack_require__(1)('toStringTag') // ES3 wrong here , ARG = cof(function(){ return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function(it, key){ try { return it[key]; } catch(e){ /* empty */ } }; module.exports = function(it){ var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; /***/ }), /* 42 */ /***/ (function(module, exports, __webpack_require__) { var classof = __webpack_require__(41) , ITERATOR = __webpack_require__(1)('iterator') , Iterators = __webpack_require__(16); module.exports = __webpack_require__(0).getIteratorMethod = function(it){ if(it != undefined)return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; /***/ }), /* 43 */ /***/ (function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }), /* 44 */ /***/ (function(module, exports, __webpack_require__) { exports.f = __webpack_require__(1); /***/ }), /* 45 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , core = __webpack_require__(0) , LIBRARY = __webpack_require__(23) , wksExt = __webpack_require__(44) , defineProperty = __webpack_require__(7).f; module.exports = function(name){ var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)}); }; /***/ }), /* 46 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.omit = omit; exports.arraysEqual = arraysEqual; var isElementAnSFC = exports.isElementAnSFC = function isElementAnSFC(element) { var isNativeDOMElement = typeof element.type === 'string'; if (isNativeDOMElement) { return false; } return !element.type.prototype.isReactComponent; }; function omit(obj) { var attrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; var result = {}; Object.keys(obj).forEach(function (key) { if (attrs.indexOf(key) === -1) { result[key] = obj[key]; } }); return result; } function arraysEqual(a, b) { var sameObject = a === b; if (sameObject) { return true; } var notBothArrays = !Array.isArray(a) || !Array.isArray(b); var differentLengths = a.length !== b.length; if (notBothArrays || differentLengths) { return false; } return a.every(function (element, index) { return element === b[index]; }); } function memoizeString(fn) { var cache = {}; return function (str) { if (!cache[str]) { cache[str] = fn(str); } return cache[str]; }; } var hyphenate = exports.hyphenate = memoizeString(function (str) { return str.replace(/([A-Z])/g, '-$1').toLowerCase(); }); /***/ }), /* 47 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { var utils = __webpack_require__(3); var normalizeHeaderName = __webpack_require__(166); var DEFAULT_CONTENT_TYPE = { 'Content-Type': 'application/x-www-form-urlencoded' }; function setContentTypeIfUnset(headers, value) { if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { headers['Content-Type'] = value; } } function getDefaultAdapter() { var adapter; if (typeof XMLHttpRequest !== 'undefined') { // For browsers use XHR adapter adapter = __webpack_require__(69); } else if (typeof process !== 'undefined') { // For node use HTTP adapter adapter = __webpack_require__(69); } return adapter; } var defaults = { adapter: getDefaultAdapter(), transformRequest: [function transformRequest(data, headers) { normalizeHeaderName(headers, 'Content-Type'); if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data) ) { return data; } if (utils.isArrayBufferView(data)) { return data.buffer; } if (utils.isURLSearchParams(data)) { setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); return data.toString(); } if (utils.isObject(data)) { setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); return JSON.stringify(data); } return data; }], transformResponse: [function transformResponse(data) { /*eslint no-param-reassign:0*/ if (typeof data === 'string') { try { data = JSON.parse(data); } catch (e) { /* Ignore */ } } return data; }], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, validateStatus: function validateStatus(status) { return status >= 200 && status < 300; } }; defaults.headers = { common: { 'Accept': 'application/json, text/plain, */*' } }; utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { defaults.headers[method] = {}; }); utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); }); module.exports = defaults; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }), /* 48 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; /***/ }), /* 49 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _defineProperty = __webpack_require__(76); var _defineProperty2 = _interopRequireDefault(_defineProperty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = 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; (0, _defineProperty2.default)(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /***/ }), /* 50 */ /***/ (function(module, exports, __webpack_require__) { module.exports = !__webpack_require__(9) && !__webpack_require__(15)(function(){ return Object.defineProperty(__webpack_require__(29)('div'), 'a', {get: function(){ return 7; }}).a != 7; }); /***/ }), /* 51 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ var emptyFunction = __webpack_require__(31); /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var warning = emptyFunction; if (process.env.NODE_ENV !== 'production') { (function () { var printWarning = function printWarning(format) { for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function () { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} }; warning = function warning(condition, format) { if (format === undefined) { throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); } if (format.indexOf('Failed Composite propType: ') === 0) { return; // Ignore CompositeComponent proptype check. } if (!condition) { for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { args[_key2 - 2] = arguments[_key2]; } printWarning.apply(undefined, [format].concat(args)); } }; })(); } module.exports = warning; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }), /* 52 */ /***/ (function(module, exports) { /***/ }), /* 53 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var LIBRARY = __webpack_require__(23) , $export = __webpack_require__(6) , redefine = __webpack_require__(54) , hide = __webpack_require__(10) , has = __webpack_require__(11) , Iterators = __webpack_require__(16) , $iterCreate = __webpack_require__(92) , setToStringTag = __webpack_require__(25) , getPrototypeOf = __webpack_require__(58) , ITERATOR = __webpack_require__(1)('iterator') , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` , FF_ITERATOR = '@@iterator' , KEYS = 'keys' , VALUES = 'values'; var returnThis = function(){ return this; }; module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ $iterCreate(Constructor, NAME, next); var getMethod = function(kind){ if(!BUGGY && kind in proto)return proto[kind]; switch(kind){ case KEYS: return function keys(){ return new Constructor(this, kind); }; case VALUES: return function values(){ return new Constructor(this, kind); }; } return function entries(){ return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator' , DEF_VALUES = DEFAULT == VALUES , VALUES_BUG = false , proto = Base.prototype , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] , $default = $native || getMethod(DEFAULT) , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined , $anyNative = NAME == 'Array' ? proto.entries || $native : $native , methods, key, IteratorPrototype; // Fix native if($anyNative){ IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); if(IteratorPrototype !== Object.prototype){ // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF if(DEF_VALUES && $native && $native.name !== VALUES){ VALUES_BUG = true; $default = function values(){ return $native.call(this); }; } // Define iterator if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; Iterators[TAG] = returnThis; if(DEFAULT){ methods = { values: DEF_VALUES ? $default : getMethod(VALUES), keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; if(FORCED)for(key in methods){ if(!(key in proto))redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; }; /***/ }), /* 54 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(10); /***/ }), /* 55 */ /***/ (function(module, exports, __webpack_require__) { var has = __webpack_require__(11) , toIObject = __webpack_require__(12) , arrayIndexOf = __webpack_require__(94)(false) , IE_PROTO = __webpack_require__(38)('IE_PROTO'); module.exports = function(object, names){ var O = toIObject(object) , i = 0 , result = [] , key; for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); // Don't enum bug & hidden keys while(names.length > i)if(has(O, key = names[i++])){ ~arrayIndexOf(result, key) || result.push(key); } return result; }; /***/ }), /* 56 */ /***/ (function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = __webpack_require__(21); module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }), /* 57 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(2).document && document.documentElement; /***/ }), /* 58 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = __webpack_require__(11) , toObject = __webpack_require__(22) , IE_PROTO = __webpack_require__(38)('IE_PROTO') , ObjectProto = Object.prototype; module.exports = Object.getPrototypeOf || function(O){ O = toObject(O); if(has(O, IE_PROTO))return O[IE_PROTO]; if(typeof O.constructor == 'function' && O instanceof O.constructor){ return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; }; /***/ }), /* 59 */ /***/ (function(module, exports, __webpack_require__) { // call something on iterator step with safe closing on error var anObject = __webpack_require__(8); module.exports = function(iterator, fn, value, entries){ try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch(e){ var ret = iterator['return']; if(ret !== undefined)anObject(ret.call(iterator)); throw e; } }; /***/ }), /* 60 */ /***/ (function(module, exports, __webpack_require__) { // check on default Array iterator var Iterators = __webpack_require__(16) , ITERATOR = __webpack_require__(1)('iterator') , ArrayProto = Array.prototype; module.exports = function(it){ return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; /***/ }), /* 61 */ /***/ (function(module, exports, __webpack_require__) { var ctx = __webpack_require__(13) , invoke = __webpack_require__(103) , html = __webpack_require__(57) , cel = __webpack_require__(29) , global = __webpack_require__(2) , process = global.process , setTask = global.setImmediate , clearTask = global.clearImmediate , MessageChannel = global.MessageChannel , counter = 0 , queue = {} , ONREADYSTATECHANGE = 'onreadystatechange' , defer, channel, port; var run = function(){ var id = +this; if(queue.hasOwnProperty(id)){ var fn = queue[id]; delete queue[id]; fn(); } }; var listener = function(event){ run.call(event.data); }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise: if(!setTask || !clearTask){ setTask = function setImmediate(fn){ var args = [], i = 1; while(arguments.length > i)args.push(arguments[i++]); queue[++counter] = function(){ invoke(typeof fn == 'function' ? fn : Function(fn), args); }; defer(counter); return counter; }; clearTask = function clearImmediate(id){ delete queue[id]; }; // Node.js 0.8- if(__webpack_require__(21)(process) == 'process'){ defer = function(id){ process.nextTick(ctx(run, id, 1)); }; // Browsers with MessageChannel, includes WebWorkers } else if(MessageChannel){ channel = new MessageChannel; port = channel.port2; channel.port1.onmessage = listener; defer = ctx(port.postMessage, port, 1); // Browsers with postMessage, skip WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){ defer = function(id){ global.postMessage(id + '', '*'); }; global.addEventListener('message', listener, false); // IE8- } else if(ONREADYSTATECHANGE in cel('script')){ defer = function(id){ html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ html.removeChild(this); run.call(id); }; }; // Rest old browsers } else { defer = function(id){ setTimeout(ctx(run, id, 1), 0); }; } } module.exports = { set: setTask, clear: clearTask }; /***/ }), /* 62 */ /***/ (function(module, exports, __webpack_require__) { var ITERATOR = __webpack_require__(1)('iterator') , SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); riter['return'] = function(){ SAFE_CLOSING = true; }; Array.from(riter, function(){ throw 2; }); } catch(e){ /* empty */ } module.exports = function(exec, skipClosing){ if(!skipClosing && !SAFE_CLOSING)return false; var safe = false; try { var arr = [7] , iter = arr[ITERATOR](); iter.next = function(){ return {done: safe = true}; }; arr[ITERATOR] = function(){ return iter; }; exec(arr); } catch(e){ /* empty */ } return safe; }; /***/ }), /* 63 */ /***/ (function(module, exports, __webpack_require__) { // most Object methods by ES6 should accept primitives var $export = __webpack_require__(6) , core = __webpack_require__(0) , fails = __webpack_require__(15); module.exports = function(KEY, exec){ var fn = (core.Object || {})[KEY] || Object[KEY] , exp = {}; exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); }; /***/ }), /* 64 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _iterator = __webpack_require__(115); var _iterator2 = _interopRequireDefault(_iterator); var _symbol = __webpack_require__(117); var _symbol2 = _interopRequireDefault(_symbol); var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { return typeof obj === "undefined" ? "undefined" : _typeof(obj); } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); }; /***/ }), /* 65 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) var $keys = __webpack_require__(55) , hiddenKeys = __webpack_require__(40).concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){ return $keys(O, hiddenKeys); }; /***/ }), /* 66 */ /***/ (function(module, exports, __webpack_require__) { var pIE = __webpack_require__(27) , createDesc = __webpack_require__(19) , toIObject = __webpack_require__(12) , toPrimitive = __webpack_require__(30) , has = __webpack_require__(11) , IE8_DOM_DEFINE = __webpack_require__(50) , gOPD = Object.getOwnPropertyDescriptor; exports.f = __webpack_require__(9) ? gOPD : function getOwnPropertyDescriptor(O, P){ O = toIObject(O); P = toPrimitive(P, true); if(IE8_DOM_DEFINE)try { return gOPD(O, P); } catch(e){ /* empty */ } if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]); }; /***/ }), /* 67 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.hasClassInParent = exports.formatErrorMsg = exports.getMetaContent = exports.axiosGithub = exports.axiosJSON = exports.queryStringify = exports.queryParse = undefined; var _keys = __webpack_require__(152); var _keys2 = _interopRequireDefault(_keys); var _slicedToArray2 = __webpack_require__(155); var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); var _axios = __webpack_require__(162); var _axios2 = _interopRequireDefault(_axios); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var queryParse = exports.queryParse = function queryParse() { var search = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.location.search; if (!search) return {}; var queryString = search[0] === '?' ? search.substring(1) : search; var query = {}; queryString.split('&').forEach(function (queryStr) { var _queryStr$split = queryStr.split('='), _queryStr$split2 = (0, _slicedToArray3.default)(_queryStr$split, 2), key = _queryStr$split2[0], value = _queryStr$split2[1]; /* istanbul ignore else */ if (key) query[decodeURIComponent(key)] = decodeURIComponent(value); }); return query; }; var queryStringify = exports.queryStringify = function queryStringify(query) { var queryString = (0, _keys2.default)(query).map(function (key) { return key + '=' + encodeURIComponent(query[key] || ''); }).join('&'); return queryString; }; var axiosJSON = exports.axiosJSON = _axios2.default.create({ headers: { 'Accept': 'application/json' } }); var axiosGithub = exports.axiosGithub = _axios2.default.create({ baseURL: 'https://api.github.com', headers: { 'Accept': 'application/json' } }); var getMetaContent = exports.getMetaContent = function getMetaContent(name, content) { /* istanbul ignore next */ content || (content = 'content'); /* istanbul ignore next */ var el = document.querySelector('meta[name=\'' + name + '\']'); /* istanbul ignore next */ return el && el.getAttribute(content); }; var formatErrorMsg = exports.formatErrorMsg = function formatErrorMsg(err) { var msg = 'Error: '; if (err.response && err.response.data && err.response.data.message) { msg += err.response.data.message + '. '; err.response.data.errors && (msg += err.response.data.errors.map(function (e) { return e.message; }).join(', ')); } else { msg += err.message; } return msg; }; var hasClassInParent = exports.hasClassInParent = function hasClassInParent(element) { for (var _len = arguments.length, className = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { className[_key - 1] = arguments[_key]; } /* istanbul ignore next */ var yes = false; /* istanbul ignore next */ if (typeof element.className === 'undefined') return false; /* istanbul ignore next */ var classes = element.className.split(' '); /* istanbul ignore next */ className.forEach(function (c, i) { /* istanbul ignore next */ yes = yes || classes.indexOf(c) >= 0; }); /* istanbul ignore next */ if (yes) return yes; /* istanbul ignore next */ return element.parentNode && hasClassInParent(element.parentNode, className); }; /***/ }), /* 68 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function bind(fn, thisArg) { return function wrap() { var args = new Array(arguments.length); for (var i = 0; i < args.length; i++) { args[i] = arguments[i]; } return fn.apply(thisArg, args); }; }; /***/ }), /* 69 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { var utils = __webpack_require__(3); var settle = __webpack_require__(167); var buildURL = __webpack_require__(169); var parseHeaders = __webpack_require__(170); var isURLSameOrigin = __webpack_require__(171); var createError = __webpack_require__(70); var btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || __webpack_require__(172); module.exports = function xhrAdapter(config) { return new Promise(function dispatchXhrRequest(resolve, reject) { var requestData = config.data; var requestHeaders = config.headers; if (utils.isFormData(requestData)) { delete requestHeaders['Content-Type']; // Let the browser set it } var request = new XMLHttpRequest(); var loadEvent = 'onreadystatechange'; var xDomain = false; // For IE 8/9 CORS support // Only supports POST and GET calls and doesn't returns the response headers. // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest. if (process.env.NODE_ENV !== 'test' && typeof window !== 'undefined' && window.XDomainRequest && !('withCredentials' in request) && !isURLSameOrigin(config.url)) { request = new window.XDomainRequest(); loadEvent = 'onload'; xDomain = true; request.onprogress = function handleProgress() {}; request.ontimeout = function handleTimeout() {}; } // HTTP basic authentication if (config.auth) { var username = config.auth.username || ''; var password = config.auth.password || ''; requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); } request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true); // Set the request timeout in MS request.timeout = config.timeout; // Listen for ready state request[loadEvent] = function handleLoad() { if (!request || (request.readyState !== 4 && !xDomain)) { return; } // The request errored out and we didn't get a response, this will be // handled by onerror instead // With one exception: request that using file: protocol, most browsers // will return status as 0 even though it's a successful request if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { return; } // Prepare the response var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; var response = { data: responseData, // IE sends 1223 instead of 204 (https://github.com/mzabriskie/axios/issues/201) status: request.status === 1223 ? 204 : request.status, statusText: request.status === 1223 ? 'No Content' : request.statusText, headers: responseHeaders, config: config, request: request }; settle(resolve, reject, response); // Clean up request request = null; }; // Handle low level network errors request.onerror = function handleError() { // Real errors are hidden from us by the browser // onerror should only fire if it's a network error reject(createError('Network Error', config, null, request)); // Clean up request request = null; }; // Handle timeout request.ontimeout = function handleTimeout() { reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', request)); // Clean up request request = null; }; // Add xsrf header // This is only done if running in a standard browser environment. // Specifically not if we're in a web worker, or react-native. if (utils.isStandardBrowserEnv()) { var cookies = __webpack_require__(173); // Add xsrf header var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : undefined; if (xsrfValue) { requestHeaders[config.xsrfHeaderName] = xsrfValue; } } // Add headers to the request if ('setRequestHeader' in request) { utils.forEach(requestHeaders, function setRequestHeader(val, key) { if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { // Remove Content-Type if data is undefined delete requestHeaders[key]; } else { // Otherwise add header to the request request.setRequestHeader(key, val); } }); } // Add withCredentials to request if needed if (config.withCredentials) { request.withCredentials = true; } // Add responseType to request if needed if (config.responseType) { try { request.responseType = config.responseType; } catch (e) { // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. if (config.responseType !== 'json') { throw e; } } } // Handle progress if needed if (typeof config.onDownloadProgress === 'function') { request.addEventListener('progress', config.onDownloadProgress); } // Not all browsers support upload events if (typeof config.onUploadProgress === 'function' && request.upload) { request.upload.addEventListener('progress', config.onUploadProgress); } if (config.cancelToken) { // Handle cancellation config.cancelToken.promise.then(function onCanceled(cancel) { if (!request) { return; } request.abort(); reject(cancel); // Clean up request request = null; }); } if (requestData === undefined) { requestData = null; } // Send the request request.send(requestData); }); }; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }), /* 70 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var enhanceError = __webpack_require__(168); /** * Create an Error with the specified message, config, error code, request and response. * * @param {string} message The error message. * @param {Object} config The config. * @param {string} [code] The error code (for example, 'ECONNABORTED'). * @param {Object} [request] The request. * @param {Object} [response] The response. * @returns {Error} The created error. */ module.exports = function createError(message, config, code, request, response) { var error = new Error(message); return enhanceError(error, config, code, request, response); }; /***/ }), /* 71 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function isCancel(value) { return !!(value && value.__CANCEL__); }; /***/ }), /* 72 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * A `Cancel` is an object that is thrown when an operation is canceled. * * @class * @param {string=} message The message. */ function Cancel(message) { this.message = message; } Cancel.prototype.toString = function toString() { return 'Cancel' + (this.message ? ': ' + this.message : ''); }; Cancel.prototype.__CANCEL__ = true; module.exports = Cancel; /***/ }), /* 73 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (_ref) { var src = _ref.src, className = _ref.className; return _react2.default.createElement( "div", { className: "gt-avatar " + className }, _react2.default.createElement("img", { src: src, alt: "\u5934\u50CF" }) ); }; /***/ }), /* 74 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (_ref) { var className = _ref.className, text = _ref.text, name = _ref.name; return _react2.default.createElement( "span", { className: "gt-ico " + className }, _react2.default.createElement("span", { className: "gt-svg", dangerouslySetInnerHTML: { __html: __webpack_require__(184)("./" + name + ".svg") } }), text && _react2.default.createElement( "span", { className: "gt-ico-text" }, text ) ); }; /***/ }), /* 75 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _classCallCheck2 = __webpack_require__(48); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(49); var _createClass3 = _interopRequireDefault(_createClass2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(4); __webpack_require__(84); var _gitalk = __webpack_require__(88); var _gitalk2 = _interopRequireDefault(_gitalk); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Gitalk = function () { function Gitalk() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; (0, _classCallCheck3.default)(this, Gitalk); this.options = options; } (0, _createClass3.default)(Gitalk, [{ key: 'render', value: function render(container) { var node = null; container = container || this.options.container; if (!container) throw new Error('Container is required: ' + container); if (!(container instanceof HTMLElement)) { node = document.getElementById(container); if (!node) throw new Error('Container not found, document.getElementById: ' + container); } else { node = container; } return (0, _reactDom.render)(_react2.default.createElement(_gitalk2.default, { options: this.options }), node); } }]); return Gitalk; }(); module.exports = Gitalk; /***/ }), /* 76 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(77), __esModule: true }; /***/ }), /* 77 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(78); var $Object = __webpack_require__(0).Object; module.exports = function defineProperty(it, key, desc){ return $Object.defineProperty(it, key, desc); }; /***/ }), /* 78 */ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(6); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) $export($export.S + $export.F * !__webpack_require__(9), 'Object', {defineProperty: __webpack_require__(7).f}); /***/ }), /* 79 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ if (process.env.NODE_ENV !== 'production') { var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) || 0xeac7; var isValidElement = function(object) { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; }; // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; module.exports = __webpack_require__(80)(isValidElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = __webpack_require__(82)(); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }), /* 80 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ var emptyFunction = __webpack_require__(31); var invariant = __webpack_require__(32); var warning = __webpack_require__(51); var ReactPropTypesSecret = __webpack_require__(33); var checkPropTypes = __webpack_require__(81); module.exports = function(isValidElement, throwOnDirectAccess) { /* global Symbol */ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. /** * Returns the iterator method function contained on the iterable object. * * Be sure to invoke the function with the iterable as context: * * var iteratorFn = getIteratorFn(myIterable); * if (iteratorFn) { * var iterator = iteratorFn.call(myIterable); * ... * } * * @param {?object} maybeIterable * @return {?function} */ function getIteratorFn(maybeIterable) { var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); if (typeof iteratorFn === 'function') { return iteratorFn; } } /** * Collection of methods that allow declaration and validation of props that are * supplied to React components. Example usage: * * var Props = require('ReactPropTypes'); * var MyArticle = React.createClass({ * propTypes: { * // An optional string prop named "description". * description: Props.string, * * // A required enum prop named "category". * category: Props.oneOf(['News','Photos']).isRequired, * * // A prop named "dialog" that requires an instance of Dialog. * dialog: Props.instanceOf(Dialog).isRequired * }, * render: function() { ... } * }); * * A more formal specification of how these methods are used: * * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) * decl := ReactPropTypes.{type}(.isRequired)? * * Each and every declaration produces a function with the same signature. This * allows the creation of custom validation functions. For example: * * var MyLink = React.createClass({ * propTypes: { * // An optional string or URI prop named "href". * href: function(props, propName, componentName) { * var propValue = props[propName]; * if (propValue != null && typeof propValue !== 'string' && * !(propValue instanceof URI)) { * return new Error( * 'Expected a string or an URI for ' + propName + ' in ' + * componentName * ); * } * } * }, * render: function() {...} * }); * * @internal */ var ANONYMOUS = '<<anonymous>>'; // Important! // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. var ReactPropTypes = { array: createPrimitiveTypeChecker('array'), bool: createPrimitiveTypeChecker('boolean'), func: createPrimitiveTypeChecker('function'), number: createPrimitiveTypeChecker('number'), object: createPrimitiveTypeChecker('object'), string: createPrimitiveTypeChecker('string'), symbol: createPrimitiveTypeChecker('symbol'), any: createAnyTypeChecker(), arrayOf: createArrayOfTypeChecker, element: createElementTypeChecker(), instanceOf: createInstanceTypeChecker, node: createNodeChecker(), objectOf: createObjectOfTypeChecker, oneOf: createEnumTypeChecker, oneOfType: createUnionTypeChecker, shape: createShapeTypeChecker }; /** * inlined Object.is polyfill to avoid requiring consumers ship their own * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is */ /*eslint-disable no-self-compare*/ function is(x, y) { // SameValue algorithm if (x === y) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 return x !== 0 || 1 / x === 1 / y; } else { // Step 6.a: NaN == NaN return x !== x && y !== y; } } /*eslint-enable no-self-compare*/ /** * We use an Error-like object for backward compatibility as people may call * PropTypes directly and inspect their output. However, we don't use real * Errors anymore. We don't inspect their stack anyway, and creating them * is prohibitively expensive if they are created too often, such as what * happens in oneOfType() for any type before the one that matched. */ function PropTypeError(message) { this.message = message; this.stack = ''; } // Make `instanceof Error` still work for returned errors. PropTypeError.prototype = Error.prototype; function createChainableTypeChecker(validate) { if (process.env.NODE_ENV !== 'production') { var manualPropTypeCallCache = {}; var manualPropTypeWarningCount = 0; } function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { componentName = componentName || ANONYMOUS; propFullName = propFullName || propName; if (secret !== ReactPropTypesSecret) { if (throwOnDirectAccess) { // New behavior only for users of `prop-types` package invariant( false, 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types' ); } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') { // Old behavior for people using React.PropTypes var cacheKey = componentName + ':' + propName; if ( !manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors manualPropTypeWarningCount < 3 ) { warning( false, 'You are manually calling a React.PropTypes validation ' + 'function for the `%s` prop on `%s`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', propFullName, componentName ); manualPropTypeCallCache[cacheKey] = true; manualPropTypeWarningCount++; } } } if (props[propName] == null) { if (isRequired) { if (props[propName] === null) { return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); } return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); } return null; } else { return validate(props, propName, componentName, location, propFullName); } } var chainedCheckType = checkType.bind(null, false); chainedCheckType.isRequired = checkType.bind(null, true); return chainedCheckType; } function createPrimitiveTypeChecker(expectedType) { function validate(props, propName, componentName, location, propFullName, secret) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== expectedType) { // `propValue` being instance of, say, date/regexp, pass the 'object' // check, but we can offer a more precise error message here rather than // 'of type `object`'. var preciseType = getPreciseType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); } return null; } return createChainableTypeChecker(validate); } function createAnyTypeChecker() { return createChainableTypeChecker(emptyFunction.thatReturnsNull); } function createArrayOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); } var propValue = props[propName]; if (!Array.isArray(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); } for (var i = 0; i < propValue.length; i++) { var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); if (error instanceof Error) { return error; } } return null; } return createChainableTypeChecker(validate); } function createElementTypeChecker() { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; if (!isValidElement(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); } return null; } return createChainableTypeChecker(validate); } function createInstanceTypeChecker(expectedClass) { function validate(props, propName, componentName, location, propFullName) { if (!(props[propName] instanceof expectedClass)) { var expectedClassName = expectedClass.name || ANONYMOUS; var actualClassName = getClassName(props[propName]); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); } return null; } return createChainableTypeChecker(validate); } function createEnumTypeChecker(expectedValues) { if (!Array.isArray(expectedValues)) { process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0; return emptyFunction.thatReturnsNull; } function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; for (var i = 0; i < expectedValues.length; i++) { if (is(propValue, expectedValues[i])) { return null; } } var valuesString = JSON.stringify(expectedValues); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); } return createChainableTypeChecker(validate); } function createObjectOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); } var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); } for (var key in propValue) { if (propValue.hasOwnProperty(key)) { var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); if (error instanceof Error) { return error; } } } return null; } return createChainableTypeChecker(validate); } function createUnionTypeChecker(arrayOfTypeCheckers) { if (!Array.isArray(arrayOfTypeCheckers)) { process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0; return emptyFunction.thatReturnsNull; } for (var i = 0; i < arrayOfTypeCheckers.length; i++) { var checker = arrayOfTypeCheckers[i]; if (typeof checker !== 'function') { warning( false, 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' + 'received %s at index %s.', getPostfixForTypeWarning(checker), i ); return emptyFunction.thatReturnsNull; } } function validate(props, propName, componentName, location, propFullName) { for (var i = 0; i < arrayOfTypeCheckers.length; i++) { var checker = arrayOfTypeCheckers[i]; if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { return null; } } return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); } return createChainableTypeChecker(validate); } function createNodeChecker() { function validate(props, propName, componentName, location, propFullName) { if (!isNode(props[propName])) { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); } return null; } return createChainableTypeChecker(validate); } function createShapeTypeChecker(shapeTypes) { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); } for (var key in shapeTypes) { var checker = shapeTypes[key]; if (!checker) { continue; } var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); if (error) { return error; } } return null; } return createChainableTypeChecker(validate); } function isNode(propValue) { switch (typeof propValue) { case 'number': case 'string': case 'undefined': return true; case 'boolean': return !propValue; case 'object': if (Array.isArray(propValue)) { return propValue.every(isNode); } if (propValue === null || isValidElement(propValue)) { return true; } var iteratorFn = getIteratorFn(propValue); if (iteratorFn) { var iterator = iteratorFn.call(propValue); var step; if (iteratorFn !== propValue.entries) { while (!(step = iterator.next()).done) { if (!isNode(step.value)) { return false; } } } else { // Iterator will provide entry [k,v] tuples rather than values. while (!(step = iterator.next()).done) { var entry = step.value; if (entry) { if (!isNode(entry[1])) { return false; } } } } } else { return false; } return true; default: return false; } } function isSymbol(propType, propValue) { // Native Symbol. if (propType === 'symbol') { return true; } // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' if (propValue['@@toStringTag'] === 'Symbol') { return true; } // Fallback for non-spec compliant Symbols which are polyfilled. if (typeof Symbol === 'function' && propValue instanceof Symbol) { return true; } return false; } // Equivalent of `typeof` but with special handling for array and regexp. function getPropType(propValue) { var propType = typeof propValue; if (Array.isArray(propValue)) { return 'array'; } if (propValue instanceof RegExp) { // Old webkits (at least until Android 4.0) return 'function' rather than // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ // passes PropTypes.object. return 'object'; } if (isSymbol(propType, propValue)) { return 'symbol'; } return propType; } // This handles more types than `getPropType`. Only used for error messages. // See `createPrimitiveTypeChecker`. function getPreciseType(propValue) { if (typeof propValue === 'undefined' || propValue === null) { return '' + propValue; } var propType = getPropType(propValue); if (propType === 'object') { if (propValue instanceof Date) { return 'date'; } else if (propValue instanceof RegExp) { return 'regexp'; } } return propType; } // Returns a string that is postfixed to a warning about an invalid type. // For example, "undefined" or "of type array" function getPostfixForTypeWarning(value) { var type = getPreciseType(value); switch (type) { case 'array': case 'object': return 'an ' + type; case 'boolean': case 'date': case 'regexp': return 'a ' + type; default: return type; } } // Returns class name of the object, if any. function getClassName(propValue) { if (!propValue.constructor || !propValue.constructor.name) { return ANONYMOUS; } return propValue.constructor.name; } ReactPropTypes.checkPropTypes = checkPropTypes; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }), /* 81 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ if (process.env.NODE_ENV !== 'production') { var invariant = __webpack_require__(32); var warning = __webpack_require__(51); var ReactPropTypesSecret = __webpack_require__(33); var loggedTypeFailures = {}; } /** * Assert that the values match with the type specs. * Error messages are memorized and will only be shown once. * * @param {object} typeSpecs Map of name to a ReactPropType * @param {object} values Runtime values that need to be type-checked * @param {string} location e.g. "prop", "context", "child context" * @param {string} componentName Name of the component for error messages. * @param {?Function} getStack Returns the component stack. * @private */ function checkPropTypes(typeSpecs, values, location, componentName, getStack) { if (process.env.NODE_ENV !== 'production') { for (var typeSpecName in typeSpecs) { if (typeSpecs.hasOwnProperty(typeSpecName)) { var error; // Prop type validation may throw. In case they do, we don't want to // fail the render phase where it didn't fail before. So we log it. // After these have been cleaned up, we'll let them throw. try { // This is intentionally an invariant that gets caught. It's the same // behavior as without this statement except with a better message. invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName); error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); } catch (ex) { error = ex; } warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error); if (error instanceof Error && !(error.message in loggedTypeFailures)) { // Only monitor this failure once because there tends to be a lot of the // same error. loggedTypeFailures[error.message] = true; var stack = getStack ? getStack() : ''; warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); } } } } } module.exports = checkPropTypes; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }), /* 82 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ var emptyFunction = __webpack_require__(31); var invariant = __webpack_require__(32); var ReactPropTypesSecret = __webpack_require__(33); module.exports = function() { function shim(props, propName, componentName, location, propFullName, secret) { if (secret === ReactPropTypesSecret) { // It is still safe when called from React. return; } invariant( false, 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types' ); }; shim.isRequired = shim; function getShim() { return shim; }; // Important! // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. var ReactPropTypes = { array: shim, bool: shim, func: shim, number: shim, object: shim, string: shim, symbol: shim, any: shim, arrayOf: getShim, element: shim, instanceOf: getShim, node: shim, objectOf: getShim, oneOf: getShim, oneOfType: getShim, shape: getShim }; ReactPropTypes.checkPropTypes = emptyFunction; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; /***/ }), /* 83 */ /***/ (function(module, exports, __webpack_require__) { !function() { 'use strict'; function VNode() {} function h(nodeName, attributes) { var lastSimple, child, simple, i, children = EMPTY_CHILDREN; for (i = arguments.length; i-- > 2; ) stack.push(arguments[i]); if (attributes && null != attributes.children) { if (!stack.length) stack.push(attributes.children); delete attributes.children; } while (stack.length) if ((child = stack.pop()) && void 0 !== child.pop) for (i = child.length; i--; ) stack.push(child[i]); else { if (child === !0 || child === !1) child = null; if (simple = 'function' != typeof nodeName) if (null == child) child = ''; else if ('number' == typeof child) child = String(child); else if ('string' != typeof child) simple = !1; if (simple && lastSimple) children[children.length - 1] += child; else if (children === EMPTY_CHILDREN) children = [ child ]; else children.push(child); lastSimple = simple; } var p = new VNode(); p.nodeName = nodeName; p.children = children; p.attributes = null == attributes ? void 0 : attributes; p.key = null == attributes ? void 0 : attributes.key; if (void 0 !== options.vnode) options.vnode(p); return p; } function extend(obj, props) { for (var i in props) obj[i] = props[i]; return obj; } function cloneElement(vnode, props) { return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children); } function enqueueRender(component) { if (!component.__d && (component.__d = !0) && 1 == items.push(component)) (options.debounceRendering || setTimeout)(rerender); } function rerender() { var p, list = items; items = []; while (p = list.pop()) if (p.__d) renderComponent(p); } function isSameNodeType(node, vnode, hydrating) { if ('string' == typeof vnode || 'number' == typeof vnode) return void 0 !== node.splitText; if ('string' == typeof vnode.nodeName) return !node._componentConstructor && isNamedNode(node, vnode.nodeName); else return hydrating || node._componentConstructor === vnode.nodeName; } function isNamedNode(node, nodeName) { return node.__n === nodeName || node.nodeName.toLowerCase() === nodeName.toLowerCase(); } function getNodeProps(vnode) { var props = extend({}, vnode.attributes); props.children = vnode.children; var defaultProps = vnode.nodeName.defaultProps; if (void 0 !== defaultProps) for (var i in defaultProps) if (void 0 === props[i]) props[i] = defaultProps[i]; return props; } function createNode(nodeName, isSvg) { var node = isSvg ? document.createElementNS('http://www.w3.org/2000/svg', nodeName) : document.createElement(nodeName); node.__n = nodeName; return node; } function removeNode(node) { if (node.parentNode) node.parentNode.removeChild(node); } function setAccessor(node, name, old, value, isSvg) { if ('className' === name) name = 'class'; if ('key' === name) ; else if ('ref' === name) { if (old) old(null); if (value) value(node); } else if ('class' === name && !isSvg) node.className = value || ''; else if ('style' === name) { if (!value || 'string' == typeof value || 'string' == typeof old) node.style.cssText = value || ''; if (value && 'object' == typeof value) { if ('string' != typeof old) for (var i in old) if (!(i in value)) node.style[i] = ''; for (var i in value) node.style[i] = 'number' == typeof value[i] && IS_NON_DIMENSIONAL.test(i) === !1 ? value[i] + 'px' : value[i]; } } else if ('dangerouslySetInnerHTML' === name) { if (value) node.innerHTML = value.__html || ''; } else if ('o' == name[0] && 'n' == name[1]) { var useCapture = name !== (name = name.replace(/Capture$/, '')); name = name.toLowerCase().substring(2); if (value) { if (!old) node.addEventListener(name, eventProxy, useCapture); } else node.removeEventListener(name, eventProxy, useCapture); (node.__l || (node.__l = {}))[name] = value; } else if ('list' !== name && 'type' !== name && !isSvg && name in node) { setProperty(node, name, null == value ? '' : value); if (null == value || value === !1) node.removeAttribute(name); } else { var ns = isSvg && name !== (name = name.replace(/^xlink\:?/, '')); if (null == value || value === !1) if (ns) node.removeAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase()); else node.removeAttribute(name); else if ('function' != typeof value) if (ns) node.setAttributeNS('http://www.w3.org/1999/xlink', name.toLowerCase(), value); else node.setAttribute(name, value); } } function setProperty(node, name, value) { try { node[name] = value; } catch (e) {} } function eventProxy(e) { return this.__l[e.type](options.event && options.event(e) || e); } function flushMounts() { var c; while (c = mounts.pop()) { if (options.afterMount) options.afterMount(c); if (c.componentDidMount) c.componentDidMount(); } } function diff(dom, vnode, context, mountAll, parent, componentRoot) { if (!diffLevel++) { isSvgMode = null != parent && void 0 !== parent.ownerSVGElement; hydrating = null != dom && !('__preactattr_' in dom); } var ret = idiff(dom, vnode, context, mountAll, componentRoot); if (parent && ret.parentNode !== parent) parent.appendChild(ret); if (!--diffLevel) { hydrating = !1; if (!componentRoot) flushMounts(); } return ret; } function idiff(dom, vnode, context, mountAll, componentRoot) { var out = dom, prevSvgMode = isSvgMode; if (null == vnode) vnode = ''; if ('string' == typeof vnode) { if (dom && void 0 !== dom.splitText && dom.parentNode && (!dom._component || componentRoot)) { if (dom.nodeValue != vnode) dom.nodeValue = vnode; } else { out = document.createTextNode(vnode); if (dom) { if (dom.parentNode) dom.parentNode.replaceChild(out, dom); recollectNodeTree(dom, !0); } } out.__preactattr_ = !0; return out; } if ('function' == typeof vnode.nodeName) return buildComponentFromVNode(dom, vnode, context, mountAll); isSvgMode = 'svg' === vnode.nodeName ? !0 : 'foreignObject' === vnode.nodeName ? !1 : isSvgMode; if (!dom || !isNamedNode(dom, String(vnode.nodeName))) { out = createNode(String(vnode.nodeName), isSvgMode); if (dom) { while (dom.firstChild) out.appendChild(dom.firstChild); if (dom.parentNode) dom.parentNode.replaceChild(out, dom); recollectNodeTree(dom, !0); } } var fc = out.firstChild, props = out.__preactattr_ || (out.__preactattr_ = {}), vchildren = vnode.children; if (!hydrating && vchildren && 1 === vchildren.length && 'string' == typeof vchildren[0] && null != fc && void 0 !== fc.splitText && null == fc.nextSibling) { if (fc.nodeValue != vchildren[0]) fc.nodeValue = vchildren[0]; } else if (vchildren && vchildren.length || null != fc) innerDiffNode(out, vchildren, context, mountAll, hydrating || null != props.dangerouslySetInnerHTML); diffAttributes(out, vnode.attributes, props); isSvgMode = prevSvgMode; return out; } function innerDiffNode(dom, vchildren, context, mountAll, isHydrating) { var j, c, vchild, child, originalChildren = dom.childNodes, children = [], keyed = {}, keyedLen = 0, min = 0, len = originalChildren.length, childrenLen = 0, vlen = vchildren ? vchildren.length : 0; if (0 !== len) for (var i = 0; i < len; i++) { var _child = originalChildren[i], props = _child.__preactattr_, key = vlen && props ? _child._component ? _child._component.__k : props.key : null; if (null != key) { keyedLen++; keyed[key] = _child; } else if (props || (void 0 !== _child.splitText ? isHydrating ? _child.nodeValue.trim() : !0 : isHydrating)) children[childrenLen++] = _child; } if (0 !== vlen) for (var i = 0; i < vlen; i++) { vchild = vchildren[i]; child = null; var key = vchild.key; if (null != key) { if (keyedLen && void 0 !== keyed[key]) { child = keyed[key]; keyed[key] = void 0; keyedLen--; } } else if (!child && min < childrenLen) for (j = min; j < childrenLen; j++) if (void 0 !== children[j] && isSameNodeType(c = children[j], vchild, isHydrating)) { child = c; children[j] = void 0; if (j === childrenLen - 1) childrenLen--; if (j === min) min++; break; } child = idiff(child, vchild, context, mountAll); if (child && child !== dom) if (i >= len) dom.appendChild(child); else if (child !== originalChildren[i]) if (child === originalChildren[i + 1]) removeNode(originalChildren[i]); else dom.insertBefore(child, originalChildren[i] || null); } if (keyedLen) for (var i in keyed) if (void 0 !== keyed[i]) recollectNodeTree(keyed[i], !1); while (min <= childrenLen) if (void 0 !== (child = children[childrenLen--])) recollectNodeTree(child, !1); } function recollectNodeTree(node, unmountOnly) { var component = node._component; if (component) unmountComponent(component); else { if (null != node.__preactattr_ && node.__preactattr_.ref) node.__preactattr_.ref(null); if (unmountOnly === !1 || null == node.__preactattr_) removeNode(node); removeChildren(node); } } function removeChildren(node) { node = node.lastChild; while (node) { var next = node.previousSibling; recollectNodeTree(node, !0); node = next; } } function diffAttributes(dom, attrs, old) { var name; for (name in old) if ((!attrs || null == attrs[name]) && null != old[name]) setAccessor(dom, name, old[name], old[name] = void 0, isSvgMode); for (name in attrs) if (!('children' === name || 'innerHTML' === name || name in old && attrs[name] === ('value' === name || 'checked' === name ? dom[name] : old[name]))) setAccessor(dom, name, old[name], old[name] = attrs[name], isSvgMode); } function collectComponent(component) { var name = component.constructor.name; (components[name] || (components[name] = [])).push(component); } function createComponent(Ctor, props, context) { var inst, list = components[Ctor.name]; if (Ctor.prototype && Ctor.prototype.render) { inst = new Ctor(props, context); Component.call(inst, props, context); } else { inst = new Component(props, context); inst.constructor = Ctor; inst.render = doRender; } if (list) for (var i = list.length; i--; ) if (list[i].constructor === Ctor) { inst.__b = list[i].__b; list.splice(i, 1); break; } return inst; } function doRender(props, state, context) { return this.constructor(props, context); } function setComponentProps(component, props, opts, context, mountAll) { if (!component.__x) { component.__x = !0; if (component.__r = props.ref) delete props.ref; if (component.__k = props.key) delete props.key; if (!component.base || mountAll) { if (component.componentWillMount) component.componentWillMount(); } else if (component.componentWillReceiveProps) component.componentWillReceiveProps(props, context); if (context && context !== component.context) { if (!component.__c) component.__c = component.context; component.context = context; } if (!component.__p) component.__p = component.props; component.props = props; component.__x = !1; if (0 !== opts) if (1 === opts || options.syncComponentUpdates !== !1 || !component.base) renderComponent(component, 1, mountAll); else enqueueRender(component); if (component.__r) component.__r(component); } } function renderComponent(component, opts, mountAll, isChild) { if (!component.__x) { var rendered, inst, cbase, props = component.props, state = component.state, context = component.context, previousProps = component.__p || props, previousState = component.__s || state, previousContext = component.__c || context, isUpdate = component.base, nextBase = component.__b, initialBase = isUpdate || nextBase, initialChildComponent = component._component, skip = !1; if (isUpdate) { component.props = previousProps; component.state = previousState; component.context = previousContext; if (2 !== opts && component.shouldComponentUpdate && component.shouldComponentUpdate(props, state, context) === !1) skip = !0; else if (component.componentWillUpdate) component.componentWillUpdate(props, state, context); component.props = props; component.state = state; component.context = context; } component.__p = component.__s = component.__c = component.__b = null; component.__d = !1; if (!skip) { rendered = component.render(props, state, context); if (component.getChildContext) context = extend(extend({}, context), component.getChildContext()); var toUnmount, base, childComponent = rendered && rendered.nodeName; if ('function' == typeof childComponent) { var childProps = getNodeProps(rendered); inst = initialChildComponent; if (inst && inst.constructor === childComponent && childProps.key == inst.__k) setComponentProps(inst, childProps, 1, context, !1); else { toUnmount = inst; component._component = inst = createComponent(childComponent, childProps, context); inst.__b = inst.__b || nextBase; inst.__u = component; setComponentProps(inst, childProps, 0, context, !1); renderComponent(inst, 1, mountAll, !0); } base = inst.base; } else { cbase = initialBase; toUnmount = initialChildComponent; if (toUnmount) cbase = component._component = null; if (initialBase || 1 === opts) { if (cbase) cbase._component = null; base = diff(cbase, rendered, context, mountAll || !isUpdate, initialBase && initialBase.parentNode, !0); } } if (initialBase && base !== initialBase && inst !== initialChildComponent) { var baseParent = initialBase.parentNode; if (baseParent && base !== baseParent) { baseParent.replaceChild(base, initialBase); if (!toUnmount) { initialBase._component = null; recollectNodeTree(initialBase, !1); } } } if (toUnmount) unmountComponent(toUnmount); component.base = base; if (base && !isChild) { var componentRef = component, t = component; while (t = t.__u) (componentRef = t).base = base; base._component = componentRef; base._componentConstructor = componentRef.constructor; } } if (!isUpdate || mountAll) mounts.unshift(component); else if (!skip) { flushMounts(); if (component.componentDidUpdate) component.componentDidUpdate(previousProps, previousState, previousContext); if (options.afterUpdate) options.afterUpdate(component); } if (null != component.__h) while (component.__h.length) component.__h.pop().call(component); if (!diffLevel && !isChild) flushMounts(); } } function buildComponentFromVNode(dom, vnode, context, mountAll) { var c = dom && dom._component, originalComponent = c, oldDom = dom, isDirectOwner = c && dom._componentConstructor === vnode.nodeName, isOwner = isDirectOwner, props = getNodeProps(vnode); while (c && !isOwner && (c = c.__u)) isOwner = c.constructor === vnode.nodeName; if (c && isOwner && (!mountAll || c._component)) { setComponentProps(c, props, 3, context, mountAll); dom = c.base; } else { if (originalComponent && !isDirectOwner) { unmountComponent(originalComponent); dom = oldDom = null; } c = createComponent(vnode.nodeName, props, context); if (dom && !c.__b) { c.__b = dom; oldDom = null; } setComponentProps(c, props, 1, context, mountAll); dom = c.base; if (oldDom && dom !== oldDom) { oldDom._component = null; recollectNodeTree(oldDom, !1); } } return dom; } function unmountComponent(component) { if (options.beforeUnmount) options.beforeUnmount(component); var base = component.base; component.__x = !0; if (component.componentWillUnmount) component.componentWillUnmount(); component.base = null; var inner = component._component; if (inner) unmountComponent(inner); else if (base) { if (base.__preactattr_ && base.__preactattr_.ref) base.__preactattr_.ref(null); component.__b = base; removeNode(base); collectComponent(component); removeChildren(base); } if (component.__r) component.__r(null); } function Component(props, context) { this.__d = !0; this.context = context; this.props = props; this.state = this.state || {}; } function render(vnode, parent, merge) { return diff(merge, vnode, {}, !1, parent, !1); } var options = {}; var stack = []; var EMPTY_CHILDREN = []; var IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i; var items = []; var mounts = []; var diffLevel = 0; var isSvgMode = !1; var hydrating = !1; var components = {}; extend(Component.prototype, { setState: function(state, callback) { var s = this.state; if (!this.__s) this.__s = extend({}, s); extend(s, 'function' == typeof state ? state(s, this.props) : state); if (callback) (this.__h = this.__h || []).push(callback); enqueueRender(this); }, forceUpdate: function(callback) { if (callback) (this.__h = this.__h || []).push(callback); renderComponent(this, 2); }, render: function() {} }); var preact = { h: h, createElement: h, cloneElement: cloneElement, Component: Component, render: render, rerender: rerender, options: options }; if (true) module.exports = preact; else self.preact = preact; }(); //# sourceMappingURL=preact.js.map /***/ }), /* 84 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // This file can be required in Browserify and Node.js for automatic polyfill // To use it: require('es6-promise/auto'); module.exports = __webpack_require__(85).polyfill(); /***/ }), /* 85 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process, global) {var require;/*! * @overview es6-promise - a tiny implementation of Promises/A+. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) * @license Licensed under MIT license * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE * @version 4.1.1 */ (function (global, factory) { true ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global.ES6Promise = factory()); }(this, (function () { 'use strict'; function objectOrFunction(x) { var type = typeof x; return x !== null && (type === 'object' || type === 'function'); } function isFunction(x) { return typeof x === 'function'; } var _isArray = undefined; if (Array.isArray) { _isArray = Array.isArray; } else { _isArray = function (x) { return Object.prototype.toString.call(x) === '[object Array]'; }; } var isArray = _isArray; var len = 0; var vertxNext = undefined; var customSchedulerFn = undefined; var asap = function asap(callback, arg) { queue[len] = callback; queue[len + 1] = arg; len += 2; if (len === 2) { // If len is 2, that means that we need to schedule an async flush. // If additional callbacks are queued before the queue is flushed, they // will be processed by this flush that we are scheduling. if (customSchedulerFn) { customSchedulerFn(flush); } else { scheduleFlush(); } } }; function setScheduler(scheduleFn) { customSchedulerFn = scheduleFn; } function setAsap(asapFn) { asap = asapFn; } var browserWindow = typeof window !== 'undefined' ? window : undefined; var browserGlobal = browserWindow || {}; var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver; var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]'; // test for web worker but not in IE10 var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined'; // node function useNextTick() { // node version 0.10.x displays a deprecation warning when nextTick is used recursively // see https://github.com/cujojs/when/issues/410 for details return function () { return process.nextTick(flush); }; } // vertx function useVertxTimer() { if (typeof vertxNext !== 'undefined') { return function () { vertxNext(flush); }; } return useSetTimeout(); } function useMutationObserver() { var iterations = 0; var observer = new BrowserMutationObserver(flush); var node = document.createTextNode(''); observer.observe(node, { characterData: true }); return function () { node.data = iterations = ++iterations % 2; }; } // web worker function useMessageChannel() { var channel = new MessageChannel(); channel.port1.onmessage = flush; return function () { return channel.port2.postMessage(0); }; } function useSetTimeout() { // Store setTimeout reference so es6-promise will be unaffected by // other code modifying setTimeout (like sinon.useFakeTimers()) var globalSetTimeout = setTimeout; return function () { return globalSetTimeout(flush, 1); }; } var queue = new Array(1000); function flush() { for (var i = 0; i < len; i += 2) { var callback = queue[i]; var arg = queue[i + 1]; callback(arg); queue[i] = undefined; queue[i + 1] = undefined; } len = 0; } function attemptVertx() { try { var r = require; var vertx = __webpack_require__(87); vertxNext = vertx.runOnLoop || vertx.runOnContext; return useVertxTimer(); } catch (e) { return useSetTimeout(); } } var scheduleFlush = undefined; // Decide what async method to use to triggering processing of queued callbacks: if (isNode) { scheduleFlush = useNextTick(); } else if (BrowserMutationObserver) { scheduleFlush = useMutationObserver(); } else if (isWorker) { scheduleFlush = useMessageChannel(); } else if (browserWindow === undefined && "function" === 'function') { scheduleFlush = attemptVertx(); } else { scheduleFlush = useSetTimeout(); } function then(onFulfillment, onRejection) { var _arguments = arguments; var parent = this; var child = new this.constructor(noop); if (child[PROMISE_ID] === undefined) { makePromise(child); } var _state = parent._state; if (_state) { (function () { var callback = _arguments[_state - 1]; asap(function () { return invokeCallback(_state, child, callback, parent._result); }); })(); } else { subscribe(parent, child, onFulfillment, onRejection); } return child; } /** `Promise.resolve` returns a promise that will become resolved with the passed `value`. It is shorthand for the following: ```javascript let promise = new Promise(function(resolve, reject){ resolve(1); }); promise.then(function(value){ // value === 1 }); ``` Instead of writing the above, your code now simply becomes the following: ```javascript let promise = Promise.resolve(1); promise.then(function(value){ // value === 1 }); ``` @method resolve @static @param {Any} value value that the returned promise will be resolved with Useful for tooling. @return {Promise} a promise that will become fulfilled with the given `value` */ function resolve$1(object) { /*jshint validthis:true */ var Constructor = this; if (object && typeof object === 'object' && object.constructor === Constructor) { return object; } var promise = new Constructor(noop); resolve(promise, object); return promise; } var PROMISE_ID = Math.random().toString(36).substring(16); function noop() {} var PENDING = void 0; var FULFILLED = 1; var REJECTED = 2; var GET_THEN_ERROR = new ErrorObject(); function selfFulfillment() { return new TypeError("You cannot resolve a promise with itself"); } function cannotReturnOwn() { return new TypeError('A promises callback cannot return that same promise.'); } function getThen(promise) { try { return promise.then; } catch (error) { GET_THEN_ERROR.error = error; return GET_THEN_ERROR; } } function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) { try { then$$1.call(value, fulfillmentHandler, rejectionHandler); } catch (e) { return e; } } function handleForeignThenable(promise, thenable, then$$1) { asap(function (promise) { var sealed = false; var error = tryThen(then$$1, thenable, function (value) { if (sealed) { return; } sealed = true; if (thenable !== value) { resolve(promise, value); } else { fulfill(promise, value); } }, function (reason) { if (sealed) { return; } sealed = true; reject(promise, reason); }, 'Settle: ' + (promise._label || ' unknown promise')); if (!sealed && error) { sealed = true; reject(promise, error); } }, promise); } function handleOwnThenable(promise, thenable) { if (thenable._state === FULFILLED) { fulfill(promise, thenable._result); } else if (thenable._state === REJECTED) { reject(promise, thenable._result); } else { subscribe(thenable, undefined, function (value) { return resolve(promise, value); }, function (reason) { return reject(promise, reason); }); } } function handleMaybeThenable(promise, maybeThenable, then$$1) { if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) { handleOwnThenable(promise, maybeThenable); } else { if (then$$1 === GET_THEN_ERROR) { reject(promise, GET_THEN_ERROR.error); GET_THEN_ERROR.error = null; } else if (then$$1 === undefined) { fulfill(promise, maybeThenable); } else if (isFunction(then$$1)) { handleForeignThenable(promise, maybeThenable, then$$1); } else { fulfill(promise, maybeThenable); } } } function resolve(promise, value) { if (promise === value) { reject(promise, selfFulfillment()); } else if (objectOrFunction(value)) { handleMaybeThenable(promise, value, getThen(value)); } else { fulfill(promise, value); } } function publishRejection(promise) { if (promise._onerror) { promise._onerror(promise._result); } publish(promise); } function fulfill(promise, value) { if (promise._state !== PENDING) { return; } promise._result = value; promise._state = FULFILLED; if (promise._subscribers.length !== 0) { asap(publish, promise); } } function reject(promise, reason) { if (promise._state !== PENDING) { return; } promise._state = REJECTED; promise._result = reason; asap(publishRejection, promise); } function subscribe(parent, child, onFulfillment, onRejection) { var _subscribers = parent._subscribers; var length = _subscribers.length; parent._onerror = null; _subscribers[length] = child; _subscribers[length + FULFILLED] = onFulfillment; _subscribers[length + REJECTED] = onRejection; if (length === 0 && parent._state) { asap(publish, parent); } } function publish(promise) { var subscribers = promise._subscribers; var settled = promise._state; if (subscribers.length === 0) { return; } var child = undefined, callback = undefined, detail = promise._result; for (var i = 0; i < subscribers.length; i += 3) { child = subscribers[i]; callback = subscribers[i + settled]; if (child) { invokeCallback(settled, child, callback, detail); } else { callback(detail); } } promise._subscribers.length = 0; } function ErrorObject() { this.error = null; } var TRY_CATCH_ERROR = new ErrorObject(); function tryCatch(callback, detail) { try { return callback(detail); } catch (e) { TRY_CATCH_ERROR.error = e; return TRY_CATCH_ERROR; } } function invokeCallback(settled, promise, callback, detail) { var hasCallback = isFunction(callback), value = undefined, error = undefined, succeeded = undefined, failed = undefined; if (hasCallback) { value = tryCatch(callback, detail); if (value === TRY_CATCH_ERROR) { failed = true; error = value.error; value.error = null; } else { succeeded = true; } if (promise === value) { reject(promise, cannotReturnOwn()); return; } } else { value = detail; succeeded = true; } if (promise._state !== PENDING) { // noop } else if (hasCallback && succeeded) { resolve(promise, value); } else if (failed) { reject(promise, error); } else if (settled === FULFILLED) { fulfill(promise, value); } else if (settled === REJECTED) { reject(promise, value); } } function initializePromise(promise, resolver) { try { resolver(function resolvePromise(value) { resolve(promise, value); }, function rejectPromise(reason) { reject(promise, reason); }); } catch (e) { reject(promise, e); } } var id = 0; function nextId() { return id++; } function makePromise(promise) { promise[PROMISE_ID] = id++; promise._state = undefined; promise._result = undefined; promise._subscribers = []; } function Enumerator$1(Constructor, input) { this._instanceConstructor = Constructor; this.promise = new Constructor(noop); if (!this.promise[PROMISE_ID]) { makePromise(this.promise); } if (isArray(input)) { this.length = input.length; this._remaining = input.length; this._result = new Array(this.length); if (this.length === 0) { fulfill(this.promise, this._result); } else { this.length = this.length || 0; this._enumerate(input); if (this._remaining === 0) { fulfill(this.promise, this._result); } } } else { reject(this.promise, validationError()); } } function validationError() { return new Error('Array Methods must be provided an Array'); } Enumerator$1.prototype._enumerate = function (input) { for (var i = 0; this._state === PENDING && i < input.length; i++) { this._eachEntry(input[i], i); } }; Enumerator$1.prototype._eachEntry = function (entry, i) { var c = this._instanceConstructor; var resolve$$1 = c.resolve; if (resolve$$1 === resolve$1) { var _then = getThen(entry); if (_then === then && entry._state !== PENDING) { this._settledAt(entry._state, i, entry._result); } else if (typeof _then !== 'function') { this._remaining--; this._result[i] = entry; } else if (c === Promise$2) { var promise = new c(noop); handleMaybeThenable(promise, entry, _then); this._willSettleAt(promise, i); } else { this._willSettleAt(new c(function (resolve$$1) { return resolve$$1(entry); }), i); } } else { this._willSettleAt(resolve$$1(entry), i); } }; Enumerator$1.prototype._settledAt = function (state, i, value) { var promise = this.promise; if (promise._state === PENDING) { this._remaining--; if (state === REJECTED) { reject(promise, value); } else { this._result[i] = value; } } if (this._remaining === 0) { fulfill(promise, this._result); } }; Enumerator$1.prototype._willSettleAt = function (promise, i) { var enumerator = this; subscribe(promise, undefined, function (value) { return enumerator._settledAt(FULFILLED, i, value); }, function (reason) { return enumerator._settledAt(REJECTED, i, reason); }); }; /** `Promise.all` accepts an array of promises, and returns a new promise which is fulfilled with an array of fulfillment values for the passed promises, or rejected with the reason of the first passed promise to be rejected. It casts all elements of the passed iterable to promises as it runs this algorithm. Example: ```javascript let promise1 = resolve(1); let promise2 = resolve(2); let promise3 = resolve(3); let promises = [ promise1, promise2, promise3 ]; Promise.all(promises).then(function(array){ // The array here would be [ 1, 2, 3 ]; }); ``` If any of the `promises` given to `all` are rejected, the first promise that is rejected will be given as an argument to the returned promises's rejection handler. For example: Example: ```javascript let promise1 = resolve(1); let promise2 = reject(new Error("2")); let promise3 = reject(new Error("3")); let promises = [ promise1, promise2, promise3 ]; Promise.all(promises).then(function(array){ // Code here never runs because there are rejected promises! }, function(error) { // error.message === "2" }); ``` @method all @static @param {Array} entries array of promises @param {String} label optional string for labeling the promise. Useful for tooling. @return {Promise} promise that is fulfilled when all `promises` have been fulfilled, or rejected if any of them become rejected. @static */ function all$1(entries) { return new Enumerator$1(this, entries).promise; } /** `Promise.race` returns a new promise which is settled in the same way as the first passed promise to settle. Example: ```javascript let promise1 = new Promise(function(resolve, reject){ setTimeout(function(){ resolve('promise 1'); }, 200); }); let promise2 = new Promise(function(resolve, reject){ setTimeout(function(){ resolve('promise 2'); }, 100); }); Promise.race([promise1, promise2]).then(function(result){ // result === 'promise 2' because it was resolved before promise1 // was resolved. }); ``` `Promise.race` is deterministic in that only the state of the first settled promise matters. For example, even if other promises given to the `promises` array argument are resolved, but the first settled promise has become rejected before the other promises became fulfilled, the returned promise will become rejected: ```javascript let promise1 = new Promise(function(resolve, reject){ setTimeout(function(){ resolve('promise 1'); }, 200); }); let promise2 = new Promise(function(resolve, reject){ setTimeout(function(){ reject(new Error('promise 2')); }, 100); }); Promise.race([promise1, promise2]).then(function(result){ // Code here never runs }, function(reason){ // reason.message === 'promise 2' because promise 2 became rejected before // promise 1 became fulfilled }); ``` An example real-world use case is implementing timeouts: ```javascript Promise.race([ajax('foo.json'), timeout(5000)]) ``` @method race @static @param {Array} promises array of promises to observe Useful for tooling. @return {Promise} a promise which settles in the same way as the first passed promise to settle. */ function race$1(entries) { /*jshint validthis:true */ var Constructor = this; if (!isArray(entries)) { return new Constructor(function (_, reject) { return reject(new TypeError('You must pass an array to race.')); }); } else { return new Constructor(function (resolve, reject) { var length = entries.length; for (var i = 0; i < length; i++) { Constructor.resolve(entries[i]).then(resolve, reject); } }); } } /** `Promise.reject` returns a promise rejected with the passed `reason`. It is shorthand for the following: ```javascript let promise = new Promise(function(resolve, reject){ reject(new Error('WHOOPS')); }); promise.then(function(value){ // Code here doesn't run because the promise is rejected! }, function(reason){ // reason.message === 'WHOOPS' }); ``` Instead of writing the above, your code now simply becomes the following: ```javascript let promise = Promise.reject(new Error('WHOOPS')); promise.then(function(value){ // Code here doesn't run because the promise is rejected! }, function(reason){ // reason.message === 'WHOOPS' }); ``` @method reject @static @param {Any} reason value that the returned promise will be rejected with. Useful for tooling. @return {Promise} a promise rejected with the given `reason`. */ function reject$1(reason) { /*jshint validthis:true */ var Constructor = this; var promise = new Constructor(noop); reject(promise, reason); return promise; } function needsResolver() { throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); } function needsNew() { throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); } /** Promise objects represent the eventual result of an asynchronous operation. The primary way of interacting with a promise is through its `then` method, which registers callbacks to receive either a promise's eventual value or the reason why the promise cannot be fulfilled. Terminology ----------- - `promise` is an object or function with a `then` method whose behavior conforms to this specification. - `thenable` is an object or function that defines a `then` method. - `value` is any legal JavaScript value (including undefined, a thenable, or a promise). - `exception` is a value that is thrown using the throw statement. - `reason` is a value that indicates why a promise was rejected. - `settled` the final resting state of a promise, fulfilled or rejected. A promise can be in one of three states: pending, fulfilled, or rejected. Promises that are fulfilled have a fulfillment value and are in the fulfilled state. Promises that are rejected have a rejection reason and are in the rejected state. A fulfillment value is never a thenable. Promises can also be said to *resolve* a value. If this value is also a promise, then the original promise's settled state will match the value's settled state. So a promise that *resolves* a promise that rejects will itself reject, and a promise that *resolves* a promise that fulfills will itself fulfill. Basic Usage: ------------ ```js let promise = new Promise(function(resolve, reject) { // on success resolve(value); // on failure reject(reason); }); promise.then(function(value) { // on fulfillment }, function(reason) { // on rejection }); ``` Advanced Usage: --------------- Promises shine when abstracting away asynchronous interactions such as `XMLHttpRequest`s. ```js function getJSON(url) { return new Promise(function(resolve, reject){ let xhr = new XMLHttpRequest(); xhr.open('GET', url); xhr.onreadystatechange = handler; xhr.responseType = 'json'; xhr.setRequestHeader('Accept', 'application/json'); xhr.send(); function handler() { if (this.readyState === this.DONE) { if (this.status === 200) { resolve(this.response); } else { reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']')); } } }; }); } getJSON('/posts.json').then(function(json) { // on fulfillment }, function(reason) { // on rejection }); ``` Unlike callbacks, promises are great composable primitives. ```js Promise.all([ getJSON('/posts'), getJSON('/comments') ]).then(function(values){ values[0] // => postsJSON values[1] // => commentsJSON return values; }); ``` @class Promise @param {function} resolver Useful for tooling. @constructor */ function Promise$2(resolver) { this[PROMISE_ID] = nextId(); this._result = this._state = undefined; this._subscribers = []; if (noop !== resolver) { typeof resolver !== 'function' && needsResolver(); this instanceof Promise$2 ? initializePromise(this, resolver) : needsNew(); } } Promise$2.all = all$1; Promise$2.race = race$1; Promise$2.resolve = resolve$1; Promise$2.reject = reject$1; Promise$2._setScheduler = setScheduler; Promise$2._setAsap = setAsap; Promise$2._asap = asap; Promise$2.prototype = { constructor: Promise$2, /** The primary way of interacting with a promise is through its `then` method, which registers callbacks to receive either a promise's eventual value or the reason why the promise cannot be fulfilled. ```js findUser().then(function(user){ // user is available }, function(reason){ // user is unavailable, and you are given the reason why }); ``` Chaining -------- The return value of `then` is itself a promise. This second, 'downstream' promise is resolved with the return value of the first promise's fulfillment or rejection handler, or rejected if the handler throws an exception. ```js findUser().then(function (user) { return user.name; }, function (reason) { return 'default name'; }).then(function (userName) { // If `findUser` fulfilled, `userName` will be the user's name, otherwise it // will be `'default name'` }); findUser().then(function (user) { throw new Error('Found user, but still unhappy'); }, function (reason) { throw new Error('`findUser` rejected and we're unhappy'); }).then(function (value) { // never reached }, function (reason) { // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'. // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'. }); ``` If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream. ```js findUser().then(function (user) { throw new PedagogicalException('Upstream error'); }).then(function (value) { // never reached }).then(function (value) { // never reached }, function (reason) { // The `PedgagocialException` is propagated all the way down to here }); ``` Assimilation ------------ Sometimes the value you want to propagate to a downstream promise can only be retrieved asynchronously. This can be achieved by returning a promise in the fulfillment or rejection handler. The downstream promise will then be pending until the returned promise is settled. This is called *assimilation*. ```js findUser().then(function (user) { return findCommentsByAuthor(user); }).then(function (comments) { // The user's comments are now available }); ``` If the assimliated promise rejects, then the downstream promise will also reject. ```js findUser().then(function (user) { return findCommentsByAuthor(user); }).then(function (comments) { // If `findCommentsByAuthor` fulfills, we'll have the value here }, function (reason) { // If `findCommentsByAuthor` rejects, we'll have the reason here }); ``` Simple Example -------------- Synchronous Example ```javascript let result; try { result = findResult(); // success } catch(reason) { // failure } ``` Errback Example ```js findResult(function(result, err){ if (err) { // failure } else { // success } }); ``` Promise Example; ```javascript findResult().then(function(result){ // success }, function(reason){ // failure }); ``` Advanced Example -------------- Synchronous Example ```javascript let author, books; try { author = findAuthor(); books = findBooksByAuthor(author); // success } catch(reason) { // failure } ``` Errback Example ```js function foundBooks(books) { } function failure(reason) { } findAuthor(function(author, err){ if (err) { failure(err); // failure } else { try { findBoooksByAuthor(author, function(books, err) { if (err) { failure(err); } else { try { foundBooks(books); } catch(reason) { failure(reason); } } }); } catch(error) { failure(err); } // success } }); ``` Promise Example; ```javascript findAuthor(). then(findBooksByAuthor). then(function(books){ // found books }).catch(function(reason){ // something went wrong }); ``` @method then @param {Function} onFulfilled @param {Function} onRejected Useful for tooling. @return {Promise} */ then: then, /** `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same as the catch block of a try/catch statement. ```js function findAuthor(){ throw new Error('couldn't find that author'); } // synchronous try { findAuthor(); } catch(reason) { // something went wrong } // async with promises findAuthor().catch(function(reason){ // something went wrong }); ``` @method catch @param {Function} onRejection Useful for tooling. @return {Promise} */ 'catch': function _catch(onRejection) { return this.then(null, onRejection); } }; /*global self*/ function polyfill$1() { var local = undefined; if (typeof global !== 'undefined') { local = global; } else if (typeof self !== 'undefined') { local = self; } else { try { local = Function('return this')(); } catch (e) { throw new Error('polyfill failed because global object is unavailable in this environment'); } } var P = local.Promise; if (P) { var promiseToString = null; try { promiseToString = Object.prototype.toString.call(P.resolve()); } catch (e) { // silently ignored } if (promiseToString === '[object Promise]' && !P.cast) { return; } } local.Promise = Promise$2; } // Strange compat.. Promise$2.polyfill = polyfill$1; Promise$2.Promise = Promise$2; return Promise$2; }))); //# sourceMappingURL=es6-promise.map /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(86))) /***/ }), /* 86 */ /***/ (function(module, exports) { var g; // This works in non-strict mode g = (function() { return this; })(); try { // This works if eval is allowed (see CSP) g = g || Function("return this")() || (1,eval)("this"); } catch(e) { // This works if the window reference is available if(typeof window === "object") g = window; } // g can still be undefined, but nothing to do about it... // We return undefined, instead of nothing here, so it's // easier to handle this case. if(!global) { ...} module.exports = g; /***/ }), /* 87 */ /***/ (function(module, exports) { /* (ignored) */ /***/ }), /* 88 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _promise = __webpack_require__(89); var _promise2 = _interopRequireDefault(_promise); var _assign = __webpack_require__(107); var _assign2 = _interopRequireDefault(_assign); var _getPrototypeOf = __webpack_require__(111); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); var _classCallCheck2 = __webpack_require__(48); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(49); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(114); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(127); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _reactFlipMove = __webpack_require__(135); var _reactFlipMove2 = _interopRequireDefault(_reactFlipMove); var _autosize = __webpack_require__(142); var _autosize2 = _interopRequireDefault(_autosize); var _i18n = __webpack_require__(143); var _i18n2 = _interopRequireDefault(_i18n); __webpack_require__(151); var _util = __webpack_require__(67); var _avatar = __webpack_require__(73); var _avatar2 = _interopRequireDefault(_avatar); var _button = __webpack_require__(181); var _button2 = _interopRequireDefault(_button); var _action = __webpack_require__(182); var _action2 = _interopRequireDefault(_action); var _comment = __webpack_require__(183); var _comment2 = _interopRequireDefault(_comment); var _svg = __webpack_require__(74); var _svg2 = _interopRequireDefault(_svg); var _const = __webpack_require__(211); var _getComments = __webpack_require__(212); var _getComments2 = _interopRequireDefault(_getComments); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var GitalkComponent = function (_Component) { (0, _inherits3.default)(GitalkComponent, _Component); function GitalkComponent(props) { (0, _classCallCheck3.default)(this, GitalkComponent); var _this = (0, _possibleConstructorReturn3.default)(this, (GitalkComponent.__proto__ || (0, _getPrototypeOf2.default)(GitalkComponent)).call(this, props)); _this.state = { user: null, issue: null, comments: [], localComments: [], comment: '', page: 1, pagerDirection: 'last', cursor: null, isNoInit: false, isIniting: true, isCreating: false, isLoading: false, isLoadMore: false, isLoadOver: false, isIssueCreating: false, isPopupVisible: false, isInputFocused: false, isOccurError: false, errorMsg: '' }; _this.getCommentsV3 = function (issue) { var _this$options = _this.options, clientID = _this$options.clientID, clientSecret = _this$options.clientSecret, perPage = _this$options.perPage; var page = _this.state.page; return _this.getIssue().then(function (issue) { if (!issue) return; return _util.axiosGithub.get(issue.comments_url, { headers: { Accept: 'application/vnd.github.v3.full+json' }, params: { client_id: clientID, client_secret: clientSecret, per_page: perPage, page: page } }).then(function (res) { var _this$state = _this.state, comments = _this$state.comments, issue = _this$state.issue; var isLoadOver = false; var cs = comments.concat(res.data); if (cs.length >= issue.comments || res.data.length < perPage) { isLoadOver = true; } _this.setState({ comments: cs, isLoadOver: isLoadOver, page: page + 1 }); return cs; }); }); }; _this.getRef = function (e) { _this.publicBtnEL = e; }; _this.handlePopup = function (e) { e.preventDefault(); e.stopPropagation(); var isVisible = !_this.state.isPopupVisible; var hideHandle = function hideHandle(e1) { if ((0, _util.hasClassInParent)(e1.target, 'gt-user', 'gt-popup')) { return; } document.removeEventListener('click', hideHandle); _this.setState({ isPopupVisible: false }); }; _this.setState({ isPopupVisible: isVisible }); if (isVisible) { document.addEventListener('click', hideHandle); } else { document.removeEventListener('click', hideHandle); } }; _this.handleLogin = function () { var comment = _this.state.comment; localStorage.setItem(_const.GT_COMMENT, encodeURIComponent(comment)); location.href = _this.loginLink; }; _this.handleIssueCreate = function () { _this.setState({ isIssueCreating: true }); _this.createIssue().then(function (issue) { _this.setState({ isIssueCreating: false, isOccurError: false }); return _this.getComments(issue); }).catch(function (err) { _this.setState({ isIssueCreating: false, isOccurError: true, errorMsg: (0, _util.formatErrorMsg)(err) }); }); }; _this.handleCommentCreate = function (e) { if (!_this.state.comment.length) { e && e.preventDefault(); _this.commentEL.focus(); return; } _this.setState({ isCreating: true }); _this.createComment().then(function () { return _this.setState({ isCreating: false, isOccurError: false }); }).catch(function (err) { _this.setState({ isCreating: false, isOccurError: true, errorMsg: (0, _util.formatErrorMsg)(err) }); }); }; _this.handleCommentLoad = function () { var _this$state2 = _this.state, issue = _this$state2.issue, isLoadMore = _this$state2.isLoadMore; if (isLoadMore) return; _this.setState({ isLoadMore: true }); _this.getComments(issue).then(function () { return _this.setState({ isLoadMore: false }); }); }; _this.handleCommentChange = function (e) { return _this.setState({ comment: e.target.value }); }; _this.handleLogout = function () { _this.logout(); location.reload(); }; _this.handleCommentFocus = function (e) { var distractionFreeMode = _this.options.distractionFreeMode; if (!distractionFreeMode) return e.preventDefault(); _this.setState({ isInputFocused: true }); }; _this.handleCommentBlur = function (e) { var distractionFreeMode = _this.options.distractionFreeMode; if (!distractionFreeMode) return e.preventDefault(); _this.setState({ isInputFocused: false }); }; _this.handleSort = function (direction) { return function (e) { _this.setState({ pagerDirection: direction }); }; }; _this.handleCommentKeyDown = function (e) { var enableHotKey = _this.options.enableHotKey; if (enableHotKey && (e.metaKey || e.ctrlKey) && e.keyCode === 13) { _this.publicBtnEL && _this.publicBtnEL.focus(); _this.handleCommentCreate(); } }; _this.options = (0, _assign2.default)({}, { id: location.href, labels: ['Gitalk'], title: document.title, body: '', // location.href + header.meta[description] language: navigator.language || navigator.userLanguage, perPage: 10, pagerDirection: 'last', // last or first createIssueManually: false, distractionFreeMode: false, proxy: 'https://cors-anywhere.herokuapp.com/https://github.com/login/oauth/access_token', flipMoveOptions: { staggerDelayBy: 150, appearAnimation: 'accordionVertical', enterAnimation: 'accordionVertical', leaveAnimation: 'accordionVertical' }, enableHotKey: true, url: location.href }, props.options); _this.state.pagerDirection = _this.options.pagerDirection; var storedComment = localStorage.getItem(_const.GT_COMMENT); if (storedComment) { _this.state.comment = decodeURIComponent(storedComment); localStorage.removeItem(_const.GT_COMMENT); } var query = (0, _util.queryParse)(); if (query.code) { var code = query.code; delete query.code; var replacedUrl = '' + location.origin + location.pathname + (0, _util.queryStringify)(query) + location.hash; history.replaceState(null, null, replacedUrl); _this.options = (0, _assign2.default)({}, _this.options, { url: replacedUrl, id: replacedUrl }, props.options); _util.axiosJSON.post(_this.options.proxy, { code: code, client_id: _this.options.clientID, client_secret: _this.options.clientSecret }).then(function (res) { if (res.data && res.data.access_token) { _this.accessToken = res.data.access_token; _this.getInit().then(function () { return _this.setState({ isIniting: false }); }).catch(function (err) { console.log('err:', err); _this.setState({ isIniting: false, isOccurError: true, errorMsg: (0, _util.formatErrorMsg)(err) }); }); } else { // no access_token console.log('res.data err:', res.data); _this.setState({ isOccurError: true, errorMsg: (0, _util.formatErrorMsg)(new Error('no access token')) }); } }).catch(function (err) { console.log('err: ', err); _this.setState({ isOccurError: true, errorMsg: (0, _util.formatErrorMsg)(err) }); }); } else { _this.getInit().then(function () { return _this.setState({ isIniting: false }); }).catch(function (err) { console.log('err:', err); _this.setState({ isIniting: false, isOccurError: true, errorMsg: (0, _util.formatErrorMsg)(err) }); }); } _this.i18n = (0, _i18n2.default)(_this.options.language); return _this; } (0, _createClass3.default)(GitalkComponent, [{ key: 'componentDidUpdate', value: function componentDidUpdate() { this.commentEL && (0, _autosize2.default)(this.commentEL); } }, { key: 'getInit', value: function getInit() { var _this2 = this; return this.getUserInfo().then(function () { return _this2.getIssue(); }).then(function (issue) { return _this2.getComments(issue); }); } }, { key: 'getUserInfo', value: function getUserInfo() { var _this3 = this; return _util.axiosGithub.get('/user', { headers: { Authorization: 'token ' + this.accessToken } }).then(function (res) { _this3.setState({ user: res.data }); }).catch(function (err) { _this3.logout(); }); } }, { key: 'getIssue', value: function getIssue() { var _this4 = this; var issue = this.state.issue; if (issue) { this.setState({ isNoInit: false }); return _promise2.default.resolve(issue); } var _options = this.options, owner = _options.owner, repo = _options.repo, id = _options.id, labels = _options.labels, clientID = _options.clientID, clientSecret = _options.clientSecret; return _util.axiosGithub.get('/repos/' + owner + '/' + repo + '/issues', { params: { client_id: clientID, client_secret: clientSecret, labels: labels.concat(id).join(','), t: Date.now() } }).then(function (res) { var _options2 = _this4.options, admin = _options2.admin, createIssueManually = _options2.createIssueManually; var user = _this4.state.user; var isNoInit = false; var issue = null; if (!(res && res.data && res.data.length)) { if (!createIssueManually && _this4.isAdmin) { return _this4.createIssue(); } isNoInit = true; } else { issue = res.data[0]; } _this4.setState({ issue: issue, isNoInit: isNoInit }); return issue; }); } }, { key: 'createIssue', value: function createIssue() { var _this5 = this; var _options3 = this.options, owner = _options3.owner, repo = _options3.repo, title = _options3.title, body = _options3.body, id = _options3.id, labels = _options3.labels, url = _options3.url; return _util.axiosGithub.post('/repos/' + owner + '/' + repo + '/issues', { title: title, labels: labels.concat(id), body: body || url + ' \n\n ' + ((0, _util.getMetaContent)('description') || (0, _util.getMetaContent)('description', 'og:description') || '') }, { headers: { Authorization: 'token ' + this.accessToken } }).then(function (res) { _this5.setState({ issue: res.data }); return res.data; }); } // Get comments via v3 api, don't require login, but sorting feature is disable }, { key: 'getComments', value: function getComments(issue) { if (!issue) return; // Get comments via v4 graphql api, login required and sorting feature is available if (this.accessToken) return _getComments2.default.call(this, issue); return this.getCommentsV3(issue); } }, { key: 'createComment', value: function createComment() { var _this6 = this; var _state = this.state, comment = _state.comment, localComments = _state.localComments, comments = _state.comments; return this.getIssue().then(function (issue) { return _util.axiosGithub.post(issue.comments_url, { body: comment }, { headers: { Accept: 'application/vnd.github.v3.full+json', Authorization: 'token ' + _this6.accessToken } }); }).then(function (res) { _this6.setState({ comment: '', comments: comments.concat(res.data), localComments: localComments.concat(res.data) }); }); } }, { key: 'logout', value: function logout() { this.setState({ user: null }); localStorage.removeItem(_const.GT_ACCESS_TOKEN); } }, { key: 'reply', value: function reply(replyComment) { var _this7 = this; var comment = this.state.comment; var replyCommentBody = replyComment.body; var replyCommentArray = replyCommentBody.split('\n'); replyCommentArray.unshift('@' + replyComment.user.login); replyCommentArray = replyCommentArray.map(function (t) { return '> ' + t; }); replyCommentArray.push(''); replyCommentArray.push(''); if (comment) replyCommentArray.unshift(''); this.setState({ comment: comment + replyCommentArray.join('\n') }, function () { _autosize2.default.update(_this7.commentEL); _this7.commentEL.focus(); }); } }, { key: 'like', value: function like(comment) { var _this8 = this; var _options4 = this.options, owner = _options4.owner, repo = _options4.repo; var _state2 = this.state, comments = _state2.comments, user = _state2.user; _util.axiosGithub.post('/repos/' + owner + '/' + repo + '/issues/comments/' + comment.id + '/reactions', { content: 'heart' }, { headers: { Authorization: 'token ' + this.accessToken, Accept: 'application/vnd.github.squirrel-girl-preview' } }).then(function (res) { comments = comments.map(function (c) { if (c.id === comment.id) { if (c.reactions) { if (!~c.reactions.nodes.findIndex(function (n) { return n.user.login === user.login; })) { c.reactions.totalCount += 1; } } else { c.reactions = { nodes: [] }; c.reactions.totalCount = 1; } c.reactions.nodes.push(res.data); c.reactions.viewerHasReacted = true; } return c; }); _this8.setState({ comments: comments }); }); } }, { key: 'unLike', value: function unLike(comment) { var _this9 = this; var _state3 = this.state, comments = _state3.comments, user = _state3.user; // const { user } = this.state // let id // comment.reactions.nodes.forEach(r => { // if (r.user.login = user.login) id = r.databaseId // }) // return axiosGithub.delete(`/reactions/${id}`, { // headers: { // Authorization: `token ${this.accessToken}`, // Accept: 'application/vnd.github.squirrel-girl-preview' // } // }).then(res => { // console.log('res:', res) // }) var getQL = function getQL(id) { return { operationName: 'RemoveReaction', query: '\n mutation RemoveReaction{\n removeReaction (input:{\n subjectId: "' + id + '",\n content: HEART\n }) {\n reaction {\n content\n }\n }\n }\n ' }; }; _util.axiosGithub.post('/graphql', getQL(comment.gId), { headers: { Authorization: 'bearer ' + this.accessToken } }).then(function (res) { if (res.data) { comments = comments.map(function (c) { if (c.id === comment.id) { var index = c.reactions.nodes.findIndex(function (n) { return n.user.login === user.login; }); if (~index) { c.reactions.totalCount -= 1; c.reactions.nodes.splice(index, 1); } c.reactions.viewerHasReacted = false; } return c; }); _this9.setState({ comments: comments }); } }); } }, { key: 'initing', value: function initing() { return _react2.default.createElement( 'div', { className: 'gt-initing' }, _react2.default.createElement('i', { className: 'gt-loader' }), _react2.default.createElement( 'p', { className: 'gt-initing-text' }, this.i18n.t('init') ) ); } }, { key: 'noInit', value: function noInit() { var _state4 = this.state, user = _state4.user, isIssueCreating = _state4.isIssueCreating; var _options5 = this.options, owner = _options5.owner, repo = _options5.repo, admin = _options5.admin; return _react2.default.createElement( 'div', { className: 'gt-no-init', key: 'no-init' }, _react2.default.createElement('p', { dangerouslySetInnerHTML: { __html: this.i18n.t('no-found-related', { link: '<a href="https://github.com/' + owner + '/' + repo + '/issues">Issues</a>' }) } }), _react2.default.createElement( 'p', null, this.i18n.t('please-contact', { user: [].concat(admin).map(function (u) { return '@' + u; }).join(' ') }) ), this.isAdmin ? _react2.default.createElement( 'p', null, _react2.default.createElement(_button2.default, { onClick: this.handleIssueCreate, isLoading: isIssueCreating, text: this.i18n.t('init-issue') }) ) : null, !user && _react2.default.createElement(_button2.default, { className: 'gt-btn-login', onClick: this.handleLogin, text: this.i18n.t('login-with-github') }) ); } }, { key: 'header', value: function header() { var _this10 = this; var _state5 = this.state, user = _state5.user, comment = _state5.comment, isCreating = _state5.isCreating; return _react2.default.createElement( 'div', { className: 'gt-header', key: 'header' }, user ? _react2.default.createElement(_avatar2.default, { className: 'gt-header-avatar', src: user.avatar_url }) : _react2.default.createElement( 'a', { className: 'gt-avatar-github', onMouseDown: this.handleLogin }, _react2.default.createElement(_svg2.default, { className: 'gt-ico-github', name: 'github' }) ), _react2.default.createElement( 'div', { className: 'gt-header-comment' }, _react2.default.createElement('textarea', { ref: function ref(t) { _this10.commentEL = t; }, className: 'gt-header-textarea', value: comment, onChange: this.handleCommentChange, onFocus: this.handleCommentFocus, onBlur: this.handleCommentBlur, onKeyDown: this.handleCommentKeyDown, placeholder: this.i18n.t('leave-a-comment') }), _react2.default.createElement( 'div', { className: 'gt-header-controls' }, _react2.default.createElement( 'a', { className: 'gt-header-controls-tip', href: 'https://guides.github.com/features/mastering-markdown/', target: '_blank' }, _react2.default.createElement(_svg2.default, { className: 'gt-ico-tip', name: 'tip', text: this.i18n.t('support-markdown') }) ), user && _react2.default.createElement(_button2.default, { getRef: this.getRef, className: 'gt-btn-public', onMouseDown: this.handleCommentCreate, text: this.i18n.t('comment'), isLoading: isCreating }), !user && _react2.default.createElement(_button2.default, { className: 'gt-btn-login', onMouseDown: this.handleLogin, text: this.i18n.t('login-with-github') }) ) ) ); } }, { key: 'comments', value: function comments() { var _this11 = this; var _state6 = this.state, user = _state6.user, comments = _state6.comments, isLoadOver = _state6.isLoadOver, isLoadMore = _state6.isLoadMore, pagerDirection = _state6.pagerDirection; var _options6 = this.options, language = _options6.language, flipMoveOptions = _options6.flipMoveOptions, admin = _options6.admin; var totalComments = comments.concat([]); if (pagerDirection === 'last' && this.accessToken) { totalComments.reverse(); } return _react2.default.createElement( 'div', { className: 'gt-comments', key: 'comments' }, _react2.default.createElement( _reactFlipMove2.default, flipMoveOptions, totalComments.map(function (c) { return _react2.default.createElement(_comment2.default, { comment: c, key: c.id, user: user, language: language, commentedText: _this11.i18n.t('commented'), admin: admin, replyCallback: _this11.reply.bind(_this11, c), likeCallback: c.reactions && c.reactions.viewerHasReacted ? _this11.unLike.bind(_this11, c) : _this11.like.bind(_this11, c) }); }) ), !totalComments.length && _react2.default.createElement( 'p', { className: 'gt-comments-null' }, this.i18n.t('first-comment-person') ), !isLoadOver && totalComments.length ? _react2.default.createElement( 'div', { className: 'gt-comments-controls' }, _react2.default.createElement(_button2.default, { className: 'gt-btn-loadmore', onClick: this.handleCommentLoad, isLoading: isLoadMore, text: this.i18n.t('load-more') }) ) : null ); } }, { key: 'meta', value: function meta() { var _state7 = this.state, user = _state7.user, issue = _state7.issue, isPopupVisible = _state7.isPopupVisible, pagerDirection = _state7.pagerDirection, localComments = _state7.localComments; var cnt = (issue && issue.comments) + localComments.length; var isDesc = pagerDirection === 'last'; window.GITALK_COMMENTS_COUNT = cnt; return _react2.default.createElement( 'div', { className: 'gt-meta', key: 'meta' }, _react2.default.createElement('span', { className: 'gt-counts', dangerouslySetInnerHTML: { __html: this.i18n.t('counts', { counts: '<a class="gt-link gt-link-counts" href="' + (issue && issue.html_url) + '" target="_blank">' + cnt + '</a>', smart_count: cnt }) } }), isPopupVisible && _react2.default.createElement( 'div', { className: 'gt-popup' }, user ? _react2.default.createElement(_action2.default, { className: 'gt-action-sortasc' + (!isDesc ? ' is--active' : ''), onClick: this.handleSort('first'), text: this.i18n.t('sort-asc') }) : null, user ? _react2.default.createElement(_action2.default, { className: 'gt-action-sortdesc' + (isDesc ? ' is--active' : ''), onClick: this.handleSort('last'), text: this.i18n.t('sort-desc') }) : null, user ? _react2.default.createElement(_action2.default, { className: 'gt-action-logout', onClick: this.handleLogout, text: this.i18n.t('logout') }) : _react2.default.createElement( 'a', { className: 'gt-action gt-action-login', onMouseDown: this.handleLogin }, this.i18n.t('login-with-github') ), _react2.default.createElement( 'div', { className: 'gt-copyright' }, _react2.default.createElement( 'a', { className: 'gt-link gt-link-project', href: 'https://github.com/gitalk/gitalk', target: '_blank' }, 'Gitalk' ), _react2.default.createElement( 'span', { className: 'gt-version' }, _const.GT_VERSION ) ) ), _react2.default.createElement( 'div', { className: 'gt-user' }, user ? _react2.default.createElement( 'div', { className: isPopupVisible ? 'gt-user-inner is--poping' : 'gt-user-inner', onClick: this.handlePopup }, _react2.default.createElement( 'span', { className: 'gt-user-name' }, user.login ), _react2.default.createElement(_svg2.default, { className: 'gt-ico-arrdown', name: 'arrow_down' }) ) : _react2.default.createElement( 'div', { className: isPopupVisible ? 'gt-user-inner is--poping' : 'gt-user-inner', onClick: this.handlePopup }, _react2.default.createElement( 'span', { className: 'gt-user-name' }, this.i18n.t('anonymous') ), _react2.default.createElement(_svg2.default, { className: 'gt-ico-arrdown', name: 'arrow_down' }) ) ) ); } }, { key: 'render', value: function render() { var _state8 = this.state, isIniting = _state8.isIniting, isNoInit = _state8.isNoInit, isOccurError = _state8.isOccurError, errorMsg = _state8.errorMsg, isInputFocused = _state8.isInputFocused; return _react2.default.createElement( 'div', { className: 'gt-container' + (isInputFocused ? ' gt-input-focused' : '') }, isIniting && this.initing(), !isIniting && (isNoInit ? [] : [this.meta()]), isOccurError && _react2.default.createElement( 'div', { className: 'gt-error' }, errorMsg ), !isIniting && (isNoInit ? [this.noInit()] : [this.header(), this.comments()]) ); } }, { key: 'accessToken', get: function get() { return this._accessToke || localStorage.getItem(_const.GT_ACCESS_TOKEN); }, set: function set(token) { localStorage.setItem(_const.GT_ACCESS_TOKEN, token); this._accessToken = token; } }, { key: 'loginLink', get: function get() { var githubOauthUrl = 'http://github.com/login/oauth/authorize'; var clientID = this.options.clientID; var query = { client_id: clientID, redirect_uri: location.href, scope: 'public_repo' }; return githubOauthUrl + '?' + (0, _util.queryStringify)(query); } }, { key: 'isAdmin', get: function get() { var admin = this.options.admin; var user = this.state.user; return user && ~[].concat(admin).map(function (a) { return a.toLowerCase(); }).indexOf(user.login.toLowerCase()); } }]); return GitalkComponent; }(_react.Component); module.exports = GitalkComponent; /***/ }), /* 89 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(90), __esModule: true }; /***/ }), /* 90 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(52); __webpack_require__(20); __webpack_require__(26); __webpack_require__(99); module.exports = __webpack_require__(0).Promise; /***/ }), /* 91 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(34) , defined = __webpack_require__(35); // true -> String#at // false -> String#codePointAt module.exports = function(TO_STRING){ return function(that, pos){ var s = String(defined(that)) , i = toInteger(pos) , l = s.length , a, b; if(i < 0 || i >= l)return TO_STRING ? '' : undefined; a = s.charCodeAt(i); return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; }; /***/ }), /* 92 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var create = __webpack_require__(36) , descriptor = __webpack_require__(19) , setToStringTag = __webpack_require__(25) , IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() __webpack_require__(10)(IteratorPrototype, __webpack_require__(1)('iterator'), function(){ return this; }); module.exports = function(Constructor, NAME, next){ Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); setToStringTag(Constructor, NAME + ' Iterator'); }; /***/ }), /* 93 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(7) , anObject = __webpack_require__(8) , getKeys = __webpack_require__(17); module.exports = __webpack_require__(9) ? Object.defineProperties : function defineProperties(O, Properties){ anObject(O); var keys = getKeys(Properties) , length = keys.length , i = 0 , P; while(length > i)dP.f(O, P = keys[i++], Properties[P]); return O; }; /***/ }), /* 94 */ /***/ (function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(12) , toLength = __webpack_require__(37) , toIndex = __webpack_require__(95); module.exports = function(IS_INCLUDES){ return function($this, el, fromIndex){ var O = toIObject($this) , length = toLength(O.length) , index = toIndex(fromIndex, length) , value; // Array#includes uses SameValueZero equality algorithm if(IS_INCLUDES && el != el)while(length > index){ value = O[index++]; if(value != value)return true; // Array#toIndex ignores holes, Array#includes - not } else for(;length > index; index++)if(IS_INCLUDES || index in O){ if(O[index] === el)return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; /***/ }), /* 95 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(34) , max = Math.max , min = Math.min; module.exports = function(index, length){ index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); }; /***/ }), /* 96 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var addToUnscopables = __webpack_require__(97) , step = __webpack_require__(98) , Iterators = __webpack_require__(16) , toIObject = __webpack_require__(12); // 22.1.3.4 Array.prototype.entries() // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() module.exports = __webpack_require__(53)(Array, 'Array', function(iterated, kind){ this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind // 22.1.5.2.1 %ArrayIteratorPrototype%.next() }, function(){ var O = this._t , kind = this._k , index = this._i++; if(!O || index >= O.length){ this._t = undefined; return step(1); } if(kind == 'keys' )return step(0, index); if(kind == 'values')return step(0, O[index]); return step(0, [index, O[index]]); }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) Iterators.Arguments = Iterators.Array; addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); /***/ }), /* 97 */ /***/ (function(module, exports) { module.exports = function(){ /* empty */ }; /***/ }), /* 98 */ /***/ (function(module, exports) { module.exports = function(done, value){ return {value: value, done: !!done}; }; /***/ }), /* 99 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var LIBRARY = __webpack_require__(23) , global = __webpack_require__(2) , ctx = __webpack_require__(13) , classof = __webpack_require__(41) , $export = __webpack_require__(6) , isObject = __webpack_require__(14) , aFunction = __webpack_require__(28) , anInstance = __webpack_require__(100) , forOf = __webpack_require__(101) , speciesConstructor = __webpack_require__(102) , task = __webpack_require__(61).set , microtask = __webpack_require__(104)() , PROMISE = 'Promise' , TypeError = global.TypeError , process = global.process , $Promise = global[PROMISE] , process = global.process , isNode = classof(process) == 'process' , empty = function(){ /* empty */ } , Internal, GenericPromiseCapability, Wrapper; var USE_NATIVE = !!function(){ try { // correct subclassing with @@species support var promise = $Promise.resolve(1) , FakePromise = (promise.constructor = {})[__webpack_require__(1)('species')] = function(exec){ exec(empty, empty); }; // unhandled rejections tracking support, NodeJS Promise without it fails @@species test return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; } catch(e){ /* empty */ } }(); // helpers var sameConstructor = function(a, b){ // with library wrapper special case return a === b || a === $Promise && b === Wrapper; }; var isThenable = function(it){ var then; return isObject(it) && typeof (then = it.then) == 'function' ? then : false; }; var newPromiseCapability = function(C){ return sameConstructor($Promise, C) ? new PromiseCapability(C) : new GenericPromiseCapability(C); }; var PromiseCapability = GenericPromiseCapability = function(C){ var resolve, reject; this.promise = new C(function($$resolve, $$reject){ if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor'); resolve = $$resolve; reject = $$reject; }); this.resolve = aFunction(resolve); this.reject = aFunction(reject); }; var perform = function(exec){ try { exec(); } catch(e){ return {error: e}; } }; var notify = function(promise, isReject){ if(promise._n)return; promise._n = true; var chain = promise._c; microtask(function(){ var value = promise._v , ok = promise._s == 1 , i = 0; var run = function(reaction){ var handler = ok ? reaction.ok : reaction.fail , resolve = reaction.resolve , reject = reaction.reject , domain = reaction.domain , result, then; try { if(handler){ if(!ok){ if(promise._h == 2)onHandleUnhandled(promise); promise._h = 1; } if(handler === true)result = value; else { if(domain)domain.enter(); result = handler(value); if(domain)domain.exit(); } if(result === reaction.promise){ reject(TypeError('Promise-chain cycle')); } else if(then = isThenable(result)){ then.call(result, resolve, reject); } else resolve(result); } else reject(value); } catch(e){ reject(e); } }; while(chain.length > i)run(chain[i++]); // variable length - can't use forEach promise._c = []; promise._n = false; if(isReject && !promise._h)onUnhandled(promise); }); }; var onUnhandled = function(promise){ task.call(global, function(){ var value = promise._v , abrupt, handler, console; if(isUnhandled(promise)){ abrupt = perform(function(){ if(isNode){ process.emit('unhandledRejection', value, promise); } else if(handler = global.onunhandledrejection){ handler({promise: promise, reason: value}); } else if((console = global.console) && console.error){ console.error('Unhandled promise rejection', value); } }); // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should promise._h = isNode || isUnhandled(promise) ? 2 : 1; } promise._a = undefined; if(abrupt)throw abrupt.error; }); }; var isUnhandled = function(promise){ if(promise._h == 1)return false; var chain = promise._a || promise._c , i = 0 , reaction; while(chain.length > i){ reaction = chain[i++]; if(reaction.fail || !isUnhandled(reaction.promise))return false; } return true; }; var onHandleUnhandled = function(promise){ task.call(global, function(){ var handler; if(isNode){ process.emit('rejectionHandled', promise); } else if(handler = global.onrejectionhandled){ handler({promise: promise, reason: promise._v}); } }); }; var $reject = function(value){ var promise = this; if(promise._d)return; promise._d = true; promise = promise._w || promise; // unwrap promise._v = value; promise._s = 2; if(!promise._a)promise._a = promise._c.slice(); notify(promise, true); }; var $resolve = function(value){ var promise = this , then; if(promise._d)return; promise._d = true; promise = promise._w || promise; // unwrap try { if(promise === value)throw TypeError("Promise can't be resolved itself"); if(then = isThenable(value)){ microtask(function(){ var wrapper = {_w: promise, _d: false}; // wrap try { then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); } catch(e){ $reject.call(wrapper, e); } }); } else { promise._v = value; promise._s = 1; notify(promise, false); } } catch(e){ $reject.call({_w: promise, _d: false}, e); // wrap } }; // constructor polyfill if(!USE_NATIVE){ // 25.4.3.1 Promise(executor) $Promise = function Promise(executor){ anInstance(this, $Promise, PROMISE, '_h'); aFunction(executor); Internal.call(this); try { executor(ctx($resolve, this, 1), ctx($reject, this, 1)); } catch(err){ $reject.call(this, err); } }; Internal = function Promise(executor){ this._c = []; // <- awaiting reactions this._a = undefined; // <- checked in isUnhandled reactions this._s = 0; // <- state this._d = false; // <- done this._v = undefined; // <- value this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled this._n = false; // <- notify }; Internal.prototype = __webpack_require__(105)($Promise.prototype, { // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) then: function then(onFulfilled, onRejected){ var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; reaction.fail = typeof onRejected == 'function' && onRejected; reaction.domain = isNode ? process.domain : undefined; this._c.push(reaction); if(this._a)this._a.push(reaction); if(this._s)notify(this, false); return reaction.promise; }, // 25.4.5.1 Promise.prototype.catch(onRejected) 'catch': function(onRejected){ return this.then(undefined, onRejected); } }); PromiseCapability = function(){ var promise = new Internal; this.promise = promise; this.resolve = ctx($resolve, promise, 1); this.reject = ctx($reject, promise, 1); }; } $export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise}); __webpack_require__(25)($Promise, PROMISE); __webpack_require__(106)(PROMISE); Wrapper = __webpack_require__(0)[PROMISE]; // statics $export($export.S + $export.F * !USE_NATIVE, PROMISE, { // 25.4.4.5 Promise.reject(r) reject: function reject(r){ var capability = newPromiseCapability(this) , $$reject = capability.reject; $$reject(r); return capability.promise; } }); $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { // 25.4.4.6 Promise.resolve(x) resolve: function resolve(x){ // instanceof instead of internal slot check because we should fix it without replacement native Promise core if(x instanceof $Promise && sameConstructor(x.constructor, this))return x; var capability = newPromiseCapability(this) , $$resolve = capability.resolve; $$resolve(x); return capability.promise; } }); $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(62)(function(iter){ $Promise.all(iter)['catch'](empty); })), PROMISE, { // 25.4.4.1 Promise.all(iterable) all: function all(iterable){ var C = this , capability = newPromiseCapability(C) , resolve = capability.resolve , reject = capability.reject; var abrupt = perform(function(){ var values = [] , index = 0 , remaining = 1; forOf(iterable, false, function(promise){ var $index = index++ , alreadyCalled = false; values.push(undefined); remaining++; C.resolve(promise).then(function(value){ if(alreadyCalled)return; alreadyCalled = true; values[$index] = value; --remaining || resolve(values); }, reject); }); --remaining || resolve(values); }); if(abrupt)reject(abrupt.error); return capability.promise; }, // 25.4.4.4 Promise.race(iterable) race: function race(iterable){ var C = this , capability = newPromiseCapability(C) , reject = capability.reject; var abrupt = perform(function(){ forOf(iterable, false, function(promise){ C.resolve(promise).then(capability.resolve, reject); }); }); if(abrupt)reject(abrupt.error); return capability.promise; } }); /***/ }), /* 100 */ /***/ (function(module, exports) { module.exports = function(it, Constructor, name, forbiddenField){ if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ throw TypeError(name + ': incorrect invocation!'); } return it; }; /***/ }), /* 101 */ /***/ (function(module, exports, __webpack_require__) { var ctx = __webpack_require__(13) , call = __webpack_require__(59) , isArrayIter = __webpack_require__(60) , anObject = __webpack_require__(8) , toLength = __webpack_require__(37) , getIterFn = __webpack_require__(42) , BREAK = {} , RETURN = {}; var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){ var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) , f = ctx(fn, that, entries ? 2 : 1) , index = 0 , length, step, iterator, result; if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!'); // fast case for arrays with default iterator if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){ result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); if(result === BREAK || result === RETURN)return result; } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){ result = call(iterator, f, step.value, entries); if(result === BREAK || result === RETURN)return result; } }; exports.BREAK = BREAK; exports.RETURN = RETURN; /***/ }), /* 102 */ /***/ (function(module, exports, __webpack_require__) { // 7.3.20 SpeciesConstructor(O, defaultConstructor) var anObject = __webpack_require__(8) , aFunction = __webpack_require__(28) , SPECIES = __webpack_require__(1)('species'); module.exports = function(O, D){ var C = anObject(O).constructor, S; return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); }; /***/ }), /* 103 */ /***/ (function(module, exports) { // fast apply, http://jsperf.lnkit.com/fast-apply/5 module.exports = function(fn, args, that){ var un = that === undefined; switch(args.length){ case 0: return un ? fn() : fn.call(that); case 1: return un ? fn(args[0]) : fn.call(that, args[0]); case 2: return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); case 3: return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); case 4: return un ? fn(args[0], args[1], args[2], args[3]) : fn.call(that, args[0], args[1], args[2], args[3]); } return fn.apply(that, args); }; /***/ }), /* 104 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(2) , macrotask = __webpack_require__(61).set , Observer = global.MutationObserver || global.WebKitMutationObserver , process = global.process , Promise = global.Promise , isNode = __webpack_require__(21)(process) == 'process'; module.exports = function(){ var head, last, notify; var flush = function(){ var parent, fn; if(isNode && (parent = process.domain))parent.exit(); while(head){ fn = head.fn; head = head.next; try { fn(); } catch(e){ if(head)notify(); else last = undefined; throw e; } } last = undefined; if(parent)parent.enter(); }; // Node.js if(isNode){ notify = function(){ process.nextTick(flush); }; // browsers with MutationObserver } else if(Observer){ var toggle = true , node = document.createTextNode(''); new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new notify = function(){ node.data = toggle = !toggle; }; // environments with maybe non-completely correct, but existent Promise } else if(Promise && Promise.resolve){ var promise = Promise.resolve(); notify = function(){ promise.then(flush); }; // for other environments - macrotask based on: // - setImmediate // - MessageChannel // - window.postMessag // - onreadystatechange // - setTimeout } else { notify = function(){ // strange IE + webpack dev server bug - use .call(global) macrotask.call(global, flush); }; } return function(fn){ var task = {fn: fn, next: undefined}; if(last)last.next = task; if(!head){ head = task; notify(); } last = task; }; }; /***/ }), /* 105 */ /***/ (function(module, exports, __webpack_require__) { var hide = __webpack_require__(10); module.exports = function(target, src, safe){ for(var key in src){ if(safe && target[key])target[key] = src[key]; else hide(target, key, src[key]); } return target; }; /***/ }), /* 106 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var global = __webpack_require__(2) , core = __webpack_require__(0) , dP = __webpack_require__(7) , DESCRIPTORS = __webpack_require__(9) , SPECIES = __webpack_require__(1)('species'); module.exports = function(KEY){ var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { configurable: true, get: function(){ return this; } }); }; /***/ }), /* 107 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(108), __esModule: true }; /***/ }), /* 108 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(109); module.exports = __webpack_require__(0).Object.assign; /***/ }), /* 109 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.3.1 Object.assign(target, source) var $export = __webpack_require__(6); $export($export.S + $export.F, 'Object', {assign: __webpack_require__(110)}); /***/ }), /* 110 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // 19.1.2.1 Object.assign(target, source, ...) var getKeys = __webpack_require__(17) , gOPS = __webpack_require__(43) , pIE = __webpack_require__(27) , toObject = __webpack_require__(22) , IObject = __webpack_require__(56) , $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) module.exports = !$assign || __webpack_require__(15)(function(){ var A = {} , B = {} , S = Symbol() , K = 'abcdefghijklmnopqrst'; A[S] = 7; K.split('').forEach(function(k){ B[k] = k; }); return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; }) ? function assign(target, source){ // eslint-disable-line no-unused-vars var T = toObject(target) , aLen = arguments.length , index = 1 , getSymbols = gOPS.f , isEnum = pIE.f; while(aLen > index){ var S = IObject(arguments[index++]) , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) , length = keys.length , j = 0 , key; while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; } return T; } : $assign; /***/ }), /* 111 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(112), __esModule: true }; /***/ }), /* 112 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(113); module.exports = __webpack_require__(0).Object.getPrototypeOf; /***/ }), /* 113 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 Object.getPrototypeOf(O) var toObject = __webpack_require__(22) , $getPrototypeOf = __webpack_require__(58); __webpack_require__(63)('getPrototypeOf', function(){ return function getPrototypeOf(it){ return $getPrototypeOf(toObject(it)); }; }); /***/ }), /* 114 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _typeof2 = __webpack_require__(64); var _typeof3 = _interopRequireDefault(_typeof2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; }; /***/ }), /* 115 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(116), __esModule: true }; /***/ }), /* 116 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(20); __webpack_require__(26); module.exports = __webpack_require__(44).f('iterator'); /***/ }), /* 117 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(118), __esModule: true }; /***/ }), /* 118 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(119); __webpack_require__(52); __webpack_require__(125); __webpack_require__(126); module.exports = __webpack_require__(0).Symbol; /***/ }), /* 119 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // ECMAScript 6 symbols shim var global = __webpack_require__(2) , has = __webpack_require__(11) , DESCRIPTORS = __webpack_require__(9) , $export = __webpack_require__(6) , redefine = __webpack_require__(54) , META = __webpack_require__(120).KEY , $fails = __webpack_require__(15) , shared = __webpack_require__(39) , setToStringTag = __webpack_require__(25) , uid = __webpack_require__(24) , wks = __webpack_require__(1) , wksExt = __webpack_require__(44) , wksDefine = __webpack_require__(45) , keyOf = __webpack_require__(121) , enumKeys = __webpack_require__(122) , isArray = __webpack_require__(123) , anObject = __webpack_require__(8) , toIObject = __webpack_require__(12) , toPrimitive = __webpack_require__(30) , createDesc = __webpack_require__(19) , _create = __webpack_require__(36) , gOPNExt = __webpack_require__(124) , $GOPD = __webpack_require__(66) , $DP = __webpack_require__(7) , $keys = __webpack_require__(17) , gOPD = $GOPD.f , dP = $DP.f , gOPN = gOPNExt.f , $Symbol = global.Symbol , $JSON = global.JSON , _stringify = $JSON && $JSON.stringify , PROTOTYPE = 'prototype' , HIDDEN = wks('_hidden') , TO_PRIMITIVE = wks('toPrimitive') , isEnum = {}.propertyIsEnumerable , SymbolRegistry = shared('symbol-registry') , AllSymbols = shared('symbols') , OPSymbols = shared('op-symbols') , ObjectProto = Object[PROTOTYPE] , USE_NATIVE = typeof $Symbol == 'function' , QObject = global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 var setSymbolDesc = DESCRIPTORS && $fails(function(){ return _create(dP({}, 'a', { get: function(){ return dP(this, 'a', {value: 7}).a; } })).a != 7; }) ? function(it, key, D){ var protoDesc = gOPD(ObjectProto, key); if(protoDesc)delete ObjectProto[key]; dP(it, key, D); if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc); } : dP; var wrap = function(tag){ var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); sym._k = tag; return sym; }; var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){ return typeof it == 'symbol'; } : function(it){ return it instanceof $Symbol; }; var $defineProperty = function defineProperty(it, key, D){ if(it === ObjectProto)$defineProperty(OPSymbols, key, D); anObject(it); key = toPrimitive(key, true); anObject(D); if(has(AllSymbols, key)){ if(!D.enumerable){ if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {})); it[HIDDEN][key] = true; } else { if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; D = _create(D, {enumerable: createDesc(0, false)}); } return setSymbolDesc(it, key, D); } return dP(it, key, D); }; var $defineProperties = function defineProperties(it, P){ anObject(it); var keys = enumKeys(P = toIObject(P)) , i = 0 , l = keys.length , key; while(l > i)$defineProperty(it, key = keys[i++], P[key]); return it; }; var $create = function create(it, P){ return P === undefined ? _create(it) : $defineProperties(_create(it), P); }; var $propertyIsEnumerable = function propertyIsEnumerable(key){ var E = isEnum.call(this, key = toPrimitive(key, true)); if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false; return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; }; var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ it = toIObject(it); key = toPrimitive(key, true); if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return; var D = gOPD(it, key); if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; return D; }; var $getOwnPropertyNames = function getOwnPropertyNames(it){ var names = gOPN(toIObject(it)) , result = [] , i = 0 , key; while(names.length > i){ if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key); } return result; }; var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ var IS_OP = it === ObjectProto , names = gOPN(IS_OP ? OPSymbols : toIObject(it)) , result = [] , i = 0 , key; while(names.length > i){ if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]); } return result; }; // 19.4.1.1 Symbol([description]) if(!USE_NATIVE){ $Symbol = function Symbol(){ if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!'); var tag = uid(arguments.length > 0 ? arguments[0] : undefined); var $set = function(value){ if(this === ObjectProto)$set.call(OPSymbols, value); if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; setSymbolDesc(this, tag, createDesc(1, value)); }; if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set}); return wrap(tag); }; redefine($Symbol[PROTOTYPE], 'toString', function toString(){ return this._k; }); $GOPD.f = $getOwnPropertyDescriptor; $DP.f = $defineProperty; __webpack_require__(65).f = gOPNExt.f = $getOwnPropertyNames; __webpack_require__(27).f = $propertyIsEnumerable; __webpack_require__(43).f = $getOwnPropertySymbols; if(DESCRIPTORS && !__webpack_require__(23)){ redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } wksExt.f = function(name){ return wrap(wks(name)); } } $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol}); for(var symbols = ( // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]); for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]); $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { // 19.4.2.1 Symbol.for(key) 'for': function(key){ return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key); }, // 19.4.2.5 Symbol.keyFor(sym) keyFor: function keyFor(key){ if(isSymbol(key))return keyOf(SymbolRegistry, key); throw TypeError(key + ' is not a symbol!'); }, useSetter: function(){ setter = true; }, useSimple: function(){ setter = false; } }); $export($export.S + $export.F * !USE_NATIVE, 'Object', { // 19.1.2.2 Object.create(O [, Properties]) create: $create, // 19.1.2.4 Object.defineProperty(O, P, Attributes) defineProperty: $defineProperty, // 19.1.2.3 Object.defineProperties(O, Properties) defineProperties: $defineProperties, // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) getOwnPropertyDescriptor: $getOwnPropertyDescriptor, // 19.1.2.7 Object.getOwnPropertyNames(O) getOwnPropertyNames: $getOwnPropertyNames, // 19.1.2.8 Object.getOwnPropertySymbols(O) getOwnPropertySymbols: $getOwnPropertySymbols }); // 24.3.2 JSON.stringify(value [, replacer [, space]]) $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){ var S = $Symbol(); // MS Edge converts symbol values to JSON as {} // WebKit converts symbol values to JSON as null // V8 throws on boxed symbols return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; })), 'JSON', { stringify: function stringify(it){ if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined var args = [it] , i = 1 , replacer, $replacer; while(arguments.length > i)args.push(arguments[i++]); replacer = args[1]; if(typeof replacer == 'function')$replacer = replacer; if($replacer || !isArray(replacer))replacer = function(key, value){ if($replacer)value = $replacer.call(this, key, value); if(!isSymbol(value))return value; }; args[1] = replacer; return _stringify.apply($JSON, args); } }); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(10)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag] setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag] setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] setToStringTag(global.JSON, 'JSON', true); /***/ }), /* 120 */ /***/ (function(module, exports, __webpack_require__) { var META = __webpack_require__(24)('meta') , isObject = __webpack_require__(14) , has = __webpack_require__(11) , setDesc = __webpack_require__(7).f , id = 0; var isExtensible = Object.isExtensible || function(){ return true; }; var FREEZE = !__webpack_require__(15)(function(){ return isExtensible(Object.preventExtensions({})); }); var setMeta = function(it){ setDesc(it, META, {value: { i: 'O' + ++id, // object ID w: {} // weak collections IDs }}); }; var fastKey = function(it, create){ // return primitive with prefix if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if(!has(it, META)){ // can't set metadata to uncaught frozen object if(!isExtensible(it))return 'F'; // not necessary to add metadata if(!create)return 'E'; // add missing metadata setMeta(it); // return object ID } return it[META].i; }; var getWeak = function(it, create){ if(!has(it, META)){ // can't set metadata to uncaught frozen object if(!isExtensible(it))return true; // not necessary to add metadata if(!create)return false; // add missing metadata setMeta(it); // return hash weak collections IDs } return it[META].w; }; // add metadata on freeze-family methods calling var onFreeze = function(it){ if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); return it; }; var meta = module.exports = { KEY: META, NEED: false, fastKey: fastKey, getWeak: getWeak, onFreeze: onFreeze }; /***/ }), /* 121 */ /***/ (function(module, exports, __webpack_require__) { var getKeys = __webpack_require__(17) , toIObject = __webpack_require__(12); module.exports = function(object, el){ var O = toIObject(object) , keys = getKeys(O) , length = keys.length , index = 0 , key; while(length > index)if(O[key = keys[index++]] === el)return key; }; /***/ }), /* 122 */ /***/ (function(module, exports, __webpack_require__) { // all enumerable object keys, includes symbols var getKeys = __webpack_require__(17) , gOPS = __webpack_require__(43) , pIE = __webpack_require__(27); module.exports = function(it){ var result = getKeys(it) , getSymbols = gOPS.f; if(getSymbols){ var symbols = getSymbols(it) , isEnum = pIE.f , i = 0 , key; while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key); } return result; }; /***/ }), /* 123 */ /***/ (function(module, exports, __webpack_require__) { // 7.2.2 IsArray(argument) var cof = __webpack_require__(21); module.exports = Array.isArray || function isArray(arg){ return cof(arg) == 'Array'; }; /***/ }), /* 124 */ /***/ (function(module, exports, __webpack_require__) { // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = __webpack_require__(12) , gOPN = __webpack_require__(65).f , toString = {}.toString; var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function(it){ try { return gOPN(it); } catch(e){ return windowNames.slice(); } }; module.exports.f = function getOwnPropertyNames(it){ return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); }; /***/ }), /* 125 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(45)('asyncIterator'); /***/ }), /* 126 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(45)('observable'); /***/ }), /* 127 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _setPrototypeOf = __webpack_require__(128); var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); var _create = __webpack_require__(132); var _create2 = _interopRequireDefault(_create); var _typeof2 = __webpack_require__(64); var _typeof3 = _interopRequireDefault(_typeof2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); } subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; }; /***/ }), /* 128 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(129), __esModule: true }; /***/ }), /* 129 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(130); module.exports = __webpack_require__(0).Object.setPrototypeOf; /***/ }), /* 130 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.3.19 Object.setPrototypeOf(O, proto) var $export = __webpack_require__(6); $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(131).set}); /***/ }), /* 131 */ /***/ (function(module, exports, __webpack_require__) { // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var isObject = __webpack_require__(14) , anObject = __webpack_require__(8); var check = function(O, proto){ anObject(O); if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); }; module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line function(test, buggy, set){ try { set = __webpack_require__(13)(Function.call, __webpack_require__(66).f(Object.prototype, '__proto__').set, 2); set(test, []); buggy = !(test instanceof Array); } catch(e){ buggy = true; } return function setPrototypeOf(O, proto){ check(O, proto); if(buggy)O.__proto__ = proto; else set(O, proto); return O; }; }({}, false) : undefined), check: check }; /***/ }), /* 132 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(133), __esModule: true }; /***/ }), /* 133 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(134); var $Object = __webpack_require__(0).Object; module.exports = function create(P, D){ return $Object.create(P, D); }; /***/ }), /* 134 */ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(6) // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) $export($export.S, 'Object', {create: __webpack_require__(36)}); /***/ }), /* 135 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _FlipMove = __webpack_require__(136); var _FlipMove2 = _interopRequireDefault(_FlipMove); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = _FlipMove2.default; /** * React Flip Move * (c) 2016-present Joshua Comeau */ module.exports = exports['default']; /***/ }), /* 136 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); __webpack_require__(137); var _propConverter = __webpack_require__(138); var _propConverter2 = _interopRequireDefault(_propConverter); var _domManipulation = __webpack_require__(141); var _helpers = __webpack_require__(46); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * React Flip Move * (c) 2016-present Joshua Comeau * * For information on how this code is laid out, check out CODE_TOUR.md */ /* eslint-disable react/prop-types */ var transitionEnd = (0, _domManipulation.whichTransitionEvent)(); var noBrowserSupport = !transitionEnd; function getKey(childData) { return childData.key || ''; } var FlipMove = function (_Component) { _inherits(FlipMove, _Component); function FlipMove() { var _ref; var _temp, _this, _ret; _classCallCheck(this, FlipMove); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = FlipMove.__proto__ || Object.getPrototypeOf(FlipMove)).call.apply(_ref, [this].concat(args))), _this), _this.state = { children: _react.Children.toArray(_this.props.children).map(function (element) { return _extends({}, element, { element: element, appearing: true }); }) }, _this.childrenData = {}, _this.parentData = { domNode: null, boundingBox: null }, _this.heightPlaceholderData = { domNode: null }, _this.remainingAnimations = 0, _this.childrenToAnimate = [], _this.runAnimation = function () { var dynamicChildren = _this.state.children.filter(_this.doesChildNeedToBeAnimated); dynamicChildren.forEach(function (child, n) { _this.remainingAnimations += 1; _this.childrenToAnimate.push(getKey(child)); _this.animateChild(child, n); }); if (typeof _this.props.onStartAll === 'function') { _this.callChildrenHook(_this.props.onStartAll); } }, _this.doesChildNeedToBeAnimated = function (child) { // If the child doesn't have a key, it's an immovable child (one that we // do not want to do FLIP stuff to.) if (!getKey(child)) { return false; } var childData = _this.getChildData(getKey(child)); var childDomNode = childData.domNode; var childBoundingBox = childData.boundingBox; var parentBoundingBox = _this.parentData.boundingBox; if (!childDomNode) { return false; } var _this$props = _this.props, appearAnimation = _this$props.appearAnimation, enterAnimation = _this$props.enterAnimation, leaveAnimation = _this$props.leaveAnimation, getPosition = _this$props.getPosition; var isAppearingWithAnimation = child.appearing && appearAnimation; var isEnteringWithAnimation = child.entering && enterAnimation; var isLeavingWithAnimation = child.leaving && leaveAnimation; if (isAppearingWithAnimation || isEnteringWithAnimation || isLeavingWithAnimation) { return true; } // If it isn't entering/leaving, we want to animate it if it's // on-screen position has changed. var _getPositionDelta = (0, _domManipulation.getPositionDelta)({ childDomNode: childDomNode, childBoundingBox: childBoundingBox, parentBoundingBox: parentBoundingBox, getPosition: getPosition }), _getPositionDelta2 = _slicedToArray(_getPositionDelta, 2), dX = _getPositionDelta2[0], dY = _getPositionDelta2[1]; return dX !== 0 || dY !== 0; }, _temp), _possibleConstructorReturn(_this, _ret); } // Copy props.children into state. // To understand why this is important (and not an anti-pattern), consider // how "leave" animations work. An item has "left" when the component // receives a new set of props that do NOT contain the item. // If we just render the props as-is, the item would instantly disappear. // We want to keep the item rendered for a little while, until its animation // can complete. Because we cannot mutate props, we make `state` the source // of truth. // FlipMove needs to know quite a bit about its children in order to do // its job. We store these as a property on the instance. We're not using // state, because we don't want changes to trigger re-renders, we just // need a place to keep the data for reference, when changes happen. // This field should not be accessed directly. Instead, use getChildData, // putChildData, etc... // Similarly, track the dom node and box of our parent element. // If `maintainContainerHeight` prop is set to true, we'll create a // placeholder element which occupies space so that the parent height // doesn't change when items are removed from the document flow (which // happens during leave animations) // Keep track of remaining animations so we know when to fire the // all-finished callback, and clean up after ourselves. // NOTE: we can't simply use childrenToAnimate.length to track remaining // animations, because we need to maintain the list of animating children, // to pass to the `onFinishAll` handler. _createClass(FlipMove, [{ key: 'componentDidMount', value: function componentDidMount() { // Run our `appearAnimation` if it was requested, right after the // component mounts. var shouldTriggerFLIP = this.props.appearAnimation && !this.isAnimationDisabled(this.props); if (shouldTriggerFLIP) { this.prepForAnimation(); this.runAnimation(); } } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { // When the component is handed new props, we need to figure out the // "resting" position of all currently-rendered DOM nodes. // We store that data in this.parent and this.children, // so it can be used later to work out the animation. this.updateBoundingBoxCaches(); // Convert opaque children object to array. var nextChildren = _react.Children.toArray(nextProps.children); // Next, we need to update our state, so that it contains our new set of // children. If animation is disabled or unsupported, this is easy; // we just copy our props into state. // Assuming that we can animate, though, we have to do some work. // Essentially, we want to keep just-deleted nodes in the DOM for a bit // longer, so that we can animate them away. this.setState({ children: this.isAnimationDisabled(nextProps) ? nextChildren.map(function (element) { return _extends({}, element, { element: element }); }) : this.calculateNextSetOfChildren(nextChildren) }); } }, { key: 'componentDidUpdate', value: function componentDidUpdate(previousProps) { // If the children have been re-arranged, moved, or added/removed, // trigger the main FLIP animation. // // IMPORTANT: We need to make sure that the children have actually changed. // At the end of the transition, we clean up nodes that need to be removed. var oldChildrenKeys = _react.Children.toArray(this.props.children).map(function (d) { return d.key; }); var nextChildrenKeys = _react.Children.toArray(previousProps.children).map(function (d) { return d.key; }); var shouldTriggerFLIP = !(0, _helpers.arraysEqual)(oldChildrenKeys, nextChildrenKeys) && !this.isAnimationDisabled(this.props); if (shouldTriggerFLIP) { this.prepForAnimation(); this.runAnimation(); } } }, { key: 'calculateNextSetOfChildren', value: function calculateNextSetOfChildren(nextChildren) { var _this2 = this; // We want to: // - Mark all new children as `entering` // - Pull in previous children that aren't in nextChildren, and mark them // as `leaving` // - Preserve the nextChildren list order, with leaving children in their // appropriate places. // var updatedChildren = nextChildren.map(function (nextChild) { var child = _this2.findChildByKey(nextChild.key || ''); // If the current child did exist, but it was in the midst of leaving, // we want to treat it as though it's entering var isEntering = !child || child.leaving; return _extends({}, nextChild, { element: nextChild, entering: isEntering }); }); // This is tricky. We want to keep the nextChildren's ordering, but with // any just-removed items maintaining their original position. // eg. // this.state.children = [ 1, 2, 3, 4 ] // nextChildren = [ 3, 1 ] // // In this example, we've removed the '2' & '4' // We want to end up with: [ 2, 3, 1, 4 ] // // To accomplish that, we'll iterate through this.state.children. whenever // we find a match, we'll append our `leaving` flag to it, and insert it // into the nextChildren in its ORIGINAL position. Note that, as we keep // inserting old items into the new list, the "original" position will // keep incrementing. var numOfChildrenLeaving = 0; this.state.children.forEach(function (child, index) { var isLeaving = !nextChildren.find(function (_ref2) { var key = _ref2.key; return key === getKey(child); }); // If the child isn't leaving (or, if there is no leave animation), // we don't need to add it into the state children. if (!isLeaving || !_this2.props.leaveAnimation) return; var nextChild = _extends({}, child, { leaving: true }); var nextChildIndex = index + numOfChildrenLeaving; updatedChildren.splice(nextChildIndex, 0, nextChild); numOfChildrenLeaving += 1; }); return updatedChildren; } }, { key: 'prepForAnimation', value: function prepForAnimation() { var _this3 = this; // Our animation prep consists of: // - remove children that are leaving from the DOM flow, so that the new // layout can be accurately calculated, // - update the placeholder container height, if needed, to ensure that // the parent's height doesn't collapse. var _props = this.props, leaveAnimation = _props.leaveAnimation, maintainContainerHeight = _props.maintainContainerHeight, getPosition = _props.getPosition; // we need to make all leaving nodes "invisible" to the layout calculations // that will take place in the next step (this.runAnimation). if (leaveAnimation) { var leavingChildren = this.state.children.filter(function (child) { return child.leaving; }); leavingChildren.forEach(function (leavingChild) { var childData = _this3.getChildData(getKey(leavingChild)); // We need to take the items out of the "flow" of the document, so that // its siblings can move to take its place. if (childData.boundingBox) { (0, _domManipulation.removeNodeFromDOMFlow)(childData, _this3.props.verticalAlignment); } }); if (maintainContainerHeight && this.heightPlaceholderData.domNode) { (0, _domManipulation.updateHeightPlaceholder)({ domNode: this.heightPlaceholderData.domNode, parentData: this.parentData, getPosition: getPosition }); } } // For all children not in the middle of entering or leaving, // we need to reset the transition, so that the NEW shuffle starts from // the right place. this.state.children.forEach(function (child) { var _getChildData = _this3.getChildData(getKey(child)), domNode = _getChildData.domNode; // Ignore children that don't render DOM nodes (eg. by returning null) if (!domNode) { return; } if (!child.entering && !child.leaving) { (0, _domManipulation.applyStylesToDOMNode)({ domNode: domNode, styles: { transition: '' } }); } }); } }, { key: 'animateChild', value: function animateChild(child, index) { var _this4 = this; var _getChildData2 = this.getChildData(getKey(child)), domNode = _getChildData2.domNode; if (!domNode) { return; } // Apply the relevant style for this DOM node // This is the offset from its actual DOM position. // eg. if an item has been re-rendered 20px lower, we want to apply a // style of 'transform: translate(-20px)', so that it appears to be where // it started. // In FLIP terminology, this is the 'Invert' stage. (0, _domManipulation.applyStylesToDOMNode)({ domNode: domNode, styles: this.computeInitialStyles(child) }); // Start by invoking the onStart callback for this child. if (this.props.onStart) this.props.onStart(child, domNode); // Next, animate the item from it's artificially-offset position to its // new, natural position. requestAnimationFrame(function () { requestAnimationFrame(function () { // NOTE, RE: the double-requestAnimationFrame: // Sadly, this is the most browser-compatible way to do this I've found. // Essentially we need to set the initial styles outside of any request // callbacks to avoid batching them. Then, a frame needs to pass with // the styles above rendered. Then, on the second frame, we can apply // our final styles to perform the animation. // Our first order of business is to "undo" the styles applied in the // previous frames, while also adding a `transition` property. // This way, the item will smoothly transition from its old position // to its new position. // eslint-disable-next-line flowtype/require-variable-type var styles = { transition: (0, _domManipulation.createTransitionString)(index, _this4.props), transform: '', opacity: '' }; if (child.appearing && _this4.props.appearAnimation) { styles = _extends({}, styles, _this4.props.appearAnimation.to); } else if (child.entering && _this4.props.enterAnimation) { styles = _extends({}, styles, _this4.props.enterAnimation.to); } else if (child.leaving && _this4.props.leaveAnimation) { styles = _extends({}, styles, _this4.props.leaveAnimation.to); } // In FLIP terminology, this is the 'Play' stage. (0, _domManipulation.applyStylesToDOMNode)({ domNode: domNode, styles: styles }); }); }); this.bindTransitionEndHandler(child); } }, { key: 'bindTransitionEndHandler', value: function bindTransitionEndHandler(child) { var _this5 = this; var _getChildData3 = this.getChildData(getKey(child)), domNode = _getChildData3.domNode; if (!domNode) { return; } // The onFinish callback needs to be bound to the transitionEnd event. // We also need to unbind it when the transition completes, so this ugly // inline function is required (we need it here so it closes over // dependent variables `child` and `domNode`) var transitionEndHandler = function transitionEndHandler(ev) { // It's possible that this handler is fired not on our primary transition, // but on a nested transition (eg. a hover effect). Ignore these cases. if (ev.target !== domNode) return; // Remove the 'transition' inline style we added. This is cleanup. domNode.style.transition = ''; // Trigger any applicable onFinish/onFinishAll hooks _this5.triggerFinishHooks(child, domNode); domNode.removeEventListener(transitionEnd, transitionEndHandler); if (child.leaving) { _this5.removeChildData(getKey(child)); } }; domNode.addEventListener(transitionEnd, transitionEndHandler); } }, { key: 'triggerFinishHooks', value: function triggerFinishHooks(child, domNode) { var _this6 = this; if (this.props.onFinish) this.props.onFinish(child, domNode); // Reduce the number of children we need to animate by 1, // so that we can tell when all children have finished. this.remainingAnimations -= 1; if (this.remainingAnimations === 0) { // Remove any items from the DOM that have left, and reset `entering`. var nextChildren = this.state.children.filter(function (_ref3) { var leaving = _ref3.leaving; return !leaving; }).map(function (item) { return _extends({}, item, { appearing: false, entering: false }); }); this.setState({ children: nextChildren }, function () { if (typeof _this6.props.onFinishAll === 'function') { _this6.callChildrenHook(_this6.props.onFinishAll); } // Reset our variables for the next iteration _this6.childrenToAnimate = []; }); // If the placeholder was holding the container open while elements were // leaving, we we can now set its height to zero. if (this.heightPlaceholderData.domNode) { this.heightPlaceholderData.domNode.style.height = '0'; } } } }, { key: 'callChildrenHook', value: function callChildrenHook(hook) { var _this7 = this; var elements = []; var domNodes = []; this.childrenToAnimate.forEach(function (childKey) { // If this was an exit animation, the child may no longer exist. // If so, skip it. var child = _this7.findChildByKey(childKey); if (!child) { return; } elements.push(child); if (_this7.hasChildData(childKey)) { domNodes.push(_this7.getChildData(childKey).domNode); } }); hook(elements, domNodes); } }, { key: 'updateBoundingBoxCaches', value: function updateBoundingBoxCaches() { var _this8 = this; // This is the ONLY place that parentData and childrenData's // bounding boxes are updated. They will be calculated at other times // to be compared to this value, but it's important that the cache is // updated once per update. var parentDomNode = this.parentData.domNode; if (!parentDomNode) { return; } this.parentData.boundingBox = this.props.getPosition(parentDomNode); this.state.children.forEach(function (child) { var childKey = getKey(child); // It is possible that a child does not have a `key` property; // Ignore these children, they don't need to be moved. if (!childKey) { return; } // In very rare circumstances, for reasons unknown, the ref is never // populated for certain children. In this case, avoid doing this update. // see: https://github.com/joshwcomeau/react-flip-move/pull/91 if (!_this8.hasChildData(childKey)) { return; } var childData = _this8.getChildData(childKey); // If the child element returns null, we need to avoid trying to // account for it if (!childData.domNode || !child) { return; } _this8.setChildData(childKey, { boundingBox: (0, _domManipulation.getRelativeBoundingBox)({ childDomNode: childData.domNode, parentDomNode: parentDomNode, getPosition: _this8.props.getPosition }) }); }); } }, { key: 'computeInitialStyles', value: function computeInitialStyles(child) { if (child.appearing) { return this.props.appearAnimation ? this.props.appearAnimation.from : {}; } else if (child.entering) { if (!this.props.enterAnimation) { return {}; } // If this child was in the middle of leaving, it still has its // absolute positioning styles applied. We need to undo those. return _extends({ position: '', top: '', left: '', right: '', bottom: '' }, this.props.enterAnimation.from); } else if (child.leaving) { return this.props.leaveAnimation ? this.props.leaveAnimation.from : {}; } var childData = this.getChildData(getKey(child)); var childDomNode = childData.domNode; var childBoundingBox = childData.boundingBox; var parentBoundingBox = this.parentData.boundingBox; if (!childDomNode) { return {}; } var _getPositionDelta3 = (0, _domManipulation.getPositionDelta)({ childDomNode: childDomNode, childBoundingBox: childBoundingBox, parentBoundingBox: parentBoundingBox, getPosition: this.props.getPosition }), _getPositionDelta4 = _slicedToArray(_getPositionDelta3, 2), dX = _getPositionDelta4[0], dY = _getPositionDelta4[1]; return { transform: 'translate(' + dX + 'px, ' + dY + 'px)' }; } // eslint-disable-next-line class-methods-use-this }, { key: 'isAnimationDisabled', value: function isAnimationDisabled(props) { // If the component is explicitly passed a `disableAllAnimations` flag, // we can skip this whole process. Similarly, if all of the numbers have // been set to 0, there is no point in trying to animate; doing so would // only cause a flicker (and the intent is probably to disable animations) // We can also skip this rigamarole if there's no browser support for it. return noBrowserSupport || props.disableAllAnimations || props.duration === 0 && props.delay === 0 && props.staggerDurationBy === 0 && props.staggerDelayBy === 0; } }, { key: 'findChildByKey', value: function findChildByKey(key) { return this.state.children.find(function (child) { return getKey(child) === key; }); } }, { key: 'hasChildData', value: function hasChildData(key) { // Object has some built-in properties on its prototype, such as toString. hasOwnProperty makes // sure that key is present on childrenData itself, not on its prototype. return Object.prototype.hasOwnProperty.call(this.childrenData, key); } }, { key: 'getChildData', value: function getChildData(key) { return this.hasChildData(key) ? this.childrenData[key] : {}; } }, { key: 'setChildData', value: function setChildData(key, data) { this.childrenData[key] = _extends({}, this.getChildData(key), data); } }, { key: 'removeChildData', value: function removeChildData(key) { delete this.childrenData[key]; } }, { key: 'createHeightPlaceholder', value: function createHeightPlaceholder() { var _this9 = this; var typeName = this.props.typeName; // If requested, create an invisible element at the end of the list. // Its height will be modified to prevent the container from collapsing // prematurely. var isContainerAList = typeName === 'ul' || typeName === 'ol'; var placeholderType = isContainerAList ? 'li' : 'div'; return _react2.default.createElement(placeholderType, { key: 'height-placeholder', ref: function ref(domNode) { _this9.heightPlaceholderData.domNode = domNode; }, style: { visibility: 'hidden', height: 0 } }); } }, { key: 'childrenWithRefs', value: function childrenWithRefs() { var _this10 = this; // We need to clone the provided children, capturing a reference to the // underlying DOM node. Flip Move needs to use the React escape hatches to // be able to do its calculations. return this.state.children.map(function (child) { return _react2.default.cloneElement(child.element, { ref: function ref(element) { // Stateless Functional Components are not supported by FlipMove, // because they don't have instances. if (!element) { return; } var domNode = (0, _domManipulation.getNativeNode)(element); _this10.setChildData(getKey(child), { domNode: domNode }); } }); }); } }, { key: 'render', value: function render() { var _this11 = this; var _props2 = this.props, typeName = _props2.typeName, delegated = _props2.delegated, leaveAnimation = _props2.leaveAnimation, maintainContainerHeight = _props2.maintainContainerHeight; var props = _extends({}, delegated, { ref: function ref(node) { _this11.parentData.domNode = node; } }); var children = this.childrenWithRefs(); if (leaveAnimation && maintainContainerHeight) { children.push(this.createHeightPlaceholder()); } return _react2.default.createElement(typeName, props, children); } }]); return FlipMove; }(_react.Component); exports.default = (0, _propConverter2.default)(FlipMove); module.exports = exports['default']; /***/ }), /* 137 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // @noflow /** * React Flip Move - Polyfills * (c) 2016-present Joshua Comeau */ /* eslint-disable */ if (!Array.prototype.find) { Array.prototype.find = function (predicate) { if (this === null) { throw new TypeError('Array.prototype.find called on null or undefined'); } if (typeof predicate !== 'function') { throw new TypeError('predicate must be a function'); } var list = Object(this); var length = list.length >>> 0; var thisArg = arguments[1]; var value = void 0; for (var i = 0; i < length; i++) { value = list[i]; if (predicate.call(thisArg, value, i, list)) { return value; } } return undefined; }; } if (!Array.prototype.every) { Array.prototype.every = function (callbackfn, thisArg) { 'use strict'; var T, k; if (this == null) { throw new TypeError('this is null or not defined'); } var O = Object(this); var len = O.length >>> 0; if (typeof callbackfn !== 'function') { throw new TypeError(); } if (arguments.length > 1) { T = thisArg; } k = 0; while (k < len) { var kValue; if (k in O) { kValue = O[k]; var testResult = callbackfn.call(T, kValue, k, O); if (!testResult) { return false; } } k++; } return true; }; } if (!Array.isArray) { Array.isArray = function (arg) { return Object.prototype.toString.call(arg) === '[object Array]'; }; } /***/ }), /* 138 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { Object.defineProperty(exports, "__esModule", { value: true }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _errorMessages = __webpack_require__(139); var _enterLeavePresets = __webpack_require__(140); var _helpers = __webpack_require__(46); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * React Flip Move | propConverter * (c) 2016-present Joshua Comeau * * Abstracted away a bunch of the messy business with props. * - props flow types and defaultProps * - Type conversion (We accept 'string' and 'number' values for duration, * delay, and other fields, but we actually need them to be ints.) * - Children conversion (we need the children to be an array. May not always * be, if a single child is passed in.) * - Resolving animation presets into their base CSS styles */ /* eslint-disable block-scoped-var */ var nodeEnv = void 0; try { nodeEnv = process.env.NODE_ENV; } catch (e) { nodeEnv = 'development'; } function propConverter(ComposedComponent) { var _class, _temp; return _temp = _class = function (_Component) { _inherits(FlipMovePropConverter, _Component); function FlipMovePropConverter() { _classCallCheck(this, FlipMovePropConverter); return _possibleConstructorReturn(this, (FlipMovePropConverter.__proto__ || Object.getPrototypeOf(FlipMovePropConverter)).apply(this, arguments)); } _createClass(FlipMovePropConverter, [{ key: 'checkForStatelessFunctionalComponents', // eslint-disable-next-line class-methods-use-this value: function checkForStatelessFunctionalComponents(children) { // Skip all console warnings in production. // Bail early, to avoid unnecessary work. if (nodeEnv === 'production') { return; } // FlipMove does not support stateless functional components. // Check to see if any supplied components won't work. // If the child doesn't have a key, it means we aren't animating it. // It's allowed to be an SFC, since we ignore it. var childArray = _react.Children.toArray(children); var noStateless = childArray.every(function (child) { return !(0, _helpers.isElementAnSFC)(child) || typeof child.key === 'undefined'; }); if (!noStateless) { (0, _errorMessages.statelessFunctionalComponentSupplied)(); } } }, { key: 'convertProps', value: function convertProps(props) { var workingProps = { // explicitly bypass the props that don't need conversion children: props.children, easing: props.easing, onStart: props.onStart, onFinish: props.onFinish, onStartAll: props.onStartAll, onFinishAll: props.onFinishAll, typeName: props.typeName, disableAllAnimations: props.disableAllAnimations, getPosition: props.getPosition, maintainContainerHeight: props.maintainContainerHeight, verticalAlignment: props.verticalAlignment, // Do string-to-int conversion for all timing-related props duration: this.convertTimingProp('duration'), delay: this.convertTimingProp('delay'), staggerDurationBy: this.convertTimingProp('staggerDurationBy'), staggerDelayBy: this.convertTimingProp('staggerDelayBy'), // Our enter/leave animations can be specified as boolean (default or // disabled), string (preset name), or object (actual animation values). // Let's standardize this so that they're always objects appearAnimation: this.convertAnimationProp(props.appearAnimation, _enterLeavePresets.appearPresets), enterAnimation: this.convertAnimationProp(props.enterAnimation, _enterLeavePresets.enterPresets), leaveAnimation: this.convertAnimationProp(props.leaveAnimation, _enterLeavePresets.leavePresets), delegated: {} }; this.checkForStatelessFunctionalComponents(workingProps.children); // Accept `disableAnimations`, but add a deprecation warning if (typeof props.disableAnimations !== 'undefined') { if (nodeEnv !== 'production') { (0, _errorMessages.deprecatedDisableAnimations)(); } workingProps.disableAllAnimations = props.disableAnimations; } // Gather any additional props; // they will be delegated to the ReactElement created. var primaryPropKeys = Object.keys(workingProps); var delegatedProps = (0, _helpers.omit)(this.props, primaryPropKeys); // The FlipMove container element needs to have a non-static position. // We use `relative` by default, but it can be overridden by the user. // Now that we're delegating props, we need to merge this in. delegatedProps.style = _extends({ position: 'relative' }, delegatedProps.style); workingProps.delegated = delegatedProps; return workingProps; } }, { key: 'convertTimingProp', value: function convertTimingProp(prop) { var rawValue = this.props[prop]; var value = typeof rawValue === 'number' ? rawValue : parseInt(rawValue, 10); if (isNaN(value)) { var defaultValue = FlipMovePropConverter.defaultProps[prop]; if (nodeEnv !== 'production') { (0, _errorMessages.invalidTypeForTimingProp)({ prop: prop, value: rawValue, defaultValue: defaultValue }); } return defaultValue; } return value; } // eslint-disable-next-line class-methods-use-this }, { key: 'convertAnimationProp', value: function convertAnimationProp(animation, presets) { switch (typeof animation === 'undefined' ? 'undefined' : _typeof(animation)) { case 'boolean': { // If it's true, we want to use the default preset. // If it's false, we want to use the 'none' preset. return presets[animation ? _enterLeavePresets.defaultPreset : _enterLeavePresets.disablePreset]; } case 'string': { var presetKeys = Object.keys(presets); if (presetKeys.indexOf(animation) === -1) { if (nodeEnv !== 'production') { (0, _errorMessages.invalidEnterLeavePreset)({ value: animation, acceptableValues: presetKeys.join(', '), defaultValue: _enterLeavePresets.defaultPreset }); } return presets[_enterLeavePresets.defaultPreset]; } return presets[animation]; } default: { return animation; } } } }, { key: 'render', value: function render() { return _react2.default.createElement(ComposedComponent, this.convertProps(this.props)); } }]); return FlipMovePropConverter; }(_react.Component), _class.defaultProps = { easing: 'ease-in-out', duration: 350, delay: 0, staggerDurationBy: 0, staggerDelayBy: 0, typeName: 'div', enterAnimation: _enterLeavePresets.defaultPreset, leaveAnimation: _enterLeavePresets.defaultPreset, disableAllAnimations: false, getPosition: function getPosition(node) { return node.getBoundingClientRect(); }, maintainContainerHeight: false, verticalAlignment: 'top' }, _temp; } exports.default = propConverter; module.exports = exports['default']; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }), /* 139 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function warnOnce(msg) { var hasWarned = false; return function () { if (!hasWarned) { console.warn(msg); hasWarned = true; } }; } var statelessFunctionalComponentSupplied = exports.statelessFunctionalComponentSupplied = warnOnce('\n>> Error, via react-flip-move <<\n\nYou provided a stateless functional component as a child to <FlipMove>. Unfortunately, SFCs aren\'t supported, because Flip Move needs access to the backing instances via refs, and SFCs don\'t have a public instance that holds that info.\n\nPlease wrap your components in a native element (eg. <div>), or a non-functional component.\n'); var invalidTypeForTimingProp = exports.invalidTypeForTimingProp = function invalidTypeForTimingProp(args) { return console.error('\n>> Error, via react-flip-move <<\n\nThe prop you provided for \'' + args.prop + '\' is invalid. It needs to be a positive integer, or a string that can be resolved to a number. The value you provided is \'' + args.value + '\'.\n\nAs a result, the default value for this parameter will be used, which is \'' + args.defaultValue + '\'.\n'); }; var deprecatedDisableAnimations = exports.deprecatedDisableAnimations = warnOnce('\n>> Warning, via react-flip-move <<\n\nThe \'disableAnimations\' prop you provided is deprecated. Please switch to use \'disableAllAnimations\'.\n\nThis will become a silent error in future versions of react-flip-move.\n'); var invalidEnterLeavePreset = exports.invalidEnterLeavePreset = function invalidEnterLeavePreset(args) { return console.error('\n>> Error, via react-flip-move <<\n\nThe enter/leave preset you provided is invalid. We don\'t currently have a \'' + args.value + ' preset.\'\n\nAcceptable values are ' + args.acceptableValues + '. The default value of \'' + args.defaultValue + '\' will be used.\n'); }; /***/ }), /* 140 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var enterPresets = exports.enterPresets = { elevator: { from: { transform: 'scale(0)', opacity: '0' }, to: { transform: '', opacity: '' } }, fade: { from: { opacity: '0' }, to: { opacity: '' } }, accordionVertical: { from: { transform: 'scaleY(0)', transformOrigin: 'center top' }, to: { transform: '', transformOrigin: 'center top' } }, accordionHorizontal: { from: { transform: 'scaleX(0)', transformOrigin: 'left center' }, to: { transform: '', transformOrigin: 'left center' } }, none: null }; /** * React Flip Move | enterLeavePresets * (c) 2016-present Joshua Comeau * * This contains the master list of presets available for enter/leave animations, * along with the mapping between preset and styles. */ var leavePresets = exports.leavePresets = { elevator: { from: { transform: 'scale(1)', opacity: '1' }, to: { transform: 'scale(0)', opacity: '0' } }, fade: { from: { opacity: '1' }, to: { opacity: '0' } }, accordionVertical: { from: { transform: 'scaleY(1)', transformOrigin: 'center top' }, to: { transform: 'scaleY(0)', transformOrigin: 'center top' } }, accordionHorizontal: { from: { transform: 'scaleX(1)', transformOrigin: 'left center' }, to: { transform: 'scaleX(0)', transformOrigin: 'left center' } }, none: null }; // For now, appearPresets will be identical to enterPresets. // Assigning a custom export in case we ever want to add appear-specific ones. var appearPresets = exports.appearPresets = enterPresets; // Embarrassingly enough, v2.0 launched with typo'ed preset names. // To avoid penning a new major version over something so inconsequential, // we're supporting both spellings. In a future version, these alternatives // may be deprecated. // $FlowFixMe enterPresets.accordianVertical = enterPresets.accordionVertical; // $FlowFixMe enterPresets.accordianHorizontal = enterPresets.accordionHorizontal; // $FlowFixMe leavePresets.accordianVertical = leavePresets.accordionVertical; // $FlowFixMe leavePresets.accordianHorizontal = leavePresets.accordionHorizontal; var defaultPreset = exports.defaultPreset = 'elevator'; var disablePreset = exports.disablePreset = 'none'; /***/ }), /* 141 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createTransitionString = exports.getNativeNode = exports.updateHeightPlaceholder = exports.removeNodeFromDOMFlow = exports.getPositionDelta = exports.getRelativeBoundingBox = undefined; 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; }; /** * React Flip Move * (c) 2016-present Joshua Comeau * * These methods read from and write to the DOM. * They almost always have side effects, and will hopefully become the * only spot in the codebase with impure functions. */ exports.applyStylesToDOMNode = applyStylesToDOMNode; exports.whichTransitionEvent = whichTransitionEvent; var _reactDom = __webpack_require__(4); var _helpers = __webpack_require__(46); function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function applyStylesToDOMNode(_ref) { var domNode = _ref.domNode, styles = _ref.styles; // Can't just do an object merge because domNode.styles is no regular object. // Need to do it this way for the engine to fire its `set` listeners. Object.keys(styles).forEach(function (key) { domNode.style.setProperty((0, _helpers.hyphenate)(key), styles[key]); }); } // Modified from Modernizr function whichTransitionEvent() { var transitions = { transition: 'transitionend', '-o-transition': 'oTransitionEnd', '-moz-transition': 'transitionend', '-webkit-transition': 'webkitTransitionEnd' }; // If we're running in a browserless environment (eg. SSR), it doesn't apply. // Return a placeholder string, for consistent type return. if (typeof document === 'undefined') return ''; var el = document.createElement('fakeelement'); var match = Object.keys(transitions).find(function (t) { return el.style.getPropertyValue(t) !== undefined; }); // If no `transition` is found, we must be running in a browser so ancient, // React itself won't run. Return an empty string, for consistent type return return match ? transitions[match] : ''; } var getRelativeBoundingBox = exports.getRelativeBoundingBox = function getRelativeBoundingBox(_ref2) { var childDomNode = _ref2.childDomNode, parentDomNode = _ref2.parentDomNode, getPosition = _ref2.getPosition; var parentBox = getPosition(parentDomNode); var _getPosition = getPosition(childDomNode), top = _getPosition.top, left = _getPosition.left, right = _getPosition.right, bottom = _getPosition.bottom, width = _getPosition.width, height = _getPosition.height; return { top: top - parentBox.top, left: left - parentBox.left, right: parentBox.right - right, bottom: parentBox.bottom - bottom, width: width, height: height }; }; /** getPositionDelta * This method returns the delta between two bounding boxes, to figure out * how many pixels on each axis the element has moved. * */ var getPositionDelta = exports.getPositionDelta = function getPositionDelta(_ref3) { var childDomNode = _ref3.childDomNode, childBoundingBox = _ref3.childBoundingBox, parentBoundingBox = _ref3.parentBoundingBox, getPosition = _ref3.getPosition; // TEMP: A mystery bug is sometimes causing unnecessary boundingBoxes to var defaultBox = { top: 0, left: 0, right: 0, bottom: 0, height: 0, width: 0 }; // Our old box is its last calculated position, derived on mount or at the // start of the previous animation. var oldRelativeBox = childBoundingBox || defaultBox; var parentBox = parentBoundingBox || defaultBox; // Our new box is the new final resting place: Where we expect it to wind up // after the animation. First we get the box in absolute terms (AKA relative // to the viewport), and then we calculate its relative box (relative to the // parent container) var newAbsoluteBox = getPosition(childDomNode); var newRelativeBox = { top: newAbsoluteBox.top - parentBox.top, left: newAbsoluteBox.left - parentBox.left }; return [oldRelativeBox.left - newRelativeBox.left, oldRelativeBox.top - newRelativeBox.top]; }; /** removeNodeFromDOMFlow * This method does something very sneaky: it removes a DOM node from the * document flow, but without actually changing its on-screen position. * * It works by calculating where the node is, and then applying styles * so that it winds up being positioned absolutely, but in exactly the * same place. * * This is a vital part of the FLIP technique. */ var removeNodeFromDOMFlow = exports.removeNodeFromDOMFlow = function removeNodeFromDOMFlow(childData, verticalAlignment) { var domNode = childData.domNode, boundingBox = childData.boundingBox; if (!domNode || !boundingBox) { return; } // For this to work, we have to offset any given `margin`. var computed = window.getComputedStyle(domNode); // We need to clean up margins, by converting and removing suffix: // eg. '21px' -> 21 var marginAttrs = ['margin-top', 'margin-left', 'margin-right']; var margins = marginAttrs.reduce(function (acc, margin) { var propertyVal = computed.getPropertyValue(margin); return _extends({}, acc, _defineProperty({}, margin, Number(propertyVal.replace('px', '')))); }, {}); // If we're bottom-aligned, we need to add the height of the child to its // top offset. This is because, when the container is bottom-aligned, its // height shrinks from the top, not the bottom. We're removing this node // from the flow, so the top is going to drop by its height. var topOffset = verticalAlignment === 'bottom' ? boundingBox.top - boundingBox.height : boundingBox.top; var styles = { position: 'absolute', top: topOffset - margins['margin-top'] + 'px', left: boundingBox.left - margins['margin-left'] + 'px', right: boundingBox.right - margins['margin-right'] + 'px' }; applyStylesToDOMNode({ domNode: domNode, styles: styles }); }; /** updateHeightPlaceholder * An optional property to FlipMove is a `maintainContainerHeight` boolean. * This property creates a node that fills space, so that the parent * container doesn't collapse when its children are removed from the * document flow. */ var updateHeightPlaceholder = exports.updateHeightPlaceholder = function updateHeightPlaceholder(_ref4) { var domNode = _ref4.domNode, parentData = _ref4.parentData, getPosition = _ref4.getPosition; var parentDomNode = parentData.domNode; var parentBoundingBox = parentData.boundingBox; if (!parentDomNode || !parentBoundingBox) { return; } // We need to find the height of the container *without* the placeholder. // Since it's possible that the placeholder might already be present, // we first set its height to 0. // This allows the container to collapse down to the size of just its // content (plus container padding or borders if any). applyStylesToDOMNode({ domNode: domNode, styles: { height: '0' } }); // Find the distance by which the container would be collapsed by elements // leaving. We compare the freshly-available parent height with the original, // cached container height. var originalParentHeight = parentBoundingBox.height; var collapsedParentHeight = getPosition(parentDomNode).height; var reductionInHeight = originalParentHeight - collapsedParentHeight; // If the container has become shorter, update the padding element's // height to take up the difference. Otherwise set its height to zero, // so that it has no effect. var styles = { height: reductionInHeight > 0 ? reductionInHeight + 'px' : '0' }; applyStylesToDOMNode({ domNode: domNode, styles: styles }); }; var getNativeNode = exports.getNativeNode = function getNativeNode(element) { // When running in a windowless environment, abort! if (typeof HTMLElement === 'undefined') { return null; } // `element` may already be a native node. if (element instanceof HTMLElement) { return element; } // While ReactDOM's `findDOMNode` is discouraged, it's the only // publicly-exposed way to find the underlying DOM node for // composite components. var foundNode = (0, _reactDom.findDOMNode)(element); if (!(foundNode instanceof HTMLElement)) { // Text nodes are not supported return null; } return foundNode; }; var createTransitionString = exports.createTransitionString = function createTransitionString(index, props) { var delay = props.delay, duration = props.duration; var staggerDurationBy = props.staggerDurationBy, staggerDelayBy = props.staggerDelayBy, easing = props.easing; delay += index * staggerDelayBy; duration += index * staggerDurationBy; var cssProperties = ['transform', 'opacity']; return cssProperties.map(function (prop) { return prop + ' ' + duration + 'ms ' + easing + ' ' + delay + 'ms'; }).join(', '); }; /***/ }), /* 142 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Autosize 3.0.21 license: MIT http://www.jacklmoore.com/autosize */ (function (global, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, module], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') { factory(exports, module); } else { var mod = { exports: {} }; factory(mod.exports, mod); global.autosize = mod.exports; } })(this, function (exports, module) { 'use strict'; var map = typeof Map === "function" ? new Map() : (function () { var keys = []; var values = []; return { has: function has(key) { return keys.indexOf(key) > -1; }, get: function get(key) { return values[keys.indexOf(key)]; }, set: function set(key, value) { if (keys.indexOf(key) === -1) { keys.push(key); values.push(value); } }, 'delete': function _delete(key) { var index = keys.indexOf(key); if (index > -1) { keys.splice(index, 1); values.splice(index, 1); } } }; })(); var createEvent = function createEvent(name) { return new Event(name, { bubbles: true }); }; try { new Event('test'); } catch (e) { // IE does not support `new Event()` createEvent = function (name) { var evt = document.createEvent('Event'); evt.initEvent(name, true, false); return evt; }; } function assign(ta) { if (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return; var heightOffset = null; var clientWidth = ta.clientWidth; var cachedHeight = null; function init() { var style = window.getComputedStyle(ta, null); if (style.resize === 'vertical') { ta.style.resize = 'none'; } else if (style.resize === 'both') { ta.style.resize = 'horizontal'; } if (style.boxSizing === 'content-box') { heightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom)); } else { heightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth); } // Fix when a textarea is not on document body and heightOffset is Not a Number if (isNaN(heightOffset)) { heightOffset = 0; } update(); } function changeOverflow(value) { { // Chrome/Safari-specific fix: // When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space // made available by removing the scrollbar. The following forces the necessary text reflow. var width = ta.style.width; ta.style.width = '0px'; // Force reflow: /* jshint ignore:start */ ta.offsetWidth; /* jshint ignore:end */ ta.style.width = width; } ta.style.overflowY = value; } function getParentOverflows(el) { var arr = []; while (el && el.parentNode && el.parentNode instanceof Element) { if (el.parentNode.scrollTop) { arr.push({ node: el.parentNode, scrollTop: el.parentNode.scrollTop }); } el = el.parentNode; } return arr; } function resize() { var originalHeight = ta.style.height; var overflows = getParentOverflows(ta); var docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240) ta.style.height = 'auto'; var endHeight = ta.scrollHeight + heightOffset; if (ta.scrollHeight === 0) { // If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM. ta.style.height = originalHeight; return; } ta.style.height = endHeight + 'px'; // used to check if an update is actually necessary on window.resize clientWidth = ta.clientWidth; // prevents scroll-position jumping overflows.forEach(function (el) { el.node.scrollTop = el.scrollTop; }); if (docTop) { document.documentElement.scrollTop = docTop; } } function update() { resize(); var styleHeight = Math.round(parseFloat(ta.style.height)); var computed = window.getComputedStyle(ta, null); // Using offsetHeight as a replacement for computed.height in IE, because IE does not account use of border-box var actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(computed.height)) : ta.offsetHeight; // The actual height not matching the style height (set via the resize method) indicates that // the max-height has been exceeded, in which case the overflow should be allowed. if (actualHeight !== styleHeight) { if (computed.overflowY === 'hidden') { changeOverflow('scroll'); resize(); actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight; } } else { // Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands. if (computed.overflowY !== 'hidden') { changeOverflow('hidden'); resize(); actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight; } } if (cachedHeight !== actualHeight) { cachedHeight = actualHeight; var evt = createEvent('autosize:resized'); try { ta.dispatchEvent(evt); } catch (err) { // Firefox will throw an error on dispatchEvent for a detached element // https://bugzilla.mozilla.org/show_bug.cgi?id=889376 } } } var pageResize = function pageResize() { if (ta.clientWidth !== clientWidth) { update(); } }; var destroy = (function (style) { window.removeEventListener('resize', pageResize, false); ta.removeEventListener('input', update, false); ta.removeEventListener('keyup', update, false); ta.removeEventListener('autosize:destroy', destroy, false); ta.removeEventListener('autosize:update', update, false); Object.keys(style).forEach(function (key) { ta.style[key] = style[key]; }); map['delete'](ta); }).bind(ta, { height: ta.style.height, resize: ta.style.resize, overflowY: ta.style.overflowY, overflowX: ta.style.overflowX, wordWrap: ta.style.wordWrap }); ta.addEventListener('autosize:destroy', destroy, false); // IE9 does not fire onpropertychange or oninput for deletions, // so binding to onkeyup to catch most of those events. // There is no way that I know of to detect something like 'cut' in IE9. if ('onpropertychange' in ta && 'oninput' in ta) { ta.addEventListener('keyup', update, false); } window.addEventListener('resize', pageResize, false); ta.addEventListener('input', update, false); ta.addEventListener('autosize:update', update, false); ta.style.overflowX = 'hidden'; ta.style.wordWrap = 'break-word'; map.set(ta, { destroy: destroy, update: update }); init(); } function destroy(ta) { var methods = map.get(ta); if (methods) { methods.destroy(); } } function update(ta) { var methods = map.get(ta); if (methods) { methods.update(); } } var autosize = null; // Do nothing in Node.js environment and IE8 (or lower) if (typeof window === 'undefined' || typeof window.getComputedStyle !== 'function') { autosize = function (el) { return el; }; autosize.destroy = function (el) { return el; }; autosize.update = function (el) { return el; }; } else { autosize = function (el, options) { if (el) { Array.prototype.forEach.call(el.length ? el : [el], function (x) { return assign(x, options); }); } return el; }; autosize.destroy = function (el) { if (el) { Array.prototype.forEach.call(el.length ? el : [el], destroy); } return el; }; autosize.update = function (el) { if (el) { Array.prototype.forEach.call(el.length ? el : [el], update); } return el; }; } module.exports = autosize; }); /***/ }), /* 143 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function (language) { return new _polyglot2.default({ phrases: i18nMap[language] || i18nMap.en, locale: language }); }; var _polyglot = __webpack_require__(144); var _polyglot2 = _interopRequireDefault(_polyglot); var _zhCN = __webpack_require__(145); var _zhCN2 = _interopRequireDefault(_zhCN); var _zhTW = __webpack_require__(146); var _zhTW2 = _interopRequireDefault(_zhTW); var _en = __webpack_require__(147); var _en2 = _interopRequireDefault(_en); var _esES = __webpack_require__(148); var _esES2 = _interopRequireDefault(_esES); var _fr = __webpack_require__(149); var _fr2 = _interopRequireDefault(_fr); var _ru = __webpack_require__(150); var _ru2 = _interopRequireDefault(_ru); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var i18nMap = { 'zh': _zhCN2.default, 'zh-CN': _zhCN2.default, 'zh-TW': _zhTW2.default, 'en': _en2.default, 'es-ES': _esES2.default, 'fr': _fr2.default, 'ru': _ru2.default }; /***/ }), /* 144 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// (c) 2012 Airbnb, Inc. // // polyglot.js may be freely distributed under the terms of the BSD // license. For all licensing information, details, and documention: // http://airbnb.github.com/polyglot.js // // // Polyglot.js is an I18n helper library written in JavaScript, made to // work both in the browser and in Node. It provides a simple solution for // interpolation and pluralization, based off of Airbnb's // experience adding I18n functionality to its Backbone.js and Node apps. // // Polylglot is agnostic to your translation backend. It doesn't perform any // translation; it simply gives you a way to manage translated phrases from // your client- or server-side JavaScript application. // (function(root, factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function() { return factory(root); }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (typeof exports === 'object') { module.exports = factory(root); } else { root.Polyglot = factory(root); } }(this, function(root) { 'use strict'; // ### Polyglot class constructor function Polyglot(options) { options = options || {}; this.phrases = {}; this.extend(options.phrases || {}); this.currentLocale = options.locale || 'en'; this.allowMissing = !!options.allowMissing; this.warn = options.warn || warn; } // ### Version Polyglot.VERSION = '0.4.3'; // ### polyglot.locale([locale]) // // Get or set locale. Internally, Polyglot only uses locale for pluralization. Polyglot.prototype.locale = function(newLocale) { if (newLocale) this.currentLocale = newLocale; return this.currentLocale; }; // ### polyglot.extend(phrases) // // Use `extend` to tell Polyglot how to translate a given key. // // polyglot.extend({ // "hello": "Hello", // "hello_name": "Hello, %{name}" // }); // // The key can be any string. Feel free to call `extend` multiple times; // it will override any phrases with the same key, but leave existing phrases // untouched. // // It is also possible to pass nested phrase objects, which get flattened // into an object with the nested keys concatenated using dot notation. // // polyglot.extend({ // "nav": { // "hello": "Hello", // "hello_name": "Hello, %{name}", // "sidebar": { // "welcome": "Welcome" // } // } // }); // // console.log(polyglot.phrases); // // { // // 'nav.hello': 'Hello', // // 'nav.hello_name': 'Hello, %{name}', // // 'nav.sidebar.welcome': 'Welcome' // // } // // `extend` accepts an optional second argument, `prefix`, which can be used // to prefix every key in the phrases object with some string, using dot // notation. // // polyglot.extend({ // "hello": "Hello", // "hello_name": "Hello, %{name}" // }, "nav"); // // console.log(polyglot.phrases); // // { // // 'nav.hello': 'Hello', // // 'nav.hello_name': 'Hello, %{name}' // // } // // This feature is used internally to support nested phrase objects. Polyglot.prototype.extend = function(morePhrases, prefix) { var phrase; for (var key in morePhrases) { if (morePhrases.hasOwnProperty(key)) { phrase = morePhrases[key]; if (prefix) key = prefix + '.' + key; if (typeof phrase === 'object') { this.extend(phrase, key); } else { this.phrases[key] = phrase; } } } }; // ### polyglot.clear() // // Clears all phrases. Useful for special cases, such as freeing // up memory if you have lots of phrases but no longer need to // perform any translation. Also used internally by `replace`. Polyglot.prototype.clear = function() { this.phrases = {}; }; // ### polyglot.replace(phrases) // // Completely replace the existing phrases with a new set of phrases. // Normally, just use `extend` to add more phrases, but under certain // circumstances, you may want to make sure no old phrases are lying around. Polyglot.prototype.replace = function(newPhrases) { this.clear(); this.extend(newPhrases); }; // ### polyglot.t(key, options) // // The most-used method. Provide a key, and `t` will return the // phrase. // // polyglot.t("hello"); // => "Hello" // // The phrase value is provided first by a call to `polyglot.extend()` or // `polyglot.replace()`. // // Pass in an object as the second argument to perform interpolation. // // polyglot.t("hello_name", {name: "Spike"}); // => "Hello, Spike" // // If you like, you can provide a default value in case the phrase is missing. // Use the special option key "_" to specify a default. // // polyglot.t("i_like_to_write_in_language", { // _: "I like to write in %{language}.", // language: "JavaScript" // }); // => "I like to write in JavaScript." // Polyglot.prototype.t = function(key, options) { var phrase, result; options = options == null ? {} : options; // allow number as a pluralization shortcut if (typeof options === 'number') { options = {smart_count: options}; } if (typeof this.phrases[key] === 'string') { phrase = this.phrases[key]; } else if (typeof options._ === 'string') { phrase = options._; } else if (this.allowMissing) { phrase = key; } else { this.warn('Missing translation for key: "'+key+'"'); result = key; } if (typeof phrase === 'string') { options = clone(options); result = choosePluralForm(phrase, this.currentLocale, options.smart_count); result = interpolate(result, options); } return result; }; // ### polyglot.has(key) // // Check if polyglot has a translation for given key Polyglot.prototype.has = function(key) { return key in this.phrases; }; // #### Pluralization methods // The string that separates the different phrase possibilities. var delimeter = '||||'; // Mapping from pluralization group plural logic. var pluralTypes = { chinese: function(n) { return 0; }, german: function(n) { return n !== 1 ? 1 : 0; }, french: function(n) { return n > 1 ? 1 : 0; }, russian: function(n) { return n % 10 === 1 && n % 100 !== 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2; }, czech: function(n) { return (n === 1) ? 0 : (n >= 2 && n <= 4) ? 1 : 2; }, polish: function(n) { return (n === 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2); }, icelandic: function(n) { return (n % 10 !== 1 || n % 100 === 11) ? 1 : 0; } }; // Mapping from pluralization group to individual locales. var pluralTypeToLanguages = { chinese: ['fa', 'id', 'ja', 'ko', 'lo', 'ms', 'th', 'tr', 'zh'], german: ['da', 'de', 'en', 'es', 'fi', 'el', 'he', 'hu', 'it', 'nl', 'no', 'pt', 'sv'], french: ['fr', 'tl', 'pt-br'], russian: ['hr', 'ru'], czech: ['cs'], polish: ['pl'], icelandic: ['is'] }; function langToTypeMap(mapping) { var type, langs, l, ret = {}; for (type in mapping) { if (mapping.hasOwnProperty(type)) { langs = mapping[type]; for (l in langs) { ret[langs[l]] = type; } } } return ret; } // Trim a string. function trim(str){ var trimRe = /^\s+|\s+$/g; return str.replace(trimRe, ''); } // Based on a phrase text that contains `n` plural forms separated // by `delimeter`, a `locale`, and a `count`, choose the correct // plural form, or none if `count` is `null`. function choosePluralForm(text, locale, count){ var ret, texts, chosenText; if (count != null && text) { texts = text.split(delimeter); chosenText = texts[pluralTypeIndex(locale, count)] || texts[0]; ret = trim(chosenText); } else { ret = text; } return ret; } function pluralTypeName(locale) { var langToPluralType = langToTypeMap(pluralTypeToLanguages); return langToPluralType[locale] || langToPluralType.en; } function pluralTypeIndex(locale, count) { return pluralTypes[pluralTypeName(locale)](count); } // ### interpolate // // Does the dirty work. Creates a `RegExp` object for each // interpolation placeholder. function interpolate(phrase, options) { for (var arg in options) { if (arg !== '_' && options.hasOwnProperty(arg)) { // We create a new `RegExp` each time instead of using a more-efficient // string replace so that the same argument can be replaced multiple times // in the same phrase. phrase = phrase.replace(new RegExp('%\\{'+arg+'\\}', 'g'), options[arg]); } } return phrase; } // ### warn // // Provides a warning in the console if a phrase key is missing. function warn(message) { root.console && root.console.warn && root.console.warn('WARNING: ' + message); } // ### clone // // Clone an object. function clone(source) { var ret = {}; for (var prop in source) { ret[prop] = source[prop]; } return ret; } return Polyglot; })); /***/ }), /* 145 */ /***/ (function(module, exports) { module.exports = { "init": "Gitalk 加载中 ...", "no-found-related": "未找到相关的 %{link} 进行评论", "please-contact": "请联系 %{user} 初始化创建", "init-issue": "初始化 Issue", "leave-a-comment": "说点什么", "comment": "评论", "support-markdown": "支持 Markdown 语法", "login-with-github": "使用 Github 登录", "first-comment-person": "来做第一个留言的人吧!", "commented": "发表于", "load-more": "加载更多", "counts": "%{counts} 条评论", "sort-asc": "从旧到新排序", "sort-desc": "从新到旧排序", "logout": "注销", "anonymous": "未登录用户" }; /***/ }), /* 146 */ /***/ (function(module, exports) { module.exports = { "init": "Gitalk 載入中…", "no-found-related": "未找到相關的 %{link}", "please-contact": "請聯絡 %{user} 初始化評論", "init-issue": "初始化 Issue", "leave-a-comment": "寫點什麼", "comment": "評論", "support-markdown": "支援 Markdown 語法", "login-with-github": "使用 Github 登入", "first-comment-person": "成為首個留言的人吧!", "commented": "評論於", "load-more": "載入更多", "counts": "%{counts} 筆評論", "sort-asc": "從舊至新排序", "sort-desc": "從新至舊排序", "logout": "登出", "anonymous": "訪客" }; /***/ }), /* 147 */ /***/ (function(module, exports) { module.exports = { "init": "Gitalking ...", "no-found-related": "Related %{link} not found", "please-contact": "Please contact %{user} to initialize the comment", "init-issue": "Init Issue", "leave-a-comment": "Leave a comment", "comment": "Comment", "support-markdown": "Markdown is supported", "login-with-github": "Login with Github", "first-comment-person": "Be the first guy leaving a comment!", "commented": "commented", "load-more": "Load more", "counts": "%{counts} comment |||| %{counts} comments", "sort-asc": "Sort by Oldest", "sort-desc": "Sort by Latest", "logout": "Logout", "anonymous": "Anonymous" }; /***/ }), /* 148 */ /***/ (function(module, exports) { module.exports = { "init": "Gitalking ...", "no-found-related": "Link %{link} no encontrado", "please-contact": "Por favor contacta con %{user} para inicializar el comentario", "init-issue": "Iniciar Issue", "leave-a-comment": "Deja un comentario", "comment": "Comentario", "support-markdown": "Markdown es soportado", "login-with-github": "Entrar con Github", "first-comment-person": "Sé el primero en dejar un comentario!", "commented": "comentó", "load-more": "Cargar más", "counts": "%{counts} comentario |||| %{counts} comentarios", "sort-asc": "Ordenar por Antiguos", "sort-desc": "Ordenar por Recientes", "logout": "Salir", "anonymous": "Anónimo" }; /***/ }), /* 149 */ /***/ (function(module, exports) { module.exports = { "init": "Gitalking ...", "no-found-related": "Lien %{link} non trouvé", "please-contact": "S’il vous plaît contactez %{user} pour initialiser les commentaires", "init-issue": "Initialisation des issues", "leave-a-comment": "Laisser un commentaire", "comment": "Commentaire", "support-markdown": "Markdown est supporté", "login-with-github": "Se connecter avec Github", "first-comment-person": "Être le premier à laisser un commentaire !", "commented": "commenter", "load-more": "Charger plus", "counts": "%{counts} commentaire |||| %{counts} commentaires", "sort-asc": "Trier par plus ancien", "sort-desc": "Trier par plus récent", "logout": "Déconnexion", "anonymous": "Anonyme" }; /***/ }), /* 150 */ /***/ (function(module, exports) { module.exports = { "init": "Gitalking ...", "no-found-related": "Связанные %{link} не найдены", "please-contact": "Пожалуйста, свяжитесь с %{user} чтобы инициализировать комментарий", "init-issue": "Выпуск инициализации", "leave-a-comment": "Оставить комментарий", "comment": "Комментарий", "support-markdown": "Поддерживается Markdown", "login-with-github": "Вход через Github", "first-comment-person": "Будьте первым, кто оставил комментарий", "commented": "прокомментированный", "load-more": "Загрузить ещё", "counts": "%{counts} комментарий |||| %{counts} комментарьев", "sort-asc": "Сортировать по старым", "sort-desc": "Сортировать по последним", "logout": "Выход", "anonymous": "Анонимный" }; /***/ }), /* 151 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /* 152 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(153), __esModule: true }; /***/ }), /* 153 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(154); module.exports = __webpack_require__(0).Object.keys; /***/ }), /* 154 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 Object.keys(O) var toObject = __webpack_require__(22) , $keys = __webpack_require__(17); __webpack_require__(63)('keys', function(){ return function keys(it){ return $keys(toObject(it)); }; }); /***/ }), /* 155 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _isIterable2 = __webpack_require__(156); var _isIterable3 = _interopRequireDefault(_isIterable2); var _getIterator2 = __webpack_require__(159); var _getIterator3 = _interopRequireDefault(_getIterator2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if ((0, _isIterable3.default)(Object(arr))) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); /***/ }), /* 156 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(157), __esModule: true }; /***/ }), /* 157 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(26); __webpack_require__(20); module.exports = __webpack_require__(158); /***/ }), /* 158 */ /***/ (function(module, exports, __webpack_require__) { var classof = __webpack_require__(41) , ITERATOR = __webpack_require__(1)('iterator') , Iterators = __webpack_require__(16); module.exports = __webpack_require__(0).isIterable = function(it){ var O = Object(it); return O[ITERATOR] !== undefined || '@@iterator' in O || Iterators.hasOwnProperty(classof(O)); }; /***/ }), /* 159 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(160), __esModule: true }; /***/ }), /* 160 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(26); __webpack_require__(20); module.exports = __webpack_require__(161); /***/ }), /* 161 */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(8) , get = __webpack_require__(42); module.exports = __webpack_require__(0).getIterator = function(it){ var iterFn = get(it); if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); return anObject(iterFn.call(it)); }; /***/ }), /* 162 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(163); /***/ }), /* 163 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(3); var bind = __webpack_require__(68); var Axios = __webpack_require__(165); var defaults = __webpack_require__(47); /** * Create an instance of Axios * * @param {Object} defaultConfig The default config for the instance * @return {Axios} A new instance of Axios */ function createInstance(defaultConfig) { var context = new Axios(defaultConfig); var instance = bind(Axios.prototype.request, context); // Copy axios.prototype to instance utils.extend(instance, Axios.prototype, context); // Copy context to instance utils.extend(instance, context); return instance; } // Create the default instance to be exported var axios = createInstance(defaults); // Expose Axios class to allow class inheritance axios.Axios = Axios; // Factory for creating new instances axios.create = function create(instanceConfig) { return createInstance(utils.merge(defaults, instanceConfig)); }; // Expose Cancel & CancelToken axios.Cancel = __webpack_require__(72); axios.CancelToken = __webpack_require__(179); axios.isCancel = __webpack_require__(71); // Expose all/spread axios.all = function all(promises) { return Promise.all(promises); }; axios.spread = __webpack_require__(180); module.exports = axios; // Allow use of default import syntax in TypeScript module.exports.default = axios; /***/ }), /* 164 */ /***/ (function(module, exports) { /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh <[email protected]> <http://feross.org> * @license MIT */ // The _isBuffer check is for Safari 5-7 support, because it's missing // Object.prototype.constructor. Remove this eventually module.exports = function (obj) { return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) } function isBuffer (obj) { return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) } // For Node v0.10 support. Remove this eventually. function isSlowBuffer (obj) { return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) } /***/ }), /* 165 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var defaults = __webpack_require__(47); var utils = __webpack_require__(3); var InterceptorManager = __webpack_require__(174); var dispatchRequest = __webpack_require__(175); var isAbsoluteURL = __webpack_require__(177); var combineURLs = __webpack_require__(178); /** * Create a new instance of Axios * * @param {Object} instanceConfig The default config for the instance */ function Axios(instanceConfig) { this.defaults = instanceConfig; this.interceptors = { request: new InterceptorManager(), response: new InterceptorManager() }; } /** * Dispatch a request * * @param {Object} config The config specific for this request (merged with this.defaults) */ Axios.prototype.request = function request(config) { /*eslint no-param-reassign:0*/ // Allow for axios('example/url'[, config]) a la fetch API if (typeof config === 'string') { config = utils.merge({ url: arguments[0] }, arguments[1]); } config = utils.merge(defaults, this.defaults, { method: 'get' }, config); config.method = config.method.toLowerCase(); // Support baseURL config if (config.baseURL && !isAbsoluteURL(config.url)) { config.url = combineURLs(config.baseURL, config.url); } // Hook up interceptors middleware var chain = [dispatchRequest, undefined]; var promise = Promise.resolve(config); this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { chain.unshift(interceptor.fulfilled, interceptor.rejected); }); this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { chain.push(interceptor.fulfilled, interceptor.rejected); }); while (chain.length) { promise = promise.then(chain.shift(), chain.shift()); } return promise; }; // Provide aliases for supported request methods utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { /*eslint func-names:0*/ Axios.prototype[method] = function(url, config) { return this.request(utils.merge(config || {}, { method: method, url: url })); }; }); utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { /*eslint func-names:0*/ Axios.prototype[method] = function(url, data, config) { return this.request(utils.merge(config || {}, { method: method, url: url, data: data })); }; }); module.exports = Axios; /***/ }), /* 166 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(3); module.exports = function normalizeHeaderName(headers, normalizedName) { utils.forEach(headers, function processHeader(value, name) { if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { headers[normalizedName] = value; delete headers[name]; } }); }; /***/ }), /* 167 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var createError = __webpack_require__(70); /** * Resolve or reject a Promise based on response status. * * @param {Function} resolve A function that resolves the promise. * @param {Function} reject A function that rejects the promise. * @param {object} response The response. */ module.exports = function settle(resolve, reject, response) { var validateStatus = response.config.validateStatus; // Note: status is not exposed by XDomainRequest if (!response.status || !validateStatus || validateStatus(response.status)) { resolve(response); } else { reject(createError( 'Request failed with status code ' + response.status, response.config, null, response.request, response )); } }; /***/ }), /* 168 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Update an Error with the specified config, error code, and response. * * @param {Error} error The error to update. * @param {Object} config The config. * @param {string} [code] The error code (for example, 'ECONNABORTED'). * @param {Object} [request] The request. * @param {Object} [response] The response. * @returns {Error} The error. */ module.exports = function enhanceError(error, config, code, request, response) { error.config = config; if (code) { error.code = code; } error.request = request; error.response = response; return error; }; /***/ }), /* 169 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(3); function encode(val) { return encodeURIComponent(val). replace(/%40/gi, '@'). replace(/%3A/gi, ':'). replace(/%24/g, '$'). replace(/%2C/gi, ','). replace(/%20/g, '+'). replace(/%5B/gi, '['). replace(/%5D/gi, ']'); } /** * Build a URL by appending params to the end * * @param {string} url The base of the url (e.g., http://www.google.com) * @param {object} [params] The params to be appended * @returns {string} The formatted url */ module.exports = function buildURL(url, params, paramsSerializer) { /*eslint no-param-reassign:0*/ if (!params) { return url; } var serializedParams; if (paramsSerializer) { serializedParams = paramsSerializer(params); } else if (utils.isURLSearchParams(params)) { serializedParams = params.toString(); } else { var parts = []; utils.forEach(params, function serialize(val, key) { if (val === null || typeof val === 'undefined') { return; } if (utils.isArray(val)) { key = key + '[]'; } if (!utils.isArray(val)) { val = [val]; } utils.forEach(val, function parseValue(v) { if (utils.isDate(v)) { v = v.toISOString(); } else if (utils.isObject(v)) { v = JSON.stringify(v); } parts.push(encode(key) + '=' + encode(v)); }); }); serializedParams = parts.join('&'); } if (serializedParams) { url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; } return url; }; /***/ }), /* 170 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(3); /** * Parse headers into an object * * ``` * Date: Wed, 27 Aug 2014 08:58:49 GMT * Content-Type: application/json * Connection: keep-alive * Transfer-Encoding: chunked * ``` * * @param {String} headers Headers needing to be parsed * @returns {Object} Headers parsed into an object */ module.exports = function parseHeaders(headers) { var parsed = {}; var key; var val; var i; if (!headers) { return parsed; } utils.forEach(headers.split('\n'), function parser(line) { i = line.indexOf(':'); key = utils.trim(line.substr(0, i)).toLowerCase(); val = utils.trim(line.substr(i + 1)); if (key) { parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; } }); return parsed; }; /***/ }), /* 171 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(3); module.exports = ( utils.isStandardBrowserEnv() ? // Standard browser envs have full support of the APIs needed to test // whether the request URL is of the same origin as current location. (function standardBrowserEnv() { var msie = /(msie|trident)/i.test(navigator.userAgent); var urlParsingNode = document.createElement('a'); var originURL; /** * Parse a URL to discover it's components * * @param {String} url The URL to be parsed * @returns {Object} */ function resolveURL(url) { var href = url; if (msie) { // IE needs attribute set twice to normalize properties urlParsingNode.setAttribute('href', href); href = urlParsingNode.href; } urlParsingNode.setAttribute('href', href); // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils return { href: urlParsingNode.href, protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', host: urlParsingNode.host, search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', hostname: urlParsingNode.hostname, port: urlParsingNode.port, pathname: (urlParsingNode.pathname.charAt(0) === '/') ? urlParsingNode.pathname : '/' + urlParsingNode.pathname }; } originURL = resolveURL(window.location.href); /** * Determine if a URL shares the same origin as the current location * * @param {String} requestURL The URL to test * @returns {boolean} True if URL shares the same origin, otherwise false */ return function isURLSameOrigin(requestURL) { var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; return (parsed.protocol === originURL.protocol && parsed.host === originURL.host); }; })() : // Non standard browser envs (web workers, react-native) lack needed support. (function nonStandardBrowserEnv() { return function isURLSameOrigin() { return true; }; })() ); /***/ }), /* 172 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; function E() { this.message = 'String contains an invalid character'; } E.prototype = new Error; E.prototype.code = 5; E.prototype.name = 'InvalidCharacterError'; function btoa(input) { var str = String(input); var output = ''; for ( // initialize result and counter var block, charCode, idx = 0, map = chars; // if the next str index does not exist: // change the mapping table to "=" // check if d has no fractional digits str.charAt(idx | 0) || (map = '=', idx % 1); // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8 output += map.charAt(63 & block >> 8 - idx % 1 * 8) ) { charCode = str.charCodeAt(idx += 3 / 4); if (charCode > 0xFF) { throw new E(); } block = block << 8 | charCode; } return output; } module.exports = btoa; /***/ }), /* 173 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(3); module.exports = ( utils.isStandardBrowserEnv() ? // Standard browser envs support document.cookie (function standardBrowserEnv() { return { write: function write(name, value, expires, path, domain, secure) { var cookie = []; cookie.push(name + '=' + encodeURIComponent(value)); if (utils.isNumber(expires)) { cookie.push('expires=' + new Date(expires).toGMTString()); } if (utils.isString(path)) { cookie.push('path=' + path); } if (utils.isString(domain)) { cookie.push('domain=' + domain); } if (secure === true) { cookie.push('secure'); } document.cookie = cookie.join('; '); }, read: function read(name) { var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); return (match ? decodeURIComponent(match[3]) : null); }, remove: function remove(name) { this.write(name, '', Date.now() - 86400000); } }; })() : // Non standard browser env (web workers, react-native) lack needed support. (function nonStandardBrowserEnv() { return { write: function write() {}, read: function read() { return null; }, remove: function remove() {} }; })() ); /***/ }), /* 174 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(3); function InterceptorManager() { this.handlers = []; } /** * Add a new interceptor to the stack * * @param {Function} fulfilled The function to handle `then` for a `Promise` * @param {Function} rejected The function to handle `reject` for a `Promise` * * @return {Number} An ID used to remove interceptor later */ InterceptorManager.prototype.use = function use(fulfilled, rejected) { this.handlers.push({ fulfilled: fulfilled, rejected: rejected }); return this.handlers.length - 1; }; /** * Remove an interceptor from the stack * * @param {Number} id The ID that was returned by `use` */ InterceptorManager.prototype.eject = function eject(id) { if (this.handlers[id]) { this.handlers[id] = null; } }; /** * Iterate over all the registered interceptors * * This method is particularly useful for skipping over any * interceptors that may have become `null` calling `eject`. * * @param {Function} fn The function to call for each interceptor */ InterceptorManager.prototype.forEach = function forEach(fn) { utils.forEach(this.handlers, function forEachHandler(h) { if (h !== null) { fn(h); } }); }; module.exports = InterceptorManager; /***/ }), /* 175 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(3); var transformData = __webpack_require__(176); var isCancel = __webpack_require__(71); var defaults = __webpack_require__(47); /** * Throws a `Cancel` if cancellation has been requested. */ function throwIfCancellationRequested(config) { if (config.cancelToken) { config.cancelToken.throwIfRequested(); } } /** * Dispatch a request to the server using the configured adapter. * * @param {object} config The config that is to be used for the request * @returns {Promise} The Promise to be fulfilled */ module.exports = function dispatchRequest(config) { throwIfCancellationRequested(config); // Ensure headers exist config.headers = config.headers || {}; // Transform request data config.data = transformData( config.data, config.headers, config.transformRequest ); // Flatten headers config.headers = utils.merge( config.headers.common || {}, config.headers[config.method] || {}, config.headers || {} ); utils.forEach( ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function cleanHeaderConfig(method) { delete config.headers[method]; } ); var adapter = config.adapter || defaults.adapter; return adapter(config).then(function onAdapterResolution(response) { throwIfCancellationRequested(config); // Transform response data response.data = transformData( response.data, response.headers, config.transformResponse ); return response; }, function onAdapterRejection(reason) { if (!isCancel(reason)) { throwIfCancellationRequested(config); // Transform response data if (reason && reason.response) { reason.response.data = transformData( reason.response.data, reason.response.headers, config.transformResponse ); } } return Promise.reject(reason); }); }; /***/ }), /* 176 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(3); /** * Transform the data for a request or a response * * @param {Object|String} data The data to be transformed * @param {Array} headers The headers for the request or response * @param {Array|Function} fns A single function or Array of functions * @returns {*} The resulting transformed data */ module.exports = function transformData(data, headers, fns) { /*eslint no-param-reassign:0*/ utils.forEach(fns, function transform(fn) { data = fn(data, headers); }); return data; }; /***/ }), /* 177 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Determines whether the specified URL is absolute * * @param {string} url The URL to test * @returns {boolean} True if the specified URL is absolute, otherwise false */ module.exports = function isAbsoluteURL(url) { // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL). // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed // by any combination of letters, digits, plus, period, or hyphen. return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); }; /***/ }), /* 178 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Creates a new URL by combining the specified URLs * * @param {string} baseURL The base URL * @param {string} relativeURL The relative URL * @returns {string} The combined URL */ module.exports = function combineURLs(baseURL, relativeURL) { return relativeURL ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL; }; /***/ }), /* 179 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var Cancel = __webpack_require__(72); /** * A `CancelToken` is an object that can be used to request cancellation of an operation. * * @class * @param {Function} executor The executor function. */ function CancelToken(executor) { if (typeof executor !== 'function') { throw new TypeError('executor must be a function.'); } var resolvePromise; this.promise = new Promise(function promiseExecutor(resolve) { resolvePromise = resolve; }); var token = this; executor(function cancel(message) { if (token.reason) { // Cancellation has already been requested return; } token.reason = new Cancel(message); resolvePromise(token.reason); }); } /** * Throws a `Cancel` if cancellation has been requested. */ CancelToken.prototype.throwIfRequested = function throwIfRequested() { if (this.reason) { throw this.reason; } }; /** * Returns an object that contains a new `CancelToken` and a function that, when called, * cancels the `CancelToken`. */ CancelToken.source = function source() { var cancel; var token = new CancelToken(function executor(c) { cancel = c; }); return { token: token, cancel: cancel }; }; module.exports = CancelToken; /***/ }), /* 180 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Syntactic sugar for invoking a function and expanding an array for arguments. * * Common use case would be to use `Function.prototype.apply`. * * ```js * function f(x, y, z) {} * var args = [1, 2, 3]; * f.apply(null, args); * ``` * * With `spread` this example can be re-written. * * ```js * spread(function(x, y, z) {})([1, 2, 3]); * ``` * * @param {Function} callback * @returns {Function} */ module.exports = function spread(callback) { return function wrap(arr) { return callback.apply(null, arr); }; }; /***/ }), /* 181 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (_ref) { var className = _ref.className, getRef = _ref.getRef, onClick = _ref.onClick, onMouseDown = _ref.onMouseDown, text = _ref.text, isLoading = _ref.isLoading; return _react2.default.createElement( "button", { ref: function ref(el) { return getRef && getRef(el); }, className: "gt-btn " + className, onClick: onClick, onMouseDown: onMouseDown }, _react2.default.createElement( "span", { className: "gt-btn-text" }, text ), isLoading && _react2.default.createElement("span", { className: "gt-btn-loading gt-spinner" }) ); }; /***/ }), /* 182 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (_ref) { var className = _ref.className, onClick = _ref.onClick, text = _ref.text; return _react2.default.createElement( "a", { className: "gt-action " + className, onClick: onClick }, _react2.default.createElement( "span", { className: "gt-action-text" }, text ) ); }; /***/ }), /* 183 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _avatar = __webpack_require__(73); var _avatar2 = _interopRequireDefault(_avatar); var _svg = __webpack_require__(74); var _svg2 = _interopRequireDefault(_svg); var _distance_in_words_to_now = __webpack_require__(192); var _distance_in_words_to_now2 = _interopRequireDefault(_distance_in_words_to_now); var _index = __webpack_require__(205); var _index2 = _interopRequireDefault(_index); var _index3 = __webpack_require__(206); var _index4 = _interopRequireDefault(_index3); var _index5 = __webpack_require__(207); var _index6 = _interopRequireDefault(_index5); var _index7 = __webpack_require__(208); var _index8 = _interopRequireDefault(_index7); var _index9 = __webpack_require__(209); var _index10 = _interopRequireDefault(_index9); __webpack_require__(210); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var ZHCN = (0, _index2.default)(); var ZHTW = (0, _index4.default)(); var ES = (0, _index6.default)(); var FR = (0, _index8.default)(); var RU = (0, _index10.default)(); window.GT_i18n_distanceInWordsLocaleMap = { 'zh': ZHCN, 'zh-CN': ZHCN, 'zh-TW': ZHTW, 'es-ES': ES, 'fr': FR, 'ru': RU }; exports.default = function (_ref) { var comment = _ref.comment, user = _ref.user, language = _ref.language, _ref$commentedText = _ref.commentedText, commentedText = _ref$commentedText === undefined ? '' : _ref$commentedText, _ref$admin = _ref.admin, admin = _ref$admin === undefined ? [] : _ref$admin, replyCallback = _ref.replyCallback, likeCallback = _ref.likeCallback; var enableEdit = user && comment.user.login === user.login; var isAdmin = ~[].concat(admin).map(function (a) { return a.toLowerCase(); }).indexOf(comment.user.login.toLowerCase()); var reactions = comment.reactions; var reactionTotalCount = ''; if (reactions && reactions.totalCount) { reactionTotalCount = reactions.totalCount; if (reactions.totalCount === 100 && reactions.pageInfo && reactions.pageInfo.hasNextPage) { reactionTotalCount = '100+'; } } return _react2.default.createElement( 'div', { className: 'gt-comment ' + (isAdmin ? 'gt-comment-admin' : '') }, _react2.default.createElement(_avatar2.default, { className: 'gt-comment-avatar', src: comment.user && comment.user.avatar_url }), _react2.default.createElement( 'div', { className: 'gt-comment-content' }, _react2.default.createElement( 'div', { className: 'gt-comment-header' }, _react2.default.createElement( 'a', { className: 'gt-comment-username', href: comment.user && comment.user.html_url }, comment.user && comment.user.login ), _react2.default.createElement( 'span', { className: 'gt-comment-text' }, commentedText ), _react2.default.createElement( 'span', { className: 'gt-comment-date' }, (0, _distance_in_words_to_now2.default)(comment.created_at, { addSuffix: true, locale: { distanceInWords: window.GT_i18n_distanceInWordsLocaleMap[language] } }) ), reactions && _react2.default.createElement( 'a', { className: 'gt-comment-like', onClick: likeCallback }, reactions.viewerHasReacted ? _react2.default.createElement(_svg2.default, { className: 'gt-ico-heart', name: 'heart_on', text: reactionTotalCount }) : _react2.default.createElement(_svg2.default, { className: 'gt-ico-heart', name: 'heart', text: reactionTotalCount }) ), enableEdit ? _react2.default.createElement( 'a', { href: comment.html_url, className: 'gt-comment-edit', target: '_blank' }, _react2.default.createElement(_svg2.default, { className: 'gt-ico-edit', name: 'edit' }) ) : _react2.default.createElement( 'a', { className: 'gt-comment-reply', onClick: replyCallback }, _react2.default.createElement(_svg2.default, { className: 'gt-ico-reply', name: 'reply' }) ) ), _react2.default.createElement('div', { className: 'gt-comment-body markdown-body', dangerouslySetInnerHTML: { __html: comment.body_html } }) ) ); }; /***/ }), /* 184 */ /***/ (function(module, exports, __webpack_require__) { var map = { "./arrow_down.svg": 185, "./edit.svg": 186, "./github.svg": 187, "./heart.svg": 188, "./heart_on.svg": 189, "./reply.svg": 190, "./tip.svg": 191 }; function webpackContext(req) { return __webpack_require__(webpackContextResolve(req)); }; function webpackContextResolve(req) { var id = map[req]; if(!(id + 1)) // check for number or string throw new Error("Cannot find module '" + req + "'."); return id; }; webpackContext.keys = function webpackContextKeys() { return Object.keys(map); }; webpackContext.resolve = webpackContextResolve; module.exports = webpackContext; webpackContext.id = 184; /***/ }), /* 185 */ /***/ (function(module, exports) { module.exports = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"1619\"><path d=\"M511.872 676.8c-0.003 0-0.006 0-0.008 0-9.137 0-17.379-3.829-23.21-9.97l-251.277-265.614c-5.415-5.72-8.743-13.464-8.744-21.984 0-17.678 14.33-32.008 32.008-32.008 9.157 0 17.416 3.845 23.25 10.009l228.045 241.103 228.224-241.088c5.855-6.165 14.113-10.001 23.266-10.001 8.516 0 16.256 3.32 21.998 8.736 12.784 12.145 13.36 32.434 1.264 45.233l-251.52 265.6c-5.844 6.155-14.086 9.984-23.223 9.984-0.025 0-0.051 0-0.076 0z\" p-id=\"1620\"></path></svg>" /***/ }), /* 186 */ /***/ (function(module, exports) { module.exports = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M785.333333 85.333333C774.666667 85.333333 763.2 90.133333 754.666667 98.666667L682.666667 170.666667 853.333333 341.333333 925.333333 269.333333C942.4 252.266667 942.4 222.133333 925.333333 209.333333L814.666667 98.666667C806.133333 90.133333 796 85.333333 785.333333 85.333333zM640 217.333333 85.333333 768 85.333333 938.666667 256 938.666667 806.666667 384 640 217.333333z\"></path>\n</svg>\n" /***/ }), /* 187 */ /***/ (function(module, exports) { module.exports = "<svg viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M64 524C64 719.602 189.356 885.926 364.113 947.017 387.65799 953 384 936.115 384 924.767L384 847.107C248.118 863.007 242.674 773.052 233.5 758.001 215 726.501 171.5 718.501 184.5 703.501 215.5 687.501 247 707.501 283.5 761.501 309.956 800.642 361.366 794.075 387.658 787.497 393.403 763.997 405.637 743.042 422.353 726.638 281.774 701.609 223 615.67 223 513.5 223 464.053 239.322 418.406 271.465 381.627 251.142 320.928 273.421 269.19 276.337 261.415 334.458 256.131 394.888 302.993 399.549 306.685 432.663 297.835 470.341 293 512.5 293 554.924 293 592.81 297.896 626.075 306.853 637.426 298.219 693.46 258.054 747.5 262.966 750.382 270.652 772.185 321.292 753.058 381.083 785.516 417.956 802 463.809 802 513.5 802 615.874 742.99 701.953 601.803 726.786 625.381 750.003 640 782.295 640 818.008L640 930.653C640.752 939.626 640 948.664978 655.086 948.665 832.344 888.962 960 721.389 960 524 960 276.576 759.424 76 512 76 264.577 76 64 276.576 64 524Z\"></path>\n</svg>\n" /***/ }), /* 188 */ /***/ (function(module, exports) { module.exports = "<svg viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <path d=\"M527.061333 166.528A277.333333 277.333333 0 0 1 1000.618667 362.666667a277.333333 277.333333 0 0 1-81.28 196.138666l-377.173334 377.173334a42.666667 42.666667 0 0 1-60.330666 0l-377.173334-377.173334a277.376 277.376 0 0 1 392.277334-392.277333l15.061333 15.061333 15.061333-15.061333z m286.72 377.173333l45.226667-45.226666a192 192 0 0 0-135.808-327.893334 192 192 0 0 0-135.808 56.32l-45.226667 45.226667a42.666667 42.666667 0 0 1-60.330666 0l-45.226667-45.226667a192.042667 192.042667 0 0 0-271.616 271.573334L512 845.482667l301.781333-301.781334z\"></path>\n</svg>\n" /***/ }), /* 189 */ /***/ (function(module, exports) { module.exports = "<svg t=\"1512463363724\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <path d=\"M527.061333 166.528A277.333333 277.333333 0 0 1 1000.618667 362.666667a277.333333 277.333333 0 0 1-81.28 196.138666l-377.173334 377.173334a42.666667 42.666667 0 0 1-60.330666 0l-377.173334-377.173334a277.376 277.376 0 0 1 392.277334-392.277333l15.061333 15.061333 15.061333-15.061333z\"></path>\n</svg>\n" /***/ }), /* 190 */ /***/ (function(module, exports) { module.exports = "<svg viewBox=\"0 0 1332 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M529.066665 273.066666 529.066665 0 51.2 477.866666 529.066665 955.733335 529.066665 675.84C870.4 675.84 1109.333335 785.066665 1280 1024 1211.733335 682.666665 1006.933335 341.333334 529.066665 273.066666\"></path>\n</svg>\n" /***/ }), /* 191 */ /***/ (function(module, exports) { module.exports = "<svg viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M512 366.949535c-16.065554 0-29.982212 13.405016-29.982212 29.879884l0 359.070251c0 16.167882 13.405016 29.879884 29.982212 29.879884 15.963226 0 29.879884-13.405016 29.879884-29.879884L541.879884 396.829419C541.879884 380.763865 528.474868 366.949535 512 366.949535L512 366.949535z\"\n p-id=\"3083\"></path>\n <path d=\"M482.017788 287.645048c0-7.776956 3.274508-15.553912 8.80024-21.181973 5.525732-5.525732 13.302688-8.80024 21.181973-8.80024 7.776956 0 15.553912 3.274508 21.079644 8.80024 5.525732 5.62806 8.80024 13.405016 8.80024 21.181973 0 7.776956-3.274508 15.656241-8.80024 21.181973-5.525732 5.525732-13.405016 8.697911-21.079644 8.697911-7.879285 0-15.656241-3.274508-21.181973-8.697911C485.292295 303.301289 482.017788 295.524333 482.017788 287.645048L482.017788 287.645048z\"\n p-id=\"3084\"></path>\n <path d=\"M512 946.844409c-239.8577 0-434.895573-195.037873-434.895573-434.895573 0-239.8577 195.037873-434.895573 434.895573-434.895573 239.755371 0 434.895573 195.037873 434.895573 434.895573C946.895573 751.806535 751.755371 946.844409 512 946.844409zM512 126.17088c-212.740682 0-385.880284 173.037274-385.880284 385.777955 0 212.740682 173.037274 385.777955 385.880284 385.777955 212.740682 0 385.777955-173.037274 385.777955-385.777955C897.777955 299.208154 724.740682 126.17088 512 126.17088z\"\n p-id=\"3085\"></path>\n</svg>\n" /***/ }), /* 192 */ /***/ (function(module, exports, __webpack_require__) { var distanceInWords = __webpack_require__(193) /** * @category Common Helpers * @summary Return the distance between the given date and now in words. * * @description * Return the distance between the given date and now in words. * * | Distance to now | Result | * |-------------------------------------------------------------------|---------------------| * | 0 ... 30 secs | less than a minute | * | 30 secs ... 1 min 30 secs | 1 minute | * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes | * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour | * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours | * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day | * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days | * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month | * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months | * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months | * | 1 yr ... 1 yr 3 months | about 1 year | * | 1 yr 3 months ... 1 yr 9 month s | over 1 year | * | 1 yr 9 months ... 2 yrs | almost 2 years | * | N yrs ... N yrs 3 months | about N years | * | N yrs 3 months ... N yrs 9 months | over N years | * | N yrs 9 months ... N+1 yrs | almost N+1 years | * * With `options.includeSeconds == true`: * | Distance to now | Result | * |---------------------|----------------------| * | 0 secs ... 5 secs | less than 5 seconds | * | 5 secs ... 10 secs | less than 10 seconds | * | 10 secs ... 20 secs | less than 20 seconds | * | 20 secs ... 40 secs | half a minute | * | 40 secs ... 60 secs | less than a minute | * | 60 secs ... 90 secs | 1 minute | * * @param {Date|String|Number} date - the given date * @param {Object} [options] - the object with options * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed * @param {Boolean} [options.addSuffix=false] - result specifies if the second date is earlier or later than the first * @param {Object} [options.locale=enLocale] - the locale object * @returns {String} the distance in words * * @example * // If today is 1 January 2015, what is the distance to 2 July 2014? * var result = distanceInWordsToNow( * new Date(2014, 6, 2) * ) * //=> '6 months' * * @example * // If now is 1 January 2015 00:00:00, * // what is the distance to 1 January 2015 00:00:15, including seconds? * var result = distanceInWordsToNow( * new Date(2015, 0, 1, 0, 0, 15), * {includeSeconds: true} * ) * //=> 'less than 20 seconds' * * @example * // If today is 1 January 2015, * // what is the distance to 1 January 2016, with a suffix? * var result = distanceInWordsToNow( * new Date(2016, 0, 1), * {addSuffix: true} * ) * //=> 'in about 1 year' * * @example * // If today is 1 January 2015, * // what is the distance to 1 August 2016 in Esperanto? * var eoLocale = require('date-fns/locale/eo') * var result = distanceInWordsToNow( * new Date(2016, 7, 1), * {locale: eoLocale} * ) * //=> 'pli ol 1 jaro' */ function distanceInWordsToNow (dirtyDate, dirtyOptions) { return distanceInWords(Date.now(), dirtyDate, dirtyOptions) } module.exports = distanceInWordsToNow /***/ }), /* 193 */ /***/ (function(module, exports, __webpack_require__) { var compareDesc = __webpack_require__(194) var parse = __webpack_require__(18) var differenceInSeconds = __webpack_require__(196) var differenceInMonths = __webpack_require__(198) var enLocale = __webpack_require__(201) var MINUTES_IN_DAY = 1440 var MINUTES_IN_ALMOST_TWO_DAYS = 2520 var MINUTES_IN_MONTH = 43200 var MINUTES_IN_TWO_MONTHS = 86400 /** * @category Common Helpers * @summary Return the distance between the given dates in words. * * @description * Return the distance between the given dates in words. * * | Distance between dates | Result | * |-------------------------------------------------------------------|---------------------| * | 0 ... 30 secs | less than a minute | * | 30 secs ... 1 min 30 secs | 1 minute | * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes | * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour | * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours | * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day | * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days | * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month | * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months | * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months | * | 1 yr ... 1 yr 3 months | about 1 year | * | 1 yr 3 months ... 1 yr 9 month s | over 1 year | * | 1 yr 9 months ... 2 yrs | almost 2 years | * | N yrs ... N yrs 3 months | about N years | * | N yrs 3 months ... N yrs 9 months | over N years | * | N yrs 9 months ... N+1 yrs | almost N+1 years | * * With `options.includeSeconds == true`: * | Distance between dates | Result | * |------------------------|----------------------| * | 0 secs ... 5 secs | less than 5 seconds | * | 5 secs ... 10 secs | less than 10 seconds | * | 10 secs ... 20 secs | less than 20 seconds | * | 20 secs ... 40 secs | half a minute | * | 40 secs ... 60 secs | less than a minute | * | 60 secs ... 90 secs | 1 minute | * * @param {Date|String|Number} dateToCompare - the date to compare with * @param {Date|String|Number} date - the other date * @param {Object} [options] - the object with options * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first * @param {Object} [options.locale=enLocale] - the locale object * @returns {String} the distance in words * * @example * // What is the distance between 2 July 2014 and 1 January 2015? * var result = distanceInWords( * new Date(2014, 6, 2), * new Date(2015, 0, 1) * ) * //=> '6 months' * * @example * // What is the distance between 1 January 2015 00:00:15 * // and 1 January 2015 00:00:00, including seconds? * var result = distanceInWords( * new Date(2015, 0, 1, 0, 0, 15), * new Date(2015, 0, 1, 0, 0, 0), * {includeSeconds: true} * ) * //=> 'less than 20 seconds' * * @example * // What is the distance from 1 January 2016 * // to 1 January 2015, with a suffix? * var result = distanceInWords( * new Date(2016, 0, 1), * new Date(2015, 0, 1), * {addSuffix: true} * ) * //=> 'about 1 year ago' * * @example * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto? * var eoLocale = require('date-fns/locale/eo') * var result = distanceInWords( * new Date(2016, 7, 1), * new Date(2015, 0, 1), * {locale: eoLocale} * ) * //=> 'pli ol 1 jaro' */ function distanceInWords (dirtyDateToCompare, dirtyDate, dirtyOptions) { var options = dirtyOptions || {} var comparison = compareDesc(dirtyDateToCompare, dirtyDate) var locale = options.locale var localize = enLocale.distanceInWords.localize if (locale && locale.distanceInWords && locale.distanceInWords.localize) { localize = locale.distanceInWords.localize } var localizeOptions = { addSuffix: Boolean(options.addSuffix), comparison: comparison } var dateLeft, dateRight if (comparison > 0) { dateLeft = parse(dirtyDateToCompare) dateRight = parse(dirtyDate) } else { dateLeft = parse(dirtyDate) dateRight = parse(dirtyDateToCompare) } var seconds = differenceInSeconds(dateRight, dateLeft) var offset = dateRight.getTimezoneOffset() - dateLeft.getTimezoneOffset() var minutes = Math.round(seconds / 60) - offset var months // 0 up to 2 mins if (minutes < 2) { if (options.includeSeconds) { if (seconds < 5) { return localize('lessThanXSeconds', 5, localizeOptions) } else if (seconds < 10) { return localize('lessThanXSeconds', 10, localizeOptions) } else if (seconds < 20) { return localize('lessThanXSeconds', 20, localizeOptions) } else if (seconds < 40) { return localize('halfAMinute', null, localizeOptions) } else if (seconds < 60) { return localize('lessThanXMinutes', 1, localizeOptions) } else { return localize('xMinutes', 1, localizeOptions) } } else { if (minutes === 0) { return localize('lessThanXMinutes', 1, localizeOptions) } else { return localize('xMinutes', minutes, localizeOptions) } } // 2 mins up to 0.75 hrs } else if (minutes < 45) { return localize('xMinutes', minutes, localizeOptions) // 0.75 hrs up to 1.5 hrs } else if (minutes < 90) { return localize('aboutXHours', 1, localizeOptions) // 1.5 hrs up to 24 hrs } else if (minutes < MINUTES_IN_DAY) { var hours = Math.round(minutes / 60) return localize('aboutXHours', hours, localizeOptions) // 1 day up to 1.75 days } else if (minutes < MINUTES_IN_ALMOST_TWO_DAYS) { return localize('xDays', 1, localizeOptions) // 1.75 days up to 30 days } else if (minutes < MINUTES_IN_MONTH) { var days = Math.round(minutes / MINUTES_IN_DAY) return localize('xDays', days, localizeOptions) // 1 month up to 2 months } else if (minutes < MINUTES_IN_TWO_MONTHS) { months = Math.round(minutes / MINUTES_IN_MONTH) return localize('aboutXMonths', months, localizeOptions) } months = differenceInMonths(dateRight, dateLeft) // 2 months up to 12 months if (months < 12) { var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH) return localize('xMonths', nearestMonth, localizeOptions) // 1 year up to max Date } else { var monthsSinceStartOfYear = months % 12 var years = Math.floor(months / 12) // N years up to 1 years 3 months if (monthsSinceStartOfYear < 3) { return localize('aboutXYears', years, localizeOptions) // N years 3 months up to N years 9 months } else if (monthsSinceStartOfYear < 9) { return localize('overXYears', years, localizeOptions) // N years 9 months up to N year 12 months } else { return localize('almostXYears', years + 1, localizeOptions) } } } module.exports = distanceInWords /***/ }), /* 194 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(18) /** * @category Common Helpers * @summary Compare the two dates reverse chronologically and return -1, 0 or 1. * * @description * Compare the two dates and return -1 if the first date is after the second, * 1 if the first date is before the second or 0 if dates are equal. * * @param {Date|String|Number} dateLeft - the first date to compare * @param {Date|String|Number} dateRight - the second date to compare * @returns {Number} the result of the comparison * * @example * // Compare 11 February 1987 and 10 July 1989 reverse chronologically: * var result = compareDesc( * new Date(1987, 1, 11), * new Date(1989, 6, 10) * ) * //=> 1 * * @example * // Sort the array of dates in reverse chronological order: * var result = [ * new Date(1995, 6, 2), * new Date(1987, 1, 11), * new Date(1989, 6, 10) * ].sort(compareDesc) * //=> [ * // Sun Jul 02 1995 00:00:00, * // Mon Jul 10 1989 00:00:00, * // Wed Feb 11 1987 00:00:00 * // ] */ function compareDesc (dirtyDateLeft, dirtyDateRight) { var dateLeft = parse(dirtyDateLeft) var timeLeft = dateLeft.getTime() var dateRight = parse(dirtyDateRight) var timeRight = dateRight.getTime() if (timeLeft > timeRight) { return -1 } else if (timeLeft < timeRight) { return 1 } else { return 0 } } module.exports = compareDesc /***/ }), /* 195 */ /***/ (function(module, exports) { /** * @category Common Helpers * @summary Is the given argument an instance of Date? * * @description * Is the given argument an instance of Date? * * @param {*} argument - the argument to check * @returns {Boolean} the given argument is an instance of Date * * @example * // Is 'mayonnaise' a Date? * var result = isDate('mayonnaise') * //=> false */ function isDate (argument) { return argument instanceof Date } module.exports = isDate /***/ }), /* 196 */ /***/ (function(module, exports, __webpack_require__) { var differenceInMilliseconds = __webpack_require__(197) /** * @category Second Helpers * @summary Get the number of seconds between the given dates. * * @description * Get the number of seconds between the given dates. * * @param {Date|String|Number} dateLeft - the later date * @param {Date|String|Number} dateRight - the earlier date * @returns {Number} the number of seconds * * @example * // How many seconds are between * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000? * var result = differenceInSeconds( * new Date(2014, 6, 2, 12, 30, 20, 0), * new Date(2014, 6, 2, 12, 30, 7, 999) * ) * //=> 12 */ function differenceInSeconds (dirtyDateLeft, dirtyDateRight) { var diff = differenceInMilliseconds(dirtyDateLeft, dirtyDateRight) / 1000 return diff > 0 ? Math.floor(diff) : Math.ceil(diff) } module.exports = differenceInSeconds /***/ }), /* 197 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(18) /** * @category Millisecond Helpers * @summary Get the number of milliseconds between the given dates. * * @description * Get the number of milliseconds between the given dates. * * @param {Date|String|Number} dateLeft - the later date * @param {Date|String|Number} dateRight - the earlier date * @returns {Number} the number of milliseconds * * @example * // How many milliseconds are between * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700? * var result = differenceInMilliseconds( * new Date(2014, 6, 2, 12, 30, 21, 700), * new Date(2014, 6, 2, 12, 30, 20, 600) * ) * //=> 1100 */ function differenceInMilliseconds (dirtyDateLeft, dirtyDateRight) { var dateLeft = parse(dirtyDateLeft) var dateRight = parse(dirtyDateRight) return dateLeft.getTime() - dateRight.getTime() } module.exports = differenceInMilliseconds /***/ }), /* 198 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(18) var differenceInCalendarMonths = __webpack_require__(199) var compareAsc = __webpack_require__(200) /** * @category Month Helpers * @summary Get the number of full months between the given dates. * * @description * Get the number of full months between the given dates. * * @param {Date|String|Number} dateLeft - the later date * @param {Date|String|Number} dateRight - the earlier date * @returns {Number} the number of full months * * @example * // How many full months are between 31 January 2014 and 1 September 2014? * var result = differenceInMonths( * new Date(2014, 8, 1), * new Date(2014, 0, 31) * ) * //=> 7 */ function differenceInMonths (dirtyDateLeft, dirtyDateRight) { var dateLeft = parse(dirtyDateLeft) var dateRight = parse(dirtyDateRight) var sign = compareAsc(dateLeft, dateRight) var difference = Math.abs(differenceInCalendarMonths(dateLeft, dateRight)) dateLeft.setMonth(dateLeft.getMonth() - sign * difference) // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full // If so, result must be decreased by 1 in absolute value var isLastMonthNotFull = compareAsc(dateLeft, dateRight) === -sign return sign * (difference - isLastMonthNotFull) } module.exports = differenceInMonths /***/ }), /* 199 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(18) /** * @category Month Helpers * @summary Get the number of calendar months between the given dates. * * @description * Get the number of calendar months between the given dates. * * @param {Date|String|Number} dateLeft - the later date * @param {Date|String|Number} dateRight - the earlier date * @returns {Number} the number of calendar months * * @example * // How many calendar months are between 31 January 2014 and 1 September 2014? * var result = differenceInCalendarMonths( * new Date(2014, 8, 1), * new Date(2014, 0, 31) * ) * //=> 8 */ function differenceInCalendarMonths (dirtyDateLeft, dirtyDateRight) { var dateLeft = parse(dirtyDateLeft) var dateRight = parse(dirtyDateRight) var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear() var monthDiff = dateLeft.getMonth() - dateRight.getMonth() return yearDiff * 12 + monthDiff } module.exports = differenceInCalendarMonths /***/ }), /* 200 */ /***/ (function(module, exports, __webpack_require__) { var parse = __webpack_require__(18) /** * @category Common Helpers * @summary Compare the two dates and return -1, 0 or 1. * * @description * Compare the two dates and return 1 if the first date is after the second, * -1 if the first date is before the second or 0 if dates are equal. * * @param {Date|String|Number} dateLeft - the first date to compare * @param {Date|String|Number} dateRight - the second date to compare * @returns {Number} the result of the comparison * * @example * // Compare 11 February 1987 and 10 July 1989: * var result = compareAsc( * new Date(1987, 1, 11), * new Date(1989, 6, 10) * ) * //=> -1 * * @example * // Sort the array of dates: * var result = [ * new Date(1995, 6, 2), * new Date(1987, 1, 11), * new Date(1989, 6, 10) * ].sort(compareAsc) * //=> [ * // Wed Feb 11 1987 00:00:00, * // Mon Jul 10 1989 00:00:00, * // Sun Jul 02 1995 00:00:00 * // ] */ function compareAsc (dirtyDateLeft, dirtyDateRight) { var dateLeft = parse(dirtyDateLeft) var timeLeft = dateLeft.getTime() var dateRight = parse(dirtyDateRight) var timeRight = dateRight.getTime() if (timeLeft < timeRight) { return -1 } else if (timeLeft > timeRight) { return 1 } else { return 0 } } module.exports = compareAsc /***/ }), /* 201 */ /***/ (function(module, exports, __webpack_require__) { var buildDistanceInWordsLocale = __webpack_require__(202) var buildFormatLocale = __webpack_require__(203) /** * @category Locales * @summary English locale. */ module.exports = { distanceInWords: buildDistanceInWordsLocale(), format: buildFormatLocale() } /***/ }), /* 202 */ /***/ (function(module, exports) { function buildDistanceInWordsLocale () { var distanceInWordsLocale = { lessThanXSeconds: { one: 'less than a second', other: 'less than {{count}} seconds' }, xSeconds: { one: '1 second', other: '{{count}} seconds' }, halfAMinute: 'half a minute', lessThanXMinutes: { one: 'less than a minute', other: 'less than {{count}} minutes' }, xMinutes: { one: '1 minute', other: '{{count}} minutes' }, aboutXHours: { one: 'about 1 hour', other: 'about {{count}} hours' }, xHours: { one: '1 hour', other: '{{count}} hours' }, xDays: { one: '1 day', other: '{{count}} days' }, aboutXMonths: { one: 'about 1 month', other: 'about {{count}} months' }, xMonths: { one: '1 month', other: '{{count}} months' }, aboutXYears: { one: 'about 1 year', other: 'about {{count}} years' }, xYears: { one: '1 year', other: '{{count}} years' }, overXYears: { one: 'over 1 year', other: 'over {{count}} years' }, almostXYears: { one: 'almost 1 year', other: 'almost {{count}} years' } } function localize (token, count, options) { options = options || {} var result if (typeof distanceInWordsLocale[token] === 'string') { result = distanceInWordsLocale[token] } else if (count === 1) { result = distanceInWordsLocale[token].one } else { result = distanceInWordsLocale[token].other.replace('{{count}}', count) } if (options.addSuffix) { if (options.comparison > 0) { return 'in ' + result } else { return result + ' ago' } } return result } return { localize: localize } } module.exports = buildDistanceInWordsLocale /***/ }), /* 203 */ /***/ (function(module, exports, __webpack_require__) { var buildFormattingTokensRegExp = __webpack_require__(204) function buildFormatLocale () { // Note: in English, the names of days of the week and months are capitalized. // If you are making a new locale based on this one, check if the same is true for the language you're working on. // Generally, formatted dates should look like they are in the middle of a sentence, // e.g. in Spanish language the weekdays and months should be in the lowercase. var months3char = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] var monthsFull = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] var weekdays2char = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'] var weekdays3char = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'] var weekdaysFull = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'] var meridiemUppercase = ['AM', 'PM'] var meridiemLowercase = ['am', 'pm'] var meridiemFull = ['a.m.', 'p.m.'] var formatters = { // Month: Jan, Feb, ..., Dec 'MMM': function (date) { return months3char[date.getMonth()] }, // Month: January, February, ..., December 'MMMM': function (date) { return monthsFull[date.getMonth()] }, // Day of week: Su, Mo, ..., Sa 'dd': function (date) { return weekdays2char[date.getDay()] }, // Day of week: Sun, Mon, ..., Sat 'ddd': function (date) { return weekdays3char[date.getDay()] }, // Day of week: Sunday, Monday, ..., Saturday 'dddd': function (date) { return weekdaysFull[date.getDay()] }, // AM, PM 'A': function (date) { return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] }, // am, pm 'a': function (date) { return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] }, // a.m., p.m. 'aa': function (date) { return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] } } // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W'] ordinalFormatters.forEach(function (formatterToken) { formatters[formatterToken + 'o'] = function (date, formatters) { return ordinal(formatters[formatterToken](date)) } }) return { formatters: formatters, formattingTokensRegExp: buildFormattingTokensRegExp(formatters) } } function ordinal (number) { var rem100 = number % 100 if (rem100 > 20 || rem100 < 10) { switch (rem100 % 10) { case 1: return number + 'st' case 2: return number + 'nd' case 3: return number + 'rd' } } return number + 'th' } module.exports = buildFormatLocale /***/ }), /* 204 */ /***/ (function(module, exports) { var commonFormatterKeys = [ 'M', 'MM', 'Q', 'D', 'DD', 'DDD', 'DDDD', 'd', 'E', 'W', 'WW', 'YY', 'YYYY', 'GG', 'GGGG', 'H', 'HH', 'h', 'hh', 'm', 'mm', 's', 'ss', 'S', 'SS', 'SSS', 'Z', 'ZZ', 'X', 'x' ] function buildFormattingTokensRegExp (formatters) { var formatterKeys = [] for (var key in formatters) { if (formatters.hasOwnProperty(key)) { formatterKeys.push(key) } } var formattingTokens = commonFormatterKeys .concat(formatterKeys) .sort() .reverse() var formattingTokensRegExp = new RegExp( '(\\[[^\\[]*\\])|(\\\\)?' + '(' + formattingTokens.join('|') + '|.)', 'g' ) return formattingTokensRegExp } module.exports = buildFormattingTokensRegExp /***/ }), /* 205 */ /***/ (function(module, exports) { function buildDistanceInWordsLocale () { var distanceInWordsLocale = { lessThanXSeconds: { one: '不到 1 秒', other: '不到 {{count}} 秒' }, xSeconds: { one: '1 秒', other: '{{count}} 秒' }, halfAMinute: '半分钟', lessThanXMinutes: { one: '不到 1 分钟', other: '不到 {{count}} 分钟' }, xMinutes: { one: '1 分钟', other: '{{count}} 分钟' }, xHours: { one: '1 小时', other: '{{count}} 小时' }, aboutXHours: { one: '大约 1 小时', other: '大约 {{count}} 小时' }, xDays: { one: '1 天', other: '{{count}} 天' }, aboutXMonths: { one: '大约 1 个月', other: '大约 {{count}} 个月' }, xMonths: { one: '1 个月', other: '{{count}} 个月' }, aboutXYears: { one: '大约 1 年', other: '大约 {{count}} 年' }, xYears: { one: '1 年', other: '{{count}} 年' }, overXYears: { one: '超过 1 年', other: '超过 {{count}} 年' }, almostXYears: { one: '将近 1 年', other: '将近 {{count}} 年' } } function localize (token, count, options) { options = options || {} var result if (typeof distanceInWordsLocale[token] === 'string') { result = distanceInWordsLocale[token] } else if (count === 1) { result = distanceInWordsLocale[token].one } else { result = distanceInWordsLocale[token].other.replace('{{count}}', count) } if (options.addSuffix) { if (options.comparison > 0) { return result + '内' } else { return result + '前' } } return result } return { localize: localize } } module.exports = buildDistanceInWordsLocale /***/ }), /* 206 */ /***/ (function(module, exports) { function buildDistanceInWordsLocale () { var distanceInWordsLocale = { lessThanXSeconds: { one: '少於 1 秒', other: '少於 {{count}} 秒' }, xSeconds: { one: '1 秒', other: '{{count}} 秒' }, halfAMinute: '半分鐘', lessThanXMinutes: { one: '少於 1 分鐘', other: '少於 {{count}} 分鐘' }, xMinutes: { one: '1 分鐘', other: '{{count}} 分鐘' }, xHours: { one: '1 小時', other: '{{count}} 小時' }, aboutXHours: { one: '大約 1 小時', other: '大約 {{count}} 小時' }, xDays: { one: '1 天', other: '{{count}} 天' }, aboutXMonths: { one: '大約 1 個月', other: '大約 {{count}} 個月' }, xMonths: { one: '1 個月', other: '{{count}} 個月' }, aboutXYears: { one: '大約 1 年', other: '大約 {{count}} 年' }, xYears: { one: '1 年', other: '{{count}} 年' }, overXYears: { one: '超過 1 年', other: '超過 {{count}} 年' }, almostXYears: { one: '將近 1 年', other: '將近 {{count}} 年' } } function localize (token, count, options) { options = options || {} var result if (typeof distanceInWordsLocale[token] === 'string') { result = distanceInWordsLocale[token] } else if (count === 1) { result = distanceInWordsLocale[token].one } else { result = distanceInWordsLocale[token].other.replace('{{count}}', count) } if (options.addSuffix) { if (options.comparison > 0) { return result + '內' } else { return result + '前' } } return result } return { localize: localize } } module.exports = buildDistanceInWordsLocale /***/ }), /* 207 */ /***/ (function(module, exports) { function buildDistanceInWordsLocale () { var distanceInWordsLocale = { lessThanXSeconds: { one: 'menos de un segundo', other: 'menos de {{count}} segundos' }, xSeconds: { one: '1 segundo', other: '{{count}} segundos' }, halfAMinute: 'medio minuto', lessThanXMinutes: { one: 'menos de un minuto', other: 'menos de {{count}} minutos' }, xMinutes: { one: '1 minuto', other: '{{count}} minutos' }, aboutXHours: { one: 'alrededor de 1 hora', other: 'alrededor de {{count}} horas' }, xHours: { one: '1 hora', other: '{{count}} horas' }, xDays: { one: '1 día', other: '{{count}} días' }, aboutXMonths: { one: 'alrededor de 1 mes', other: 'alrededor de {{count}} meses' }, xMonths: { one: '1 mes', other: '{{count}} meses' }, aboutXYears: { one: 'alrededor de 1 año', other: 'alrededor de {{count}} años' }, xYears: { one: '1 año', other: '{{count}} años' }, overXYears: { one: 'más de 1 año', other: 'más de {{count}} años' }, almostXYears: { one: 'casi 1 año', other: 'casi {{count}} años' } } function localize (token, count, options) { options = options || {} var result if (typeof distanceInWordsLocale[token] === 'string') { result = distanceInWordsLocale[token] } else if (count === 1) { result = distanceInWordsLocale[token].one } else { result = distanceInWordsLocale[token].other.replace('{{count}}', count) } if (options.addSuffix) { if (options.comparison > 0) { return 'en ' + result } else { return 'hace ' + result } } return result } return { localize: localize } } module.exports = buildDistanceInWordsLocale /***/ }), /* 208 */ /***/ (function(module, exports) { function buildDistanceInWordsLocale () { var distanceInWordsLocale = { lessThanXSeconds: { one: 'moins d’une seconde', other: 'moins de {{count}} secondes' }, xSeconds: { one: '1 seconde', other: '{{count}} secondes' }, halfAMinute: '30 secondes', lessThanXMinutes: { one: 'moins d’une minute', other: 'moins de {{count}} minutes' }, xMinutes: { one: '1 minute', other: '{{count}} minutes' }, aboutXHours: { one: 'environ 1 heure', other: 'environ {{count}} heures' }, xHours: { one: '1 heure', other: '{{count}} heures' }, xDays: { one: '1 jour', other: '{{count}} jours' }, aboutXMonths: { one: 'environ 1 mois', other: 'environ {{count}} mois' }, xMonths: { one: '1 mois', other: '{{count}} mois' }, aboutXYears: { one: 'environ 1 an', other: 'environ {{count}} ans' }, xYears: { one: '1 an', other: '{{count}} ans' }, overXYears: { one: 'plus d’un an', other: 'plus de {{count}} ans' }, almostXYears: { one: 'presqu’un an', other: 'presque {{count}} ans' } } function localize (token, count, options) { options = options || {} var result if (typeof distanceInWordsLocale[token] === 'string') { result = distanceInWordsLocale[token] } else if (count === 1) { result = distanceInWordsLocale[token].one } else { result = distanceInWordsLocale[token].other.replace('{{count}}', count) } if (options.addSuffix) { if (options.comparison > 0) { return 'dans ' + result } else { return 'il y a ' + result } } return result } return { localize: localize } } module.exports = buildDistanceInWordsLocale /***/ }), /* 209 */ /***/ (function(module, exports) { function declension (scheme, count) { // scheme for count=1 exists if (scheme.one !== undefined && count === 1) { return scheme.one } var rem10 = count % 10 var rem100 = count % 100 // 1, 21, 31, ... if (rem10 === 1 && rem100 !== 11) { return scheme.singularNominative.replace('{{count}}', count) // 2, 3, 4, 22, 23, 24, 32 ... } else if ((rem10 >= 2 && rem10 <= 4) && (rem100 < 10 || rem100 > 20)) { return scheme.singularGenitive.replace('{{count}}', count) // 5, 6, 7, 8, 9, 10, 11, ... } else { return scheme.pluralGenitive.replace('{{count}}', count) } } function buildLocalizeTokenFn (scheme) { return function (count, options) { if (options.addSuffix) { if (options.comparison > 0) { if (scheme.future) { return declension(scheme.future, count) } else { return 'через ' + declension(scheme.regular, count) } } else { if (scheme.past) { return declension(scheme.past, count) } else { return declension(scheme.regular, count) + ' назад' } } } else { return declension(scheme.regular, count) } } } function buildDistanceInWordsLocale () { var distanceInWordsLocale = { lessThanXSeconds: buildLocalizeTokenFn({ regular: { one: 'меньше секунды', singularNominative: 'меньше {{count}} секунды', singularGenitive: 'меньше {{count}} секунд', pluralGenitive: 'меньше {{count}} секунд' }, future: { one: 'меньше, чем через секунду', singularNominative: 'меньше, чем через {{count}} секунду', singularGenitive: 'меньше, чем через {{count}} секунды', pluralGenitive: 'меньше, чем через {{count}} секунд' } }), xSeconds: buildLocalizeTokenFn({ regular: { singularNominative: '{{count}} секунда', singularGenitive: '{{count}} секунды', pluralGenitive: '{{count}} секунд' }, past: { singularNominative: '{{count}} секунду назад', singularGenitive: '{{count}} секунды назад', pluralGenitive: '{{count}} секунд назад' }, future: { singularNominative: 'через {{count}} секунду', singularGenitive: 'через {{count}} секунды', pluralGenitive: 'через {{count}} секунд' } }), halfAMinute: function (_, options) { if (options.addSuffix) { if (options.comparison > 0) { return 'через полминуты' } else { return 'полминуты назад' } } return 'полминуты' }, lessThanXMinutes: buildLocalizeTokenFn({ regular: { one: 'меньше минуты', singularNominative: 'меньше {{count}} минуты', singularGenitive: 'меньше {{count}} минут', pluralGenitive: 'меньше {{count}} минут' }, future: { one: 'меньше, чем через минуту', singularNominative: 'меньше, чем через {{count}} минуту', singularGenitive: 'меньше, чем через {{count}} минуты', pluralGenitive: 'меньше, чем через {{count}} минут' } }), xMinutes: buildLocalizeTokenFn({ regular: { singularNominative: '{{count}} минута', singularGenitive: '{{count}} минуты', pluralGenitive: '{{count}} минут' }, past: { singularNominative: '{{count}} минуту назад', singularGenitive: '{{count}} минуты назад', pluralGenitive: '{{count}} минут назад' }, future: { singularNominative: 'через {{count}} минуту', singularGenitive: 'через {{count}} минуты', pluralGenitive: 'через {{count}} минут' } }), aboutXHours: buildLocalizeTokenFn({ regular: { singularNominative: 'около {{count}} часа', singularGenitive: 'около {{count}} часов', pluralGenitive: 'около {{count}} часов' }, future: { singularNominative: 'приблизительно через {{count}} час', singularGenitive: 'приблизительно через {{count}} часа', pluralGenitive: 'приблизительно через {{count}} часов' } }), xHours: buildLocalizeTokenFn({ regular: { singularNominative: '{{count}} час', singularGenitive: '{{count}} часа', pluralGenitive: '{{count}} часов' } }), xDays: buildLocalizeTokenFn({ regular: { singularNominative: '{{count}} день', singularGenitive: '{{count}} дня', pluralGenitive: '{{count}} дней' } }), aboutXMonths: buildLocalizeTokenFn({ regular: { singularNominative: 'около {{count}} месяца', singularGenitive: 'около {{count}} месяцев', pluralGenitive: 'около {{count}} месяцев' }, future: { singularNominative: 'приблизительно через {{count}} месяц', singularGenitive: 'приблизительно через {{count}} месяца', pluralGenitive: 'приблизительно через {{count}} месяцев' } }), xMonths: buildLocalizeTokenFn({ regular: { singularNominative: '{{count}} месяц', singularGenitive: '{{count}} месяца', pluralGenitive: '{{count}} месяцев' } }), aboutXYears: buildLocalizeTokenFn({ regular: { singularNominative: 'около {{count}} года', singularGenitive: 'около {{count}} лет', pluralGenitive: 'около {{count}} лет' }, future: { singularNominative: 'приблизительно через {{count}} год', singularGenitive: 'приблизительно через {{count}} года', pluralGenitive: 'приблизительно через {{count}} лет' } }), xYears: buildLocalizeTokenFn({ regular: { singularNominative: '{{count}} год', singularGenitive: '{{count}} года', pluralGenitive: '{{count}} лет' } }), overXYears: buildLocalizeTokenFn({ regular: { singularNominative: 'больше {{count}} года', singularGenitive: 'больше {{count}} лет', pluralGenitive: 'больше {{count}} лет' }, future: { singularNominative: 'больше, чем через {{count}} год', singularGenitive: 'больше, чем через {{count}} года', pluralGenitive: 'больше, чем через {{count}} лет' } }), almostXYears: buildLocalizeTokenFn({ regular: { singularNominative: 'почти {{count}} год', singularGenitive: 'почти {{count}} года', pluralGenitive: 'почти {{count}} лет' }, future: { singularNominative: 'почти через {{count}} год', singularGenitive: 'почти через {{count}} года', pluralGenitive: 'почти через {{count}} лет' } }) } function localize (token, count, options) { options = options || {} return distanceInWordsLocale[token](count, options) } return { localize: localize } } module.exports = buildDistanceInWordsLocale /***/ }), /* 210 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /* 211 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var GT_ACCESS_TOKEN = exports.GT_ACCESS_TOKEN = 'GT_ACCESS_TOKEN'; var GT_VERSION = exports.GT_VERSION = "1.2.2"; // eslint-disable-line var GT_COMMENT = exports.GT_COMMENT = 'GT_COMMENT'; /***/ }), /* 212 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _toConsumableArray2 = __webpack_require__(213); var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); var _util = __webpack_require__(67); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var getQL = function getQL(vars, pagerDirection) { var cursorDirection = pagerDirection === 'last' ? 'before' : 'after'; var ql = '\n query getIssueAndComments(\n $owner: String!,\n $repo: String!,\n $id: Int!,\n $cursor: String,\n $pageSize: Int!\n ) {\n repository(owner: $owner, name: $repo) {\n issue(number: $id) {\n title\n url\n bodyHTML\n createdAt\n comments(' + pagerDirection + ': $pageSize, ' + cursorDirection + ': $cursor) {\n totalCount\n pageInfo {\n ' + (pagerDirection === 'last' ? 'hasPreviousPage' : 'hasNextPage') + '\n ' + (cursorDirection === 'before' ? 'startCursor' : 'endCursor') + '\n }\n nodes {\n id\n databaseId\n author {\n avatarUrl\n login\n url\n }\n bodyHTML\n body\n createdAt\n reactions(first: 100, content: HEART) {\n totalCount\n viewerHasReacted\n pageInfo{\n hasNextPage\n }\n nodes {\n id\n databaseId\n user {\n login\n }\n }\n }\n }\n }\n }\n }\n }\n '; if (vars.cursor === null) delete vars.cursor; return { operationName: 'getIssueAndComments', query: ql, variables: vars }; }; function getComments(issue) { var _this = this; var _options = this.options, owner = _options.owner, repo = _options.repo, perPage = _options.perPage, pagerDirection = _options.pagerDirection; var _state = this.state, cursor = _state.cursor, comments = _state.comments; return _util.axiosGithub.post('/graphql', getQL({ owner: owner, repo: repo, id: issue.number, pageSize: perPage, cursor: cursor }, pagerDirection), { headers: { Authorization: 'bearer ' + this.accessToken } }).then(function (res) { var data = res.data.data.repository.issue.comments; var items = data.nodes.map(function (node) { return { id: node.databaseId, gId: node.id, user: { avatar_url: node.author.avatarUrl, login: node.author.login, html_url: node.author.url }, created_at: node.createdAt, body_html: node.bodyHTML, body: node.body, html_url: 'https://github.com/' + owner + '/' + repo + '/issues/' + issue.number + '#issuecomment-' + node.databaseId, reactions: node.reactions }; }); var cs = void 0; if (pagerDirection === 'last') { cs = [].concat((0, _toConsumableArray3.default)(items), (0, _toConsumableArray3.default)(comments)); } else { cs = [].concat((0, _toConsumableArray3.default)(comments), (0, _toConsumableArray3.default)(items)); } var isLoadOver = data.pageInfo.hasPreviousPage === false || data.pageInfo.hasNextPage === false; _this.setState({ comments: cs, isLoadOver: isLoadOver, cursor: data.pageInfo.startCursor || data.pageInfo.endCursor }); return cs; }); } exports.default = getComments; /***/ }), /* 213 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _from = __webpack_require__(214); var _from2 = _interopRequireDefault(_from); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return (0, _from2.default)(arr); } }; /***/ }), /* 214 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(215), __esModule: true }; /***/ }), /* 215 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(20); __webpack_require__(216); module.exports = __webpack_require__(0).Array.from; /***/ }), /* 216 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var ctx = __webpack_require__(13) , $export = __webpack_require__(6) , toObject = __webpack_require__(22) , call = __webpack_require__(59) , isArrayIter = __webpack_require__(60) , toLength = __webpack_require__(37) , createProperty = __webpack_require__(217) , getIterFn = __webpack_require__(42); $export($export.S + $export.F * !__webpack_require__(62)(function(iter){ Array.from(iter); }), 'Array', { // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ var O = toObject(arrayLike) , C = typeof this == 'function' ? this : Array , aLen = arguments.length , mapfn = aLen > 1 ? arguments[1] : undefined , mapping = mapfn !== undefined , index = 0 , iterFn = getIterFn(O) , length, result, step, iterator; if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); // if object isn't iterable or it's array with default iterator - use simple case if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){ for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){ createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); } } else { length = toLength(O.length); for(result = new C(length); length > index; index++){ createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); } } result.length = index; return result; } }); /***/ }), /* 217 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $defineProperty = __webpack_require__(7) , createDesc = __webpack_require__(19); module.exports = function(object, index, value){ if(index in object)$defineProperty.f(object, index, createDesc(0, value)); else object[index] = value; }; /***/ }) /******/ ]); }); //# sourceMappingURL=gitalk.js.map
client/routes.js
yoohan-dex/React-Blog
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import App from './containers/App'; import Main from './containers/Main'; import Content from './containers/Content'; export default ( <Route path="/" component={App}> <IndexRoute component={Main} /> <Route path="content" component={Content} /> </Route> );
frontend/src/pages/org-admin/org-users-nav.js
miurahr/seahub
import React from 'react'; import PropTypes from 'prop-types'; import { Link } from '@reach/router'; import { siteRoot, gettext } from '../../utils/constants'; const propTypes = { currentItem: PropTypes.string.isRequired }; class Nav extends React.Component { constructor(props) { super(props); this.navItems = [ {name: 'all', urlPart: 'useradmin', text: gettext('All')}, {name: 'admins', urlPart: 'useradmin/admins', text: gettext('Admin')} ]; } render() { const { currentItem } = this.props; return ( <div className="cur-view-path tab-nav-container"> <ul className="nav"> {this.navItems.map((item, index) => { return ( <li className="nav-item" key={index}> <Link to={`${siteRoot}org/${item.urlPart}/`} className={`nav-link${currentItem == item.name ? ' active' : ''}`}>{item.text}</Link> </li> ); })} </ul> </div> ); } } Nav.propTypes = propTypes; export default Nav;
ajax/libs/yasgui/0.0.6/yasgui.min.js
lobbin/cdnjs
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.YASGUI=e()}}(function(){var e;return function t(e,n,r){function i(s,a){if(!n[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var p=n[s]={exports:{}};e[s][0].call(p.exports,function(t){var n=e[s][1][t];return i(n?n:t)},p,p.exports,t,e,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t){t.exports=e("./main.js")},{"./main.js":92}],2:[function(e,t){function n(){this._events=this._events||{};this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=n;n.EventEmitter=n;n.prototype._events=void 0;n.prototype._maxListeners=void 0;n.defaultMaxListeners=10;n.prototype.setMaxListeners=function(e){if(!i(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");this._maxListeners=e;return this};n.prototype.emit=function(e){var t,n,i,a,l,u;this._events||(this._events={});if("error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){t=arguments[1];if(t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}n=this._events[e];if(s(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:i=arguments.length;a=new Array(i-1);for(l=1;i>l;l++)a[l-1]=arguments[l];n.apply(this,a)}else if(o(n)){i=arguments.length;a=new Array(i-1);for(l=1;i>l;l++)a[l-1]=arguments[l];u=n.slice();i=u.length;for(l=0;i>l;l++)u[l].apply(this,a)}return!0};n.prototype.addListener=function(e,t){var i;if(!r(t))throw TypeError("listener must be a function");this._events||(this._events={});this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t);this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t;if(o(this._events[e])&&!this._events[e].warned){var i;i=s(this._maxListeners)?n.defaultMaxListeners:this._maxListeners;if(i&&i>0&&this._events[e].length>i){this._events[e].warned=!0;console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length);"function"==typeof console.trace&&console.trace()}}return this};n.prototype.on=n.prototype.addListener;n.prototype.once=function(e,t){function n(){this.removeListener(e,n);if(!i){i=!0;t.apply(this,arguments)}}if(!r(t))throw TypeError("listener must be a function");var i=!1;n.listener=t;this.on(e,n);return this};n.prototype.removeListener=function(e,t){var n,i,s,a;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;n=this._events[e];s=n.length;i=-1;if(n===t||r(n.listener)&&n.listener===t){delete this._events[e];this._events.removeListener&&this.emit("removeListener",e,t)}else if(o(n)){for(a=s;a-->0;)if(n[a]===t||n[a].listener&&n[a].listener===t){i=a;break}if(0>i)return this;if(1===n.length){n.length=0;delete this._events[e]}else n.splice(i,1);this._events.removeListener&&this.emit("removeListener",e,t)}return this};n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener){0===arguments.length?this._events={}:this._events[e]&&delete this._events[e];return this}if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);this.removeAllListeners("removeListener");this._events={};return this}n=this._events[e];if(r(n))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);delete this._events[e];return this};n.prototype.listeners=function(e){var t;t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[];return t};n.listenerCount=function(e,t){var n;n=e._events&&e._events[t]?r(e._events[t])?1:e._events[t].length:0;return n}},{}],3:[function(e){var t=function(){try{return e("jquery")}catch(t){return window.jQuery}}();(function(e,t){function n(e,t,n){return[parseFloat(e[0])*(f.test(e[0])?t/100:1),parseFloat(e[1])*(f.test(e[1])?n/100:1)]}function r(t,n){return parseInt(e.css(t,n),10)||0}function i(t){var n=t[0];return 9===n.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(n)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var o,s=Math.max,a=Math.abs,l=Math.round,u=/left|center|right/,p=/top|center|bottom/,c=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,f=/%$/,h=e.fn.position;e.position={scrollbarWidth:function(){if(o!==t)return o;var n,r,i=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),s=i.children()[0];e("body").append(i);n=s.offsetWidth;i.css("overflow","scroll");r=s.offsetWidth;n===r&&(r=i[0].clientWidth);i.remove();return o=n-r},getScrollInfo:function(t){var n=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),r=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),i="scroll"===n||"auto"===n&&t.width<t.element[0].scrollWidth,o="scroll"===r||"auto"===r&&t.height<t.element[0].scrollHeight;return{width:o?e.position.scrollbarWidth():0,height:i?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var n=e(t||window),r=e.isWindow(n[0]),i=!!n[0]&&9===n[0].nodeType;return{element:n,isWindow:r,isDocument:i,offset:n.offset()||{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:r?n.width():n.outerWidth(),height:r?n.height():n.outerHeight()}}};e.fn.position=function(t){if(!t||!t.of)return h.apply(this,arguments);t=e.extend({},t);var o,f,g,m,E,v,x=e(t.of),y=e.position.getWithinInfo(t.within),N=e.position.getScrollInfo(y),I=(t.collision||"flip").split(" "),A={};v=i(x);x[0].preventDefault&&(t.at="left top");f=v.width;g=v.height;m=v.offset;E=e.extend({},m);e.each(["my","at"],function(){var e,n,r=(t[this]||"").split(" ");1===r.length&&(r=u.test(r[0])?r.concat(["center"]):p.test(r[0])?["center"].concat(r):["center","center"]);r[0]=u.test(r[0])?r[0]:"center";r[1]=p.test(r[1])?r[1]:"center";e=c.exec(r[0]);n=c.exec(r[1]);A[this]=[e?e[0]:0,n?n[0]:0];t[this]=[d.exec(r[0])[0],d.exec(r[1])[0]]});1===I.length&&(I[1]=I[0]);"right"===t.at[0]?E.left+=f:"center"===t.at[0]&&(E.left+=f/2);"bottom"===t.at[1]?E.top+=g:"center"===t.at[1]&&(E.top+=g/2);o=n(A.at,f,g);E.left+=o[0];E.top+=o[1];return this.each(function(){var i,u,p=e(this),c=p.outerWidth(),d=p.outerHeight(),h=r(this,"marginLeft"),v=r(this,"marginTop"),T=c+h+r(this,"marginRight")+N.width,L=d+v+r(this,"marginBottom")+N.height,S=e.extend({},E),C=n(A.my,p.outerWidth(),p.outerHeight());"right"===t.my[0]?S.left-=c:"center"===t.my[0]&&(S.left-=c/2);"bottom"===t.my[1]?S.top-=d:"center"===t.my[1]&&(S.top-=d/2);S.left+=C[0];S.top+=C[1];if(!e.support.offsetFractions){S.left=l(S.left);S.top=l(S.top)}i={marginLeft:h,marginTop:v};e.each(["left","top"],function(n,r){e.ui.position[I[n]]&&e.ui.position[I[n]][r](S,{targetWidth:f,targetHeight:g,elemWidth:c,elemHeight:d,collisionPosition:i,collisionWidth:T,collisionHeight:L,offset:[o[0]+C[0],o[1]+C[1]],my:t.my,at:t.at,within:y,elem:p})});t.using&&(u=function(e){var n=m.left-S.left,r=n+f-c,i=m.top-S.top,o=i+g-d,l={target:{element:x,left:m.left,top:m.top,width:f,height:g},element:{element:p,left:S.left,top:S.top,width:c,height:d},horizontal:0>r?"left":n>0?"right":"center",vertical:0>o?"top":i>0?"bottom":"middle"};c>f&&a(n+r)<f&&(l.horizontal="center");d>g&&a(i+o)<g&&(l.vertical="middle");l.important=s(a(n),a(r))>s(a(i),a(o))?"horizontal":"vertical";t.using.call(this,e,l)});p.offset(e.extend(S,{using:u}))})};e.ui.position={fit:{left:function(e,t){var n,r=t.within,i=r.isWindow?r.scrollLeft:r.offset.left,o=r.width,a=e.left-t.collisionPosition.marginLeft,l=i-a,u=a+t.collisionWidth-o-i;if(t.collisionWidth>o)if(l>0&&0>=u){n=e.left+l+t.collisionWidth-o-i;e.left+=l-n}else e.left=u>0&&0>=l?i:l>u?i+o-t.collisionWidth:i;else l>0?e.left+=l:u>0?e.left-=u:e.left=s(e.left-a,e.left)},top:function(e,t){var n,r=t.within,i=r.isWindow?r.scrollTop:r.offset.top,o=t.within.height,a=e.top-t.collisionPosition.marginTop,l=i-a,u=a+t.collisionHeight-o-i;if(t.collisionHeight>o)if(l>0&&0>=u){n=e.top+l+t.collisionHeight-o-i;e.top+=l-n}else e.top=u>0&&0>=l?i:l>u?i+o-t.collisionHeight:i;else l>0?e.top+=l:u>0?e.top-=u:e.top=s(e.top-a,e.top)}},flip:{left:function(e,t){var n,r,i=t.within,o=i.offset.left+i.scrollLeft,s=i.width,l=i.isWindow?i.scrollLeft:i.offset.left,u=e.left-t.collisionPosition.marginLeft,p=u-l,c=u+t.collisionWidth-s-l,d="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,f="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,h=-2*t.offset[0];if(0>p){n=e.left+d+f+h+t.collisionWidth-s-o;(0>n||n<a(p))&&(e.left+=d+f+h)}else if(c>0){r=e.left-t.collisionPosition.marginLeft+d+f+h-l;(r>0||a(r)<c)&&(e.left+=d+f+h)}},top:function(e,t){var n,r,i=t.within,o=i.offset.top+i.scrollTop,s=i.height,l=i.isWindow?i.scrollTop:i.offset.top,u=e.top-t.collisionPosition.marginTop,p=u-l,c=u+t.collisionHeight-s-l,d="top"===t.my[1],f=d?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,h="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,g=-2*t.offset[1];if(0>p){r=e.top+f+h+g+t.collisionHeight-s-o;e.top+f+h+g>p&&(0>r||r<a(p))&&(e.top+=f+h+g)}else if(c>0){n=e.top-t.collisionPosition.marginTop+f+h+g-l;e.top+f+h+g>c&&(n>0||a(n)<c)&&(e.top+=f+h+g)}}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments);e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments);e.ui.position.fit.top.apply(this,arguments)}}};(function(){var t,n,r,i,o,s=document.getElementsByTagName("body")[0],a=document.createElement("div");t=document.createElement(s?"div":"body");r={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};s&&e.extend(r,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in r)t.style[o]=r[o];t.appendChild(a);n=s||document.documentElement;n.insertBefore(t,n.firstChild);a.style.cssText="position: absolute; left: 10.7432222px;";i=e(a).offset().left;e.support.offsetFractions=i>10&&11>i;t.innerHTML="";n.removeChild(t)})()})(t)},{jquery:void 0}],4:[function(t,n,r){(function(t,i){"function"==typeof e&&e.amd?e(i):"object"==typeof r?n.exports=i():t.MicroPlugin=i()})(this,function(){var e={};e.mixin=function(e){e.plugins={};e.prototype.initializePlugins=function(e){var n,r,i,o=this,s=[];o.plugins={names:[],settings:{},requested:{},loaded:{}};if(t.isArray(e))for(n=0,r=e.length;r>n;n++)if("string"==typeof e[n])s.push(e[n]);else{o.plugins.settings[e[n].name]=e[n].options;s.push(e[n].name)}else if(e)for(i in e)if(e.hasOwnProperty(i)){o.plugins.settings[i]=e[i];s.push(i)}for(;s.length;)o.require(s.shift())};e.prototype.loadPlugin=function(t){var n=this,r=n.plugins,i=e.plugins[t];if(!e.plugins.hasOwnProperty(t))throw new Error('Unable to find "'+t+'" plugin');r.requested[t]=!0;r.loaded[t]=i.fn.apply(n,[n.plugins.settings[t]||{}]);r.names.push(t)};e.prototype.require=function(e){var t=this,n=t.plugins;if(!t.plugins.loaded.hasOwnProperty(e)){if(n.requested[e])throw new Error('Plugin has circular dependency ("'+e+'")');t.loadPlugin(e)}return n.loaded[e]};e.define=function(t,n){e.plugins[t]={name:t,fn:n}}};var t={isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}};return e})},{}],5:[function(t,n,r){(function(i,o){"function"==typeof e&&e.amd?e(["jquery","sifter","microplugin"],o):"object"==typeof r?n.exports=o(function(){try{return t("jquery")}catch(e){return window.jQuery}}(),t("sifter"),t("microplugin")):i.Selectize=o(i.jQuery,i.Sifter,i.MicroPlugin)})(this,function(e,t,n){"use strict";var r=function(e,t){if("string"!=typeof t||t.length){var n="string"==typeof t?new RegExp(t,"i"):t,r=function(e){var t=0;if(3===e.nodeType){var i=e.data.search(n);if(i>=0&&e.data.length>0){var o=e.data.match(n),s=document.createElement("span");s.className="highlight";var a=e.splitText(i),l=(a.splitText(o[0].length),a.cloneNode(!0));s.appendChild(l);a.parentNode.replaceChild(s,a);t=1}}else if(1===e.nodeType&&e.childNodes&&!/(script|style)/i.test(e.tagName))for(var u=0;u<e.childNodes.length;++u)u+=r(e.childNodes[u]);return t};return e.each(function(){r(this)})}},i=function(){};i.prototype={on:function(e,t){this._events=this._events||{};this._events[e]=this._events[e]||[];this._events[e].push(t)},off:function(e,t){var n=arguments.length;if(0===n)return delete this._events;if(1===n)return delete this._events[e];this._events=this._events||{};e in this._events!=!1&&this._events[e].splice(this._events[e].indexOf(t),1)},trigger:function(e){this._events=this._events||{};if(e in this._events!=!1)for(var t=0;t<this._events[e].length;t++)this._events[e][t].apply(this,Array.prototype.slice.call(arguments,1))}};i.mixin=function(e){for(var t=["on","off","trigger"],n=0;n<t.length;n++)e.prototype[t[n]]=i.prototype[t[n]]};var o=/Mac/.test(navigator.userAgent),s=65,a=13,l=27,u=37,p=38,c=80,d=39,f=40,h=78,g=8,m=46,E=16,v=o?91:17,x=o?18:17,y=9,N=1,I=2,A=function(e){return"undefined"!=typeof e},T=function(e){return"undefined"==typeof e||null===e?null:"boolean"==typeof e?e?"1":"0":e+""},L=function(e){return(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},S=function(e){return(e+"").replace(/\$/g,"$$$$")},C={};C.before=function(e,t,n){var r=e[t];e[t]=function(){n.apply(e,arguments);return r.apply(e,arguments)}};C.after=function(e,t,n){var r=e[t];e[t]=function(){var t=r.apply(e,arguments);n.apply(e,arguments);return t}};var b=function(t,n){if(!e.isArray(n))return n;var r,i,o={};for(r=0,i=n.length;i>r;r++)n[r].hasOwnProperty(t)&&(o[n[r][t]]=n[r]);return o},R=function(e){var t=!1;return function(){if(!t){t=!0;e.apply(this,arguments)}}},w=function(e,t){var n;return function(){var r=this,i=arguments;window.clearTimeout(n);n=window.setTimeout(function(){e.apply(r,i)},t)}},O=function(e,t,n){var r,i=e.trigger,o={};e.trigger=function(){var n=arguments[0];if(-1===t.indexOf(n))return i.apply(e,arguments);o[n]=arguments;return void 0};n.apply(e,[]);e.trigger=i;for(r in o)o.hasOwnProperty(r)&&i.apply(e,o[r])},_=function(e,t,n,r){e.on(t,n,function(t){for(var n=t.target;n&&n.parentNode!==e[0];)n=n.parentNode;t.currentTarget=n;return r.apply(this,[t])})},F=function(e){var t={};if("selectionStart"in e){t.start=e.selectionStart;t.length=e.selectionEnd-t.start}else if(document.selection){e.focus();var n=document.selection.createRange(),r=document.selection.createRange().text.length;n.moveStart("character",-e.value.length);t.start=n.text.length-r;t.length=r}return t},P=function(e,t,n){var r,i,o={};if(n)for(r=0,i=n.length;i>r;r++)o[n[r]]=e.css(n[r]);else o=e.css();t.css(o)},M=function(t,n){if(!t)return 0;var r=e("<test>").css({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).text(t).appendTo("body");P(n,r,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]);var i=r.width();r.remove();return i},k=function(e){var t=null,n=function(n,r){var i,o,s,a,l,u,p,c;n=n||window.event||{};r=r||{};if(!n.metaKey&&!n.altKey&&(r.force||e.data("grow")!==!1)){i=e.val();if(n.type&&"keydown"===n.type.toLowerCase()){o=n.keyCode;s=o>=97&&122>=o||o>=65&&90>=o||o>=48&&57>=o||32===o;if(o===m||o===g){c=F(e[0]);c.length?i=i.substring(0,c.start)+i.substring(c.start+c.length):o===g&&c.start?i=i.substring(0,c.start-1)+i.substring(c.start+1):o===m&&"undefined"!=typeof c.start&&(i=i.substring(0,c.start)+i.substring(c.start+1))}else if(s){u=n.shiftKey;p=String.fromCharCode(n.keyCode);p=u?p.toUpperCase():p.toLowerCase();i+=p}}a=e.attr("placeholder");!i&&a&&(i=a);l=M(i,e)+4;if(l!==t){t=l;e.width(l);e.triggerHandler("resize")}}};e.on("keydown keyup update blur",n);n()},D=function(n,r){var i,o,s=this;o=n[0];o.selectize=s;var a=window.getComputedStyle&&window.getComputedStyle(o,null);i=a?a.getPropertyValue("direction"):o.currentStyle&&o.currentStyle.direction;i=i||n.parents("[dir]:first").attr("dir")||"";e.extend(s,{settings:r,$input:n,tagType:"select"===o.tagName.toLowerCase()?N:I,rtl:/rtl/i.test(i),eventNS:".selectize"+ ++D.count,highlightedValue:null,isOpen:!1,isDisabled:!1,isRequired:n.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===r.loadThrottle?s.onSearchChange:w(s.onSearchChange,r.loadThrottle)});s.sifter=new t(this.options,{diacritics:r.diacritics});e.extend(s.options,b(r.valueField,r.options));delete s.settings.options;e.extend(s.optgroups,b(r.optgroupValueField,r.optgroups));delete s.settings.optgroups;s.settings.mode=s.settings.mode||(1===s.settings.maxItems?"single":"multi");"boolean"!=typeof s.settings.hideSelected&&(s.settings.hideSelected="multi"===s.settings.mode);s.initializePlugins(s.settings.plugins);s.setupCallbacks();s.setupTemplates();s.setup()};i.mixin(D);n.mixin(D);e.extend(D.prototype,{setup:function(){var t,n,r,i,s,a,l,u,p,c,d=this,f=d.settings,h=d.eventNS,g=e(window),m=e(document),y=d.$input;l=d.settings.mode;u=y.attr("tabindex")||"";p=y.attr("class")||"";t=e("<div>").addClass(f.wrapperClass).addClass(p).addClass(l);n=e("<div>").addClass(f.inputClass).addClass("items").appendTo(t);r=e('<input type="text" autocomplete="off" />').appendTo(n).attr("tabindex",u);a=e(f.dropdownParent||t);i=e("<div>").addClass(f.dropdownClass).addClass(l).hide().appendTo(a);s=e("<div>").addClass(f.dropdownContentClass).appendTo(i);d.settings.copyClassesToDropdown&&i.addClass(p);t.css({width:y[0].style.width});if(d.plugins.names.length){c="plugin-"+d.plugins.names.join(" plugin-");t.addClass(c);i.addClass(c)}(null===f.maxItems||f.maxItems>1)&&d.tagType===N&&y.attr("multiple","multiple");d.settings.placeholder&&r.attr("placeholder",f.placeholder);y.attr("autocorrect")&&r.attr("autocorrect",y.attr("autocorrect"));y.attr("autocapitalize")&&r.attr("autocapitalize",y.attr("autocapitalize"));d.$wrapper=t;d.$control=n;d.$control_input=r;d.$dropdown=i;d.$dropdown_content=s;i.on("mouseenter","[data-selectable]",function(){return d.onOptionHover.apply(d,arguments)});i.on("mousedown","[data-selectable]",function(){return d.onOptionSelect.apply(d,arguments)});_(n,"mousedown","*:not(input)",function(){return d.onItemSelect.apply(d,arguments)});k(r);n.on({mousedown:function(){return d.onMouseDown.apply(d,arguments)},click:function(){return d.onClick.apply(d,arguments)}});r.on({mousedown:function(e){e.stopPropagation()},keydown:function(){return d.onKeyDown.apply(d,arguments)},keyup:function(){return d.onKeyUp.apply(d,arguments)},keypress:function(){return d.onKeyPress.apply(d,arguments)},resize:function(){d.positionDropdown.apply(d,[])},blur:function(){return d.onBlur.apply(d,arguments)},focus:function(){d.ignoreBlur=!1;return d.onFocus.apply(d,arguments)},paste:function(){return d.onPaste.apply(d,arguments)}});m.on("keydown"+h,function(e){d.isCmdDown=e[o?"metaKey":"ctrlKey"];d.isCtrlDown=e[o?"altKey":"ctrlKey"];d.isShiftDown=e.shiftKey});m.on("keyup"+h,function(e){e.keyCode===x&&(d.isCtrlDown=!1);e.keyCode===E&&(d.isShiftDown=!1);e.keyCode===v&&(d.isCmdDown=!1)});m.on("mousedown"+h,function(e){if(d.isFocused){if(e.target===d.$dropdown[0]||e.target.parentNode===d.$dropdown[0])return!1;d.$control.has(e.target).length||e.target===d.$control[0]||d.blur()}});g.on(["scroll"+h,"resize"+h].join(" "),function(){d.isOpen&&d.positionDropdown.apply(d,arguments)});g.on("mousemove"+h,function(){d.ignoreHover=!1});this.revertSettings={$children:y.children().detach(),tabindex:y.attr("tabindex")};y.attr("tabindex",-1).hide().after(d.$wrapper);if(e.isArray(f.items)){d.setValue(f.items);delete f.items}y[0].validity&&y.on("invalid"+h,function(e){e.preventDefault();d.isInvalid=!0;d.refreshState()});d.updateOriginalInput();d.refreshItems();d.refreshState();d.updatePlaceholder();d.isSetup=!0;y.is(":disabled")&&d.disable();d.on("change",this.onChange);y.data("selectize",d);y.addClass("selectized");d.trigger("initialize");f.preload===!0&&d.onSearchChange("")},setupTemplates:function(){var t=this,n=t.settings.labelField,r=t.settings.optgroupLabelField,i={optgroup:function(e){return'<div class="optgroup">'+e.html+"</div>"},optgroup_header:function(e,t){return'<div class="optgroup-header">'+t(e[r])+"</div>"},option:function(e,t){return'<div class="option">'+t(e[n])+"</div>"},item:function(e,t){return'<div class="item">'+t(e[n])+"</div>"},option_create:function(e,t){return'<div class="create">Add <strong>'+t(e.input)+"</strong>&hellip;</div>"}};t.settings.render=e.extend({},i,t.settings.render)},setupCallbacks:function(){var e,t,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad"};for(e in n)if(n.hasOwnProperty(e)){t=this.settings[n[e]];t&&this.on(e,t)}},onClick:function(e){var t=this;if(!t.isFocused){t.focus();e.preventDefault()}},onMouseDown:function(t){{var n=this,r=t.isDefaultPrevented();e(t.target)}if(n.isFocused){if(t.target!==n.$control_input[0]){"single"===n.settings.mode?n.isOpen?n.close():n.open():r||n.setActiveItem(null);return!1}}else r||window.setTimeout(function(){n.focus()},0)},onChange:function(){this.$input.trigger("change")},onPaste:function(e){var t=this;(t.isFull()||t.isInputHidden||t.isLocked)&&e.preventDefault()},onKeyPress:function(e){if(this.isLocked)return e&&e.preventDefault();var t=String.fromCharCode(e.keyCode||e.which);if(this.settings.create&&t===this.settings.delimiter){this.createItem();e.preventDefault();return!1}},onKeyDown:function(e){var t=(e.target===this.$control_input[0],this);if(t.isLocked)e.keyCode!==y&&e.preventDefault();else{switch(e.keyCode){case s:if(t.isCmdDown){t.selectAll();return}break;case l:t.close();return;case h:if(!e.ctrlKey||e.altKey)break;case f:if(!t.isOpen&&t.hasOptions)t.open();else if(t.$activeOption){t.ignoreHover=!0;var n=t.getAdjacentOption(t.$activeOption,1);n.length&&t.setActiveOption(n,!0,!0)}e.preventDefault();return;case c:if(!e.ctrlKey||e.altKey)break;case p:if(t.$activeOption){t.ignoreHover=!0;var r=t.getAdjacentOption(t.$activeOption,-1);r.length&&t.setActiveOption(r,!0,!0)}e.preventDefault();return;case a:t.isOpen&&t.$activeOption&&t.onOptionSelect({currentTarget:t.$activeOption});e.preventDefault();return;case u:t.advanceSelection(-1,e);return;case d:t.advanceSelection(1,e);return;case y:if(t.settings.selectOnTab&&t.isOpen&&t.$activeOption){t.onOptionSelect({currentTarget:t.$activeOption});e.preventDefault()}t.settings.create&&t.createItem()&&e.preventDefault();return;case g:case m:t.deleteSelection(e);return}!t.isFull()&&!t.isInputHidden||(o?e.metaKey:e.ctrlKey)||e.preventDefault()}},onKeyUp:function(e){var t=this;if(t.isLocked)return e&&e.preventDefault();var n=t.$control_input.val()||"";if(t.lastValue!==n){t.lastValue=n;t.onSearchChange(n);t.refreshOptions();t.trigger("type",n)}},onSearchChange:function(e){var t=this,n=t.settings.load;if(n&&!t.loadedSearches.hasOwnProperty(e)){t.loadedSearches[e]=!0;t.load(function(r){n.apply(t,[e,r])})}},onFocus:function(e){var t=this;t.isFocused=!0;if(t.isDisabled){t.blur();e&&e.preventDefault();return!1}if(!t.ignoreFocus){"focus"===t.settings.preload&&t.onSearchChange("");if(!t.$activeItems.length){t.showInput();t.setActiveItem(null);t.refreshOptions(!!t.settings.openOnFocus)}t.refreshState()}},onBlur:function(e){var t=this;t.isFocused=!1;if(!t.ignoreFocus)if(t.ignoreBlur||document.activeElement!==t.$dropdown_content[0]){t.settings.create&&t.settings.createOnBlur&&t.createItem(!1);t.close();t.setTextboxValue("");t.setActiveItem(null);t.setActiveOption(null);t.setCaret(t.items.length);t.refreshState()}else{t.ignoreBlur=!0;t.onFocus(e)}},onOptionHover:function(e){this.ignoreHover||this.setActiveOption(e.currentTarget,!1)},onOptionSelect:function(t){var n,r,i=this;if(t.preventDefault){t.preventDefault();t.stopPropagation()}r=e(t.currentTarget);if(r.hasClass("create"))i.createItem();else{n=r.attr("data-value");if("undefined"!=typeof n){i.lastQuery=null;i.setTextboxValue("");i.addItem(n);!i.settings.hideSelected&&t.type&&/mouse/.test(t.type)&&i.setActiveOption(i.getOption(n))}}},onItemSelect:function(e){var t=this;if(!t.isLocked&&"multi"===t.settings.mode){e.preventDefault();t.setActiveItem(e.currentTarget,e)}},load:function(e){var t=this,n=t.$wrapper.addClass("loading");t.loading++;e.apply(t,[function(e){t.loading=Math.max(t.loading-1,0);if(e&&e.length){t.addOption(e);t.refreshOptions(t.isFocused&&!t.isInputHidden)}t.loading||n.removeClass("loading");t.trigger("load",e)}])},setTextboxValue:function(e){var t=this.$control_input,n=t.val()!==e;if(n){t.val(e).triggerHandler("update");this.lastValue=e}},getValue:function(){return this.tagType===N&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(e){O(this,["change"],function(){this.clear();this.addItems(e)})},setActiveItem:function(t,n){var r,i,o,s,a,l,u,p,c=this;if("single"!==c.settings.mode){t=e(t);if(t.length){r=n&&n.type.toLowerCase();if("mousedown"===r&&c.isShiftDown&&c.$activeItems.length){p=c.$control.children(".active:last");s=Array.prototype.indexOf.apply(c.$control[0].childNodes,[p[0]]);a=Array.prototype.indexOf.apply(c.$control[0].childNodes,[t[0]]);if(s>a){u=s;s=a;a=u}for(i=s;a>=i;i++){l=c.$control[0].childNodes[i];if(-1===c.$activeItems.indexOf(l)){e(l).addClass("active");c.$activeItems.push(l)}}n.preventDefault()}else if("mousedown"===r&&c.isCtrlDown||"keydown"===r&&this.isShiftDown)if(t.hasClass("active")){o=c.$activeItems.indexOf(t[0]);c.$activeItems.splice(o,1);t.removeClass("active")}else c.$activeItems.push(t.addClass("active")[0]);else{e(c.$activeItems).removeClass("active");c.$activeItems=[t.addClass("active")[0]]}c.hideInput();this.isFocused||c.focus()}else{e(c.$activeItems).removeClass("active");c.$activeItems=[];c.isFocused&&c.showInput()}}},setActiveOption:function(t,n,r){var i,o,s,a,l,u=this;u.$activeOption&&u.$activeOption.removeClass("active");u.$activeOption=null;t=e(t);if(t.length){u.$activeOption=t.addClass("active");if(n||!A(n)){i=u.$dropdown_content.height();o=u.$activeOption.outerHeight(!0);n=u.$dropdown_content.scrollTop()||0;s=u.$activeOption.offset().top-u.$dropdown_content.offset().top+n;a=s;l=s-i+o;s+o>i+n?u.$dropdown_content.stop().animate({scrollTop:l},r?u.settings.scrollDuration:0):n>s&&u.$dropdown_content.stop().animate({scrollTop:a},r?u.settings.scrollDuration:0)}}},selectAll:function(){var e=this;if("single"!==e.settings.mode){e.$activeItems=Array.prototype.slice.apply(e.$control.children(":not(input)").addClass("active"));if(e.$activeItems.length){e.hideInput();e.close()}e.focus()}},hideInput:function(){var e=this;e.setTextboxValue("");e.$control_input.css({opacity:0,position:"absolute",left:e.rtl?1e4:-1e4});e.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1,position:"relative",left:0});this.isInputHidden=!1},focus:function(){var e=this;if(!e.isDisabled){e.ignoreFocus=!0;e.$control_input[0].focus();window.setTimeout(function(){e.ignoreFocus=!1;e.onFocus()},0)}},blur:function(){this.$control_input.trigger("blur")},getScoreFunction:function(e){return this.sifter.getScoreFunction(e,this.getSearchOptions())},getSearchOptions:function(){var e=this.settings,t=e.sortField;"string"==typeof t&&(t={field:t});return{fields:e.searchField,conjunction:e.searchConjunction,sort:t}},search:function(t){var n,r,i,o=this,s=o.settings,a=this.getSearchOptions();if(s.score){i=o.settings.score.apply(this,[t]);if("function"!=typeof i)throw new Error('Selectize "score" setting must be a function that returns a function')}if(t!==o.lastQuery){o.lastQuery=t;r=o.sifter.search(t,e.extend(a,{score:i}));o.currentResults=r}else r=e.extend(!0,{},o.currentResults);if(s.hideSelected)for(n=r.items.length-1;n>=0;n--)-1!==o.items.indexOf(T(r.items[n].id))&&r.items.splice(n,1);return r},refreshOptions:function(t){var n,i,o,s,a,l,u,p,c,d,f,h,g,m,E,v;"undefined"==typeof t&&(t=!0);var x=this,y=e.trim(x.$control_input.val()),N=x.search(y),I=x.$dropdown_content,A=x.$activeOption&&T(x.$activeOption.attr("data-value"));s=N.items.length;"number"==typeof x.settings.maxOptions&&(s=Math.min(s,x.settings.maxOptions));a={};if(x.settings.optgroupOrder){l=x.settings.optgroupOrder;for(n=0;n<l.length;n++)a[l[n]]=[]}else l=[];for(n=0;s>n;n++){u=x.options[N.items[n].id];p=x.render("option",u);c=u[x.settings.optgroupField]||"";d=e.isArray(c)?c:[c];for(i=0,o=d&&d.length;o>i;i++){c=d[i];x.optgroups.hasOwnProperty(c)||(c="");if(!a.hasOwnProperty(c)){a[c]=[];l.push(c)}a[c].push(p)}}f=[];for(n=0,s=l.length;s>n;n++){c=l[n];if(x.optgroups.hasOwnProperty(c)&&a[c].length){h=x.render("optgroup_header",x.optgroups[c])||"";h+=a[c].join("");f.push(x.render("optgroup",e.extend({},x.optgroups[c],{html:h})))}else f.push(a[c].join(""))}I.html(f.join(""));if(x.settings.highlight&&N.query.length&&N.tokens.length)for(n=0,s=N.tokens.length;s>n;n++)r(I,N.tokens[n].regex);if(!x.settings.hideSelected)for(n=0,s=x.items.length;s>n;n++)x.getOption(x.items[n]).addClass("selected");g=x.canCreate(y);if(g){I.prepend(x.render("option_create",{input:y}));v=e(I[0].childNodes[0])}x.hasOptions=N.items.length>0||g;if(x.hasOptions){if(N.items.length>0){E=A&&x.getOption(A);E&&E.length?m=E:"single"===x.settings.mode&&x.items.length&&(m=x.getOption(x.items[0]));m&&m.length||(m=v&&!x.settings.addPrecedence?x.getAdjacentOption(v,1):I.find("[data-selectable]:first"))}else m=v;x.setActiveOption(m);t&&!x.isOpen&&x.open()}else{x.setActiveOption(null);t&&x.isOpen&&x.close()}},addOption:function(t){var n,r,i,o=this;if(e.isArray(t))for(n=0,r=t.length;r>n;n++)o.addOption(t[n]);else{i=T(t[o.settings.valueField]);if("string"==typeof i&&!o.options.hasOwnProperty(i)){o.userOptions[i]=!0;o.options[i]=t;o.lastQuery=null;o.trigger("option_add",i,t)}}},addOptionGroup:function(e,t){this.optgroups[e]=t;this.trigger("optgroup_add",e,t)},updateOption:function(t,n){var r,i,o,s,a,l,u=this;t=T(t);o=T(n[u.settings.valueField]);if(null!==t&&u.options.hasOwnProperty(t)){if("string"!=typeof o)throw new Error("Value must be set in option data");if(o!==t){delete u.options[t];s=u.items.indexOf(t);-1!==s&&u.items.splice(s,1,o)}u.options[o]=n;a=u.renderCache.item;l=u.renderCache.option;if(a){delete a[t];delete a[o]}if(l){delete l[t];delete l[o]}if(-1!==u.items.indexOf(o)){r=u.getItem(t);i=e(u.render("item",n));r.hasClass("active")&&i.addClass("active");r.replaceWith(i)}u.lastQuery=null;u.isOpen&&u.refreshOptions(!1)}},removeOption:function(e){var t=this;e=T(e);var n=t.renderCache.item,r=t.renderCache.option;n&&delete n[e];r&&delete r[e];delete t.userOptions[e];delete t.options[e];t.lastQuery=null;t.trigger("option_remove",e);t.removeItem(e)},clearOptions:function(){var e=this;e.loadedSearches={};e.userOptions={};e.renderCache={};e.options=e.sifter.items={};e.lastQuery=null;e.trigger("option_clear");e.clear()},getOption:function(e){return this.getElementWithValue(e,this.$dropdown_content.find("[data-selectable]"))},getAdjacentOption:function(t,n){var r=this.$dropdown.find("[data-selectable]"),i=r.index(t)+n;return i>=0&&i<r.length?r.eq(i):e()},getElementWithValue:function(t,n){t=T(t);if("undefined"!=typeof t&&null!==t)for(var r=0,i=n.length;i>r;r++)if(n[r].getAttribute("data-value")===t)return e(n[r]); return e()},getItem:function(e){return this.getElementWithValue(e,this.$control.children())},addItems:function(t){for(var n=e.isArray(t)?t:[t],r=0,i=n.length;i>r;r++){this.isPending=i-1>r;this.addItem(n[r])}},addItem:function(t){O(this,["change"],function(){var n,r,i,o,s,a=this,l=a.settings.mode;t=T(t);if(-1===a.items.indexOf(t)){if(a.options.hasOwnProperty(t)){"single"===l&&a.clear();if("multi"!==l||!a.isFull()){n=e(a.render("item",a.options[t]));s=a.isFull();a.items.splice(a.caretPos,0,t);a.insertAtCaret(n);(!a.isPending||!s&&a.isFull())&&a.refreshState();if(a.isSetup){i=a.$dropdown_content.find("[data-selectable]");if(!a.isPending){r=a.getOption(t);o=a.getAdjacentOption(r,1).attr("data-value");a.refreshOptions(a.isFocused&&"single"!==l);o&&a.setActiveOption(a.getOption(o))}!i.length||a.isFull()?a.close():a.positionDropdown();a.updatePlaceholder();a.trigger("item_add",t,n);a.updateOriginalInput()}}}}else"single"===l&&a.close()})},removeItem:function(e){var t,n,r,i=this;t="object"==typeof e?e:i.getItem(e);e=T(t.attr("data-value"));n=i.items.indexOf(e);if(-1!==n){t.remove();if(t.hasClass("active")){r=i.$activeItems.indexOf(t[0]);i.$activeItems.splice(r,1)}i.items.splice(n,1);i.lastQuery=null;!i.settings.persist&&i.userOptions.hasOwnProperty(e)&&i.removeOption(e);n<i.caretPos&&i.setCaret(i.caretPos-1);i.refreshState();i.updatePlaceholder();i.updateOriginalInput();i.positionDropdown();i.trigger("item_remove",e)}},createItem:function(t){var n=this,r=e.trim(n.$control_input.val()||""),i=n.caretPos;if(!n.canCreate(r))return!1;n.lock();"undefined"==typeof t&&(t=!0);var o="function"==typeof n.settings.create?this.settings.create:function(e){var t={};t[n.settings.labelField]=e;t[n.settings.valueField]=e;return t},s=R(function(e){n.unlock();if(e&&"object"==typeof e){var r=T(e[n.settings.valueField]);if("string"==typeof r){n.setTextboxValue("");n.addOption(e);n.setCaret(i);n.addItem(r);n.refreshOptions(t&&"single"!==n.settings.mode)}}}),a=o.apply(this,[r,s]);"undefined"!=typeof a&&s(a);return!0},refreshItems:function(){this.lastQuery=null;if(this.isSetup)for(var e=0;e<this.items.length;e++)this.addItem(this.items);this.refreshState();this.updateOriginalInput()},refreshState:function(){var e,t=this;if(t.isRequired){t.items.length&&(t.isInvalid=!1);t.$control_input.prop("required",e)}t.refreshClasses()},refreshClasses:function(){var t=this,n=t.isFull(),r=t.isLocked;t.$wrapper.toggleClass("rtl",t.rtl);t.$control.toggleClass("focus",t.isFocused).toggleClass("disabled",t.isDisabled).toggleClass("required",t.isRequired).toggleClass("invalid",t.isInvalid).toggleClass("locked",r).toggleClass("full",n).toggleClass("not-full",!n).toggleClass("input-active",t.isFocused&&!t.isInputHidden).toggleClass("dropdown-active",t.isOpen).toggleClass("has-options",!e.isEmptyObject(t.options)).toggleClass("has-items",t.items.length>0);t.$control_input.data("grow",!n&&!r)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(){var e,t,n,r=this;if(r.tagType===N){n=[];for(e=0,t=r.items.length;t>e;e++)n.push('<option value="'+L(r.items[e])+'" selected="selected"></option>');n.length||this.$input.attr("multiple")||n.push('<option value="" selected="selected"></option>');r.$input.html(n.join(""))}else{r.$input.val(r.getValue());r.$input.attr("value",r.$input.val())}r.isSetup&&r.trigger("change",r.$input.val())},updatePlaceholder:function(){if(this.settings.placeholder){var e=this.$control_input;this.items.length?e.removeAttr("placeholder"):e.attr("placeholder",this.settings.placeholder);e.triggerHandler("update",{force:!0})}},open:function(){var e=this;if(!(e.isLocked||e.isOpen||"multi"===e.settings.mode&&e.isFull())){e.focus();e.isOpen=!0;e.refreshState();e.$dropdown.css({visibility:"hidden",display:"block"});e.positionDropdown();e.$dropdown.css({visibility:"visible"});e.trigger("dropdown_open",e.$dropdown)}},close:function(){var e=this,t=e.isOpen;"single"===e.settings.mode&&e.items.length&&e.hideInput();e.isOpen=!1;e.$dropdown.hide();e.setActiveOption(null);e.refreshState();t&&e.trigger("dropdown_close",e.$dropdown)},positionDropdown:function(){var e=this.$control,t="body"===this.settings.dropdownParent?e.offset():e.position();t.top+=e.outerHeight(!0);this.$dropdown.css({width:e.outerWidth(),top:t.top,left:t.left})},clear:function(){var e=this;if(e.items.length){e.$control.children(":not(input)").remove();e.items=[];e.lastQuery=null;e.setCaret(0);e.setActiveItem(null);e.updatePlaceholder();e.updateOriginalInput();e.refreshState();e.showInput();e.trigger("clear")}},insertAtCaret:function(t){var n=Math.min(this.caretPos,this.items.length);0===n?this.$control.prepend(t):e(this.$control[0].childNodes[n]).before(t);this.setCaret(n+1)},deleteSelection:function(t){var n,r,i,o,s,a,l,u,p,c=this;i=t&&t.keyCode===g?-1:1;o=F(c.$control_input[0]);c.$activeOption&&!c.settings.hideSelected&&(l=c.getAdjacentOption(c.$activeOption,-1).attr("data-value"));s=[];if(c.$activeItems.length){p=c.$control.children(".active:"+(i>0?"last":"first"));a=c.$control.children(":not(input)").index(p);i>0&&a++;for(n=0,r=c.$activeItems.length;r>n;n++)s.push(e(c.$activeItems[n]).attr("data-value"));if(t){t.preventDefault();t.stopPropagation()}}else(c.isFocused||"single"===c.settings.mode)&&c.items.length&&(0>i&&0===o.start&&0===o.length?s.push(c.items[c.caretPos-1]):i>0&&o.start===c.$control_input.val().length&&s.push(c.items[c.caretPos]));if(!s.length||"function"==typeof c.settings.onDelete&&c.settings.onDelete.apply(c,[s])===!1)return!1;"undefined"!=typeof a&&c.setCaret(a);for(;s.length;)c.removeItem(s.pop());c.showInput();c.positionDropdown();c.refreshOptions(!0);if(l){u=c.getOption(l);u.length&&c.setActiveOption(u)}return!0},advanceSelection:function(e,t){var n,r,i,o,s,a,l=this;if(0!==e){l.rtl&&(e*=-1);n=e>0?"last":"first";r=F(l.$control_input[0]);if(l.isFocused&&!l.isInputHidden){o=l.$control_input.val().length;s=0>e?0===r.start&&0===r.length:r.start===o;s&&!o&&l.advanceCaret(e,t)}else{a=l.$control.children(".active:"+n);if(a.length){i=l.$control.children(":not(input)").index(a);l.setActiveItem(null);l.setCaret(e>0?i+1:i)}}}},advanceCaret:function(e,t){var n,r,i=this;if(0!==e){n=e>0?"next":"prev";if(i.isShiftDown){r=i.$control_input[n]();if(r.length){i.hideInput();i.setActiveItem(r);t&&t.preventDefault()}}else i.setCaret(i.caretPos+e)}},setCaret:function(t){var n=this;t="single"===n.settings.mode?n.items.length:Math.max(0,Math.min(n.items.length,t));if(!n.isPending){var r,i,o,s;o=n.$control.children(":not(input)");for(r=0,i=o.length;i>r;r++){s=e(o[r]).detach();t>r?n.$control_input.before(s):n.$control.append(s)}}n.caretPos=t},lock:function(){this.close();this.isLocked=!0;this.refreshState()},unlock:function(){this.isLocked=!1;this.refreshState()},disable:function(){var e=this;e.$input.prop("disabled",!0);e.isDisabled=!0;e.lock()},enable:function(){var e=this;e.$input.prop("disabled",!1);e.isDisabled=!1;e.unlock()},destroy:function(){var t=this,n=t.eventNS,r=t.revertSettings;t.trigger("destroy");t.off();t.$wrapper.remove();t.$dropdown.remove();t.$input.html("").append(r.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:r.tabindex}).show();t.$control_input.removeData("grow");t.$input.removeData("selectize");e(window).off(n);e(document).off(n);e(document.body).off(n);delete t.$input[0].selectize},render:function(e,t){var n,r,i="",o=!1,s=this,a=/^[\t ]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;if("option"===e||"item"===e){n=T(t[s.settings.valueField]);o=!!n}if(o){A(s.renderCache[e])||(s.renderCache[e]={});if(s.renderCache[e].hasOwnProperty(n))return s.renderCache[e][n]}i=s.settings.render[e].apply(this,[t,L]);("option"===e||"option_create"===e)&&(i=i.replace(a,"<$1 data-selectable"));if("optgroup"===e){r=t[s.settings.optgroupValueField]||"";i=i.replace(a,'<$1 data-group="'+S(L(r))+'"')}("option"===e||"item"===e)&&(i=i.replace(a,'<$1 data-value="'+S(L(n||""))+'"'));o&&(s.renderCache[e][n]=i);return i},clearCache:function(e){var t=this;"undefined"==typeof e?t.renderCache={}:delete t.renderCache[e]},canCreate:function(e){var t=this;if(!t.settings.create)return!1;var n=t.settings.createFilter;return!(!e.length||"function"==typeof n&&!n.apply(t,[e])||"string"==typeof n&&!new RegExp(n).test(e)||n instanceof RegExp&&!n.test(e))}});D.count=0;D.defaults={plugins:[],delimiter:",",persist:!0,diacritics:!0,create:!1,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!1,preload:!1,allowEmptyOption:!1,scrollDuration:60,loadThrottle:300,dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",optgroupLabelField:"label",optgroupValueField:"value",optgroupOrder:null,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"selectize-control",inputClass:"selectize-input",dropdownClass:"selectize-dropdown",dropdownContentClass:"selectize-dropdown-content",dropdownParent:null,copyClassesToDropdown:!0,render:{}};e.fn.selectize=function(t){var n=e.fn.selectize.defaults,r=e.extend({},n,t),i=r.dataAttr,o=r.labelField,s=r.valueField,a=r.optgroupField,l=r.optgroupLabelField,u=r.optgroupValueField,p=function(t,n){var i,a,l,u,p=e.trim(t.val()||"");if(r.allowEmptyOption||p.length){l=p.split(r.delimiter);for(i=0,a=l.length;a>i;i++){u={};u[o]=l[i];u[s]=l[i];n.options[l[i]]=u}n.items=l}},c=function(t,n){var p,c,d,f,h=0,g=n.options,m=function(e){var t=i&&e.attr(i);return"string"==typeof t&&t.length?JSON.parse(t):null},E=function(t,i){var l,u;t=e(t);l=t.attr("value")||"";if(l.length||r.allowEmptyOption)if(g.hasOwnProperty(l))i&&(g[l].optgroup?e.isArray(g[l].optgroup)?g[l].optgroup.push(i):g[l].optgroup=[g[l].optgroup,i]:g[l].optgroup=i);else{u=m(t)||{};u[o]=u[o]||t.text();u[s]=u[s]||l;u[a]=u[a]||i;u.$order=++h;g[l]=u;t.is(":selected")&&n.items.push(l)}},v=function(t){var r,i,o,s,a;t=e(t);o=t.attr("label");if(o){s=m(t)||{};s[l]=o;s[u]=o;n.optgroups[o]=s}a=e("option",t);for(r=0,i=a.length;i>r;r++)E(a[r],o)};n.maxItems=t.attr("multiple")?null:1;f=t.children();for(p=0,c=f.length;c>p;p++){d=f[p].tagName.toLowerCase();"optgroup"===d?v(f[p]):"option"===d&&E(f[p])}};return this.each(function(){if(!this.selectize){var i,o=e(this),s=this.tagName.toLowerCase(),a=o.attr("placeholder")||o.attr("data-placeholder");a||r.allowEmptyOption||(a=o.children('option[value=""]').text());var l={placeholder:a,options:{},optgroups:{},items:[]};"select"===s?c(o,l):p(o,l);i=new D(o,e.extend(!0,{},n,l,t))}})};e.fn.selectize.defaults=D.defaults;D.define("drag_drop",function(){if(!e.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===this.settings.mode){var t=this;t.lock=function(){var e=t.lock;return function(){var n=t.$control.data("sortable");n&&n.disable();return e.apply(t,arguments)}}();t.unlock=function(){var e=t.unlock;return function(){var n=t.$control.data("sortable");n&&n.enable();return e.apply(t,arguments)}}();t.setup=function(){var n=t.setup;return function(){n.apply(this,arguments);var r=t.$control.sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:t.isLocked,start:function(e,t){t.placeholder.css("width",t.helper.css("width"));r.css({overflow:"visible"})},stop:function(){r.css({overflow:"hidden"});var n=t.$activeItems?t.$activeItems.slice():null,i=[];r.children("[data-value]").each(function(){i.push(e(this).attr("data-value"))});t.setValue(i);t.setActiveItem(n)}})}}()}});D.define("dropdown_header",function(t){var n=this;t=e.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(e){return'<div class="'+e.headerClass+'"><div class="'+e.titleRowClass+'"><span class="'+e.labelClass+'">'+e.title+'</span><a href="javascript:void(0)" class="'+e.closeClass+'">&times;</a></div></div>'}},t);n.setup=function(){var r=n.setup;return function(){r.apply(n,arguments);n.$dropdown_header=e(t.html(t));n.$dropdown.prepend(n.$dropdown_header)}}()});D.define("optgroup_columns",function(t){var n=this;t=e.extend({equalizeWidth:!0,equalizeHeight:!0},t);this.getAdjacentOption=function(t,n){var r=t.closest("[data-group]").find("[data-selectable]"),i=r.index(t)+n;return i>=0&&i<r.length?r.eq(i):e()};this.onKeyDown=function(){var e=n.onKeyDown;return function(t){var r,i,o,s;if(!this.isOpen||t.keyCode!==u&&t.keyCode!==d)return e.apply(this,arguments);n.ignoreHover=!0;s=this.$activeOption.closest("[data-group]");r=s.find("[data-selectable]").index(this.$activeOption);s=t.keyCode===u?s.prev("[data-group]"):s.next("[data-group]");o=s.find("[data-selectable]");i=o.eq(Math.min(o.length-1,r));i.length&&this.setActiveOption(i)}}();var r=function(){var e,t=r.width,n=document;if("undefined"==typeof t){e=n.createElement("div");e.innerHTML='<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>';e=e.firstChild;n.body.appendChild(e);t=r.width=e.offsetWidth-e.clientWidth;n.body.removeChild(e)}return t},i=function(){var i,o,s,a,l,u,p;p=e("[data-group]",n.$dropdown_content);o=p.length;if(o&&n.$dropdown_content.width()){if(t.equalizeHeight){s=0;for(i=0;o>i;i++)s=Math.max(s,p.eq(i).height());p.css({height:s})}if(t.equalizeWidth){u=n.$dropdown_content.innerWidth()-r();a=Math.round(u/o);p.css({width:a});if(o>1){l=u-a*(o-1);p.eq(o-1).css({width:l})}}}};if(t.equalizeHeight||t.equalizeWidth){C.after(this,"positionDropdown",i);C.after(this,"refreshOptions",i)}});D.define("remove_button",function(t){if("single"!==this.settings.mode){t=e.extend({label:"&times;",title:"Remove",className:"remove",append:!0},t);var n=this,r='<a href="javascript:void(0)" class="'+t.className+'" tabindex="-1" title="'+L(t.title)+'">'+t.label+"</a>",i=function(e,t){var n=e.search(/(<\/[^>]+>\s*)$/);return e.substring(0,n)+t+e.substring(n)};this.setup=function(){var o=n.setup;return function(){if(t.append){var s=n.settings.render.item;n.settings.render.item=function(){return i(s.apply(this,arguments),r)}}o.apply(this,arguments);this.$control.on("click","."+t.className,function(t){t.preventDefault();if(!n.isLocked){var r=e(t.currentTarget).parent();n.setActiveItem(r);n.deleteSelection()&&n.setCaret(n.items.length)}})}}()}});D.define("restore_on_backspace",function(e){var t=this;e.text=e.text||function(e){return e[this.settings.labelField]};this.onKeyDown=function(){var n=t.onKeyDown;return function(t){var r,i;if(t.keyCode===g&&""===this.$control_input.val()&&!this.$activeItems.length){r=this.caretPos-1;if(r>=0&&r<this.items.length){i=this.options[this.items[r]];if(this.deleteSelection(t)){this.setTextboxValue(e.text.apply(this,[i]));this.refreshOptions(!0)}t.preventDefault();return}}return n.apply(this,arguments)}}()});return D})},{jquery:void 0,microplugin:4,sifter:6}],6:[function(t,n,r){(function(t,i){"function"==typeof e&&e.amd?e(i):"object"==typeof r?n.exports=i():t.Sifter=i()})(this,function(){var e=function(e,t){this.items=e;this.settings=t||{diacritics:!0}};e.prototype.tokenize=function(e){e=r(String(e||"").toLowerCase());if(!e||!e.length)return[];var t,n,o,a,l=[],u=e.split(/ +/);for(t=0,n=u.length;n>t;t++){o=i(u[t]);if(this.settings.diacritics)for(a in s)s.hasOwnProperty(a)&&(o=o.replace(new RegExp(a,"g"),s[a]));l.push({string:u[t],regex:new RegExp(o,"i")})}return l};e.prototype.iterator=function(e,t){var n;n=o(e)?Array.prototype.forEach||function(e){for(var t=0,n=this.length;n>t;t++)e(this[t],t,this)}:function(e){for(var t in this)this.hasOwnProperty(t)&&e(this[t],t,this)};n.apply(e,[t])};e.prototype.getScoreFunction=function(e,t){var n,r,i,o;n=this;e=n.prepareSearch(e,t);i=e.tokens;r=e.options.fields;o=i.length;var s=function(e,t){var n,r;if(!e)return 0;e=String(e||"");r=e.search(t.regex);if(-1===r)return 0;n=t.string.length/e.length;0===r&&(n+=.5);return n},a=function(){var e=r.length;return e?1===e?function(e,t){return s(t[r[0]],e)}:function(t,n){for(var i=0,o=0;e>i;i++)o+=s(n[r[i]],t);return o/e}:function(){return 0}}();return o?1===o?function(e){return a(i[0],e)}:"and"===e.options.conjunction?function(e){for(var t,n=0,r=0;o>n;n++){t=a(i[n],e);if(0>=t)return 0;r+=t}return r/o}:function(e){for(var t=0,n=0;o>t;t++)n+=a(i[t],e);return n/o}:function(){return 0}};e.prototype.getSortFunction=function(e,n){var r,i,o,s,a,l,u,p,c,d,f;o=this;e=o.prepareSearch(e,n);f=!e.query&&n.sort_empty||n.sort;c=function(e,t){return"$score"===e?t.score:o.items[t.id][e]};a=[];if(f)for(r=0,i=f.length;i>r;r++)(e.query||"$score"!==f[r].field)&&a.push(f[r]);if(e.query){d=!0;for(r=0,i=a.length;i>r;r++)if("$score"===a[r].field){d=!1;break}d&&a.unshift({field:"$score",direction:"desc"})}else for(r=0,i=a.length;i>r;r++)if("$score"===a[r].field){a.splice(r,1);break}p=[];for(r=0,i=a.length;i>r;r++)p.push("desc"===a[r].direction?-1:1);l=a.length;if(l){if(1===l){s=a[0].field;u=p[0];return function(e,n){return u*t(c(s,e),c(s,n))}}return function(e,n){var r,i,o;for(r=0;l>r;r++){o=a[r].field;i=p[r]*t(c(o,e),c(o,n));if(i)return i}return 0}}return null};e.prototype.prepareSearch=function(e,t){if("object"==typeof e)return e;t=n({},t);var r=t.fields,i=t.sort,s=t.sort_empty;r&&!o(r)&&(t.fields=[r]);i&&!o(i)&&(t.sort=[i]);s&&!o(s)&&(t.sort_empty=[s]);return{options:t,query:String(e||"").toLowerCase(),tokens:this.tokenize(e),total:0,items:[]}};e.prototype.search=function(e,t){var n,r,i,o,s=this;r=this.prepareSearch(e,t);t=r.options;e=r.query;o=t.score||s.getScoreFunction(r);e.length?s.iterator(s.items,function(e,i){n=o(e);(t.filter===!1||n>0)&&r.items.push({score:n,id:i})}):s.iterator(s.items,function(e,t){r.items.push({score:1,id:t})});i=s.getSortFunction(r,t);i&&r.items.sort(i);r.total=r.items.length;"number"==typeof t.limit&&(r.items=r.items.slice(0,t.limit));return r};var t=function(e,t){if("number"==typeof e&&"number"==typeof t)return e>t?1:t>e?-1:0;e=String(e||"").toLowerCase();t=String(t||"").toLowerCase();return e>t?1:t>e?-1:0},n=function(e){var t,n,r,i;for(t=1,n=arguments.length;n>t;t++){i=arguments[t];if(i)for(r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e},r=function(e){return(e+"").replace(/^\s+|\s+$|/g,"")},i=function(e){return(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},o=Array.isArray||$&&$.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s={a:"[aÀÁÂÃÄÅàáâãäåĀā]",c:"[cÇçćĆčČ]",d:"[dđĐďĎ]",e:"[eÈÉÊËèéêëěĚĒē]",i:"[iÌÍÎÏìíîïĪī]",n:"[nÑñňŇ]",o:"[oÒÓÔÕÕÖØòóôõöøŌō]",r:"[rřŘ]",s:"[sŠš]",t:"[tťŤ]",u:"[uÙÚÛÜùúûüůŮŪū]",y:"[yŸÿýÝ]",z:"[zŽž]"};return e})},{}],7:[function(t,n){(function(t){function r(){try{return l in t&&t[l]}catch(e){return!1}}function i(e){return e.replace(/^d/,"___$&").replace(h,"___")}var o,s={},a=t.document,l="localStorage",u="script";s.disabled=!1;s.version="1.3.17";s.set=function(){};s.get=function(){};s.has=function(e){return void 0!==s.get(e)};s.remove=function(){};s.clear=function(){};s.transact=function(e,t,n){if(null==n){n=t;t=null}null==t&&(t={});var r=s.get(e,t);n(r);s.set(e,r)};s.getAll=function(){};s.forEach=function(){};s.serialize=function(e){return JSON.stringify(e)};s.deserialize=function(e){if("string"!=typeof e)return void 0;try{return JSON.parse(e)}catch(t){return e||void 0}};if(r()){o=t[l];s.set=function(e,t){if(void 0===t)return s.remove(e);o.setItem(e,s.serialize(t));return t};s.get=function(e,t){var n=s.deserialize(o.getItem(e));return void 0===n?t:n};s.remove=function(e){o.removeItem(e)};s.clear=function(){o.clear()};s.getAll=function(){var e={};s.forEach(function(t,n){e[t]=n});return e};s.forEach=function(e){for(var t=0;t<o.length;t++){var n=o.key(t);e(n,s.get(n))}}}else if(a.documentElement.addBehavior){var p,c;try{c=new ActiveXObject("htmlfile");c.open();c.write("<"+u+">document.w=window</"+u+'><iframe src="/favicon.ico"></iframe>');c.close();p=c.w.frames[0].document;o=p.createElement("div")}catch(d){o=a.createElement("div");p=a.body}var f=function(e){return function(){var t=Array.prototype.slice.call(arguments,0);t.unshift(o);p.appendChild(o);o.addBehavior("#default#userData");o.load(l);var n=e.apply(s,t);p.removeChild(o);return n}},h=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");s.set=f(function(e,t,n){t=i(t);if(void 0===n)return s.remove(t);e.setAttribute(t,s.serialize(n));e.save(l);return n});s.get=f(function(e,t,n){t=i(t);var r=s.deserialize(e.getAttribute(t));return void 0===r?n:r});s.remove=f(function(e,t){t=i(t);e.removeAttribute(t);e.save(l)});s.clear=f(function(e){var t=e.XMLDocument.documentElement.attributes;e.load(l);for(var n,r=0;n=t[r];r++)e.removeAttribute(n.name);e.save(l)});s.getAll=function(){var e={};s.forEach(function(t,n){e[t]=n});return e};s.forEach=f(function(e,t){for(var n,r=e.XMLDocument.documentElement.attributes,i=0;n=r[i];++i)t(n.name,s.deserialize(e.getAttribute(n.name)))})}try{var g="__storejs__";s.set(g,g);s.get(g)!=g&&(s.disabled=!0);s.remove(g)}catch(d){s.disabled=!0}s.enabled=!s.disabled;"undefined"!=typeof n&&n.exports&&this.module!==n?n.exports=s:"function"==typeof e&&e.amd?e(s):t.store=s})(Function("return this")())},{}],8:[function(e,t){t.exports={name:"yasgui-utils",version:"1.5.0",description:"Utils for YASGUI libs",main:"src/main.js",repository:{type:"git",url:"git://github.com/YASGUI/Utils.git"},licenses:[{type:"MIT",url:"http://yasgui.github.io/license.txt"}],author:{name:"Laurens Rietveld"},maintainers:[{name:"Laurens Rietveld",email:"[email protected]",url:"http://laurensrietveld.nl"}],bugs:{url:"https://github.com/YASGUI/Utils/issues"},homepage:"https://github.com/YASGUI/Utils",dependencies:{store:"^1.3.14"},readme:"A simple utils repo for the YASGUI tools\n",readmeFilename:"README.md",_id:"[email protected]",dist:{shasum:"56f463556922fe4f0eb97f650bb8cfe9700061a7"},_from:"[email protected]",_resolved:"https://registry.npmjs.org/yasgui-utils/-/yasgui-utils-1.5.0.tgz"}},{}],9:[function(e,t){window.console=window.console||{log:function(){}};t.exports={storage:e("./storage.js"),svg:e("./svg.js"),version:{"yasgui-utils":e("../package.json").version}}},{"../package.json":8,"./storage.js":10,"./svg.js":11}],10:[function(e,t){{var n=e("store"),r={day:function(){return 864e5},month:function(){30*r.day()},year:function(){12*r.month()}};t.exports={set:function(e,t,i){if(t){"string"==typeof i&&(i=r[i]());t.documentElement&&(t=(new XMLSerializer).serializeToString(t.documentElement));n.set(e,{val:t,exp:i,time:(new Date).getTime()})}},remove:function(e){n.remove(e)},get:function(e){var t=n.get(e);return t?t.exp&&(new Date).getTime()-t.time>t.exp?null:t.val:null}}}},{store:7}],11:[function(e,t){t.exports={draw:function(e,n){if(e){var r=t.exports.getElement(n);r&&(e.append?e.append(r):e.appendChild(r))}},getElement:function(e){if(e&&0==e.indexOf("<svg")){var t=new DOMParser,n=t.parseFromString(e,"text/xml"),r=n.documentElement,i=document.createElement("div");i.className="svgImg";i.appendChild(r);return i}return!1}}},{}],12:[function(e){"use strict";var t=function(){try{return e("jquery")}catch(t){return window.jQuery}}();t.deparam=function(e,n){var r={},i={"true":!0,"false":!1,"null":null};t.each(e.replace(/\+/g," ").split("&"),function(e,o){var s,a=o.split("="),l=decodeURIComponent(a[0]),u=r,p=0,c=l.split("]["),d=c.length-1;if(/\[/.test(c[0])&&/\]$/.test(c[d])){c[d]=c[d].replace(/\]$/,"");c=c.shift().split("[").concat(c);d=c.length-1}else d=0;if(2===a.length){s=decodeURIComponent(a[1]);n&&(s=s&&!isNaN(s)?+s:"undefined"===s?void 0:void 0!==i[s]?i[s]:s);if(d)for(;d>=p;p++){l=""===c[p]?u.length:c[p];u=u[l]=d>p?u[l]||(c[p+1]&&isNaN(c[p+1])?{}:[]):s}else t.isArray(r[l])?r[l].push(s):r[l]=void 0!==r[l]?[r[l],s]:s}else l&&(r[l]=n?void 0:"")});return r}},{jquery:void 0}],13:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(function(){try{return t("codemirror")}catch(e){return window.CodeMirror}}()):"function"==typeof e&&e.amd?e(["codemirror"],i):i(CodeMirror)})(function(e){"use strict";e.defineMode("sparql11",function(e){function t(){var e,t,n="<[^<>\"'|{}^\\\x00- ]*>",r="[A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]",i=r+"|_",o="("+i+"|-|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])",s="("+i+"|[0-9])("+i+"|[0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040])*",a="\\?"+s,l="\\$"+s,p="("+r+")((("+o+")|\\.)*("+o+"))?",c="[0-9A-Fa-f]",d="(%"+c+c+")",f="(\\\\[_~\\.\\-!\\$&'\\(\\)\\*\\+,;=/\\?#@%])",h="("+d+"|"+f+")";if("sparql11"==u){e="("+i+"|:|[0-9]|"+h+")(("+o+"|\\.|:|"+h+")*("+o+"|:|"+h+"))?";t="_:("+i+"|[0-9])(("+o+"|\\.)*"+o+")?"}else{e="("+i+"|[0-9])((("+o+")|\\.)*("+o+"))?";t="_:"+e}var g="("+p+")?:",m=g+e,E="@[a-zA-Z]+(-[a-zA-Z0-9]+)*",v="[eE][\\+-]?[0-9]+",x="[0-9]+",y="(([0-9]+\\.[0-9]*)|(\\.[0-9]+))",N="(([0-9]+\\.[0-9]*"+v+")|(\\.[0-9]+"+v+")|([0-9]+"+v+"))",I="\\+"+x,A="\\+"+y,T="\\+"+N,L="-"+x,S="-"+y,C="-"+N,b="\\\\[tbnrf\\\\\"']",R="'(([^\\x27\\x5C\\x0A\\x0D])|"+b+")*'",w='"(([^\\x22\\x5C\\x0A\\x0D])|'+b+')*"',O="'''(('|'')?([^'\\\\]|"+b+"))*'''",_='"""(("|"")?([^"\\\\]|'+b+'))*"""',F="[\\x20\\x09\\x0D\\x0A]",P="#([^\\n\\r]*[\\n\\r]|[^\\n\\r]*$)",M="("+F+"|("+P+"))*",k="\\("+M+"\\)",D="\\["+M+"\\]",G={terminal:[{name:"WS",regex:new RegExp("^"+F+"+"),style:"ws"},{name:"COMMENT",regex:new RegExp("^"+P),style:"comment"},{name:"IRI_REF",regex:new RegExp("^"+n),style:"variable-3"},{name:"VAR1",regex:new RegExp("^"+a),style:"atom"},{name:"VAR2",regex:new RegExp("^"+l),style:"atom"},{name:"LANGTAG",regex:new RegExp("^"+E),style:"meta"},{name:"DOUBLE",regex:new RegExp("^"+N),style:"number"},{name:"DECIMAL",regex:new RegExp("^"+y),style:"number"},{name:"INTEGER",regex:new RegExp("^"+x),style:"number"},{name:"DOUBLE_POSITIVE",regex:new RegExp("^"+T),style:"number"},{name:"DECIMAL_POSITIVE",regex:new RegExp("^"+A),style:"number"},{name:"INTEGER_POSITIVE",regex:new RegExp("^"+I),style:"number"},{name:"DOUBLE_NEGATIVE",regex:new RegExp("^"+C),style:"number"},{name:"DECIMAL_NEGATIVE",regex:new RegExp("^"+S),style:"number"},{name:"INTEGER_NEGATIVE",regex:new RegExp("^"+L),style:"number"},{name:"STRING_LITERAL_LONG1",regex:new RegExp("^"+O),style:"string"},{name:"STRING_LITERAL_LONG2",regex:new RegExp("^"+_),style:"string"},{name:"STRING_LITERAL1",regex:new RegExp("^"+R),style:"string"},{name:"STRING_LITERAL2",regex:new RegExp("^"+w),style:"string"},{name:"NIL",regex:new RegExp("^"+k),style:"punc"},{name:"ANON",regex:new RegExp("^"+D),style:"punc"},{name:"PNAME_LN",regex:new RegExp("^"+m),style:"string-2"},{name:"PNAME_NS",regex:new RegExp("^"+g),style:"string-2"},{name:"BLANK_NODE_LABEL",regex:new RegExp("^"+t),style:"string-2"}]};return G}function n(e){var t=[],n=o[e];if(void 0!=n)for(var r in n)t.push(r.toString());else t.push(e);return t}function r(e,t){function r(){for(var t=null,n=0;n<f.length;++n){t=e.match(f[n].regex,!0,!1);if(t)return{cat:f[n].name,style:f[n].style,text:t[0]}}t=e.match(s,!0,!1);if(t)return{cat:e.current().toUpperCase(),style:"keyword",text:t[0]};t=e.match(a,!0,!1);if(t)return{cat:e.current(),style:"punc",text:t[0]};t=e.match(/^.[A-Za-z0-9]*/,!0,!1);return{cat:"<invalid_token>",style:"error",text:t[0]}}function i(){var n=e.column();t.errorStartPos=n;t.errorEndPos=n+c.text.length}function l(e){null==t.queryType&&("SELECT"==e||"CONSTRUCT"==e||"ASK"==e||"DESCRIBE"==e||"INSERT"==e||"DELETE"==e||"LOAD"==e||"CLEAR"==e||"CREATE"==e||"DROP"==e||"COPY"==e||"MOVE"==e||"ADD"==e)&&(t.queryType=e)}function u(e){"disallowVars"==e?t.allowVars=!1:"allowVars"==e?t.allowVars=!0:"disallowBnodes"==e?t.allowBnodes=!1:"allowBnodes"==e?t.allowBnodes=!0:"storeProperty"==e&&(t.storeProperty=!0)}function p(e){return(t.allowVars||"var"!=e)&&(t.allowBnodes||"blankNode"!=e&&"blankNodePropertyList"!=e&&"blankNodePropertyListPath"!=e)}0==e.pos&&(t.possibleCurrent=t.possibleNext);var c=r();if("<invalid_token>"==c.cat){if(1==t.OK){t.OK=!1;i()}t.complete=!1;return c.style}if("WS"==c.cat||"COMMENT"==c.cat){t.possibleCurrent=t.possibleNext;return c.style}for(var d,h=!1,g=c.cat;t.stack.length>0&&g&&t.OK&&!h;){d=t.stack.pop();if(o[d]){var m=o[d][g];if(void 0!=m&&p(d)){for(var E=m.length-1;E>=0;--E)t.stack.push(m[E]);u(d)}else{t.OK=!1;t.complete=!1;i();t.stack.push(d)}}else if(d==g){h=!0;l(d);for(var v=!0,x=t.stack.length;x>0;--x){var y=o[t.stack[x-1]];y&&y.$||(v=!1)}t.complete=v;if(t.storeProperty&&"punc"!=g.cat){t.lastProperty=c.text;t.storeProperty=!1}}else{t.OK=!1;t.complete=!1;i()}}if(!h&&t.OK){t.OK=!1;t.complete=!1;i()}t.possibleCurrent=t.possibleNext;t.possibleNext=n(t.stack[t.stack.length-1]);return c.style}function i(t,n){var r=0,i=t.stack.length-1;if(/^[\}\]\)]/.test(n)){for(var o=n.substr(0,1);i>=0;--i)if(t.stack[i]==o){--i;break}}else{var s=h[t.stack[i]];if(s){r+=s;--i}}for(;i>=0;--i){var s=g[t.stack[i]];s&&(r+=s)}return r*e.indentUnit}var o=(e.indentUnit,{"*[&&,valueLogical]":{"&&":["[&&,valueLogical]","*[&&,valueLogical]"],AS:[],")":[],",":[],"||":[],";":[]},"*[,,expression]":{",":["[,,expression]","*[,,expression]"],")":[]},"*[,,objectPath]":{",":["[,,objectPath]","*[,,objectPath]"],".":[],";":[],"]":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"*[,,object]":{",":["[,,object]","*[,,object]"],".":[],";":[],"]":[],"}":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"*[/,pathEltOrInverse]":{"/":["[/,pathEltOrInverse]","*[/,pathEltOrInverse]"],"|":[],")":[],"(":[],"[":[],VAR1:[],VAR2:[],NIL:[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},"*[;,?[or([verbPath,verbSimple]),objectList]]":{";":["[;,?[or([verbPath,verbSimple]),objectList]]","*[;,?[or([verbPath,verbSimple]),objectList]]"],".":[],"]":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"*[;,?[verb,objectList]]":{";":["[;,?[verb,objectList]]","*[;,?[verb,objectList]]"],".":[],"]":[],"}":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"*[UNION,groupGraphPattern]":{UNION:["[UNION,groupGraphPattern]","*[UNION,groupGraphPattern]"],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],".":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"*[graphPatternNotTriples,?.,?triplesBlock]":{"{":["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],OPTIONAL:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],MINUS:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],GRAPH:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],SERVICE:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],FILTER:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],BIND:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],VALUES:["[graphPatternNotTriples,?.,?triplesBlock]","*[graphPatternNotTriples,?.,?triplesBlock]"],"}":[]},"*[quadsNotTriples,?.,?triplesTemplate]":{GRAPH:["[quadsNotTriples,?.,?triplesTemplate]","*[quadsNotTriples,?.,?triplesTemplate]"],"}":[]},"*[|,pathOneInPropertySet]":{"|":["[|,pathOneInPropertySet]","*[|,pathOneInPropertySet]"],")":[]},"*[|,pathSequence]":{"|":["[|,pathSequence]","*[|,pathSequence]"],")":[],"(":[],"[":[],VAR1:[],VAR2:[],NIL:[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},"*[||,conditionalAndExpression]":{"||":["[||,conditionalAndExpression]","*[||,conditionalAndExpression]"],AS:[],")":[],",":[],";":[]},"*dataBlockValue":{UNDEF:["dataBlockValue","*dataBlockValue"],IRI_REF:["dataBlockValue","*dataBlockValue"],TRUE:["dataBlockValue","*dataBlockValue"],FALSE:["dataBlockValue","*dataBlockValue"],PNAME_LN:["dataBlockValue","*dataBlockValue"],PNAME_NS:["dataBlockValue","*dataBlockValue"],STRING_LITERAL1:["dataBlockValue","*dataBlockValue"],STRING_LITERAL2:["dataBlockValue","*dataBlockValue"],STRING_LITERAL_LONG1:["dataBlockValue","*dataBlockValue"],STRING_LITERAL_LONG2:["dataBlockValue","*dataBlockValue"],INTEGER:["dataBlockValue","*dataBlockValue"],DECIMAL:["dataBlockValue","*dataBlockValue"],DOUBLE:["dataBlockValue","*dataBlockValue"],INTEGER_POSITIVE:["dataBlockValue","*dataBlockValue"],DECIMAL_POSITIVE:["dataBlockValue","*dataBlockValue"],DOUBLE_POSITIVE:["dataBlockValue","*dataBlockValue"],INTEGER_NEGATIVE:["dataBlockValue","*dataBlockValue"],DECIMAL_NEGATIVE:["dataBlockValue","*dataBlockValue"],DOUBLE_NEGATIVE:["dataBlockValue","*dataBlockValue"],"}":[],")":[]},"*datasetClause":{FROM:["datasetClause","*datasetClause"],WHERE:[],"{":[]},"*describeDatasetClause":{FROM:["describeDatasetClause","*describeDatasetClause"],ORDER:[],HAVING:[],GROUP:[],LIMIT:[],OFFSET:[],WHERE:[],"{":[],VALUES:[],$:[]},"*graphNode":{"(":["graphNode","*graphNode"],"[":["graphNode","*graphNode"],VAR1:["graphNode","*graphNode"],VAR2:["graphNode","*graphNode"],NIL:["graphNode","*graphNode"],IRI_REF:["graphNode","*graphNode"],TRUE:["graphNode","*graphNode"],FALSE:["graphNode","*graphNode"],BLANK_NODE_LABEL:["graphNode","*graphNode"],ANON:["graphNode","*graphNode"],PNAME_LN:["graphNode","*graphNode"],PNAME_NS:["graphNode","*graphNode"],STRING_LITERAL1:["graphNode","*graphNode"],STRING_LITERAL2:["graphNode","*graphNode"],STRING_LITERAL_LONG1:["graphNode","*graphNode"],STRING_LITERAL_LONG2:["graphNode","*graphNode"],INTEGER:["graphNode","*graphNode"],DECIMAL:["graphNode","*graphNode"],DOUBLE:["graphNode","*graphNode"],INTEGER_POSITIVE:["graphNode","*graphNode"],DECIMAL_POSITIVE:["graphNode","*graphNode"],DOUBLE_POSITIVE:["graphNode","*graphNode"],INTEGER_NEGATIVE:["graphNode","*graphNode"],DECIMAL_NEGATIVE:["graphNode","*graphNode"],DOUBLE_NEGATIVE:["graphNode","*graphNode"],")":[]},"*graphNodePath":{"(":["graphNodePath","*graphNodePath"],"[":["graphNodePath","*graphNodePath"],VAR1:["graphNodePath","*graphNodePath"],VAR2:["graphNodePath","*graphNodePath"],NIL:["graphNodePath","*graphNodePath"],IRI_REF:["graphNodePath","*graphNodePath"],TRUE:["graphNodePath","*graphNodePath"],FALSE:["graphNodePath","*graphNodePath"],BLANK_NODE_LABEL:["graphNodePath","*graphNodePath"],ANON:["graphNodePath","*graphNodePath"],PNAME_LN:["graphNodePath","*graphNodePath"],PNAME_NS:["graphNodePath","*graphNodePath"],STRING_LITERAL1:["graphNodePath","*graphNodePath"],STRING_LITERAL2:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG1:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG2:["graphNodePath","*graphNodePath"],INTEGER:["graphNodePath","*graphNodePath"],DECIMAL:["graphNodePath","*graphNodePath"],DOUBLE:["graphNodePath","*graphNodePath"],INTEGER_POSITIVE:["graphNodePath","*graphNodePath"],DECIMAL_POSITIVE:["graphNodePath","*graphNodePath"],DOUBLE_POSITIVE:["graphNodePath","*graphNodePath"],INTEGER_NEGATIVE:["graphNodePath","*graphNodePath"],DECIMAL_NEGATIVE:["graphNodePath","*graphNodePath"],DOUBLE_NEGATIVE:["graphNodePath","*graphNodePath"],")":[]},"*groupCondition":{"(":["groupCondition","*groupCondition"],STR:["groupCondition","*groupCondition"],LANG:["groupCondition","*groupCondition"],LANGMATCHES:["groupCondition","*groupCondition"],DATATYPE:["groupCondition","*groupCondition"],BOUND:["groupCondition","*groupCondition"],IRI:["groupCondition","*groupCondition"],URI:["groupCondition","*groupCondition"],BNODE:["groupCondition","*groupCondition"],RAND:["groupCondition","*groupCondition"],ABS:["groupCondition","*groupCondition"],CEIL:["groupCondition","*groupCondition"],FLOOR:["groupCondition","*groupCondition"],ROUND:["groupCondition","*groupCondition"],CONCAT:["groupCondition","*groupCondition"],STRLEN:["groupCondition","*groupCondition"],UCASE:["groupCondition","*groupCondition"],LCASE:["groupCondition","*groupCondition"],ENCODE_FOR_URI:["groupCondition","*groupCondition"],CONTAINS:["groupCondition","*groupCondition"],STRSTARTS:["groupCondition","*groupCondition"],STRENDS:["groupCondition","*groupCondition"],STRBEFORE:["groupCondition","*groupCondition"],STRAFTER:["groupCondition","*groupCondition"],YEAR:["groupCondition","*groupCondition"],MONTH:["groupCondition","*groupCondition"],DAY:["groupCondition","*groupCondition"],HOURS:["groupCondition","*groupCondition"],MINUTES:["groupCondition","*groupCondition"],SECONDS:["groupCondition","*groupCondition"],TIMEZONE:["groupCondition","*groupCondition"],TZ:["groupCondition","*groupCondition"],NOW:["groupCondition","*groupCondition"],UUID:["groupCondition","*groupCondition"],STRUUID:["groupCondition","*groupCondition"],MD5:["groupCondition","*groupCondition"],SHA1:["groupCondition","*groupCondition"],SHA256:["groupCondition","*groupCondition"],SHA384:["groupCondition","*groupCondition"],SHA512:["groupCondition","*groupCondition"],COALESCE:["groupCondition","*groupCondition"],IF:["groupCondition","*groupCondition"],STRLANG:["groupCondition","*groupCondition"],STRDT:["groupCondition","*groupCondition"],SAMETERM:["groupCondition","*groupCondition"],ISIRI:["groupCondition","*groupCondition"],ISURI:["groupCondition","*groupCondition"],ISBLANK:["groupCondition","*groupCondition"],ISLITERAL:["groupCondition","*groupCondition"],ISNUMERIC:["groupCondition","*groupCondition"],VAR1:["groupCondition","*groupCondition"],VAR2:["groupCondition","*groupCondition"],SUBSTR:["groupCondition","*groupCondition"],REPLACE:["groupCondition","*groupCondition"],REGEX:["groupCondition","*groupCondition"],EXISTS:["groupCondition","*groupCondition"],NOT:["groupCondition","*groupCondition"],IRI_REF:["groupCondition","*groupCondition"],PNAME_LN:["groupCondition","*groupCondition"],PNAME_NS:["groupCondition","*groupCondition"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],HAVING:[],$:[],"}":[]},"*havingCondition":{"(":["havingCondition","*havingCondition"],STR:["havingCondition","*havingCondition"],LANG:["havingCondition","*havingCondition"],LANGMATCHES:["havingCondition","*havingCondition"],DATATYPE:["havingCondition","*havingCondition"],BOUND:["havingCondition","*havingCondition"],IRI:["havingCondition","*havingCondition"],URI:["havingCondition","*havingCondition"],BNODE:["havingCondition","*havingCondition"],RAND:["havingCondition","*havingCondition"],ABS:["havingCondition","*havingCondition"],CEIL:["havingCondition","*havingCondition"],FLOOR:["havingCondition","*havingCondition"],ROUND:["havingCondition","*havingCondition"],CONCAT:["havingCondition","*havingCondition"],STRLEN:["havingCondition","*havingCondition"],UCASE:["havingCondition","*havingCondition"],LCASE:["havingCondition","*havingCondition"],ENCODE_FOR_URI:["havingCondition","*havingCondition"],CONTAINS:["havingCondition","*havingCondition"],STRSTARTS:["havingCondition","*havingCondition"],STRENDS:["havingCondition","*havingCondition"],STRBEFORE:["havingCondition","*havingCondition"],STRAFTER:["havingCondition","*havingCondition"],YEAR:["havingCondition","*havingCondition"],MONTH:["havingCondition","*havingCondition"],DAY:["havingCondition","*havingCondition"],HOURS:["havingCondition","*havingCondition"],MINUTES:["havingCondition","*havingCondition"],SECONDS:["havingCondition","*havingCondition"],TIMEZONE:["havingCondition","*havingCondition"],TZ:["havingCondition","*havingCondition"],NOW:["havingCondition","*havingCondition"],UUID:["havingCondition","*havingCondition"],STRUUID:["havingCondition","*havingCondition"],MD5:["havingCondition","*havingCondition"],SHA1:["havingCondition","*havingCondition"],SHA256:["havingCondition","*havingCondition"],SHA384:["havingCondition","*havingCondition"],SHA512:["havingCondition","*havingCondition"],COALESCE:["havingCondition","*havingCondition"],IF:["havingCondition","*havingCondition"],STRLANG:["havingCondition","*havingCondition"],STRDT:["havingCondition","*havingCondition"],SAMETERM:["havingCondition","*havingCondition"],ISIRI:["havingCondition","*havingCondition"],ISURI:["havingCondition","*havingCondition"],ISBLANK:["havingCondition","*havingCondition"],ISLITERAL:["havingCondition","*havingCondition"],ISNUMERIC:["havingCondition","*havingCondition"],SUBSTR:["havingCondition","*havingCondition"],REPLACE:["havingCondition","*havingCondition"],REGEX:["havingCondition","*havingCondition"],EXISTS:["havingCondition","*havingCondition"],NOT:["havingCondition","*havingCondition"],IRI_REF:["havingCondition","*havingCondition"],PNAME_LN:["havingCondition","*havingCondition"],PNAME_NS:["havingCondition","*havingCondition"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],$:[],"}":[]},"*or([[ (,*dataBlockValue,)],NIL])":{"(":["or([[ (,*dataBlockValue,)],NIL])","*or([[ (,*dataBlockValue,)],NIL])"],NIL:["or([[ (,*dataBlockValue,)],NIL])","*or([[ (,*dataBlockValue,)],NIL])"],"}":[]},"*or([[*,unaryExpression],[/,unaryExpression]])":{"*":["or([[*,unaryExpression],[/,unaryExpression]])","*or([[*,unaryExpression],[/,unaryExpression]])"],"/":["or([[*,unaryExpression],[/,unaryExpression]])","*or([[*,unaryExpression],[/,unaryExpression]])"],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],"+":[],"-":[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],";":[]},"*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])":{"+":["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"-":["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_POSITIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_POSITIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_POSITIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_NEGATIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_NEGATIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_NEGATIVE:["or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],";":[]},"*or([var,[ (,expression,AS,var,)]])":{"(":["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],VAR1:["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],VAR2:["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],WHERE:[],"{":[],FROM:[]},"*orderCondition":{ASC:["orderCondition","*orderCondition"],DESC:["orderCondition","*orderCondition"],VAR1:["orderCondition","*orderCondition"],VAR2:["orderCondition","*orderCondition"],"(":["orderCondition","*orderCondition"],STR:["orderCondition","*orderCondition"],LANG:["orderCondition","*orderCondition"],LANGMATCHES:["orderCondition","*orderCondition"],DATATYPE:["orderCondition","*orderCondition"],BOUND:["orderCondition","*orderCondition"],IRI:["orderCondition","*orderCondition"],URI:["orderCondition","*orderCondition"],BNODE:["orderCondition","*orderCondition"],RAND:["orderCondition","*orderCondition"],ABS:["orderCondition","*orderCondition"],CEIL:["orderCondition","*orderCondition"],FLOOR:["orderCondition","*orderCondition"],ROUND:["orderCondition","*orderCondition"],CONCAT:["orderCondition","*orderCondition"],STRLEN:["orderCondition","*orderCondition"],UCASE:["orderCondition","*orderCondition"],LCASE:["orderCondition","*orderCondition"],ENCODE_FOR_URI:["orderCondition","*orderCondition"],CONTAINS:["orderCondition","*orderCondition"],STRSTARTS:["orderCondition","*orderCondition"],STRENDS:["orderCondition","*orderCondition"],STRBEFORE:["orderCondition","*orderCondition"],STRAFTER:["orderCondition","*orderCondition"],YEAR:["orderCondition","*orderCondition"],MONTH:["orderCondition","*orderCondition"],DAY:["orderCondition","*orderCondition"],HOURS:["orderCondition","*orderCondition"],MINUTES:["orderCondition","*orderCondition"],SECONDS:["orderCondition","*orderCondition"],TIMEZONE:["orderCondition","*orderCondition"],TZ:["orderCondition","*orderCondition"],NOW:["orderCondition","*orderCondition"],UUID:["orderCondition","*orderCondition"],STRUUID:["orderCondition","*orderCondition"],MD5:["orderCondition","*orderCondition"],SHA1:["orderCondition","*orderCondition"],SHA256:["orderCondition","*orderCondition"],SHA384:["orderCondition","*orderCondition"],SHA512:["orderCondition","*orderCondition"],COALESCE:["orderCondition","*orderCondition"],IF:["orderCondition","*orderCondition"],STRLANG:["orderCondition","*orderCondition"],STRDT:["orderCondition","*orderCondition"],SAMETERM:["orderCondition","*orderCondition"],ISIRI:["orderCondition","*orderCondition"],ISURI:["orderCondition","*orderCondition"],ISBLANK:["orderCondition","*orderCondition"],ISLITERAL:["orderCondition","*orderCondition"],ISNUMERIC:["orderCondition","*orderCondition"],SUBSTR:["orderCondition","*orderCondition"],REPLACE:["orderCondition","*orderCondition"],REGEX:["orderCondition","*orderCondition"],EXISTS:["orderCondition","*orderCondition"],NOT:["orderCondition","*orderCondition"],IRI_REF:["orderCondition","*orderCondition"],PNAME_LN:["orderCondition","*orderCondition"],PNAME_NS:["orderCondition","*orderCondition"],VALUES:[],LIMIT:[],OFFSET:[],$:[],"}":[]},"*prefixDecl":{PREFIX:["prefixDecl","*prefixDecl"],$:[],CONSTRUCT:[],DESCRIBE:[],ASK:[],INSERT:[],DELETE:[],SELECT:[],LOAD:[],CLEAR:[],DROP:[],ADD:[],MOVE:[],COPY:[],CREATE:[],WITH:[]},"*usingClause":{USING:["usingClause","*usingClause"],WHERE:[]},"*var":{VAR1:["var","*var"],VAR2:["var","*var"],")":[]},"*varOrIRIref":{VAR1:["varOrIRIref","*varOrIRIref"],VAR2:["varOrIRIref","*varOrIRIref"],IRI_REF:["varOrIRIref","*varOrIRIref"],PNAME_LN:["varOrIRIref","*varOrIRIref"],PNAME_NS:["varOrIRIref","*varOrIRIref"],ORDER:[],HAVING:[],GROUP:[],LIMIT:[],OFFSET:[],WHERE:[],"{":[],FROM:[],VALUES:[],$:[]},"+graphNode":{"(":["graphNode","*graphNode"],"[":["graphNode","*graphNode"],VAR1:["graphNode","*graphNode"],VAR2:["graphNode","*graphNode"],NIL:["graphNode","*graphNode"],IRI_REF:["graphNode","*graphNode"],TRUE:["graphNode","*graphNode"],FALSE:["graphNode","*graphNode"],BLANK_NODE_LABEL:["graphNode","*graphNode"],ANON:["graphNode","*graphNode"],PNAME_LN:["graphNode","*graphNode"],PNAME_NS:["graphNode","*graphNode"],STRING_LITERAL1:["graphNode","*graphNode"],STRING_LITERAL2:["graphNode","*graphNode"],STRING_LITERAL_LONG1:["graphNode","*graphNode"],STRING_LITERAL_LONG2:["graphNode","*graphNode"],INTEGER:["graphNode","*graphNode"],DECIMAL:["graphNode","*graphNode"],DOUBLE:["graphNode","*graphNode"],INTEGER_POSITIVE:["graphNode","*graphNode"],DECIMAL_POSITIVE:["graphNode","*graphNode"],DOUBLE_POSITIVE:["graphNode","*graphNode"],INTEGER_NEGATIVE:["graphNode","*graphNode"],DECIMAL_NEGATIVE:["graphNode","*graphNode"],DOUBLE_NEGATIVE:["graphNode","*graphNode"]},"+graphNodePath":{"(":["graphNodePath","*graphNodePath"],"[":["graphNodePath","*graphNodePath"],VAR1:["graphNodePath","*graphNodePath"],VAR2:["graphNodePath","*graphNodePath"],NIL:["graphNodePath","*graphNodePath"],IRI_REF:["graphNodePath","*graphNodePath"],TRUE:["graphNodePath","*graphNodePath"],FALSE:["graphNodePath","*graphNodePath"],BLANK_NODE_LABEL:["graphNodePath","*graphNodePath"],ANON:["graphNodePath","*graphNodePath"],PNAME_LN:["graphNodePath","*graphNodePath"],PNAME_NS:["graphNodePath","*graphNodePath"],STRING_LITERAL1:["graphNodePath","*graphNodePath"],STRING_LITERAL2:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG1:["graphNodePath","*graphNodePath"],STRING_LITERAL_LONG2:["graphNodePath","*graphNodePath"],INTEGER:["graphNodePath","*graphNodePath"],DECIMAL:["graphNodePath","*graphNodePath"],DOUBLE:["graphNodePath","*graphNodePath"],INTEGER_POSITIVE:["graphNodePath","*graphNodePath"],DECIMAL_POSITIVE:["graphNodePath","*graphNodePath"],DOUBLE_POSITIVE:["graphNodePath","*graphNodePath"],INTEGER_NEGATIVE:["graphNodePath","*graphNodePath"],DECIMAL_NEGATIVE:["graphNodePath","*graphNodePath"],DOUBLE_NEGATIVE:["graphNodePath","*graphNodePath"]},"+groupCondition":{"(":["groupCondition","*groupCondition"],STR:["groupCondition","*groupCondition"],LANG:["groupCondition","*groupCondition"],LANGMATCHES:["groupCondition","*groupCondition"],DATATYPE:["groupCondition","*groupCondition"],BOUND:["groupCondition","*groupCondition"],IRI:["groupCondition","*groupCondition"],URI:["groupCondition","*groupCondition"],BNODE:["groupCondition","*groupCondition"],RAND:["groupCondition","*groupCondition"],ABS:["groupCondition","*groupCondition"],CEIL:["groupCondition","*groupCondition"],FLOOR:["groupCondition","*groupCondition"],ROUND:["groupCondition","*groupCondition"],CONCAT:["groupCondition","*groupCondition"],STRLEN:["groupCondition","*groupCondition"],UCASE:["groupCondition","*groupCondition"],LCASE:["groupCondition","*groupCondition"],ENCODE_FOR_URI:["groupCondition","*groupCondition"],CONTAINS:["groupCondition","*groupCondition"],STRSTARTS:["groupCondition","*groupCondition"],STRENDS:["groupCondition","*groupCondition"],STRBEFORE:["groupCondition","*groupCondition"],STRAFTER:["groupCondition","*groupCondition"],YEAR:["groupCondition","*groupCondition"],MONTH:["groupCondition","*groupCondition"],DAY:["groupCondition","*groupCondition"],HOURS:["groupCondition","*groupCondition"],MINUTES:["groupCondition","*groupCondition"],SECONDS:["groupCondition","*groupCondition"],TIMEZONE:["groupCondition","*groupCondition"],TZ:["groupCondition","*groupCondition"],NOW:["groupCondition","*groupCondition"],UUID:["groupCondition","*groupCondition"],STRUUID:["groupCondition","*groupCondition"],MD5:["groupCondition","*groupCondition"],SHA1:["groupCondition","*groupCondition"],SHA256:["groupCondition","*groupCondition"],SHA384:["groupCondition","*groupCondition"],SHA512:["groupCondition","*groupCondition"],COALESCE:["groupCondition","*groupCondition"],IF:["groupCondition","*groupCondition"],STRLANG:["groupCondition","*groupCondition"],STRDT:["groupCondition","*groupCondition"],SAMETERM:["groupCondition","*groupCondition"],ISIRI:["groupCondition","*groupCondition"],ISURI:["groupCondition","*groupCondition"],ISBLANK:["groupCondition","*groupCondition"],ISLITERAL:["groupCondition","*groupCondition"],ISNUMERIC:["groupCondition","*groupCondition"],VAR1:["groupCondition","*groupCondition"],VAR2:["groupCondition","*groupCondition"],SUBSTR:["groupCondition","*groupCondition"],REPLACE:["groupCondition","*groupCondition"],REGEX:["groupCondition","*groupCondition"],EXISTS:["groupCondition","*groupCondition"],NOT:["groupCondition","*groupCondition"],IRI_REF:["groupCondition","*groupCondition"],PNAME_LN:["groupCondition","*groupCondition"],PNAME_NS:["groupCondition","*groupCondition"]},"+havingCondition":{"(":["havingCondition","*havingCondition"],STR:["havingCondition","*havingCondition"],LANG:["havingCondition","*havingCondition"],LANGMATCHES:["havingCondition","*havingCondition"],DATATYPE:["havingCondition","*havingCondition"],BOUND:["havingCondition","*havingCondition"],IRI:["havingCondition","*havingCondition"],URI:["havingCondition","*havingCondition"],BNODE:["havingCondition","*havingCondition"],RAND:["havingCondition","*havingCondition"],ABS:["havingCondition","*havingCondition"],CEIL:["havingCondition","*havingCondition"],FLOOR:["havingCondition","*havingCondition"],ROUND:["havingCondition","*havingCondition"],CONCAT:["havingCondition","*havingCondition"],STRLEN:["havingCondition","*havingCondition"],UCASE:["havingCondition","*havingCondition"],LCASE:["havingCondition","*havingCondition"],ENCODE_FOR_URI:["havingCondition","*havingCondition"],CONTAINS:["havingCondition","*havingCondition"],STRSTARTS:["havingCondition","*havingCondition"],STRENDS:["havingCondition","*havingCondition"],STRBEFORE:["havingCondition","*havingCondition"],STRAFTER:["havingCondition","*havingCondition"],YEAR:["havingCondition","*havingCondition"],MONTH:["havingCondition","*havingCondition"],DAY:["havingCondition","*havingCondition"],HOURS:["havingCondition","*havingCondition"],MINUTES:["havingCondition","*havingCondition"],SECONDS:["havingCondition","*havingCondition"],TIMEZONE:["havingCondition","*havingCondition"],TZ:["havingCondition","*havingCondition"],NOW:["havingCondition","*havingCondition"],UUID:["havingCondition","*havingCondition"],STRUUID:["havingCondition","*havingCondition"],MD5:["havingCondition","*havingCondition"],SHA1:["havingCondition","*havingCondition"],SHA256:["havingCondition","*havingCondition"],SHA384:["havingCondition","*havingCondition"],SHA512:["havingCondition","*havingCondition"],COALESCE:["havingCondition","*havingCondition"],IF:["havingCondition","*havingCondition"],STRLANG:["havingCondition","*havingCondition"],STRDT:["havingCondition","*havingCondition"],SAMETERM:["havingCondition","*havingCondition"],ISIRI:["havingCondition","*havingCondition"],ISURI:["havingCondition","*havingCondition"],ISBLANK:["havingCondition","*havingCondition"],ISLITERAL:["havingCondition","*havingCondition"],ISNUMERIC:["havingCondition","*havingCondition"],SUBSTR:["havingCondition","*havingCondition"],REPLACE:["havingCondition","*havingCondition"],REGEX:["havingCondition","*havingCondition"],EXISTS:["havingCondition","*havingCondition"],NOT:["havingCondition","*havingCondition"],IRI_REF:["havingCondition","*havingCondition"],PNAME_LN:["havingCondition","*havingCondition"],PNAME_NS:["havingCondition","*havingCondition"]},"+or([var,[ (,expression,AS,var,)]])":{"(":["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],VAR1:["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"],VAR2:["or([var,[ (,expression,AS,var,)]])","*or([var,[ (,expression,AS,var,)]])"]},"+orderCondition":{ASC:["orderCondition","*orderCondition"],DESC:["orderCondition","*orderCondition"],VAR1:["orderCondition","*orderCondition"],VAR2:["orderCondition","*orderCondition"],"(":["orderCondition","*orderCondition"],STR:["orderCondition","*orderCondition"],LANG:["orderCondition","*orderCondition"],LANGMATCHES:["orderCondition","*orderCondition"],DATATYPE:["orderCondition","*orderCondition"],BOUND:["orderCondition","*orderCondition"],IRI:["orderCondition","*orderCondition"],URI:["orderCondition","*orderCondition"],BNODE:["orderCondition","*orderCondition"],RAND:["orderCondition","*orderCondition"],ABS:["orderCondition","*orderCondition"],CEIL:["orderCondition","*orderCondition"],FLOOR:["orderCondition","*orderCondition"],ROUND:["orderCondition","*orderCondition"],CONCAT:["orderCondition","*orderCondition"],STRLEN:["orderCondition","*orderCondition"],UCASE:["orderCondition","*orderCondition"],LCASE:["orderCondition","*orderCondition"],ENCODE_FOR_URI:["orderCondition","*orderCondition"],CONTAINS:["orderCondition","*orderCondition"],STRSTARTS:["orderCondition","*orderCondition"],STRENDS:["orderCondition","*orderCondition"],STRBEFORE:["orderCondition","*orderCondition"],STRAFTER:["orderCondition","*orderCondition"],YEAR:["orderCondition","*orderCondition"],MONTH:["orderCondition","*orderCondition"],DAY:["orderCondition","*orderCondition"],HOURS:["orderCondition","*orderCondition"],MINUTES:["orderCondition","*orderCondition"],SECONDS:["orderCondition","*orderCondition"],TIMEZONE:["orderCondition","*orderCondition"],TZ:["orderCondition","*orderCondition"],NOW:["orderCondition","*orderCondition"],UUID:["orderCondition","*orderCondition"],STRUUID:["orderCondition","*orderCondition"],MD5:["orderCondition","*orderCondition"],SHA1:["orderCondition","*orderCondition"],SHA256:["orderCondition","*orderCondition"],SHA384:["orderCondition","*orderCondition"],SHA512:["orderCondition","*orderCondition"],COALESCE:["orderCondition","*orderCondition"],IF:["orderCondition","*orderCondition"],STRLANG:["orderCondition","*orderCondition"],STRDT:["orderCondition","*orderCondition"],SAMETERM:["orderCondition","*orderCondition"],ISIRI:["orderCondition","*orderCondition"],ISURI:["orderCondition","*orderCondition"],ISBLANK:["orderCondition","*orderCondition"],ISLITERAL:["orderCondition","*orderCondition"],ISNUMERIC:["orderCondition","*orderCondition"],SUBSTR:["orderCondition","*orderCondition"],REPLACE:["orderCondition","*orderCondition"],REGEX:["orderCondition","*orderCondition"],EXISTS:["orderCondition","*orderCondition"],NOT:["orderCondition","*orderCondition"],IRI_REF:["orderCondition","*orderCondition"],PNAME_LN:["orderCondition","*orderCondition"],PNAME_NS:["orderCondition","*orderCondition"]},"+varOrIRIref":{VAR1:["varOrIRIref","*varOrIRIref"],VAR2:["varOrIRIref","*varOrIRIref"],IRI_REF:["varOrIRIref","*varOrIRIref"],PNAME_LN:["varOrIRIref","*varOrIRIref"],PNAME_NS:["varOrIRIref","*varOrIRIref"]},"?.":{".":["."],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?DISTINCT":{DISTINCT:["DISTINCT"],"!":[],"+":[],"-":[],VAR1:[],VAR2:[],"(":[],STR:[],LANG:[],LANGMATCHES:[],DATATYPE:[],BOUND:[],IRI:[],URI:[],BNODE:[],RAND:[],ABS:[],CEIL:[],FLOOR:[],ROUND:[],CONCAT:[],STRLEN:[],UCASE:[],LCASE:[],ENCODE_FOR_URI:[],CONTAINS:[],STRSTARTS:[],STRENDS:[],STRBEFORE:[],STRAFTER:[],YEAR:[],MONTH:[],DAY:[],HOURS:[],MINUTES:[],SECONDS:[],TIMEZONE:[],TZ:[],NOW:[],UUID:[],STRUUID:[],MD5:[],SHA1:[],SHA256:[],SHA384:[],SHA512:[],COALESCE:[],IF:[],STRLANG:[],STRDT:[],SAMETERM:[],ISIRI:[],ISURI:[],ISBLANK:[],ISLITERAL:[],ISNUMERIC:[],TRUE:[],FALSE:[],COUNT:[],SUM:[],MIN:[],MAX:[],AVG:[],SAMPLE:[],GROUP_CONCAT:[],SUBSTR:[],REPLACE:[],REGEX:[],EXISTS:[],NOT:[],IRI_REF:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],PNAME_LN:[],PNAME_NS:[],"*":[]},"?GRAPH":{GRAPH:["GRAPH"],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?SILENT":{SILENT:["SILENT"],VAR1:[],VAR2:[],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?SILENT_1":{SILENT:["SILENT"],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?SILENT_2":{SILENT:["SILENT"],GRAPH:[],DEFAULT:[],NAMED:[],ALL:[]},"?SILENT_3":{SILENT:["SILENT"],GRAPH:[]},"?SILENT_4":{SILENT:["SILENT"],DEFAULT:[],GRAPH:[],IRI_REF:[],PNAME_LN:[],PNAME_NS:[]},"?WHERE":{WHERE:["WHERE"],"{":[]},"?[,,expression]":{",":["[,,expression]"],")":[]},"?[.,?constructTriples]":{".":["[.,?constructTriples]"],"}":[]},"?[.,?triplesBlock]":{".":["[.,?triplesBlock]"],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?[.,?triplesTemplate]":{".":["[.,?triplesTemplate]"],"}":[],GRAPH:[]},"?[;,SEPARATOR,=,string]":{";":["[;,SEPARATOR,=,string]"],")":[]},"?[;,update]":{";":["[;,update]"],$:[]},"?[AS,var]":{AS:["[AS,var]"],")":[]},"?[INTO,graphRef]":{INTO:["[INTO,graphRef]"],";":[],$:[]},"?[or([verbPath,verbSimple]),objectList]":{VAR1:["[or([verbPath,verbSimple]),objectList]"],VAR2:["[or([verbPath,verbSimple]),objectList]"],"^":["[or([verbPath,verbSimple]),objectList]"],a:["[or([verbPath,verbSimple]),objectList]"],"!":["[or([verbPath,verbSimple]),objectList]"],"(":["[or([verbPath,verbSimple]),objectList]"],IRI_REF:["[or([verbPath,verbSimple]),objectList]"],PNAME_LN:["[or([verbPath,verbSimple]),objectList]"],PNAME_NS:["[or([verbPath,verbSimple]),objectList]"],";":[],".":[],"]":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?[pathOneInPropertySet,*[|,pathOneInPropertySet]]":{a:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],"^":["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],IRI_REF:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],PNAME_LN:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],PNAME_NS:["[pathOneInPropertySet,*[|,pathOneInPropertySet]]"],")":[]},"?[update1,?[;,update]]":{INSERT:["[update1,?[;,update]]"],DELETE:["[update1,?[;,update]]"],LOAD:["[update1,?[;,update]]"],CLEAR:["[update1,?[;,update]]"],DROP:["[update1,?[;,update]]"],ADD:["[update1,?[;,update]]"],MOVE:["[update1,?[;,update]]"],COPY:["[update1,?[;,update]]"],CREATE:["[update1,?[;,update]]"],WITH:["[update1,?[;,update]]"],$:[]},"?[verb,objectList]":{a:["[verb,objectList]"],VAR1:["[verb,objectList]"],VAR2:["[verb,objectList]"],IRI_REF:["[verb,objectList]"],PNAME_LN:["[verb,objectList]"],PNAME_NS:["[verb,objectList]"],";":[],".":[],"]":[],"}":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"?argList":{NIL:["argList"],"(":["argList"],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],"+":[],"-":[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],"*":[],"/":[],";":[]},"?baseDecl":{BASE:["baseDecl"],$:[],CONSTRUCT:[],DESCRIBE:[],ASK:[],INSERT:[],DELETE:[],SELECT:[],LOAD:[],CLEAR:[],DROP:[],ADD:[],MOVE:[],COPY:[],CREATE:[],WITH:[],PREFIX:[]},"?constructTriples":{VAR1:["constructTriples"],VAR2:["constructTriples"],NIL:["constructTriples"],"(":["constructTriples"],"[":["constructTriples"],IRI_REF:["constructTriples"],TRUE:["constructTriples"],FALSE:["constructTriples"],BLANK_NODE_LABEL:["constructTriples"],ANON:["constructTriples"],PNAME_LN:["constructTriples"],PNAME_NS:["constructTriples"],STRING_LITERAL1:["constructTriples"],STRING_LITERAL2:["constructTriples"],STRING_LITERAL_LONG1:["constructTriples"],STRING_LITERAL_LONG2:["constructTriples"],INTEGER:["constructTriples"],DECIMAL:["constructTriples"],DOUBLE:["constructTriples"],INTEGER_POSITIVE:["constructTriples"],DECIMAL_POSITIVE:["constructTriples"],DOUBLE_POSITIVE:["constructTriples"],INTEGER_NEGATIVE:["constructTriples"],DECIMAL_NEGATIVE:["constructTriples"],DOUBLE_NEGATIVE:["constructTriples"],"}":[]},"?groupClause":{GROUP:["groupClause"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],HAVING:[],$:[],"}":[]},"?havingClause":{HAVING:["havingClause"],VALUES:[],LIMIT:[],OFFSET:[],ORDER:[],$:[],"}":[]},"?insertClause":{INSERT:["insertClause"],WHERE:[],USING:[]},"?limitClause":{LIMIT:["limitClause"],VALUES:[],$:[],"}":[]},"?limitOffsetClauses":{LIMIT:["limitOffsetClauses"],OFFSET:["limitOffsetClauses"],VALUES:[],$:[],"}":[]},"?offsetClause":{OFFSET:["offsetClause"],VALUES:[],$:[],"}":[]},"?or([DISTINCT,REDUCED])":{DISTINCT:["or([DISTINCT,REDUCED])"],REDUCED:["or([DISTINCT,REDUCED])"],"*":[],"(":[],VAR1:[],VAR2:[]},"?or([LANGTAG,[^^,iriRef]])":{LANGTAG:["or([LANGTAG,[^^,iriRef]])"],"^^":["or([LANGTAG,[^^,iriRef]])"],UNDEF:[],IRI_REF:[],TRUE:[],FALSE:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],a:[],VAR1:[],VAR2:[],"^":[],"!":[],"(":[],".":[],";":[],",":[],AS:[],")":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],"+":[],"-":[],"*":[],"/":[],"}":[],"[":[],NIL:[],BLANK_NODE_LABEL:[],ANON:[],"]":[],GRAPH:[],"{":[],OPTIONAL:[],MINUS:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[]},"?or([[*,unaryExpression],[/,unaryExpression]])":{"*":["or([[*,unaryExpression],[/,unaryExpression]])"],"/":["or([[*,unaryExpression],[/,unaryExpression]])"],"+":[],"-":[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[],AS:[],")":[],",":[],"||":[],"&&":[],"=":[],"!=":[],"<":[],">":[],"<=":[],">=":[],IN:[],NOT:[],";":[]},"?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])":{"=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"!=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"<":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],">":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"<=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],">=":["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IN:["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],NOT:["or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],AS:[],")":[],",":[],"||":[],"&&":[],";":[]},"?orderClause":{ORDER:["orderClause"],VALUES:[],LIMIT:[],OFFSET:[],$:[],"}":[]},"?pathMod":{"*":["pathMod"],"?":["pathMod"],"+":["pathMod"],"{":["pathMod"],"|":[],"/":[],")":[],"(":[],"[":[],VAR1:[],VAR2:[],NIL:[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},"?triplesBlock":{VAR1:["triplesBlock"],VAR2:["triplesBlock"],NIL:["triplesBlock"],"(":["triplesBlock"],"[":["triplesBlock"],IRI_REF:["triplesBlock"],TRUE:["triplesBlock"],FALSE:["triplesBlock"],BLANK_NODE_LABEL:["triplesBlock"],ANON:["triplesBlock"],PNAME_LN:["triplesBlock"],PNAME_NS:["triplesBlock"],STRING_LITERAL1:["triplesBlock"],STRING_LITERAL2:["triplesBlock"],STRING_LITERAL_LONG1:["triplesBlock"],STRING_LITERAL_LONG2:["triplesBlock"],INTEGER:["triplesBlock"],DECIMAL:["triplesBlock"],DOUBLE:["triplesBlock"],INTEGER_POSITIVE:["triplesBlock"],DECIMAL_POSITIVE:["triplesBlock"],DOUBLE_POSITIVE:["triplesBlock"],INTEGER_NEGATIVE:["triplesBlock"],DECIMAL_NEGATIVE:["triplesBlock"],DOUBLE_NEGATIVE:["triplesBlock"],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},"?triplesTemplate":{VAR1:["triplesTemplate"],VAR2:["triplesTemplate"],NIL:["triplesTemplate"],"(":["triplesTemplate"],"[":["triplesTemplate"],IRI_REF:["triplesTemplate"],TRUE:["triplesTemplate"],FALSE:["triplesTemplate"],BLANK_NODE_LABEL:["triplesTemplate"],ANON:["triplesTemplate"],PNAME_LN:["triplesTemplate"],PNAME_NS:["triplesTemplate"],STRING_LITERAL1:["triplesTemplate"],STRING_LITERAL2:["triplesTemplate"],STRING_LITERAL_LONG1:["triplesTemplate"],STRING_LITERAL_LONG2:["triplesTemplate"],INTEGER:["triplesTemplate"],DECIMAL:["triplesTemplate"],DOUBLE:["triplesTemplate"],INTEGER_POSITIVE:["triplesTemplate"],DECIMAL_POSITIVE:["triplesTemplate"],DOUBLE_POSITIVE:["triplesTemplate"],INTEGER_NEGATIVE:["triplesTemplate"],DECIMAL_NEGATIVE:["triplesTemplate"],DOUBLE_NEGATIVE:["triplesTemplate"],"}":[],GRAPH:[]},"?whereClause":{WHERE:["whereClause"],"{":["whereClause"],ORDER:[],HAVING:[],GROUP:[],LIMIT:[],OFFSET:[],VALUES:[],$:[]},"[ (,*dataBlockValue,)]":{"(":["(","*dataBlockValue",")"]},"[ (,*var,)]":{"(":["(","*var",")"]},"[ (,expression,)]":{"(":["(","expression",")"]},"[ (,expression,AS,var,)]":{"(":["(","expression","AS","var",")"]},"[!=,numericExpression]":{"!=":["!=","numericExpression"]},"[&&,valueLogical]":{"&&":["&&","valueLogical"]},"[*,unaryExpression]":{"*":["*","unaryExpression"]},"[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]":{WHERE:["*datasetClause","WHERE","{","?triplesTemplate","}","solutionModifier"],FROM:["*datasetClause","WHERE","{","?triplesTemplate","}","solutionModifier"]},"[+,multiplicativeExpression]":{"+":["+","multiplicativeExpression"]},"[,,expression]":{",":[",","expression"]},"[,,integer,}]":{",":[",","integer","}"]},"[,,objectPath]":{",":[",","objectPath"]},"[,,object]":{",":[",","object"]},"[,,or([},[integer,}]])]":{",":[",","or([},[integer,}]])"]},"[-,multiplicativeExpression]":{"-":["-","multiplicativeExpression"]},"[.,?constructTriples]":{".":[".","?constructTriples"]},"[.,?triplesBlock]":{".":[".","?triplesBlock"]},"[.,?triplesTemplate]":{".":[".","?triplesTemplate"]},"[/,pathEltOrInverse]":{"/":["/","pathEltOrInverse"]},"[/,unaryExpression]":{"/":["/","unaryExpression"]},"[;,?[or([verbPath,verbSimple]),objectList]]":{";":[";","?[or([verbPath,verbSimple]),objectList]"]},"[;,?[verb,objectList]]":{";":[";","?[verb,objectList]"]},"[;,SEPARATOR,=,string]":{";":[";","SEPARATOR","=","string"]},"[;,update]":{";":[";","update"]},"[<,numericExpression]":{"<":["<","numericExpression"]},"[<=,numericExpression]":{"<=":["<=","numericExpression"]},"[=,numericExpression]":{"=":["=","numericExpression"]},"[>,numericExpression]":{">":[">","numericExpression"]},"[>=,numericExpression]":{">=":[">=","numericExpression"]},"[AS,var]":{AS:["AS","var"]},"[IN,expressionList]":{IN:["IN","expressionList"]},"[INTO,graphRef]":{INTO:["INTO","graphRef"]},"[NAMED,iriRef]":{NAMED:["NAMED","iriRef"]},"[NOT,IN,expressionList]":{NOT:["NOT","IN","expressionList"]},"[UNION,groupGraphPattern]":{UNION:["UNION","groupGraphPattern"]},"[^^,iriRef]":{"^^":["^^","iriRef"]},"[constructTemplate,*datasetClause,whereClause,solutionModifier]":{"{":["constructTemplate","*datasetClause","whereClause","solutionModifier"]},"[deleteClause,?insertClause]":{DELETE:["deleteClause","?insertClause"]},"[graphPatternNotTriples,?.,?triplesBlock]":{"{":["graphPatternNotTriples","?.","?triplesBlock"],OPTIONAL:["graphPatternNotTriples","?.","?triplesBlock"],MINUS:["graphPatternNotTriples","?.","?triplesBlock"],GRAPH:["graphPatternNotTriples","?.","?triplesBlock"],SERVICE:["graphPatternNotTriples","?.","?triplesBlock"],FILTER:["graphPatternNotTriples","?.","?triplesBlock"],BIND:["graphPatternNotTriples","?.","?triplesBlock"],VALUES:["graphPatternNotTriples","?.","?triplesBlock"]},"[integer,or([[,,or([},[integer,}]])],}])]":{INTEGER:["integer","or([[,,or([},[integer,}]])],}])"]},"[integer,}]":{INTEGER:["integer","}"]},"[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]":{INTEGER_POSITIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_POSITIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_POSITIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER_NEGATIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_NEGATIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_NEGATIVE:["or([numericLiteralPositive,numericLiteralNegative])","?or([[*,unaryExpression],[/,unaryExpression]])"]},"[or([verbPath,verbSimple]),objectList]":{VAR1:["or([verbPath,verbSimple])","objectList"],VAR2:["or([verbPath,verbSimple])","objectList"],"^":["or([verbPath,verbSimple])","objectList"],a:["or([verbPath,verbSimple])","objectList"],"!":["or([verbPath,verbSimple])","objectList"],"(":["or([verbPath,verbSimple])","objectList"],IRI_REF:["or([verbPath,verbSimple])","objectList"],PNAME_LN:["or([verbPath,verbSimple])","objectList"],PNAME_NS:["or([verbPath,verbSimple])","objectList"]},"[pathOneInPropertySet,*[|,pathOneInPropertySet]]":{a:["pathOneInPropertySet","*[|,pathOneInPropertySet]"],"^":["pathOneInPropertySet","*[|,pathOneInPropertySet]"],IRI_REF:["pathOneInPropertySet","*[|,pathOneInPropertySet]"],PNAME_LN:["pathOneInPropertySet","*[|,pathOneInPropertySet]"],PNAME_NS:["pathOneInPropertySet","*[|,pathOneInPropertySet]"]},"[quadsNotTriples,?.,?triplesTemplate]":{GRAPH:["quadsNotTriples","?.","?triplesTemplate"]},"[update1,?[;,update]]":{INSERT:["update1","?[;,update]"],DELETE:["update1","?[;,update]"],LOAD:["update1","?[;,update]"],CLEAR:["update1","?[;,update]"],DROP:["update1","?[;,update]"],ADD:["update1","?[;,update]"],MOVE:["update1","?[;,update]"],COPY:["update1","?[;,update]"],CREATE:["update1","?[;,update]"],WITH:["update1","?[;,update]"]},"[verb,objectList]":{a:["verb","objectList"],VAR1:["verb","objectList"],VAR2:["verb","objectList"],IRI_REF:["verb","objectList"],PNAME_LN:["verb","objectList"],PNAME_NS:["verb","objectList"]},"[|,pathOneInPropertySet]":{"|":["|","pathOneInPropertySet"]},"[|,pathSequence]":{"|":["|","pathSequence"]},"[||,conditionalAndExpression]":{"||":["||","conditionalAndExpression"]},add:{ADD:["ADD","?SILENT_4","graphOrDefault","TO","graphOrDefault"]},additiveExpression:{"!":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"+":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"-":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],VAR1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],VAR2:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],"(":["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],LANG:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],LANGMATCHES:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DATATYPE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],BOUND:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],IRI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],URI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],BNODE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],RAND:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ABS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],CEIL:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],FLOOR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ROUND:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],CONCAT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRLEN:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],UCASE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],LCASE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ENCODE_FOR_URI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],CONTAINS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRSTARTS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRENDS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRBEFORE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRAFTER:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],YEAR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MONTH:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DAY:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],HOURS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MINUTES:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SECONDS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],TIMEZONE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],TZ:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],NOW:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],UUID:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRUUID:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MD5:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA256:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA384:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SHA512:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],COALESCE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],IF:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRLANG:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRDT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SAMETERM:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISIRI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISURI:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISBLANK:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISLITERAL:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],ISNUMERIC:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],TRUE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],FALSE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],COUNT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SUM:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MIN:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],MAX:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],AVG:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SAMPLE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],GROUP_CONCAT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],SUBSTR:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],REPLACE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],REGEX:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],EXISTS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],NOT:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],IRI_REF:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL2:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL_LONG1:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],STRING_LITERAL_LONG2:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_POSITIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_POSITIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_POSITIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],INTEGER_NEGATIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DECIMAL_NEGATIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],DOUBLE_NEGATIVE:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],PNAME_LN:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"],PNAME_NS:["multiplicativeExpression","*or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])"]},aggregate:{COUNT:["COUNT","(","?DISTINCT","or([*,expression])",")"],SUM:["SUM","(","?DISTINCT","expression",")"],MIN:["MIN","(","?DISTINCT","expression",")"],MAX:["MAX","(","?DISTINCT","expression",")"],AVG:["AVG","(","?DISTINCT","expression",")"],SAMPLE:["SAMPLE","(","?DISTINCT","expression",")"],GROUP_CONCAT:["GROUP_CONCAT","(","?DISTINCT","expression","?[;,SEPARATOR,=,string]",")"]},allowBnodes:{"}":[]},allowVars:{"}":[]},argList:{NIL:["NIL"],"(":["(","?DISTINCT","expression","*[,,expression]",")"]},askQuery:{ASK:["ASK","*datasetClause","whereClause","solutionModifier"]},baseDecl:{BASE:["BASE","IRI_REF"]},bind:{BIND:["BIND","(","expression","AS","var",")"]},blankNode:{BLANK_NODE_LABEL:["BLANK_NODE_LABEL"],ANON:["ANON"]},blankNodePropertyList:{"[":["[","propertyListNotEmpty","]"]},blankNodePropertyListPath:{"[":["[","propertyListPathNotEmpty","]"]},booleanLiteral:{TRUE:["TRUE"],FALSE:["FALSE"]},brackettedExpression:{"(":["(","expression",")"]},builtInCall:{STR:["STR","(","expression",")"],LANG:["LANG","(","expression",")"],LANGMATCHES:["LANGMATCHES","(","expression",",","expression",")"],DATATYPE:["DATATYPE","(","expression",")"],BOUND:["BOUND","(","var",")"],IRI:["IRI","(","expression",")"],URI:["URI","(","expression",")"],BNODE:["BNODE","or([[ (,expression,)],NIL])"],RAND:["RAND","NIL"],ABS:["ABS","(","expression",")"],CEIL:["CEIL","(","expression",")"],FLOOR:["FLOOR","(","expression",")"],ROUND:["ROUND","(","expression",")"],CONCAT:["CONCAT","expressionList"],SUBSTR:["substringExpression"],STRLEN:["STRLEN","(","expression",")"],REPLACE:["strReplaceExpression"],UCASE:["UCASE","(","expression",")"],LCASE:["LCASE","(","expression",")"],ENCODE_FOR_URI:["ENCODE_FOR_URI","(","expression",")"],CONTAINS:["CONTAINS","(","expression",",","expression",")"],STRSTARTS:["STRSTARTS","(","expression",",","expression",")"],STRENDS:["STRENDS","(","expression",",","expression",")"],STRBEFORE:["STRBEFORE","(","expression",",","expression",")"],STRAFTER:["STRAFTER","(","expression",",","expression",")"],YEAR:["YEAR","(","expression",")"],MONTH:["MONTH","(","expression",")"],DAY:["DAY","(","expression",")"],HOURS:["HOURS","(","expression",")"],MINUTES:["MINUTES","(","expression",")"],SECONDS:["SECONDS","(","expression",")"],TIMEZONE:["TIMEZONE","(","expression",")"],TZ:["TZ","(","expression",")"],NOW:["NOW","NIL"],UUID:["UUID","NIL"],STRUUID:["STRUUID","NIL"],MD5:["MD5","(","expression",")"],SHA1:["SHA1","(","expression",")"],SHA256:["SHA256","(","expression",")"],SHA384:["SHA384","(","expression",")"],SHA512:["SHA512","(","expression",")"],COALESCE:["COALESCE","expressionList"],IF:["IF","(","expression",",","expression",",","expression",")"],STRLANG:["STRLANG","(","expression",",","expression",")"],STRDT:["STRDT","(","expression",",","expression",")"],SAMETERM:["SAMETERM","(","expression",",","expression",")"],ISIRI:["ISIRI","(","expression",")"],ISURI:["ISURI","(","expression",")"],ISBLANK:["ISBLANK","(","expression",")"],ISLITERAL:["ISLITERAL","(","expression",")"],ISNUMERIC:["ISNUMERIC","(","expression",")"],REGEX:["regexExpression"],EXISTS:["existsFunc"],NOT:["notExistsFunc"]},clear:{CLEAR:["CLEAR","?SILENT_2","graphRefAll"]},collection:{"(":["(","+graphNode",")"]},collectionPath:{"(":["(","+graphNodePath",")"]},conditionalAndExpression:{"!":["valueLogical","*[&&,valueLogical]"],"+":["valueLogical","*[&&,valueLogical]"],"-":["valueLogical","*[&&,valueLogical]"],VAR1:["valueLogical","*[&&,valueLogical]"],VAR2:["valueLogical","*[&&,valueLogical]"],"(":["valueLogical","*[&&,valueLogical]"],STR:["valueLogical","*[&&,valueLogical]"],LANG:["valueLogical","*[&&,valueLogical]"],LANGMATCHES:["valueLogical","*[&&,valueLogical]"],DATATYPE:["valueLogical","*[&&,valueLogical]"],BOUND:["valueLogical","*[&&,valueLogical]"],IRI:["valueLogical","*[&&,valueLogical]"],URI:["valueLogical","*[&&,valueLogical]"],BNODE:["valueLogical","*[&&,valueLogical]"],RAND:["valueLogical","*[&&,valueLogical]"],ABS:["valueLogical","*[&&,valueLogical]"],CEIL:["valueLogical","*[&&,valueLogical]"],FLOOR:["valueLogical","*[&&,valueLogical]"],ROUND:["valueLogical","*[&&,valueLogical]"],CONCAT:["valueLogical","*[&&,valueLogical]"],STRLEN:["valueLogical","*[&&,valueLogical]"],UCASE:["valueLogical","*[&&,valueLogical]"],LCASE:["valueLogical","*[&&,valueLogical]"],ENCODE_FOR_URI:["valueLogical","*[&&,valueLogical]"],CONTAINS:["valueLogical","*[&&,valueLogical]"],STRSTARTS:["valueLogical","*[&&,valueLogical]"],STRENDS:["valueLogical","*[&&,valueLogical]"],STRBEFORE:["valueLogical","*[&&,valueLogical]"],STRAFTER:["valueLogical","*[&&,valueLogical]"],YEAR:["valueLogical","*[&&,valueLogical]"],MONTH:["valueLogical","*[&&,valueLogical]"],DAY:["valueLogical","*[&&,valueLogical]"],HOURS:["valueLogical","*[&&,valueLogical]"],MINUTES:["valueLogical","*[&&,valueLogical]"],SECONDS:["valueLogical","*[&&,valueLogical]"],TIMEZONE:["valueLogical","*[&&,valueLogical]"],TZ:["valueLogical","*[&&,valueLogical]"],NOW:["valueLogical","*[&&,valueLogical]"],UUID:["valueLogical","*[&&,valueLogical]"],STRUUID:["valueLogical","*[&&,valueLogical]"],MD5:["valueLogical","*[&&,valueLogical]"],SHA1:["valueLogical","*[&&,valueLogical]"],SHA256:["valueLogical","*[&&,valueLogical]"],SHA384:["valueLogical","*[&&,valueLogical]"],SHA512:["valueLogical","*[&&,valueLogical]"],COALESCE:["valueLogical","*[&&,valueLogical]"],IF:["valueLogical","*[&&,valueLogical]"],STRLANG:["valueLogical","*[&&,valueLogical]"],STRDT:["valueLogical","*[&&,valueLogical]"],SAMETERM:["valueLogical","*[&&,valueLogical]"],ISIRI:["valueLogical","*[&&,valueLogical]"],ISURI:["valueLogical","*[&&,valueLogical]"],ISBLANK:["valueLogical","*[&&,valueLogical]"],ISLITERAL:["valueLogical","*[&&,valueLogical]"],ISNUMERIC:["valueLogical","*[&&,valueLogical]"],TRUE:["valueLogical","*[&&,valueLogical]"],FALSE:["valueLogical","*[&&,valueLogical]"],COUNT:["valueLogical","*[&&,valueLogical]"],SUM:["valueLogical","*[&&,valueLogical]"],MIN:["valueLogical","*[&&,valueLogical]"],MAX:["valueLogical","*[&&,valueLogical]"],AVG:["valueLogical","*[&&,valueLogical]"],SAMPLE:["valueLogical","*[&&,valueLogical]"],GROUP_CONCAT:["valueLogical","*[&&,valueLogical]"],SUBSTR:["valueLogical","*[&&,valueLogical]"],REPLACE:["valueLogical","*[&&,valueLogical]"],REGEX:["valueLogical","*[&&,valueLogical]"],EXISTS:["valueLogical","*[&&,valueLogical]"],NOT:["valueLogical","*[&&,valueLogical]"],IRI_REF:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL1:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL2:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL_LONG1:["valueLogical","*[&&,valueLogical]"],STRING_LITERAL_LONG2:["valueLogical","*[&&,valueLogical]"],INTEGER:["valueLogical","*[&&,valueLogical]"],DECIMAL:["valueLogical","*[&&,valueLogical]"],DOUBLE:["valueLogical","*[&&,valueLogical]"],INTEGER_POSITIVE:["valueLogical","*[&&,valueLogical]"],DECIMAL_POSITIVE:["valueLogical","*[&&,valueLogical]"],DOUBLE_POSITIVE:["valueLogical","*[&&,valueLogical]"],INTEGER_NEGATIVE:["valueLogical","*[&&,valueLogical]"],DECIMAL_NEGATIVE:["valueLogical","*[&&,valueLogical]"],DOUBLE_NEGATIVE:["valueLogical","*[&&,valueLogical]"],PNAME_LN:["valueLogical","*[&&,valueLogical]"],PNAME_NS:["valueLogical","*[&&,valueLogical]"]},conditionalOrExpression:{"!":["conditionalAndExpression","*[||,conditionalAndExpression]"],"+":["conditionalAndExpression","*[||,conditionalAndExpression]"],"-":["conditionalAndExpression","*[||,conditionalAndExpression]"],VAR1:["conditionalAndExpression","*[||,conditionalAndExpression]"],VAR2:["conditionalAndExpression","*[||,conditionalAndExpression]"],"(":["conditionalAndExpression","*[||,conditionalAndExpression]"],STR:["conditionalAndExpression","*[||,conditionalAndExpression]"],LANG:["conditionalAndExpression","*[||,conditionalAndExpression]"],LANGMATCHES:["conditionalAndExpression","*[||,conditionalAndExpression]"],DATATYPE:["conditionalAndExpression","*[||,conditionalAndExpression]"],BOUND:["conditionalAndExpression","*[||,conditionalAndExpression]"],IRI:["conditionalAndExpression","*[||,conditionalAndExpression]"],URI:["conditionalAndExpression","*[||,conditionalAndExpression]"],BNODE:["conditionalAndExpression","*[||,conditionalAndExpression]"],RAND:["conditionalAndExpression","*[||,conditionalAndExpression]"],ABS:["conditionalAndExpression","*[||,conditionalAndExpression]"],CEIL:["conditionalAndExpression","*[||,conditionalAndExpression]"],FLOOR:["conditionalAndExpression","*[||,conditionalAndExpression]"],ROUND:["conditionalAndExpression","*[||,conditionalAndExpression]"],CONCAT:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRLEN:["conditionalAndExpression","*[||,conditionalAndExpression]"],UCASE:["conditionalAndExpression","*[||,conditionalAndExpression]"],LCASE:["conditionalAndExpression","*[||,conditionalAndExpression]"],ENCODE_FOR_URI:["conditionalAndExpression","*[||,conditionalAndExpression]"],CONTAINS:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRSTARTS:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRENDS:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRBEFORE:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRAFTER:["conditionalAndExpression","*[||,conditionalAndExpression]"],YEAR:["conditionalAndExpression","*[||,conditionalAndExpression]"],MONTH:["conditionalAndExpression","*[||,conditionalAndExpression]"],DAY:["conditionalAndExpression","*[||,conditionalAndExpression]"],HOURS:["conditionalAndExpression","*[||,conditionalAndExpression]"],MINUTES:["conditionalAndExpression","*[||,conditionalAndExpression]"],SECONDS:["conditionalAndExpression","*[||,conditionalAndExpression]"],TIMEZONE:["conditionalAndExpression","*[||,conditionalAndExpression]"],TZ:["conditionalAndExpression","*[||,conditionalAndExpression]"],NOW:["conditionalAndExpression","*[||,conditionalAndExpression]"],UUID:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRUUID:["conditionalAndExpression","*[||,conditionalAndExpression]"],MD5:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA1:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA256:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA384:["conditionalAndExpression","*[||,conditionalAndExpression]"],SHA512:["conditionalAndExpression","*[||,conditionalAndExpression]"],COALESCE:["conditionalAndExpression","*[||,conditionalAndExpression]"],IF:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRLANG:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRDT:["conditionalAndExpression","*[||,conditionalAndExpression]"],SAMETERM:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISIRI:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISURI:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISBLANK:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISLITERAL:["conditionalAndExpression","*[||,conditionalAndExpression]"],ISNUMERIC:["conditionalAndExpression","*[||,conditionalAndExpression]"],TRUE:["conditionalAndExpression","*[||,conditionalAndExpression]"],FALSE:["conditionalAndExpression","*[||,conditionalAndExpression]"],COUNT:["conditionalAndExpression","*[||,conditionalAndExpression]"],SUM:["conditionalAndExpression","*[||,conditionalAndExpression]"],MIN:["conditionalAndExpression","*[||,conditionalAndExpression]"],MAX:["conditionalAndExpression","*[||,conditionalAndExpression]"],AVG:["conditionalAndExpression","*[||,conditionalAndExpression]"],SAMPLE:["conditionalAndExpression","*[||,conditionalAndExpression]"],GROUP_CONCAT:["conditionalAndExpression","*[||,conditionalAndExpression]"],SUBSTR:["conditionalAndExpression","*[||,conditionalAndExpression]"],REPLACE:["conditionalAndExpression","*[||,conditionalAndExpression]"],REGEX:["conditionalAndExpression","*[||,conditionalAndExpression]"],EXISTS:["conditionalAndExpression","*[||,conditionalAndExpression]"],NOT:["conditionalAndExpression","*[||,conditionalAndExpression]"],IRI_REF:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL1:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL2:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL_LONG1:["conditionalAndExpression","*[||,conditionalAndExpression]"],STRING_LITERAL_LONG2:["conditionalAndExpression","*[||,conditionalAndExpression]"],INTEGER:["conditionalAndExpression","*[||,conditionalAndExpression]"],DECIMAL:["conditionalAndExpression","*[||,conditionalAndExpression]"],DOUBLE:["conditionalAndExpression","*[||,conditionalAndExpression]"],INTEGER_POSITIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DECIMAL_POSITIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DOUBLE_POSITIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],INTEGER_NEGATIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DECIMAL_NEGATIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],DOUBLE_NEGATIVE:["conditionalAndExpression","*[||,conditionalAndExpression]"],PNAME_LN:["conditionalAndExpression","*[||,conditionalAndExpression]"],PNAME_NS:["conditionalAndExpression","*[||,conditionalAndExpression]"]},constraint:{"(":["brackettedExpression"],STR:["builtInCall"],LANG:["builtInCall"],LANGMATCHES:["builtInCall"],DATATYPE:["builtInCall"],BOUND:["builtInCall"],IRI:["builtInCall"],URI:["builtInCall"],BNODE:["builtInCall"],RAND:["builtInCall"],ABS:["builtInCall"],CEIL:["builtInCall"],FLOOR:["builtInCall"],ROUND:["builtInCall"],CONCAT:["builtInCall"],STRLEN:["builtInCall"],UCASE:["builtInCall"],LCASE:["builtInCall"],ENCODE_FOR_URI:["builtInCall"],CONTAINS:["builtInCall"],STRSTARTS:["builtInCall"],STRENDS:["builtInCall"],STRBEFORE:["builtInCall"],STRAFTER:["builtInCall"],YEAR:["builtInCall"],MONTH:["builtInCall"],DAY:["builtInCall"],HOURS:["builtInCall"],MINUTES:["builtInCall"],SECONDS:["builtInCall"],TIMEZONE:["builtInCall"],TZ:["builtInCall"],NOW:["builtInCall"],UUID:["builtInCall"],STRUUID:["builtInCall"],MD5:["builtInCall"],SHA1:["builtInCall"],SHA256:["builtInCall"],SHA384:["builtInCall"],SHA512:["builtInCall"],COALESCE:["builtInCall"],IF:["builtInCall"],STRLANG:["builtInCall"],STRDT:["builtInCall"],SAMETERM:["builtInCall"],ISIRI:["builtInCall"],ISURI:["builtInCall"],ISBLANK:["builtInCall"],ISLITERAL:["builtInCall"],ISNUMERIC:["builtInCall"],SUBSTR:["builtInCall"],REPLACE:["builtInCall"],REGEX:["builtInCall"],EXISTS:["builtInCall"],NOT:["builtInCall"],IRI_REF:["functionCall"],PNAME_LN:["functionCall"],PNAME_NS:["functionCall"]},constructQuery:{CONSTRUCT:["CONSTRUCT","or([[constructTemplate,*datasetClause,whereClause,solutionModifier],[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]])"]},constructTemplate:{"{":["{","?constructTriples","}"]},constructTriples:{VAR1:["triplesSameSubject","?[.,?constructTriples]"],VAR2:["triplesSameSubject","?[.,?constructTriples]"],NIL:["triplesSameSubject","?[.,?constructTriples]"],"(":["triplesSameSubject","?[.,?constructTriples]"],"[":["triplesSameSubject","?[.,?constructTriples]"],IRI_REF:["triplesSameSubject","?[.,?constructTriples]"],TRUE:["triplesSameSubject","?[.,?constructTriples]"],FALSE:["triplesSameSubject","?[.,?constructTriples]"],BLANK_NODE_LABEL:["triplesSameSubject","?[.,?constructTriples]"],ANON:["triplesSameSubject","?[.,?constructTriples]"],PNAME_LN:["triplesSameSubject","?[.,?constructTriples]"],PNAME_NS:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL1:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL2:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL_LONG1:["triplesSameSubject","?[.,?constructTriples]"],STRING_LITERAL_LONG2:["triplesSameSubject","?[.,?constructTriples]"],INTEGER:["triplesSameSubject","?[.,?constructTriples]"],DECIMAL:["triplesSameSubject","?[.,?constructTriples]"],DOUBLE:["triplesSameSubject","?[.,?constructTriples]"],INTEGER_POSITIVE:["triplesSameSubject","?[.,?constructTriples]"],DECIMAL_POSITIVE:["triplesSameSubject","?[.,?constructTriples]"],DOUBLE_POSITIVE:["triplesSameSubject","?[.,?constructTriples]"],INTEGER_NEGATIVE:["triplesSameSubject","?[.,?constructTriples]"],DECIMAL_NEGATIVE:["triplesSameSubject","?[.,?constructTriples]"],DOUBLE_NEGATIVE:["triplesSameSubject","?[.,?constructTriples]"]},copy:{COPY:["COPY","?SILENT_4","graphOrDefault","TO","graphOrDefault"]},create:{CREATE:["CREATE","?SILENT_3","graphRef"]},dataBlock:{NIL:["or([inlineDataOneVar,inlineDataFull])"],"(":["or([inlineDataOneVar,inlineDataFull])"],VAR1:["or([inlineDataOneVar,inlineDataFull])"],VAR2:["or([inlineDataOneVar,inlineDataFull])"]},dataBlockValue:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],STRING_LITERAL1:["rdfLiteral"],STRING_LITERAL2:["rdfLiteral"],STRING_LITERAL_LONG1:["rdfLiteral"],STRING_LITERAL_LONG2:["rdfLiteral"],INTEGER:["numericLiteral"],DECIMAL:["numericLiteral"],DOUBLE:["numericLiteral"],INTEGER_POSITIVE:["numericLiteral"],DECIMAL_POSITIVE:["numericLiteral"],DOUBLE_POSITIVE:["numericLiteral"],INTEGER_NEGATIVE:["numericLiteral"],DECIMAL_NEGATIVE:["numericLiteral"],DOUBLE_NEGATIVE:["numericLiteral"],TRUE:["booleanLiteral"],FALSE:["booleanLiteral"],UNDEF:["UNDEF"]},datasetClause:{FROM:["FROM","or([defaultGraphClause,namedGraphClause])"]},defaultGraphClause:{IRI_REF:["sourceSelector"],PNAME_LN:["sourceSelector"],PNAME_NS:["sourceSelector"]},delete1:{DATA:["DATA","quadDataNoBnodes"],WHERE:["WHERE","quadPatternNoBnodes"],"{":["quadPatternNoBnodes","?insertClause","*usingClause","WHERE","groupGraphPattern"]},deleteClause:{DELETE:["DELETE","quadPattern"]},describeDatasetClause:{FROM:["FROM","or([defaultGraphClause,namedGraphClause])"]},describeQuery:{DESCRIBE:["DESCRIBE","or([+varOrIRIref,*])","*describeDatasetClause","?whereClause","solutionModifier"]},disallowBnodes:{"}":[],GRAPH:[],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},disallowVars:{"}":[],GRAPH:[],VAR1:[],VAR2:[],NIL:[],"(":[],"[":[],IRI_REF:[],TRUE:[],FALSE:[],BLANK_NODE_LABEL:[],ANON:[],PNAME_LN:[],PNAME_NS:[],STRING_LITERAL1:[],STRING_LITERAL2:[],STRING_LITERAL_LONG1:[],STRING_LITERAL_LONG2:[],INTEGER:[],DECIMAL:[],DOUBLE:[],INTEGER_POSITIVE:[],DECIMAL_POSITIVE:[],DOUBLE_POSITIVE:[],INTEGER_NEGATIVE:[],DECIMAL_NEGATIVE:[],DOUBLE_NEGATIVE:[]},drop:{DROP:["DROP","?SILENT_2","graphRefAll"]},existsFunc:{EXISTS:["EXISTS","groupGraphPattern"]},expression:{"!":["conditionalOrExpression"],"+":["conditionalOrExpression"],"-":["conditionalOrExpression"],VAR1:["conditionalOrExpression"],VAR2:["conditionalOrExpression"],"(":["conditionalOrExpression"],STR:["conditionalOrExpression"],LANG:["conditionalOrExpression"],LANGMATCHES:["conditionalOrExpression"],DATATYPE:["conditionalOrExpression"],BOUND:["conditionalOrExpression"],IRI:["conditionalOrExpression"],URI:["conditionalOrExpression"],BNODE:["conditionalOrExpression"],RAND:["conditionalOrExpression"],ABS:["conditionalOrExpression"],CEIL:["conditionalOrExpression"],FLOOR:["conditionalOrExpression"],ROUND:["conditionalOrExpression"],CONCAT:["conditionalOrExpression"],STRLEN:["conditionalOrExpression"],UCASE:["conditionalOrExpression"],LCASE:["conditionalOrExpression"],ENCODE_FOR_URI:["conditionalOrExpression"],CONTAINS:["conditionalOrExpression"],STRSTARTS:["conditionalOrExpression"],STRENDS:["conditionalOrExpression"],STRBEFORE:["conditionalOrExpression"],STRAFTER:["conditionalOrExpression"],YEAR:["conditionalOrExpression"],MONTH:["conditionalOrExpression"],DAY:["conditionalOrExpression"],HOURS:["conditionalOrExpression"],MINUTES:["conditionalOrExpression"],SECONDS:["conditionalOrExpression"],TIMEZONE:["conditionalOrExpression"],TZ:["conditionalOrExpression"],NOW:["conditionalOrExpression"],UUID:["conditionalOrExpression"],STRUUID:["conditionalOrExpression"],MD5:["conditionalOrExpression"],SHA1:["conditionalOrExpression"],SHA256:["conditionalOrExpression"],SHA384:["conditionalOrExpression"],SHA512:["conditionalOrExpression"],COALESCE:["conditionalOrExpression"],IF:["conditionalOrExpression"],STRLANG:["conditionalOrExpression"],STRDT:["conditionalOrExpression"],SAMETERM:["conditionalOrExpression"],ISIRI:["conditionalOrExpression"],ISURI:["conditionalOrExpression"],ISBLANK:["conditionalOrExpression"],ISLITERAL:["conditionalOrExpression"],ISNUMERIC:["conditionalOrExpression"],TRUE:["conditionalOrExpression"],FALSE:["conditionalOrExpression"],COUNT:["conditionalOrExpression"],SUM:["conditionalOrExpression"],MIN:["conditionalOrExpression"],MAX:["conditionalOrExpression"],AVG:["conditionalOrExpression"],SAMPLE:["conditionalOrExpression"],GROUP_CONCAT:["conditionalOrExpression"],SUBSTR:["conditionalOrExpression"],REPLACE:["conditionalOrExpression"],REGEX:["conditionalOrExpression"],EXISTS:["conditionalOrExpression"],NOT:["conditionalOrExpression"],IRI_REF:["conditionalOrExpression"],STRING_LITERAL1:["conditionalOrExpression"],STRING_LITERAL2:["conditionalOrExpression"],STRING_LITERAL_LONG1:["conditionalOrExpression"],STRING_LITERAL_LONG2:["conditionalOrExpression"],INTEGER:["conditionalOrExpression"],DECIMAL:["conditionalOrExpression"],DOUBLE:["conditionalOrExpression"],INTEGER_POSITIVE:["conditionalOrExpression"],DECIMAL_POSITIVE:["conditionalOrExpression"],DOUBLE_POSITIVE:["conditionalOrExpression"],INTEGER_NEGATIVE:["conditionalOrExpression"],DECIMAL_NEGATIVE:["conditionalOrExpression"],DOUBLE_NEGATIVE:["conditionalOrExpression"],PNAME_LN:["conditionalOrExpression"],PNAME_NS:["conditionalOrExpression"]},expressionList:{NIL:["NIL"],"(":["(","expression","*[,,expression]",")"]},filter:{FILTER:["FILTER","constraint"]},functionCall:{IRI_REF:["iriRef","argList"],PNAME_LN:["iriRef","argList"],PNAME_NS:["iriRef","argList"]},graphGraphPattern:{GRAPH:["GRAPH","varOrIRIref","groupGraphPattern"]},graphNode:{VAR1:["varOrTerm"],VAR2:["varOrTerm"],NIL:["varOrTerm"],IRI_REF:["varOrTerm"],TRUE:["varOrTerm"],FALSE:["varOrTerm"],BLANK_NODE_LABEL:["varOrTerm"],ANON:["varOrTerm"],PNAME_LN:["varOrTerm"],PNAME_NS:["varOrTerm"],STRING_LITERAL1:["varOrTerm"],STRING_LITERAL2:["varOrTerm"],STRING_LITERAL_LONG1:["varOrTerm"],STRING_LITERAL_LONG2:["varOrTerm"],INTEGER:["varOrTerm"],DECIMAL:["varOrTerm"],DOUBLE:["varOrTerm"],INTEGER_POSITIVE:["varOrTerm"],DECIMAL_POSITIVE:["varOrTerm"],DOUBLE_POSITIVE:["varOrTerm"],INTEGER_NEGATIVE:["varOrTerm"],DECIMAL_NEGATIVE:["varOrTerm"],DOUBLE_NEGATIVE:["varOrTerm"],"(":["triplesNode"],"[":["triplesNode"]},graphNodePath:{VAR1:["varOrTerm"],VAR2:["varOrTerm"],NIL:["varOrTerm"],IRI_REF:["varOrTerm"],TRUE:["varOrTerm"],FALSE:["varOrTerm"],BLANK_NODE_LABEL:["varOrTerm"],ANON:["varOrTerm"],PNAME_LN:["varOrTerm"],PNAME_NS:["varOrTerm"],STRING_LITERAL1:["varOrTerm"],STRING_LITERAL2:["varOrTerm"],STRING_LITERAL_LONG1:["varOrTerm"],STRING_LITERAL_LONG2:["varOrTerm"],INTEGER:["varOrTerm"],DECIMAL:["varOrTerm"],DOUBLE:["varOrTerm"],INTEGER_POSITIVE:["varOrTerm"],DECIMAL_POSITIVE:["varOrTerm"],DOUBLE_POSITIVE:["varOrTerm"],INTEGER_NEGATIVE:["varOrTerm"],DECIMAL_NEGATIVE:["varOrTerm"],DOUBLE_NEGATIVE:["varOrTerm"],"(":["triplesNodePath"],"[":["triplesNodePath"]},graphOrDefault:{DEFAULT:["DEFAULT"],IRI_REF:["?GRAPH","iriRef"],PNAME_LN:["?GRAPH","iriRef"],PNAME_NS:["?GRAPH","iriRef"],GRAPH:["?GRAPH","iriRef"]},graphPatternNotTriples:{"{":["groupOrUnionGraphPattern"],OPTIONAL:["optionalGraphPattern"],MINUS:["minusGraphPattern"],GRAPH:["graphGraphPattern"],SERVICE:["serviceGraphPattern"],FILTER:["filter"],BIND:["bind"],VALUES:["inlineData"]},graphRef:{GRAPH:["GRAPH","iriRef"]},graphRefAll:{GRAPH:["graphRef"],DEFAULT:["DEFAULT"],NAMED:["NAMED"],ALL:["ALL"]},graphTerm:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],STRING_LITERAL1:["rdfLiteral"],STRING_LITERAL2:["rdfLiteral"],STRING_LITERAL_LONG1:["rdfLiteral"],STRING_LITERAL_LONG2:["rdfLiteral"],INTEGER:["numericLiteral"],DECIMAL:["numericLiteral"],DOUBLE:["numericLiteral"],INTEGER_POSITIVE:["numericLiteral"],DECIMAL_POSITIVE:["numericLiteral"],DOUBLE_POSITIVE:["numericLiteral"],INTEGER_NEGATIVE:["numericLiteral"],DECIMAL_NEGATIVE:["numericLiteral"],DOUBLE_NEGATIVE:["numericLiteral"],TRUE:["booleanLiteral"],FALSE:["booleanLiteral"],BLANK_NODE_LABEL:["blankNode"],ANON:["blankNode"],NIL:["NIL"]},groupClause:{GROUP:["GROUP","BY","+groupCondition"]},groupCondition:{STR:["builtInCall"],LANG:["builtInCall"],LANGMATCHES:["builtInCall"],DATATYPE:["builtInCall"],BOUND:["builtInCall"],IRI:["builtInCall"],URI:["builtInCall"],BNODE:["builtInCall"],RAND:["builtInCall"],ABS:["builtInCall"],CEIL:["builtInCall"],FLOOR:["builtInCall"],ROUND:["builtInCall"],CONCAT:["builtInCall"],STRLEN:["builtInCall"],UCASE:["builtInCall"],LCASE:["builtInCall"],ENCODE_FOR_URI:["builtInCall"],CONTAINS:["builtInCall"],STRSTARTS:["builtInCall"],STRENDS:["builtInCall"],STRBEFORE:["builtInCall"],STRAFTER:["builtInCall"],YEAR:["builtInCall"],MONTH:["builtInCall"],DAY:["builtInCall"],HOURS:["builtInCall"],MINUTES:["builtInCall"],SECONDS:["builtInCall"],TIMEZONE:["builtInCall"],TZ:["builtInCall"],NOW:["builtInCall"],UUID:["builtInCall"],STRUUID:["builtInCall"],MD5:["builtInCall"],SHA1:["builtInCall"],SHA256:["builtInCall"],SHA384:["builtInCall"],SHA512:["builtInCall"],COALESCE:["builtInCall"],IF:["builtInCall"],STRLANG:["builtInCall"],STRDT:["builtInCall"],SAMETERM:["builtInCall"],ISIRI:["builtInCall"],ISURI:["builtInCall"],ISBLANK:["builtInCall"],ISLITERAL:["builtInCall"],ISNUMERIC:["builtInCall"],SUBSTR:["builtInCall"],REPLACE:["builtInCall"],REGEX:["builtInCall"],EXISTS:["builtInCall"],NOT:["builtInCall"],IRI_REF:["functionCall"],PNAME_LN:["functionCall"],PNAME_NS:["functionCall"],"(":["(","expression","?[AS,var]",")"],VAR1:["var"],VAR2:["var"]},groupGraphPattern:{"{":["{","or([subSelect,groupGraphPatternSub])","}"]},groupGraphPatternSub:{"{":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],OPTIONAL:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],MINUS:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],GRAPH:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],SERVICE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],FILTER:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],BIND:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],VALUES:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],VAR1:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],VAR2:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],NIL:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],"(":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],"[":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],IRI_REF:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],TRUE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],FALSE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],BLANK_NODE_LABEL:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],ANON:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],PNAME_LN:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],PNAME_NS:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],STRING_LITERAL1:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],STRING_LITERAL2:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],STRING_LITERAL_LONG1:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],STRING_LITERAL_LONG2:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],INTEGER:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DECIMAL:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DOUBLE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],INTEGER_POSITIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DECIMAL_POSITIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DOUBLE_POSITIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],INTEGER_NEGATIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DECIMAL_NEGATIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],DOUBLE_NEGATIVE:["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"],"}":["?triplesBlock","*[graphPatternNotTriples,?.,?triplesBlock]"]},groupOrUnionGraphPattern:{"{":["groupGraphPattern","*[UNION,groupGraphPattern]"]},havingClause:{HAVING:["HAVING","+havingCondition"]},havingCondition:{"(":["constraint"],STR:["constraint"],LANG:["constraint"],LANGMATCHES:["constraint"],DATATYPE:["constraint"],BOUND:["constraint"],IRI:["constraint"],URI:["constraint"],BNODE:["constraint"],RAND:["constraint"],ABS:["constraint"],CEIL:["constraint"],FLOOR:["constraint"],ROUND:["constraint"],CONCAT:["constraint"],STRLEN:["constraint"],UCASE:["constraint"],LCASE:["constraint"],ENCODE_FOR_URI:["constraint"],CONTAINS:["constraint"],STRSTARTS:["constraint"],STRENDS:["constraint"],STRBEFORE:["constraint"],STRAFTER:["constraint"],YEAR:["constraint"],MONTH:["constraint"],DAY:["constraint"],HOURS:["constraint"],MINUTES:["constraint"],SECONDS:["constraint"],TIMEZONE:["constraint"],TZ:["constraint"],NOW:["constraint"],UUID:["constraint"],STRUUID:["constraint"],MD5:["constraint"],SHA1:["constraint"],SHA256:["constraint"],SHA384:["constraint"],SHA512:["constraint"],COALESCE:["constraint"],IF:["constraint"],STRLANG:["constraint"],STRDT:["constraint"],SAMETERM:["constraint"],ISIRI:["constraint"],ISURI:["constraint"],ISBLANK:["constraint"],ISLITERAL:["constraint"],ISNUMERIC:["constraint"],SUBSTR:["constraint"],REPLACE:["constraint"],REGEX:["constraint"],EXISTS:["constraint"],NOT:["constraint"],IRI_REF:["constraint"],PNAME_LN:["constraint"],PNAME_NS:["constraint"]},inlineData:{VALUES:["VALUES","dataBlock"]},inlineDataFull:{NIL:["or([NIL,[ (,*var,)]])","{","*or([[ (,*dataBlockValue,)],NIL])","}"],"(":["or([NIL,[ (,*var,)]])","{","*or([[ (,*dataBlockValue,)],NIL])","}"]},inlineDataOneVar:{VAR1:["var","{","*dataBlockValue","}"],VAR2:["var","{","*dataBlockValue","}"]},insert1:{DATA:["DATA","quadData"],"{":["quadPattern","*usingClause","WHERE","groupGraphPattern"]},insertClause:{INSERT:["INSERT","quadPattern"]},integer:{INTEGER:["INTEGER"]},iriRef:{IRI_REF:["IRI_REF"],PNAME_LN:["prefixedName"],PNAME_NS:["prefixedName"]},iriRefOrFunction:{IRI_REF:["iriRef","?argList"],PNAME_LN:["iriRef","?argList"],PNAME_NS:["iriRef","?argList"]},limitClause:{LIMIT:["LIMIT","INTEGER"]},limitOffsetClauses:{LIMIT:["limitClause","?offsetClause"],OFFSET:["offsetClause","?limitClause"]},load:{LOAD:["LOAD","?SILENT_1","iriRef","?[INTO,graphRef]"]},minusGraphPattern:{MINUS:["MINUS","groupGraphPattern"]},modify:{WITH:["WITH","iriRef","or([[deleteClause,?insertClause],insertClause])","*usingClause","WHERE","groupGraphPattern"]},move:{MOVE:["MOVE","?SILENT_4","graphOrDefault","TO","graphOrDefault"]},multiplicativeExpression:{"!":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],"+":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],"-":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],VAR1:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],VAR2:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],"(":["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STR:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],LANG:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],LANGMATCHES:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DATATYPE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],BOUND:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],IRI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],URI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],BNODE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],RAND:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ABS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],CEIL:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],FLOOR:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ROUND:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],CONCAT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRLEN:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],UCASE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],LCASE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ENCODE_FOR_URI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],CONTAINS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRSTARTS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRENDS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRBEFORE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRAFTER:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],YEAR:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MONTH:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DAY:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],HOURS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MINUTES:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SECONDS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],TIMEZONE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],TZ:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],NOW:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],UUID:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRUUID:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MD5:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SHA1:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SHA256:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SHA384:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SHA512:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],COALESCE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],IF:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRLANG:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRDT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SAMETERM:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISIRI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISURI:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISBLANK:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISLITERAL:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],ISNUMERIC:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],TRUE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],FALSE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],COUNT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SUM:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MIN:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],MAX:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],AVG:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SAMPLE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],GROUP_CONCAT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],SUBSTR:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],REPLACE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],REGEX:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],EXISTS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],NOT:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],IRI_REF:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRING_LITERAL1:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRING_LITERAL2:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRING_LITERAL_LONG1:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],STRING_LITERAL_LONG2:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER_POSITIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_POSITIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_POSITIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],INTEGER_NEGATIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DECIMAL_NEGATIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],DOUBLE_NEGATIVE:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],PNAME_LN:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"],PNAME_NS:["unaryExpression","*or([[*,unaryExpression],[/,unaryExpression]])"]},namedGraphClause:{NAMED:["NAMED","sourceSelector"]},notExistsFunc:{NOT:["NOT","EXISTS","groupGraphPattern"]},numericExpression:{"!":["additiveExpression"],"+":["additiveExpression"],"-":["additiveExpression"],VAR1:["additiveExpression"],VAR2:["additiveExpression"],"(":["additiveExpression"],STR:["additiveExpression"],LANG:["additiveExpression"],LANGMATCHES:["additiveExpression"],DATATYPE:["additiveExpression"],BOUND:["additiveExpression"],IRI:["additiveExpression"],URI:["additiveExpression"],BNODE:["additiveExpression"],RAND:["additiveExpression"],ABS:["additiveExpression"],CEIL:["additiveExpression"],FLOOR:["additiveExpression"],ROUND:["additiveExpression"],CONCAT:["additiveExpression"],STRLEN:["additiveExpression"],UCASE:["additiveExpression"],LCASE:["additiveExpression"],ENCODE_FOR_URI:["additiveExpression"],CONTAINS:["additiveExpression"],STRSTARTS:["additiveExpression"],STRENDS:["additiveExpression"],STRBEFORE:["additiveExpression"],STRAFTER:["additiveExpression"],YEAR:["additiveExpression"],MONTH:["additiveExpression"],DAY:["additiveExpression"],HOURS:["additiveExpression"],MINUTES:["additiveExpression"],SECONDS:["additiveExpression"],TIMEZONE:["additiveExpression"],TZ:["additiveExpression"],NOW:["additiveExpression"],UUID:["additiveExpression"],STRUUID:["additiveExpression"],MD5:["additiveExpression"],SHA1:["additiveExpression"],SHA256:["additiveExpression"],SHA384:["additiveExpression"],SHA512:["additiveExpression"],COALESCE:["additiveExpression"],IF:["additiveExpression"],STRLANG:["additiveExpression"],STRDT:["additiveExpression"],SAMETERM:["additiveExpression"],ISIRI:["additiveExpression"],ISURI:["additiveExpression"],ISBLANK:["additiveExpression"],ISLITERAL:["additiveExpression"],ISNUMERIC:["additiveExpression"],TRUE:["additiveExpression"],FALSE:["additiveExpression"],COUNT:["additiveExpression"],SUM:["additiveExpression"],MIN:["additiveExpression"],MAX:["additiveExpression"],AVG:["additiveExpression"],SAMPLE:["additiveExpression"],GROUP_CONCAT:["additiveExpression"],SUBSTR:["additiveExpression"],REPLACE:["additiveExpression"],REGEX:["additiveExpression"],EXISTS:["additiveExpression"],NOT:["additiveExpression"],IRI_REF:["additiveExpression"],STRING_LITERAL1:["additiveExpression"],STRING_LITERAL2:["additiveExpression"],STRING_LITERAL_LONG1:["additiveExpression"],STRING_LITERAL_LONG2:["additiveExpression"],INTEGER:["additiveExpression"],DECIMAL:["additiveExpression"],DOUBLE:["additiveExpression"],INTEGER_POSITIVE:["additiveExpression"],DECIMAL_POSITIVE:["additiveExpression"],DOUBLE_POSITIVE:["additiveExpression"],INTEGER_NEGATIVE:["additiveExpression"],DECIMAL_NEGATIVE:["additiveExpression"],DOUBLE_NEGATIVE:["additiveExpression"],PNAME_LN:["additiveExpression"],PNAME_NS:["additiveExpression"]},numericLiteral:{INTEGER:["numericLiteralUnsigned"],DECIMAL:["numericLiteralUnsigned"],DOUBLE:["numericLiteralUnsigned"],INTEGER_POSITIVE:["numericLiteralPositive"],DECIMAL_POSITIVE:["numericLiteralPositive"],DOUBLE_POSITIVE:["numericLiteralPositive"],INTEGER_NEGATIVE:["numericLiteralNegative"],DECIMAL_NEGATIVE:["numericLiteralNegative"],DOUBLE_NEGATIVE:["numericLiteralNegative"]},numericLiteralNegative:{INTEGER_NEGATIVE:["INTEGER_NEGATIVE"],DECIMAL_NEGATIVE:["DECIMAL_NEGATIVE"],DOUBLE_NEGATIVE:["DOUBLE_NEGATIVE"]},numericLiteralPositive:{INTEGER_POSITIVE:["INTEGER_POSITIVE"],DECIMAL_POSITIVE:["DECIMAL_POSITIVE"],DOUBLE_POSITIVE:["DOUBLE_POSITIVE"]},numericLiteralUnsigned:{INTEGER:["INTEGER"],DECIMAL:["DECIMAL"],DOUBLE:["DOUBLE"]},object:{"(":["graphNode"],"[":["graphNode"],VAR1:["graphNode"],VAR2:["graphNode"],NIL:["graphNode"],IRI_REF:["graphNode"],TRUE:["graphNode"],FALSE:["graphNode"],BLANK_NODE_LABEL:["graphNode"],ANON:["graphNode"],PNAME_LN:["graphNode"],PNAME_NS:["graphNode"],STRING_LITERAL1:["graphNode"],STRING_LITERAL2:["graphNode"],STRING_LITERAL_LONG1:["graphNode"],STRING_LITERAL_LONG2:["graphNode"],INTEGER:["graphNode"],DECIMAL:["graphNode"],DOUBLE:["graphNode"],INTEGER_POSITIVE:["graphNode"],DECIMAL_POSITIVE:["graphNode"],DOUBLE_POSITIVE:["graphNode"],INTEGER_NEGATIVE:["graphNode"],DECIMAL_NEGATIVE:["graphNode"],DOUBLE_NEGATIVE:["graphNode"]},objectList:{"(":["object","*[,,object]"],"[":["object","*[,,object]"],VAR1:["object","*[,,object]"],VAR2:["object","*[,,object]"],NIL:["object","*[,,object]"],IRI_REF:["object","*[,,object]"],TRUE:["object","*[,,object]"],FALSE:["object","*[,,object]"],BLANK_NODE_LABEL:["object","*[,,object]"],ANON:["object","*[,,object]"],PNAME_LN:["object","*[,,object]"],PNAME_NS:["object","*[,,object]"],STRING_LITERAL1:["object","*[,,object]"],STRING_LITERAL2:["object","*[,,object]"],STRING_LITERAL_LONG1:["object","*[,,object]"],STRING_LITERAL_LONG2:["object","*[,,object]"],INTEGER:["object","*[,,object]"],DECIMAL:["object","*[,,object]"],DOUBLE:["object","*[,,object]"],INTEGER_POSITIVE:["object","*[,,object]"],DECIMAL_POSITIVE:["object","*[,,object]"],DOUBLE_POSITIVE:["object","*[,,object]"],INTEGER_NEGATIVE:["object","*[,,object]"],DECIMAL_NEGATIVE:["object","*[,,object]"],DOUBLE_NEGATIVE:["object","*[,,object]"]},objectListPath:{"(":["objectPath","*[,,objectPath]"],"[":["objectPath","*[,,objectPath]"],VAR1:["objectPath","*[,,objectPath]"],VAR2:["objectPath","*[,,objectPath]"],NIL:["objectPath","*[,,objectPath]"],IRI_REF:["objectPath","*[,,objectPath]"],TRUE:["objectPath","*[,,objectPath]"],FALSE:["objectPath","*[,,objectPath]"],BLANK_NODE_LABEL:["objectPath","*[,,objectPath]"],ANON:["objectPath","*[,,objectPath]"],PNAME_LN:["objectPath","*[,,objectPath]"],PNAME_NS:["objectPath","*[,,objectPath]"],STRING_LITERAL1:["objectPath","*[,,objectPath]"],STRING_LITERAL2:["objectPath","*[,,objectPath]"],STRING_LITERAL_LONG1:["objectPath","*[,,objectPath]"],STRING_LITERAL_LONG2:["objectPath","*[,,objectPath]"],INTEGER:["objectPath","*[,,objectPath]"],DECIMAL:["objectPath","*[,,objectPath]"],DOUBLE:["objectPath","*[,,objectPath]"],INTEGER_POSITIVE:["objectPath","*[,,objectPath]"],DECIMAL_POSITIVE:["objectPath","*[,,objectPath]"],DOUBLE_POSITIVE:["objectPath","*[,,objectPath]"],INTEGER_NEGATIVE:["objectPath","*[,,objectPath]"],DECIMAL_NEGATIVE:["objectPath","*[,,objectPath]"],DOUBLE_NEGATIVE:["objectPath","*[,,objectPath]"]},objectPath:{"(":["graphNodePath"],"[":["graphNodePath"],VAR1:["graphNodePath"],VAR2:["graphNodePath"],NIL:["graphNodePath"],IRI_REF:["graphNodePath"],TRUE:["graphNodePath"],FALSE:["graphNodePath"],BLANK_NODE_LABEL:["graphNodePath"],ANON:["graphNodePath"],PNAME_LN:["graphNodePath"],PNAME_NS:["graphNodePath"],STRING_LITERAL1:["graphNodePath"],STRING_LITERAL2:["graphNodePath"],STRING_LITERAL_LONG1:["graphNodePath"],STRING_LITERAL_LONG2:["graphNodePath"],INTEGER:["graphNodePath"],DECIMAL:["graphNodePath"],DOUBLE:["graphNodePath"],INTEGER_POSITIVE:["graphNodePath"],DECIMAL_POSITIVE:["graphNodePath"],DOUBLE_POSITIVE:["graphNodePath"],INTEGER_NEGATIVE:["graphNodePath"],DECIMAL_NEGATIVE:["graphNodePath"],DOUBLE_NEGATIVE:["graphNodePath"]},offsetClause:{OFFSET:["OFFSET","INTEGER"]},optionalGraphPattern:{OPTIONAL:["OPTIONAL","groupGraphPattern"]},"or([*,expression])":{"*":["*"],"!":["expression"],"+":["expression"],"-":["expression"],VAR1:["expression"],VAR2:["expression"],"(":["expression"],STR:["expression"],LANG:["expression"],LANGMATCHES:["expression"],DATATYPE:["expression"],BOUND:["expression"],IRI:["expression"],URI:["expression"],BNODE:["expression"],RAND:["expression"],ABS:["expression"],CEIL:["expression"],FLOOR:["expression"],ROUND:["expression"],CONCAT:["expression"],STRLEN:["expression"],UCASE:["expression"],LCASE:["expression"],ENCODE_FOR_URI:["expression"],CONTAINS:["expression"],STRSTARTS:["expression"],STRENDS:["expression"],STRBEFORE:["expression"],STRAFTER:["expression"],YEAR:["expression"],MONTH:["expression"],DAY:["expression"],HOURS:["expression"],MINUTES:["expression"],SECONDS:["expression"],TIMEZONE:["expression"],TZ:["expression"],NOW:["expression"],UUID:["expression"],STRUUID:["expression"],MD5:["expression"],SHA1:["expression"],SHA256:["expression"],SHA384:["expression"],SHA512:["expression"],COALESCE:["expression"],IF:["expression"],STRLANG:["expression"],STRDT:["expression"],SAMETERM:["expression"],ISIRI:["expression"],ISURI:["expression"],ISBLANK:["expression"],ISLITERAL:["expression"],ISNUMERIC:["expression"],TRUE:["expression"],FALSE:["expression"],COUNT:["expression"],SUM:["expression"],MIN:["expression"],MAX:["expression"],AVG:["expression"],SAMPLE:["expression"],GROUP_CONCAT:["expression"],SUBSTR:["expression"],REPLACE:["expression"],REGEX:["expression"],EXISTS:["expression"],NOT:["expression"],IRI_REF:["expression"],STRING_LITERAL1:["expression"],STRING_LITERAL2:["expression"],STRING_LITERAL_LONG1:["expression"],STRING_LITERAL_LONG2:["expression"],INTEGER:["expression"],DECIMAL:["expression"],DOUBLE:["expression"],INTEGER_POSITIVE:["expression"],DECIMAL_POSITIVE:["expression"],DOUBLE_POSITIVE:["expression"],INTEGER_NEGATIVE:["expression"],DECIMAL_NEGATIVE:["expression"],DOUBLE_NEGATIVE:["expression"],PNAME_LN:["expression"],PNAME_NS:["expression"]},"or([+or([var,[ (,expression,AS,var,)]]),*])":{"(":["+or([var,[ (,expression,AS,var,)]])"],VAR1:["+or([var,[ (,expression,AS,var,)]])"],VAR2:["+or([var,[ (,expression,AS,var,)]])"],"*":["*"]},"or([+varOrIRIref,*])":{VAR1:["+varOrIRIref"],VAR2:["+varOrIRIref"],IRI_REF:["+varOrIRIref"],PNAME_LN:["+varOrIRIref"],PNAME_NS:["+varOrIRIref"],"*":["*"]},"or([ASC,DESC])":{ASC:["ASC"],DESC:["DESC"]},"or([DISTINCT,REDUCED])":{DISTINCT:["DISTINCT"],REDUCED:["REDUCED"]},"or([LANGTAG,[^^,iriRef]])":{LANGTAG:["LANGTAG"],"^^":["[^^,iriRef]"]},"or([NIL,[ (,*var,)]])":{NIL:["NIL"],"(":["[ (,*var,)]"]},"or([[ (,*dataBlockValue,)],NIL])":{"(":["[ (,*dataBlockValue,)]"],NIL:["NIL"]},"or([[ (,expression,)],NIL])":{"(":["[ (,expression,)]"],NIL:["NIL"]},"or([[*,unaryExpression],[/,unaryExpression]])":{"*":["[*,unaryExpression]"],"/":["[/,unaryExpression]"]},"or([[+,multiplicativeExpression],[-,multiplicativeExpression],[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]])":{"+":["[+,multiplicativeExpression]"],"-":["[-,multiplicativeExpression]"],INTEGER_POSITIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],DECIMAL_POSITIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],DOUBLE_POSITIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],INTEGER_NEGATIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],DECIMAL_NEGATIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"],DOUBLE_NEGATIVE:["[or([numericLiteralPositive,numericLiteralNegative]),?or([[*,unaryExpression],[/,unaryExpression]])]"]},"or([[,,or([},[integer,}]])],}])":{",":["[,,or([},[integer,}]])]"],"}":["}"]},"or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])":{"=":["[=,numericExpression]"],"!=":["[!=,numericExpression]"],"<":["[<,numericExpression]"],">":["[>,numericExpression]"],"<=":["[<=,numericExpression]"],">=":["[>=,numericExpression]"],IN:["[IN,expressionList]"],NOT:["[NOT,IN,expressionList]"]},"or([[constructTemplate,*datasetClause,whereClause,solutionModifier],[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]])":{"{":["[constructTemplate,*datasetClause,whereClause,solutionModifier]"],WHERE:["[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]"],FROM:["[*datasetClause,WHERE,{,?triplesTemplate,},solutionModifier]"]},"or([[deleteClause,?insertClause],insertClause])":{DELETE:["[deleteClause,?insertClause]"],INSERT:["insertClause"]},"or([[integer,or([[,,or([},[integer,}]])],}])],[,,integer,}]])":{INTEGER:["[integer,or([[,,or([},[integer,}]])],}])]"],",":["[,,integer,}]"]},"or([defaultGraphClause,namedGraphClause])":{IRI_REF:["defaultGraphClause"],PNAME_LN:["defaultGraphClause"],PNAME_NS:["defaultGraphClause"],NAMED:["namedGraphClause"]},"or([inlineDataOneVar,inlineDataFull])":{VAR1:["inlineDataOneVar"],VAR2:["inlineDataOneVar"],NIL:["inlineDataFull"],"(":["inlineDataFull"]},"or([iriRef,[NAMED,iriRef]])":{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],NAMED:["[NAMED,iriRef]"]},"or([iriRef,a])":{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],a:["a"]},"or([numericLiteralPositive,numericLiteralNegative])":{INTEGER_POSITIVE:["numericLiteralPositive"],DECIMAL_POSITIVE:["numericLiteralPositive"],DOUBLE_POSITIVE:["numericLiteralPositive"],INTEGER_NEGATIVE:["numericLiteralNegative"],DECIMAL_NEGATIVE:["numericLiteralNegative"],DOUBLE_NEGATIVE:["numericLiteralNegative"]},"or([queryAll,updateAll])":{CONSTRUCT:["queryAll"],DESCRIBE:["queryAll"],ASK:["queryAll"],SELECT:["queryAll"],INSERT:["updateAll"],DELETE:["updateAll"],LOAD:["updateAll"],CLEAR:["updateAll"],DROP:["updateAll"],ADD:["updateAll"],MOVE:["updateAll"],COPY:["updateAll"],CREATE:["updateAll"],WITH:["updateAll"],$:["updateAll"]},"or([selectQuery,constructQuery,describeQuery,askQuery])":{SELECT:["selectQuery"],CONSTRUCT:["constructQuery"],DESCRIBE:["describeQuery"],ASK:["askQuery"]},"or([subSelect,groupGraphPatternSub])":{SELECT:["subSelect"],"{":["groupGraphPatternSub"],OPTIONAL:["groupGraphPatternSub"],MINUS:["groupGraphPatternSub"],GRAPH:["groupGraphPatternSub"],SERVICE:["groupGraphPatternSub"],FILTER:["groupGraphPatternSub"],BIND:["groupGraphPatternSub"],VALUES:["groupGraphPatternSub"],VAR1:["groupGraphPatternSub"],VAR2:["groupGraphPatternSub"],NIL:["groupGraphPatternSub"],"(":["groupGraphPatternSub"],"[":["groupGraphPatternSub"],IRI_REF:["groupGraphPatternSub"],TRUE:["groupGraphPatternSub"],FALSE:["groupGraphPatternSub"],BLANK_NODE_LABEL:["groupGraphPatternSub"],ANON:["groupGraphPatternSub"],PNAME_LN:["groupGraphPatternSub"],PNAME_NS:["groupGraphPatternSub"],STRING_LITERAL1:["groupGraphPatternSub"],STRING_LITERAL2:["groupGraphPatternSub"],STRING_LITERAL_LONG1:["groupGraphPatternSub"],STRING_LITERAL_LONG2:["groupGraphPatternSub"],INTEGER:["groupGraphPatternSub"],DECIMAL:["groupGraphPatternSub"],DOUBLE:["groupGraphPatternSub"],INTEGER_POSITIVE:["groupGraphPatternSub"],DECIMAL_POSITIVE:["groupGraphPatternSub"],DOUBLE_POSITIVE:["groupGraphPatternSub"],INTEGER_NEGATIVE:["groupGraphPatternSub"],DECIMAL_NEGATIVE:["groupGraphPatternSub"],DOUBLE_NEGATIVE:["groupGraphPatternSub"],"}":["groupGraphPatternSub"]},"or([var,[ (,expression,AS,var,)]])":{VAR1:["var"],VAR2:["var"],"(":["[ (,expression,AS,var,)]"]},"or([verbPath,verbSimple])":{"^":["verbPath"],a:["verbPath"],"!":["verbPath"],"(":["verbPath"],IRI_REF:["verbPath"],PNAME_LN:["verbPath"],PNAME_NS:["verbPath"],VAR1:["verbSimple"],VAR2:["verbSimple"]},"or([},[integer,}]])":{"}":["}"],INTEGER:["[integer,}]"]},orderClause:{ORDER:["ORDER","BY","+orderCondition"]},orderCondition:{ASC:["or([ASC,DESC])","brackettedExpression"],DESC:["or([ASC,DESC])","brackettedExpression"],"(":["constraint"],STR:["constraint"],LANG:["constraint"],LANGMATCHES:["constraint"],DATATYPE:["constraint"],BOUND:["constraint"],IRI:["constraint"],URI:["constraint"],BNODE:["constraint"],RAND:["constraint"],ABS:["constraint"],CEIL:["constraint"],FLOOR:["constraint"],ROUND:["constraint"],CONCAT:["constraint"],STRLEN:["constraint"],UCASE:["constraint"],LCASE:["constraint"],ENCODE_FOR_URI:["constraint"],CONTAINS:["constraint"],STRSTARTS:["constraint"],STRENDS:["constraint"],STRBEFORE:["constraint"],STRAFTER:["constraint"],YEAR:["constraint"],MONTH:["constraint"],DAY:["constraint"],HOURS:["constraint"],MINUTES:["constraint"],SECONDS:["constraint"],TIMEZONE:["constraint"],TZ:["constraint"],NOW:["constraint"],UUID:["constraint"],STRUUID:["constraint"],MD5:["constraint"],SHA1:["constraint"],SHA256:["constraint"],SHA384:["constraint"],SHA512:["constraint"],COALESCE:["constraint"],IF:["constraint"],STRLANG:["constraint"],STRDT:["constraint"],SAMETERM:["constraint"],ISIRI:["constraint"],ISURI:["constraint"],ISBLANK:["constraint"],ISLITERAL:["constraint"],ISNUMERIC:["constraint"],SUBSTR:["constraint"],REPLACE:["constraint"],REGEX:["constraint"],EXISTS:["constraint"],NOT:["constraint"],IRI_REF:["constraint"],PNAME_LN:["constraint"],PNAME_NS:["constraint"],VAR1:["var"],VAR2:["var"]},path:{"^":["pathAlternative"],a:["pathAlternative"],"!":["pathAlternative"],"(":["pathAlternative"],IRI_REF:["pathAlternative"],PNAME_LN:["pathAlternative"],PNAME_NS:["pathAlternative"]},pathAlternative:{"^":["pathSequence","*[|,pathSequence]"],a:["pathSequence","*[|,pathSequence]"],"!":["pathSequence","*[|,pathSequence]"],"(":["pathSequence","*[|,pathSequence]"],IRI_REF:["pathSequence","*[|,pathSequence]"],PNAME_LN:["pathSequence","*[|,pathSequence]"],PNAME_NS:["pathSequence","*[|,pathSequence]"]},pathElt:{a:["pathPrimary","?pathMod"],"!":["pathPrimary","?pathMod"],"(":["pathPrimary","?pathMod"],IRI_REF:["pathPrimary","?pathMod"],PNAME_LN:["pathPrimary","?pathMod"],PNAME_NS:["pathPrimary","?pathMod"]},pathEltOrInverse:{a:["pathElt"],"!":["pathElt"],"(":["pathElt"],IRI_REF:["pathElt"],PNAME_LN:["pathElt"],PNAME_NS:["pathElt"],"^":["^","pathElt"]},pathMod:{"*":["*"],"?":["?"],"+":["+"],"{":["{","or([[integer,or([[,,or([},[integer,}]])],}])],[,,integer,}]])"]},pathNegatedPropertySet:{a:["pathOneInPropertySet"],"^":["pathOneInPropertySet"],IRI_REF:["pathOneInPropertySet"],PNAME_LN:["pathOneInPropertySet"],PNAME_NS:["pathOneInPropertySet"],"(":["(","?[pathOneInPropertySet,*[|,pathOneInPropertySet]]",")"]},pathOneInPropertySet:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"],a:["a"],"^":["^","or([iriRef,a])"]},pathPrimary:{IRI_REF:["storeProperty","iriRef"],PNAME_LN:["storeProperty","iriRef"],PNAME_NS:["storeProperty","iriRef"],a:["storeProperty","a"],"!":["!","pathNegatedPropertySet"],"(":["(","path",")"]},pathSequence:{"^":["pathEltOrInverse","*[/,pathEltOrInverse]"],a:["pathEltOrInverse","*[/,pathEltOrInverse]"],"!":["pathEltOrInverse","*[/,pathEltOrInverse]"],"(":["pathEltOrInverse","*[/,pathEltOrInverse]"],IRI_REF:["pathEltOrInverse","*[/,pathEltOrInverse]"],PNAME_LN:["pathEltOrInverse","*[/,pathEltOrInverse]"],PNAME_NS:["pathEltOrInverse","*[/,pathEltOrInverse]"]},prefixDecl:{PREFIX:["PREFIX","PNAME_NS","IRI_REF"]},prefixedName:{PNAME_LN:["PNAME_LN"],PNAME_NS:["PNAME_NS"]},primaryExpression:{"(":["brackettedExpression"],STR:["builtInCall"],LANG:["builtInCall"],LANGMATCHES:["builtInCall"],DATATYPE:["builtInCall"],BOUND:["builtInCall"],IRI:["builtInCall"],URI:["builtInCall"],BNODE:["builtInCall"],RAND:["builtInCall"],ABS:["builtInCall"],CEIL:["builtInCall"],FLOOR:["builtInCall"],ROUND:["builtInCall"],CONCAT:["builtInCall"],STRLEN:["builtInCall"],UCASE:["builtInCall"],LCASE:["builtInCall"],ENCODE_FOR_URI:["builtInCall"],CONTAINS:["builtInCall"],STRSTARTS:["builtInCall"],STRENDS:["builtInCall"],STRBEFORE:["builtInCall"],STRAFTER:["builtInCall"],YEAR:["builtInCall"],MONTH:["builtInCall"],DAY:["builtInCall"],HOURS:["builtInCall"],MINUTES:["builtInCall"],SECONDS:["builtInCall"],TIMEZONE:["builtInCall"],TZ:["builtInCall"],NOW:["builtInCall"],UUID:["builtInCall"],STRUUID:["builtInCall"],MD5:["builtInCall"],SHA1:["builtInCall"],SHA256:["builtInCall"],SHA384:["builtInCall"],SHA512:["builtInCall"],COALESCE:["builtInCall"],IF:["builtInCall"],STRLANG:["builtInCall"],STRDT:["builtInCall"],SAMETERM:["builtInCall"],ISIRI:["builtInCall"],ISURI:["builtInCall"],ISBLANK:["builtInCall"],ISLITERAL:["builtInCall"],ISNUMERIC:["builtInCall"],SUBSTR:["builtInCall"],REPLACE:["builtInCall"],REGEX:["builtInCall"],EXISTS:["builtInCall"],NOT:["builtInCall"],IRI_REF:["iriRefOrFunction"],PNAME_LN:["iriRefOrFunction"],PNAME_NS:["iriRefOrFunction"],STRING_LITERAL1:["rdfLiteral"],STRING_LITERAL2:["rdfLiteral"],STRING_LITERAL_LONG1:["rdfLiteral"],STRING_LITERAL_LONG2:["rdfLiteral"],INTEGER:["numericLiteral"],DECIMAL:["numericLiteral"],DOUBLE:["numericLiteral"],INTEGER_POSITIVE:["numericLiteral"],DECIMAL_POSITIVE:["numericLiteral"],DOUBLE_POSITIVE:["numericLiteral"],INTEGER_NEGATIVE:["numericLiteral"],DECIMAL_NEGATIVE:["numericLiteral"],DOUBLE_NEGATIVE:["numericLiteral"],TRUE:["booleanLiteral"],FALSE:["booleanLiteral"],VAR1:["var"],VAR2:["var"],COUNT:["aggregate"],SUM:["aggregate"],MIN:["aggregate"],MAX:["aggregate"],AVG:["aggregate"],SAMPLE:["aggregate"],GROUP_CONCAT:["aggregate"]},prologue:{PREFIX:["?baseDecl","*prefixDecl"],BASE:["?baseDecl","*prefixDecl"],$:["?baseDecl","*prefixDecl"],CONSTRUCT:["?baseDecl","*prefixDecl"],DESCRIBE:["?baseDecl","*prefixDecl"],ASK:["?baseDecl","*prefixDecl"],INSERT:["?baseDecl","*prefixDecl"],DELETE:["?baseDecl","*prefixDecl"],SELECT:["?baseDecl","*prefixDecl"],LOAD:["?baseDecl","*prefixDecl"],CLEAR:["?baseDecl","*prefixDecl"],DROP:["?baseDecl","*prefixDecl"],ADD:["?baseDecl","*prefixDecl"],MOVE:["?baseDecl","*prefixDecl"],COPY:["?baseDecl","*prefixDecl"],CREATE:["?baseDecl","*prefixDecl"],WITH:["?baseDecl","*prefixDecl"]},propertyList:{a:["propertyListNotEmpty"],VAR1:["propertyListNotEmpty"],VAR2:["propertyListNotEmpty"],IRI_REF:["propertyListNotEmpty"],PNAME_LN:["propertyListNotEmpty"],PNAME_NS:["propertyListNotEmpty"],".":[],"}":[],GRAPH:[]},propertyListNotEmpty:{a:["verb","objectList","*[;,?[verb,objectList]]"],VAR1:["verb","objectList","*[;,?[verb,objectList]]"],VAR2:["verb","objectList","*[;,?[verb,objectList]]"],IRI_REF:["verb","objectList","*[;,?[verb,objectList]]"],PNAME_LN:["verb","objectList","*[;,?[verb,objectList]]"],PNAME_NS:["verb","objectList","*[;,?[verb,objectList]]"]},propertyListPath:{a:["propertyListNotEmpty"],VAR1:["propertyListNotEmpty"],VAR2:["propertyListNotEmpty"],IRI_REF:["propertyListNotEmpty"],PNAME_LN:["propertyListNotEmpty"],PNAME_NS:["propertyListNotEmpty"],".":[],"{":[],OPTIONAL:[],MINUS:[],GRAPH:[],SERVICE:[],FILTER:[],BIND:[],VALUES:[],"}":[]},propertyListPathNotEmpty:{VAR1:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],VAR2:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],"^":["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],a:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],"!":["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],"(":["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],IRI_REF:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],PNAME_LN:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"],PNAME_NS:["or([verbPath,verbSimple])","objectListPath","*[;,?[or([verbPath,verbSimple]),objectList]]"]},quadData:{"{":["{","disallowVars","quads","allowVars","}"]},quadDataNoBnodes:{"{":["{","disallowBnodes","disallowVars","quads","allowVars","allowBnodes","}"]},quadPattern:{"{":["{","quads","}"]},quadPatternNoBnodes:{"{":["{","disallowBnodes","quads","allowBnodes","}"]},quads:{GRAPH:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],VAR1:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],VAR2:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],NIL:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],"(":["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],"[":["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],IRI_REF:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],TRUE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],FALSE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],BLANK_NODE_LABEL:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],ANON:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],PNAME_LN:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],PNAME_NS:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],STRING_LITERAL1:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],STRING_LITERAL2:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],STRING_LITERAL_LONG1:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],STRING_LITERAL_LONG2:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],INTEGER:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DECIMAL:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DOUBLE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],INTEGER_POSITIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DECIMAL_POSITIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DOUBLE_POSITIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],INTEGER_NEGATIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DECIMAL_NEGATIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],DOUBLE_NEGATIVE:["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"],"}":["?triplesTemplate","*[quadsNotTriples,?.,?triplesTemplate]"]},quadsNotTriples:{GRAPH:["GRAPH","varOrIRIref","{","?triplesTemplate","}"]},queryAll:{CONSTRUCT:["or([selectQuery,constructQuery,describeQuery,askQuery])","valuesClause"],DESCRIBE:["or([selectQuery,constructQuery,describeQuery,askQuery])","valuesClause"],ASK:["or([selectQuery,constructQuery,describeQuery,askQuery])","valuesClause"],SELECT:["or([selectQuery,constructQuery,describeQuery,askQuery])","valuesClause"]},rdfLiteral:{STRING_LITERAL1:["string","?or([LANGTAG,[^^,iriRef]])"],STRING_LITERAL2:["string","?or([LANGTAG,[^^,iriRef]])"],STRING_LITERAL_LONG1:["string","?or([LANGTAG,[^^,iriRef]])"],STRING_LITERAL_LONG2:["string","?or([LANGTAG,[^^,iriRef]])"]},regexExpression:{REGEX:["REGEX","(","expression",",","expression","?[,,expression]",")"]},relationalExpression:{"!":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"+":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"-":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],VAR1:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],VAR2:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],"(":["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STR:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],LANG:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],LANGMATCHES:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DATATYPE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],BOUND:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IRI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],URI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],BNODE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],RAND:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ABS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],CEIL:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],FLOOR:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ROUND:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],CONCAT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRLEN:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],UCASE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],LCASE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ENCODE_FOR_URI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],CONTAINS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRSTARTS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRENDS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRBEFORE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRAFTER:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],YEAR:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MONTH:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DAY:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],HOURS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MINUTES:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SECONDS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],TIMEZONE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],TZ:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],NOW:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],UUID:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRUUID:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MD5:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SHA1:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SHA256:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SHA384:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SHA512:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],COALESCE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IF:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRLANG:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRDT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SAMETERM:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISIRI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISURI:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISBLANK:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISLITERAL:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],ISNUMERIC:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],TRUE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],FALSE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],COUNT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SUM:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MIN:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],MAX:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],AVG:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SAMPLE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],GROUP_CONCAT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],SUBSTR:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],REPLACE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],REGEX:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],EXISTS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],NOT:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],IRI_REF:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRING_LITERAL1:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRING_LITERAL2:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRING_LITERAL_LONG1:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],STRING_LITERAL_LONG2:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],INTEGER:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DECIMAL:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DOUBLE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],INTEGER_POSITIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DECIMAL_POSITIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DOUBLE_POSITIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],INTEGER_NEGATIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DECIMAL_NEGATIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],DOUBLE_NEGATIVE:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],PNAME_LN:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"],PNAME_NS:["numericExpression","?or([[=,numericExpression],[!=,numericExpression],[<,numericExpression],[>,numericExpression],[<=,numericExpression],[>=,numericExpression],[IN,expressionList],[NOT,IN,expressionList]])"]},selectClause:{SELECT:["SELECT","?or([DISTINCT,REDUCED])","or([+or([var,[ (,expression,AS,var,)]]),*])"]},selectQuery:{SELECT:["selectClause","*datasetClause","whereClause","solutionModifier"]},serviceGraphPattern:{SERVICE:["SERVICE","?SILENT","varOrIRIref","groupGraphPattern"]},solutionModifier:{LIMIT:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],OFFSET:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],ORDER:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],HAVING:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],GROUP:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],VALUES:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],$:["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"],"}":["?groupClause","?havingClause","?orderClause","?limitOffsetClauses"]},sourceSelector:{IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"]},sparql11:{$:["prologue","or([queryAll,updateAll])","$"],CONSTRUCT:["prologue","or([queryAll,updateAll])","$"],DESCRIBE:["prologue","or([queryAll,updateAll])","$"],ASK:["prologue","or([queryAll,updateAll])","$"],INSERT:["prologue","or([queryAll,updateAll])","$"],DELETE:["prologue","or([queryAll,updateAll])","$"],SELECT:["prologue","or([queryAll,updateAll])","$"],LOAD:["prologue","or([queryAll,updateAll])","$"],CLEAR:["prologue","or([queryAll,updateAll])","$"],DROP:["prologue","or([queryAll,updateAll])","$"],ADD:["prologue","or([queryAll,updateAll])","$"],MOVE:["prologue","or([queryAll,updateAll])","$"],COPY:["prologue","or([queryAll,updateAll])","$"],CREATE:["prologue","or([queryAll,updateAll])","$"],WITH:["prologue","or([queryAll,updateAll])","$"],PREFIX:["prologue","or([queryAll,updateAll])","$"],BASE:["prologue","or([queryAll,updateAll])","$"]},storeProperty:{VAR1:[],VAR2:[],IRI_REF:[],PNAME_LN:[],PNAME_NS:[],a:[]},strReplaceExpression:{REPLACE:["REPLACE","(","expression",",","expression",",","expression","?[,,expression]",")"]},string:{STRING_LITERAL1:["STRING_LITERAL1"],STRING_LITERAL2:["STRING_LITERAL2"],STRING_LITERAL_LONG1:["STRING_LITERAL_LONG1"],STRING_LITERAL_LONG2:["STRING_LITERAL_LONG2"]},subSelect:{SELECT:["selectClause","whereClause","solutionModifier","valuesClause"]},substringExpression:{SUBSTR:["SUBSTR","(","expression",",","expression","?[,,expression]",")"]},triplesBlock:{VAR1:["triplesSameSubjectPath","?[.,?triplesBlock]"],VAR2:["triplesSameSubjectPath","?[.,?triplesBlock]"],NIL:["triplesSameSubjectPath","?[.,?triplesBlock]"],"(":["triplesSameSubjectPath","?[.,?triplesBlock]"],"[":["triplesSameSubjectPath","?[.,?triplesBlock]"],IRI_REF:["triplesSameSubjectPath","?[.,?triplesBlock]"],TRUE:["triplesSameSubjectPath","?[.,?triplesBlock]"],FALSE:["triplesSameSubjectPath","?[.,?triplesBlock]"],BLANK_NODE_LABEL:["triplesSameSubjectPath","?[.,?triplesBlock]"],ANON:["triplesSameSubjectPath","?[.,?triplesBlock]"],PNAME_LN:["triplesSameSubjectPath","?[.,?triplesBlock]"],PNAME_NS:["triplesSameSubjectPath","?[.,?triplesBlock]"],STRING_LITERAL1:["triplesSameSubjectPath","?[.,?triplesBlock]"],STRING_LITERAL2:["triplesSameSubjectPath","?[.,?triplesBlock]"],STRING_LITERAL_LONG1:["triplesSameSubjectPath","?[.,?triplesBlock]"],STRING_LITERAL_LONG2:["triplesSameSubjectPath","?[.,?triplesBlock]"],INTEGER:["triplesSameSubjectPath","?[.,?triplesBlock]"],DECIMAL:["triplesSameSubjectPath","?[.,?triplesBlock]"],DOUBLE:["triplesSameSubjectPath","?[.,?triplesBlock]"],INTEGER_POSITIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],DECIMAL_POSITIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],DOUBLE_POSITIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],INTEGER_NEGATIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],DECIMAL_NEGATIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"],DOUBLE_NEGATIVE:["triplesSameSubjectPath","?[.,?triplesBlock]"]},triplesNode:{"(":["collection"],"[":["blankNodePropertyList"]},triplesNodePath:{"(":["collectionPath"],"[":["blankNodePropertyListPath"]},triplesSameSubject:{VAR1:["varOrTerm","propertyListNotEmpty"],VAR2:["varOrTerm","propertyListNotEmpty"],NIL:["varOrTerm","propertyListNotEmpty"],IRI_REF:["varOrTerm","propertyListNotEmpty"],TRUE:["varOrTerm","propertyListNotEmpty"],FALSE:["varOrTerm","propertyListNotEmpty"],BLANK_NODE_LABEL:["varOrTerm","propertyListNotEmpty"],ANON:["varOrTerm","propertyListNotEmpty"],PNAME_LN:["varOrTerm","propertyListNotEmpty"],PNAME_NS:["varOrTerm","propertyListNotEmpty"],STRING_LITERAL1:["varOrTerm","propertyListNotEmpty"],STRING_LITERAL2:["varOrTerm","propertyListNotEmpty"],STRING_LITERAL_LONG1:["varOrTerm","propertyListNotEmpty"],STRING_LITERAL_LONG2:["varOrTerm","propertyListNotEmpty"],INTEGER:["varOrTerm","propertyListNotEmpty"],DECIMAL:["varOrTerm","propertyListNotEmpty"],DOUBLE:["varOrTerm","propertyListNotEmpty"],INTEGER_POSITIVE:["varOrTerm","propertyListNotEmpty"],DECIMAL_POSITIVE:["varOrTerm","propertyListNotEmpty"],DOUBLE_POSITIVE:["varOrTerm","propertyListNotEmpty"],INTEGER_NEGATIVE:["varOrTerm","propertyListNotEmpty"],DECIMAL_NEGATIVE:["varOrTerm","propertyListNotEmpty"],DOUBLE_NEGATIVE:["varOrTerm","propertyListNotEmpty"],"(":["triplesNode","propertyList"],"[":["triplesNode","propertyList"]},triplesSameSubjectPath:{VAR1:["varOrTerm","propertyListPathNotEmpty"],VAR2:["varOrTerm","propertyListPathNotEmpty"],NIL:["varOrTerm","propertyListPathNotEmpty"],IRI_REF:["varOrTerm","propertyListPathNotEmpty"],TRUE:["varOrTerm","propertyListPathNotEmpty"],FALSE:["varOrTerm","propertyListPathNotEmpty"],BLANK_NODE_LABEL:["varOrTerm","propertyListPathNotEmpty"],ANON:["varOrTerm","propertyListPathNotEmpty"],PNAME_LN:["varOrTerm","propertyListPathNotEmpty"],PNAME_NS:["varOrTerm","propertyListPathNotEmpty"],STRING_LITERAL1:["varOrTerm","propertyListPathNotEmpty"],STRING_LITERAL2:["varOrTerm","propertyListPathNotEmpty"],STRING_LITERAL_LONG1:["varOrTerm","propertyListPathNotEmpty"],STRING_LITERAL_LONG2:["varOrTerm","propertyListPathNotEmpty"],INTEGER:["varOrTerm","propertyListPathNotEmpty"],DECIMAL:["varOrTerm","propertyListPathNotEmpty"],DOUBLE:["varOrTerm","propertyListPathNotEmpty"],INTEGER_POSITIVE:["varOrTerm","propertyListPathNotEmpty"],DECIMAL_POSITIVE:["varOrTerm","propertyListPathNotEmpty"],DOUBLE_POSITIVE:["varOrTerm","propertyListPathNotEmpty"],INTEGER_NEGATIVE:["varOrTerm","propertyListPathNotEmpty"],DECIMAL_NEGATIVE:["varOrTerm","propertyListPathNotEmpty"],DOUBLE_NEGATIVE:["varOrTerm","propertyListPathNotEmpty"],"(":["triplesNodePath","propertyListPath"],"[":["triplesNodePath","propertyListPath"]},triplesTemplate:{VAR1:["triplesSameSubject","?[.,?triplesTemplate]"],VAR2:["triplesSameSubject","?[.,?triplesTemplate]"],NIL:["triplesSameSubject","?[.,?triplesTemplate]"],"(":["triplesSameSubject","?[.,?triplesTemplate]"],"[":["triplesSameSubject","?[.,?triplesTemplate]"],IRI_REF:["triplesSameSubject","?[.,?triplesTemplate]"],TRUE:["triplesSameSubject","?[.,?triplesTemplate]"],FALSE:["triplesSameSubject","?[.,?triplesTemplate]"],BLANK_NODE_LABEL:["triplesSameSubject","?[.,?triplesTemplate]"],ANON:["triplesSameSubject","?[.,?triplesTemplate]"],PNAME_LN:["triplesSameSubject","?[.,?triplesTemplate]"],PNAME_NS:["triplesSameSubject","?[.,?triplesTemplate]"],STRING_LITERAL1:["triplesSameSubject","?[.,?triplesTemplate]"],STRING_LITERAL2:["triplesSameSubject","?[.,?triplesTemplate]"],STRING_LITERAL_LONG1:["triplesSameSubject","?[.,?triplesTemplate]"],STRING_LITERAL_LONG2:["triplesSameSubject","?[.,?triplesTemplate]"],INTEGER:["triplesSameSubject","?[.,?triplesTemplate]"],DECIMAL:["triplesSameSubject","?[.,?triplesTemplate]"],DOUBLE:["triplesSameSubject","?[.,?triplesTemplate]"],INTEGER_POSITIVE:["triplesSameSubject","?[.,?triplesTemplate]"],DECIMAL_POSITIVE:["triplesSameSubject","?[.,?triplesTemplate]"],DOUBLE_POSITIVE:["triplesSameSubject","?[.,?triplesTemplate]"],INTEGER_NEGATIVE:["triplesSameSubject","?[.,?triplesTemplate]"],DECIMAL_NEGATIVE:["triplesSameSubject","?[.,?triplesTemplate]"],DOUBLE_NEGATIVE:["triplesSameSubject","?[.,?triplesTemplate]"]},unaryExpression:{"!":["!","primaryExpression"],"+":["+","primaryExpression"],"-":["-","primaryExpression"],VAR1:["primaryExpression"],VAR2:["primaryExpression"],"(":["primaryExpression"],STR:["primaryExpression"],LANG:["primaryExpression"],LANGMATCHES:["primaryExpression"],DATATYPE:["primaryExpression"],BOUND:["primaryExpression"],IRI:["primaryExpression"],URI:["primaryExpression"],BNODE:["primaryExpression"],RAND:["primaryExpression"],ABS:["primaryExpression"],CEIL:["primaryExpression"],FLOOR:["primaryExpression"],ROUND:["primaryExpression"],CONCAT:["primaryExpression"],STRLEN:["primaryExpression"],UCASE:["primaryExpression"],LCASE:["primaryExpression"],ENCODE_FOR_URI:["primaryExpression"],CONTAINS:["primaryExpression"],STRSTARTS:["primaryExpression"],STRENDS:["primaryExpression"],STRBEFORE:["primaryExpression"],STRAFTER:["primaryExpression"],YEAR:["primaryExpression"],MONTH:["primaryExpression"],DAY:["primaryExpression"],HOURS:["primaryExpression"],MINUTES:["primaryExpression"],SECONDS:["primaryExpression"],TIMEZONE:["primaryExpression"],TZ:["primaryExpression"],NOW:["primaryExpression"],UUID:["primaryExpression"],STRUUID:["primaryExpression"],MD5:["primaryExpression"],SHA1:["primaryExpression"],SHA256:["primaryExpression"],SHA384:["primaryExpression"],SHA512:["primaryExpression"],COALESCE:["primaryExpression"],IF:["primaryExpression"],STRLANG:["primaryExpression"],STRDT:["primaryExpression"],SAMETERM:["primaryExpression"],ISIRI:["primaryExpression"],ISURI:["primaryExpression"],ISBLANK:["primaryExpression"],ISLITERAL:["primaryExpression"],ISNUMERIC:["primaryExpression"],TRUE:["primaryExpression"],FALSE:["primaryExpression"],COUNT:["primaryExpression"],SUM:["primaryExpression"],MIN:["primaryExpression"],MAX:["primaryExpression"],AVG:["primaryExpression"],SAMPLE:["primaryExpression"],GROUP_CONCAT:["primaryExpression"],SUBSTR:["primaryExpression"],REPLACE:["primaryExpression"],REGEX:["primaryExpression"],EXISTS:["primaryExpression"],NOT:["primaryExpression"],IRI_REF:["primaryExpression"],STRING_LITERAL1:["primaryExpression"],STRING_LITERAL2:["primaryExpression"],STRING_LITERAL_LONG1:["primaryExpression"],STRING_LITERAL_LONG2:["primaryExpression"],INTEGER:["primaryExpression"],DECIMAL:["primaryExpression"],DOUBLE:["primaryExpression"],INTEGER_POSITIVE:["primaryExpression"],DECIMAL_POSITIVE:["primaryExpression"],DOUBLE_POSITIVE:["primaryExpression"],INTEGER_NEGATIVE:["primaryExpression"],DECIMAL_NEGATIVE:["primaryExpression"],DOUBLE_NEGATIVE:["primaryExpression"],PNAME_LN:["primaryExpression"],PNAME_NS:["primaryExpression"]},update:{INSERT:["prologue","?[update1,?[;,update]]"],DELETE:["prologue","?[update1,?[;,update]]"],LOAD:["prologue","?[update1,?[;,update]]"],CLEAR:["prologue","?[update1,?[;,update]]"],DROP:["prologue","?[update1,?[;,update]]"],ADD:["prologue","?[update1,?[;,update]]"],MOVE:["prologue","?[update1,?[;,update]]"],COPY:["prologue","?[update1,?[;,update]]"],CREATE:["prologue","?[update1,?[;,update]]"],WITH:["prologue","?[update1,?[;,update]]"],PREFIX:["prologue","?[update1,?[;,update]]"],BASE:["prologue","?[update1,?[;,update]]"],$:["prologue","?[update1,?[;,update]]"]},update1:{LOAD:["load"],CLEAR:["clear"],DROP:["drop"],ADD:["add"],MOVE:["move"],COPY:["copy"],CREATE:["create"],INSERT:["INSERT","insert1"],DELETE:["DELETE","delete1"],WITH:["modify"]},updateAll:{INSERT:["?[update1,?[;,update]]"],DELETE:["?[update1,?[;,update]]"],LOAD:["?[update1,?[;,update]]"],CLEAR:["?[update1,?[;,update]]"],DROP:["?[update1,?[;,update]]"],ADD:["?[update1,?[;,update]]"],MOVE:["?[update1,?[;,update]]"],COPY:["?[update1,?[;,update]]"],CREATE:["?[update1,?[;,update]]"],WITH:["?[update1,?[;,update]]"],$:["?[update1,?[;,update]]"]},usingClause:{USING:["USING","or([iriRef,[NAMED,iriRef]])"]},valueLogical:{"!":["relationalExpression"],"+":["relationalExpression"],"-":["relationalExpression"],VAR1:["relationalExpression"],VAR2:["relationalExpression"],"(":["relationalExpression"],STR:["relationalExpression"],LANG:["relationalExpression"],LANGMATCHES:["relationalExpression"],DATATYPE:["relationalExpression"],BOUND:["relationalExpression"],IRI:["relationalExpression"],URI:["relationalExpression"],BNODE:["relationalExpression"],RAND:["relationalExpression"],ABS:["relationalExpression"],CEIL:["relationalExpression"],FLOOR:["relationalExpression"],ROUND:["relationalExpression"],CONCAT:["relationalExpression"],STRLEN:["relationalExpression"],UCASE:["relationalExpression"],LCASE:["relationalExpression"],ENCODE_FOR_URI:["relationalExpression"],CONTAINS:["relationalExpression"],STRSTARTS:["relationalExpression"],STRENDS:["relationalExpression"],STRBEFORE:["relationalExpression"],STRAFTER:["relationalExpression"],YEAR:["relationalExpression"],MONTH:["relationalExpression"],DAY:["relationalExpression"],HOURS:["relationalExpression"],MINUTES:["relationalExpression"],SECONDS:["relationalExpression"],TIMEZONE:["relationalExpression"],TZ:["relationalExpression"],NOW:["relationalExpression"],UUID:["relationalExpression"],STRUUID:["relationalExpression"],MD5:["relationalExpression"],SHA1:["relationalExpression"],SHA256:["relationalExpression"],SHA384:["relationalExpression"],SHA512:["relationalExpression"],COALESCE:["relationalExpression"],IF:["relationalExpression"],STRLANG:["relationalExpression"],STRDT:["relationalExpression"],SAMETERM:["relationalExpression"],ISIRI:["relationalExpression"],ISURI:["relationalExpression"],ISBLANK:["relationalExpression"],ISLITERAL:["relationalExpression"],ISNUMERIC:["relationalExpression"],TRUE:["relationalExpression"],FALSE:["relationalExpression"],COUNT:["relationalExpression"],SUM:["relationalExpression"],MIN:["relationalExpression"],MAX:["relationalExpression"],AVG:["relationalExpression"],SAMPLE:["relationalExpression"],GROUP_CONCAT:["relationalExpression"],SUBSTR:["relationalExpression"],REPLACE:["relationalExpression"],REGEX:["relationalExpression"],EXISTS:["relationalExpression"],NOT:["relationalExpression"],IRI_REF:["relationalExpression"],STRING_LITERAL1:["relationalExpression"],STRING_LITERAL2:["relationalExpression"],STRING_LITERAL_LONG1:["relationalExpression"],STRING_LITERAL_LONG2:["relationalExpression"],INTEGER:["relationalExpression"],DECIMAL:["relationalExpression"],DOUBLE:["relationalExpression"],INTEGER_POSITIVE:["relationalExpression"],DECIMAL_POSITIVE:["relationalExpression"],DOUBLE_POSITIVE:["relationalExpression"],INTEGER_NEGATIVE:["relationalExpression"],DECIMAL_NEGATIVE:["relationalExpression"],DOUBLE_NEGATIVE:["relationalExpression"],PNAME_LN:["relationalExpression"],PNAME_NS:["relationalExpression"]},valuesClause:{VALUES:["VALUES","dataBlock"],$:[],"}":[]},"var":{VAR1:["VAR1"],VAR2:["VAR2"]},varOrIRIref:{VAR1:["var"],VAR2:["var"],IRI_REF:["iriRef"],PNAME_LN:["iriRef"],PNAME_NS:["iriRef"]},varOrTerm:{VAR1:["var"],VAR2:["var"],NIL:["graphTerm"],IRI_REF:["graphTerm"],TRUE:["graphTerm"],FALSE:["graphTerm"],BLANK_NODE_LABEL:["graphTerm"],ANON:["graphTerm"],PNAME_LN:["graphTerm"],PNAME_NS:["graphTerm"],STRING_LITERAL1:["graphTerm"],STRING_LITERAL2:["graphTerm"],STRING_LITERAL_LONG1:["graphTerm"],STRING_LITERAL_LONG2:["graphTerm"],INTEGER:["graphTerm"],DECIMAL:["graphTerm"],DOUBLE:["graphTerm"],INTEGER_POSITIVE:["graphTerm"],DECIMAL_POSITIVE:["graphTerm"],DOUBLE_POSITIVE:["graphTerm"],INTEGER_NEGATIVE:["graphTerm"],DECIMAL_NEGATIVE:["graphTerm"],DOUBLE_NEGATIVE:["graphTerm"]},verb:{VAR1:["storeProperty","varOrIRIref"],VAR2:["storeProperty","varOrIRIref"],IRI_REF:["storeProperty","varOrIRIref"],PNAME_LN:["storeProperty","varOrIRIref"],PNAME_NS:["storeProperty","varOrIRIref"],a:["storeProperty","a"]},verbPath:{"^":["path"],a:["path"],"!":["path"],"(":["path"],IRI_REF:["path"],PNAME_LN:["path"],PNAME_NS:["path"]},verbSimple:{VAR1:["var"],VAR2:["var"]},whereClause:{"{":["?WHERE","groupGraphPattern"],WHERE:["?WHERE","groupGraphPattern"]}}),s=/^(GROUP_CONCAT|DATATYPE|BASE|PREFIX|SELECT|CONSTRUCT|DESCRIBE|ASK|FROM|NAMED|ORDER|BY|LIMIT|ASC|DESC|OFFSET|DISTINCT|REDUCED|WHERE|GRAPH|OPTIONAL|UNION|FILTER|GROUP|HAVING|AS|VALUES|LOAD|CLEAR|DROP|CREATE|MOVE|COPY|SILENT|INSERT|DELETE|DATA|WITH|TO|USING|NAMED|MINUS|BIND|LANGMATCHES|LANG|BOUND|SAMETERM|ISIRI|ISURI|ISBLANK|ISLITERAL|REGEX|TRUE|FALSE|UNDEF|ADD|DEFAULT|ALL|SERVICE|INTO|IN|NOT|IRI|URI|BNODE|RAND|ABS|CEIL|FLOOR|ROUND|CONCAT|STRLEN|UCASE|LCASE|ENCODE_FOR_URI|CONTAINS|STRSTARTS|STRENDS|STRBEFORE|STRAFTER|YEAR|MONTH|DAY|HOURS|MINUTES|SECONDS|TIMEZONE|TZ|NOW|UUID|STRUUID|MD5|SHA1|SHA256|SHA384|SHA512|COALESCE|IF|STRLANG|STRDT|ISNUMERIC|SUBSTR|REPLACE|EXISTS|COUNT|SUM|MIN|MAX|AVG|SAMPLE|SEPARATOR|STR)/i,a=/^(\*|a|\.|\{|\}|,|\(|\)|;|\[|\]|\|\||&&|=|!=|!|<=|>=|<|>|\+|-|\/|\^\^|\?|\||\^)/,l=null,u="sparql11",p="sparql11",c=!0,d=t(),f=d.terminal,h={"*[,, object]":3,"*[(,),object]":3,"*[(,),objectPath]":3,"*[/,pathEltOrInverse]":2,object:2,objectPath:2,objectList:2,objectListPath:2,storeProperty:2,pathMod:2,"?pathMod":2,propertyListNotEmpty:1,propertyList:1,propertyListPath:1,propertyListPathNotEmpty:1,"?[verb,objectList]":1,"?[or([verbPath, verbSimple]),objectList]":1},g={"}":1,"]":0,")":1,"{":-1,"(":-1,"*[;,?[or([verbPath,verbSimple]),objectList]]":1}; return{token:r,startState:function(){return{tokenize:r,OK:!0,complete:c,errorStartPos:null,errorEndPos:null,queryType:l,possibleCurrent:n(p),possibleNext:n(p),allowVars:!0,allowBnodes:!0,storeProperty:!1,lastProperty:"",stack:[p]}},indent:i,electricChars:"}])"}});e.defineMIME("application/x-sparql-query","sparql11")})},{codemirror:void 0}],14:[function(e,t){var n=t.exports=function(){this.words=0;this.prefixes=0;this.children=[]};n.prototype={insert:function(e,t){if(0!=e.length){var r,i,o=this;void 0===t&&(t=0);if(t!==e.length){o.prefixes++;r=e[t];void 0===o.children[r]&&(o.children[r]=new n);i=o.children[r];i.insert(e,t+1)}else o.words++}},remove:function(e,t){if(0!=e.length){var n,r,i=this;void 0===t&&(t=0);if(void 0!==i)if(t!==e.length){i.prefixes--;n=e[t];r=i.children[n];r.remove(e,t+1)}else i.words--}},update:function(e,t){if(0!=e.length&&0!=t.length){this.remove(e);this.insert(t)}},countWord:function(e,t){if(0==e.length)return 0;var n,r,i=this,o=0;void 0===t&&(t=0);if(t===e.length)return i.words;n=e[t];r=i.children[n];void 0!==r&&(o=r.countWord(e,t+1));return o},countPrefix:function(e,t){if(0==e.length)return 0;var n,r,i=this,o=0;void 0===t&&(t=0);if(t===e.length)return i.prefixes;var n=e[t];r=i.children[n];void 0!==r&&(o=r.countPrefix(e,t+1));return o},find:function(e){return 0==e.length?!1:this.countWord(e)>0?!0:!1},getAllWords:function(e){var t,n,r=this,i=[];void 0===e&&(e="");if(void 0===r)return[];r.words>0&&i.push(e);for(t in r.children){n=r.children[t];i=i.concat(n.getAllWords(e+t))}return i},autoComplete:function(e,t){var n,r,i=this;if(0==e.length)return void 0===t?i.getAllWords(e):[];void 0===t&&(t=0);n=e[t];r=i.children[n];return void 0===r?[]:t===e.length-1?r.getAllWords(e):r.autoComplete(e,t+1)}}},{}],15:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(function(){try{return t("codemirror")}catch(e){return window.CodeMirror}}()):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";function t(e){var t=e.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height};t.style.width="";t.style.height="auto";t.className+=" CodeMirror-fullscreen";document.documentElement.style.overflow="hidden";e.refresh()}function n(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,"");document.documentElement.style.overflow="";var n=e.state.fullScreenRestore;t.style.width=n.width;t.style.height=n.height;window.scrollTo(n.scrollLeft,n.scrollTop);e.refresh()}e.defineOption("fullScreen",!1,function(r,i,o){o==e.Init&&(o=!1);!o!=!i&&(i?t(r):n(r))})})},{codemirror:void 0}],16:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(function(){try{return t("codemirror")}catch(e){return window.CodeMirror}}()):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){function t(e,t,r,i){var o=e.getLineHandle(t.line),l=t.ch-1,u=l>=0&&a[o.text.charAt(l)]||a[o.text.charAt(++l)];if(!u)return null;var p=">"==u.charAt(1)?1:-1;if(r&&p>0!=(l==t.ch))return null;var c=e.getTokenTypeAt(s(t.line,l+1)),d=n(e,s(t.line,l+(p>0?1:0)),p,c||null,i);return null==d?null:{from:s(t.line,l),to:d&&d.pos,match:d&&d.ch==u.charAt(0),forward:p>0}}function n(e,t,n,r,i){for(var o=i&&i.maxScanLineLength||1e4,l=i&&i.maxScanLines||1e3,u=[],p=i&&i.bracketRegex?i.bracketRegex:/[(){}[\]]/,c=n>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),d=t.line;d!=c;d+=n){var f=e.getLine(d);if(f){var h=n>0?0:f.length-1,g=n>0?f.length:-1;if(!(f.length>o)){d==t.line&&(h=t.ch-(0>n?1:0));for(;h!=g;h+=n){var m=f.charAt(h);if(p.test(m)&&(void 0===r||e.getTokenTypeAt(s(d,h+1))==r)){var E=a[m];if(">"==E.charAt(1)==n>0)u.push(m);else{if(!u.length)return{pos:s(d,h),ch:m};u.pop()}}}}}}return d-n==(n>0?e.lastLine():e.firstLine())?!1:null}function r(e,n,r){for(var i=e.state.matchBrackets.maxHighlightLineLength||1e3,a=[],l=e.listSelections(),u=0;u<l.length;u++){var p=l[u].empty()&&t(e,l[u].head,!1,r);if(p&&e.getLine(p.from.line).length<=i){var c=p.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";a.push(e.markText(p.from,s(p.from.line,p.from.ch+1),{className:c}));p.to&&e.getLine(p.to.line).length<=i&&a.push(e.markText(p.to,s(p.to.line,p.to.ch+1),{className:c}))}}if(a.length){o&&e.state.focused&&e.display.input.focus();var d=function(){e.operation(function(){for(var e=0;e<a.length;e++)a[e].clear()})};if(!n)return d;setTimeout(d,800)}}function i(e){e.operation(function(){if(l){l();l=null}l=r(e,!1,e.state.matchBrackets)})}var o=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),s=e.Pos,a={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},l=null;e.defineOption("matchBrackets",!1,function(t,n,r){r&&r!=e.Init&&t.off("cursorActivity",i);if(n){t.state.matchBrackets="object"==typeof n?n:{};t.on("cursorActivity",i)}});e.defineExtension("matchBrackets",function(){r(this,!0)});e.defineExtension("findMatchingBracket",function(e,n,r){return t(this,e,n,r)});e.defineExtension("scanForBracket",function(e,t,r,i){return n(this,e,t,r,i)})})},{codemirror:void 0}],17:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(function(){try{return t("codemirror")}catch(e){return window.CodeMirror}}()):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";e.registerHelper("fold","brace",function(t,n){function r(r){for(var i=n.ch,l=0;;){var u=0>=i?-1:a.lastIndexOf(r,i-1);if(-1!=u){if(1==l&&u<n.ch)break;o=t.getTokenTypeAt(e.Pos(s,u+1));if(!/^(comment|string)/.test(o))return u+1;i=u-1}else{if(1==l)break;l=1;i=a.length}}}var i,o,s=n.line,a=t.getLine(s),l="{",u="}",i=r("{");if(null==i){l="[",u="]";i=r("[")}if(null!=i){var p,c,d=1,f=t.lastLine();e:for(var h=s;f>=h;++h)for(var g=t.getLine(h),m=h==s?i:0;;){var E=g.indexOf(l,m),v=g.indexOf(u,m);0>E&&(E=g.length);0>v&&(v=g.length);m=Math.min(E,v);if(m==g.length)break;if(t.getTokenTypeAt(e.Pos(h,m+1))==o)if(m==E)++d;else if(!--d){p=h;c=m;break e}++m}if(null!=p&&(s!=p||c!=i))return{from:e.Pos(s,i),to:e.Pos(p,c)}}});e.registerHelper("fold","import",function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1)));if("keyword"!=r.type||"import"!=r.string)return null;for(var i=n,o=Math.min(t.lastLine(),n+10);o>=i;++i){var s=t.getLine(i),a=s.indexOf(";");if(-1!=a)return{startCh:r.end,end:e.Pos(i,a)}}}var i,n=n.line,o=r(n);if(!o||r(n-1)||(i=r(n-2))&&i.end.line==n-1)return null;for(var s=o.end;;){var a=r(s.line+1);if(null==a)break;s=a.end}return{from:t.clipPos(e.Pos(n,o.startCh+1)),to:s}});e.registerHelper("fold","include",function(t,n){function r(n){if(n<t.firstLine()||n>t.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1)));return"meta"==r.type&&"#include"==r.string.slice(0,8)?r.start+8:void 0}var n=n.line,i=r(n);if(null==i||null!=r(n-1))return null;for(var o=n;;){var s=r(o+1);if(null==s)break;++o}return{from:e.Pos(n,i+1),to:t.clipPos(e.Pos(o))}})})},{codemirror:void 0}],18:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(function(){try{return t("codemirror")}catch(e){return window.CodeMirror}}()):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";function t(t,i,o,s){function a(e){var n=l(t,i);if(!n||n.to.line-n.from.line<u)return null;for(var r=t.findMarksAt(n.from),o=0;o<r.length;++o)if(r[o].__isFold&&"fold"!==s){if(!e)return null;n.cleared=!0;r[o].clear()}return n}if(o&&o.call){var l=o;o=null}else var l=r(t,o,"rangeFinder");"number"==typeof i&&(i=e.Pos(i,0));var u=r(t,o,"minFoldSize"),p=a(!0);if(r(t,o,"scanUp"))for(;!p&&i.line>t.firstLine();){i=e.Pos(i.line-1,0);p=a(!1)}if(p&&!p.cleared&&"unfold"!==s){var c=n(t,o);e.on(c,"mousedown",function(t){d.clear();e.e_preventDefault(t)});var d=t.markText(p.from,p.to,{replacedWith:c,clearOnEnter:!0,__isFold:!0});d.on("clear",function(n,r){e.signal(t,"unfold",t,n,r)});e.signal(t,"fold",t,p.from,p.to)}}function n(e,t){var n=r(e,t,"widget");if("string"==typeof n){var i=document.createTextNode(n);n=document.createElement("span");n.appendChild(i);n.className="CodeMirror-foldmarker"}return n}function r(e,t,n){if(t&&void 0!==t[n])return t[n];var r=e.options.foldOptions;return r&&void 0!==r[n]?r[n]:i[n]}e.newFoldFunction=function(e,n){return function(r,i){t(r,i,{rangeFinder:e,widget:n})}};e.defineExtension("foldCode",function(e,n,r){t(this,e,n,r)});e.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n<t.length;++n)if(t[n].__isFold)return!0});e.commands.toggleFold=function(e){e.foldCode(e.getCursor())};e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")};e.commands.unfold=function(e){e.foldCode(e.getCursor(),null,"unfold")};e.commands.foldAll=function(t){t.operation(function(){for(var n=t.firstLine(),r=t.lastLine();r>=n;n++)t.foldCode(e.Pos(n,0),null,"fold")})};e.commands.unfoldAll=function(t){t.operation(function(){for(var n=t.firstLine(),r=t.lastLine();r>=n;n++)t.foldCode(e.Pos(n,0),null,"unfold")})};e.registerHelper("fold","combine",function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var r=0;r<e.length;++r){var i=e[r](t,n);if(i)return i}}});e.registerHelper("fold","auto",function(e,t){for(var n=e.getHelpers(t,"fold"),r=0;r<n.length;r++){var i=n[r](e,t);if(i)return i}});var i={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1};e.defineOption("foldOptions",null)})},{codemirror:void 0}],19:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(function(){try{return t("codemirror")}catch(e){return window.CodeMirror}}(),t("./foldcode")):"function"==typeof e&&e.amd?e(["../../lib/codemirror","./foldcode"],i):i(CodeMirror)})(function(e){"use strict";function t(e){this.options=e;this.from=this.to=0}function n(e){e===!0&&(e={});null==e.gutter&&(e.gutter="CodeMirror-foldgutter");null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open");null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded");return e}function r(e,t){for(var n=e.findMarksAt(c(t)),r=0;r<n.length;++r)if(n[r].__isFold&&n[r].find().from.line==t)return!0}function i(e){if("string"==typeof e){var t=document.createElement("div");t.className=e+" CodeMirror-guttermarker-subtle";return t}return e.cloneNode(!0)}function o(t,n,o){var s=t.state.foldGutter.options,a=n;t.eachLine(n,o,function(n){var o=null;if(r(t,a))o=i(s.indicatorFolded);else{var l=c(a,0),u=s.rangeFinder||e.fold.auto,p=u&&u(t,l);p&&p.from.line+1<p.to.line&&(o=i(s.indicatorOpen))}t.setGutterMarker(n,s.gutter,o);++a})}function s(e){var t=e.getViewport(),n=e.state.foldGutter;if(n){e.operation(function(){o(e,t.from,t.to)});n.from=t.from;n.to=t.to}}function a(e,t,n){var r=e.state.foldGutter.options;n==r.gutter&&e.foldCode(c(t,0),r.rangeFinder)}function l(e){var t=e.state.foldGutter,n=e.state.foldGutter.options;t.from=t.to=0;clearTimeout(t.changeUpdate);t.changeUpdate=setTimeout(function(){s(e)},n.foldOnChangeTimeSpan||600)}function u(e){var t=e.state.foldGutter,n=e.state.foldGutter.options;clearTimeout(t.changeUpdate);t.changeUpdate=setTimeout(function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?s(e):e.operation(function(){if(n.from<t.from){o(e,n.from,t.from);t.from=n.from}if(n.to>t.to){o(e,t.to,n.to);t.to=n.to}})},n.updateViewportTimeSpan||400)}function p(e,t){var n=e.state.foldGutter,r=t.line;r>=n.from&&r<n.to&&o(e,r,r+1)}e.defineOption("foldGutter",!1,function(r,i,o){if(o&&o!=e.Init){r.clearGutter(r.state.foldGutter.options.gutter);r.state.foldGutter=null;r.off("gutterClick",a);r.off("change",l);r.off("viewportChange",u);r.off("fold",p);r.off("unfold",p);r.off("swapDoc",s)}if(i){r.state.foldGutter=new t(n(i));s(r);r.on("gutterClick",a);r.on("change",l);r.on("viewportChange",u);r.on("fold",p);r.on("unfold",p);r.on("swapDoc",s)}});var c=e.Pos})},{"./foldcode":18,codemirror:void 0}],20:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(function(){try{return t("codemirror")}catch(e){return window.CodeMirror}}()):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";function t(e,t){return e.line-t.line||e.ch-t.ch}function n(e,t,n,r){this.line=t;this.ch=n;this.cm=e;this.text=e.getLine(t);this.min=r?r.from:e.firstLine();this.max=r?r.to-1:e.lastLine()}function r(e,t){var n=e.cm.getTokenTypeAt(d(e.line,t));return n&&/\btag\b/.test(n)}function i(e){if(!(e.line>=e.max)){e.ch=0;e.text=e.cm.getLine(++e.line);return!0}}function o(e){if(!(e.line<=e.min)){e.text=e.cm.getLine(--e.line);e.ch=e.text.length;return!0}}function s(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(i(e))continue;return}if(r(e,t+1)){var n=e.text.lastIndexOf("/",t),o=n>-1&&!/\S/.test(e.text.slice(n+1,t));e.ch=t+1;return o?"selfClose":"regular"}e.ch=t+1}}function a(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(o(e))continue;return}if(r(e,t+1)){g.lastIndex=t;e.ch=t;var n=g.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function l(e){for(;;){g.lastIndex=e.ch;var t=g.exec(e.text);if(!t){if(i(e))continue;return}if(r(e,t.index+1)){e.ch=t.index+t[0].length;return t}e.ch=t.index+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(o(e))continue;return}if(r(e,t+1)){var n=e.text.lastIndexOf("/",t),i=n>-1&&!/\S/.test(e.text.slice(n+1,t));e.ch=t+1;return i?"selfClose":"regular"}e.ch=t}}function p(e,t){for(var n=[];;){var r,i=l(e),o=e.line,a=e.ch-(i?i[0].length:0);if(!i||!(r=s(e)))return;if("selfClose"!=r)if(i[1]){for(var u=n.length-1;u>=0;--u)if(n[u]==i[2]){n.length=u;break}if(0>u&&(!t||t==i[2]))return{tag:i[2],from:d(o,a),to:d(e.line,e.ch)}}else n.push(i[2])}}function c(e,t){for(var n=[];;){var r=u(e);if(!r)return;if("selfClose"!=r){var i=e.line,o=e.ch,s=a(e);if(!s)return;if(s[1])n.push(s[2]);else{for(var l=n.length-1;l>=0;--l)if(n[l]==s[2]){n.length=l;break}if(0>l&&(!t||t==s[2]))return{tag:s[2],from:d(e.line,e.ch),to:d(i,o)}}}else a(e)}}var d=e.Pos,f="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",h=f+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",g=new RegExp("<(/?)(["+f+"]["+h+"]*)","g");e.registerHelper("fold","xml",function(e,t){for(var r=new n(e,t.line,0);;){var i,o=l(r);if(!o||r.line!=t.line||!(i=s(r)))return;if(!o[1]&&"selfClose"!=i){var t=d(r.line,r.ch),a=p(r,o[2]);return a&&{from:t,to:a.from}}}});e.findMatchingTag=function(e,r,i){var o=new n(e,r.line,r.ch,i);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var l=s(o),u=l&&d(o.line,o.ch),f=l&&a(o);if(l&&f&&!(t(o,r)>0)){var h={from:d(o.line,o.ch),to:u,tag:f[2]};if("selfClose"==l)return{open:h,close:null,at:"open"};if(f[1])return{open:c(o,f[2]),close:h,at:"close"};o=new n(e,u.line,u.ch,i);return{open:h,close:p(o,f[2]),at:"open"}}}};e.findEnclosingTag=function(e,t,r){for(var i=new n(e,t.line,t.ch,r);;){var o=c(i);if(!o)break;var s=new n(e,t.line,t.ch,r),a=p(s,o.tag);if(a)return{open:o,close:a}}};e.scanForClosingTag=function(e,t,r,i){var o=new n(e,t.line,t.ch,i?{from:0,to:i}:null);return p(o,r)}})},{codemirror:void 0}],21:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(function(){try{return t("codemirror")}catch(e){return window.CodeMirror}}()):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";function t(e,t){this.cm=e;this.options=this.buildOptions(t);this.widget=this.onClose=null}function n(e){return"string"==typeof e?e:e.text}function r(e,t){function n(e,n){var i;i="string"!=typeof n?function(e){return n(e,t)}:r.hasOwnProperty(n)?r[n]:n;o[e]=i}var r={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(-t.menuSize()+1,!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close},i=e.options.customKeys,o=i?{}:r;if(i)for(var s in i)i.hasOwnProperty(s)&&n(s,i[s]);var a=e.options.extraKeys;if(a)for(var s in a)a.hasOwnProperty(s)&&n(s,a[s]);return o}function i(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function o(t,o){this.completion=t;this.data=o;var l=this,u=t.cm,p=this.hints=document.createElement("ul");p.className="CodeMirror-hints";this.selectedHint=o.selectedHint||0;for(var c=o.list,d=0;d<c.length;++d){var f=p.appendChild(document.createElement("li")),h=c[d],g=s+(d!=this.selectedHint?"":" "+a);null!=h.className&&(g=h.className+" "+g);f.className=g;h.render?h.render(f,o,h):f.appendChild(document.createTextNode(h.displayText||n(h)));f.hintId=d}var m=u.cursorCoords(t.options.alignWithWord?o.from:null),E=m.left,v=m.bottom,x=!0;p.style.left=E+"px";p.style.top=v+"px";var y=window.innerWidth||Math.max(document.body.offsetWidth,document.documentElement.offsetWidth),N=window.innerHeight||Math.max(document.body.offsetHeight,document.documentElement.offsetHeight);(t.options.container||document.body).appendChild(p);var I=p.getBoundingClientRect(),A=I.bottom-N;if(A>0){var T=I.bottom-I.top,L=m.top-(m.bottom-I.top);if(L-T>0){p.style.top=(v=m.top-T)+"px";x=!1}else if(T>N){p.style.height=N-5+"px";p.style.top=(v=m.bottom-I.top)+"px";var S=u.getCursor();if(o.from.ch!=S.ch){m=u.cursorCoords(S);p.style.left=(E=m.left)+"px";I=p.getBoundingClientRect()}}}var C=I.right-y;if(C>0){if(I.right-I.left>y){p.style.width=y-5+"px";C-=I.right-I.left-y}p.style.left=(E=m.left-C)+"px"}u.addKeyMap(this.keyMap=r(t,{moveFocus:function(e,t){l.changeActive(l.selectedHint+e,t)},setFocus:function(e){l.changeActive(e)},menuSize:function(){return l.screenAmount()},length:c.length,close:function(){t.close()},pick:function(){l.pick()},data:o}));if(t.options.closeOnUnfocus){var b;u.on("blur",this.onBlur=function(){b=setTimeout(function(){t.close()},100)});u.on("focus",this.onFocus=function(){clearTimeout(b)})}var R=u.getScrollInfo();u.on("scroll",this.onScroll=function(){var e=u.getScrollInfo(),n=u.getWrapperElement().getBoundingClientRect(),r=v+R.top-e.top,i=r-(window.pageYOffset||(document.documentElement||document.body).scrollTop);x||(i+=p.offsetHeight);if(i<=n.top||i>=n.bottom)return t.close();p.style.top=r+"px";p.style.left=E+R.left-e.left+"px"});e.on(p,"dblclick",function(e){var t=i(p,e.target||e.srcElement);if(t&&null!=t.hintId){l.changeActive(t.hintId);l.pick()}});e.on(p,"click",function(e){var n=i(p,e.target||e.srcElement);if(n&&null!=n.hintId){l.changeActive(n.hintId);t.options.completeOnSingleClick&&l.pick()}});e.on(p,"mousedown",function(){setTimeout(function(){u.focus()},20)});e.signal(o,"select",c[0],p.firstChild);return!0}var s="CodeMirror-hint",a="CodeMirror-hint-active";e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var i in n)r[i]=n[i];return e.showHint(r)};e.defineExtension("showHint",function(n){if(!(this.listSelections().length>1||this.somethingSelected())){this.state.completionActive&&this.state.completionActive.close();var r=this.state.completionActive=new t(this,n),i=r.options.hint;if(i){e.signal(this,"startCompletion",this);if(!i.async)return r.showHints(i(this,r.options));i(this,function(e){r.showHints(e)},r.options);return void 0}}});t.prototype={close:function(){if(this.active()){this.cm.state.completionActive=null;this.widget&&this.widget.close();this.onClose&&this.onClose();e.signal(this.cm,"endCompletion",this.cm)}},active:function(){return this.cm.state.completionActive==this},pick:function(t,r){var i=t.list[r];i.hint?i.hint(this.cm,t,i):this.cm.replaceRange(n(i),i.from||t.from,i.to||t.to,"complete");e.signal(t,"pick",i);this.close()},showHints:function(e){if(!e||!e.list.length||!this.active())return this.close();this.options.completeSingle&&1==e.list.length?this.pick(e,0):this.showWidget(e);return void 0},showWidget:function(t){function n(){if(!l){l=!0;p.close();p.cm.off("cursorActivity",a);t&&e.signal(t,"close")}}function r(){if(!l){e.signal(t,"update");var n=p.options.hint;n.async?n(p.cm,i,p.options):i(n(p.cm,p.options))}}function i(e){t=e;if(!l){if(!t||!t.list.length)return n();p.widget&&p.widget.close();p.widget=new o(p,t)}}function s(){if(u){g(u);u=0}}function a(){s();var e=p.cm.getCursor(),t=p.cm.getLine(e.line);if(e.line!=d.line||t.length-e.ch!=f-d.ch||e.ch<d.ch||p.cm.somethingSelected()||e.ch&&c.test(t.charAt(e.ch-1)))p.close();else{u=h(r);p.widget&&p.widget.close()}}this.widget=new o(this,t);e.signal(t,"shown");var l,u=0,p=this,c=this.options.closeCharacters,d=this.cm.getCursor(),f=this.cm.getLine(d.line).length,h=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},g=window.cancelAnimationFrame||clearTimeout;this.cm.on("cursorActivity",a);this.onClose=n},buildOptions:function(e){var t=this.cm.options.hintOptions,n={};for(var r in l)n[r]=l[r];if(t)for(var r in t)void 0!==t[r]&&(n[r]=t[r]);if(e)for(var r in e)void 0!==e[r]&&(n[r]=e[r]);return n}};o.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null;this.hints.parentNode.removeChild(this.hints);this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm;if(this.completion.options.closeOnUnfocus){e.off("blur",this.onBlur);e.off("focus",this.onFocus)}e.off("scroll",this.onScroll)}},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,n){t>=this.data.list.length?t=n?this.data.list.length-1:0:0>t&&(t=n?0:this.data.list.length-1);if(this.selectedHint!=t){var r=this.hints.childNodes[this.selectedHint];r.className=r.className.replace(" "+a,"");r=this.hints.childNodes[this.selectedHint=t];r.className+=" "+a;r.offsetTop<this.hints.scrollTop?this.hints.scrollTop=r.offsetTop-3:r.offsetTop+r.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=r.offsetTop+r.offsetHeight-this.hints.clientHeight+3);e.signal(this.data,"select",this.data.list[this.selectedHint],r)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}};e.registerHelper("hint","auto",function(t,n){var r,i=t.getHelpers(t.getCursor(),"hint");if(i.length)for(var o=0;o<i.length;o++){var s=i[o](t,n);if(s&&s.list.length)return s}else if(r=t.getHelper(t.getCursor(),"hintWords")){if(r)return e.hint.fromList(t,{words:r})}else if(e.hint.anyword)return e.hint.anyword(t,n)});e.registerHelper("hint","fromList",function(t,n){for(var r=t.getCursor(),i=t.getTokenAt(r),o=[],s=0;s<n.words.length;s++){var a=n.words[s];a.slice(0,i.string.length)==i.string&&o.push(a)}return o.length?{list:o,from:e.Pos(r.line,i.start),to:e.Pos(r.line,i.end)}:void 0});e.commands.autocomplete=e.showHint;var l={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnUnfocus:!0,completeOnSingleClick:!1,container:null,customKeys:null,extraKeys:null};e.defineOption("hintOptions",null)})},{codemirror:void 0}],22:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(function(){try{return t("codemirror")}catch(e){return window.CodeMirror}}()):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";e.runMode=function(t,n,r,i){var o=e.getMode(e.defaults,n),s=/MSIE \d/.test(navigator.userAgent),a=s&&(null==document.documentMode||document.documentMode<9);if(1==r.nodeType){var l=i&&i.tabSize||e.defaults.tabSize,u=r,p=0;u.innerHTML="";r=function(e,t){if("\n"!=e){for(var n="",r=0;;){var i=e.indexOf(" ",r);if(-1==i){n+=e.slice(r);p+=e.length-r;break}p+=i-r;n+=e.slice(r,i);var o=l-p%l;p+=o;for(var s=0;o>s;++s)n+=" ";r=i+1}if(t){var c=u.appendChild(document.createElement("span"));c.className="cm-"+t.replace(/ +/g," cm-");c.appendChild(document.createTextNode(n))}else u.appendChild(document.createTextNode(n))}else{u.appendChild(document.createTextNode(a?"\r":e));p=0}}}for(var c=e.splitLines(t),d=i&&i.state||e.startState(o),f=0,h=c.length;h>f;++f){f&&r("\n");var g=new e.StringStream(c[f]);!g.string&&o.blankLine&&o.blankLine(d);for(;!g.eol();){var m=o.token(g,d);r(g.current(),m,f,g.start,d);g.start=g.pos}}}})},{codemirror:void 0}],23:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(function(){try{return t("codemirror")}catch(e){return window.CodeMirror}}()):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";function t(e,t,i,o){this.atOccurrence=!1;this.doc=e;null==o&&"string"==typeof t&&(o=!1);i=i?e.clipPos(i):r(0,0);this.pos={from:i,to:i};if("string"!=typeof t){t.global||(t=new RegExp(t.source,t.ignoreCase?"ig":"g"));this.matches=function(n,i){if(n){t.lastIndex=0;for(var o,s,a=e.getLine(i.line).slice(0,i.ch),l=0;;){t.lastIndex=l;var u=t.exec(a);if(!u)break;o=u;s=o.index;l=o.index+(o[0].length||1);if(l==a.length)break}var p=o&&o[0].length||0;p||(0==s&&0==a.length?o=void 0:s!=e.getLine(i.line).length&&p++)}else{t.lastIndex=i.ch;var a=e.getLine(i.line),o=t.exec(a),p=o&&o[0].length||0,s=o&&o.index;s+p==a.length||p||(p=1)}return o&&p?{from:r(i.line,s),to:r(i.line,s+p),match:o}:void 0}}else{var s=t;o&&(t=t.toLowerCase());var a=o?function(e){return e.toLowerCase()}:function(e){return e},l=t.split("\n");if(1==l.length)this.matches=t.length?function(i,o){if(i){var l=e.getLine(o.line).slice(0,o.ch),u=a(l),p=u.lastIndexOf(t);if(p>-1){p=n(l,u,p);return{from:r(o.line,p),to:r(o.line,p+s.length)}}}else{var l=e.getLine(o.line).slice(o.ch),u=a(l),p=u.indexOf(t);if(p>-1){p=n(l,u,p)+o.ch;return{from:r(o.line,p),to:r(o.line,p+s.length)}}}}:function(){};else{var u=s.split("\n");this.matches=function(t,n){var i=l.length-1;if(t){if(n.line-(l.length-1)<e.firstLine())return;if(a(e.getLine(n.line).slice(0,u[i].length))!=l[l.length-1])return;for(var o=r(n.line,u[i].length),s=n.line-1,p=i-1;p>=1;--p,--s)if(l[p]!=a(e.getLine(s)))return;var c=e.getLine(s),d=c.length-u[0].length;if(a(c.slice(d))!=l[0])return;return{from:r(s,d),to:o}}if(!(n.line+(l.length-1)>e.lastLine())){var c=e.getLine(n.line),d=c.length-u[0].length;if(a(c.slice(d))==l[0]){for(var f=r(n.line,d),s=n.line+1,p=1;i>p;++p,++s)if(l[p]!=a(e.getLine(s)))return;if(a(e.getLine(s).slice(0,u[i].length))==l[i])return{from:f,to:r(s,u[i].length)}}}}}}}function n(e,t,n){if(e.length==t.length)return n;for(var r=Math.min(n,e.length);;){var i=e.slice(0,r).toLowerCase().length;if(n>i)++r;else{if(!(i>n))return r;--r}}}var r=e.Pos;t.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(e){function t(e){var t=r(e,0);n.pos={from:t,to:t};n.atOccurrence=!1;return!1}for(var n=this,i=this.doc.clipPos(e?this.pos.from:this.pos.to);;){if(this.pos=this.matches(e,i)){this.atOccurrence=!0;return this.pos.match||!0}if(e){if(!i.line)return t(0);i=r(i.line-1,this.doc.getLine(i.line-1).length)}else{var o=this.doc.lineCount();if(i.line==o-1)return t(o);i=r(i.line+1,0)}}},from:function(){return this.atOccurrence?this.pos.from:void 0},to:function(){return this.atOccurrence?this.pos.to:void 0},replace:function(t){if(this.atOccurrence){var n=e.splitLines(t);this.doc.replaceRange(n,this.pos.from,this.pos.to);this.pos.to=r(this.pos.from.line+n.length-1,n[n.length-1].length+(1==n.length?this.pos.from.ch:0))}}};e.defineExtension("getSearchCursor",function(e,n,r){return new t(this.doc,e,n,r)});e.defineDocExtension("getSearchCursor",function(e,n,r){return new t(this,e,n,r)});e.defineExtension("selectMatches",function(t,n){for(var r,i=[],o=this.getSearchCursor(t,this.getCursor("from"),n);(r=o.findNext())&&!(e.cmpPos(o.to(),this.getCursor("to"))>0);)i.push({anchor:o.from(),head:o.to()});i.length&&this.setSelections(i,0)})})},{codemirror:void 0}],24:[function(e,t){t.exports=e(7)},{"/home/lrd900/yasgui/yasgui/node_modules/yasgui-utils/node_modules/store/store.js":7}],25:[function(e,t){t.exports={name:"yasgui-utils",version:"1.5.0",description:"Utils for YASGUI libs",main:"src/main.js",repository:{type:"git",url:"git://github.com/YASGUI/Utils.git"},licenses:[{type:"MIT",url:"http://yasgui.github.io/license.txt"}],author:"Laurens Rietveld",maintainers:[{name:"Laurens Rietveld",email:"[email protected]",web:"http://laurensrietveld.nl"}],bugs:{url:"https://github.com/YASGUI/Utils/issues"},homepage:"https://github.com/YASGUI/Utils",dependencies:{store:"^1.3.14"}}},{}],26:[function(e,t,n){arguments[4][9][0].apply(n,arguments)},{"../package.json":25,"./storage.js":27,"./svg.js":28,"/home/lrd900/yasgui/yasgui/node_modules/yasgui-utils/src/main.js":9}],27:[function(e,t){{var n=e("store"),r={day:function(){return 864e5},month:function(){30*r.day()},year:function(){12*r.month()}};t.exports={set:function(e,t,i){if(e&&t){"string"==typeof i&&(i=r[i]());t.documentElement&&(t=(new XMLSerializer).serializeToString(t.documentElement));n.set(e,{val:t,exp:i,time:(new Date).getTime()})}},remove:function(e){e&&n.remove(e)},get:function(e){if(e){var t=n.get(e);return t?t.exp&&(new Date).getTime()-t.time>t.exp?null:t.val:null}return null}}}},{store:24}],28:[function(e,t){t.exports=e(11)},{"/home/lrd900/yasgui/yasgui/node_modules/yasgui-utils/src/svg.js":11}],29:[function(e,t){t.exports={name:"yasgui-yasqe",description:"Yet Another SPARQL Query Editor",version:"2.3.0",main:"src/main.js",licenses:[{type:"MIT",url:"http://yasqe.yasgui.org/license.txt"}],author:"Laurens Rietveld",homepage:"http://yasqe.yasgui.org",devDependencies:{browserify:"^6.1.0",gulp:"~3.6.0","gulp-bump":"^0.1.11","gulp-concat":"^2.4.1","gulp-connect":"^2.0.5","gulp-embedlr":"^0.5.2","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jsvalidate":"^0.2.0","gulp-livereload":"^1.3.1","gulp-minify-css":"^0.3.11","gulp-notify":"^2.0.1","gulp-rename":"^1.2.0","gulp-streamify":"0.0.5","gulp-tag-version":"^1.1.0","gulp-uglify":"^1.0.1","require-dir":"^0.1.0","run-sequence":"^1.0.1","vinyl-buffer":"^1.0.0","vinyl-source-stream":"~0.1.1",watchify:"^0.6.4","gulp-sourcemaps":"^1.2.8",exorcist:"^0.1.6","vinyl-transform":"0.0.1","gulp-sass":"^1.2.2","bootstrap-sass":"^3.3.1","browserify-transform-tools":"^1.2.1","gulp-cssimport":"^1.3.1"},bugs:"https://github.com/YASGUI/YASQE/issues/",keywords:["JavaScript","SPARQL","Editor","Semantic Web","Linked Data"],maintainers:[{name:"Laurens Rietveld",email:"[email protected]",web:"http://laurensrietveld.nl"}],repository:{type:"git",url:"https://github.com/YASGUI/YASQE.git"},dependencies:{jquery:"~ 1.11.0",codemirror:"^4.7.0","yasgui-utils":"^1.4.1"},optionalShim:{codemirror:{require:"codemirror",global:"CodeMirror"},jquery:{require:"jquery",global:"jQuery"},"../../lib/codemirror":{require:"codemirror",global:"CodeMirror"}}}},{}],30:[function(e,t){"use strict";var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),r=e("../utils.js"),i=e("yasgui-utils"),o=e("../../lib/trie.js");t.exports=function(e,t){var a={},l={},u={};t.on("cursorActivity",function(){d(!0)});t.on("change",function(){var e=[];for(var r in a)a[r].is(":visible")&&e.push(a[r]);if(e.length>0){var i=n(t.getWrapperElement()).find(".CodeMirror-vscrollbar"),o=0;i.is(":visible")&&(o=i.outerWidth());e.forEach(function(e){e.css("right",o)})}});var p=function(e,n){u[e.name]=new o;for(var s=0;s<n.length;s++)u[e.name].insert(n[s]);var a=r.getPersistencyId(t,e.persistent);a&&i.storage.set(a,n,"month")},c=function(e,n){var o=l[e]=new n(t,e);o.name=e;if(o.bulk){var s=function(e){e&&e instanceof Array&&e.length>0&&p(o,e)};if(o.get instanceof Array)s(o.get);else{var a=null,u=r.getPersistencyId(t,o.persistent);u&&(a=i.storage.get(u));a&&a.length>0?s(a):o.get instanceof Function&&(o.async?o.get(null,s):s(o.get()))}}},d=function(r){if(!t.somethingSelected()){var i=function(n){if(r&&(!n.autoShow||!n.bulk&&n.async))return!1;var i={closeCharacters:/(?=a)b/,completeSingle:!1};!n.bulk&&n.async&&(i.async=!0);{var o=function(e,t){return f(n,t)};e.showHint(t,o,i)}return!0};for(var o in l)if(-1!=n.inArray(o,t.options.autocompleters)){var s=l[o];if(s.isValidCompletionPosition)if(s.isValidCompletionPosition()){if(!s.callbacks||!s.callbacks.validPosition||s.callbacks.validPosition(t,s)!==!1){var a=i(s); if(a)break}}else s.callbacks&&s.callbacks.invalidPosition&&s.callbacks.invalidPosition(t,s)}}},f=function(e,n){var r=function(t){var n=t.autocompletionString||t.string,r=[];if(u[e.name])r=u[e.name].autoComplete(n);else if("function"==typeof e.get&&0==e.async)r=e.get(n);else if("object"==typeof e.get)for(var i=n.length,o=0;o<e.get.length;o++){var s=e.get[o];s.slice(0,i)==n&&r.push(s)}return h(r,e,t)},i=t.getCompleteToken();e.preProcessToken&&(i=e.preProcessToken(i));if(i){if(e.bulk||!e.async)return r(i);var o=function(t){n(h(t,e,i))};e.get(i,o)}},h=function(e,n,r){for(var i=[],o=0;o<e.length;o++){var a=e[o];n.postProcessToken&&(a=n.postProcessToken(r,a));i.push({text:a,displayText:a,hint:s})}var l=t.getCursor(),u={completionToken:r.string,list:i,from:{line:l.line,ch:r.start},to:{line:l.line,ch:r.end}};if(n.callbacks)for(var p in n.callbacks)n.callbacks[p]&&t.on(u,p,n.callbacks[p]);return u};return{init:c,completers:l,notifications:{getEl:function(e){return n(a[e.name])},show:function(e,t){if(!t.autoshow){a[t.name]||(a[t.name]=n("<div class='completionNotification'></div>"));a[t.name].show().text("Press "+(-1!=navigator.userAgent.indexOf("Mac OS X")?"CMD":"CTRL")+" - <spacebar> to autocomplete").appendTo(n(e.getWrapperElement()))}},hide:function(e,t){a[t.name]&&a[t.name].hide()}},autoComplete:d,getTrie:function(e){return"string"==typeof e?u[e]:u[e.name]}}};var s=function(e,t,n){n.text!=e.getTokenAt(e.getCursor()).string&&e.replaceRange(n.text,t.from,t.to)}},{"../../lib/trie.js":14,"../utils.js":43,jquery:void 0,"yasgui-utils":26}],31:[function(e,t){"use strict";(function(){try{return e("jquery")}catch(t){return window.jQuery}})();t.exports=function(n,r){return{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(n)},get:function(t,r){return e("./utils").fetchFromLov(n,this,t,r)},preProcessToken:function(e){return t.exports.preProcessToken(n,e)},postProcessToken:function(e,r){return t.exports.postProcessToken(n,e,r)},async:!0,bulk:!1,autoShow:!1,persistent:r,callbacks:{validPosition:n.autocompleters.notifications.show,invalidPosition:n.autocompleters.notifications.hide}}};t.exports.isValidCompletionPosition=function(e){var t=e.getCompleteToken();if(0==t.string.indexOf("?"))return!1;var n=e.getCursor(),r=e.getPreviousNonWsToken(n.line,t);return"a"==r.string?!0:"rdf:type"==r.string?!0:"rdfs:domain"==r.string?!0:"rdfs:range"==r.string?!0:!1};t.exports.preProcessToken=function(t,n){return e("./utils.js").preprocessResourceTokenForCompletion(t,n)};t.exports.postProcessToken=function(t,n,r){return e("./utils.js").postprocessResourceTokenForCompletion(t,n,r)}},{"./utils":34,"./utils.js":34,jquery:void 0}],32:[function(e,t){"use strict";var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),r={"string-2":"prefixed",atom:"var"};t.exports=function(e,r){e.on("change",function(){t.exports.appendPrefixIfNeeded(e,r)});return{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(e)},get:function(e,t){n.get("http://prefix.cc/popular/all.file.json",function(e){var n=[];for(var r in e)if("bif"!=r){var i=r+": <"+e[r]+">";n.push(i)}n.sort();t(n)})},preProcessToken:function(n){return t.exports.preprocessPrefixTokenForCompletion(e,n)},async:!0,bulk:!0,autoShow:!0,persistent:r}};t.exports.isValidCompletionPosition=function(e){var t=e.getCursor(),r=e.getTokenAt(t);if(e.getLine(t.line).length>t.ch)return!1;"ws"!=r.type&&(r=e.getCompleteToken());if(0==!r.string.indexOf("a")&&-1==n.inArray("PNAME_NS",r.state.possibleCurrent))return!1;var i=e.getPreviousNonWsToken(t.line,r);return i&&"PREFIX"==i.string.toUpperCase()?!0:!1};t.exports.preprocessPrefixTokenForCompletion=function(e,t){var n=e.getPreviousNonWsToken(e.getCursor().line,t);n&&n.string&&":"==n.string.slice(-1)&&(t={start:n.start,end:t.end,string:n.string+" "+t.string,state:t.state});return t};t.exports.appendPrefixIfNeeded=function(e,t){if(e.autocompleters.getTrie(t)&&e.options.autocompleters&&-1!=e.options.autocompleters.indexOf(t)){var n=e.getCursor(),i=e.getTokenAt(n);if("prefixed"==r[i.type]){var o=i.string.indexOf(":");if(-1!==o){var s=e.getPreviousNonWsToken(n.line,i).string.toUpperCase(),a=e.getTokenAt({line:n.line,ch:i.start});if("PREFIX"!=s&&("ws"==a.type||null==a.type)){var l=i.string.substring(0,o+1),u=e.getPrefixesFromQuery();if(null==u[l.slice(0,-1)]){var p=e.autocompleters.getTrie(t).autoComplete(l);p.length>0&&e.addPrefixes(p[0])}}}}}}},{jquery:void 0}],33:[function(e,t){"use strict";var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}();t.exports=function(n,r){return{isValidCompletionPosition:function(){return t.exports.isValidCompletionPosition(n)},get:function(t,r){return e("./utils").fetchFromLov(n,this,t,r)},preProcessToken:function(e){return t.exports.preProcessToken(n,e)},postProcessToken:function(e,r){return t.exports.postProcessToken(n,e,r)},async:!0,bulk:!1,autoShow:!1,persistent:r,callbacks:{validPosition:n.autocompleters.notifications.show,invalidPosition:n.autocompleters.notifications.hide}}};t.exports.isValidCompletionPosition=function(e){var t=e.getCompleteToken();if(0==t.string.length)return!1;if(0==t.string.indexOf("?"))return!1;if(n.inArray("a",t.state.possibleCurrent)>=0)return!0;var r=e.getCursor(),i=e.getPreviousNonWsToken(r.line,t);return"rdfs:subPropertyOf"==i.string?!0:!1};t.exports.preProcessToken=function(t,n){return e("./utils.js").preprocessResourceTokenForCompletion(t,n)};t.exports.postProcessToken=function(t,n,r){return e("./utils.js").postprocessResourceTokenForCompletion(t,n,r)}},{"./utils":34,"./utils.js":34,jquery:void 0}],34:[function(e,t){"use strict";var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),r=(e("./utils.js"),e("yasgui-utils")),i=function(e,t){var n=e.getPrefixesFromQuery();if(0==!t.string.indexOf("<")){t.tokenPrefix=t.string.substring(0,t.string.indexOf(":")+1);null!=n[t.tokenPrefix.slice(0,-1)]&&(t.tokenPrefixUri=n[t.tokenPrefix.slice(0,-1)])}t.autocompletionString=t.string.trim();if(0==!t.string.indexOf("<")&&t.string.indexOf(":")>-1)for(var r in n)if(0==t.string.indexOf(r)){t.autocompletionString=n[r];t.autocompletionString+=t.string.substring(r.length+1);break}0==t.autocompletionString.indexOf("<")&&(t.autocompletionString=t.autocompletionString.substring(1));-1!==t.autocompletionString.indexOf(">",t.length-1)&&(t.autocompletionString=t.autocompletionString.substring(0,t.autocompletionString.length-1));return t},o=function(e,t,n){n=t.tokenPrefix&&t.autocompletionString&&t.tokenPrefixUri?t.tokenPrefix+n.substring(t.tokenPrefixUri.length):"<"+n+">";return n},s=function(t,i,o,s){if(!o||!o.string||0==o.string.trim().length){t.autocompleters.notifications.getEl(i).empty().append("Nothing to autocomplete yet!");return!1}var a=50,l={q:o.autocompletionString,page:1};l.type="classes"==i.name?"class":"property";var u=[],p="",c=function(){p="http://lov.okfn.org/dataset/lov/api/v2/autocomplete/terms?"+n.param(l)};c();var d=function(){l.page++;c()},f=function(){n.get(p,function(e){for(var r=0;r<e.results.length;r++)u.push(n.isArray(e.results[r].uri)&&e.results[r].uri.length>0?e.results[r].uri[0]:e.results[r].uri);if(u.length<e.total_results&&u.length<a){d();f()}else{u.length>0?t.autocompleters.notifications.hide(t,i):t.autocompleters.notifications.getEl(i).text("0 matches found...");s(u)}}).fail(function(){t.autocompleters.notifications.getEl(i).empty().append("Failed fetching suggestions..")})};t.autocompleters.notifications.getEl(i).empty().append(n("<span>Fetchting autocompletions &nbsp;</span>")).append(n(r.svg.getElement(e("../imgs.js").loader)).addClass("notificationLoader"));f()};t.exports={fetchFromLov:s,preprocessResourceTokenForCompletion:i,postprocessResourceTokenForCompletion:o}},{"../imgs.js":37,"./utils.js":34,jquery:void 0,"yasgui-utils":26}],35:[function(e,t){"use strict";var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}();t.exports=function(e){return{isValidCompletionPosition:function(){var t=e.getTokenAt(e.getCursor());if("ws"!=t.type){t=e.getCompleteToken(t);if(t&&0==t.string.indexOf("?"))return!0}return!1},get:function(t){if(0==t.trim().length)return[];var r={};n(e.getWrapperElement()).find(".cm-atom").each(function(){var e=this.innerHTML;if(0==e.indexOf("?")){var i=n(this).next(),o=i.attr("class");o&&i.attr("class").indexOf("cm-atom")>=0&&(e+=i.text());if(e.length<=1)return;if(0!==e.indexOf(t))return;if(e==t)return;r[e]=!0}});var i=[];for(var o in r)i.push(o);i.sort();return i},async:!1,bulk:!1,autoShow:!0}}},{jquery:void 0}],36:[function(e,t){var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}();t.exports={use:function(e){e.defaults=n.extend(!0,{},e.defaults,{mode:"sparql11",value:"SELECT * WHERE {\n ?sub ?pred ?obj .\n} \nLIMIT 10",highlightSelectionMatches:{showToken:/\w/},tabMode:"indent",lineNumbers:!0,lineWrapping:!0,foldGutter:{rangeFinder:e.fold.brace},gutters:["gutterErrorBar","CodeMirror-linenumbers","CodeMirror-foldgutter"],matchBrackets:!0,fixedGutter:!0,syntaxErrorCheck:!0,extraKeys:{"Ctrl-Space":e.autoComplete,"Cmd-Space":e.autoComplete,"Ctrl-D":e.deleteLine,"Ctrl-K":e.deleteLine,"Cmd-D":e.deleteLine,"Cmd-K":e.deleteLine,"Ctrl-/":e.commentLines,"Cmd-/":e.commentLines,"Ctrl-Alt-Down":e.copyLineDown,"Ctrl-Alt-Up":e.copyLineUp,"Cmd-Alt-Down":e.copyLineDown,"Cmd-Alt-Up":e.copyLineUp,"Shift-Ctrl-F":e.doAutoFormat,"Shift-Cmd-F":e.doAutoFormat,"Ctrl-]":e.indentMore,"Cmd-]":e.indentMore,"Ctrl-[":e.indentLess,"Cmd-[":e.indentLess,"Ctrl-S":e.storeQuery,"Cmd-S":e.storeQuery,"Ctrl-Enter":e.executeQuery,"Cmd-Enter":e.executeQuery,F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}},cursorHeight:.9,createShareLink:e.createShareLink,consumeShareLink:e.consumeShareLink,persistent:function(e){return"yasqe_"+n(e.getWrapperElement()).closest("[id]").attr("id")+"_queryVal"},sparql:{showQueryButton:!1,endpoint:"http://dbpedia.org/sparql",requestMethod:"POST",acceptHeaderGraph:"text/turtle,*/*;q=0.9",acceptHeaderSelect:"application/sparql-results+json,*/*;q=0.9",acceptHeaderUpdate:"text/plain,*/*;q=0.9",namedGraphs:[],defaultGraphs:[],args:[],headers:{},callbacks:{beforeSend:null,complete:null,error:null,success:null},handlers:{}}})}}},{jquery:void 0}],37:[function(e,t){"use strict";t.exports={loader:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="100%" height="100%" fill="black"> <circle cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(45 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.125s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(90 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.25s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(135 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.375s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(180 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(225 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.625s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(270 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.75s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(315 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.875s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle> <circle transform="rotate(180 16 16)" cx="16" cy="3" r="0"> <animate attributeName="r" values="0;3;0;0" dur="1s" repeatCount="indefinite" begin="0.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" calcMode="spline" /> </circle></svg>',query:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 80 80" enable-background="new 0 0 80 80" xml:space="preserve"><g ></g><g > <path d="M64.622,2.411H14.995c-6.627,0-12,5.373-12,12v49.897c0,6.627,5.373,12,12,12h49.627c6.627,0,12-5.373,12-12V14.411 C76.622,7.783,71.249,2.411,64.622,2.411z M24.125,63.906V15.093L61,39.168L24.125,63.906z"/></g></svg>',queryInvalid:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 73.627 73.897" enable-background="new 0 0 80 80" xml:space="preserve" ><g transform="translate(-2.995,-2.411)" /><g transform="translate(-2.995,-2.411)"><path d="M 64.622,2.411 H 14.995 c -6.627,0 -12,5.373 -12,12 v 49.897 c 0,6.627 5.373,12 12,12 h 49.627 c 6.627,0 12,-5.373 12,-12 V 14.411 c 0,-6.628 -5.373,-12 -12,-12 z M 24.125,63.906 V 15.093 L 61,39.168 24.125,63.906 z" inkscape:connector-curvature="0" /></g><g transform="matrix(0.76805408,0,0,0.76805408,-0.90231954,-2.0060895)" ><path style="fill:#c02608;fill-opacity:1" inkscape:connector-curvature="0" d="m 88.184,81.468 c 1.167,1.167 1.167,3.075 0,4.242 l -2.475,2.475 c -1.167,1.167 -3.076,1.167 -4.242,0 l -69.65,-69.65 c -1.167,-1.167 -1.167,-3.076 0,-4.242 l 2.476,-2.476 c 1.167,-1.167 3.076,-1.167 4.242,0 l 69.649,69.651 z" /></g><g transform="matrix(0.76805408,0,0,0.76805408,-0.90231954,-2.0060895)" ><path style="fill:#c02608;fill-opacity:1" inkscape:connector-curvature="0" d="m 18.532,88.184 c -1.167,1.166 -3.076,1.166 -4.242,0 l -2.475,-2.475 c -1.167,-1.166 -1.167,-3.076 0,-4.242 l 69.65,-69.651 c 1.167,-1.167 3.075,-1.167 4.242,0 l 2.476,2.476 c 1.166,1.167 1.166,3.076 0,4.242 l -69.651,69.65 z" /></g></svg>',download:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="tiny" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 100 100" xml:space="preserve"><g ></g><g > <path fill-rule="evenodd" fill="#000000" d="M88,84v-2c0-2.961-0.859-4-4-4H16c-2.961,0-4,0.98-4,4v2c0,3.102,1.039,4,4,4h68 C87.02,88,88,87.039,88,84z M58,12H42c-5,0-6,0.941-6,6v22H16l34,34l34-34H64V18C64,12.941,62.939,12,58,12z"/></g></svg>',share:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve"><path d="M36.764,50c0,0.308-0.07,0.598-0.088,0.905l32.247,16.119c2.76-2.338,6.293-3.797,10.195-3.797 C87.89,63.228,95,70.338,95,79.109C95,87.89,87.89,95,79.118,95c-8.78,0-15.882-7.11-15.882-15.891c0-0.316,0.07-0.598,0.088-0.905 L31.077,62.085c-2.769,2.329-6.293,3.788-10.195,3.788C12.11,65.873,5,58.771,5,50c0-8.78,7.11-15.891,15.882-15.891 c3.902,0,7.427,1.468,10.195,3.797l32.247-16.119c-0.018-0.308-0.088-0.598-0.088-0.914C63.236,12.11,70.338,5,79.118,5 C87.89,5,95,12.11,95,20.873c0,8.78-7.11,15.891-15.882,15.891c-3.911,0-7.436-1.468-10.195-3.806L36.676,49.086 C36.693,49.394,36.764,49.684,36.764,50z"/></svg>',warning:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" viewBox="0 0 66.399998 66.399998" enable-background="new 0 0 69.3 69.3" xml:space="preserve" height="100%" width="100%" inkscape:version="0.48.4 r9939" ><g transform="translate(-1.5,-1.5)" style="fill:#ff0000"><path d="M 34.7,1.5 C 16.4,1.5 1.5,16.4 1.5,34.7 1.5,53 16.4,67.9 34.7,67.9 53,67.9 67.9,53 67.9,34.7 67.9,16.4 53,1.5 34.7,1.5 z m 0,59.4 C 20.2,60.9 8.5,49.1 8.5,34.7 8.5,20.2 20.3,8.5 34.7,8.5 c 14.4,0 26.2,11.8 26.2,26.2 0,14.4 -11.8,26.2 -26.2,26.2 z" inkscape:connector-curvature="0" style="fill:#ff0000" /><path d="m 34.6,47.1 c -1.4,0 -2.5,0.5 -3.5,1.5 -0.9,1 -1.4,2.2 -1.4,3.6 0,1.6 0.5,2.8 1.5,3.8 1,0.9 2.1,1.3 3.4,1.3 1.3,0 2.4,-0.5 3.4,-1.4 1,-0.9 1.5,-2.2 1.5,-3.7 0,-1.4 -0.5,-2.6 -1.4,-3.6 -0.9,-1 -2.1,-1.5 -3.5,-1.5 z" inkscape:connector-curvature="0" style="fill:#ff0000" /><path d="m 34.8,13.9 c -1.5,0 -2.8,0.5 -3.7,1.6 -0.9,1 -1.4,2.4 -1.4,4.2 0,1.1 0.1,2.9 0.2,5.6 l 0.8,13.1 c 0.2,1.8 0.4,3.2 0.9,4.1 0.5,1.2 1.5,1.8 2.9,1.8 1.3,0 2.3,-0.7 2.9,-1.9 0.5,-1 0.7,-2.3 0.9,-4 L 39.4,25 c 0.1,-1.3 0.2,-2.5 0.2,-3.8 0,-2.2 -0.3,-3.9 -0.8,-5.1 -0.5,-1 -1.6,-2.2 -4,-2.2 z" inkscape:connector-curvature="0" style="fill:#ff0000" /></g></svg>',fullscreen:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_2186_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="640" inkscape:window-height="480" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="0" inkscape:current-layer="Layer_1" /><path d="m -7.962963,-10 v 38.889 l 16.667,-16.667 16.667,16.667 5.555,-5.555 -16.667,-16.667 16.667,-16.667 h -38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 92.037037,-10 v 38.889 l -16.667,-16.667 -16.666,16.667 -5.556,-5.555 16.666,-16.667 -16.666,-16.667 h 38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="M -7.962963,90 V 51.111 l 16.667,16.666 16.667,-16.666 5.555,5.556 -16.667,16.666 16.667,16.667 h -38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="M 92.037037,90 V 51.111 l -16.667,16.666 -16.666,-16.666 -5.556,5.556 16.666,16.666 -16.666,16.667 h 38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /></svg>',smallscreen:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_2186_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1855" inkscape:window-height="1056" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="Layer_1" /><path d="m 30.926037,28.889 0,-38.889 -16.667,16.667 -16.667,-16.667 -5.555,5.555 16.667,16.667 -16.667,16.667 38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 53.148037,28.889 0,-38.889 16.667,16.667 16.666,-16.667 5.556,5.555 -16.666,16.667 16.666,16.667 -38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 30.926037,51.111 0,38.889 -16.667,-16.666 -16.667,16.666 -5.555,-5.556 16.667,-16.666 -16.667,-16.667 38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 53.148037,51.111 0,38.889 16.667,-16.666 16.666,16.666 5.556,-5.556 -16.666,-16.666 16.666,-16.667 -38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /></svg>'}},{}],38:[function(e,t){"use strict";window.console=window.console||{log:function(){}};var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),r=function(){try{return e("codemirror")}catch(t){return window.CodeMirror}}(),i=(e("./sparql.js"),e("./utils.js")),o=e("yasgui-utils"),s=e("./imgs.js");e("../lib/deparam.js");e("codemirror/addon/fold/foldcode.js");e("codemirror/addon/fold/foldgutter.js");e("codemirror/addon/fold/xml-fold.js");e("codemirror/addon/fold/brace-fold.js");e("codemirror/addon/hint/show-hint.js");e("codemirror/addon/search/searchcursor.js");e("codemirror/addon/edit/matchbrackets.js");e("codemirror/addon/runmode/runmode.js");e("codemirror/addon/display/fullscreen.js");e("../lib/flint.js");var a=t.exports=function(e,t){var i=n("<div>",{"class":"yasqe"}).appendTo(n(e));t=l(t);var o=u(r(i[0],t));d(o);return o},l=function(e){var t=n.extend(!0,{},a.defaults,e);return t},u=function(t){t.autocompleters=e("./autocompleters/autocompleterBase.js")(a,t);t.options.autocompleters&&t.options.autocompleters.forEach(function(e){a.Autocompleters[e]&&t.autocompleters.init(e,a.Autocompleters[e])});t.getCompleteToken=function(n,r){return e("./tokenUtils.js").getCompleteToken(t,n,r)};t.getPreviousNonWsToken=function(n,r){return e("./tokenUtils.js").getPreviousNonWsToken(t,n,r)};t.getNextNonWsToken=function(n,r){return e("./tokenUtils.js").getNextNonWsToken(t,n,r)};t.query=function(e){a.executeQuery(t,e)};t.getPrefixesFromQuery=function(){return e("./prefixUtils.js").getPrefixesFromQuery(t)};t.addPrefixes=function(n){return e("./prefixUtils.js").addPrefixes(t,n)};t.removePrefixes=function(n){return e("./prefixUtils.js").removePrefixes(t,n)};t.getQueryType=function(){return t.queryType};t.getQueryMode=function(){var e=t.getQueryType();return"INSERT"==e||"DELETE"==e||"LOAD"==e||"CLEAR"==e||"CREATE"==e||"DROP"==e||"COPY"==e||"MOVE"==e||"ADD"==e?"update":"query"};t.setCheckSyntaxErrors=function(e){t.options.syntaxErrorCheck=e;h(t)};t.enableCompleter=function(e){p(t.options,e);a.Autocompleters[e]&&t.autocompleters.init(e,a.Autocompleters[e])};t.disableCompleter=function(e){c(t.options,e)};return t},p=function(e,t){e.autocompleters||(e.autocompleters=[]);e.autocompleters.push(t)},c=function(e,t){if("object"==typeof e.autocompleters){var r=n.inArray(t,e.autocompleters);if(r>=0){e.autocompleters.splice(r,1);c(e,t)}}},d=function(e){var t=i.getPersistencyId(e,e.options.persistent);if(t){var r=o.storage.get(t);r&&e.setValue(r)}a.drawButtons(e);e.on("blur",function(e){a.storeQuery(e)});e.on("change",function(e){h(e);a.updateQueryButton(e);a.positionButtons(e)});e.on("cursorActivity",function(e){f(e)});e.prevQueryValid=!1;h(e);a.positionButtons(e);if(e.options.consumeShareLink){var s=n.deparam(window.location.search.substring(1));e.options.consumeShareLink(e,s)}},f=function(e){e.cursor=n(".CodeMirror-cursor");e.buttons&&e.buttons.is(":visible")&&e.cursor.length>0&&(i.elementsOverlap(e.cursor,e.buttons)?e.buttons.find("svg").attr("opacity","0.2"):e.buttons.find("svg").attr("opacity","1.0"))},h=function(t,r){t.queryValid=!0;t.clearGutter("gutterErrorBar");for(var i=null,a=0;a<t.lineCount();++a){var l=!1;t.prevQueryValid||(l=!0);var u=t.getTokenAt({line:a,ch:t.getLine(a).length},l),i=u.state;t.queryType=i.queryType;if(0==i.OK){if(!t.options.syntaxErrorCheck){n(t.getWrapperElement).find(".sp-error").css("color","black");return}var p=o.svg.getElement(s.warning);i.possibleCurrent&&i.possibleCurrent.length>0&&e("./tooltip")(t,p,function(){var e=[];i.possibleCurrent.forEach(function(t){e.push("<strong style='text-decoration:underline'>"+n("<div/>").text(t).html()+"</strong>")});return"This line is invalid. Expected: "+e.join(", ")});p.style.marginTop="2px";p.style.marginLeft="2px";p.className="parseErrorIcon";t.setGutterMarker(a,"gutterErrorBar",p);t.queryValid=!1;break}}t.prevQueryValid=t.queryValid;if(r&&null!=i&&void 0!=i.stack){var c=i.stack,d=i.stack.length;d>1?t.queryValid=!1:1==d&&"solutionModifier"!=c[0]&&"?limitOffsetClauses"!=c[0]&&"?offsetClause"!=c[0]&&(t.queryValid=!1)}};n.extend(a,r);a.Autocompleters={};a.registerAutocompleter=function(e,t){a.Autocompleters[e]=t;p(a.defaults,e)};a.autoComplete=function(e){e.autocompleters.autoComplete(!1)};a.registerAutocompleter("prefixes",e("./autocompleters/prefixes.js"));a.registerAutocompleter("properties",e("./autocompleters/properties.js"));a.registerAutocompleter("classes",e("./autocompleters/classes.js"));a.registerAutocompleter("variables",e("./autocompleters/variables.js"));a.positionButtons=function(e){var t=n(e.getWrapperElement()).find(".CodeMirror-vscrollbar"),r=0;t.is(":visible")&&(r=t.outerWidth());e.buttons.is(":visible")&&e.buttons.css("right",r+6)};a.createShareLink=function(e){var t=n.deparam(window.location.search.substring(1));t.query=e.getValue();return t};a.consumeShareLink=function(e,t){t.query&&e.setValue(t.query)};a.drawButtons=function(e){e.buttons=n("<div class='yasqe_buttons'></div>").appendTo(n(e.getWrapperElement()));if(e.options.createShareLink){var t=n(o.svg.getElement(s.share));t.click(function(r){r.stopPropagation();var i=n("<div class='yasqe_sharePopup'></div>").appendTo(e.buttons);n("html").click(function(){i&&i.remove()});i.click(function(e){e.stopPropagation()});var o=n("<textarea></textarea>").val(location.protocol+"//"+location.host+location.pathname+"?"+n.param(e.options.createShareLink(e)));o.focus(function(){var e=n(this);e.select();e.mouseup(function(){e.unbind("mouseup");return!1})});i.empty().append(o);var s=t.position();i.css("top",s.top+t.outerHeight()+"px").css("left",s.left+t.outerWidth()-i.outerWidth()+"px")}).addClass("yasqe_share").attr("title","Share your query").appendTo(e.buttons)}var r=n("<div>",{"class":"fullscreenToggleBtns"}).append(n(o.svg.getElement(s.fullscreen)).addClass("yasqe_fullscreenBtn").attr("title","Set editor full screen").click(function(){e.setOption("fullScreen",!0)})).append(n(o.svg.getElement(s.smallscreen)).addClass("yasqe_smallscreenBtn").attr("title","Set editor to normale size").click(function(){e.setOption("fullScreen",!1)}));e.buttons.append(r);if(e.options.sparql.showQueryButton){n("<div>",{"class":"yasqe_queryButton"}).click(function(){if(n(this).hasClass("query_busy")){e.xhr&&e.xhr.abort();a.updateQueryButton(e)}else e.query()}).appendTo(e.buttons);a.updateQueryButton(e)}};var g={busy:"loader",valid:"query",error:"queryInvalid"};a.updateQueryButton=function(e,t){var r=n(e.getWrapperElement()).find(".yasqe_queryButton");if(0!=r.length){if(!t){t="valid";e.queryValid===!1&&(t="error")}if(t!=e.queryStatus&&("busy"==t||"valid"==t||"error"==t)){r.empty().removeClass(function(e,t){return t.split(" ").filter(function(e){return 0==e.indexOf("query_")}).join(" ")}).addClass("query_"+t);o.svg.draw(r,s[g[t]]);e.queryStatus=t}}};a.fromTextArea=function(e,t){t=l(t);var i=(n("<div>",{"class":"yasqe"}).insertBefore(n(e)).append(n(e)),u(r.fromTextArea(e,t)));d(i);return i};a.storeQuery=function(e){var t=i.getPersistencyId(e,e.options.persistent);t&&o.storage.set(t,e.getValue(),"month")};a.commentLines=function(e){for(var t=e.getCursor(!0).line,n=e.getCursor(!1).line,r=Math.min(t,n),i=Math.max(t,n),o=!0,s=r;i>=s;s++){var a=e.getLine(s);if(0==a.length||"#"!=a.substring(0,1)){o=!1;break}}for(var s=r;i>=s;s++)o?e.replaceRange("",{line:s,ch:0},{line:s,ch:1}):e.replaceRange("#",{line:s,ch:0})};a.copyLineUp=function(e){var t=e.getCursor(),n=e.lineCount();e.replaceRange("\n",{line:n-1,ch:e.getLine(n-1).length});for(var r=n;r>t.line;r--){var i=e.getLine(r-1);e.replaceRange(i,{line:r,ch:0},{line:r,ch:e.getLine(r).length})}};a.copyLineDown=function(e){a.copyLineUp(e);var t=e.getCursor();t.line++;e.setCursor(t)};a.doAutoFormat=function(e){if(e.somethingSelected()){var t={line:e.getCursor(!1).line,ch:e.getSelection().length};m(e,e.getCursor(!0),t)}else{var n=e.lineCount(),r=e.getTextArea().value.length;m(e,{line:0,ch:0},{line:n,ch:r})}};var m=function(e,t,n){var r=e.indexFromPos(t),i=e.indexFromPos(n),o=E(e.getValue(),r,i);e.operation(function(){e.replaceRange(o,t,n);for(var i=e.posFromIndex(r).line,s=e.posFromIndex(r+o.length).line,a=i;s>=a;a++)e.indentLine(a,"smart")})},E=function(e,t,i){e=e.substring(t,i);var o=[["keyword","ws","prefixed","ws","uri"],["keyword","ws","uri"]],s=["{",".",";"],a=["}"],l=function(e){for(var t=0;t<o.length;t++)if(c.valueOf().toString()==o[t].valueOf().toString())return 1;for(var t=0;t<s.length;t++)if(e==s[t])return 1;for(var t=0;t<a.length;t++)if(""!=n.trim(p)&&e==a[t])return-1;return 0},u="",p="",c=[];r.runMode(e,"sparql11",function(e,t){c.push(t);var n=l(e,t);if(0!=n){if(1==n){u+=e+"\n";p=""}else{u+="\n"+e;p=e}c=[]}else{p+=e;u+=e}1==c.length&&"sp-ws"==c[0]&&(c=[])});return n.trim(u.replace(/\n\s*\n/g,"\n"))};e("./sparql.js").use(a);e("./defaults.js").use(a);a.version={CodeMirror:r.version,YASQE:e("../package.json").version,jquery:n.fn.jquery,"yasgui-utils":o.version}},{"../lib/deparam.js":12,"../lib/flint.js":13,"../package.json":29,"./autocompleters/autocompleterBase.js":30,"./autocompleters/classes.js":31,"./autocompleters/prefixes.js":32,"./autocompleters/properties.js":33,"./autocompleters/variables.js":35,"./defaults.js":36,"./imgs.js":37,"./prefixUtils.js":39,"./sparql.js":40,"./tokenUtils.js":41,"./tooltip":42,"./utils.js":43,codemirror:void 0,"codemirror/addon/display/fullscreen.js":15,"codemirror/addon/edit/matchbrackets.js":16,"codemirror/addon/fold/brace-fold.js":17,"codemirror/addon/fold/foldcode.js":18,"codemirror/addon/fold/foldgutter.js":19,"codemirror/addon/fold/xml-fold.js":20,"codemirror/addon/hint/show-hint.js":21,"codemirror/addon/runmode/runmode.js":22,"codemirror/addon/search/searchcursor.js":23,jquery:void 0,"yasgui-utils":26}],39:[function(e,t){"use strict";var n=function(e,t){var n=e.getPrefixesFromQuery(); if("string"==typeof t)r(e,t);else for(var i in t)i in n||r(e,i+": <"+t[i]+">")},r=function(e,t){for(var n=null,r=0,i=e.lineCount(),o=0;i>o;o++){var a=e.getNextNonWsToken(o);if(null!=a&&("PREFIX"==a.string||"BASE"==a.string)){n=a;r=o}}if(null==n)e.replaceRange("PREFIX "+t+"\n",{line:0,ch:0});else{var l=s(e,r);e.replaceRange("\n"+l+"PREFIX "+t,{line:r})}},i=function(e,t){var n=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")};for(var r in t)e.setValue(e.getValue().replace(new RegExp("PREFIX\\s*"+r+":\\s*"+n("<"+t[r]+">")+"\\s*","ig"),""))},o=function(e){for(var t={},n=!0,r=function(i,s){if(n){s||(s=1);var a=e.getNextNonWsToken(o,s);if(a){-1==a.state.possibleCurrent.indexOf("PREFIX")&&-1==a.state.possibleNext.indexOf("PREFIX")&&(n=!1);if("PREFIX"==a.string.toUpperCase()){var l=e.getNextNonWsToken(o,a.end+1);if(l){var u=e.getNextNonWsToken(o,l.end+1);if(u){var p=u.string;0==p.indexOf("<")&&(p=p.substring(1));">"==p.slice(-1)&&(p=p.substring(0,p.length-1));t[l.string.slice(0,-1)]=p;r(i,u.end+1)}else r(i,l.end+1)}else r(i,a.end+1)}else r(i,a.end+1)}}},i=e.lineCount(),o=0;i>o&&n;o++)r(o);return t},s=function(e,t,n){void 0==n&&(n=1);var r=e.getTokenAt({line:t,ch:n});return null==r||void 0==r||"ws"!=r.type?"":r.string+s(e,t,r.end+1)};t.exports={addPrefixes:n,getPrefixesFromQuery:o,removePrefixes:i}},{}],40:[function(e,t){"use strict";var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}();t.exports={use:function(e){e.executeQuery=function(t,i){var o="function"==typeof i?i:null,s="object"==typeof i?i:{},a=t.getQueryMode();t.options.sparql&&(s=n.extend({},t.options.sparql,s));s.handlers&&n.extend(!0,s.callbacks,s.handlers);if(s.endpoint&&0!=s.endpoint.length){var l={url:"function"==typeof s.endpoint?s.endpoint(t):s.endpoint,type:"function"==typeof s.requestMethod?s.requestMethod(t):s.requestMethod,data:[{name:a,value:t.getValue()}],headers:{Accept:r(t,s)}},u=!1;if(s.callbacks)for(var p in s.callbacks)if(s.callbacks[p]){u=!0;l[p]=s.callbacks[p]}if(u||o){o&&(l.complete=o);if(s.namedGraphs&&s.namedGraphs.length>0)for(var c="query"==a?"named-graph-uri":"using-named-graph-uri ",d=0;d<s.namedGraphs.length;d++)l.data.push({name:c,value:s.namedGraphs[d]});if(s.defaultGraphs&&s.defaultGraphs.length>0)for(var c="query"==a?"default-graph-uri":"using-graph-uri ",d=0;d<s.defaultGraphs.length;d++)l.data.push({name:c,value:s.defaultGraphs[d]});s.headers&&!n.isEmptyObject(s.headers)&&n.extend(l.headers,s.headers);s.args&&s.args.length>0&&n.merge(l.data,s.args);e.updateQueryButton(t,"busy");var f=function(){e.updateQueryButton(t)};l.complete=l.complete?[f,l.complete]:f;t.xhr=n.ajax(l)}}}}};var r=function(e,t){var n=null;if(!t.acceptHeader||t.acceptHeaderGraph||t.acceptHeaderSelect||t.acceptHeaderUpdate)if("update"==e.getQueryMode())n="function"==typeof t.acceptHeader?t.acceptHeaderUpdate(e):t.acceptHeaderUpdate;else{var r=e.getQueryType();n="DESCRIBE"==r||"CONSTRUCT"==r?"function"==typeof t.acceptHeaderGraph?t.acceptHeaderGraph(e):t.acceptHeaderGraph:"function"==typeof t.acceptHeaderSelect?t.acceptHeaderSelect(e):t.acceptHeaderSelect}else n="function"==typeof t.acceptHeader?t.acceptHeader(e):t.acceptHeader;return n}},{jquery:void 0}],41:[function(e,t){"use strict";var n=function(e,t,r){r||(r=e.getCursor());t||(t=e.getTokenAt(r));var i=e.getTokenAt({line:r.line,ch:t.start});if(null!=i.type&&"ws"!=i.type&&null!=t.type&&"ws"!=t.type){t.start=i.start;t.string=i.string+t.string;return n(e,t,{line:r.line,ch:i.start})}if(null!=t.type&&"ws"==t.type){t.start=t.start+1;t.string=t.string.substring(1);return t}return t},r=function(e,t,n){var i=e.getTokenAt({line:t,ch:n.start});null!=i&&"ws"==i.type&&(i=r(e,t,i));return i},i=function(e,t,n){void 0==n&&(n=1);var r=e.getTokenAt({line:t,ch:n});return null==r||void 0==r||r.end<n?null:"ws"==r.type?i(e,t,r.end+1):r};t.exports={getPreviousNonWsToken:r,getCompleteToken:n,getNextNonWsToken:i}},{}],42:[function(e,t){"use strict";{var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}();e("./utils.js")}t.exports=function(e,t,r){var i,t=n(t);t.hover(function(){"function"==typeof r&&(r=r());i=n("<div>").addClass("yasqe_tooltip").html(r).appendTo(t);o()},function(){n(".yasqe_tooltip").remove()});var o=function(){if(n(e.getWrapperElement()).offset().top>=i.offset().top){i.css("bottom","auto");i.css("top","26px")}}}},{"./utils.js":43,jquery:void 0}],43:[function(e,t){"use strict";var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),r=function(e,t){var n=!1;try{void 0!==e[t]&&(n=!0)}catch(r){}return n},i=function(e,t){var n=null;t&&(n="string"==typeof t?t:t(e));return n},o=function(){function e(e){var t,r,i;t=n(e).offset();r=n(e).width();i=n(e).height();return[[t.left,t.left+r],[t.top,t.top+i]]}function t(e,t){var n,r;n=e[0]<t[0]?e:t;r=e[0]<t[0]?t:e;return n[1]>r[0]||n[0]===r[0]}return function(n,r){var i=e(n),o=e(r);return t(i[0],o[0])&&t(i[1],o[1])}}();t.exports={keyExists:r,getPersistencyId:i,elementsOverlap:o}},{jquery:void 0}],44:[function(e){var t,n=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),r=n(document),i=n("head"),o=null,s=[],a=0,l="id",u="px",p="JColResizer",c=parseInt,d=Math,f=navigator.userAgent.indexOf("Trident/4.0")>0;try{t=sessionStorage}catch(h){}i.append("<style type='text/css'> .JColResizer{table-layout:fixed;} .JColResizer td, .JColResizer th{overflow:hidden;padding-left:0!important; padding-right:0!important;} .JCLRgrips{ height:0px; position:relative;} .JCLRgrip{margin-left:-5px; position:absolute; z-index:5; } .JCLRgrip .JColResizer{position:absolute;background-color:red;filter:alpha(opacity=1);opacity:0;width:10px;height:100%;top:0px} .JCLRLastGrip{position:absolute; width:1px; } .JCLRgripDrag{ border-left:1px dotted black; }</style>");var g=function(e,t){var r=n(e);if(t.disable)return m(r);var i=r.id=r.attr(l)||p+a++;r.p=t.postbackSafe;if(r.is("table")&&!s[i]){r.addClass(p).attr(l,i).before('<div class="JCLRgrips"/>');r.opt=t;r.g=[];r.c=[];r.w=r.width();r.gc=r.prev();t.marginLeft&&r.gc.css("marginLeft",t.marginLeft);t.marginRight&&r.gc.css("marginRight",t.marginRight);r.cs=c(f?e.cellSpacing||e.currentStyle.borderSpacing:r.css("border-spacing"))||2;r.b=c(f?e.border||e.currentStyle.borderLeftWidth:r.css("border-left-width"))||1;s[i]=r;E(r)}},m=function(e){var t=e.attr(l),e=s[t];if(e&&e.is("table")){e.removeClass(p).gc.remove();delete s[t]}},E=function(e){var r=e.find(">thead>tr>th,>thead>tr>td");r.length||(r=e.find(">tbody>tr:first>th,>tr:first>th,>tbody>tr:first>td, >tr:first>td"));e.cg=e.find("col");e.ln=r.length;e.p&&t&&t[e.id]&&v(e,r);r.each(function(t){var r=n(this),i=n(e.gc.append('<div class="JCLRgrip"></div>')[0].lastChild);i.t=e;i.i=t;i.c=r;r.w=r.width();e.g.push(i);e.c.push(r);r.width(r.w).removeAttr("width");t<e.ln-1?i.bind("touchstart mousedown",A).append(e.opt.gripInnerHtml).append('<div class="'+p+'" style="cursor:'+e.opt.hoverCursor+'"></div>'):i.addClass("JCLRLastGrip").removeClass("JCLRgrip");i.data(p,{i:t,t:e.attr(l)})});e.cg.removeAttr("width");x(e);e.find("td, th").not(r).not("table th, table td").each(function(){n(this).removeAttr("width")})},v=function(e,n){var r,i=0,o=0,s=[];if(n){e.cg.removeAttr("width");if(e.opt.flush){t[e.id]="";return}r=t[e.id].split(";");for(;o<e.ln;o++){s.push(100*r[o]/r[e.ln]+"%");n.eq(o).css("width",s[o])}for(o=0;o<e.ln;o++)e.cg.eq(o).css("width",s[o])}else{t[e.id]="";for(;o<e.c.length;o++){r=e.c[o].width();t[e.id]+=r+";";i+=r}t[e.id]+=i}},x=function(e){e.gc.width(e.w);for(var t=0;t<e.ln;t++){var n=e.c[t];e.g[t].css({left:n.offset().left-e.offset().left+n.outerWidth(!1)+e.cs/2+u,height:e.opt.headerOnly?e.c[0].outerHeight(!1):e.outerHeight(!1)})}},y=function(e,t,n){var r=o.x-o.l,i=e.c[t],s=e.c[t+1],a=i.w+r,l=s.w-r;i.width(a+u);s.width(l+u);e.cg.eq(t).width(a+u);e.cg.eq(t+1).width(l+u);if(n){i.w=a;s.w=l}},N=function(e){if(o){var t=o.t;if(e.originalEvent.touches)var n=e.originalEvent.touches[0].pageX-o.ox+o.l;else var n=e.pageX-o.ox+o.l;var r=t.opt.minWidth,i=o.i,s=1.5*t.cs+r+t.b,a=i==t.ln-1?t.w-s:t.g[i+1].position().left-t.cs-r,l=i?t.g[i-1].position().left+t.cs+r:s;n=d.max(l,d.min(a,n));o.x=n;o.css("left",n+u);if(t.opt.liveDrag){y(t,i);x(t);var p=t.opt.onDrag;if(p){e.currentTarget=t[0];p(e)}}return!1}},I=function(e){r.unbind("touchend."+p+" mouseup."+p).unbind("touchmove."+p+" mousemove."+p);n("head :last-child").remove();if(o){o.removeClass(o.t.opt.draggingClass);var i=o.t,s=i.opt.onResize;if(o.x){y(i,o.i,!0);x(i);if(s){e.currentTarget=i[0];s(e)}}i.p&&t&&v(i);o=null}},A=function(e){var t=n(this).data(p),a=s[t.t],l=a.g[t.i];l.ox=e.originalEvent.touches?e.originalEvent.touches[0].pageX:e.pageX;l.l=l.position().left;r.bind("touchmove."+p+" mousemove."+p,N).bind("touchend."+p+" mouseup."+p,I);i.append("<style type='text/css'>*{cursor:"+a.opt.dragCursor+"!important}</style>");l.addClass(a.opt.draggingClass);o=l;if(a.c[t.i].l)for(var u,c=0;c<a.ln;c++){u=a.c[c];u.l=!1;u.w=u.width()}return!1},T=function(){for(t in s){var e,t=s[t],n=0;t.removeClass(p);if(t.w!=t.width()){t.w=t.width();for(e=0;e<t.ln;e++)n+=t.c[e].w;for(e=0;e<t.ln;e++)t.c[e].css("width",d.round(1e3*t.c[e].w/n)/10+"%").l=!0}x(t.addClass(p))}};n(window).bind("resize."+p,T);n.fn.extend({colResizable:function(e){var t={draggingClass:"JCLRgripDrag",gripInnerHtml:"",liveDrag:!1,minWidth:15,headerOnly:!1,hoverCursor:"e-resize",dragCursor:"e-resize",postbackSafe:!1,flush:!1,marginLeft:null,marginRight:null,disable:!1,onDrag:null,onResize:null},e=n.extend(t,e);return this.each(function(){g(this,e)})}})},{jquery:void 0}],45:[function(){RegExp.escape=function(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")};(function(e){"use strict";e.csv={defaults:{separator:",",delimiter:'"',headers:!0},hooks:{castToScalar:function(e){var t=/\./;if(isNaN(e))return e;if(t.test(e))return parseFloat(e);var n=parseInt(e);return isNaN(n)?null:n}},parsers:{parse:function(e,t){function n(){l=0;u="";if(t.start&&t.state.rowNum<t.start){a=[];t.state.rowNum++;t.state.colNum=1}else{if(void 0===t.onParseEntry)s.push(a);else{var e=t.onParseEntry(a,t.state);e!==!1&&s.push(e)}a=[];t.end&&t.state.rowNum>=t.end&&(p=!0);t.state.rowNum++;t.state.colNum=1}}function r(){if(void 0===t.onParseValue)a.push(u);else{var e=t.onParseValue(u,t.state);e!==!1&&a.push(e)}u="";l=0;t.state.colNum++}var i=t.separator,o=t.delimiter;t.state.rowNum||(t.state.rowNum=1);t.state.colNum||(t.state.colNum=1);var s=[],a=[],l=0,u="",p=!1,c=RegExp.escape(i),d=RegExp.escape(o),f=/(D|S|\n|\r|[^DS\r\n]+)/,h=f.source;h=h.replace(/S/g,c);h=h.replace(/D/g,d);f=RegExp(h,"gm");e.replace(f,function(e){if(!p)switch(l){case 0:if(e===i){u+="";r();break}if(e===o){l=1;break}if("\n"===e){r();n();break}if(/^\r$/.test(e))break;u+=e;l=3;break;case 1:if(e===o){l=2;break}u+=e;l=1;break;case 2:if(e===o){u+=e;l=1;break}if(e===i){r();break}if("\n"===e){r();n();break}if(/^\r$/.test(e))break;throw new Error("CSVDataError: Illegal State [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");case 3:if(e===i){r();break}if("\n"===e){r();n();break}if(/^\r$/.test(e))break;if(e===o)throw new Error("CSVDataError: Illegal Quote [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");throw new Error("CSVDataError: Illegal Data [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");default:throw new Error("CSVDataError: Unknown State [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]")}});if(0!==a.length){r();n()}return s},splitLines:function(e,t){function n(){s=0;if(t.start&&t.state.rowNum<t.start){a="";t.state.rowNum++}else{if(void 0===t.onParseEntry)o.push(a);else{var e=t.onParseEntry(a,t.state);e!==!1&&o.push(e)}a="";t.end&&t.state.rowNum>=t.end&&(l=!0);t.state.rowNum++}}var r=t.separator,i=t.delimiter;t.state.rowNum||(t.state.rowNum=1);var o=[],s=0,a="",l=!1,u=RegExp.escape(r),p=RegExp.escape(i),c=/(D|S|\n|\r|[^DS\r\n]+)/,d=c.source;d=d.replace(/S/g,u);d=d.replace(/D/g,p);c=RegExp(d,"gm");e.replace(c,function(e){if(!l)switch(s){case 0:if(e===r){a+=e;s=0;break}if(e===i){a+=e;s=1;break}if("\n"===e){n();break}if(/^\r$/.test(e))break;a+=e;s=3;break;case 1:if(e===i){a+=e;s=2;break}a+=e;s=1;break;case 2:var o=a.substr(a.length-1);if(e===i&&o===i){a+=e;s=1;break}if(e===r){a+=e;s=0;break}if("\n"===e){n();break}if("\r"===e)break;throw new Error("CSVDataError: Illegal state [Row:"+t.state.rowNum+"]");case 3:if(e===r){a+=e;s=0;break}if("\n"===e){n();break}if("\r"===e)break;if(e===i)throw new Error("CSVDataError: Illegal quote [Row:"+t.state.rowNum+"]");throw new Error("CSVDataError: Illegal state [Row:"+t.state.rowNum+"]");default:throw new Error("CSVDataError: Unknown state [Row:"+t.state.rowNum+"]")}});""!==a&&n();return o},parseEntry:function(e,t){function n(){if(void 0===t.onParseValue)o.push(a);else{var e=t.onParseValue(a,t.state);e!==!1&&o.push(e)}a="";s=0;t.state.colNum++}var r=t.separator,i=t.delimiter;t.state.rowNum||(t.state.rowNum=1);t.state.colNum||(t.state.colNum=1);var o=[],s=0,a="";if(!t.match){var l=RegExp.escape(r),u=RegExp.escape(i),p=/(D|S|\n|\r|[^DS\r\n]+)/,c=p.source;c=c.replace(/S/g,l);c=c.replace(/D/g,u);t.match=RegExp(c,"gm")}e.replace(t.match,function(e){switch(s){case 0:if(e===r){a+="";n();break}if(e===i){s=1;break}if("\n"===e||"\r"===e)break;a+=e;s=3;break;case 1:if(e===i){s=2;break}a+=e;s=1;break;case 2:if(e===i){a+=e;s=1;break}if(e===r){n();break}if("\n"===e||"\r"===e)break;throw new Error("CSVDataError: Illegal State [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");case 3:if(e===r){n();break}if("\n"===e||"\r"===e)break;if(e===i)throw new Error("CSVDataError: Illegal Quote [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");throw new Error("CSVDataError: Illegal Data [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]");default:throw new Error("CSVDataError: Unknown State [Row:"+t.state.rowNum+"][Col:"+t.state.colNum+"]")}});n();return o}},toArray:function(t,n,r){var n=void 0!==n?n:{},i={};i.callback=void 0!==r&&"function"==typeof r?r:!1;i.separator="separator"in n?n.separator:e.csv.defaults.separator;i.delimiter="delimiter"in n?n.delimiter:e.csv.defaults.delimiter;var o=void 0!==n.state?n.state:{},n={delimiter:i.delimiter,separator:i.separator,onParseEntry:n.onParseEntry,onParseValue:n.onParseValue,state:o},s=e.csv.parsers.parseEntry(t,n);if(!i.callback)return s;i.callback("",s);return void 0},toArrays:function(t,n,r){var n=void 0!==n?n:{},i={};i.callback=void 0!==r&&"function"==typeof r?r:!1;i.separator="separator"in n?n.separator:e.csv.defaults.separator;i.delimiter="delimiter"in n?n.delimiter:e.csv.defaults.delimiter;var o=[],n={delimiter:i.delimiter,separator:i.separator,onParseEntry:n.onParseEntry,onParseValue:n.onParseValue,start:n.start,end:n.end,state:{rowNum:1,colNum:1}};o=e.csv.parsers.parse(t,n);if(!i.callback)return o;i.callback("",o);return void 0},toObjects:function(t,n,r){var n=void 0!==n?n:{},i={};i.callback=void 0!==r&&"function"==typeof r?r:!1;i.separator="separator"in n?n.separator:e.csv.defaults.separator;i.delimiter="delimiter"in n?n.delimiter:e.csv.defaults.delimiter;i.headers="headers"in n?n.headers:e.csv.defaults.headers;n.start="start"in n?n.start:1;i.headers&&n.start++;n.end&&i.headers&&n.end++;var o=[],s=[],n={delimiter:i.delimiter,separator:i.separator,onParseEntry:n.onParseEntry,onParseValue:n.onParseValue,start:n.start,end:n.end,state:{rowNum:1,colNum:1},match:!1},a={delimiter:i.delimiter,separator:i.separator,start:1,end:1,state:{rowNum:1,colNum:1}},l=e.csv.parsers.splitLines(t,a),u=e.csv.toArray(l[0],n),o=e.csv.parsers.splitLines(t,n);n.state.colNum=1;n.state.rowNum=u?2:1;for(var p=0,c=o.length;c>p;p++){var d=e.csv.toArray(o[p],n),f={};for(var h in u)f[u[h]]=d[h];s.push(f);n.state.rowNum++}if(!i.callback)return s;i.callback("",s);return void 0},fromArrays:function(t,n,r){var n=void 0!==n?n:{},o={};o.callback=void 0!==r&&"function"==typeof r?r:!1;o.separator="separator"in n?n.separator:e.csv.defaults.separator;o.delimiter="delimiter"in n?n.delimiter:e.csv.defaults.delimiter;o.escaper="escaper"in n?n.escaper:e.csv.defaults.escaper;o.experimental="experimental"in n?n.experimental:!1;if(!o.experimental)throw new Error("not implemented");var s=[];for(i in t)s.push(t[i]);if(!o.callback)return s;o.callback("",s);return void 0},fromObjects2CSV:function(t,n,r){var n=void 0!==n?n:{},o={};o.callback=void 0!==r&&"function"==typeof r?r:!1;o.separator="separator"in n?n.separator:e.csv.defaults.separator;o.delimiter="delimiter"in n?n.delimiter:e.csv.defaults.delimiter;o.experimental="experimental"in n?n.experimental:!1;if(!o.experimental)throw new Error("not implemented");var s=[];for(i in t)s.push(arrays[i]);if(!o.callback)return s;o.callback("",s);return void 0}};e.csvEntry2Array=e.csv.toArray;e.csv2Array=e.csv.toArrays;e.csv2Dictionary=e.csv.toObjects})(jQuery)},{}],46:[function(e,t){t.exports=e(16)},{"/home/lrd900/yasgui/yasgui/node_modules/yasgui-yasqe/node_modules/codemirror/addon/edit/matchbrackets.js":16,codemirror:void 0}],47:[function(e,t){t.exports=e(17)},{"/home/lrd900/yasgui/yasgui/node_modules/yasgui-yasqe/node_modules/codemirror/addon/fold/brace-fold.js":17,codemirror:void 0}],48:[function(e,t){t.exports=e(18)},{"/home/lrd900/yasgui/yasgui/node_modules/yasgui-yasqe/node_modules/codemirror/addon/fold/foldcode.js":18,codemirror:void 0}],49:[function(e,t){t.exports=e(19)},{"./foldcode":48,"/home/lrd900/yasgui/yasgui/node_modules/yasgui-yasqe/node_modules/codemirror/addon/fold/foldgutter.js":19,codemirror:void 0}],50:[function(e,t){t.exports=e(20)},{"/home/lrd900/yasgui/yasgui/node_modules/yasgui-yasqe/node_modules/codemirror/addon/fold/xml-fold.js":20,codemirror:void 0}],51:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(function(){try{return t("codemirror")}catch(e){return window.CodeMirror}}()):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";e.defineMode("javascript",function(t,n){function r(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function i(e,t,n){ht=e;gt=n;return t}function o(e,t){var n=e.next();if('"'==n||"'"==n){t.tokenize=s(n);return t.tokenize(e,t)}if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return i("number","number");if("."==n&&e.match(".."))return i("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return i(n);if("="==n&&e.eat(">"))return i("=>","operator");if("0"==n&&e.eat(/x/i)){e.eatWhile(/[\da-f]/i);return i("number","number")}if(/\d/.test(n)){e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return i("number","number")}if("/"==n){if(e.eat("*")){t.tokenize=a;return a(e,t)}if(e.eat("/")){e.skipToEnd();return i("comment","comment")}if("operator"==t.lastType||"keyword c"==t.lastType||"sof"==t.lastType||/^[\[{}\(,;:]$/.test(t.lastType)){r(e);e.eatWhile(/[gimy]/);return i("regexp","string-2")}e.eatWhile(At);return i("operator","operator",e.current())}if("`"==n){t.tokenize=l;return l(e,t)}if("#"==n){e.skipToEnd();return i("error","error")}if(At.test(n)){e.eatWhile(At);return i("operator","operator",e.current())}if(Nt.test(n)){e.eatWhile(Nt);var o=e.current(),u=It.propertyIsEnumerable(o)&&It[o];return u&&"."!=t.lastType?i(u.type,u.style,o):i("variable","variable",o)}}function s(e){return function(t,n){var r,s=!1;if(vt&&"@"==t.peek()&&t.match(Tt)){n.tokenize=o;return i("jsonld-keyword","meta")}for(;null!=(r=t.next())&&(r!=e||s);)s=!s&&"\\"==r;s||(n.tokenize=o);return i("string","string")}}function a(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=o;break}r="*"==n}return i("comment","comment")}function l(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=o;break}r=!r&&"\\"==n}return i("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(0>n)){for(var r=0,i=!1,o=n-1;o>=0;--o){var s=e.string.charAt(o),a=Lt.indexOf(s);if(a>=0&&3>a){if(!r){++o;break}if(0==--r)break}else if(a>=3&&6>a)++r;else if(Nt.test(s))i=!0;else{if(/["'\/]/.test(s))return;if(i&&!r){++o;break}}}i&&!r&&(t.fatArrowAt=o)}}function p(e,t,n,r,i,o){this.indented=e;this.column=t;this.type=n;this.prev=i;this.info=o;null!=r&&(this.align=r)}function c(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function d(e,t,n,r,i){var o=e.cc;Ct.state=e;Ct.stream=i;Ct.marked=null,Ct.cc=o;Ct.style=t;e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);for(;;){var s=o.length?o.pop():xt?I:N;if(s(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Ct.marked?Ct.marked:"variable"==n&&c(e,r)?"variable-2":t}}}function f(){for(var e=arguments.length-1;e>=0;e--)Ct.cc.push(arguments[e])}function h(){f.apply(null,arguments);return!0}function g(e){function t(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var r=Ct.state;if(r.context){Ct.marked="def";if(t(r.localVars))return;r.localVars={name:e,next:r.localVars}}else{if(t(r.globalVars))return;n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}function m(){Ct.state.context={prev:Ct.state.context,vars:Ct.state.localVars};Ct.state.localVars=bt}function E(){Ct.state.localVars=Ct.state.context.vars;Ct.state.context=Ct.state.context.prev}function v(e,t){var n=function(){var n=Ct.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new p(r,Ct.stream.column(),e,null,n.lexical,t)};n.lex=!0;return n}function x(){var e=Ct.state;if(e.lexical.prev){")"==e.lexical.type&&(e.indented=e.lexical.indented);e.lexical=e.lexical.prev}}function y(e){function t(n){return n==e?h():";"==e?f():h(t)}return t}function N(e,t){if("var"==e)return h(v("vardef",t.length),V,y(";"),x);if("keyword a"==e)return h(v("form"),I,N,x);if("keyword b"==e)return h(v("form"),N,x);if("{"==e)return h(v("}"),j,x);if(";"==e)return h();if("if"==e){"else"==Ct.state.lexical.info&&Ct.state.cc[Ct.state.cc.length-1]==x&&Ct.state.cc.pop()();return h(v("form"),I,N,x,K)}return"function"==e?h(et):"for"==e?h(v("form"),Y,N,x):"variable"==e?h(v("stat"),F):"switch"==e?h(v("form"),I,v("}","switch"),y("{"),j,x,x):"case"==e?h(I,y(":")):"default"==e?h(y(":")):"catch"==e?h(v("form"),m,y("("),tt,y(")"),N,x,E):"module"==e?h(v("form"),m,st,E,x):"class"==e?h(v("form"),nt,x):"export"==e?h(v("form"),at,x):"import"==e?h(v("form"),lt,x):f(v("stat"),I,y(";"),x)}function I(e){return T(e,!1)}function A(e){return T(e,!0)}function T(e,t){if(Ct.state.fatArrowAt==Ct.stream.start){var n=t?_:O;if("("==e)return h(m,v(")"),G(H,")"),x,y("=>"),n,E);if("variable"==e)return f(m,H,y("=>"),n,E)}var r=t?b:C;return St.hasOwnProperty(e)?h(r):"function"==e?h(et,r):"keyword c"==e?h(t?S:L):"("==e?h(v(")"),L,ft,y(")"),x,r):"operator"==e||"spread"==e?h(t?A:I):"["==e?h(v("]"),ct,x,r):"{"==e?U(M,"}",null,r):"quasi"==e?f(R,r):h()}function L(e){return e.match(/[;\}\)\],]/)?f():f(I)}function S(e){return e.match(/[;\}\)\],]/)?f():f(A)}function C(e,t){return","==e?h(I):b(e,t,!1)}function b(e,t,n){var r=0==n?C:b,i=0==n?I:A;return"=>"==e?h(m,n?_:O,E):"operator"==e?/\+\+|--/.test(t)?h(r):"?"==t?h(I,y(":"),i):h(i):"quasi"==e?f(R,r):";"!=e?"("==e?U(A,")","call",r):"."==e?h(P,r):"["==e?h(v("]"),L,y("]"),x,r):void 0:void 0}function R(e,t){return"quasi"!=e?f():"${"!=t.slice(t.length-2)?h(R):h(I,w)}function w(e){if("}"==e){Ct.marked="string-2";Ct.state.tokenize=l;return h(R)}}function O(e){u(Ct.stream,Ct.state);return f("{"==e?N:I)}function _(e){u(Ct.stream,Ct.state);return f("{"==e?N:A)}function F(e){return":"==e?h(x,N):f(C,y(";"),x)}function P(e){if("variable"==e){Ct.marked="property";return h()}}function M(e,t){if("variable"==e||"keyword"==Ct.style){Ct.marked="property";return h("get"==t||"set"==t?k:D)}if("number"==e||"string"==e){Ct.marked=vt?"property":Ct.style+" property";return h(D)}return"jsonld-keyword"==e?h(D):"["==e?h(I,y("]"),D):void 0}function k(e){if("variable"!=e)return f(D);Ct.marked="property";return h(et)}function D(e){return":"==e?h(A):"("==e?f(et):void 0}function G(e,t){function n(r){if(","==r){var i=Ct.state.lexical;"call"==i.info&&(i.pos=(i.pos||0)+1);return h(e,n)}return r==t?h():h(y(t))}return function(r){return r==t?h():f(e,n)}}function U(e,t,n){for(var r=3;r<arguments.length;r++)Ct.cc.push(arguments[r]);return h(v(t,n),G(e,t),x)}function j(e){return"}"==e?h():f(N,j)}function B(e){return yt&&":"==e?h(q):void 0}function q(e){if("variable"==e){Ct.marked="variable-3";return h()}}function V(){return f(H,B,W,$)}function H(e,t){if("variable"==e){g(t);return h()}return"["==e?U(H,"]"):"{"==e?U(z,"}"):void 0}function z(e,t){if("variable"==e&&!Ct.stream.match(/^\s*:/,!1)){g(t);return h(W)}"variable"==e&&(Ct.marked="property");return h(y(":"),H,W)}function W(e,t){return"="==t?h(A):void 0}function $(e){return","==e?h(V):void 0}function K(e,t){return"keyword b"==e&&"else"==t?h(v("form","else"),N,x):void 0}function Y(e){return"("==e?h(v(")"),Q,y(")"),x):void 0}function Q(e){return"var"==e?h(V,y(";"),Z):";"==e?h(Z):"variable"==e?h(X):f(I,y(";"),Z)}function X(e,t){if("in"==t||"of"==t){Ct.marked="keyword";return h(I)}return h(C,Z)}function Z(e,t){if(";"==e)return h(J);if("in"==t||"of"==t){Ct.marked="keyword";return h(I)}return f(I,y(";"),J)}function J(e){")"!=e&&h(I)}function et(e,t){if("*"==t){Ct.marked="keyword";return h(et)}if("variable"==e){g(t);return h(et)}return"("==e?h(m,v(")"),G(tt,")"),x,N,E):void 0}function tt(e){return"spread"==e?h(tt):f(H,B)}function nt(e,t){if("variable"==e){g(t);return h(rt)}}function rt(e,t){return"extends"==t?h(I,rt):"{"==e?h(v("}"),it,x):void 0}function it(e,t){if("variable"==e||"keyword"==Ct.style){Ct.marked="property";return"get"==t||"set"==t?h(ot,et,it):h(et,it)}if("*"==t){Ct.marked="keyword";return h(it)}return";"==e?h(it):"}"==e?h():void 0}function ot(e){if("variable"!=e)return f();Ct.marked="property";return h()}function st(e,t){if("string"==e)return h(N);if("variable"==e){g(t);return h(pt)}}function at(e,t){if("*"==t){Ct.marked="keyword";return h(pt,y(";"))}if("default"==t){Ct.marked="keyword";return h(I,y(";"))}return f(N)}function lt(e){return"string"==e?h():f(ut,pt)}function ut(e,t){if("{"==e)return U(ut,"}");"variable"==e&&g(t);return h()}function pt(e,t){if("from"==t){Ct.marked="keyword";return h(I)}}function ct(e){return"]"==e?h():f(A,dt)}function dt(e){return"for"==e?f(ft,y("]")):","==e?h(G(S,"]")):f(G(A,"]"))}function ft(e){return"for"==e?h(Y,ft):"if"==e?h(I,ft):void 0}var ht,gt,mt=t.indentUnit,Et=n.statementIndent,vt=n.jsonld,xt=n.json||vt,yt=n.typescript,Nt=n.wordCharacters||/[\w$\xa1-\uffff]/,It=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("operator"),o={type:"atom",style:"atom"},s={"if":e("if"),"while":t,"with":t,"else":n,"do":n,"try":n,"finally":n,"return":r,"break":r,"continue":r,"new":r,"delete":r,"throw":r,"debugger":r,"var":e("var"),"const":e("var"),let:e("var"),"function":e("function"),"catch":e("catch"),"for":e("for"),"switch":e("switch"),"case":e("case"),"default":e("default"),"in":i,"typeof":i,"instanceof":i,"true":o,"false":o,"null":o,undefined:o,NaN:o,Infinity:o,"this":e("this"),module:e("module"),"class":e("class"),"super":e("atom"),"yield":r,"export":e("export"),"import":e("import"),"extends":r};if(yt){var a={type:"variable",style:"variable-3"},l={"interface":e("interface"),"extends":e("extends"),constructor:e("constructor"),"public":e("public"),"private":e("private"),"protected":e("protected"),"static":e("static"),string:a,number:a,bool:a,any:a};for(var u in l)s[u]=l[u]}return s}(),At=/[+\-*&%=<>!?|~^]/,Tt=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Lt="([{}])",St={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},Ct={state:null,column:null,marked:null,cc:null},bt={name:"this",next:{name:"arguments"}};x.lex=!0;return{startState:function(e){var t={tokenize:o,lastType:"sof",cc:[],lexical:new p((e||0)-mt,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:0};n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars);return t},token:function(e,t){if(e.sol()){t.lexical.hasOwnProperty("align")||(t.lexical.align=!1);t.indented=e.indentation();u(e,t)}if(t.tokenize!=a&&e.eatSpace())return null;var n=t.tokenize(e,t);if("comment"==ht)return n;t.lastType="operator"!=ht||"++"!=gt&&"--"!=gt?ht:"incdec";return d(t,n,ht,gt,e)},indent:function(t,r){if(t.tokenize==a)return e.Pass;if(t.tokenize!=o)return 0;var i=r&&r.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(r))for(var l=t.cc.length-1;l>=0;--l){var u=t.cc[l];if(u==x)s=s.prev;else if(u!=K)break}"stat"==s.type&&"}"==i&&(s=s.prev);Et&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var p=s.type,c=i==p;return"vardef"==p?s.indented+("operator"==t.lastType||","==t.lastType?s.info+1:0):"form"==p&&"{"==i?s.indented:"form"==p?s.indented+mt:"stat"==p?s.indented+("operator"==t.lastType||","==t.lastType?Et||mt:0):"switch"!=s.info||c||0==n.doubleIndentSwitch?s.align?s.column+(c?0:1):s.indented+(c?0:mt):s.indented+(/^(?:case|default)\b/.test(r)?mt:2*mt)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:xt?null:"/*",blockCommentEnd:xt?null:"*/",lineComment:xt?null:"//",fold:"brace",helperType:xt?"json":"javascript",jsonldMode:vt,jsonMode:xt}});e.registerHelper("wordChars","javascript",/[\w$]/);e.defineMIME("text/javascript","javascript");e.defineMIME("text/ecmascript","javascript");e.defineMIME("application/javascript","javascript");e.defineMIME("application/x-javascript","javascript");e.defineMIME("application/ecmascript","javascript");e.defineMIME("application/json",{name:"javascript",json:!0});e.defineMIME("application/x-json",{name:"javascript",json:!0});e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0});e.defineMIME("text/typescript",{name:"javascript",typescript:!0});e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},{codemirror:void 0}],52:[function(t,n,r){(function(i){"object"==typeof r&&"object"==typeof n?i(function(){try{return t("codemirror")}catch(e){return window.CodeMirror}}()):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";e.defineMode("xml",function(t,n){function r(e,t){function n(n){t.tokenize=n;return n(e,t)}var r=e.next();if("<"==r){if(e.eat("!")){if(e.eat("["))return e.match("CDATA[")?n(s("atom","]]>")):null;if(e.match("--"))return n(s("comment","-->"));if(e.match("DOCTYPE",!0,!0)){e.eatWhile(/[\w\._\-]/);return n(a(1))}return null}if(e.eat("?")){e.eatWhile(/[\w\._\-]/);t.tokenize=s("meta","?>");return"meta"}A=e.eat("/")?"closeTag":"openTag";t.tokenize=i;return"tag bracket"}if("&"==r){var o;o=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";");return o?"atom":"error"}e.eatWhile(/[^&<]/);return null}function i(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">")){t.tokenize=r;A=">"==n?"endTag":"selfcloseTag";return"tag bracket"}if("="==n){A="equals";return null}if("<"==n){t.tokenize=r;t.state=c;t.tagName=t.tagStart=null;var i=t.tokenize(e,t);return i?i+" tag error":"tag error"}if(/[\'\"]/.test(n)){t.tokenize=o(n);t.stringStartCol=e.column();return t.tokenize(e,t)}e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}function o(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=i;break}return"string"};t.isInAttribute=!0;return t}function s(e,t){return function(n,i){for(;!n.eol();){if(n.match(t)){i.tokenize=r;break}n.next()}return e}}function a(e){return function(t,n){for(var i;null!=(i=t.next());){if("<"==i){n.tokenize=a(e+1);return n.tokenize(t,n)}if(">"==i){if(1==e){n.tokenize=r;break}n.tokenize=a(e-1);return n.tokenize(t,n)}}return"meta"}}function l(e,t,n){this.prev=e.context;this.tagName=t;this.indent=e.indented;this.startOfLine=n;(L.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function u(e){e.context&&(e.context=e.context.prev)}function p(e,t){for(var n;;){if(!e.context)return;n=e.context.tagName;if(!L.contextGrabbers.hasOwnProperty(n)||!L.contextGrabbers[n].hasOwnProperty(t))return;u(e)}}function c(e,t,n){if("openTag"==e){n.tagStart=t.column();return d}return"closeTag"==e?f:c }function d(e,t,n){if("word"==e){n.tagName=t.current();T="tag";return m}T="error";return d}function f(e,t,n){if("word"==e){var r=t.current();n.context&&n.context.tagName!=r&&L.implicitlyClosed.hasOwnProperty(n.context.tagName)&&u(n);if(n.context&&n.context.tagName==r){T="tag";return h}T="tag error";return g}T="error";return g}function h(e,t,n){if("endTag"!=e){T="error";return h}u(n);return c}function g(e,t,n){T="error";return h(e,t,n)}function m(e,t,n){if("word"==e){T="attribute";return E}if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;n.tagName=n.tagStart=null;if("selfcloseTag"==e||L.autoSelfClosers.hasOwnProperty(r))p(n,r);else{p(n,r);n.context=new l(n,r,i==n.indented)}return c}T="error";return m}function E(e,t,n){if("equals"==e)return v;L.allowMissing||(T="error");return m(e,t,n)}function v(e,t,n){if("string"==e)return x;if("word"==e&&L.allowUnquoted){T="string";return m}T="error";return m(e,t,n)}function x(e,t,n){return"string"==e?x:m(e,t,n)}var y=t.indentUnit,N=n.multilineTagIndentFactor||1,I=n.multilineTagIndentPastTag;null==I&&(I=!0);var A,T,L=n.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1},S=n.alignCDATA;return{startState:function(){return{tokenize:r,state:c,indented:0,tagName:null,tagStart:null,context:null}},token:function(e,t){!t.tagName&&e.sol()&&(t.indented=e.indentation());if(e.eatSpace())return null;A=null;var n=t.tokenize(e,t);if((n||A)&&"comment"!=n){T=null;t.state=t.state(A||n,e,t);T&&(n="error"==T?n+" error":T)}return n},indent:function(t,n,o){var s=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+y;if(s&&s.noIndent)return e.Pass;if(t.tokenize!=i&&t.tokenize!=r)return o?o.match(/^(\s*)/)[0].length:0;if(t.tagName)return I?t.tagStart+t.tagName.length+2:t.tagStart+y*N;if(S&&/<!\[CDATA\[/.test(n))return 0;var a=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(a&&a[1])for(;s;){if(s.tagName==a[2]){s=s.prev;break}if(!L.implicitlyClosed.hasOwnProperty(s.tagName))break;s=s.prev}else if(a)for(;s;){var l=L.contextGrabbers[s.tagName];if(!l||!l.hasOwnProperty(a[2]))break;s=s.prev}for(;s&&!s.startOfLine;)s=s.prev;return s?s.indent+y:0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:n.htmlMode?"html":"xml",helperType:n.htmlMode?"html":"xml"}});e.defineMIME("text/xml","xml");e.defineMIME("application/xml","xml");e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},{codemirror:void 0}],53:[function(t,n){!function(){function t(e,t){return t>e?-1:e>t?1:e>=t?0:0/0}function r(e){return null===e?0/0:+e}function i(e){return!isNaN(e)}function o(e){return{left:function(t,n,r,i){arguments.length<3&&(r=0);arguments.length<4&&(i=t.length);for(;i>r;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){arguments.length<3&&(r=0);arguments.length<4&&(i=t.length);for(;i>r;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}function s(e){return e.length}function a(e){for(var t=1;e*t%1;)t*=10;return t}function l(e,t){for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}function u(){this._=Object.create(null)}function p(e){return(e+="")===xa||e[0]===ya?ya+e:e}function c(e){return(e+="")[0]===ya?e.slice(1):e}function d(e){return p(e)in this._}function f(e){return(e=p(e))in this._&&delete this._[e]}function h(){var e=[];for(var t in this._)e.push(c(t));return e}function g(){var e=0;for(var t in this._)++e;return e}function m(){for(var e in this._)return!1;return!0}function E(){this._=Object.create(null)}function v(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function x(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var n=0,r=Na.length;r>n;++n){var i=Na[n]+t;if(i in e)return i}}function y(){}function N(){}function I(e){function t(){for(var t,r=n,i=-1,o=r.length;++i<o;)(t=r[i].on)&&t.apply(this,arguments);return e}var n=[],r=new u;t.on=function(t,i){var o,s=r.get(t);if(arguments.length<2)return s&&s.on;if(s){s.on=null;n=n.slice(0,o=n.indexOf(s)).concat(n.slice(o+1));r.remove(t)}i&&n.push(r.set(t,{on:i}));return e};return t}function A(){ia.event.preventDefault()}function T(){for(var e,t=ia.event;e=t.sourceEvent;)t=e;return t}function L(e){for(var t=new N,n=0,r=arguments.length;++n<r;)t[arguments[n]]=I(t);t.of=function(n,r){return function(i){try{var o=i.sourceEvent=ia.event;i.target=e;ia.event=i;t[i.type].apply(n,r)}finally{ia.event=o}}};return t}function S(e){Aa(e,ba);return e}function C(e){return"function"==typeof e?e:function(){return Ta(e,this)}}function b(e){return"function"==typeof e?e:function(){return La(e,this)}}function R(e,t){function n(){this.removeAttribute(e)}function r(){this.removeAttributeNS(e.space,e.local)}function i(){this.setAttribute(e,t)}function o(){this.setAttributeNS(e.space,e.local,t)}function s(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}function a(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}e=ia.ns.qualify(e);return null==t?e.local?r:n:"function"==typeof t?e.local?a:s:e.local?o:i}function w(e){return e.trim().replace(/\s+/g," ")}function O(e){return new RegExp("(?:^|\\s+)"+ia.requote(e)+"(?:\\s+|$)","g")}function _(e){return(e+"").trim().split(/^|\s+/)}function F(e,t){function n(){for(var n=-1;++n<i;)e[n](this,t)}function r(){for(var n=-1,r=t.apply(this,arguments);++n<i;)e[n](this,r)}e=_(e).map(P);var i=e.length;return"function"==typeof t?r:n}function P(e){var t=O(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.getAttribute("class")||"";if(r){t.lastIndex=0;t.test(i)||n.setAttribute("class",w(i+" "+e))}else n.setAttribute("class",w(i.replace(t," ")))}}function M(e,t,n){function r(){this.style.removeProperty(e)}function i(){this.style.setProperty(e,t,n)}function o(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}return null==t?r:"function"==typeof t?o:i}function k(e,t){function n(){delete this[e]}function r(){this[e]=t}function i(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}return null==t?n:"function"==typeof t?i:r}function D(e){return"function"==typeof e?e:(e=ia.ns.qualify(e)).local?function(){return this.ownerDocument.createElementNS(e.space,e.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,e)}}function G(){var e=this.parentNode;e&&e.removeChild(this)}function U(e){return{__data__:e}}function j(e){return function(){return Ca(this,e)}}function B(e){arguments.length||(e=t);return function(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}}function q(e,t){for(var n=0,r=e.length;r>n;n++)for(var i,o=e[n],s=0,a=o.length;a>s;s++)(i=o[s])&&t(i,s,n);return e}function V(e){Aa(e,wa);return e}function H(e){var t,n;return function(r,i,o){var s,a=e[o].update,l=a.length;o!=n&&(n=o,t=0);i>=t&&(t=i+1);for(;!(s=a[t])&&++t<l;);return s}}function z(e,t,n){function r(){var t=this[s];if(t){this.removeEventListener(e,t,t.$);delete this[s]}}function i(){var i=l(t,sa(arguments));r.call(this);this.addEventListener(e,this[s]=i,i.$=n);i._=t}function o(){var t,n=new RegExp("^__on([^.]+)"+ia.requote(e)+"$");for(var r in this)if(t=r.match(n)){var i=this[r];this.removeEventListener(t[1],i,i.$);delete this[r]}}var s="__on"+e,a=e.indexOf("."),l=W;a>0&&(e=e.slice(0,a));var u=_a.get(e);u&&(e=u,l=$);return a?t?i:r:t?y:o}function W(e,t){return function(n){var r=ia.event;ia.event=n;t[0]=this.__data__;try{e.apply(this,t)}finally{ia.event=r}}}function $(e,t){var n=W(e,t);return function(e){var t=this,r=e.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||n.call(t,e)}}function K(){var e=".dragsuppress-"+ ++Pa,t="click"+e,n=ia.select(ua).on("touchmove"+e,A).on("dragstart"+e,A).on("selectstart"+e,A);if(Fa){var r=la.style,i=r[Fa];r[Fa]="none"}return function(o){n.on(e,null);Fa&&(r[Fa]=i);if(o){var s=function(){n.on(t,null)};n.on(t,function(){A();s()},!0);setTimeout(s,0)}}}function Y(e,t){t.changedTouches&&(t=t.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(0>Ma&&(ua.scrollX||ua.scrollY)){n=ia.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var i=n[0][0].getScreenCTM();Ma=!(i.f||i.e);n.remove()}Ma?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY);r=r.matrixTransform(e.getScreenCTM().inverse());return[r.x,r.y]}var o=e.getBoundingClientRect();return[t.clientX-o.left-e.clientLeft,t.clientY-o.top-e.clientTop]}function Q(){return ia.event.changedTouches[0].identifier}function X(){return ia.event.target}function Z(){return ua}function J(e){return e>0?1:0>e?-1:0}function et(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function tt(e){return e>1?0:-1>e?Ga:Math.acos(e)}function nt(e){return e>1?Ba:-1>e?-Ba:Math.asin(e)}function rt(e){return((e=Math.exp(e))-1/e)/2}function it(e){return((e=Math.exp(e))+1/e)/2}function ot(e){return((e=Math.exp(2*e))-1)/(e+1)}function st(e){return(e=Math.sin(e/2))*e}function at(){}function lt(e,t,n){return this instanceof lt?void(this.h=+e,this.s=+t,this.l=+n):arguments.length<2?e instanceof lt?new lt(e.h,e.s,e.l):It(""+e,At,lt):new lt(e,t,n)}function ut(e,t,n){function r(e){e>360?e-=360:0>e&&(e+=360);return 60>e?o+(s-o)*e/60:180>e?s:240>e?o+(s-o)*(240-e)/60:o}function i(e){return Math.round(255*r(e))}var o,s;e=isNaN(e)?0:(e%=360)<0?e+360:e;t=isNaN(t)?0:0>t?0:t>1?1:t;n=0>n?0:n>1?1:n;s=.5>=n?n*(1+t):n+t-n*t;o=2*n-s;return new vt(i(e+120),i(e),i(e-120))}function pt(e,t,n){return this instanceof pt?void(this.h=+e,this.c=+t,this.l=+n):arguments.length<2?e instanceof pt?new pt(e.h,e.c,e.l):e instanceof dt?ht(e.l,e.a,e.b):ht((e=Tt((e=ia.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new pt(e,t,n)}function ct(e,t,n){isNaN(e)&&(e=0);isNaN(t)&&(t=0);return new dt(n,Math.cos(e*=qa)*t,Math.sin(e)*t)}function dt(e,t,n){return this instanceof dt?void(this.l=+e,this.a=+t,this.b=+n):arguments.length<2?e instanceof dt?new dt(e.l,e.a,e.b):e instanceof pt?ct(e.h,e.c,e.l):Tt((e=vt(e)).r,e.g,e.b):new dt(e,t,n)}function ft(e,t,n){var r=(e+16)/116,i=r+t/500,o=r-n/200;i=gt(i)*Ja;r=gt(r)*el;o=gt(o)*tl;return new vt(Et(3.2404542*i-1.5371385*r-.4985314*o),Et(-.969266*i+1.8760108*r+.041556*o),Et(.0556434*i-.2040259*r+1.0572252*o))}function ht(e,t,n){return e>0?new pt(Math.atan2(n,t)*Va,Math.sqrt(t*t+n*n),e):new pt(0/0,0/0,e)}function gt(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function mt(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function Et(e){return Math.round(255*(.00304>=e?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function vt(e,t,n){return this instanceof vt?void(this.r=~~e,this.g=~~t,this.b=~~n):arguments.length<2?e instanceof vt?new vt(e.r,e.g,e.b):It(""+e,vt,ut):new vt(e,t,n)}function xt(e){return new vt(e>>16,e>>8&255,255&e)}function yt(e){return xt(e)+""}function Nt(e){return 16>e?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function It(e,t,n){var r,i,o,s=0,a=0,l=0;r=/([a-z]+)\((.*)\)/i.exec(e);if(r){i=r[2].split(",");switch(r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(St(i[0]),St(i[1]),St(i[2]))}}if(o=il.get(e))return t(o.r,o.g,o.b);if(null!=e&&"#"===e.charAt(0)&&!isNaN(o=parseInt(e.slice(1),16)))if(4===e.length){s=(3840&o)>>4;s=s>>4|s;a=240&o;a=a>>4|a;l=15&o;l=l<<4|l}else if(7===e.length){s=(16711680&o)>>16;a=(65280&o)>>8;l=255&o}return t(s,a,l)}function At(e,t,n){var r,i,o=Math.min(e/=255,t/=255,n/=255),s=Math.max(e,t,n),a=s-o,l=(s+o)/2;if(a){i=.5>l?a/(s+o):a/(2-s-o);r=e==s?(t-n)/a+(n>t?6:0):t==s?(n-e)/a+2:(e-t)/a+4;r*=60}else{r=0/0;i=l>0&&1>l?0:r}return new lt(r,i,l)}function Tt(e,t,n){e=Lt(e);t=Lt(t);n=Lt(n);var r=mt((.4124564*e+.3575761*t+.1804375*n)/Ja),i=mt((.2126729*e+.7151522*t+.072175*n)/el),o=mt((.0193339*e+.119192*t+.9503041*n)/tl);return dt(116*i-16,500*(r-i),200*(i-o))}function Lt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function St(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}function Ct(e){return"function"==typeof e?e:function(){return e}}function bt(e){return e}function Rt(e){return function(t,n,r){2===arguments.length&&"function"==typeof n&&(r=n,n=null);return wt(t,n,e,r)}}function wt(e,t,n,r){function i(){var e,t=l.status;if(!t&&_t(l)||t>=200&&300>t||304===t){try{e=n.call(o,l)}catch(r){s.error.call(o,r);return}s.load.call(o,e)}else s.error.call(o,l)}var o={},s=ia.dispatch("beforesend","progress","load","error"),a={},l=new XMLHttpRequest,u=null;!ua.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(e)||(l=new XDomainRequest);"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()};l.onprogress=function(e){var t=ia.event;ia.event=e;try{s.progress.call(o,l)}finally{ia.event=t}};o.header=function(e,t){e=(e+"").toLowerCase();if(arguments.length<2)return a[e];null==t?delete a[e]:a[e]=t+"";return o};o.mimeType=function(e){if(!arguments.length)return t;t=null==e?null:e+"";return o};o.responseType=function(e){if(!arguments.length)return u;u=e;return o};o.response=function(e){n=e;return o};["get","post"].forEach(function(e){o[e]=function(){return o.send.apply(o,[e].concat(sa(arguments)))}});o.send=function(n,r,i){2===arguments.length&&"function"==typeof r&&(i=r,r=null);l.open(n,e,!0);null==t||"accept"in a||(a.accept=t+",*/*");if(l.setRequestHeader)for(var p in a)l.setRequestHeader(p,a[p]);null!=t&&l.overrideMimeType&&l.overrideMimeType(t);null!=u&&(l.responseType=u);null!=i&&o.on("error",i).on("load",function(e){i(null,e)});s.beforesend.call(o,l);l.send(null==r?null:r);return o};o.abort=function(){l.abort();return o};ia.rebind(o,s,"on");return null==r?o:o.get(Ot(r))}function Ot(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}function _t(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}function Ft(){var e=Pt(),t=Mt()-e;if(t>24){if(isFinite(t)){clearTimeout(ll);ll=setTimeout(Ft,t)}al=0}else{al=1;pl(Ft)}}function Pt(){var e=Date.now();ul=ol;for(;ul;){e>=ul.t&&(ul.f=ul.c(e-ul.t));ul=ul.n}return e}function Mt(){for(var e,t=ol,n=1/0;t;)if(t.f)t=e?e.n=t.n:ol=t.n;else{t.t<n&&(n=t.t);t=(e=t).n}sl=e;return n}function kt(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}function Dt(e,t){var n=Math.pow(10,3*va(8-t));return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function Gt(e){var t=e.decimal,n=e.thousands,r=e.grouping,i=e.currency,o=r&&n?function(e,t){for(var i=e.length,o=[],s=0,a=r[0],l=0;i>0&&a>0;){l+a+1>t&&(a=Math.max(1,t-l));o.push(e.substring(i-=a,i+a));if((l+=a+1)>t)break;a=r[s=(s+1)%r.length]}return o.reverse().join(n)}:bt;return function(e){var n=dl.exec(e),r=n[1]||" ",s=n[2]||">",a=n[3]||"-",l=n[4]||"",u=n[5],p=+n[6],c=n[7],d=n[8],f=n[9],h=1,g="",m="",E=!1,v=!0;d&&(d=+d.substring(1));if(u||"0"===r&&"="===s){u=r="0";s="="}switch(f){case"n":c=!0;f="g";break;case"%":h=100;m="%";f="f";break;case"p":h=100;m="%";f="r";break;case"b":case"o":case"x":case"X":"#"===l&&(g="0"+f.toLowerCase());case"c":v=!1;case"d":E=!0;d=0;break;case"s":h=-1;f="r"}"$"===l&&(g=i[0],m=i[1]);"r"!=f||d||(f="g");null!=d&&("g"==f?d=Math.max(1,Math.min(21,d)):("e"==f||"f"==f)&&(d=Math.max(0,Math.min(20,d))));f=fl.get(f)||Ut;var x=u&&c;return function(e){var n=m;if(E&&e%1)return"";var i=0>e||0===e&&0>1/e?(e=-e,"-"):"-"===a?"":a;if(0>h){var l=ia.formatPrefix(e,d);e=l.scale(e);n=l.symbol+m}else e*=h;e=f(e,d);var y,N,I=e.lastIndexOf(".");if(0>I){var A=v?e.lastIndexOf("e"):-1;0>A?(y=e,N=""):(y=e.substring(0,A),N=e.substring(A))}else{y=e.substring(0,I);N=t+e.substring(I+1)}!u&&c&&(y=o(y,1/0));var T=g.length+y.length+N.length+(x?0:i.length),L=p>T?new Array(T=p-T+1).join(r):"";x&&(y=o(L+y,L.length?p-N.length:1/0));i+=g;e=y+N;return("<"===s?i+e+L:">"===s?L+i+e:"^"===s?L.substring(0,T>>=1)+i+e+L.substring(T):i+(x?e:L+e))+n}}}function Ut(e){return e+""}function jt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Bt(e,t,n){function r(t){var n=e(t),r=o(n,1);return r-t>t-n?n:r}function i(n){t(n=e(new gl(n-1)),1);return n}function o(e,n){t(e=new gl(+e),n);return e}function s(e,r,o){var s=i(e),a=[];if(o>1)for(;r>s;){n(s)%o||a.push(new Date(+s));t(s,1)}else for(;r>s;)a.push(new Date(+s)),t(s,1);return a}function a(e,t,n){try{gl=jt;var r=new jt;r._=e;return s(r,t,n)}finally{gl=Date}}e.floor=e;e.round=r;e.ceil=i;e.offset=o;e.range=s;var l=e.utc=qt(e);l.floor=l;l.round=qt(r);l.ceil=qt(i);l.offset=qt(o);l.range=a;return e}function qt(e){return function(t,n){try{gl=jt;var r=new jt;r._=t;return e(r,n)._}finally{gl=Date}}}function Vt(e){function t(e){function t(t){for(var n,i,o,s=[],a=-1,l=0;++a<r;)if(37===e.charCodeAt(a)){s.push(e.slice(l,a));null!=(i=El[n=e.charAt(++a)])&&(n=e.charAt(++a));(o=b[n])&&(n=o(t,null==i?"e"===n?" ":"0":i));s.push(n);l=a+1}s.push(e.slice(l,a));return s.join("")}var r=e.length;t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},i=n(r,e,t,0);if(i!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var o=null!=r.Z&&gl!==jt,s=new(o?jt:gl);if("j"in r)s.setFullYear(r.y,0,r.j);else if("w"in r&&("W"in r||"U"in r)){s.setFullYear(r.y,0,1);s.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(s.getDay()+5)%7:r.w+7*r.U-(s.getDay()+6)%7)}else s.setFullYear(r.y,r.m,r.d);s.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L);return o?s._:s};t.toString=function(){return e};return t}function n(e,t,n,r){for(var i,o,s,a=0,l=t.length,u=n.length;l>a;){if(r>=u)return-1;i=t.charCodeAt(a++);if(37===i){s=t.charAt(a++);o=R[s in El?t.charAt(a++):s];if(!o||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function r(e,t,n){I.lastIndex=0;var r=I.exec(t.slice(n));return r?(e.w=A.get(r[0].toLowerCase()),n+r[0].length):-1}function i(e,t,n){y.lastIndex=0;var r=y.exec(t.slice(n));return r?(e.w=N.get(r[0].toLowerCase()),n+r[0].length):-1}function o(e,t,n){S.lastIndex=0;var r=S.exec(t.slice(n));return r?(e.m=C.get(r[0].toLowerCase()),n+r[0].length):-1}function s(e,t,n){T.lastIndex=0;var r=T.exec(t.slice(n));return r?(e.m=L.get(r[0].toLowerCase()),n+r[0].length):-1}function a(e,t,r){return n(e,b.c.toString(),t,r)}function l(e,t,r){return n(e,b.x.toString(),t,r)}function u(e,t,r){return n(e,b.X.toString(),t,r)}function p(e,t,n){var r=x.get(t.slice(n,n+=2).toLowerCase());return null==r?-1:(e.p=r,n)}var c=e.dateTime,d=e.date,f=e.time,h=e.periods,g=e.days,m=e.shortDays,E=e.months,v=e.shortMonths;t.utc=function(e){function n(e){try{gl=jt;var t=new gl;t._=e;return r(t)}finally{gl=Date}}var r=t(e);n.parse=function(e){try{gl=jt;var t=r.parse(e);return t&&t._}finally{gl=Date}};n.toString=r.toString;return n};t.multi=t.utc.multi=pn;var x=ia.map(),y=zt(g),N=Wt(g),I=zt(m),A=Wt(m),T=zt(E),L=Wt(E),S=zt(v),C=Wt(v);h.forEach(function(e,t){x.set(e.toLowerCase(),t)});var b={a:function(e){return m[e.getDay()]},A:function(e){return g[e.getDay()]},b:function(e){return v[e.getMonth()]},B:function(e){return E[e.getMonth()]},c:t(c),d:function(e,t){return Ht(e.getDate(),t,2)},e:function(e,t){return Ht(e.getDate(),t,2)},H:function(e,t){return Ht(e.getHours(),t,2)},I:function(e,t){return Ht(e.getHours()%12||12,t,2)},j:function(e,t){return Ht(1+hl.dayOfYear(e),t,3)},L:function(e,t){return Ht(e.getMilliseconds(),t,3)},m:function(e,t){return Ht(e.getMonth()+1,t,2)},M:function(e,t){return Ht(e.getMinutes(),t,2)},p:function(e){return h[+(e.getHours()>=12)]},S:function(e,t){return Ht(e.getSeconds(),t,2)},U:function(e,t){return Ht(hl.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return Ht(hl.mondayOfYear(e),t,2)},x:t(d),X:t(f),y:function(e,t){return Ht(e.getFullYear()%100,t,2)},Y:function(e,t){return Ht(e.getFullYear()%1e4,t,4)},Z:ln,"%":function(){return"%"}},R={a:r,A:i,b:o,B:s,c:a,d:tn,e:tn,H:rn,I:rn,j:nn,L:an,m:en,M:on,p:p,S:sn,U:Kt,w:$t,W:Yt,x:l,X:u,y:Xt,Y:Qt,Z:Zt,"%":un};return t}function Ht(e,t,n){var r=0>e?"-":"",i=(r?-e:e)+"",o=i.length;return r+(n>o?new Array(n-o+1).join(t)+i:i)}function zt(e){return new RegExp("^(?:"+e.map(ia.requote).join("|")+")","i")}function Wt(e){for(var t=new u,n=-1,r=e.length;++n<r;)t.set(e[n].toLowerCase(),n);return t}function $t(e,t,n){vl.lastIndex=0;var r=vl.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Kt(e,t,n){vl.lastIndex=0;var r=vl.exec(t.slice(n));return r?(e.U=+r[0],n+r[0].length):-1}function Yt(e,t,n){vl.lastIndex=0;var r=vl.exec(t.slice(n));return r?(e.W=+r[0],n+r[0].length):-1}function Qt(e,t,n){vl.lastIndex=0;var r=vl.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Xt(e,t,n){vl.lastIndex=0;var r=vl.exec(t.slice(n,n+2));return r?(e.y=Jt(+r[0]),n+r[0].length):-1}function Zt(e,t,n){return/^[+-]\d{4}$/.test(t=t.slice(n,n+5))?(e.Z=-t,n+5):-1}function Jt(e){return e+(e>68?1900:2e3)}function en(e,t,n){vl.lastIndex=0;var r=vl.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function tn(e,t,n){vl.lastIndex=0;var r=vl.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function nn(e,t,n){vl.lastIndex=0;var r=vl.exec(t.slice(n,n+3));return r?(e.j=+r[0],n+r[0].length):-1}function rn(e,t,n){vl.lastIndex=0;var r=vl.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function on(e,t,n){vl.lastIndex=0;var r=vl.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function sn(e,t,n){vl.lastIndex=0;var r=vl.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function an(e,t,n){vl.lastIndex=0;var r=vl.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function ln(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=va(t)/60|0,i=va(t)%60;return n+Ht(r,"0",2)+Ht(i,"0",2)}function un(e,t,n){xl.lastIndex=0;var r=xl.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function pn(e){for(var t=e.length,n=-1;++n<t;)e[n][0]=this(e[n][0]);return function(t){for(var n=0,r=e[n];!r[1](t);)r=e[++n];return r[0](t)}}function cn(){}function dn(e,t,n){var r=n.s=e+t,i=r-e,o=r-i;n.t=e-o+(t-i)}function fn(e,t){e&&Al.hasOwnProperty(e.type)&&Al[e.type](e,t)}function hn(e,t,n){var r,i=-1,o=e.length-n;t.lineStart();for(;++i<o;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function gn(e,t){var n=-1,r=e.length;t.polygonStart();for(;++n<r;)hn(e[n],t,1);t.polygonEnd()}function mn(){function e(e,t){e*=qa;t=t*qa/2+Ga/4;var n=e-r,s=n>=0?1:-1,a=s*n,l=Math.cos(t),u=Math.sin(t),p=o*u,c=i*l+p*Math.cos(a),d=p*s*Math.sin(a);Ll.add(Math.atan2(d,c));r=e,i=l,o=u}var t,n,r,i,o;Sl.point=function(s,a){Sl.point=e;r=(t=s)*qa,i=Math.cos(a=(n=a)*qa/2+Ga/4),o=Math.sin(a)};Sl.lineEnd=function(){e(t,n)}}function En(e){var t=e[0],n=e[1],r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}function vn(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function xn(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function yn(e,t){e[0]+=t[0];e[1]+=t[1];e[2]+=t[2]}function Nn(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function In(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t;e[1]/=t;e[2]/=t}function An(e){return[Math.atan2(e[1],e[0]),nt(e[2])]}function Tn(e,t){return va(e[0]-t[0])<ka&&va(e[1]-t[1])<ka}function Ln(e,t){e*=qa;var n=Math.cos(t*=qa);Sn(n*Math.cos(e),n*Math.sin(e),Math.sin(t))}function Sn(e,t,n){++Cl;Rl+=(e-Rl)/Cl;wl+=(t-wl)/Cl;Ol+=(n-Ol)/Cl}function Cn(){function e(e,i){e*=qa;var o=Math.cos(i*=qa),s=o*Math.cos(e),a=o*Math.sin(e),l=Math.sin(i),u=Math.atan2(Math.sqrt((u=n*l-r*a)*u+(u=r*s-t*l)*u+(u=t*a-n*s)*u),t*s+n*a+r*l);bl+=u;_l+=u*(t+(t=s));Fl+=u*(n+(n=a));Pl+=u*(r+(r=l));Sn(t,n,r)}var t,n,r;Gl.point=function(i,o){i*=qa;var s=Math.cos(o*=qa);t=s*Math.cos(i);n=s*Math.sin(i);r=Math.sin(o);Gl.point=e;Sn(t,n,r)}}function bn(){Gl.point=Ln}function Rn(){function e(e,t){e*=qa;var n=Math.cos(t*=qa),s=n*Math.cos(e),a=n*Math.sin(e),l=Math.sin(t),u=i*l-o*a,p=o*s-r*l,c=r*a-i*s,d=Math.sqrt(u*u+p*p+c*c),f=r*s+i*a+o*l,h=d&&-tt(f)/d,g=Math.atan2(d,f);Ml+=h*u;kl+=h*p;Dl+=h*c;bl+=g;_l+=g*(r+(r=s));Fl+=g*(i+(i=a));Pl+=g*(o+(o=l));Sn(r,i,o)}var t,n,r,i,o;Gl.point=function(s,a){t=s,n=a;Gl.point=e;s*=qa;var l=Math.cos(a*=qa);r=l*Math.cos(s);i=l*Math.sin(s);o=Math.sin(a);Sn(r,i,o)};Gl.lineEnd=function(){e(t,n);Gl.lineEnd=bn;Gl.point=Ln}}function wn(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}e.invert&&t.invert&&(n.invert=function(n,r){return n=t.invert(n,r),n&&e.invert(n[0],n[1])});return n}function On(){return!0}function _n(e,t,n,r,i){var o=[],s=[];e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],r=e[t];if(Tn(n,r)){i.lineStart();for(var a=0;t>a;++a)i.point((n=e[a])[0],n[1]);i.lineEnd()}else{var l=new Pn(n,e,null,!0),u=new Pn(n,null,l,!1);l.o=u;o.push(l);s.push(u);l=new Pn(r,e,null,!1);u=new Pn(r,null,l,!0);l.o=u;o.push(l);s.push(u)}}});s.sort(t);Fn(o);Fn(s);if(o.length){for(var a=0,l=n,u=s.length;u>a;++a)s[a].e=l=!l;for(var p,c,d=o[0];;){for(var f=d,h=!0;f.v;)if((f=f.n)===d)return;p=f.z;i.lineStart();do{f.v=f.o.v=!0;if(f.e){if(h)for(var a=0,u=p.length;u>a;++a)i.point((c=p[a])[0],c[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(h){p=f.p.z;for(var a=p.length-1;a>=0;--a)i.point((c=p[a])[0],c[1])}else r(f.x,f.p.x,-1,i);f=f.p}f=f.o;p=f.z;h=!h}while(!f.v);i.lineEnd()}}}function Fn(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r<t;){i.n=n=e[r];n.p=i;i=n}i.n=n=e[0];n.p=i}}function Pn(e,t,n,r){this.x=e;this.z=t;this.o=n;this.e=r;this.v=!1;this.n=this.p=null}function Mn(e,t,n,r){return function(i,o){function s(t,n){var r=i(t,n);e(t=r[0],n=r[1])&&o.point(t,n)}function a(e,t){var n=i(e,t);m.point(n[0],n[1])}function l(){v.point=a;m.lineStart()}function u(){v.point=s;m.lineEnd()}function p(e,t){g.push([e,t]);var n=i(e,t);y.point(n[0],n[1])}function c(){y.lineStart();g=[]}function d(){p(g[0][0],g[0][1]);y.lineEnd();var e,t=y.clean(),n=x.buffer(),r=n.length;g.pop();h.push(g);g=null;if(r)if(1&t){e=n[0];var i,r=e.length-1,s=-1;if(r>0){N||(o.polygonStart(),N=!0);o.lineStart();for(;++s<r;)o.point((i=e[s])[0],i[1]);o.lineEnd()}}else{r>1&&2&t&&n.push(n.pop().concat(n.shift()));f.push(n.filter(kn))}}var f,h,g,m=t(o),E=i.invert(r[0],r[1]),v={point:s,lineStart:l,lineEnd:u,polygonStart:function(){v.point=p;v.lineStart=c;v.lineEnd=d;f=[];h=[]},polygonEnd:function(){v.point=s;v.lineStart=l;v.lineEnd=u;f=ia.merge(f);var e=qn(E,h);if(f.length){N||(o.polygonStart(),N=!0);_n(f,Gn,e,n,o)}else if(e){N||(o.polygonStart(),N=!0);o.lineStart();n(null,null,1,o);o.lineEnd()}N&&(o.polygonEnd(),N=!1);f=h=null},sphere:function(){o.polygonStart();o.lineStart();n(null,null,1,o);o.lineEnd();o.polygonEnd()}},x=Dn(),y=t(x),N=!1;return v}}function kn(e){return e.length>1}function Dn(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,n){e.push([t,n])},lineEnd:y,buffer:function(){var n=t;t=[];e=null;return n},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Gn(e,t){return((e=e.x)[0]<0?e[1]-Ba-ka:Ba-e[1])-((t=t.x)[0]<0?t[1]-Ba-ka:Ba-t[1])}function Un(e){var t,n=0/0,r=0/0,i=0/0;return{lineStart:function(){e.lineStart();t=1},point:function(o,s){var a=o>0?Ga:-Ga,l=va(o-n);if(va(l-Ga)<ka){e.point(n,r=(r+s)/2>0?Ba:-Ba);e.point(i,r);e.lineEnd();e.lineStart();e.point(a,r);e.point(o,r);t=0}else if(i!==a&&l>=Ga){va(n-i)<ka&&(n-=i*ka);va(o-a)<ka&&(o-=a*ka);r=jn(n,r,o,s);e.point(i,r);e.lineEnd();e.lineStart();e.point(a,r);t=0}e.point(n=o,r=s);i=a},lineEnd:function(){e.lineEnd();n=r=0/0},clean:function(){return 2-t}}}function jn(e,t,n,r){var i,o,s=Math.sin(e-n);return va(s)>ka?Math.atan((Math.sin(t)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(t))*Math.sin(e))/(i*o*s)):(t+r)/2}function Bn(e,t,n,r){var i;if(null==e){i=n*Ba;r.point(-Ga,i);r.point(0,i);r.point(Ga,i);r.point(Ga,0);r.point(Ga,-i);r.point(0,-i);r.point(-Ga,-i);r.point(-Ga,0);r.point(-Ga,i)}else if(va(e[0]-t[0])>ka){var o=e[0]<t[0]?Ga:-Ga;i=n*o/2;r.point(-o,i);r.point(0,i);r.point(o,i)}else r.point(t[0],t[1])}function qn(e,t){var n=e[0],r=e[1],i=[Math.sin(n),-Math.cos(n),0],o=0,s=0;Ll.reset();for(var a=0,l=t.length;l>a;++a){var u=t[a],p=u.length;if(p)for(var c=u[0],d=c[0],f=c[1]/2+Ga/4,h=Math.sin(f),g=Math.cos(f),m=1;;){m===p&&(m=0);e=u[m];var E=e[0],v=e[1]/2+Ga/4,x=Math.sin(v),y=Math.cos(v),N=E-d,I=N>=0?1:-1,A=I*N,T=A>Ga,L=h*x;Ll.add(Math.atan2(L*I*Math.sin(A),g*y+L*Math.cos(A)));o+=T?N+I*Ua:N;if(T^d>=n^E>=n){var S=xn(En(c),En(e));In(S);var C=xn(i,S);In(C);var b=(T^N>=0?-1:1)*nt(C[2]);(r>b||r===b&&(S[0]||S[1]))&&(s+=T^N>=0?1:-1)}if(!m++)break;d=E,h=x,g=y,c=e}}return(-ka>o||ka>o&&0>Ll)^1&s}function Vn(e){function t(e,t){return Math.cos(e)*Math.cos(t)>o}function n(e){var n,o,l,u,p;return{lineStart:function(){u=l=!1;p=1},point:function(c,d){var f,h=[c,d],g=t(c,d),m=s?g?0:i(c,d):g?i(c+(0>c?Ga:-Ga),d):0;!n&&(u=l=g)&&e.lineStart();if(g!==l){f=r(n,h);if(Tn(n,f)||Tn(h,f)){h[0]+=ka;h[1]+=ka;g=t(h[0],h[1])}}if(g!==l){p=0;if(g){e.lineStart();f=r(h,n);e.point(f[0],f[1])}else{f=r(n,h);e.point(f[0],f[1]);e.lineEnd()}n=f}else if(a&&n&&s^g){var E;if(!(m&o)&&(E=r(h,n,!0))){p=0;if(s){e.lineStart();e.point(E[0][0],E[0][1]);e.point(E[1][0],E[1][1]);e.lineEnd()}else{e.point(E[1][0],E[1][1]);e.lineEnd();e.lineStart();e.point(E[0][0],E[0][1])}}}!g||n&&Tn(n,h)||e.point(h[0],h[1]);n=h,l=g,o=m},lineEnd:function(){l&&e.lineEnd();n=null},clean:function(){return p|(u&&l)<<1}}}function r(e,t,n){var r=En(e),i=En(t),s=[1,0,0],a=xn(r,i),l=vn(a,a),u=a[0],p=l-u*u;if(!p)return!n&&e;var c=o*l/p,d=-o*u/p,f=xn(s,a),h=Nn(s,c),g=Nn(a,d);yn(h,g);var m=f,E=vn(h,m),v=vn(m,m),x=E*E-v*(vn(h,h)-1);if(!(0>x)){var y=Math.sqrt(x),N=Nn(m,(-E-y)/v);yn(N,h);N=An(N);if(!n)return N;var I,A=e[0],T=t[0],L=e[1],S=t[1];A>T&&(I=A,A=T,T=I);var C=T-A,b=va(C-Ga)<ka,R=b||ka>C;!b&&L>S&&(I=L,L=S,S=I);if(R?b?L+S>0^N[1]<(va(N[0]-A)<ka?L:S):L<=N[1]&&N[1]<=S:C>Ga^(A<=N[0]&&N[0]<=T)){var w=Nn(m,(-E+y)/v);yn(w,h);return[N,An(w)]}}}function i(t,n){var r=s?e:Ga-e,i=0;-r>t?i|=1:t>r&&(i|=2);-r>n?i|=4:n>r&&(i|=8);return i}var o=Math.cos(e),s=o>0,a=va(o)>ka,l=mr(e,6*qa);return Mn(t,n,l,s?[0,-e]:[-Ga,e-Ga])}function Hn(e,t,n,r){return function(i){var o,s=i.a,a=i.b,l=s.x,u=s.y,p=a.x,c=a.y,d=0,f=1,h=p-l,g=c-u;o=e-l;if(h||!(o>0)){o/=h;if(0>h){if(d>o)return;f>o&&(f=o)}else if(h>0){if(o>f)return;o>d&&(d=o)}o=n-l;if(h||!(0>o)){o/=h;if(0>h){if(o>f)return;o>d&&(d=o)}else if(h>0){if(d>o)return;f>o&&(f=o)}o=t-u;if(g||!(o>0)){o/=g;if(0>g){if(d>o)return;f>o&&(f=o)}else if(g>0){if(o>f)return;o>d&&(d=o)}o=r-u;if(g||!(0>o)){o/=g;if(0>g){if(o>f)return;o>d&&(d=o)}else if(g>0){if(d>o)return;f>o&&(f=o)}d>0&&(i.a={x:l+d*h,y:u+d*g});1>f&&(i.b={x:l+f*h,y:u+f*g});return i}}}}}}function zn(e,t,n,r){function i(r,i){return va(r[0]-e)<ka?i>0?0:3:va(r[0]-n)<ka?i>0?2:1:va(r[1]-t)<ka?i>0?1:0:i>0?3:2}function o(e,t){return s(e.x,t.x)}function s(e,t){var n=i(e,1),r=i(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(a){function l(e){for(var t=0,n=m.length,r=e[1],i=0;n>i;++i)for(var o,s=1,a=m[i],l=a.length,u=a[0];l>s;++s){o=a[s];u[1]<=r?o[1]>r&&et(u,o,e)>0&&++t:o[1]<=r&&et(u,o,e)<0&&--t;u=o}return 0!==t}function u(o,a,l,u){var p=0,c=0;if(null==o||(p=i(o,l))!==(c=i(a,l))||s(o,a)<0^l>0){do u.point(0===p||3===p?e:n,p>1?r:t);while((p=(p+l+4)%4)!==c)}else u.point(a[0],a[1])}function p(i,o){return i>=e&&n>=i&&o>=t&&r>=o}function c(e,t){p(e,t)&&a.point(e,t)}function d(){R.point=h;m&&m.push(E=[]);T=!0;A=!1;N=I=0/0}function f(){if(g){h(v,x);y&&A&&C.rejoin();g.push(C.buffer())}R.point=c;A&&a.lineEnd()}function h(e,t){e=Math.max(-jl,Math.min(jl,e));t=Math.max(-jl,Math.min(jl,t)); var n=p(e,t);m&&E.push([e,t]);if(T){v=e,x=t,y=n;T=!1;if(n){a.lineStart();a.point(e,t)}}else if(n&&A)a.point(e,t);else{var r={a:{x:N,y:I},b:{x:e,y:t}};if(b(r)){if(!A){a.lineStart();a.point(r.a.x,r.a.y)}a.point(r.b.x,r.b.y);n||a.lineEnd();L=!1}else if(n){a.lineStart();a.point(e,t);L=!1}}N=e,I=t,A=n}var g,m,E,v,x,y,N,I,A,T,L,S=a,C=Dn(),b=Hn(e,t,n,r),R={point:c,lineStart:d,lineEnd:f,polygonStart:function(){a=C;g=[];m=[];L=!0},polygonEnd:function(){a=S;g=ia.merge(g);var t=l([e,r]),n=L&&t,i=g.length;if(n||i){a.polygonStart();if(n){a.lineStart();u(null,null,1,a);a.lineEnd()}i&&_n(g,o,t,u,a);a.polygonEnd()}g=m=E=null}};return R}}function Wn(e){var t=0,n=Ga/3,r=lr(e),i=r(t,n);i.parallels=function(e){return arguments.length?r(t=e[0]*Ga/180,n=e[1]*Ga/180):[t/Ga*180,n/Ga*180]};return i}function $n(e,t){function n(e,t){var n=Math.sqrt(o-2*i*Math.sin(t))/i;return[n*Math.sin(e*=i),s-n*Math.cos(e)]}var r=Math.sin(e),i=(r+Math.sin(t))/2,o=1+r*(2*i-r),s=Math.sqrt(o)/i;n.invert=function(e,t){var n=s-t;return[Math.atan2(e,n)/i,nt((o-(e*e+n*n)*i*i)/(2*i))]};return n}function Kn(){function e(e,t){ql+=i*e-r*t;r=e,i=t}var t,n,r,i;$l.point=function(o,s){$l.point=e;t=r=o,n=i=s};$l.lineEnd=function(){e(t,n)}}function Yn(e,t){Vl>e&&(Vl=e);e>zl&&(zl=e);Hl>t&&(Hl=t);t>Wl&&(Wl=t)}function Qn(){function e(e,t){s.push("M",e,",",t,o)}function t(e,t){s.push("M",e,",",t);a.point=n}function n(e,t){s.push("L",e,",",t)}function r(){a.point=e}function i(){s.push("Z")}var o=Xn(4.5),s=[],a={point:e,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=r;a.point=e},pointRadius:function(e){o=Xn(e);return a},result:function(){if(s.length){var e=s.join("");s=[];return e}}};return a}function Xn(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function Zn(e,t){Rl+=e;wl+=t;++Ol}function Jn(){function e(e,r){var i=e-t,o=r-n,s=Math.sqrt(i*i+o*o);_l+=s*(t+e)/2;Fl+=s*(n+r)/2;Pl+=s;Zn(t=e,n=r)}var t,n;Yl.point=function(r,i){Yl.point=e;Zn(t=r,n=i)}}function er(){Yl.point=Zn}function tr(){function e(e,t){var n=e-r,o=t-i,s=Math.sqrt(n*n+o*o);_l+=s*(r+e)/2;Fl+=s*(i+t)/2;Pl+=s;s=i*e-r*t;Ml+=s*(r+e);kl+=s*(i+t);Dl+=3*s;Zn(r=e,i=t)}var t,n,r,i;Yl.point=function(o,s){Yl.point=e;Zn(t=r=o,n=i=s)};Yl.lineEnd=function(){e(t,n)}}function nr(e){function t(t,n){e.moveTo(t+s,n);e.arc(t,n,s,0,Ua)}function n(t,n){e.moveTo(t,n);a.point=r}function r(t,n){e.lineTo(t,n)}function i(){a.point=t}function o(){e.closePath()}var s=4.5,a={point:t,lineStart:function(){a.point=n},lineEnd:i,polygonStart:function(){a.lineEnd=o},polygonEnd:function(){a.lineEnd=i;a.point=t},pointRadius:function(e){s=e;return a},result:y};return a}function rr(e){function t(e){return(a?r:n)(e)}function n(t){return sr(t,function(n,r){n=e(n,r);t.point(n[0],n[1])})}function r(t){function n(n,r){n=e(n,r);t.point(n[0],n[1])}function r(){x=0/0;T.point=o;t.lineStart()}function o(n,r){var o=En([n,r]),s=e(n,r);i(x,y,v,N,I,A,x=s[0],y=s[1],v=n,N=o[0],I=o[1],A=o[2],a,t);t.point(x,y)}function s(){T.point=n;t.lineEnd()}function l(){r();T.point=u;T.lineEnd=p}function u(e,t){o(c=e,d=t),f=x,h=y,g=N,m=I,E=A;T.point=o}function p(){i(x,y,v,N,I,A,f,h,c,g,m,E,a,t);T.lineEnd=s;s()}var c,d,f,h,g,m,E,v,x,y,N,I,A,T={point:n,lineStart:r,lineEnd:s,polygonStart:function(){t.polygonStart();T.lineStart=l},polygonEnd:function(){t.polygonEnd();T.lineStart=r}};return T}function i(t,n,r,a,l,u,p,c,d,f,h,g,m,E){var v=p-t,x=c-n,y=v*v+x*x;if(y>4*o&&m--){var N=a+f,I=l+h,A=u+g,T=Math.sqrt(N*N+I*I+A*A),L=Math.asin(A/=T),S=va(va(A)-1)<ka||va(r-d)<ka?(r+d)/2:Math.atan2(I,N),C=e(S,L),b=C[0],R=C[1],w=b-t,O=R-n,_=x*w-v*O;if(_*_/y>o||va((v*w+x*O)/y-.5)>.3||s>a*f+l*h+u*g){i(t,n,r,a,l,u,b,R,S,N/=T,I/=T,A,m,E);E.point(b,R);i(b,R,S,N,I,A,p,c,d,f,h,g,m,E)}}}var o=.5,s=Math.cos(30*qa),a=16;t.precision=function(e){if(!arguments.length)return Math.sqrt(o);a=(o=e*e)>0&&16;return t};return t}function ir(e){var t=rr(function(t,n){return e([t*Va,n*Va])});return function(e){return ur(t(e))}}function or(e){this.stream=e}function sr(e,t){return{point:t,sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}function ar(e){return lr(function(){return e})()}function lr(e){function t(e){e=a(e[0]*qa,e[1]*qa);return[e[0]*d+l,u-e[1]*d]}function n(e){e=a.invert((e[0]-l)/d,(u-e[1])/d);return e&&[e[0]*Va,e[1]*Va]}function r(){a=wn(s=dr(E,v,x),o);var e=o(g,m);l=f-e[0]*d;u=h+e[1]*d;return i()}function i(){p&&(p.valid=!1,p=null);return t}var o,s,a,l,u,p,c=rr(function(e,t){e=o(e,t);return[e[0]*d+l,u-e[1]*d]}),d=150,f=480,h=250,g=0,m=0,E=0,v=0,x=0,y=Ul,N=bt,I=null,A=null;t.stream=function(e){p&&(p.valid=!1);p=ur(y(s,c(N(e))));p.valid=!0;return p};t.clipAngle=function(e){if(!arguments.length)return I;y=null==e?(I=e,Ul):Vn((I=+e)*qa);return i()};t.clipExtent=function(e){if(!arguments.length)return A;A=e;N=e?zn(e[0][0],e[0][1],e[1][0],e[1][1]):bt;return i()};t.scale=function(e){if(!arguments.length)return d;d=+e;return r()};t.translate=function(e){if(!arguments.length)return[f,h];f=+e[0];h=+e[1];return r()};t.center=function(e){if(!arguments.length)return[g*Va,m*Va];g=e[0]%360*qa;m=e[1]%360*qa;return r()};t.rotate=function(e){if(!arguments.length)return[E*Va,v*Va,x*Va];E=e[0]%360*qa;v=e[1]%360*qa;x=e.length>2?e[2]%360*qa:0;return r()};ia.rebind(t,c,"precision");return function(){o=e.apply(this,arguments);t.invert=o.invert&&n;return r()}}function ur(e){return sr(e,function(t,n){e.point(t*qa,n*qa)})}function pr(e,t){return[e,t]}function cr(e,t){return[e>Ga?e-Ua:-Ga>e?e+Ua:e,t]}function dr(e,t,n){return e?t||n?wn(hr(e),gr(t,n)):hr(e):t||n?gr(t,n):cr}function fr(e){return function(t,n){return t+=e,[t>Ga?t-Ua:-Ga>t?t+Ua:t,n]}}function hr(e){var t=fr(e);t.invert=fr(-e);return t}function gr(e,t){function n(e,t){var n=Math.cos(t),a=Math.cos(e)*n,l=Math.sin(e)*n,u=Math.sin(t),p=u*r+a*i;return[Math.atan2(l*o-p*s,a*r-u*i),nt(p*o+l*s)]}var r=Math.cos(e),i=Math.sin(e),o=Math.cos(t),s=Math.sin(t);n.invert=function(e,t){var n=Math.cos(t),a=Math.cos(e)*n,l=Math.sin(e)*n,u=Math.sin(t),p=u*o-l*s;return[Math.atan2(l*o+u*s,a*r+p*i),nt(p*r-a*i)]};return n}function mr(e,t){var n=Math.cos(e),r=Math.sin(e);return function(i,o,s,a){var l=s*t;if(null!=i){i=Er(n,i);o=Er(n,o);(s>0?o>i:i>o)&&(i+=s*Ua)}else{i=e+s*Ua;o=e-.5*l}for(var u,p=i;s>0?p>o:o>p;p-=l)a.point((u=An([n,-r*Math.cos(p),-r*Math.sin(p)]))[0],u[1])}}function Er(e,t){var n=En(t);n[0]-=e;In(n);var r=tt(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-ka)%(2*Math.PI)}function vr(e,t,n){var r=ia.range(e,t-ka,n).concat(t);return function(e){return r.map(function(t){return[e,t]})}}function xr(e,t,n){var r=ia.range(e,t-ka,n).concat(t);return function(e){return r.map(function(t){return[t,e]})}}function yr(e){return e.source}function Nr(e){return e.target}function Ir(e,t,n,r){var i=Math.cos(t),o=Math.sin(t),s=Math.cos(r),a=Math.sin(r),l=i*Math.cos(e),u=i*Math.sin(e),p=s*Math.cos(n),c=s*Math.sin(n),d=2*Math.asin(Math.sqrt(st(r-t)+i*s*st(n-e))),f=1/Math.sin(d),h=d?function(e){var t=Math.sin(e*=d)*f,n=Math.sin(d-e)*f,r=n*l+t*p,i=n*u+t*c,s=n*o+t*a;return[Math.atan2(i,r)*Va,Math.atan2(s,Math.sqrt(r*r+i*i))*Va]}:function(){return[e*Va,t*Va]};h.distance=d;return h}function Ar(){function e(e,i){var o=Math.sin(i*=qa),s=Math.cos(i),a=va((e*=qa)-t),l=Math.cos(a);Ql+=Math.atan2(Math.sqrt((a=s*Math.sin(a))*a+(a=r*o-n*s*l)*a),n*o+r*s*l);t=e,n=o,r=s}var t,n,r;Xl.point=function(i,o){t=i*qa,n=Math.sin(o*=qa),r=Math.cos(o);Xl.point=e};Xl.lineEnd=function(){Xl.point=Xl.lineEnd=y}}function Tr(e,t){function n(t,n){var r=Math.cos(t),i=Math.cos(n),o=e(r*i);return[o*i*Math.sin(t),o*Math.sin(n)]}n.invert=function(e,n){var r=Math.sqrt(e*e+n*n),i=t(r),o=Math.sin(i),s=Math.cos(i);return[Math.atan2(e*o,r*s),Math.asin(r&&n*o/r)]};return n}function Lr(e,t){function n(e,t){s>0?-Ba+ka>t&&(t=-Ba+ka):t>Ba-ka&&(t=Ba-ka);var n=s/Math.pow(i(t),o);return[n*Math.sin(o*e),s-n*Math.cos(o*e)]}var r=Math.cos(e),i=function(e){return Math.tan(Ga/4+e/2)},o=e===t?Math.sin(e):Math.log(r/Math.cos(t))/Math.log(i(t)/i(e)),s=r*Math.pow(i(e),o)/o;if(!o)return Cr;n.invert=function(e,t){var n=s-t,r=J(o)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/o,2*Math.atan(Math.pow(s/r,1/o))-Ba]};return n}function Sr(e,t){function n(e,t){var n=o-t;return[n*Math.sin(i*e),o-n*Math.cos(i*e)]}var r=Math.cos(e),i=e===t?Math.sin(e):(r-Math.cos(t))/(t-e),o=r/i+e;if(va(i)<ka)return pr;n.invert=function(e,t){var n=o-t;return[Math.atan2(e,n)/i,o-J(i)*Math.sqrt(e*e+n*n)]};return n}function Cr(e,t){return[e,Math.log(Math.tan(Ga/4+t/2))]}function br(e){var t,n=ar(e),r=n.scale,i=n.translate,o=n.clipExtent;n.scale=function(){var e=r.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e};n.translate=function(){var e=i.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e};n.clipExtent=function(e){var s=o.apply(n,arguments);if(s===n){if(t=null==e){var a=Ga*r(),l=i();o([[l[0]-a,l[1]-a],[l[0]+a,l[1]+a]])}}else t&&(s=null);return s};return n.clipExtent(null)}function Rr(e,t){return[Math.log(Math.tan(Ga/4+t/2)),-e]}function wr(e){return e[0]}function Or(e){return e[1]}function _r(e){for(var t=e.length,n=[0,1],r=2,i=2;t>i;i++){for(;r>1&&et(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function Fr(e,t){return e[0]-t[0]||e[1]-t[1]}function Pr(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function Mr(e,t,n,r){var i=e[0],o=n[0],s=t[0]-i,a=r[0]-o,l=e[1],u=n[1],p=t[1]-l,c=r[1]-u,d=(a*(l-u)-c*(i-o))/(c*s-a*p);return[i+d*s,l+d*p]}function kr(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}function Dr(){ii(this);this.edge=this.site=this.circle=null}function Gr(e){var t=uu.pop()||new Dr;t.site=e;return t}function Ur(e){Yr(e);su.remove(e);uu.push(e);ii(e)}function jr(e){var t=e.circle,n=t.x,r=t.cy,i={x:n,y:r},o=e.P,s=e.N,a=[e];Ur(e);for(var l=o;l.circle&&va(n-l.circle.x)<ka&&va(r-l.circle.cy)<ka;){o=l.P;a.unshift(l);Ur(l);l=o}a.unshift(l);Yr(l);for(var u=s;u.circle&&va(n-u.circle.x)<ka&&va(r-u.circle.cy)<ka;){s=u.N;a.push(u);Ur(u);u=s}a.push(u);Yr(u);var p,c=a.length;for(p=1;c>p;++p){u=a[p];l=a[p-1];ti(u.edge,l.site,u.site,i)}l=a[0];u=a[c-1];u.edge=Jr(l.site,u.site,null,i);Kr(l);Kr(u)}function Br(e){for(var t,n,r,i,o=e.x,s=e.y,a=su._;a;){r=qr(a,s)-o;if(r>ka)a=a.L;else{i=o-Vr(a,s);if(!(i>ka)){if(r>-ka){t=a.P;n=a}else if(i>-ka){t=a;n=a.N}else t=n=a;break}if(!a.R){t=a;break}a=a.R}}var l=Gr(e);su.insert(t,l);if(t||n)if(t!==n)if(n){Yr(t);Yr(n);var u=t.site,p=u.x,c=u.y,d=e.x-p,f=e.y-c,h=n.site,g=h.x-p,m=h.y-c,E=2*(d*m-f*g),v=d*d+f*f,x=g*g+m*m,y={x:(m*v-f*x)/E+p,y:(d*x-g*v)/E+c};ti(n.edge,u,h,y);l.edge=Jr(u,e,null,y);n.edge=Jr(e,h,null,y);Kr(t);Kr(n)}else l.edge=Jr(t.site,l.site);else{Yr(t);n=Gr(t.site);su.insert(l,n);l.edge=n.edge=Jr(t.site,l.site);Kr(t);Kr(n)}}function qr(e,t){var n=e.site,r=n.x,i=n.y,o=i-t;if(!o)return r;var s=e.P;if(!s)return-1/0;n=s.site;var a=n.x,l=n.y,u=l-t;if(!u)return a;var p=a-r,c=1/o-1/u,d=p/u;return c?(-d+Math.sqrt(d*d-2*c*(p*p/(-2*u)-l+u/2+i-o/2)))/c+r:(r+a)/2}function Vr(e,t){var n=e.N;if(n)return qr(n,t);var r=e.site;return r.y===t?r.x:1/0}function Hr(e){this.site=e;this.edges=[]}function zr(e){for(var t,n,r,i,o,s,a,l,u,p,c=e[0][0],d=e[1][0],f=e[0][1],h=e[1][1],g=ou,m=g.length;m--;){o=g[m];if(o&&o.prepare()){a=o.edges;l=a.length;s=0;for(;l>s;){p=a[s].end(),r=p.x,i=p.y;u=a[++s%l].start(),t=u.x,n=u.y;if(va(r-t)>ka||va(i-n)>ka){a.splice(s,0,new ni(ei(o.site,p,va(r-c)<ka&&h-i>ka?{x:c,y:va(t-c)<ka?n:h}:va(i-h)<ka&&d-r>ka?{x:va(n-h)<ka?t:d,y:h}:va(r-d)<ka&&i-f>ka?{x:d,y:va(t-d)<ka?n:f}:va(i-f)<ka&&r-c>ka?{x:va(n-f)<ka?t:c,y:f}:null),o.site,null));++l}}}}}function Wr(e,t){return t.angle-e.angle}function $r(){ii(this);this.x=this.y=this.arc=this.site=this.cy=null}function Kr(e){var t=e.P,n=e.N;if(t&&n){var r=t.site,i=e.site,o=n.site;if(r!==o){var s=i.x,a=i.y,l=r.x-s,u=r.y-a,p=o.x-s,c=o.y-a,d=2*(l*c-u*p);if(!(d>=-Da)){var f=l*l+u*u,h=p*p+c*c,g=(c*f-u*h)/d,m=(l*h-p*f)/d,c=m+a,E=pu.pop()||new $r;E.arc=e;E.site=i;E.x=g+s;E.y=c+Math.sqrt(g*g+m*m);E.cy=c;e.circle=E;for(var v=null,x=lu._;x;)if(E.y<x.y||E.y===x.y&&E.x<=x.x){if(!x.L){v=x.P;break}x=x.L}else{if(!x.R){v=x;break}x=x.R}lu.insert(v,E);v||(au=E)}}}}function Yr(e){var t=e.circle;if(t){t.P||(au=t.N);lu.remove(t);pu.push(t);ii(t);e.circle=null}}function Qr(e){for(var t,n=iu,r=Hn(e[0][0],e[0][1],e[1][0],e[1][1]),i=n.length;i--;){t=n[i];if(!Xr(t,e)||!r(t)||va(t.a.x-t.b.x)<ka&&va(t.a.y-t.b.y)<ka){t.a=t.b=null;n.splice(i,1)}}}function Xr(e,t){var n=e.b;if(n)return!0;var r,i,o=e.a,s=t[0][0],a=t[1][0],l=t[0][1],u=t[1][1],p=e.l,c=e.r,d=p.x,f=p.y,h=c.x,g=c.y,m=(d+h)/2,E=(f+g)/2;if(g===f){if(s>m||m>=a)return;if(d>h){if(o){if(o.y>=u)return}else o={x:m,y:l};n={x:m,y:u}}else{if(o){if(o.y<l)return}else o={x:m,y:u};n={x:m,y:l}}}else{r=(d-h)/(g-f);i=E-r*m;if(-1>r||r>1)if(d>h){if(o){if(o.y>=u)return}else o={x:(l-i)/r,y:l};n={x:(u-i)/r,y:u}}else{if(o){if(o.y<l)return}else o={x:(u-i)/r,y:u};n={x:(l-i)/r,y:l}}else if(g>f){if(o){if(o.x>=a)return}else o={x:s,y:r*s+i};n={x:a,y:r*a+i}}else{if(o){if(o.x<s)return}else o={x:a,y:r*a+i};n={x:s,y:r*s+i}}}e.a=o;e.b=n;return!0}function Zr(e,t){this.l=e;this.r=t;this.a=this.b=null}function Jr(e,t,n,r){var i=new Zr(e,t);iu.push(i);n&&ti(i,e,t,n);r&&ti(i,t,e,r);ou[e.i].edges.push(new ni(i,e,t));ou[t.i].edges.push(new ni(i,t,e));return i}function ei(e,t,n){var r=new Zr(e,null);r.a=t;r.b=n;iu.push(r);return r}function ti(e,t,n,r){if(e.a||e.b)e.l===n?e.b=r:e.a=r;else{e.a=r;e.l=t;e.r=n}}function ni(e,t,n){var r=e.a,i=e.b;this.edge=e;this.site=t;this.angle=n?Math.atan2(n.y-t.y,n.x-t.x):e.l===t?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function ri(){this._=null}function ii(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function oi(e,t){var n=t,r=t.R,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r;r.U=i;n.U=r;n.R=r.L;n.R&&(n.R.U=n);r.L=n}function si(e,t){var n=t,r=t.L,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r;r.U=i;n.U=r;n.L=r.R;n.L&&(n.L.U=n);r.R=n}function ai(e){for(;e.L;)e=e.L;return e}function li(e,t){var n,r,i,o=e.sort(ui).pop();iu=[];ou=new Array(e.length);su=new ri;lu=new ri;for(;;){i=au;if(o&&(!i||o.y<i.y||o.y===i.y&&o.x<i.x)){if(o.x!==n||o.y!==r){ou[o.i]=new Hr(o);Br(o);n=o.x,r=o.y}o=e.pop()}else{if(!i)break;jr(i.arc)}}t&&(Qr(t),zr(t));var s={cells:ou,edges:iu};su=lu=iu=ou=null;return s}function ui(e,t){return t.y-e.y||t.x-e.x}function pi(e,t,n){return(e.x-n.x)*(t.y-e.y)-(e.x-t.x)*(n.y-e.y)}function ci(e){return e.x}function di(e){return e.y}function fi(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function hi(e,t,n,r,i,o){if(!e(t,n,r,i,o)){var s=.5*(n+i),a=.5*(r+o),l=t.nodes;l[0]&&hi(e,l[0],n,r,s,a);l[1]&&hi(e,l[1],s,r,i,a);l[2]&&hi(e,l[2],n,a,s,o);l[3]&&hi(e,l[3],s,a,i,o)}}function gi(e,t,n,r,i,o,s){var a,l=1/0;(function u(e,p,c,d,f){if(!(p>o||c>s||r>d||i>f)){if(h=e.point){var h,g=t-h[0],m=n-h[1],E=g*g+m*m;if(l>E){var v=Math.sqrt(l=E);r=t-v,i=n-v;o=t+v,s=n+v;a=h}}for(var x=e.nodes,y=.5*(p+d),N=.5*(c+f),I=t>=y,A=n>=N,T=A<<1|I,L=T+4;L>T;++T)if(e=x[3&T])switch(3&T){case 0:u(e,p,c,y,N);break;case 1:u(e,y,c,d,N);break;case 2:u(e,p,N,y,f);break;case 3:u(e,y,N,d,f)}}})(e,r,i,o,s);return a}function mi(e,t){e=ia.rgb(e);t=ia.rgb(t);var n=e.r,r=e.g,i=e.b,o=t.r-n,s=t.g-r,a=t.b-i;return function(e){return"#"+Nt(Math.round(n+o*e))+Nt(Math.round(r+s*e))+Nt(Math.round(i+a*e))}}function Ei(e,t){var n,r={},i={};for(n in e)n in t?r[n]=yi(e[n],t[n]):i[n]=e[n];for(n in t)n in e||(i[n]=t[n]);return function(e){for(n in r)i[n]=r[n](e);return i}}function vi(e,t){e=+e,t=+t;return function(n){return e*(1-n)+t*n}}function xi(e,t){var n,r,i,o=du.lastIndex=fu.lastIndex=0,s=-1,a=[],l=[];e+="",t+="";for(;(n=du.exec(e))&&(r=fu.exec(t));){if((i=r.index)>o){i=t.slice(o,i);a[s]?a[s]+=i:a[++s]=i}if((n=n[0])===(r=r[0]))a[s]?a[s]+=r:a[++s]=r;else{a[++s]=null;l.push({i:s,x:vi(n,r)})}o=fu.lastIndex}if(o<t.length){i=t.slice(o);a[s]?a[s]+=i:a[++s]=i}return a.length<2?l[0]?(t=l[0].x,function(e){return t(e)+""}):function(){return t}:(t=l.length,function(e){for(var n,r=0;t>r;++r)a[(n=l[r]).i]=n.x(e);return a.join("")})}function yi(e,t){for(var n,r=ia.interpolators.length;--r>=0&&!(n=ia.interpolators[r](e,t)););return n}function Ni(e,t){var n,r=[],i=[],o=e.length,s=t.length,a=Math.min(e.length,t.length);for(n=0;a>n;++n)r.push(yi(e[n],t[n]));for(;o>n;++n)i[n]=e[n];for(;s>n;++n)i[n]=t[n];return function(e){for(n=0;a>n;++n)i[n]=r[n](e);return i}}function Ii(e){return function(t){return 0>=t?0:t>=1?1:e(t)}}function Ai(e){return function(t){return 1-e(1-t)}}function Ti(e){return function(t){return.5*(.5>t?e(2*t):2-e(2-2*t))}}function Li(e){return e*e}function Si(e){return e*e*e}function Ci(e){if(0>=e)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(.5>e?n:3*(e-t)+n-.75)}function bi(e){return function(t){return Math.pow(t,e)}}function Ri(e){return 1-Math.cos(e*Ba)}function wi(e){return Math.pow(2,10*(e-1))}function Oi(e){return 1-Math.sqrt(1-e*e)}function _i(e,t){var n;arguments.length<2&&(t=.45);arguments.length?n=t/Ua*Math.asin(1/e):(e=1,n=t/4);return function(r){return 1+e*Math.pow(2,-10*r)*Math.sin((r-n)*Ua/t)}}function Fi(e){e||(e=1.70158);return function(t){return t*t*((e+1)*t-e)}}function Pi(e){return 1/2.75>e?7.5625*e*e:2/2.75>e?7.5625*(e-=1.5/2.75)*e+.75:2.5/2.75>e?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Mi(e,t){e=ia.hcl(e);t=ia.hcl(t);var n=e.h,r=e.c,i=e.l,o=t.h-n,s=t.c-r,a=t.l-i;isNaN(s)&&(s=0,r=isNaN(r)?t.c:r);isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:-180>o&&(o+=360);return function(e){return ct(n+o*e,r+s*e,i+a*e)+""}}function ki(e,t){e=ia.hsl(e);t=ia.hsl(t);var n=e.h,r=e.s,i=e.l,o=t.h-n,s=t.s-r,a=t.l-i;isNaN(s)&&(s=0,r=isNaN(r)?t.s:r);isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:-180>o&&(o+=360);return function(e){return ut(n+o*e,r+s*e,i+a*e)+""}}function Di(e,t){e=ia.lab(e);t=ia.lab(t);var n=e.l,r=e.a,i=e.b,o=t.l-n,s=t.a-r,a=t.b-i;return function(e){return ft(n+o*e,r+s*e,i+a*e)+""}}function Gi(e,t){t-=e;return function(n){return Math.round(e+t*n)}}function Ui(e){var t=[e.a,e.b],n=[e.c,e.d],r=Bi(t),i=ji(t,n),o=Bi(qi(n,t,-i))||0;if(t[0]*n[1]<n[0]*t[1]){t[0]*=-1;t[1]*=-1;r*=-1;i*=-1}this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-n[0],n[1]))*Va;this.translate=[e.e,e.f];this.scale=[r,o];this.skew=o?Math.atan2(i,o)*Va:0}function ji(e,t){return e[0]*t[0]+e[1]*t[1]}function Bi(e){var t=Math.sqrt(ji(e,e));if(t){e[0]/=t;e[1]/=t}return t}function qi(e,t,n){e[0]+=n*t[0];e[1]+=n*t[1];return e}function Vi(e,t){var n,r=[],i=[],o=ia.transform(e),s=ia.transform(t),a=o.translate,l=s.translate,u=o.rotate,p=s.rotate,c=o.skew,d=s.skew,f=o.scale,h=s.scale;if(a[0]!=l[0]||a[1]!=l[1]){r.push("translate(",null,",",null,")");i.push({i:1,x:vi(a[0],l[0])},{i:3,x:vi(a[1],l[1])})}else r.push(l[0]||l[1]?"translate("+l+")":"");if(u!=p){u-p>180?p+=360:p-u>180&&(u+=360);i.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:vi(u,p)})}else p&&r.push(r.pop()+"rotate("+p+")");c!=d?i.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:vi(c,d)}):d&&r.push(r.pop()+"skewX("+d+")");if(f[0]!=h[0]||f[1]!=h[1]){n=r.push(r.pop()+"scale(",null,",",null,")");i.push({i:n-4,x:vi(f[0],h[0])},{i:n-2,x:vi(f[1],h[1])})}else(1!=h[0]||1!=h[1])&&r.push(r.pop()+"scale("+h+")");n=i.length;return function(e){for(var t,o=-1;++o<n;)r[(t=i[o]).i]=t.x(e);return r.join("")}}function Hi(e,t){t=(t-=e=+e)||1/t;return function(n){return(n-e)/t}}function zi(e,t){t=(t-=e=+e)||1/t;return function(n){return Math.max(0,Math.min(1,(n-e)/t))}}function Wi(e){for(var t=e.source,n=e.target,r=Ki(t,n),i=[t];t!==r;){t=t.parent;i.push(t)}for(var o=i.length;n!==r;){i.splice(o,0,n);n=n.parent}return i}function $i(e){for(var t=[],n=e.parent;null!=n;){t.push(e);e=n;n=n.parent}t.push(e);return t}function Ki(e,t){if(e===t)return e;for(var n=$i(e),r=$i(t),i=n.pop(),o=r.pop(),s=null;i===o;){s=i;i=n.pop();o=r.pop()}return s}function Yi(e){e.fixed|=2}function Qi(e){e.fixed&=-7}function Xi(e){e.fixed|=4;e.px=e.x,e.py=e.y}function Zi(e){e.fixed&=-5}function Ji(e,t,n){var r=0,i=0;e.charge=0;if(!e.leaf)for(var o,s=e.nodes,a=s.length,l=-1;++l<a;){o=s[l];if(null!=o){Ji(o,t,n);e.charge+=o.charge;r+=o.charge*o.cx;i+=o.charge*o.cy}}if(e.point){if(!e.leaf){e.point.x+=Math.random()-.5;e.point.y+=Math.random()-.5}var u=t*n[e.point.index];e.charge+=e.pointCharge=u;r+=u*e.point.x;i+=u*e.point.y}e.cx=r/e.charge;e.cy=i/e.charge}function eo(e,t){ia.rebind(e,t,"sort","children","value");e.nodes=e;e.links=so;return e}function to(e,t){for(var n=[e];null!=(e=n.pop());){t(e);if((i=e.children)&&(r=i.length))for(var r,i;--r>=0;)n.push(i[r])}}function no(e,t){for(var n=[e],r=[];null!=(e=n.pop());){r.push(e);if((o=e.children)&&(i=o.length))for(var i,o,s=-1;++s<i;)n.push(o[s])}for(;null!=(e=r.pop());)t(e)}function ro(e){return e.children}function io(e){return e.value}function oo(e,t){return t.value-e.value}function so(e){return ia.merge(e.map(function(e){return(e.children||[]).map(function(t){return{source:e,target:t}})}))}function ao(e){return e.x}function lo(e){return e.y}function uo(e,t,n){e.y0=t;e.y=n}function po(e){return ia.range(e.length)}function co(e){for(var t=-1,n=e[0].length,r=[];++t<n;)r[t]=0;return r}function fo(e){for(var t,n=1,r=0,i=e[0][1],o=e.length;o>n;++n)if((t=e[n][1])>i){r=n;i=t}return r}function ho(e){return e.reduce(go,0)}function go(e,t){return e+t[1]}function mo(e,t){return Eo(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Eo(e,t){for(var n=-1,r=+e[0],i=(e[1]-r)/t,o=[];++n<=t;)o[n]=i*n+r;return o}function vo(e){return[ia.min(e),ia.max(e)]}function xo(e,t){return e.value-t.value}function yo(e,t){var n=e._pack_next;e._pack_next=t;t._pack_prev=e;t._pack_next=n;n._pack_prev=t}function No(e,t){e._pack_next=t;t._pack_prev=e}function Io(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return.999*i*i>n*n+r*r}function Ao(e){function t(e){p=Math.min(e.x-e.r,p);c=Math.max(e.x+e.r,c);d=Math.min(e.y-e.r,d);f=Math.max(e.y+e.r,f)}if((n=e.children)&&(u=n.length)){var n,r,i,o,s,a,l,u,p=1/0,c=-1/0,d=1/0,f=-1/0;n.forEach(To);r=n[0];r.x=-r.r;r.y=0;t(r);if(u>1){i=n[1];i.x=i.r;i.y=0;t(i);if(u>2){o=n[2];Co(r,i,o);t(o);yo(r,o);r._pack_prev=o;yo(o,i);i=r._pack_next;for(s=3;u>s;s++){Co(r,i,o=n[s]);var h=0,g=1,m=1;for(a=i._pack_next;a!==i;a=a._pack_next,g++)if(Io(a,o)){h=1;break}if(1==h)for(l=r._pack_prev;l!==a._pack_prev&&!Io(l,o);l=l._pack_prev,m++);if(h){m>g||g==m&&i.r<r.r?No(r,i=a):No(r=l,i);s--}else{yo(r,o);i=o;t(o)}}}}var E=(p+c)/2,v=(d+f)/2,x=0;for(s=0;u>s;s++){o=n[s];o.x-=E;o.y-=v;x=Math.max(x,o.r+Math.sqrt(o.x*o.x+o.y*o.y))}e.r=x;n.forEach(Lo)}}function To(e){e._pack_next=e._pack_prev=e}function Lo(e){delete e._pack_next;delete e._pack_prev}function So(e,t,n,r){var i=e.children;e.x=t+=r*e.x;e.y=n+=r*e.y;e.r*=r;if(i)for(var o=-1,s=i.length;++o<s;)So(i[o],t,n,r)}function Co(e,t,n){var r=e.r+n.r,i=t.x-e.x,o=t.y-e.y;if(r&&(i||o)){var s=t.r+n.r,a=i*i+o*o;s*=s;r*=r;var l=.5+(r-s)/(2*a),u=Math.sqrt(Math.max(0,2*s*(r+a)-(r-=a)*r-s*s))/(2*a);n.x=e.x+l*i+u*o;n.y=e.y+l*o-u*i}else{n.x=e.x+r;n.y=e.y}}function bo(e,t){return e.parent==t.parent?1:2}function Ro(e){var t=e.children;return t.length?t[0]:e.t}function wo(e){var t,n=e.children;return(t=n.length)?n[t-1]:e.t}function Oo(e,t,n){var r=n/(t.i-e.i);t.c-=r;t.s+=n;e.c+=r;t.z+=n;t.m+=n}function _o(e){for(var t,n=0,r=0,i=e.children,o=i.length;--o>=0;){t=i[o];t.z+=n;t.m+=n;n+=t.s+(r+=t.c)}}function Fo(e,t,n){return e.a.parent===t.parent?e.a:n}function Po(e){return 1+ia.max(e,function(e){return e.y})}function Mo(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function ko(e){var t=e.children;return t&&t.length?ko(t[0]):e}function Do(e){var t,n=e.children;return n&&(t=n.length)?Do(n[t-1]):e}function Go(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function Uo(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],o=e.dy-t[0]-t[2];if(0>i){n+=i/2;i=0}if(0>o){r+=o/2;o=0}return{x:n,y:r,dx:i,dy:o}}function jo(e){var t=e[0],n=e[e.length-1];return n>t?[t,n]:[n,t]}function Bo(e){return e.rangeExtent?e.rangeExtent():jo(e.range())}function qo(e,t,n,r){var i=n(e[0],e[1]),o=r(t[0],t[1]);return function(e){return o(i(e))}}function Vo(e,t){var n,r=0,i=e.length-1,o=e[r],s=e[i];if(o>s){n=r,r=i,i=n;n=o,o=s,s=n}e[r]=t.floor(o);e[i]=t.ceil(s);return e}function Ho(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:Tu}function zo(e,t,n,r){var i=[],o=[],s=0,a=Math.min(e.length,t.length)-1;if(e[a]<e[0]){e=e.slice().reverse();t=t.slice().reverse()}for(;++s<=a;){i.push(n(e[s-1],e[s]));o.push(r(t[s-1],t[s]))}return function(t){var n=ia.bisect(e,t,1,a)-1;return o[n](i[n](t))}}function Wo(e,t,n,r){function i(){var i=Math.min(e.length,t.length)>2?zo:qo,l=r?zi:Hi;s=i(e,t,l,n);a=i(t,e,l,yi);return o}function o(e){return s(e)}var s,a;o.invert=function(e){return a(e)};o.domain=function(t){if(!arguments.length)return e;e=t.map(Number);return i()};o.range=function(e){if(!arguments.length)return t;t=e;return i()};o.rangeRound=function(e){return o.range(e).interpolate(Gi)};o.clamp=function(e){if(!arguments.length)return r;r=e;return i()};o.interpolate=function(e){if(!arguments.length)return n;n=e;return i()};o.ticks=function(t){return Qo(e,t)};o.tickFormat=function(t,n){return Xo(e,t,n)};o.nice=function(t){Ko(e,t);return i()};o.copy=function(){return Wo(e,t,n,r)};return i()}function $o(e,t){return ia.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Ko(e,t){return Vo(e,Ho(Yo(e,t)[2]))}function Yo(e,t){null==t&&(t=10);var n=jo(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),o=t/r*i;.15>=o?i*=10:.35>=o?i*=5:.75>=o&&(i*=2);n[0]=Math.ceil(n[0]/i)*i;n[1]=Math.floor(n[1]/i)*i+.5*i;n[2]=i;return n}function Qo(e,t){return ia.range.apply(ia,Yo(e,t))}function Xo(e,t,n){var r=Yo(e,t);if(n){var i=dl.exec(n);i.shift();if("s"===i[8]){var o=ia.formatPrefix(Math.max(va(r[0]),va(r[1])));i[7]||(i[7]="."+Zo(o.scale(r[2])));i[8]="f";n=ia.format(i.join(""));return function(e){return n(o.scale(e))+o.symbol}}i[7]||(i[7]="."+Jo(i[8],r));n=i.join("")}else n=",."+Zo(r[2])+"f";return ia.format(n)}function Zo(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}function Jo(e,t){var n=Zo(t[2]);return e in Lu?Math.abs(n-Zo(Math.max(va(t[0]),va(t[1]))))+ +("e"!==e):n-2*("%"===e)}function es(e,t,n,r){function i(e){return(n?Math.log(0>e?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function o(e){return n?Math.pow(t,e):-Math.pow(t,-e)}function s(t){return e(i(t))}s.invert=function(t){return o(e.invert(t))};s.domain=function(t){if(!arguments.length)return r;n=t[0]>=0;e.domain((r=t.map(Number)).map(i));return s};s.base=function(n){if(!arguments.length)return t;t=+n;e.domain(r.map(i));return s};s.nice=function(){var t=Vo(r.map(i),n?Math:Cu);e.domain(t);r=t.map(o);return s};s.ticks=function(){var e=jo(r),s=[],a=e[0],l=e[1],u=Math.floor(i(a)),p=Math.ceil(i(l)),c=t%1?2:t;if(isFinite(p-u)){if(n){for(;p>u;u++)for(var d=1;c>d;d++)s.push(o(u)*d);s.push(o(u))}else{s.push(o(u));for(;u++<p;)for(var d=c-1;d>0;d--)s.push(o(u)*d)}for(u=0;s[u]<a;u++);for(p=s.length;s[p-1]>l;p--);s=s.slice(u,p)}return s};s.tickFormat=function(e,t){if(!arguments.length)return Su;arguments.length<2?t=Su:"function"!=typeof t&&(t=ia.format(t));var r,a=Math.max(.1,e/s.ticks().length),l=n?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(e){return e/o(l(i(e)+r))<=a?t(e):""}};s.copy=function(){return es(e.copy(),t,n,r)};return $o(s,e)}function ts(e,t,n){function r(t){return e(i(t))}var i=ns(t),o=ns(1/t);r.invert=function(t){return o(e.invert(t))};r.domain=function(t){if(!arguments.length)return n;e.domain((n=t.map(Number)).map(i));return r};r.ticks=function(e){return Qo(n,e)};r.tickFormat=function(e,t){return Xo(n,e,t)};r.nice=function(e){return r.domain(Ko(n,e))};r.exponent=function(s){if(!arguments.length)return t;i=ns(t=s);o=ns(1/t);e.domain(n.map(i));return r};r.copy=function(){return ts(e.copy(),t,n)};return $o(r,e)}function ns(e){return function(t){return 0>t?-Math.pow(-t,e):Math.pow(t,e)}}function rs(e,t){function n(n){return o[((i.get(n)||("range"===t.t?i.set(n,e.push(n)):0/0))-1)%o.length]}function r(t,n){return ia.range(e.length).map(function(e){return t+n*e})}var i,o,s;n.domain=function(r){if(!arguments.length)return e;e=[];i=new u;for(var o,s=-1,a=r.length;++s<a;)i.has(o=r[s])||i.set(o,e.push(o));return n[t.t].apply(n,t.a)};n.range=function(e){if(!arguments.length)return o;o=e;s=0;t={t:"range",a:arguments};return n};n.rangePoints=function(i,a){arguments.length<2&&(a=0);var l=i[0],u=i[1],p=e.length<2?(l=(l+u)/2,0):(u-l)/(e.length-1+a);o=r(l+p*a/2,p);s=0;t={t:"rangePoints",a:arguments};return n};n.rangeRoundPoints=function(i,a){arguments.length<2&&(a=0);var l=i[0],u=i[1],p=e.length<2?(l=u=Math.round((l+u)/2),0):(u-l)/(e.length-1+a)|0;o=r(l+Math.round(p*a/2+(u-l-(e.length-1+a)*p)/2),p);s=0;t={t:"rangeRoundPoints",a:arguments};return n};n.rangeBands=function(i,a,l){arguments.length<2&&(a=0);arguments.length<3&&(l=a);var u=i[1]<i[0],p=i[u-0],c=i[1-u],d=(c-p)/(e.length-a+2*l);o=r(p+d*l,d);u&&o.reverse();s=d*(1-a);t={t:"rangeBands",a:arguments};return n};n.rangeRoundBands=function(i,a,l){arguments.length<2&&(a=0);arguments.length<3&&(l=a);var u=i[1]<i[0],p=i[u-0],c=i[1-u],d=Math.floor((c-p)/(e.length-a+2*l));o=r(p+Math.round((c-p-(e.length-a)*d)/2),d);u&&o.reverse();s=Math.round(d*(1-a));t={t:"rangeRoundBands",a:arguments};return n};n.rangeBand=function(){return s};n.rangeExtent=function(){return jo(t.a[0])};n.copy=function(){return rs(e,t)};return n.domain(e)}function is(e,n){function o(){var t=0,r=n.length;a=[];for(;++t<r;)a[t-1]=ia.quantile(e,t/r);return s}function s(e){return isNaN(e=+e)?void 0:n[ia.bisect(a,e)]}var a;s.domain=function(n){if(!arguments.length)return e;e=n.map(r).filter(i).sort(t);return o()};s.range=function(e){if(!arguments.length)return n;n=e;return o()};s.quantiles=function(){return a};s.invertExtent=function(t){t=n.indexOf(t);return 0>t?[0/0,0/0]:[t>0?a[t-1]:e[0],t<a.length?a[t]:e[e.length-1]]};s.copy=function(){return is(e,n)};return o()}function os(e,t,n){function r(t){return n[Math.max(0,Math.min(s,Math.floor(o*(t-e))))]}function i(){o=n.length/(t-e);s=n.length-1;return r}var o,s;r.domain=function(n){if(!arguments.length)return[e,t];e=+n[0];t=+n[n.length-1];return i()};r.range=function(e){if(!arguments.length)return n;n=e;return i()};r.invertExtent=function(t){t=n.indexOf(t);t=0>t?0/0:t/o+e;return[t,t+1/o]};r.copy=function(){return os(e,t,n)};return i()}function ss(e,t){function n(n){return n>=n?t[ia.bisect(e,n)]:void 0}n.domain=function(t){if(!arguments.length)return e;e=t;return n};n.range=function(e){if(!arguments.length)return t;t=e;return n};n.invertExtent=function(n){n=t.indexOf(n);return[e[n-1],e[n]]};n.copy=function(){return ss(e,t)};return n}function as(e){function t(e){return+e}t.invert=t;t.domain=t.range=function(n){if(!arguments.length)return e;e=n.map(t);return t};t.ticks=function(t){return Qo(e,t)};t.tickFormat=function(t,n){return Xo(e,t,n)};t.copy=function(){return as(e)};return t}function ls(){return 0}function us(e){return e.innerRadius}function ps(e){return e.outerRadius}function cs(e){return e.startAngle}function ds(e){return e.endAngle}function fs(e){return e&&e.padAngle}function hs(e,t,n,r){return(e-n)*t-(t-r)*e>0?0:1}function gs(e,t,n,r,i){var o=e[0]-t[0],s=e[1]-t[1],a=(i?r:-r)/Math.sqrt(o*o+s*s),l=a*s,u=-a*o,p=e[0]+l,c=e[1]+u,d=t[0]+l,f=t[1]+u,h=(p+d)/2,g=(c+f)/2,m=d-p,E=f-c,v=m*m+E*E,x=n-r,y=p*f-d*c,N=(0>E?-1:1)*Math.sqrt(x*x*v-y*y),I=(y*E-m*N)/v,A=(-y*m-E*N)/v,T=(y*E+m*N)/v,L=(-y*m+E*N)/v,S=I-h,C=A-g,b=T-h,R=L-g;S*S+C*C>b*b+R*R&&(I=T,A=L);return[[I-l,A-u],[I*n/x,A*n/x]]}function ms(e){function t(t){function s(){u.push("M",o(e(p),a))}for(var l,u=[],p=[],c=-1,d=t.length,f=Ct(n),h=Ct(r);++c<d;)if(i.call(this,l=t[c],c))p.push([+f.call(this,l,c),+h.call(this,l,c)]);else if(p.length){s();p=[]}p.length&&s();return u.length?u.join(""):null}var n=wr,r=Or,i=On,o=Es,s=o.key,a=.7;t.x=function(e){if(!arguments.length)return n;n=e;return t};t.y=function(e){if(!arguments.length)return r;r=e;return t};t.defined=function(e){if(!arguments.length)return i;i=e;return t};t.interpolate=function(e){if(!arguments.length)return s;s="function"==typeof e?o=e:(o=Fu.get(e)||Es).key;return t};t.tension=function(e){if(!arguments.length)return a;a=e;return t};return t}function Es(e){return e.join("L")}function vs(e){return Es(e)+"Z" }function xs(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("H",(r[0]+(r=e[t])[0])/2,"V",r[1]);n>1&&i.push("H",r[0]);return i.join("")}function ys(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("V",(r=e[t])[1],"H",r[0]);return i.join("")}function Ns(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("H",(r=e[t])[0],"V",r[1]);return i.join("")}function Is(e,t){return e.length<4?Es(e):e[1]+Ls(e.slice(1,-1),Ss(e,t))}function As(e,t){return e.length<3?Es(e):e[0]+Ls((e.push(e[0]),e),Ss([e[e.length-2]].concat(e,[e[1]]),t))}function Ts(e,t){return e.length<3?Es(e):e[0]+Ls(e,Ss(e,t))}function Ls(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return Es(e);var n=e.length!=t.length,r="",i=e[0],o=e[1],s=t[0],a=s,l=1;if(n){r+="Q"+(o[0]-2*s[0]/3)+","+(o[1]-2*s[1]/3)+","+o[0]+","+o[1];i=e[1];l=2}if(t.length>1){a=t[1];o=e[l];l++;r+="C"+(i[0]+s[0])+","+(i[1]+s[1])+","+(o[0]-a[0])+","+(o[1]-a[1])+","+o[0]+","+o[1];for(var u=2;u<t.length;u++,l++){o=e[l];a=t[u];r+="S"+(o[0]-a[0])+","+(o[1]-a[1])+","+o[0]+","+o[1]}}if(n){var p=e[l];r+="Q"+(o[0]+2*a[0]/3)+","+(o[1]+2*a[1]/3)+","+p[0]+","+p[1]}return r}function Ss(e,t){for(var n,r=[],i=(1-t)/2,o=e[0],s=e[1],a=1,l=e.length;++a<l;){n=o;o=s;s=e[a];r.push([i*(s[0]-n[0]),i*(s[1]-n[1])])}return r}function Cs(e){if(e.length<3)return Es(e);var t=1,n=e.length,r=e[0],i=r[0],o=r[1],s=[i,i,i,(r=e[1])[0]],a=[o,o,o,r[1]],l=[i,",",o,"L",Os(ku,s),",",Os(ku,a)];e.push(e[n-1]);for(;++t<=n;){r=e[t];s.shift();s.push(r[0]);a.shift();a.push(r[1]);_s(l,s,a)}e.pop();l.push("L",r);return l.join("")}function bs(e){if(e.length<4)return Es(e);for(var t,n=[],r=-1,i=e.length,o=[0],s=[0];++r<3;){t=e[r];o.push(t[0]);s.push(t[1])}n.push(Os(ku,o)+","+Os(ku,s));--r;for(;++r<i;){t=e[r];o.shift();o.push(t[0]);s.shift();s.push(t[1]);_s(n,o,s)}return n.join("")}function Rs(e){for(var t,n,r=-1,i=e.length,o=i+4,s=[],a=[];++r<4;){n=e[r%i];s.push(n[0]);a.push(n[1])}t=[Os(ku,s),",",Os(ku,a)];--r;for(;++r<o;){n=e[r%i];s.shift();s.push(n[0]);a.shift();a.push(n[1]);_s(t,s,a)}return t.join("")}function ws(e,t){var n=e.length-1;if(n)for(var r,i,o=e[0][0],s=e[0][1],a=e[n][0]-o,l=e[n][1]-s,u=-1;++u<=n;){r=e[u];i=u/n;r[0]=t*r[0]+(1-t)*(o+i*a);r[1]=t*r[1]+(1-t)*(s+i*l)}return Cs(e)}function Os(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function _s(e,t,n){e.push("C",Os(Pu,t),",",Os(Pu,n),",",Os(Mu,t),",",Os(Mu,n),",",Os(ku,t),",",Os(ku,n))}function Fs(e,t){return(t[1]-e[1])/(t[0]-e[0])}function Ps(e){for(var t=0,n=e.length-1,r=[],i=e[0],o=e[1],s=r[0]=Fs(i,o);++t<n;)r[t]=(s+(s=Fs(i=o,o=e[t+1])))/2;r[t]=s;return r}function Ms(e){for(var t,n,r,i,o=[],s=Ps(e),a=-1,l=e.length-1;++a<l;){t=Fs(e[a],e[a+1]);if(va(t)<ka)s[a]=s[a+1]=0;else{n=s[a]/t;r=s[a+1]/t;i=n*n+r*r;if(i>9){i=3*t/Math.sqrt(i);s[a]=i*n;s[a+1]=i*r}}}a=-1;for(;++a<=l;){i=(e[Math.min(l,a+1)][0]-e[Math.max(0,a-1)][0])/(6*(1+s[a]*s[a]));o.push([i||0,s[a]*i||0])}return o}function ks(e){return e.length<3?Es(e):e[0]+Ls(e,Ms(e))}function Ds(e){for(var t,n,r,i=-1,o=e.length;++i<o;){t=e[i];n=t[0];r=t[1]-Ba;t[0]=n*Math.cos(r);t[1]=n*Math.sin(r)}return e}function Gs(e){function t(t){function l(){g.push("M",a(e(E),c),p,u(e(m.reverse()),c),"Z")}for(var d,f,h,g=[],m=[],E=[],v=-1,x=t.length,y=Ct(n),N=Ct(i),I=n===r?function(){return f}:Ct(r),A=i===o?function(){return h}:Ct(o);++v<x;)if(s.call(this,d=t[v],v)){m.push([f=+y.call(this,d,v),h=+N.call(this,d,v)]);E.push([+I.call(this,d,v),+A.call(this,d,v)])}else if(m.length){l();m=[];E=[]}m.length&&l();return g.length?g.join(""):null}var n=wr,r=wr,i=0,o=Or,s=On,a=Es,l=a.key,u=a,p="L",c=.7;t.x=function(e){if(!arguments.length)return r;n=r=e;return t};t.x0=function(e){if(!arguments.length)return n;n=e;return t};t.x1=function(e){if(!arguments.length)return r;r=e;return t};t.y=function(e){if(!arguments.length)return o;i=o=e;return t};t.y0=function(e){if(!arguments.length)return i;i=e;return t};t.y1=function(e){if(!arguments.length)return o;o=e;return t};t.defined=function(e){if(!arguments.length)return s;s=e;return t};t.interpolate=function(e){if(!arguments.length)return l;l="function"==typeof e?a=e:(a=Fu.get(e)||Es).key;u=a.reverse||a;p=a.closed?"M":"L";return t};t.tension=function(e){if(!arguments.length)return c;c=e;return t};return t}function Us(e){return e.radius}function js(e){return[e.x,e.y]}function Bs(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]-Ba;return[n*Math.cos(r),n*Math.sin(r)]}}function qs(){return 64}function Vs(){return"circle"}function Hs(e){var t=Math.sqrt(e/Ga);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function zs(e){return function(){var t,n;if((t=this[e])&&(n=t[t.active])){--t.count?delete t[t.active]:delete this[e];t.active+=.5;n.event&&n.event.interrupt.call(this,this.__data__,n.index)}}}function Ws(e,t,n){Aa(e,Vu);e.namespace=t;e.id=n;return e}function $s(e,t,n,r){var i=e.id,o=e.namespace;return q(e,"function"==typeof n?function(e,s,a){e[o][i].tween.set(t,r(n.call(e,e.__data__,s,a)))}:(n=r(n),function(e){e[o][i].tween.set(t,n)}))}function Ks(e){null==e&&(e="");return function(){this.textContent=e}}function Ys(e){return null==e?"__transition__":"__transition_"+e+"__"}function Qs(e,t,n,r,i){var o=e[n]||(e[n]={active:0,count:0}),s=o[r];if(!s){var a=i.time;s=o[r]={tween:new u,time:a,delay:i.delay,duration:i.duration,ease:i.ease,index:t};i=null;++o.count;ia.timer(function(i){function l(n){if(o.active>r)return p();var i=o[o.active];if(i){--o.count;delete o[o.active];i.event&&i.event.interrupt.call(e,e.__data__,i.index)}o.active=r;s.event&&s.event.start.call(e,e.__data__,t);s.tween.forEach(function(n,r){(r=r.call(e,e.__data__,t))&&g.push(r)});d=s.ease;c=s.duration;ia.timer(function(){h.c=u(n||1)?On:u;return 1},0,a)}function u(n){if(o.active!==r)return 1;for(var i=n/c,a=d(i),l=g.length;l>0;)g[--l].call(e,a);if(i>=1){s.event&&s.event.end.call(e,e.__data__,t);return p()}}function p(){--o.count?delete o[r]:delete e[n];return 1}var c,d,f=s.delay,h=ul,g=[];h.t=f+a;if(i>=f)return l(i-f);h.c=l;return void 0},0,a)}}function Xs(e,t,n){e.attr("transform",function(e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"})}function Zs(e,t,n){e.attr("transform",function(e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"})}function Js(e){return e.toISOString()}function ea(e,t,n){function r(t){return e(t)}function i(e,n){var r=e[1]-e[0],i=r/n,o=ia.bisect(Zu,i);return o==Zu.length?[t.year,Yo(e.map(function(e){return e/31536e6}),n)[2]]:o?t[i/Zu[o-1]<Zu[o]/i?o-1:o]:[tp,Yo(e,n)[2]]}r.invert=function(t){return ta(e.invert(t))};r.domain=function(t){if(!arguments.length)return e.domain().map(ta);e.domain(t);return r};r.nice=function(e,t){function n(n){return!isNaN(n)&&!e.range(n,ta(+n+1),t).length}var o=r.domain(),s=jo(o),a=null==e?i(s,10):"number"==typeof e&&i(s,e);a&&(e=a[0],t=a[1]);return r.domain(Vo(o,t>1?{floor:function(t){for(;n(t=e.floor(t));)t=ta(t-1);return t},ceil:function(t){for(;n(t=e.ceil(t));)t=ta(+t+1);return t}}:e))};r.ticks=function(e,t){var n=jo(r.domain()),o=null==e?i(n,10):"number"==typeof e?i(n,e):!e.range&&[{range:e},t];o&&(e=o[0],t=o[1]);return e.range(n[0],ta(+n[1]+1),1>t?1:t)};r.tickFormat=function(){return n};r.copy=function(){return ea(e.copy(),t,n)};return $o(r,e)}function ta(e){return new Date(e)}function na(e){return JSON.parse(e.responseText)}function ra(e){var t=aa.createRange();t.selectNode(aa.body);return t.createContextualFragment(e.responseText)}var ia={version:"3.5.3"};Date.now||(Date.now=function(){return+new Date});var oa=[].slice,sa=function(e){return oa.call(e)},aa=document,la=aa.documentElement,ua=window;try{sa(la.childNodes)[0].nodeType}catch(pa){sa=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}try{aa.createElement("div").style.setProperty("opacity",0,"")}catch(ca){var da=ua.Element.prototype,fa=da.setAttribute,ha=da.setAttributeNS,ga=ua.CSSStyleDeclaration.prototype,ma=ga.setProperty;da.setAttribute=function(e,t){fa.call(this,e,t+"")};da.setAttributeNS=function(e,t,n){ha.call(this,e,t,n+"")};ga.setProperty=function(e,t,n){ma.call(this,e,t+"",n)}}ia.ascending=t;ia.descending=function(e,t){return e>t?-1:t>e?1:t>=e?0:0/0};ia.min=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=e[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=e[i])&&n>r&&(n=r)}else{for(;++i<o;)if(null!=(r=t.call(e,e[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=t.call(e,e[i],i))&&n>r&&(n=r)}return n};ia.max=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=e[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=e[i])&&r>n&&(n=r)}else{for(;++i<o;)if(null!=(r=t.call(e,e[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=t.call(e,e[i],i))&&r>n&&(n=r)}return n};ia.extent=function(e,t){var n,r,i,o=-1,s=e.length;if(1===arguments.length){for(;++o<s;)if(null!=(r=e[o])&&r>=r){n=i=r;break}for(;++o<s;)if(null!=(r=e[o])){n>r&&(n=r);r>i&&(i=r)}}else{for(;++o<s;)if(null!=(r=t.call(e,e[o],o))&&r>=r){n=i=r;break}for(;++o<s;)if(null!=(r=t.call(e,e[o],o))){n>r&&(n=r);r>i&&(i=r)}}return[n,i]};ia.sum=function(e,t){var n,r=0,o=e.length,s=-1;if(1===arguments.length)for(;++s<o;)i(n=+e[s])&&(r+=n);else for(;++s<o;)i(n=+t.call(e,e[s],s))&&(r+=n);return r};ia.mean=function(e,t){var n,o=0,s=e.length,a=-1,l=s;if(1===arguments.length)for(;++a<s;)i(n=r(e[a]))?o+=n:--l;else for(;++a<s;)i(n=r(t.call(e,e[a],a)))?o+=n:--l;return l?o/l:void 0};ia.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],o=n-r;return o?i+o*(e[r]-i):i};ia.median=function(e,n){var o,s=[],a=e.length,l=-1;if(1===arguments.length)for(;++l<a;)i(o=r(e[l]))&&s.push(o);else for(;++l<a;)i(o=r(n.call(e,e[l],l)))&&s.push(o);return s.length?ia.quantile(s.sort(t),.5):void 0};ia.variance=function(e,t){var n,o,s=e.length,a=0,l=0,u=-1,p=0;if(1===arguments.length){for(;++u<s;)if(i(n=r(e[u]))){o=n-a;a+=o/++p;l+=o*(n-a)}}else for(;++u<s;)if(i(n=r(t.call(e,e[u],u)))){o=n-a;a+=o/++p;l+=o*(n-a)}return p>1?l/(p-1):void 0};ia.deviation=function(){var e=ia.variance.apply(this,arguments);return e?Math.sqrt(e):e};var Ea=o(t);ia.bisectLeft=Ea.left;ia.bisect=ia.bisectRight=Ea.right;ia.bisector=function(e){return o(1===e.length?function(n,r){return t(e(n),r)}:e)};ia.shuffle=function(e,t,n){if((o=arguments.length)<3){n=e.length;2>o&&(t=0)}for(var r,i,o=n-t;o;){i=Math.random()*o--|0;r=e[o+t],e[o+t]=e[i+t],e[i+t]=r}return e};ia.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r};ia.pairs=function(e){for(var t,n=0,r=e.length-1,i=e[0],o=new Array(0>r?0:r);r>n;)o[n]=[t=i,i=e[++n]];return o};ia.zip=function(){if(!(r=arguments.length))return[];for(var e=-1,t=ia.min(arguments,s),n=new Array(t);++e<t;)for(var r,i=-1,o=n[e]=new Array(r);++i<r;)o[i]=arguments[i][e];return n};ia.transpose=function(e){return ia.zip.apply(ia,e)};ia.keys=function(e){var t=[];for(var n in e)t.push(n);return t};ia.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t};ia.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t};ia.merge=function(e){for(var t,n,r,i=e.length,o=-1,s=0;++o<i;)s+=e[o].length;n=new Array(s);for(;--i>=0;){r=e[i];t=r.length;for(;--t>=0;)n[--s]=r[t]}return n};var va=Math.abs;ia.range=function(e,t,n){if(arguments.length<3){n=1;if(arguments.length<2){t=e;e=0}}if((t-e)/n===1/0)throw new Error("infinite range");var r,i=[],o=a(va(n)),s=-1;e*=o,t*=o,n*=o;if(0>n)for(;(r=e+n*++s)>t;)i.push(r/o);else for(;(r=e+n*++s)<t;)i.push(r/o);return i};ia.map=function(e,t){var n=new u;if(e instanceof u)e.forEach(function(e,t){n.set(e,t)});else if(Array.isArray(e)){var r,i=-1,o=e.length;if(1===arguments.length)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t.call(e,r=e[i],i),r)}else for(var s in e)n.set(s,e[s]);return n};var xa="__proto__",ya="\x00";l(u,{has:d,get:function(e){return this._[p(e)]},set:function(e,t){return this._[p(e)]=t},remove:f,keys:h,values:function(){var e=[];for(var t in this._)e.push(this._[t]);return e},entries:function(){var e=[];for(var t in this._)e.push({key:c(t),value:this._[t]});return e},size:g,empty:m,forEach:function(e){for(var t in this._)e.call(this,c(t),this._[t])}});ia.nest=function(){function e(t,s,a){if(a>=o.length)return r?r.call(i,s):n?s.sort(n):s;for(var l,p,c,d,f=-1,h=s.length,g=o[a++],m=new u;++f<h;)(d=m.get(l=g(p=s[f])))?d.push(p):m.set(l,[p]);if(t){p=t();c=function(n,r){p.set(n,e(t,r,a))}}else{p={};c=function(n,r){p[n]=e(t,r,a)}}m.forEach(c);return p}function t(e,n){if(n>=o.length)return e;var r=[],i=s[n++];e.forEach(function(e,i){r.push({key:e,values:t(i,n)})});return i?r.sort(function(e,t){return i(e.key,t.key)}):r}var n,r,i={},o=[],s=[];i.map=function(t,n){return e(n,t,0)};i.entries=function(n){return t(e(ia.map,n,0),0)};i.key=function(e){o.push(e);return i};i.sortKeys=function(e){s[o.length-1]=e;return i};i.sortValues=function(e){n=e;return i};i.rollup=function(e){r=e;return i};return i};ia.set=function(e){var t=new E;if(e)for(var n=0,r=e.length;r>n;++n)t.add(e[n]);return t};l(E,{has:d,add:function(e){this._[p(e+="")]=!0;return e},remove:f,values:h,size:g,empty:m,forEach:function(e){for(var t in this._)e.call(this,c(t))}});ia.behavior={};ia.rebind=function(e,t){for(var n,r=1,i=arguments.length;++r<i;)e[n=arguments[r]]=v(e,t,t[n]);return e};var Na=["webkit","ms","moz","Moz","o","O"];ia.dispatch=function(){for(var e=new N,t=-1,n=arguments.length;++t<n;)e[arguments[t]]=I(e);return e};N.prototype.on=function(e,t){var n=e.indexOf("."),r="";if(n>=0){r=e.slice(n+1);e=e.slice(0,n)}if(e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(r,null);return this}};ia.event=null;ia.requote=function(e){return e.replace(Ia,"\\$&")};var Ia=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Aa={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]},Ta=function(e,t){return t.querySelector(e)},La=function(e,t){return t.querySelectorAll(e)},Sa=la.matches||la[x(la,"matchesSelector")],Ca=function(e,t){return Sa.call(e,t)};if("function"==typeof Sizzle){Ta=function(e,t){return Sizzle(e,t)[0]||null};La=Sizzle;Ca=Sizzle.matchesSelector}ia.selection=function(){return Oa};var ba=ia.selection.prototype=[];ba.select=function(e){var t,n,r,i,o=[];e=C(e);for(var s=-1,a=this.length;++s<a;){o.push(t=[]);t.parentNode=(r=this[s]).parentNode;for(var l=-1,u=r.length;++l<u;)if(i=r[l]){t.push(n=e.call(i,i.__data__,l,s));n&&"__data__"in i&&(n.__data__=i.__data__)}else t.push(null)}return S(o)};ba.selectAll=function(e){var t,n,r=[];e=b(e);for(var i=-1,o=this.length;++i<o;)for(var s=this[i],a=-1,l=s.length;++a<l;)if(n=s[a]){r.push(t=sa(e.call(n,n.__data__,a,i)));t.parentNode=n}return S(r)};var Ra={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};ia.ns={prefix:Ra,qualify:function(e){var t=e.indexOf(":"),n=e;if(t>=0){n=e.slice(0,t);e=e.slice(t+1)}return Ra.hasOwnProperty(n)?{space:Ra[n],local:e}:e}};ba.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();e=ia.ns.qualify(e);return e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(R(t,e[t]));return this}return this.each(R(e,t))};ba.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),r=(e=_(e)).length,i=-1;if(t=n.classList){for(;++i<r;)if(!t.contains(e[i]))return!1}else{t=n.getAttribute("class");for(;++i<r;)if(!O(e[i]).test(t))return!1}return!0}for(t in e)this.each(F(t,e[t]));return this}return this.each(F(e,t))};ba.style=function(e,t,n){var r=arguments.length;if(3>r){if("string"!=typeof e){2>r&&(t="");for(n in e)this.each(M(n,e[n],t));return this}if(2>r)return ua.getComputedStyle(this.node(),null).getPropertyValue(e);n=""}return this.each(M(e,t,n))};ba.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(k(t,e[t]));return this}return this.each(k(e,t))};ba.text=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}:null==e?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent};ba.html=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}:null==e?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML};ba.append=function(e){e=D(e);return this.select(function(){return this.appendChild(e.apply(this,arguments))})};ba.insert=function(e,t){e=D(e);t=C(t);return this.select(function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)})};ba.remove=function(){return this.each(G)};ba.data=function(e,t){function n(e,n){var r,i,o,s=e.length,c=n.length,d=Math.min(s,c),f=new Array(c),h=new Array(c),g=new Array(s);if(t){var m,E=new u,v=new Array(s);for(r=-1;++r<s;){E.has(m=t.call(i=e[r],i.__data__,r))?g[r]=i:E.set(m,i);v[r]=m}for(r=-1;++r<c;){if(i=E.get(m=t.call(n,o=n[r],r))){if(i!==!0){f[r]=i;i.__data__=o}}else h[r]=U(o);E.set(m,!0)}for(r=-1;++r<s;)E.get(v[r])!==!0&&(g[r]=e[r])}else{for(r=-1;++r<d;){i=e[r];o=n[r];if(i){i.__data__=o;f[r]=i}else h[r]=U(o)}for(;c>r;++r)h[r]=U(n[r]);for(;s>r;++r)g[r]=e[r]}h.update=f;h.parentNode=f.parentNode=g.parentNode=e.parentNode;a.push(h);l.push(f);p.push(g)}var r,i,o=-1,s=this.length;if(!arguments.length){e=new Array(s=(r=this[0]).length);for(;++o<s;)(i=r[o])&&(e[o]=i.__data__);return e}var a=V([]),l=S([]),p=S([]);if("function"==typeof e)for(;++o<s;)n(r=this[o],e.call(r,r.parentNode.__data__,o));else for(;++o<s;)n(r=this[o],e);l.enter=function(){return a};l.exit=function(){return p};return l};ba.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")};ba.filter=function(e){var t,n,r,i=[];"function"!=typeof e&&(e=j(e));for(var o=0,s=this.length;s>o;o++){i.push(t=[]);t.parentNode=(n=this[o]).parentNode;for(var a=0,l=n.length;l>a;a++)(r=n[a])&&e.call(r,r.__data__,a,o)&&t.push(r)}return S(i)};ba.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n,r=this[e],i=r.length-1,o=r[i];--i>=0;)if(n=r[i]){o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o);o=n}return this};ba.sort=function(e){e=B.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()};ba.each=function(e){return q(this,function(t,n,r){e.call(t,t.__data__,n,r)})};ba.call=function(e){var t=sa(arguments);e.apply(t[0]=this,t);return this};ba.empty=function(){return!this.node()};ba.node=function(){for(var e=0,t=this.length;t>e;e++)for(var n=this[e],r=0,i=n.length;i>r;r++){var o=n[r];if(o)return o}return null};ba.size=function(){var e=0;q(this,function(){++e});return e};var wa=[];ia.selection.enter=V;ia.selection.enter.prototype=wa;wa.append=ba.append;wa.empty=ba.empty;wa.node=ba.node;wa.call=ba.call;wa.size=ba.size;wa.select=function(e){for(var t,n,r,i,o,s=[],a=-1,l=this.length;++a<l;){r=(i=this[a]).update;s.push(t=[]);t.parentNode=i.parentNode;for(var u=-1,p=i.length;++u<p;)if(o=i[u]){t.push(r[u]=n=e.call(i.parentNode,o.__data__,u,a));n.__data__=o.__data__}else t.push(null)}return S(s)};wa.insert=function(e,t){arguments.length<2&&(t=H(this));return ba.insert.call(this,e,t)};ia.select=function(e){var t=["string"==typeof e?Ta(e,aa):e];t.parentNode=la;return S([t])};ia.selectAll=function(e){var t=sa("string"==typeof e?La(e,aa):e);t.parentNode=la;return S([t])};var Oa=ia.select(la);ba.on=function(e,t,n){var r=arguments.length;if(3>r){if("string"!=typeof e){2>r&&(t=!1);for(n in e)this.each(z(n,e[n],t));return this}if(2>r)return(r=this.node()["__on"+e])&&r._;n=!1}return this.each(z(e,t,n))};var _a=ia.map({mouseenter:"mouseover",mouseleave:"mouseout"});_a.forEach(function(e){"on"+e in aa&&_a.remove(e)});var Fa="onselectstart"in aa?null:x(la.style,"userSelect"),Pa=0;ia.mouse=function(e){return Y(e,T())};var Ma=/WebKit/.test(ua.navigator.userAgent)?-1:0;ia.touch=function(e,t,n){arguments.length<3&&(n=t,t=T().changedTouches);if(t)for(var r,i=0,o=t.length;o>i;++i)if((r=t[i]).identifier===n)return Y(e,r)};ia.behavior.drag=function(){function e(){this.on("mousedown.drag",i).on("touchstart.drag",o)}function t(e,t,i,o,s){return function(){function a(){var e,n,r=t(d,g);if(r){e=r[0]-x[0];n=r[1]-x[1];h|=e|n;x=r;f({type:"drag",x:r[0]+u[0],y:r[1]+u[1],dx:e,dy:n})}}function l(){if(t(d,g)){E.on(o+m,null).on(s+m,null);v(h&&ia.event.target===c);f({type:"dragend"})}}var u,p=this,c=ia.event.target,d=p.parentNode,f=n.of(p,arguments),h=0,g=e(),m=".drag"+(null==g?"":"-"+g),E=ia.select(i()).on(o+m,a).on(s+m,l),v=K(),x=t(d,g);if(r){u=r.apply(p,arguments);u=[u.x-x[0],u.y-x[1]]}else u=[0,0];f({type:"dragstart"})}}var n=L(e,"drag","dragstart","dragend"),r=null,i=t(y,ia.mouse,Z,"mousemove","mouseup"),o=t(Q,ia.touch,X,"touchmove","touchend");e.origin=function(t){if(!arguments.length)return r;r=t;return e};return ia.rebind(e,n,"on")};ia.touches=function(e,t){arguments.length<2&&(t=T().touches);return t?sa(t).map(function(t){var n=Y(e,t);n.identifier=t.identifier;return n}):[]};var ka=1e-6,Da=ka*ka,Ga=Math.PI,Ua=2*Ga,ja=Ua-ka,Ba=Ga/2,qa=Ga/180,Va=180/Ga,Ha=Math.SQRT2,za=2,Wa=4;ia.interpolateZoom=function(e,t){function n(e){var t=e*v;if(E){var n=it(g),s=o/(za*d)*(n*ot(Ha*t+g)-rt(g));return[r+s*u,i+s*p,o*n/it(Ha*t+g)]}return[r+e*u,i+e*p,o*Math.exp(Ha*t)]}var r=e[0],i=e[1],o=e[2],s=t[0],a=t[1],l=t[2],u=s-r,p=a-i,c=u*u+p*p,d=Math.sqrt(c),f=(l*l-o*o+Wa*c)/(2*o*za*d),h=(l*l-o*o-Wa*c)/(2*l*za*d),g=Math.log(Math.sqrt(f*f+1)-f),m=Math.log(Math.sqrt(h*h+1)-h),E=m-g,v=(E||Math.log(l/o))/Ha;n.duration=1e3*v;return n};ia.behavior.zoom=function(){function e(e){e.on(w,p).on(Ya+".zoom",d).on("dblclick.zoom",f).on(F,c)}function t(e){return[(e[0]-T.x)/T.k,(e[1]-T.y)/T.k]}function n(e){return[e[0]*T.k+T.x,e[1]*T.k+T.y]}function r(e){T.k=Math.max(C[0],Math.min(C[1],e))}function i(e,t){t=n(t);T.x+=e[0]-t[0];T.y+=e[1]-t[1]}function o(t,n,o,s){t.__chart__={x:T.x,y:T.y,k:T.k};r(Math.pow(2,s));i(g=n,o);t=ia.select(t);b>0&&(t=t.transition().duration(b));t.call(e.event)}function s(){y&&y.domain(x.range().map(function(e){return(e-T.x)/T.k}).map(x.invert));I&&I.domain(N.range().map(function(e){return(e-T.y)/T.k}).map(N.invert))}function a(e){R++||e({type:"zoomstart"})}function l(e){s();e({type:"zoom",scale:T.k,translate:[T.x,T.y]})}function u(e){--R||e({type:"zoomend"});g=null}function p(){function e(){p=1;i(ia.mouse(r),d);l(s)}function n(){c.on(O,null).on(_,null);f(p&&ia.event.target===o);u(s)}var r=this,o=ia.event.target,s=P.of(r,arguments),p=0,c=ia.select(ua).on(O,e).on(_,n),d=t(ia.mouse(r)),f=K();qu.call(r);a(s)}function c(){function e(){var e=ia.touches(h);f=T.k;e.forEach(function(e){e.identifier in m&&(m[e.identifier]=t(e))});return e}function n(){var t=ia.event.target;ia.select(t).on(y,s).on(N,d);I.push(t);for(var n=ia.event.changedTouches,r=0,i=n.length;i>r;++r)m[n[r].identifier]=null;var a=e(),l=Date.now();if(1===a.length){if(500>l-v){var u=a[0];o(h,u,m[u.identifier],Math.floor(Math.log(T.k)/Math.LN2)+1);A()}v=l}else if(a.length>1){var u=a[0],p=a[1],c=u[0]-p[0],f=u[1]-p[1];E=c*c+f*f}}function s(){var e,t,n,o,s=ia.touches(h);qu.call(h);for(var a=0,u=s.length;u>a;++a,o=null){n=s[a];if(o=m[n.identifier]){if(t)break;e=n,t=o}}if(o){var p=(p=n[0]-e[0])*p+(p=n[1]-e[1])*p,c=E&&Math.sqrt(p/E);e=[(e[0]+n[0])/2,(e[1]+n[1])/2];t=[(t[0]+o[0])/2,(t[1]+o[1])/2];r(c*f)}v=null;i(e,t);l(g)}function d(){if(ia.event.touches.length){for(var t=ia.event.changedTouches,n=0,r=t.length;r>n;++n)delete m[t[n].identifier];for(var i in m)return void e()}ia.selectAll(I).on(x,null);L.on(w,p).on(F,c);S();u(g)}var f,h=this,g=P.of(h,arguments),m={},E=0,x=".zoom-"+ia.event.changedTouches[0].identifier,y="touchmove"+x,N="touchend"+x,I=[],L=ia.select(h),S=K();n();a(g);L.on(w,null).on(F,n)}function d(){var e=P.of(this,arguments);E?clearTimeout(E):(h=t(g=m||ia.mouse(this)),qu.call(this),a(e));E=setTimeout(function(){E=null;u(e)},50);A();r(Math.pow(2,.002*$a())*T.k);i(g,h);l(e)}function f(){var e=ia.mouse(this),n=Math.log(T.k)/Math.LN2;o(this,e,t(e),ia.event.shiftKey?Math.ceil(n)-1:Math.floor(n)+1)}var h,g,m,E,v,x,y,N,I,T={x:0,y:0,k:1},S=[960,500],C=Ka,b=250,R=0,w="mousedown.zoom",O="mousemove.zoom",_="mouseup.zoom",F="touchstart.zoom",P=L(e,"zoomstart","zoom","zoomend");e.event=function(e){e.each(function(){var e=P.of(this,arguments),t=T;if(ju)ia.select(this).transition().each("start.zoom",function(){T=this.__chart__||{x:0,y:0,k:1};a(e)}).tween("zoom:zoom",function(){var n=S[0],r=S[1],i=g?g[0]:n/2,o=g?g[1]:r/2,s=ia.interpolateZoom([(i-T.x)/T.k,(o-T.y)/T.k,n/T.k],[(i-t.x)/t.k,(o-t.y)/t.k,n/t.k]);return function(t){var r=s(t),a=n/r[2];this.__chart__=T={x:i-r[0]*a,y:o-r[1]*a,k:a};l(e)}}).each("interrupt.zoom",function(){u(e)}).each("end.zoom",function(){u(e)});else{this.__chart__=T;a(e);l(e);u(e)}})};e.translate=function(t){if(!arguments.length)return[T.x,T.y];T={x:+t[0],y:+t[1],k:T.k};s();return e};e.scale=function(t){if(!arguments.length)return T.k;T={x:T.x,y:T.y,k:+t};s();return e};e.scaleExtent=function(t){if(!arguments.length)return C;C=null==t?Ka:[+t[0],+t[1]];return e};e.center=function(t){if(!arguments.length)return m;m=t&&[+t[0],+t[1]];return e};e.size=function(t){if(!arguments.length)return S;S=t&&[+t[0],+t[1]];return e};e.duration=function(t){if(!arguments.length)return b;b=+t;return e};e.x=function(t){if(!arguments.length)return y;y=t;x=t.copy();T={x:0,y:0,k:1};return e};e.y=function(t){if(!arguments.length)return I;I=t;N=t.copy();T={x:0,y:0,k:1};return e};return ia.rebind(e,P,"on")};var $a,Ka=[0,1/0],Ya="onwheel"in aa?($a=function(){return-ia.event.deltaY*(ia.event.deltaMode?120:1)},"wheel"):"onmousewheel"in aa?($a=function(){return ia.event.wheelDelta},"mousewheel"):($a=function(){return-ia.event.detail},"MozMousePixelScroll");ia.color=at;at.prototype.toString=function(){return this.rgb()+""};ia.hsl=lt;var Qa=lt.prototype=new at;Qa.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);return new lt(this.h,this.s,this.l/e)};Qa.darker=function(e){e=Math.pow(.7,arguments.length?e:1);return new lt(this.h,this.s,e*this.l)};Qa.rgb=function(){return ut(this.h,this.s,this.l)};ia.hcl=pt;var Xa=pt.prototype=new at;Xa.brighter=function(e){return new pt(this.h,this.c,Math.min(100,this.l+Za*(arguments.length?e:1)))};Xa.darker=function(e){return new pt(this.h,this.c,Math.max(0,this.l-Za*(arguments.length?e:1)))};Xa.rgb=function(){return ct(this.h,this.c,this.l).rgb()};ia.lab=dt;var Za=18,Ja=.95047,el=1,tl=1.08883,nl=dt.prototype=new at;nl.brighter=function(e){return new dt(Math.min(100,this.l+Za*(arguments.length?e:1)),this.a,this.b)};nl.darker=function(e){return new dt(Math.max(0,this.l-Za*(arguments.length?e:1)),this.a,this.b)};nl.rgb=function(){return ft(this.l,this.a,this.b)};ia.rgb=vt;var rl=vt.prototype=new at;rl.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;if(!t&&!n&&!r)return new vt(i,i,i);t&&i>t&&(t=i);n&&i>n&&(n=i);r&&i>r&&(r=i);return new vt(Math.min(255,t/e),Math.min(255,n/e),Math.min(255,r/e))};rl.darker=function(e){e=Math.pow(.7,arguments.length?e:1);return new vt(e*this.r,e*this.g,e*this.b)};rl.hsl=function(){return At(this.r,this.g,this.b)};rl.toString=function(){return"#"+Nt(this.r)+Nt(this.g)+Nt(this.b)};var il=ia.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});il.forEach(function(e,t){il.set(e,xt(t))});ia.functor=Ct;ia.xhr=Rt(bt);ia.dsv=function(e,t){function n(e,n,o){arguments.length<3&&(o=n,n=null);var s=wt(e,t,null==n?r:i(n),o);s.row=function(e){return arguments.length?s.response(null==(n=e)?r:i(e)):n};return s}function r(e){return n.parse(e.responseText)}function i(e){return function(t){return n.parse(t.responseText,e)}}function o(t){return t.map(s).join(e)}function s(e){return a.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var a=new RegExp('["'+e+"\n]"),l=e.charCodeAt(0);n.parse=function(e,t){var r;return n.parseRows(e,function(e,n){if(r)return r(e,n-1);var i=new Function("d","return {"+e.map(function(e,t){return JSON.stringify(e)+": d["+t+"]"}).join(",")+"}");r=t?function(e,n){return t(i(e),n)}:i})};n.parseRows=function(e,t){function n(){if(p>=u)return s;if(i)return i=!1,o;var t=p;if(34===e.charCodeAt(t)){for(var n=t;n++<u;)if(34===e.charCodeAt(n)){if(34!==e.charCodeAt(n+1))break;++n}p=n+2;var r=e.charCodeAt(n+1);if(13===r){i=!0;10===e.charCodeAt(n+2)&&++p}else 10===r&&(i=!0);return e.slice(t+1,n).replace(/""/g,'"')}for(;u>p;){var r=e.charCodeAt(p++),a=1;if(10===r)i=!0;else if(13===r){i=!0;10===e.charCodeAt(p)&&(++p,++a)}else if(r!==l)continue;return e.slice(t,p-a)}return e.slice(t)}for(var r,i,o={},s={},a=[],u=e.length,p=0,c=0;(r=n())!==s;){for(var d=[];r!==o&&r!==s;){d.push(r);r=n()}t&&null==(d=t(d,c++))||a.push(d)}return a};n.format=function(t){if(Array.isArray(t[0]))return n.formatRows(t);var r=new E,i=[];t.forEach(function(e){for(var t in e)r.has(t)||i.push(r.add(t))});return[i.map(s).join(e)].concat(t.map(function(t){return i.map(function(e){return s(t[e])}).join(e)})).join("\n")};n.formatRows=function(e){return e.map(o).join("\n")};return n};ia.csv=ia.dsv(",","text/csv");ia.tsv=ia.dsv(" ","text/tab-separated-values");var ol,sl,al,ll,ul,pl=ua[x(ua,"requestAnimationFrame")]||function(e){setTimeout(e,17)};ia.timer=function(e,t,n){var r=arguments.length;2>r&&(t=0);3>r&&(n=Date.now());var i=n+t,o={c:e,t:i,f:!1,n:null};sl?sl.n=o:ol=o;sl=o;if(!al){ll=clearTimeout(ll);al=1;pl(Ft)}};ia.timer.flush=function(){Pt();Mt()};ia.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e) };var cl=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Dt);ia.formatPrefix=function(e,t){var n=0;if(e){0>e&&(e*=-1);t&&(e=ia.round(e,kt(e,t)));n=1+Math.floor(1e-12+Math.log(e)/Math.LN10);n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))}return cl[8+n/3]};var dl=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,fl=ia.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return(e=ia.round(e,kt(e,t))).toFixed(Math.max(0,Math.min(20,kt(e*(1+1e-15),t))))}}),hl=ia.time={},gl=Date;jt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ml.setUTCDate.apply(this._,arguments)},setDay:function(){ml.setUTCDay.apply(this._,arguments)},setFullYear:function(){ml.setUTCFullYear.apply(this._,arguments)},setHours:function(){ml.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ml.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ml.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ml.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ml.setUTCSeconds.apply(this._,arguments)},setTime:function(){ml.setTime.apply(this._,arguments)}};var ml=Date.prototype;hl.year=Bt(function(e){e=hl.day(e);e.setMonth(0,1);return e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()});hl.years=hl.year.range;hl.years.utc=hl.year.utc.range;hl.day=Bt(function(e){var t=new gl(2e3,0);t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate());return t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1});hl.days=hl.day.range;hl.days.utc=hl.day.utc.range;hl.dayOfYear=function(e){var t=hl.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)};["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(e,t){t=7-t;var n=hl[e]=Bt(function(e){(e=hl.day(e)).setDate(e.getDate()-(e.getDay()+t)%7);return e},function(e,t){e.setDate(e.getDate()+7*Math.floor(t))},function(e){var n=hl.year(e).getDay();return Math.floor((hl.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});hl[e+"s"]=n.range;hl[e+"s"].utc=n.utc.range;hl[e+"OfYear"]=function(e){var n=hl.year(e).getDay();return Math.floor((hl.dayOfYear(e)+(n+t)%7)/7)}});hl.week=hl.sunday;hl.weeks=hl.sunday.range;hl.weeks.utc=hl.sunday.utc.range;hl.weekOfYear=hl.sundayOfYear;var El={"-":"",_:" ",0:"0"},vl=/^\s*\d+/,xl=/^%/;ia.locale=function(e){return{numberFormat:Gt(e),timeFormat:Vt(e)}};var yl=ia.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ia.format=yl.numberFormat;ia.geo={};cn.prototype={s:0,t:0,add:function(e){dn(e,this.t,Nl);dn(Nl.s,this.s,this);this.s?this.t+=Nl.t:this.s=Nl.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var Nl=new cn;ia.geo.stream=function(e,t){e&&Il.hasOwnProperty(e.type)?Il[e.type](e,t):fn(e,t)};var Il={Feature:function(e,t){fn(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)fn(n[r].geometry,t)}},Al={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates;t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){hn(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)hn(n[r],t,0)},Polygon:function(e,t){gn(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)gn(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)fn(n[r],t)}};ia.geo.area=function(e){Tl=0;ia.geo.stream(e,Sl);return Tl};var Tl,Ll=new cn,Sl={sphere:function(){Tl+=4*Ga},point:y,lineStart:y,lineEnd:y,polygonStart:function(){Ll.reset();Sl.lineStart=mn},polygonEnd:function(){var e=2*Ll;Tl+=0>e?4*Ga+e:e;Sl.lineStart=Sl.lineEnd=Sl.point=y}};ia.geo.bounds=function(){function e(e,t){x.push(y=[p=e,d=e]);c>t&&(c=t);t>f&&(f=t)}function t(t,n){var r=En([t*qa,n*qa]);if(E){var i=xn(E,r),o=[i[1],-i[0],0],s=xn(o,i);In(s);s=An(s);var l=t-h,u=l>0?1:-1,g=s[0]*Va*u,m=va(l)>180;if(m^(g>u*h&&u*t>g)){var v=s[1]*Va;v>f&&(f=v)}else if(g=(g+360)%360-180,m^(g>u*h&&u*t>g)){var v=-s[1]*Va;c>v&&(c=v)}else{c>n&&(c=n);n>f&&(f=n)}if(m)h>t?a(p,t)>a(p,d)&&(d=t):a(t,d)>a(p,d)&&(p=t);else if(d>=p){p>t&&(p=t);t>d&&(d=t)}else t>h?a(p,t)>a(p,d)&&(d=t):a(t,d)>a(p,d)&&(p=t)}else e(t,n);E=r,h=t}function n(){N.point=t}function r(){y[0]=p,y[1]=d;N.point=e;E=null}function i(e,n){if(E){var r=e-h;v+=va(r)>180?r+(r>0?360:-360):r}else g=e,m=n;Sl.point(e,n);t(e,n)}function o(){Sl.lineStart()}function s(){i(g,m);Sl.lineEnd();va(v)>ka&&(p=-(d=180));y[0]=p,y[1]=d;E=null}function a(e,t){return(t-=e)<0?t+360:t}function l(e,t){return e[0]-t[0]}function u(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var p,c,d,f,h,g,m,E,v,x,y,N={point:e,lineStart:n,lineEnd:r,polygonStart:function(){N.point=i;N.lineStart=o;N.lineEnd=s;v=0;Sl.polygonStart()},polygonEnd:function(){Sl.polygonEnd();N.point=e;N.lineStart=n;N.lineEnd=r;0>Ll?(p=-(d=180),c=-(f=90)):v>ka?f=90:-ka>v&&(c=-90);y[0]=p,y[1]=d}};return function(e){f=d=-(p=c=1/0);x=[];ia.geo.stream(e,N);var t=x.length;if(t){x.sort(l);for(var n,r=1,i=x[0],o=[i];t>r;++r){n=x[r];if(u(n[0],i)||u(n[1],i)){a(i[0],n[1])>a(i[0],i[1])&&(i[1]=n[1]);a(n[0],i[1])>a(i[0],i[1])&&(i[0]=n[0])}else o.push(i=n)}for(var s,n,h=-1/0,t=o.length-1,r=0,i=o[t];t>=r;i=n,++r){n=o[r];(s=a(i[1],n[0]))>h&&(h=s,p=n[0],d=i[1])}}x=y=null;return 1/0===p||1/0===c?[[0/0,0/0],[0/0,0/0]]:[[p,c],[d,f]]}}();ia.geo.centroid=function(e){Cl=bl=Rl=wl=Ol=_l=Fl=Pl=Ml=kl=Dl=0;ia.geo.stream(e,Gl);var t=Ml,n=kl,r=Dl,i=t*t+n*n+r*r;if(Da>i){t=_l,n=Fl,r=Pl;ka>bl&&(t=Rl,n=wl,r=Ol);i=t*t+n*n+r*r;if(Da>i)return[0/0,0/0]}return[Math.atan2(n,t)*Va,nt(r/Math.sqrt(i))*Va]};var Cl,bl,Rl,wl,Ol,_l,Fl,Pl,Ml,kl,Dl,Gl={sphere:y,point:Ln,lineStart:Cn,lineEnd:bn,polygonStart:function(){Gl.lineStart=Rn},polygonEnd:function(){Gl.lineStart=Cn}},Ul=Mn(On,Un,Bn,[-Ga,-Ga/2]),jl=1e9;ia.geo.clipExtent=function(){var e,t,n,r,i,o,s={stream:function(e){i&&(i.valid=!1);i=o(e);i.valid=!0;return i},extent:function(a){if(!arguments.length)return[[e,t],[n,r]];o=zn(e=+a[0][0],t=+a[0][1],n=+a[1][0],r=+a[1][1]);i&&(i.valid=!1,i=null);return s}};return s.extent([[0,0],[960,500]])};(ia.geo.conicEqualArea=function(){return Wn($n)}).raw=$n;ia.geo.albers=function(){return ia.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)};ia.geo.albersUsa=function(){function e(e){var o=e[0],s=e[1];t=null;(n(o,s),t)||(r(o,s),t)||i(o,s);return t}var t,n,r,i,o=ia.geo.albers(),s=ia.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=ia.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(e,n){t=[e,n]}};e.invert=function(e){var t=o.scale(),n=o.translate(),r=(e[0]-n[0])/t,i=(e[1]-n[1])/t;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?s:i>=.166&&.234>i&&r>=-.214&&-.115>r?a:o).invert(e)};e.stream=function(e){var t=o.stream(e),n=s.stream(e),r=a.stream(e);return{point:function(e,i){t.point(e,i);n.point(e,i);r.point(e,i)},sphere:function(){t.sphere();n.sphere();r.sphere()},lineStart:function(){t.lineStart();n.lineStart();r.lineStart()},lineEnd:function(){t.lineEnd();n.lineEnd();r.lineEnd()},polygonStart:function(){t.polygonStart();n.polygonStart();r.polygonStart()},polygonEnd:function(){t.polygonEnd();n.polygonEnd();r.polygonEnd()}}};e.precision=function(t){if(!arguments.length)return o.precision();o.precision(t);s.precision(t);a.precision(t);return e};e.scale=function(t){if(!arguments.length)return o.scale();o.scale(t);s.scale(.35*t);a.scale(t);return e.translate(o.translate())};e.translate=function(t){if(!arguments.length)return o.translate();var u=o.scale(),p=+t[0],c=+t[1];n=o.translate(t).clipExtent([[p-.455*u,c-.238*u],[p+.455*u,c+.238*u]]).stream(l).point;r=s.translate([p-.307*u,c+.201*u]).clipExtent([[p-.425*u+ka,c+.12*u+ka],[p-.214*u-ka,c+.234*u-ka]]).stream(l).point;i=a.translate([p-.205*u,c+.212*u]).clipExtent([[p-.214*u+ka,c+.166*u+ka],[p-.115*u-ka,c+.234*u-ka]]).stream(l).point;return e};return e.scale(1070)};var Bl,ql,Vl,Hl,zl,Wl,$l={point:y,lineStart:y,lineEnd:y,polygonStart:function(){ql=0;$l.lineStart=Kn},polygonEnd:function(){$l.lineStart=$l.lineEnd=$l.point=y;Bl+=va(ql/2)}},Kl={point:Yn,lineStart:y,lineEnd:y,polygonStart:y,polygonEnd:y},Yl={point:Zn,lineStart:Jn,lineEnd:er,polygonStart:function(){Yl.lineStart=tr},polygonEnd:function(){Yl.point=Zn;Yl.lineStart=Jn;Yl.lineEnd=er}};ia.geo.path=function(){function e(e){if(e){"function"==typeof a&&o.pointRadius(+a.apply(this,arguments));s&&s.valid||(s=i(o));ia.geo.stream(e,s)}return o.result()}function t(){s=null;return e}var n,r,i,o,s,a=4.5;e.area=function(e){Bl=0;ia.geo.stream(e,i($l));return Bl};e.centroid=function(e){Rl=wl=Ol=_l=Fl=Pl=Ml=kl=Dl=0;ia.geo.stream(e,i(Yl));return Dl?[Ml/Dl,kl/Dl]:Pl?[_l/Pl,Fl/Pl]:Ol?[Rl/Ol,wl/Ol]:[0/0,0/0]};e.bounds=function(e){zl=Wl=-(Vl=Hl=1/0);ia.geo.stream(e,i(Kl));return[[Vl,Hl],[zl,Wl]]};e.projection=function(e){if(!arguments.length)return n;i=(n=e)?e.stream||ir(e):bt;return t()};e.context=function(e){if(!arguments.length)return r;o=null==(r=e)?new Qn:new nr(e);"function"!=typeof a&&o.pointRadius(a);return t()};e.pointRadius=function(t){if(!arguments.length)return a;a="function"==typeof t?t:(o.pointRadius(+t),+t);return e};return e.projection(ia.geo.albersUsa()).context(null)};ia.geo.transform=function(e){return{stream:function(t){var n=new or(t);for(var r in e)n[r]=e[r];return n}}};or.prototype={point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};ia.geo.projection=ar;ia.geo.projectionMutator=lr;(ia.geo.equirectangular=function(){return ar(pr)}).raw=pr.invert=pr;ia.geo.rotation=function(e){function t(t){t=e(t[0]*qa,t[1]*qa);return t[0]*=Va,t[1]*=Va,t}e=dr(e[0]%360*qa,e[1]*qa,e.length>2?e[2]*qa:0);t.invert=function(t){t=e.invert(t[0]*qa,t[1]*qa);return t[0]*=Va,t[1]*=Va,t};return t};cr.invert=pr;ia.geo.circle=function(){function e(){var e="function"==typeof r?r.apply(this,arguments):r,t=dr(-e[0]*qa,-e[1]*qa,0).invert,i=[];n(null,null,1,{point:function(e,n){i.push(e=t(e,n));e[0]*=Va,e[1]*=Va}});return{type:"Polygon",coordinates:[i]}}var t,n,r=[0,0],i=6;e.origin=function(t){if(!arguments.length)return r;r=t;return e};e.angle=function(r){if(!arguments.length)return t;n=mr((t=+r)*qa,i*qa);return e};e.precision=function(r){if(!arguments.length)return i;n=mr(t*qa,(i=+r)*qa);return e};return e.angle(90)};ia.geo.distance=function(e,t){var n,r=(t[0]-e[0])*qa,i=e[1]*qa,o=t[1]*qa,s=Math.sin(r),a=Math.cos(r),l=Math.sin(i),u=Math.cos(i),p=Math.sin(o),c=Math.cos(o);return Math.atan2(Math.sqrt((n=c*s)*n+(n=u*p-l*c*a)*n),l*p+u*c*a)};ia.geo.graticule=function(){function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return ia.range(Math.ceil(o/m)*m,i,m).map(d).concat(ia.range(Math.ceil(u/E)*E,l,E).map(f)).concat(ia.range(Math.ceil(r/h)*h,n,h).filter(function(e){return va(e%m)>ka}).map(p)).concat(ia.range(Math.ceil(a/g)*g,s,g).filter(function(e){return va(e%E)>ka}).map(c))}var n,r,i,o,s,a,l,u,p,c,d,f,h=10,g=h,m=90,E=360,v=2.5;e.lines=function(){return t().map(function(e){return{type:"LineString",coordinates:e}})};e.outline=function(){return{type:"Polygon",coordinates:[d(o).concat(f(l).slice(1),d(i).reverse().slice(1),f(u).reverse().slice(1))]}};e.extent=function(t){return arguments.length?e.majorExtent(t).minorExtent(t):e.minorExtent()};e.majorExtent=function(t){if(!arguments.length)return[[o,u],[i,l]];o=+t[0][0],i=+t[1][0];u=+t[0][1],l=+t[1][1];o>i&&(t=o,o=i,i=t);u>l&&(t=u,u=l,l=t);return e.precision(v)};e.minorExtent=function(t){if(!arguments.length)return[[r,a],[n,s]];r=+t[0][0],n=+t[1][0];a=+t[0][1],s=+t[1][1];r>n&&(t=r,r=n,n=t);a>s&&(t=a,a=s,s=t);return e.precision(v)};e.step=function(t){return arguments.length?e.majorStep(t).minorStep(t):e.minorStep()};e.majorStep=function(t){if(!arguments.length)return[m,E];m=+t[0],E=+t[1];return e};e.minorStep=function(t){if(!arguments.length)return[h,g];h=+t[0],g=+t[1];return e};e.precision=function(t){if(!arguments.length)return v;v=+t;p=vr(a,s,90);c=xr(r,n,v);d=vr(u,l,90);f=xr(o,i,v);return e};return e.majorExtent([[-180,-90+ka],[180,90-ka]]).minorExtent([[-180,-80-ka],[180,80+ka]])};ia.geo.greatArc=function(){function e(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),n||i.apply(this,arguments)]}}var t,n,r=yr,i=Nr;e.distance=function(){return ia.geo.distance(t||r.apply(this,arguments),n||i.apply(this,arguments))};e.source=function(n){if(!arguments.length)return r;r=n,t="function"==typeof n?null:n;return e};e.target=function(t){if(!arguments.length)return i;i=t,n="function"==typeof t?null:t;return e};e.precision=function(){return arguments.length?e:0};return e};ia.geo.interpolate=function(e,t){return Ir(e[0]*qa,e[1]*qa,t[0]*qa,t[1]*qa)};ia.geo.length=function(e){Ql=0;ia.geo.stream(e,Xl);return Ql};var Ql,Xl={sphere:y,point:y,lineStart:Ar,lineEnd:y,polygonStart:y,polygonEnd:y},Zl=Tr(function(e){return Math.sqrt(2/(1+e))},function(e){return 2*Math.asin(e/2)});(ia.geo.azimuthalEqualArea=function(){return ar(Zl)}).raw=Zl;var Jl=Tr(function(e){var t=Math.acos(e);return t&&t/Math.sin(t)},bt);(ia.geo.azimuthalEquidistant=function(){return ar(Jl)}).raw=Jl;(ia.geo.conicConformal=function(){return Wn(Lr)}).raw=Lr;(ia.geo.conicEquidistant=function(){return Wn(Sr)}).raw=Sr;var eu=Tr(function(e){return 1/e},Math.atan);(ia.geo.gnomonic=function(){return ar(eu)}).raw=eu;Cr.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-Ba]};(ia.geo.mercator=function(){return br(Cr)}).raw=Cr;var tu=Tr(function(){return 1},Math.asin);(ia.geo.orthographic=function(){return ar(tu)}).raw=tu;var nu=Tr(function(e){return 1/(1+e)},function(e){return 2*Math.atan(e)});(ia.geo.stereographic=function(){return ar(nu)}).raw=nu;Rr.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-Ba]};(ia.geo.transverseMercator=function(){var e=br(Rr),t=e.center,n=e.rotate;e.center=function(e){return e?t([-e[1],e[0]]):(e=t(),[e[1],-e[0]])};e.rotate=function(e){return e?n([e[0],e[1],e.length>2?e[2]+90:90]):(e=n(),[e[0],e[1],e[2]-90])};return n([0,0,90])}).raw=Rr;ia.geom={};ia.geom.hull=function(e){function t(e){if(e.length<3)return[];var t,i=Ct(n),o=Ct(r),s=e.length,a=[],l=[];for(t=0;s>t;t++)a.push([+i.call(this,e[t],t),+o.call(this,e[t],t),t]);a.sort(Fr);for(t=0;s>t;t++)l.push([a[t][0],-a[t][1]]);var u=_r(a),p=_r(l),c=p[0]===u[0],d=p[p.length-1]===u[u.length-1],f=[];for(t=u.length-1;t>=0;--t)f.push(e[a[u[t]][2]]);for(t=+c;t<p.length-d;++t)f.push(e[a[p[t]][2]]);return f}var n=wr,r=Or;if(arguments.length)return t(e);t.x=function(e){return arguments.length?(n=e,t):n};t.y=function(e){return arguments.length?(r=e,t):r};return t};ia.geom.polygon=function(e){Aa(e,ru);return e};var ru=ia.geom.polygon.prototype=[];ru.area=function(){for(var e,t=-1,n=this.length,r=this[n-1],i=0;++t<n;){e=r;r=this[t];i+=e[1]*r[0]-e[0]*r[1]}return.5*i};ru.centroid=function(e){var t,n,r=-1,i=this.length,o=0,s=0,a=this[i-1];arguments.length||(e=-1/(6*this.area()));for(;++r<i;){t=a;a=this[r];n=t[0]*a[1]-a[0]*t[1];o+=(t[0]+a[0])*n;s+=(t[1]+a[1])*n}return[o*e,s*e]};ru.clip=function(e){for(var t,n,r,i,o,s,a=kr(e),l=-1,u=this.length-kr(this),p=this[u-1];++l<u;){t=e.slice();e.length=0;i=this[l];o=t[(r=t.length-a)-1];n=-1;for(;++n<r;){s=t[n];if(Pr(s,p,i)){Pr(o,p,i)||e.push(Mr(o,s,p,i));e.push(s)}else Pr(o,p,i)&&e.push(Mr(o,s,p,i));o=s}a&&e.push(e[0]);p=i}return e};var iu,ou,su,au,lu,uu=[],pu=[];Hr.prototype.prepare=function(){for(var e,t=this.edges,n=t.length;n--;){e=t[n].edge;e.b&&e.a||t.splice(n,1)}t.sort(Wr);return t.length};ni.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}};ri.prototype={insert:function(e,t){var n,r,i;if(e){t.P=e;t.N=e.N;e.N&&(e.N.P=t);e.N=t;if(e.R){e=e.R;for(;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else if(this._){e=ai(this._);t.P=null;t.N=e;e.P=e.L=t;n=e}else{t.P=t.N=null;this._=t;n=null}t.L=t.R=null;t.U=n;t.C=!0;e=t;for(;n&&n.C;){r=n.U;if(n===r.L){i=r.R;if(i&&i.C){n.C=i.C=!1;r.C=!0;e=r}else{if(e===n.R){oi(this,n);e=n;n=e.U}n.C=!1;r.C=!0;si(this,r)}}else{i=r.L;if(i&&i.C){n.C=i.C=!1;r.C=!0;e=r}else{if(e===n.L){si(this,n);e=n;n=e.U}n.C=!1;r.C=!0;oi(this,r)}}n=e.U}this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P);e.P&&(e.P.N=e.N);e.N=e.P=null;var t,n,r,i=e.U,o=e.L,s=e.R;n=o?s?ai(s):o:s;i?i.L===e?i.L=n:i.R=n:this._=n;if(o&&s){r=n.C;n.C=e.C;n.L=o;o.U=n;if(n!==s){i=n.U;n.U=e.U;e=n.R;i.L=e;n.R=s;s.U=n}else{n.U=i;i=n;e=n.R}}else{r=e.C;e=n}e&&(e.U=i);if(!r)if(e&&e.C)e.C=!1;else{do{if(e===this._)break;if(e===i.L){t=i.R;if(t.C){t.C=!1;i.C=!0;oi(this,i);t=i.R}if(t.L&&t.L.C||t.R&&t.R.C){if(!t.R||!t.R.C){t.L.C=!1;t.C=!0;si(this,t);t=i.R}t.C=i.C;i.C=t.R.C=!1;oi(this,i);e=this._;break}}else{t=i.L;if(t.C){t.C=!1;i.C=!0;si(this,i);t=i.L}if(t.L&&t.L.C||t.R&&t.R.C){if(!t.L||!t.L.C){t.R.C=!1;t.C=!0;oi(this,t);t=i.L}t.C=i.C;i.C=t.L.C=!1;si(this,i);e=this._;break}}t.C=!0;e=i;i=i.U}while(!e.C);e&&(e.C=!1)}}};ia.geom.voronoi=function(e){function t(e){var t=new Array(e.length),r=a[0][0],i=a[0][1],o=a[1][0],s=a[1][1];li(n(e),a).cells.forEach(function(n,a){var l=n.edges,u=n.site,p=t[a]=l.length?l.map(function(e){var t=e.start();return[t.x,t.y]}):u.x>=r&&u.x<=o&&u.y>=i&&u.y<=s?[[r,s],[o,s],[o,i],[r,i]]:[];p.point=e[a]});return t}function n(e){return e.map(function(e,t){return{x:Math.round(o(e,t)/ka)*ka,y:Math.round(s(e,t)/ka)*ka,i:t}})}var r=wr,i=Or,o=r,s=i,a=cu;if(e)return t(e);t.links=function(e){return li(n(e)).edges.filter(function(e){return e.l&&e.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})};t.triangles=function(e){var t=[];li(n(e)).cells.forEach(function(n,r){for(var i,o,s=n.site,a=n.edges.sort(Wr),l=-1,u=a.length,p=a[u-1].edge,c=p.l===s?p.r:p.l;++l<u;){i=p;o=c;p=a[l].edge;c=p.l===s?p.r:p.l;r<o.i&&r<c.i&&pi(s,o,c)<0&&t.push([e[r],e[o.i],e[c.i]])}});return t};t.x=function(e){return arguments.length?(o=Ct(r=e),t):r};t.y=function(e){return arguments.length?(s=Ct(i=e),t):i};t.clipExtent=function(e){if(!arguments.length)return a===cu?null:a;a=null==e?cu:e;return t};t.size=function(e){return arguments.length?t.clipExtent(e&&[[0,0],e]):a===cu?null:a&&a[1]};return t};var cu=[[-1e6,-1e6],[1e6,1e6]];ia.geom.delaunay=function(e){return ia.geom.voronoi().triangles(e)};ia.geom.quadtree=function(e,t,n,r,i){function o(e){function o(e,t,n,r,i,o,s,a){if(!isNaN(n)&&!isNaN(r))if(e.leaf){var l=e.x,p=e.y;if(null!=l)if(va(l-n)+va(p-r)<.01)u(e,t,n,r,i,o,s,a);else{var c=e.point;e.x=e.y=e.point=null;u(e,c,l,p,i,o,s,a);u(e,t,n,r,i,o,s,a)}else e.x=n,e.y=r,e.point=t}else u(e,t,n,r,i,o,s,a)}function u(e,t,n,r,i,s,a,l){var u=.5*(i+a),p=.5*(s+l),c=n>=u,d=r>=p,f=d<<1|c;e.leaf=!1;e=e.nodes[f]||(e.nodes[f]=fi());c?i=u:a=u;d?s=p:l=p;o(e,t,n,r,i,s,a,l)}var p,c,d,f,h,g,m,E,v,x=Ct(a),y=Ct(l);if(null!=t)g=t,m=n,E=r,v=i;else{E=v=-(g=m=1/0);c=[],d=[];h=e.length;if(s)for(f=0;h>f;++f){p=e[f];p.x<g&&(g=p.x);p.y<m&&(m=p.y);p.x>E&&(E=p.x);p.y>v&&(v=p.y);c.push(p.x);d.push(p.y)}else for(f=0;h>f;++f){var N=+x(p=e[f],f),I=+y(p,f);g>N&&(g=N);m>I&&(m=I);N>E&&(E=N);I>v&&(v=I);c.push(N);d.push(I)}}var A=E-g,T=v-m;A>T?v=m+A:E=g+T;var L=fi();L.add=function(e){o(L,e,+x(e,++f),+y(e,f),g,m,E,v)};L.visit=function(e){hi(e,L,g,m,E,v)};L.find=function(e){return gi(L,e[0],e[1],g,m,E,v)};f=-1;if(null==t){for(;++f<h;)o(L,e[f],c[f],d[f],g,m,E,v);--f}else e.forEach(L.add);c=d=e=p=null;return L}var s,a=wr,l=Or;if(s=arguments.length){a=ci;l=di;if(3===s){i=n;r=t;n=t=0}return o(e)}o.x=function(e){return arguments.length?(a=e,o):a};o.y=function(e){return arguments.length?(l=e,o):l};o.extent=function(e){if(!arguments.length)return null==t?null:[[t,n],[r,i]];null==e?t=n=r=i=null:(t=+e[0][0],n=+e[0][1],r=+e[1][0],i=+e[1][1]);return o};o.size=function(e){if(!arguments.length)return null==t?null:[r-t,i-n];null==e?t=n=r=i=null:(t=n=0,r=+e[0],i=+e[1]);return o};return o};ia.interpolateRgb=mi;ia.interpolateObject=Ei;ia.interpolateNumber=vi;ia.interpolateString=xi;var du=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fu=new RegExp(du.source,"g");ia.interpolate=yi;ia.interpolators=[function(e,t){var n=typeof t;return("string"===n?il.has(t)||/^(#|rgb\(|hsl\()/.test(t)?mi:xi:t instanceof at?mi:Array.isArray(t)?Ni:"object"===n&&isNaN(t)?Ei:vi)(e,t)}];ia.interpolateArray=Ni;var hu=function(){return bt},gu=ia.map({linear:hu,poly:bi,quad:function(){return Li},cubic:function(){return Si},sin:function(){return Ri},exp:function(){return wi},circle:function(){return Oi},elastic:_i,back:Fi,bounce:function(){return Pi}}),mu=ia.map({"in":bt,out:Ai,"in-out":Ti,"out-in":function(e){return Ti(Ai(e))}});ia.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.slice(0,t):e,r=t>=0?e.slice(t+1):"in";n=gu.get(n)||hu;r=mu.get(r)||bt;return Ii(r(n.apply(null,oa.call(arguments,1))))};ia.interpolateHcl=Mi;ia.interpolateHsl=ki;ia.interpolateLab=Di;ia.interpolateRound=Gi;ia.transform=function(e){var t=aa.createElementNS(ia.ns.prefix.svg,"g");return(ia.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new Ui(n?n.matrix:Eu)})(e)};Ui.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Eu={a:1,b:0,c:0,d:1,e:0,f:0};ia.interpolateTransform=Vi;ia.layout={};ia.layout.bundle=function(){return function(e){for(var t=[],n=-1,r=e.length;++n<r;)t.push(Wi(e[n]));return t}};ia.layout.chord=function(){function e(){var e,u,c,d,f,h={},g=[],m=ia.range(o),E=[];n=[];r=[];e=0,d=-1;for(;++d<o;){u=0,f=-1;for(;++f<o;)u+=i[d][f];g.push(u);E.push(ia.range(o));e+=u}s&&m.sort(function(e,t){return s(g[e],g[t])});a&&E.forEach(function(e,t){e.sort(function(e,n){return a(i[t][e],i[t][n])})});e=(Ua-p*o)/e;u=0,d=-1;for(;++d<o;){c=u,f=-1;for(;++f<o;){var v=m[d],x=E[v][f],y=i[v][x],N=u,I=u+=y*e;h[v+"-"+x]={index:v,subindex:x,startAngle:N,endAngle:I,value:y}}r[v]={index:v,startAngle:c,endAngle:u,value:(u-c)/e};u+=p}d=-1;for(;++d<o;){f=d-1;for(;++f<o;){var A=h[d+"-"+f],T=h[f+"-"+d];(A.value||T.value)&&n.push(A.value<T.value?{source:T,target:A}:{source:A,target:T})}}l&&t()}function t(){n.sort(function(e,t){return l((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)})}var n,r,i,o,s,a,l,u={},p=0;u.matrix=function(e){if(!arguments.length)return i;o=(i=e)&&i.length;n=r=null;return u};u.padding=function(e){if(!arguments.length)return p;p=e;n=r=null;return u};u.sortGroups=function(e){if(!arguments.length)return s;s=e;n=r=null;return u};u.sortSubgroups=function(e){if(!arguments.length)return a;a=e;n=null;return u};u.sortChords=function(e){if(!arguments.length)return l;l=e;n&&t();return u};u.chords=function(){n||e();return n};u.groups=function(){r||e();return r};return u};ia.layout.force=function(){function e(e){return function(t,n,r,i){if(t.point!==e){var o=t.cx-e.x,s=t.cy-e.y,a=i-n,l=o*o+s*s;if(l>a*a/m){if(h>l){var u=t.charge/l;e.px-=o*u;e.py-=s*u}return!0}if(t.point&&l&&h>l){var u=t.pointCharge/l;e.px-=o*u;e.py-=s*u}}return!t.charge}}function t(e){e.px=ia.event.x,e.py=ia.event.y;a.resume()}var n,r,i,o,s,a={},l=ia.dispatch("start","tick","end"),u=[1,1],p=.9,c=vu,d=xu,f=-30,h=yu,g=.1,m=.64,E=[],v=[];a.tick=function(){if((r*=.99)<.005){l.end({type:"end",alpha:r=0});return!0}var t,n,a,c,d,h,m,x,y,N=E.length,I=v.length;for(n=0;I>n;++n){a=v[n];c=a.source;d=a.target;x=d.x-c.x;y=d.y-c.y;if(h=x*x+y*y){h=r*o[n]*((h=Math.sqrt(h))-i[n])/h;x*=h;y*=h;d.x-=x*(m=c.weight/(d.weight+c.weight));d.y-=y*m;c.x+=x*(m=1-m);c.y+=y*m}}if(m=r*g){x=u[0]/2;y=u[1]/2;n=-1;if(m)for(;++n<N;){a=E[n];a.x+=(x-a.x)*m;a.y+=(y-a.y)*m}}if(f){Ji(t=ia.geom.quadtree(E),r,s);n=-1;for(;++n<N;)(a=E[n]).fixed||t.visit(e(a))}n=-1;for(;++n<N;){a=E[n];if(a.fixed){a.x=a.px;a.y=a.py}else{a.x-=(a.px-(a.px=a.x))*p;a.y-=(a.py-(a.py=a.y))*p}}l.tick({type:"tick",alpha:r})};a.nodes=function(e){if(!arguments.length)return E;E=e;return a};a.links=function(e){if(!arguments.length)return v;v=e;return a};a.size=function(e){if(!arguments.length)return u;u=e;return a};a.linkDistance=function(e){if(!arguments.length)return c;c="function"==typeof e?e:+e;return a};a.distance=a.linkDistance;a.linkStrength=function(e){if(!arguments.length)return d;d="function"==typeof e?e:+e;return a};a.friction=function(e){if(!arguments.length)return p;p=+e;return a};a.charge=function(e){if(!arguments.length)return f;f="function"==typeof e?e:+e;return a};a.chargeDistance=function(e){if(!arguments.length)return Math.sqrt(h);h=e*e;return a};a.gravity=function(e){if(!arguments.length)return g;g=+e;return a};a.theta=function(e){if(!arguments.length)return Math.sqrt(m);m=e*e;return a};a.alpha=function(e){if(!arguments.length)return r;e=+e;if(r)r=e>0?e:0;else if(e>0){l.start({type:"start",alpha:r=e});ia.timer(a.tick)}return a};a.start=function(){function e(e,r){if(!n){n=new Array(l);for(a=0;l>a;++a)n[a]=[];for(a=0;u>a;++a){var i=v[a];n[i.source.index].push(i.target);n[i.target.index].push(i.source)}}for(var o,s=n[t],a=-1,u=s.length;++a<u;)if(!isNaN(o=s[a][e]))return o;return Math.random()*r}var t,n,r,l=E.length,p=v.length,h=u[0],g=u[1];for(t=0;l>t;++t){(r=E[t]).index=t;r.weight=0}for(t=0;p>t;++t){r=v[t];"number"==typeof r.source&&(r.source=E[r.source]);"number"==typeof r.target&&(r.target=E[r.target]);++r.source.weight;++r.target.weight}for(t=0;l>t;++t){r=E[t];isNaN(r.x)&&(r.x=e("x",h));isNaN(r.y)&&(r.y=e("y",g));isNaN(r.px)&&(r.px=r.x);isNaN(r.py)&&(r.py=r.y)}i=[];if("function"==typeof c)for(t=0;p>t;++t)i[t]=+c.call(this,v[t],t);else for(t=0;p>t;++t)i[t]=c;o=[];if("function"==typeof d)for(t=0;p>t;++t)o[t]=+d.call(this,v[t],t);else for(t=0;p>t;++t)o[t]=d;s=[];if("function"==typeof f)for(t=0;l>t;++t)s[t]=+f.call(this,E[t],t);else for(t=0;l>t;++t)s[t]=f;return a.resume()};a.resume=function(){return a.alpha(.1)};a.stop=function(){return a.alpha(0)};a.drag=function(){n||(n=ia.behavior.drag().origin(bt).on("dragstart.force",Yi).on("drag.force",t).on("dragend.force",Qi));if(!arguments.length)return n;this.on("mouseover.force",Xi).on("mouseout.force",Zi).call(n);return void 0};return ia.rebind(a,l,"on")};var vu=20,xu=1,yu=1/0;ia.layout.hierarchy=function(){function e(i){var o,s=[i],a=[];i.depth=0;for(;null!=(o=s.pop());){a.push(o);if((u=n.call(e,o,o.depth))&&(l=u.length)){for(var l,u,p;--l>=0;){s.push(p=u[l]);p.parent=o;p.depth=o.depth+1}r&&(o.value=0);o.children=u}else{r&&(o.value=+r.call(e,o,o.depth)||0);delete o.children}}no(i,function(e){var n,i;t&&(n=e.children)&&n.sort(t);r&&(i=e.parent)&&(i.value+=e.value)});return a}var t=oo,n=ro,r=io;e.sort=function(n){if(!arguments.length)return t;t=n;return e};e.children=function(t){if(!arguments.length)return n;n=t;return e};e.value=function(t){if(!arguments.length)return r;r=t;return e};e.revalue=function(t){if(r){to(t,function(e){e.children&&(e.value=0)});no(t,function(t){var n;t.children||(t.value=+r.call(e,t,t.depth)||0);(n=t.parent)&&(n.value+=t.value)})}return t};return e};ia.layout.partition=function(){function e(t,n,r,i){var o=t.children;t.x=n;t.y=t.depth*i;t.dx=r;t.dy=i;if(o&&(s=o.length)){var s,a,l,u=-1;r=t.value?r/t.value:0;for(;++u<s;){e(a=o[u],n,l=a.value*r,i);n+=l}}}function t(e){var n=e.children,r=0;if(n&&(i=n.length))for(var i,o=-1;++o<i;)r=Math.max(r,t(n[o]));return 1+r}function n(n,o){var s=r.call(this,n,o);e(s[0],0,i[0],i[1]/t(s[0]));return s}var r=ia.layout.hierarchy(),i=[1,1];n.size=function(e){if(!arguments.length)return i;i=e;return n};return eo(n,r)};ia.layout.pie=function(){function e(s){var a,l=s.length,u=s.map(function(n,r){return+t.call(e,n,r)}),p=+("function"==typeof r?r.apply(this,arguments):r),c=("function"==typeof i?i.apply(this,arguments):i)-p,d=Math.min(Math.abs(c)/l,+("function"==typeof o?o.apply(this,arguments):o)),f=d*(0>c?-1:1),h=(c-l*f)/ia.sum(u),g=ia.range(l),m=[];null!=n&&g.sort(n===Nu?function(e,t){return u[t]-u[e]}:function(e,t){return n(s[e],s[t])});g.forEach(function(e){m[e]={data:s[e],value:a=u[e],startAngle:p,endAngle:p+=a*h+f,padAngle:d}});return m}var t=Number,n=Nu,r=0,i=Ua,o=0;e.value=function(n){if(!arguments.length)return t;t=n;return e};e.sort=function(t){if(!arguments.length)return n;n=t;return e};e.startAngle=function(t){if(!arguments.length)return r;r=t;return e};e.endAngle=function(t){if(!arguments.length)return i;i=t;return e};e.padAngle=function(t){if(!arguments.length)return o;o=t;return e};return e};var Nu={};ia.layout.stack=function(){function e(a,l){if(!(d=a.length))return a;var u=a.map(function(n,r){return t.call(e,n,r)}),p=u.map(function(t){return t.map(function(t,n){return[o.call(e,t,n),s.call(e,t,n)]})}),c=n.call(e,p,l);u=ia.permute(u,c);p=ia.permute(p,c);var d,f,h,g,m=r.call(e,p,l),E=u[0].length;for(h=0;E>h;++h){i.call(e,u[0][h],g=m[h],p[0][h][1]);for(f=1;d>f;++f)i.call(e,u[f][h],g+=p[f-1][h][1],p[f][h][1])}return a}var t=bt,n=po,r=co,i=uo,o=ao,s=lo;e.values=function(n){if(!arguments.length)return t;t=n;return e};e.order=function(t){if(!arguments.length)return n;n="function"==typeof t?t:Iu.get(t)||po;return e};e.offset=function(t){if(!arguments.length)return r;r="function"==typeof t?t:Au.get(t)||co;return e};e.x=function(t){if(!arguments.length)return o;o=t;return e};e.y=function(t){if(!arguments.length)return s;s=t;return e};e.out=function(t){if(!arguments.length)return i;i=t;return e};return e};var Iu=ia.map({"inside-out":function(e){var t,n,r=e.length,i=e.map(fo),o=e.map(ho),s=ia.range(r).sort(function(e,t){return i[e]-i[t]}),a=0,l=0,u=[],p=[];for(t=0;r>t;++t){n=s[t];if(l>a){a+=o[n];u.push(n)}else{l+=o[n];p.push(n)}}return p.reverse().concat(u)},reverse:function(e){return ia.range(e.length).reverse()},"default":po}),Au=ia.map({silhouette:function(e){var t,n,r,i=e.length,o=e[0].length,s=[],a=0,l=[];for(n=0;o>n;++n){for(t=0,r=0;i>t;t++)r+=e[t][n][1];r>a&&(a=r);s.push(r)}for(n=0;o>n;++n)l[n]=(a-s[n])/2;return l},wiggle:function(e){var t,n,r,i,o,s,a,l,u,p=e.length,c=e[0],d=c.length,f=[];f[0]=l=u=0;for(n=1;d>n;++n){for(t=0,i=0;p>t;++t)i+=e[t][n][1];for(t=0,o=0,a=c[n][0]-c[n-1][0];p>t;++t){for(r=0,s=(e[t][n][1]-e[t][n-1][1])/(2*a);t>r;++r)s+=(e[r][n][1]-e[r][n-1][1])/a;o+=s*e[t][n][1]}f[n]=l-=i?o/i*a:0;u>l&&(u=l)}for(n=0;d>n;++n)f[n]-=u;return f},expand:function(e){var t,n,r,i=e.length,o=e[0].length,s=1/i,a=[];for(n=0;o>n;++n){for(t=0,r=0;i>t;t++)r+=e[t][n][1];if(r)for(t=0;i>t;t++)e[t][n][1]/=r;else for(t=0;i>t;t++)e[t][n][1]=s}for(n=0;o>n;++n)a[n]=0;return a},zero:co});ia.layout.histogram=function(){function e(e,o){for(var s,a,l=[],u=e.map(n,this),p=r.call(this,u,o),c=i.call(this,p,u,o),o=-1,d=u.length,f=c.length-1,h=t?1:1/d;++o<f;){s=l[o]=[];s.dx=c[o+1]-(s.x=c[o]);s.y=0}if(f>0){o=-1;for(;++o<d;){a=u[o];if(a>=p[0]&&a<=p[1]){s=l[ia.bisect(c,a,1,f)-1];s.y+=h;s.push(e[o])}}}return l}var t=!0,n=Number,r=vo,i=mo;e.value=function(t){if(!arguments.length)return n;n=t;return e};e.range=function(t){if(!arguments.length)return r; r=Ct(t);return e};e.bins=function(t){if(!arguments.length)return i;i="number"==typeof t?function(e){return Eo(e,t)}:Ct(t);return e};e.frequency=function(n){if(!arguments.length)return t;t=!!n;return e};return e};ia.layout.pack=function(){function e(e,o){var s=n.call(this,e,o),a=s[0],l=i[0],u=i[1],p=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};a.x=a.y=0;no(a,function(e){e.r=+p(e.value)});no(a,Ao);if(r){var c=r*(t?1:Math.max(2*a.r/l,2*a.r/u))/2;no(a,function(e){e.r+=c});no(a,Ao);no(a,function(e){e.r-=c})}So(a,l/2,u/2,t?1:1/Math.max(2*a.r/l,2*a.r/u));return s}var t,n=ia.layout.hierarchy().sort(xo),r=0,i=[1,1];e.size=function(t){if(!arguments.length)return i;i=t;return e};e.radius=function(n){if(!arguments.length)return t;t=null==n||"function"==typeof n?n:+n;return e};e.padding=function(t){if(!arguments.length)return r;r=+t;return e};return eo(e,n)};ia.layout.tree=function(){function e(e,i){var p=s.call(this,e,i),c=p[0],d=t(c);no(d,n),d.parent.m=-d.z;to(d,r);if(u)to(c,o);else{var f=c,h=c,g=c;to(c,function(e){e.x<f.x&&(f=e);e.x>h.x&&(h=e);e.depth>g.depth&&(g=e)});var m=a(f,h)/2-f.x,E=l[0]/(h.x+a(h,f)/2+m),v=l[1]/(g.depth||1);to(c,function(e){e.x=(e.x+m)*E;e.y=e.depth*v})}return p}function t(e){for(var t,n={A:null,children:[e]},r=[n];null!=(t=r.pop());)for(var i,o=t.children,s=0,a=o.length;a>s;++s)r.push((o[s]=i={_:o[s],parent:t,children:(i=o[s].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:s}).a=i);return n.children[0]}function n(e){var t=e.children,n=e.parent.children,r=e.i?n[e.i-1]:null;if(t.length){_o(e);var o=(t[0].z+t[t.length-1].z)/2;if(r){e.z=r.z+a(e._,r._);e.m=e.z-o}else e.z=o}else r&&(e.z=r.z+a(e._,r._));e.parent.A=i(e,r,e.parent.A||n[0])}function r(e){e._.x=e.z+e.parent.m;e.m+=e.parent.m}function i(e,t,n){if(t){for(var r,i=e,o=e,s=t,l=i.parent.children[0],u=i.m,p=o.m,c=s.m,d=l.m;s=wo(s),i=Ro(i),s&&i;){l=Ro(l);o=wo(o);o.a=e;r=s.z+c-i.z-u+a(s._,i._);if(r>0){Oo(Fo(s,e,n),e,r);u+=r;p+=r}c+=s.m;u+=i.m;d+=l.m;p+=o.m}if(s&&!wo(o)){o.t=s;o.m+=c-p}if(i&&!Ro(l)){l.t=i;l.m+=u-d;n=e}}return n}function o(e){e.x*=l[0];e.y=e.depth*l[1]}var s=ia.layout.hierarchy().sort(null).value(null),a=bo,l=[1,1],u=null;e.separation=function(t){if(!arguments.length)return a;a=t;return e};e.size=function(t){if(!arguments.length)return u?null:l;u=null==(l=t)?o:null;return e};e.nodeSize=function(t){if(!arguments.length)return u?l:null;u=null==(l=t)?null:o;return e};return eo(e,s)};ia.layout.cluster=function(){function e(e,o){var s,a=t.call(this,e,o),l=a[0],u=0;no(l,function(e){var t=e.children;if(t&&t.length){e.x=Mo(t);e.y=Po(t)}else{e.x=s?u+=n(e,s):0;e.y=0;s=e}});var p=ko(l),c=Do(l),d=p.x-n(p,c)/2,f=c.x+n(c,p)/2;no(l,i?function(e){e.x=(e.x-l.x)*r[0];e.y=(l.y-e.y)*r[1]}:function(e){e.x=(e.x-d)/(f-d)*r[0];e.y=(1-(l.y?e.y/l.y:1))*r[1]});return a}var t=ia.layout.hierarchy().sort(null).value(null),n=bo,r=[1,1],i=!1;e.separation=function(t){if(!arguments.length)return n;n=t;return e};e.size=function(t){if(!arguments.length)return i?null:r;i=null==(r=t);return e};e.nodeSize=function(t){if(!arguments.length)return i?r:null;i=null!=(r=t);return e};return eo(e,t)};ia.layout.treemap=function(){function e(e,t){for(var n,r,i=-1,o=e.length;++i<o;){r=(n=e[i]).value*(0>t?0:t);n.area=isNaN(r)||0>=r?0:r}}function t(n){var o=n.children;if(o&&o.length){var s,a,l,u=c(n),p=[],d=o.slice(),h=1/0,g="slice"===f?u.dx:"dice"===f?u.dy:"slice-dice"===f?1&n.depth?u.dy:u.dx:Math.min(u.dx,u.dy);e(d,u.dx*u.dy/n.value);p.area=0;for(;(l=d.length)>0;){p.push(s=d[l-1]);p.area+=s.area;if("squarify"!==f||(a=r(p,g))<=h){d.pop();h=a}else{p.area-=p.pop().area;i(p,g,u,!1);g=Math.min(u.dx,u.dy);p.length=p.area=0;h=1/0}}if(p.length){i(p,g,u,!0);p.length=p.area=0}o.forEach(t)}}function n(t){var r=t.children;if(r&&r.length){var o,s=c(t),a=r.slice(),l=[];e(a,s.dx*s.dy/t.value);l.area=0;for(;o=a.pop();){l.push(o);l.area+=o.area;if(null!=o.z){i(l,o.z?s.dx:s.dy,s,!a.length);l.length=l.area=0}}r.forEach(n)}}function r(e,t){for(var n,r=e.area,i=0,o=1/0,s=-1,a=e.length;++s<a;)if(n=e[s].area){o>n&&(o=n);n>i&&(i=n)}r*=r;t*=t;return r?Math.max(t*i*h/r,r/(t*o*h)):1/0}function i(e,t,n,r){var i,o=-1,s=e.length,a=n.x,u=n.y,p=t?l(e.area/t):0;if(t==n.dx){(r||p>n.dy)&&(p=n.dy);for(;++o<s;){i=e[o];i.x=a;i.y=u;i.dy=p;a+=i.dx=Math.min(n.x+n.dx-a,p?l(i.area/p):0)}i.z=!0;i.dx+=n.x+n.dx-a;n.y+=p;n.dy-=p}else{(r||p>n.dx)&&(p=n.dx);for(;++o<s;){i=e[o];i.x=a;i.y=u;i.dx=p;u+=i.dy=Math.min(n.y+n.dy-u,p?l(i.area/p):0)}i.z=!1;i.dy+=n.y+n.dy-u;n.x+=p;n.dx-=p}}function o(r){var i=s||a(r),o=i[0];o.x=0;o.y=0;o.dx=u[0];o.dy=u[1];s&&a.revalue(o);e([o],o.dx*o.dy/o.value);(s?n:t)(o);d&&(s=i);return i}var s,a=ia.layout.hierarchy(),l=Math.round,u=[1,1],p=null,c=Go,d=!1,f="squarify",h=.5*(1+Math.sqrt(5));o.size=function(e){if(!arguments.length)return u;u=e;return o};o.padding=function(e){function t(t){var n=e.call(o,t,t.depth);return null==n?Go(t):Uo(t,"number"==typeof n?[n,n,n,n]:n)}function n(t){return Uo(t,e)}if(!arguments.length)return p;var r;c=null==(p=e)?Go:"function"==(r=typeof e)?t:"number"===r?(e=[e,e,e,e],n):n;return o};o.round=function(e){if(!arguments.length)return l!=Number;l=e?Math.round:Number;return o};o.sticky=function(e){if(!arguments.length)return d;d=e;s=null;return o};o.ratio=function(e){if(!arguments.length)return h;h=e;return o};o.mode=function(e){if(!arguments.length)return f;f=e+"";return o};return eo(o,a)};ia.random={normal:function(e,t){var n=arguments.length;2>n&&(t=1);1>n&&(e=0);return function(){var n,r,i;do{n=2*Math.random()-1;r=2*Math.random()-1;i=n*n+r*r}while(!i||i>1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=ia.random.normal.apply(ia,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=ia.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;e>n;n++)t+=Math.random();return t}}};ia.scale={};var Tu={floor:bt,ceil:bt};ia.scale.linear=function(){return Wo([0,1],[0,1],yi,!1)};var Lu={s:1,g:1,p:1,r:1,e:1};ia.scale.log=function(){return es(ia.scale.linear().domain([0,1]),10,!0,[1,10])};var Su=ia.format(".0e"),Cu={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};ia.scale.pow=function(){return ts(ia.scale.linear(),1,[0,1])};ia.scale.sqrt=function(){return ia.scale.pow().exponent(.5)};ia.scale.ordinal=function(){return rs([],{t:"range",a:[[]]})};ia.scale.category10=function(){return ia.scale.ordinal().range(bu)};ia.scale.category20=function(){return ia.scale.ordinal().range(Ru)};ia.scale.category20b=function(){return ia.scale.ordinal().range(wu)};ia.scale.category20c=function(){return ia.scale.ordinal().range(Ou)};var bu=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(yt),Ru=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(yt),wu=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(yt),Ou=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(yt);ia.scale.quantile=function(){return is([],[])};ia.scale.quantize=function(){return os(0,1,[0,1])};ia.scale.threshold=function(){return ss([.5],[0,1])};ia.scale.identity=function(){return as([0,1])};ia.svg={};ia.svg.arc=function(){function e(){var e=Math.max(0,+n.apply(this,arguments)),u=Math.max(0,+r.apply(this,arguments)),p=s.apply(this,arguments)-Ba,c=a.apply(this,arguments)-Ba,d=Math.abs(c-p),f=p>c?0:1;e>u&&(h=u,u=e,e=h);if(d>=ja)return t(u,f)+(e?t(e,1-f):"")+"Z";var h,g,m,E,v,x,y,N,I,A,T,L,S=0,C=0,b=[];if(E=(+l.apply(this,arguments)||0)/2){m=o===_u?Math.sqrt(e*e+u*u):+o.apply(this,arguments);f||(C*=-1);u&&(C=nt(m/u*Math.sin(E)));e&&(S=nt(m/e*Math.sin(E)))}if(u){v=u*Math.cos(p+C);x=u*Math.sin(p+C);y=u*Math.cos(c-C);N=u*Math.sin(c-C);var R=Math.abs(c-p-2*C)<=Ga?0:1;if(C&&hs(v,x,y,N)===f^R){var w=(p+c)/2;v=u*Math.cos(w);x=u*Math.sin(w);y=N=null}}else v=x=0;if(e){I=e*Math.cos(c-S);A=e*Math.sin(c-S);T=e*Math.cos(p+S);L=e*Math.sin(p+S);var O=Math.abs(p-c+2*S)<=Ga?0:1;if(S&&hs(I,A,T,L)===1-f^O){var _=(p+c)/2;I=e*Math.cos(_);A=e*Math.sin(_);T=L=null}}else I=A=0;if((h=Math.min(Math.abs(u-e)/2,+i.apply(this,arguments)))>.001){g=u>e^f?0:1;var F=null==T?[I,A]:null==y?[v,x]:Mr([v,x],[T,L],[y,N],[I,A]),P=v-F[0],M=x-F[1],k=y-F[0],D=N-F[1],G=1/Math.sin(Math.acos((P*k+M*D)/(Math.sqrt(P*P+M*M)*Math.sqrt(k*k+D*D)))/2),U=Math.sqrt(F[0]*F[0]+F[1]*F[1]);if(null!=y){var j=Math.min(h,(u-U)/(G+1)),B=gs(null==T?[I,A]:[T,L],[v,x],u,j,f),q=gs([y,N],[I,A],u,j,f);h===j?b.push("M",B[0],"A",j,",",j," 0 0,",g," ",B[1],"A",u,",",u," 0 ",1-f^hs(B[1][0],B[1][1],q[1][0],q[1][1]),",",f," ",q[1],"A",j,",",j," 0 0,",g," ",q[0]):b.push("M",B[0],"A",j,",",j," 0 1,",g," ",q[0])}else b.push("M",v,",",x);if(null!=T){var V=Math.min(h,(e-U)/(G-1)),H=gs([v,x],[T,L],e,-V,f),z=gs([I,A],null==y?[v,x]:[y,N],e,-V,f);h===V?b.push("L",z[0],"A",V,",",V," 0 0,",g," ",z[1],"A",e,",",e," 0 ",f^hs(z[1][0],z[1][1],H[1][0],H[1][1]),",",1-f," ",H[1],"A",V,",",V," 0 0,",g," ",H[0]):b.push("L",z[0],"A",V,",",V," 0 0,",g," ",H[0])}else b.push("L",I,",",A)}else{b.push("M",v,",",x);null!=y&&b.push("A",u,",",u," 0 ",R,",",f," ",y,",",N);b.push("L",I,",",A);null!=T&&b.push("A",e,",",e," 0 ",O,",",1-f," ",T,",",L)}b.push("Z");return b.join("")}function t(e,t){return"M0,"+e+"A"+e+","+e+" 0 1,"+t+" 0,"+-e+"A"+e+","+e+" 0 1,"+t+" 0,"+e}var n=us,r=ps,i=ls,o=_u,s=cs,a=ds,l=fs;e.innerRadius=function(t){if(!arguments.length)return n;n=Ct(t);return e};e.outerRadius=function(t){if(!arguments.length)return r;r=Ct(t);return e};e.cornerRadius=function(t){if(!arguments.length)return i;i=Ct(t);return e};e.padRadius=function(t){if(!arguments.length)return o;o=t==_u?_u:Ct(t);return e};e.startAngle=function(t){if(!arguments.length)return s;s=Ct(t);return e};e.endAngle=function(t){if(!arguments.length)return a;a=Ct(t);return e};e.padAngle=function(t){if(!arguments.length)return l;l=Ct(t);return e};e.centroid=function(){var e=(+n.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+s.apply(this,arguments)+ +a.apply(this,arguments))/2-Ba;return[Math.cos(t)*e,Math.sin(t)*e]};return e};var _u="auto";ia.svg.line=function(){return ms(bt)};var Fu=ia.map({linear:Es,"linear-closed":vs,step:xs,"step-before":ys,"step-after":Ns,basis:Cs,"basis-open":bs,"basis-closed":Rs,bundle:ws,cardinal:Ts,"cardinal-open":Is,"cardinal-closed":As,monotone:ks});Fu.forEach(function(e,t){t.key=e;t.closed=/-closed$/.test(e)});var Pu=[0,2/3,1/3,0],Mu=[0,1/3,2/3,0],ku=[0,1/6,2/3,1/6];ia.svg.line.radial=function(){var e=ms(Ds);e.radius=e.x,delete e.x;e.angle=e.y,delete e.y;return e};ys.reverse=Ns;Ns.reverse=ys;ia.svg.area=function(){return Gs(bt)};ia.svg.area.radial=function(){var e=Gs(Ds);e.radius=e.x,delete e.x;e.innerRadius=e.x0,delete e.x0;e.outerRadius=e.x1,delete e.x1;e.angle=e.y,delete e.y;e.startAngle=e.y0,delete e.y0;e.endAngle=e.y1,delete e.y1;return e};ia.svg.chord=function(){function e(e,a){var l=t(this,o,e,a),u=t(this,s,e,a);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(n(l,u)?i(l.r,l.p1,l.r,l.p0):i(l.r,l.p1,u.r,u.p0)+r(u.r,u.p1,u.a1-u.a0)+i(u.r,u.p1,l.r,l.p0))+"Z"}function t(e,t,n,r){var i=t.call(e,n,r),o=a.call(e,i,r),s=l.call(e,i,r)-Ba,p=u.call(e,i,r)-Ba;return{r:o,a0:s,a1:p,p0:[o*Math.cos(s),o*Math.sin(s)],p1:[o*Math.cos(p),o*Math.sin(p)]}}function n(e,t){return e.a0==t.a0&&e.a1==t.a1}function r(e,t,n){return"A"+e+","+e+" 0 "+ +(n>Ga)+",1 "+t}function i(e,t,n,r){return"Q 0,0 "+r}var o=yr,s=Nr,a=Us,l=cs,u=ds;e.radius=function(t){if(!arguments.length)return a;a=Ct(t);return e};e.source=function(t){if(!arguments.length)return o;o=Ct(t);return e};e.target=function(t){if(!arguments.length)return s;s=Ct(t);return e};e.startAngle=function(t){if(!arguments.length)return l;l=Ct(t);return e};e.endAngle=function(t){if(!arguments.length)return u;u=Ct(t);return e};return e};ia.svg.diagonal=function(){function e(e,i){var o=t.call(this,e,i),s=n.call(this,e,i),a=(o.y+s.y)/2,l=[o,{x:o.x,y:a},{x:s.x,y:a},s];l=l.map(r);return"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=yr,n=Nr,r=js;e.source=function(n){if(!arguments.length)return t;t=Ct(n);return e};e.target=function(t){if(!arguments.length)return n;n=Ct(t);return e};e.projection=function(t){if(!arguments.length)return r;r=t;return e};return e};ia.svg.diagonal.radial=function(){var e=ia.svg.diagonal(),t=js,n=e.projection;e.projection=function(e){return arguments.length?n(Bs(t=e)):t};return e};ia.svg.symbol=function(){function e(e,r){return(Du.get(t.call(this,e,r))||Hs)(n.call(this,e,r))}var t=Vs,n=qs;e.type=function(n){if(!arguments.length)return t;t=Ct(n);return e};e.size=function(t){if(!arguments.length)return n;n=Ct(t);return e};return e};var Du=ia.map({circle:Hs,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Uu)),n=t*Uu;return"M0,"+-t+"L"+n+",0 0,"+t+" "+-n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Gu),n=t*Gu/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Gu),n=t*Gu/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});ia.svg.symbolTypes=Du.keys();var Gu=Math.sqrt(3),Uu=Math.tan(30*qa);ba.transition=function(e){for(var t,n,r=ju||++Hu,i=Ys(e),o=[],s=Bu||{time:Date.now(),ease:Ci,delay:0,duration:250},a=-1,l=this.length;++a<l;){o.push(t=[]);for(var u=this[a],p=-1,c=u.length;++p<c;){(n=u[p])&&Qs(n,p,i,r,s);t.push(n)}}return Ws(o,i,r)};ba.interrupt=function(e){return this.each(null==e?qu:zs(Ys(e)))};var ju,Bu,qu=zs(Ys()),Vu=[],Hu=0;Vu.call=ba.call;Vu.empty=ba.empty;Vu.node=ba.node;Vu.size=ba.size;ia.transition=function(e,t){return e&&e.transition?ju?e.transition(t):e:Oa.transition(e)};ia.transition.prototype=Vu;Vu.select=function(e){var t,n,r,i=this.id,o=this.namespace,s=[];e=C(e);for(var a=-1,l=this.length;++a<l;){s.push(t=[]);for(var u=this[a],p=-1,c=u.length;++p<c;)if((r=u[p])&&(n=e.call(r,r.__data__,p,a))){"__data__"in r&&(n.__data__=r.__data__);Qs(n,p,o,i,r[o][i]);t.push(n)}else t.push(null)}return Ws(s,o,i)};Vu.selectAll=function(e){var t,n,r,i,o,s=this.id,a=this.namespace,l=[];e=b(e);for(var u=-1,p=this.length;++u<p;)for(var c=this[u],d=-1,f=c.length;++d<f;)if(r=c[d]){o=r[a][s];n=e.call(r,r.__data__,d,u);l.push(t=[]);for(var h=-1,g=n.length;++h<g;){(i=n[h])&&Qs(i,h,a,s,o);t.push(i)}}return Ws(l,a,s)};Vu.filter=function(e){var t,n,r,i=[];"function"!=typeof e&&(e=j(e));for(var o=0,s=this.length;s>o;o++){i.push(t=[]);for(var n=this[o],a=0,l=n.length;l>a;a++)(r=n[a])&&e.call(r,r.__data__,a,o)&&t.push(r)}return Ws(i,this.namespace,this.id)};Vu.tween=function(e,t){var n=this.id,r=this.namespace;return arguments.length<2?this.node()[r][n].tween.get(e):q(this,null==t?function(t){t[r][n].tween.remove(e)}:function(i){i[r][n].tween.set(e,t)})};Vu.attr=function(e,t){function n(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function i(e){return null==e?n:(e+="",function(){var t,n=this.getAttribute(a);return n!==e&&(t=s(n,e),function(e){this.setAttribute(a,t(e))})})}function o(e){return null==e?r:(e+="",function(){var t,n=this.getAttributeNS(a.space,a.local);return n!==e&&(t=s(n,e),function(e){this.setAttributeNS(a.space,a.local,t(e))})})}if(arguments.length<2){for(t in e)this.attr(t,e[t]);return this}var s="transform"==e?Vi:yi,a=ia.ns.qualify(e);return $s(this,"attr."+e,t,a.local?o:i)};Vu.attrTween=function(e,t){function n(e,n){var r=t.call(this,e,n,this.getAttribute(i));return r&&function(e){this.setAttribute(i,r(e))}}function r(e,n){var r=t.call(this,e,n,this.getAttributeNS(i.space,i.local));return r&&function(e){this.setAttributeNS(i.space,i.local,r(e))}}var i=ia.ns.qualify(e);return this.tween("attr."+e,i.local?r:n)};Vu.style=function(e,t,n){function r(){this.style.removeProperty(e)}function i(t){return null==t?r:(t+="",function(){var r,i=ua.getComputedStyle(this,null).getPropertyValue(e);return i!==t&&(r=yi(i,t),function(t){this.style.setProperty(e,r(t),n)})})}var o=arguments.length;if(3>o){if("string"!=typeof e){2>o&&(t="");for(n in e)this.style(n,e[n],t);return this}n=""}return $s(this,"style."+e,t,i)};Vu.styleTween=function(e,t,n){function r(r,i){var o=t.call(this,r,i,ua.getComputedStyle(this,null).getPropertyValue(e));return o&&function(t){this.style.setProperty(e,o(t),n)}}arguments.length<3&&(n="");return this.tween("style."+e,r)};Vu.text=function(e){return $s(this,"text",e,Ks)};Vu.remove=function(){var e=this.namespace;return this.each("end.transition",function(){var t;this[e].count<2&&(t=this.parentNode)&&t.removeChild(this)})};Vu.ease=function(e){var t=this.id,n=this.namespace;if(arguments.length<1)return this.node()[n][t].ease;"function"!=typeof e&&(e=ia.ease.apply(ia,arguments));return q(this,function(r){r[n][t].ease=e})};Vu.delay=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].delay:q(this,"function"==typeof e?function(r,i,o){r[n][t].delay=+e.call(r,r.__data__,i,o)}:(e=+e,function(r){r[n][t].delay=e}))};Vu.duration=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].duration:q(this,"function"==typeof e?function(r,i,o){r[n][t].duration=Math.max(1,e.call(r,r.__data__,i,o))}:(e=Math.max(1,e),function(r){r[n][t].duration=e}))};Vu.each=function(e,t){var n=this.id,r=this.namespace;if(arguments.length<2){var i=Bu,o=ju;try{ju=n;q(this,function(t,i,o){Bu=t[r][n];e.call(t,t.__data__,i,o)})}finally{Bu=i;ju=o}}else q(this,function(i){var o=i[r][n];(o.event||(o.event=ia.dispatch("start","end","interrupt"))).on(e,t)});return this};Vu.transition=function(){for(var e,t,n,r,i=this.id,o=++Hu,s=this.namespace,a=[],l=0,u=this.length;u>l;l++){a.push(e=[]);for(var t=this[l],p=0,c=t.length;c>p;p++){if(n=t[p]){r=n[s][i];Qs(n,p,s,o,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})}e.push(n)}}return Ws(a,s,o)};ia.svg.axis=function(){function e(e){e.each(function(){var e,u=ia.select(this),p=this.__chart__||n,c=this.__chart__=n.copy(),d=null==l?c.ticks?c.ticks.apply(c,a):c.domain():l,f=null==t?c.tickFormat?c.tickFormat.apply(c,a):bt:t,h=u.selectAll(".tick").data(d,c),g=h.enter().insert("g",".domain").attr("class","tick").style("opacity",ka),m=ia.transition(h.exit()).style("opacity",ka).remove(),E=ia.transition(h.order()).style("opacity",1),v=Math.max(i,0)+s,x=Bo(c),y=u.selectAll(".domain").data([0]),N=(y.enter().append("path").attr("class","domain"),ia.transition(y));g.append("line");g.append("text");var I,A,T,L,S=g.select("line"),C=E.select("line"),b=h.select("text").text(f),R=g.select("text"),w=E.select("text"),O="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r){e=Xs,I="x",T="y",A="x2",L="y2";b.attr("dy",0>O?"0em":".71em").style("text-anchor","middle");N.attr("d","M"+x[0]+","+O*o+"V0H"+x[1]+"V"+O*o)}else{e=Zs,I="y",T="x",A="y2",L="x2";b.attr("dy",".32em").style("text-anchor",0>O?"end":"start");N.attr("d","M"+O*o+","+x[0]+"H0V"+x[1]+"H"+O*o)}S.attr(L,O*i);R.attr(T,O*v);C.attr(A,0).attr(L,O*i);w.attr(I,0).attr(T,O*v);if(c.rangeBand){var _=c,F=_.rangeBand()/2;p=c=function(e){return _(e)+F}}else p.rangeBand?p=c:m.call(e,c,p);g.call(e,p,c);E.call(e,c,c)})}var t,n=ia.scale.linear(),r=zu,i=6,o=6,s=3,a=[10],l=null;e.scale=function(t){if(!arguments.length)return n;n=t;return e};e.orient=function(t){if(!arguments.length)return r;r=t in Wu?t+"":zu;return e};e.ticks=function(){if(!arguments.length)return a;a=arguments;return e};e.tickValues=function(t){if(!arguments.length)return l;l=t;return e};e.tickFormat=function(n){if(!arguments.length)return t;t=n;return e};e.tickSize=function(t){var n=arguments.length;if(!n)return i;i=+t;o=+arguments[n-1];return e};e.innerTickSize=function(t){if(!arguments.length)return i;i=+t;return e};e.outerTickSize=function(t){if(!arguments.length)return o;o=+t;return e};e.tickPadding=function(t){if(!arguments.length)return s;s=+t;return e};e.tickSubdivide=function(){return arguments.length&&e};return e};var zu="bottom",Wu={top:1,right:1,bottom:1,left:1};ia.svg.brush=function(){function e(o){o.each(function(){var o=ia.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),s=o.selectAll(".background").data([0]);s.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair");o.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=o.selectAll(".resize").data(h,bt);a.exit().remove();a.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return $u[e]}).append("rect").attr("x",function(e){return/[ew]$/.test(e)?-3:null}).attr("y",function(e){return/^[ns]/.test(e)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden");a.style("display",e.empty()?"none":null);var p,c=ia.transition(o),d=ia.transition(s);if(l){p=Bo(l);d.attr("x",p[0]).attr("width",p[1]-p[0]);n(c)}if(u){p=Bo(u);d.attr("y",p[0]).attr("height",p[1]-p[0]);r(c)}t(c)})}function t(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+p[+/e$/.test(e)]+","+c[+/^s/.test(e)]+")"})}function n(e){e.select(".extent").attr("x",p[0]);e.selectAll(".extent,.n>rect,.s>rect").attr("width",p[1]-p[0])}function r(e){e.select(".extent").attr("y",c[0]);e.selectAll(".extent,.e>rect,.w>rect").attr("height",c[1]-c[0])}function i(){function i(){if(32==ia.event.keyCode){if(!b){v=null;w[0]-=p[1];w[1]-=c[1];b=2}A()}}function h(){if(32==ia.event.keyCode&&2==b){w[0]+=p[1];w[1]+=c[1];b=0;A()}}function g(){var e=ia.mouse(y),i=!1;if(x){e[0]+=x[0];e[1]+=x[1]}if(!b)if(ia.event.altKey){v||(v=[(p[0]+p[1])/2,(c[0]+c[1])/2]);w[0]=p[+(e[0]<v[0])];w[1]=c[+(e[1]<v[1])]}else v=null;if(S&&m(e,l,0)){n(T);i=!0}if(C&&m(e,u,1)){r(T);i=!0}if(i){t(T);I({type:"brush",mode:b?"move":"resize"})}}function m(e,t,n){var r,i,a=Bo(t),l=a[0],u=a[1],h=w[n],g=n?c:p,m=g[1]-g[0];if(b){l-=h;u-=m+h}r=(n?f:d)?Math.max(l,Math.min(u,e[n])):e[n];if(b)i=(r+=h)+m;else{v&&(h=Math.max(l,Math.min(u,2*v[n]-r)));if(r>h){i=r;r=h}else i=h}if(g[0]!=r||g[1]!=i){n?s=null:o=null;g[0]=r;g[1]=i;return!0}}function E(){g();T.style("pointer-events","all").selectAll(".resize").style("display",e.empty()?"none":null);ia.select("body").style("cursor",null);O.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null);R();I({type:"brushend"})}var v,x,y=this,N=ia.select(ia.event.target),I=a.of(y,arguments),T=ia.select(y),L=N.datum(),S=!/^(n|s)$/.test(L)&&l,C=!/^(e|w)$/.test(L)&&u,b=N.classed("extent"),R=K(),w=ia.mouse(y),O=ia.select(ua).on("keydown.brush",i).on("keyup.brush",h);ia.event.changedTouches?O.on("touchmove.brush",g).on("touchend.brush",E):O.on("mousemove.brush",g).on("mouseup.brush",E);T.interrupt().selectAll("*").interrupt();if(b){w[0]=p[0]-w[0];w[1]=c[0]-w[1]}else if(L){var _=+/w$/.test(L),F=+/^n/.test(L);x=[p[1-_]-w[0],c[1-F]-w[1]];w[0]=p[_];w[1]=c[F]}else ia.event.altKey&&(v=w.slice());T.style("pointer-events","none").selectAll(".resize").style("display",null);ia.select("body").style("cursor",N.style("cursor"));I({type:"brushstart"});g()}var o,s,a=L(e,"brushstart","brush","brushend"),l=null,u=null,p=[0,0],c=[0,0],d=!0,f=!0,h=Ku[0];e.event=function(e){e.each(function(){var e=a.of(this,arguments),t={x:p,y:c,i:o,j:s},n=this.__chart__||t;this.__chart__=t;if(ju)ia.select(this).transition().each("start.brush",function(){o=n.i;s=n.j;p=n.x;c=n.y;e({type:"brushstart"})}).tween("brush:brush",function(){var n=Ni(p,t.x),r=Ni(c,t.y);o=s=null;return function(i){p=t.x=n(i);c=t.y=r(i);e({type:"brush",mode:"resize"})}}).each("end.brush",function(){o=t.i;s=t.j;e({type:"brush",mode:"resize"});e({type:"brushend"})});else{e({type:"brushstart"});e({type:"brush",mode:"resize"});e({type:"brushend"})}})};e.x=function(t){if(!arguments.length)return l;l=t;h=Ku[!l<<1|!u];return e};e.y=function(t){if(!arguments.length)return u;u=t;h=Ku[!l<<1|!u];return e};e.clamp=function(t){if(!arguments.length)return l&&u?[d,f]:l?d:u?f:null;l&&u?(d=!!t[0],f=!!t[1]):l?d=!!t:u&&(f=!!t);return e};e.extent=function(t){var n,r,i,a,d;if(!arguments.length){if(l)if(o)n=o[0],r=o[1];else{n=p[0],r=p[1];l.invert&&(n=l.invert(n),r=l.invert(r));n>r&&(d=n,n=r,r=d)}if(u)if(s)i=s[0],a=s[1];else{i=c[0],a=c[1];u.invert&&(i=u.invert(i),a=u.invert(a));i>a&&(d=i,i=a,a=d)}return l&&u?[[n,i],[r,a]]:l?[n,r]:u&&[i,a]}if(l){n=t[0],r=t[1];u&&(n=n[0],r=r[0]);o=[n,r];l.invert&&(n=l(n),r=l(r));n>r&&(d=n,n=r,r=d);(n!=p[0]||r!=p[1])&&(p=[n,r])}if(u){i=t[0],a=t[1];l&&(i=i[1],a=a[1]);s=[i,a];u.invert&&(i=u(i),a=u(a));i>a&&(d=i,i=a,a=d);(i!=c[0]||a!=c[1])&&(c=[i,a])}return e};e.clear=function(){if(!e.empty()){p=[0,0],c=[0,0];o=s=null}return e};e.empty=function(){return!!l&&p[0]==p[1]||!!u&&c[0]==c[1]};return ia.rebind(e,a,"on")};var $u={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Ku=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Yu=hl.format=yl.timeFormat,Qu=Yu.utc,Xu=Qu("%Y-%m-%dT%H:%M:%S.%LZ");Yu.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Js:Xu;Js.parse=function(e){var t=new Date(e);return isNaN(t)?null:t};Js.toString=Xu.toString;hl.second=Bt(function(e){return new gl(1e3*Math.floor(e/1e3))},function(e,t){e.setTime(e.getTime()+1e3*Math.floor(t))},function(e){return e.getSeconds()});hl.seconds=hl.second.range;hl.seconds.utc=hl.second.utc.range;hl.minute=Bt(function(e){return new gl(6e4*Math.floor(e/6e4))},function(e,t){e.setTime(e.getTime()+6e4*Math.floor(t))},function(e){return e.getMinutes()});hl.minutes=hl.minute.range;hl.minutes.utc=hl.minute.utc.range;hl.hour=Bt(function(e){var t=e.getTimezoneOffset()/60;return new gl(36e5*(Math.floor(e/36e5-t)+t))},function(e,t){e.setTime(e.getTime()+36e5*Math.floor(t))},function(e){return e.getHours()});hl.hours=hl.hour.range;hl.hours.utc=hl.hour.utc.range;hl.month=Bt(function(e){e=hl.day(e);e.setDate(1);return e},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()});hl.months=hl.month.range;hl.months.utc=hl.month.utc.range;var Zu=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ju=[[hl.second,1],[hl.second,5],[hl.second,15],[hl.second,30],[hl.minute,1],[hl.minute,5],[hl.minute,15],[hl.minute,30],[hl.hour,1],[hl.hour,3],[hl.hour,6],[hl.hour,12],[hl.day,1],[hl.day,2],[hl.week,1],[hl.month,1],[hl.month,3],[hl.year,1]],ep=Yu.multi([[".%L",function(e){return e.getMilliseconds()}],[":%S",function(e){return e.getSeconds()}],["%I:%M",function(e){return e.getMinutes()}],["%I %p",function(e){return e.getHours()}],["%a %d",function(e){return e.getDay()&&1!=e.getDate()}],["%b %d",function(e){return 1!=e.getDate()}],["%B",function(e){return e.getMonth()}],["%Y",On]]),tp={range:function(e,t,n){return ia.range(Math.ceil(e/n)*n,+t,n).map(ta)},floor:bt,ceil:bt};Ju.year=hl.year;hl.scale=function(){return ea(ia.scale.linear(),Ju,ep)};var np=Ju.map(function(e){return[e[0].utc,e[1]]}),rp=Qu.multi([[".%L",function(e){return e.getUTCMilliseconds()}],[":%S",function(e){return e.getUTCSeconds()}],["%I:%M",function(e){return e.getUTCMinutes()}],["%I %p",function(e){return e.getUTCHours()}],["%a %d",function(e){return e.getUTCDay()&&1!=e.getUTCDate()}],["%b %d",function(e){return 1!=e.getUTCDate()}],["%B",function(e){return e.getUTCMonth()}],["%Y",On]]);np.year=hl.year.utc;hl.scale.utc=function(){return ea(ia.scale.linear(),np,rp)};ia.text=Rt(function(e){return e.responseText});ia.json=function(e,t){return wt(e,"application/json",na,t)};ia.html=function(e,t){return wt(e,"text/html",ra,t)};ia.xml=Rt(function(e){return e.responseXML});"function"==typeof e&&e.amd?e(ia):"object"==typeof n&&n.exports&&(n.exports=ia);this.d3=ia}()},{}],54:[function(e){var t=function(){try{return e("jquery")}catch(t){return window.jQuery}}();(function(e,t){function n(t,n){var i,o,s,a=t.nodeName.toLowerCase();if("area"===a){i=t.parentNode;o=i.name;if(!t.href||!o||"map"!==i.nodeName.toLowerCase())return!1;s=e("img[usemap=#"+o+"]")[0];return!!s&&r(s)}return(/input|select|textarea|button|object/.test(a)?!t.disabled:"a"===a?t.href||n:n)&&r(t)}function r(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var i=0,o=/^ui-id-\d+$/;e.ui=e.ui||{};e.extend(e.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}});e.fn.extend({focus:function(t){return function(n,r){return"number"==typeof n?this.each(function(){var t=this;setTimeout(function(){e(t).focus();r&&r.call(t)},n)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0);return/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(n){if(n!==t)return this.css("zIndex",n);if(this.length)for(var r,i,o=e(this[0]);o.length&&o[0]!==document;){r=o.css("position");if("absolute"===r||"relative"===r||"fixed"===r){i=parseInt(o.css("zIndex"),10);if(!isNaN(i)&&0!==i)return i}o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++i)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&e(this).removeAttr("id")})}});e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,r){return!!e.data(t,r[3])},focusable:function(t){return n(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var r=e.attr(t,"tabindex"),i=isNaN(r);return(i||r>=0)&&n(t,!i)}});e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(n,r){function i(t,n,r,i){e.each(o,function(){n-=parseFloat(e.css(t,"padding"+this))||0;r&&(n-=parseFloat(e.css(t,"border"+this+"Width"))||0);i&&(n-=parseFloat(e.css(t,"margin"+this))||0)});return n}var o="Width"===r?["Left","Right"]:["Top","Bottom"],s=r.toLowerCase(),a={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+r]=function(n){return n===t?a["inner"+r].call(this):this.each(function(){e(this).css(s,i(this,n)+"px")})};e.fn["outer"+r]=function(t,n){return"number"!=typeof t?a["outer"+r].call(this,t):this.each(function(){e(this).css(s,i(this,t,!0,n)+"px")})}});e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))});e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(n){return arguments.length?t.call(this,e.camelCase(n)):t.call(this)}}(e.fn.removeData));e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());e.support.selectstart="onselectstart"in document.createElement("div");e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});e.extend(e.ui,{plugin:{add:function(t,n,r){var i,o=e.ui[t].prototype;for(i in r){o.plugins[i]=o.plugins[i]||[];o.plugins[i].push([n,r[i]])}},call:function(e,t,n){var r,i=e.plugins[t];if(i&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(r=0;r<i.length;r++)e.options[i[r][0]]&&i[r][1].apply(e.element,n) }},hasScroll:function(t,n){if("hidden"===e(t).css("overflow"))return!1;var r=n&&"left"===n?"scrollLeft":"scrollTop",i=!1;if(t[r]>0)return!0;t[r]=1;i=t[r]>0;t[r]=0;return i}})})(t)},{jquery:void 0}],55:[function(e){var t=function(){try{return e("jquery")}catch(t){return window.jQuery}}();e("./widget");(function(e){var t=!1;e(document).mouseup(function(){t=!1});e.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(n){if(!0===e.data(n.target,t.widgetName+".preventClickEvent")){e.removeData(n.target,t.widgetName+".preventClickEvent");n.stopImmediatePropagation();return!1}});this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(n){if(!t){this._mouseStarted&&this._mouseUp(n);this._mouseDownEvent=n;var r=this,i=1===n.which,o="string"==typeof this.options.cancel&&n.target.nodeName?e(n.target).closest(this.options.cancel).length:!1;if(!i||o||!this._mouseCapture(n))return!0;this.mouseDelayMet=!this.options.delay;this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){r.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(n)&&this._mouseDelayMet(n)){this._mouseStarted=this._mouseStart(n)!==!1;if(!this._mouseStarted){n.preventDefault();return!0}}!0===e.data(n.target,this.widgetName+".preventClickEvent")&&e.removeData(n.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(e){return r._mouseMove(e)};this._mouseUpDelegate=function(e){return r._mouseUp(e)};e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);n.preventDefault();t=!0;return!0}},_mouseMove:function(t){if(e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(this._mouseStarted){this._mouseDrag(t);return t.preventDefault()}if(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)){this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1;this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)}return!this._mouseStarted},_mouseUp:function(t){e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=!1;t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0);this._mouseStop(t)}return!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(t)},{"./widget":57,jquery:void 0}],56:[function(e){var t=function(){try{return e("jquery")}catch(t){return window.jQuery}}();e("./core");e("./mouse");e("./widget");(function(e){function t(e,t,n){return e>t&&t+n>e}function n(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))}e.widget("ui.sortable",e.ui.mouse,{version:"1.10.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var e=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?"x"===e.axis||n(this.items[0].item):!1;this.offset=this.element.offset();this._mouseInit();this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled");this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,n){if("disabled"===t){this.options[t]=n;this.widget().toggleClass("ui-sortable-disabled",!!n)}else e.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,n){var r=null,i=!1,o=this;if(this.reverting)return!1;if(this.options.disabled||"static"===this.options.type)return!1;this._refreshItems(t);e(t.target).parents().each(function(){if(e.data(this,o.widgetName+"-item")===o){r=e(this);return!1}});e.data(t.target,o.widgetName+"-item")===o&&(r=e(t.target));if(!r)return!1;if(this.options.handle&&!n){e(this.options.handle,r).find("*").addBack().each(function(){this===t.target&&(i=!0)});if(!i)return!1}this.currentItem=r;this._removeCurrentsFromItems();return!0},_mouseStart:function(t,n,r){var i,o,s=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(t);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");this.originalPosition=this._generatePosition(t);this.originalPageX=t.pageX;this.originalPageY=t.pageY;s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!==this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();s.containment&&this._setContainment();if(s.cursor&&"auto"!==s.cursor){o=this.document.find("body");this.storedCursor=o.css("cursor");o.css("cursor",s.cursor);this.storedStylesheet=e("<style>*{ cursor: "+s.cursor+" !important; }</style>").appendTo(o)}if(s.opacity){this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity"));this.helper.css("opacity",s.opacity)}if(s.zIndex){this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex"));this.helper.css("zIndex",s.zIndex)}this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset());this._trigger("start",t,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!r)for(i=this.containers.length-1;i>=0;i--)this.containers[i]._trigger("activate",t,this._uiHash(this));e.ui.ddmanager&&(e.ui.ddmanager.current=this);e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t);this.dragging=!0;this.helper.addClass("ui-sortable-helper");this._mouseDrag(t);return!0},_mouseDrag:function(t){var n,r,i,o,s=this.options,a=!1;this.position=this._generatePosition(t);this.positionAbs=this._convertPositionTo("absolute");this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){if(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName){this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+s.scrollSpeed:t.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-s.scrollSpeed);this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+s.scrollSpeed:t.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-s.scrollSpeed)}else{t.pageY-e(document).scrollTop()<s.scrollSensitivity?a=e(document).scrollTop(e(document).scrollTop()-s.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<s.scrollSensitivity&&(a=e(document).scrollTop(e(document).scrollTop()+s.scrollSpeed));t.pageX-e(document).scrollLeft()<s.scrollSensitivity?a=e(document).scrollLeft(e(document).scrollLeft()-s.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<s.scrollSensitivity&&(a=e(document).scrollLeft(e(document).scrollLeft()+s.scrollSpeed))}a!==!1&&e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)}this.positionAbs=this._convertPositionTo("absolute");this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px");this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px");for(n=this.items.length-1;n>=0;n--){r=this.items[n];i=r.item[0];o=this._intersectsWithPointer(r);if(o&&r.instance===this.currentContainer&&i!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==i&&!e.contains(this.placeholder[0],i)&&("semi-dynamic"===this.options.type?!e.contains(this.element[0],i):!0)){this.direction=1===o?"down":"up";if("pointer"!==this.options.tolerance&&!this._intersectsWithSides(r))break;this._rearrange(t,r);this._trigger("change",t,this._uiHash());break}}this._contactContainers(t);e.ui.ddmanager&&e.ui.ddmanager.drag(this,t);this._trigger("sort",t,this._uiHash());this.lastPositionAbs=this.positionAbs;return!1},_mouseStop:function(t,n){if(t){e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t);if(this.options.revert){var r=this,i=this.placeholder.offset(),o=this.options.axis,s={};o&&"x"!==o||(s.left=i.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft));o&&"y"!==o||(s.top=i.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop));this.reverting=!0;e(this.helper).animate(s,parseInt(this.options.revert,10)||500,function(){r._clear(t)})}else this._clear(t,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null});"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--){this.containers[t]._trigger("deactivate",null,this._uiHash(this));if(this.containers[t].containerCache.over){this.containers[t]._trigger("out",null,this._uiHash(this));this.containers[t].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove();e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null});this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];t=t||{};e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);n&&r.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))});!r.length&&t.key&&r.push(t.key+"=");return r.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),r=[];t=t||{};n.each(function(){r.push(e(t.item||this).attr(t.attribute||"id")||"")});return r},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,r=this.positionAbs.top,i=r+this.helperProportions.height,o=e.left,s=o+e.width,a=e.top,l=a+e.height,u=this.offset.click.top,p=this.offset.click.left,c="x"===this.options.axis||r+u>a&&l>r+u,d="y"===this.options.axis||t+p>o&&s>t+p,f=c&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?f:o<t+this.helperProportions.width/2&&n-this.helperProportions.width/2<s&&a<r+this.helperProportions.height/2&&i-this.helperProportions.height/2<l},_intersectsWithPointer:function(e){var n="x"===this.options.axis||t(this.positionAbs.top+this.offset.click.top,e.top,e.height),r="y"===this.options.axis||t(this.positionAbs.left+this.offset.click.left,e.left,e.width),i=n&&r,o=this._getDragVerticalDirection(),s=this._getDragHorizontalDirection();return i?this.floating?s&&"right"===s||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectsWithSides:function(e){var n=t(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),r=t(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),i=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&r||"left"===o&&!r:i&&("down"===i&&n||"up"===i&&!n)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){this._refreshItems(e);this.refreshPositions();return this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function n(){a.push(this)}var r,i,o,s,a=[],l=[],u=this._connectWith();if(u&&t)for(r=u.length-1;r>=0;r--){o=e(u[r]);for(i=o.length-1;i>=0;i--){s=e.data(o[i],this.widgetFullName);s&&s!==this&&!s.options.disabled&&l.push([e.isFunction(s.options.items)?s.options.items.call(s.element):e(s.options.items,s.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),s])}}l.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(r=l.length-1;r>=0;r--)l[r][0].each(n);return e(a)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var n=0;n<t.length;n++)if(t[n]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[];this.containers=[this];var n,r,i,o,s,a,l,u,p=this.items,c=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(n=d.length-1;n>=0;n--){i=e(d[n]);for(r=i.length-1;r>=0;r--){o=e.data(i[r],this.widgetFullName);if(o&&o!==this&&!o.options.disabled){c.push([e.isFunction(o.options.items)?o.options.items.call(o.element[0],t,{item:this.currentItem}):e(o.options.items,o.element),o]);this.containers.push(o)}}}for(n=c.length-1;n>=0;n--){s=c[n][1];a=c[n][0];for(r=0,u=a.length;u>r;r++){l=e(a[r]);l.data(this.widgetName+"-item",s);p.push({item:l,instance:s,width:0,height:0,left:0,top:0})}}},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var n,r,i,o;for(n=this.items.length-1;n>=0;n--){r=this.items[n];if(r.instance===this.currentContainer||!this.currentContainer||r.item[0]===this.currentItem[0]){i=this.options.toleranceElement?e(this.options.toleranceElement,r.item):r.item;if(!t){r.width=i.outerWidth();r.height=i.outerHeight()}o=i.offset();r.left=o.left;r.top=o.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(n=this.containers.length-1;n>=0;n--){o=this.containers[n].element.offset();this.containers[n].containerCache.left=o.left;this.containers[n].containerCache.top=o.top;this.containers[n].containerCache.width=this.containers[n].element.outerWidth();this.containers[n].containerCache.height=this.containers[n].element.outerHeight()}return this},_createPlaceholder:function(t){t=t||this;var n,r=t.options;if(!r.placeholder||r.placeholder.constructor===String){n=r.placeholder;r.placeholder={element:function(){var r=t.currentItem[0].nodeName.toLowerCase(),i=e("<"+r+">",t.document[0]).addClass(n||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");"tr"===r?t.currentItem.children().each(function(){e("<td>&#160;</td>",t.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(i)}):"img"===r&&i.attr("src",t.currentItem.attr("src"));n||i.css("visibility","hidden");return i},update:function(e,i){if(!n||r.forcePlaceholderSize){i.height()||i.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10));i.width()||i.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10))}}}}t.placeholder=e(r.placeholder.element.call(t.element,t.currentItem));t.currentItem.after(t.placeholder);r.placeholder.update(t,t.placeholder)},_contactContainers:function(r){var i,o,s,a,l,u,p,c,d,f,h=null,g=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(h&&e.contains(this.containers[i].element[0],h.element[0]))continue;h=this.containers[i];g=i}else if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",r,this._uiHash(this));this.containers[i].containerCache.over=0}if(h)if(1===this.containers.length){if(!this.containers[g].containerCache.over){this.containers[g]._trigger("over",r,this._uiHash(this));this.containers[g].containerCache.over=1}}else{s=1e4;a=null;f=h.floating||n(this.currentItem);l=f?"left":"top";u=f?"width":"height";p=this.positionAbs[l]+this.offset.click[l];for(o=this.items.length-1;o>=0;o--)if(e.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!f||t(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))){c=this.items[o].item.offset()[l];d=!1;if(Math.abs(c-p)>Math.abs(c+this.items[o][u]-p)){d=!0;c+=this.items[o][u]}if(Math.abs(c-p)<s){s=Math.abs(c-p);a=this.items[o];this.direction=d?"up":"down"}}if(!a&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])return;a?this._rearrange(r,a,null,!0):this._rearrange(r,null,this.containers[g].element,!0);this._trigger("change",r,this._uiHash());this.containers[g]._trigger("change",r,this._uiHash(this));this.currentContainer=this.containers[g];this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[g]._trigger("over",r,this._uiHash(this));this.containers[g].containerCache.over=1}},_createHelper:function(t){var n=this.options,r=e.isFunction(n.helper)?e(n.helper.apply(this.element[0],[t,this.currentItem])):"clone"===n.helper?this.currentItem.clone():this.currentItem;r.parents("body").length||e("parent"!==n.appendTo?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(r[0]);r[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")});(!r[0].style.width||n.forceHelperSize)&&r.width(this.currentItem.width());(!r[0].style.height||n.forceHelperSize)&&r.height(this.currentItem.height());return r},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" "));e.isArray(t)&&(t={left:+t[0],top:+t[1]||0});"left"in t&&(this.offset.click.left=t.left+this.margins.left);"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left);"top"in t&&(this.offset.click.top=t.top+this.margins.top);"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();if("absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])){t.left+=this.scrollParent.scrollLeft();t.top+=this.scrollParent.scrollTop()}(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0});return{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,n,r,i=this.options;"parent"===i.containment&&(i.containment=this.helper[0].parentNode);("document"===i.containment||"window"===i.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e("document"===i.containment?document:window).width()-this.helperProportions.width-this.margins.left,(e("document"===i.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]);if(!/^(document|window|parent)$/.test(i.containment)){t=e(i.containment)[0];n=e(i.containment).offset();r="hidden"!==e(t).css("overflow");this.containment=[n.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,n.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,n.left+(r?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(r?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(t,n){n||(n=this.position);var r="absolute"===t?1:-1,i="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(i[0].tagName);return{top:n.top+this.offset.relative.top*r+this.offset.parent.top*r-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:i.scrollTop())*r,left:n.left+this.offset.relative.left*r+this.offset.parent.left*r-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:i.scrollLeft())*r}},_generatePosition:function(t){var n,r,i=this.options,o=t.pageX,s=t.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset());if(this.originalPosition){if(this.containment){t.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left);t.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top);t.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left);t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)}if(i.grid){n=this.originalPageY+Math.round((s-this.originalPageY)/i.grid[1])*i.grid[1];s=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-i.grid[1]:n+i.grid[1]:n;r=this.originalPageX+Math.round((o-this.originalPageX)/i.grid[0])*i.grid[0];o=this.containment?r-this.offset.click.left>=this.containment[0]&&r-this.offset.click.left<=this.containment[2]?r:r-this.offset.click.left>=this.containment[0]?r-i.grid[0]:r+i.grid[0]:r}}return{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(e,t,n,r){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var i=this.counter;this._delay(function(){i===this.counter&&this.refreshPositions(!r)})},_clear:function(e,t){function n(e,t,n){return function(r){n._trigger(e,r,t._uiHash(t))}}this.reverting=!1;var r,i=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]===this.currentItem[0]){for(r in this._storedCSS)("auto"===this._storedCSS[r]||"static"===this._storedCSS[r])&&(this._storedCSS[r]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!t&&i.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))});!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||i.push(function(e){this._trigger("update",e,this._uiHash())});if(this!==this.currentContainer&&!t){i.push(function(e){this._trigger("remove",e,this._uiHash())});i.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer));i.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer))}for(r=this.containers.length-1;r>=0;r--){t||i.push(n("deactivate",this,this.containers[r]));if(this.containers[r].containerCache.over){i.push(n("out",this,this.containers[r]));this.containers[r].containerCache.over=0}}if(this.storedCursor){this.document.find("body").css("cursor",this.storedCursor);this.storedStylesheet.remove()}this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex);this.dragging=!1;if(this.cancelHelperRemoval){if(!t){this._trigger("beforeStop",e,this._uiHash());for(r=0;r<i.length;r++)i[r].call(this,e);this._trigger("stop",e,this._uiHash())}this.fromOutside=!1;return!1}t||this._trigger("beforeStop",e,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!==this.currentItem[0]&&this.helper.remove();this.helper=null;if(!t){for(r=0;r<i.length;r++)i[r].call(this,e);this._trigger("stop",e,this._uiHash())}this.fromOutside=!1;return!0},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var n=t||this;return{helper:n.helper,placeholder:n.placeholder||e([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:t?t.element:null}}})})(t)},{"./core":54,"./mouse":55,"./widget":57,jquery:void 0}],57:[function(e){var t=function(){try{return e("jquery")}catch(t){return window.jQuery}}();(function(e,t){var n=0,r=Array.prototype.slice,i=e.cleanData;e.cleanData=function(t){for(var n,r=0;null!=(n=t[r]);r++)try{e(n).triggerHandler("remove")}catch(o){}i(t)};e.widget=function(t,n,r){var i,o,s,a,l={},u=t.split(".")[0];t=t.split(".")[1];i=u+"-"+t;if(!r){r=n;n=e.Widget}e.expr[":"][i.toLowerCase()]=function(t){return!!e.data(t,i)};e[u]=e[u]||{};o=e[u][t];s=e[u][t]=function(e,t){if(!this._createWidget)return new s(e,t);arguments.length&&this._createWidget(e,t);return void 0};e.extend(s,o,{version:r.version,_proto:e.extend({},r),_childConstructors:[]});a=new n;a.options=e.widget.extend({},a.options);e.each(r,function(t,r){l[t]=e.isFunction(r)?function(){var e=function(){return n.prototype[t].apply(this,arguments)},i=function(e){return n.prototype[t].apply(this,e)};return function(){var t,n=this._super,o=this._superApply;this._super=e;this._superApply=i;t=r.apply(this,arguments);this._super=n;this._superApply=o;return t}}():r});s.prototype=e.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix||t:t},l,{constructor:s,namespace:u,widgetName:t,widgetFullName:i});if(o){e.each(o._childConstructors,function(t,n){var r=n.prototype;e.widget(r.namespace+"."+r.widgetName,s,n._proto)});delete o._childConstructors}else n._childConstructors.push(s);e.widget.bridge(t,s)};e.widget.extend=function(n){for(var i,o,s=r.call(arguments,1),a=0,l=s.length;l>a;a++)for(i in s[a]){o=s[a][i];s[a].hasOwnProperty(i)&&o!==t&&(n[i]=e.isPlainObject(o)?e.isPlainObject(n[i])?e.widget.extend({},n[i],o):e.widget.extend({},o):o)}return n};e.widget.bridge=function(n,i){var o=i.prototype.widgetFullName||n;e.fn[n]=function(s){var a="string"==typeof s,l=r.call(arguments,1),u=this;s=!a&&l.length?e.widget.extend.apply(null,[s].concat(l)):s;this.each(a?function(){var r,i=e.data(this,o);if(!i)return e.error("cannot call methods on "+n+" prior to initialization; attempted to call method '"+s+"'");if(!e.isFunction(i[s])||"_"===s.charAt(0))return e.error("no such method '"+s+"' for "+n+" widget instance");r=i[s].apply(i,l);if(r!==i&&r!==t){u=r&&r.jquery?u.pushStack(r.get()):r;return!1}}:function(){var t=e.data(this,o);t?t.option(s||{})._init():e.data(this,o,new i(s,this))});return u}};e.Widget=function(){};e.Widget._childConstructors=[];e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0];this.element=e(r);this.uuid=n++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=e.widget.extend({},this.options,this._getCreateOptions(),t);this.bindings=e();this.hoverable=e();this.focusable=e();if(r!==this){e.data(r,this.widgetFullName,this);this._on(!0,this.element,{remove:function(e){e.target===r&&this.destroy()}});this.document=e(r.style?r.ownerDocument:r.document||r);this.window=e(this.document[0].defaultView||this.document[0].parentWindow)}this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(n,r){var i,o,s,a=n;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof n){a={};i=n.split(".");n=i.shift();if(i.length){o=a[n]=e.widget.extend({},this.options[n]);for(s=0;s<i.length-1;s++){o[i[s]]=o[i[s]]||{};o=o[i[s]]}n=i.pop();if(1===arguments.length)return o[n]===t?null:o[n];o[n]=r}else{if(1===arguments.length)return this.options[n]===t?null:this.options[n];a[n]=r}}this._setOptions(a);return this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){this.options[e]=t;if("disabled"===e){this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")}return this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(t,n,r){var i,o=this;if("boolean"!=typeof t){r=n;n=t;t=!1}if(r){n=i=e(n);this.bindings=this.bindings.add(n)}else{r=n;n=this.element; i=this.widget()}e.each(r,function(r,s){function a(){return t||o.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof s?o[s]:s).apply(o,arguments):void 0}"string"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||e.guid++);var l=r.match(/^(\w+)\s*(.*)$/),u=l[1]+o.eventNamespace,p=l[2];p?i.delegate(p,u,a):n.bind(u,a)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;e.unbind(t).undelegate(t)},_delay:function(e,t){function n(){return("string"==typeof e?r[e]:e).apply(r,arguments)}var r=this;return setTimeout(n,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t);this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t);this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,n,r){var i,o,s=this.options[t];r=r||{};n=e.Event(n);n.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase();n.target=this.element[0];o=n.originalEvent;if(o)for(i in o)i in n||(n[i]=o[i]);this.element.trigger(n,r);return!(e.isFunction(s)&&s.apply(this.element[0],[n].concat(r))===!1||n.isDefaultPrevented())}};e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(r,i,o){"string"==typeof i&&(i={effect:i});var s,a=i?i===!0||"number"==typeof i?n:i.effect||n:t;i=i||{};"number"==typeof i&&(i={duration:i});s=!e.isEmptyObject(i);i.complete=o;i.delay&&r.delay(i.delay);s&&e.effects&&e.effects.effect[a]?r[t](i):a!==t&&r[a]?r[a](i.duration,i.easing,o):r.queue(function(n){e(this)[t]();o&&o.call(r[0]);n()})}})})(t)},{jquery:void 0}],58:[function(t,n,r){(function(){var i;i=function(i){return"object"==typeof r&&"object"==typeof n?i(function(){try{return t("jquery")}catch(e){return window.jQuery}}()):"function"==typeof e&&e.amd?e(["jquery"],i):i(jQuery)};i(function(e){return e.pivotUtilities.d3_renderers={Treemap:function(t,n){var r,i,o,s,a,l,u,p,c,d,f,h,g,m;o={localeStrings:{}};n=e.extend(o,n);l=e("<div style='width: 100%; height: 100%;'>");p={name:"All",children:[]};r=function(e,t,n){var i,o,s,a,l,u;if(0!==t.length){null==e.children&&(e.children=[]);s=t.shift();u=e.children;for(a=0,l=u.length;l>a;a++){i=u[a];if(i.name===s){r(i,t,n);return}}o={name:s};r(o,t,n);return e.children.push(o)}e.value=n};m=t.getRowKeys();for(h=0,g=m.length;g>h;h++){u=m[h];d=t.getAggregator(u,[]).value();null!=d&&r(p,u,d)}i=d3.scale.category10();f=e(window).width()/1.4;s=e(window).height()/1.4;a=10;c=d3.layout.treemap().size([f,s]).sticky(!0).value(function(e){return e.size});d3.select(l[0]).append("div").style("position","relative").style("width",f+2*a+"px").style("height",s+2*a+"px").style("left",a+"px").style("top",a+"px").datum(p).selectAll(".node").data(c.padding([15,0,0,0]).value(function(e){return e.value}).nodes).enter().append("div").attr("class","node").style("background",function(e){return null!=e.children?"lightgrey":i(e.name)}).text(function(e){return e.name}).call(function(){this.style("left",function(e){return e.x+"px"}).style("top",function(e){return e.y+"px"}).style("width",function(e){return Math.max(0,e.dx-1)+"px"}).style("height",function(e){return Math.max(0,e.dy-1)+"px"})});return l}}})}).call(this)},{jquery:void 0}],59:[function(t,n,r){(function(){var i;i=function(i){return"object"==typeof r&&"object"==typeof n?i(function(){try{return t("jquery")}catch(e){return window.jQuery}}()):"function"==typeof e&&e.amd?e(["jquery"],i):i(jQuery)};i(function(e){var t;t=function(t,n){return function(r,i){var o,s,a,l,u,p,c,d,f,h,g,m,E,v,x,y,N,I,A,T,L,S,C,b,R;p={localeStrings:{vs:"vs",by:"by"}};i=e.extend(p,i);N=r.getRowKeys();0===N.length&&N.push([]);a=r.getColKeys();0===a.length&&a.push([]);h=function(){var e,t,n;n=[];for(e=0,t=N.length;t>e;e++){d=N[e];n.push(d.join("-"))}return n}();h.unshift("");m=0;l=[h];for(S=0,b=a.length;b>S;S++){s=a[S];x=[s.join("-")];m+=x[0].length;for(C=0,R=N.length;R>C;C++){y=N[C];o=r.getAggregator(y,s);x.push(null!=o.value()?o.value():null)}l.push(x)}I=T=r.aggregatorName+(r.valAttrs.length?"("+r.valAttrs.join(", ")+")":"");f=r.colAttrs.join("-");""!==f&&(I+=" "+i.localeStrings.vs+" "+f);c=r.rowAttrs.join("-");""!==c&&(I+=" "+i.localeStrings.by+" "+c);E={width:e(window).width()/1.4,height:e(window).height()/1.4,title:I,hAxis:{title:f,slantedText:m>50},vAxis:{title:T}};2===l[0].length&&""===l[0][1]&&(E.legend={position:"none"});for(g in n){A=n[g];E[g]=A}u=google.visualization.arrayToDataTable(l);v=e("<div style='width: 100%; height: 100%;'>");L=new google.visualization.ChartWrapper({dataTable:u,chartType:t,options:E});L.draw(v[0]);v.bind("dblclick",function(){var e;e=new google.visualization.ChartEditor;google.visualization.events.addListener(e,"ok",function(){return e.getChartWrapper().draw(v[0])});return e.openDialog(L)});return v}};return e.pivotUtilities.gchart_renderers={"Line Chart":t("LineChart"),"Bar Chart":t("ColumnChart"),"Stacked Bar Chart":t("ColumnChart",{isStacked:!0}),"Area Chart":t("AreaChart",{isStacked:!0})}})}).call(this)},{jquery:void 0}],60:[function(t,n,r){(function(){var i,o=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1},s=[].slice,a=function(e,t){return function(){return e.apply(t,arguments)}},l={}.hasOwnProperty;i=function(i){return"object"==typeof r&&"object"==typeof n?i(function(){try{return t("jquery")}catch(e){return window.jQuery}}()):"function"==typeof e&&e.amd?e(["jquery"],i):i(jQuery)};i(function(e){var t,n,r,i,u,p,c,d,f,h,g,m,E,v,x,y;n=function(e,t,n){var r,i,o,s;e+="";i=e.split(".");o=i[0];s=i.length>1?n+i[1]:"";r=/(\d+)(\d{3})/;for(;r.test(o);)o=o.replace(r,"$1"+t+"$2");return o+s};h=function(t){var r;r={digitsAfterDecimal:2,scaler:1,thousandsSep:",",decimalSep:".",prefix:"",suffix:"",showZero:!1};t=e.extend(r,t);return function(e){var r;if(isNaN(e)||!isFinite(e))return"";if(0===e&&!t.showZero)return"";r=n((t.scaler*e).toFixed(t.digitsAfterDecimal),t.thousandsSep,t.decimalSep);return""+t.prefix+r+t.suffix}};E=h();v=h({digitsAfterDecimal:0});x=h({digitsAfterDecimal:1,scaler:100,suffix:"%"});r={count:function(e){null==e&&(e=v);return function(){return function(){return{count:0,push:function(){return this.count++},value:function(){return this.count},format:e}}}},countUnique:function(e){null==e&&(e=v);return function(t){var n;n=t[0];return function(){return{uniq:[],push:function(e){var t;return t=e[n],o.call(this.uniq,t)<0?this.uniq.push(e[n]):void 0},value:function(){return this.uniq.length},format:e,numInputs:null!=n?0:1}}}},listUnique:function(e){return function(t){var n;n=t[0];return function(){return{uniq:[],push:function(e){var t;return t=e[n],o.call(this.uniq,t)<0?this.uniq.push(e[n]):void 0},value:function(){return this.uniq.join(e)},format:function(e){return e},numInputs:null!=n?0:1}}}},sum:function(e){null==e&&(e=E);return function(t){var n;n=t[0];return function(){return{sum:0,push:function(e){return isNaN(parseFloat(e[n]))?void 0:this.sum+=parseFloat(e[n])},value:function(){return this.sum},format:e,numInputs:null!=n?0:1}}}},average:function(e){null==e&&(e=E);return function(t){var n;n=t[0];return function(){return{sum:0,len:0,push:function(e){if(!isNaN(parseFloat(e[n]))){this.sum+=parseFloat(e[n]);return this.len++}},value:function(){return this.sum/this.len},format:e,numInputs:null!=n?0:1}}}},sumOverSum:function(e){null==e&&(e=E);return function(t){var n,r;r=t[0],n=t[1];return function(){return{sumNum:0,sumDenom:0,push:function(e){isNaN(parseFloat(e[r]))||(this.sumNum+=parseFloat(e[r]));return isNaN(parseFloat(e[n]))?void 0:this.sumDenom+=parseFloat(e[n])},value:function(){return this.sumNum/this.sumDenom},format:e,numInputs:null!=r&&null!=n?0:2}}}},sumOverSumBound80:function(e,t){null==e&&(e=!0);null==t&&(t=E);return function(n){var r,i;i=n[0],r=n[1];return function(){return{sumNum:0,sumDenom:0,push:function(e){isNaN(parseFloat(e[i]))||(this.sumNum+=parseFloat(e[i]));return isNaN(parseFloat(e[r]))?void 0:this.sumDenom+=parseFloat(e[r])},value:function(){var t;t=e?1:-1;return(.821187207574908/this.sumDenom+this.sumNum/this.sumDenom+1.2815515655446004*t*Math.sqrt(.410593603787454/(this.sumDenom*this.sumDenom)+this.sumNum*(1-this.sumNum/this.sumDenom)/(this.sumDenom*this.sumDenom)))/(1+1.642374415149816/this.sumDenom)},format:t,numInputs:null!=i&&null!=r?0:2}}}},fractionOf:function(e,t,n){null==t&&(t="total");null==n&&(n=x);return function(){var r;r=1<=arguments.length?s.call(arguments,0):[];return function(i,o,s){return{selector:{total:[[],[]],row:[o,[]],col:[[],s]}[t],inner:e.apply(null,r)(i,o,s),push:function(e){return this.inner.push(e)},format:n,value:function(){return this.inner.value()/i.getAggregator.apply(i,this.selector).inner.value()},numInputs:e.apply(null,r)().numInputs}}}}};i=function(e){return{Count:e.count(v),"Count Unique Values":e.countUnique(v),"List Unique Values":e.listUnique(", "),Sum:e.sum(E),"Integer Sum":e.sum(v),Average:e.average(E),"Sum over Sum":e.sumOverSum(E),"80% Upper Bound":e.sumOverSumBound80(!0,E),"80% Lower Bound":e.sumOverSumBound80(!1,E),"Sum as Fraction of Total":e.fractionOf(e.sum(),"total",x),"Sum as Fraction of Rows":e.fractionOf(e.sum(),"row",x),"Sum as Fraction of Columns":e.fractionOf(e.sum(),"col",x),"Count as Fraction of Total":e.fractionOf(e.count(),"total",x),"Count as Fraction of Rows":e.fractionOf(e.count(),"row",x),"Count as Fraction of Columns":e.fractionOf(e.count(),"col",x)}}(r);m={Table:function(e,t){return g(e,t)},"Table Barchart":function(t,n){return e(g(t,n)).barchart()},Heatmap:function(t,n){return e(g(t,n)).heatmap()},"Row Heatmap":function(t,n){return e(g(t,n)).heatmap("rowheatmap")},"Col Heatmap":function(t,n){return e(g(t,n)).heatmap("colheatmap")}};c={en:{aggregators:i,renderers:m,localeStrings:{renderError:"An error occurred rendering the PivotTable results.",computeError:"An error occurred computing the PivotTable results.",uiRenderError:"An error occurred rendering the PivotTable UI.",selectAll:"Select All",selectNone:"Select None",tooMany:"(too many to list)",filterResults:"Filter results",totals:"Totals",vs:"vs",by:"by"}}};d=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];u=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];y=function(e){return("0"+e).substr(-2,2)};p={bin:function(e,t){return function(n){return n[e]-n[e]%t}},dateFormat:function(e,t,n,r){null==n&&(n=d);null==r&&(r=u);return function(i){var o;o=new Date(Date.parse(i[e]));return isNaN(o)?"":t.replace(/%(.)/g,function(e,t){switch(t){case"y":return o.getFullYear();case"m":return y(o.getMonth()+1);case"n":return n[o.getMonth()];case"d":return y(o.getDate());case"w":return r[o.getDay()];case"x":return o.getDay();case"H":return y(o.getHours());case"M":return y(o.getMinutes());case"S":return y(o.getSeconds());default:return"%"+t}})}}};f=function(){return function(e,t){var n,r,i,o,s,a,l;a=/(\d+)|(\D+)/g;s=/\d/;l=/^0/;if("number"==typeof e||"number"==typeof t)return isNaN(e)?1:isNaN(t)?-1:e-t;n=String(e).toLowerCase();i=String(t).toLowerCase();if(n===i)return 0;if(!s.test(n)||!s.test(i))return n>i?1:-1;n=n.match(a);i=i.match(a);for(;n.length&&i.length;){r=n.shift();o=i.shift();if(r!==o)return s.test(r)&&s.test(o)?r.replace(l,".0")-o.replace(l,".0"):r>o?1:-1}return n.length-i.length}}(this);e.pivotUtilities={aggregatorTemplates:r,aggregators:i,renderers:m,derivers:p,locales:c,naturalSort:f,numberFormat:h};t=function(){function t(e,n){this.getAggregator=a(this.getAggregator,this);this.getRowKeys=a(this.getRowKeys,this);this.getColKeys=a(this.getColKeys,this);this.sortKeys=a(this.sortKeys,this);this.arrSort=a(this.arrSort,this);this.natSort=a(this.natSort,this);this.aggregator=n.aggregator;this.aggregatorName=n.aggregatorName;this.colAttrs=n.cols;this.rowAttrs=n.rows;this.valAttrs=n.vals;this.tree={};this.rowKeys=[];this.colKeys=[];this.rowTotals={};this.colTotals={};this.allTotal=this.aggregator(this,[],[]);this.sorted=!1;t.forEachRecord(e,n.derivedAttributes,function(e){return function(t){return n.filter(t)?e.processRecord(t):void 0}}(this))}t.forEachRecord=function(t,n,r){var i,o,s,a,u,p,c,d,f,h,g,m;i=e.isEmptyObject(n)?r:function(e){var t,i,o;for(t in n){i=n[t];e[t]=null!=(o=i(e))?o:e[t]}return r(e)};if(e.isFunction(t))return t(i);if(e.isArray(t)){if(e.isArray(t[0])){g=[];for(s in t)if(l.call(t,s)){o=t[s];if(s>0){p={};h=t[0];for(a in h)if(l.call(h,a)){u=h[a];p[u]=o[a]}g.push(i(p))}}return g}m=[];for(d=0,f=t.length;f>d;d++){p=t[d];m.push(i(p))}return m}if(t instanceof jQuery){c=[];e("thead > tr > th",t).each(function(){return c.push(e(this).text())});return e("tbody > tr",t).each(function(){p={};e("td",this).each(function(t){return p[c[t]]=e(this).text()});return i(p)})}throw new Error("unknown input format")};t.convertToArray=function(e){var n;n=[];t.forEachRecord(e,{},function(e){return n.push(e)});return n};t.prototype.natSort=function(e,t){return f(e,t)};t.prototype.arrSort=function(e,t){return this.natSort(e.join(),t.join())};t.prototype.sortKeys=function(){if(!this.sorted){this.rowKeys.sort(this.arrSort);this.colKeys.sort(this.arrSort)}return this.sorted=!0};t.prototype.getColKeys=function(){this.sortKeys();return this.colKeys};t.prototype.getRowKeys=function(){this.sortKeys();return this.rowKeys};t.prototype.processRecord=function(e){var t,n,r,i,o,s,a,l,u,p,c,d,f;t=[];i=[];p=this.colAttrs;for(s=0,l=p.length;l>s;s++){o=p[s];t.push(null!=(c=e[o])?c:"null")}d=this.rowAttrs;for(a=0,u=d.length;u>a;a++){o=d[a];i.push(null!=(f=e[o])?f:"null")}r=i.join(String.fromCharCode(0));n=t.join(String.fromCharCode(0));this.allTotal.push(e);if(0!==i.length){if(!this.rowTotals[r]){this.rowKeys.push(i);this.rowTotals[r]=this.aggregator(this,i,[])}this.rowTotals[r].push(e)}if(0!==t.length){if(!this.colTotals[n]){this.colKeys.push(t);this.colTotals[n]=this.aggregator(this,[],t)}this.colTotals[n].push(e)}if(0!==t.length&&0!==i.length){this.tree[r]||(this.tree[r]={});this.tree[r][n]||(this.tree[r][n]=this.aggregator(this,i,t));return this.tree[r][n].push(e)}};t.prototype.getAggregator=function(e,t){var n,r,i;i=e.join(String.fromCharCode(0));r=t.join(String.fromCharCode(0));n=0===e.length&&0===t.length?this.allTotal:0===e.length?this.colTotals[r]:0===t.length?this.rowTotals[i]:this.tree[i][r];return null!=n?n:{value:function(){return null},format:function(){return""}}};return t}();g=function(t,n){var r,i,o,s,a,u,p,c,d,f,h,g,m,E,v,x,y,N,I,A,T;u={localeStrings:{totals:"Totals"}};n=e.extend(u,n);o=t.colAttrs;h=t.rowAttrs;m=t.getRowKeys();a=t.getColKeys();f=document.createElement("table");f.className="pvtTable";E=function(e,t,n){var r,i,o,s,a,l;if(0!==t){i=!0;for(s=a=0;n>=0?n>=a:a>=n;s=n>=0?++a:--a)e[t-1][s]!==e[t][s]&&(i=!1);if(i)return-1}r=0;for(;t+r<e.length;){o=!1;for(s=l=0;n>=0?n>=l:l>=n;s=n>=0?++l:--l)e[t][s]!==e[t+r][s]&&(o=!0);if(o)break;r++}return r};for(c in o)if(l.call(o,c)){i=o[c];N=document.createElement("tr");if(0===parseInt(c)&&0!==h.length){x=document.createElement("th");x.setAttribute("colspan",h.length);x.setAttribute("rowspan",o.length);N.appendChild(x)}x=document.createElement("th");x.className="pvtAxisLabel";x.textContent=i;N.appendChild(x);for(p in a)if(l.call(a,p)){s=a[p];T=E(a,parseInt(p),parseInt(c));if(-1!==T){x=document.createElement("th");x.className="pvtColLabel";x.textContent=s[c];x.setAttribute("colspan",T);parseInt(c)===o.length-1&&0!==h.length&&x.setAttribute("rowspan",2);N.appendChild(x)}}if(0===parseInt(c)){x=document.createElement("th");x.className="pvtTotalLabel";x.innerHTML=n.localeStrings.totals;x.setAttribute("rowspan",o.length+(0===h.length?0:1));N.appendChild(x)}f.appendChild(N)}if(0!==h.length){N=document.createElement("tr");for(p in h)if(l.call(h,p)){d=h[p];x=document.createElement("th");x.className="pvtAxisLabel";x.textContent=d;N.appendChild(x)}x=document.createElement("th");if(0===o.length){x.className="pvtTotalLabel";x.innerHTML=n.localeStrings.totals}N.appendChild(x);f.appendChild(N)}for(p in m)if(l.call(m,p)){g=m[p];N=document.createElement("tr");for(c in g)if(l.call(g,c)){I=g[c];T=E(m,parseInt(p),parseInt(c));if(-1!==T){x=document.createElement("th");x.className="pvtRowLabel";x.textContent=I;x.setAttribute("rowspan",T);parseInt(c)===h.length-1&&0!==o.length&&x.setAttribute("colspan",2);N.appendChild(x)}}for(c in a)if(l.call(a,c)){s=a[c];r=t.getAggregator(g,s);A=r.value();v=document.createElement("td");v.className="pvtVal row"+p+" col"+c;v.innerHTML=r.format(A);v.setAttribute("data-value",A);N.appendChild(v)}y=t.getAggregator(g,[]);A=y.value();v=document.createElement("td");v.className="pvtTotal rowTotal";v.innerHTML=y.format(A);v.setAttribute("data-value",A);v.setAttribute("data-for","row"+p);N.appendChild(v);f.appendChild(N)}N=document.createElement("tr");x=document.createElement("th");x.className="pvtTotalLabel";x.innerHTML=n.localeStrings.totals;x.setAttribute("colspan",h.length+(0===o.length?0:1));N.appendChild(x);for(c in a)if(l.call(a,c)){s=a[c];y=t.getAggregator([],s);A=y.value();v=document.createElement("td");v.className="pvtTotal colTotal";v.innerHTML=y.format(A);v.setAttribute("data-value",A);v.setAttribute("data-for","col"+c);N.appendChild(v)}y=t.getAggregator([],[]);A=y.value();v=document.createElement("td");v.className="pvtGrandTotal";v.innerHTML=y.format(A);v.setAttribute("data-value",A);N.appendChild(v);f.appendChild(N);f.setAttribute("data-numrows",m.length);f.setAttribute("data-numcols",a.length);return f};e.fn.pivot=function(n,i){var o,s,a,l,u;o={cols:[],rows:[],filter:function(){return!0},aggregator:r.count()(),aggregatorName:"Count",derivedAttributes:{},renderer:g,rendererOptions:null,localeStrings:c.en.localeStrings};i=e.extend(o,i);l=null;try{a=new t(n,i);try{l=i.renderer(a,i.rendererOptions)}catch(p){s=p;"undefined"!=typeof console&&null!==console&&console.error(s.stack);l=e("<span>").html(i.localeStrings.renderError)}}catch(p){s=p;"undefined"!=typeof console&&null!==console&&console.error(s.stack);l=e("<span>").html(i.localeStrings.computeError)}u=this[0];for(;u.hasChildNodes();)u.removeChild(u.lastChild);return this.append(l)};e.fn.pivotUI=function(n,r,i,s){var a,u,p,d,h,g,m,E,v,x,y,N,I,A,T,L,S,C,b,R,w,O,_,F,P,M,k,D,G,U,j,B,q,V,H,z,W,$,K;null==i&&(i=!1);null==s&&(s="en");m={derivedAttributes:{},aggregators:c[s].aggregators,renderers:c[s].renderers,hiddenAttributes:[],menuLimit:200,cols:[],rows:[],vals:[],exclusions:{},unusedAttrsVertical:"auto",autoSortUnusedAttrs:!1,rendererOptions:{localeStrings:c[s].localeStrings},onRefresh:null,filter:function(){return!0},localeStrings:c[s].localeStrings};v=this.data("pivotUIOptions");I=null==v||i?e.extend(m,r):v;try{n=t.convertToArray(n);R=function(){var e,t;e=n[0];t=[];for(N in e)l.call(e,N)&&t.push(N);return t}();H=I.derivedAttributes;for(h in H)l.call(H,h)&&o.call(R,h)<0&&R.push(h);d={};for(k=0,j=R.length;j>k;k++){P=R[k];d[P]={}}t.forEachRecord(n,I.derivedAttributes,function(e){var t,n,r;r=[];for(N in e)if(l.call(e,N)){t=e[N];if(I.filter(e)){null==t&&(t="null");null==(n=d[N])[t]&&(n[t]=0);r.push(d[N][t]++)}}return r});_=e("<table cellpadding='5'>");C=e("<td>");S=e("<select class='pvtRenderer'>").appendTo(C).bind("change",function(){return T()});z=I.renderers;for(P in z)l.call(z,P)&&e("<option>").val(P).html(P).appendTo(S);g=e("<td class='pvtAxisContainer pvtUnused'>");b=function(){var e,t,n;n=[];for(e=0,t=R.length;t>e;e++){h=R[e];o.call(I.hiddenAttributes,h)<0&&n.push(h)}return n}();F=!1;if("auto"===I.unusedAttrsVertical){p=0;for(D=0,B=b.length;B>D;D++){a=b[D];p+=a.length}F=p>120}g.addClass(I.unusedAttrsVertical===!0||F?"pvtVertList":"pvtHorizList");M=function(t){var n,r,i,s,a,l,u,p,c,h,m,E,v,y,A;u=function(){var e;e=[];for(N in d[t])e.push(N);return e}();l=!1;E=e("<div>").addClass("pvtFilterBox").hide();E.append(e("<h4>").text(""+t+" ("+u.length+")"));if(u.length>I.menuLimit)E.append(e("<p>").html(I.localeStrings.tooMany));else{r=e("<p>").appendTo(E);r.append(e("<button>").html(I.localeStrings.selectAll).bind("click",function(){return E.find("input:visible").prop("checked",!0)}));r.append(e("<button>").html(I.localeStrings.selectNone).bind("click",function(){return E.find("input:visible").prop("checked",!1)}));r.append(e("<input>").addClass("pvtSearch").attr("placeholder",I.localeStrings.filterResults).bind("keyup",function(){var t;t=e(this).val().toLowerCase();return e(this).parents(".pvtFilterBox").find("label span").each(function(){var n;n=e(this).text().toLowerCase().indexOf(t);return-1!==n?e(this).parent().show():e(this).parent().hide()})}));i=e("<div>").addClass("pvtCheckContainer").appendTo(E);A=u.sort(f);for(v=0,y=A.length;y>v;v++){N=A[v];m=d[t][N];s=e("<label>");a=I.exclusions[t]?o.call(I.exclusions[t],N)>=0:!1;l||(l=a);e("<input type='checkbox' class='pvtFilter'>").attr("checked",!a).data("filter",[t,N]).appendTo(s);s.append(e("<span>").text(""+N+" ("+m+")"));i.append(e("<p>").append(s))}}h=function(){var t;t=e(E).find("[type='checkbox']").length-e(E).find("[type='checkbox']:checked").length;t>0?n.addClass("pvtFilteredAttribute"):n.removeClass("pvtFilteredAttribute");return u.length>I.menuLimit?E.toggle():E.toggle(0,T)};e("<p>").appendTo(E).append(e("<button>").text("OK").bind("click",h));p=function(t){E.css({left:t.pageX,top:t.pageY}).toggle();e(".pvtSearch").val("");return e("label").show()};c=e("<span class='pvtTriangle'>").html(" &#x25BE;").bind("click",p);n=e("<li class='axis_"+x+"'>").append(e("<span class='pvtAttr'>").text(t).data("attrName",t).append(c));l&&n.addClass("pvtFilteredAttribute");g.append(n).append(E);return n.bind("dblclick",p)};for(x in b){h=b[x];M(h)}w=e("<tr>").appendTo(_);u=e("<select class='pvtAggregator'>").bind("change",function(){return T()});W=I.aggregators;for(P in W)l.call(W,P)&&u.append(e("<option>").val(P).html(P));e("<td class='pvtVals'>").appendTo(w).append(u).append(e("<br>"));e("<td class='pvtAxisContainer pvtHorizList pvtCols'>").appendTo(w);O=e("<tr>").appendTo(_);O.append(e("<td valign='top' class='pvtAxisContainer pvtRows'>"));A=e("<td valign='top' class='pvtRendererArea'>").appendTo(O);if(I.unusedAttrsVertical===!0||F){_.find("tr:nth-child(1)").prepend(C);_.find("tr:nth-child(2)").prepend(g)}else _.prepend(e("<tr>").append(C).append(g));this.html(_);$=I.cols;for(G=0,q=$.length;q>G;G++){P=$[G];this.find(".pvtCols").append(this.find(".axis_"+b.indexOf(P)))}K=I.rows;for(U=0,V=K.length;V>U;U++){P=K[U];this.find(".pvtRows").append(this.find(".axis_"+b.indexOf(P)))}null!=I.aggregatorName&&this.find(".pvtAggregator").val(I.aggregatorName);null!=I.rendererName&&this.find(".pvtRenderer").val(I.rendererName);y=!0;L=function(t){return function(){var r,i,s,a,l,p,c,d,f,h,g,m,E,v;d={derivedAttributes:I.derivedAttributes,localeStrings:I.localeStrings,rendererOptions:I.rendererOptions,cols:[],rows:[]};l=null!=(v=I.aggregators[u.val()]([])().numInputs)?v:0;h=[];t.find(".pvtRows li span.pvtAttr").each(function(){return d.rows.push(e(this).data("attrName"))});t.find(".pvtCols li span.pvtAttr").each(function(){return d.cols.push(e(this).data("attrName"))});t.find(".pvtVals select.pvtAttrDropdown").each(function(){if(0===l)return e(this).remove();l--;return""!==e(this).val()?h.push(e(this).val()):void 0});if(0!==l){c=t.find(".pvtVals");for(P=m=0;l>=0?l>m:m>l;P=l>=0?++m:--m){a=e("<select class='pvtAttrDropdown'>").append(e("<option>")).bind("change",function(){return T()});for(E=0,g=b.length;g>E;E++){r=b[E];a.append(e("<option>").val(r).text(r))}c.append(a)}}if(y){h=I.vals;x=0;t.find(".pvtVals select.pvtAttrDropdown").each(function(){e(this).val(h[x]);return x++});y=!1}d.aggregatorName=u.val();d.vals=h;d.aggregator=I.aggregators[u.val()](h);d.renderer=I.renderers[S.val()];i={};t.find("input.pvtFilter").not(":checked").each(function(){var t;t=e(this).data("filter");return null!=i[t[0]]?i[t[0]].push(t[1]):i[t[0]]=[t[1]]});d.filter=function(e){var t,n;if(!I.filter(e))return!1;for(N in i){t=i[N];if(n=""+e[N],o.call(t,n)>=0)return!1}return!0};A.pivot(n,d);p=e.extend(I,{cols:d.cols,rows:d.rows,vals:h,exclusions:i,aggregatorName:u.val(),rendererName:S.val()});t.data("pivotUIOptions",p);if(I.autoSortUnusedAttrs){s=e.pivotUtilities.naturalSort;f=t.find("td.pvtUnused.pvtAxisContainer");e(f).children("li").sort(function(t,n){return s(e(t).text(),e(n).text())}).appendTo(f)}A.css("opacity",1);return null!=I.onRefresh?I.onRefresh(p):void 0}}(this);T=function(){return function(){A.css("opacity",.5);return setTimeout(L,10)}}(this);T();this.find(".pvtAxisContainer").sortable({update:function(e,t){return null==t.sender?T():void 0},connectWith:this.find(".pvtAxisContainer"),items:"li",placeholder:"pvtPlaceholder"})}catch(Y){E=Y;"undefined"!=typeof console&&null!==console&&console.error(E.stack);this.html(I.localeStrings.uiRenderError)}return this};e.fn.heatmap=function(t){var n,r,i,o,s,a,l,u;null==t&&(t="heatmap");a=this.data("numrows");s=this.data("numcols");n=function(e,t,n){var r;r=function(){switch(e){case"red":return function(e){return"ff"+e+e};case"green":return function(e){return""+e+"ff"+e};case"blue":return function(e){return""+e+e+"ff"}}}();return function(e){var i,o;o=255-Math.round(255*(e-t)/(n-t));i=o.toString(16).split(".")[0];1===i.length&&(i=0+i);return r(i)}};r=function(t){return function(r,i){var o,s,a;s=function(n){return t.find(r).each(function(){var t;t=e(this).data("value");return null!=t&&isFinite(t)?n(t,e(this)):void 0})};a=[];s(function(e){return a.push(e)});o=n(i,Math.min.apply(Math,a),Math.max.apply(Math,a));return s(function(e,t){return t.css("background-color","#"+o(e))})}}(this);switch(t){case"heatmap":r(".pvtVal","red");break;case"rowheatmap":for(i=l=0;a>=0?a>l:l>a;i=a>=0?++l:--l)r(".pvtVal.row"+i,"red");break;case"colheatmap":for(o=u=0;s>=0?s>u:u>s;o=s>=0?++u:--u)r(".pvtVal.col"+o,"red")}r(".pvtTotal.rowTotal","red");r(".pvtTotal.colTotal","red");return this};return e.fn.barchart=function(){var t,n,r,i,o;i=this.data("numrows");r=this.data("numcols");t=function(t){return function(n){var r,i,o,s;r=function(r){return t.find(n).each(function(){var t;t=e(this).data("value");return null!=t&&isFinite(t)?r(t,e(this)):void 0})};s=[];r(function(e){return s.push(e)});i=Math.max.apply(Math,s);o=function(e){return 100*e/(1.4*i)};return r(function(t,n){var r,i;r=n.text();i=e("<div>").css({position:"relative",height:"55px"});i.append(e("<div>").css({position:"absolute",bottom:0,left:0,right:0,height:o(t)+"%","background-color":"gray"}));i.append(e("<div>").text(r).css({position:"relative","padding-left":"5px","padding-right":"5px"}));return n.css({padding:0,"padding-top":"5px","text-align":"center"}).html(i)})}}(this);for(n=o=0;i>=0?i>o:o>i;n=i>=0?++o:--o)t(".pvtVal.row"+n);t(".pvtTotal.colTotal");return this}})}).call(this)},{jquery:void 0}],61:[function(e,t){t.exports=e(7)},{"/home/lrd900/yasgui/yasgui/node_modules/yasgui-utils/node_modules/store/store.js":7}],62:[function(e,t){t.exports=e(25)},{"/home/lrd900/yasgui/yasgui/node_modules/yasgui-yasqe/node_modules/yasgui-utils/package.json":25}],63:[function(e,t,n){arguments[4][9][0].apply(n,arguments)},{"../package.json":62,"./storage.js":64,"./svg.js":65,"/home/lrd900/yasgui/yasgui/node_modules/yasgui-utils/src/main.js":9}],64:[function(e,t){t.exports=e(27)},{"/home/lrd900/yasgui/yasgui/node_modules/yasgui-yasqe/node_modules/yasgui-utils/src/storage.js":27,store:61}],65:[function(e,t){t.exports=e(11)},{"/home/lrd900/yasgui/yasgui/node_modules/yasgui-utils/src/svg.js":11}],66:[function(e,t){t.exports={name:"yasgui-yasr",description:"Yet Another SPARQL Resultset GUI",version:"2.4.2",main:"src/main.js",licenses:[{type:"MIT",url:"http://yasr.yasgui.org/license.txt"}],author:"Laurens Rietveld",homepage:"http://yasr.yasgui.org",devDependencies:{browserify:"^6.1.0",gulp:"~3.6.0","gulp-bump":"^0.1.11","gulp-concat":"^2.4.1","gulp-connect":"^2.0.5","gulp-embedlr":"^0.5.2","gulp-filter":"^1.0.2","gulp-git":"^0.5.2","gulp-jsvalidate":"^0.2.0","gulp-livereload":"^1.3.1","gulp-minify-css":"^0.3.11","gulp-notify":"^2.0.1","gulp-rename":"^1.2.0","gulp-streamify":"0.0.5","gulp-tag-version":"^1.1.0","gulp-uglify":"^1.0.1","require-dir":"^0.1.0","run-sequence":"^1.0.1","vinyl-buffer":"^1.0.0","vinyl-source-stream":"~0.1.1",watchify:"^0.6.4","gulp-sourcemaps":"^1.2.8",exorcist:"^0.1.6","vinyl-transform":"0.0.1","gulp-sass":"^1.2.2","bootstrap-sass":"^3.3.1","browserify-transform-tools":"^1.2.1","gulp-cssimport":"^1.3.1","gulp-html-replace":"^1.4.1","browserify-shim":"^3.8.1"},bugs:"https://github.com/YASGUI/YASR/issues/",keywords:["JavaScript","SPARQL","Editor","Semantic Web","Linked Data"],maintainers:[{name:"Laurens Rietveld",email:"[email protected]",web:"http://laurensrietveld.nl"}],repository:{type:"git",url:"https://github.com/YASGUI/YASR.git"},dependencies:{jquery:"~ 1.11.0",codemirror:"^4.7.0","yasgui-utils":"^1.4.1",pivottable:"^1.2.2","jquery-ui":"^1.10.5",d3:"^3.4.13"},"browserify-shim":{google:"global:google"},browserify:{transform:["browserify-shim"]},optionalShim:{codemirror:{require:"codemirror",global:"CodeMirror"},jquery:{require:"jquery",global:"jQuery"},"../../lib/codemirror":{require:"codemirror",global:"CodeMirror"},"../lib/DataTables/media/js/jquery.dataTables.js":{require:"datatables",global:"jQuery"},datatables:{require:"datatables",global:"jQuery"},d3:{require:"d3",global:"d3"},"jquery-ui/sortable":{require:"jquery-ui/sortable",global:"jQuery"},pivottable:{require:"pivottable",global:"jQuery"}}}},{}],67:[function(e,t){"use strict";t.exports=function(e){var t='"',n=",",r="\n",i=e.head.vars,o=e.results.bindings,s=function(){for(var e=0;e<i.length;e++)u(i[e]);c+=r},a=function(){for(var e=0;e<o.length;e++){l(o[e]);c+=r}},l=function(e){for(var t=0;t<i.length;t++){var n=i[t];u(e.hasOwnProperty(n)?e[n].value:"")}},u=function(e){e.replace(t,t+t);p(e)&&(e=t+e+t);c+=" "+e+" "+n},p=function(e){var r=!1;e.match("[\\w|"+n+"|"+t+"]")&&(r=!0);return r},c="";s();a();return c}},{}],68:[function(e,t){"use strict";var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),r=t.exports=function(t){var r=n("<div class='booleanResult'></div>"),i=function(){r.empty().appendTo(t.resultsContainer);var i=t.results.getBoolean(),o=null,s=null;if(i===!0){o="check";s="True"}else if(i===!1){o="cross";s="False"}else{r.width("140");s="Could not find boolean value in response"}o&&e("yasgui-utils").svg.draw(r,e("./imgs.js")[o]);n("<span></span>").text(s).appendTo(r)},o=function(){return t.results.getBoolean&&(t.results.getBoolean()===!0||0==t.results.getBoolean())};return{name:null,draw:i,hideFromSelection:!0,getPriority:10,canHandleResults:o}};r.version={"YASR-boolean":e("../package.json").version,jquery:n.fn.jquery}},{"../package.json":66,"./imgs.js":73,jquery:void 0,"yasgui-utils":63}],69:[function(e,t){"use strict";var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}();t.exports={output:"table",useGoogleCharts:!0,outputPlugins:["table","error","boolean","rawResponse"],drawOutputSelector:!0,drawDownloadIcon:!0,getUsedPrefixes:null,persistency:{prefix:function(e){return"yasr_"+n(e.container).closest("[id]").attr("id")+"_"},outputSelector:function(){return"selector"},results:{id:function(e){return"results_"+n(e.container).closest("[id]").attr("id")},key:"results",maxSize:1e5}}}},{jquery:void 0}],70:[function(e,t){"use strict";var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),r=t.exports=function(e){var t=n("<div class='errorResult'></div>"),i=(n.extend(!0,{},r.defaults),function(){var r=e.results.getException();t.empty().appendTo(e.resultsContainer);var i="Error";r.statusText&&r.statusText.length<100&&(i=r.statusText);void 0!=r.status&&(i+=" (#"+r.status+")");t.append(n("<span>",{"class":"exception"}).text(i));var o=null;r.responseText?o=r.responseText:"string"==typeof r&&(o=r);o&&t.append(n("<pre>").text(o))}),o=function(e){return e.results.getException()||!1};return{name:null,draw:i,getPriority:20,hideFromSelection:!0,canHandleResults:o}};r.defaults={}},{jquery:void 0}],71:[function(e,t){(function(n){var r=e("events").EventEmitter,i=(function(){try{return e("jquery")}catch(t){return window.jQuery }}(),!1),o=!1,s=function(){r.call(this);var e=this;this.init=function(){if(o||("undefined"!=typeof window?window.google:"undefined"!=typeof n?n.google:null)||i)("undefined"!=typeof window?window.google:"undefined"!=typeof n?n.google:null)?e.emit("initDone"):o&&e.emit("initError");else{i=!0;a("//google.com/jsapi",function(){i=!1;e.emit("initDone")});var t=100,r=6e3,s=+new Date,l=function(){if(!("undefined"!=typeof window?window.google:"undefined"!=typeof n?n.google:null))if(+new Date-s>r){o=!0;i=!1;e.emit("initError")}else setTimeout(l,t)};l()}};this.googleLoad=function(){var t=function(){("undefined"!=typeof window?window.google:"undefined"!=typeof n?n.google:null).load("visualization","1",{packages:["corechart","charteditor"],callback:function(){e.emit("done")}})};if(i){e.once("initDone",t);e.once("initError",function(){e.emit("error","Could not load google loader")})}else if("undefined"!=typeof window?window.google:"undefined"!=typeof n?n.google:null)t();else if(o)e.emit("error","Could not load google loader");else{e.once("initDone",t);e.once("initError",function(){e.emit("error","Could not load google loader")})}}},a=function(e,t){var n=document.createElement("script");n.type="text/javascript";n.readyState?n.onreadystatechange=function(){if("loaded"==n.readyState||"complete"==n.readyState){n.onreadystatechange=null;t()}}:n.onload=function(){t()};n.src=e;document.body.appendChild(n)};s.prototype=new r;t.exports=new s}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{events:2,jquery:void 0}],72:[function(e,t){(function(n){"use strict";function r(e,t,n){function r(e,t,o){var l,u,p,c,d,f,h,g;if(null==e||null==t)return e===t;if(e.__placeholder__||t.__placeholder__)return!0;if(e===t)return 0!==e||1/e==1/t;l=i.call(e);if(i.call(t)!=l)return!1;switch(l){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if("object"!=typeof e||"object"!=typeof t)return!1;u=o.length;for(;u--;)if(o[u]==e)return!0;o.push(e);p=0;c=!0;if("[object Array]"==l){d=e.length;f=t.length;if(a){switch(n){case"===":c=d===f;break;case"<==":c=f>=d;break;case"<<=":c=f>d}p=d;a=!1}else{c=d===f;p=d}if(c)for(;p--&&(c=p in e==p in t&&r(e[p],t[p],o)););}else{if("constructor"in e!="constructor"in t||e.constructor!=t.constructor)return!1;for(h in e)if(s(e,h)){p++;if(!(c=s(t,h)&&r(e[h],t[h],o)))break}if(c){g=0;for(h in t)s(t,h)&&++g;if(a)c="<<="===n?g>p:"<=="===n?g>=p:p===g;else{a=!1;c=p===g}}}o.pop();return c}var i={}.toString,o={}.hasOwnProperty,s=function(e,t){return o.call(e,t)},a=!0;return r(e,t,[])}var i=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),o=e("./utils.js"),s=e("yasgui-utils"),a=t.exports=function(t){var l=i.extend(!0,{},a.defaults),u=t.container.closest("[id]").attr("id");null==t.options.gchart&&(t.options.gchart={});var p=t.getPersistencyId("motionchart"),c=t.getPersistencyId("chartConfig");null==t.options.gchart.motionChartState&&(t.options.gchart.motionChartState=s.storage.get(p));null==t.options.gchart.chartConfig&&(t.options.gchart.chartConfig=s.storage.get(c));var d=null,f=function(e){var i="undefined"!=typeof window?window.google:"undefined"!=typeof n?n.google:null;d=new i.visualization.ChartEditor;i.visualization.events.addListener(d,"ok",function(){var e,n;e=d.getChartWrapper();if(!r(e.getChartType,"MotionChart","===")){t.options.gchart.motionChartState=e.n;s.storage.set(p,t.options.gchart.motionChartState);e.setOption("state",t.options.gchart.motionChartState);i.visualization.events.addListener(e,"ready",function(){var n;n=e.getChart();i.visualization.events.addListener(n,"statechange",function(){t.options.gchart.motionChartState=n.getState();s.storage.set(p,t.options.gchart.motionChartState)})})}n=e.getDataTable();e.setDataTable(null);t.options.gchart.chartConfig=e.toJSON();s.storage.set(c,t.options.gchart.chartConfig);e.setDataTable(n);e.draw()});e&&e()};return{name:"Google Chart",hideFromSelection:!1,priority:7,canHandleResults:function(e){var t,n;return null!=(t=e.results)&&(n=t.getVariables())&&n.length>0},getDownloadInfo:function(){if(!t.results)return null;var e=t.resultsContainer.find("svg");return 0==e.length?null:{getContent:function(){return e[0].outerHTML},filename:"queryResults.svg",contentType:"image/svg+xml",buttonTitle:"Download SVG Image"}},draw:function(){var r=function(){t.resultsContainer.empty();var e=u+"_gchartWrapper",n=null;t.resultsContainer.append(i("<button>",{"class":"openGchartBtn yasr_btn"}).text("Chart Config").click(function(){d.openDialog(n)})).append(i("<div>",{id:e,"class":"gchartWrapper"}));var r=new google.visualization.DataTable,a=t.results.getAsJson();a.head.vars.forEach(function(e){var t=o.getGoogleType(a.results.bindings[0][e]);r.addColumn(t,e)});var c=null;t.options.getUsedPrefixes&&(c="function"==typeof t.options.getUsedPrefixes?t.options.getUsedPrefixes(t):t.options.getUsedPrefixes);a.results.bindings.forEach(function(e){var t=[];a.head.vars.forEach(function(n){t.push(o.castGoogleType(e[n],c))});r.addRow(t)});if(t.options.gchart.chartConfig){n=new google.visualization.ChartWrapper(t.options.gchart.chartConfig);if("MotionChart"===n.getChartType()&&null!=t.options.gchart.motionChartState){n.setOption("state",t.options.gchart.motionChartState);google.visualization.events.addListener(n,"ready",function(){var e;e=n.getChart();google.visualization.events.addListener(e,"statechange",function(){t.options.gchart.motionChartState=e.getState();s.storage.set(p,t.options.gchart.motionChartState)})})}n.setDataTable(r)}else n=new google.visualization.ChartWrapper({chartType:"Table",dataTable:r,containerId:e});n.setOption("width",l.width);n.setOption("height",l.height);n.draw();t.updateHeader()};("undefined"!=typeof window?window.google:"undefined"!=typeof n?n.google:null)&&("undefined"!=typeof window?window.google:"undefined"!=typeof n?n.google:null).visualization&&d?r():e("./gChartLoader.js").on("done",function(){f();r()}).on("error",function(){console.log("errorrr")}).googleLoad()}}};a.defaults={height:"600px",width:"100%",persistencyId:"gchart"}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./gChartLoader.js":71,"./utils.js":84,jquery:void 0,"yasgui-utils":63}],73:[function(e,t){"use strict";t.exports={cross:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="30px" height="30px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"><g> <path d="M83.288,88.13c-2.114,2.112-5.575,2.112-7.689,0L53.659,66.188c-2.114-2.112-5.573-2.112-7.687,0L24.251,87.907 c-2.113,2.114-5.571,2.114-7.686,0l-4.693-4.691c-2.114-2.114-2.114-5.573,0-7.688l21.719-21.721c2.113-2.114,2.113-5.573,0-7.686 L11.872,24.4c-2.114-2.113-2.114-5.571,0-7.686l4.842-4.842c2.113-2.114,5.571-2.114,7.686,0L46.12,33.591 c2.114,2.114,5.572,2.114,7.688,0l21.721-21.719c2.114-2.114,5.573-2.114,7.687,0l4.695,4.695c2.111,2.113,2.111,5.571-0.003,7.686 L66.188,45.973c-2.112,2.114-2.112,5.573,0,7.686L88.13,75.602c2.112,2.111,2.112,5.572,0,7.687L83.288,88.13z"/></g></svg>',check:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="30px" height="30px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"><path fill="#000000" d="M14.301,49.982l22.606,17.047L84.361,4.903c2.614-3.733,7.76-4.64,11.493-2.026l0.627,0.462 c3.732,2.614,4.64,7.758,2.025,11.492l-51.783,79.77c-1.955,2.791-3.896,3.762-7.301,3.988c-3.405,0.225-5.464-1.039-7.508-3.084 L2.447,61.814c-3.263-3.262-3.263-8.553,0-11.814l0.041-0.019C5.75,46.718,11.039,46.718,14.301,49.982z"/></svg>',unsorted:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="Layer_1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 54.552711 113.78478" enable-background="new 0 0 100 100" xml:space="preserve"><g id="g5" transform="matrix(-0.70522156,-0.70898699,-0.70898699,0.70522156,97.988199,55.081205)"><path style="fill:#000000" inkscape:connector-curvature="0" id="path7" d="M 57.911,66.915 45.808,55.063 42.904,52.238 31.661,41.25 31.435,41.083 31.131,40.775 30.794,40.523 30.486,40.3 30.069,40.05 29.815,39.911 29.285,39.659 29.089,39.576 28.474,39.326 28.363,39.297 H 28.336 L 27.665,39.128 27.526,39.1 26.94,38.99 26.714,38.961 26.212,38.934 h -0.31 -0.444 l -0.339,0.027 c -1.45,0.139 -2.876,0.671 -4.11,1.564 l -0.223,0.141 -0.279,0.25 -0.335,0.308 -0.054,0.029 -0.171,0.194 -0.334,0.364 -0.224,0.279 -0.25,0.336 -0.225,0.362 -0.192,0.308 -0.197,0.421 -0.142,0.279 -0.193,0.477 -0.084,0.222 -12.441,38.414 c -0.814,2.458 -0.313,5.029 1.115,6.988 v 0.026 l 0.418,0.532 0.17,0.165 0.251,0.281 0.084,0.079 0.283,0.281 0.25,0.194 0.474,0.367 0.083,0.053 c 2.015,1.371 4.641,1.874 7.131,1.094 L 55.228,80.776 c 4.303,-1.342 6.679,-5.814 5.308,-10.006 -0.387,-1.259 -1.086,-2.35 -1.979,-3.215 l -0.368,-0.337 -0.278,-0.303 z m -6.318,5.896 0.079,0.114 -37.369,11.57 11.854,-36.538 10.565,10.317 2.876,2.825 11.995,11.712 z" /></g><path style="fill:#000000" inkscape:connector-curvature="0" id="path7-9" d="m 8.8748339,52.571766 16.9382111,-0.222584 4.050851,-0.06665 15.719154,-0.222166 0.27778,-0.04246 0.43276,0.0017 0.41632,-0.06121 0.37532,-0.0611 0.47132,-0.119342 0.27767,-0.08206 0.55244,-0.198047 0.19707,-0.08043 0.61095,-0.259721 0.0988,-0.05825 0.019,-0.01914 0.59303,-0.356548 0.11787,-0.0788 0.49125,-0.337892 0.17994,-0.139779 0.37317,-0.336871 0.21862,-0.219786 0.31311,-0.31479 0.21993,-0.259387 c 0.92402,-1.126057 1.55249,-2.512251 1.78961,-4.016904 l 0.0573,-0.25754 0.0195,-0.374113 0.0179,-0.454719 0.0175,-0.05874 -0.0169,-0.258049 -0.0225,-0.493503 -0.0398,-0.355569 -0.0619,-0.414201 -0.098,-0.414812 -0.083,-0.353334 L 53.23955,41.1484 53.14185,40.850967 52.93977,40.377742 52.84157,40.161628 34.38021,4.2507375 C 33.211567,1.9401875 31.035446,0.48226552 28.639484,0.11316952 l -0.01843,-0.01834 -0.671963,-0.07882 -0.236871,0.0042 L 27.335984,-4.7826577e-7 27.220736,0.00379952 l -0.398804,0.0025 -0.313848,0.04043 -0.594474,0.07724 -0.09611,0.02147 C 23.424549,0.60716252 21.216017,2.1142355 20.013025,4.4296865 L 0.93967491,40.894479 c -2.08310801,3.997178 -0.588125,8.835482 3.35080799,10.819749 1.165535,0.613495 2.43199,0.88731 3.675026,0.864202 l 0.49845,-0.02325 0.410875,0.01658 z M 9.1502369,43.934401 9.0136999,43.910011 27.164145,9.2564625 44.70942,43.42818 l -14.765289,0.214677 -4.031106,0.0468 -16.7627881,0.244744 z" /></svg>',sortDesc:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="Layer_1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 54.552711 113.78478" enable-background="new 0 0 100 100" xml:space="preserve"><g id="g5" transform="matrix(-0.70522156,-0.70898699,-0.70898699,0.70522156,97.988199,55.081205)"><path style="fill:#000000" inkscape:connector-curvature="0" id="path7" d="M 57.911,66.915 45.808,55.063 42.904,52.238 31.661,41.25 31.435,41.083 31.131,40.775 30.794,40.523 30.486,40.3 30.069,40.05 29.815,39.911 29.285,39.659 29.089,39.576 28.474,39.326 28.363,39.297 H 28.336 L 27.665,39.128 27.526,39.1 26.94,38.99 26.714,38.961 26.212,38.934 h -0.31 -0.444 l -0.339,0.027 c -1.45,0.139 -2.876,0.671 -4.11,1.564 l -0.223,0.141 -0.279,0.25 -0.335,0.308 -0.054,0.029 -0.171,0.194 -0.334,0.364 -0.224,0.279 -0.25,0.336 -0.225,0.362 -0.192,0.308 -0.197,0.421 -0.142,0.279 -0.193,0.477 -0.084,0.222 -12.441,38.414 c -0.814,2.458 -0.313,5.029 1.115,6.988 v 0.026 l 0.418,0.532 0.17,0.165 0.251,0.281 0.084,0.079 0.283,0.281 0.25,0.194 0.474,0.367 0.083,0.053 c 2.015,1.371 4.641,1.874 7.131,1.094 L 55.228,80.776 c 4.303,-1.342 6.679,-5.814 5.308,-10.006 -0.387,-1.259 -1.086,-2.35 -1.979,-3.215 l -0.368,-0.337 -0.278,-0.303 z m -6.318,5.896 0.079,0.114 -37.369,11.57 11.854,-36.538 10.565,10.317 2.876,2.825 11.995,11.712 z" /></g><path style="fill:#000000" inkscape:connector-curvature="0" id="path9" d="m 27.813273,0.12823506 0.09753,0.02006 c 2.39093,0.458209 4.599455,1.96811104 5.80244,4.28639004 L 52.785897,40.894525 c 2.088044,4.002139 0.590949,8.836902 -3.348692,10.821875 -1.329078,0.688721 -2.766603,0.943695 -4.133174,0.841768 l -0.454018,0.02 L 27.910392,52.354171 23.855313,52.281851 8.14393,52.061827 7.862608,52.021477 7.429856,52.021738 7.014241,51.959818 6.638216,51.900838 6.164776,51.779369 5.889216,51.699439 5.338907,51.500691 5.139719,51.419551 4.545064,51.145023 4.430618,51.105123 4.410168,51.084563 3.817138,50.730843 3.693615,50.647783 3.207314,50.310611 3.028071,50.174369 2.652795,49.833957 2.433471,49.613462 2.140099,49.318523 1.901127,49.041407 C 0.97781,47.916059 0.347935,46.528448 0.11153,45.021676 L 0.05352,44.766255 0.05172,44.371683 0.01894,43.936017 0,43.877277 0.01836,43.62206 0.03666,43.122889 0.0765,42.765905 0.13912,42.352413 0.23568,41.940425 0.32288,41.588517 0.481021,41.151945 0.579391,40.853806 0.77369,40.381268 0.876097,40.162336 19.338869,4.2542801 c 1.172169,-2.308419 3.34759,-3.76846504 5.740829,-4.17716604 l 0.01975,0.01985 0.69605,-0.09573 0.218437,0.0225 0.490791,-0.02132 0.39809,0.0046 0.315972,0.03973 0.594462,0.08149 z" /></svg>',sortAsc:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="Layer_1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 54.552711 113.78478" enable-background="new 0 0 100 100" xml:space="preserve"><g id="g5" transform="matrix(-0.70522156,0.70898699,-0.70898699,-0.70522156,97.988199,58.704807)"><path style="fill:#000000" inkscape:connector-curvature="0" id="path7" d="M 57.911,66.915 45.808,55.063 42.904,52.238 31.661,41.25 31.435,41.083 31.131,40.775 30.794,40.523 30.486,40.3 30.069,40.05 29.815,39.911 29.285,39.659 29.089,39.576 28.474,39.326 28.363,39.297 H 28.336 L 27.665,39.128 27.526,39.1 26.94,38.99 26.714,38.961 26.212,38.934 h -0.31 -0.444 l -0.339,0.027 c -1.45,0.139 -2.876,0.671 -4.11,1.564 l -0.223,0.141 -0.279,0.25 -0.335,0.308 -0.054,0.029 -0.171,0.194 -0.334,0.364 -0.224,0.279 -0.25,0.336 -0.225,0.362 -0.192,0.308 -0.197,0.421 -0.142,0.279 -0.193,0.477 -0.084,0.222 -12.441,38.414 c -0.814,2.458 -0.313,5.029 1.115,6.988 v 0.026 l 0.418,0.532 0.17,0.165 0.251,0.281 0.084,0.079 0.283,0.281 0.25,0.194 0.474,0.367 0.083,0.053 c 2.015,1.371 4.641,1.874 7.131,1.094 L 55.228,80.776 c 4.303,-1.342 6.679,-5.814 5.308,-10.006 -0.387,-1.259 -1.086,-2.35 -1.979,-3.215 l -0.368,-0.337 -0.278,-0.303 z m -6.318,5.896 0.079,0.114 -37.369,11.57 11.854,-36.538 10.565,10.317 2.876,2.825 11.995,11.712 z" /></g><path style="fill:#000000" inkscape:connector-curvature="0" id="path9" d="m 27.813273,113.65778 0.09753,-0.0201 c 2.39093,-0.45821 4.599455,-1.96811 5.80244,-4.28639 L 52.785897,72.891487 c 2.088044,-4.002139 0.590949,-8.836902 -3.348692,-10.821875 -1.329078,-0.688721 -2.766603,-0.943695 -4.133174,-0.841768 l -0.454018,-0.02 -16.939621,0.223997 -4.055079,0.07232 -15.711383,0.220024 -0.281322,0.04035 -0.432752,-2.61e-4 -0.415615,0.06192 -0.376025,0.05898 -0.47344,0.121469 -0.27556,0.07993 -0.550309,0.198748 -0.199188,0.08114 -0.594655,0.274528 -0.114446,0.0399 -0.02045,0.02056 -0.59303,0.35372 -0.123523,0.08306 -0.486301,0.337172 -0.179243,0.136242 -0.375276,0.340412 -0.219324,0.220495 -0.293372,0.294939 -0.238972,0.277116 C 0.97781,65.869953 0.347935,67.257564 0.11153,68.764336 L 0.05352,69.019757 0.05172,69.414329 0.01894,69.849995 0,69.908735 l 0.01836,0.255217 0.0183,0.499171 0.03984,0.356984 0.06262,0.413492 0.09656,0.411988 0.0872,0.351908 0.158141,0.436572 0.09837,0.298139 0.194299,0.472538 0.102407,0.218932 18.462772,35.908054 c 1.172169,2.30842 3.34759,3.76847 5.740829,4.17717 l 0.01975,-0.0199 0.69605,0.0957 0.218437,-0.0225 0.490791,0.0213 0.39809,-0.005 0.315972,-0.0397 0.594462,-0.0815 z" /></svg>',download:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="tiny" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 100 100" xml:space="preserve"><g id="Captions"></g><g id="Your_Icon"> <path fill-rule="evenodd" fill="#000000" d="M88,84v-2c0-2.961-0.859-4-4-4H16c-2.961,0-4,0.98-4,4v2c0,3.102,1.039,4,4,4h68 C87.02,88,88,87.039,88,84z M58,12H42c-5,0-6,0.941-6,6v22H16l34,34l34-34H64V18C64,12.941,62.939,12,58,12z"/></g></svg>',move:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="Layer_1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_11656_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="753" inkscape:window-height="480" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="287" inkscape:window-y="249" inkscape:window-maximized="0" inkscape:current-layer="Layer_1" /><polygon points="33,83 50,100 67,83 54,83 54,17 67,17 50,0 33,17 46,17 46,83 " transform="translate(-7.962963,-10)" /><polygon points="83,67 100,50 83,33 83,46 17,46 17,33 0,50 17,67 17,54 83,54 " transform="translate(-7.962963,-10)" /></svg>',fullscreen:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_2186_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="640" inkscape:window-height="480" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="0" inkscape:current-layer="Layer_1" /><path d="m -7.962963,-10 v 38.889 l 16.667,-16.667 16.667,16.667 5.555,-5.555 -16.667,-16.667 16.667,-16.667 h -38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 92.037037,-10 v 38.889 l -16.667,-16.667 -16.666,16.667 -5.556,-5.555 16.666,-16.667 -16.666,-16.667 h 38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="M -7.962963,90 V 51.111 l 16.667,16.666 16.667,-16.666 5.555,5.556 -16.667,16.666 16.667,16.667 h -38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="M 92.037037,90 V 51.111 l -16.667,16.666 -16.666,-16.666 -5.556,5.556 16.666,16.666 -16.666,16.667 h 38.889 z" inkscape:connector-curvature="0" style="fill:#010101" /></svg>',smallscreen:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="5 -10 74.074074 100" enable-background="new 0 0 100 100" xml:space="preserve" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_2186_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1855" inkscape:window-height="1056" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="2.36" inkscape:cx="44.101509" inkscape:cy="31.481481" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="Layer_1" /><path d="m 30.926037,28.889 0,-38.889 -16.667,16.667 -16.667,-16.667 -5.555,5.555 16.667,16.667 -16.667,16.667 38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 53.148037,28.889 0,-38.889 16.667,16.667 16.666,-16.667 5.556,5.555 -16.666,16.667 16.666,16.667 -38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 30.926037,51.111 0,38.889 -16.667,-16.666 -16.667,16.666 -5.555,-5.556 16.667,-16.666 -16.667,-16.667 38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /><path d="m 53.148037,51.111 0,38.889 16.667,-16.666 16.666,16.666 5.556,-5.556 -16.666,-16.666 16.666,-16.667 -38.889,0 z" inkscape:connector-curvature="0" style="fill:#010101" /></svg>'}},{}],74:[function(e,t){"use strict";var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),r=e("yasgui-utils");console=console||{log:function(){}};var i=t.exports=function(t,s,a){var l={};l.options=n.extend(!0,{},i.defaults,s);l.container=n("<div class='yasr'></div>").appendTo(t);l.header=n("<div class='yasr_header'></div>").appendTo(l.container);l.resultsContainer=n("<div class='yasr_results'></div>").appendTo(l.container);l.storage=r.storage;var u=null;l.getPersistencyId=function(e){null===u&&(u=l.options.persistency&&l.options.persistency.prefix?"string"==typeof l.options.persistency.prefix?l.options.persistency.prefix:l.options.persistency.prefix(l):!1);return u&&e?u+("string"==typeof e?e:e(l)):null};l.options.useGoogleCharts&&e("./gChartLoader.js").once("initError",function(){l.options.useGoogleCharts=!1}).init();l.plugins={};for(var p in i.plugins)(l.options.useGoogleCharts||"gchart"!=p)&&(l.plugins[p]=new i.plugins[p](l));l.updateHeader=function(){var e=l.header.find(".yasr_downloadIcon").removeAttr("title"),t=l.plugins[l.options.output];if(t){var n=t.getDownloadInfo?t.getDownloadInfo():null;if(n){n.buttonTitle&&e.attr("title",n.buttonTitle);e.prop("disabled",!1);e.find("path").each(function(){this.style.fill="black"})}else{e.prop("disabled",!0).prop("title","Download not supported for this result representation");e.find("path").each(function(){this.style.fill="gray"})}}};l.draw=function(e){if(!l.results)return!1;e||(e=l.options.output);var t=null,r=-1,i=[];for(var o in l.plugins)if(l.plugins[o].canHandleResults(l)){var s=l.plugins[o].getPriority;"function"==typeof s&&(s=s(l));if(null!=s&&void 0!=s&&s>r){r=s;t=o}}else i.push(o);c(i);if(e in l.plugins&&l.plugins[e].canHandleResults(l)){n(l.resultsContainer).empty();l.plugins[e].draw();return!0}if(t){n(l.resultsContainer).empty();l.plugins[t].draw();return!0}return!1};var c=function(e){l.header.find(".yasr_btnGroup .yasr_btn").removeClass("disabled");e.forEach(function(e){l.header.find(".yasr_btnGroup .select_"+e).addClass("disabled")})};l.somethingDrawn=function(){return!l.resultsContainer.is(":empty")};l.setResponse=function(t,n,i){try{l.results=e("./parsers/wrapper.js")(t,n,i)}catch(o){l.results={getException:function(){return o}}}l.draw();var s=l.getPersistencyId(l.options.persistency.results.key);s&&(l.results.getOriginalResponseAsString&&l.results.getOriginalResponseAsString().length<l.options.persistency.results.maxSize?r.storage.set(s,l.results.getAsStoreObject(),"month"):r.storage.remove(s))};var d=l.getPersistencyId(l.options.persistency.outputSelector);if(d){var f=r.storage.get(d);f&&(l.options.output=f)}o(l);if(!a&&l.options.persistency&&l.options.persistency.results){var h,g=l.getPersistencyId(l.options.persistency.results.key);g&&(h=r.storage.get(g));if(!h&&l.options.persistency.results.id){var m="string"==typeof l.options.persistency.results.id?l.options.persistency.results.id:l.options.persistency.results.id(l);if(m){h=r.storage.get(m);h&&r.storage.remove(m)}}h&&(n.isArray(h)?l.setResponse.apply(this,h):l.setResponse(h))}a&&l.setResponse(a);l.updateHeader();return l},o=function(t){var i=function(){var e=n('<div class="yasr_btnGroup"></div>');n.each(t.plugins,function(i,o){if(!o.hideFromSelection){var s=o.name||i,a=n("<button class='yasr_btn'></button>").text(s).addClass("select_"+i).click(function(){e.find("button.selected").removeClass("selected");n(this).addClass("selected");t.options.output=i;var o=t.getPersistencyId(t.options.persistency.outputSelector);o&&r.storage.set(o,t.options.output,"month");t.draw();t.updateHeader()}).appendTo(e);t.options.output==i&&a.addClass("selected")}});e.children().length>1&&t.header.append(e)},o=function(){var r=function(e,t){var n=null,r=window.URL||window.webkitURL||window.mozURL||window.msURL;if(r&&Blob){var i=new Blob([e],{type:t});n=r.createObjectURL(i)}return n},i=n("<button class='yasr_btn yasr_downloadIcon btn_icon'></button>").append(e("yasgui-utils").svg.getElement(e("./imgs.js").download)).click(function(){var i=t.plugins[t.options.output];if(i&&i.getDownloadInfo){var o=i.getDownloadInfo(),s=r(o.getContent(),o.contentType?o.contentType:"text/plain"),a=n("<a></a>",{href:s,download:o.filename});e("./utils.js").fireClick(a)}});t.header.append(i)},s=function(){var r=n("<button class='yasr_btn btn_fullscreen btn_icon'></button>").append(e("yasgui-utils").svg.getElement(e("./imgs.js").fullscreen)).click(function(){t.container.addClass("yasr_fullscreen")});t.header.append(r)},a=function(){var r=n("<button class='yasr_btn btn_smallscreen btn_icon'></button>").append(e("yasgui-utils").svg.getElement(e("./imgs.js").smallscreen)).click(function(){t.container.removeClass("yasr_fullscreen")});t.header.append(r)};s();a();t.options.drawOutputSelector&&i();t.options.drawDownloadIcon&&o()};i.plugins={};i.registerOutput=function(e,t){i.plugins[e]=t};i.defaults=e("./defaults.js");i.version={YASR:e("../package.json").version,jquery:n.fn.jquery,"yasgui-utils":e("yasgui-utils").version};i.$=n;try{i.registerOutput("boolean",e("./boolean.js"))}catch(s){}try{i.registerOutput("rawResponse",e("./rawResponse.js"))}catch(s){}try{i.registerOutput("table",e("./table.js"))}catch(s){}try{i.registerOutput("error",e("./error.js"))}catch(s){}try{i.registerOutput("pivot",e("./pivot.js"))}catch(s){}try{i.registerOutput("gchart",e("./gchart.js"))}catch(s){}},{"../package.json":66,"./boolean.js":68,"./defaults.js":69,"./error.js":70,"./gChartLoader.js":71,"./gchart.js":72,"./imgs.js":73,"./parsers/wrapper.js":79,"./pivot.js":81,"./rawResponse.js":82,"./table.js":83,"./utils.js":84,jquery:void 0,"yasgui-utils":63}],75:[function(e,t){"use strict";(function(){try{return e("jquery")}catch(t){return window.jQuery}})(),t.exports=function(t){return e("./dlv.js")(t,",")}},{"./dlv.js":76,jquery:void 0}],76:[function(e,t){"use strict";var n=jQuery=function(){try{return e("jquery")}catch(t){return window.jQuery}}();e("../../lib/jquery.csv-0.71.js");t.exports=function(e,t){var r={},i=n.csv.toArrays(e,{separator:t}),o=function(e){return 0==e.indexOf("http")?"uri":null},s=function(){if(2==i.length&&1==i[0].length&&1==i[1].length&&"boolean"==i[0][0]&&("1"==i[1][0]||"0"==i[1][0])){r.boolean="1"==i[1][0]?!0:!1;return!0}return!1},a=function(){if(i.length>0&&i[0].length>0){r.head={vars:i[0]};return!0}return!1},l=function(){if(i.length>1){r.results={bindings:[]};for(var e=1;e<i.length;e++){for(var t={},n=0;n<i[e].length;n++){var s=r.head.vars[n];if(s){var a=i[e][n],l=o(a);t[s]={value:a};l&&(t[s].type=l)}}r.results.bindings.push(t)}r.head={vars:i[0]};return!0}return!1},u=s();if(!u){var p=a();p&&l()}return r}},{"../../lib/jquery.csv-0.71.js":45,jquery:void 0}],77:[function(e,t){"use strict";(function(){try{return e("jquery")}catch(t){return window.jQuery}})(),t.exports=function(e){if("string"==typeof e)try{return JSON.parse(e)}catch(t){return!1}return"object"==typeof e&&e.constructor==={}.constructor?e:!1}},{jquery:void 0}],78:[function(e,t){"use strict";(function(){try{return e("jquery")}catch(t){return window.jQuery}})(),t.exports=function(t){return e("./dlv.js")(t," ")}},{"./dlv.js":76,jquery:void 0}],79:[function(e,t){"use strict";(function(){try{return e("jquery")}catch(t){return window.jQuery}})(),t.exports=function(t,n,r){var i={xml:e("./xml.js"),json:e("./json.js"),tsv:e("./tsv.js"),csv:e("./csv.js")},o=null,s=null,a=null,l=null,u=null,p=function(){if("object"==typeof t){if(t.exception)u=t.exception;else if(void 0!=t.status&&(t.status>=300||0===t.status)){u={status:t.status};"string"==typeof r&&(u.errorString=r);t.responseText&&(u.responseText=t.responseText);t.statusText&&(u.statusText=t.statusText)}if(t.contentType)o=t.contentType.toLowerCase();else if(t.getResponseHeader&&t.getResponseHeader("content-type")){var e=t.getResponseHeader("content-type").trim().toLowerCase();e.length>0&&(o=e)}t.response?s=t.response:n||r||(s=t)}u||s||(s=t.responseText?t.responseText:t)},c=function(){if(a)return a;if(a===!1||u)return!1;var e=function(){if(o)if(o.indexOf("json")>-1){try{a=i.json(s)}catch(e){u=e}l="json"}else if(o.indexOf("xml")>-1){try{a=i.xml(s)}catch(e){u=e}l="xml"}else if(o.indexOf("csv")>-1){try{a=i.csv(s)}catch(e){u=e}l="csv"}else if(o.indexOf("tab-separated")>-1){try{a=i.tsv(s)}catch(e){u=e}l="tsv"}},t=function(){a=i.json(s);if(a)l="json";else try{a=i.xml(s); a&&(l="xml")}catch(e){}};e();a||t();a||(a=!1);return a},d=function(){var e=c();return e&&"head"in e?e.head.vars:null},f=function(){var e=c();return e&&"results"in e?e.results.bindings:null},h=function(){var e=c();return e&&"boolean"in e?e.boolean:null},g=function(){return s},m=function(){var e="";"string"==typeof s?e=s:"json"==l?e=JSON.stringify(s,void 0,2):"xml"==l&&(e=(new XMLSerializer).serializeToString(s));return e},E=function(){return u},v=function(){null==l&&c();return l},x=function(){var e={};if(t.status){e.status=t.status;e.responseText=t.responseText;e.statusText=t.statusText;e.contentType=o}else e=t;var i=n,s=void 0;"string"==typeof r&&(s=r);return[e,i,s]};p();a=c();return{getAsStoreObject:x,getAsJson:c,getOriginalResponse:g,getOriginalResponseAsString:m,getOriginalContentType:function(){return o},getVariables:d,getBindings:f,getBoolean:h,getType:v,getException:E}}},{"./csv.js":75,"./json.js":77,"./tsv.js":78,"./xml.js":80,jquery:void 0}],80:[function(e,t){"use strict";{var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}();t.exports=function(e){var t=function(e){s.head={};for(var t=0;t<e.childNodes.length;t++){var n=e.childNodes[t];if("variable"==n.nodeName){s.head.vars||(s.head.vars=[]);var r=n.getAttribute("name");r&&s.head.vars.push(r)}}},r=function(e){s.results={};s.results.bindings=[];for(var t=0;t<e.childNodes.length;t++){for(var n=e.childNodes[t],r=null,i=0;i<n.childNodes.length;i++){var o=n.childNodes[i];if("binding"==o.nodeName){var a=o.getAttribute("name");if(a){r=r||{};r[a]={};for(var l=0;l<o.childNodes.length;l++){var u=o.childNodes[l],p=u.nodeName;if("#text"!=p){r[a].type=p;r[a].value=u.innerHTML;var c=u.getAttribute("datatype");c&&(r[a].datatype=c)}}}}}r&&s.results.bindings.push(r)}},i=function(e){s.boolean="true"==e.innerHTML?!0:!1},o=null;"string"==typeof e?o=n.parseXML(e):n.isXMLDoc(e)&&(o=e);var e=null;if(!(o.childNodes.length>0))return null;e=o.childNodes[0];for(var s={},a=0;a<e.childNodes.length;a++){var l=e.childNodes[a];"head"==l.nodeName&&t(l);"results"==l.nodeName&&r(l);"boolean"==l.nodeName&&i(l)}return s}}},{jquery:void 0}],81:[function(e,t){"use strict";var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),r=e("./utils.js"),i=e("yasgui-utils"),o=e("./imgs.js");(function(){try{return e("jquery-ui/sortable")}catch(t){return window.jQuery}})();(function(){try{return e("pivottable")}catch(t){return window.jQuery}})();if(!n.fn.pivotUI)throw new Error("Pivot lib not loaded");var s=t.exports=function(t){var a=n.extend(!0,{},s.defaults);if(a.useD3Chart){try{var l=function(){try{return e("d3")}catch(t){return window.d3}}();l&&e("../node_modules/pivottable/dist/d3_renderers.js")}catch(u){}n.pivotUtilities.d3_renderers&&n.extend(!0,n.pivotUtilities.renderers,n.pivotUtilities.d3_renderers)}var p,c=null,d=function(){var e=t.results.getVariables();if(!a.mergeLabelsWithUris)return e;var n=[];c="string"==typeof a.mergeLabelsWithUris?a.mergeLabelsWithUris:"Label";e.forEach(function(t){-1!==t.indexOf(c,t.length-c.length)&&e.indexOf(t.substring(0,t.length-c.length))>=0||n.push(t)});return n},f=function(e){var n=d(),i=null;t.options.getUsedPrefixes&&(i="function"==typeof t.options.getUsedPrefixes?t.options.getUsedPrefixes(t):t.options.getUsedPrefixes);t.results.getBindings().forEach(function(t){var o={};n.forEach(function(e){if(e in t){var n=t[e].value;c&&t[e+c]?n=t[e+c].value:"uri"==t[e].type&&(n=r.uriToPrefixed(i,n));o[e]=n}else o[e]=null});e(o)})},h=t.getPersistencyId(a.persistencyId),g=function(){var e=i.storage.get(h);if(e){var r=t.results.getVariables(),o=!0;e.cols.forEach(function(e){r.indexOf(e)<0&&(o=!1)});o&&e.rows.forEach(function(e){r.indexOf(e)<0&&(o=!1)});if(!o){e.cols=[];e.rows=[]}n.pivotUtilities.renderers[e.rendererName]||delete e.rendererName}else e={};return e},m=function(){var r=function(){var e=function(e){if(h){var n={cols:e.cols,rows:e.rows,rendererName:e.rendererName,aggregatorName:e.aggregatorName,vals:e.vals};i.storage.set(h,n,"month")}e.rendererName.toLowerCase().indexOf(" chart")>=0?r.show():r.hide();t.updateHeader()},r=n("<button>",{"class":"openPivotGchart yasr_btn"}).text("Chart Config").click(function(){p.find('div[dir="ltr"]').dblclick()}).appendTo(t.resultsContainer);p=n("<div>",{"class":"pivotTable"}).appendTo(n(t.resultsContainer));var a=n.extend(!0,{},g(),s.defaults.pivotTable);a.onRefresh=function(){var t=a.onRefresh;return function(n){e(n);t&&t(n)}}();window.pivot=p.pivotUI(f,a);var l=n(i.svg.getElement(o.move));p.find(".pvtTriangle").replaceWith(l);n(".pvtCols").prepend(n("<div>",{"class":"containerHeader"}).text("Columns"));n(".pvtRows").prepend(n("<div>",{"class":"containerHeader"}).text("Rows"));n(".pvtUnused").prepend(n("<div>",{"class":"containerHeader"}).text("Available Variables"));n(".pvtVals").prepend(n("<div>",{"class":"containerHeader"}).text("Cells"));setTimeout(t.updateHeader,400)};t.options.useGoogleCharts&&a.useGoogleCharts&&!n.pivotUtilities.gchart_renderers?e("./gChartLoader.js").on("done",function(){try{e("../node_modules/pivottable/dist/gchart_renderers.js");n.extend(!0,n.pivotUtilities.renderers,n.pivotUtilities.gchart_renderers)}catch(t){a.useGoogleCharts=!1}r()}).on("error",function(){console.log("could not load gchart");a.useGoogleCharts=!1;r()}).googleLoad():r()},E=function(){return t.results&&t.results.getVariables&&t.results.getVariables()&&t.results.getVariables().length>0},v=function(){if(!t.results)return null;var e=t.resultsContainer.find(".pvtRendererArea svg");return 0==e.length?null:{getContent:function(){return e[0].outerHTML},filename:"queryResults.svg",contentType:"image/svg+xml",buttonTitle:"Download SVG Image"}};return{getDownloadInfo:v,options:a,draw:m,name:"Pivot Table",canHandleResults:E,getPriority:4}};s.defaults={mergeLabelsWithUris:!1,useGoogleCharts:!0,useD3Chart:!0,persistencyId:"pivot",pivotTable:{}};s.version={"YASR-rawResponse":e("../package.json").version,jquery:n.fn.jquery}},{"../node_modules/pivottable/dist/d3_renderers.js":58,"../node_modules/pivottable/dist/gchart_renderers.js":59,"../package.json":66,"./gChartLoader.js":71,"./imgs.js":73,"./utils.js":84,d3:53,jquery:void 0,"jquery-ui/sortable":56,pivottable:60,"yasgui-utils":63}],82:[function(e,t){"use strict";var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),r=function(){try{return e("codemirror")}catch(t){return window.CodeMirror}}();e("codemirror/addon/fold/foldcode.js");e("codemirror/addon/fold/foldgutter.js");e("codemirror/addon/fold/xml-fold.js");e("codemirror/addon/fold/brace-fold.js");e("codemirror/addon/edit/matchbrackets.js");e("codemirror/mode/xml/xml.js");e("codemirror/mode/javascript/javascript.js");var i=t.exports=function(e){var t=n.extend(!0,{},i.defaults),o=null,s=function(){var n=t.CodeMirror;n.value=e.results.getOriginalResponseAsString();var i=e.results.getType();if(i){"json"==i&&(i={name:"javascript",json:!0});n.mode=i}o=r(e.resultsContainer.get()[0],n);o.on("fold",function(){o.refresh()});o.on("unfold",function(){o.refresh()})},a=function(){if(!e.results)return!1;if(!e.results.getOriginalResponseAsString)return!1;var t=e.results.getOriginalResponseAsString();return t&&0!=t.length||!e.results.getException()?!0:!1},l=function(){if(!e.results)return null;var t=e.results.getOriginalContentType(),n=e.results.getType();return{getContent:function(){return e.results.getOriginalResponse()},filename:"queryResults"+(n?"."+n:""),contentType:t?t:"text/plain",buttonTitle:"Download raw response"}};return{draw:s,name:"Raw Response",canHandleResults:a,getPriority:2,getDownloadInfo:l}};i.defaults={CodeMirror:{readOnly:!0,lineNumbers:!0,lineWrapping:!0,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"]}};i.version={"YASR-rawResponse":e("../package.json").version,jquery:n.fn.jquery,CodeMirror:r.version}},{"../package.json":66,codemirror:void 0,"codemirror/addon/edit/matchbrackets.js":46,"codemirror/addon/fold/brace-fold.js":47,"codemirror/addon/fold/foldcode.js":48,"codemirror/addon/fold/foldgutter.js":49,"codemirror/addon/fold/xml-fold.js":50,"codemirror/mode/javascript/javascript.js":51,"codemirror/mode/xml/xml.js":52,jquery:void 0}],83:[function(e,t){"use strict";var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),r=e("yasgui-utils"),i=e("./imgs.js");(function(){try{return e("datatables")}catch(t){return window.jQuery}})();e("../lib/colResizable-1.4.js");var o=t.exports=function(t){var s=null,a={name:"Table",getPriority:10},u=a.options=n.extend(!0,{},o.defaults),p=u.persistency?t.getPersistencyId(u.persistency.tableLength):null,c=function(){var e=[],n=t.results.getBindings(),r=t.results.getVariables(),i=null;t.options.getUsedPrefixes&&(i="function"==typeof t.options.getUsedPrefixes?t.options.getUsedPrefixes(t):t.options.getUsedPrefixes);for(var o=0;o<n.length;o++){var s=[];s.push("");for(var l=n[o],p=0;p<r.length;p++){var c=r[p];s.push(c in l?u.getCellContent?u.getCellContent(t,a,l,c,{rowId:o,colId:p,usedPrefixes:i}):"":"")}e.push(s)}return e},d=function(){s.on("order.dt",function(){f()});p&&s.on("length.dt",function(e,t,n){r.storage.set(p,n,"month")});n.extend(!0,u.callbacks,u.handlers);s.delegate("td","click",function(e){if(u.callbacks&&u.callbacks.onCellClick){var t=u.callbacks.onCellClick(this,e);if(t===!1)return!1}}).delegate("td","mouseenter",function(e){u.callbacks&&u.callbacks.onCellMouseEnter&&u.callbacks.onCellMouseEnter(this,e);var t=n(this);u.fetchTitlesFromPreflabel&&void 0===t.attr("title")&&0==t.text().trim().indexOf("http")&&l(t)}).delegate("td","mouseleave",function(e){u.callbacks&&u.callbacks.onCellMouseLeave&&u.callbacks.onCellMouseLeave(this,e)})};a.draw=function(){s=n('<table cellpadding="0" cellspacing="0" border="0" class="resultsTable"></table>');n(t.resultsContainer).html(s);var e=u.datatable;e.data=c();e.columns=u.getColumns(t,a);var i=r.storage.get(p);i&&(e.pageLength=i);s.DataTable(n.extend(!0,{},e));f();d();s.colResizable();s.find("thead").outerHeight();n(t.resultsContainer).find(".JCLRgrip").height(s.find("thead").outerHeight());var o=t.header.outerHeight()-5;if(o>0){t.resultsContainer.find(".dataTables_wrapper").css("position","relative").css("top","-"+o+"px").css("margin-bottom","-"+o+"px");n(t.resultsContainer).find(".JCLRgrip").css("marginTop",o+"px")}};var f=function(){var e={sorting:"unsorted",sorting_asc:"sortAsc",sorting_desc:"sortDesc"};s.find(".sortIcons").remove();for(var t in e){var o=n("<div class='sortIcons'></div>");r.svg.draw(o,i[e[t]]);s.find("th."+t).append(o)}};a.canHandleResults=function(){return t.results&&t.results.getVariables&&t.results.getVariables()&&t.results.getVariables().length>0};a.getDownloadInfo=function(){return t.results?{getContent:function(){return e("./bindingsToCsv.js")(t.results.getAsJson())},filename:"queryResults.csv",contentType:"text/csv",buttonTitle:"Download as CSV"}:null};return a},s=function(e,t,n){var r=n.value;if(n["xml:lang"])r='"'+n.value+'"@'+n["xml:lang"];else if(n.datatype){var i="http://www.w3.org/2001/XMLSchema#",o=n.datatype;o=0==o.indexOf(i)?"xsd:"+o.substring(i.length):"<"+o+">";r='"'+r+'"^^'+o}return r},a=function(e,t,n,r,i){var o=n[r],a=null;if("uri"==o.type){var l=null,u=o.value,p=u;if(i.usedPrefixes)for(var c in i.usedPrefixes)if(0==p.indexOf(i.usedPrefixes[c])){p=c+":"+u.substring(i.usedPrefixes[c].length);break}if(t.options.mergeLabelsWithUris){var d="string"==typeof t.options.mergeLabelsWithUris?t.options.mergeLabelsWithUris:"Label";if(n[r+d]){p=s(e,t,n[r+d]);l=u}}a="<a "+(l?"title='"+u+"' ":"")+"class='uri' target='_blank' href='"+u+"'>"+p+"</a>"}else a="<span class='nonUri'>"+s(e,t,o)+"</span>";return"<div>"+a+"</div>"},l=function(e){var t=function(){e.attr("title","")};n.get("http://preflabel.org/api/v1/label/"+encodeURIComponent(e.text())+"?silent=true").success(function(n){"object"==typeof n&&n.label?e.attr("title",n.label):"string"==typeof n&&n.length>0?e.attr("title",n):t()}).fail(t)};o.defaults={getCellContent:a,persistency:{tableLength:"tableLength"},getColumns:function(e,t){var n=function(n){if(!t.options.mergeLabelsWithUris)return!0;var r="string"==typeof t.options.mergeLabelsWithUris?t.options.mergeLabelsWithUris:"Label";return-1!==n.indexOf(r,n.length-r.length)&&e.results.getVariables().indexOf(n.substring(0,n.length-r.length))>=0?!1:!0},r=[];r.push({title:""});e.results.getVariables().forEach(function(e){r.push({title:"<span>"+e+"</span>",visible:n(e)})});return r},fetchTitlesFromPreflabel:!0,mergeLabelsWithUris:!1,callbacks:{onCellMouseEnter:null,onCellMouseLeave:null,onCellClick:null},datatable:{autoWidth:!1,order:[],pageLength:50,lengthMenu:[[10,50,100,1e3,-1],[10,50,100,1e3,"All"]],lengthChange:!0,pagingType:"full_numbers",drawCallback:function(e){for(var t=0;t<e.aiDisplay.length;t++)n("td:eq(0)",e.aoData[e.aiDisplay[t]].nTr).html(t+1);var r=!1;n(e.nTableWrapper).find(".paginate_button").each(function(){-1==n(this).attr("class").indexOf("current")&&-1==n(this).attr("class").indexOf("disabled")&&(r=!0)});r?n(e.nTableWrapper).find(".dataTables_paginate").show():n(e.nTableWrapper).find(".dataTables_paginate").hide()},columnDefs:[{width:"32px",orderable:!1,targets:0}]}};o.version={"YASR-table":e("../package.json").version,jquery:n.fn.jquery,"jquery-datatables":n.fn.DataTable.version}},{"../lib/colResizable-1.4.js":44,"../package.json":66,"./bindingsToCsv.js":67,"./imgs.js":73,datatables:void 0,jquery:void 0,"yasgui-utils":63}],84:[function(e,t){"use strict";var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}();t.exports={uriToPrefixed:function(e,t){if(e)for(var n in e)if(0==t.indexOf(e[n])){t=n+":"+t.substring(e[n].length);break}return t},getGoogleType:function(e){if(null==e.type||"typed-literal"!==e.type&&"literal"!==e.type)return"string";switch(e.datatype){case"http://www.w3.org/2001/XMLSchema#float":case"http://www.w3.org/2001/XMLSchema#decimal":case"http://www.w3.org/2001/XMLSchema#int":case"http://www.w3.org/2001/XMLSchema#integer":case"http://www.w3.org/2001/XMLSchema#long":case"http://www.w3.org/2001/XMLSchema#gYearMonth":case"http://www.w3.org/2001/XMLSchema#gYear":case"http://www.w3.org/2001/XMLSchema#gMonthDay":case"http://www.w3.org/2001/XMLSchema#gDay":case"http://www.w3.org/2001/XMLSchema#gMonth":return"number";case"http://www.w3.org/2001/XMLSchema#date":return"date";case"http://www.w3.org/2001/XMLSchema#dateTime":return"datetime";case"http://www.w3.org/2001/XMLSchema#time":return"timeofday";default:return"string"}},castGoogleType:function(e,n){if(null==e)return null;if(null==e.type||"typed-literal"!==e.type&&"literal"!==e.type)return(e.type="uri")?t.exports.uriToPrefixed(n,e.value):e.value;switch(e.datatype){case"http://www.w3.org/2001/XMLSchema#float":case"http://www.w3.org/2001/XMLSchema#decimal":case"http://www.w3.org/2001/XMLSchema#int":case"http://www.w3.org/2001/XMLSchema#integer":case"http://www.w3.org/2001/XMLSchema#long":case"http://www.w3.org/2001/XMLSchema#gYearMonth":case"http://www.w3.org/2001/XMLSchema#gYear":case"http://www.w3.org/2001/XMLSchema#gMonthDay":case"http://www.w3.org/2001/XMLSchema#gDay":case"http://www.w3.org/2001/XMLSchema#gMonth":return Number(e.value);case"http://www.w3.org/2001/XMLSchema#date":case"http://www.w3.org/2001/XMLSchema#dateTime":case"http://www.w3.org/2001/XMLSchema#time":return new Date(e.value);default:return e.value}},fireClick:function(e){e&&e.each(function(e,t){var r=n(t);if(document.dispatchEvent){var i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!0,window,1,1,1,1,1,!1,!1,!1,!1,0,r[0]);r[0].dispatchEvent(i)}else document.fireEvent&&r[0].click()})}}},{jquery:void 0}],85:[function(e,t){"use strict";var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}();t.exports={persistencyPrefix:function(e){return"yasgui_"+n(e.wrapperElement).closest("[id]").attr("id")+"_"}}},{jquery:void 0}],86:[function(e,t){"use strict";t.exports={persistent:null,consumeShareLink:null,createShareLink:null,sparql:{showQueryButton:!0,acceptHeaderGraph:"text/turtle",acceptHeaderSelect:"application/sparql-results+json"}}},{}],87:[function(e,t){"use strict";t.exports={yasgui:'<svg xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" viewBox="0 0 603.99 522.51" width="100%" height="100%" id="svg2" version="1.1" inkscape:version="0.48.4 r9939" sodipodi:docname="yasgui (copy).svg"> <defs id="defs4"> <linearGradient id="linearGradient5249" osb:paint="solid"> <stop style="stop-color:#3b3b3b;stop-opacity:1;" offset="0" id="stop5251" /> </linearGradient> <inkscape:path-effect effect="skeletal" id="path-effect2997" is_visible="true" pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 z" copytype="single_stretched" prop_scale="1" scale_y_rel="false" spacing="0" normal_offset="0" tang_offset="0" prop_units="false" vertical_pattern="false" fuse_tolerance="0" /> <inkscape:path-effect effect="spiro" id="path-effect2995" is_visible="true" /> <inkscape:path-effect effect="skeletal" id="path-effect2991" is_visible="true" pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 z" copytype="single_stretched" prop_scale="1" scale_y_rel="false" spacing="0" normal_offset="0" tang_offset="0" prop_units="false" vertical_pattern="false" fuse_tolerance="0" /> <inkscape:path-effect effect="spiro" id="path-effect2989" is_visible="true" /> </defs> <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.35" inkscape:cx="-469.55507" inkscape:cy="840.5292" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" inkscape:window-width="1855" inkscape:window-height="1056" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" /> <metadata id="metadata7"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <dc:title /> </cc:Work> </rdf:RDF> </metadata> <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" transform="translate(-50.966817,-280.33262)"> <rect style="fill:#3b3b3b;fill-opacity:1;stroke:none" id="rect5293-6-8" width="40.000004" height="478.57324" x="-374.48849" y="103.99496" transform="matrix(-2.679181e-4,-0.99999996,0.99999993,-3.6684387e-4,0,0)" /> <rect style="fill:#3b3b3b;fill-opacity:1;stroke:none" id="rect5293-5-7" width="40.000004" height="560" x="651.37634" y="-132.06581" transform="matrix(0.74639582,0.66550228,-0.66550228,0.74639582,0,0)" /> <path sodipodi:type="arc" style="fill:#ffffff;fill-opacity:1;stroke:#3b3b3b;stroke-width:61.04665375;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" id="path3781-9-0-7-1-9-7" sodipodi:cx="455.71429" sodipodi:cy="513.79077" sodipodi:rx="144.28572" sodipodi:ry="161.42857" d="m 600.00002,513.79077 c 0,89.15454 -64.59892,161.42858 -144.28573,161.42858 -79.6868,0 -144.28572,-72.27404 -144.28572,-161.42858 0,-89.15454 64.59892,-161.42857 144.28572,-161.42857 79.68681,0 144.28573,72.27403 144.28573,161.42857 z" transform="matrix(0.28877887,0,0,0.25811209,92.132758,620.67568)" /> <path sodipodi:type="arc" style="fill:#ffffff;fill-opacity:1;stroke:#3b3b3b;stroke-width:61.04665375;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" id="path3781-9-0-7-1-3-0" sodipodi:cx="455.71429" sodipodi:cy="513.79077" sodipodi:rx="144.28572" sodipodi:ry="161.42857" d="m 600.00002,513.79077 c 0,89.15454 -64.59892,161.42858 -144.28573,161.42858 -79.6868,0 -144.28572,-72.27404 -144.28572,-161.42858 0,-89.15454 64.59892,-161.42857 144.28572,-161.42857 79.68681,0 144.28573,72.27403 144.28573,161.42857 z" transform="matrix(0.28877887,0,0,0.25811209,457.84706,214.96137)" /> <path sodipodi:type="arc" style="fill:#ffffff;fill-opacity:1;stroke:#3b3b3b;stroke-width:61.04665375;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" id="path3781-9-0-7-1-1-2" sodipodi:cx="455.71429" sodipodi:cy="513.79077" sodipodi:rx="144.28572" sodipodi:ry="161.42857" d="m 600.00002,513.79077 c 0,89.15454 -64.59892,161.42858 -144.28573,161.42858 -79.6868,0 -144.28572,-72.27404 -144.28572,-161.42858 0,-89.15454 64.59892,-161.42857 144.28572,-161.42857 79.68681,0 144.28573,72.27403 144.28573,161.42857 z" transform="matrix(0.28877887,0,0,0.25811209,-30.152972,219.81853)" /> <text xml:space="preserve" style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#3b3b3b;fill-opacity:1;stroke:none;font-family:Sans" x="-387.96655" y="630.61871" id="text5479-9-0-6-4" sodipodi:linespacing="125%" transform="matrix(0.68747304,-0.7262099,0.7262099,0.68747304,0,0)" inkscape:transform-center-x="239.86342" inkscape:transform-center-y="-26.958107"><tspan sodipodi:role="line" id="tspan5481-8-8-9-7" x="-387.96655" y="630.61871" style="font-size:200px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;letter-spacing:20px;fill:#3b3b3b;fill-opacity:1;font-family:RR Beaver;-inkscape-font-specification:RR Beaver">YAS</tspan></text> <text xml:space="preserve" style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Theorem NBP;-inkscape-font-specification:Theorem NBP" x="349.24683" y="750.29126" id="text5483-4-3-2" sodipodi:linespacing="125%"><tspan sodipodi:role="line" id="tspan5485-6-5-7" x="349.24683" y="750.29126" style="font-size:170px;font-style:italic;font-variant:normal;font-weight:bold;font-stretch:normal;letter-spacing:20px;fill:#c80000;fill-opacity:1;font-family:RR Beaver;-inkscape-font-specification:RR Beaver Bold Italic">GUI</tspan></text> <path sodipodi:type="arc" style="fill:#ffffff;fill-opacity:1;stroke:#3b3b3b;stroke-width:61.04665375;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" id="path3781-9-7-4-1-4" sodipodi:cx="455.71429" sodipodi:cy="513.79077" sodipodi:rx="144.28572" sodipodi:ry="161.42857" d="m 600.00002,513.79077 c 0,89.15454 -64.59892,161.42858 -144.28573,161.42858 -79.6868,0 -144.28572,-72.27404 -144.28572,-161.42858 0,-89.15454 64.59892,-161.42857 144.28572,-161.42857 79.68681,0 144.28573,72.27403 144.28573,161.42857 z" transform="matrix(0.4331683,0,0,0.38716814,381.83246,155.72497)" /> </g></svg>',cross:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="100%" height="100%" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"><g> <path d="M83.288,88.13c-2.114,2.112-5.575,2.112-7.689,0L53.659,66.188c-2.114-2.112-5.573-2.112-7.687,0L24.251,87.907 c-2.113,2.114-5.571,2.114-7.686,0l-4.693-4.691c-2.114-2.114-2.114-5.573,0-7.688l21.719-21.721c2.113-2.114,2.113-5.573,0-7.686 L11.872,24.4c-2.114-2.113-2.114-5.571,0-7.686l4.842-4.842c2.113-2.114,5.571-2.114,7.686,0L46.12,33.591 c2.114,2.114,5.572,2.114,7.688,0l21.721-21.719c2.114-2.114,5.573-2.114,7.687,0l4.695,4.695c2.111,2.113,2.111,5.571-0.003,7.686 L66.188,45.973c-2.112,2.114-2.112,5.573,0,7.686L88.13,75.602c2.112,2.111,2.112,5.572,0,7.687L83.288,88.13z"/></g></svg>',plus:'<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" viewBox="5 -10 59.259258 79.999999" enable-background="new 0 0 100 100" xml:space="preserve" height="100%" width="100%" inkscape:version="0.48.4 r9939" sodipodi:docname="noun_79066_cc.svg"><metadata ><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs /><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1855" inkscape:window-height="1056" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="6.675088" inkscape:cx="46.670641" inkscape:cy="16.037704" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="Your_Icon" /><g transform="translate(-23.47037,-20)"><g ><g ><g /></g><g /></g></g><path d="M 67.12963,22.5 H 42.129629 v -25 c 0,-4.142 -3.357,-7.5 -7.5,-7.5 -4.141999,0 -7.5,3.358 -7.5,7.5 v 25 H 2.1296295 c -4.142,0 -7.5,3.358 -7.5,7.5 0,4.143 3.358,7.5 7.5,7.5 H 27.129629 v 25 c 0,4.143 3.358001,7.5 7.5,7.5 4.143,0 7.5,-3.357 7.5,-7.5 v -25 H 67.12963 c 4.143,0 7.5,-3.357 7.5,-7.5 0,-4.142 -3.357,-7.5 -7.5,-7.5 z" inkscape:connector-curvature="0" style="fill:#000000" /></svg>'}},{}],88:[function(e){"use strict";var t=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),n=(e("selectize"),e("yasgui-utils"));t.fn.endpointCombi=function(e,i){var o=function(t){var r=null;e.persistencyPrefix&&(r=e.persistencyPrefix+"endpoint_"+t);var i=[];for(var o in a[0].selectize.options){var s=a[0].selectize.options[o];if(s.optgroup==t){var l={endpoint:s.endpoint};s.text&&(l.label=s.text);i.push(l)}}n.storage.set(r,i)},s=function(t,i){var o=null;e.persistencyPrefix&&(o=e.persistencyPrefix+"endpoint_"+i);var s=n.storage.get(o);if(!s&&"catalogue"==i){s=r();n.storage.set(o,s)}t(s,i)},a=this;test=this;var l={selectize:{create:function(e,t){t({endpoint:e,optgroup:"own"})},createOnBlur:!0,onItemAdd:function(e){i.onChange&&i.onChange(e)},onOptionRemove:function(){o("own");o("catalogue")},optgroups:[{value:"own",label:"History"},{value:"catalogue",label:"Catalogue"}],optgroupOrder:["own","catalogue"],sortField:"endpoint",valueField:"endpoint",labelField:"endpoint",searchField:["endpoint","text"],render:{option:function(e,t){var n='<a href="javascript:void(0)" class="close pull-right" tabindex="-1" title="Remove from '+("own"==e.optgroup?"history":"catalogue")+'">&times;</a>',r='<div class="endpointUrl">'+t(e.endpoint)+"</div>",i="";e.text&&(i='<div class="endpointTitle">'+t(e.text)+"</div>");return'<div class="endpointOptionRow">'+n+r+i+"</div>"}}}};i=i?t.extend(!0,{},l,i):l;this.addClass("endpointText form-control");this.selectize(i.selectize);a[0].selectize.$dropdown.off("mousedown","[data-selectable]");a[0].selectize.$dropdown.on("mousedown","[data-selectable]",function(e){var n,r,i=a[0].selectize;if(e.preventDefault){e.preventDefault();e.stopPropagation()}r=t(e.currentTarget);if(t(e.target).hasClass("close")){a[0].selectize.removeOption(r.attr("data-value"));a[0].selectize.refreshOptions()}else if(r.hasClass("create"))i.createItem();else{n=r.attr("data-value");if("undefined"!=typeof n){i.lastQuery=null;i.setTextboxValue("");i.addItem(n);!i.settings.hideSelected&&e.type&&/mouse/.test(e.type)&&i.setActiveOption(i.getOption(n))}}});var u=function(e,t){t.optgroup&&o(t.optgroup)},p=function(e,t){if(e){a[0].selectize.off("option_add",u);e.forEach(function(e){a[0].selectize.addOption({endpoint:e.endpoint,text:e.title,optgroup:t})});a[0].selectize.on("option_add",u)}};s(p,"catalogue");s(p,"own");if(i.value){i.value in a[0].selectize.options||a[0].selectize.addOption({endpoint:i.value,optgroup:"own"});a[0].selectize.addItem(i.value)}return this};var r=function(){var e=[{endpoint:"http%3A%2F%2Fvisualdataweb.infor.uva.es%2Fsparql"},{endpoint:"http%3A%2F%2Fbiolit.rkbexplorer.com%2Fsparql",title:"A Short Biographical Dictionary of English Literature (RKBExplorer)"},{endpoint:"http%3A%2F%2Faemet.linkeddata.es%2Fsparql",title:"AEMET metereological dataset"},{endpoint:"http%3A%2F%2Fsparql.jesandco.org%3A8890%2Fsparql",title:"ASN:US"},{endpoint:"http%3A%2F%2Fdata.allie.dbcls.jp%2Fsparql",title:"Allie Abbreviation And Long Form Database in Life Science"},{endpoint:"http%3A%2F%2Fvocabulary.semantic-web.at%2FPoolParty%2Fsparql%2FAustrianSkiTeam",title:"Alpine Ski Racers of Austria"},{endpoint:"http%3A%2F%2Fsemanticweb.cs.vu.nl%2Feuropeana%2Fsparql%2F",title:"Amsterdam Museum as Linked Open Data in the Europeana Data Model"},{endpoint:"http%3A%2F%2Fopendata.aragon.es%2Fsparql",title:"AragoDBPedia"},{endpoint:"http%3A%2F%2Fdata.archiveshub.ac.uk%2Fsparql",title:"Archives Hub Linked Data"},{endpoint:"http%3A%2F%2Fwww.auth.gr%2Fsparql",title:"Aristotle University"},{endpoint:"http%3A%2F%2Facm.rkbexplorer.com%2Fsparql%2F",title:"Association for Computing Machinery (ACM) (RKBExplorer)"},{endpoint:"http%3A%2F%2Fabs.270a.info%2Fsparql",title:"Australian Bureau of Statistics (ABS) Linked Data"},{endpoint:"http%3A%2F%2Flab.environment.data.gov.au%2Fsparql",title:"Australian Climate Observations Reference Network - Surface Air Temperature Dataset"},{endpoint:"http%3A%2F%2Flod.b3kat.de%2Fsparql",title:"B3Kat - Library Union Catalogues of Bavaria, Berlin and Brandenburg"},{endpoint:"http%3A%2F%2Fdati.camera.it%2Fsparql"},{endpoint:"http%3A%2F%2Fbis.270a.info%2Fsparql",title:"Bank for International Settlements (BIS) Linked Data"},{endpoint:"http%3A%2F%2Fwww.open-biomed.org.uk%2Fsparql%2Fendpoint%2Fbdgp_20081030",title:"Bdgp"},{endpoint:"http%3A%2F%2Faffymetrix.bio2rdf.org%2Fsparql",title:"Bio2RDF::Affymetrix"},{endpoint:"http%3A%2F%2Fbiomodels.bio2rdf.org%2Fsparql",title:"Bio2RDF::Biomodels"},{endpoint:"http%3A%2F%2Fbioportal.bio2rdf.org%2Fsparql",title:"Bio2RDF::Bioportal"},{endpoint:"http%3A%2F%2Fclinicaltrials.bio2rdf.org%2Fsparql",title:"Bio2RDF::Clinicaltrials"},{endpoint:"http%3A%2F%2Fctd.bio2rdf.org%2Fsparql",title:"Bio2RDF::Ctd"},{endpoint:"http%3A%2F%2Fdbsnp.bio2rdf.org%2Fsparql",title:"Bio2RDF::Dbsnp"},{endpoint:"http%3A%2F%2Fdrugbank.bio2rdf.org%2Fsparql",title:"Bio2RDF::Drugbank"},{endpoint:"http%3A%2F%2Fgenage.bio2rdf.org%2Fsparql",title:"Bio2RDF::Genage"},{endpoint:"http%3A%2F%2Fgendr.bio2rdf.org%2Fsparql",title:"Bio2RDF::Gendr"},{endpoint:"http%3A%2F%2Fgoa.bio2rdf.org%2Fsparql",title:"Bio2RDF::Goa"},{endpoint:"http%3A%2F%2Fhgnc.bio2rdf.org%2Fsparql",title:"Bio2RDF::Hgnc"},{endpoint:"http%3A%2F%2Fhomologene.bio2rdf.org%2Fsparql",title:"Bio2RDF::Homologene"},{endpoint:"http%3A%2F%2Finoh.bio2rdf.org%2Fsparql",title:"Bio2RDF::INOH"},{endpoint:"http%3A%2F%2Finterpro.bio2rdf.org%2Fsparql",title:"Bio2RDF::Interpro"},{endpoint:"http%3A%2F%2Fiproclass.bio2rdf.org%2Fsparql",title:"Bio2RDF::Iproclass"},{endpoint:"http%3A%2F%2Firefindex.bio2rdf.org%2Fsparql",title:"Bio2RDF::Irefindex"},{endpoint:"http%3A%2F%2Fbiopax.kegg.bio2rdf.org%2Fsparql",title:"Bio2RDF::KEGG::BioPAX"},{endpoint:"http%3A%2F%2Flinkedspl.bio2rdf.org%2Fsparql",title:"Bio2RDF::Linkedspl"},{endpoint:"http%3A%2F%2Flsr.bio2rdf.org%2Fsparql",title:"Bio2RDF::Lsr"},{endpoint:"http%3A%2F%2Fmesh.bio2rdf.org%2Fsparql",title:"Bio2RDF::Mesh"},{endpoint:"http%3A%2F%2Fmgi.bio2rdf.org%2Fsparql",title:"Bio2RDF::Mgi"},{endpoint:"http%3A%2F%2Fncbigene.bio2rdf.org%2Fsparql",title:"Bio2RDF::Ncbigene"},{endpoint:"http%3A%2F%2Fndc.bio2rdf.org%2Fsparql",title:"Bio2RDF::Ndc"},{endpoint:"http%3A%2F%2Fnetpath.bio2rdf.org%2Fsparql",title:"Bio2RDF::NetPath"},{endpoint:"http%3A%2F%2Fomim.bio2rdf.org%2Fsparql",title:"Bio2RDF::Omim"},{endpoint:"http%3A%2F%2Forphanet.bio2rdf.org%2Fsparql",title:"Bio2RDF::Orphanet"},{endpoint:"http%3A%2F%2Fpid.bio2rdf.org%2Fsparql",title:"Bio2RDF::PID"},{endpoint:"http%3A%2F%2Fbiopax.pharmgkb.bio2rdf.org%2Fsparql",title:"Bio2RDF::PharmGKB::BioPAX"},{endpoint:"http%3A%2F%2Fpharmgkb.bio2rdf.org%2Fsparql",title:"Bio2RDF::Pharmgkb"},{endpoint:"http%3A%2F%2Fpubchem.bio2rdf.org%2Fsparql",title:"Bio2RDF::PubChem"},{endpoint:"http%3A%2F%2Frhea.bio2rdf.org%2Fsparql",title:"Bio2RDF::Rhea"},{endpoint:"http%3A%2F%2Fspike.bio2rdf.org%2Fsparql",title:"Bio2RDF::SPIKE"},{endpoint:"http%3A%2F%2Fsabiork.bio2rdf.org%2Fsparql",title:"Bio2RDF::Sabiork"},{endpoint:"http%3A%2F%2Fsgd.bio2rdf.org%2Fsparql",title:"Bio2RDF::Sgd"},{endpoint:"http%3A%2F%2Fsider.bio2rdf.org%2Fsparql",title:"Bio2RDF::Sider"},{endpoint:"http%3A%2F%2Ftaxonomy.bio2rdf.org%2Fsparql",title:"Bio2RDF::Taxonomy"},{endpoint:"http%3A%2F%2Fwikipathways.bio2rdf.org%2Fsparql",title:"Bio2RDF::Wikipathways"},{endpoint:"http%3A%2F%2Fwormbase.bio2rdf.org%2Fsparql",title:"Bio2RDF::Wormbase"},{endpoint:"https%3A%2F%2Fwww.ebi.ac.uk%2Frdf%2Fservices%2Fbiomodels%2Fsparql",title:"BioModels RDF"},{endpoint:"https%3A%2F%2Fwww.ebi.ac.uk%2Frdf%2Fservices%2Fbiosamples%2Fsparql",title:"BioSamples RDF"},{endpoint:"http%3A%2F%2Fhelheim.deusto.es%2Fbizkaisense%2Fsparql",title:"BizkaiSense"},{endpoint:"http%3A%2F%2Fbnb.data.bl.uk%2Fsparql"},{endpoint:"http%3A%2F%2Fbudapest.rkbexplorer.com%2Fsparql%2F",title:"Budapest University of Technology and Economics (RKBExplorer)"},{endpoint:"http%3A%2F%2Fbfs.270a.info%2Fsparql",title:"Bundesamt für Statistik (BFS) - Swiss Federal Statistical Office (FSO) Linked Data"},{endpoint:"http%3A%2F%2Fopendata-bundestag.de%2Fsparql",title:"BundestagNebeneinkuenfte"},{endpoint:"http%3A%2F%2Fdata.colinda.org%2Fendpoint.php",title:"COLINDA - Conference Linked Data"},{endpoint:"http%3A%2F%2Fcrtm.linkeddata.es%2Fsparql",title:"CRTM"},{endpoint:"http%3A%2F%2Fdata.fundacionctic.org%2Fsparql",title:"CTIC Public Dataset Catalogs"},{endpoint:"https%3A%2F%2Fwww.ebi.ac.uk%2Frdf%2Fservices%2Fchembl%2Fsparql",title:"ChEMBL RDF"},{endpoint:"http%3A%2F%2Fchebi.bio2rdf.org%2Fsparql",title:"Chemical Entities of Biological Interest (ChEBI)"},{endpoint:"http%3A%2F%2Fciteseer.rkbexplorer.com%2Fsparql%2F",title:"CiteSeer (Research Index) (RKBExplorer)"},{endpoint:"http%3A%2F%2Fcordis.rkbexplorer.com%2Fsparql%2F",title:"Community R&amp;D Information Service (CORDIS) (RKBExplorer)"},{endpoint:"http%3A%2F%2Fsemantic.ckan.net%2Fsparql%2F",title:"Comprehensive Knowledge Archive Network"},{endpoint:"http%3A%2F%2Fvocabulary.wolterskluwer.de%2FPoolParty%2Fsparql%2Fcourt",title:"Courts thesaurus"},{endpoint:"http%3A%2F%2Fcultura.linkeddata.es%2Fsparql",title:"CulturaLinkedData"},{endpoint:"http%3A%2F%2Fdblp.rkbexplorer.com%2Fsparql%2F",title:"DBLP Computer Science Bibliography (RKBExplorer)"},{endpoint:"http%3A%2F%2Fdblp.l3s.de%2Fd2r%2Fsparql",title:"DBLP in RDF (L3S)"},{endpoint:"http%3A%2F%2Fdbtune.org%2Fmusicbrainz%2Fsparql",title:"DBTune.org Musicbrainz D2R Server"},{endpoint:"http%3A%2F%2Fdbpedia.org%2Fsparql",title:"DBpedia"},{endpoint:"http%3A%2F%2Feu.dbpedia.org%2Fsparql",title:"DBpedia in Basque"},{endpoint:"http%3A%2F%2Fnl.dbpedia.org%2Fsparql",title:"DBpedia in Dutch"},{endpoint:"http%3A%2F%2Ffr.dbpedia.org%2Fsparql",title:"DBpedia in French"},{endpoint:"http%3A%2F%2Fde.dbpedia.org%2Fsparql",title:"DBpedia in German"},{endpoint:"http%3A%2F%2Fja.dbpedia.org%2Fsparql",title:"DBpedia in Japanese"},{endpoint:"http%3A%2F%2Fpt.dbpedia.org%2Fsparql",title:"DBpedia in Portuguese"},{endpoint:"http%3A%2F%2Fes.dbpedia.org%2Fsparql",title:"DBpedia in Spanish"},{endpoint:"http%3A%2F%2Flive.dbpedia.org%2Fsparql",title:"DBpedia-Live"},{endpoint:"http%3A%2F%2Fdeploy.rkbexplorer.com%2Fsparql%2F",title:"DEPLOY (RKBExplorer)"},{endpoint:"http%3A%2F%2Fdata.ox.ac.uk%2Fsparql%2F"},{endpoint:"http%3A%2F%2Fdatos.bcn.cl%2Fsparql",title:"Datos.bcn.cl"},{endpoint:"http%3A%2F%2Fdeepblue.rkbexplorer.com%2Fsparql%2F",title:"Deep Blue (RKBExplorer)"},{endpoint:"http%3A%2F%2Fdewey.info%2Fsparql.php",title:"Dewey Decimal Classification (DDC)"},{endpoint:"http%3A%2F%2Frdf.disgenet.org%2Fsparql%2F",title:"DisGeNET"},{endpoint:"http%3A%2F%2Fitaly.rkbexplorer.com%2Fsparql",title:"Diverse Italian ReSIST Partner Institutions (RKBExplorer)"},{endpoint:"http%3A%2F%2Fdutchshipsandsailors.nl%2Fdata%2Fsparql%2F",title:"Dutch Ships and Sailors "},{endpoint:"http%3A%2F%2Fsemanticweb.cs.vu.nl%2Fdss%2Fsparql%2F",title:"Dutch Ships and Sailors "},{endpoint:"http%3A%2F%2Fwww.eclap.eu%2Fsparql",title:"ECLAP"},{endpoint:"http%3A%2F%2Fcr.eionet.europa.eu%2Fsparql"},{endpoint:"http%3A%2F%2Fera.rkbexplorer.com%2Fsparql%2F",title:"ERA - Australian Research Council publication ratings (RKBExplorer)"},{endpoint:"http%3A%2F%2Fkent.zpr.fer.hr%3A8080%2FeducationalProgram%2Fsparql",title:"Educational programs - SISVU"},{endpoint:"http%3A%2F%2Fwebenemasuno.linkeddata.es%2Fsparql",title:"El Viajero's tourism dataset"},{endpoint:"http%3A%2F%2Fwww.ida.liu.se%2Fprojects%2Fsemtech%2Fopenrdf-sesame%2Frepositories%2Fenergy",title:"Energy efficiency assessments and improvements"},{endpoint:"http%3A%2F%2Fheritagedata.org%2Flive%2Fsparql"},{endpoint:"http%3A%2F%2Fenipedia.tudelft.nl%2Fsparql",title:"Enipedia - Energy Industry Data"},{endpoint:"http%3A%2F%2Fenvironment.data.gov.uk%2Fsparql%2Fbwq%2Fquery",title:"Environment Agency Bathing Water Quality"},{endpoint:"http%3A%2F%2Fecb.270a.info%2Fsparql",title:"European Central Bank (ECB) Linked Data"},{endpoint:"http%3A%2F%2Fsemantic.eea.europa.eu%2Fsparql"},{endpoint:"http%3A%2F%2Feuropeana.ontotext.com%2Fsparql"},{endpoint:"http%3A%2F%2Feventmedia.eurecom.fr%2Fsparql",title:"EventMedia"},{endpoint:"http%3A%2F%2Fdata.linkedu.eu%2Fforge%2Fquery",title:"FORGE Course information"},{endpoint:"http%3A%2F%2Ffactforge.net%2Fsparql",title:"Fact Forge"},{endpoint:"http%3A%2F%2Flogd.tw.rpi.edu%2Fsparql"},{endpoint:"http%3A%2F%2Ffrb.270a.info%2Fsparql",title:"Federal Reserve Board (FRB) Linked Data"},{endpoint:"http%3A%2F%2Fwww.open-biomed.org.uk%2Fsparql%2Fendpoint%2Fflybase",title:"Flybase"},{endpoint:"http%3A%2F%2Fwww.open-biomed.org.uk%2Fsparql%2Fendpoint%2Fflyted",title:"Flyted"},{endpoint:"http%3A%2F%2Ffao.270a.info%2Fsparql",title:"Food and Agriculture Organization of the United Nations (FAO) Linked Data"},{endpoint:"http%3A%2F%2Fft.rkbexplorer.com%2Fsparql%2F",title:"France Telecom Recherche et Développement (RKBExplorer)"},{endpoint:"http%3A%2F%2Flisbon.rkbexplorer.com%2Fsparql",title:"Fundação da Faculdade de Ciencas da Universidade de Lisboa (RKBExplorer)"},{endpoint:"http%3A%2F%2Fwww.ebi.ac.uk%2Frdf%2Fservices%2Fatlas%2Fsparql",title:"Gene Expression Atlas RDF"},{endpoint:"http%3A%2F%2Fgeo.linkeddata.es%2Fsparql",title:"GeoLinkedData"},{endpoint:"http%3A%2F%2Fresource.geolba.ac.at%2FPoolParty%2Fsparql%2FGeologicTimeScale",title:"Geological Survey of Austria (GBA) - Thesaurus"},{endpoint:"http%3A%2F%2Fresource.geolba.ac.at%2FPoolParty%2Fsparql%2FGeologicUnit",title:"Geological Survey of Austria (GBA) - Thesaurus"},{endpoint:"http%3A%2F%2Fresource.geolba.ac.at%2FPoolParty%2Fsparql%2Flithology",title:"Geological Survey of Austria (GBA) - Thesaurus"},{endpoint:"http%3A%2F%2Fresource.geolba.ac.at%2FPoolParty%2Fsparql%2Ftectonicunit",title:"Geological Survey of Austria (GBA) - Thesaurus"},{endpoint:"http%3A%2F%2Fvocabulary.wolterskluwer.de%2FPoolParty%2Fsparql%2Farbeitsrecht",title:"German labor law thesaurus"},{endpoint:"http%3A%2F%2Fdata.globalchange.gov%2Fsparql",title:"Global Change Information System"},{endpoint:"http%3A%2F%2Fwordnet.okfn.gr%3A8890%2Fsparql%2F",title:"Greek Wordnet"},{endpoint:"http%3A%2F%2Flod.hebis.de%2Fsparql",title:"HeBIS - Bibliographic Resources of the Library Union Catalogues of Hessen and parts of the Rhineland Palatinate"},{endpoint:"http%3A%2F%2Fhealthdata.tw.rpi.edu%2Fsparql",title:"HealthData.gov Platform (HDP) on the Semantic Web"},{endpoint:"http%3A%2F%2Fhelheim.deusto.es%2Fhedatuz%2Fsparql",title:"Hedatuz"},{endpoint:"http%3A%2F%2Fgreek-lod.auth.gr%2Ffire-brigade%2Fsparql",title:"Hellenic Fire Brigade"},{endpoint:"http%3A%2F%2Fgreek-lod.auth.gr%2Fpolice%2Fsparql",title:"Hellenic Police"},{endpoint:"http%3A%2F%2Fsetaria.oszk.hu%2Fsparql",title:"Hungarian National Library (NSZL) catalog"},{endpoint:"http%3A%2F%2Fsemanticweb.cs.vu.nl%2Fiati%2Fsparql%2F",title:"IATI as Linked Data"},{endpoint:"http%3A%2F%2Fibm.rkbexplorer.com%2Fsparql%2F",title:"IBM Research GmbH (RKBExplorer)"},{endpoint:"http%3A%2F%2Fwww.icane.es%2Fopendata%2Fsparql",title:"ICANE"},{endpoint:"http%3A%2F%2Fieee.rkbexplorer.com%2Fsparql%2F",title:"IEEE Papers (RKBExplorer)"},{endpoint:"http%3A%2F%2Fieeevis.tw.rpi.edu%2Fsparql",title:"IEEE VIS Source Data"},{endpoint:"http%3A%2F%2Fwww.imagesnippets.com%2Fsparql%2Fimages",title:"Imagesnippets Image Descriptions"},{endpoint:"http%3A%2F%2Fopendatacommunities.org%2Fsparql"},{endpoint:"http%3A%2F%2Fpurl.org%2Ftwc%2Fhub%2Fsparql",title:"Instance Hub (all)"},{endpoint:"http%3A%2F%2Feurecom.rkbexplorer.com%2Fsparql%2F",title:"Institut Eurécom (RKBExplorer)"},{endpoint:"http%3A%2F%2Fimf.270a.info%2Fsparql",title:"International Monetary Fund (IMF) Linked Data"},{endpoint:"http%3A%2F%2Fwww.rechercheisidore.fr%2Fsparql",title:"Isidore"},{endpoint:"http%3A%2F%2Fsparql.kupkb.org%2Fsparql",title:"Kidney and Urinary Pathway Knowledge Base"},{endpoint:"http%3A%2F%2Fkisti.rkbexplorer.com%2Fsparql%2F",title:"Korean Institute of Science Technology and Information (RKBExplorer)"},{endpoint:"http%3A%2F%2Flod.kaist.ac.kr%2Fsparql",title:"Korean Traditional Recipes"},{endpoint:"http%3A%2F%2Flaas.rkbexplorer.com%2Fsparql%2F",title:"LAAS-CNRS (RKBExplorer)"},{endpoint:"http%3A%2F%2Fsmartcity.linkeddata.es%2Fsparql",title:"LCC (Leeds City Council Energy Consumption Linked Data)"},{endpoint:"http%3A%2F%2Flod.ac%2Fbdls%2Fsparql",title:"LODAC BDLS"},{endpoint:"http%3A%2F%2Fdata.linkededucation.org%2Frequest%2Flak-conference%2Fsparql",title:"Learning Analytics and Knowledge (LAK) Dataset"},{endpoint:"http%3A%2F%2Fwww.linklion.org%3A8890%2Fsparql",title:"LinkLion - A Link Repository for the Web of Data"},{endpoint:"http%3A%2F%2Fsparql.reegle.info%2F",title:"Linked Clean Energy Data (reegle.info)"},{endpoint:"http%3A%2F%2Fsparql.contextdatacloud.org",title:"Linked Crowdsourced Data"},{endpoint:"http%3A%2F%2Flinkedlifedata.com%2Fsparql",title:"Linked Life Data"},{endpoint:"http%3A%2F%2Fdata.logainm.ie%2Fsparql",title:"Linked Logainm"},{endpoint:"http%3A%2F%2Fdata.linkedmdb.org%2Fsparql",title:"Linked Movie DataBase"},{endpoint:"http%3A%2F%2Fdata.aalto.fi%2Fsparql",title:"Linked Open Aalto Data Service"},{endpoint:"http%3A%2F%2Fdbmi-icode-01.dbmi.pitt.edu%2FlinkedSPLs%2Fsparql",title:"Linked Structured Product Labels"},{endpoint:"http%3A%2F%2Flinkedgeodata.org%2Fsparql%2F",title:"LinkedGeoData"},{endpoint:"http%3A%2F%2Flinkedspending.aksw.org%2Fsparql",title:"LinkedSpending: OpenSpending becomes Linked Open Data"},{endpoint:"http%3A%2F%2Fhelheim.deusto.es%2Flinkedstats%2Fsparql",title:"LinkedStats"},{endpoint:"http%3A%2F%2Flinkedu.eu%2Fcatalogue%2Fsparql%2F",title:"LinkedUp Catalogue of Educational Datasets"},{endpoint:"http%3A%2F%2Fid.sgcb.mcu.es%2Fsparql",title:"Lista de Encabezamientos de Materia as Linked Open Data"},{endpoint:"http%3A%2F%2Fonto.mondis.cz%2Fopenrdf-sesame%2Frepositories%2Fmondis-record-owlim",title:"MONDIS"},{endpoint:"http%3A%2F%2Fapps.morelab.deusto.es%2Flabman%2Fsparql",title:"MORElab"},{endpoint:"http%3A%2F%2Fsparql.msc2010.org",title:"Mathematics Subject Classification"},{endpoint:"http%3A%2F%2Fdoc.metalex.eu%3A8000%2Fsparql%2F",title:"MetaLex Document Server"},{endpoint:"http%3A%2F%2Frdf.muninn-project.org%2Fsparql",title:"Muninn World War I"},{endpoint:"http%3A%2F%2Flod.sztaki.hu%2Fsparql",title:"National Digital Data Archive of Hungary (partial)"},{endpoint:"http%3A%2F%2Fnsf.rkbexplorer.com%2Fsparql%2F",title:"National Science Foundation (RKBExplorer)"},{endpoint:"http%3A%2F%2Fdata.nobelprize.org%2Fsparql",title:"Nobel Prizes"},{endpoint:"http%3A%2F%2Fdata.lenka.no%2Fsparql",title:"Norwegian geo-divisions"},{endpoint:"http%3A%2F%2Fspatial.ucd.ie%2Flod%2Fsparql",title:"OSM Semantic Network"},{endpoint:"http%3A%2F%2Fdata.linkedu.eu%2Fdon%2Fquery",title:"OUNL DSpace in RDF"},{endpoint:"http%3A%2F%2Fdata.oceandrilling.org%2Fsparql"},{endpoint:"http%3A%2F%2Fonto.beef.org.pl%2Fsparql",title:"OntoBeef"},{endpoint:"http%3A%2F%2Foai.rkbexplorer.com%2Fsparql%2F",title:"Open Archive Initiative Harvest over OAI-PMH (RKBExplorer)"},{endpoint:"http%3A%2F%2Fdata.linkedu.eu%2Focw%2Fquery",title:"Open Courseware Consortium metadata in RDF"},{endpoint:"http%3A%2F%2Fopendata.ccd.uniroma2.it%2FLMF%2Fsparql%2Fselect",title:"Open Data @ Tor Vergata"},{endpoint:"http%3A%2F%2Fvocabulary.semantic-web.at%2FPoolParty%2Fsparql%2FOpenData",title:"Open Data Thesaurus"},{endpoint:"http%3A%2F%2Fdata.cnr.it%2Fsparql-proxy%2F",title:"Open Data from the Italian National Research Council"},{endpoint:"http%3A%2F%2Fdata.utpl.edu.ec%2Fecuadorresearch%2Flod%2Fsparql",title:"Open Data of Ecuador"},{endpoint:"http%3A%2F%2Fen.openei.org%2Fsparql",title:"OpenEI - Open Energy Info"},{endpoint:"http%3A%2F%2Flod.openlinksw.com%2Fsparql",title:"OpenLink Software LOD Cache"},{endpoint:"http%3A%2F%2Fsparql.openmobilenetwork.org",title:"OpenMobileNetwork"},{endpoint:"http%3A%2F%2Fapps.ideaconsult.net%3A8080%2Fontology",title:"OpenTox"},{endpoint:"http%3A%2F%2Fgov.tso.co.uk%2Fcoins%2Fsparql",title:"OpenUpLabs COINS"},{endpoint:"http%3A%2F%2Fgov.tso.co.uk%2Fdclg%2Fsparql",title:"OpenUpLabs DCLG"},{endpoint:"http%3A%2F%2Fos.services.tso.co.uk%2Fgeo%2Fsparql",title:"OpenUpLabs Geographic"},{endpoint:"http%3A%2F%2Fgov.tso.co.uk%2Flegislation%2Fsparql",title:"OpenUpLabs Legislation"},{endpoint:"http%3A%2F%2Fgov.tso.co.uk%2Ftransport%2Fsparql",title:"OpenUpLabs Transport"},{endpoint:"http%3A%2F%2Fos.rkbexplorer.com%2Fsparql%2F",title:"Ordnance Survey (RKBExplorer)"},{endpoint:"http%3A%2F%2Fdata.organic-edunet.eu%2Fsparql",title:"Organic Edunet Linked Open Data"},{endpoint:"http%3A%2F%2Foecd.270a.info%2Fsparql",title:"Organisation for Economic Co-operation and Development (OECD) Linked Data"},{endpoint:"https%3A%2F%2Fdata.ox.ac.uk%2Fsparql%2F",title:"OxPoints (University of Oxford)"},{endpoint:"http%3A%2F%2Fdata.linkedu.eu%2Fprod%2Fquery",title:"PROD - JISC Project Directory in RDF"},{endpoint:"http%3A%2F%2Fld.panlex.org%2Fsparql",title:"PanLex"},{endpoint:"http%3A%2F%2Flinked-data.org%2Fsparql",title:"Phonetics Information Base and Lexicon (PHOIBLE)"},{endpoint:"http%3A%2F%2Flinked.opendata.cz%2Fsparql",title:"Publications of Charles University in Prague"},{endpoint:"http%3A%2F%2Flinkeddata4.dia.fi.upm.es%3A8907%2Fsparql",title:"RDFLicense"},{endpoint:"http%3A%2F%2Frisks.rkbexplorer.com%2Fsparql%2F",title:"RISKS Digest (RKBExplorer)"},{endpoint:"http%3A%2F%2Fruian.linked.opendata.cz%2Fsparql",title:"RUIAN - Register of territorial identification, addresses and real estates of the Czech Republic"},{endpoint:"http%3A%2F%2Fcurriculum.rkbexplorer.com%2Fsparql%2F",title:"ReSIST MSc in Resilient Computing Curriculum (RKBExplorer)"},{endpoint:"http%3A%2F%2Fwiki.rkbexplorer.com%2Fsparql%2F",title:"ReSIST Project Wiki (RKBExplorer)"},{endpoint:"http%3A%2F%2Fresex.rkbexplorer.com%2Fsparql%2F",title:"ReSIST Resilience Mechanisms (RKBExplorer.com)"},{endpoint:"https%3A%2F%2Fwww.ebi.ac.uk%2Frdf%2Fservices%2Freactome%2Fsparql",title:"Reactome RDF"},{endpoint:"http%3A%2F%2Flod.xdams.org%2Fsparql"},{endpoint:"http%3A%2F%2Frae2001.rkbexplorer.com%2Fsparql%2F",title:"Research Assessment Exercise 2001 (RKBExplorer)"},{endpoint:"http%3A%2F%2Fcourseware.rkbexplorer.com%2Fsparql%2F",title:"Resilient Computing Courseware (RKBExplorer)"},{endpoint:"http%3A%2F%2Flink.informatics.stonybrook.edu%2Fsparql%2F",title:"RxNorm"},{endpoint:"http%3A%2F%2Fdata.rism.info%2Fsparql"},{endpoint:"http%3A%2F%2Fbiordf.net%2Fsparql",title:"SADI Semantic Web Services framework registry"},{endpoint:"http%3A%2F%2Fseek.rkbexplorer.com%2Fsparql%2F",title:"SEEK-AT-WD ICT tools for education - Web-Share"},{endpoint:"http%3A%2F%2Fzbw.eu%2Fbeta%2Fsparql%2Fstw%2Fquery",title:"STW Thesaurus for Economics"},{endpoint:"http%3A%2F%2Fsouthampton.rkbexplorer.com%2Fsparql%2F",title:"School of Electronics and Computer Science, University of Southampton (RKBExplorer)"},{endpoint:"http%3A%2F%2Fserendipity.utpl.edu.ec%2Flod%2Fsparql",title:"Serendipity"},{endpoint:"http%3A%2F%2Fdata.linkedu.eu%2Fslidewiki%2Fquery",title:"Slidewiki (RDF/SPARQL)"},{endpoint:"http%3A%2F%2Fsmartlink.open.ac.uk%2Fsmartlink%2Fsparql",title:"SmartLink: Linked Services Non-Functional Properties"},{endpoint:"http%3A%2F%2Fsocialarchive.iath.virginia.edu%2Fsparql%2Feac",title:"Social Networks and Archival Context Fall 2011"},{endpoint:"http%3A%2F%2Fsocialarchive.iath.virginia.edu%2Fsparql%2Fsnac-viaf",title:"Social Networks and Archival Context Fall 2011"},{endpoint:"http%3A%2F%2Fvocabulary.semantic-web.at%2FPoolParty%2Fsparql%2Fsemweb",title:"Social Semantic Web Thesaurus"},{endpoint:"http%3A%2F%2Flinguistic.linkeddata.es%2Fsparql",title:"Spanish Linguistic Datasets"},{endpoint:"http%3A%2F%2Fcrashmap.okfn.gr%3A8890%2Fsparql",title:"Statistics on Fatal Traffic Accidents in greek roads"},{endpoint:"http%3A%2F%2Fcrime.rkbexplorer.com%2Fsparql%2F",title:"Street level crime reports for England and Wales"},{endpoint:"http%3A%2F%2Fsymbolicdata.org%3A8890%2Fsparql",title:"SymbolicData"},{endpoint:"http%3A%2F%2Fagalpha.mathbiol.org%2Frepositories%2Ftcga",title:"TCGA Roadmap"},{endpoint:"http%3A%2F%2Fwww.open-biomed.org.uk%2Fsparql%2Fendpoint%2Ftcm",title:"TCMGeneDIT Dataset"},{endpoint:"http%3A%2F%2Fdata.linkededucation.org%2Frequest%2Fted%2Fsparql",title:"TED Talks"},{endpoint:"http%3A%2F%2Fdarmstadt.rkbexplorer.com%2Fsparql%2F",title:"Technische Universität Darmstadt (RKBExplorer)"},{endpoint:"http%3A%2F%2Flinguistic.linkeddata.es%2Fterminesp%2Fsparql-editor",title:"Terminesp Linked Data"},{endpoint:"http%3A%2F%2Facademia6.poolparty.biz%2FPoolParty%2Fsparql%2FTesauro-Materias-BUPM",title:"Tesauro materias BUPM"},{endpoint:"http%3A%2F%2Fapps.morelab.deusto.es%2Fteseo%2Fsparql",title:"Teseo"},{endpoint:"http%3A%2F%2Flinkeddata.ge.imati.cnr.it%3A8890%2Fsparql",title:"ThIST"},{endpoint:"http%3A%2F%2Fring.ciard.net%2Fsparql1",title:"The CIARD RING"},{endpoint:"http%3A%2F%2Fvocab.getty.edu%2Fsparql"},{endpoint:"http%3A%2F%2Flod.gesis.org%2Fthesoz%2Fsparql",title:"TheSoz Thesaurus for the Social Sciences (GESIS)"},{endpoint:"http%3A%2F%2Fdigitale.bncf.firenze.sbn.it%2Fopenrdf-workbench%2Frepositories%2FNS%2Fquery",title:"Thesaurus BNCF"},{endpoint:"http%3A%2F%2Ftour-pedia.org%2Fsparql",title:"Tourpedia"},{endpoint:"http%3A%2F%2Ftkm.kiom.re.kr%2Fontology%2Fsparql",title:"Traditional Korean Medicine Ontology"},{endpoint:"http%3A%2F%2Ftransparency.270a.info%2Fsparql",title:"Transparency International Linked Data"},{endpoint:"http%3A%2F%2Fjisc.rkbexplorer.com%2Fsparql%2F",title:"UK JISC (RKBExplorer)"},{endpoint:"http%3A%2F%2Funlocode.rkbexplorer.com%2Fsparql%2F",title:"UN/LOCODE (RKBExplorer)"},{endpoint:"http%3A%2F%2Fuis.270a.info%2Fsparql",title:"UNESCO Institute for Statistics (UIS) Linked Data"},{endpoint:"http%3A%2F%2Fskos.um.es%2Fsparql%2F",title:"UNESCO Thesaurus"},{endpoint:"http%3A%2F%2Fdata.linkedu.eu%2Fkis1112%2Fquery",title:"UNISTAT-KIS 2011/2012 in RDF (Key Information Set - UK Universities)"},{endpoint:"http%3A%2F%2Fdata.linkedu.eu%2Fkis%2Fquery",title:"UNISTAT-KIS in RDF (Key Information Set - UK Universities)"},{endpoint:"http%3A%2F%2Flinkeddata.uriburner.com%2Fsparql",title:"URIBurner"},{endpoint:"http%3A%2F%2Fbeta.sparql.uniprot.org"},{endpoint:"http%3A%2F%2Fdata.utpl.edu.ec%2Futpl%2Flod%2Fsparql",title:"Universidad Técnica Particular de Loja - Linked Open Data"},{endpoint:"http%3A%2F%2Fresrev.ilrt.bris.ac.uk%2Fdata-server-workshop%2Fsparql",title:"University of Bristol"},{endpoint:"http%3A%2F%2Fdata.linkedu.eu%2Fhud%2Fquery",title:"University of Huddersfield -- Circulation and Recommendation Data"},{endpoint:"http%3A%2F%2Fnewcastle.rkbexplorer.com%2Fsparql%2F",title:"University of Newcastle upon Tyne (RKBExplorer)"},{endpoint:"http%3A%2F%2Froma.rkbexplorer.com%2Fsparql%2F",title:'Università degli studi di Roma "La Sapienza" (RKBExplorer)'},{endpoint:"http%3A%2F%2Fpisa.rkbexplorer.com%2Fsparql%2F",title:"Università di Pisa (RKBExplorer)"},{endpoint:"http%3A%2F%2Fulm.rkbexplorer.com%2Fsparql%2F",title:"Universität Ulm (RKBExplorer)"},{endpoint:"http%3A%2F%2Firit.rkbexplorer.com%2Fsparql%2F",title:"Université Paul Sabatier - Toulouse 3 (RKB Explorer)"},{endpoint:"http%3A%2F%2Fsemanticweb.cs.vu.nl%2Fverrijktkoninkrijk%2Fsparql%2F",title:"Verrijkt Koninkrijk"},{endpoint:"http%3A%2F%2Fkaunas.rkbexplorer.com%2Fsparql",title:"Vytautas Magnus University, Kaunas (RKBExplorer)"},{endpoint:"http%3A%2F%2Fwebscience.rkbexplorer.com%2Fsparql",title:"Web Science Conference (RKBExplorer)"},{endpoint:"http%3A%2F%2Fsparql.wikipathways.org%2F",title:"WikiPathways"},{endpoint:"http%3A%2F%2Fwww.opmw.org%2Fsparql",title:"Wings workflow provenance dataset"},{endpoint:"http%3A%2F%2Fwordnet.rkbexplorer.com%2Fsparql%2F",title:"WordNet (RKBExplorer)"},{endpoint:"http%3A%2F%2Fworldbank.270a.info%2Fsparql",title:"World Bank Linked Data"},{endpoint:"http%3A%2F%2Fmlode.nlp2rdf.org%2Fsparql"},{endpoint:"http%3A%2F%2Fldf.fi%2Fww1lod%2Fsparql",title:"World War 1 as Linked Open Data"},{endpoint:"http%3A%2F%2Faksw.org%2Fsparql",title:"aksw.org Research Group dataset"},{endpoint:"http%3A%2F%2Fcrm.rkbexplorer.com%2Fsparql",title:"crm"},{endpoint:"http%3A%2F%2Fdata.open.ac.uk%2Fquery",title:"data.open.ac.uk, Linked Data from the Open University"},{endpoint:"http%3A%2F%2Fsparql.data.southampton.ac.uk%2F"},{endpoint:"http%3A%2F%2Fdatos.bne.es%2Fsparql",title:"datos.bne.es"},{endpoint:"http%3A%2F%2Fkaiko.getalp.org%2Fsparql",title:"dbnary"},{endpoint:"http%3A%2F%2Fdigitaleconomy.rkbexplorer.com%2Fsparql",title:"digitaleconomy"},{endpoint:"http%3A%2F%2Fdotac.rkbexplorer.com%2Fsparql%2F",title:"dotAC (RKBExplorer)"},{endpoint:"http%3A%2F%2Fforeign.rkbexplorer.com%2Fsparql%2F",title:"ePrints Harvest (RKBExplorer)"},{endpoint:"http%3A%2F%2Feprints.rkbexplorer.com%2Fsparql%2F",title:"ePrints3 Institutional Archive Collection (RKBExplorer)"},{endpoint:"http%3A%2F%2Fservices.data.gov.uk%2Feducation%2Fsparql",title:"education.data.gov.uk"},{endpoint:"http%3A%2F%2Fepsrc.rkbexplorer.com%2Fsparql",title:"epsrc"},{endpoint:"http%3A%2F%2Fwww.open-biomed.org.uk%2Fsparql%2Fendpoint%2Fflyatlas",title:"flyatlas"},{endpoint:"http%3A%2F%2Fiserve.kmi.open.ac.uk%2Fiserve%2Fsparql",title:"iServe: Linked Services Registry"},{endpoint:"http%3A%2F%2Fichoose.tw.rpi.edu%2Fsparql",title:"ichoose"},{endpoint:"http%3A%2F%2Fkdata.kr%2Fsparql%2Fendpoint.jsp",title:"kdata"},{endpoint:"http%3A%2F%2Flofd.tw.rpi.edu%2Fsparql",title:"lofd"},{endpoint:"http%3A%2F%2Fprovenanceweb.org%2Fsparql",title:"provenanceweb"},{endpoint:"http%3A%2F%2Fservices.data.gov.uk%2Freference%2Fsparql",title:"reference.data.gov.uk"},{endpoint:"http%3A%2F%2Fforeign.rkbexplorer.com%2Fsparql",title:"rkb-explorer-foreign"},{endpoint:"http%3A%2F%2Fservices.data.gov.uk%2Fstatistics%2Fsparql",title:"statistics.data.gov.uk"},{endpoint:"http%3A%2F%2Fservices.data.gov.uk%2Ftransport%2Fsparql",title:"transport.data.gov.uk"},{endpoint:"http%3A%2F%2Fopendap.tw.rpi.edu%2Fsparql",title:"twc-opendap"},{endpoint:"http%3A%2F%2Fwebconf.rkbexplorer.com%2Fsparql",title:"webconf"},{endpoint:"http%3A%2F%2Fwiktionary.dbpedia.org%2Fsparql",title:"wiktionary.dbpedia.org"},{endpoint:"http%3A%2F%2Fdiwis.imis.athena-innovation.gr%3A8181%2Fsparql",title:"xxxxx"}]; e.forEach(function(t,n){e[n].endpoint=decodeURIComponent(t.endpoint)});e.sort(function(e,t){var n=e.title||e.endpoint,r=t.title||t.endpoint;return n.toUpperCase().localeCompare(r.toUpperCase())});return e}},{jquery:void 0,selectize:5,"yasgui-utils":9}],89:[function(e){e("./outsideclick.js");e("./tab.js");e("./endpointCombi.js")},{"./endpointCombi.js":88,"./outsideclick.js":90,"./tab.js":91}],90:[function(e){"use strict";var t=function(){try{return e("jquery")}catch(t){return window.jQuery}}();t.fn.onOutsideClick=function(e,n){n=t.extend({skipFirst:!1,allowedElements:t()},n);var r=t(this),i=function(o){var s=function(e){return!e.is(o.target)&&0===e.has(o.target).length};if(s(r)&&s(n.allowedElements))if(n.skipFirst)n.skipFirst=!1;else{e();t(document).off("mouseup",i)}};t(document).mouseup(i);return this}},{jquery:void 0}],91:[function(e){function t(e){return this.each(function(){var t=n(this),i=t.data("bs.tab");i||t.data("bs.tab",i=new r(this));"string"==typeof e&&i[e]()})}var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),r=function(e){this.element=n(e)};r.VERSION="3.3.1";r.TRANSITION_DURATION=150;r.prototype.show=function(){var e=this.element,t=e.closest("ul:not(.dropdown-menu)"),r=e.data("target");if(!r){r=e.attr("href");r=r&&r.replace(/.*(?=#[^\s]*$)/,"")}if(!e.parent("li").hasClass("active")){var i=t.find(".active:last a"),o=n.Event("hide.bs.tab",{relatedTarget:e[0]}),s=n.Event("show.bs.tab",{relatedTarget:i[0]});i.trigger(o);e.trigger(s);if(!s.isDefaultPrevented()&&!o.isDefaultPrevented()){var a=n(r);this.activate(e.closest("li"),t);this.activate(a,a.parent(),function(){i.trigger({type:"hidden.bs.tab",relatedTarget:e[0]});e.trigger({type:"shown.bs.tab",relatedTarget:i[0]})})}}};r.prototype.activate=function(e,t,i){function o(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1);e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0);if(a){e[0].offsetWidth;e.addClass("in")}else e.removeClass("fade");e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0);i&&i()}var s=t.find("> .active"),a=i&&n.support.transition&&(s.length&&s.hasClass("fade")||!!t.find("> .fade").length);s.length&&a?s.one("bsTransitionEnd",o).emulateTransitionEnd(r.TRANSITION_DURATION):o();s.removeClass("in")};var i=n.fn.tab;n.fn.tab=t;n.fn.tab.Constructor=r;n.fn.tab.noConflict=function(){n.fn.tab=i;return this};var o=function(e){e.preventDefault();t.call(n(this),"show")};n(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)},{jquery:void 0}],92:[function(e,t){"use strict";var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),r=e("yasgui-utils");e("./jquery/extendJquery.js");var i=t.exports=function(t,o){var s={};s.wrapperElement=n('<div class="yasgui"></div>').appendTo(n(t));s.options=n.extend(!0,{},i.defaults,o);s.history=[];s.persistencyPrefix=null;s.options.persistencyPrefix&&(s.persistencyPrefix="function"==typeof s.options.persistencyPrefix?s.options.persistencyPrefix(s):s.options.persistencyPrefix);s.store=function(){s.persistentOptions&&r.storage.set(s.persistencyPrefix,s.persistentOptions)};var a=function(){var e=r.storage.get(s.persistencyPrefix);e||(e={});return e};s.persistentOptions=a();s.tabManager=e("./tabManager.js")(s);s.tabManager.init();return s};i.YASQE=e("yasgui-yasqe");i.YASQE.defaults=n.extend(!0,i.YASQE.defaults,e("./defaultsYasqe.js"));i.YASR=e("yasgui-yasr");i.defaults=e("./defaults.js")},{"./defaults.js":85,"./defaultsYasqe.js":86,"./jquery/extendJquery.js":89,"./tabManager.js":95,jquery:void 0,"yasgui-utils":9,"yasgui-yasqe":38,"yasgui-yasr":74}],93:[function(e,t){var n=function(e){var t=[];e||(e=window.location.search.substring(1));if(e.length>0)for(var n=e.split("&"),r=0;r<n.length;r++){var i=n[r].split("="),o=i[0],s=i[1];if(o.length>0&&s&&s.length>0){s=s.replace(/\+/g," ");s=decodeURIComponent(s);t.push({name:i[0],value:s})}}return t};t.exports={getCreateLinkHandler:function(e){return function(){var t=[{name:"outputFormat",value:e.yasr.options.output},{name:"query",value:e.yasqe.getValue()},{name:"contentTypeConstruct",value:e.persistentOptions.yasqe.acceptHeaderGraph},{name:"contentTypeSelect",value:e.persistentOptions.yasqe.acceptHeaderSelect},{name:"endpoint",value:e.persistentOptions.yasqe.endpoint},{name:"requestMethod",value:e.persistentOptions.yasqe.requestMethod},{name:"tabTitle",value:e.persistentOptions.name}];e.persistentOptions.yasqe.args.forEach(function(e){t.push(e)});e.persistentOptions.yasqe.namedGraphs.forEach(function(e){t.push({name:"namedGraph",value:e})});e.persistentOptions.yasqe.defaultGraphs.forEach(function(e){t.push({name:"defaultGraph",value:e})});var r=[];t.forEach(function(e){r.push(e.name)});var i=n();i.forEach(function(e){-1==r.indexOf(e.name)&&t.push(e)});return t}},getOptionsFromUrl:function(){var e={yasqe:{},yasr:{}},t=n(),r=!1;t.forEach(function(t){if("query"==t.name){r=!0;e.yasqe.value=t.value}else if("outputFormat"==t.name){var n=t.value;"simpleTable"==n&&(n="table");e.yasr.output=n}else if("contentTypeConstruct"==t.name)e.yasqe.acceptHeaderGraph=t.value;else if("contentTypeSelect"==t.name)e.yasqe.acceptHeaderSelect=t.value;else if("endpoint"==t.name)e.yasqe.endpoint=t.value;else if("requestMethod"==t.name)e.yasqe.requestMethod=t.value;else if("tabTitle"==t.name)e.name=t.value;else if("namedGraph"==t.name){e.yasqe.namedGraphs||(e.yasqe.namedGraphs=[]);e.yasqe.namedGraphs.push(t)}else if("defaultGraph"==t.name){e.yasqe.defaultGraphs||(e.yasqe.defaultGraphs=[]);e.yasqe.defaultGraphs.push(t)}else{e.yasqe.args||(e.yasqe.args=[]);e.yasqe.args.push(t)}});return r?e:null}}},{}],94:[function(e,t){"use strict";var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),r=(e("./utils.js"),e("./main.js")),i={sparql:{endpoint:r.YASQE.defaults.sparql.endpoint,acceptHeaderGraph:r.YASQE.defaults.sparql.acceptHeaderGraph,acceptHeaderSelect:r.YASQE.defaults.sparql.acceptHeaderSelect,args:r.YASQE.defaults.sparql.args,defaultGraphs:r.YASQE.defaults.sparql.defaultGraphs,namedGraphs:r.YASQE.defaults.sparql.namedGraphs,requestMethod:r.YASQE.defaults.sparql.requestMethod}};t.exports=function(t,o,s){t.persistentOptions.tabManager.tabs[o]=t.persistentOptions.tabManager.tabs[o]?n.extend(!0,{},i,t.persistentOptions.tabManager.tabs[o]):{id:o,name:s,yasqe:i};var a,l=t.persistentOptions.tabManager.tabs[o],u={persistentOptions:l},p=e("./tabPaneMenu.js")(t,u),c=n("<div>",{id:l.id,style:"position:relative","class":"tab-pane",role:"tabpanel"}).appendTo(t.tabManager.$tabPanesParent),d=n("<div>",{"class":"wrapper"}).appendTo(c),f=(p.initWrapper().appendTo(c),function(){var e=n("<div>",{"class":"controlbar"}).appendTo(d);n("<button>",{type:"button","class":"menuButton btn btn-default"}).on("click",function(){if(c.hasClass("menu-open")){c.removeClass("menu-open");p.store()}else{p.updateWrapper();c.addClass("menu-open");n(".menu-slide,.menuButton").onOutsideClick(function(){c.removeClass("menu-open");p.store()})}}).append(n("<span>",{"class":"icon-bar"})).append(n("<span>",{"class":"icon-bar"})).append(n("<span>",{"class":"icon-bar"})).appendTo(e);a=n("<select>").appendTo(e).endpointCombi(t,{value:l.yasqe.sparql.endpoint,onChange:function(e){l.yasqe.sparql.endpoint=e;t.store()}})});f();var h=n("<div>",{id:"yasqe_"+l.id}).appendTo(d),g=n("<div>",{id:"yasq_"+l.id}).appendTo(d),m={createShareLink:e("./shareLink").getCreateLinkHandler(u)};u.setPersistentInYasqe=function(){if(u.yasqe){n.extend(!0,u.yasqe.options,l.yasqe);u.yasqe.setValue(l.yasqe.value)}};n.extend(m,l.yasqe);u.onShow=function(){if(!u.yasqe||!u.yasr){u.yasqe=r.YASQE(h[0],m);u.yasqe.on("blur",function(e){l.yasqe.value=e.getValue();t.store()});u.yasr=r.YASR(g[0],{getUsedPrefixes:u.yasqe.getPrefixesFromQuery});u.yasqe.options.sparql.callbacks.complete=function(){u.yasr.setResponse.apply(this,arguments);l.yasqe.value=u.yasqe.getValue();var e=null;u.yasr.results.getBindings()&&(e=u.yasr.results.getBindings().length);var r={options:n.extend(!0,{},l),resultSize:e};delete r.options.name;t.history.unshift(r)}}};u.setOptions=function(){};u.refreshYasqe=function(){n.extend(!0,u.yasqe.options,u.persistentOptions.yasqe);u.yasqe.setValue(u.persistentOptions.yasqe.value)};u.destroy=function(){console.log("todo: proper destorying of local storage")};return u}},{"./main.js":92,"./shareLink":93,"./tabPaneMenu.js":96,"./utils.js":97,jquery:void 0}],95:[function(e,t){"use strict";{var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}();e("yasgui-utils"),e("./imgs.js")}e("jquery-ui/position");t.exports=function(t){t.persistentOptions.tabManager||(t.persistentOptions.tabManager={});var r=t.persistentOptions.tabManager,i={};i.tabs={};var o,s=null,a=null,l=function(e,t){e||(e="Query");t||(t=0);var n=e+(t>0?" "+t:"");u(n)&&(n=l(e,t+1));return n},u=function(e){for(var t in i.tabs)if(i.tabs[t].persistentOptions.name==e)return!0;return!1},p=function(){return Math.random().toString(36).substring(7)};i.init=function(){s=n("<div>",{role:"tabpanel"}).appendTo(t.wrapperElement);o=n("<ul>",{"class":"nav nav-tabs mainTabs",role:"tablist"}).appendTo(s);var l=n("<a>",{role:"addTab"}).click(function(){f()}).text("+");o.append(n("<li>",{role:"presentation"}).append(l));i.$tabPanesParent=n("<div>",{"class":"tab-content"}).appendTo(s);if(!r||n.isEmptyObject(r)){r.tabOrder=[];r.selected=null}var u=e("./shareLink.js").getOptionsFromUrl();if(u){var c=p();u.id=c;r.tabs[c]=u;r.tabOrder.push(c);r.selected=c}r.tabOrder.length>0?r.tabOrder.forEach(f):f();o.sortable({placeholder:"tab-sortable-highlight",items:'li:has([data-toggle="tab"])',forcePlaceholderSize:!0,update:function(){var e=[];o.find('a[data-toggle="tab"]').each(function(){e.push(n(this).attr("aria-controls"))});r.tabOrder=e;t.store()}});a=n("<div>",{"class":"tabDropDown"}).appendTo(t.wrapperElement);var h=n("<ul>",{"class":"dropdown-menu",role:"menu"}).appendTo(a),g=function(e,t){var r=n("<li>",{role:"presentation"}).appendTo(h);e?r.append(n("<a>",{role:"menuitem",href:"#"}).text(e)).click(function(){a.hide();event.preventDefault();t&&t(a.attr("target-tab"))}):r.addClass("divider")};g("Rename",function(e){o.find('a[href="#'+e+'"]').dblclick()});g("Copy",function(){console.log("todo")});g();g("Close",d);g("Close others",function(e){o.find('a[role="tab"]').each(function(){var t=n(this).attr("aria-controls");t!=e&&d(t)})});g("Close all",function(){o.find('a[role="tab"]').each(function(){d(n(this).attr("aria-controls"))})})};var c=function(e){o.find('a[aria-controls="'+e+'"]').tab("show")},d=function(e){i.tabs[e].destroy();delete i.tabs[e];delete r.tabs[e];var s=r.tabOrder.indexOf(e);s>-1&&r.tabOrder.splice(s,1);var a=null;r.tabOrder[s]?a=s:r.tabOrder[s-1]&&(a=s-1);null!==a&&c(r.tabOrder[a]);o.find('a[href="#'+e+'"]').closest("li").remove();n("#"+e).remove();t.store()},f=function(s){var u=!s;s||(s=p());"tabs"in r||(r.tabs={});var c=r.tabs[s]?r.tabs[s].name:l(),f=n("<a>",{href:"#"+s,"aria-controls":s,role:"tab","data-toggle":"tab"}).click(function(e){e.preventDefault();n(this).tab("show");i.tabs[s].yasqe.refresh()}).on("shown.bs.tab",function(){r.selected=n(this).attr("aria-controls");i.tabs[s].onShow();t.store()}).append(n("<span>").text(c)).append(n("<button>",{"class":"close",type:"button"}).text("x").click(function(){d(s)})),h=n("<div><input></div>"),g=n("<li>",{role:"presentation"}).append(f).append(h).dblclick(function(){var e=n(this),i=e.find("span").text();e.addClass("rename");e.find("input").val(i);e.onOutsideClick(function(){var n=e.find('a[role="tab"]').attr("aria-controls"),i=e.find("input").val();f.find("span").text(e.find("input").val());r.tabs[n].name=i;t.store();e.removeClass("rename")})}).bind("contextmenu",function(e){e.preventDefault();a.show().onOutsideClick(function(){a.hide()},{allowedElements:n(this).closest("li")}).addClass("open").position({my:"left top-3",at:"left bottom",of:n(this),collision:"fit"}).attr("target-tab",g.find('a[role="tab"]').attr("aria-controls"))});o.find('li:has(a[role="addTab"])').before(g);u&&r.tabOrder.push(s);i.tabs[s]=e("./tab.js")(t,s,c);(u||r.selected==s)&&f.tab("show")};i.current=function(){return i.tabs[r.selected]};return i}},{"./imgs.js":87,"./shareLink.js":93,"./tab.js":94,jquery:void 0,"jquery-ui/position":3,"yasgui-utils":9}],96:[function(e,t){"use strict";var n=function(){try{return e("jquery")}catch(t){return window.jQuery}}(),r=e("./imgs.js"),i=e("yasgui-utils");t.exports=function(e,t){var o,s,a,l,u,p,c,d=null,f=null,h=null,g=null,m=null,E=function(){d=n("<nav>",{"class":"menu-slide",id:"navmenu"});d.append(n(i.svg.getElement(r.yasgui,{width:"70px",height:"58px"})).addClass("yasguiLogo"));f=n("<div>",{role:"tabpanel"}).appendTo(d);h=n("<ul>",{"class":"nav nav-pills tabPaneMenuTabs",role:"tablist"}).appendTo(f);g=n("<div>",{"class":"tab-content"}).appendTo(f);var e=n("<li>",{role:"presentation"}).appendTo(h),E="yasgui_reqConfig_"+t.persistentOptions.id;e.append(n("<a>",{href:"#"+E,"aria-controls":E,role:"tab","data-toggle":"tab"}).text("Configure Request").click(function(e){e.preventDefault();n(this).tab("show")}));var v=n("<div>",{id:E,role:"tabpanel","class":"tab-pane requestConfig container-fluid"}).appendTo(g),x=n("<div>",{"class":"row"}).appendTo(v);n("<div>",{"class":"col-md-4 rowLabel"}).appendTo(x).append(n("<span>").text("Request Method"));o=n("<button>",{"class":"btn btn-default ","data-toggle":"button"}).text("POST").click(function(){o.addClass("active");s.removeClass("active")});s=n("<button>",{"class":"btn btn-default","data-toggle":"button"}).text("GET").click(function(){s.addClass("active");o.removeClass("active")});n("<div>",{"class":"btn-group col-md-8",role:"group"}).append(s).append(o).appendTo(x);var y=n("<div>",{"class":"row"}).appendTo(v);n("<div>",{"class":"col-md-4 rowLabel"}).appendTo(y).text("Accept Headers");a=n("<select>",{"class":"form-control"}).append(n("<option>",{value:"application/sparql-results+json"}).text("JSON")).append(n("<option>",{value:"application/sparql-results+xml"}).text("XML")).append(n("<option>",{value:"text/csv"}).text("CSV")).append(n("<option>",{value:"text/tab-separated-values"}).text("TSV"));l=n("<select>",{"class":"form-control"}).append(n("<option>",{value:"text/turtle"}).text("Turtle")).append(n("<option>",{value:"application/rdf+xml"}).text("RDF-XML")).append(n("<option>",{value:"text/csv"}).text("CSV")).append(n("<option>",{value:"text/tab-separated-values"}).text("TSV"));n("<div>",{"class":"col-md-4",role:"group"}).append(n("<label>").text("SELECT").append(a)).appendTo(y);n("<div>",{"class":"col-md-4",role:"group"}).append(n("<label>").text("Graph").append(l)).appendTo(y);var N=n("<div>",{"class":"row"}).appendTo(v);n("<div>",{"class":"col-md-4 rowLabel"}).appendTo(N).text("URL Arguments");u=n("<div>",{"class":"col-md-8",role:"group"}).appendTo(N);var I=n("<div>",{"class":"row"}).appendTo(v);n("<div>",{"class":"col-md-4 rowLabel"}).appendTo(I).text("Default graphs");p=n("<div>",{"class":"col-md-8",role:"group"}).appendTo(I);var A=n("<div>",{"class":"row"}).appendTo(v);n("<div>",{"class":"col-md-4 rowLabel"}).appendTo(A).text("Named graphs");c=n("<div>",{"class":"col-md-8",role:"group"}).appendTo(A);var e=n("<li>",{role:"presentation"}).appendTo(h),T="yasgui_history_"+t.persistentOptions.id;e.append(n("<a>",{href:"#"+T,"aria-controls":T,role:"tab","data-toggle":"tab"}).text("History").click(function(e){e.preventDefault();n(this).tab("show")}));var L=n("<div>",{id:T,role:"tabpanel","class":"tab-pane history container-fluid"}).appendTo(g);m=n("<ul>",{"class":"list-group"}).appendTo(L);var e=n("<li>",{role:"presentation"}).appendTo(h),S="yasgui_collections_"+t.persistentOptions.id;e.append(n("<a>",{href:"#"+S,"aria-controls":S,role:"tab","data-toggle":"tab"}).text("Collections").click(function(e){e.preventDefault();n(this).tab("show")}));var v=n("<div>",{id:S,role:"tabpanel","class":"tab-pane collections container-fluid"}).appendTo(g);return d},v=function(e,t,r,i){for(var o=n("<div>",{"class":"textInputsRow"}),s=0;t>s;s++){var a=i&&i[s]?i[s]:"";n("<input>",{type:"text"}).val(a).keyup(function(){var r=!1;e.find(".textInputsRow:last input").each(function(e,t){n(t).val().trim().length>0&&(r=!0)});r&&v(e,t,!0)}).css("width",92/t+"%").appendTo(o)}o.append(n("<button>",{"class":"close",type:"button"}).text("x").click(function(){n(this).closest(".textInputsRow").remove()}));r?o.hide().appendTo(e).show("fast"):o.appendTo(e)},x=function(){0==d.find(".tabPaneMenuTabs li.active").length&&d.find(".tabPaneMenuTabs a:first").tab("show");var r=t.persistentOptions.yasqe;"POST"==r.sparql.requestMethod.toUpperCase()?o.addClass("active"):s.addClass("active");l.val(r.sparql.acceptHeaderGraph);a.val(r.sparql.acceptHeaderSelect);u.empty();r.sparql.args&&r.sparql.args.length>0&&r.sparql.args.forEach(function(e){var t=[e.name,e.value];v(u,2,!1,t)});v(u,2,!1);p.empty();r.sparql.defaultGraphs&&r.sparql.defaultGraphs.length>0&&v(p,1,!1,r.sparql.defaultGraphs);v(p,1,!1);c.empty();r.sparql.namedGraphs&&r.sparql.namedGraphs.length>0&&v(c,1,!1,r.sparql.namedGraphs);v(c,1,!1);m.empty();0==e.history.length?m.append(n("<a>",{"class":"list-group-item disabled",href:"#"}).text("No items in history yet").click(function(e){e.preventDefault()})):e.history.forEach(function(t){var r=t.options.yasqe.sparql.endpoint;t.resultSize&&(r+=" ("+t.resultSize+" results)");m.append(n("<a>",{"class":"list-group-item",href:"#",title:t.options.yasqe.value}).text(r).click(function(r){var i=e.tabManager.tabs[t.options.id];n.extend(!0,i.persistentOptions,t.options);i.refreshYasqe();e.store();d.closest(".tab-pane").removeClass("menu-open");r.preventDefault()}))})},y=function(){var r=t.persistentOptions.yasqe.sparql;o.hasClass("active")?r.requestMethod="POST":s.hasClass("active")&&(r.requestMethod="GET");r.acceptHeaderGraph=l.val();r.acceptHeaderSelect=a.val();var i=[];u.find("div").each(function(e,t){var r=[];n(t).find("input").each(function(e,t){r.push(n(t).val())});r[0]&&r[0].trim().length>0&&i.push({name:r[0],value:r[1]?r[1]:""})});r.args=i;var d=[];p.find("div").each(function(e,t){var r=[];n(t).find("input").each(function(e,t){r.push(n(t).val())});r[0]&&r[0].trim().length>0&&d.push(r[0])});r.defaultGraphs=d;var f=[];c.find("div").each(function(e,t){var r=[];n(t).find("input").each(function(e,t){r.push(n(t).val())});r[0]&&r[0].trim().length>0&&f.push(r[0])});r.namedGraphs=f;e.store();t.setPersistentInYasqe()};return{initWrapper:E,updateWrapper:x,store:y}}},{"./imgs.js":87,jquery:void 0,"yasgui-utils":9}],97:[function(e,t){(function(){try{return e("jquery")}catch(t){return window.jQuery}})();t.exports={escapeHtmlEntities:function(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;"},n=function(e){return t[e]||e};return e.replace(/[&<>]/g,n)}}},{jquery:void 0}]},{},[1])(1)}); //# sourceMappingURL=yasgui.min.js.map
src/index.js
Aikk/gallery-by-react
import 'core-js/fn/object/assign'; import React from 'react'; import ReactDOM from 'react-dom'; import App from './components/Main'; // Render the main component into the dom ReactDOM.render(<App />, document.getElementById('app'));
src/svg-icons/action/view-array.js
manchesergit/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionViewArray = (props) => ( <SvgIcon {...props}> <path d="M4 18h3V5H4v13zM18 5v13h3V5h-3zM8 18h9V5H8v13z"/> </SvgIcon> ); ActionViewArray = pure(ActionViewArray); ActionViewArray.displayName = 'ActionViewArray'; ActionViewArray.muiName = 'SvgIcon'; export default ActionViewArray;
src/components/Map/AddLocation.js
Angular-Toast/habitat
import React, { Component } from 'react'; import { StyleSheet, Text, View, Animated, Image, Dimensions, TextInput } from "react-native"; import { GooglePlacesAutocomplete } from 'react-native-google-places-autocomplete'; import { StackNavigator, NavigationActions } from 'react-navigation'; import axios from 'axios'; export default class AddLocation extends React.Component { static navigationOptions = { title: 'Add a location!', }; constructor(props) { super(props); this.state = { user: this.props.screenProps.userID, avatar: '', title: '', description: '' }; } componentDidMount() { this.setState({ // user: this.props.navigation.state.params.user_ID, avatar: this.props.navigation.state.params.avatar, title: this.props.navigation.state.params.title, description: this.props.navigation.state.params.description, eco: this.props.navigation.state.params.eco }) } newLocation(coords) { let longitude = coords.lng; let latitude = coords.lat; axios.post('http://10.16.1.152:3000/newLocation', { user_ID: this.state.user, avatar: this.state.avatar, title: this.state.title, description: this.state.description, longitude: longitude, latitude: latitude, eco: this.state.eco }) .catch(err => console.error(err)) } render() { const { params } = this.props.navigation.state; if (this.state.avatar !== '') { return ( <View style={styles.container}> <Image source={images[this.state.avatar][1]} style={styles.ecobuds}/> <Text style={styles.cardtitle}>{this.state.title}</Text> <GooglePlacesAutocomplete placeholder='Enter Location' minLength={2} autoFocus={false} returnKeyType={'default'} fetchDetails={true} currentLocation={true} query={{ key: "AIzaSyBR1txfFIJaA2u4K37nDV3jlXPMuYVzFK4", language: 'en', // language of the results types: 'address' // default: 'geocode' }} onPress={(data, details = null) => { // 'details' is provided when fetchDetails = true this.newLocation(details.geometry.location); this.props.navigation.dispatch(NavigationActions.reset({ index: 0, actions: [ NavigationActions.navigate({routeName: 'Map'}) ] })) }} /> </View> ) } else { return null; } } } const images = [ [0, require("../assets/Ecosystem/home.png")], [1, require("../assets/Ecosystem/work.png")], [2, require("../assets/Ecosystem/gym.png")] ] const styles = StyleSheet.create({ container: { flex: 1, alignItems: 'center' }, ecobuds: { width: 100, height: 100 }, cardtitle: { fontSize: 20, marginTop: 5, fontWeight: "bold", } })
app/components/Toggle/index.js
Cherchercher/Wedding-Llama
/** * * LocaleToggle * */ import React from 'react'; import Select from './Select'; import ToggleOption from '../ToggleOption'; function Toggle(props) { let content = (<option>--</option>); // If we have items, render them if (props.values) { content = props.values.map((value) => ( <ToggleOption key={value} value={value} message={props.messages[value]} /> )); } return ( <Select value={props.value} onChange={props.onToggle}> {content} </Select> ); } Toggle.propTypes = { onToggle: React.PropTypes.func, values: React.PropTypes.array, value: React.PropTypes.string, messages: React.PropTypes.object, }; export default Toggle;
app/containers/SignIn/index.js
Jasonlucas724/Digimortal
/* * * SignIn * */ import React from 'react'; import Helmet from 'react-helmet'; export default class SignIn extends React.PureComponent { render() { const div1={ display:"flex", flexDirection:"column", width:"200px", height:"100%", color:"#000000", background:"black", marginTop:"100px", marginLeft:"40%" } const inputOne={ display:"flex", height:"35px", color:"white", fontFamily:"Roboto, sans serif", } const div2={ display:"flex", flexDirection:"column", justifyContent:"space-between", width:"200px", height:"40px", marginTop:"10px", marginLeft:"40%" } const inputTwo={ display:"flex", height:"35px", color:"white", fontFamily:"Roboto", background:"black", fontFamily:"Roboto" } const textArea={ display:"flex", flexDirection:"row", justifyContent:"space-between", border:"2px solid black", color:"black", } return ( <div> <Helmet title="SignIn" meta={[ { name: 'description', content: 'Description of SignIn' }]}/> <div style={div1}> <input style={inputOne} type="text" placeholder="Username" /> </div> <div style={div2}> <input style={inputTwo} type="text" placeholder="Password" /> </div> </div> ); } }
react-dev/components/post_index_item.js
WDTAnyMore/WDTAnyMore.github.io
import React from 'react'; import _ from 'lodash'; import Paper from 'material-ui/Paper'; import FontIcon from 'material-ui/FontIcon'; import RaisedButton from 'material-ui/RaisedButton'; import Chip from 'material-ui/Chip'; const styles = { wrapper: { display: 'flex', flexWrap: 'wrap', textAlign: 'left', }, chip: { margin: 4, } }; const renderChips = (data) => data.map((tag) => ( <Chip key={tag} style={styles.chip}> {tag} </Chip>)); const createMarkup = (post) => { let body = post.body.split(' '); body = body.slice(1, 50); body = body.join(' '); return `${body}...`; }; const getCategories = (categories) => categories.map((cat) => `${cat} `); const getDate = (dateString) => { const date = new Date(dateString.split(' ')[0]); return date.toDateString(); }; const getReadTime = (post) => { const count = post.body.split(' ').length; const readingTime = (count / 233).toFixed(1); return `Reading time ${readingTime} min. Word count: ${count}`; }; const renderPosts = (props) => _.reverse(props.posts.map((post) => { const postLink = `${props.siteInfo.url}${post.url}`; return ( <Paper key={post.title} zDepth={4} className="paper-wrapper" > <li key={post.title}> <a href={postLink}><strong><h2>{post.title}</h2></strong></a> <div className="post-meta"> <ul> <li> <time>{getDate(post.meta.date)}</time> </li> <li className='divider'>/</li> <li>{getCategories(post.meta.categories)}</li> <li className='divider'>/</li> <li>{getReadTime(post)}</li> </ul> </div> <p>{createMarkup(post)}</p> <div className="div-container"> <a href={postLink} > <RaisedButton label="Read More" labelPosition="before" secondary icon={<FontIcon className="material-icons">&#xE037;</FontIcon>} className="raised-button-override" /> </a> </div> <div style={styles.wrapper}> {renderChips(post.meta.tags)} </div> </li> </Paper> ); })); export const PostIndexItem = (props) => { if (_.isEmpty(props.posts)) { return <li> No Results </li>; } return ( <ul> {renderPosts(props)} </ul> ); };
Console/app/node_modules/rc-input-number/es/index.ios.js
RisenEsports/RisenEsports.github.io
import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import { Text, TextInput, TouchableWithoutFeedback, View } from 'react-native'; import mixin from './mixin'; var InputNumber = createReactClass({ propTypes: { styles: PropTypes.object, style: PropTypes.object, upStyle: PropTypes.object, downStyle: PropTypes.object, inputStyle: PropTypes.object, onChange: PropTypes.func, onFocus: PropTypes.func, onBlur: PropTypes.func, max: PropTypes.number, min: PropTypes.number, autoFocus: PropTypes.bool, disabled: PropTypes.bool, step: PropTypes.number, value: PropTypes.number, defaultValue: PropTypes.number, readOnly: PropTypes.bool, keyboardType: PropTypes.string }, mixins: [mixin], onPressIn: function onPressIn(type) { if (this.props.disabled) { return; } var styles = this.props.styles; this[type].setNativeProps({ style: [styles.stepWrap, styles.highlightStepBorderColor] }); this[type + 'Text'].setNativeProps({ style: [styles.stepText, styles.highlightStepTextColor] }); }, onPressOut: function onPressOut(type) { if (this.props.disabled) { return; } var styles = this.props.styles; this[type].setNativeProps({ style: [styles.stepWrap] }); this[type + 'Text'].setNativeProps({ style: [styles.stepText] }); }, onPressInDown: function onPressInDown(e) { this.onPressIn('_stepDown'); this.down(e, true); }, onPressOutDown: function onPressOutDown() { this.onPressOut('_stepDown'); this.stop(); }, onPressInUp: function onPressInUp(e) { this.onPressIn('_stepUp'); this.up(e, true); }, onPressOutUp: function onPressOutUp() { this.onPressOut('_stepUp'); this.stop(); }, getValueFromEvent: function getValueFromEvent(e) { return e.nativeEvent.text; }, render: function render() { var _this = this; var props = this.props, state = this.state; var _props = this.props, style = _props.style, upStyle = _props.upStyle, downStyle = _props.downStyle, inputStyle = _props.inputStyle, styles = _props.styles; var editable = !this.props.readOnly && !this.props.disabled; var upDisabledStyle = null; var downDisabledStyle = null; var upDisabledTextStyle = null; var downDisabledTextStyle = null; var value = state.value; if (!isNaN(value)) { var val = Number(value); if (val >= props.max) { upDisabledStyle = styles.stepDisabled; upDisabledTextStyle = styles.disabledStepTextColor; } if (val <= props.min) { downDisabledStyle = styles.stepDisabled; downDisabledTextStyle = styles.disabledStepTextColor; } } else { upDisabledStyle = styles.stepDisabled; downDisabledStyle = styles.stepDisabled; upDisabledTextStyle = styles.disabledStepTextColor; downDisabledTextStyle = styles.disabledStepTextColor; } var inputDisabledStyle = null; if (props.disabled) { upDisabledStyle = styles.stepDisabled; downDisabledStyle = styles.stepDisabled; upDisabledTextStyle = styles.disabledStepTextColor; downDisabledTextStyle = styles.disabledStepTextColor; inputDisabledStyle = styles.disabledStepTextColor; } var inputDisplayValue = void 0; if (state.focused) { inputDisplayValue = '' + state.inputValue; } else { inputDisplayValue = '' + state.value; } if (inputDisplayValue === undefined) { inputDisplayValue = ''; } return React.createElement( View, { style: [styles.container, style] }, React.createElement( TouchableWithoutFeedback, { onPressIn: editable && !downDisabledStyle ? this.onPressInDown : undefined, onPressOut: editable && !downDisabledStyle ? this.onPressOutDown : undefined, accessible: true, accessibilityLabel: 'Decrease Value', accessibilityComponentType: 'button', accessibilityTraits: editable && !downDisabledStyle ? 'button' : 'disabled' }, React.createElement( View, { ref: function ref(component) { return _this._stepDown = component; }, style: [styles.stepWrap, downDisabledStyle, downStyle] }, React.createElement( Text, { ref: function ref(component) { return _this._stepDownText = component; }, style: [styles.stepText, downDisabledTextStyle] }, '-' ) ) ), React.createElement(TextInput, { style: [styles.input, inputDisabledStyle, inputStyle], ref: 'input', value: inputDisplayValue, autoFocus: props.autoFocus, editable: editable, onFocus: this.onFocus, onEndEditing: this.onBlur, onChange: this.onChange, underlineColorAndroid: 'transparent', keyboardType: props.keyboardType }), React.createElement( TouchableWithoutFeedback, { onPressIn: editable && !upDisabledStyle ? this.onPressInUp : undefined, onPressOut: editable && !upDisabledStyle ? this.onPressOutUp : undefined, accessible: true, accessibilityLabel: 'Increase Value', accessibilityComponentType: 'button', accessibilityTraits: editable && !upDisabledStyle ? 'button' : 'disabled' }, React.createElement( View, { ref: function ref(component) { return _this._stepUp = component; }, style: [styles.stepWrap, upDisabledStyle, upStyle] }, React.createElement( Text, { ref: function ref(component) { return _this._stepUpText = component; }, style: [styles.stepText, upDisabledTextStyle] }, '+' ) ) ) ); } }); export default InputNumber;
react/example/app.js
text-mask/text-mask
import React from 'react' import MaskedInput from '../src/reactTextMask' export default () => ( <form className='form-horizontal'> <div className='form-group'> <label htmlFor='1' className='col-sm-2 control-label'>Masked input</label> <div className='col-sm-10'> <MaskedInput mask={['(', /[1-9]/, /\d/, /\d/, ')', ' ', /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/]} className='form-control' id='1' type='text' /> </div> </div> </form> )
files/babel/5.4.0/browser-polyfill.js
justincy/jsdelivr
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ (function (global){ "use strict"; require("core-js/shim"); require("regenerator/runtime"); if (global._babelPolyfill) { throw new Error("only one instance of babel/polyfill is allowed"); } global._babelPolyfill = true; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{"core-js/shim":78,"regenerator/runtime":79}],2:[function(require,module,exports){ 'use strict'; // false -> Array#indexOf // true -> Array#includes var $ = require('./$'); module.exports = function(IS_INCLUDES){ return function(el /*, fromIndex = 0 */){ var O = $.toObject(this) , length = $.toLength(O.length) , index = $.toIndex(arguments[1], length) , value; if(IS_INCLUDES && el != el)while(length > index){ value = O[index++]; if(value != value)return true; } else for(;length > index; index++)if(IS_INCLUDES || index in O){ if(O[index] === el)return IS_INCLUDES || index; } return !IS_INCLUDES && -1; }; }; },{"./$":21}],3:[function(require,module,exports){ 'use strict'; // 0 -> Array#forEach // 1 -> Array#map // 2 -> Array#filter // 3 -> Array#some // 4 -> Array#every // 5 -> Array#find // 6 -> Array#findIndex var $ = require('./$') , ctx = require('./$.ctx'); module.exports = function(TYPE){ var IS_MAP = TYPE == 1 , IS_FILTER = TYPE == 2 , IS_SOME = TYPE == 3 , IS_EVERY = TYPE == 4 , IS_FIND_INDEX = TYPE == 6 , NO_HOLES = TYPE == 5 || IS_FIND_INDEX; return function(callbackfn/*, that = undefined */){ var O = Object($.assertDefined(this)) , self = $.ES5Object(O) , f = ctx(callbackfn, arguments[1], 3) , length = $.toLength(self.length) , index = 0 , result = IS_MAP ? Array(length) : IS_FILTER ? [] : undefined , val, res; for(;length > index; index++)if(NO_HOLES || index in self){ val = self[index]; res = f(val, index, O); if(TYPE){ if(IS_MAP)result[index] = res; // map else if(res)switch(TYPE){ case 3: return true; // some case 5: return val; // find case 6: return index; // findIndex case 2: result.push(val); // filter } else if(IS_EVERY)return false; // every } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; }; }; },{"./$":21,"./$.ctx":11}],4:[function(require,module,exports){ var $ = require('./$'); function assert(condition, msg1, msg2){ if(!condition)throw TypeError(msg2 ? msg1 + msg2 : msg1); } assert.def = $.assertDefined; assert.fn = function(it){ if(!$.isFunction(it))throw TypeError(it + ' is not a function!'); return it; }; assert.obj = function(it){ if(!$.isObject(it))throw TypeError(it + ' is not an object!'); return it; }; assert.inst = function(it, Constructor, name){ if(!(it instanceof Constructor))throw TypeError(name + ": use the 'new' operator!"); return it; }; module.exports = assert; },{"./$":21}],5:[function(require,module,exports){ var $ = require('./$') , enumKeys = require('./$.enum-keys'); // 19.1.2.1 Object.assign(target, source, ...) /* eslint-disable no-unused-vars */ module.exports = Object.assign || function assign(target, source){ /* eslint-enable no-unused-vars */ var T = Object($.assertDefined(target)) , l = arguments.length , i = 1; while(l > i){ var S = $.ES5Object(arguments[i++]) , keys = enumKeys(S) , length = keys.length , j = 0 , key; while(length > j)T[key = keys[j++]] = S[key]; } return T; }; },{"./$":21,"./$.enum-keys":13}],6:[function(require,module,exports){ var $ = require('./$') , TAG = require('./$.wks')('toStringTag') , toString = {}.toString; function cof(it){ return toString.call(it).slice(8, -1); } cof.classof = function(it){ var O, T; return it == undefined ? it === undefined ? 'Undefined' : 'Null' : typeof (T = (O = Object(it))[TAG]) == 'string' ? T : cof(O); }; cof.set = function(it, tag, stat){ if(it && !$.has(it = stat ? it : it.prototype, TAG))$.hide(it, TAG, tag); }; module.exports = cof; },{"./$":21,"./$.wks":32}],7:[function(require,module,exports){ 'use strict'; var $ = require('./$') , ctx = require('./$.ctx') , safe = require('./$.uid').safe , assert = require('./$.assert') , forOf = require('./$.for-of') , step = require('./$.iter').step , has = $.has , set = $.set , isObject = $.isObject , hide = $.hide , isFrozen = Object.isFrozen || $.core.Object.isFrozen , ID = safe('id') , O1 = safe('O1') , LAST = safe('last') , FIRST = safe('first') , ITER = safe('iter') , SIZE = $.DESC ? safe('size') : 'size' , id = 0; function fastKey(it, create){ // return primitive with prefix if(!isObject(it))return (typeof it == 'string' ? 'S' : 'P') + it; // can't set id to frozen object if(isFrozen(it))return 'F'; if(!has(it, ID)){ // not necessary to add id if(!create)return 'E'; // add missing object id hide(it, ID, ++id); // return object id with prefix } return 'O' + it[ID]; } function getEntry(that, key){ // fast case var index = fastKey(key), entry; if(index != 'F')return that[O1][index]; // frozen object case for(entry = that[FIRST]; entry; entry = entry.n){ if(entry.k == key)return entry; } } module.exports = { getConstructor: function(NAME, IS_MAP, ADDER){ function C(){ var that = assert.inst(this, C, NAME) , iterable = arguments[0]; set(that, O1, $.create(null)); set(that, SIZE, 0); set(that, LAST, undefined); set(that, FIRST, undefined); if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); } $.mix(C.prototype, { // 23.1.3.1 Map.prototype.clear() // 23.2.3.2 Set.prototype.clear() clear: function clear(){ for(var that = this, data = that[O1], entry = that[FIRST]; entry; entry = entry.n){ entry.r = true; if(entry.p)entry.p = entry.p.n = undefined; delete data[entry.i]; } that[FIRST] = that[LAST] = undefined; that[SIZE] = 0; }, // 23.1.3.3 Map.prototype.delete(key) // 23.2.3.4 Set.prototype.delete(value) 'delete': function(key){ var that = this , entry = getEntry(that, key); if(entry){ var next = entry.n , prev = entry.p; delete that[O1][entry.i]; entry.r = true; if(prev)prev.n = next; if(next)next.p = prev; if(that[FIRST] == entry)that[FIRST] = next; if(that[LAST] == entry)that[LAST] = prev; that[SIZE]--; } return !!entry; }, // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) forEach: function forEach(callbackfn /*, that = undefined */){ var f = ctx(callbackfn, arguments[1], 3) , entry; while(entry = entry ? entry.n : this[FIRST]){ f(entry.v, entry.k, this); // revert to the last existing entry while(entry && entry.r)entry = entry.p; } }, // 23.1.3.7 Map.prototype.has(key) // 23.2.3.7 Set.prototype.has(value) has: function has(key){ return !!getEntry(this, key); } }); if($.DESC)$.setDesc(C.prototype, 'size', { get: function(){ return assert.def(this[SIZE]); } }); return C; }, def: function(that, key, value){ var entry = getEntry(that, key) , prev, index; // change existing entry if(entry){ entry.v = value; // create new entry } else { that[LAST] = entry = { i: index = fastKey(key, true), // <- index k: key, // <- key v: value, // <- value p: prev = that[LAST], // <- previous entry n: undefined, // <- next entry r: false // <- removed }; if(!that[FIRST])that[FIRST] = entry; if(prev)prev.n = entry; that[SIZE]++; // add to index if(index != 'F')that[O1][index] = entry; } return that; }, getEntry: getEntry, // add .keys, .values, .entries, [@@iterator] // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 setIter: function(C, NAME, IS_MAP){ require('./$.iter-define')(C, NAME, function(iterated, kind){ set(this, ITER, {o: iterated, k: kind}); }, function(){ var iter = this[ITER] , kind = iter.k , entry = iter.l; // revert to the last existing entry while(entry && entry.r)entry = entry.p; // get next entry if(!iter.o || !(iter.l = entry = entry ? entry.n : iter.o[FIRST])){ // or finish the iteration iter.o = undefined; return step(1); } // return step by kind if(kind == 'keys' )return step(0, entry.k); if(kind == 'values')return step(0, entry.v); return step(0, [entry.k, entry.v]); }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true); } }; },{"./$":21,"./$.assert":4,"./$.ctx":11,"./$.for-of":14,"./$.iter":20,"./$.iter-define":18,"./$.uid":30}],8:[function(require,module,exports){ // https://github.com/DavidBruant/Map-Set.prototype.toJSON var $def = require('./$.def') , forOf = require('./$.for-of'); module.exports = function(NAME){ $def($def.P, NAME, { toJSON: function toJSON(){ var arr = []; forOf(this, false, arr.push, arr); return arr; } }); }; },{"./$.def":12,"./$.for-of":14}],9:[function(require,module,exports){ 'use strict'; var $ = require('./$') , safe = require('./$.uid').safe , assert = require('./$.assert') , forOf = require('./$.for-of') , _has = $.has , isObject = $.isObject , hide = $.hide , isFrozen = Object.isFrozen || $.core.Object.isFrozen , id = 0 , ID = safe('id') , WEAK = safe('weak') , LEAK = safe('leak') , method = require('./$.array-methods') , find = method(5) , findIndex = method(6); function findFrozen(store, key){ return find.call(store.array, function(it){ return it[0] === key; }); } // fallback for frozen keys function leakStore(that){ return that[LEAK] || hide(that, LEAK, { array: [], get: function(key){ var entry = findFrozen(this, key); if(entry)return entry[1]; }, has: function(key){ return !!findFrozen(this, key); }, set: function(key, value){ var entry = findFrozen(this, key); if(entry)entry[1] = value; else this.array.push([key, value]); }, 'delete': function(key){ var index = findIndex.call(this.array, function(it){ return it[0] === key; }); if(~index)this.array.splice(index, 1); return !!~index; } })[LEAK]; } module.exports = { getConstructor: function(NAME, IS_MAP, ADDER){ function C(){ $.set(assert.inst(this, C, NAME), ID, id++); var iterable = arguments[0]; if(iterable != undefined)forOf(iterable, IS_MAP, this[ADDER], this); } $.mix(C.prototype, { // 23.3.3.2 WeakMap.prototype.delete(key) // 23.4.3.3 WeakSet.prototype.delete(value) 'delete': function(key){ if(!isObject(key))return false; if(isFrozen(key))return leakStore(this)['delete'](key); return _has(key, WEAK) && _has(key[WEAK], this[ID]) && delete key[WEAK][this[ID]]; }, // 23.3.3.4 WeakMap.prototype.has(key) // 23.4.3.4 WeakSet.prototype.has(value) has: function has(key){ if(!isObject(key))return false; if(isFrozen(key))return leakStore(this).has(key); return _has(key, WEAK) && _has(key[WEAK], this[ID]); } }); return C; }, def: function(that, key, value){ if(isFrozen(assert.obj(key))){ leakStore(that).set(key, value); } else { _has(key, WEAK) || hide(key, WEAK, {}); key[WEAK][that[ID]] = value; } return that; }, leakStore: leakStore, WEAK: WEAK, ID: ID }; },{"./$":21,"./$.array-methods":3,"./$.assert":4,"./$.for-of":14,"./$.uid":30}],10:[function(require,module,exports){ 'use strict'; var $ = require('./$') , $def = require('./$.def') , BUGGY = require('./$.iter').BUGGY , forOf = require('./$.for-of') , species = require('./$.species') , assertInstance = require('./$.assert').inst; module.exports = function(NAME, methods, common, IS_MAP, IS_WEAK){ var Base = $.g[NAME] , C = Base , ADDER = IS_MAP ? 'set' : 'add' , proto = C && C.prototype , O = {}; function fixMethod(KEY, CHAIN){ var method = proto[KEY]; if($.FW)proto[KEY] = function(a, b){ var result = method.call(this, a === 0 ? 0 : a, b); return CHAIN ? this : result; }; } if(!$.isFunction(C) || !(IS_WEAK || !BUGGY && proto.forEach && proto.entries)){ // create collection constructor C = common.getConstructor(NAME, IS_MAP, ADDER); $.mix(C.prototype, methods); } else { var inst = new C , chain = inst[ADDER](IS_WEAK ? {} : -0, 1) , buggyZero; // wrap for init collections from iterable if(!require('./$.iter-detect')(function(iter){ new C(iter); })){ // eslint-disable-line no-new C = function(){ assertInstance(this, C, NAME); var that = new Base , iterable = arguments[0]; if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); return that; }; C.prototype = proto; if($.FW)proto.constructor = C; } IS_WEAK || inst.forEach(function(val, key){ buggyZero = 1 / key === -Infinity; }); // fix converting -0 key to +0 if(buggyZero){ fixMethod('delete'); fixMethod('has'); IS_MAP && fixMethod('get'); } // + fix .add & .set for chaining if(buggyZero || chain !== inst)fixMethod(ADDER, true); } require('./$.cof').set(C, NAME); O[NAME] = C; $def($def.G + $def.W + $def.F * (C != Base), O); species(C); species($.core[NAME]); // for wrapper if(!IS_WEAK)common.setIter(C, NAME, IS_MAP); return C; }; },{"./$":21,"./$.assert":4,"./$.cof":6,"./$.def":12,"./$.for-of":14,"./$.iter":20,"./$.iter-detect":19,"./$.species":27}],11:[function(require,module,exports){ // Optional / simple context binding var assertFunction = require('./$.assert').fn; module.exports = function(fn, that, length){ assertFunction(fn); if(~length && that === undefined)return fn; switch(length){ case 1: return function(a){ return fn.call(that, a); }; case 2: return function(a, b){ return fn.call(that, a, b); }; case 3: return function(a, b, c){ return fn.call(that, a, b, c); }; } return function(/* ...args */){ return fn.apply(that, arguments); }; }; },{"./$.assert":4}],12:[function(require,module,exports){ var $ = require('./$') , global = $.g , core = $.core , isFunction = $.isFunction; function ctx(fn, that){ return function(){ return fn.apply(that, arguments); }; } global.core = core; // type bitmap $def.F = 1; // forced $def.G = 2; // global $def.S = 4; // static $def.P = 8; // proto $def.B = 16; // bind $def.W = 32; // wrap function $def(type, name, source){ var key, own, out, exp , isGlobal = type & $def.G , target = isGlobal ? global : type & $def.S ? global[name] : (global[name] || {}).prototype , exports = isGlobal ? core : core[name] || (core[name] = {}); if(isGlobal)source = name; for(key in source){ // contains in native own = !(type & $def.F) && target && key in target; // export native or passed out = (own ? target : source)[key]; // bind timers to global for call from export context if(type & $def.B && own)exp = ctx(out, global); else exp = type & $def.P && isFunction(out) ? ctx(Function.call, out) : out; // extend global if(target && !own){ if(isGlobal)target[key] = out; else delete target[key] && $.hide(target, key, out); } // export if(exports[key] != out)$.hide(exports, key, exp); } } module.exports = $def; },{"./$":21}],13:[function(require,module,exports){ var $ = require('./$'); module.exports = function(it){ var keys = $.getKeys(it) , getDesc = $.getDesc , getSymbols = $.getSymbols; if(getSymbols)$.each.call(getSymbols(it), function(key){ if(getDesc(it, key).enumerable)keys.push(key); }); return keys; }; },{"./$":21}],14:[function(require,module,exports){ var ctx = require('./$.ctx') , get = require('./$.iter').get , call = require('./$.iter-call'); module.exports = function(iterable, entries, fn, that){ var iterator = get(iterable) , f = ctx(fn, that, entries ? 2 : 1) , step; while(!(step = iterator.next()).done){ if(call(iterator, f, step.value, entries) === false){ return call.close(iterator); } } }; },{"./$.ctx":11,"./$.iter":20,"./$.iter-call":17}],15:[function(require,module,exports){ module.exports = function($){ $.FW = true; $.path = $.g; return $; }; },{}],16:[function(require,module,exports){ // Fast apply // http://jsperf.lnkit.com/fast-apply/5 module.exports = function(fn, args, that){ var un = that === undefined; switch(args.length){ case 0: return un ? fn() : fn.call(that); case 1: return un ? fn(args[0]) : fn.call(that, args[0]); case 2: return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); case 3: return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); case 4: return un ? fn(args[0], args[1], args[2], args[3]) : fn.call(that, args[0], args[1], args[2], args[3]); case 5: return un ? fn(args[0], args[1], args[2], args[3], args[4]) : fn.call(that, args[0], args[1], args[2], args[3], args[4]); } return fn.apply(that, args); }; },{}],17:[function(require,module,exports){ var assertObject = require('./$.assert').obj; function close(iterator){ var ret = iterator['return']; if(ret !== undefined)assertObject(ret.call(iterator)); } function call(iterator, fn, value, entries){ try { return entries ? fn(assertObject(value)[0], value[1]) : fn(value); } catch(e){ close(iterator); throw e; } } call.close = close; module.exports = call; },{"./$.assert":4}],18:[function(require,module,exports){ var $def = require('./$.def') , $ = require('./$') , cof = require('./$.cof') , $iter = require('./$.iter') , SYMBOL_ITERATOR = require('./$.wks')('iterator') , FF_ITERATOR = '@@iterator' , VALUES = 'values' , Iterators = $iter.Iterators; module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE){ $iter.create(Constructor, NAME, next); function createMethod(kind){ return function(){ return new Constructor(this, kind); }; } var TAG = NAME + ' Iterator' , proto = Base.prototype , _native = proto[SYMBOL_ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] , _default = _native || createMethod(DEFAULT) , methods, key; // Fix native if(_native){ var IteratorPrototype = $.getProto(_default.call(new Base)); // Set @@toStringTag to native iterators cof.set(IteratorPrototype, TAG, true); // FF fix if($.FW && $.has(proto, FF_ITERATOR))$iter.set(IteratorPrototype, $.that); } // Define iterator if($.FW)$iter.set(proto, _default); // Plug for library Iterators[NAME] = _default; Iterators[TAG] = $.that; if(DEFAULT){ methods = { keys: IS_SET ? _default : createMethod('keys'), values: DEFAULT == VALUES ? _default : createMethod(VALUES), entries: DEFAULT != VALUES ? _default : createMethod('entries') }; if(FORCE)for(key in methods){ if(!(key in proto))$.hide(proto, key, methods[key]); } else $def($def.P + $def.F * $iter.BUGGY, NAME, methods); } }; },{"./$":21,"./$.cof":6,"./$.def":12,"./$.iter":20,"./$.wks":32}],19:[function(require,module,exports){ var SYMBOL_ITERATOR = require('./$.wks')('iterator') , SAFE_CLOSING = false; try { var riter = [7][SYMBOL_ITERATOR](); riter['return'] = function(){ SAFE_CLOSING = true; }; Array.from(riter, function(){ throw 2; }); } catch(e){ /* empty */ } module.exports = function(exec){ if(!SAFE_CLOSING)return false; var safe = false; try { var arr = [7] , iter = arr[SYMBOL_ITERATOR](); iter.next = function(){ safe = true; }; arr[SYMBOL_ITERATOR] = function(){ return iter; }; exec(arr); } catch(e){ /* empty */ } return safe; }; },{"./$.wks":32}],20:[function(require,module,exports){ 'use strict'; var $ = require('./$') , cof = require('./$.cof') , assertObject = require('./$.assert').obj , SYMBOL_ITERATOR = require('./$.wks')('iterator') , FF_ITERATOR = '@@iterator' , Iterators = {} , IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() setIterator(IteratorPrototype, $.that); function setIterator(O, value){ $.hide(O, SYMBOL_ITERATOR, value); // Add iterator for FF iterator protocol if(FF_ITERATOR in [])$.hide(O, FF_ITERATOR, value); } module.exports = { // Safari has buggy iterators w/o `next` BUGGY: 'keys' in [] && !('next' in [].keys()), Iterators: Iterators, step: function(done, value){ return {value: value, done: !!done}; }, is: function(it){ var O = Object(it) , Symbol = $.g.Symbol , SYM = Symbol && Symbol.iterator || FF_ITERATOR; return SYM in O || SYMBOL_ITERATOR in O || $.has(Iterators, cof.classof(O)); }, get: function(it){ var Symbol = $.g.Symbol , ext = it[Symbol && Symbol.iterator || FF_ITERATOR] , getIter = ext || it[SYMBOL_ITERATOR] || Iterators[cof.classof(it)]; return assertObject(getIter.call(it)); }, set: setIterator, create: function(Constructor, NAME, next, proto){ Constructor.prototype = $.create(proto || IteratorPrototype, {next: $.desc(1, next)}); cof.set(Constructor, NAME + ' Iterator'); } }; },{"./$":21,"./$.assert":4,"./$.cof":6,"./$.wks":32}],21:[function(require,module,exports){ 'use strict'; var global = typeof self != 'undefined' ? self : Function('return this')() , core = {} , defineProperty = Object.defineProperty , hasOwnProperty = {}.hasOwnProperty , ceil = Math.ceil , floor = Math.floor , max = Math.max , min = Math.min; // The engine works fine with descriptors? Thank's IE8 for his funny defineProperty. var DESC = !!function(){ try { return defineProperty({}, 'a', {get: function(){ return 2; }}).a == 2; } catch(e){ /* empty */ } }(); var hide = createDefiner(1); // 7.1.4 ToInteger function toInteger(it){ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); } function desc(bitmap, value){ return { enumerable : !(bitmap & 1), configurable: !(bitmap & 2), writable : !(bitmap & 4), value : value }; } function simpleSet(object, key, value){ object[key] = value; return object; } function createDefiner(bitmap){ return DESC ? function(object, key, value){ return $.setDesc(object, key, desc(bitmap, value)); } : simpleSet; } function isObject(it){ return it !== null && (typeof it == 'object' || typeof it == 'function'); } function isFunction(it){ return typeof it == 'function'; } function assertDefined(it){ if(it == undefined)throw TypeError("Can't call method on " + it); return it; } var $ = module.exports = require('./$.fw')({ g: global, core: core, html: global.document && document.documentElement, // http://jsperf.com/core-js-isobject isObject: isObject, isFunction: isFunction, it: function(it){ return it; }, that: function(){ return this; }, // 7.1.4 ToInteger toInteger: toInteger, // 7.1.15 ToLength toLength: function(it){ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }, toIndex: function(index, length){ index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); }, has: function(it, key){ return hasOwnProperty.call(it, key); }, create: Object.create, getProto: Object.getPrototypeOf, DESC: DESC, desc: desc, getDesc: Object.getOwnPropertyDescriptor, setDesc: defineProperty, setDescs: Object.defineProperties, getKeys: Object.keys, getNames: Object.getOwnPropertyNames, getSymbols: Object.getOwnPropertySymbols, assertDefined: assertDefined, // Dummy, fix for not array-like ES3 string in es5 module ES5Object: Object, toObject: function(it){ return $.ES5Object(assertDefined(it)); }, hide: hide, def: createDefiner(0), set: global.Symbol ? simpleSet : hide, mix: function(target, src){ for(var key in src)hide(target, key, src[key]); return target; }, each: [].forEach }); /* eslint-disable no-undef */ if(typeof __e != 'undefined')__e = core; if(typeof __g != 'undefined')__g = global; },{"./$.fw":15}],22:[function(require,module,exports){ var $ = require('./$'); module.exports = function(object, el){ var O = $.toObject(object) , keys = $.getKeys(O) , length = keys.length , index = 0 , key; while(length > index)if(O[key = keys[index++]] === el)return key; }; },{"./$":21}],23:[function(require,module,exports){ var $ = require('./$') , assertObject = require('./$.assert').obj; module.exports = function ownKeys(it){ assertObject(it); var keys = $.getNames(it) , getSymbols = $.getSymbols; return getSymbols ? keys.concat(getSymbols(it)) : keys; }; },{"./$":21,"./$.assert":4}],24:[function(require,module,exports){ 'use strict'; var $ = require('./$') , invoke = require('./$.invoke') , assertFunction = require('./$.assert').fn; module.exports = function(/* ...pargs */){ var fn = assertFunction(this) , length = arguments.length , pargs = Array(length) , i = 0 , _ = $.path._ , holder = false; while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true; return function(/* ...args */){ var that = this , _length = arguments.length , j = 0, k = 0, args; if(!holder && !_length)return invoke(fn, pargs, that); args = pargs.slice(); if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++]; while(_length > k)args.push(arguments[k++]); return invoke(fn, args, that); }; }; },{"./$":21,"./$.assert":4,"./$.invoke":16}],25:[function(require,module,exports){ 'use strict'; module.exports = function(regExp, replace, isStatic){ var replacer = replace === Object(replace) ? function(part){ return replace[part]; } : replace; return function(it){ return String(isStatic ? it : this).replace(regExp, replacer); }; }; },{}],26:[function(require,module,exports){ // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var $ = require('./$') , assert = require('./$.assert'); function check(O, proto){ assert.obj(O); assert(proto === null || $.isObject(proto), proto, ": can't set as prototype!"); } module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} // eslint-disable-line ? function(buggy, set){ try { set = require('./$.ctx')(Function.call, $.getDesc(Object.prototype, '__proto__').set, 2); set({}, []); } catch(e){ buggy = true; } return function setPrototypeOf(O, proto){ check(O, proto); if(buggy)O.__proto__ = proto; else set(O, proto); return O; }; }() : undefined), check: check }; },{"./$":21,"./$.assert":4,"./$.ctx":11}],27:[function(require,module,exports){ var $ = require('./$') , SPECIES = require('./$.wks')('species'); module.exports = function(C){ if($.DESC && !(SPECIES in C))$.setDesc(C, SPECIES, { configurable: true, get: $.that }); }; },{"./$":21,"./$.wks":32}],28:[function(require,module,exports){ 'use strict'; // true -> String#at // false -> String#codePointAt var $ = require('./$'); module.exports = function(TO_STRING){ return function(pos){ var s = String($.assertDefined(this)) , i = $.toInteger(pos) , l = s.length , a, b; if(i < 0 || i >= l)return TO_STRING ? '' : undefined; a = s.charCodeAt(i); return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; }; },{"./$":21}],29:[function(require,module,exports){ 'use strict'; var $ = require('./$') , ctx = require('./$.ctx') , cof = require('./$.cof') , invoke = require('./$.invoke') , global = $.g , isFunction = $.isFunction , html = $.html , document = global.document , process = global.process , setTask = global.setImmediate , clearTask = global.clearImmediate , postMessage = global.postMessage , addEventListener = global.addEventListener , MessageChannel = global.MessageChannel , counter = 0 , queue = {} , ONREADYSTATECHANGE = 'onreadystatechange' , defer, channel, port; function run(){ var id = +this; if($.has(queue, id)){ var fn = queue[id]; delete queue[id]; fn(); } } function listner(event){ run.call(event.data); } // Node.js 0.9+ & IE10+ has setImmediate, otherwise: if(!isFunction(setTask) || !isFunction(clearTask)){ setTask = function(fn){ var args = [], i = 1; while(arguments.length > i)args.push(arguments[i++]); queue[++counter] = function(){ invoke(isFunction(fn) ? fn : Function(fn), args); }; defer(counter); return counter; }; clearTask = function(id){ delete queue[id]; }; // Node.js 0.8- if(cof(process) == 'process'){ defer = function(id){ process.nextTick(ctx(run, id, 1)); }; // Modern browsers, skip implementation for WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is object } else if(addEventListener && isFunction(postMessage) && !global.importScripts){ defer = function(id){ postMessage(id, '*'); }; addEventListener('message', listner, false); // WebWorkers } else if(isFunction(MessageChannel)){ channel = new MessageChannel; port = channel.port2; channel.port1.onmessage = listner; defer = ctx(port.postMessage, port, 1); // IE8- } else if(document && ONREADYSTATECHANGE in document.createElement('script')){ defer = function(id){ html.appendChild(document.createElement('script'))[ONREADYSTATECHANGE] = function(){ html.removeChild(this); run.call(id); }; }; // Rest old browsers } else { defer = function(id){ setTimeout(ctx(run, id, 1), 0); }; } } module.exports = { set: setTask, clear: clearTask }; },{"./$":21,"./$.cof":6,"./$.ctx":11,"./$.invoke":16}],30:[function(require,module,exports){ var sid = 0; function uid(key){ return 'Symbol(' + key + ')_' + (++sid + Math.random()).toString(36); } uid.safe = require('./$').g.Symbol || uid; module.exports = uid; },{"./$":21}],31:[function(require,module,exports){ // 22.1.3.31 Array.prototype[@@unscopables] var $ = require('./$') , UNSCOPABLES = require('./$.wks')('unscopables'); if($.FW && !(UNSCOPABLES in []))$.hide(Array.prototype, UNSCOPABLES, {}); module.exports = function(key){ if($.FW)[][UNSCOPABLES][key] = true; }; },{"./$":21,"./$.wks":32}],32:[function(require,module,exports){ var global = require('./$').g , store = {}; module.exports = function(name){ return store[name] || (store[name] = global.Symbol && global.Symbol[name] || require('./$.uid').safe('Symbol.' + name)); }; },{"./$":21,"./$.uid":30}],33:[function(require,module,exports){ var $ = require('./$') , cof = require('./$.cof') , $def = require('./$.def') , invoke = require('./$.invoke') , arrayMethod = require('./$.array-methods') , IE_PROTO = require('./$.uid').safe('__proto__') , assert = require('./$.assert') , assertObject = assert.obj , ObjectProto = Object.prototype , A = [] , slice = A.slice , indexOf = A.indexOf , classof = cof.classof , has = $.has , defineProperty = $.setDesc , getOwnDescriptor = $.getDesc , defineProperties = $.setDescs , isFunction = $.isFunction , toObject = $.toObject , toLength = $.toLength , IE8_DOM_DEFINE = false; if(!$.DESC){ try { IE8_DOM_DEFINE = defineProperty(document.createElement('div'), 'x', {get: function(){ return 8; }} ).x == 8; } catch(e){ /* empty */ } $.setDesc = function(O, P, Attributes){ if(IE8_DOM_DEFINE)try { return defineProperty(O, P, Attributes); } catch(e){ /* empty */ } if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); if('value' in Attributes)assertObject(O)[P] = Attributes.value; return O; }; $.getDesc = function(O, P){ if(IE8_DOM_DEFINE)try { return getOwnDescriptor(O, P); } catch(e){ /* empty */ } if(has(O, P))return $.desc(!ObjectProto.propertyIsEnumerable.call(O, P), O[P]); }; $.setDescs = defineProperties = function(O, Properties){ assertObject(O); var keys = $.getKeys(Properties) , length = keys.length , i = 0 , P; while(length > i)$.setDesc(O, P = keys[i++], Properties[P]); return O; }; } $def($def.S + $def.F * !$.DESC, 'Object', { // 19.1.2.6 / 15.2.3.3 Object.getOwnPropertyDescriptor(O, P) getOwnPropertyDescriptor: $.getDesc, // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) defineProperty: $.setDesc, // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) defineProperties: defineProperties }); // IE 8- don't enum bug keys var keys1 = ('constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,' + 'toLocaleString,toString,valueOf').split(',') // Additional keys for getOwnPropertyNames , keys2 = keys1.concat('length', 'prototype') , keysLen1 = keys1.length; // Create object with `null` prototype: use iframe Object with cleared prototype var createDict = function(){ // Thrash, waste and sodomy: IE GC bug var iframe = document.createElement('iframe') , i = keysLen1 , gt = '>' , iframeDocument; iframe.style.display = 'none'; $.html.appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write('<script>document.F=Object</script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while(i--)delete createDict.prototype[keys1[i]]; return createDict(); }; function createGetKeys(names, length){ return function(object){ var O = toObject(object) , i = 0 , result = [] , key; for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); // Don't enum bug & hidden keys while(length > i)if(has(O, key = names[i++])){ ~indexOf.call(result, key) || result.push(key); } return result; }; } function isPrimitive(it){ return !$.isObject(it); } function Empty(){} $def($def.S, 'Object', { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) getPrototypeOf: $.getProto = $.getProto || function(O){ O = Object(assert.def(O)); if(has(O, IE_PROTO))return O[IE_PROTO]; if(isFunction(O.constructor) && O instanceof O.constructor){ return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; }, // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) getOwnPropertyNames: $.getNames = $.getNames || createGetKeys(keys2, keys2.length, true), // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) create: $.create = $.create || function(O, /*?*/Properties){ var result; if(O !== null){ Empty.prototype = assertObject(O); result = new Empty(); Empty.prototype = null; // add "__proto__" for Object.getPrototypeOf shim result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : defineProperties(result, Properties); }, // 19.1.2.14 / 15.2.3.14 Object.keys(O) keys: $.getKeys = $.getKeys || createGetKeys(keys1, keysLen1, false), // 19.1.2.17 / 15.2.3.8 Object.seal(O) seal: $.it, // <- cap // 19.1.2.5 / 15.2.3.9 Object.freeze(O) freeze: $.it, // <- cap // 19.1.2.15 / 15.2.3.10 Object.preventExtensions(O) preventExtensions: $.it, // <- cap // 19.1.2.13 / 15.2.3.11 Object.isSealed(O) isSealed: isPrimitive, // <- cap // 19.1.2.12 / 15.2.3.12 Object.isFrozen(O) isFrozen: isPrimitive, // <- cap // 19.1.2.11 / 15.2.3.13 Object.isExtensible(O) isExtensible: $.isObject // <- cap }); // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) $def($def.P, 'Function', { bind: function(that /*, args... */){ var fn = assert.fn(this) , partArgs = slice.call(arguments, 1); function bound(/* args... */){ var args = partArgs.concat(slice.call(arguments)); return invoke(fn, args, this instanceof bound ? $.create(fn.prototype) : that); } if(fn.prototype)bound.prototype = fn.prototype; return bound; } }); // Fix for not array-like ES3 string function arrayMethodFix(fn){ return function(){ return fn.apply($.ES5Object(this), arguments); }; } if(!(0 in Object('z') && 'z'[0] == 'z')){ $.ES5Object = function(it){ return cof(it) == 'String' ? it.split('') : Object(it); }; } $def($def.P + $def.F * ($.ES5Object != Object), 'Array', { slice: arrayMethodFix(slice), join: arrayMethodFix(A.join) }); // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) $def($def.S, 'Array', { isArray: function(arg){ return cof(arg) == 'Array'; } }); function createArrayReduce(isRight){ return function(callbackfn, memo){ assert.fn(callbackfn); var O = toObject(this) , length = toLength(O.length) , index = isRight ? length - 1 : 0 , i = isRight ? -1 : 1; if(arguments.length < 2)for(;;){ if(index in O){ memo = O[index]; index += i; break; } index += i; assert(isRight ? index >= 0 : length > index, 'Reduce of empty array with no initial value'); } for(;isRight ? index >= 0 : length > index; index += i)if(index in O){ memo = callbackfn(memo, O[index], index, this); } return memo; }; } $def($def.P, 'Array', { // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) forEach: $.each = $.each || arrayMethod(0), // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) map: arrayMethod(1), // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) filter: arrayMethod(2), // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) some: arrayMethod(3), // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) every: arrayMethod(4), // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) reduce: createArrayReduce(false), // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) reduceRight: createArrayReduce(true), // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) indexOf: indexOf = indexOf || require('./$.array-includes')(false), // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) lastIndexOf: function(el, fromIndex /* = @[*-1] */){ var O = toObject(this) , length = toLength(O.length) , index = length - 1; if(arguments.length > 1)index = Math.min(index, $.toInteger(fromIndex)); if(index < 0)index = toLength(length + index); for(;index >= 0; index--)if(index in O)if(O[index] === el)return index; return -1; } }); // 21.1.3.25 / 15.5.4.20 String.prototype.trim() $def($def.P, 'String', {trim: require('./$.replacer')(/^\s*([\s\S]*\S)?\s*$/, '$1')}); // 20.3.3.1 / 15.9.4.4 Date.now() $def($def.S, 'Date', {now: function(){ return +new Date; }}); function lz(num){ return num > 9 ? num : '0' + num; } // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() // PhantomJS and old webkit had a broken Date implementation. var date = new Date(-5e13 - 1) , brokenDate = !(date.toISOString && date.toISOString() == '0385-07-25T07:06:39.999Z'); $def($def.P + $def.F * brokenDate, 'Date', {toISOString: function(){ if(!isFinite(this))throw RangeError('Invalid time value'); var d = this , y = d.getUTCFullYear() , m = d.getUTCMilliseconds() , s = y < 0 ? '-' : y > 9999 ? '+' : ''; return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; }}); if(classof(function(){ return arguments; }()) == 'Object')cof.classof = function(it){ var tag = classof(it); return tag == 'Object' && isFunction(it.callee) ? 'Arguments' : tag; }; },{"./$":21,"./$.array-includes":2,"./$.array-methods":3,"./$.assert":4,"./$.cof":6,"./$.def":12,"./$.invoke":16,"./$.replacer":25,"./$.uid":30}],34:[function(require,module,exports){ 'use strict'; var $ = require('./$') , $def = require('./$.def') , toIndex = $.toIndex; $def($def.P, 'Array', { // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) copyWithin: function copyWithin(target/* = 0 */, start /* = 0, end = @length */){ var O = Object($.assertDefined(this)) , len = $.toLength(O.length) , to = toIndex(target, len) , from = toIndex(start, len) , end = arguments[2] , fin = end === undefined ? len : toIndex(end, len) , count = Math.min(fin - from, len - to) , inc = 1; if(from < to && to < from + count){ inc = -1; from = from + count - 1; to = to + count - 1; } while(count-- > 0){ if(from in O)O[to] = O[from]; else delete O[to]; to += inc; from += inc; } return O; } }); require('./$.unscope')('copyWithin'); },{"./$":21,"./$.def":12,"./$.unscope":31}],35:[function(require,module,exports){ 'use strict'; var $ = require('./$') , $def = require('./$.def') , toIndex = $.toIndex; $def($def.P, 'Array', { // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) fill: function fill(value /*, start = 0, end = @length */){ var O = Object($.assertDefined(this)) , length = $.toLength(O.length) , index = toIndex(arguments[1], length) , end = arguments[2] , endPos = end === undefined ? length : toIndex(end, length); while(endPos > index)O[index++] = value; return O; } }); require('./$.unscope')('fill'); },{"./$":21,"./$.def":12,"./$.unscope":31}],36:[function(require,module,exports){ var $def = require('./$.def'); $def($def.P, 'Array', { // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) findIndex: require('./$.array-methods')(6) }); require('./$.unscope')('findIndex'); },{"./$.array-methods":3,"./$.def":12,"./$.unscope":31}],37:[function(require,module,exports){ var $def = require('./$.def'); $def($def.P, 'Array', { // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) find: require('./$.array-methods')(5) }); require('./$.unscope')('find'); },{"./$.array-methods":3,"./$.def":12,"./$.unscope":31}],38:[function(require,module,exports){ var $ = require('./$') , ctx = require('./$.ctx') , $def = require('./$.def') , $iter = require('./$.iter') , call = require('./$.iter-call'); $def($def.S + $def.F * !require('./$.iter-detect')(function(iter){ Array.from(iter); }), 'Array', { // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ var O = Object($.assertDefined(arrayLike)) , mapfn = arguments[1] , mapping = mapfn !== undefined , f = mapping ? ctx(mapfn, arguments[2], 2) : undefined , index = 0 , length, result, step, iterator; if($iter.is(O)){ iterator = $iter.get(O); // strange IE quirks mode bug -> use typeof instead of isFunction result = new (typeof this == 'function' ? this : Array); for(; !(step = iterator.next()).done; index++){ result[index] = mapping ? call(iterator, f, [step.value, index], true) : step.value; } } else { // strange IE quirks mode bug -> use typeof instead of isFunction result = new (typeof this == 'function' ? this : Array)(length = $.toLength(O.length)); for(; length > index; index++){ result[index] = mapping ? f(O[index], index) : O[index]; } } result.length = index; return result; } }); },{"./$":21,"./$.ctx":11,"./$.def":12,"./$.iter":20,"./$.iter-call":17,"./$.iter-detect":19}],39:[function(require,module,exports){ var $ = require('./$') , setUnscope = require('./$.unscope') , ITER = require('./$.uid').safe('iter') , $iter = require('./$.iter') , step = $iter.step , Iterators = $iter.Iterators; // 22.1.3.4 Array.prototype.entries() // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() require('./$.iter-define')(Array, 'Array', function(iterated, kind){ $.set(this, ITER, {o: $.toObject(iterated), i: 0, k: kind}); // 22.1.5.2.1 %ArrayIteratorPrototype%.next() }, function(){ var iter = this[ITER] , O = iter.o , kind = iter.k , index = iter.i++; if(!O || index >= O.length){ iter.o = undefined; return step(1); } if(kind == 'keys' )return step(0, index); if(kind == 'values')return step(0, O[index]); return step(0, [index, O[index]]); }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) Iterators.Arguments = Iterators.Array; setUnscope('keys'); setUnscope('values'); setUnscope('entries'); },{"./$":21,"./$.iter":20,"./$.iter-define":18,"./$.uid":30,"./$.unscope":31}],40:[function(require,module,exports){ var $def = require('./$.def'); $def($def.S, 'Array', { // 22.1.2.3 Array.of( ...items) of: function of(/* ...args */){ var index = 0 , length = arguments.length // strange IE quirks mode bug -> use typeof instead of isFunction , result = new (typeof this == 'function' ? this : Array)(length); while(length > index)result[index] = arguments[index++]; result.length = length; return result; } }); },{"./$.def":12}],41:[function(require,module,exports){ require('./$.species')(Array); },{"./$.species":27}],42:[function(require,module,exports){ 'use strict'; var $ = require('./$') , NAME = 'name' , setDesc = $.setDesc , FunctionProto = Function.prototype; // 19.2.4.2 name NAME in FunctionProto || $.FW && $.DESC && setDesc(FunctionProto, NAME, { configurable: true, get: function(){ var match = String(this).match(/^\s*function ([^ (]*)/) , name = match ? match[1] : ''; $.has(this, NAME) || setDesc(this, NAME, $.desc(5, name)); return name; }, set: function(value){ $.has(this, NAME) || setDesc(this, NAME, $.desc(0, value)); } }); },{"./$":21}],43:[function(require,module,exports){ 'use strict'; var strong = require('./$.collection-strong'); // 23.1 Map Objects require('./$.collection')('Map', { // 23.1.3.6 Map.prototype.get(key) get: function get(key){ var entry = strong.getEntry(this, key); return entry && entry.v; }, // 23.1.3.9 Map.prototype.set(key, value) set: function set(key, value){ return strong.def(this, key === 0 ? 0 : key, value); } }, strong, true); },{"./$.collection":10,"./$.collection-strong":7}],44:[function(require,module,exports){ var Infinity = 1 / 0 , $def = require('./$.def') , E = Math.E , pow = Math.pow , abs = Math.abs , exp = Math.exp , log = Math.log , sqrt = Math.sqrt , ceil = Math.ceil , floor = Math.floor , EPSILON = pow(2, -52) , EPSILON32 = pow(2, -23) , MAX32 = pow(2, 127) * (2 - EPSILON32) , MIN32 = pow(2, -126); function roundTiesToEven(n){ return n + 1 / EPSILON - 1 / EPSILON; } // 20.2.2.28 Math.sign(x) function sign(x){ return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; } // 20.2.2.5 Math.asinh(x) function asinh(x){ return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : log(x + sqrt(x * x + 1)); } // 20.2.2.14 Math.expm1(x) function expm1(x){ return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : exp(x) - 1; } $def($def.S, 'Math', { // 20.2.2.3 Math.acosh(x) acosh: function acosh(x){ return (x = +x) < 1 ? NaN : isFinite(x) ? log(x / E + sqrt(x + 1) * sqrt(x - 1) / E) + 1 : x; }, // 20.2.2.5 Math.asinh(x) asinh: asinh, // 20.2.2.7 Math.atanh(x) atanh: function atanh(x){ return (x = +x) == 0 ? x : log((1 + x) / (1 - x)) / 2; }, // 20.2.2.9 Math.cbrt(x) cbrt: function cbrt(x){ return sign(x = +x) * pow(abs(x), 1 / 3); }, // 20.2.2.11 Math.clz32(x) clz32: function clz32(x){ return (x >>>= 0) ? 31 - floor(log(x + 0.5) * Math.LOG2E) : 32; }, // 20.2.2.12 Math.cosh(x) cosh: function cosh(x){ return (exp(x = +x) + exp(-x)) / 2; }, // 20.2.2.14 Math.expm1(x) expm1: expm1, // 20.2.2.16 Math.fround(x) fround: function fround(x){ var $abs = abs(x) , $sign = sign(x) , a, result; if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; a = (1 + EPSILON32 / EPSILON) * $abs; result = a - (a - $abs); if(result > MAX32 || result != result)return $sign * Infinity; return $sign * result; }, // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars var sum = 0 , len1 = arguments.length , len2 = len1 , args = Array(len1) , larg = -Infinity , arg; while(len1--){ arg = args[len1] = +arguments[len1]; if(arg == Infinity || arg == -Infinity)return Infinity; if(arg > larg)larg = arg; } larg = arg || 1; while(len2--)sum += pow(args[len2] / larg, 2); return larg * sqrt(sum); }, // 20.2.2.18 Math.imul(x, y) imul: function imul(x, y){ var UInt16 = 0xffff , xn = +x , yn = +y , xl = UInt16 & xn , yl = UInt16 & yn; return 0 | xl * yl + ((UInt16 & xn >>> 16) * yl + xl * (UInt16 & yn >>> 16) << 16 >>> 0); }, // 20.2.2.20 Math.log1p(x) log1p: function log1p(x){ return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : log(1 + x); }, // 20.2.2.21 Math.log10(x) log10: function log10(x){ return log(x) / Math.LN10; }, // 20.2.2.22 Math.log2(x) log2: function log2(x){ return log(x) / Math.LN2; }, // 20.2.2.28 Math.sign(x) sign: sign, // 20.2.2.30 Math.sinh(x) sinh: function sinh(x){ return abs(x = +x) < 1 ? (expm1(x) - expm1(-x)) / 2 : (exp(x - 1) - exp(-x - 1)) * (E / 2); }, // 20.2.2.33 Math.tanh(x) tanh: function tanh(x){ var a = expm1(x = +x) , b = expm1(-x); return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); }, // 20.2.2.34 Math.trunc(x) trunc: function trunc(it){ return (it > 0 ? floor : ceil)(it); } }); },{"./$.def":12}],45:[function(require,module,exports){ 'use strict'; var $ = require('./$') , isObject = $.isObject , isFunction = $.isFunction , NUMBER = 'Number' , Number = $.g[NUMBER] , Base = Number , proto = Number.prototype; function toPrimitive(it){ var fn, val; if(isFunction(fn = it.valueOf) && !isObject(val = fn.call(it)))return val; if(isFunction(fn = it.toString) && !isObject(val = fn.call(it)))return val; throw TypeError("Can't convert object to number"); } function toNumber(it){ if(isObject(it))it = toPrimitive(it); if(typeof it == 'string' && it.length > 2 && it.charCodeAt(0) == 48){ var binary = false; switch(it.charCodeAt(1)){ case 66 : case 98 : binary = true; case 79 : case 111 : return parseInt(it.slice(2), binary ? 2 : 8); } } return +it; } if($.FW && !(Number('0o1') && Number('0b1'))){ Number = function Number(it){ return this instanceof Number ? new Base(toNumber(it)) : toNumber(it); }; $.each.call($.DESC ? $.getNames(Base) : ( // ES3: 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + // ES6 (in case, if modules with ES6 Number statics required before): 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' ).split(','), function(key){ if($.has(Base, key) && !$.has(Number, key)){ $.setDesc(Number, key, $.getDesc(Base, key)); } } ); Number.prototype = proto; proto.constructor = Number; $.hide($.g, NUMBER, Number); } },{"./$":21}],46:[function(require,module,exports){ var $ = require('./$') , $def = require('./$.def') , abs = Math.abs , floor = Math.floor , _isFinite = $.g.isFinite , MAX_SAFE_INTEGER = 0x1fffffffffffff; // pow(2, 53) - 1 == 9007199254740991; function isInteger(it){ return !$.isObject(it) && _isFinite(it) && floor(it) === it; } $def($def.S, 'Number', { // 20.1.2.1 Number.EPSILON EPSILON: Math.pow(2, -52), // 20.1.2.2 Number.isFinite(number) isFinite: function isFinite(it){ return typeof it == 'number' && _isFinite(it); }, // 20.1.2.3 Number.isInteger(number) isInteger: isInteger, // 20.1.2.4 Number.isNaN(number) isNaN: function isNaN(number){ return number != number; }, // 20.1.2.5 Number.isSafeInteger(number) isSafeInteger: function isSafeInteger(number){ return isInteger(number) && abs(number) <= MAX_SAFE_INTEGER; }, // 20.1.2.6 Number.MAX_SAFE_INTEGER MAX_SAFE_INTEGER: MAX_SAFE_INTEGER, // 20.1.2.10 Number.MIN_SAFE_INTEGER MIN_SAFE_INTEGER: -MAX_SAFE_INTEGER, // 20.1.2.12 Number.parseFloat(string) parseFloat: parseFloat, // 20.1.2.13 Number.parseInt(string, radix) parseInt: parseInt }); },{"./$":21,"./$.def":12}],47:[function(require,module,exports){ // 19.1.3.1 Object.assign(target, source) var $def = require('./$.def'); $def($def.S, 'Object', {assign: require('./$.assign')}); },{"./$.assign":5,"./$.def":12}],48:[function(require,module,exports){ // 19.1.3.10 Object.is(value1, value2) var $def = require('./$.def'); $def($def.S, 'Object', { is: function is(x, y){ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; } }); },{"./$.def":12}],49:[function(require,module,exports){ // 19.1.3.19 Object.setPrototypeOf(O, proto) var $def = require('./$.def'); $def($def.S, 'Object', {setPrototypeOf: require('./$.set-proto').set}); },{"./$.def":12,"./$.set-proto":26}],50:[function(require,module,exports){ var $ = require('./$') , $def = require('./$.def') , isObject = $.isObject , toObject = $.toObject; function wrapObjectMethod(METHOD, MODE){ var fn = ($.core.Object || {})[METHOD] || Object[METHOD] , f = 0 , o = {}; o[METHOD] = MODE == 1 ? function(it){ return isObject(it) ? fn(it) : it; } : MODE == 2 ? function(it){ return isObject(it) ? fn(it) : true; } : MODE == 3 ? function(it){ return isObject(it) ? fn(it) : false; } : MODE == 4 ? function getOwnPropertyDescriptor(it, key){ return fn(toObject(it), key); } : MODE == 5 ? function getPrototypeOf(it){ return fn(Object($.assertDefined(it))); } : function(it){ return fn(toObject(it)); }; try { fn('z'); } catch(e){ f = 1; } $def($def.S + $def.F * f, 'Object', o); } wrapObjectMethod('freeze', 1); wrapObjectMethod('seal', 1); wrapObjectMethod('preventExtensions', 1); wrapObjectMethod('isFrozen', 2); wrapObjectMethod('isSealed', 2); wrapObjectMethod('isExtensible', 3); wrapObjectMethod('getOwnPropertyDescriptor', 4); wrapObjectMethod('getPrototypeOf', 5); wrapObjectMethod('keys'); wrapObjectMethod('getOwnPropertyNames'); },{"./$":21,"./$.def":12}],51:[function(require,module,exports){ 'use strict'; // 19.1.3.6 Object.prototype.toString() var $ = require('./$') , cof = require('./$.cof') , tmp = {}; tmp[require('./$.wks')('toStringTag')] = 'z'; if($.FW && cof(tmp) != 'z')$.hide(Object.prototype, 'toString', function toString(){ return '[object ' + cof.classof(this) + ']'; }); },{"./$":21,"./$.cof":6,"./$.wks":32}],52:[function(require,module,exports){ 'use strict'; var $ = require('./$') , ctx = require('./$.ctx') , cof = require('./$.cof') , $def = require('./$.def') , assert = require('./$.assert') , forOf = require('./$.for-of') , setProto = require('./$.set-proto').set , species = require('./$.species') , SPECIES = require('./$.wks')('species') , RECORD = require('./$.uid').safe('record') , PROMISE = 'Promise' , global = $.g , process = global.process , asap = process && process.nextTick || require('./$.task').set , P = global[PROMISE] , isFunction = $.isFunction , isObject = $.isObject , assertFunction = assert.fn , assertObject = assert.obj , test; var useNative = isFunction(P) && isFunction(P.resolve) && P.resolve(test = new P(function(){})) == test; // actual Firefox has broken subclass support, test that function P2(x){ var self = new P(x); setProto(self, P2.prototype); return self; } if(useNative){ try { // protect against bad/buggy Object.setPrototype setProto(P2, P); P2.prototype = $.create(P.prototype, {constructor: {value: P2}}); if(!(P2.resolve(5).then(function(){}) instanceof P2)){ useNative = false; } } catch(e){ useNative = false; } } // helpers function getConstructor(C){ var S = assertObject(C)[SPECIES]; return S != undefined ? S : C; } function isThenable(it){ var then; if(isObject(it))then = it.then; return isFunction(then) ? then : false; } function notify(record){ var chain = record.c; if(chain.length)asap(function(){ var value = record.v , ok = record.s == 1 , i = 0; while(chain.length > i)!function(react){ var cb = ok ? react.ok : react.fail , ret, then; try { if(cb){ if(!ok)record.h = true; ret = cb === true ? value : cb(value); if(ret === react.P){ react.rej(TypeError('Promise-chain cycle')); } else if(then = isThenable(ret)){ then.call(ret, react.res, react.rej); } else react.res(ret); } else react.rej(value); } catch(err){ react.rej(err); } }(chain[i++]); chain.length = 0; }); } function isUnhandled(promise){ var record = promise[RECORD] , chain = record.a , i = 0 , react; if(record.h)return false; while(chain.length > i){ react = chain[i++]; if(react.fail || !isUnhandled(react.P))return false; } return true; } function $reject(value){ var record = this , promise; if(record.d)return; record.d = true; record = record.r || record; // unwrap record.v = value; record.s = 2; asap(function(){ setTimeout(function(){ if(isUnhandled(promise = record.p)){ if(cof(process) == 'process'){ process.emit('unhandledRejection', value, promise); } else if(global.console && isFunction(console.error)){ console.error('Unhandled promise rejection', value); } } }, 1); }); notify(record); } function $resolve(value){ var record = this , then, wrapper; if(record.d)return; record.d = true; record = record.r || record; // unwrap try { if(then = isThenable(value)){ wrapper = {r: record, d: false}; // wrap then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); } else { record.v = value; record.s = 1; notify(record); } } catch(err){ $reject.call(wrapper || {r: record, d: false}, err); // wrap } } // constructor polyfill if(!useNative){ // 25.4.3.1 Promise(executor) P = function Promise(executor){ assertFunction(executor); var record = { p: assert.inst(this, P, PROMISE), // <- promise c: [], // <- awaiting reactions a: [], // <- all reactions s: 0, // <- state d: false, // <- done v: undefined, // <- value h: false // <- handled rejection }; $.hide(this, RECORD, record); try { executor(ctx($resolve, record, 1), ctx($reject, record, 1)); } catch(err){ $reject.call(record, err); } }; $.mix(P.prototype, { // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) then: function then(onFulfilled, onRejected){ var S = assertObject(assertObject(this).constructor)[SPECIES]; var react = { ok: isFunction(onFulfilled) ? onFulfilled : true, fail: isFunction(onRejected) ? onRejected : false }; var promise = react.P = new (S != undefined ? S : P)(function(res, rej){ react.res = assertFunction(res); react.rej = assertFunction(rej); }); var record = this[RECORD]; record.a.push(react); record.c.push(react); record.s && notify(record); return promise; }, // 25.4.5.1 Promise.prototype.catch(onRejected) 'catch': function(onRejected){ return this.then(undefined, onRejected); } }); } // export $def($def.G + $def.W + $def.F * !useNative, {Promise: P}); cof.set(P, PROMISE); species(P); species($.core[PROMISE]); // for wrapper // statics $def($def.S + $def.F * !useNative, PROMISE, { // 25.4.4.5 Promise.reject(r) reject: function reject(r){ return new (getConstructor(this))(function(res, rej){ rej(r); }); }, // 25.4.4.6 Promise.resolve(x) resolve: function resolve(x){ return isObject(x) && RECORD in x && $.getProto(x) === this.prototype ? x : new (getConstructor(this))(function(res){ res(x); }); } }); $def($def.S + $def.F * !(useNative && require('./$.iter-detect')(function(iter){ P.all(iter)['catch'](function(){}); })), PROMISE, { // 25.4.4.1 Promise.all(iterable) all: function all(iterable){ var C = getConstructor(this) , values = []; return new C(function(res, rej){ forOf(iterable, false, values.push, values); var remaining = values.length , results = Array(remaining); if(remaining)$.each.call(values, function(promise, index){ C.resolve(promise).then(function(value){ results[index] = value; --remaining || res(results); }, rej); }); else res(results); }); }, // 25.4.4.4 Promise.race(iterable) race: function race(iterable){ var C = getConstructor(this); return new C(function(res, rej){ forOf(iterable, false, function(promise){ C.resolve(promise).then(res, rej); }); }); } }); },{"./$":21,"./$.assert":4,"./$.cof":6,"./$.ctx":11,"./$.def":12,"./$.for-of":14,"./$.iter-detect":19,"./$.set-proto":26,"./$.species":27,"./$.task":29,"./$.uid":30,"./$.wks":32}],53:[function(require,module,exports){ var $ = require('./$') , $def = require('./$.def') , setProto = require('./$.set-proto') , $iter = require('./$.iter') , ITER = require('./$.uid').safe('iter') , step = $iter.step , assert = require('./$.assert') , isObject = $.isObject , getDesc = $.getDesc , setDesc = $.setDesc , getProto = $.getProto , apply = Function.apply , assertObject = assert.obj , _isExtensible = Object.isExtensible || $.it; function Enumerate(iterated){ $.set(this, ITER, {o: iterated, k: undefined, i: 0}); } $iter.create(Enumerate, 'Object', function(){ var iter = this[ITER] , keys = iter.k , key; if(keys == undefined){ iter.k = keys = []; for(key in iter.o)keys.push(key); } do { if(iter.i >= keys.length)return step(1); } while(!((key = keys[iter.i++]) in iter.o)); return step(0, key); }); function wrap(fn){ return function(it){ assertObject(it); try { fn.apply(undefined, arguments); return true; } catch(e){ return false; } }; } function get(target, propertyKey/*, receiver*/){ var receiver = arguments.length < 3 ? target : arguments[2] , desc = getDesc(assertObject(target), propertyKey), proto; if(desc)return $.has(desc, 'value') ? desc.value : desc.get === undefined ? undefined : desc.get.call(receiver); return isObject(proto = getProto(target)) ? get(proto, propertyKey, receiver) : undefined; } function set(target, propertyKey, V/*, receiver*/){ var receiver = arguments.length < 4 ? target : arguments[3] , ownDesc = getDesc(assertObject(target), propertyKey) , existingDescriptor, proto; if(!ownDesc){ if(isObject(proto = getProto(target))){ return set(proto, propertyKey, V, receiver); } ownDesc = $.desc(0); } if($.has(ownDesc, 'value')){ if(ownDesc.writable === false || !isObject(receiver))return false; existingDescriptor = getDesc(receiver, propertyKey) || $.desc(0); existingDescriptor.value = V; setDesc(receiver, propertyKey, existingDescriptor); return true; } return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); } var reflect = { // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) apply: require('./$.ctx')(Function.call, apply, 3), // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) construct: function construct(target, argumentsList /*, newTarget*/){ var proto = assert.fn(arguments.length < 3 ? target : arguments[2]).prototype , instance = $.create(isObject(proto) ? proto : Object.prototype) , result = apply.call(target, instance, argumentsList); return isObject(result) ? result : instance; }, // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) defineProperty: wrap(setDesc), // 26.1.4 Reflect.deleteProperty(target, propertyKey) deleteProperty: function deleteProperty(target, propertyKey){ var desc = getDesc(assertObject(target), propertyKey); return desc && !desc.configurable ? false : delete target[propertyKey]; }, // 26.1.5 Reflect.enumerate(target) enumerate: function enumerate(target){ return new Enumerate(assertObject(target)); }, // 26.1.6 Reflect.get(target, propertyKey [, receiver]) get: get, // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){ return getDesc(assertObject(target), propertyKey); }, // 26.1.8 Reflect.getPrototypeOf(target) getPrototypeOf: function getPrototypeOf(target){ return getProto(assertObject(target)); }, // 26.1.9 Reflect.has(target, propertyKey) has: function has(target, propertyKey){ return propertyKey in target; }, // 26.1.10 Reflect.isExtensible(target) isExtensible: function isExtensible(target){ return !!_isExtensible(assertObject(target)); }, // 26.1.11 Reflect.ownKeys(target) ownKeys: require('./$.own-keys'), // 26.1.12 Reflect.preventExtensions(target) preventExtensions: wrap(Object.preventExtensions || $.it), // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) set: set }; // 26.1.14 Reflect.setPrototypeOf(target, proto) if(setProto)reflect.setPrototypeOf = function setPrototypeOf(target, proto){ setProto.check(target, proto); try { setProto.set(target, proto); return true; } catch(e){ return false; } }; $def($def.G, {Reflect: {}}); $def($def.S, 'Reflect', reflect); },{"./$":21,"./$.assert":4,"./$.ctx":11,"./$.def":12,"./$.iter":20,"./$.own-keys":23,"./$.set-proto":26,"./$.uid":30}],54:[function(require,module,exports){ var $ = require('./$') , cof = require('./$.cof') , RegExp = $.g.RegExp , Base = RegExp , proto = RegExp.prototype; function regExpBroken() { try { var a = /a/g; // "new" creates a new object if (a === new RegExp(a)) { return true; } // RegExp allows a regex with flags as the pattern return RegExp(/a/g, 'i') != '/a/i'; } catch(e) { return true; } } if($.FW && $.DESC){ if(regExpBroken()) { RegExp = function RegExp(pattern, flags){ return new Base(cof(pattern) == 'RegExp' ? pattern.source : pattern, flags === undefined ? pattern.flags : flags); }; $.each.call($.getNames(Base), function(key){ key in RegExp || $.setDesc(RegExp, key, { configurable: true, get: function(){ return Base[key]; }, set: function(it){ Base[key] = it; } }); }); proto.constructor = RegExp; RegExp.prototype = proto; $.hide($.g, 'RegExp', RegExp); } // 21.2.5.3 get RegExp.prototype.flags() if(/./g.flags != 'g')$.setDesc(proto, 'flags', { configurable: true, get: require('./$.replacer')(/^.*\/(\w*)$/, '$1') }); } require('./$.species')(RegExp); },{"./$":21,"./$.cof":6,"./$.replacer":25,"./$.species":27}],55:[function(require,module,exports){ 'use strict'; var strong = require('./$.collection-strong'); // 23.2 Set Objects require('./$.collection')('Set', { // 23.2.3.1 Set.prototype.add(value) add: function add(value){ return strong.def(this, value = value === 0 ? 0 : value, value); } }, strong); },{"./$.collection":10,"./$.collection-strong":7}],56:[function(require,module,exports){ var $def = require('./$.def'); $def($def.P, 'String', { // 21.1.3.3 String.prototype.codePointAt(pos) codePointAt: require('./$.string-at')(false) }); },{"./$.def":12,"./$.string-at":28}],57:[function(require,module,exports){ 'use strict'; var $ = require('./$') , cof = require('./$.cof') , $def = require('./$.def') , toLength = $.toLength; $def($def.P, 'String', { // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) endsWith: function endsWith(searchString /*, endPosition = @length */){ if(cof(searchString) == 'RegExp')throw TypeError(); var that = String($.assertDefined(this)) , endPosition = arguments[1] , len = toLength(that.length) , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); searchString += ''; return that.slice(end - searchString.length, end) === searchString; } }); },{"./$":21,"./$.cof":6,"./$.def":12}],58:[function(require,module,exports){ var $def = require('./$.def') , toIndex = require('./$').toIndex , fromCharCode = String.fromCharCode; $def($def.S, 'String', { // 21.1.2.2 String.fromCodePoint(...codePoints) fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars var res = [] , len = arguments.length , i = 0 , code; while(len > i){ code = +arguments[i++]; if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point'); res.push(code < 0x10000 ? fromCharCode(code) : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) ); } return res.join(''); } }); },{"./$":21,"./$.def":12}],59:[function(require,module,exports){ 'use strict'; var $ = require('./$') , cof = require('./$.cof') , $def = require('./$.def'); $def($def.P, 'String', { // 21.1.3.7 String.prototype.includes(searchString, position = 0) includes: function includes(searchString /*, position = 0 */){ if(cof(searchString) == 'RegExp')throw TypeError(); return !!~String($.assertDefined(this)).indexOf(searchString, arguments[1]); } }); },{"./$":21,"./$.cof":6,"./$.def":12}],60:[function(require,module,exports){ var set = require('./$').set , at = require('./$.string-at')(true) , ITER = require('./$.uid').safe('iter') , $iter = require('./$.iter') , step = $iter.step; // 21.1.3.27 String.prototype[@@iterator]() require('./$.iter-define')(String, 'String', function(iterated){ set(this, ITER, {o: String(iterated), i: 0}); // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function(){ var iter = this[ITER] , O = iter.o , index = iter.i , point; if(index >= O.length)return step(1); point = at.call(O, index); iter.i += point.length; return step(0, point); }); },{"./$":21,"./$.iter":20,"./$.iter-define":18,"./$.string-at":28,"./$.uid":30}],61:[function(require,module,exports){ var $ = require('./$') , $def = require('./$.def'); $def($def.S, 'String', { // 21.1.2.4 String.raw(callSite, ...substitutions) raw: function raw(callSite){ var tpl = $.toObject(callSite.raw) , len = $.toLength(tpl.length) , sln = arguments.length , res = [] , i = 0; while(len > i){ res.push(String(tpl[i++])); if(i < sln)res.push(String(arguments[i])); } return res.join(''); } }); },{"./$":21,"./$.def":12}],62:[function(require,module,exports){ 'use strict'; var $ = require('./$') , $def = require('./$.def'); $def($def.P, 'String', { // 21.1.3.13 String.prototype.repeat(count) repeat: function repeat(count){ var str = String($.assertDefined(this)) , res = '' , n = $.toInteger(count); if(n < 0 || n == Infinity)throw RangeError("Count can't be negative"); for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str; return res; } }); },{"./$":21,"./$.def":12}],63:[function(require,module,exports){ 'use strict'; var $ = require('./$') , cof = require('./$.cof') , $def = require('./$.def'); $def($def.P, 'String', { // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) startsWith: function startsWith(searchString /*, position = 0 */){ if(cof(searchString) == 'RegExp')throw TypeError(); var that = String($.assertDefined(this)) , index = $.toLength(Math.min(arguments[1], that.length)); searchString += ''; return that.slice(index, index + searchString.length) === searchString; } }); },{"./$":21,"./$.cof":6,"./$.def":12}],64:[function(require,module,exports){ 'use strict'; // ECMAScript 6 symbols shim var $ = require('./$') , setTag = require('./$.cof').set , uid = require('./$.uid') , $def = require('./$.def') , keyOf = require('./$.keyof') , enumKeys = require('./$.enum-keys') , assertObject = require('./$.assert').obj , has = $.has , $create = $.create , getDesc = $.getDesc , setDesc = $.setDesc , desc = $.desc , getNames = $.getNames , toObject = $.toObject , Symbol = $.g.Symbol , setter = false , TAG = uid('tag') , HIDDEN = uid('hidden') , SymbolRegistry = {} , AllSymbols = {} , useNative = $.isFunction(Symbol); function wrap(tag){ var sym = AllSymbols[tag] = $.set($create(Symbol.prototype), TAG, tag); $.DESC && setter && setDesc(Object.prototype, tag, { configurable: true, set: function(value){ if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; setDesc(this, tag, desc(1, value)); } }); return sym; } function defineProperty(it, key, D){ if(D && has(AllSymbols, key)){ if(!D.enumerable){ if(!has(it, HIDDEN))setDesc(it, HIDDEN, desc(1, {})); it[HIDDEN][key] = true; } else { if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; D.enumerable = false; } } return setDesc(it, key, D); } function defineProperties(it, P){ assertObject(it); var keys = enumKeys(P = toObject(P)) , i = 0 , l = keys.length , key; while(l > i)defineProperty(it, key = keys[i++], P[key]); return it; } function create(it, P){ return P === undefined ? $create(it) : defineProperties($create(it), P); } function getOwnPropertyDescriptor(it, key){ var D = getDesc(it = toObject(it), key); if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; return D; } function getOwnPropertyNames(it){ var names = getNames(toObject(it)) , result = [] , i = 0 , key; while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key); return result; } function getOwnPropertySymbols(it){ var names = getNames(toObject(it)) , result = [] , i = 0 , key; while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]); return result; } // 19.4.1.1 Symbol([description]) if(!useNative){ Symbol = function Symbol(description){ if(this instanceof Symbol)throw TypeError('Symbol is not a constructor'); return wrap(uid(description)); }; $.hide(Symbol.prototype, 'toString', function(){ return this[TAG]; }); $.create = create; $.setDesc = defineProperty; $.getDesc = getOwnPropertyDescriptor; $.setDescs = defineProperties; $.getNames = getOwnPropertyNames; $.getSymbols = getOwnPropertySymbols; } var symbolStatics = { // 19.4.2.1 Symbol.for(key) 'for': function(key){ return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = Symbol(key); }, // 19.4.2.5 Symbol.keyFor(sym) keyFor: function keyFor(key){ return keyOf(SymbolRegistry, key); }, useSetter: function(){ setter = true; }, useSimple: function(){ setter = false; } }; // 19.4.2.2 Symbol.hasInstance // 19.4.2.3 Symbol.isConcatSpreadable // 19.4.2.4 Symbol.iterator // 19.4.2.6 Symbol.match // 19.4.2.8 Symbol.replace // 19.4.2.9 Symbol.search // 19.4.2.10 Symbol.species // 19.4.2.11 Symbol.split // 19.4.2.12 Symbol.toPrimitive // 19.4.2.13 Symbol.toStringTag // 19.4.2.14 Symbol.unscopables $.each.call(( 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' + 'species,split,toPrimitive,toStringTag,unscopables' ).split(','), function(it){ var sym = require('./$.wks')(it); symbolStatics[it] = useNative ? sym : wrap(sym); } ); setter = true; $def($def.G + $def.W, {Symbol: Symbol}); $def($def.S, 'Symbol', symbolStatics); $def($def.S + $def.F * !useNative, 'Object', { // 19.1.2.2 Object.create(O [, Properties]) create: create, // 19.1.2.4 Object.defineProperty(O, P, Attributes) defineProperty: defineProperty, // 19.1.2.3 Object.defineProperties(O, Properties) defineProperties: defineProperties, // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) getOwnPropertyDescriptor: getOwnPropertyDescriptor, // 19.1.2.7 Object.getOwnPropertyNames(O) getOwnPropertyNames: getOwnPropertyNames, // 19.1.2.8 Object.getOwnPropertySymbols(O) getOwnPropertySymbols: getOwnPropertySymbols }); // 19.4.3.5 Symbol.prototype[@@toStringTag] setTag(Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag] setTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] setTag($.g.JSON, 'JSON', true); },{"./$":21,"./$.assert":4,"./$.cof":6,"./$.def":12,"./$.enum-keys":13,"./$.keyof":22,"./$.uid":30,"./$.wks":32}],65:[function(require,module,exports){ 'use strict'; var $ = require('./$') , weak = require('./$.collection-weak') , leakStore = weak.leakStore , ID = weak.ID , WEAK = weak.WEAK , has = $.has , isObject = $.isObject , isFrozen = Object.isFrozen || $.core.Object.isFrozen , tmp = {}; // 23.3 WeakMap Objects var WeakMap = require('./$.collection')('WeakMap', { // 23.3.3.3 WeakMap.prototype.get(key) get: function get(key){ if(isObject(key)){ if(isFrozen(key))return leakStore(this).get(key); if(has(key, WEAK))return key[WEAK][this[ID]]; } }, // 23.3.3.5 WeakMap.prototype.set(key, value) set: function set(key, value){ return weak.def(this, key, value); } }, weak, true, true); // IE11 WeakMap frozen keys fix if($.FW && new WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){ $.each.call(['delete', 'has', 'get', 'set'], function(key){ var method = WeakMap.prototype[key]; WeakMap.prototype[key] = function(a, b){ // store frozen objects on leaky map if(isObject(a) && isFrozen(a)){ var result = leakStore(this)[key](a, b); return key == 'set' ? this : result; // store all the rest on native weakmap } return method.call(this, a, b); }; }); } },{"./$":21,"./$.collection":10,"./$.collection-weak":9}],66:[function(require,module,exports){ 'use strict'; var weak = require('./$.collection-weak'); // 23.4 WeakSet Objects require('./$.collection')('WeakSet', { // 23.4.3.1 WeakSet.prototype.add(value) add: function add(value){ return weak.def(this, value, true); } }, weak, false, true); },{"./$.collection":10,"./$.collection-weak":9}],67:[function(require,module,exports){ // https://github.com/domenic/Array.prototype.includes var $def = require('./$.def'); $def($def.P, 'Array', { includes: require('./$.array-includes')(true) }); require('./$.unscope')('includes'); },{"./$.array-includes":2,"./$.def":12,"./$.unscope":31}],68:[function(require,module,exports){ // https://github.com/DavidBruant/Map-Set.prototype.toJSON require('./$.collection-to-json')('Map'); },{"./$.collection-to-json":8}],69:[function(require,module,exports){ // https://gist.github.com/WebReflection/9353781 var $ = require('./$') , $def = require('./$.def') , ownKeys = require('./$.own-keys'); $def($def.S, 'Object', { getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){ var O = $.toObject(object) , result = {}; $.each.call(ownKeys(O), function(key){ $.setDesc(result, key, $.desc(0, $.getDesc(O, key))); }); return result; } }); },{"./$":21,"./$.def":12,"./$.own-keys":23}],70:[function(require,module,exports){ // http://goo.gl/XkBrjD var $ = require('./$') , $def = require('./$.def'); function createObjectToArray(isEntries){ return function(object){ var O = $.toObject(object) , keys = $.getKeys(O) , length = keys.length , i = 0 , result = Array(length) , key; if(isEntries)while(length > i)result[i] = [key = keys[i++], O[key]]; else while(length > i)result[i] = O[keys[i++]]; return result; }; } $def($def.S, 'Object', { values: createObjectToArray(false), entries: createObjectToArray(true) }); },{"./$":21,"./$.def":12}],71:[function(require,module,exports){ // https://gist.github.com/kangax/9698100 var $def = require('./$.def'); $def($def.S, 'RegExp', { escape: require('./$.replacer')(/([\\\-[\]{}()*+?.,^$|])/g, '\\$1', true) }); },{"./$.def":12,"./$.replacer":25}],72:[function(require,module,exports){ // https://github.com/DavidBruant/Map-Set.prototype.toJSON require('./$.collection-to-json')('Set'); },{"./$.collection-to-json":8}],73:[function(require,module,exports){ // https://github.com/mathiasbynens/String.prototype.at var $def = require('./$.def'); $def($def.P, 'String', { at: require('./$.string-at')(true) }); },{"./$.def":12,"./$.string-at":28}],74:[function(require,module,exports){ // JavaScript 1.6 / Strawman array statics shim var $ = require('./$') , $def = require('./$.def') , $Array = $.core.Array || Array , statics = {}; function setStatics(keys, length){ $.each.call(keys.split(','), function(key){ if(length == undefined && key in $Array)statics[key] = $Array[key]; else if(key in [])statics[key] = require('./$.ctx')(Function.call, [][key], length); }); } setStatics('pop,reverse,shift,keys,values,entries', 1); setStatics('indexOf,every,some,forEach,map,filter,find,findIndex,includes', 3); setStatics('join,slice,concat,push,splice,unshift,sort,lastIndexOf,' + 'reduce,reduceRight,copyWithin,fill,turn'); $def($def.S, 'Array', statics); },{"./$":21,"./$.ctx":11,"./$.def":12}],75:[function(require,module,exports){ require('./es6.array.iterator'); var $ = require('./$') , Iterators = require('./$.iter').Iterators , ITERATOR = require('./$.wks')('iterator') , ArrayValues = Iterators.Array , NodeList = $.g.NodeList; if($.FW && NodeList && !(ITERATOR in NodeList.prototype)){ $.hide(NodeList.prototype, ITERATOR, ArrayValues); } Iterators.NodeList = ArrayValues; },{"./$":21,"./$.iter":20,"./$.wks":32,"./es6.array.iterator":39}],76:[function(require,module,exports){ var $def = require('./$.def') , $task = require('./$.task'); $def($def.G + $def.B, { setImmediate: $task.set, clearImmediate: $task.clear }); },{"./$.def":12,"./$.task":29}],77:[function(require,module,exports){ // ie9- setTimeout & setInterval additional parameters fix var $ = require('./$') , $def = require('./$.def') , invoke = require('./$.invoke') , partial = require('./$.partial') , navigator = $.g.navigator , MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check function wrap(set){ return MSIE ? function(fn, time /*, ...args */){ return set(invoke( partial, [].slice.call(arguments, 2), $.isFunction(fn) ? fn : Function(fn) ), time); } : set; } $def($def.G + $def.B + $def.F * MSIE, { setTimeout: wrap($.g.setTimeout), setInterval: wrap($.g.setInterval) }); },{"./$":21,"./$.def":12,"./$.invoke":16,"./$.partial":24}],78:[function(require,module,exports){ require('./modules/es5'); require('./modules/es6.symbol'); require('./modules/es6.object.assign'); require('./modules/es6.object.is'); require('./modules/es6.object.set-prototype-of'); require('./modules/es6.object.to-string'); require('./modules/es6.object.statics-accept-primitives'); require('./modules/es6.function.name'); require('./modules/es6.number.constructor'); require('./modules/es6.number.statics'); require('./modules/es6.math'); require('./modules/es6.string.from-code-point'); require('./modules/es6.string.raw'); require('./modules/es6.string.iterator'); require('./modules/es6.string.code-point-at'); require('./modules/es6.string.ends-with'); require('./modules/es6.string.includes'); require('./modules/es6.string.repeat'); require('./modules/es6.string.starts-with'); require('./modules/es6.array.from'); require('./modules/es6.array.of'); require('./modules/es6.array.iterator'); require('./modules/es6.array.species'); require('./modules/es6.array.copy-within'); require('./modules/es6.array.fill'); require('./modules/es6.array.find'); require('./modules/es6.array.find-index'); require('./modules/es6.regexp'); require('./modules/es6.promise'); require('./modules/es6.map'); require('./modules/es6.set'); require('./modules/es6.weak-map'); require('./modules/es6.weak-set'); require('./modules/es6.reflect'); require('./modules/es7.array.includes'); require('./modules/es7.string.at'); require('./modules/es7.regexp.escape'); require('./modules/es7.object.get-own-property-descriptors'); require('./modules/es7.object.to-array'); require('./modules/es7.map.to-json'); require('./modules/es7.set.to-json'); require('./modules/js.array.statics'); require('./modules/web.timers'); require('./modules/web.immediate'); require('./modules/web.dom.iterable'); module.exports = require('./modules/$').core; },{"./modules/$":21,"./modules/es5":33,"./modules/es6.array.copy-within":34,"./modules/es6.array.fill":35,"./modules/es6.array.find":37,"./modules/es6.array.find-index":36,"./modules/es6.array.from":38,"./modules/es6.array.iterator":39,"./modules/es6.array.of":40,"./modules/es6.array.species":41,"./modules/es6.function.name":42,"./modules/es6.map":43,"./modules/es6.math":44,"./modules/es6.number.constructor":45,"./modules/es6.number.statics":46,"./modules/es6.object.assign":47,"./modules/es6.object.is":48,"./modules/es6.object.set-prototype-of":49,"./modules/es6.object.statics-accept-primitives":50,"./modules/es6.object.to-string":51,"./modules/es6.promise":52,"./modules/es6.reflect":53,"./modules/es6.regexp":54,"./modules/es6.set":55,"./modules/es6.string.code-point-at":56,"./modules/es6.string.ends-with":57,"./modules/es6.string.from-code-point":58,"./modules/es6.string.includes":59,"./modules/es6.string.iterator":60,"./modules/es6.string.raw":61,"./modules/es6.string.repeat":62,"./modules/es6.string.starts-with":63,"./modules/es6.symbol":64,"./modules/es6.weak-map":65,"./modules/es6.weak-set":66,"./modules/es7.array.includes":67,"./modules/es7.map.to-json":68,"./modules/es7.object.get-own-property-descriptors":69,"./modules/es7.object.to-array":70,"./modules/es7.regexp.escape":71,"./modules/es7.set.to-json":72,"./modules/es7.string.at":73,"./modules/js.array.statics":74,"./modules/web.dom.iterable":75,"./modules/web.immediate":76,"./modules/web.timers":77}],79:[function(require,module,exports){ (function (global){ /** * Copyright (c) 2014, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * https://raw.github.com/facebook/regenerator/master/LICENSE file. An * additional grant of patent rights can be found in the PATENTS file in * the same directory. */ !(function(global) { "use strict"; var hasOwn = Object.prototype.hasOwnProperty; var undefined; // More compressible than void 0. var iteratorSymbol = typeof Symbol === "function" && Symbol.iterator || "@@iterator"; var inModule = typeof module === "object"; var runtime = global.regeneratorRuntime; if (runtime) { if (inModule) { // If regeneratorRuntime is defined globally and we're in a module, // make the exports object identical to regeneratorRuntime. module.exports = runtime; } // Don't bother evaluating the rest of this file if the runtime was // already defined globally. return; } // Define the runtime globally (as expected by generated code) as either // module.exports (if we're in a module) or a new, empty object. runtime = global.regeneratorRuntime = inModule ? module.exports : {}; function wrap(innerFn, outerFn, self, tryLocsList) { // If outerFn provided, then outerFn.prototype instanceof Generator. var generator = Object.create((outerFn || Generator).prototype); generator._invoke = makeInvokeMethod( innerFn, self || null, new Context(tryLocsList || []) ); return generator; } runtime.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion // record like context.tryEntries[i].completion. This interface could // have been (and was previously) designed to take a closure to be // invoked without arguments, but in all the cases we care about we // already have an existing method we want to call, so there's no need // to create a new function object. We can even get away with assuming // the method takes exactly one argument, since that happens to be true // in every case, so we don't have to touch the arguments object. The // only additional allocation required is the completion record, which // has a stable shape and so hopefully should be cheap to allocate. function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } var GenStateSuspendedStart = "suspendedStart"; var GenStateSuspendedYield = "suspendedYield"; var GenStateExecuting = "executing"; var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as // breaking out of the dispatch switch statement. var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and // .constructor.prototype properties for functions that return Generator // objects. For full spec compliance, you may wish to configure your // minifier not to mangle the names of these two functions. function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype; GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; GeneratorFunctionPrototype.constructor = GeneratorFunction; GeneratorFunction.displayName = "GeneratorFunction"; runtime.isGeneratorFunction = function(genFun) { var ctor = typeof genFun === "function" && genFun.constructor; return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can // do is to check its .name property. (ctor.displayName || ctor.name) === "GeneratorFunction" : false; }; runtime.mark = function(genFun) { genFun.__proto__ = GeneratorFunctionPrototype; genFun.prototype = Object.create(Gp); return genFun; }; runtime.async = function(innerFn, outerFn, self, tryLocsList) { return new Promise(function(resolve, reject) { var generator = wrap(innerFn, outerFn, self, tryLocsList); var callNext = step.bind(generator, "next"); var callThrow = step.bind(generator, "throw"); function step(method, arg) { var record = tryCatch(generator[method], generator, arg); if (record.type === "throw") { reject(record.arg); return; } var info = record.arg; if (info.done) { resolve(info.value); } else { Promise.resolve(info.value).then(callNext, callThrow); } } callNext(); }); }; function makeInvokeMethod(innerFn, self, context) { var state = GenStateSuspendedStart; return function invoke(method, arg) { if (state === GenStateExecuting) { throw new Error("Generator is already running"); } if (state === GenStateCompleted) { // Be forgiving, per 25.3.3.3.3 of the spec: // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume return doneResult(); } while (true) { var delegate = context.delegate; if (delegate) { if (method === "return" || (method === "throw" && delegate.iterator[method] === undefined)) { // A return or throw (when the delegate iterator has no throw // method) always terminates the yield* loop. context.delegate = null; // If the delegate iterator has a return method, give it a // chance to clean up. var returnMethod = delegate.iterator["return"]; if (returnMethod) { var record = tryCatch(returnMethod, delegate.iterator, arg); if (record.type === "throw") { // If the return method threw an exception, let that // exception prevail over the original return or throw. method = "throw"; arg = record.arg; continue; } } if (method === "return") { // Continue with the outer return, now that the delegate // iterator has been terminated. continue; } } var record = tryCatch( delegate.iterator[method], delegate.iterator, arg ); if (record.type === "throw") { context.delegate = null; // Like returning generator.throw(uncaught), but without the // overhead of an extra function call. method = "throw"; arg = record.arg; continue; } // Delegate generator ran and handled its own exceptions so // regardless of what the method was, we continue as if it is // "next" with an undefined arg. method = "next"; arg = undefined; var info = record.arg; if (info.done) { context[delegate.resultName] = info.value; context.next = delegate.nextLoc; } else { state = GenStateSuspendedYield; return info; } context.delegate = null; } if (method === "next") { if (state === GenStateSuspendedYield) { context.sent = arg; } else { delete context.sent; } } else if (method === "throw") { if (state === GenStateSuspendedStart) { state = GenStateCompleted; throw arg; } if (context.dispatchException(arg)) { // If the dispatched exception was caught by a catch block, // then let that catch block handle the exception normally. method = "next"; arg = undefined; } } else if (method === "return") { context.abrupt("return", arg); } state = GenStateExecuting; var record = tryCatch(innerFn, self, context); if (record.type === "normal") { // If an exception is thrown from innerFn, we leave state === // GenStateExecuting and loop back for another invocation. state = context.done ? GenStateCompleted : GenStateSuspendedYield; var info = { value: record.arg, done: context.done }; if (record.arg === ContinueSentinel) { if (context.delegate && method === "next") { // Deliberately forget the last sent value so that we don't // accidentally pass it on to the delegate. arg = undefined; } } else { return info; } } else if (record.type === "throw") { state = GenStateCompleted; // Dispatch the exception by looping back around to the // context.dispatchException(arg) call above. method = "throw"; arg = record.arg; } } }; } function defineGeneratorMethod(method) { Gp[method] = function(arg) { return this._invoke(method, arg); }; } defineGeneratorMethod("next"); defineGeneratorMethod("throw"); defineGeneratorMethod("return"); Gp[iteratorSymbol] = function() { return this; }; Gp.toString = function() { return "[object Generator]"; }; function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; if (1 in locs) { entry.catchLoc = locs[1]; } if (2 in locs) { entry.finallyLoc = locs[2]; entry.afterLoc = locs[3]; } this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal"; delete record.arg; entry.completion = record; } function Context(tryLocsList) { // The root entry object (effectively a try statement without a catch // or a finally block) gives us a place to store values thrown from // locations where there is no enclosing try statement. this.tryEntries = [{ tryLoc: "root" }]; tryLocsList.forEach(pushTryEntry, this); this.reset(); } runtime.keys = function(object) { var keys = []; for (var key in object) { keys.push(key); } keys.reverse(); // Rather than returning an object with a next method, we keep // things simple and return the next function itself. return function next() { while (keys.length) { var key = keys.pop(); if (key in object) { next.value = key; next.done = false; return next; } } // To avoid creating an additional object, we just hang the .value // and .done properties off the next function object itself. This // also ensures that the minifier will not anonymize the function. next.done = true; return next; }; }; function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) { return iteratorMethod.call(iterable); } if (typeof iterable.next === "function") { return iterable; } if (!isNaN(iterable.length)) { var i = -1, next = function next() { while (++i < iterable.length) { if (hasOwn.call(iterable, i)) { next.value = iterable[i]; next.done = false; return next; } } next.value = undefined; next.done = true; return next; }; return next.next = next; } } // Return an iterator with no values. return { next: doneResult }; } runtime.values = values; function doneResult() { return { value: undefined, done: true }; } Context.prototype = { constructor: Context, reset: function() { this.prev = 0; this.next = 0; this.sent = undefined; this.done = false; this.delegate = null; this.tryEntries.forEach(resetTryEntry); // Pre-initialize at least 20 temporary variables to enable hidden // class optimizations for simple generators. for (var tempIndex = 0, tempName; hasOwn.call(this, tempName = "t" + tempIndex) || tempIndex < 20; ++tempIndex) { this[tempName] = null; } }, stop: function() { this.done = true; var rootEntry = this.tryEntries[0]; var rootRecord = rootEntry.completion; if (rootRecord.type === "throw") { throw rootRecord.arg; } return this.rval; }, dispatchException: function(exception) { if (this.done) { throw exception; } var context = this; function handle(loc, caught) { record.type = "throw"; record.arg = exception; context.next = loc; return !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; var record = entry.completion; if (entry.tryLoc === "root") { // Exception thrown outside of any try block that could handle // it, so set the completion value of the entire function to // throw the exception. return handle("end"); } if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"); var hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) { return handle(entry.catchLoc, true); } else if (this.prev < entry.finallyLoc) { return handle(entry.finallyLoc); } } else if (hasCatch) { if (this.prev < entry.catchLoc) { return handle(entry.catchLoc, true); } } else if (hasFinally) { if (this.prev < entry.finallyLoc) { return handle(entry.finallyLoc); } } else { throw new Error("try statement without catch or finally"); } } } }, abrupt: function(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { // Ignore the finally entry if control is not jumping to a // location outside the try/catch block. finallyEntry = null; } var record = finallyEntry ? finallyEntry.completion : {}; record.type = type; record.arg = arg; if (finallyEntry) { this.next = finallyEntry.finallyLoc; } else { this.complete(record); } return ContinueSentinel; }, complete: function(record, afterLoc) { if (record.type === "throw") { throw record.arg; } if (record.type === "break" || record.type === "continue") { this.next = record.arg; } else if (record.type === "return") { this.rval = record.arg; this.next = "end"; } else if (record.type === "normal" && afterLoc) { this.next = afterLoc; } return ContinueSentinel; }, finish: function(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) { return this.complete(entry.completion, entry.afterLoc); } } }, "catch": function(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if (record.type === "throw") { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } // The context.catch method must only be called with a location // argument that corresponds to a known catch block. throw new Error("illegal catch attempt"); }, delegateYield: function(iterable, resultName, nextLoc) { this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }; return ContinueSentinel; } }; })( // Among the various tricks for obtaining a reference to the global // object, this seems to be the most reliable technique that does not // use indirect eval (which violates Content Security Policy). typeof global === "object" ? global : typeof window === "object" ? window : typeof self === "object" ? self : this ); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{}]},{},[1]);
h2hell-web/src/main/webapp/assets/plugins/x-editable/bootstrap3-editable/js/bootstrap-editable.js
highway-to-urhell/highway-to-urhell-web
/*! X-editable - v1.5.1 * In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery * http://github.com/vitalets/x-editable * Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */ /** Form with single input element, two buttons and two states: normal/loading. Applied as jQuery method to DIV tag (not to form tag!). This is because form can be in loading state when spinner shown. Editableform is linked with one of input types, e.g. 'text', 'select' etc. @class editableform @uses text @uses textarea **/ (function ($) { "use strict"; var EditableForm = function (div, options) { this.options = $.extend({}, $.fn.editableform.defaults, options); this.$div = $(div); //div, containing form. Not form tag. Not editable-element. if(!this.options.scope) { this.options.scope = this; } //nothing shown after init }; EditableForm.prototype = { constructor: EditableForm, initInput: function() { //called once //take input from options (as it is created in editable-element) this.input = this.options.input; //set initial value //todo: may be add check: typeof str === 'string' ? this.value = this.input.str2value(this.options.value); //prerender: get input.$input this.input.prerender(); }, initTemplate: function() { this.$form = $($.fn.editableform.template); }, initButtons: function() { var $btn = this.$form.find('.editable-buttons'); $btn.append($.fn.editableform.buttons); if(this.options.showbuttons === 'bottom') { $btn.addClass('editable-buttons-bottom'); } }, /** Renders editableform @method render **/ render: function() { //init loader this.$loading = $($.fn.editableform.loading); this.$div.empty().append(this.$loading); //init form template and buttons this.initTemplate(); if(this.options.showbuttons) { this.initButtons(); } else { this.$form.find('.editable-buttons').remove(); } //show loading state this.showLoading(); //flag showing is form now saving value to server. //It is needed to wait when closing form. this.isSaving = false; /** Fired when rendering starts @event rendering @param {Object} event event object **/ this.$div.triggerHandler('rendering'); //init input this.initInput(); //append input to form this.$form.find('div.editable-input').append(this.input.$tpl); //append form to container this.$div.append(this.$form); //render input $.when(this.input.render()) .then($.proxy(function () { //setup input to submit automatically when no buttons shown if(!this.options.showbuttons) { this.input.autosubmit(); } //attach 'cancel' handler this.$form.find('.editable-cancel').click($.proxy(this.cancel, this)); if(this.input.error) { this.error(this.input.error); this.$form.find('.editable-submit').attr('disabled', true); this.input.$input.attr('disabled', true); //prevent form from submitting this.$form.submit(function(e){ e.preventDefault(); }); } else { this.error(false); this.input.$input.removeAttr('disabled'); this.$form.find('.editable-submit').removeAttr('disabled'); var value = (this.value === null || this.value === undefined || this.value === '') ? this.options.defaultValue : this.value; this.input.value2input(value); //attach submit handler this.$form.submit($.proxy(this.submit, this)); } /** Fired when form is rendered @event rendered @param {Object} event event object **/ this.$div.triggerHandler('rendered'); this.showForm(); //call postrender method to perform actions required visibility of form if(this.input.postrender) { this.input.postrender(); } }, this)); }, cancel: function() { /** Fired when form was cancelled by user @event cancel @param {Object} event event object **/ this.$div.triggerHandler('cancel'); }, showLoading: function() { var w, h; if(this.$form) { //set loading size equal to form w = this.$form.outerWidth(); h = this.$form.outerHeight(); if(w) { this.$loading.width(w); } if(h) { this.$loading.height(h); } this.$form.hide(); } else { //stretch loading to fill container width w = this.$loading.parent().width(); if(w) { this.$loading.width(w); } } this.$loading.show(); }, showForm: function(activate) { this.$loading.hide(); this.$form.show(); if(activate !== false) { this.input.activate(); } /** Fired when form is shown @event show @param {Object} event event object **/ this.$div.triggerHandler('show'); }, error: function(msg) { var $group = this.$form.find('.control-group'), $block = this.$form.find('.editable-error-block'), lines; if(msg === false) { $group.removeClass($.fn.editableform.errorGroupClass); $block.removeClass($.fn.editableform.errorBlockClass).empty().hide(); } else { //convert newline to <br> for more pretty error display if(msg) { lines = (''+msg).split('\n'); for (var i = 0; i < lines.length; i++) { lines[i] = $('<div>').text(lines[i]).html(); } msg = lines.join('<br>'); } $group.addClass($.fn.editableform.errorGroupClass); $block.addClass($.fn.editableform.errorBlockClass).html(msg).show(); } }, submit: function(e) { e.stopPropagation(); e.preventDefault(); //get new value from input var newValue = this.input.input2value(); //validation: if validate returns string or truthy value - means error //if returns object like {newValue: '...'} => submitted value is reassigned to it var error = this.validate(newValue); if ($.type(error) === 'object' && error.newValue !== undefined) { newValue = error.newValue; this.input.value2input(newValue); if(typeof error.msg === 'string') { this.error(error.msg); this.showForm(); return; } } else if (error) { this.error(error); this.showForm(); return; } //if value not changed --> trigger 'nochange' event and return /*jslint eqeq: true*/ if (!this.options.savenochange && this.input.value2str(newValue) == this.input.value2str(this.value)) { /*jslint eqeq: false*/ /** Fired when value not changed but form is submitted. Requires savenochange = false. @event nochange @param {Object} event event object **/ this.$div.triggerHandler('nochange'); return; } //convert value for submitting to server var submitValue = this.input.value2submit(newValue); this.isSaving = true; //sending data to server $.when(this.save(submitValue)) .done($.proxy(function(response) { this.isSaving = false; //run success callback var res = typeof this.options.success === 'function' ? this.options.success.call(this.options.scope, response, newValue) : null; //if success callback returns false --> keep form open and do not activate input if(res === false) { this.error(false); this.showForm(false); return; } //if success callback returns string --> keep form open, show error and activate input if(typeof res === 'string') { this.error(res); this.showForm(); return; } //if success callback returns object like {newValue: <something>} --> use that value instead of submitted //it is usefull if you want to chnage value in url-function if(res && typeof res === 'object' && res.hasOwnProperty('newValue')) { newValue = res.newValue; } //clear error message this.error(false); this.value = newValue; /** Fired when form is submitted @event save @param {Object} event event object @param {Object} params additional params @param {mixed} params.newValue raw new value @param {mixed} params.submitValue submitted value as string @param {Object} params.response ajax response @example $('#form-div').on('save'), function(e, params){ if(params.newValue === 'username') {...} }); **/ this.$div.triggerHandler('save', {newValue: newValue, submitValue: submitValue, response: response}); }, this)) .fail($.proxy(function(xhr) { this.isSaving = false; var msg; if(typeof this.options.error === 'function') { msg = this.options.error.call(this.options.scope, xhr, newValue); } else { msg = typeof xhr === 'string' ? xhr : xhr.responseText || xhr.statusText || 'Unknown error!'; } this.error(msg); this.showForm(); }, this)); }, save: function(submitValue) { //try parse composite pk defined as json string in data-pk this.options.pk = $.fn.editableutils.tryParseJson(this.options.pk, true); var pk = (typeof this.options.pk === 'function') ? this.options.pk.call(this.options.scope) : this.options.pk, /* send on server in following cases: 1. url is function 2. url is string AND (pk defined OR send option = always) */ send = !!(typeof this.options.url === 'function' || (this.options.url && ((this.options.send === 'always') || (this.options.send === 'auto' && pk !== null && pk !== undefined)))), params; if (send) { //send to server this.showLoading(); //standard params params = { name: this.options.name || '', value: submitValue, pk: pk }; //additional params if(typeof this.options.params === 'function') { params = this.options.params.call(this.options.scope, params); } else { //try parse json in single quotes (from data-params attribute) this.options.params = $.fn.editableutils.tryParseJson(this.options.params, true); $.extend(params, this.options.params); } if(typeof this.options.url === 'function') { //user's function return this.options.url.call(this.options.scope, params); } else { //send ajax to server and return deferred object return $.ajax($.extend({ url : this.options.url, data : params, type : 'POST' }, this.options.ajaxOptions)); } } }, validate: function (value) { if (value === undefined) { value = this.value; } if (typeof this.options.validate === 'function') { return this.options.validate.call(this.options.scope, value); } }, option: function(key, value) { if(key in this.options) { this.options[key] = value; } if(key === 'value') { this.setValue(value); } //do not pass option to input as it is passed in editable-element }, setValue: function(value, convertStr) { if(convertStr) { this.value = this.input.str2value(value); } else { this.value = value; } //if form is visible, update input if(this.$form && this.$form.is(':visible')) { this.input.value2input(this.value); } } }; /* Initialize editableform. Applied to jQuery object. @method $().editableform(options) @params {Object} options @example var $form = $('&lt;div&gt;').editableform({ type: 'text', name: 'username', url: '/post', value: 'vitaliy' }); //to display form you should call 'render' method $form.editableform('render'); */ $.fn.editableform = function (option) { var args = arguments; return this.each(function () { var $this = $(this), data = $this.data('editableform'), options = typeof option === 'object' && option; if (!data) { $this.data('editableform', (data = new EditableForm(this, options))); } if (typeof option === 'string') { //call method data[option].apply(data, Array.prototype.slice.call(args, 1)); } }); }; //keep link to constructor to allow inheritance $.fn.editableform.Constructor = EditableForm; //defaults $.fn.editableform.defaults = { /* see also defaults for input */ /** Type of input. Can be <code>text|textarea|select|date|checklist</code> @property type @type string @default 'text' **/ type: 'text', /** Url for submit, e.g. <code>'/post'</code> If function - it will be called instead of ajax. Function should return deferred object to run fail/done callbacks. @property url @type string|function @default null @example url: function(params) { var d = new $.Deferred; if(params.value === 'abc') { return d.reject('error message'); //returning error via deferred object } else { //async saving data in js model someModel.asyncSaveMethod({ ..., success: function(){ d.resolve(); } }); return d.promise(); } } **/ url:null, /** Additional params for submit. If defined as <code>object</code> - it is **appended** to original ajax data (pk, name and value). If defined as <code>function</code> - returned object **overwrites** original ajax data. @example params: function(params) { //originally params contain pk, name and value params.a = 1; return params; } @property params @type object|function @default null **/ params:null, /** Name of field. Will be submitted on server. Can be taken from <code>id</code> attribute @property name @type string @default null **/ name: null, /** Primary key of editable object (e.g. record id in database). For composite keys use object, e.g. <code>{id: 1, lang: 'en'}</code>. Can be calculated dynamically via function. @property pk @type string|object|function @default null **/ pk: null, /** Initial value. If not defined - will be taken from element's content. For __select__ type should be defined (as it is ID of shown text). @property value @type string|object @default null **/ value: null, /** Value that will be displayed in input if original field value is empty (`null|undefined|''`). @property defaultValue @type string|object @default null @since 1.4.6 **/ defaultValue: null, /** Strategy for sending data on server. Can be `auto|always|never`. When 'auto' data will be sent on server **only if pk and url defined**, otherwise new value will be stored locally. @property send @type string @default 'auto' **/ send: 'auto', /** Function for client-side validation. If returns string - means validation not passed and string showed as error. Since 1.5.1 you can modify submitted value by returning object from `validate`: `{newValue: '...'}` or `{newValue: '...', msg: '...'}` @property validate @type function @default null @example validate: function(value) { if($.trim(value) == '') { return 'This field is required'; } } **/ validate: null, /** Success callback. Called when value successfully sent on server and **response status = 200**. Usefull to work with json response. For example, if your backend response can be <code>{success: true}</code> or <code>{success: false, msg: "server error"}</code> you can check it inside this callback. If it returns **string** - means error occured and string is shown as error message. If it returns **object like** <code>{newValue: &lt;something&gt;}</code> - it overwrites value, submitted by user. Otherwise newValue simply rendered into element. @property success @type function @default null @example success: function(response, newValue) { if(!response.success) return response.msg; } **/ success: null, /** Error callback. Called when request failed (response status != 200). Usefull when you want to parse error response and display a custom message. Must return **string** - the message to be displayed in the error block. @property error @type function @default null @since 1.4.4 @example error: function(response, newValue) { if(response.status === 500) { return 'Service unavailable. Please try later.'; } else { return response.responseText; } } **/ error: null, /** Additional options for submit ajax request. List of values: http://api.jquery.com/jQuery.ajax @property ajaxOptions @type object @default null @since 1.1.1 @example ajaxOptions: { type: 'put', dataType: 'json' } **/ ajaxOptions: null, /** Where to show buttons: left(true)|bottom|false Form without buttons is auto-submitted. @property showbuttons @type boolean|string @default true @since 1.1.1 **/ showbuttons: true, /** Scope for callback methods (success, validate). If <code>null</code> means editableform instance itself. @property scope @type DOMElement|object @default null @since 1.2.0 @private **/ scope: null, /** Whether to save or cancel value when it was not changed but form was submitted @property savenochange @type boolean @default false @since 1.2.0 **/ savenochange: false }; /* Note: following params could redefined in engine: bootstrap or jqueryui: Classes 'control-group' and 'editable-error-block' must always present! */ $.fn.editableform.template = '<form class="form-inline editableform">'+ '<div class="control-group">' + '<div><div class="editable-input"></div><div class="editable-buttons"></div></div>'+ '<div class="editable-error-block"></div>' + '</div>' + '</form>'; //loading div $.fn.editableform.loading = '<div class="editableform-loading"></div>'; //buttons $.fn.editableform.buttons = '<button type="submit" class="editable-submit">ok</button>'+ '<button type="button" class="editable-cancel">cancel</button>'; //error class attached to control-group $.fn.editableform.errorGroupClass = null; //error class attached to editable-error-block $.fn.editableform.errorBlockClass = 'editable-error'; //engine $.fn.editableform.engine = 'jquery'; }(window.jQuery)); /** * EditableForm utilites */ (function ($) { "use strict"; //utils $.fn.editableutils = { /** * classic JS inheritance function */ inherit: function (Child, Parent) { var F = function() { }; F.prototype = Parent.prototype; Child.prototype = new F(); Child.prototype.constructor = Child; Child.superclass = Parent.prototype; }, /** * set caret position in input * see http://stackoverflow.com/questions/499126/jquery-set-cursor-position-in-text-area */ setCursorPosition: function(elem, pos) { if (elem.setSelectionRange) { elem.setSelectionRange(pos, pos); } else if (elem.createTextRange) { var range = elem.createTextRange(); range.collapse(true); range.moveEnd('character', pos); range.moveStart('character', pos); range.select(); } }, /** * function to parse JSON in *single* quotes. (jquery automatically parse only double quotes) * That allows such code as: <a data-source="{'a': 'b', 'c': 'd'}"> * safe = true --> means no exception will be thrown * for details see http://stackoverflow.com/questions/7410348/how-to-set-json-format-to-html5-data-attributes-in-the-jquery */ tryParseJson: function(s, safe) { if (typeof s === 'string' && s.length && s.match(/^[\{\[].*[\}\]]$/)) { if (safe) { try { /*jslint evil: true*/ s = (new Function('return ' + s))(); /*jslint evil: false*/ } catch (e) {} finally { return s; } } else { /*jslint evil: true*/ s = (new Function('return ' + s))(); /*jslint evil: false*/ } } return s; }, /** * slice object by specified keys */ sliceObj: function(obj, keys, caseSensitive /* default: false */) { var key, keyLower, newObj = {}; if (!$.isArray(keys) || !keys.length) { return newObj; } for (var i = 0; i < keys.length; i++) { key = keys[i]; if (obj.hasOwnProperty(key)) { newObj[key] = obj[key]; } if(caseSensitive === true) { continue; } //when getting data-* attributes via $.data() it's converted to lowercase. //details: http://stackoverflow.com/questions/7602565/using-data-attributes-with-jquery //workaround is code below. keyLower = key.toLowerCase(); if (obj.hasOwnProperty(keyLower)) { newObj[key] = obj[keyLower]; } } return newObj; }, /* exclude complex objects from $.data() before pass to config */ getConfigData: function($element) { var data = {}; $.each($element.data(), function(k, v) { if(typeof v !== 'object' || (v && typeof v === 'object' && (v.constructor === Object || v.constructor === Array))) { data[k] = v; } }); return data; }, /* returns keys of object */ objectKeys: function(o) { if (Object.keys) { return Object.keys(o); } else { if (o !== Object(o)) { throw new TypeError('Object.keys called on a non-object'); } var k=[], p; for (p in o) { if (Object.prototype.hasOwnProperty.call(o,p)) { k.push(p); } } return k; } }, /** method to escape html. **/ escape: function(str) { return $('<div>').text(str).html(); }, /* returns array items from sourceData having value property equal or inArray of 'value' */ itemsByValue: function(value, sourceData, valueProp) { if(!sourceData || value === null) { return []; } if (typeof(valueProp) !== "function") { var idKey = valueProp || 'value'; valueProp = function (e) { return e[idKey]; }; } var isValArray = $.isArray(value), result = [], that = this; $.each(sourceData, function(i, o) { if(o.children) { result = result.concat(that.itemsByValue(value, o.children, valueProp)); } else { /*jslint eqeq: true*/ if(isValArray) { if($.grep(value, function(v){ return v == (o && typeof o === 'object' ? valueProp(o) : o); }).length) { result.push(o); } } else { var itemValue = (o && (typeof o === 'object')) ? valueProp(o) : o; if(value == itemValue) { result.push(o); } } /*jslint eqeq: false*/ } }); return result; }, /* Returns input by options: type, mode. */ createInput: function(options) { var TypeConstructor, typeOptions, input, type = options.type; //`date` is some kind of virtual type that is transformed to one of exact types //depending on mode and core lib if(type === 'date') { //inline if(options.mode === 'inline') { if($.fn.editabletypes.datefield) { type = 'datefield'; } else if($.fn.editabletypes.dateuifield) { type = 'dateuifield'; } //popup } else { if($.fn.editabletypes.date) { type = 'date'; } else if($.fn.editabletypes.dateui) { type = 'dateui'; } } //if type still `date` and not exist in types, replace with `combodate` that is base input if(type === 'date' && !$.fn.editabletypes.date) { type = 'combodate'; } } //`datetime` should be datetimefield in 'inline' mode if(type === 'datetime' && options.mode === 'inline') { type = 'datetimefield'; } //change wysihtml5 to textarea for jquery UI and plain versions if(type === 'wysihtml5' && !$.fn.editabletypes[type]) { type = 'textarea'; } //create input of specified type. Input will be used for converting value, not in form if(typeof $.fn.editabletypes[type] === 'function') { TypeConstructor = $.fn.editabletypes[type]; typeOptions = this.sliceObj(options, this.objectKeys(TypeConstructor.defaults)); input = new TypeConstructor(typeOptions); return input; } else { $.error('Unknown type: '+ type); return false; } }, //see http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr supportsTransitions: function () { var b = document.body || document.documentElement, s = b.style, p = 'transition', v = ['Moz', 'Webkit', 'Khtml', 'O', 'ms']; if(typeof s[p] === 'string') { return true; } // Tests for vendor specific prop p = p.charAt(0).toUpperCase() + p.substr(1); for(var i=0; i<v.length; i++) { if(typeof s[v[i] + p] === 'string') { return true; } } return false; } }; }(window.jQuery)); /** Attaches stand-alone container with editable-form to HTML element. Element is used only for positioning, value is not stored anywhere.<br> This method applied internally in <code>$().editable()</code>. You should subscribe on it's events (save / cancel) to get profit of it.<br> Final realization can be different: bootstrap-popover, jqueryui-tooltip, poshytip, inline-div. It depends on which js file you include.<br> Applied as jQuery method. @class editableContainer @uses editableform **/ (function ($) { "use strict"; var Popup = function (element, options) { this.init(element, options); }; var Inline = function (element, options) { this.init(element, options); }; //methods Popup.prototype = { containerName: null, //method to call container on element containerDataName: null, //object name in element's .data() innerCss: null, //tbd in child class containerClass: 'editable-container editable-popup', //css class applied to container element defaults: {}, //container itself defaults init: function(element, options) { this.$element = $(element); //since 1.4.1 container do not use data-* directly as they already merged into options. this.options = $.extend({}, $.fn.editableContainer.defaults, options); this.splitOptions(); //set scope of form callbacks to element this.formOptions.scope = this.$element[0]; this.initContainer(); //flag to hide container, when saving value will finish this.delayedHide = false; //bind 'destroyed' listener to destroy container when element is removed from dom this.$element.on('destroyed', $.proxy(function(){ this.destroy(); }, this)); //attach document handler to close containers on click / escape if(!$(document).data('editable-handlers-attached')) { //close all on escape $(document).on('keyup.editable', function (e) { if (e.which === 27) { $('.editable-open').editableContainer('hide'); //todo: return focus on element } }); //close containers when click outside //(mousedown could be better than click, it closes everything also on drag drop) $(document).on('click.editable', function(e) { var $target = $(e.target), i, exclude_classes = ['.editable-container', '.ui-datepicker-header', '.datepicker', //in inline mode datepicker is rendered into body '.modal-backdrop', '.bootstrap-wysihtml5-insert-image-modal', '.bootstrap-wysihtml5-insert-link-modal' ]; //check if element is detached. It occurs when clicking in bootstrap datepicker if (!$.contains(document.documentElement, e.target)) { return; } //for some reason FF 20 generates extra event (click) in select2 widget with e.target = document //we need to filter it via construction below. See https://github.com/vitalets/x-editable/issues/199 //Possibly related to http://stackoverflow.com/questions/10119793/why-does-firefox-react-differently-from-webkit-and-ie-to-click-event-on-selec if($target.is(document)) { return; } //if click inside one of exclude classes --> no nothing for(i=0; i<exclude_classes.length; i++) { if($target.is(exclude_classes[i]) || $target.parents(exclude_classes[i]).length) { return; } } //close all open containers (except one - target) Popup.prototype.closeOthers(e.target); }); $(document).data('editable-handlers-attached', true); } }, //split options on containerOptions and formOptions splitOptions: function() { this.containerOptions = {}; this.formOptions = {}; if(!$.fn[this.containerName]) { throw new Error(this.containerName + ' not found. Have you included corresponding js file?'); } //keys defined in container defaults go to container, others go to form for(var k in this.options) { if(k in this.defaults) { this.containerOptions[k] = this.options[k]; } else { this.formOptions[k] = this.options[k]; } } }, /* Returns jquery object of container @method tip() */ tip: function() { return this.container() ? this.container().$tip : null; }, /* returns container object */ container: function() { var container; //first, try get it by `containerDataName` if(this.containerDataName) { if(container = this.$element.data(this.containerDataName)) { return container; } } //second, try `containerName` container = this.$element.data(this.containerName); return container; }, /* call native method of underlying container, e.g. this.$element.popover('method') */ call: function() { this.$element[this.containerName].apply(this.$element, arguments); }, initContainer: function(){ this.call(this.containerOptions); }, renderForm: function() { this.$form .editableform(this.formOptions) .on({ save: $.proxy(this.save, this), //click on submit button (value changed) nochange: $.proxy(function(){ this.hide('nochange'); }, this), //click on submit button (value NOT changed) cancel: $.proxy(function(){ this.hide('cancel'); }, this), //click on calcel button show: $.proxy(function() { if(this.delayedHide) { this.hide(this.delayedHide.reason); this.delayedHide = false; } else { this.setPosition(); } }, this), //re-position container every time form is shown (occurs each time after loading state) rendering: $.proxy(this.setPosition, this), //this allows to place container correctly when loading shown resize: $.proxy(this.setPosition, this), //this allows to re-position container when form size is changed rendered: $.proxy(function(){ /** Fired when container is shown and form is rendered (for select will wait for loading dropdown options). **Note:** Bootstrap popover has own `shown` event that now cannot be separated from x-editable's one. The workaround is to check `arguments.length` that is always `2` for x-editable. @event shown @param {Object} event event object @example $('#username').on('shown', function(e, editable) { editable.input.$input.val('overwriting value of input..'); }); **/ /* TODO: added second param mainly to distinguish from bootstrap's shown event. It's a hotfix that will be solved in future versions via namespaced events. */ this.$element.triggerHandler('shown', $(this.options.scope).data('editable')); }, this) }) .editableform('render'); }, /** Shows container with form @method show() @param {boolean} closeAll Whether to close all other editable containers when showing this one. Default true. **/ /* Note: poshytip owerwrites this method totally! */ show: function (closeAll) { this.$element.addClass('editable-open'); if(closeAll !== false) { //close all open containers (except this) this.closeOthers(this.$element[0]); } //show container itself this.innerShow(); this.tip().addClass(this.containerClass); /* Currently, form is re-rendered on every show. The main reason is that we dont know, what will container do with content when closed: remove(), detach() or just hide() - it depends on container. Detaching form itself before hide and re-insert before show is good solution, but visually it looks ugly --> container changes size before hide. */ //if form already exist - delete previous data if(this.$form) { //todo: destroy prev data! //this.$form.destroy(); } this.$form = $('<div>'); //insert form into container body if(this.tip().is(this.innerCss)) { //for inline container this.tip().append(this.$form); } else { this.tip().find(this.innerCss).append(this.$form); } //render form this.renderForm(); }, /** Hides container with form @method hide() @param {string} reason Reason caused hiding. Can be <code>save|cancel|onblur|nochange|undefined (=manual)</code> **/ hide: function(reason) { if(!this.tip() || !this.tip().is(':visible') || !this.$element.hasClass('editable-open')) { return; } //if form is saving value, schedule hide if(this.$form.data('editableform').isSaving) { this.delayedHide = {reason: reason}; return; } else { this.delayedHide = false; } this.$element.removeClass('editable-open'); this.innerHide(); /** Fired when container was hidden. It occurs on both save or cancel. **Note:** Bootstrap popover has own `hidden` event that now cannot be separated from x-editable's one. The workaround is to check `arguments.length` that is always `2` for x-editable. @event hidden @param {object} event event object @param {string} reason Reason caused hiding. Can be <code>save|cancel|onblur|nochange|manual</code> @example $('#username').on('hidden', function(e, reason) { if(reason === 'save' || reason === 'cancel') { //auto-open next editable $(this).closest('tr').next().find('.editable').editable('show'); } }); **/ this.$element.triggerHandler('hidden', reason || 'manual'); }, /* internal show method. To be overwritten in child classes */ innerShow: function () { }, /* internal hide method. To be overwritten in child classes */ innerHide: function () { }, /** Toggles container visibility (show / hide) @method toggle() @param {boolean} closeAll Whether to close all other editable containers when showing this one. Default true. **/ toggle: function(closeAll) { if(this.container() && this.tip() && this.tip().is(':visible')) { this.hide(); } else { this.show(closeAll); } }, /* Updates the position of container when content changed. @method setPosition() */ setPosition: function() { //tbd in child class }, save: function(e, params) { /** Fired when new value was submitted. You can use <code>$(this).data('editableContainer')</code> inside handler to access to editableContainer instance @event save @param {Object} event event object @param {Object} params additional params @param {mixed} params.newValue submitted value @param {Object} params.response ajax response @example $('#username').on('save', function(e, params) { //assuming server response: '{success: true}' var pk = $(this).data('editableContainer').options.pk; if(params.response && params.response.success) { alert('value: ' + params.newValue + ' with pk: ' + pk + ' saved!'); } else { alert('error!'); } }); **/ this.$element.triggerHandler('save', params); //hide must be after trigger, as saving value may require methods of plugin, applied to input this.hide('save'); }, /** Sets new option @method option(key, value) @param {string} key @param {mixed} value **/ option: function(key, value) { this.options[key] = value; if(key in this.containerOptions) { this.containerOptions[key] = value; this.setContainerOption(key, value); } else { this.formOptions[key] = value; if(this.$form) { this.$form.editableform('option', key, value); } } }, setContainerOption: function(key, value) { this.call('option', key, value); }, /** Destroys the container instance @method destroy() **/ destroy: function() { this.hide(); this.innerDestroy(); this.$element.off('destroyed'); this.$element.removeData('editableContainer'); }, /* to be overwritten in child classes */ innerDestroy: function() { }, /* Closes other containers except one related to passed element. Other containers can be cancelled or submitted (depends on onblur option) */ closeOthers: function(element) { $('.editable-open').each(function(i, el){ //do nothing with passed element and it's children if(el === element || $(el).find(element).length) { return; } //otherwise cancel or submit all open containers var $el = $(el), ec = $el.data('editableContainer'); if(!ec) { return; } if(ec.options.onblur === 'cancel') { $el.data('editableContainer').hide('onblur'); } else if(ec.options.onblur === 'submit') { $el.data('editableContainer').tip().find('form').submit(); } }); }, /** Activates input of visible container (e.g. set focus) @method activate() **/ activate: function() { if(this.tip && this.tip().is(':visible') && this.$form) { this.$form.data('editableform').input.activate(); } } }; /** jQuery method to initialize editableContainer. @method $().editableContainer(options) @params {Object} options @example $('#edit').editableContainer({ type: 'text', url: '/post', pk: 1, value: 'hello' }); **/ $.fn.editableContainer = function (option) { var args = arguments; return this.each(function () { var $this = $(this), dataKey = 'editableContainer', data = $this.data(dataKey), options = typeof option === 'object' && option, Constructor = (options.mode === 'inline') ? Inline : Popup; if (!data) { $this.data(dataKey, (data = new Constructor(this, options))); } if (typeof option === 'string') { //call method data[option].apply(data, Array.prototype.slice.call(args, 1)); } }); }; //store constructors $.fn.editableContainer.Popup = Popup; $.fn.editableContainer.Inline = Inline; //defaults $.fn.editableContainer.defaults = { /** Initial value of form input @property value @type mixed @default null @private **/ value: null, /** Placement of container relative to element. Can be <code>top|right|bottom|left</code>. Not used for inline container. @property placement @type string @default 'top' **/ placement: 'top', /** Whether to hide container on save/cancel. @property autohide @type boolean @default true @private **/ autohide: true, /** Action when user clicks outside the container. Can be <code>cancel|submit|ignore</code>. Setting <code>ignore</code> allows to have several containers open. @property onblur @type string @default 'cancel' @since 1.1.1 **/ onblur: 'cancel', /** Animation speed (inline mode only) @property anim @type string @default false **/ anim: false, /** Mode of editable, can be `popup` or `inline` @property mode @type string @default 'popup' @since 1.4.0 **/ mode: 'popup' }; /* * workaround to have 'destroyed' event to destroy popover when element is destroyed * see http://stackoverflow.com/questions/2200494/jquery-trigger-event-when-an-element-is-removed-from-the-dom */ jQuery.event.special.destroyed = { remove: function(o) { if (o.handler) { o.handler(); } } }; }(window.jQuery)); /** * Editable Inline * --------------------- */ (function ($) { "use strict"; //copy prototype from EditableContainer //extend methods $.extend($.fn.editableContainer.Inline.prototype, $.fn.editableContainer.Popup.prototype, { containerName: 'editableform', innerCss: '.editable-inline', containerClass: 'editable-container editable-inline', //css class applied to container element initContainer: function(){ //container is <span> element this.$tip = $('<span></span>'); //convert anim to miliseconds (int) if(!this.options.anim) { this.options.anim = 0; } }, splitOptions: function() { //all options are passed to form this.containerOptions = {}; this.formOptions = this.options; }, tip: function() { return this.$tip; }, innerShow: function () { this.$element.hide(); this.tip().insertAfter(this.$element).show(); }, innerHide: function () { this.$tip.hide(this.options.anim, $.proxy(function() { this.$element.show(); this.innerDestroy(); }, this)); }, innerDestroy: function() { if(this.tip()) { this.tip().empty().remove(); } } }); }(window.jQuery)); /** Makes editable any HTML element on the page. Applied as jQuery method. @class editable @uses editableContainer **/ (function ($) { "use strict"; var Editable = function (element, options) { this.$element = $(element); //data-* has more priority over js options: because dynamically created elements may change data-* this.options = $.extend({}, $.fn.editable.defaults, options, $.fn.editableutils.getConfigData(this.$element)); if(this.options.selector) { this.initLive(); } else { this.init(); } //check for transition support if(this.options.highlight && !$.fn.editableutils.supportsTransitions()) { this.options.highlight = false; } }; Editable.prototype = { constructor: Editable, init: function () { var isValueByText = false, doAutotext, finalize; //name this.options.name = this.options.name || this.$element.attr('id'); //create input of specified type. Input needed already here to convert value for initial display (e.g. show text by id for select) //also we set scope option to have access to element inside input specific callbacks (e. g. source as function) this.options.scope = this.$element[0]; this.input = $.fn.editableutils.createInput(this.options); if(!this.input) { return; } //set value from settings or by element's text if (this.options.value === undefined || this.options.value === null) { this.value = this.input.html2value($.trim(this.$element.html())); isValueByText = true; } else { /* value can be string when received from 'data-value' attribute for complext objects value can be set as json string in data-value attribute, e.g. data-value="{city: 'Moscow', street: 'Lenina'}" */ this.options.value = $.fn.editableutils.tryParseJson(this.options.value, true); if(typeof this.options.value === 'string') { this.value = this.input.str2value(this.options.value); } else { this.value = this.options.value; } } //add 'editable' class to every editable element this.$element.addClass('editable'); //specifically for "textarea" add class .editable-pre-wrapped to keep linebreaks if(this.input.type === 'textarea') { this.$element.addClass('editable-pre-wrapped'); } //attach handler activating editable. In disabled mode it just prevent default action (useful for links) if(this.options.toggle !== 'manual') { this.$element.addClass('editable-click'); this.$element.on(this.options.toggle + '.editable', $.proxy(function(e){ //prevent following link if editable enabled if(!this.options.disabled) { e.preventDefault(); } //stop propagation not required because in document click handler it checks event target //e.stopPropagation(); if(this.options.toggle === 'mouseenter') { //for hover only show container this.show(); } else { //when toggle='click' we should not close all other containers as they will be closed automatically in document click listener var closeAll = (this.options.toggle !== 'click'); this.toggle(closeAll); } }, this)); } else { this.$element.attr('tabindex', -1); //do not stop focus on element when toggled manually } //if display is function it's far more convinient to have autotext = always to render correctly on init //see https://github.com/vitalets/x-editable-yii/issues/34 if(typeof this.options.display === 'function') { this.options.autotext = 'always'; } //check conditions for autotext: switch(this.options.autotext) { case 'always': doAutotext = true; break; case 'auto': //if element text is empty and value is defined and value not generated by text --> run autotext doAutotext = !$.trim(this.$element.text()).length && this.value !== null && this.value !== undefined && !isValueByText; break; default: doAutotext = false; } //depending on autotext run render() or just finilize init $.when(doAutotext ? this.render() : true).then($.proxy(function() { if(this.options.disabled) { this.disable(); } else { this.enable(); } /** Fired when element was initialized by `$().editable()` method. Please note that you should setup `init` handler **before** applying `editable`. @event init @param {Object} event event object @param {Object} editable editable instance (as here it cannot accessed via data('editable')) @since 1.2.0 @example $('#username').on('init', function(e, editable) { alert('initialized ' + editable.options.name); }); $('#username').editable(); **/ this.$element.triggerHandler('init', this); }, this)); }, /* Initializes parent element for live editables */ initLive: function() { //store selector var selector = this.options.selector; //modify options for child elements this.options.selector = false; this.options.autotext = 'never'; //listen toggle events this.$element.on(this.options.toggle + '.editable', selector, $.proxy(function(e){ var $target = $(e.target); if(!$target.data('editable')) { //if delegated element initially empty, we need to clear it's text (that was manually set to `empty` by user) //see https://github.com/vitalets/x-editable/issues/137 if($target.hasClass(this.options.emptyclass)) { $target.empty(); } $target.editable(this.options).trigger(e); } }, this)); }, /* Renders value into element's text. Can call custom display method from options. Can return deferred object. @method render() @param {mixed} response server response (if exist) to pass into display function */ render: function(response) { //do not display anything if(this.options.display === false) { return; } //if input has `value2htmlFinal` method, we pass callback in third param to be called when source is loaded if(this.input.value2htmlFinal) { return this.input.value2html(this.value, this.$element[0], this.options.display, response); //if display method defined --> use it } else if(typeof this.options.display === 'function') { return this.options.display.call(this.$element[0], this.value, response); //else use input's original value2html() method } else { return this.input.value2html(this.value, this.$element[0]); } }, /** Enables editable @method enable() **/ enable: function() { this.options.disabled = false; this.$element.removeClass('editable-disabled'); this.handleEmpty(this.isEmpty); if(this.options.toggle !== 'manual') { if(this.$element.attr('tabindex') === '-1') { this.$element.removeAttr('tabindex'); } } }, /** Disables editable @method disable() **/ disable: function() { this.options.disabled = true; this.hide(); this.$element.addClass('editable-disabled'); this.handleEmpty(this.isEmpty); //do not stop focus on this element this.$element.attr('tabindex', -1); }, /** Toggles enabled / disabled state of editable element @method toggleDisabled() **/ toggleDisabled: function() { if(this.options.disabled) { this.enable(); } else { this.disable(); } }, /** Sets new option @method option(key, value) @param {string|object} key option name or object with several options @param {mixed} value option new value @example $('.editable').editable('option', 'pk', 2); **/ option: function(key, value) { //set option(s) by object if(key && typeof key === 'object') { $.each(key, $.proxy(function(k, v){ this.option($.trim(k), v); }, this)); return; } //set option by string this.options[key] = value; //disabled if(key === 'disabled') { return value ? this.disable() : this.enable(); } //value if(key === 'value') { this.setValue(value); } //transfer new option to container! if(this.container) { this.container.option(key, value); } //pass option to input directly (as it points to the same in form) if(this.input.option) { this.input.option(key, value); } }, /* * set emptytext if element is empty */ handleEmpty: function (isEmpty) { //do not handle empty if we do not display anything if(this.options.display === false) { return; } /* isEmpty may be set directly as param of method. It is required when we enable/disable field and can't rely on content as node content is text: "Empty" that is not empty %) */ if(isEmpty !== undefined) { this.isEmpty = isEmpty; } else { //detect empty //for some inputs we need more smart check //e.g. wysihtml5 may have <br>, <p></p>, <img> if(typeof(this.input.isEmpty) === 'function') { this.isEmpty = this.input.isEmpty(this.$element); } else { this.isEmpty = $.trim(this.$element.html()) === ''; } } //emptytext shown only for enabled if(!this.options.disabled) { if (this.isEmpty) { this.$element.html(this.options.emptytext); if(this.options.emptyclass) { this.$element.addClass(this.options.emptyclass); } } else if(this.options.emptyclass) { this.$element.removeClass(this.options.emptyclass); } } else { //below required if element disable property was changed if(this.isEmpty) { this.$element.empty(); if(this.options.emptyclass) { this.$element.removeClass(this.options.emptyclass); } } } }, /** Shows container with form @method show() @param {boolean} closeAll Whether to close all other editable containers when showing this one. Default true. **/ show: function (closeAll) { if(this.options.disabled) { return; } //init editableContainer: popover, tooltip, inline, etc.. if(!this.container) { var containerOptions = $.extend({}, this.options, { value: this.value, input: this.input //pass input to form (as it is already created) }); this.$element.editableContainer(containerOptions); //listen `save` event this.$element.on("save.internal", $.proxy(this.save, this)); this.container = this.$element.data('editableContainer'); } else if(this.container.tip().is(':visible')) { return; } //show container this.container.show(closeAll); }, /** Hides container with form @method hide() **/ hide: function () { if(this.container) { this.container.hide(); } }, /** Toggles container visibility (show / hide) @method toggle() @param {boolean} closeAll Whether to close all other editable containers when showing this one. Default true. **/ toggle: function(closeAll) { if(this.container && this.container.tip().is(':visible')) { this.hide(); } else { this.show(closeAll); } }, /* * called when form was submitted */ save: function(e, params) { //mark element with unsaved class if needed if(this.options.unsavedclass) { /* Add unsaved css to element if: - url is not user's function - value was not sent to server - params.response === undefined, that means data was not sent - value changed */ var sent = false; sent = sent || typeof this.options.url === 'function'; sent = sent || this.options.display === false; sent = sent || params.response !== undefined; sent = sent || (this.options.savenochange && this.input.value2str(this.value) !== this.input.value2str(params.newValue)); if(sent) { this.$element.removeClass(this.options.unsavedclass); } else { this.$element.addClass(this.options.unsavedclass); } } //highlight when saving if(this.options.highlight) { var $e = this.$element, bgColor = $e.css('background-color'); $e.css('background-color', this.options.highlight); setTimeout(function(){ if(bgColor === 'transparent') { bgColor = ''; } $e.css('background-color', bgColor); $e.addClass('editable-bg-transition'); setTimeout(function(){ $e.removeClass('editable-bg-transition'); }, 1700); }, 10); } //set new value this.setValue(params.newValue, false, params.response); /** Fired when new value was submitted. You can use <code>$(this).data('editable')</code> to access to editable instance @event save @param {Object} event event object @param {Object} params additional params @param {mixed} params.newValue submitted value @param {Object} params.response ajax response @example $('#username').on('save', function(e, params) { alert('Saved value: ' + params.newValue); }); **/ //event itself is triggered by editableContainer. Description here is only for documentation }, validate: function () { if (typeof this.options.validate === 'function') { return this.options.validate.call(this, this.value); } }, /** Sets new value of editable @method setValue(value, convertStr) @param {mixed} value new value @param {boolean} convertStr whether to convert value from string to internal format **/ setValue: function(value, convertStr, response) { if(convertStr) { this.value = this.input.str2value(value); } else { this.value = value; } if(this.container) { this.container.option('value', this.value); } $.when(this.render(response)) .then($.proxy(function() { this.handleEmpty(); }, this)); }, /** Activates input of visible container (e.g. set focus) @method activate() **/ activate: function() { if(this.container) { this.container.activate(); } }, /** Removes editable feature from element @method destroy() **/ destroy: function() { this.disable(); if(this.container) { this.container.destroy(); } this.input.destroy(); if(this.options.toggle !== 'manual') { this.$element.removeClass('editable-click'); this.$element.off(this.options.toggle + '.editable'); } this.$element.off("save.internal"); this.$element.removeClass('editable editable-open editable-disabled'); this.$element.removeData('editable'); } }; /* EDITABLE PLUGIN DEFINITION * ======================= */ /** jQuery method to initialize editable element. @method $().editable(options) @params {Object} options @example $('#username').editable({ type: 'text', url: '/post', pk: 1 }); **/ $.fn.editable = function (option) { //special API methods returning non-jquery object var result = {}, args = arguments, datakey = 'editable'; switch (option) { /** Runs client-side validation for all matched editables @method validate() @returns {Object} validation errors map @example $('#username, #fullname').editable('validate'); // possible result: { username: "username is required", fullname: "fullname should be minimum 3 letters length" } **/ case 'validate': this.each(function () { var $this = $(this), data = $this.data(datakey), error; if (data && (error = data.validate())) { result[data.options.name] = error; } }); return result; /** Returns current values of editable elements. Note that it returns an **object** with name-value pairs, not a value itself. It allows to get data from several elements. If value of some editable is `null` or `undefined` it is excluded from result object. When param `isSingle` is set to **true** - it is supposed you have single element and will return value of editable instead of object. @method getValue() @param {bool} isSingle whether to return just value of single element @returns {Object} object of element names and values @example $('#username, #fullname').editable('getValue'); //result: { username: "superuser", fullname: "John" } //isSingle = true $('#username').editable('getValue', true); //result "superuser" **/ case 'getValue': if(arguments.length === 2 && arguments[1] === true) { //isSingle = true result = this.eq(0).data(datakey).value; } else { this.each(function () { var $this = $(this), data = $this.data(datakey); if (data && data.value !== undefined && data.value !== null) { result[data.options.name] = data.input.value2submit(data.value); } }); } return result; /** This method collects values from several editable elements and submit them all to server. Internally it runs client-side validation for all fields and submits only in case of success. See <a href="#newrecord">creating new records</a> for details. Since 1.5.1 `submit` can be applied to single element to send data programmatically. In that case `url`, `success` and `error` is taken from initial options and you can just call `$('#username').editable('submit')`. @method submit(options) @param {object} options @param {object} options.url url to submit data @param {object} options.data additional data to submit @param {object} options.ajaxOptions additional ajax options @param {function} options.error(obj) error handler @param {function} options.success(obj,config) success handler @returns {Object} jQuery object **/ case 'submit': //collects value, validate and submit to server for creating new record var config = arguments[1] || {}, $elems = this, errors = this.editable('validate'); // validation ok if($.isEmptyObject(errors)) { var ajaxOptions = {}; // for single element use url, success etc from options if($elems.length === 1) { var editable = $elems.data('editable'); //standard params var params = { name: editable.options.name || '', value: editable.input.value2submit(editable.value), pk: (typeof editable.options.pk === 'function') ? editable.options.pk.call(editable.options.scope) : editable.options.pk }; //additional params if(typeof editable.options.params === 'function') { params = editable.options.params.call(editable.options.scope, params); } else { //try parse json in single quotes (from data-params attribute) editable.options.params = $.fn.editableutils.tryParseJson(editable.options.params, true); $.extend(params, editable.options.params); } ajaxOptions = { url: editable.options.url, data: params, type: 'POST' }; // use success / error from options config.success = config.success || editable.options.success; config.error = config.error || editable.options.error; // multiple elements } else { var values = this.editable('getValue'); ajaxOptions = { url: config.url, data: values, type: 'POST' }; } // ajax success callabck (response 200 OK) ajaxOptions.success = typeof config.success === 'function' ? function(response) { config.success.call($elems, response, config); } : $.noop; // ajax error callabck ajaxOptions.error = typeof config.error === 'function' ? function() { config.error.apply($elems, arguments); } : $.noop; // extend ajaxOptions if(config.ajaxOptions) { $.extend(ajaxOptions, config.ajaxOptions); } // extra data if(config.data) { $.extend(ajaxOptions.data, config.data); } // perform ajax request $.ajax(ajaxOptions); } else { //client-side validation error if(typeof config.error === 'function') { config.error.call($elems, errors); } } return this; } //return jquery object return this.each(function () { var $this = $(this), data = $this.data(datakey), options = typeof option === 'object' && option; //for delegated targets do not store `editable` object for element //it's allows several different selectors. //see: https://github.com/vitalets/x-editable/issues/312 if(options && options.selector) { data = new Editable(this, options); return; } if (!data) { $this.data(datakey, (data = new Editable(this, options))); } if (typeof option === 'string') { //call method data[option].apply(data, Array.prototype.slice.call(args, 1)); } }); }; $.fn.editable.defaults = { /** Type of input. Can be <code>text|textarea|select|date|checklist</code> and more @property type @type string @default 'text' **/ type: 'text', /** Sets disabled state of editable @property disabled @type boolean @default false **/ disabled: false, /** How to toggle editable. Can be <code>click|dblclick|mouseenter|manual</code>. When set to <code>manual</code> you should manually call <code>show/hide</code> methods of editable. **Note**: if you call <code>show</code> or <code>toggle</code> inside **click** handler of some DOM element, you need to apply <code>e.stopPropagation()</code> because containers are being closed on any click on document. @example $('#edit-button').click(function(e) { e.stopPropagation(); $('#username').editable('toggle'); }); @property toggle @type string @default 'click' **/ toggle: 'click', /** Text shown when element is empty. @property emptytext @type string @default 'Empty' **/ emptytext: 'Empty', /** Allows to automatically set element's text based on it's value. Can be <code>auto|always|never</code>. Useful for select and date. For example, if dropdown list is <code>{1: 'a', 2: 'b'}</code> and element's value set to <code>1</code>, it's html will be automatically set to <code>'a'</code>. <code>auto</code> - text will be automatically set only if element is empty. <code>always|never</code> - always(never) try to set element's text. @property autotext @type string @default 'auto' **/ autotext: 'auto', /** Initial value of input. If not set, taken from element's text. Note, that if element's text is empty - text is automatically generated from value and can be customized (see `autotext` option). For example, to display currency sign: @example <a id="price" data-type="text" data-value="100"></a> <script> $('#price').editable({ ... display: function(value) { $(this).text(value + '$'); } }) </script> @property value @type mixed @default element's text **/ value: null, /** Callback to perform custom displaying of value in element's text. If `null`, default input's display used. If `false`, no displaying methods will be called, element's text will never change. Runs under element's scope. _**Parameters:**_ * `value` current value to be displayed * `response` server response (if display called after ajax submit), since 1.4.0 For _inputs with source_ (select, checklist) parameters are different: * `value` current value to be displayed * `sourceData` array of items for current input (e.g. dropdown items) * `response` server response (if display called after ajax submit), since 1.4.0 To get currently selected items use `$.fn.editableutils.itemsByValue(value, sourceData)`. @property display @type function|boolean @default null @since 1.2.0 @example display: function(value, sourceData) { //display checklist as comma-separated values var html = [], checked = $.fn.editableutils.itemsByValue(value, sourceData); if(checked.length) { $.each(checked, function(i, v) { html.push($.fn.editableutils.escape(v.text)); }); $(this).html(html.join(', ')); } else { $(this).empty(); } } **/ display: null, /** Css class applied when editable text is empty. @property emptyclass @type string @since 1.4.1 @default editable-empty **/ emptyclass: 'editable-empty', /** Css class applied when value was stored but not sent to server (`pk` is empty or `send = 'never'`). You may set it to `null` if you work with editables locally and submit them together. @property unsavedclass @type string @since 1.4.1 @default editable-unsaved **/ unsavedclass: 'editable-unsaved', /** If selector is provided, editable will be delegated to the specified targets. Usefull for dynamically generated DOM elements. **Please note**, that delegated targets can't be initialized with `emptytext` and `autotext` options, as they actually become editable only after first click. You should manually set class `editable-click` to these elements. Also, if element originally empty you should add class `editable-empty`, set `data-value=""` and write emptytext into element: @property selector @type string @since 1.4.1 @default null @example <div id="user"> <!-- empty --> <a href="#" data-name="username" data-type="text" class="editable-click editable-empty" data-value="" title="Username">Empty</a> <!-- non-empty --> <a href="#" data-name="group" data-type="select" data-source="/groups" data-value="1" class="editable-click" title="Group">Operator</a> </div> <script> $('#user').editable({ selector: 'a', url: '/post', pk: 1 }); </script> **/ selector: null, /** Color used to highlight element after update. Implemented via CSS3 transition, works in modern browsers. @property highlight @type string|boolean @since 1.4.5 @default #FFFF80 **/ highlight: '#FFFF80' }; }(window.jQuery)); /** AbstractInput - base class for all editable inputs. It defines interface to be implemented by any input type. To create your own input you can inherit from this class. @class abstractinput **/ (function ($) { "use strict"; //types $.fn.editabletypes = {}; var AbstractInput = function () { }; AbstractInput.prototype = { /** Initializes input @method init() **/ init: function(type, options, defaults) { this.type = type; this.options = $.extend({}, defaults, options); }, /* this method called before render to init $tpl that is inserted in DOM */ prerender: function() { this.$tpl = $(this.options.tpl); //whole tpl as jquery object this.$input = this.$tpl; //control itself, can be changed in render method this.$clear = null; //clear button this.error = null; //error message, if input cannot be rendered }, /** Renders input from tpl. Can return jQuery deferred object. Can be overwritten in child objects @method render() **/ render: function() { }, /** Sets element's html by value. @method value2html(value, element) @param {mixed} value @param {DOMElement} element **/ value2html: function(value, element) { $(element)[this.options.escape ? 'text' : 'html']($.trim(value)); }, /** Converts element's html to value @method html2value(html) @param {string} html @returns {mixed} **/ html2value: function(html) { return $('<div>').html(html).text(); }, /** Converts value to string (for internal compare). For submitting to server used value2submit(). @method value2str(value) @param {mixed} value @returns {string} **/ value2str: function(value) { return value; }, /** Converts string received from server into value. Usually from `data-value` attribute. @method str2value(str) @param {string} str @returns {mixed} **/ str2value: function(str) { return str; }, /** Converts value for submitting to server. Result can be string or object. @method value2submit(value) @param {mixed} value @returns {mixed} **/ value2submit: function(value) { return value; }, /** Sets value of input. @method value2input(value) @param {mixed} value **/ value2input: function(value) { this.$input.val(value); }, /** Returns value of input. Value can be object (e.g. datepicker) @method input2value() **/ input2value: function() { return this.$input.val(); }, /** Activates input. For text it sets focus. @method activate() **/ activate: function() { if(this.$input.is(':visible')) { this.$input.focus(); } }, /** Creates input. @method clear() **/ clear: function() { this.$input.val(null); }, /** method to escape html. **/ escape: function(str) { return $('<div>').text(str).html(); }, /** attach handler to automatically submit form when value changed (useful when buttons not shown) **/ autosubmit: function() { }, /** Additional actions when destroying element **/ destroy: function() { }, // -------- helper functions -------- setClass: function() { if(this.options.inputclass) { this.$input.addClass(this.options.inputclass); } }, setAttr: function(attr) { if (this.options[attr] !== undefined && this.options[attr] !== null) { this.$input.attr(attr, this.options[attr]); } }, option: function(key, value) { this.options[key] = value; } }; AbstractInput.defaults = { /** HTML template of input. Normally you should not change it. @property tpl @type string @default '' **/ tpl: '', /** CSS class automatically applied to input @property inputclass @type string @default null **/ inputclass: null, /** If `true` - html will be escaped in content of element via $.text() method. If `false` - html will not be escaped, $.html() used. When you use own `display` function, this option obviosly has no effect. @property escape @type boolean @since 1.5.0 @default true **/ escape: true, //scope for external methods (e.g. source defined as function) //for internal use only scope: null, //need to re-declare showbuttons here to get it's value from common config (passed only options existing in defaults) showbuttons: true }; $.extend($.fn.editabletypes, {abstractinput: AbstractInput}); }(window.jQuery)); /** List - abstract class for inputs that have source option loaded from js array or via ajax @class list @extends abstractinput **/ (function ($) { "use strict"; var List = function (options) { }; $.fn.editableutils.inherit(List, $.fn.editabletypes.abstractinput); $.extend(List.prototype, { render: function () { var deferred = $.Deferred(); this.error = null; this.onSourceReady(function () { this.renderList(); deferred.resolve(); }, function () { this.error = this.options.sourceError; deferred.resolve(); }); return deferred.promise(); }, html2value: function (html) { return null; //can't set value by text }, value2html: function (value, element, display, response) { var deferred = $.Deferred(), success = function () { if(typeof display === 'function') { //custom display method display.call(element, value, this.sourceData, response); } else { this.value2htmlFinal(value, element); } deferred.resolve(); }; //for null value just call success without loading source if(value === null) { success.call(this); } else { this.onSourceReady(success, function () { deferred.resolve(); }); } return deferred.promise(); }, // ------------- additional functions ------------ onSourceReady: function (success, error) { //run source if it function var source; if ($.isFunction(this.options.source)) { source = this.options.source.call(this.options.scope); this.sourceData = null; //note: if function returns the same source as URL - sourceData will be taken from cahce and no extra request performed } else { source = this.options.source; } //if allready loaded just call success if(this.options.sourceCache && $.isArray(this.sourceData)) { success.call(this); return; } //try parse json in single quotes (for double quotes jquery does automatically) try { source = $.fn.editableutils.tryParseJson(source, false); } catch (e) { error.call(this); return; } //loading from url if (typeof source === 'string') { //try to get sourceData from cache if(this.options.sourceCache) { var cacheID = source, cache; if (!$(document).data(cacheID)) { $(document).data(cacheID, {}); } cache = $(document).data(cacheID); //check for cached data if (cache.loading === false && cache.sourceData) { //take source from cache this.sourceData = cache.sourceData; this.doPrepend(); success.call(this); return; } else if (cache.loading === true) { //cache is loading, put callback in stack to be called later cache.callbacks.push($.proxy(function () { this.sourceData = cache.sourceData; this.doPrepend(); success.call(this); }, this)); //also collecting error callbacks cache.err_callbacks.push($.proxy(error, this)); return; } else { //no cache yet, activate it cache.loading = true; cache.callbacks = []; cache.err_callbacks = []; } } //ajaxOptions for source. Can be overwritten bt options.sourceOptions var ajaxOptions = $.extend({ url: source, type: 'get', cache: false, dataType: 'json', success: $.proxy(function (data) { if(cache) { cache.loading = false; } this.sourceData = this.makeArray(data); if($.isArray(this.sourceData)) { if(cache) { //store result in cache cache.sourceData = this.sourceData; //run success callbacks for other fields waiting for this source $.each(cache.callbacks, function () { this.call(); }); } this.doPrepend(); success.call(this); } else { error.call(this); if(cache) { //run error callbacks for other fields waiting for this source $.each(cache.err_callbacks, function () { this.call(); }); } } }, this), error: $.proxy(function () { error.call(this); if(cache) { cache.loading = false; //run error callbacks for other fields $.each(cache.err_callbacks, function () { this.call(); }); } }, this) }, this.options.sourceOptions); //loading sourceData from server $.ajax(ajaxOptions); } else { //options as json/array this.sourceData = this.makeArray(source); if($.isArray(this.sourceData)) { this.doPrepend(); success.call(this); } else { error.call(this); } } }, doPrepend: function () { if(this.options.prepend === null || this.options.prepend === undefined) { return; } if(!$.isArray(this.prependData)) { //run prepend if it is function (once) if ($.isFunction(this.options.prepend)) { this.options.prepend = this.options.prepend.call(this.options.scope); } //try parse json in single quotes this.options.prepend = $.fn.editableutils.tryParseJson(this.options.prepend, true); //convert prepend from string to object if (typeof this.options.prepend === 'string') { this.options.prepend = {'': this.options.prepend}; } this.prependData = this.makeArray(this.options.prepend); } if($.isArray(this.prependData) && $.isArray(this.sourceData)) { this.sourceData = this.prependData.concat(this.sourceData); } }, /* renders input list */ renderList: function() { // this method should be overwritten in child class }, /* set element's html by value */ value2htmlFinal: function(value, element) { // this method should be overwritten in child class }, /** * convert data to array suitable for sourceData, e.g. [{value: 1, text: 'abc'}, {...}] */ makeArray: function(data) { var count, obj, result = [], item, iterateItem; if(!data || typeof data === 'string') { return null; } if($.isArray(data)) { //array /* function to iterate inside item of array if item is object. Caclulates count of keys in item and store in obj. */ iterateItem = function (k, v) { obj = {value: k, text: v}; if(count++ >= 2) { return false;// exit from `each` if item has more than one key. } }; for(var i = 0; i < data.length; i++) { item = data[i]; if(typeof item === 'object') { count = 0; //count of keys inside item $.each(item, iterateItem); //case: [{val1: 'text1'}, {val2: 'text2} ...] if(count === 1) { result.push(obj); //case: [{value: 1, text: 'text1'}, {value: 2, text: 'text2'}, ...] } else if(count > 1) { //removed check of existance: item.hasOwnProperty('value') && item.hasOwnProperty('text') if(item.children) { item.children = this.makeArray(item.children); } result.push(item); } } else { //case: ['text1', 'text2' ...] result.push({value: item, text: item}); } } } else { //case: {val1: 'text1', val2: 'text2, ...} $.each(data, function (k, v) { result.push({value: k, text: v}); }); } return result; }, option: function(key, value) { this.options[key] = value; if(key === 'source') { this.sourceData = null; } if(key === 'prepend') { this.prependData = null; } } }); List.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** Source data for list. If **array** - it should be in format: `[{value: 1, text: "text1"}, {value: 2, text: "text2"}, ...]` For compability, object format is also supported: `{"1": "text1", "2": "text2" ...}` but it does not guarantee elements order. If **string** - considered ajax url to load items. In that case results will be cached for fields with the same source and name. See also `sourceCache` option. If **function**, it should return data in format above (since 1.4.0). Since 1.4.1 key `children` supported to render OPTGROUP (for **select** input only). `[{text: "group1", children: [{value: 1, text: "text1"}, {value: 2, text: "text2"}]}, ...]` @property source @type string | array | object | function @default null **/ source: null, /** Data automatically prepended to the beginning of dropdown list. @property prepend @type string | array | object | function @default false **/ prepend: false, /** Error message when list cannot be loaded (e.g. ajax error) @property sourceError @type string @default Error when loading list **/ sourceError: 'Error when loading list', /** if <code>true</code> and source is **string url** - results will be cached for fields with the same source. Usefull for editable column in grid to prevent extra requests. @property sourceCache @type boolean @default true @since 1.2.0 **/ sourceCache: true, /** Additional ajax options to be used in $.ajax() when loading list from server. Useful to send extra parameters (`data` key) or change request method (`type` key). @property sourceOptions @type object|function @default null @since 1.5.0 **/ sourceOptions: null }); $.fn.editabletypes.list = List; }(window.jQuery)); /** Text input @class text @extends abstractinput @final @example <a href="#" id="username" data-type="text" data-pk="1">awesome</a> <script> $(function(){ $('#username').editable({ url: '/post', title: 'Enter username' }); }); </script> **/ (function ($) { "use strict"; var Text = function (options) { this.init('text', options, Text.defaults); }; $.fn.editableutils.inherit(Text, $.fn.editabletypes.abstractinput); $.extend(Text.prototype, { render: function() { this.renderClear(); this.setClass(); this.setAttr('placeholder'); }, activate: function() { if(this.$input.is(':visible')) { this.$input.focus(); $.fn.editableutils.setCursorPosition(this.$input.get(0), this.$input.val().length); if(this.toggleClear) { this.toggleClear(); } } }, //render clear button renderClear: function() { if (this.options.clear) { this.$clear = $('<span class="editable-clear-x"></span>'); this.$input.after(this.$clear) .css('padding-right', 24) .keyup($.proxy(function(e) { //arrows, enter, tab, etc if(~$.inArray(e.keyCode, [40,38,9,13,27])) { return; } clearTimeout(this.t); var that = this; this.t = setTimeout(function() { that.toggleClear(e); }, 100); }, this)) .parent().css('position', 'relative'); this.$clear.click($.proxy(this.clear, this)); } }, postrender: function() { /* //now `clear` is positioned via css if(this.$clear) { //can position clear button only here, when form is shown and height can be calculated // var h = this.$input.outerHeight(true) || 20, var h = this.$clear.parent().height(), delta = (h - this.$clear.height()) / 2; //this.$clear.css({bottom: delta, right: delta}); } */ }, //show / hide clear button toggleClear: function(e) { if(!this.$clear) { return; } var len = this.$input.val().length, visible = this.$clear.is(':visible'); if(len && !visible) { this.$clear.show(); } if(!len && visible) { this.$clear.hide(); } }, clear: function() { this.$clear.hide(); this.$input.val('').focus(); } }); Text.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** @property tpl @default <input type="text"> **/ tpl: '<input type="text">', /** Placeholder attribute of input. Shown when input is empty. @property placeholder @type string @default null **/ placeholder: null, /** Whether to show `clear` button @property clear @type boolean @default true **/ clear: true }); $.fn.editabletypes.text = Text; }(window.jQuery)); /** Textarea input @class textarea @extends abstractinput @final @example <a href="#" id="comments" data-type="textarea" data-pk="1">awesome comment!</a> <script> $(function(){ $('#comments').editable({ url: '/post', title: 'Enter comments', rows: 10 }); }); </script> **/ (function ($) { "use strict"; var Textarea = function (options) { this.init('textarea', options, Textarea.defaults); }; $.fn.editableutils.inherit(Textarea, $.fn.editabletypes.abstractinput); $.extend(Textarea.prototype, { render: function () { this.setClass(); this.setAttr('placeholder'); this.setAttr('rows'); //ctrl + enter this.$input.keydown(function (e) { if (e.ctrlKey && e.which === 13) { $(this).closest('form').submit(); } }); }, //using `white-space: pre-wrap` solves \n <--> BR conversion very elegant! /* value2html: function(value, element) { var html = '', lines; if(value) { lines = value.split("\n"); for (var i = 0; i < lines.length; i++) { lines[i] = $('<div>').text(lines[i]).html(); } html = lines.join('<br>'); } $(element).html(html); }, html2value: function(html) { if(!html) { return ''; } var regex = new RegExp(String.fromCharCode(10), 'g'); var lines = html.split(/<br\s*\/?>/i); for (var i = 0; i < lines.length; i++) { var text = $('<div>').html(lines[i]).text(); // Remove newline characters (\n) to avoid them being converted by value2html() method // thus adding extra <br> tags text = text.replace(regex, ''); lines[i] = text; } return lines.join("\n"); }, */ activate: function() { $.fn.editabletypes.text.prototype.activate.call(this); } }); Textarea.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** @property tpl @default <textarea></textarea> **/ tpl:'<textarea></textarea>', /** @property inputclass @default input-large **/ inputclass: 'input-large', /** Placeholder attribute of input. Shown when input is empty. @property placeholder @type string @default null **/ placeholder: null, /** Number of rows in textarea @property rows @type integer @default 7 **/ rows: 7 }); $.fn.editabletypes.textarea = Textarea; }(window.jQuery)); /** Select (dropdown) @class select @extends list @final @example <a href="#" id="status" data-type="select" data-pk="1" data-url="/post" data-title="Select status"></a> <script> $(function(){ $('#status').editable({ value: 2, source: [ {value: 1, text: 'Active'}, {value: 2, text: 'Blocked'}, {value: 3, text: 'Deleted'} ] }); }); </script> **/ (function ($) { "use strict"; var Select = function (options) { this.init('select', options, Select.defaults); }; $.fn.editableutils.inherit(Select, $.fn.editabletypes.list); $.extend(Select.prototype, { renderList: function() { this.$input.empty(); var fillItems = function($el, data) { var attr; if($.isArray(data)) { for(var i=0; i<data.length; i++) { attr = {}; if(data[i].children) { attr.label = data[i].text; $el.append(fillItems($('<optgroup>', attr), data[i].children)); } else { attr.value = data[i].value; if(data[i].disabled) { attr.disabled = true; } $el.append($('<option>', attr).text(data[i].text)); } } } return $el; }; fillItems(this.$input, this.sourceData); this.setClass(); //enter submit this.$input.on('keydown.editable', function (e) { if (e.which === 13) { $(this).closest('form').submit(); } }); }, value2htmlFinal: function(value, element) { var text = '', items = $.fn.editableutils.itemsByValue(value, this.sourceData); if(items.length) { text = items[0].text; } //$(element).text(text); $.fn.editabletypes.abstractinput.prototype.value2html.call(this, text, element); }, autosubmit: function() { this.$input.off('keydown.editable').on('change.editable', function(){ $(this).closest('form').submit(); }); } }); Select.defaults = $.extend({}, $.fn.editabletypes.list.defaults, { /** @property tpl @default <select></select> **/ tpl:'<select></select>' }); $.fn.editabletypes.select = Select; }(window.jQuery)); /** List of checkboxes. Internally value stored as javascript array of values. @class checklist @extends list @final @example <a href="#" id="options" data-type="checklist" data-pk="1" data-url="/post" data-title="Select options"></a> <script> $(function(){ $('#options').editable({ value: [2, 3], source: [ {value: 1, text: 'option1'}, {value: 2, text: 'option2'}, {value: 3, text: 'option3'} ] }); }); </script> **/ (function ($) { "use strict"; var Checklist = function (options) { this.init('checklist', options, Checklist.defaults); }; $.fn.editableutils.inherit(Checklist, $.fn.editabletypes.list); $.extend(Checklist.prototype, { renderList: function() { var $label, $div; this.$tpl.empty(); if(!$.isArray(this.sourceData)) { return; } for(var i=0; i<this.sourceData.length; i++) { $label = $('<label>').append($('<input>', { type: 'checkbox', value: this.sourceData[i].value })) .append($('<span>').text(' '+this.sourceData[i].text)); $('<div>').append($label).appendTo(this.$tpl); } this.$input = this.$tpl.find('input[type="checkbox"]'); this.setClass(); }, value2str: function(value) { return $.isArray(value) ? value.sort().join($.trim(this.options.separator)) : ''; }, //parse separated string str2value: function(str) { var reg, value = null; if(typeof str === 'string' && str.length) { reg = new RegExp('\\s*'+$.trim(this.options.separator)+'\\s*'); value = str.split(reg); } else if($.isArray(str)) { value = str; } else { value = [str]; } return value; }, //set checked on required checkboxes value2input: function(value) { this.$input.prop('checked', false); if($.isArray(value) && value.length) { this.$input.each(function(i, el) { var $el = $(el); // cannot use $.inArray as it performs strict comparison $.each(value, function(j, val){ /*jslint eqeq: true*/ if($el.val() == val) { /*jslint eqeq: false*/ $el.prop('checked', true); } }); }); } }, input2value: function() { var checked = []; this.$input.filter(':checked').each(function(i, el) { checked.push($(el).val()); }); return checked; }, //collect text of checked boxes value2htmlFinal: function(value, element) { var html = [], checked = $.fn.editableutils.itemsByValue(value, this.sourceData), escape = this.options.escape; if(checked.length) { $.each(checked, function(i, v) { var text = escape ? $.fn.editableutils.escape(v.text) : v.text; html.push(text); }); $(element).html(html.join('<br>')); } else { $(element).empty(); } }, activate: function() { this.$input.first().focus(); }, autosubmit: function() { this.$input.on('keydown', function(e){ if (e.which === 13) { $(this).closest('form').submit(); } }); } }); Checklist.defaults = $.extend({}, $.fn.editabletypes.list.defaults, { /** @property tpl @default <div></div> **/ tpl:'<div class="editable-checklist"></div>', /** @property inputclass @type string @default null **/ inputclass: null, /** Separator of values when reading from `data-value` attribute @property separator @type string @default ',' **/ separator: ',' }); $.fn.editabletypes.checklist = Checklist; }(window.jQuery)); /** HTML5 input types. Following types are supported: * password * email * url * tel * number * range * time Learn more about html5 inputs: http://www.w3.org/wiki/HTML5_form_additions To check browser compatibility please see: https://developer.mozilla.org/en-US/docs/HTML/Element/Input @class html5types @extends text @final @since 1.3.0 @example <a href="#" id="email" data-type="email" data-pk="1">[email protected]</a> <script> $(function(){ $('#email').editable({ url: '/post', title: 'Enter email' }); }); </script> **/ /** @property tpl @default depends on type **/ /* Password */ (function ($) { "use strict"; var Password = function (options) { this.init('password', options, Password.defaults); }; $.fn.editableutils.inherit(Password, $.fn.editabletypes.text); $.extend(Password.prototype, { //do not display password, show '[hidden]' instead value2html: function(value, element) { if(value) { $(element).text('[hidden]'); } else { $(element).empty(); } }, //as password not displayed, should not set value by html html2value: function(html) { return null; } }); Password.defaults = $.extend({}, $.fn.editabletypes.text.defaults, { tpl: '<input type="password">' }); $.fn.editabletypes.password = Password; }(window.jQuery)); /* Email */ (function ($) { "use strict"; var Email = function (options) { this.init('email', options, Email.defaults); }; $.fn.editableutils.inherit(Email, $.fn.editabletypes.text); Email.defaults = $.extend({}, $.fn.editabletypes.text.defaults, { tpl: '<input type="email">' }); $.fn.editabletypes.email = Email; }(window.jQuery)); /* Url */ (function ($) { "use strict"; var Url = function (options) { this.init('url', options, Url.defaults); }; $.fn.editableutils.inherit(Url, $.fn.editabletypes.text); Url.defaults = $.extend({}, $.fn.editabletypes.text.defaults, { tpl: '<input type="url">' }); $.fn.editabletypes.url = Url; }(window.jQuery)); /* Tel */ (function ($) { "use strict"; var Tel = function (options) { this.init('tel', options, Tel.defaults); }; $.fn.editableutils.inherit(Tel, $.fn.editabletypes.text); Tel.defaults = $.extend({}, $.fn.editabletypes.text.defaults, { tpl: '<input type="tel">' }); $.fn.editabletypes.tel = Tel; }(window.jQuery)); /* Number */ (function ($) { "use strict"; var NumberInput = function (options) { this.init('number', options, NumberInput.defaults); }; $.fn.editableutils.inherit(NumberInput, $.fn.editabletypes.text); $.extend(NumberInput.prototype, { render: function () { NumberInput.superclass.render.call(this); this.setAttr('min'); this.setAttr('max'); this.setAttr('step'); }, postrender: function() { if(this.$clear) { //increase right ffset for up/down arrows this.$clear.css({right: 24}); /* //can position clear button only here, when form is shown and height can be calculated var h = this.$input.outerHeight(true) || 20, delta = (h - this.$clear.height()) / 2; //add 12px to offset right for up/down arrows this.$clear.css({top: delta, right: delta + 16}); */ } } }); NumberInput.defaults = $.extend({}, $.fn.editabletypes.text.defaults, { tpl: '<input type="number">', inputclass: 'input-mini', min: null, max: null, step: null }); $.fn.editabletypes.number = NumberInput; }(window.jQuery)); /* Range (inherit from number) */ (function ($) { "use strict"; var Range = function (options) { this.init('range', options, Range.defaults); }; $.fn.editableutils.inherit(Range, $.fn.editabletypes.number); $.extend(Range.prototype, { render: function () { this.$input = this.$tpl.filter('input'); this.setClass(); this.setAttr('min'); this.setAttr('max'); this.setAttr('step'); this.$input.on('input', function(){ $(this).siblings('output').text($(this).val()); }); }, activate: function() { this.$input.focus(); } }); Range.defaults = $.extend({}, $.fn.editabletypes.number.defaults, { tpl: '<input type="range"><output style="width: 30px; display: inline-block"></output>', inputclass: 'input-medium' }); $.fn.editabletypes.range = Range; }(window.jQuery)); /* Time */ (function ($) { "use strict"; var Time = function (options) { this.init('time', options, Time.defaults); }; //inherit from abstract, as inheritance from text gives selection error. $.fn.editableutils.inherit(Time, $.fn.editabletypes.abstractinput); $.extend(Time.prototype, { render: function() { this.setClass(); } }); Time.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { tpl: '<input type="time">' }); $.fn.editabletypes.time = Time; }(window.jQuery)); /** Select2 input. Based on amazing work of Igor Vaynberg https://github.com/ivaynberg/select2. Please see [original select2 docs](http://ivaynberg.github.com/select2) for detailed description and options. You should manually download and include select2 distributive: <link href="select2/select2.css" rel="stylesheet" type="text/css"></link> <script src="select2/select2.js"></script> To make it **bootstrap-styled** you can use css from [here](https://github.com/t0m/select2-bootstrap-css): <link href="select2-bootstrap.css" rel="stylesheet" type="text/css"></link> **Note:** currently `autotext` feature does not work for select2 with `ajax` remote source. You need initially put both `data-value` and element's text youself: <a href="#" data-type="select2" data-value="1">Text1</a> @class select2 @extends abstractinput @since 1.4.1 @final @example <a href="#" id="country" data-type="select2" data-pk="1" data-value="ru" data-url="/post" data-title="Select country"></a> <script> $(function(){ //local source $('#country').editable({ source: [ {id: 'gb', text: 'Great Britain'}, {id: 'us', text: 'United States'}, {id: 'ru', text: 'Russia'} ], select2: { multiple: true } }); //remote source (simple) $('#country').editable({ source: '/getCountries', select2: { placeholder: 'Select Country', minimumInputLength: 1 } }); //remote source (advanced) $('#country').editable({ select2: { placeholder: 'Select Country', allowClear: true, minimumInputLength: 3, id: function (item) { return item.CountryId; }, ajax: { url: '/getCountries', dataType: 'json', data: function (term, page) { return { query: term }; }, results: function (data, page) { return { results: data }; } }, formatResult: function (item) { return item.CountryName; }, formatSelection: function (item) { return item.CountryName; }, initSelection: function (element, callback) { return $.get('/getCountryById', { query: element.val() }, function (data) { callback(data); }); } } }); }); </script> **/ (function ($) { "use strict"; var Constructor = function (options) { this.init('select2', options, Constructor.defaults); options.select2 = options.select2 || {}; this.sourceData = null; //placeholder if(options.placeholder) { options.select2.placeholder = options.placeholder; } //if not `tags` mode, use source if(!options.select2.tags && options.source) { var source = options.source; //if source is function, call it (once!) if ($.isFunction(options.source)) { source = options.source.call(options.scope); } if (typeof source === 'string') { options.select2.ajax = options.select2.ajax || {}; //some default ajax params if(!options.select2.ajax.data) { options.select2.ajax.data = function(term) {return { query:term };}; } if(!options.select2.ajax.results) { options.select2.ajax.results = function(data) { return {results:data };}; } options.select2.ajax.url = source; } else { //check format and convert x-editable format to select2 format (if needed) this.sourceData = this.convertSource(source); options.select2.data = this.sourceData; } } //overriding objects in config (as by default jQuery extend() is not recursive) this.options.select2 = $.extend({}, Constructor.defaults.select2, options.select2); //detect whether it is multi-valued this.isMultiple = this.options.select2.tags || this.options.select2.multiple; this.isRemote = ('ajax' in this.options.select2); //store function returning ID of item //should be here as used inautotext for local source this.idFunc = this.options.select2.id; if (typeof(this.idFunc) !== "function") { var idKey = this.idFunc || 'id'; this.idFunc = function (e) { return e[idKey]; }; } //store function that renders text in select2 this.formatSelection = this.options.select2.formatSelection; if (typeof(this.formatSelection) !== "function") { this.formatSelection = function (e) { return e.text; }; } }; $.fn.editableutils.inherit(Constructor, $.fn.editabletypes.abstractinput); $.extend(Constructor.prototype, { render: function() { this.setClass(); //can not apply select2 here as it calls initSelection //over input that does not have correct value yet. //apply select2 only in value2input //this.$input.select2(this.options.select2); //when data is loaded via ajax, we need to know when it's done to populate listData if(this.isRemote) { //listen to loaded event to populate data this.$input.on('select2-loaded', $.proxy(function(e) { this.sourceData = e.items.results; }, this)); } //trigger resize of editableform to re-position container in multi-valued mode if(this.isMultiple) { this.$input.on('change', function() { $(this).closest('form').parent().triggerHandler('resize'); }); } }, value2html: function(value, element) { var text = '', data, that = this; if(this.options.select2.tags) { //in tags mode just assign value data = value; //data = $.fn.editableutils.itemsByValue(value, this.options.select2.tags, this.idFunc); } else if(this.sourceData) { data = $.fn.editableutils.itemsByValue(value, this.sourceData, this.idFunc); } else { //can not get list of possible values //(e.g. autotext for select2 with ajax source) } //data may be array (when multiple values allowed) if($.isArray(data)) { //collect selected data and show with separator text = []; $.each(data, function(k, v){ text.push(v && typeof v === 'object' ? that.formatSelection(v) : v); }); } else if(data) { text = that.formatSelection(data); } text = $.isArray(text) ? text.join(this.options.viewseparator) : text; //$(element).text(text); Constructor.superclass.value2html.call(this, text, element); }, html2value: function(html) { return this.options.select2.tags ? this.str2value(html, this.options.viewseparator) : null; }, value2input: function(value) { // if value array => join it anyway if($.isArray(value)) { value = value.join(this.getSeparator()); } //for remote source just set value, text is updated by initSelection if(!this.$input.data('select2')) { this.$input.val(value); this.$input.select2(this.options.select2); } else { //second argument needed to separate initial change from user's click (for autosubmit) this.$input.val(value).trigger('change', true); //Uncaught Error: cannot call val() if initSelection() is not defined //this.$input.select2('val', value); } // if defined remote source AND no multiple mode AND no user's initSelection provided --> // we should somehow get text for provided id. // The solution is to use element's text as text for that id (exclude empty) if(this.isRemote && !this.isMultiple && !this.options.select2.initSelection) { // customId and customText are methods to extract `id` and `text` from data object // we can use this workaround only if user did not define these methods // otherwise we cant construct data object var customId = this.options.select2.id, customText = this.options.select2.formatSelection; if(!customId && !customText) { var $el = $(this.options.scope); if (!$el.data('editable').isEmpty) { var data = {id: value, text: $el.text()}; this.$input.select2('data', data); } } } }, input2value: function() { return this.$input.select2('val'); }, str2value: function(str, separator) { if(typeof str !== 'string' || !this.isMultiple) { return str; } separator = separator || this.getSeparator(); var val, i, l; if (str === null || str.length < 1) { return null; } val = str.split(separator); for (i = 0, l = val.length; i < l; i = i + 1) { val[i] = $.trim(val[i]); } return val; }, autosubmit: function() { this.$input.on('change', function(e, isInitial){ if(!isInitial) { $(this).closest('form').submit(); } }); }, getSeparator: function() { return this.options.select2.separator || $.fn.select2.defaults.separator; }, /* Converts source from x-editable format: {value: 1, text: "1"} to select2 format: {id: 1, text: "1"} */ convertSource: function(source) { if($.isArray(source) && source.length && source[0].value !== undefined) { for(var i = 0; i<source.length; i++) { if(source[i].value !== undefined) { source[i].id = source[i].value; delete source[i].value; } } } return source; }, destroy: function() { if(this.$input.data('select2')) { this.$input.select2('destroy'); } } }); Constructor.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** @property tpl @default <input type="hidden"> **/ tpl:'<input type="hidden">', /** Configuration of select2. [Full list of options](http://ivaynberg.github.com/select2). @property select2 @type object @default null **/ select2: null, /** Placeholder attribute of select @property placeholder @type string @default null **/ placeholder: null, /** Source data for select. It will be assigned to select2 `data` property and kept here just for convenience. Please note, that format is different from simple `select` input: use 'id' instead of 'value'. E.g. `[{id: 1, text: "text1"}, {id: 2, text: "text2"}, ...]`. @property source @type array|string|function @default null **/ source: null, /** Separator used to display tags. @property viewseparator @type string @default ', ' **/ viewseparator: ', ' }); $.fn.editabletypes.select2 = Constructor; }(window.jQuery)); /** * Combodate - 1.0.5 * Dropdown date and time picker. * Converts text input into dropdowns to pick day, month, year, hour, minute and second. * Uses momentjs as datetime library http://momentjs.com. * For i18n include corresponding file from https://github.com/timrwood/moment/tree/master/lang * * Confusion at noon and midnight - see http://en.wikipedia.org/wiki/12-hour_clock#Confusion_at_noon_and_midnight * In combodate: * 12:00 pm --> 12:00 (24-h format, midday) * 12:00 am --> 00:00 (24-h format, midnight, start of day) * * Differs from momentjs parse rules: * 00:00 pm, 12:00 pm --> 12:00 (24-h format, day not change) * 00:00 am, 12:00 am --> 00:00 (24-h format, day not change) * * * Author: Vitaliy Potapov * Project page: http://github.com/vitalets/combodate * Copyright (c) 2012 Vitaliy Potapov. Released under MIT License. **/ (function ($) { var Combodate = function (element, options) { this.$element = $(element); if(!this.$element.is('input')) { $.error('Combodate should be applied to INPUT element'); return; } this.options = $.extend({}, $.fn.combodate.defaults, options, this.$element.data()); this.init(); }; Combodate.prototype = { constructor: Combodate, init: function () { this.map = { //key regexp moment.method day: ['D', 'date'], month: ['M', 'month'], year: ['Y', 'year'], hour: ['[Hh]', 'hours'], minute: ['m', 'minutes'], second: ['s', 'seconds'], ampm: ['[Aa]', ''] }; this.$widget = $('<span class="combodate"></span>').html(this.getTemplate()); this.initCombos(); //update original input on change this.$widget.on('change', 'select', $.proxy(function(e) { this.$element.val(this.getValue()).change(); // update days count if month or year changes if (this.options.smartDays) { if ($(e.target).is('.month') || $(e.target).is('.year')) { this.fillCombo('day'); } } }, this)); this.$widget.find('select').css('width', 'auto'); // hide original input and insert widget this.$element.hide().after(this.$widget); // set initial value this.setValue(this.$element.val() || this.options.value); }, /* Replace tokens in template with <select> elements */ getTemplate: function() { var tpl = this.options.template; //first pass $.each(this.map, function(k, v) { v = v[0]; var r = new RegExp(v+'+'), token = v.length > 1 ? v.substring(1, 2) : v; tpl = tpl.replace(r, '{'+token+'}'); }); //replace spaces with &nbsp; tpl = tpl.replace(/ /g, '&nbsp;'); //second pass $.each(this.map, function(k, v) { v = v[0]; var token = v.length > 1 ? v.substring(1, 2) : v; tpl = tpl.replace('{'+token+'}', '<select class="'+k+'"></select>'); }); return tpl; }, /* Initialize combos that presents in template */ initCombos: function() { for (var k in this.map) { var $c = this.$widget.find('.'+k); // set properties like this.$day, this.$month etc. this['$'+k] = $c.length ? $c : null; // fill with items this.fillCombo(k); } }, /* Fill combo with items */ fillCombo: function(k) { var $combo = this['$'+k]; if (!$combo) { return; } // define method name to fill items, e.g `fillDays` var f = 'fill' + k.charAt(0).toUpperCase() + k.slice(1); var items = this[f](); var value = $combo.val(); $combo.empty(); for(var i=0; i<items.length; i++) { $combo.append('<option value="'+items[i][0]+'">'+items[i][1]+'</option>'); } $combo.val(value); }, /* Initialize items of combos. Handles `firstItem` option */ fillCommon: function(key) { var values = [], relTime; if(this.options.firstItem === 'name') { //need both to support moment ver < 2 and >= 2 relTime = moment.relativeTime || moment.langData()._relativeTime; var header = typeof relTime[key] === 'function' ? relTime[key](1, true, key, false) : relTime[key]; //take last entry (see momentjs lang files structure) header = header.split(' ').reverse()[0]; values.push(['', header]); } else if(this.options.firstItem === 'empty') { values.push(['', '']); } return values; }, /* fill day */ fillDay: function() { var items = this.fillCommon('d'), name, i, twoDigit = this.options.template.indexOf('DD') !== -1, daysCount = 31; // detect days count (depends on month and year) // originally https://github.com/vitalets/combodate/pull/7 if (this.options.smartDays && this.$month && this.$year) { var month = parseInt(this.$month.val(), 10); var year = parseInt(this.$year.val(), 10); if (!isNaN(month) && !isNaN(year)) { daysCount = moment([year, month]).daysInMonth(); } } for (i = 1; i <= daysCount; i++) { name = twoDigit ? this.leadZero(i) : i; items.push([i, name]); } return items; }, /* fill month */ fillMonth: function() { var items = this.fillCommon('M'), name, i, longNames = this.options.template.indexOf('MMMM') !== -1, shortNames = this.options.template.indexOf('MMM') !== -1, twoDigit = this.options.template.indexOf('MM') !== -1; for(i=0; i<=11; i++) { if(longNames) { //see https://github.com/timrwood/momentjs.com/pull/36 name = moment().date(1).month(i).format('MMMM'); } else if(shortNames) { name = moment().date(1).month(i).format('MMM'); } else if(twoDigit) { name = this.leadZero(i+1); } else { name = i+1; } items.push([i, name]); } return items; }, /* fill year */ fillYear: function() { var items = [], name, i, longNames = this.options.template.indexOf('YYYY') !== -1; for(i=this.options.maxYear; i>=this.options.minYear; i--) { name = longNames ? i : (i+'').substring(2); items[this.options.yearDescending ? 'push' : 'unshift']([i, name]); } items = this.fillCommon('y').concat(items); return items; }, /* fill hour */ fillHour: function() { var items = this.fillCommon('h'), name, i, h12 = this.options.template.indexOf('h') !== -1, h24 = this.options.template.indexOf('H') !== -1, twoDigit = this.options.template.toLowerCase().indexOf('hh') !== -1, min = h12 ? 1 : 0, max = h12 ? 12 : 23; for(i=min; i<=max; i++) { name = twoDigit ? this.leadZero(i) : i; items.push([i, name]); } return items; }, /* fill minute */ fillMinute: function() { var items = this.fillCommon('m'), name, i, twoDigit = this.options.template.indexOf('mm') !== -1; for(i=0; i<=59; i+= this.options.minuteStep) { name = twoDigit ? this.leadZero(i) : i; items.push([i, name]); } return items; }, /* fill second */ fillSecond: function() { var items = this.fillCommon('s'), name, i, twoDigit = this.options.template.indexOf('ss') !== -1; for(i=0; i<=59; i+= this.options.secondStep) { name = twoDigit ? this.leadZero(i) : i; items.push([i, name]); } return items; }, /* fill ampm */ fillAmpm: function() { var ampmL = this.options.template.indexOf('a') !== -1, ampmU = this.options.template.indexOf('A') !== -1, items = [ ['am', ampmL ? 'am' : 'AM'], ['pm', ampmL ? 'pm' : 'PM'] ]; return items; }, /* Returns current date value from combos. If format not specified - `options.format` used. If format = `null` - Moment object returned. */ getValue: function(format) { var dt, values = {}, that = this, notSelected = false; //getting selected values $.each(this.map, function(k, v) { if(k === 'ampm') { return; } var def = k === 'day' ? 1 : 0; values[k] = that['$'+k] ? parseInt(that['$'+k].val(), 10) : def; if(isNaN(values[k])) { notSelected = true; return false; } }); //if at least one visible combo not selected - return empty string if(notSelected) { return ''; } //convert hours 12h --> 24h if(this.$ampm) { //12:00 pm --> 12:00 (24-h format, midday), 12:00 am --> 00:00 (24-h format, midnight, start of day) if(values.hour === 12) { values.hour = this.$ampm.val() === 'am' ? 0 : 12; } else { values.hour = this.$ampm.val() === 'am' ? values.hour : values.hour+12; } } dt = moment([values.year, values.month, values.day, values.hour, values.minute, values.second]); //highlight invalid date this.highlight(dt); format = format === undefined ? this.options.format : format; if(format === null) { return dt.isValid() ? dt : null; } else { return dt.isValid() ? dt.format(format) : ''; } }, setValue: function(value) { if(!value) { return; } var dt = typeof value === 'string' ? moment(value, this.options.format) : moment(value), that = this, values = {}; //function to find nearest value in select options function getNearest($select, value) { var delta = {}; $select.children('option').each(function(i, opt){ var optValue = $(opt).attr('value'), distance; if(optValue === '') return; distance = Math.abs(optValue - value); if(typeof delta.distance === 'undefined' || distance < delta.distance) { delta = {value: optValue, distance: distance}; } }); return delta.value; } if(dt.isValid()) { //read values from date object $.each(this.map, function(k, v) { if(k === 'ampm') { return; } values[k] = dt[v[1]](); }); if(this.$ampm) { //12:00 pm --> 12:00 (24-h format, midday), 12:00 am --> 00:00 (24-h format, midnight, start of day) if(values.hour >= 12) { values.ampm = 'pm'; if(values.hour > 12) { values.hour -= 12; } } else { values.ampm = 'am'; if(values.hour === 0) { values.hour = 12; } } } $.each(values, function(k, v) { //call val() for each existing combo, e.g. this.$hour.val() if(that['$'+k]) { if(k === 'minute' && that.options.minuteStep > 1 && that.options.roundTime) { v = getNearest(that['$'+k], v); } if(k === 'second' && that.options.secondStep > 1 && that.options.roundTime) { v = getNearest(that['$'+k], v); } that['$'+k].val(v); } }); // update days count if (this.options.smartDays) { this.fillCombo('day'); } this.$element.val(dt.format(this.options.format)).change(); } }, /* highlight combos if date is invalid */ highlight: function(dt) { if(!dt.isValid()) { if(this.options.errorClass) { this.$widget.addClass(this.options.errorClass); } else { //store original border color if(!this.borderColor) { this.borderColor = this.$widget.find('select').css('border-color'); } this.$widget.find('select').css('border-color', 'red'); } } else { if(this.options.errorClass) { this.$widget.removeClass(this.options.errorClass); } else { this.$widget.find('select').css('border-color', this.borderColor); } } }, leadZero: function(v) { return v <= 9 ? '0' + v : v; }, destroy: function() { this.$widget.remove(); this.$element.removeData('combodate').show(); } //todo: clear method }; $.fn.combodate = function ( option ) { var d, args = Array.apply(null, arguments); args.shift(); //getValue returns date as string / object (not jQuery object) if(option === 'getValue' && this.length && (d = this.eq(0).data('combodate'))) { return d.getValue.apply(d, args); } return this.each(function () { var $this = $(this), data = $this.data('combodate'), options = typeof option == 'object' && option; if (!data) { $this.data('combodate', (data = new Combodate(this, options))); } if (typeof option == 'string' && typeof data[option] == 'function') { data[option].apply(data, args); } }); }; $.fn.combodate.defaults = { //in this format value stored in original input format: 'DD-MM-YYYY HH:mm', //in this format items in dropdowns are displayed template: 'D / MMM / YYYY H : mm', //initial value, can be `new Date()` value: null, minYear: 1970, maxYear: 2015, yearDescending: true, minuteStep: 5, secondStep: 1, firstItem: 'empty', //'name', 'empty', 'none' errorClass: null, roundTime: true, // whether to round minutes and seconds if step > 1 smartDays: false // whether days in combo depend on selected month: 31, 30, 28 }; }(window.jQuery)); /** Combodate input - dropdown date and time picker. Based on [combodate](http://vitalets.github.com/combodate) plugin (included). To use it you should manually include [momentjs](http://momentjs.com). <script src="js/moment.min.js"></script> Allows to input: * only date * only time * both date and time Please note, that format is taken from momentjs and **not compatible** with bootstrap-datepicker / jquery UI datepicker. Internally value stored as `momentjs` object. @class combodate @extends abstractinput @final @since 1.4.0 @example <a href="#" id="dob" data-type="combodate" data-pk="1" data-url="/post" data-value="1984-05-15" data-title="Select date"></a> <script> $(function(){ $('#dob').editable({ format: 'YYYY-MM-DD', viewformat: 'DD.MM.YYYY', template: 'D / MMMM / YYYY', combodate: { minYear: 2000, maxYear: 2015, minuteStep: 1 } } }); }); </script> **/ /*global moment*/ (function ($) { "use strict"; var Constructor = function (options) { this.init('combodate', options, Constructor.defaults); //by default viewformat equals to format if(!this.options.viewformat) { this.options.viewformat = this.options.format; } //try parse combodate config defined as json string in data-combodate options.combodate = $.fn.editableutils.tryParseJson(options.combodate, true); //overriding combodate config (as by default jQuery extend() is not recursive) this.options.combodate = $.extend({}, Constructor.defaults.combodate, options.combodate, { format: this.options.format, template: this.options.template }); }; $.fn.editableutils.inherit(Constructor, $.fn.editabletypes.abstractinput); $.extend(Constructor.prototype, { render: function () { this.$input.combodate(this.options.combodate); if($.fn.editableform.engine === 'bs3') { this.$input.siblings().find('select').addClass('form-control'); } if(this.options.inputclass) { this.$input.siblings().find('select').addClass(this.options.inputclass); } //"clear" link /* if(this.options.clear) { this.$clear = $('<a href="#"></a>').html(this.options.clear).click($.proxy(function(e){ e.preventDefault(); e.stopPropagation(); this.clear(); }, this)); this.$tpl.parent().append($('<div class="editable-clear">').append(this.$clear)); } */ }, value2html: function(value, element) { var text = value ? value.format(this.options.viewformat) : ''; //$(element).text(text); Constructor.superclass.value2html.call(this, text, element); }, html2value: function(html) { return html ? moment(html, this.options.viewformat) : null; }, value2str: function(value) { return value ? value.format(this.options.format) : ''; }, str2value: function(str) { return str ? moment(str, this.options.format) : null; }, value2submit: function(value) { return this.value2str(value); }, value2input: function(value) { this.$input.combodate('setValue', value); }, input2value: function() { return this.$input.combodate('getValue', null); }, activate: function() { this.$input.siblings('.combodate').find('select').eq(0).focus(); }, /* clear: function() { this.$input.data('datepicker').date = null; this.$input.find('.active').removeClass('active'); }, */ autosubmit: function() { } }); Constructor.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** @property tpl @default <input type="text"> **/ tpl:'<input type="text">', /** @property inputclass @default null **/ inputclass: null, /** Format used for sending value to server. Also applied when converting date from <code>data-value</code> attribute.<br> See list of tokens in [momentjs docs](http://momentjs.com/docs/#/parsing/string-format) @property format @type string @default YYYY-MM-DD **/ format:'YYYY-MM-DD', /** Format used for displaying date. Also applied when converting date from element's text on init. If not specified equals to `format`. @property viewformat @type string @default null **/ viewformat: null, /** Template used for displaying dropdowns. @property template @type string @default D / MMM / YYYY **/ template: 'D / MMM / YYYY', /** Configuration of combodate. Full list of options: http://vitalets.github.com/combodate/#docs @property combodate @type object @default null **/ combodate: null /* (not implemented yet) Text shown as clear date button. If <code>false</code> clear button will not be rendered. @property clear @type boolean|string @default 'x clear' */ //clear: '&times; clear' }); $.fn.editabletypes.combodate = Constructor; }(window.jQuery)); /* Editableform based on Twitter Bootstrap 3 */ (function ($) { "use strict"; //store parent methods var pInitInput = $.fn.editableform.Constructor.prototype.initInput; $.extend($.fn.editableform.Constructor.prototype, { initTemplate: function() { this.$form = $($.fn.editableform.template); this.$form.find('.control-group').addClass('form-group'); this.$form.find('.editable-error-block').addClass('help-block'); }, initInput: function() { pInitInput.apply(this); //for bs3 set default class `input-sm` to standard inputs var emptyInputClass = this.input.options.inputclass === null || this.input.options.inputclass === false; var defaultClass = 'input-sm'; //bs3 add `form-control` class to standard inputs var stdtypes = 'text,select,textarea,password,email,url,tel,number,range,time,typeaheadjs'.split(','); if(~$.inArray(this.input.type, stdtypes)) { this.input.$input.addClass('form-control'); if(emptyInputClass) { this.input.options.inputclass = defaultClass; this.input.$input.addClass(defaultClass); } } //apply bs3 size class also to buttons (to fit size of control) var $btn = this.$form.find('.editable-buttons'); var classes = emptyInputClass ? [defaultClass] : this.input.options.inputclass.split(' '); for(var i=0; i<classes.length; i++) { // `btn-sm` is default now /* if(classes[i].toLowerCase() === 'input-sm') { $btn.find('button').addClass('btn-sm'); } */ if(classes[i].toLowerCase() === 'input-lg') { $btn.find('button').removeClass('btn-sm').addClass('btn-lg'); } } } }); //buttons $.fn.editableform.buttons = '<button type="submit" class="btn btn-primary btn-sm editable-submit">'+ '<i class="glyphicon glyphicon-ok"></i>'+ '</button>'+ '<button type="button" class="btn btn-default btn-sm editable-cancel">'+ '<i class="glyphicon glyphicon-remove"></i>'+ '</button>'; //error classes $.fn.editableform.errorGroupClass = 'has-error'; $.fn.editableform.errorBlockClass = null; //engine $.fn.editableform.engine = 'bs3'; }(window.jQuery)); /** * Editable Popover3 (for Bootstrap 3) * --------------------- * requires bootstrap-popover.js */ (function ($) { "use strict"; //extend methods $.extend($.fn.editableContainer.Popup.prototype, { containerName: 'popover', containerDataName: 'bs.popover', innerCss: '.popover-content', defaults: $.fn.popover.Constructor.DEFAULTS, initContainer: function(){ $.extend(this.containerOptions, { trigger: 'manual', selector: false, content: ' ', template: this.defaults.template }); //as template property is used in inputs, hide it from popover var t; if(this.$element.data('template')) { t = this.$element.data('template'); this.$element.removeData('template'); } this.call(this.containerOptions); if(t) { //restore data('template') this.$element.data('template', t); } }, /* show */ innerShow: function () { this.call('show'); }, /* hide */ innerHide: function () { this.call('hide'); }, /* destroy */ innerDestroy: function() { this.call('destroy'); }, setContainerOption: function(key, value) { this.container().options[key] = value; }, /** * move popover to new position. This function mainly copied from bootstrap-popover. */ /*jshint laxcomma: true, eqeqeq: false*/ setPosition: function () { (function() { /* var $tip = this.tip() , inside , pos , actualWidth , actualHeight , placement , tp , tpt , tpb , tpl , tpr; placement = typeof this.options.placement === 'function' ? this.options.placement.call(this, $tip[0], this.$element[0]) : this.options.placement; inside = /in/.test(placement); $tip // .detach() //vitalets: remove any placement class because otherwise they dont influence on re-positioning of visible popover .removeClass('top right bottom left') .css({ top: 0, left: 0, display: 'block' }); // .insertAfter(this.$element); pos = this.getPosition(inside); actualWidth = $tip[0].offsetWidth; actualHeight = $tip[0].offsetHeight; placement = inside ? placement.split(' ')[1] : placement; tpb = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}; tpt = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}; tpl = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}; tpr = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}; switch (placement) { case 'bottom': if ((tpb.top + actualHeight) > ($(window).scrollTop() + $(window).height())) { if (tpt.top > $(window).scrollTop()) { placement = 'top'; } else if ((tpr.left + actualWidth) < ($(window).scrollLeft() + $(window).width())) { placement = 'right'; } else if (tpl.left > $(window).scrollLeft()) { placement = 'left'; } else { placement = 'right'; } } break; case 'top': if (tpt.top < $(window).scrollTop()) { if ((tpb.top + actualHeight) < ($(window).scrollTop() + $(window).height())) { placement = 'bottom'; } else if ((tpr.left + actualWidth) < ($(window).scrollLeft() + $(window).width())) { placement = 'right'; } else if (tpl.left > $(window).scrollLeft()) { placement = 'left'; } else { placement = 'right'; } } break; case 'left': if (tpl.left < $(window).scrollLeft()) { if ((tpr.left + actualWidth) < ($(window).scrollLeft() + $(window).width())) { placement = 'right'; } else if (tpt.top > $(window).scrollTop()) { placement = 'top'; } else if (tpt.top > $(window).scrollTop()) { placement = 'bottom'; } else { placement = 'right'; } } break; case 'right': if ((tpr.left + actualWidth) > ($(window).scrollLeft() + $(window).width())) { if (tpl.left > $(window).scrollLeft()) { placement = 'left'; } else if (tpt.top > $(window).scrollTop()) { placement = 'top'; } else if (tpt.top > $(window).scrollTop()) { placement = 'bottom'; } } break; } switch (placement) { case 'bottom': tp = tpb; break; case 'top': tp = tpt; break; case 'left': tp = tpl; break; case 'right': tp = tpr; break; } $tip .offset(tp) .addClass(placement) .addClass('in'); */ var $tip = this.tip(); var placement = typeof this.options.placement == 'function' ? this.options.placement.call(this, $tip[0], this.$element[0]) : this.options.placement; var autoToken = /\s?auto?\s?/i; var autoPlace = autoToken.test(placement); if (autoPlace) { placement = placement.replace(autoToken, '') || 'top'; } var pos = this.getPosition(); var actualWidth = $tip[0].offsetWidth; var actualHeight = $tip[0].offsetHeight; if (autoPlace) { var $parent = this.$element.parent(); var orgPlacement = placement; var docScroll = document.documentElement.scrollTop || document.body.scrollTop; var parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth(); var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight(); var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left; placement = placement == 'bottom' && pos.top + pos.height + actualHeight - docScroll > parentHeight ? 'top' : placement == 'top' && pos.top - docScroll - actualHeight < 0 ? 'bottom' : placement == 'right' && pos.right + actualWidth > parentWidth ? 'left' : placement == 'left' && pos.left - actualWidth < parentLeft ? 'right' : placement; $tip .removeClass(orgPlacement) .addClass(placement); } var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight); this.applyPlacement(calculatedOffset, placement); }).call(this.container()); /*jshint laxcomma: false, eqeqeq: true*/ } }); }(window.jQuery)); /* ========================================================= * bootstrap-datepicker.js * http://www.eyecon.ro/bootstrap-datepicker * ========================================================= * Copyright 2012 Stefan Petre * Improvements by Andrew Rowls * * 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( $ ) { function UTCDate(){ return new Date(Date.UTC.apply(Date, arguments)); } function UTCToday(){ var today = new Date(); return UTCDate(today.getUTCFullYear(), today.getUTCMonth(), today.getUTCDate()); } // Picker object var Datepicker = function(element, options) { var that = this; this._process_options(options); this.element = $(element); this.isInline = false; this.isInput = this.element.is('input'); this.component = this.element.is('.date') ? this.element.find('.add-on, .btn') : false; this.hasInput = this.component && this.element.find('input').length; if(this.component && this.component.length === 0) this.component = false; this.picker = $(DPGlobal.template); this._buildEvents(); this._attachEvents(); if(this.isInline) { this.picker.addClass('datepicker-inline').appendTo(this.element); } else { this.picker.addClass('datepicker-dropdown dropdown-menu'); } if (this.o.rtl){ this.picker.addClass('datepicker-rtl'); this.picker.find('.prev i, .next i') .toggleClass('icon-arrow-left icon-arrow-right'); } this.viewMode = this.o.startView; if (this.o.calendarWeeks) this.picker.find('tfoot th.today') .attr('colspan', function(i, val){ return parseInt(val) + 1; }); this._allow_update = false; this.setStartDate(this.o.startDate); this.setEndDate(this.o.endDate); this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled); this.fillDow(); this.fillMonths(); this._allow_update = true; this.update(); this.showMode(); if(this.isInline) { this.show(); } }; Datepicker.prototype = { constructor: Datepicker, _process_options: function(opts){ // Store raw options for reference this._o = $.extend({}, this._o, opts); // Processed options var o = this.o = $.extend({}, this._o); // Check if "de-DE" style date is available, if not language should // fallback to 2 letter code eg "de" var lang = o.language; if (!dates[lang]) { lang = lang.split('-')[0]; if (!dates[lang]) lang = defaults.language; } o.language = lang; switch(o.startView){ case 2: case 'decade': o.startView = 2; break; case 1: case 'year': o.startView = 1; break; default: o.startView = 0; } switch (o.minViewMode) { case 1: case 'months': o.minViewMode = 1; break; case 2: case 'years': o.minViewMode = 2; break; default: o.minViewMode = 0; } o.startView = Math.max(o.startView, o.minViewMode); o.weekStart %= 7; o.weekEnd = ((o.weekStart + 6) % 7); var format = DPGlobal.parseFormat(o.format) if (o.startDate !== -Infinity) { o.startDate = DPGlobal.parseDate(o.startDate, format, o.language); } if (o.endDate !== Infinity) { o.endDate = DPGlobal.parseDate(o.endDate, format, o.language); } o.daysOfWeekDisabled = o.daysOfWeekDisabled||[]; if (!$.isArray(o.daysOfWeekDisabled)) o.daysOfWeekDisabled = o.daysOfWeekDisabled.split(/[,\s]*/); o.daysOfWeekDisabled = $.map(o.daysOfWeekDisabled, function (d) { return parseInt(d, 10); }); }, _events: [], _secondaryEvents: [], _applyEvents: function(evs){ for (var i=0, el, ev; i<evs.length; i++){ el = evs[i][0]; ev = evs[i][1]; el.on(ev); } }, _unapplyEvents: function(evs){ for (var i=0, el, ev; i<evs.length; i++){ el = evs[i][0]; ev = evs[i][1]; el.off(ev); } }, _buildEvents: function(){ if (this.isInput) { // single input this._events = [ [this.element, { focus: $.proxy(this.show, this), keyup: $.proxy(this.update, this), keydown: $.proxy(this.keydown, this) }] ]; } else if (this.component && this.hasInput){ // component: input + button this._events = [ // For components that are not readonly, allow keyboard nav [this.element.find('input'), { focus: $.proxy(this.show, this), keyup: $.proxy(this.update, this), keydown: $.proxy(this.keydown, this) }], [this.component, { click: $.proxy(this.show, this) }] ]; } else if (this.element.is('div')) { // inline datepicker this.isInline = true; } else { this._events = [ [this.element, { click: $.proxy(this.show, this) }] ]; } this._secondaryEvents = [ [this.picker, { click: $.proxy(this.click, this) }], [$(window), { resize: $.proxy(this.place, this) }], [$(document), { mousedown: $.proxy(function (e) { // Clicked outside the datepicker, hide it if (!( this.element.is(e.target) || this.element.find(e.target).size() || this.picker.is(e.target) || this.picker.find(e.target).size() )) { this.hide(); } }, this) }] ]; }, _attachEvents: function(){ this._detachEvents(); this._applyEvents(this._events); }, _detachEvents: function(){ this._unapplyEvents(this._events); }, _attachSecondaryEvents: function(){ this._detachSecondaryEvents(); this._applyEvents(this._secondaryEvents); }, _detachSecondaryEvents: function(){ this._unapplyEvents(this._secondaryEvents); }, _trigger: function(event, altdate){ var date = altdate || this.date, local_date = new Date(date.getTime() + (date.getTimezoneOffset()*60000)); this.element.trigger({ type: event, date: local_date, format: $.proxy(function(altformat){ var format = altformat || this.o.format; return DPGlobal.formatDate(date, format, this.o.language); }, this) }); }, show: function(e) { if (!this.isInline) this.picker.appendTo('body'); this.picker.show(); this.height = this.component ? this.component.outerHeight() : this.element.outerHeight(); this.place(); this._attachSecondaryEvents(); if (e) { e.preventDefault(); } this._trigger('show'); }, hide: function(e){ if(this.isInline) return; if (!this.picker.is(':visible')) return; this.picker.hide().detach(); this._detachSecondaryEvents(); this.viewMode = this.o.startView; this.showMode(); if ( this.o.forceParse && ( this.isInput && this.element.val() || this.hasInput && this.element.find('input').val() ) ) this.setValue(); this._trigger('hide'); }, remove: function() { this.hide(); this._detachEvents(); this._detachSecondaryEvents(); this.picker.remove(); delete this.element.data().datepicker; if (!this.isInput) { delete this.element.data().date; } }, getDate: function() { var d = this.getUTCDate(); return new Date(d.getTime() + (d.getTimezoneOffset()*60000)); }, getUTCDate: function() { return this.date; }, setDate: function(d) { this.setUTCDate(new Date(d.getTime() - (d.getTimezoneOffset()*60000))); }, setUTCDate: function(d) { this.date = d; this.setValue(); }, setValue: function() { var formatted = this.getFormattedDate(); if (!this.isInput) { if (this.component){ this.element.find('input').val(formatted); } } else { this.element.val(formatted); } }, getFormattedDate: function(format) { if (format === undefined) format = this.o.format; return DPGlobal.formatDate(this.date, format, this.o.language); }, setStartDate: function(startDate){ this._process_options({startDate: startDate}); this.update(); this.updateNavArrows(); }, setEndDate: function(endDate){ this._process_options({endDate: endDate}); this.update(); this.updateNavArrows(); }, setDaysOfWeekDisabled: function(daysOfWeekDisabled){ this._process_options({daysOfWeekDisabled: daysOfWeekDisabled}); this.update(); this.updateNavArrows(); }, place: function(){ if(this.isInline) return; var zIndex = parseInt(this.element.parents().filter(function() { return $(this).css('z-index') != 'auto'; }).first().css('z-index'))+10; var offset = this.component ? this.component.parent().offset() : this.element.offset(); var height = this.component ? this.component.outerHeight(true) : this.element.outerHeight(true); this.picker.css({ top: offset.top + height, left: offset.left, zIndex: zIndex }); }, _allow_update: true, update: function(){ if (!this._allow_update) return; var date, fromArgs = false; if(arguments && arguments.length && (typeof arguments[0] === 'string' || arguments[0] instanceof Date)) { date = arguments[0]; fromArgs = true; } else { date = this.isInput ? this.element.val() : this.element.data('date') || this.element.find('input').val(); delete this.element.data().date; } this.date = DPGlobal.parseDate(date, this.o.format, this.o.language); if(fromArgs) this.setValue(); if (this.date < this.o.startDate) { this.viewDate = new Date(this.o.startDate); } else if (this.date > this.o.endDate) { this.viewDate = new Date(this.o.endDate); } else { this.viewDate = new Date(this.date); } this.fill(); }, fillDow: function(){ var dowCnt = this.o.weekStart, html = '<tr>'; if(this.o.calendarWeeks){ var cell = '<th class="cw">&nbsp;</th>'; html += cell; this.picker.find('.datepicker-days thead tr:first-child').prepend(cell); } while (dowCnt < this.o.weekStart + 7) { html += '<th class="dow">'+dates[this.o.language].daysMin[(dowCnt++)%7]+'</th>'; } html += '</tr>'; this.picker.find('.datepicker-days thead').append(html); }, fillMonths: function(){ var html = '', i = 0; while (i < 12) { html += '<span class="month">'+dates[this.o.language].monthsShort[i++]+'</span>'; } this.picker.find('.datepicker-months td').html(html); }, setRange: function(range){ if (!range || !range.length) delete this.range; else this.range = $.map(range, function(d){ return d.valueOf(); }); this.fill(); }, getClassNames: function(date){ var cls = [], year = this.viewDate.getUTCFullYear(), month = this.viewDate.getUTCMonth(), currentDate = this.date.valueOf(), today = new Date(); if (date.getUTCFullYear() < year || (date.getUTCFullYear() == year && date.getUTCMonth() < month)) { cls.push('old'); } else if (date.getUTCFullYear() > year || (date.getUTCFullYear() == year && date.getUTCMonth() > month)) { cls.push('new'); } // Compare internal UTC date with local today, not UTC today if (this.o.todayHighlight && date.getUTCFullYear() == today.getFullYear() && date.getUTCMonth() == today.getMonth() && date.getUTCDate() == today.getDate()) { cls.push('today'); } if (currentDate && date.valueOf() == currentDate) { cls.push('active'); } if (date.valueOf() < this.o.startDate || date.valueOf() > this.o.endDate || $.inArray(date.getUTCDay(), this.o.daysOfWeekDisabled) !== -1) { cls.push('disabled'); } if (this.range){ if (date > this.range[0] && date < this.range[this.range.length-1]){ cls.push('range'); } if ($.inArray(date.valueOf(), this.range) != -1){ cls.push('selected'); } } return cls; }, fill: function() { var d = new Date(this.viewDate), year = d.getUTCFullYear(), month = d.getUTCMonth(), startYear = this.o.startDate !== -Infinity ? this.o.startDate.getUTCFullYear() : -Infinity, startMonth = this.o.startDate !== -Infinity ? this.o.startDate.getUTCMonth() : -Infinity, endYear = this.o.endDate !== Infinity ? this.o.endDate.getUTCFullYear() : Infinity, endMonth = this.o.endDate !== Infinity ? this.o.endDate.getUTCMonth() : Infinity, currentDate = this.date && this.date.valueOf(), tooltip; this.picker.find('.datepicker-days thead th.datepicker-switch') .text(dates[this.o.language].months[month]+' '+year); this.picker.find('tfoot th.today') .text(dates[this.o.language].today) .toggle(this.o.todayBtn !== false); this.picker.find('tfoot th.clear') .text(dates[this.o.language].clear) .toggle(this.o.clearBtn !== false); this.updateNavArrows(); this.fillMonths(); var prevMonth = UTCDate(year, month-1, 28,0,0,0,0), day = DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(), prevMonth.getUTCMonth()); prevMonth.setUTCDate(day); prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.o.weekStart + 7)%7); var nextMonth = new Date(prevMonth); nextMonth.setUTCDate(nextMonth.getUTCDate() + 42); nextMonth = nextMonth.valueOf(); var html = []; var clsName; while(prevMonth.valueOf() < nextMonth) { if (prevMonth.getUTCDay() == this.o.weekStart) { html.push('<tr>'); if(this.o.calendarWeeks){ // ISO 8601: First week contains first thursday. // ISO also states week starts on Monday, but we can be more abstract here. var // Start of current week: based on weekstart/current date ws = new Date(+prevMonth + (this.o.weekStart - prevMonth.getUTCDay() - 7) % 7 * 864e5), // Thursday of this week th = new Date(+ws + (7 + 4 - ws.getUTCDay()) % 7 * 864e5), // First Thursday of year, year from thursday yth = new Date(+(yth = UTCDate(th.getUTCFullYear(), 0, 1)) + (7 + 4 - yth.getUTCDay())%7*864e5), // Calendar week: ms between thursdays, div ms per day, div 7 days calWeek = (th - yth) / 864e5 / 7 + 1; html.push('<td class="cw">'+ calWeek +'</td>'); } } clsName = this.getClassNames(prevMonth); clsName.push('day'); var before = this.o.beforeShowDay(prevMonth); if (before === undefined) before = {}; else if (typeof(before) === 'boolean') before = {enabled: before}; else if (typeof(before) === 'string') before = {classes: before}; if (before.enabled === false) clsName.push('disabled'); if (before.classes) clsName = clsName.concat(before.classes.split(/\s+/)); if (before.tooltip) tooltip = before.tooltip; clsName = $.unique(clsName); html.push('<td class="'+clsName.join(' ')+'"' + (tooltip ? ' title="'+tooltip+'"' : '') + '>'+prevMonth.getUTCDate() + '</td>'); if (prevMonth.getUTCDay() == this.o.weekEnd) { html.push('</tr>'); } prevMonth.setUTCDate(prevMonth.getUTCDate()+1); } this.picker.find('.datepicker-days tbody').empty().append(html.join('')); var currentYear = this.date && this.date.getUTCFullYear(); var months = this.picker.find('.datepicker-months') .find('th:eq(1)') .text(year) .end() .find('span').removeClass('active'); if (currentYear && currentYear == year) { months.eq(this.date.getUTCMonth()).addClass('active'); } if (year < startYear || year > endYear) { months.addClass('disabled'); } if (year == startYear) { months.slice(0, startMonth).addClass('disabled'); } if (year == endYear) { months.slice(endMonth+1).addClass('disabled'); } html = ''; year = parseInt(year/10, 10) * 10; var yearCont = this.picker.find('.datepicker-years') .find('th:eq(1)') .text(year + '-' + (year + 9)) .end() .find('td'); year -= 1; for (var i = -1; i < 11; i++) { html += '<span class="year'+(i == -1 ? ' old' : i == 10 ? ' new' : '')+(currentYear == year ? ' active' : '')+(year < startYear || year > endYear ? ' disabled' : '')+'">'+year+'</span>'; year += 1; } yearCont.html(html); }, updateNavArrows: function() { if (!this._allow_update) return; var d = new Date(this.viewDate), year = d.getUTCFullYear(), month = d.getUTCMonth(); switch (this.viewMode) { case 0: if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear() && month <= this.o.startDate.getUTCMonth()) { this.picker.find('.prev').css({visibility: 'hidden'}); } else { this.picker.find('.prev').css({visibility: 'visible'}); } if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear() && month >= this.o.endDate.getUTCMonth()) { this.picker.find('.next').css({visibility: 'hidden'}); } else { this.picker.find('.next').css({visibility: 'visible'}); } break; case 1: case 2: if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear()) { this.picker.find('.prev').css({visibility: 'hidden'}); } else { this.picker.find('.prev').css({visibility: 'visible'}); } if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear()) { this.picker.find('.next').css({visibility: 'hidden'}); } else { this.picker.find('.next').css({visibility: 'visible'}); } break; } }, click: function(e) { e.preventDefault(); var target = $(e.target).closest('span, td, th'); if (target.length == 1) { switch(target[0].nodeName.toLowerCase()) { case 'th': switch(target[0].className) { case 'datepicker-switch': this.showMode(1); break; case 'prev': case 'next': var dir = DPGlobal.modes[this.viewMode].navStep * (target[0].className == 'prev' ? -1 : 1); switch(this.viewMode){ case 0: this.viewDate = this.moveMonth(this.viewDate, dir); break; case 1: case 2: this.viewDate = this.moveYear(this.viewDate, dir); break; } this.fill(); break; case 'today': var date = new Date(); date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0); this.showMode(-2); var which = this.o.todayBtn == 'linked' ? null : 'view'; this._setDate(date, which); break; case 'clear': var element; if (this.isInput) element = this.element; else if (this.component) element = this.element.find('input'); if (element) element.val("").change(); this._trigger('changeDate'); this.update(); if (this.o.autoclose) this.hide(); break; } break; case 'span': if (!target.is('.disabled')) { this.viewDate.setUTCDate(1); if (target.is('.month')) { var day = 1; var month = target.parent().find('span').index(target); var year = this.viewDate.getUTCFullYear(); this.viewDate.setUTCMonth(month); this._trigger('changeMonth', this.viewDate); if (this.o.minViewMode === 1) { this._setDate(UTCDate(year, month, day,0,0,0,0)); } } else { var year = parseInt(target.text(), 10)||0; var day = 1; var month = 0; this.viewDate.setUTCFullYear(year); this._trigger('changeYear', this.viewDate); if (this.o.minViewMode === 2) { this._setDate(UTCDate(year, month, day,0,0,0,0)); } } this.showMode(-1); this.fill(); } break; case 'td': if (target.is('.day') && !target.is('.disabled')){ var day = parseInt(target.text(), 10)||1; var year = this.viewDate.getUTCFullYear(), month = this.viewDate.getUTCMonth(); if (target.is('.old')) { if (month === 0) { month = 11; year -= 1; } else { month -= 1; } } else if (target.is('.new')) { if (month == 11) { month = 0; year += 1; } else { month += 1; } } this._setDate(UTCDate(year, month, day,0,0,0,0)); } break; } } }, _setDate: function(date, which){ if (!which || which == 'date') this.date = new Date(date); if (!which || which == 'view') this.viewDate = new Date(date); this.fill(); this.setValue(); this._trigger('changeDate'); var element; if (this.isInput) { element = this.element; } else if (this.component){ element = this.element.find('input'); } if (element) { element.change(); if (this.o.autoclose && (!which || which == 'date')) { this.hide(); } } }, moveMonth: function(date, dir){ if (!dir) return date; var new_date = new Date(date.valueOf()), day = new_date.getUTCDate(), month = new_date.getUTCMonth(), mag = Math.abs(dir), new_month, test; dir = dir > 0 ? 1 : -1; if (mag == 1){ test = dir == -1 // If going back one month, make sure month is not current month // (eg, Mar 31 -> Feb 31 == Feb 28, not Mar 02) ? function(){ return new_date.getUTCMonth() == month; } // If going forward one month, make sure month is as expected // (eg, Jan 31 -> Feb 31 == Feb 28, not Mar 02) : function(){ return new_date.getUTCMonth() != new_month; }; new_month = month + dir; new_date.setUTCMonth(new_month); // Dec -> Jan (12) or Jan -> Dec (-1) -- limit expected date to 0-11 if (new_month < 0 || new_month > 11) new_month = (new_month + 12) % 12; } else { // For magnitudes >1, move one month at a time... for (var i=0; i<mag; i++) // ...which might decrease the day (eg, Jan 31 to Feb 28, etc)... new_date = this.moveMonth(new_date, dir); // ...then reset the day, keeping it in the new month new_month = new_date.getUTCMonth(); new_date.setUTCDate(day); test = function(){ return new_month != new_date.getUTCMonth(); }; } // Common date-resetting loop -- if date is beyond end of month, make it // end of month while (test()){ new_date.setUTCDate(--day); new_date.setUTCMonth(new_month); } return new_date; }, moveYear: function(date, dir){ return this.moveMonth(date, dir*12); }, dateWithinRange: function(date){ return date >= this.o.startDate && date <= this.o.endDate; }, keydown: function(e){ if (this.picker.is(':not(:visible)')){ if (e.keyCode == 27) // allow escape to hide and re-show picker this.show(); return; } var dateChanged = false, dir, day, month, newDate, newViewDate; switch(e.keyCode){ case 27: // escape this.hide(); e.preventDefault(); break; case 37: // left case 39: // right if (!this.o.keyboardNavigation) break; dir = e.keyCode == 37 ? -1 : 1; if (e.ctrlKey){ newDate = this.moveYear(this.date, dir); newViewDate = this.moveYear(this.viewDate, dir); } else if (e.shiftKey){ newDate = this.moveMonth(this.date, dir); newViewDate = this.moveMonth(this.viewDate, dir); } else { newDate = new Date(this.date); newDate.setUTCDate(this.date.getUTCDate() + dir); newViewDate = new Date(this.viewDate); newViewDate.setUTCDate(this.viewDate.getUTCDate() + dir); } if (this.dateWithinRange(newDate)){ this.date = newDate; this.viewDate = newViewDate; this.setValue(); this.update(); e.preventDefault(); dateChanged = true; } break; case 38: // up case 40: // down if (!this.o.keyboardNavigation) break; dir = e.keyCode == 38 ? -1 : 1; if (e.ctrlKey){ newDate = this.moveYear(this.date, dir); newViewDate = this.moveYear(this.viewDate, dir); } else if (e.shiftKey){ newDate = this.moveMonth(this.date, dir); newViewDate = this.moveMonth(this.viewDate, dir); } else { newDate = new Date(this.date); newDate.setUTCDate(this.date.getUTCDate() + dir * 7); newViewDate = new Date(this.viewDate); newViewDate.setUTCDate(this.viewDate.getUTCDate() + dir * 7); } if (this.dateWithinRange(newDate)){ this.date = newDate; this.viewDate = newViewDate; this.setValue(); this.update(); e.preventDefault(); dateChanged = true; } break; case 13: // enter this.hide(); e.preventDefault(); break; case 9: // tab this.hide(); break; } if (dateChanged){ this._trigger('changeDate'); var element; if (this.isInput) { element = this.element; } else if (this.component){ element = this.element.find('input'); } if (element) { element.change(); } } }, showMode: function(dir) { if (dir) { this.viewMode = Math.max(this.o.minViewMode, Math.min(2, this.viewMode + dir)); } /* vitalets: fixing bug of very special conditions: jquery 1.7.1 + webkit + show inline datepicker in bootstrap popover. Method show() does not set display css correctly and datepicker is not shown. Changed to .css('display', 'block') solve the problem. See https://github.com/vitalets/x-editable/issues/37 In jquery 1.7.2+ everything works fine. */ //this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show(); this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).css('display', 'block'); this.updateNavArrows(); } }; var DateRangePicker = function(element, options){ this.element = $(element); this.inputs = $.map(options.inputs, function(i){ return i.jquery ? i[0] : i; }); delete options.inputs; $(this.inputs) .datepicker(options) .bind('changeDate', $.proxy(this.dateUpdated, this)); this.pickers = $.map(this.inputs, function(i){ return $(i).data('datepicker'); }); this.updateDates(); }; DateRangePicker.prototype = { updateDates: function(){ this.dates = $.map(this.pickers, function(i){ return i.date; }); this.updateRanges(); }, updateRanges: function(){ var range = $.map(this.dates, function(d){ return d.valueOf(); }); $.each(this.pickers, function(i, p){ p.setRange(range); }); }, dateUpdated: function(e){ var dp = $(e.target).data('datepicker'), new_date = dp.getUTCDate(), i = $.inArray(e.target, this.inputs), l = this.inputs.length; if (i == -1) return; if (new_date < this.dates[i]){ // Date being moved earlier/left while (i>=0 && new_date < this.dates[i]){ this.pickers[i--].setUTCDate(new_date); } } else if (new_date > this.dates[i]){ // Date being moved later/right while (i<l && new_date > this.dates[i]){ this.pickers[i++].setUTCDate(new_date); } } this.updateDates(); }, remove: function(){ $.map(this.pickers, function(p){ p.remove(); }); delete this.element.data().datepicker; } }; function opts_from_el(el, prefix){ // Derive options from element data-attrs var data = $(el).data(), out = {}, inkey, replace = new RegExp('^' + prefix.toLowerCase() + '([A-Z])'), prefix = new RegExp('^' + prefix.toLowerCase()); for (var key in data) if (prefix.test(key)){ inkey = key.replace(replace, function(_,a){ return a.toLowerCase(); }); out[inkey] = data[key]; } return out; } function opts_from_locale(lang){ // Derive options from locale plugins var out = {}; // Check if "de-DE" style date is available, if not language should // fallback to 2 letter code eg "de" if (!dates[lang]) { lang = lang.split('-')[0] if (!dates[lang]) return; } var d = dates[lang]; $.each(locale_opts, function(i,k){ if (k in d) out[k] = d[k]; }); return out; } var old = $.fn.datepicker; var datepicker = $.fn.datepicker = function ( option ) { var args = Array.apply(null, arguments); args.shift(); var internal_return, this_return; this.each(function () { var $this = $(this), data = $this.data('datepicker'), options = typeof option == 'object' && option; if (!data) { var elopts = opts_from_el(this, 'date'), // Preliminary otions xopts = $.extend({}, defaults, elopts, options), locopts = opts_from_locale(xopts.language), // Options priority: js args, data-attrs, locales, defaults opts = $.extend({}, defaults, locopts, elopts, options); if ($this.is('.input-daterange') || opts.inputs){ var ropts = { inputs: opts.inputs || $this.find('input').toArray() }; $this.data('datepicker', (data = new DateRangePicker(this, $.extend(opts, ropts)))); } else{ $this.data('datepicker', (data = new Datepicker(this, opts))); } } if (typeof option == 'string' && typeof data[option] == 'function') { internal_return = data[option].apply(data, args); if (internal_return !== undefined) return false; } }); if (internal_return !== undefined) return internal_return; else return this; }; var defaults = $.fn.datepicker.defaults = { autoclose: false, beforeShowDay: $.noop, calendarWeeks: false, clearBtn: false, daysOfWeekDisabled: [], endDate: Infinity, forceParse: true, format: 'mm/dd/yyyy', keyboardNavigation: true, language: 'en', minViewMode: 0, rtl: false, startDate: -Infinity, startView: 0, todayBtn: false, todayHighlight: false, weekStart: 0 }; var locale_opts = $.fn.datepicker.locale_opts = [ 'format', 'rtl', 'weekStart' ]; $.fn.datepicker.Constructor = Datepicker; var dates = $.fn.datepicker.dates = { en: { days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], today: "Today", clear: "Clear" } }; var DPGlobal = { modes: [ { clsName: 'days', navFnc: 'Month', navStep: 1 }, { clsName: 'months', navFnc: 'FullYear', navStep: 1 }, { clsName: 'years', navFnc: 'FullYear', navStep: 10 }], isLeapYear: function (year) { return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0)); }, getDaysInMonth: function (year, month) { return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]; }, validParts: /dd?|DD?|mm?|MM?|yy(?:yy)?/g, nonpunctuation: /[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g, parseFormat: function(format){ // IE treats \0 as a string end in inputs (truncating the value), // so it's a bad format delimiter, anyway var separators = format.replace(this.validParts, '\0').split('\0'), parts = format.match(this.validParts); if (!separators || !separators.length || !parts || parts.length === 0){ throw new Error("Invalid date format."); } return {separators: separators, parts: parts}; }, parseDate: function(date, format, language) { if (date instanceof Date) return date; if (typeof format === 'string') format = DPGlobal.parseFormat(format); if (/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(date)) { var part_re = /([\-+]\d+)([dmwy])/, parts = date.match(/([\-+]\d+)([dmwy])/g), part, dir; date = new Date(); for (var i=0; i<parts.length; i++) { part = part_re.exec(parts[i]); dir = parseInt(part[1]); switch(part[2]){ case 'd': date.setUTCDate(date.getUTCDate() + dir); break; case 'm': date = Datepicker.prototype.moveMonth.call(Datepicker.prototype, date, dir); break; case 'w': date.setUTCDate(date.getUTCDate() + dir * 7); break; case 'y': date = Datepicker.prototype.moveYear.call(Datepicker.prototype, date, dir); break; } } return UTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0); } var parts = date && date.match(this.nonpunctuation) || [], date = new Date(), parsed = {}, setters_order = ['yyyy', 'yy', 'M', 'MM', 'm', 'mm', 'd', 'dd'], setters_map = { yyyy: function(d,v){ return d.setUTCFullYear(v); }, yy: function(d,v){ return d.setUTCFullYear(2000+v); }, m: function(d,v){ v -= 1; while (v<0) v += 12; v %= 12; d.setUTCMonth(v); while (d.getUTCMonth() != v) d.setUTCDate(d.getUTCDate()-1); return d; }, d: function(d,v){ return d.setUTCDate(v); } }, val, filtered, part; setters_map['M'] = setters_map['MM'] = setters_map['mm'] = setters_map['m']; setters_map['dd'] = setters_map['d']; date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0); var fparts = format.parts.slice(); // Remove noop parts if (parts.length != fparts.length) { fparts = $(fparts).filter(function(i,p){ return $.inArray(p, setters_order) !== -1; }).toArray(); } // Process remainder if (parts.length == fparts.length) { for (var i=0, cnt = fparts.length; i < cnt; i++) { val = parseInt(parts[i], 10); part = fparts[i]; if (isNaN(val)) { switch(part) { case 'MM': filtered = $(dates[language].months).filter(function(){ var m = this.slice(0, parts[i].length), p = parts[i].slice(0, m.length); return m == p; }); val = $.inArray(filtered[0], dates[language].months) + 1; break; case 'M': filtered = $(dates[language].monthsShort).filter(function(){ var m = this.slice(0, parts[i].length), p = parts[i].slice(0, m.length); return m == p; }); val = $.inArray(filtered[0], dates[language].monthsShort) + 1; break; } } parsed[part] = val; } for (var i=0, s; i<setters_order.length; i++){ s = setters_order[i]; if (s in parsed && !isNaN(parsed[s])) setters_map[s](date, parsed[s]); } } return date; }, formatDate: function(date, format, language){ if (typeof format === 'string') format = DPGlobal.parseFormat(format); var val = { d: date.getUTCDate(), D: dates[language].daysShort[date.getUTCDay()], DD: dates[language].days[date.getUTCDay()], m: date.getUTCMonth() + 1, M: dates[language].monthsShort[date.getUTCMonth()], MM: dates[language].months[date.getUTCMonth()], yy: date.getUTCFullYear().toString().substring(2), yyyy: date.getUTCFullYear() }; val.dd = (val.d < 10 ? '0' : '') + val.d; val.mm = (val.m < 10 ? '0' : '') + val.m; var date = [], seps = $.extend([], format.separators); for (var i=0, cnt = format.parts.length; i <= cnt; i++) { if (seps.length) date.push(seps.shift()); date.push(val[format.parts[i]]); } return date.join(''); }, headTemplate: '<thead>'+ '<tr>'+ '<th class="prev"><i class="icon-arrow-left"/></th>'+ '<th colspan="5" class="datepicker-switch"></th>'+ '<th class="next"><i class="icon-arrow-right"/></th>'+ '</tr>'+ '</thead>', contTemplate: '<tbody><tr><td colspan="7"></td></tr></tbody>', footTemplate: '<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>' }; DPGlobal.template = '<div class="datepicker">'+ '<div class="datepicker-days">'+ '<table class=" table-condensed">'+ DPGlobal.headTemplate+ '<tbody></tbody>'+ DPGlobal.footTemplate+ '</table>'+ '</div>'+ '<div class="datepicker-months">'+ '<table class="table-condensed">'+ DPGlobal.headTemplate+ DPGlobal.contTemplate+ DPGlobal.footTemplate+ '</table>'+ '</div>'+ '<div class="datepicker-years">'+ '<table class="table-condensed">'+ DPGlobal.headTemplate+ DPGlobal.contTemplate+ DPGlobal.footTemplate+ '</table>'+ '</div>'+ '</div>'; $.fn.datepicker.DPGlobal = DPGlobal; /* DATEPICKER NO CONFLICT * =================== */ $.fn.datepicker.noConflict = function(){ $.fn.datepicker = old; return this; }; /* DATEPICKER DATA-API * ================== */ $(document).on( 'focus.datepicker.data-api click.datepicker.data-api', '[data-provide="datepicker"]', function(e){ var $this = $(this); if ($this.data('datepicker')) return; e.preventDefault(); // component click requires us to explicitly show it datepicker.call($this, 'show'); } ); $(function(){ //$('[data-provide="datepicker-inline"]').datepicker(); //vit: changed to support noConflict() datepicker.call($('[data-provide="datepicker-inline"]')); }); }( window.jQuery )); /** Bootstrap-datepicker. Description and examples: https://github.com/eternicode/bootstrap-datepicker. For **i18n** you should include js file from here: https://github.com/eternicode/bootstrap-datepicker/tree/master/js/locales and set `language` option. Since 1.4.0 date has different appearance in **popup** and **inline** modes. @class date @extends abstractinput @final @example <a href="#" id="dob" data-type="date" data-pk="1" data-url="/post" data-title="Select date">15/05/1984</a> <script> $(function(){ $('#dob').editable({ format: 'yyyy-mm-dd', viewformat: 'dd/mm/yyyy', datepicker: { weekStart: 1 } } }); }); </script> **/ (function ($) { "use strict"; //store bootstrap-datepicker as bdateicker to exclude conflict with jQuery UI one $.fn.bdatepicker = $.fn.datepicker.noConflict(); if(!$.fn.datepicker) { //if there were no other datepickers, keep also original name $.fn.datepicker = $.fn.bdatepicker; } var Date = function (options) { this.init('date', options, Date.defaults); this.initPicker(options, Date.defaults); }; $.fn.editableutils.inherit(Date, $.fn.editabletypes.abstractinput); $.extend(Date.prototype, { initPicker: function(options, defaults) { //'format' is set directly from settings or data-* attributes //by default viewformat equals to format if(!this.options.viewformat) { this.options.viewformat = this.options.format; } //try parse datepicker config defined as json string in data-datepicker options.datepicker = $.fn.editableutils.tryParseJson(options.datepicker, true); //overriding datepicker config (as by default jQuery extend() is not recursive) //since 1.4 datepicker internally uses viewformat instead of format. Format is for submit only this.options.datepicker = $.extend({}, defaults.datepicker, options.datepicker, { format: this.options.viewformat }); //language this.options.datepicker.language = this.options.datepicker.language || 'en'; //store DPglobal this.dpg = $.fn.bdatepicker.DPGlobal; //store parsed formats this.parsedFormat = this.dpg.parseFormat(this.options.format); this.parsedViewFormat = this.dpg.parseFormat(this.options.viewformat); }, render: function () { this.$input.bdatepicker(this.options.datepicker); //"clear" link if(this.options.clear) { this.$clear = $('<a href="#"></a>').html(this.options.clear).click($.proxy(function(e){ e.preventDefault(); e.stopPropagation(); this.clear(); }, this)); this.$tpl.parent().append($('<div class="editable-clear">').append(this.$clear)); } }, value2html: function(value, element) { var text = value ? this.dpg.formatDate(value, this.parsedViewFormat, this.options.datepicker.language) : ''; Date.superclass.value2html.call(this, text, element); }, html2value: function(html) { return this.parseDate(html, this.parsedViewFormat); }, value2str: function(value) { return value ? this.dpg.formatDate(value, this.parsedFormat, this.options.datepicker.language) : ''; }, str2value: function(str) { return this.parseDate(str, this.parsedFormat); }, value2submit: function(value) { return this.value2str(value); }, value2input: function(value) { this.$input.bdatepicker('update', value); }, input2value: function() { return this.$input.data('datepicker').date; }, activate: function() { }, clear: function() { this.$input.data('datepicker').date = null; this.$input.find('.active').removeClass('active'); if(!this.options.showbuttons) { this.$input.closest('form').submit(); } }, autosubmit: function() { this.$input.on('mouseup', '.day', function(e){ if($(e.currentTarget).is('.old') || $(e.currentTarget).is('.new')) { return; } var $form = $(this).closest('form'); setTimeout(function() { $form.submit(); }, 200); }); //changedate is not suitable as it triggered when showing datepicker. see #149 /* this.$input.on('changeDate', function(e){ var $form = $(this).closest('form'); setTimeout(function() { $form.submit(); }, 200); }); */ }, /* For incorrect date bootstrap-datepicker returns current date that is not suitable for datefield. This function returns null for incorrect date. */ parseDate: function(str, format) { var date = null, formattedBack; if(str) { date = this.dpg.parseDate(str, format, this.options.datepicker.language); if(typeof str === 'string') { formattedBack = this.dpg.formatDate(date, format, this.options.datepicker.language); if(str !== formattedBack) { date = null; } } } return date; } }); Date.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** @property tpl @default <div></div> **/ tpl:'<div class="editable-date well"></div>', /** @property inputclass @default null **/ inputclass: null, /** Format used for sending value to server. Also applied when converting date from <code>data-value</code> attribute.<br> Possible tokens are: <code>d, dd, m, mm, yy, yyyy</code> @property format @type string @default yyyy-mm-dd **/ format:'yyyy-mm-dd', /** Format used for displaying date. Also applied when converting date from element's text on init. If not specified equals to <code>format</code> @property viewformat @type string @default null **/ viewformat: null, /** Configuration of datepicker. Full list of options: http://bootstrap-datepicker.readthedocs.org/en/latest/options.html @property datepicker @type object @default { weekStart: 0, startView: 0, minViewMode: 0, autoclose: false } **/ datepicker:{ weekStart: 0, startView: 0, minViewMode: 0, autoclose: false }, /** Text shown as clear date button. If <code>false</code> clear button will not be rendered. @property clear @type boolean|string @default 'x clear' **/ clear: '&times; clear' }); $.fn.editabletypes.date = Date; }(window.jQuery)); /** Bootstrap datefield input - modification for inline mode. Shows normal <input type="text"> and binds popup datepicker. Automatically shown in inline mode. @class datefield @extends date @since 1.4.0 **/ (function ($) { "use strict"; var DateField = function (options) { this.init('datefield', options, DateField.defaults); this.initPicker(options, DateField.defaults); }; $.fn.editableutils.inherit(DateField, $.fn.editabletypes.date); $.extend(DateField.prototype, { render: function () { this.$input = this.$tpl.find('input'); this.setClass(); this.setAttr('placeholder'); //bootstrap-datepicker is set `bdateicker` to exclude conflict with jQuery UI one. (in date.js) this.$tpl.bdatepicker(this.options.datepicker); //need to disable original event handlers this.$input.off('focus keydown'); //update value of datepicker this.$input.keyup($.proxy(function(){ this.$tpl.removeData('date'); this.$tpl.bdatepicker('update'); }, this)); }, value2input: function(value) { this.$input.val(value ? this.dpg.formatDate(value, this.parsedViewFormat, this.options.datepicker.language) : ''); this.$tpl.bdatepicker('update'); }, input2value: function() { return this.html2value(this.$input.val()); }, activate: function() { $.fn.editabletypes.text.prototype.activate.call(this); }, autosubmit: function() { //reset autosubmit to empty } }); DateField.defaults = $.extend({}, $.fn.editabletypes.date.defaults, { /** @property tpl **/ tpl:'<div class="input-append date"><input type="text"/><span class="add-on"><i class="icon-th"></i></span></div>', /** @property inputclass @default 'input-small' **/ inputclass: 'input-small', /* datepicker config */ datepicker: { weekStart: 0, startView: 0, minViewMode: 0, autoclose: true } }); $.fn.editabletypes.datefield = DateField; }(window.jQuery)); /** Bootstrap-datetimepicker. Based on [smalot bootstrap-datetimepicker plugin](https://github.com/smalot/bootstrap-datetimepicker). Before usage you should manually include dependent js and css: <link href="css/datetimepicker.css" rel="stylesheet" type="text/css"></link> <script src="js/bootstrap-datetimepicker.js"></script> For **i18n** you should include js file from here: https://github.com/smalot/bootstrap-datetimepicker/tree/master/js/locales and set `language` option. @class datetime @extends abstractinput @final @since 1.4.4 @example <a href="#" id="last_seen" data-type="datetime" data-pk="1" data-url="/post" title="Select date & time">15/03/2013 12:45</a> <script> $(function(){ $('#last_seen').editable({ format: 'yyyy-mm-dd hh:ii', viewformat: 'dd/mm/yyyy hh:ii', datetimepicker: { weekStart: 1 } } }); }); </script> **/ (function ($) { "use strict"; var DateTime = function (options) { this.init('datetime', options, DateTime.defaults); this.initPicker(options, DateTime.defaults); }; $.fn.editableutils.inherit(DateTime, $.fn.editabletypes.abstractinput); $.extend(DateTime.prototype, { initPicker: function(options, defaults) { //'format' is set directly from settings or data-* attributes //by default viewformat equals to format if(!this.options.viewformat) { this.options.viewformat = this.options.format; } //try parse datetimepicker config defined as json string in data-datetimepicker options.datetimepicker = $.fn.editableutils.tryParseJson(options.datetimepicker, true); //overriding datetimepicker config (as by default jQuery extend() is not recursive) //since 1.4 datetimepicker internally uses viewformat instead of format. Format is for submit only this.options.datetimepicker = $.extend({}, defaults.datetimepicker, options.datetimepicker, { format: this.options.viewformat }); //language this.options.datetimepicker.language = this.options.datetimepicker.language || 'en'; //store DPglobal this.dpg = $.fn.datetimepicker.DPGlobal; //store parsed formats this.parsedFormat = this.dpg.parseFormat(this.options.format, this.options.formatType); this.parsedViewFormat = this.dpg.parseFormat(this.options.viewformat, this.options.formatType); }, render: function () { this.$input.datetimepicker(this.options.datetimepicker); //adjust container position when viewMode changes //see https://github.com/smalot/bootstrap-datetimepicker/pull/80 this.$input.on('changeMode', function(e) { var f = $(this).closest('form').parent(); //timeout here, otherwise container changes position before form has new size setTimeout(function(){ f.triggerHandler('resize'); }, 0); }); //"clear" link if(this.options.clear) { this.$clear = $('<a href="#"></a>').html(this.options.clear).click($.proxy(function(e){ e.preventDefault(); e.stopPropagation(); this.clear(); }, this)); this.$tpl.parent().append($('<div class="editable-clear">').append(this.$clear)); } }, value2html: function(value, element) { //formatDate works with UTCDate! var text = value ? this.dpg.formatDate(this.toUTC(value), this.parsedViewFormat, this.options.datetimepicker.language, this.options.formatType) : ''; if(element) { DateTime.superclass.value2html.call(this, text, element); } else { return text; } }, html2value: function(html) { //parseDate return utc date! var value = this.parseDate(html, this.parsedViewFormat); return value ? this.fromUTC(value) : null; }, value2str: function(value) { //formatDate works with UTCDate! return value ? this.dpg.formatDate(this.toUTC(value), this.parsedFormat, this.options.datetimepicker.language, this.options.formatType) : ''; }, str2value: function(str) { //parseDate return utc date! var value = this.parseDate(str, this.parsedFormat); return value ? this.fromUTC(value) : null; }, value2submit: function(value) { return this.value2str(value); }, value2input: function(value) { if(value) { this.$input.data('datetimepicker').setDate(value); } }, input2value: function() { //date may be cleared, in that case getDate() triggers error var dt = this.$input.data('datetimepicker'); return dt.date ? dt.getDate() : null; }, activate: function() { }, clear: function() { this.$input.data('datetimepicker').date = null; this.$input.find('.active').removeClass('active'); if(!this.options.showbuttons) { this.$input.closest('form').submit(); } }, autosubmit: function() { this.$input.on('mouseup', '.minute', function(e){ var $form = $(this).closest('form'); setTimeout(function() { $form.submit(); }, 200); }); }, //convert date from local to utc toUTC: function(value) { return value ? new Date(value.valueOf() - value.getTimezoneOffset() * 60000) : value; }, //convert date from utc to local fromUTC: function(value) { return value ? new Date(value.valueOf() + value.getTimezoneOffset() * 60000) : value; }, /* For incorrect date bootstrap-datetimepicker returns current date that is not suitable for datetimefield. This function returns null for incorrect date. */ parseDate: function(str, format) { var date = null, formattedBack; if(str) { date = this.dpg.parseDate(str, format, this.options.datetimepicker.language, this.options.formatType); if(typeof str === 'string') { formattedBack = this.dpg.formatDate(date, format, this.options.datetimepicker.language, this.options.formatType); if(str !== formattedBack) { date = null; } } } return date; } }); DateTime.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** @property tpl @default <div></div> **/ tpl:'<div class="editable-date well"></div>', /** @property inputclass @default null **/ inputclass: null, /** Format used for sending value to server. Also applied when converting date from <code>data-value</code> attribute.<br> Possible tokens are: <code>d, dd, m, mm, yy, yyyy, h, i</code> @property format @type string @default yyyy-mm-dd hh:ii **/ format:'yyyy-mm-dd hh:ii', formatType:'standard', /** Format used for displaying date. Also applied when converting date from element's text on init. If not specified equals to <code>format</code> @property viewformat @type string @default null **/ viewformat: null, /** Configuration of datetimepicker. Full list of options: https://github.com/smalot/bootstrap-datetimepicker @property datetimepicker @type object @default { } **/ datetimepicker:{ todayHighlight: false, autoclose: false }, /** Text shown as clear date button. If <code>false</code> clear button will not be rendered. @property clear @type boolean|string @default 'x clear' **/ clear: '&times; clear' }); $.fn.editabletypes.datetime = DateTime; }(window.jQuery)); /** Bootstrap datetimefield input - datetime input for inline mode. Shows normal <input type="text"> and binds popup datetimepicker. Automatically shown in inline mode. @class datetimefield @extends datetime **/ (function ($) { "use strict"; var DateTimeField = function (options) { this.init('datetimefield', options, DateTimeField.defaults); this.initPicker(options, DateTimeField.defaults); }; $.fn.editableutils.inherit(DateTimeField, $.fn.editabletypes.datetime); $.extend(DateTimeField.prototype, { render: function () { this.$input = this.$tpl.find('input'); this.setClass(); this.setAttr('placeholder'); this.$tpl.datetimepicker(this.options.datetimepicker); //need to disable original event handlers this.$input.off('focus keydown'); //update value of datepicker this.$input.keyup($.proxy(function(){ this.$tpl.removeData('date'); this.$tpl.datetimepicker('update'); }, this)); }, value2input: function(value) { this.$input.val(this.value2html(value)); this.$tpl.datetimepicker('update'); }, input2value: function() { return this.html2value(this.$input.val()); }, activate: function() { $.fn.editabletypes.text.prototype.activate.call(this); }, autosubmit: function() { //reset autosubmit to empty } }); DateTimeField.defaults = $.extend({}, $.fn.editabletypes.datetime.defaults, { /** @property tpl **/ tpl:'<div class="input-append date"><input type="text"/><span class="add-on"><i class="icon-th"></i></span></div>', /** @property inputclass @default 'input-medium' **/ inputclass: 'input-medium', /* datetimepicker config */ datetimepicker:{ todayHighlight: false, autoclose: true } }); $.fn.editabletypes.datetimefield = DateTimeField; }(window.jQuery));
src/svg-icons/maps/local-airport.js
owencm/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsLocalAirport = (props) => ( <SvgIcon {...props}> <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> ); MapsLocalAirport = pure(MapsLocalAirport); MapsLocalAirport.displayName = 'MapsLocalAirport'; MapsLocalAirport.muiName = 'SvgIcon'; export default MapsLocalAirport;
ajax/libs/react-bootstrap/0.19.0/react-bootstrap.js
perfect-pixell/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["ReactBootstrap"] = factory(require("react")); else root["ReactBootstrap"] = factory(root["React"]); })(this, function(__WEBPACK_EXTERNAL_MODULE_49__) { 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"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var Accordion = _interopRequire(__webpack_require__(1)); var Affix = _interopRequire(__webpack_require__(2)); var AffixMixin = _interopRequire(__webpack_require__(3)); var Alert = _interopRequire(__webpack_require__(4)); var BootstrapMixin = _interopRequire(__webpack_require__(5)); var Badge = _interopRequire(__webpack_require__(6)); var Button = _interopRequire(__webpack_require__(7)); var ButtonGroup = _interopRequire(__webpack_require__(8)); var ButtonToolbar = _interopRequire(__webpack_require__(9)); var Carousel = _interopRequire(__webpack_require__(10)); var CarouselItem = _interopRequire(__webpack_require__(11)); var Col = _interopRequire(__webpack_require__(12)); var CollapsableMixin = _interopRequire(__webpack_require__(13)); var DropdownButton = _interopRequire(__webpack_require__(14)); var DropdownMenu = _interopRequire(__webpack_require__(15)); var DropdownStateMixin = _interopRequire(__webpack_require__(16)); var FadeMixin = _interopRequire(__webpack_require__(17)); var Glyphicon = _interopRequire(__webpack_require__(18)); var Grid = _interopRequire(__webpack_require__(19)); var Input = _interopRequire(__webpack_require__(20)); var Interpolate = _interopRequire(__webpack_require__(21)); var Jumbotron = _interopRequire(__webpack_require__(22)); var Label = _interopRequire(__webpack_require__(23)); var ListGroup = _interopRequire(__webpack_require__(24)); var ListGroupItem = _interopRequire(__webpack_require__(25)); var MenuItem = _interopRequire(__webpack_require__(26)); var Modal = _interopRequire(__webpack_require__(27)); var Nav = _interopRequire(__webpack_require__(28)); var Navbar = _interopRequire(__webpack_require__(29)); var NavItem = _interopRequire(__webpack_require__(30)); var ModalTrigger = _interopRequire(__webpack_require__(31)); var OverlayTrigger = _interopRequire(__webpack_require__(32)); var OverlayMixin = _interopRequire(__webpack_require__(33)); var PageHeader = _interopRequire(__webpack_require__(34)); var Panel = _interopRequire(__webpack_require__(35)); var PanelGroup = _interopRequire(__webpack_require__(36)); var PageItem = _interopRequire(__webpack_require__(37)); var Pager = _interopRequire(__webpack_require__(38)); var Popover = _interopRequire(__webpack_require__(39)); var ProgressBar = _interopRequire(__webpack_require__(40)); var Row = _interopRequire(__webpack_require__(41)); var SplitButton = _interopRequire(__webpack_require__(42)); var SubNav = _interopRequire(__webpack_require__(43)); var TabbedArea = _interopRequire(__webpack_require__(44)); var Table = _interopRequire(__webpack_require__(45)); var TabPane = _interopRequire(__webpack_require__(46)); var Tooltip = _interopRequire(__webpack_require__(47)); var Well = _interopRequire(__webpack_require__(48)); module.exports = { Accordion: Accordion, Affix: Affix, AffixMixin: AffixMixin, Alert: Alert, BootstrapMixin: BootstrapMixin, Badge: Badge, Button: Button, ButtonGroup: ButtonGroup, ButtonToolbar: ButtonToolbar, Carousel: Carousel, CarouselItem: CarouselItem, Col: Col, CollapsableMixin: CollapsableMixin, DropdownButton: DropdownButton, DropdownMenu: DropdownMenu, DropdownStateMixin: DropdownStateMixin, FadeMixin: FadeMixin, Glyphicon: Glyphicon, Grid: Grid, Input: Input, Interpolate: Interpolate, Jumbotron: Jumbotron, Label: Label, ListGroup: ListGroup, ListGroupItem: ListGroupItem, MenuItem: MenuItem, Modal: Modal, Nav: Nav, Navbar: Navbar, NavItem: NavItem, ModalTrigger: ModalTrigger, OverlayTrigger: OverlayTrigger, OverlayMixin: OverlayMixin, PageHeader: PageHeader, Panel: Panel, PanelGroup: PanelGroup, PageItem: PageItem, Pager: Pager, Popover: Popover, ProgressBar: ProgressBar, Row: Row, SplitButton: SplitButton, SubNav: SubNav, TabbedArea: TabbedArea, Table: Table, TabPane: TabPane, Tooltip: Tooltip, Well: Well }; /***/ }, /* 1 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var PanelGroup = _interopRequire(__webpack_require__(36)); var Accordion = React.createClass({ displayName: "Accordion", render: function render() { return React.createElement( PanelGroup, _extends({}, this.props, { accordion: true }), this.props.children ); } }); module.exports = Accordion; /***/ }, /* 2 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var AffixMixin = _interopRequire(__webpack_require__(3)); var domUtils = _interopRequire(__webpack_require__(50)); var Affix = React.createClass({ displayName: "Affix", statics: { domUtils: domUtils }, mixins: [AffixMixin], render: function render() { var holderStyle = { top: this.state.affixPositionTop }; return React.createElement( "div", _extends({}, this.props, { className: classSet(this.props.className, this.state.affixClass), style: holderStyle }), this.props.children ); } }); module.exports = Affix; /***/ }, /* 3 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var React = _interopRequire(__webpack_require__(49)); var domUtils = _interopRequire(__webpack_require__(50)); var EventListener = _interopRequire(__webpack_require__(51)); var AffixMixin = { propTypes: { offset: React.PropTypes.number, offsetTop: React.PropTypes.number, offsetBottom: React.PropTypes.number }, getInitialState: function getInitialState() { return { affixClass: "affix-top" }; }, getPinnedOffset: function getPinnedOffset(DOMNode) { if (this.pinnedOffset) { return this.pinnedOffset; } DOMNode.className = DOMNode.className.replace(/affix-top|affix-bottom|affix/, ""); DOMNode.className += DOMNode.className.length ? " affix" : "affix"; this.pinnedOffset = domUtils.getOffset(DOMNode).top - window.pageYOffset; return this.pinnedOffset; }, checkPosition: function checkPosition() { var DOMNode = undefined, scrollHeight = undefined, scrollTop = undefined, position = undefined, offsetTop = undefined, offsetBottom = undefined, affix = undefined, affixType = undefined, affixPositionTop = undefined; // TODO: or not visible if (!this.isMounted()) { return; } DOMNode = React.findDOMNode(this); scrollHeight = document.documentElement.offsetHeight; scrollTop = window.pageYOffset; position = domUtils.getOffset(DOMNode); if (this.affixed === "top") { position.top += scrollTop; } offsetTop = this.props.offsetTop != null ? this.props.offsetTop : this.props.offset; offsetBottom = this.props.offsetBottom != null ? this.props.offsetBottom : this.props.offset; if (offsetTop == null && offsetBottom == null) { return; } if (offsetTop == null) { offsetTop = 0; } if (offsetBottom == null) { offsetBottom = 0; } if (this.unpin != null && scrollTop + this.unpin <= position.top) { affix = false; } else if (offsetBottom != null && position.top + DOMNode.offsetHeight >= scrollHeight - offsetBottom) { affix = "bottom"; } else if (offsetTop != null && scrollTop <= offsetTop) { affix = "top"; } else { affix = false; } if (this.affixed === affix) { return; } if (this.unpin != null) { DOMNode.style.top = ""; } affixType = "affix" + (affix ? "-" + affix : ""); this.affixed = affix; this.unpin = affix === "bottom" ? this.getPinnedOffset(DOMNode) : null; if (affix === "bottom") { DOMNode.className = DOMNode.className.replace(/affix-top|affix-bottom|affix/, "affix-bottom"); affixPositionTop = scrollHeight - offsetBottom - DOMNode.offsetHeight - domUtils.getOffset(DOMNode).top; } this.setState({ affixClass: affixType, affixPositionTop: affixPositionTop }); }, checkPositionWithEventLoop: function checkPositionWithEventLoop() { setTimeout(this.checkPosition, 0); }, componentDidMount: function componentDidMount() { this._onWindowScrollListener = EventListener.listen(window, "scroll", this.checkPosition); this._onDocumentClickListener = EventListener.listen(document, "click", this.checkPositionWithEventLoop); }, componentWillUnmount: function componentWillUnmount() { if (this._onWindowScrollListener) { this._onWindowScrollListener.remove(); } if (this._onDocumentClickListener) { this._onDocumentClickListener.remove(); } }, componentDidUpdate: function componentDidUpdate(prevProps, prevState) { if (prevState.affixClass === this.state.affixClass) { this.checkPositionWithEventLoop(); } } }; module.exports = AffixMixin; /***/ }, /* 4 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var BootstrapMixin = _interopRequire(__webpack_require__(5)); var Alert = React.createClass({ displayName: "Alert", mixins: [BootstrapMixin], propTypes: { onDismiss: React.PropTypes.func, dismissAfter: React.PropTypes.number }, getDefaultProps: function getDefaultProps() { return { bsClass: "alert", bsStyle: "info" }; }, renderDismissButton: function renderDismissButton() { return React.createElement( "button", { type: "button", className: "close", onClick: this.props.onDismiss, "aria-hidden": "true" }, "×" ); }, render: function render() { var classes = this.getBsClassSet(); var isDismissable = !!this.props.onDismiss; classes["alert-dismissable"] = isDismissable; return React.createElement( "div", _extends({}, this.props, { className: classSet(this.props.className, classes) }), isDismissable ? this.renderDismissButton() : null, this.props.children ); }, componentDidMount: function componentDidMount() { if (this.props.dismissAfter && this.props.onDismiss) { this.dismissTimer = setTimeout(this.props.onDismiss, this.props.dismissAfter); } }, componentWillUnmount: function componentWillUnmount() { clearTimeout(this.dismissTimer); } }); module.exports = Alert; /***/ }, /* 5 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var React = _interopRequire(__webpack_require__(49)); var constants = _interopRequire(__webpack_require__(52)); var BootstrapMixin = { propTypes: { bsClass: React.PropTypes.oneOf(Object.keys(constants.CLASSES)), bsStyle: React.PropTypes.oneOf(Object.keys(constants.STYLES)), bsSize: React.PropTypes.oneOf(Object.keys(constants.SIZES)) }, getBsClassSet: function getBsClassSet() { var classes = {}; var bsClass = this.props.bsClass && constants.CLASSES[this.props.bsClass]; if (bsClass) { classes[bsClass] = true; var prefix = bsClass + "-"; var bsSize = this.props.bsSize && constants.SIZES[this.props.bsSize]; if (bsSize) { classes[prefix + bsSize] = true; } var bsStyle = this.props.bsStyle && constants.STYLES[this.props.bsStyle]; if (this.props.bsStyle) { classes[prefix + bsStyle] = true; } } return classes; }, prefixClass: function prefixClass(subClass) { return constants.CLASSES[this.props.bsClass] + "-" + subClass; } }; module.exports = BootstrapMixin; /***/ }, /* 6 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var ValidComponentChildren = _interopRequire(__webpack_require__(53)); var classSet = _interopRequire(__webpack_require__(58)); var Badge = React.createClass({ displayName: "Badge", propTypes: { pullRight: React.PropTypes.bool }, hasContent: function hasContent() { return ValidComponentChildren.hasValidComponent(this.props.children) || typeof this.props.children === "string" || typeof this.props.children === "number"; }, render: function render() { var classes = { "pull-right": this.props.pullRight, badge: this.hasContent() }; return React.createElement( "span", _extends({}, this.props, { className: classSet(this.props.className, classes) }), this.props.children ); } }); module.exports = Badge; /***/ }, /* 7 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var BootstrapMixin = _interopRequire(__webpack_require__(5)); var Button = React.createClass({ displayName: "Button", mixins: [BootstrapMixin], propTypes: { active: React.PropTypes.bool, disabled: React.PropTypes.bool, block: React.PropTypes.bool, navItem: React.PropTypes.bool, navDropdown: React.PropTypes.bool, componentClass: React.PropTypes.node, href: React.PropTypes.string, target: React.PropTypes.string }, getDefaultProps: function getDefaultProps() { return { bsClass: "button", bsStyle: "default", type: "button" }; }, render: function render() { var classes = this.props.navDropdown ? {} : this.getBsClassSet(); var renderFuncName = undefined; classes = _extends({ active: this.props.active, "btn-block": this.props.block }, classes); if (this.props.navItem) { return this.renderNavItem(classes); } renderFuncName = this.props.href || this.props.target || this.props.navDropdown ? "renderAnchor" : "renderButton"; return this[renderFuncName](classes); }, renderAnchor: function renderAnchor(classes) { var Component = this.props.componentClass || "a"; var href = this.props.href || "#"; classes.disabled = this.props.disabled; return React.createElement( Component, _extends({}, this.props, { href: href, className: classSet(this.props.className, classes), role: "button" }), this.props.children ); }, renderButton: function renderButton(classes) { var Component = this.props.componentClass || "button"; return React.createElement( Component, _extends({}, this.props, { className: classSet(this.props.className, classes) }), this.props.children ); }, renderNavItem: function renderNavItem(classes) { var liClasses = { active: this.props.active }; return React.createElement( "li", { className: classSet(liClasses) }, this.renderAnchor(classes) ); } }); module.exports = Button; /***/ }, /* 8 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var BootstrapMixin = _interopRequire(__webpack_require__(5)); var ButtonGroup = React.createClass({ displayName: "ButtonGroup", mixins: [BootstrapMixin], propTypes: { vertical: React.PropTypes.bool, justified: React.PropTypes.bool }, getDefaultProps: function getDefaultProps() { return { bsClass: "button-group" }; }, render: function render() { var classes = this.getBsClassSet(); classes["btn-group"] = !this.props.vertical; classes["btn-group-vertical"] = this.props.vertical; classes["btn-group-justified"] = this.props.justified; return React.createElement( "div", _extends({}, this.props, { className: classSet(this.props.className, classes) }), this.props.children ); } }); module.exports = ButtonGroup; /***/ }, /* 9 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var BootstrapMixin = _interopRequire(__webpack_require__(5)); var ButtonToolbar = React.createClass({ displayName: "ButtonToolbar", mixins: [BootstrapMixin], getDefaultProps: function getDefaultProps() { return { bsClass: "button-toolbar" }; }, render: function render() { var classes = this.getBsClassSet(); return React.createElement( "div", _extends({}, this.props, { role: "toolbar", className: classSet(this.props.className, classes) }), this.props.children ); } }); module.exports = ButtonToolbar; /***/ }, /* 10 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(49); var React = _interopRequire(_react); var cloneElement = _react.cloneElement; var classSet = _interopRequire(__webpack_require__(58)); var BootstrapMixin = _interopRequire(__webpack_require__(5)); var ValidComponentChildren = _interopRequire(__webpack_require__(53)); var Carousel = React.createClass({ displayName: "Carousel", mixins: [BootstrapMixin], propTypes: { slide: React.PropTypes.bool, indicators: React.PropTypes.bool, controls: React.PropTypes.bool, pauseOnHover: React.PropTypes.bool, wrap: React.PropTypes.bool, onSelect: React.PropTypes.func, onSlideEnd: React.PropTypes.func, activeIndex: React.PropTypes.number, defaultActiveIndex: React.PropTypes.number, direction: React.PropTypes.oneOf(["prev", "next"]) }, getDefaultProps: function getDefaultProps() { return { slide: true, interval: 5000, pauseOnHover: true, wrap: true, indicators: true, controls: true }; }, getInitialState: function getInitialState() { return { activeIndex: this.props.defaultActiveIndex == null ? 0 : this.props.defaultActiveIndex, previousActiveIndex: null, direction: null }; }, getDirection: function getDirection(prevIndex, index) { if (prevIndex === index) { return null; } return prevIndex > index ? "prev" : "next"; }, componentWillReceiveProps: function componentWillReceiveProps(nextProps) { var activeIndex = this.getActiveIndex(); if (nextProps.activeIndex != null && nextProps.activeIndex !== activeIndex) { clearTimeout(this.timeout); this.setState({ previousActiveIndex: activeIndex, direction: nextProps.direction != null ? nextProps.direction : this.getDirection(activeIndex, nextProps.activeIndex) }); } }, componentDidMount: function componentDidMount() { this.waitForNext(); }, componentWillUnmount: function componentWillUnmount() { clearTimeout(this.timeout); }, next: function next(e) { if (e) { e.preventDefault(); } var index = this.getActiveIndex() + 1; var count = ValidComponentChildren.numberOf(this.props.children); if (index > count - 1) { if (!this.props.wrap) { return; } index = 0; } this.handleSelect(index, "next"); }, prev: function prev(e) { if (e) { e.preventDefault(); } var index = this.getActiveIndex() - 1; if (index < 0) { if (!this.props.wrap) { return; } index = ValidComponentChildren.numberOf(this.props.children) - 1; } this.handleSelect(index, "prev"); }, pause: function pause() { this.isPaused = true; clearTimeout(this.timeout); }, play: function play() { this.isPaused = false; this.waitForNext(); }, waitForNext: function waitForNext() { if (!this.isPaused && this.props.slide && this.props.interval && this.props.activeIndex == null) { this.timeout = setTimeout(this.next, this.props.interval); } }, handleMouseOver: function handleMouseOver() { if (this.props.pauseOnHover) { this.pause(); } }, handleMouseOut: function handleMouseOut() { if (this.isPaused) { this.play(); } }, render: function render() { var classes = { carousel: true, slide: this.props.slide }; return React.createElement( "div", _extends({}, this.props, { className: classSet(this.props.className, classes), onMouseOver: this.handleMouseOver, onMouseOut: this.handleMouseOut }), this.props.indicators ? this.renderIndicators() : null, React.createElement( "div", { className: "carousel-inner", ref: "inner" }, ValidComponentChildren.map(this.props.children, this.renderItem) ), this.props.controls ? this.renderControls() : null ); }, renderPrev: function renderPrev() { return React.createElement( "a", { className: "left carousel-control", href: "#prev", key: 0, onClick: this.prev }, React.createElement("span", { className: "glyphicon glyphicon-chevron-left" }) ); }, renderNext: function renderNext() { return React.createElement( "a", { className: "right carousel-control", href: "#next", key: 1, onClick: this.next }, React.createElement("span", { className: "glyphicon glyphicon-chevron-right" }) ); }, renderControls: function renderControls() { if (this.props.wrap) { var activeIndex = this.getActiveIndex(); var count = ValidComponentChildren.numberOf(this.props.children); return [activeIndex !== 0 ? this.renderPrev() : null, activeIndex !== count - 1 ? this.renderNext() : null]; } return [this.renderPrev(), this.renderNext()]; }, renderIndicator: function renderIndicator(child, index) { var className = index === this.getActiveIndex() ? "active" : null; return React.createElement("li", { key: index, className: className, onClick: this.handleSelect.bind(this, index, null) }); }, renderIndicators: function renderIndicators() { var indicators = []; ValidComponentChildren.forEach(this.props.children, function (child, index) { indicators.push(this.renderIndicator(child, index), // Force whitespace between indicator elements, bootstrap // requires this for correct spacing of elements. " "); }, this); return React.createElement( "ol", { className: "carousel-indicators" }, indicators ); }, getActiveIndex: function getActiveIndex() { return this.props.activeIndex != null ? this.props.activeIndex : this.state.activeIndex; }, handleItemAnimateOutEnd: function handleItemAnimateOutEnd() { this.setState({ previousActiveIndex: null, direction: null }, function () { this.waitForNext(); if (this.props.onSlideEnd) { this.props.onSlideEnd(); } }); }, renderItem: function renderItem(child, index) { var activeIndex = this.getActiveIndex(); var isActive = index === activeIndex; var isPreviousActive = this.state.previousActiveIndex != null && this.state.previousActiveIndex === index && this.props.slide; return cloneElement(child, { active: isActive, ref: child.ref, key: child.key ? child.key : index, index: index, animateOut: isPreviousActive, animateIn: isActive && this.state.previousActiveIndex != null && this.props.slide, direction: this.state.direction, onAnimateOutEnd: isPreviousActive ? this.handleItemAnimateOutEnd : null }); }, handleSelect: function handleSelect(index, direction) { clearTimeout(this.timeout); var previousActiveIndex = this.getActiveIndex(); direction = direction || this.getDirection(previousActiveIndex, index); if (this.props.onSelect) { this.props.onSelect(index, direction); } if (this.props.activeIndex == null && index !== previousActiveIndex) { if (this.state.previousActiveIndex != null) { // If currently animating don't activate the new index. // TODO: look into queuing this canceled call and // animating after the current animation has ended. return; } this.setState({ activeIndex: index, previousActiveIndex: previousActiveIndex, direction: direction }); } } }); module.exports = Carousel; /***/ }, /* 11 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var TransitionEvents = _interopRequire(__webpack_require__(54)); var CarouselItem = React.createClass({ displayName: "CarouselItem", propTypes: { direction: React.PropTypes.oneOf(["prev", "next"]), onAnimateOutEnd: React.PropTypes.func, active: React.PropTypes.bool, caption: React.PropTypes.node }, getInitialState: function getInitialState() { return { direction: null }; }, getDefaultProps: function getDefaultProps() { return { animation: true }; }, handleAnimateOutEnd: function handleAnimateOutEnd() { if (this.props.onAnimateOutEnd && this.isMounted()) { this.props.onAnimateOutEnd(this.props.index); } }, componentWillReceiveProps: function componentWillReceiveProps(nextProps) { if (this.props.active !== nextProps.active) { this.setState({ direction: null }); } }, componentDidUpdate: function componentDidUpdate(prevProps) { if (!this.props.active && prevProps.active) { TransitionEvents.addEndEventListener(React.findDOMNode(this), this.handleAnimateOutEnd); } if (this.props.active !== prevProps.active) { setTimeout(this.startAnimation, 20); } }, startAnimation: function startAnimation() { if (!this.isMounted()) { return; } this.setState({ direction: this.props.direction === "prev" ? "right" : "left" }); }, render: function render() { var classes = { item: true, active: this.props.active && !this.props.animateIn || this.props.animateOut, next: this.props.active && this.props.animateIn && this.props.direction === "next", prev: this.props.active && this.props.animateIn && this.props.direction === "prev" }; if (this.state.direction && (this.props.animateIn || this.props.animateOut)) { classes[this.state.direction] = true; } return React.createElement( "div", _extends({}, this.props, { className: classSet(this.props.className, classes) }), this.props.children, this.props.caption ? this.renderCaption() : null ); }, renderCaption: function renderCaption() { return React.createElement( "div", { className: "carousel-caption" }, this.props.caption ); } }); module.exports = CarouselItem; /***/ }, /* 12 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var constants = _interopRequire(__webpack_require__(52)); var Col = React.createClass({ displayName: "Col", propTypes: { xs: React.PropTypes.number, sm: React.PropTypes.number, md: React.PropTypes.number, lg: React.PropTypes.number, xsOffset: React.PropTypes.number, smOffset: React.PropTypes.number, mdOffset: React.PropTypes.number, lgOffset: React.PropTypes.number, xsPush: React.PropTypes.number, smPush: React.PropTypes.number, mdPush: React.PropTypes.number, lgPush: React.PropTypes.number, xsPull: React.PropTypes.number, smPull: React.PropTypes.number, mdPull: React.PropTypes.number, lgPull: React.PropTypes.number, componentClass: React.PropTypes.node.isRequired }, getDefaultProps: function getDefaultProps() { return { componentClass: "div" }; }, render: function render() { var ComponentClass = this.props.componentClass; var classes = {}; Object.keys(constants.SIZES).forEach(function (key) { var size = constants.SIZES[key]; var prop = size; var classPart = size + "-"; if (this.props[prop]) { classes["col-" + classPart + this.props[prop]] = true; } prop = size + "Offset"; classPart = size + "-offset-"; if (this.props[prop] >= 0) { classes["col-" + classPart + this.props[prop]] = true; } prop = size + "Push"; classPart = size + "-push-"; if (this.props[prop] >= 0) { classes["col-" + classPart + this.props[prop]] = true; } prop = size + "Pull"; classPart = size + "-pull-"; if (this.props[prop] >= 0) { classes["col-" + classPart + this.props[prop]] = true; } }, this); return React.createElement( ComponentClass, _extends({}, this.props, { className: classSet(this.props.className, classes) }), this.props.children ); } }); module.exports = Col; /***/ }, /* 13 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var React = _interopRequire(__webpack_require__(49)); var TransitionEvents = _interopRequire(__webpack_require__(59)); var CollapsableMixin = { propTypes: { defaultExpanded: React.PropTypes.bool, expanded: React.PropTypes.bool }, getInitialState: function getInitialState() { var defaultExpanded = this.props.defaultExpanded != null ? this.props.defaultExpanded : this.props.expanded != null ? this.props.expanded : false; return { expanded: defaultExpanded, collapsing: false }; }, componentWillUpdate: function componentWillUpdate(nextProps, nextState) { var willExpanded = nextProps.expanded != null ? nextProps.expanded : nextState.expanded; if (willExpanded === this.isExpanded()) { return; } // if the expanded state is being toggled, ensure node has a dimension value // this is needed for the animation to work and needs to be set before // the collapsing class is applied (after collapsing is applied the in class // is removed and the node's dimension will be wrong) var node = this.getCollapsableDOMNode(); var dimension = this.dimension(); var value = "0"; if (!willExpanded) { value = this.getCollapsableDimensionValue(); } node.style[dimension] = value + "px"; this._afterWillUpdate(); }, componentDidUpdate: function componentDidUpdate(prevProps, prevState) { // check if expanded is being toggled; if so, set collapsing this._checkToggleCollapsing(prevProps, prevState); // check if collapsing was turned on; if so, start animation this._checkStartAnimation(); }, // helps enable test stubs _afterWillUpdate: function _afterWillUpdate() {}, _checkStartAnimation: function _checkStartAnimation() { if (!this.state.collapsing) { return; } var node = this.getCollapsableDOMNode(); var dimension = this.dimension(); var value = this.getCollapsableDimensionValue(); // setting the dimension here starts the transition animation var result = undefined; if (this.isExpanded()) { result = value + "px"; } else { result = "0px"; } node.style[dimension] = result; }, _checkToggleCollapsing: function _checkToggleCollapsing(prevProps, prevState) { var wasExpanded = prevProps.expanded != null ? prevProps.expanded : prevState.expanded; var isExpanded = this.isExpanded(); if (wasExpanded !== isExpanded) { if (wasExpanded) { this._handleCollapse(); } else { this._handleExpand(); } } }, _handleExpand: function _handleExpand() { var _this = this; var node = this.getCollapsableDOMNode(); var dimension = this.dimension(); var complete = function () { _this._removeEndEventListener(node, complete); // remove dimension value - this ensures the collapsable item can grow // in dimension after initial display (such as an image loading) node.style[dimension] = ""; _this.setState({ collapsing: false }); }; this._addEndEventListener(node, complete); this.setState({ collapsing: true }); }, _handleCollapse: function _handleCollapse() { var _this = this; var node = this.getCollapsableDOMNode(); var complete = function () { _this._removeEndEventListener(node, complete); _this.setState({ collapsing: false }); }; this._addEndEventListener(node, complete); this.setState({ collapsing: true }); }, // helps enable test stubs _addEndEventListener: function _addEndEventListener(node, complete) { TransitionEvents.addEndEventListener(node, complete); }, // helps enable test stubs _removeEndEventListener: function _removeEndEventListener(node, complete) { TransitionEvents.removeEndEventListener(node, complete); }, dimension: function dimension() { return typeof this.getCollapsableDimension === "function" ? this.getCollapsableDimension() : "height"; }, isExpanded: function isExpanded() { return this.props.expanded != null ? this.props.expanded : this.state.expanded; }, getCollapsableClassSet: function getCollapsableClassSet(className) { var classes = {}; if (typeof className === "string") { className.split(" ").forEach(function (subClasses) { if (subClasses) { classes[subClasses] = true; } }); } classes.collapsing = this.state.collapsing; classes.collapse = !this.state.collapsing; classes["in"] = this.isExpanded() && !this.state.collapsing; return classes; } }; module.exports = CollapsableMixin; /***/ }, /* 14 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(49); var React = _interopRequire(_react); var cloneElement = _react.cloneElement; var classSet = _interopRequire(__webpack_require__(58)); var createChainedFunction = _interopRequire(__webpack_require__(55)); var BootstrapMixin = _interopRequire(__webpack_require__(5)); var DropdownStateMixin = _interopRequire(__webpack_require__(16)); var Button = _interopRequire(__webpack_require__(7)); var ButtonGroup = _interopRequire(__webpack_require__(8)); var DropdownMenu = _interopRequire(__webpack_require__(15)); var ValidComponentChildren = _interopRequire(__webpack_require__(53)); var DropdownButton = React.createClass({ displayName: "DropdownButton", mixins: [BootstrapMixin, DropdownStateMixin], propTypes: { pullRight: React.PropTypes.bool, dropup: React.PropTypes.bool, title: React.PropTypes.node, href: React.PropTypes.string, onClick: React.PropTypes.func, onSelect: React.PropTypes.func, navItem: React.PropTypes.bool, noCaret: React.PropTypes.bool }, render: function render() { var renderMethod = this.props.navItem ? "renderNavItem" : "renderButtonGroup"; var caret = this.props.noCaret ? null : React.createElement("span", { className: "caret" }); return this[renderMethod]([React.createElement( Button, _extends({}, this.props, { ref: "dropdownButton", className: "dropdown-toggle", onClick: this.handleDropdownClick, key: 0, navDropdown: this.props.navItem, navItem: null, title: null, pullRight: null, dropup: null }), this.props.title, " ", caret ), React.createElement( DropdownMenu, { ref: "menu", "aria-labelledby": this.props.id, pullRight: this.props.pullRight, key: 1 }, ValidComponentChildren.map(this.props.children, this.renderMenuItem) )]); }, renderButtonGroup: function renderButtonGroup(children) { var groupClasses = { open: this.state.open, dropup: this.props.dropup }; return React.createElement( ButtonGroup, { bsSize: this.props.bsSize, className: classSet(this.props.className, groupClasses) }, children ); }, renderNavItem: function renderNavItem(children) { var classes = { dropdown: true, open: this.state.open, dropup: this.props.dropup }; return React.createElement( "li", { className: classSet(this.props.className, classes) }, children ); }, renderMenuItem: function renderMenuItem(child, index) { // Only handle the option selection if an onSelect prop has been set on the // component or it's child, this allows a user not to pass an onSelect // handler and have the browser preform the default action. var handleOptionSelect = this.props.onSelect || child.props.onSelect ? this.handleOptionSelect : null; return cloneElement(child, { // Capture onSelect events onSelect: createChainedFunction(child.props.onSelect, handleOptionSelect), key: child.key ? child.key : index }); }, handleDropdownClick: function handleDropdownClick(e) { e.preventDefault(); this.setDropdownState(!this.state.open); }, handleOptionSelect: function handleOptionSelect(key) { if (this.props.onSelect) { this.props.onSelect(key); } this.setDropdownState(false); } }); module.exports = DropdownButton; /***/ }, /* 15 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(49); var React = _interopRequire(_react); var cloneElement = _react.cloneElement; var classSet = _interopRequire(__webpack_require__(58)); var createChainedFunction = _interopRequire(__webpack_require__(55)); var ValidComponentChildren = _interopRequire(__webpack_require__(53)); var DropdownMenu = React.createClass({ displayName: "DropdownMenu", propTypes: { pullRight: React.PropTypes.bool, onSelect: React.PropTypes.func }, render: function render() { var classes = { "dropdown-menu": true, "dropdown-menu-right": this.props.pullRight }; return React.createElement( "ul", _extends({}, this.props, { className: classSet(this.props.className, classes), role: "menu" }), ValidComponentChildren.map(this.props.children, this.renderMenuItem) ); }, renderMenuItem: function renderMenuItem(child, index) { return cloneElement(child, { // Capture onSelect events onSelect: createChainedFunction(child.props.onSelect, this.props.onSelect), // Force special props to be transferred key: child.key ? child.key : index }); } }); module.exports = DropdownMenu; /***/ }, /* 16 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var React = _interopRequire(__webpack_require__(49)); var EventListener = _interopRequire(__webpack_require__(51)); /** * Checks whether a node is within * a root nodes tree * * @param {DOMElement} node * @param {DOMElement} root * @returns {boolean} */ function isNodeInRoot(node, root) { while (node) { if (node === root) { return true; } node = node.parentNode; } return false; } var DropdownStateMixin = { getInitialState: function getInitialState() { return { open: false }; }, setDropdownState: function setDropdownState(newState, onStateChangeComplete) { if (newState) { this.bindRootCloseHandlers(); } else { this.unbindRootCloseHandlers(); } this.setState({ open: newState }, onStateChangeComplete); }, handleDocumentKeyUp: function handleDocumentKeyUp(e) { if (e.keyCode === 27) { this.setDropdownState(false); } }, handleDocumentClick: function handleDocumentClick(e) { // If the click originated from within this component // don't do anything. if (isNodeInRoot(e.target, React.findDOMNode(this))) { return; } this.setDropdownState(false); }, bindRootCloseHandlers: function bindRootCloseHandlers() { this._onDocumentClickListener = EventListener.listen(document, "click", this.handleDocumentClick); this._onDocumentKeyupListener = EventListener.listen(document, "keyup", this.handleDocumentKeyUp); }, unbindRootCloseHandlers: function unbindRootCloseHandlers() { if (this._onDocumentClickListener) { this._onDocumentClickListener.remove(); } if (this._onDocumentKeyupListener) { this._onDocumentKeyupListener.remove(); } }, componentWillUnmount: function componentWillUnmount() { this.unbindRootCloseHandlers(); } }; module.exports = DropdownStateMixin; /***/ }, /* 17 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var React = _interopRequire(__webpack_require__(49)); // TODO: listen for onTransitionEnd to remove el function getElementsAndSelf(root, classes) { var els = root.querySelectorAll("." + classes.join(".")); els = [].map.call(els, function (e) { return e; }); for (var i = 0; i < classes.length; i++) { if (!root.className.match(new RegExp("\\b" + classes[i] + "\\b"))) { return els; } } els.unshift(root); return els; } module.exports = { _fadeIn: function _fadeIn() { var els = undefined; if (this.isMounted()) { els = getElementsAndSelf(React.findDOMNode(this), ["fade"]); if (els.length) { els.forEach(function (el) { el.className += " in"; }); } } }, _fadeOut: function _fadeOut() { var els = getElementsAndSelf(this._fadeOutEl, ["fade", "in"]); if (els.length) { els.forEach(function (el) { el.className = el.className.replace(/\bin\b/, ""); }); } setTimeout(this._handleFadeOutEnd, 300); }, _handleFadeOutEnd: function _handleFadeOutEnd() { if (this._fadeOutEl && this._fadeOutEl.parentNode) { this._fadeOutEl.parentNode.removeChild(this._fadeOutEl); } }, componentDidMount: function componentDidMount() { if (document.querySelectorAll) { // Firefox needs delay for transition to be triggered setTimeout(this._fadeIn, 20); } }, componentWillUnmount: function componentWillUnmount() { var els = getElementsAndSelf(React.findDOMNode(this), ["fade"]), container = this.props.container && React.findDOMNode(this.props.container) || document.body; if (els.length) { this._fadeOutEl = document.createElement("div"); container.appendChild(this._fadeOutEl); this._fadeOutEl.appendChild(React.findDOMNode(this).cloneNode(true)); // Firefox needs delay for transition to be triggered setTimeout(this._fadeOut, 20); } } }; /***/ }, /* 18 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var BootstrapMixin = _interopRequire(__webpack_require__(5)); var constants = _interopRequire(__webpack_require__(52)); var Glyphicon = React.createClass({ displayName: "Glyphicon", mixins: [BootstrapMixin], propTypes: { glyph: React.PropTypes.oneOf(constants.GLYPHS).isRequired }, getDefaultProps: function getDefaultProps() { return { bsClass: "glyphicon" }; }, render: function render() { var classes = this.getBsClassSet(); classes["glyphicon-" + this.props.glyph] = true; return React.createElement( "span", _extends({}, this.props, { className: classSet(this.props.className, classes) }), this.props.children ); } }); module.exports = Glyphicon; /***/ }, /* 19 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var Grid = React.createClass({ displayName: "Grid", propTypes: { fluid: React.PropTypes.bool, componentClass: React.PropTypes.node.isRequired }, getDefaultProps: function getDefaultProps() { return { componentClass: "div" }; }, render: function render() { var ComponentClass = this.props.componentClass; var className = this.props.fluid ? "container-fluid" : "container"; return React.createElement( ComponentClass, _extends({}, this.props, { className: classSet(this.props.className, className) }), this.props.children ); } }); module.exports = Grid; /***/ }, /* 20 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var Button = _interopRequire(__webpack_require__(7)); var Input = React.createClass({ displayName: "Input", propTypes: { type: React.PropTypes.string, label: React.PropTypes.node, help: React.PropTypes.node, addonBefore: React.PropTypes.node, addonAfter: React.PropTypes.node, buttonBefore: React.PropTypes.node, buttonAfter: React.PropTypes.node, bsSize: React.PropTypes.oneOf(["small", "medium", "large"]), bsStyle: function bsStyle(props) { if (props.type === "submit") { // Return early if `type=submit` as the `Button` component // it transfers these props to has its own propType checks. return null; } return React.PropTypes.oneOf(["success", "warning", "error"]).apply(null, arguments); }, hasFeedback: React.PropTypes.bool, groupClassName: React.PropTypes.string, wrapperClassName: React.PropTypes.string, labelClassName: React.PropTypes.string, disabled: React.PropTypes.bool }, getInputDOMNode: function getInputDOMNode() { return React.findDOMNode(this.refs.input); }, getValue: function getValue() { if (this.props.type === "static") { return this.props.value; } else if (this.props.type) { if (this.props.type === "select" && this.props.multiple) { return this.getSelectedOptions(); } else { return this.getInputDOMNode().value; } } else { throw "Cannot use getValue without specifying input type."; } }, getChecked: function getChecked() { return this.getInputDOMNode().checked; }, getSelectedOptions: function getSelectedOptions() { var values = []; Array.prototype.forEach.call(this.getInputDOMNode().getElementsByTagName("option"), function (option) { if (option.selected) { var value = option.getAttribute("value") || option.innerHTML; values.push(value); } }); return values; }, isCheckboxOrRadio: function isCheckboxOrRadio() { return this.props.type === "radio" || this.props.type === "checkbox"; }, isFile: function isFile() { return this.props.type === "file"; }, renderInput: function renderInput() { var input = null; if (!this.props.type) { return this.props.children; } switch (this.props.type) { case "select": input = React.createElement( "select", _extends({}, this.props, { className: classSet(this.props.className, "form-control"), ref: "input", key: "input" }), this.props.children ); break; case "textarea": input = React.createElement("textarea", _extends({}, this.props, { className: classSet(this.props.className, "form-control"), ref: "input", key: "input" })); break; case "static": input = React.createElement( "p", _extends({}, this.props, { className: classSet(this.props.className, "form-control-static"), ref: "input", key: "input" }), this.props.value ); break; case "submit": input = React.createElement(Button, _extends({}, this.props, { componentClass: "input", ref: "input", key: "input" })); break; default: var className = this.isCheckboxOrRadio() || this.isFile() ? "" : "form-control"; input = React.createElement("input", _extends({}, this.props, { className: classSet(this.props.className, className), ref: "input", key: "input" })); } return input; }, renderInputGroup: function renderInputGroup(children) { var addonBefore = this.props.addonBefore ? React.createElement( "span", { className: "input-group-addon", key: "addonBefore" }, this.props.addonBefore ) : null; var addonAfter = this.props.addonAfter ? React.createElement( "span", { className: "input-group-addon", key: "addonAfter" }, this.props.addonAfter ) : null; var buttonBefore = this.props.buttonBefore ? React.createElement( "span", { className: "input-group-btn" }, this.props.buttonBefore ) : null; var buttonAfter = this.props.buttonAfter ? React.createElement( "span", { className: "input-group-btn" }, this.props.buttonAfter ) : null; var inputGroupClassName = undefined; switch (this.props.bsSize) { case "small": inputGroupClassName = "input-group-sm";break; case "large": inputGroupClassName = "input-group-lg";break; } return addonBefore || addonAfter || buttonBefore || buttonAfter ? React.createElement( "div", { className: classSet(inputGroupClassName, "input-group"), key: "input-group" }, addonBefore, buttonBefore, children, addonAfter, buttonAfter ) : children; }, renderIcon: function renderIcon() { var classes = { glyphicon: true, "form-control-feedback": true, "glyphicon-ok": this.props.bsStyle === "success", "glyphicon-warning-sign": this.props.bsStyle === "warning", "glyphicon-remove": this.props.bsStyle === "error" }; return this.props.hasFeedback ? React.createElement("span", { className: classSet(classes), key: "icon" }) : null; }, renderHelp: function renderHelp() { return this.props.help ? React.createElement( "span", { className: "help-block", key: "help" }, this.props.help ) : null; }, renderCheckboxandRadioWrapper: function renderCheckboxandRadioWrapper(children) { var classes = { checkbox: this.props.type === "checkbox", radio: this.props.type === "radio" }; return React.createElement( "div", { className: classSet(classes), key: "checkboxRadioWrapper" }, children ); }, renderWrapper: function renderWrapper(children) { return this.props.wrapperClassName ? React.createElement( "div", { className: this.props.wrapperClassName, key: "wrapper" }, children ) : children; }, renderLabel: function renderLabel(children) { var classes = { "control-label": !this.isCheckboxOrRadio() }; classes[this.props.labelClassName] = this.props.labelClassName; return this.props.label ? React.createElement( "label", { htmlFor: this.props.id, className: classSet(classes), key: "label" }, children, this.props.label ) : children; }, renderFormGroup: function renderFormGroup(children) { var classes = { "form-group": true, "has-feedback": this.props.hasFeedback, "has-success": this.props.bsStyle === "success", "has-warning": this.props.bsStyle === "warning", "has-error": this.props.bsStyle === "error" }; classes[this.props.groupClassName] = this.props.groupClassName; return React.createElement( "div", { className: classSet(classes) }, children ); }, render: function render() { if (this.isCheckboxOrRadio()) { return this.renderFormGroup(this.renderWrapper([this.renderCheckboxandRadioWrapper(this.renderLabel(this.renderInput())), this.renderHelp()])); } else { return this.renderFormGroup([this.renderLabel(), this.renderWrapper([this.renderInputGroup(this.renderInput()), this.renderIcon(), this.renderHelp()])]); } } }); module.exports = Input; /***/ }, /* 21 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; // https://www.npmjs.org/package/react-interpolate-component // TODO: Drop this in favor of es6 string interpolation var React = _interopRequire(__webpack_require__(49)); var ValidComponentChildren = _interopRequire(__webpack_require__(53)); var assign = _interopRequire(__webpack_require__(56)); var REGEXP = /\%\((.+?)\)s/; var Interpolate = React.createClass({ displayName: "Interpolate", propTypes: { format: React.PropTypes.string }, getDefaultProps: function getDefaultProps() { return { component: "span" }; }, render: function render() { var format = ValidComponentChildren.hasValidComponent(this.props.children) || typeof this.props.children === "string" ? this.props.children : this.props.format; var parent = this.props.component; var unsafe = this.props.unsafe === true; var props = assign({}, this.props); delete props.children; delete props.format; delete props.component; delete props.unsafe; if (unsafe) { var content = format.split(REGEXP).reduce(function (memo, match, index) { var html = undefined; if (index % 2 === 0) { html = match; } else { html = props[match]; delete props[match]; } if (React.isValidElement(html)) { throw new Error("cannot interpolate a React component into unsafe text"); } memo += html; return memo; }, ""); props.dangerouslySetInnerHTML = { __html: content }; return React.createElement(parent, props); } else { var kids = format.split(REGEXP).reduce(function (memo, match, index) { var child = undefined; if (index % 2 === 0) { if (match.length === 0) { return memo; } child = match; } else { child = props[match]; delete props[match]; } memo.push(child); return memo; }, []); return React.createElement(parent, props, kids); } } }); module.exports = Interpolate; /***/ }, /* 22 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var Jumbotron = React.createClass({ displayName: "Jumbotron", render: function render() { return React.createElement( "div", _extends({}, this.props, { className: classSet(this.props.className, "jumbotron") }), this.props.children ); } }); module.exports = Jumbotron; /***/ }, /* 23 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var BootstrapMixin = _interopRequire(__webpack_require__(5)); var Label = React.createClass({ displayName: "Label", mixins: [BootstrapMixin], getDefaultProps: function getDefaultProps() { return { bsClass: "label", bsStyle: "default" }; }, render: function render() { var classes = this.getBsClassSet(); return React.createElement( "span", _extends({}, this.props, { className: classSet(this.props.className, classes) }), this.props.children ); } }); module.exports = Label; /***/ }, /* 24 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _react = __webpack_require__(49); var React = _interopRequire(_react); var cloneElement = _react.cloneElement; var ValidComponentChildren = _interopRequire(__webpack_require__(53)); var ListGroup = React.createClass({ displayName: "ListGroup", propTypes: { onClick: React.PropTypes.func }, render: function render() { return React.createElement( "div", { className: "list-group" }, ValidComponentChildren.map(this.props.children, this.renderListItem) ); }, renderListItem: function renderListItem(child, index) { return cloneElement(child, { key: child.key ? child.key : index }); } }); module.exports = ListGroup; /***/ }, /* 25 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(49); var React = _interopRequire(_react); var cloneElement = _react.cloneElement; var BootstrapMixin = _interopRequire(__webpack_require__(5)); var classSet = _interopRequire(__webpack_require__(58)); var ListGroupItem = React.createClass({ displayName: "ListGroupItem", mixins: [BootstrapMixin], propTypes: { bsStyle: React.PropTypes.oneOf(["danger", "info", "success", "warning"]), active: React.PropTypes.any, disabled: React.PropTypes.any, header: React.PropTypes.node, onClick: React.PropTypes.func, eventKey: React.PropTypes.any, href: React.PropTypes.string, target: React.PropTypes.string }, getDefaultProps: function getDefaultProps() { return { bsClass: "list-group-item" }; }, render: function render() { var classes = this.getBsClassSet(); classes.active = this.props.active; classes.disabled = this.props.disabled; if (this.props.href || this.props.target || this.props.onClick) { return this.renderAnchor(classes); } else { return this.renderSpan(classes); } }, renderSpan: function renderSpan(classes) { return React.createElement( "span", _extends({}, this.props, { className: classSet(this.props.className, classes) }), this.props.header ? this.renderStructuredContent() : this.props.children ); }, renderAnchor: function renderAnchor(classes) { return React.createElement( "a", _extends({}, this.props, { className: classSet(this.props.className, classes) }), this.props.header ? this.renderStructuredContent() : this.props.children ); }, renderStructuredContent: function renderStructuredContent() { var header = undefined; if (React.isValidElement(this.props.header)) { header = cloneElement(this.props.header, { key: "header", className: classSet(this.props.header.props.className, "list-group-item-heading") }); } else { header = React.createElement( "h4", { key: "header", className: "list-group-item-heading" }, this.props.header ); } var content = React.createElement( "p", { key: "content", className: "list-group-item-text" }, this.props.children ); return [header, content]; } }); module.exports = ListGroupItem; /***/ }, /* 26 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var MenuItem = React.createClass({ displayName: "MenuItem", propTypes: { header: React.PropTypes.bool, divider: React.PropTypes.bool, href: React.PropTypes.string, title: React.PropTypes.string, target: React.PropTypes.string, onSelect: React.PropTypes.func, eventKey: React.PropTypes.any }, getDefaultProps: function getDefaultProps() { return { href: "#" }; }, handleClick: function handleClick(e) { if (this.props.onSelect) { e.preventDefault(); this.props.onSelect(this.props.eventKey, this.props.href, this.props.target); } }, renderAnchor: function renderAnchor() { return React.createElement( "a", { onClick: this.handleClick, href: this.props.href, target: this.props.target, title: this.props.title, tabIndex: "-1" }, this.props.children ); }, render: function render() { var classes = { "dropdown-header": this.props.header, divider: this.props.divider }; var children = null; if (this.props.header) { children = this.props.children; } else if (!this.props.divider) { children = this.renderAnchor(); } return React.createElement( "li", _extends({}, this.props, { role: "presentation", title: null, href: null, className: classSet(this.props.className, classes) }), children ); } }); module.exports = MenuItem; /***/ }, /* 27 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var BootstrapMixin = _interopRequire(__webpack_require__(5)); var FadeMixin = _interopRequire(__webpack_require__(17)); var EventListener = _interopRequire(__webpack_require__(51)); // TODO: // - aria-labelledby // - Add `modal-body` div if only one child passed in that doesn't already have it // - Tests var Modal = React.createClass({ displayName: "Modal", mixins: [BootstrapMixin, FadeMixin], propTypes: { title: React.PropTypes.node, backdrop: React.PropTypes.oneOf(["static", true, false]), keyboard: React.PropTypes.bool, closeButton: React.PropTypes.bool, animation: React.PropTypes.bool, onRequestHide: React.PropTypes.func.isRequired }, getDefaultProps: function getDefaultProps() { return { bsClass: "modal", backdrop: true, keyboard: true, animation: true, closeButton: true }; }, render: function render() { var modalStyle = { display: "block" }; var dialogClasses = this.getBsClassSet(); delete dialogClasses.modal; dialogClasses["modal-dialog"] = true; var classes = { modal: true, fade: this.props.animation, "in": !this.props.animation || !document.querySelectorAll }; var modal = React.createElement( "div", _extends({}, this.props, { title: null, tabIndex: "-1", role: "dialog", style: modalStyle, className: classSet(this.props.className, classes), onClick: this.props.backdrop === true ? this.handleBackdropClick : null, ref: "modal" }), React.createElement( "div", { className: classSet(dialogClasses) }, React.createElement( "div", { className: "modal-content", style: { overflow: "hidden" } }, this.props.title ? this.renderHeader() : null, this.props.children ) ) ); return this.props.backdrop ? this.renderBackdrop(modal) : modal; }, renderBackdrop: function renderBackdrop(modal) { var classes = { "modal-backdrop": true, fade: this.props.animation }; classes["in"] = !this.props.animation || !document.querySelectorAll; var onClick = this.props.backdrop === true ? this.handleBackdropClick : null; return React.createElement( "div", null, React.createElement("div", { className: classSet(classes), ref: "backdrop", onClick: onClick }), modal ); }, renderHeader: function renderHeader() { var closeButton = undefined; if (this.props.closeButton) { closeButton = React.createElement( "button", { type: "button", className: "close", "aria-hidden": "true", onClick: this.props.onRequestHide }, "×" ); } var style = this.props.bsStyle; var classes = { "modal-header": true }; classes["bg-" + style] = style; classes["text-" + style] = style; var className = classSet(classes); return React.createElement( "div", { className: className }, closeButton, this.renderTitle() ); }, renderTitle: function renderTitle() { return React.isValidElement(this.props.title) ? this.props.title : React.createElement( "h4", { className: "modal-title" }, this.props.title ); }, iosClickHack: function iosClickHack() { // IOS only allows click events to be delegated to the document on elements // it considers 'clickable' - anchors, buttons, etc. We fake a click handler on the // DOM nodes themselves. Remove if handled by React: https://github.com/facebook/react/issues/1169 React.findDOMNode(this.refs.modal).onclick = function () {}; React.findDOMNode(this.refs.backdrop).onclick = function () {}; }, componentDidMount: function componentDidMount() { this._onDocumentKeyupListener = EventListener.listen(document, "keyup", this.handleDocumentKeyUp); var container = this.props.container && React.findDOMNode(this.props.container) || document.body; container.className += container.className.length ? " modal-open" : "modal-open"; if (this.props.backdrop) { this.iosClickHack(); } }, componentDidUpdate: function componentDidUpdate(prevProps) { if (this.props.backdrop && this.props.backdrop !== prevProps.backdrop) { this.iosClickHack(); } }, componentWillUnmount: function componentWillUnmount() { this._onDocumentKeyupListener.remove(); var container = this.props.container && React.findDOMNode(this.props.container) || document.body; container.className = container.className.replace(/ ?modal-open/, ""); }, handleBackdropClick: function handleBackdropClick(e) { if (e.target !== e.currentTarget) { return; } this.props.onRequestHide(); }, handleDocumentKeyUp: function handleDocumentKeyUp(e) { if (this.props.keyboard && e.keyCode === 27) { this.props.onRequestHide(); } } }); module.exports = Modal; /***/ }, /* 28 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(49); var React = _interopRequire(_react); var cloneElement = _react.cloneElement; var BootstrapMixin = _interopRequire(__webpack_require__(5)); var CollapsableMixin = _interopRequire(__webpack_require__(13)); var classSet = _interopRequire(__webpack_require__(58)); var domUtils = _interopRequire(__webpack_require__(50)); var ValidComponentChildren = _interopRequire(__webpack_require__(53)); var createChainedFunction = _interopRequire(__webpack_require__(55)); var Nav = React.createClass({ displayName: "Nav", mixins: [BootstrapMixin, CollapsableMixin], propTypes: { bsStyle: React.PropTypes.oneOf(["tabs", "pills"]), stacked: React.PropTypes.bool, justified: React.PropTypes.bool, onSelect: React.PropTypes.func, collapsable: React.PropTypes.bool, expanded: React.PropTypes.bool, navbar: React.PropTypes.bool, eventKey: React.PropTypes.any, right: React.PropTypes.bool }, getDefaultProps: function getDefaultProps() { return { bsClass: "nav" }; }, getCollapsableDOMNode: function getCollapsableDOMNode() { return React.findDOMNode(this); }, getCollapsableDimensionValue: function getCollapsableDimensionValue() { var node = React.findDOMNode(this.refs.ul), height = node.offsetHeight, computedStyles = domUtils.getComputedStyles(node); return height + parseInt(computedStyles.marginTop, 10) + parseInt(computedStyles.marginBottom, 10); }, render: function render() { var classes = this.props.collapsable ? this.getCollapsableClassSet() : {}; classes["navbar-collapse"] = this.props.collapsable; if (this.props.navbar && !this.props.collapsable) { return this.renderUl(); } return React.createElement( "nav", _extends({}, this.props, { className: classSet(this.props.className, classes) }), this.renderUl() ); }, renderUl: function renderUl() { var classes = this.getBsClassSet(); classes["nav-stacked"] = this.props.stacked; classes["nav-justified"] = this.props.justified; classes["navbar-nav"] = this.props.navbar; classes["pull-right"] = this.props.pullRight; classes["navbar-right"] = this.props.right; return React.createElement( "ul", _extends({}, this.props, { className: classSet(this.props.className, classes), ref: "ul" }), ValidComponentChildren.map(this.props.children, this.renderNavItem) ); }, getChildActiveProp: function getChildActiveProp(child) { if (child.props.active) { return true; } if (this.props.activeKey != null) { if (child.props.eventKey === this.props.activeKey) { return true; } } if (this.props.activeHref != null) { if (child.props.href === this.props.activeHref) { return true; } } return child.props.active; }, renderNavItem: function renderNavItem(child, index) { return cloneElement(child, { active: this.getChildActiveProp(child), activeKey: this.props.activeKey, activeHref: this.props.activeHref, onSelect: createChainedFunction(child.props.onSelect, this.props.onSelect), key: child.key ? child.key : index, navItem: true }); } }); module.exports = Nav; /***/ }, /* 29 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(49); var React = _interopRequire(_react); var cloneElement = _react.cloneElement; var BootstrapMixin = _interopRequire(__webpack_require__(5)); var classSet = _interopRequire(__webpack_require__(58)); var ValidComponentChildren = _interopRequire(__webpack_require__(53)); var createChainedFunction = _interopRequire(__webpack_require__(55)); var Navbar = React.createClass({ displayName: "Navbar", mixins: [BootstrapMixin], propTypes: { fixedTop: React.PropTypes.bool, fixedBottom: React.PropTypes.bool, staticTop: React.PropTypes.bool, inverse: React.PropTypes.bool, fluid: React.PropTypes.bool, role: React.PropTypes.string, componentClass: React.PropTypes.node.isRequired, brand: React.PropTypes.node, toggleButton: React.PropTypes.node, toggleNavKey: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.number]), onToggle: React.PropTypes.func, navExpanded: React.PropTypes.bool, defaultNavExpanded: React.PropTypes.bool }, getDefaultProps: function getDefaultProps() { return { bsClass: "navbar", bsStyle: "default", role: "navigation", componentClass: "Nav" }; }, getInitialState: function getInitialState() { return { navExpanded: this.props.defaultNavExpanded }; }, shouldComponentUpdate: function shouldComponentUpdate() { // Defer any updates to this component during the `onSelect` handler. return !this._isChanging; }, handleToggle: function handleToggle() { if (this.props.onToggle) { this._isChanging = true; this.props.onToggle(); this._isChanging = false; } this.setState({ navExpanded: !this.state.navExpanded }); }, isNavExpanded: function isNavExpanded() { return this.props.navExpanded != null ? this.props.navExpanded : this.state.navExpanded; }, render: function render() { var classes = this.getBsClassSet(); var ComponentClass = this.props.componentClass; classes["navbar-fixed-top"] = this.props.fixedTop; classes["navbar-fixed-bottom"] = this.props.fixedBottom; classes["navbar-static-top"] = this.props.staticTop; classes["navbar-inverse"] = this.props.inverse; return React.createElement( ComponentClass, _extends({}, this.props, { className: classSet(this.props.className, classes) }), React.createElement( "div", { className: this.props.fluid ? "container-fluid" : "container" }, this.props.brand || this.props.toggleButton || this.props.toggleNavKey != null ? this.renderHeader() : null, ValidComponentChildren.map(this.props.children, this.renderChild) ) ); }, renderChild: function renderChild(child, index) { return cloneElement(child, { navbar: true, collapsable: this.props.toggleNavKey != null && this.props.toggleNavKey === child.props.eventKey, expanded: this.props.toggleNavKey != null && this.props.toggleNavKey === child.props.eventKey && this.isNavExpanded(), key: child.key ? child.key : index }); }, renderHeader: function renderHeader() { var brand = undefined; if (this.props.brand) { if (React.isValidElement(this.props.brand)) { brand = cloneElement(this.props.brand, { className: classSet(this.props.brand.props.className, "navbar-brand") }); } else { brand = React.createElement( "span", { className: "navbar-brand" }, this.props.brand ); } } return React.createElement( "div", { className: "navbar-header" }, brand, this.props.toggleButton || this.props.toggleNavKey != null ? this.renderToggleButton() : null ); }, renderToggleButton: function renderToggleButton() { var children = undefined; if (React.isValidElement(this.props.toggleButton)) { return cloneElement(this.props.toggleButton, { className: classSet(this.props.toggleButton.props.className, "navbar-toggle"), onClick: createChainedFunction(this.handleToggle, this.props.toggleButton.props.onClick) }); } children = this.props.toggleButton != null ? this.props.toggleButton : [React.createElement( "span", { className: "sr-only", key: 0 }, "Toggle navigation" ), React.createElement("span", { className: "icon-bar", key: 1 }), React.createElement("span", { className: "icon-bar", key: 2 }), React.createElement("span", { className: "icon-bar", key: 3 })]; return React.createElement( "button", { className: "navbar-toggle", type: "button", onClick: this.handleToggle }, children ); } }); module.exports = Navbar; /***/ }, /* 30 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _objectWithoutProperties = function (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 _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var BootstrapMixin = _interopRequire(__webpack_require__(5)); var NavItem = React.createClass({ displayName: "NavItem", mixins: [BootstrapMixin], propTypes: { onSelect: React.PropTypes.func, active: React.PropTypes.bool, disabled: React.PropTypes.bool, href: React.PropTypes.string, title: React.PropTypes.string, eventKey: React.PropTypes.any, target: React.PropTypes.string }, getDefaultProps: function getDefaultProps() { return { href: "#" }; }, render: function render() { var _props = this.props; var disabled = _props.disabled; var active = _props.active; var href = _props.href; var title = _props.title; var target = _props.target; var children = _props.children; var props = _objectWithoutProperties(_props, ["disabled", "active", "href", "title", "target", "children"]); var classes = { active: active, disabled: disabled }; var linkProps = { href: href, title: title, target: target, onClick: this.handleClick, ref: "anchor" }; if (href === "#") { linkProps.role = "button"; } return React.createElement( "li", _extends({}, props, { className: classSet(props.className, classes) }), React.createElement( "a", linkProps, children ) ); }, handleClick: function handleClick(e) { if (this.props.onSelect) { e.preventDefault(); if (!this.props.disabled) { this.props.onSelect(this.props.eventKey, this.props.href, this.props.target); } } } }); module.exports = NavItem; /***/ }, /* 31 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _react = __webpack_require__(49); var React = _interopRequire(_react); var cloneElement = _react.cloneElement; var OverlayMixin = _interopRequire(__webpack_require__(33)); var createChainedFunction = _interopRequire(__webpack_require__(55)); var ModalTrigger = React.createClass({ displayName: "ModalTrigger", mixins: [OverlayMixin], propTypes: { modal: React.PropTypes.node.isRequired }, getInitialState: function getInitialState() { return { isOverlayShown: false }; }, show: function show() { this.setState({ isOverlayShown: true }); }, hide: function hide() { this.setState({ isOverlayShown: false }); }, toggle: function toggle() { this.setState({ isOverlayShown: !this.state.isOverlayShown }); }, renderOverlay: function renderOverlay() { if (!this.state.isOverlayShown) { return React.createElement("span", null); } return cloneElement(this.props.modal, { onRequestHide: this.hide }); }, render: function render() { var child = React.Children.only(this.props.children); return cloneElement(child, { onClick: createChainedFunction(child.props.onClick, this.toggle) }); } }); module.exports = ModalTrigger; /***/ }, /* 32 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _react = __webpack_require__(49); var React = _interopRequire(_react); var cloneElement = _react.cloneElement; var OverlayMixin = _interopRequire(__webpack_require__(33)); var domUtils = _interopRequire(__webpack_require__(50)); var createChainedFunction = _interopRequire(__webpack_require__(55)); var assign = _interopRequire(__webpack_require__(56)); /** * Check if value one is inside or equal to the of value * * @param {string} one * @param {string|array} of * @returns {boolean} */ function isOneOf(one, of) { if (Array.isArray(of)) { return of.indexOf(one) >= 0; } return one === of; } var OverlayTrigger = React.createClass({ displayName: "OverlayTrigger", mixins: [OverlayMixin], propTypes: { trigger: React.PropTypes.oneOfType([React.PropTypes.oneOf(["manual", "click", "hover", "focus"]), React.PropTypes.arrayOf(React.PropTypes.oneOf(["click", "hover", "focus"]))]), placement: React.PropTypes.oneOf(["top", "right", "bottom", "left"]), delay: React.PropTypes.number, delayShow: React.PropTypes.number, delayHide: React.PropTypes.number, defaultOverlayShown: React.PropTypes.bool, overlay: React.PropTypes.node.isRequired }, getDefaultProps: function getDefaultProps() { return { placement: "right", trigger: ["hover", "focus"] }; }, getInitialState: function getInitialState() { return { isOverlayShown: this.props.defaultOverlayShown == null ? false : this.props.defaultOverlayShown, overlayLeft: null, overlayTop: null }; }, show: function show() { this.setState({ isOverlayShown: true }, function () { this.updateOverlayPosition(); }); }, hide: function hide() { this.setState({ isOverlayShown: false }); }, toggle: function toggle() { if (this.state.isOverlayShown) { this.hide(); } else { this.show(); } }, renderOverlay: function renderOverlay() { if (!this.state.isOverlayShown) { return React.createElement("span", null); } return cloneElement(this.props.overlay, { onRequestHide: this.hide, placement: this.props.placement, positionLeft: this.state.overlayLeft, positionTop: this.state.overlayTop }); }, render: function render() { if (this.props.trigger === "manual") { return React.Children.only(this.props.children); } var props = {}; if (isOneOf("click", this.props.trigger)) { props.onClick = createChainedFunction(this.toggle, this.props.onClick); } if (isOneOf("hover", this.props.trigger)) { props.onMouseOver = createChainedFunction(this.handleDelayedShow, this.props.onMouseOver); props.onMouseOut = createChainedFunction(this.handleDelayedHide, this.props.onMouseOut); } if (isOneOf("focus", this.props.trigger)) { props.onFocus = createChainedFunction(this.handleDelayedShow, this.props.onFocus); props.onBlur = createChainedFunction(this.handleDelayedHide, this.props.onBlur); } return cloneElement(React.Children.only(this.props.children), props); }, componentWillUnmount: function componentWillUnmount() { clearTimeout(this._hoverDelay); }, componentDidMount: function componentDidMount() { if (this.props.defaultOverlayShown) { this.updateOverlayPosition(); } }, handleDelayedShow: function handleDelayedShow() { if (this._hoverDelay != null) { clearTimeout(this._hoverDelay); this._hoverDelay = null; return; } var delay = this.props.delayShow != null ? this.props.delayShow : this.props.delay; if (!delay) { this.show(); return; } this._hoverDelay = setTimeout((function () { this._hoverDelay = null; this.show(); }).bind(this), delay); }, handleDelayedHide: function handleDelayedHide() { if (this._hoverDelay != null) { clearTimeout(this._hoverDelay); this._hoverDelay = null; return; } var delay = this.props.delayHide != null ? this.props.delayHide : this.props.delay; if (!delay) { this.hide(); return; } this._hoverDelay = setTimeout((function () { this._hoverDelay = null; this.hide(); }).bind(this), delay); }, updateOverlayPosition: function updateOverlayPosition() { if (!this.isMounted()) { return; } var pos = this.calcOverlayPosition(); this.setState({ overlayLeft: pos.left, overlayTop: pos.top }); }, calcOverlayPosition: function calcOverlayPosition() { var childOffset = this.getPosition(); var overlayNode = this.getOverlayDOMNode(); var overlayHeight = overlayNode.offsetHeight; var overlayWidth = overlayNode.offsetWidth; switch (this.props.placement) { case "right": return { top: childOffset.top + childOffset.height / 2 - overlayHeight / 2, left: childOffset.left + childOffset.width }; case "left": return { top: childOffset.top + childOffset.height / 2 - overlayHeight / 2, left: childOffset.left - overlayWidth }; case "top": return { top: childOffset.top - overlayHeight, left: childOffset.left + childOffset.width / 2 - overlayWidth / 2 }; case "bottom": return { top: childOffset.top + childOffset.height, left: childOffset.left + childOffset.width / 2 - overlayWidth / 2 }; default: throw new Error("calcOverlayPosition(): No such placement of \"" + this.props.placement + "\" found."); } }, getPosition: function getPosition() { var node = React.findDOMNode(this); var container = this.getContainerDOMNode(); var offset = container.tagName === "BODY" ? domUtils.getOffset(node) : domUtils.getPosition(node, container); return assign({}, offset, { height: node.offsetHeight, width: node.offsetWidth }); } }); module.exports = OverlayTrigger; /***/ }, /* 33 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var React = _interopRequire(__webpack_require__(49)); var CustomPropTypes = _interopRequire(__webpack_require__(57)); module.exports = { propTypes: { container: CustomPropTypes.mountable }, componentWillUnmount: function componentWillUnmount() { this._unrenderOverlay(); if (this._overlayTarget) { this.getContainerDOMNode().removeChild(this._overlayTarget); this._overlayTarget = null; } }, componentDidUpdate: function componentDidUpdate() { this._renderOverlay(); }, componentDidMount: function componentDidMount() { this._renderOverlay(); }, _mountOverlayTarget: function _mountOverlayTarget() { this._overlayTarget = document.createElement("div"); this.getContainerDOMNode().appendChild(this._overlayTarget); }, _renderOverlay: function _renderOverlay() { if (!this._overlayTarget) { this._mountOverlayTarget(); } var overlay = this.renderOverlay(); // Save reference to help testing if (overlay !== null) { this._overlayInstance = React.render(overlay, this._overlayTarget); } else { // Unrender if the component is null for transitions to null this._unrenderOverlay(); } }, _unrenderOverlay: function _unrenderOverlay() { React.unmountComponentAtNode(this._overlayTarget); this._overlayInstance = null; }, getOverlayDOMNode: function getOverlayDOMNode() { if (!this.isMounted()) { throw new Error("getOverlayDOMNode(): A component must be mounted to have a DOM node."); } if (this._overlayInstance) { return React.findDOMNode(this._overlayInstance); } return null; }, getContainerDOMNode: function getContainerDOMNode() { return React.findDOMNode(this.props.container || document.body); } }; /***/ }, /* 34 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var PageHeader = React.createClass({ displayName: "PageHeader", render: function render() { return React.createElement( "div", _extends({}, this.props, { className: classSet(this.props.className, "page-header") }), React.createElement( "h1", null, this.props.children ) ); } }); module.exports = PageHeader; /***/ }, /* 35 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(49); var React = _interopRequire(_react); var cloneElement = _react.cloneElement; var classSet = _interopRequire(__webpack_require__(58)); var BootstrapMixin = _interopRequire(__webpack_require__(5)); var CollapsableMixin = _interopRequire(__webpack_require__(13)); var Panel = React.createClass({ displayName: "Panel", mixins: [BootstrapMixin, CollapsableMixin], propTypes: { collapsable: React.PropTypes.bool, onSelect: React.PropTypes.func, header: React.PropTypes.node, footer: React.PropTypes.node, eventKey: React.PropTypes.any }, getDefaultProps: function getDefaultProps() { return { bsClass: "panel", bsStyle: "default" }; }, handleSelect: function handleSelect(e) { e.selected = true; if (this.props.onSelect) { this.props.onSelect(e, this.props.eventKey); } else { e.preventDefault(); } if (e.selected) { this.handleToggle(); } }, handleToggle: function handleToggle() { this.setState({ expanded: !this.state.expanded }); }, getCollapsableDimensionValue: function getCollapsableDimensionValue() { return React.findDOMNode(this.refs.panel).scrollHeight; }, getCollapsableDOMNode: function getCollapsableDOMNode() { if (!this.isMounted() || !this.refs || !this.refs.panel) { return null; } return React.findDOMNode(this.refs.panel); }, render: function render() { var classes = this.getBsClassSet(); return React.createElement( "div", _extends({}, this.props, { className: classSet(this.props.className, classes), id: this.props.collapsable ? null : this.props.id, onSelect: null }), this.renderHeading(), this.props.collapsable ? this.renderCollapsableBody() : this.renderBody(), this.renderFooter() ); }, renderCollapsableBody: function renderCollapsableBody() { var collapseClass = this.prefixClass("collapse"); return React.createElement( "div", { className: classSet(this.getCollapsableClassSet(collapseClass)), id: this.props.id, ref: "panel", "aria-expanded": this.isExpanded() ? "true" : "false" }, this.renderBody() ); }, renderBody: function renderBody() { var allChildren = this.props.children; var bodyElements = []; var panelBodyChildren = []; var bodyClass = this.prefixClass("body"); function getProps() { return { key: bodyElements.length }; } function addPanelChild(child) { bodyElements.push(cloneElement(child, getProps())); } function addPanelBody(children) { bodyElements.push(React.createElement( "div", _extends({ className: bodyClass }, getProps()), children )); } function maybeRenderPanelBody() { if (panelBodyChildren.length === 0) { return; } addPanelBody(panelBodyChildren); panelBodyChildren = []; } // Handle edge cases where we should not iterate through children. if (!Array.isArray(allChildren) || allChildren.length === 0) { if (this.shouldRenderFill(allChildren)) { addPanelChild(allChildren); } else { addPanelBody(allChildren); } } else { allChildren.forEach((function (child) { if (this.shouldRenderFill(child)) { maybeRenderPanelBody(); // Separately add the filled element. addPanelChild(child); } else { panelBodyChildren.push(child); } }).bind(this)); maybeRenderPanelBody(); } return bodyElements; }, shouldRenderFill: function shouldRenderFill(child) { return React.isValidElement(child) && child.props.fill != null; }, renderHeading: function renderHeading() { var header = this.props.header; if (!header) { return null; } if (!React.isValidElement(header) || Array.isArray(header)) { header = this.props.collapsable ? this.renderCollapsableTitle(header) : header; } else if (this.props.collapsable) { header = cloneElement(header, { className: classSet(this.prefixClass("title")), children: this.renderAnchor(header.props.children) }); } else { header = cloneElement(header, { className: classSet(this.prefixClass("title")) }); } return React.createElement( "div", { className: this.prefixClass("heading") }, header ); }, renderAnchor: function renderAnchor(header) { return React.createElement( "a", { href: "#" + (this.props.id || ""), className: this.isExpanded() ? null : "collapsed", "aria-expanded": this.isExpanded() ? "true" : "false", onClick: this.handleSelect }, header ); }, renderCollapsableTitle: function renderCollapsableTitle(header) { return React.createElement( "h4", { className: this.prefixClass("title") }, this.renderAnchor(header) ); }, renderFooter: function renderFooter() { if (!this.props.footer) { return null; } return React.createElement( "div", { className: this.prefixClass("footer") }, this.props.footer ); } }); module.exports = Panel; /***/ }, /* 36 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(49); var React = _interopRequire(_react); var cloneElement = _react.cloneElement; var classSet = _interopRequire(__webpack_require__(58)); var BootstrapMixin = _interopRequire(__webpack_require__(5)); var ValidComponentChildren = _interopRequire(__webpack_require__(53)); var PanelGroup = React.createClass({ displayName: "PanelGroup", mixins: [BootstrapMixin], propTypes: { collapsable: React.PropTypes.bool, activeKey: React.PropTypes.any, defaultActiveKey: React.PropTypes.any, onSelect: React.PropTypes.func }, getDefaultProps: function getDefaultProps() { return { bsClass: "panel-group" }; }, getInitialState: function getInitialState() { var defaultActiveKey = this.props.defaultActiveKey; return { activeKey: defaultActiveKey }; }, render: function render() { var classes = this.getBsClassSet(); return React.createElement( "div", _extends({}, this.props, { className: classSet(this.props.className, classes), onSelect: null }), ValidComponentChildren.map(this.props.children, this.renderPanel) ); }, renderPanel: function renderPanel(child, index) { var activeKey = this.props.activeKey != null ? this.props.activeKey : this.state.activeKey; var props = { bsStyle: child.props.bsStyle || this.props.bsStyle, key: child.key ? child.key : index, ref: child.ref }; if (this.props.accordion) { props.collapsable = true; props.expanded = child.props.eventKey === activeKey; props.onSelect = this.handleSelect; } return cloneElement(child, props); }, shouldComponentUpdate: function shouldComponentUpdate() { // Defer any updates to this component during the `onSelect` handler. return !this._isChanging; }, handleSelect: function handleSelect(e, key) { e.preventDefault(); if (this.props.onSelect) { this._isChanging = true; this.props.onSelect(key); this._isChanging = false; } if (this.state.activeKey === key) { key = null; } this.setState({ activeKey: key }); } }); module.exports = PanelGroup; /***/ }, /* 37 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var PageItem = React.createClass({ displayName: "PageItem", propTypes: { href: React.PropTypes.string, target: React.PropTypes.string, disabled: React.PropTypes.bool, previous: React.PropTypes.bool, next: React.PropTypes.bool, onSelect: React.PropTypes.func, eventKey: React.PropTypes.any }, getDefaultProps: function getDefaultProps() { return { href: "#" }; }, render: function render() { var classes = { disabled: this.props.disabled, previous: this.props.previous, next: this.props.next }; return React.createElement( "li", _extends({}, this.props, { className: classSet(this.props.className, classes) }), React.createElement( "a", { href: this.props.href, title: this.props.title, target: this.props.target, onClick: this.handleSelect, ref: "anchor" }, this.props.children ) ); }, handleSelect: function handleSelect(e) { if (this.props.onSelect) { e.preventDefault(); if (!this.props.disabled) { this.props.onSelect(this.props.eventKey, this.props.href, this.props.target); } } } }); module.exports = PageItem; /***/ }, /* 38 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(49); var React = _interopRequire(_react); var cloneElement = _react.cloneElement; var classSet = _interopRequire(__webpack_require__(58)); var ValidComponentChildren = _interopRequire(__webpack_require__(53)); var createChainedFunction = _interopRequire(__webpack_require__(55)); var Pager = React.createClass({ displayName: "Pager", propTypes: { onSelect: React.PropTypes.func }, render: function render() { return React.createElement( "ul", _extends({}, this.props, { className: classSet(this.props.className, "pager") }), ValidComponentChildren.map(this.props.children, this.renderPageItem) ); }, renderPageItem: function renderPageItem(child, index) { return cloneElement(child, { onSelect: createChainedFunction(child.props.onSelect, this.props.onSelect), key: child.key ? child.key : index }); } }); module.exports = Pager; /***/ }, /* 39 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _defineProperty = function (obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var BootstrapMixin = _interopRequire(__webpack_require__(5)); var Popover = React.createClass({ displayName: "Popover", mixins: [BootstrapMixin], propTypes: { placement: React.PropTypes.oneOf(["top", "right", "bottom", "left"]), positionLeft: React.PropTypes.number, positionTop: React.PropTypes.number, arrowOffsetLeft: React.PropTypes.number, arrowOffsetTop: React.PropTypes.number, title: React.PropTypes.node }, getDefaultProps: function getDefaultProps() { return { placement: "right" }; }, render: function render() { var _this = this; var classes = (function () { var _classes = { popover: true }; _defineProperty(_classes, _this.props.placement, true); _defineProperty(_classes, "in", _this.props.positionLeft != null || _this.props.positionTop != null); return _classes; })(); var style = { left: this.props.positionLeft, top: this.props.positionTop, display: "block" }; var arrowStyle = { left: this.props.arrowOffsetLeft, top: this.props.arrowOffsetTop }; return React.createElement( "div", _extends({}, this.props, { className: classSet(this.props.className, classes), style: style, title: null }), React.createElement("div", { className: "arrow", style: arrowStyle }), this.props.title ? this.renderTitle() : null, React.createElement( "div", { className: "popover-content" }, this.props.children ) ); }, renderTitle: function renderTitle() { return React.createElement( "h3", { className: "popover-title" }, this.props.title ); } }); module.exports = Popover; /***/ }, /* 40 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(49); var React = _interopRequire(_react); var cloneElement = _react.cloneElement; var Interpolate = _interopRequire(__webpack_require__(21)); var BootstrapMixin = _interopRequire(__webpack_require__(5)); var classSet = _interopRequire(__webpack_require__(58)); var ValidComponentChildren = _interopRequire(__webpack_require__(53)); var ProgressBar = React.createClass({ displayName: "ProgressBar", propTypes: { min: React.PropTypes.number, now: React.PropTypes.number, max: React.PropTypes.number, label: React.PropTypes.node, srOnly: React.PropTypes.bool, striped: React.PropTypes.bool, active: React.PropTypes.bool }, mixins: [BootstrapMixin], getDefaultProps: function getDefaultProps() { return { bsClass: "progress-bar", min: 0, max: 100 }; }, getPercentage: function getPercentage(now, min, max) { return Math.ceil((now - min) / (max - min) * 100); }, render: function render() { var classes = { progress: true }; if (this.props.active) { classes["progress-striped"] = true; classes.active = true; } else if (this.props.striped) { classes["progress-striped"] = true; } if (!ValidComponentChildren.hasValidComponent(this.props.children)) { if (!this.props.isChild) { return React.createElement( "div", _extends({}, this.props, { className: classSet(this.props.className, classes) }), this.renderProgressBar() ); } else { return this.renderProgressBar(); } } else { return React.createElement( "div", _extends({}, this.props, { className: classSet(this.props.className, classes) }), ValidComponentChildren.map(this.props.children, this.renderChildBar) ); } }, renderChildBar: function renderChildBar(child, index) { return cloneElement(child, { isChild: true, key: child.key ? child.key : index }); }, renderProgressBar: function renderProgressBar() { var percentage = this.getPercentage(this.props.now, this.props.min, this.props.max); var label = undefined; if (typeof this.props.label === "string") { label = this.renderLabel(percentage); } else if (this.props.label) { label = this.props.label; } if (this.props.srOnly) { label = this.renderScreenReaderOnlyLabel(label); } var classes = this.getBsClassSet(); return React.createElement( "div", _extends({}, this.props, { className: classSet(this.props.className, classes), role: "progressbar", style: { width: percentage + "%" }, "aria-valuenow": this.props.now, "aria-valuemin": this.props.min, "aria-valuemax": this.props.max }), label ); }, renderLabel: function renderLabel(percentage) { var InterpolateClass = this.props.interpolateClass || Interpolate; return React.createElement( InterpolateClass, { now: this.props.now, min: this.props.min, max: this.props.max, percent: percentage, bsStyle: this.props.bsStyle }, this.props.label ); }, renderScreenReaderOnlyLabel: function renderScreenReaderOnlyLabel(label) { return React.createElement( "span", { className: "sr-only" }, label ); } }); module.exports = ProgressBar; /***/ }, /* 41 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var Row = React.createClass({ displayName: "Row", propTypes: { componentClass: React.PropTypes.node.isRequired }, getDefaultProps: function getDefaultProps() { return { componentClass: "div" }; }, render: function render() { var ComponentClass = this.props.componentClass; return React.createElement( ComponentClass, _extends({}, this.props, { className: classSet(this.props.className, "row") }), this.props.children ); } }); module.exports = Row; /***/ }, /* 42 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var BootstrapMixin = _interopRequire(__webpack_require__(5)); var DropdownStateMixin = _interopRequire(__webpack_require__(16)); var Button = _interopRequire(__webpack_require__(7)); var ButtonGroup = _interopRequire(__webpack_require__(8)); var DropdownMenu = _interopRequire(__webpack_require__(15)); var SplitButton = React.createClass({ displayName: "SplitButton", mixins: [BootstrapMixin, DropdownStateMixin], propTypes: { pullRight: React.PropTypes.bool, title: React.PropTypes.node, href: React.PropTypes.string, target: React.PropTypes.string, dropdownTitle: React.PropTypes.node, onClick: React.PropTypes.func, onSelect: React.PropTypes.func, disabled: React.PropTypes.bool }, getDefaultProps: function getDefaultProps() { return { dropdownTitle: "Toggle dropdown" }; }, render: function render() { var groupClasses = { open: this.state.open, dropup: this.props.dropup }; var button = React.createElement( Button, _extends({}, this.props, { ref: "button", onClick: this.handleButtonClick, title: null, id: null }), this.props.title ); var dropdownButton = React.createElement( Button, _extends({}, this.props, { ref: "dropdownButton", className: classSet(this.props.className, "dropdown-toggle"), onClick: this.handleDropdownClick, title: null, href: null, target: null, id: null }), React.createElement( "span", { className: "sr-only" }, this.props.dropdownTitle ), React.createElement("span", { className: "caret" }), React.createElement( "span", { style: { letterSpacing: "-.3em" } }, " " ) ); return React.createElement( ButtonGroup, { bsSize: this.props.bsSize, className: classSet(groupClasses), id: this.props.id }, button, dropdownButton, React.createElement( DropdownMenu, { ref: "menu", onSelect: this.handleOptionSelect, "aria-labelledby": this.props.id, pullRight: this.props.pullRight }, this.props.children ) ); }, handleButtonClick: function handleButtonClick(e) { if (this.state.open) { this.setDropdownState(false); } if (this.props.onClick) { this.props.onClick(e, this.props.href, this.props.target); } }, handleDropdownClick: function handleDropdownClick(e) { e.preventDefault(); this.setDropdownState(!this.state.open); }, handleOptionSelect: function handleOptionSelect(key) { if (this.props.onSelect) { this.props.onSelect(key); } this.setDropdownState(false); } }); module.exports = SplitButton; /***/ }, /* 43 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(49); var React = _interopRequire(_react); var cloneElement = _react.cloneElement; var classSet = _interopRequire(__webpack_require__(58)); var ValidComponentChildren = _interopRequire(__webpack_require__(53)); var createChainedFunction = _interopRequire(__webpack_require__(55)); var BootstrapMixin = _interopRequire(__webpack_require__(5)); var SubNav = React.createClass({ displayName: "SubNav", mixins: [BootstrapMixin], propTypes: { onSelect: React.PropTypes.func, active: React.PropTypes.bool, disabled: React.PropTypes.bool, href: React.PropTypes.string, title: React.PropTypes.string, text: React.PropTypes.node, target: React.PropTypes.string }, getDefaultProps: function getDefaultProps() { return { bsClass: "nav" }; }, handleClick: function handleClick(e) { if (this.props.onSelect) { e.preventDefault(); if (!this.props.disabled) { this.props.onSelect(this.props.eventKey, this.props.href, this.props.target); } } }, isActive: function isActive() { return this.isChildActive(this); }, isChildActive: function isChildActive(child) { var _this = this; if (child.props.active) { return true; } if (this.props.activeKey != null && this.props.activeKey === child.props.eventKey) { return true; } if (this.props.activeHref != null && this.props.activeHref === child.props.href) { return true; } if (child.props.children) { var _ret = (function () { var isActive = false; ValidComponentChildren.forEach(child.props.children, function (grandchild) { if (this.isChildActive(grandchild)) { isActive = true; } }, _this); return { v: isActive }; })(); if (typeof _ret === "object") { return _ret.v; } } return false; }, getChildActiveProp: function getChildActiveProp(child) { if (child.props.active) { return true; } if (this.props.activeKey != null) { if (child.props.eventKey === this.props.activeKey) { return true; } } if (this.props.activeHref != null) { if (child.props.href === this.props.activeHref) { return true; } } return child.props.active; }, render: function render() { var classes = { active: this.isActive(), disabled: this.props.disabled }; return React.createElement( "li", _extends({}, this.props, { className: classSet(this.props.className, classes) }), React.createElement( "a", { href: this.props.href, title: this.props.title, target: this.props.target, onClick: this.handleClick, ref: "anchor" }, this.props.text ), React.createElement( "ul", { className: "nav" }, ValidComponentChildren.map(this.props.children, this.renderNavItem) ) ); }, renderNavItem: function renderNavItem(child, index) { return cloneElement(child, { active: this.getChildActiveProp(child), onSelect: createChainedFunction(child.props.onSelect, this.props.onSelect), key: child.key ? child.key : index }); } }); module.exports = SubNav; /***/ }, /* 44 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(49); var React = _interopRequire(_react); var cloneElement = _react.cloneElement; var BootstrapMixin = _interopRequire(__webpack_require__(5)); var ValidComponentChildren = _interopRequire(__webpack_require__(53)); var Nav = _interopRequire(__webpack_require__(28)); var NavItem = _interopRequire(__webpack_require__(30)); function getDefaultActiveKeyFromChildren(children) { var defaultActiveKey = undefined; ValidComponentChildren.forEach(children, function (child) { if (defaultActiveKey == null) { defaultActiveKey = child.props.eventKey; } }); return defaultActiveKey; } var TabbedArea = React.createClass({ displayName: "TabbedArea", mixins: [BootstrapMixin], propTypes: { bsStyle: React.PropTypes.oneOf(["tabs", "pills"]), animation: React.PropTypes.bool, onSelect: React.PropTypes.func }, getDefaultProps: function getDefaultProps() { return { bsStyle: "tabs", animation: true }; }, getInitialState: function getInitialState() { var defaultActiveKey = this.props.defaultActiveKey != null ? this.props.defaultActiveKey : getDefaultActiveKeyFromChildren(this.props.children); // TODO: In __DEV__ mode warn via `console.warn` if no `defaultActiveKey` has // been set by this point, invalid children or missing key properties are likely the cause. return { activeKey: defaultActiveKey, previousActiveKey: null }; }, componentWillReceiveProps: function componentWillReceiveProps(nextProps) { if (nextProps.activeKey != null && nextProps.activeKey !== this.props.activeKey) { this.setState({ previousActiveKey: this.props.activeKey }); } }, handlePaneAnimateOutEnd: function handlePaneAnimateOutEnd() { this.setState({ previousActiveKey: null }); }, render: function render() { var activeKey = this.props.activeKey != null ? this.props.activeKey : this.state.activeKey; function renderTabIfSet(child) { return child.props.tab != null ? this.renderTab(child) : null; } var nav = React.createElement( Nav, _extends({}, this.props, { activeKey: activeKey, onSelect: this.handleSelect, ref: "tabs" }), ValidComponentChildren.map(this.props.children, renderTabIfSet, this) ); return React.createElement( "div", null, nav, React.createElement( "div", { id: this.props.id, className: "tab-content", ref: "panes" }, ValidComponentChildren.map(this.props.children, this.renderPane) ) ); }, getActiveKey: function getActiveKey() { return this.props.activeKey != null ? this.props.activeKey : this.state.activeKey; }, renderPane: function renderPane(child, index) { var activeKey = this.getActiveKey(); return cloneElement(child, { active: child.props.eventKey === activeKey && (this.state.previousActiveKey == null || !this.props.animation), key: child.key ? child.key : index, animation: this.props.animation, onAnimateOutEnd: this.state.previousActiveKey != null && child.props.eventKey === this.state.previousActiveKey ? this.handlePaneAnimateOutEnd : null }); }, renderTab: function renderTab(child) { var key = child.props.eventKey; return React.createElement( NavItem, { ref: "tab" + key, eventKey: key }, child.props.tab ); }, shouldComponentUpdate: function shouldComponentUpdate() { // Defer any updates to this component during the `onSelect` handler. return !this._isChanging; }, handleSelect: function handleSelect(key) { if (this.props.onSelect) { this._isChanging = true; this.props.onSelect(key); this._isChanging = false; } else if (key !== this.getActiveKey()) { this.setState({ activeKey: key, previousActiveKey: this.getActiveKey() }); } } }); module.exports = TabbedArea; /***/ }, /* 45 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var Table = React.createClass({ displayName: "Table", propTypes: { striped: React.PropTypes.bool, bordered: React.PropTypes.bool, condensed: React.PropTypes.bool, hover: React.PropTypes.bool, responsive: React.PropTypes.bool }, render: function render() { var classes = { table: true, "table-striped": this.props.striped, "table-bordered": this.props.bordered, "table-condensed": this.props.condensed, "table-hover": this.props.hover }; var table = React.createElement( "table", _extends({}, this.props, { className: classSet(this.props.className, classes) }), this.props.children ); return this.props.responsive ? React.createElement( "div", { className: "table-responsive" }, table ) : table; } }); module.exports = Table; /***/ }, /* 46 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var TransitionEvents = _interopRequire(__webpack_require__(54)); var TabPane = React.createClass({ displayName: "TabPane", getDefaultProps: function getDefaultProps() { return { animation: true }; }, getInitialState: function getInitialState() { return { animateIn: false, animateOut: false }; }, componentWillReceiveProps: function componentWillReceiveProps(nextProps) { if (this.props.animation) { if (!this.state.animateIn && nextProps.active && !this.props.active) { this.setState({ animateIn: true }); } else if (!this.state.animateOut && !nextProps.active && this.props.active) { this.setState({ animateOut: true }); } } }, componentDidUpdate: function componentDidUpdate() { if (this.state.animateIn) { setTimeout(this.startAnimateIn, 0); } if (this.state.animateOut) { TransitionEvents.addEndEventListener(React.findDOMNode(this), this.stopAnimateOut); } }, startAnimateIn: function startAnimateIn() { if (this.isMounted()) { this.setState({ animateIn: false }); } }, stopAnimateOut: function stopAnimateOut() { if (this.isMounted()) { this.setState({ animateOut: false }); if (typeof this.props.onAnimateOutEnd === "function") { this.props.onAnimateOutEnd(); } } }, render: function render() { var classes = { "tab-pane": true, fade: true, active: this.props.active || this.state.animateOut, "in": this.props.active && !this.state.animateIn }; return React.createElement( "div", _extends({}, this.props, { className: classSet(this.props.className, classes) }), this.props.children ); } }); module.exports = TabPane; /***/ }, /* 47 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _defineProperty = function (obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var BootstrapMixin = _interopRequire(__webpack_require__(5)); var Tooltip = React.createClass({ displayName: "Tooltip", mixins: [BootstrapMixin], propTypes: { placement: React.PropTypes.oneOf(["top", "right", "bottom", "left"]), positionLeft: React.PropTypes.number, positionTop: React.PropTypes.number, arrowOffsetLeft: React.PropTypes.number, arrowOffsetTop: React.PropTypes.number }, getDefaultProps: function getDefaultProps() { return { placement: "right" }; }, render: function render() { var _this = this; var classes = (function () { var _classes = { tooltip: true }; _defineProperty(_classes, _this.props.placement, true); _defineProperty(_classes, "in", _this.props.positionLeft != null || _this.props.positionTop != null); return _classes; })(); var style = { left: this.props.positionLeft, top: this.props.positionTop }; var arrowStyle = { left: this.props.arrowOffsetLeft, top: this.props.arrowOffsetTop }; return React.createElement( "div", _extends({}, this.props, { className: classSet(this.props.className, classes), style: style }), React.createElement("div", { className: "tooltip-arrow", style: arrowStyle }), React.createElement( "div", { className: "tooltip-inner" }, this.props.children ) ); } }); module.exports = Tooltip; /***/ }, /* 48 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = _interopRequire(__webpack_require__(49)); var classSet = _interopRequire(__webpack_require__(58)); var BootstrapMixin = _interopRequire(__webpack_require__(5)); var Well = React.createClass({ displayName: "Well", mixins: [BootstrapMixin], getDefaultProps: function getDefaultProps() { return { bsClass: "well" }; }, render: function render() { var classes = this.getBsClassSet(); return React.createElement( "div", _extends({}, this.props, { className: classSet(this.props.className, classes) }), this.props.children ); } }); module.exports = Well; /***/ }, /* 49 */ /***/ function(module, exports, __webpack_require__) { module.exports = __WEBPACK_EXTERNAL_MODULE_49__; /***/ }, /* 50 */ /***/ function(module, exports, __webpack_require__) { /** * Shortcut to compute element style * * @param {HTMLElement} elem * @returns {CssStyle} */ "use strict"; function getComputedStyles(elem) { return elem.ownerDocument.defaultView.getComputedStyle(elem, null); } /** * Get elements offset * * TODO: REMOVE JQUERY! * * @param {HTMLElement} DOMNode * @returns {{top: number, left: number}} */ function getOffset(DOMNode) { if (window.jQuery) { return window.jQuery(DOMNode).offset(); } var docElem = document.documentElement; var box = { top: 0, left: 0 }; // If we don't have gBCR, just use 0,0 rather than error // BlackBerry 5, iOS 3 (original iPhone) if (typeof DOMNode.getBoundingClientRect !== "undefined") { box = DOMNode.getBoundingClientRect(); } return { top: box.top + window.pageYOffset - docElem.clientTop, left: box.left + window.pageXOffset - docElem.clientLeft }; } /** * Get elements position * * TODO: REMOVE JQUERY! * * @param {HTMLElement} elem * @param {HTMLElement?} offsetParent * @returns {{top: number, left: number}} */ function getPosition(elem, offsetParent) { if (window.jQuery) { return window.jQuery(elem).position(); } var offset = undefined, parentOffset = { top: 0, left: 0 }; // Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent if (getComputedStyles(elem).position === "fixed") { // We assume that getBoundingClientRect is available when computed position is fixed offset = elem.getBoundingClientRect(); } else { if (!offsetParent) { // Get *real* offsetParent offsetParent = offsetParentFunc(elem); } // Get correct offsets offset = getOffset(elem); if (offsetParent.nodeName !== "HTML") { parentOffset = getOffset(offsetParent); } // Add offsetParent borders parentOffset.top += parseInt(getComputedStyles(offsetParent).borderTopWidth, 10); parentOffset.left += parseInt(getComputedStyles(offsetParent).borderLeftWidth, 10); } // Subtract parent offsets and element margins return { top: offset.top - parentOffset.top - parseInt(getComputedStyles(elem).marginTop, 10), left: offset.left - parentOffset.left - parseInt(getComputedStyles(elem).marginLeft, 10) }; } /** * Get parent element * * @param {HTMLElement?} elem * @returns {HTMLElement} */ function offsetParentFunc(elem) { var docElem = document.documentElement; var offsetParent = elem.offsetParent || docElem; while (offsetParent && (offsetParent.nodeName !== "HTML" && getComputedStyles(offsetParent).position === "static")) { offsetParent = offsetParent.offsetParent; } return offsetParent || docElem; } module.exports = { getComputedStyles: getComputedStyles, getOffset: getOffset, getPosition: getPosition, offsetParent: offsetParentFunc }; /***/ }, /* 51 */ /***/ function(module, exports, __webpack_require__) { /** * Copyright 2013-2014 Facebook, Inc. * * This file contains a modified version of: * https://github.com/facebook/react/blob/v0.12.0/src/vendor/stubs/EventListener.js * * 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. * * TODO: remove in favour of solution provided by: * https://github.com/facebook/react/issues/285 */ /** * Does not take into account specific nature of platform. */ "use strict"; var EventListener = { /** * Listen to DOM events during the bubble phase. * * @param {DOMEventTarget} target DOM element to register listener on. * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. * @param {function} callback Callback function. * @return {object} Object with a `remove` method. */ listen: function listen(target, eventType, callback) { if (target.addEventListener) { target.addEventListener(eventType, callback, false); return { remove: function remove() { target.removeEventListener(eventType, callback, false); } }; } else if (target.attachEvent) { target.attachEvent("on" + eventType, callback); return { remove: function remove() { target.detachEvent("on" + eventType, callback); } }; } } }; module.exports = EventListener; /***/ }, /* 52 */ /***/ function(module, exports, __webpack_require__) { "use strict"; module.exports = { CLASSES: { alert: "alert", button: "btn", "button-group": "btn-group", "button-toolbar": "btn-toolbar", column: "col", "input-group": "input-group", form: "form", glyphicon: "glyphicon", label: "label", "list-group-item": "list-group-item", panel: "panel", "panel-group": "panel-group", "progress-bar": "progress-bar", nav: "nav", navbar: "navbar", modal: "modal", row: "row", well: "well" }, STYLES: { "default": "default", primary: "primary", success: "success", info: "info", warning: "warning", danger: "danger", link: "link", inline: "inline", tabs: "tabs", pills: "pills" }, SIZES: { large: "lg", medium: "md", small: "sm", xsmall: "xs" }, GLYPHS: ["asterisk", "plus", "euro", "eur", "minus", "cloud", "envelope", "pencil", "glass", "music", "search", "heart", "star", "star-empty", "user", "film", "th-large", "th", "th-list", "ok", "remove", "zoom-in", "zoom-out", "off", "signal", "cog", "trash", "home", "file", "time", "road", "download-alt", "download", "upload", "inbox", "play-circle", "repeat", "refresh", "list-alt", "lock", "flag", "headphones", "volume-off", "volume-down", "volume-up", "qrcode", "barcode", "tag", "tags", "book", "bookmark", "print", "camera", "font", "bold", "italic", "text-height", "text-width", "align-left", "align-center", "align-right", "align-justify", "list", "indent-left", "indent-right", "facetime-video", "picture", "map-marker", "adjust", "tint", "edit", "share", "check", "move", "step-backward", "fast-backward", "backward", "play", "pause", "stop", "forward", "fast-forward", "step-forward", "eject", "chevron-left", "chevron-right", "plus-sign", "minus-sign", "remove-sign", "ok-sign", "question-sign", "info-sign", "screenshot", "remove-circle", "ok-circle", "ban-circle", "arrow-left", "arrow-right", "arrow-up", "arrow-down", "share-alt", "resize-full", "resize-small", "exclamation-sign", "gift", "leaf", "fire", "eye-open", "eye-close", "warning-sign", "plane", "calendar", "random", "comment", "magnet", "chevron-up", "chevron-down", "retweet", "shopping-cart", "folder-close", "folder-open", "resize-vertical", "resize-horizontal", "hdd", "bullhorn", "bell", "certificate", "thumbs-up", "thumbs-down", "hand-right", "hand-left", "hand-up", "hand-down", "circle-arrow-right", "circle-arrow-left", "circle-arrow-up", "circle-arrow-down", "globe", "wrench", "tasks", "filter", "briefcase", "fullscreen", "dashboard", "paperclip", "heart-empty", "link", "phone", "pushpin", "usd", "gbp", "sort", "sort-by-alphabet", "sort-by-alphabet-alt", "sort-by-order", "sort-by-order-alt", "sort-by-attributes", "sort-by-attributes-alt", "unchecked", "expand", "collapse-down", "collapse-up", "log-in", "flash", "log-out", "new-window", "record", "save", "open", "saved", "import", "export", "send", "floppy-disk", "floppy-saved", "floppy-remove", "floppy-save", "floppy-open", "credit-card", "transfer", "cutlery", "header", "compressed", "earphone", "phone-alt", "tower", "stats", "sd-video", "hd-video", "subtitles", "sound-stereo", "sound-dolby", "sound-5-1", "sound-6-1", "sound-7-1", "copyright-mark", "registration-mark", "cloud-download", "cloud-upload", "tree-conifer", "tree-deciduous", "cd", "save-file", "open-file", "level-up", "copy", "paste", "alert", "equalizer", "king", "queen", "pawn", "bishop", "knight", "baby-formula", "tent", "blackboard", "bed", "apple", "erase", "hourglass", "lamp", "duplicate", "piggy-bank", "scissors", "bitcoin", "yen", "ruble", "scale", "ice-lolly", "ice-lolly-tasted", "education", "option-horizontal", "option-vertical", "menu-hamburger", "modal-window", "oil", "grain", "sunglasses", "text-size", "text-color", "text-background", "object-align-top", "object-align-bottom", "object-align-horizontal", "object-align-left", "object-align-vertical", "object-align-right", "triangle-right", "triangle-left", "triangle-bottom", "triangle-top", "console", "superscript", "subscript", "menu-left", "menu-right", "menu-down", "menu-up"] }; /***/ }, /* 53 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; }; var React = _interopRequire(__webpack_require__(49)); /** * Maps children that are typically specified as `props.children`, * but only iterates over children that are "valid components". * * The mapFunction provided index will be normalised to the components mapped, * so an invalid component would not increase the index. * * @param {?*} children Children tree container. * @param {function(*, int)} mapFunction. * @param {*} mapContext Context for mapFunction. * @return {object} Object containing the ordered map of results. */ function mapValidComponents(children, func, context) { var index = 0; return React.Children.map(children, function (child) { if (React.isValidElement(child)) { var lastIndex = index; index++; return func.call(context, child, lastIndex); } return child; }); } /** * Iterates through children that are typically specified as `props.children`, * but only iterates over children that are "valid components". * * The provided forEachFunc(child, index) will be called for each * leaf child with the index reflecting the position relative to "valid components". * * @param {?*} children Children tree container. * @param {function(*, int)} forEachFunc. * @param {*} forEachContext Context for forEachContext. */ function forEachValidComponents(children, func, context) { var index = 0; return React.Children.forEach(children, function (child) { if (React.isValidElement(child)) { func.call(context, child, index); index++; } }); } /** * Count the number of "valid components" in the Children container. * * @param {?*} children Children tree container. * @returns {number} */ function numberOfValidComponents(children) { var count = 0; React.Children.forEach(children, function (child) { if (React.isValidElement(child)) { count++; } }); return count; } /** * Determine if the Child container has one or more "valid components". * * @param {?*} children Children tree container. * @returns {boolean} */ function hasValidComponent(children) { var hasValid = false; React.Children.forEach(children, function (child) { if (!hasValid && React.isValidElement(child)) { hasValid = true; } }); return hasValid; } module.exports = { map: mapValidComponents, forEach: forEachValidComponents, numberOf: numberOfValidComponents, hasValidComponent: hasValidComponent }; /***/ }, /* 54 */ /***/ function(module, exports, __webpack_require__) { /** * Copyright 2013-2014, Facebook, Inc. * All rights reserved. * * This file contains a modified version of: * https://github.com/facebook/react/blob/v0.12.0/src/addons/transitions/ReactTransitionEvents.js * * This source code is licensed under the BSD-style license found here: * https://github.com/facebook/react/blob/v0.12.0/LICENSE * An additional grant of patent rights can be found here: * https://github.com/facebook/react/blob/v0.12.0/PATENTS */ "use strict"; var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement); /** * EVENT_NAME_MAP is used to determine which event fired when a * transition/animation ends, based on the style property used to * define that event. */ var EVENT_NAME_MAP = { transitionend: { transition: "transitionend", WebkitTransition: "webkitTransitionEnd", MozTransition: "mozTransitionEnd", OTransition: "oTransitionEnd", msTransition: "MSTransitionEnd" }, animationend: { animation: "animationend", WebkitAnimation: "webkitAnimationEnd", MozAnimation: "mozAnimationEnd", OAnimation: "oAnimationEnd", msAnimation: "MSAnimationEnd" } }; var endEvents = []; function detectEvents() { var testEl = document.createElement("div"); var style = testEl.style; // On some platforms, in particular some releases of Android 4.x, // the un-prefixed "animation" and "transition" properties are defined on the // style object but the events that fire will still be prefixed, so we need // to check if the un-prefixed events are useable, and if not remove them // from the map if (!("AnimationEvent" in window)) { delete EVENT_NAME_MAP.animationend.animation; } if (!("TransitionEvent" in window)) { delete EVENT_NAME_MAP.transitionend.transition; } for (var baseEventName in EVENT_NAME_MAP) { var baseEvents = EVENT_NAME_MAP[baseEventName]; for (var styleName in baseEvents) { if (styleName in style) { endEvents.push(baseEvents[styleName]); break; } } } } if (canUseDOM) { detectEvents(); } // We use the raw {add|remove}EventListener() call because EventListener // does not know how to remove event listeners and we really should // clean up. Also, these events are not triggered in older browsers // so we should be A-OK here. function addEventListener(node, eventName, eventListener) { node.addEventListener(eventName, eventListener, false); } function removeEventListener(node, eventName, eventListener) { node.removeEventListener(eventName, eventListener, false); } var ReactTransitionEvents = { addEndEventListener: function addEndEventListener(node, eventListener) { if (endEvents.length === 0) { // If CSS transitions are not supported, trigger an "end animation" // event immediately. window.setTimeout(eventListener, 0); return; } endEvents.forEach(function (endEvent) { addEventListener(node, endEvent, eventListener); }); }, removeEndEventListener: function removeEndEventListener(node, eventListener) { if (endEvents.length === 0) { return; } endEvents.forEach(function (endEvent) { removeEventListener(node, endEvent, eventListener); }); } }; module.exports = ReactTransitionEvents; /***/ }, /* 55 */ /***/ function(module, exports, __webpack_require__) { /** * Safe chained function * * Will only create a new function if needed, * otherwise will pass back existing functions or null. * * @param {function} one * @param {function} two * @returns {function|null} */ "use strict"; function createChainedFunction(one, two) { var hasOne = typeof one === "function"; var hasTwo = typeof two === "function"; if (!hasOne && !hasTwo) { return null; } if (!hasOne) { return two; } if (!hasTwo) { return one; } return function chainedFunction() { one.apply(this, arguments); two.apply(this, arguments); }; } module.exports = createChainedFunction; /***/ }, /* 56 */ /***/ function(module, exports, __webpack_require__) { /** * Copyright 2014, Facebook, Inc. * All rights reserved. * * This file contains an unmodified version of: * https://github.com/facebook/react/blob/v0.12.0/src/vendor/stubs/Object.assign.js * * This source code is licensed under the BSD-style license found here: * https://github.com/facebook/react/blob/v0.12.0/LICENSE * An additional grant of patent rights can be found here: * https://github.com/facebook/react/blob/v0.12.0/PATENTS */ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign "use strict"; function assign(target, sources) { if (target == null) { throw new TypeError("Object.assign target cannot be null or undefined"); } var to = Object(target); var hasOwnProperty = Object.prototype.hasOwnProperty; for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) { var nextSource = arguments[nextIndex]; if (nextSource == null) { continue; } var from = Object(nextSource); // We don't currently support accessors nor proxies. Therefore this // copy cannot throw. If we ever supported this then we must handle // exceptions and side-effects. We don't support symbols so they won't // be transferred. for (var key in from) { if (hasOwnProperty.call(from, key)) { to[key] = from[key]; } } } return to; } module.exports = assign; /***/ }, /* 57 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var ANONYMOUS = "<<anonymous>>"; var CustomPropTypes = { /** * Checks whether a prop provides a DOM element * * The element can be provided in two forms: * - Directly passed * - Or passed an object which has a `getDOMNode` method which will return the required DOM element * * @param props * @param propName * @param componentName * @returns {Error|undefined} */ mountable: createMountableChecker() }; /** * Create chain-able isRequired validator * * Largely copied directly from: * https://github.com/facebook/react/blob/0.11-stable/src/core/ReactPropTypes.js#L94 */ function createChainableTypeChecker(validate) { function checkType(isRequired, props, propName, componentName) { componentName = componentName || ANONYMOUS; if (props[propName] == null) { if (isRequired) { return new Error("Required prop `" + propName + "` was not specified in " + "`" + componentName + "`."); } } else { return validate(props, propName, componentName); } } var chainedCheckType = checkType.bind(null, false); chainedCheckType.isRequired = checkType.bind(null, true); return chainedCheckType; } function createMountableChecker() { function validate(props, propName, componentName) { if (typeof props[propName] !== "object" || typeof props[propName].render !== "function" && props[propName].nodeType !== 1) { return new Error("Invalid prop `" + propName + "` supplied to " + "`" + componentName + "`, expected a DOM element or an object that has a `render` method"); } } return createChainableTypeChecker(validate); } module.exports = CustomPropTypes; /***/ }, /* 58 */ /***/ function(module, exports, __webpack_require__) { function classNames() { var classes = ''; var arg; for (var i = 0; i < arguments.length; i++) { arg = arguments[i]; if (!arg) { continue; } if ('string' === typeof arg || 'number' === typeof arg) { classes += ' ' + arg; } else if (Object.prototype.toString.call(arg) === '[object Array]') { classes += ' ' + classNames.apply(null, arg); } else if ('object' === typeof arg) { for (var key in arg) { if (!arg.hasOwnProperty(key) || !arg[key]) { continue; } classes += ' ' + key; } } } return classes.substr(1); } // safely export classNames in case the script is included directly on a page if (typeof module !== 'undefined' && module.exports) { module.exports = classNames; } /***/ }, /* 59 */ /***/ 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 ReactTransitionEvents */ 'use strict'; var ExecutionEnvironment = __webpack_require__(60); /** * EVENT_NAME_MAP is used to determine which event fired when a * transition/animation ends, based on the style property used to * define that event. */ var EVENT_NAME_MAP = { transitionend: { 'transition': 'transitionend', 'WebkitTransition': 'webkitTransitionEnd', 'MozTransition': 'mozTransitionEnd', 'OTransition': 'oTransitionEnd', 'msTransition': 'MSTransitionEnd' }, animationend: { 'animation': 'animationend', 'WebkitAnimation': 'webkitAnimationEnd', 'MozAnimation': 'mozAnimationEnd', 'OAnimation': 'oAnimationEnd', 'msAnimation': 'MSAnimationEnd' } }; var endEvents = []; function detectEvents() { var testEl = document.createElement('div'); var style = testEl.style; // On some platforms, in particular some releases of Android 4.x, // the un-prefixed "animation" and "transition" properties are defined on the // style object but the events that fire will still be prefixed, so we need // to check if the un-prefixed events are useable, and if not remove them // from the map if (!('AnimationEvent' in window)) { delete EVENT_NAME_MAP.animationend.animation; } if (!('TransitionEvent' in window)) { delete EVENT_NAME_MAP.transitionend.transition; } for (var baseEventName in EVENT_NAME_MAP) { var baseEvents = EVENT_NAME_MAP[baseEventName]; for (var styleName in baseEvents) { if (styleName in style) { endEvents.push(baseEvents[styleName]); break; } } } } if (ExecutionEnvironment.canUseDOM) { detectEvents(); } // We use the raw {add|remove}EventListener() call because EventListener // does not know how to remove event listeners and we really should // clean up. Also, these events are not triggered in older browsers // so we should be A-OK here. function addEventListener(node, eventName, eventListener) { node.addEventListener(eventName, eventListener, false); } function removeEventListener(node, eventName, eventListener) { node.removeEventListener(eventName, eventListener, false); } var ReactTransitionEvents = { addEndEventListener: function(node, eventListener) { if (endEvents.length === 0) { // If CSS transitions are not supported, trigger an "end animation" // event immediately. window.setTimeout(eventListener, 0); return; } endEvents.forEach(function(endEvent) { addEventListener(node, endEvent, eventListener); }); }, removeEndEventListener: function(node, eventListener) { if (endEvents.length === 0) { return; } endEvents.forEach(function(endEvent) { removeEventListener(node, endEvent, eventListener); }); } }; module.exports = ReactTransitionEvents; /***/ }, /* 60 */ /***/ 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 ExecutionEnvironment */ /*jslint evil: true */ "use strict"; var canUseDOM = !!( (typeof window !== 'undefined' && window.document && window.document.createElement) ); /** * Simple, lightweight module assisting with the detection and context of * Worker. Helps avoid circular dependencies and allows code to reason about * whether or not they are in a Worker, even if they never include the main * `ReactWorker` dependency. */ var ExecutionEnvironment = { canUseDOM: canUseDOM, canUseWorkers: typeof Worker !== 'undefined', canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), canUseViewport: canUseDOM && !!window.screen, isInWorker: !canUseDOM // For now, this is true - might change in the future. }; module.exports = ExecutionEnvironment; /***/ } /******/ ]) }); ;
src/pages/Settings/News/News.js
aggiedefenders/aggiedefenders.github.io
import React, { Component } from 'react'; import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table'; import { Link } from 'react-router-dom'; import _backButton from '../../../assets/img/back_btn_white.png'; import firebase from 'firebase'; var database = firebase.database(); const containerStyle = { backgroundColor: '#2980b9', color: 'white' }; //table function //change cell elements function onAfterSaveCell(row, cellName, cellValue) { var updateRef = database.ref('news/' + row.id); updateRef.update(row); console.log(row) } function onBeforeSaveCell(row, cellName, cellValue) { // You can do any validation on here for editing value, // return false for reject the editing return true; } //table function delete row/s function onAfterDeleteRow(row, rowKeys) { for(var i in row){ console.log(row[i]); var deleteRef = database.ref('news/'+row[i]); deleteRef.remove(); } } //table function const cellEditProp = { mode: 'click', blurToSave: true, beforeSaveCell: onBeforeSaveCell, // a hook for before saving cell afterSaveCell: onAfterSaveCell // a hook for after saving cell }; //table function const selectRowProp = { mode: 'checkbox' }; const options = { afterDeleteRow: onAfterDeleteRow // A hook for after droping rows. }; class News extends Component { constructor(props) { super(props); this.state = { text: '', products: [] }; this.handleChange = this.handleChange.bind(this); this.filesRef = database.ref('news'); } componentDidMount() { this.filesRef.on('value', this.gotData, this.errData); } gotData = (data) => { let newProducts = [] const userdata = data.val(); const keys = Object.keys(userdata); for (let i = 0; i < keys.length; i++) { const k = keys[i]; newProducts.push({ title: userdata[k].title, content: userdata[k].content, id: userdata[k].id, url: userdata[k].url, imgurl: userdata[k].image_url }); } this.setState({ products: newProducts }); } errData = (err) => { console.log(err); } handleClick = (rowKey) => { alert(this.refs.table.getPageByRowKey(rowKey)); } handleChange = (event) => { console.log('change') alert(event.target.value) } render() { return ( <div style={containerStyle} className="pt-card"> <div className="col-lg-12"> <h3> News </h3> <Link style={{color: 'white'}}className="pt-button pt-minimal" to="/settings" aria-label="Account"><img src={_backButton} />Back</Link> </div> <BootstrapTable ref='table' data={this.state.products} pagination={true} search={true} cellEdit={cellEditProp} deleteRow={true} selectRow={selectRowProp} options={options} > <TableHeaderColumn dataField='id' isKey={true} dataSort={true}>ID</TableHeaderColumn> <TableHeaderColumn dataField='title' dataSort={true} onChange={this.handleChange}>Title</TableHeaderColumn> <TableHeaderColumn dataField='content' dataSort={true} onChange={this.handleChange} >Content</TableHeaderColumn> <TableHeaderColumn dataField='url' dataSort={true} onChange={this.handleChange} >Source URL</TableHeaderColumn> </BootstrapTable> </div> ); } } export default News;
src/components/todos/todo/TodoText.js
thiagoc7/mp_parse
import React from 'react' const Text = ({children, completed, onClick}) => ( <span onClick={onClick} style={{textDecoration: completed ? 'line-through' : 'none', cursor: 'pointer'}}> {children} </span> ) Text.propTypes = { children: React.PropTypes.any.isRequired, completed: React.PropTypes.bool.isRequired, onClick: React.PropTypes.func.isRequired }; export default Text
packages/react-error-overlay/src/containers/StackFrameCodeBlock.js
timlogemann/create-react-app
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /* @flow */ import React from 'react'; import CodeBlock from '../components/CodeBlock'; import { applyStyles } from '../utils/dom/css'; import { absolutifyCaret } from '../utils/dom/absolutifyCaret'; import type { ScriptLine } from '../utils/stack-frame'; import { primaryErrorStyle, secondaryErrorStyle } from '../styles'; import generateAnsiHTML from '../utils/generateAnsiHTML'; import { codeFrameColumns } from '@babel/code-frame'; type StackFrameCodeBlockPropsType = {| lines: ScriptLine[], lineNum: number, columnNum: ?number, contextSize: number, main: boolean, |}; // Exact type workaround for spread operator. // See: https://github.com/facebook/flow/issues/2405 type Exact<T> = $Shape<T>; function StackFrameCodeBlock(props: Exact<StackFrameCodeBlockPropsType>) { const { lines, lineNum, columnNum, contextSize, main } = props; const sourceCode = []; let whiteSpace = Infinity; lines.forEach(function(e) { const { content: text } = e; const m = text.match(/^\s*/); if (text === '') { return; } if (m && m[0]) { whiteSpace = Math.min(whiteSpace, m[0].length); } else { whiteSpace = 0; } }); lines.forEach(function(e) { let { content: text } = e; const { lineNumber: line } = e; if (isFinite(whiteSpace)) { text = text.substring(whiteSpace); } sourceCode[line - 1] = text; }); const ansiHighlight = codeFrameColumns( sourceCode.join('\n'), { start: { line: lineNum, column: columnNum == null ? 0 : columnNum - (isFinite(whiteSpace) ? whiteSpace : 0), }, }, { forceColor: true, linesAbove: contextSize, linesBelow: contextSize, } ); const htmlHighlight = generateAnsiHTML(ansiHighlight); const code = document.createElement('code'); code.innerHTML = htmlHighlight; absolutifyCaret(code); const ccn = code.childNodes; // eslint-disable-next-line oLoop: for (let index = 0; index < ccn.length; ++index) { const node = ccn[index]; const ccn2 = node.childNodes; for (let index2 = 0; index2 < ccn2.length; ++index2) { const lineNode = ccn2[index2]; const text = lineNode.innerText; if (text == null) { continue; } if (text.indexOf(' ' + lineNum + ' |') === -1) { continue; } // $FlowFixMe applyStyles(node, main ? primaryErrorStyle : secondaryErrorStyle); // eslint-disable-next-line break oLoop; } } return <CodeBlock main={main} codeHTML={code.innerHTML} />; } export default StackFrameCodeBlock;
node_modules/react-router/es6/Redirect.js
ddigioia/react_router_practice_1
import React from 'react'; import invariant from 'invariant'; import { createRouteFromReactElement as _createRouteFromReactElement } from './RouteUtils'; import { formatPattern } from './PatternUtils'; import { falsy } from './InternalPropTypes'; var _React$PropTypes = React.PropTypes; var string = _React$PropTypes.string; var object = _React$PropTypes.object; /** * A <Redirect> is used to declare another URL path a client should * be sent to when they request a given URL. * * Redirects are placed alongside routes in the route configuration * and are traversed in the same manner. */ var Redirect = React.createClass({ displayName: 'Redirect', statics: { createRouteFromReactElement: function createRouteFromReactElement(element) { var route = _createRouteFromReactElement(element); if (route.from) route.path = route.from; route.onEnter = function (nextState, replace) { var location = nextState.location; var params = nextState.params; var pathname = void 0; if (route.to.charAt(0) === '/') { pathname = formatPattern(route.to, params); } else if (!route.to) { pathname = location.pathname; } else { var routeIndex = nextState.routes.indexOf(route); var parentPattern = Redirect.getRoutePattern(nextState.routes, routeIndex - 1); var pattern = parentPattern.replace(/\/*$/, '/') + route.to; pathname = formatPattern(pattern, params); } replace({ pathname: pathname, query: route.query || location.query, state: route.state || location.state }); }; return route; }, getRoutePattern: function getRoutePattern(routes, routeIndex) { var parentPattern = ''; for (var i = routeIndex; i >= 0; i--) { var route = routes[i]; var pattern = route.path || ''; parentPattern = pattern.replace(/\/*$/, '/') + parentPattern; if (pattern.indexOf('/') === 0) break; } return '/' + parentPattern; } }, propTypes: { path: string, from: string, // Alias for path to: string.isRequired, query: object, state: object, onEnter: falsy, children: falsy }, /* istanbul ignore next: sanity check */ render: function render() { !false ? process.env.NODE_ENV !== 'production' ? invariant(false, '<Redirect> elements are for router configuration only and should not be rendered') : invariant(false) : void 0; } }); export default Redirect;
src/svg-icons/communication/chat.js
ruifortes/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let CommunicationChat = (props) => ( <SvgIcon {...props}> <path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"/> </SvgIcon> ); CommunicationChat = pure(CommunicationChat); CommunicationChat.displayName = 'CommunicationChat'; CommunicationChat.muiName = 'SvgIcon'; export default CommunicationChat;
examples/Footer.js
jareth/react-materialize
import React from 'react'; import Footer from '../src/Footer'; export default <Footer copyrights="&copy; 2015 Copyright Text" moreLinks={ <a className="grey-text text-lighten-4 right" href="#!">More Links</a> } links={ <ul> <li><a className="grey-text text-lighten-3" href="#!">Link 1</a></li> <li><a className="grey-text text-lighten-3" href="#!">Link 2</a></li> <li><a className="grey-text text-lighten-3" href="#!">Link 3</a></li> <li><a className="grey-text text-lighten-3" href="#!">Link 4</a></li> </ul> } className='example' > <h5 className="white-text">Footer Content</h5> <p className="grey-text text-lighten-4">You can use rows and columns here to organize your footer content.</p> </Footer>;
src/components/source/collection/list/CountryCollectionListContainer.js
mitmedialab/MediaCloud-Web-Tools
import PropTypes from 'prop-types'; import React from 'react'; import { injectIntl, FormattedMessage } from 'react-intl'; import { Grid, Row, Col } from 'react-flexbox-grid/lib'; import { connect } from 'react-redux'; import withAsyncData from '../../../common/hocs/AsyncDataContainer'; import CollectionIcon from '../../../common/icons/CollectionIcon'; import { fetchGeoCollectionsByCountry } from '../../../../actions/sourceActions'; import CollectionList from '../../../common/CollectionList'; import PageTitle from '../../../common/PageTitle'; const localMessages = { title: { id: 'sources.collections.geo.title', defaultMessage: 'Collections by Country' }, description: { id: 'sources.collections.geo.description', defaultMessage: 'We have curated a set of collections by geography. For each country below we have a national collection, which includes media sources that report about the whole country. For many countries we also have state- or province-level collections, for media sources that are published in and focus on that part of the country.' }, }; const CountryCollectionListContainer = ({ collectionsByCountry, user }) => ( <> <PageTitle value={localMessages.title} /> <Grid> <Row> <Col lg={10}> <h1> <CollectionIcon height={32} /> <FormattedMessage {...localMessages.title} /> </h1> <p><FormattedMessage {...localMessages.description} /></p> </Col> </Row> {collectionsByCountry.map((countryInfo, idx) => ( <Row key={idx}> <Col lg={10}> <div> <CollectionList collections={countryInfo.collections} title={countryInfo.country.name} user={user} dataCard={false} /> </div> </Col> </Row> ))} </Grid> </> ); CountryCollectionListContainer.propTypes = { // from state fetchStatus: PropTypes.string.isRequired, user: PropTypes.object.isRequired, collectionsByCountry: PropTypes.array.isRequired, // from context intl: PropTypes.object.isRequired, }; const mapStateToProps = state => ({ fetchStatus: state.sources.collections.geo.fetchStatus, user: state.user, collectionsByCountry: state.sources.collections.geo.byCountry, }); const fetchAsyncData = dispatch => dispatch(fetchGeoCollectionsByCountry()); export default injectIntl( connect(mapStateToProps)( withAsyncData(fetchAsyncData)( CountryCollectionListContainer ) ) );
app/javascript/packs/components/shared/List/index.js
NahlStudio/teamly-rails
import React from 'react'; function List(props) { return ( <li {...props}> {props.children} </li> ); } export default List;
src/components/button/index.js
bingqichen/cnode-react
import React from 'react'; import cx from 'classnames'; import './style.less'; export default (props) => { const { className, children, disabled = false, onClick = () => {} } = props; const cls = cx('component-button-wrap', className); return ( <button className={cls} disabled={disabled} onClick={onClick} >{children}</button> ); };
src/components/menus/ContextMenu/index.js
Secretmapper/react-transmission
import React from 'react'; import { Overlay } from 'react-overlays'; import Menu from './Menu'; function ContextMenu(props) { // TODO: Container should be App element return ( <Overlay show={props.show} placement={props.placement} target={props.target} shouldUpdatePosition={true} rootClose={true} onHide={props.onHide} > <Menu {...props} /> </Overlay> ); } export default ContextMenu;
examples/counter-static/common/components/Counter.js
retaxJS/retax
import React from 'react'; import { bindActionCreators } from 'redux'; import { Link } from 'react-router'; import { connect } from 'react-redux'; import { incrementActionCreator } from '../actionsCreators/counter'; export default connect( ({ counter }) => ({ counter }), dispatch => bindActionCreators({ incrementActionCreator }, dispatch) )( ({ counter, incrementActionCreator }) => ( <div> Hello Counter! Here is the counter value: {counter} <button onClick={incrementActionCreator}>+</button> <Link to="/about"><button>Go to /about</button></Link> </div> ) );
node_modules/react-icons/fa/share-square-o.js
bengimbel/Solstice-React-Contacts-Project
import React from 'react' import Icon from 'react-icon-base' const FaShareSquareO = props => ( <Icon viewBox="0 0 40 40" {...props}> <g><path d="m32.9 22.1v5.8q0 2.6-1.9 4.5t-4.5 1.9h-18.6q-2.6 0-4.5-1.9t-1.9-4.5v-18.6q0-2.7 1.9-4.6t4.5-1.8h5.7q0.3 0 0.5 0.2t0.2 0.5q0 0.6-0.5 0.7-1.8 0.6-3 1.3-0.2 0.1-0.4 0.1h-2.5q-1.4 0-2.5 1.1t-1 2.5v18.6q0 1.4 1 2.5t2.5 1h18.6q1.5 0 2.5-1t1.1-2.5v-4.8q0-0.4 0.4-0.7 0.6-0.3 1.2-0.8 0.3-0.4 0.8-0.2 0.4 0.2 0.4 0.7z m5.3-11.1l-8.6 8.6q-0.4 0.4-1 0.4-0.2 0-0.5-0.1-0.9-0.4-0.9-1.3v-4.3h-3.6q-7.2 0-9.7 2.9-2.7 3.1-1.7 10.6 0.1 0.5-0.4 0.7-0.2 0.1-0.3 0.1-0.4 0-0.6-0.3-0.2-0.3-0.4-0.7t-0.9-1.5-1.1-2.3-0.9-2.5-0.4-2.7q0-1.1 0.1-2.1t0.3-2 0.6-1.9 1.1-1.9 1.5-1.6 2.1-1.4 2.8-1.1 3.6-0.6 4.3-0.3h3.6v-4.3q0-0.9 0.9-1.3 0.3-0.1 0.5-0.1 0.6 0 1 0.4l8.6 8.6q0.4 0.4 0.4 1t-0.4 1z"/></g> </Icon> ) export default FaShareSquareO
SocioEconomicEcosystem/GreaterMiddleEast/PlateauingProcessesFlucGREATERMIDDLEEAST_COVID_files/ggiraphjs-0.3.0/ggiraphjs.min.js
efaysal/efaysal.github.io
var ggiraphjs=function(e){var t={};function n(i){if(t[i])return t[i].exports;var s=t[i]={i:i,l:!1,exports:{}};return e[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(i,s,function(t){return e[t]}.bind(null,s));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t){e.exports=d3},function(e,t,n){"use strict";var i;!function(){var n=void 0!==t&&t||{}||this||window;void 0===(i=function(){return n}.apply(t,[]))||(e.exports=i);var s="http://www.w3.org/2000/xmlns/",r=/url\(["']?(.+?)["']?\)/,o={woff2:"font/woff2",woff:"font/woff",otf:"application/x-font-opentype",ttf:"application/x-font-ttf",eot:"application/vnd.ms-fontobject",sfnt:"application/font-sfnt",svg:"image/svg+xml"},a=function(e){if(!function(e){return e instanceof HTMLElement||e instanceof SVGElement}(e))throw new Error("an HTMLElement or SVGElement is required; got "+e)},l=function(e,t,n){var i=e.viewBox&&e.viewBox.baseVal&&e.viewBox.baseVal[n]||null!==t.getAttribute(n)&&!t.getAttribute(n).match(/%$/)&&parseInt(t.getAttribute(n))||e.getBoundingClientRect()[n]||parseInt(t.style[n])||parseInt(window.getComputedStyle(e).getPropertyValue(n));return void 0===i||null===i||isNaN(parseFloat(i))?0:i},c=function(e){for(var t=window.atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],i=new ArrayBuffer(t.length),s=new Uint8Array(i),r=0;r<t.length;r++)s[r]=t.charCodeAt(r);return new Blob([i],{type:n})},h=function(e,t){var n=e.cssText.match(r),i=n&&n[1]||"";if(i&&!i.match(/^data:/)&&"about:blank"!==i){var s=i.startsWith("../")?t+"/../"+i:i.startsWith("./")?t+"/."+i:i;return{text:e.cssText,format:function(e){var t=Object.keys(o).filter(function(t){return e.indexOf("."+t)>0}).map(function(e){return o[e]});return t?t[0]:(console.error("Unknown font format for "+e+". Fonts may not be working correctly."),"application/octet-stream")}(s),url:s}}},u=function(e){return Promise.all(Array.from(e.querySelectorAll("image")).map(function(e){var t=e.getAttributeNS("http://www.w3.org/1999/xlink","href")||e.getAttribute("href");return t?(function(e){return e&&0===e.lastIndexOf("http",0)&&-1===e.lastIndexOf(window.location.host)}(t)&&(t+=(-1===t.indexOf("?")?"?":"&")+"t="+(new Date).valueOf()),new Promise(function(n,i){var s=document.createElement("canvas"),r=new Image;r.crossOrigin="anonymous",r.src=t,r.onerror=function(){return i(new Error("Could not load "+t))},r.onload=function(){s.width=r.width,s.height=r.height,s.getContext("2d").drawImage(r,0,0),e.setAttributeNS("http://www.w3.org/1999/xlink","href",s.toDataURL("image/png")),n(!0)}})):Promise.resolve(null)}))},d={},f=function(e){return Promise.all(e.map(function(e){return new Promise(function(t,n){if(d[e.url])return t(d[e.url]);var i=new XMLHttpRequest;i.addEventListener("load",function(){var n=function(e){for(var t="",n=new Uint8Array(e),i=0;i<n.byteLength;i++)t+=String.fromCharCode(n[i]);return window.btoa(t)}(i.response),s=e.text.replace(r,'url("data:'+e.format+";base64,"+n+'")')+"\n";d[e.url]=s,t(s)}),i.addEventListener("error",function(n){console.warn("Failed to load font from: "+e.url,n),d[e.url]=null,t(null)}),i.addEventListener("abort",function(n){console.warn("Aborted loading font from: "+e.url,n),t(null)}),i.open("GET",e.url),i.responseType="arraybuffer",i.send()})})).then(function(e){return e.filter(function(e){return e}).join("")})},v=null,p=function(e,t){var n=t||{},i=n.selectorRemap,s=n.modifyStyle,r=n.modifyCss,o=n.fonts,a=r||function(e,t){return(i?i(e):e)+"{"+(s?s(t):t)+"}\n"},l=[],c=void 0===o,u=o||[];return(v||(v=Array.from(document.styleSheets).map(function(e){try{return{rules:e.cssRules,href:e.href}}catch(t){return console.warn("Stylesheet could not be loaded: "+e.href,t),{}}}))).forEach(function(t){var n=t.rules,i=t.href;n&&Array.from(n).forEach(function(t){if(void 0!==t.style)if(function(e,t){if(t)try{return e.querySelector(t)||e.parentNode&&e.parentNode.querySelector(t)}catch(e){console.warn('Invalid CSS selector "'+t+'"',e)}}(e,t.selectorText))l.push(a(t.selectorText,t.style.cssText));else if(c&&t.cssText.match(/^@font-face/)){var n=h(t,i);n&&u.push(n)}else l.push(t.cssText)})}),f(u).then(function(e){return l.join("\n")+e})};n.prepareSvg=function(e,t,n){a(e);var i=t||{},r=i.left,o=void 0===r?0:r,c=i.top,h=void 0===c?0:c,d=i.width,f=i.height,v=i.scale,g=void 0===v?1:v,m=i.responsive,y=void 0!==m&&m;return u(e).then(function(){var i=e.cloneNode(!0),r=(t||{}).backgroundColor,a=void 0===r?"transparent":r;i.style.backgroundColor=a;var c=function(e,t,n,i){if("svg"===e.tagName)return{width:n||l(e,t,"width"),height:i||l(e,t,"height")};if(e.getBBox){var s=e.getBBox(),r=s.x,o=s.y;return{width:r+s.width,height:o+s.height}}}(e,i,d,f),u=c.width,v=c.height;if("svg"!==e.tagName){if(!e.getBBox)return void console.error("Attempted to render non-SVG element",e);i.setAttribute("transform",i.getAttribute("transform").replace(/translate\(.*?\)/,""));var m=document.createElementNS("http://www.w3.org/2000/svg","svg");m.appendChild(i),i=m}return i.setAttribute("version","1.1"),i.setAttribute("viewBox",[o,h,u,v].join(" ")),i.getAttribute("xmlns")||i.setAttributeNS(s,"xmlns","http://www.w3.org/2000/svg"),i.getAttribute("xmlns:xlink")||i.setAttributeNS(s,"xmlns:xlink","http://www.w3.org/1999/xlink"),y?(i.removeAttribute("width"),i.removeAttribute("height"),i.setAttribute("preserveAspectRatio","xMinYMin meet")):(i.setAttribute("width",u*g),i.setAttribute("height",v*g)),Array.from(i.querySelectorAll("foreignObject > *")).forEach(function(e){e.getAttribute("xmlns")||e.setAttributeNS(s,"xmlns","http://www.w3.org/1999/xhtml")}),p(e,t).then(function(e){var t=document.createElement("style");t.setAttribute("type","text/css"),t.innerHTML="<![CDATA[\n"+e+"\n]]>";var s=document.createElement("defs");s.appendChild(t),i.insertBefore(s,i.firstChild);var r=document.createElement("div");r.appendChild(i);var o=r.innerHTML.replace(/NS\d+:href/gi,'xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href');if("function"!=typeof n)return{src:o,width:u,height:v};n(o,u,v)})})},n.svgAsDataUri=function(e,t,i){a(e);var s=n.prepareSvg(e,t).then(function(e){var t=e.src;return"data:image/svg+xml;base64,"+window.btoa(function(e){return decodeURIComponent(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){var n=String.fromCharCode("0x"+t);return"%"===n?"%25":n}))}('<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [<!ENTITY nbsp "&#160;">]>'+t))});return"function"==typeof i?s.then(i):s},n.svgAsPngUri=function(e,t,i){a(e);var s=t||{},r=s.encoderType,o=void 0===r?"image/png":r,l=s.encoderOptions,c=void 0===l?.8:l,h=s.canvg,u=function(e){var t=e.src,n=e.width,s=e.height,r=document.createElement("canvas"),a=r.getContext("2d"),l=window.devicePixelRatio||1;r.width=n*l,r.height=s*l,r.style.width=r.width+"px",r.style.height=r.height+"px",a.setTransform(l,0,0,l,0,0),h?h(r,t):a.drawImage(t,0,0);var u=void 0;try{u=r.toDataURL(o,c)}catch(e){if("undefined"!=typeof SecurityError&&e instanceof SecurityError||"SecurityError"===e.name)return void console.error("Rendered SVG images cannot be downloaded in this browser.");throw e}return"function"==typeof i&&i(u),Promise.resolve(u)};return h?n.prepareSvg(e,t).then(u):n.svgAsDataUri(e,t).then(function(e){return new Promise(function(t,n){var i=new Image;i.onload=function(){return t(u({src:i,width:i.width,height:i.height}))},i.onerror=function(){n("There was an error loading the data URI as an image on the following SVG\n"+window.atob(e.slice(26))+"Open the following link to see browser's diagnosis\n"+e)},i.src=e})})},n.download=function(e,t){if(navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(c(t),e);else{var n=document.createElement("a");if("download"in n){n.download=e,n.style.display="none",document.body.appendChild(n);try{var i=c(t),s=URL.createObjectURL(i);n.href=s,n.onclick=function(){return requestAnimationFrame(function(){return URL.revokeObjectURL(s)})}}catch(e){console.warn("This browser does not support object URLs. Falling back to string URL."),n.href=t}n.click(),document.body.removeChild(n)}else window.open(t,"_temp","menubar=no,toolbar=no,status=no")}},n.saveSvg=function(e,t,i){a(e),n.svgAsDataUri(e,i||{},function(e){return n.download(t,e)})},n.saveSvgAsPng=function(e,t,i){a(e),n.svgAsPngUri(e,i||{},function(e){return n.download(t,e)})}}()},function(e,t,n){e.exports=n(4)},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var i=n(0);function s(){var e,t=navigator.userAgent,n=t.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(n[1])?"IE "+((e=/\brv[ :]+(\d+)/g.exec(t)||[])[1]||""):"Chrome"===n[1]&&null!==(e=t.match(/\b(OPR|Edge)\/(\d+)/))?e.slice(1).join(" ").replace("OPR","Opera"):(n=n[2]?[n[1],n[2]]:[navigator.appName,navigator.appVersion,"-?"],null!==(e=t.match(/version\/(\d+)/i))&&n.splice(1,1,e[1]),n.join(" "))}function r(e){return e.constructor.toString().indexOf("Array")>-1}var o=n(1);function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var l=function(){function e(t,n,i,s,r,o,a,l){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.containerid=t,this.svgid=n,this.clsName=i,this.position=s,this.zoomHandler=r,this.selectionHandler=o,this.saveaspng=a,this.pngname=l}return function(e,t,n){t&&a(e.prototype,t),n&&a(e,n)}(e,[{key:"init",value:function(){if(!(this.zoomHandler||this.selectionHandler||this.saveaspng))return!1;var e=i.select("#"+this.containerid+" .girafe_container_std").append("div").classed(this.clsName,!0).classed(this.clsName+"-"+this.position,!0),t=this;if(this.selectionHandler){var n=e.append("div").classed(this.clsName+"-block",!0).classed("shinyonly",!0);n.append("a").classed(this.clsName+"-icon",!0).classed("neutral",!0).attr("title","lasso selection").on("click",function(){t.selectionHandler.lasso(!0)}).html(c.lasso_on),n.append("a").classed(this.clsName+"-icon",!0).classed("drop",!0).attr("title","lasso deselection").on("click",function(){t.selectionHandler.lasso(!1)}).html(c.lasso_off)}if(this.zoomHandler){var s=e.append("div").classed(this.clsName+"-block",!0);s.append("a").classed(this.clsName+"-icon",!0).classed("neutral",!0).attr("title","pan-zoom reset").on("click",function(){t.zoomHandler.zoomIdentity()}).html(c.pan_zoom_reset),s.append("a").classed(this.clsName+"-icon",!0).classed("neutral",!0).attr("title","activate pan-zoom").on("click",function(){t.zoomHandler.zoomOn()}).html(c.zoom_on),s.append("a").classed(this.clsName+"-icon",!0).classed("drop",!0).attr("title","deactivate pan-zoom").on("click",function(){t.zoomHandler.zoomOff()}).html(c.zoom_off)}this.saveaspng&&e.append("div").classed(this.clsName+"-block",!0).append("a").classed(this.clsName+"-icon",!0).classed("neutral",!0).attr("title","download png").on("click",function(){"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")?o.saveSvgAsPng(document.getElementById(t.svgid),t.pngname+".png",{encoderOptions:1}):console.error("This navigator does not support Promises")}).html(c.save_as_png);var r=i.select("#"+this.containerid).node();return r.addEventListener("mouseover",this),r.addEventListener("mouseout",this),!0}},{key:"destroy",value:function(){var e=i.select("#"+this.containerid),t=e.select("."+this.clsName);try{e.node().removeEventListener("mouseover",this),e.node().removeEventListener("mouseout",this)}catch(e){console.error(e)}try{t.selectAll("."+this.clsName+"-icon").on("click",null)}catch(e){console.error(e)}t.remove()}},{key:"handleEvent",value:function(e){try{var t=i.select("#"+this.containerid).select("."+this.clsName);"mouseover"==e.type?t.transition().duration(200).style("opacity",.8):"mouseout"==e.type&&t.transition().duration(500).style("opacity",0)}catch(e){console.error(e)}}}]),e}(),c={lasso_on:"<svg width='15pt' height='15pt' viewBox='0 0 230 230'><g><ellipse ry='65.5' rx='86.5' cy='94' cx='115.5' stroke-width='20' fill='transparent'/><ellipse ry='11.500001' rx='10.5' cy='153' cx='91.5' stroke-width='20' fill='transparent'/><line y2='210.5' x2='105' y1='164.5' x1='96' stroke-width='20'/></g></svg>",lasso_off:"<svg width='15pt' height='15pt' viewBox='0 0 230 230'><g><ellipse ry='65.5' rx='86.5' cy='94' cx='115.5' stroke-width='20' fill='transparent'/><ellipse ry='11.500001' rx='10.5' cy='153' cx='91.5' stroke-width='20' fill='transparent'/><line y2='210.5' x2='105' y1='164.5' x1='96' stroke-width='20'/></g></svg>",pan_zoom_reset:"<svg width='15pt' height='15pt' viewBox='0 0 512 512'><g><polygon points='274,209.7 337.9,145.9 288,96 416,96 416,224 366.1,174.1 302.3,238 '/><polygon points='274,302.3 337.9,366.1 288,416 416,416 416,288 366.1,337.9 302.3,274'/><polygon points='238,302.3 174.1,366.1 224,416 96,416 96,288 145.9,337.9 209.7,274'/><polygon points='238,209.7 174.1,145.9 224,96 96,96 96,224 145.9,174.1 209.7,238'/></g><svg>",zoom_on:"<svg width='15pt' height='15pt' viewBox='0 0 512 512'><g><ellipse ry='150' rx='150' cy='213' cx='203.5' stroke-width='50' fill='transparent'/><line y2='455.5' x2='416' y1='331.5' x1='301' stroke-width='50'/></g></svg>",zoom_off:"<svg width='15pt' height='15pt' viewBox='0 0 512 512'><g><ellipse ry='150' rx='150' cy='213' cx='203.5' stroke-width='50' fill='transparent'/><line y2='455.5' x2='416' y1='331.5' x1='301' stroke-width='50'/><line y2='455' x2='0' y1='0' x1='416' stroke-width='30'/></g></svg>",save_as_png:"<svg width='15pt' height='15pt' viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'><g><polygon points='95 275 95 415 415 415 415 275 375 275 375 380 135 380 135 275'/><polygon points='220 30 220 250 150 175 150 245 250 345 350 245 350 175 280 250 280 30'/></g></svg>"};function h(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var u=function(){function e(t,n,i,s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.containerid=t,this.svgid=n,this.min=i,this.max=s,this.zoomer=null}return function(e,t,n){t&&h(e.prototype,t),n&&h(e,n)}(e,[{key:"init",value:function(){return!(1===this.min&&this.max<=1)&&(this.zoomer=i.zoom().scaleExtent([this.min,this.max]),!0)}},{key:"destroy",value:function(){this.zoomOff(),this.zoomer=null}},{key:"zoomOn",value:function(){var e=this.svgid;i.select("#"+this.containerid).call(this.zoomer.on("zoom",function(){i.select("#"+e+" g").attr("transform",i.event.transform)}))}},{key:"zoomIdentity",value:function(){i.select("#"+this.containerid).call(this.zoomer.transform,i.zoomIdentity)}},{key:"zoomOff",value:function(){i.select("#"+this.containerid).call(this.zoomer.on("zoom",null))}}]),e}();function d(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var f=function(){function e(t,n,i,s,r,o,a,l,c,h){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.svgid=t,this.clsName=n+"_"+this.svgid,this.opacity=i,this.offx=s,this.offy=r,this.usecursor=o,this.usefill=a,this.usestroke=l,this.delayover=c,this.delayout=h}return function(e,t,n){t&&d(e.prototype,t),n&&d(e,n)}(e,[{key:"init",value:function(){var e=i.select("#"+this.svgid).selectAll("*[title]");if(e.empty())return!1;i.select("."+this.clsName).empty()&&i.select("body").append("div").attr("class",this.clsName),i.select("."+this.clsName).style("position","absolute").style("opacity",0);var t=this;return e.each(function(){this.addEventListener("mouseover",t),this.addEventListener("mousemove",t),this.addEventListener("mouseout",t)}),!0}},{key:"destroy",value:function(){var e=this;try{i.select("#"+this.svgid).selectAll("*[title]").each(function(){this.removeEventListener("mouseover",e),this.removeEventListener("mousemove",e),this.removeEventListener("mouseout",e)})}catch(e){console.error(e)}i.select("."+this.clsName).remove()}},{key:"handleEvent",value:function(e){try{var t,n,s,r,o,a,l=i.select("."+this.clsName);"mouseover"==e.type?(this.usefill&&l.style("background-color",e.target.getAttribute("fill")),this.usestroke&&l.style("border-color",e.target.getAttribute("stroke")),l.html(e.target.getAttribute("title")),l.html(l.text()),o=l.node().getBoundingClientRect(),a=i.select("#"+this.svgid).node().parentNode.getBoundingClientRect(),this.usecursor?((s=(t=e.pageX+this.offx)+o.width-(a.x+a.width))>0&&(t-=s),(r=(n=e.pageY+this.offy)+o.height-(a.y+a.height+window.pageYOffset))>0&&(n-=r)):(t=this.offx+a.left,n=document.documentElement.scrollTop+a.y+this.offy),l.style("left",t+"px").style("top",n+"px").transition().duration(this.delayover).style("opacity",this.opacity)):"mousemove"==e.type?(o=l.node().getBoundingClientRect(),a=i.select("#"+this.svgid).node().parentNode.getBoundingClientRect(),this.usecursor?((s=(t=e.pageX+this.offx)+o.width-(a.x+a.width))>0&&(t-=s),(r=(n=e.pageY+this.offy)+o.height-(a.y+a.height+window.pageYOffset))>0&&(n-=r)):(t=this.offx+a.left,n=document.documentElement.scrollTop+a.y+this.offy),l.style("left",t+"px").style("top",n+"px")):"mouseout"==e.type&&l.transition().duration(this.delayout).style("opacity",0)}catch(e){console.error(e)}}}]),e}();function v(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var p=function(){function e(t,n,i,s,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.svgid=t,this.clsName=n+"_"+t,this.invClsName=i+"_"+t,this.attrName=s,this.shinyInputId=r,this.shinyMessageId=o,this.dataHovered=[]}return function(e,t,n){t&&v(e.prototype,t),n&&v(e,n)}(e,[{key:"init",value:function(){var e=i.select("#"+this.svgid).selectAll("*["+this.attrName+"]");if(e.empty())return!1;var t=this;return e.each(function(){this.addEventListener("mouseover",t),this.addEventListener("mouseout",t)}),this.shinyMessageId&&Shiny.addCustomMessageHandler(this.shinyMessageId,function(e){"string"==typeof e?t.setHovered([e]):r(e)&&t.setHovered(e)}),!0}},{key:"destroy",value:function(){var e=this;try{i.select("#"+this.svgid).selectAll("*["+this.attrName+"]").each(function(){this.removeEventListener("mouseover",e),this.removeEventListener("mouseout",e)})}catch(e){console.error(e)}if(this.shinyMessageId)try{Shiny.addCustomMessageHandler(this.shinyMessageId,function(e){})}catch(e){console.error(e)}this.dataHovered=[]}},{key:"handleEvent",value:function(e){try{"mouseover"==e.type?this.setHovered([e.target.getAttribute(this.attrName)]):"mouseout"==e.type&&this.setHovered([])}catch(e){console.error(e)}}},{key:"setHovered",value:function(e){this.dataHovered=e,this.refreshHovered(),this.shinyInputId&&Shiny.onInputChange(this.shinyInputId,this.dataHovered)}},{key:"refreshHovered",value:function(){var e=i.select("#"+this.svgid);e.selectAll("*["+this.attrName+"]."+this.clsName).classed(this.clsName,!1),this.invClsName&&e.selectAll("*["+this.attrName+"]."+this.invClsName).classed(this.invClsName,!1);for(var t=0;t<this.dataHovered.length;t++)e.selectAll("*["+this.attrName+'="'+this.dataHovered[t]+'"]').classed(this.clsName,!0);this.invClsName&&this.dataHovered.length>0&&e.selectAll("*["+this.attrName+"]:not(."+this.clsName+")").classed(this.invClsName,!0)}}]),e}();function g(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var m=function(){function e(t,n,i,s,r,o,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.svgid=t,this.clsName=n+"_"+t,this.attrName=i,this.shinyInputId=s,this.shinyMessageId=r,this.type=o,this.initialSelection=a,this.dataSelected=[]}return function(e,t,n){t&&g(e.prototype,t),n&&g(e,n)}(e,[{key:"init",value:function(){var e=i.select("#"+this.svgid).selectAll("*["+this.attrName+"]");if(e.empty()||"single"!=this.type&&"multiple"!=this.type)return!1;var t=this;return e.each(function(){this.addEventListener("click",t)}),this.shinyMessageId&&Shiny.addCustomMessageHandler(this.shinyMessageId,function(e){"string"==typeof e?t.setSelected([e]):r(e)&&t.setSelected(e)}),"string"==typeof this.initialSelection?this.setSelected([this.initialSelection]):r(this.initialSelection)&&"multiple"==this.type&&this.setSelected(this.initialSelection),this.initialSelection=null,!0}},{key:"destroy",value:function(){var e=this;try{i.select("#"+this.svgid).selectAll("*["+this.attrName+"]").each(function(){this.removeEventListener("click",e)})}catch(e){console.error(e)}if(this.shinyMessageId)try{Shiny.addCustomMessageHandler(this.shinyMessageId,function(e){})}catch(e){console.error(e)}this.dataSelected=[]}},{key:"handleEvent",value:function(e){try{var t=this.dataSelected,n=e.target.getAttribute(this.attrName),i=t.indexOf(n);"multiple"==this.type?i<0?t.push(n):t.splice(i,1):t=i<0?[n]:[],this.setSelected(t)}catch(e){console.error(e)}}},{key:"setSelected",value:function(e){this.dataSelected=e,this.refreshSelected(),this.shinyInputId&&Shiny.onInputChange(this.shinyInputId,this.dataSelected)}},{key:"refreshSelected",value:function(){var e=i.select("#"+this.svgid);e.selectAll("*["+this.attrName+"]."+this.clsName).classed(this.clsName,!1);for(var t=0;t<this.dataSelected.length;t++)e.selectAll("*["+this.attrName+'="'+this.dataSelected[t]+'"]').classed(this.clsName,!0)}},{key:"lasso",value:function(e){var t=i.select("#"+this.svgid),n=this,s=i.lasso();try{s=s.closePathSelect(!0).closePathDistance(100).items(t.selectAll("*["+this.attrName+"]")).targetArea(t).on("start",function(){}).on("draw",function(){}).on("end",function(){try{var i=n.dataSelected;s.selectedItems().each(function(t,s){var r=this.getAttribute(n.attrName),o=i.indexOf(r);o<0&&e?i.push(r):o>=0&&!e&&i.splice(o,1)}),t.on(".dragstart",null).on(".drag",null).on(".dragend",null),n.setSelected(i)}catch(e){console.error(e)}}),t.call(s)}catch(e){console.error(e)}}}]),e}();function y(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var w=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.containerid=t,this.svgid=null,this.handlers=[]}return function(e,t,n){t&&y(e.prototype,t),n&&y(e,n)}(e,[{key:"clear",value:function(){for(var e=0;e<this.handlers.length;e++)this.handlers[e].destroy();this.handlers=[],i.select("#"+this.containerid+" style").remove(),i.select("#"+this.containerid+" div.girafe_container_std").remove()}},{key:"setSvgId",value:function(e){this.svgid=e}},{key:"addStyle",value:function(e){var t=e.join("\n").replace(/SVGID_/g,this.svgid);i.select("#"+this.containerid).append("style").text(t)}},{key:"addSvg",value:function(e,t){(i.select("#"+this.containerid).append("div").attr("class","girafe_container_std").html(e),t)&&function(e){var t=e.indexOf("{"),n=e.substring(t+1,e.lastIndexOf("}")),i=e.substring(0,t),s=i.substring(i.indexOf("(")+1,i.lastIndexOf(")")).split(",");function r(){return Function.apply(this,s)}return s.push(n),r.prototype=Function.prototype,new r}(t)()}},{key:"IEFixResize",value:function(e,t){"IE 11"!=s()&&"MSIE"!==s().substring(0,4)||(i.select("#"+this.svgid).classed("girafe_svg_ie",!0),i.select("#"+this.containerid+" div").classed("girafe_container_ie",!0).style("width",Math.round(100*e)+"%").style("padding-bottom",Math.round(e*t*100)+"%"))}},{key:"autoScale",value:function(e){i.select("#"+this.svgid).style("width",e).style("height","100%").style("margin-left","auto").style("margin-right","auto")}},{key:"fixSize",value:function(e,t){i.select("#"+this.svgid).attr("preserveAspectRatio","xMidYMin meet"),i.select("#"+this.containerid+" .girafe_container_std").style("width","100%"),i.select("#"+this.svgid).attr("width",e).attr("height",t),i.select("#"+this.svgid).style("width",e).style("height",t)}},{key:"setSizeLimits",value:function(e,t,n,s){i.select("#"+this.svgid).style("max-width",e).style("max-height",n).style("min-width",t).style("min-height",s)}},{key:"removeContainerLimits",value:function(){"IE 11"==s()||"MSIE"===s().substring(0,4)||i.select("#"+this.containerid).style("width",null).style("height",null)}},{key:"setupTooltip",value:function(e,t,n,i,s,r,o,a,l){try{var c=new f(this.svgid,e,t,n,i,s,r,o,a,l);c.init()&&this.handlers.push(c)}catch(e){console.error(e)}}},{key:"setupHover",value:function(e,t){for(var n=0;n<e.length;n++){var i=e[n];try{var s=t&&i.reactive?this.containerid+i.inputSuffix:null,r=t&&i.reactive?this.containerid+i.messageSuffix:null,o=new p(this.svgid,i.classPrefix,i.invClassPrefix,i.attrName,s,r);o.init()&&this.handlers.push(o)}catch(e){console.error(e)}}}},{key:"setupSelection",value:function(e,t){for(var n=0;n<e.length;n++){var i=e[n];try{if((t||!i.only_shiny)&&("single"==i.type||"multiple"==i.type)){var s=t?this.containerid+i.inputSuffix:null,r=t?this.containerid+i.messageSuffix:null,o=new m(this.svgid,i.classPrefix,i.attrName,s,r,i.type,i.selected);o.init()&&this.handlers.push(o)}}catch(e){console.error(e)}}}},{key:"setupZoom",value:function(e,t){try{var n=new u(this.containerid,this.svgid,e,t);n.init()&&this.handlers.push(n)}catch(e){console.error(e)}}},{key:"setupToolbar",value:function(e,t,n,i){try{for(var s=null,r=null,o=0;o<this.handlers.length;o++){var a=this.handlers[o];a instanceof u?s=a:a instanceof m&&"data-id"==a.attrName&&"multiple"==a.type&&(r=a)}var c=new l(this.containerid,this.svgid,e,t,s,r,n,i);c.init()&&this.handlers.push(c)}catch(e){console.error(e)}}}]),e}();n(3);function x(e){return new w(e)}n.d(t,"newgi",function(){return x})}]);
ajax/libs/swagger-ui/3.20.5/swagger-ui-bundle.js
extend1994/cdnjs
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SwaggerUIBundle=t():e.SwaggerUIBundle=t()}(this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist",n(n.s=446)}([function(e,t,n){"use strict";e.exports=n(75)},function(e,t,n){e.exports=n(854)()},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(263),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,i.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},function(e,t,n){e.exports={default:n(767),__esModule:!0}},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(45),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,i.default)(t))&&"function"!=typeof t?e:t}},function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(769)),o=a(n(350)),i=a(n(45));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,i.default)(t)));e.prototype=(0,o.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r.default?(0,r.default)(e,t):e.__proto__=t)}},function(e,t,n){var r;r=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return a(e)?e:J(e)}function r(e){return u(e)?e:Y(e)}function o(e){return s(e)?e:K(e)}function i(e){return a(e)&&!l(e)?e:G(e)}function a(e){return!(!e||!e[f])}function u(e){return!(!e||!e[p])}function s(e){return!(!e||!e[d])}function l(e){return u(e)||s(e)}function c(e){return!(!e||!e[h])}t(r,n),t(o,n),t(i,n),n.isIterable=a,n.isKeyed=u,n.isIndexed=s,n.isAssociative=l,n.isOrdered=c,n.Keyed=r,n.Indexed=o,n.Set=i;var f="@@__IMMUTABLE_ITERABLE__@@",p="@@__IMMUTABLE_KEYED__@@",d="@@__IMMUTABLE_INDEXED__@@",h="@@__IMMUTABLE_ORDERED__@@",v=5,m=1<<v,g=m-1,y={},b={value:!1},_={value:!1};function w(e){return e.value=!1,e}function E(e){e&&(e.value=!0)}function x(){}function S(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),o=0;o<n;o++)r[o]=e[o+t];return r}function C(e){return void 0===e.size&&(e.size=e.__iterate(A)),e.size}function k(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?C(e)+t:t}function A(){return!0}function O(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function P(e,t){return M(e,t,0)}function T(e,t){return M(e,t,t)}function M(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var I=0,j=1,N=2,R="function"==typeof Symbol&&Symbol.iterator,D="@@iterator",L=R||D;function U(e){this.next=e}function q(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function F(){return{value:void 0,done:!0}}function z(e){return!!H(e)}function B(e){return e&&"function"==typeof e.next}function V(e){var t=H(e);return t&&t.call(e)}function H(e){var t=e&&(R&&e[R]||e[D]);if("function"==typeof t)return t}function W(e){return e&&"number"==typeof e.length}function J(e){return null===e||void 0===e?ie():a(e)?e.toSeq():function(e){var t=se(e)||"object"==typeof e&&new te(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function Y(e){return null===e||void 0===e?ie().toKeyedSeq():a(e)?u(e)?e.toSeq():e.fromEntrySeq():ae(e)}function K(e){return null===e||void 0===e?ie():a(e)?u(e)?e.entrySeq():e.toIndexedSeq():ue(e)}function G(e){return(null===e||void 0===e?ie():a(e)?u(e)?e.entrySeq():e:ue(e)).toSetSeq()}U.prototype.toString=function(){return"[Iterator]"},U.KEYS=I,U.VALUES=j,U.ENTRIES=N,U.prototype.inspect=U.prototype.toSource=function(){return this.toString()},U.prototype[L]=function(){return this},t(J,n),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},J.prototype.__iterate=function(e,t){return le(this,e,t,!0)},J.prototype.__iterator=function(e,t){return ce(this,e,t,!0)},t(Y,J),Y.prototype.toKeyedSeq=function(){return this},t(K,J),K.of=function(){return K(arguments)},K.prototype.toIndexedSeq=function(){return this},K.prototype.toString=function(){return this.__toString("Seq [","]")},K.prototype.__iterate=function(e,t){return le(this,e,t,!1)},K.prototype.__iterator=function(e,t){return ce(this,e,t,!1)},t(G,J),G.of=function(){return G(arguments)},G.prototype.toSetSeq=function(){return this},J.isSeq=oe,J.Keyed=Y,J.Set=G,J.Indexed=K;var $,Z,X,Q="@@__IMMUTABLE_SEQ__@@";function ee(e){this._array=e,this.size=e.length}function te(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function ne(e){this._iterable=e,this.size=e.length||e.size}function re(e){this._iterator=e,this._iteratorCache=[]}function oe(e){return!(!e||!e[Q])}function ie(){return $||($=new ee([]))}function ae(e){var t=Array.isArray(e)?new ee(e).fromEntrySeq():B(e)?new re(e).fromEntrySeq():z(e)?new ne(e).fromEntrySeq():"object"==typeof e?new te(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function ue(e){var t=se(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function se(e){return W(e)?new ee(e):B(e)?new re(e):z(e)?new ne(e):void 0}function le(e,t,n,r){var o=e._cache;if(o){for(var i=o.length-1,a=0;a<=i;a++){var u=o[n?i-a:a];if(!1===t(u[1],r?u[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function ce(e,t,n,r){var o=e._cache;if(o){var i=o.length-1,a=0;return new U(function(){var e=o[n?i-a:a];return a++>i?{value:void 0,done:!0}:q(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function fe(e,t){return t?function e(t,n,r,o){if(Array.isArray(n))return t.call(o,r,K(n).map(function(r,o){return e(t,r,o,n)}));if(de(n))return t.call(o,r,Y(n).map(function(r,o){return e(t,r,o,n)}));return n}(t,e,"",{"":e}):pe(e)}function pe(e){return Array.isArray(e)?K(e).map(pe).toList():de(e)?Y(e).map(pe).toMap():e}function de(e){return e&&(e.constructor===Object||void 0===e.constructor)}function he(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function ve(e,t){if(e===t)return!0;if(!a(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||u(e)!==u(t)||s(e)!==s(t)||c(e)!==c(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!l(e);if(c(e)){var r=e.entries();return t.every(function(e,t){var o=r.next().value;return o&&he(o[1],e)&&(n||he(o[0],t))})&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var i=e;e=t,t=i}var f=!0,p=t.__iterate(function(t,r){if(n?!e.has(t):o?!he(t,e.get(r,y)):!he(e.get(r,y),t))return f=!1,!1});return f&&e.size===p}function me(e,t){if(!(this instanceof me))return new me(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(Z)return Z;Z=this}}function ge(e,t){if(!e)throw new Error(t)}function ye(e,t,n){if(!(this instanceof ye))return new ye(e,t,n);if(ge(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t<e&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if(X)return X;X=this}}function be(){throw TypeError("Abstract")}function _e(){}function we(){}function Ee(){}J.prototype[Q]=!0,t(ee,K),ee.prototype.get=function(e,t){return this.has(e)?this._array[k(this,e)]:t},ee.prototype.__iterate=function(e,t){for(var n=this._array,r=n.length-1,o=0;o<=r;o++)if(!1===e(n[t?r-o:o],o,this))return o+1;return o},ee.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,o=0;return new U(function(){return o>r?{value:void 0,done:!0}:q(e,o,n[t?r-o++:o++])})},t(te,Y),te.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},te.prototype.has=function(e){return this._object.hasOwnProperty(e)},te.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,i=0;i<=o;i++){var a=r[t?o-i:i];if(!1===e(n[a],a,this))return i+1}return i},te.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,i=0;return new U(function(){var a=r[t?o-i:i];return i++>o?{value:void 0,done:!0}:q(e,a,n[a])})},te.prototype[h]=!0,t(ne,K),ne.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=V(this._iterable),r=0;if(B(n))for(var o;!(o=n.next()).done&&!1!==e(o.value,r++,this););return r},ne.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=V(this._iterable);if(!B(n))return new U(F);var r=0;return new U(function(){var t=n.next();return t.done?t:q(e,r++,t.value)})},t(re,K),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,o=this._iteratorCache,i=0;i<o.length;)if(!1===e(o[i],i++,this))return i;for(;!(n=r.next()).done;){var a=n.value;if(o[i]=a,!1===e(a,i++,this))break}return i},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterator,r=this._iteratorCache,o=0;return new U(function(){if(o>=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return q(e,o,r[o++])})},t(me,K),me.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},me.prototype.get=function(e,t){return this.has(e)?this._value:t},me.prototype.includes=function(e){return he(this._value,e)},me.prototype.slice=function(e,t){var n=this.size;return O(e,t,n)?this:new me(this._value,T(t,n)-P(e,n))},me.prototype.reverse=function(){return this},me.prototype.indexOf=function(e){return he(this._value,e)?0:-1},me.prototype.lastIndexOf=function(e){return he(this._value,e)?this.size:-1},me.prototype.__iterate=function(e,t){for(var n=0;n<this.size;n++)if(!1===e(this._value,n,this))return n+1;return n},me.prototype.__iterator=function(e,t){var n=this,r=0;return new U(function(){return r<n.size?q(e,r++,n._value):{value:void 0,done:!0}})},me.prototype.equals=function(e){return e instanceof me?he(this._value,e._value):ve(e)},t(ye,K),ye.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},ye.prototype.get=function(e,t){return this.has(e)?this._start+k(this,e)*this._step:t},ye.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},ye.prototype.slice=function(e,t){return O(e,t,this.size)?this:(e=P(e,this.size),(t=T(t,this.size))<=e?new ye(0,0):new ye(this.get(e,this._end),this.get(t,this._end),this._step))},ye.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step==0){var n=t/this._step;if(n>=0&&n<this.size)return n}return-1},ye.prototype.lastIndexOf=function(e){return this.indexOf(e)},ye.prototype.__iterate=function(e,t){for(var n=this.size-1,r=this._step,o=t?this._start+n*r:this._start,i=0;i<=n;i++){if(!1===e(o,i,this))return i+1;o+=t?-r:r}return i},ye.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,o=t?this._start+n*r:this._start,i=0;return new U(function(){var a=o;return o+=t?-r:r,i>n?{value:void 0,done:!0}:q(e,i++,a)})},ye.prototype.equals=function(e){return e instanceof ye?this._start===e._start&&this._end===e._end&&this._step===e._step:ve(this,e)},t(be,n),t(_e,be),t(we,be),t(Ee,be),be.Keyed=_e,be.Indexed=we,be.Set=Ee;var xe="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function Se(e){return e>>>1&1073741824|3221225471&e}function Ce(e){if(!1===e||null===e||void 0===e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null===e||void 0===e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return Se(n)}if("string"===t)return e.length>je?function(e){var t=De[e];void 0===t&&(t=ke(e),Re===Ne&&(Re=0,De={}),Re++,De[e]=t);return t}(e):ke(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return function(e){var t;if(Te&&void 0!==(t=Pe.get(e)))return t;if(void 0!==(t=e[Ie]))return t;if(!Oe){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Ie]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}t=++Me,1073741824&Me&&(Me=0);if(Te)Pe.set(e,t);else{if(void 0!==Ae&&!1===Ae(e))throw new Error("Non-extensible objects are not allowed as keys.");if(Oe)Object.defineProperty(e,Ie,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Ie]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Ie]=t}}return t}(e);if("function"==typeof e.toString)return ke(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ke(e){for(var t=0,n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Se(t)}var Ae=Object.isExtensible,Oe=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();var Pe,Te="function"==typeof WeakMap;Te&&(Pe=new WeakMap);var Me=0,Ie="__immutablehash__";"function"==typeof Symbol&&(Ie=Symbol(Ie));var je=16,Ne=255,Re=0,De={};function Le(e){ge(e!==1/0,"Cannot perform this action with an infinite size.")}function Ue(e){return null===e||void 0===e?Xe():qe(e)&&!c(e)?e:Xe().withMutations(function(t){var n=r(e);Le(n.size),n.forEach(function(e,n){return t.set(n,e)})})}function qe(e){return!(!e||!e[ze])}t(Ue,_e),Ue.of=function(){var t=e.call(arguments,0);return Xe().withMutations(function(e){for(var n=0;n<t.length;n+=2){if(n+1>=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}})},Ue.prototype.toString=function(){return this.__toString("Map {","}")},Ue.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},Ue.prototype.set=function(e,t){return Qe(this,e,t)},Ue.prototype.setIn=function(e,t){return this.updateIn(e,y,function(){return t})},Ue.prototype.remove=function(e){return Qe(this,e,y)},Ue.prototype.deleteIn=function(e){return this.updateIn(e,function(){return y})},Ue.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},Ue.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=function e(t,n,r,o){var i=t===y;var a=n.next();if(a.done){var u=i?r:t,s=o(u);return s===u?t:s}ge(i||t&&t.set,"invalid keyPath");var l=a.value;var c=i?y:t.get(l,y);var f=e(c,n,r,o);return f===c?t:f===y?t.remove(l):(i?Xe():t).set(l,f)}(this,nn(e),t,n);return r===y?void 0:r},Ue.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Xe()},Ue.prototype.merge=function(){return rt(this,void 0,arguments)},Ue.prototype.mergeWith=function(t){return rt(this,t,e.call(arguments,1))},Ue.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,Xe(),function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]})},Ue.prototype.mergeDeep=function(){return rt(this,ot,arguments)},Ue.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return rt(this,it(t),n)},Ue.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,Xe(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]})},Ue.prototype.sort=function(e){return Pt(Wt(this,e))},Ue.prototype.sortBy=function(e,t){return Pt(Wt(this,t,e))},Ue.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},Ue.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new x)},Ue.prototype.asImmutable=function(){return this.__ensureOwner()},Ue.prototype.wasAltered=function(){return this.__altered},Ue.prototype.__iterator=function(e,t){return new Ke(this,e,t)},Ue.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},Ue.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Ze(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Ue.isMap=qe;var Fe,ze="@@__IMMUTABLE_MAP__@@",Be=Ue.prototype;function Ve(e,t){this.ownerID=e,this.entries=t}function He(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function We(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Je(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Ye(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function Ke(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&$e(e._root)}function Ge(e,t){return q(e,t[0],t[1])}function $e(e,t){return{node:e,index:0,__prev:t}}function Ze(e,t,n,r){var o=Object.create(Be);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Xe(){return Fe||(Fe=Ze(0))}function Qe(e,t,n){var r,o;if(e._root){var i=w(b),a=w(_);if(r=et(e._root,e.__ownerID,0,void 0,t,n,i,a),!a.value)return e;o=e.size+(i.value?n===y?-1:1:0)}else{if(n===y)return e;o=1,r=new Ve(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?Ze(o,r):Xe()}function et(e,t,n,r,o,i,a,u){return e?e.update(t,n,r,o,i,a,u):i===y?e:(E(u),E(a),new Ye(t,r,[o,i]))}function tt(e){return e.constructor===Ye||e.constructor===Je}function nt(e,t,n,r,o){if(e.keyHash===r)return new Je(t,r,[e.entry,o]);var i,a=(0===n?e.keyHash:e.keyHash>>>n)&g,u=(0===n?r:r>>>n)&g;return new He(t,1<<a|1<<u,a===u?[nt(e,t,n+v,r,o)]:(i=new Ye(t,r,o),a<u?[e,i]:[i,e]))}function rt(e,t,n){for(var o=[],i=0;i<n.length;i++){var u=n[i],s=r(u);a(u)||(s=s.map(function(e){return fe(e)})),o.push(s)}return at(e,t,o)}function ot(e,t,n){return e&&e.mergeDeep&&a(t)?e.mergeDeep(t):he(e,t)?e:t}function it(e){return function(t,n,r){if(t&&t.mergeDeepWith&&a(n))return t.mergeDeepWith(e,n);var o=e(t,n,r);return he(t,o)?t:o}}function at(e,t,n){return 0===(n=n.filter(function(e){return 0!==e.size})).length?e:0!==e.size||e.__ownerID||1!==n.length?e.withMutations(function(e){for(var r=t?function(n,r){e.update(r,y,function(e){return e===y?n:t(e,n,r)})}:function(t,n){e.set(n,t)},o=0;o<n.length;o++)n[o].forEach(r)}):e.constructor(n[0])}function ut(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function st(e,t,n,r){var o=r?e:S(e);return o[t]=n,o}Be[ze]=!0,Be.delete=Be.remove,Be.removeIn=Be.deleteIn,Ve.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(he(n,o[i][0]))return o[i][1];return r},Ve.prototype.update=function(e,t,n,r,o,i,a){for(var u=o===y,s=this.entries,l=0,c=s.length;l<c&&!he(r,s[l][0]);l++);var f=l<c;if(f?s[l][1]===o:u)return this;if(E(a),(u||!f)&&E(i),!u||1!==s.length){if(!f&&!u&&s.length>=lt)return function(e,t,n,r){e||(e=new x);for(var o=new Ye(e,Ce(n),[n,r]),i=0;i<t.length;i++){var a=t[i];o=o.update(e,0,void 0,a[0],a[1])}return o}(e,s,r,o);var p=e&&e===this.ownerID,d=p?s:S(s);return f?u?l===c-1?d.pop():d[l]=d.pop():d[l]=[r,o]:d.push([r,o]),p?(this.entries=d,this):new Ve(e,d)}},He.prototype.get=function(e,t,n,r){void 0===t&&(t=Ce(n));var o=1<<((0===e?t:t>>>e)&g),i=this.bitmap;return 0==(i&o)?r:this.nodes[ut(i&o-1)].get(e+v,t,n,r)},He.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=Ce(r));var u=(0===t?n:n>>>t)&g,s=1<<u,l=this.bitmap,c=0!=(l&s);if(!c&&o===y)return this;var f=ut(l&s-1),p=this.nodes,d=c?p[f]:void 0,h=et(d,e,t+v,n,r,o,i,a);if(h===d)return this;if(!c&&h&&p.length>=ct)return function(e,t,n,r,o){for(var i=0,a=new Array(m),u=0;0!==n;u++,n>>>=1)a[u]=1&n?t[i++]:void 0;return a[r]=o,new We(e,i+1,a)}(e,p,l,u,h);if(c&&!h&&2===p.length&&tt(p[1^f]))return p[1^f];if(c&&h&&1===p.length&&tt(h))return h;var b=e&&e===this.ownerID,_=c?h?l:l^s:l|s,w=c?h?st(p,f,h,b):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var o=new Array(r),i=0,a=0;a<r;a++)a===t&&(i=1),o[a]=e[a+i];return o}(p,f,b):function(e,t,n,r){var o=e.length+1;if(r&&t+1===o)return e[t]=n,e;for(var i=new Array(o),a=0,u=0;u<o;u++)u===t?(i[u]=n,a=-1):i[u]=e[u+a];return i}(p,f,h,b);return b?(this.bitmap=_,this.nodes=w,this):new He(e,_,w)},We.prototype.get=function(e,t,n,r){void 0===t&&(t=Ce(n));var o=(0===e?t:t>>>e)&g,i=this.nodes[o];return i?i.get(e+v,t,n,r):r},We.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=Ce(r));var u=(0===t?n:n>>>t)&g,s=o===y,l=this.nodes,c=l[u];if(s&&!c)return this;var f=et(c,e,t+v,n,r,o,i,a);if(f===c)return this;var p=this.count;if(c){if(!f&&--p<ft)return function(e,t,n,r){for(var o=0,i=0,a=new Array(n),u=0,s=1,l=t.length;u<l;u++,s<<=1){var c=t[u];void 0!==c&&u!==r&&(o|=s,a[i++]=c)}return new He(e,o,a)}(e,l,p,u)}else p++;var d=e&&e===this.ownerID,h=st(l,u,f,d);return d?(this.count=p,this.nodes=h,this):new We(e,p,h)},Je.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(he(n,o[i][0]))return o[i][1];return r},Je.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=Ce(r));var u=o===y;if(n!==this.keyHash)return u?this:(E(a),E(i),nt(this,e,t,n,[r,o]));for(var s=this.entries,l=0,c=s.length;l<c&&!he(r,s[l][0]);l++);var f=l<c;if(f?s[l][1]===o:u)return this;if(E(a),(u||!f)&&E(i),u&&2===c)return new Ye(e,this.keyHash,s[1^l]);var p=e&&e===this.ownerID,d=p?s:S(s);return f?u?l===c-1?d.pop():d[l]=d.pop():d[l]=[r,o]:d.push([r,o]),p?(this.entries=d,this):new Je(e,this.keyHash,d)},Ye.prototype.get=function(e,t,n,r){return he(n,this.entry[0])?this.entry[1]:r},Ye.prototype.update=function(e,t,n,r,o,i,a){var u=o===y,s=he(r,this.entry[0]);return(s?o===this.entry[1]:u)?this:(E(a),u?void E(i):s?e&&e===this.ownerID?(this.entry[1]=o,this):new Ye(e,this.keyHash,[r,o]):(E(i),nt(this,e,t,Ce(r),[r,o])))},Ve.prototype.iterate=Je.prototype.iterate=function(e,t){for(var n=this.entries,r=0,o=n.length-1;r<=o;r++)if(!1===e(n[t?o-r:r]))return!1},He.prototype.iterate=We.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,o=n.length-1;r<=o;r++){var i=n[t?o-r:r];if(i&&!1===i.iterate(e,t))return!1}},Ye.prototype.iterate=function(e,t){return e(this.entry)},t(Ke,U),Ke.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,o=t.index++;if(r.entry){if(0===o)return Ge(e,r.entry)}else if(r.entries){if(o<=(n=r.entries.length-1))return Ge(e,r.entries[this._reverse?n-o:o])}else if(o<=(n=r.nodes.length-1)){var i=r.nodes[this._reverse?n-o:o];if(i){if(i.entry)return Ge(e,i.entry);t=this._stack=$e(i,t)}continue}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}};var lt=m/4,ct=m/2,ft=m/4;function pt(e){var t=Et();if(null===e||void 0===e)return t;if(dt(e))return e;var n=o(e),r=n.size;return 0===r?t:(Le(r),r>0&&r<m?wt(0,r,v,null,new mt(n.toArray())):t.withMutations(function(e){e.setSize(r),n.forEach(function(t,n){return e.set(n,t)})}))}function dt(e){return!(!e||!e[ht])}t(pt,we),pt.of=function(){return this(arguments)},pt.prototype.toString=function(){return this.__toString("List [","]")},pt.prototype.get=function(e,t){if((e=k(this,e))>=0&&e<this.size){var n=Ct(this,e+=this._origin);return n&&n.array[e&g]}return t},pt.prototype.set=function(e,t){return function(e,t,n){if((t=k(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?kt(e,t).set(0,n):kt(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,o=e._root,i=w(_);t>=Ot(e._capacity)?r=xt(r,e.__ownerID,0,t,n,i):o=xt(o,e.__ownerID,e._level,t,n,i);if(!i.value)return e;if(e.__ownerID)return e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e;return wt(e._origin,e._capacity,e._level,o,r)}(this,e,t)},pt.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},pt.prototype.insert=function(e,t){return this.splice(e,0,t)},pt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=v,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Et()},pt.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(n){kt(n,0,t+e.length);for(var r=0;r<e.length;r++)n.set(t+r,e[r])})},pt.prototype.pop=function(){return kt(this,0,-1)},pt.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){kt(t,-e.length);for(var n=0;n<e.length;n++)t.set(n,e[n])})},pt.prototype.shift=function(){return kt(this,1)},pt.prototype.merge=function(){return At(this,void 0,arguments)},pt.prototype.mergeWith=function(t){return At(this,t,e.call(arguments,1))},pt.prototype.mergeDeep=function(){return At(this,ot,arguments)},pt.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return At(this,it(t),n)},pt.prototype.setSize=function(e){return kt(this,0,e)},pt.prototype.slice=function(e,t){var n=this.size;return O(e,t,n)?this:kt(this,P(e,n),T(t,n))},pt.prototype.__iterator=function(e,t){var n=0,r=_t(this,t);return new U(function(){var t=r();return t===bt?{value:void 0,done:!0}:q(e,n++,t)})},pt.prototype.__iterate=function(e,t){for(var n,r=0,o=_t(this,t);(n=o())!==bt&&!1!==e(n,r++,this););return r},pt.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?wt(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):(this.__ownerID=e,this)},pt.isList=dt;var ht="@@__IMMUTABLE_LIST__@@",vt=pt.prototype;function mt(e,t){this.array=e,this.ownerID=t}vt[ht]=!0,vt.delete=vt.remove,vt.setIn=Be.setIn,vt.deleteIn=vt.removeIn=Be.removeIn,vt.update=Be.update,vt.updateIn=Be.updateIn,vt.mergeIn=Be.mergeIn,vt.mergeDeepIn=Be.mergeDeepIn,vt.withMutations=Be.withMutations,vt.asMutable=Be.asMutable,vt.asImmutable=Be.asImmutable,vt.wasAltered=Be.wasAltered,mt.prototype.removeBefore=function(e,t,n){if(n===t?1<<t:0===this.array.length)return this;var r=n>>>t&g;if(r>=this.array.length)return new mt([],e);var o,i=0===r;if(t>0){var a=this.array[r];if((o=a&&a.removeBefore(e,t-v,n))===a&&i)return this}if(i&&!o)return this;var u=St(this,e);if(!i)for(var s=0;s<r;s++)u.array[s]=void 0;return o&&(u.array[r]=o),u},mt.prototype.removeAfter=function(e,t,n){if(n===(t?1<<t:0)||0===this.array.length)return this;var r,o=n-1>>>t&g;if(o>=this.array.length)return this;if(t>0){var i=this.array[o];if((r=i&&i.removeAfter(e,t-v,n))===i&&o===this.array.length-1)return this}var a=St(this,e);return a.array.splice(o+1),r&&(a.array[o]=r),a};var gt,yt,bt={};function _t(e,t){var n=e._origin,r=e._capacity,o=Ot(r),i=e._tail;return a(e._root,e._level,0);function a(e,u,s){return 0===u?function(e,a){var u=a===o?i&&i.array:e&&e.array,s=a>n?0:n-a,l=r-a;l>m&&(l=m);return function(){if(s===l)return bt;var e=t?--l:s++;return u&&u[e]}}(e,s):function(e,o,i){var u,s=e&&e.array,l=i>n?0:n-i>>o,c=1+(r-i>>o);c>m&&(c=m);return function(){for(;;){if(u){var e=u();if(e!==bt)return e;u=null}if(l===c)return bt;var n=t?--c:l++;u=a(s&&s[n],o-v,i+(n<<o))}}}(e,u,s)}}function wt(e,t,n,r,o,i,a){var u=Object.create(vt);return u.size=t-e,u._origin=e,u._capacity=t,u._level=n,u._root=r,u._tail=o,u.__ownerID=i,u.__hash=a,u.__altered=!1,u}function Et(){return gt||(gt=wt(0,0,v))}function xt(e,t,n,r,o,i){var a,u=r>>>n&g,s=e&&u<e.array.length;if(!s&&void 0===o)return e;if(n>0){var l=e&&e.array[u],c=xt(l,t,n-v,r,o,i);return c===l?e:((a=St(e,t)).array[u]=c,a)}return s&&e.array[u]===o?e:(E(i),a=St(e,t),void 0===o&&u===a.array.length-1?a.array.pop():a.array[u]=o,a)}function St(e,t){return t&&e&&t===e.ownerID?e:new mt(e?e.array.slice():[],t)}function Ct(e,t){if(t>=Ot(e._capacity))return e._tail;if(t<1<<e._level+v){for(var n=e._root,r=e._level;n&&r>0;)n=n.array[t>>>r&g],r-=v;return n}}function kt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new x,o=e._origin,i=e._capacity,a=o+t,u=void 0===n?i:n<0?i+n:o+n;if(a===o&&u===i)return e;if(a>=u)return e.clear();for(var s=e._level,l=e._root,c=0;a+c<0;)l=new mt(l&&l.array.length?[void 0,l]:[],r),c+=1<<(s+=v);c&&(a+=c,o+=c,u+=c,i+=c);for(var f=Ot(i),p=Ot(u);p>=1<<s+v;)l=new mt(l&&l.array.length?[l]:[],r),s+=v;var d=e._tail,h=p<f?Ct(e,u-1):p>f?new mt([],r):d;if(d&&p>f&&a<i&&d.array.length){for(var m=l=St(l,r),y=s;y>v;y-=v){var b=f>>>y&g;m=m.array[b]=St(m.array[b],r)}m.array[f>>>v&g]=d}if(u<i&&(h=h&&h.removeAfter(r,0,u)),a>=p)a-=p,u-=p,s=v,l=null,h=h&&h.removeBefore(r,0,a);else if(a>o||p<f){for(c=0;l;){var _=a>>>s&g;if(_!==p>>>s&g)break;_&&(c+=(1<<s)*_),s-=v,l=l.array[_]}l&&a>o&&(l=l.removeBefore(r,s,a-c)),l&&p<f&&(l=l.removeAfter(r,s,p-c)),c&&(a-=c,u-=c)}return e.__ownerID?(e.size=u-a,e._origin=a,e._capacity=u,e._level=s,e._root=l,e._tail=h,e.__hash=void 0,e.__altered=!0,e):wt(a,u,s,l,h)}function At(e,t,n){for(var r=[],i=0,u=0;u<n.length;u++){var s=n[u],l=o(s);l.size>i&&(i=l.size),a(s)||(l=l.map(function(e){return fe(e)})),r.push(l)}return i>e.size&&(e=e.setSize(i)),at(e,t,r)}function Ot(e){return e<m?0:e-1>>>v<<v}function Pt(e){return null===e||void 0===e?It():Tt(e)?e:It().withMutations(function(t){var n=r(e);Le(n.size),n.forEach(function(e,n){return t.set(n,e)})})}function Tt(e){return qe(e)&&c(e)}function Mt(e,t,n,r){var o=Object.create(Pt.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=n,o.__hash=r,o}function It(){return yt||(yt=Mt(Xe(),Et()))}function jt(e,t,n){var r,o,i=e._map,a=e._list,u=i.get(t),s=void 0!==u;if(n===y){if(!s)return e;a.size>=m&&a.size>=2*i.size?(r=(o=a.filter(function(e,t){return void 0!==e&&u!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=i.remove(t),o=u===a.size-1?a.pop():a.set(u,void 0))}else if(s){if(n===a.get(u)[1])return e;r=i,o=a.set(u,[t,n])}else r=i.set(t,a.size),o=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):Mt(r,o)}function Nt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Rt(e){this._iter=e,this.size=e.size}function Dt(e){this._iter=e,this.size=e.size}function Lt(e){this._iter=e,this.size=e.size}function Ut(e){var t=Qt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=en,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(t===N){var r=e.__iterator(t,n);return new U(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===j?I:j,n)},t}function qt(e,t,n){var r=Qt(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var i=e.get(r,y);return i===y?o:t.call(n,i,r,e)},r.__iterateUncached=function(r,o){var i=this;return e.__iterate(function(e,o,a){return!1!==r(t.call(n,e,o,a),o,i)},o)},r.__iteratorUncached=function(r,o){var i=e.__iterator(N,o);return new U(function(){var o=i.next();if(o.done)return o;var a=o.value,u=a[0];return q(r,u,t.call(n,a[1],u,e),o)})},r}function Ft(e,t){var n=Qt(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Ut(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=en,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function zt(e,t,n,r){var o=Qt(e);return r&&(o.has=function(r){var o=e.get(r,y);return o!==y&&!!t.call(n,o,r,e)},o.get=function(r,o){var i=e.get(r,y);return i!==y&&t.call(n,i,r,e)?i:o}),o.__iterateUncached=function(o,i){var a=this,u=0;return e.__iterate(function(e,i,s){if(t.call(n,e,i,s))return u++,o(e,r?i:u-1,a)},i),u},o.__iteratorUncached=function(o,i){var a=e.__iterator(N,i),u=0;return new U(function(){for(;;){var i=a.next();if(i.done)return i;var s=i.value,l=s[0],c=s[1];if(t.call(n,c,l,e))return q(o,r?l:u++,c,i)}})},o}function Bt(e,t,n,r){var o=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=o:n|=0),O(t,n,o))return e;var i=P(t,o),a=T(n,o);if(i!=i||a!=a)return Bt(e.toSeq().cacheResult(),t,n,r);var u,s=a-i;s==s&&(u=s<0?0:s);var l=Qt(e);return l.size=0===u?u:e.size&&u||void 0,!r&&oe(e)&&u>=0&&(l.get=function(t,n){return(t=k(this,t))>=0&&t<u?e.get(t+i,n):n}),l.__iterateUncached=function(t,n){var o=this;if(0===u)return 0;if(n)return this.cacheResult().__iterate(t,n);var a=0,s=!0,l=0;return e.__iterate(function(e,n){if(!s||!(s=a++<i))return l++,!1!==t(e,r?n:l-1,o)&&l!==u}),l},l.__iteratorUncached=function(t,n){if(0!==u&&n)return this.cacheResult().__iterator(t,n);var o=0!==u&&e.__iterator(t,n),a=0,s=0;return new U(function(){for(;a++<i;)o.next();if(++s>u)return{value:void 0,done:!0};var e=o.next();return r||t===j?e:q(t,s-1,t===I?void 0:e.value[1],e)})},l}function Vt(e,t,n,r){var o=Qt(e);return o.__iterateUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterate(o,i);var u=!0,s=0;return e.__iterate(function(e,i,l){if(!u||!(u=t.call(n,e,i,l)))return s++,o(e,r?i:s-1,a)}),s},o.__iteratorUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterator(o,i);var u=e.__iterator(N,i),s=!0,l=0;return new U(function(){var e,i,c;do{if((e=u.next()).done)return r||o===j?e:q(o,l++,o===I?void 0:e.value[1],e);var f=e.value;i=f[0],c=f[1],s&&(s=t.call(n,c,i,a))}while(s);return o===N?e:q(o,i,c,e)})},o}function Ht(e,t,n){var r=Qt(e);return r.__iterateUncached=function(r,o){var i=0,u=!1;return function e(s,l){var c=this;s.__iterate(function(o,s){return(!t||l<t)&&a(o)?e(o,l+1):!1===r(o,n?s:i++,c)&&(u=!0),!u},o)}(e,0),i},r.__iteratorUncached=function(r,o){var i=e.__iterator(r,o),u=[],s=0;return new U(function(){for(;i;){var e=i.next();if(!1===e.done){var l=e.value;if(r===N&&(l=l[1]),t&&!(u.length<t)||!a(l))return n?e:q(r,s++,l,e);u.push(i),i=l.__iterator(r,o)}else i=u.pop()}return{value:void 0,done:!0}})},r}function Wt(e,t,n){t||(t=tn);var r=u(e),o=0,i=e.toSeq().map(function(t,r){return[r,t,o++,n?n(t,r,e):t]}).toArray();return i.sort(function(e,n){return t(e[3],n[3])||e[2]-n[2]}).forEach(r?function(e,t){i[t].length=2}:function(e,t){i[t]=e[1]}),r?Y(i):s(e)?K(i):G(i)}function Jt(e,t,n){if(t||(t=tn),n){var r=e.toSeq().map(function(t,r){return[t,n(t,r,e)]}).reduce(function(e,n){return Yt(t,e[1],n[1])?n:e});return r&&r[0]}return e.reduce(function(e,n){return Yt(t,e,n)?n:e})}function Yt(e,t,n){var r=e(n,t);return 0===r&&n!==t&&(void 0===n||null===n||n!=n)||r>0}function Kt(e,t,r){var o=Qt(e);return o.size=new ee(r).map(function(e){return e.size}).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(j,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},o.__iteratorUncached=function(e,o){var i=r.map(function(e){return e=n(e),V(o?e.reverse():e)}),a=0,u=!1;return new U(function(){var n;return u||(n=i.map(function(e){return e.next()}),u=n.some(function(e){return e.done})),u?{value:void 0,done:!0}:q(e,a++,t.apply(null,n.map(function(e){return e.value})))})},o}function Gt(e,t){return oe(e)?t:e.constructor(t)}function $t(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Zt(e){return Le(e.size),C(e)}function Xt(e){return u(e)?r:s(e)?o:i}function Qt(e){return Object.create((u(e)?Y:s(e)?K:G).prototype)}function en(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):J.prototype.cacheResult.call(this)}function tn(e,t){return e>t?1:e<t?-1:0}function nn(e){var t=V(e);if(!t){if(!W(e))throw new TypeError("Expected iterable or array-like: "+e);t=V(n(e))}return t}function rn(e,t){var n,r=function(i){if(i instanceof r)return i;if(!(this instanceof r))return new r(i);if(!n){n=!0;var a=Object.keys(e);!function(e,t){try{t.forEach(function(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){ge(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}.bind(void 0,e))}catch(e){}}(o,a),o.size=a.length,o._name=t,o._keys=a,o._defaultValues=e}this._map=Ue(i)},o=r.prototype=Object.create(on);return o.constructor=r,r}t(Pt,Ue),Pt.of=function(){return this(arguments)},Pt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Pt.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Pt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):It()},Pt.prototype.set=function(e,t){return jt(this,e,t)},Pt.prototype.remove=function(e){return jt(this,e,y)},Pt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Pt.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},Pt.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Pt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Mt(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Pt.isOrderedMap=Tt,Pt.prototype[h]=!0,Pt.prototype.delete=Pt.prototype.remove,t(Nt,Y),Nt.prototype.get=function(e,t){return this._iter.get(e,t)},Nt.prototype.has=function(e){return this._iter.has(e)},Nt.prototype.valueSeq=function(){return this._iter.valueSeq()},Nt.prototype.reverse=function(){var e=this,t=Ft(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},Nt.prototype.map=function(e,t){var n=this,r=qt(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},Nt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?Zt(this):0,function(o){return e(o,t?--n:n++,r)}),t)},Nt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(j,t),r=t?Zt(this):0;return new U(function(){var o=n.next();return o.done?o:q(e,t?--r:r++,o.value,o)})},Nt.prototype[h]=!0,t(Rt,K),Rt.prototype.includes=function(e){return this._iter.includes(e)},Rt.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate(function(t){return e(t,r++,n)},t)},Rt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(j,t),r=0;return new U(function(){var t=n.next();return t.done?t:q(e,r++,t.value,t)})},t(Dt,G),Dt.prototype.has=function(e){return this._iter.includes(e)},Dt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},Dt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(j,t);return new U(function(){var t=n.next();return t.done?t:q(e,t.value,t.value,t)})},t(Lt,Y),Lt.prototype.entrySeq=function(){return this._iter.toSeq()},Lt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){$t(t);var r=a(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},Lt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(j,t);return new U(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){$t(r);var o=a(r);return q(e,o?r.get(0):r[0],o?r.get(1):r[1],t)}}})},Rt.prototype.cacheResult=Nt.prototype.cacheResult=Dt.prototype.cacheResult=Lt.prototype.cacheResult=en,t(rn,_e),rn.prototype.toString=function(){return this.__toString(un(this)+" {","}")},rn.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},rn.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},rn.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=an(this,Xe()))},rn.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+un(this));if(this._map&&!this._map.has(e)&&t===this._defaultValues[e])return this;var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:an(this,n)},rn.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:an(this,t)},rn.prototype.wasAltered=function(){return this._map.wasAltered()},rn.prototype.__iterator=function(e,t){var n=this;return r(this._defaultValues).map(function(e,t){return n.get(t)}).__iterator(e,t)},rn.prototype.__iterate=function(e,t){var n=this;return r(this._defaultValues).map(function(e,t){return n.get(t)}).__iterate(e,t)},rn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?an(this,t,e):(this.__ownerID=e,this._map=t,this)};var on=rn.prototype;function an(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function un(e){return e._name||e.constructor.name||"Record"}function sn(e){return null===e||void 0===e?vn():ln(e)&&!c(e)?e:vn().withMutations(function(t){var n=i(e);Le(n.size),n.forEach(function(e){return t.add(e)})})}function ln(e){return!(!e||!e[fn])}on.delete=on.remove,on.deleteIn=on.removeIn=Be.removeIn,on.merge=Be.merge,on.mergeWith=Be.mergeWith,on.mergeIn=Be.mergeIn,on.mergeDeep=Be.mergeDeep,on.mergeDeepWith=Be.mergeDeepWith,on.mergeDeepIn=Be.mergeDeepIn,on.setIn=Be.setIn,on.update=Be.update,on.updateIn=Be.updateIn,on.withMutations=Be.withMutations,on.asMutable=Be.asMutable,on.asImmutable=Be.asImmutable,t(sn,Ee),sn.of=function(){return this(arguments)},sn.fromKeys=function(e){return this(r(e).keySeq())},sn.prototype.toString=function(){return this.__toString("Set {","}")},sn.prototype.has=function(e){return this._map.has(e)},sn.prototype.add=function(e){return dn(this,this._map.set(e,!0))},sn.prototype.remove=function(e){return dn(this,this._map.remove(e))},sn.prototype.clear=function(){return dn(this,this._map.clear())},sn.prototype.union=function(){var t=e.call(arguments,0);return 0===(t=t.filter(function(e){return 0!==e.size})).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n<t.length;n++)i(t[n]).forEach(function(t){return e.add(t)})}):this.constructor(t[0])},sn.prototype.intersect=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map(function(e){return i(e)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.every(function(e){return e.includes(n)})||e.remove(n)})})},sn.prototype.subtract=function(){var t=e.call(arguments,0);if(0===t.length)return this;t=t.map(function(e){return i(e)});var n=this;return this.withMutations(function(e){n.forEach(function(n){t.some(function(e){return e.includes(n)})&&e.remove(n)})})},sn.prototype.merge=function(){return this.union.apply(this,arguments)},sn.prototype.mergeWith=function(t){var n=e.call(arguments,1);return this.union.apply(this,n)},sn.prototype.sort=function(e){return mn(Wt(this,e))},sn.prototype.sortBy=function(e,t){return mn(Wt(this,t,e))},sn.prototype.wasAltered=function(){return this._map.wasAltered()},sn.prototype.__iterate=function(e,t){var n=this;return this._map.__iterate(function(t,r){return e(r,r,n)},t)},sn.prototype.__iterator=function(e,t){return this._map.map(function(e,t){return t}).__iterator(e,t)},sn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):(this.__ownerID=e,this._map=t,this)},sn.isSet=ln;var cn,fn="@@__IMMUTABLE_SET__@@",pn=sn.prototype;function dn(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function hn(e,t){var n=Object.create(pn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function vn(){return cn||(cn=hn(Xe()))}function mn(e){return null===e||void 0===e?wn():gn(e)?e:wn().withMutations(function(t){var n=i(e);Le(n.size),n.forEach(function(e){return t.add(e)})})}function gn(e){return ln(e)&&c(e)}pn[fn]=!0,pn.delete=pn.remove,pn.mergeDeep=pn.merge,pn.mergeDeepWith=pn.mergeWith,pn.withMutations=Be.withMutations,pn.asMutable=Be.asMutable,pn.asImmutable=Be.asImmutable,pn.__empty=vn,pn.__make=hn,t(mn,sn),mn.of=function(){return this(arguments)},mn.fromKeys=function(e){return this(r(e).keySeq())},mn.prototype.toString=function(){return this.__toString("OrderedSet {","}")},mn.isOrderedSet=gn;var yn,bn=mn.prototype;function _n(e,t){var n=Object.create(bn);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function wn(){return yn||(yn=_n(It()))}function En(e){return null===e||void 0===e?On():xn(e)?e:On().unshiftAll(e)}function xn(e){return!(!e||!e[Cn])}bn[h]=!0,bn.__empty=wn,bn.__make=_n,t(En,we),En.of=function(){return this(arguments)},En.prototype.toString=function(){return this.__toString("Stack [","]")},En.prototype.get=function(e,t){var n=this._head;for(e=k(this,e);n&&e--;)n=n.next;return n?n.value:t},En.prototype.peek=function(){return this._head&&this._head.value},En.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):An(e,t)},En.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;Le(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):An(t,n)},En.prototype.pop=function(){return this.slice(1)},En.prototype.unshift=function(){return this.push.apply(this,arguments)},En.prototype.unshiftAll=function(e){return this.pushAll(e)},En.prototype.shift=function(){return this.pop.apply(this,arguments)},En.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):On()},En.prototype.slice=function(e,t){if(O(e,t,this.size))return this;var n=P(e,this.size);if(T(t,this.size)!==this.size)return we.prototype.slice.call(this,e,t);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):An(r,o)},En.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?An(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},En.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},En.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new U(function(){if(r){var t=r.value;return r=r.next,q(e,n++,t)}return{value:void 0,done:!0}})},En.isStack=xn;var Sn,Cn="@@__IMMUTABLE_STACK__@@",kn=En.prototype;function An(e,t,n,r){var o=Object.create(kn);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function On(){return Sn||(Sn=An(0))}function Pn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}kn[Cn]=!0,kn.withMutations=Be.withMutations,kn.asMutable=Be.asMutable,kn.asImmutable=Be.asImmutable,kn.wasAltered=Be.wasAltered,n.Iterator=U,Pn(n,{toArray:function(){Le(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new Rt(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new Nt(this,!0)},toMap:function(){return Ue(this.toKeyedSeq())},toObject:function(){Le(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Pt(this.toKeyedSeq())},toOrderedSet:function(){return mn(u(this)?this.valueSeq():this)},toSet:function(){return sn(u(this)?this.valueSeq():this)},toSetSeq:function(){return new Dt(this)},toSeq:function(){return s(this)?this.toIndexedSeq():u(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return En(u(this)?this.valueSeq():this)},toList:function(){return pt(u(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return Gt(this,function(e,t){var n=u(e),o=[e].concat(t).map(function(e){return a(e)?n&&(e=r(e)):e=n?ae(e):ue(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===o.length)return e;if(1===o.length){var i=o[0];if(i===e||n&&u(i)||s(e)&&s(i))return i}var l=new ee(o);return n?l=l.toKeyedSeq():s(e)||(l=l.toSetSeq()),(l=l.flatten(!0)).size=o.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),l}(this,e.call(arguments,0)))},includes:function(e){return this.some(function(t){return he(t,e)})},entries:function(){return this.__iterator(N)},every:function(e,t){Le(this.size);var n=!0;return this.__iterate(function(r,o,i){if(!e.call(t,r,o,i))return n=!1,!1}),n},filter:function(e,t){return Gt(this,zt(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return Le(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Le(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!==r&&void 0!==r?r.toString():""}),t},keys:function(){return this.__iterator(I)},map:function(e,t){return Gt(this,qt(this,e,t))},reduce:function(e,t,n){var r,o;return Le(this.size),arguments.length<2?o=!0:r=t,this.__iterate(function(t,i,a){o?(o=!1,r=t):r=e.call(n,r,t,i,a)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return Gt(this,Ft(this,!0))},slice:function(e,t){return Gt(this,Bt(this,e,t,!0))},some:function(e,t){return!this.every(Nn(e),t)},sort:function(e){return Gt(this,Wt(this,e))},values:function(){return this.__iterator(j)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return C(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=Ue().asMutable();return e.__iterate(function(o,i){r.update(t.call(n,o,i,e),0,function(e){return e+1})}),r.asImmutable()}(this,e,t)},equals:function(e){return ve(this,e)},entrySeq:function(){var e=this;if(e._cache)return new ee(e._cache);var t=e.toSeq().map(jn).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Nn(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,o,i){if(e.call(t,n,o,i))return r=[o,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(A)},flatMap:function(e,t){return Gt(this,function(e,t,n){var r=Xt(e);return e.toSeq().map(function(o,i){return r(t.call(n,o,i,e))}).flatten(!0)}(this,e,t))},flatten:function(e){return Gt(this,Ht(this,e,!0))},fromEntrySeq:function(){return new Lt(this)},get:function(e,t){return this.find(function(t,n){return he(n,e)},void 0,t)},getIn:function(e,t){for(var n,r=this,o=nn(e);!(n=o.next()).done;){var i=n.value;if((r=r&&r.get?r.get(i,y):y)===y)return t}return r},groupBy:function(e,t){return function(e,t,n){var r=u(e),o=(c(e)?Pt():Ue()).asMutable();e.__iterate(function(i,a){o.update(t.call(n,i,a,e),function(e){return(e=e||[]).push(r?[a,i]:i),e})});var i=Xt(e);return o.map(function(t){return Gt(e,i(t))})}(this,e,t)},has:function(e){return this.get(e,y)!==y},hasIn:function(e){return this.getIn(e,y)!==y},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keyOf:function(e){return this.findKey(function(t){return he(t,e)})},keySeq:function(){return this.toSeq().map(In).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return Jt(this,e)},maxBy:function(e,t){return Jt(this,t,e)},min:function(e){return Jt(this,e?Rn(e):Un)},minBy:function(e,t){return Jt(this,t?Rn(t):Un,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return Gt(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return Gt(this,Vt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Nn(e),t)},sortBy:function(e,t){return Gt(this,Wt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return Gt(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return Gt(this,function(e,t,n){var r=Qt(e);return r.__iterateUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterate(r,o);var a=0;return e.__iterate(function(e,o,u){return t.call(n,e,o,u)&&++a&&r(e,o,i)}),a},r.__iteratorUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterator(r,o);var a=e.__iterator(N,o),u=!0;return new U(function(){if(!u)return{value:void 0,done:!0};var e=a.next();if(e.done)return e;var o=e.value,s=o[0],l=o[1];return t.call(n,l,s,i)?r===N?e:q(r,s,l,e):(u=!1,{value:void 0,done:!0})})},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Nn(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=c(e),n=u(e),r=t?1:0;return function(e,t){return t=xe(t,3432918353),t=xe(t<<15|t>>>-15,461845907),t=xe(t<<13|t>>>-13,5),t=xe((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=Se((t=xe(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+qn(Ce(e),Ce(t))|0}:function(e,t){r=r+qn(Ce(e),Ce(t))|0}:t?function(e){r=31*r+Ce(e)|0}:function(e){r=r+Ce(e)|0}),r)}(this))}});var Tn=n.prototype;Tn[f]=!0,Tn[L]=Tn.values,Tn.__toJS=Tn.toArray,Tn.__toStringMapper=Dn,Tn.inspect=Tn.toSource=function(){return this.toString()},Tn.chain=Tn.flatMap,Tn.contains=Tn.includes,Pn(r,{flip:function(){return Gt(this,Ut(this))},mapEntries:function(e,t){var n=this,r=0;return Gt(this,this.toSeq().map(function(o,i){return e.call(t,[i,o],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return Gt(this,this.toSeq().flip().map(function(r,o){return e.call(t,r,o,n)}).flip())}});var Mn=r.prototype;function In(e,t){return t}function jn(e,t){return[t,e]}function Nn(e){return function(){return!e.apply(this,arguments)}}function Rn(e){return function(){return-e.apply(this,arguments)}}function Dn(e){return"string"==typeof e?JSON.stringify(e):String(e)}function Ln(){return S(arguments)}function Un(e,t){return e<t?1:e>t?-1:0}function qn(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Mn[p]=!0,Mn[L]=Tn.entries,Mn.__toJS=Tn.toObject,Mn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+Dn(e)},Pn(o,{toKeyedSeq:function(){return new Nt(this,!1)},filter:function(e,t){return Gt(this,zt(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return Gt(this,Ft(this,!1))},slice:function(e,t){return Gt(this,Bt(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=P(e,e<0?this.count():this.size);var r=this.slice(0,e);return Gt(this,1===n?r:r.concat(S(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return Gt(this,Ht(this,e,!1))},get:function(e,t){return(e=k(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=k(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return Gt(this,function(e,t){var n=Qt(e);return n.size=e.size&&2*e.size-1,n.__iterateUncached=function(n,r){var o=this,i=0;return e.__iterate(function(e,r){return(!i||!1!==n(t,i++,o))&&!1!==n(e,i++,o)},r),i},n.__iteratorUncached=function(n,r){var o,i=e.__iterator(j,r),a=0;return new U(function(){return(!o||a%2)&&(o=i.next()).done?o:a%2?q(n,a++,t):q(n,a++,o.value,o)})},n}(this,e))},interleave:function(){var e=[this].concat(S(arguments)),t=Kt(this.toSeq(),K.of,e),n=t.flatten(!0);return t.size&&(n.size=t.size*e.length),Gt(this,n)},keySeq:function(){return ye(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(e,t){return Gt(this,Vt(this,e,t,!1))},zip:function(){return Gt(this,Kt(this,Ln,[this].concat(S(arguments))))},zipWith:function(e){var t=S(arguments);return t[0]=this,Gt(this,Kt(this,e,t))}}),o.prototype[d]=!0,o.prototype[h]=!0,Pn(i,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}}),i.prototype.has=Tn.includes,i.prototype.contains=i.prototype.includes,Pn(Y,r.prototype),Pn(K,o.prototype),Pn(G,i.prototype),Pn(_e,r.prototype),Pn(we,o.prototype),Pn(Ee,i.prototype),{Iterable:n,Seq:J,Collection:be,Map:Ue,OrderedMap:Pt,List:pt,Stack:En,Set:sn,OrderedSet:mn,Record:rn,Range:ye,Repeat:me,is:he,fromJS:fe}},e.exports=r()},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t,n,o,i,a,u,s){if(r(t),!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,o,i,a,u,s],f=0;(l=new Error(t.replace(/%s/g,function(){return c[f++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.getCommonExtensions=t.getExtensions=t.escapeDeepLinkPath=t.createDeepLinkPath=t.shallowEqualKeys=t.buildFormData=t.sorters=t.btoa=t.serializeSearch=t.parseSearch=t.getSampleSchema=t.validateParam=t.validatePattern=t.validateMinLength=t.validateMaxLength=t.validateGuid=t.validateDateTime=t.validateString=t.validateBoolean=t.validateFile=t.validateInteger=t.validateNumber=t.validateMinimum=t.validateMaximum=t.propChecker=t.memoize=t.isImmutable=void 0;var r=_(n(41)),o=_(n(17)),i=_(n(91)),a=_(n(23)),u=_(n(42)),s=_(n(45));t.isJSONObject=function(e){try{var t=JSON.parse(e);if(t&&"object"===(void 0===t?"undefined":(0,s.default)(t)))return t}catch(e){}return!1},t.objectify=function(e){return S(e)?E(e)?e.toJS():e:{}},t.arrayify=function(e){return e?e.toArray?e.toArray():x(e):[]},t.fromJSOrdered=function e(t){if(E(t))return t;if(t instanceof y.default.File)return t;return S(t)?Array.isArray(t)?l.default.Seq(t).map(e).toList():l.default.OrderedMap(t).map(e):t},t.bindToState=function(e,t){var n={};return(0,u.default)(e).filter(function(t){return"function"==typeof e[t]}).forEach(function(r){return n[r]=e[r].bind(null,t)}),n},t.normalizeArray=x,t.isFn=function(e){return"function"==typeof e},t.isObject=S,t.isFunc=function(e){return"function"==typeof e},t.isArray=function(e){return Array.isArray(e)},t.objMap=function(e,t){return(0,u.default)(e).reduce(function(n,r){return n[r]=t(e[r],r),n},{})},t.objReduce=function(e,t){return(0,u.default)(e).reduce(function(n,r){var o=t(e[r],r);return o&&"object"===(void 0===o?"undefined":(0,s.default)(o))&&(0,a.default)(n,o),n},{})},t.systemThunkMiddleware=function(e){return function(t){t.dispatch,t.getState;return function(t){return function(n){return"function"==typeof n?n(e()):t(n)}}}},t.defaultStatusCode=function(e){var t=e.keySeq();return t.contains(w)?w:t.filter(function(e){return"2"===(e+"")[0]}).sort().first()},t.getList=function(e,t){if(!l.default.Iterable.isIterable(e))return l.default.List();var n=e.getIn(Array.isArray(t)?t:[t]);return l.default.List.isList(n)?n:l.default.List()},t.highlight=function(e){var t=document;if(!e)return"";if(e.textContent.length>5e3)return e.textContent;return function(e){for(var n,r,o,i,a,u=e.textContent,s=0,l=u[0],c=1,f=e.innerHTML="",p=0;r=n,n=p<7&&"\\"==n?1:c;){if(c=l,l=u[++s],i=f.length>1,!c||p>8&&"\n"==c||[/\S/.test(c),1,1,!/[$\w]/.test(c),("/"==n||"\n"==n)&&i,'"'==n&&i,"'"==n&&i,u[s-4]+r+n=="--\x3e",r+n=="*/"][p])for(f&&(e.appendChild(a=t.createElement("span")).setAttribute("style",["color: #555; font-weight: bold;","","","color: #555;",""][p?p<3?2:p>6?4:p>3?3:+/^(a(bstract|lias|nd|rguments|rray|s(m|sert)?|uto)|b(ase|egin|ool(ean)?|reak|yte)|c(ase|atch|har|hecked|lass|lone|ompl|onst|ontinue)|de(bugger|cimal|clare|f(ault|er)?|init|l(egate|ete)?)|do|double|e(cho|ls?if|lse(if)?|nd|nsure|num|vent|x(cept|ec|p(licit|ort)|te(nds|nsion|rn)))|f(allthrough|alse|inal(ly)?|ixed|loat|or(each)?|riend|rom|unc(tion)?)|global|goto|guard|i(f|mp(lements|licit|ort)|n(it|clude(_once)?|line|out|stanceof|t(erface|ernal)?)?|s)|l(ambda|et|ock|ong)|m(icrolight|odule|utable)|NaN|n(amespace|ative|ext|ew|il|ot|ull)|o(bject|perator|r|ut|verride)|p(ackage|arams|rivate|rotected|rotocol|ublic)|r(aise|e(adonly|do|f|gister|peat|quire(_once)?|scue|strict|try|turn))|s(byte|ealed|elf|hort|igned|izeof|tatic|tring|truct|ubscript|uper|ynchronized|witch)|t(emplate|hen|his|hrows?|ransient|rue|ry|ype(alias|def|id|name|of))|u(n(checked|def(ined)?|ion|less|signed|til)|se|sing)|v(ar|irtual|oid|olatile)|w(char_t|hen|here|hile|ith)|xor|yield)$/.test(f):0]),a.appendChild(t.createTextNode(f))),o=p&&p<7?p:o,f="",p=11;![1,/[\/{}[(\-+*=<>:;|\\.,?!&@~]/.test(c),/[\])]/.test(c),/[$\w]/.test(c),"/"==c&&o<2&&"<"!=n,'"'==c,"'"==c,c+l+u[s+1]+u[s+2]=="\x3c!--",c+l=="/*",c+l=="//","#"==c][--p];);f+=c}}(e)},t.mapToList=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key";var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.Map();if(!l.default.Map.isMap(t)||!t.size)return l.default.List();Array.isArray(n)||(n=[n]);if(n.length<1)return t.merge(r);var a=l.default.List();var u=n[0];var s=!0;var c=!1;var f=void 0;try{for(var p,d=(0,i.default)(t.entries());!(s=(p=d.next()).done);s=!0){var h=p.value,v=(0,o.default)(h,2),m=v[0],g=v[1],y=e(g,n.slice(1),r.set(u,m));a=l.default.List.isList(y)?a.concat(y):a.push(y)}}catch(e){c=!0,f=e}finally{try{!s&&d.return&&d.return()}finally{if(c)throw f}}return a},t.extractFileNameFromContentDispositionHeader=function(e){var t=void 0;if([/filename\*=[^']+'\w*'"([^"]+)";?/i,/filename\*=[^']+'\w*'([^;]+);?/i,/filename="([^;]*);?"/i,/filename=([^;]*);?/i].some(function(n){return null!==(t=n.exec(e))}),null!==t&&t.length>1)try{return decodeURIComponent(t[1])}catch(e){console.error(e)}return null},t.pascalCase=C,t.pascalCaseFilename=function(e){return C(e.replace(/\.[^./]*$/,""))},t.sanitizeUrl=function(e){if("string"!=typeof e||""===e)return"";return(0,c.sanitizeUrl)(e)},t.getAcceptControllingResponse=function(e){if(!l.default.OrderedMap.isOrderedMap(e))return null;if(!e.size)return null;var t=e.find(function(e,t){return t.startsWith("2")&&(0,u.default)(e.get("content")||{}).length>0}),n=e.get("default")||l.default.OrderedMap(),r=(n.get("content")||l.default.OrderedMap()).keySeq().toJS().length?n:null;return t||r},t.deeplyStripKey=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0};if("object"!==(void 0===t?"undefined":(0,s.default)(t))||Array.isArray(t)||null===t||!n)return t;var o=(0,a.default)({},t);(0,u.default)(o).forEach(function(t){t===n&&r(o[t],t)?delete o[t]:o[t]=e(o[t],n,r)});return o},t.stringify=function(e){if("string"==typeof e)return e;e.toJS&&(e=e.toJS());if("object"===(void 0===e?"undefined":(0,s.default)(e))&&null!==e)try{return(0,r.default)(e,null,2)}catch(t){return String(e)}return e.toString()},t.numberToString=function(e){if("number"==typeof e)return e.toString();return e};var l=_(n(7)),c=n(572),f=_(n(573)),p=_(n(281)),d=_(n(285)),h=_(n(288)),v=_(n(651)),m=_(n(105)),g=n(194),y=_(n(32)),b=_(n(724));function _(e){return e&&e.__esModule?e:{default:e}}var w="default",E=t.isImmutable=function(e){return l.default.Iterable.isIterable(e)};function x(e){return Array.isArray(e)?e:[e]}function S(e){return!!e&&"object"===(void 0===e?"undefined":(0,s.default)(e))}t.memoize=d.default;function C(e){return(0,p.default)((0,f.default)(e))}t.propChecker=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return(0,u.default)(e).length!==(0,u.default)(t).length||((0,v.default)(e,function(e,n){if(r.includes(n))return!1;var o=t[n];return l.default.Iterable.isIterable(e)?!l.default.is(e,o):("object"!==(void 0===e?"undefined":(0,s.default)(e))||"object"!==(void 0===o?"undefined":(0,s.default)(o)))&&e!==o})||n.some(function(n){return!(0,m.default)(e[n],t[n])}))};var k=t.validateMaximum=function(e,t){if(e>t)return"Value must be less than Maximum"},A=t.validateMinimum=function(e,t){if(e<t)return"Value must be greater than Minimum"},O=t.validateNumber=function(e){if(!/^-?\d+(\.?\d+)?$/.test(e))return"Value must be a number"},P=t.validateInteger=function(e){if(!/^-?\d+$/.test(e))return"Value must be an integer"},T=t.validateFile=function(e){if(e&&!(e instanceof y.default.File))return"Value must be a file"},M=t.validateBoolean=function(e){if("true"!==e&&"false"!==e&&!0!==e&&!1!==e)return"Value must be a boolean"},I=t.validateString=function(e){if(e&&"string"!=typeof e)return"Value must be a string"},j=t.validateDateTime=function(e){if(isNaN(Date.parse(e)))return"Value must be a DateTime"},N=t.validateGuid=function(e){if(e=e.toString().toLowerCase(),!/^[{(]?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[)}]?$/.test(e))return"Value must be a Guid"},R=t.validateMaxLength=function(e,t){if(e.length>t)return"Value must be less than MaxLength"},D=t.validateMinLength=function(e,t){if(e.length<t)return"Value must be greater than MinLength"},L=t.validatePattern=function(e,t){if(!new RegExp(t).test(e))return"Value must follow pattern "+t};t.validateParam=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[],o=t&&"body"===e.get("in")?e.get("value_xml"):e.get("value"),i=e.get("required"),a=n?e.get("schema"):e;if(!a)return r;var u=a.get("maximum"),c=a.get("minimum"),f=a.get("type"),p=a.get("format"),d=a.get("maxLength"),h=a.get("minLength"),v=a.get("pattern");if(f&&(i||o)){var m="string"===f&&o,g="array"===f&&Array.isArray(o)&&o.length,b="array"===f&&l.default.List.isList(o)&&o.count(),_="file"===f&&o instanceof y.default.File,w="boolean"===f&&(o||!1===o),E="number"===f&&(o||0===o),x="integer"===f&&(o||0===o),S=!1;if(n&&"object"===f)if("object"===(void 0===o?"undefined":(0,s.default)(o)))S=!0;else if("string"==typeof o)try{JSON.parse(o),S=!0}catch(e){return r.push("Parameter string value must be valid JSON"),r}var C=[m,g,b,_,w,E,x,S].some(function(e){return!!e});if(i&&!C)return r.push("Required field is not provided"),r;if(v){var U=L(o,v);U&&r.push(U)}if(d||0===d){var q=R(o,d);q&&r.push(q)}if(h){var F=D(o,h);F&&r.push(F)}if(u||0===u){var z=k(o,u);z&&r.push(z)}if(c||0===c){var B=A(o,c);B&&r.push(B)}if("string"===f){var V=void 0;if(!(V="date-time"===p?j(o):"uuid"===p?N(o):I(o)))return r;r.push(V)}else if("boolean"===f){var H=M(o);if(!H)return r;r.push(H)}else if("number"===f){var W=O(o);if(!W)return r;r.push(W)}else if("integer"===f){var J=P(o);if(!J)return r;r.push(J)}else if("array"===f){var Y;if(!b||!o.count())return r;Y=a.getIn(["items","type"]),o.forEach(function(e,t){var n=void 0;"number"===Y?n=O(e):"integer"===Y?n=P(e):"string"===Y&&(n=I(e)),n&&r.push({index:t,error:n})})}else if("file"===f){var K=T(o);if(!K)return r;r.push(K)}}return r},t.getSampleSchema=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(/xml/.test(t)){if(!e.xml||!e.xml.name){if(e.xml=e.xml||{},!e.$$ref)return e.type||e.items||e.properties||e.additionalProperties?'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!-- XML example cannot be generated --\x3e':null;var o=e.$$ref.match(/\S*\/(\S+)$/);e.xml.name=o[1]}return(0,g.memoizedCreateXMLExample)(e,n)}var i=(0,g.memoizedSampleFromSchema)(e,n);return"object"===(void 0===i?"undefined":(0,s.default)(i))?(0,r.default)(i,null,2):i},t.parseSearch=function(){var e={},t=y.default.location.search;if(!t)return{};if(""!=t){var n=t.substr(1).split("&");for(var r in n)n.hasOwnProperty(r)&&(r=n[r].split("="),e[decodeURIComponent(r[0])]=r[1]&&decodeURIComponent(r[1])||"")}return e},t.serializeSearch=function(e){return(0,u.default)(e).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&")},t.btoa=function(t){return(t instanceof e?t:new e(t.toString(),"utf-8")).toString("base64")},t.sorters={operationsSorter:{alpha:function(e,t){return e.get("path").localeCompare(t.get("path"))},method:function(e,t){return e.get("method").localeCompare(t.get("method"))}},tagsSorter:{alpha:function(e,t){return e.localeCompare(t)}}},t.buildFormData=function(e){var t=[];for(var n in e){var r=e[n];void 0!==r&&""!==r&&t.push([n,"=",encodeURIComponent(r).replace(/%20/g,"+")].join(""))}return t.join("&")},t.shallowEqualKeys=function(e,t,n){return!!(0,h.default)(n,function(n){return(0,m.default)(e[n],t[n])})};var U=t.createDeepLinkPath=function(e){return"string"==typeof e||e instanceof String?e.trim().replace(/\s/g,"%20"):""};t.escapeDeepLinkPath=function(e){return(0,b.default)(U(e).replace(/%20/g,"_"))},t.getExtensions=function(e){return e.filter(function(e,t){return/^x-/.test(t)})},t.getCommonExtensions=function(e){return e.filter(function(e,t){return/^pattern|maxLength|minLength|maximum|minimum/.test(t)})}}).call(t,n(54).Buffer)},function(e,t,n){"use strict";var r=n(34);e.exports=r},function(e,t,n){"use strict";e.exports=function(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var o=new Error(n);throw o.name="Invariant Violation",o.framesToPop=1,o}},function(e,t,n){"use strict";var r=n(7),o="<<anonymous>>",i={listOf:function(e){return l(e,"List",r.List.isList)},mapOf:function(e,t){return c(e,t,"Map",r.Map.isMap)},orderedMapOf:function(e,t){return c(e,t,"OrderedMap",r.OrderedMap.isOrderedMap)},setOf:function(e){return l(e,"Set",r.Set.isSet)},orderedSetOf:function(e){return l(e,"OrderedSet",r.OrderedSet.isOrderedSet)},stackOf:function(e){return l(e,"Stack",r.Stack.isStack)},iterableOf:function(e){return l(e,"Iterable",r.Iterable.isIterable)},recordOf:function(e){return u(function(t,n,o,i,u){for(var s=arguments.length,l=Array(s>5?s-5:0),c=5;c<s;c++)l[c-5]=arguments[c];var f=t[n];if(!(f instanceof r.Record)){var p=a(f),d=i;return new Error("Invalid "+d+" `"+u+"` of type `"+p+"` supplied to `"+o+"`, expected an Immutable.js Record.")}for(var h in e){var v=e[h];if(v){var m=f.toObject(),g=v.apply(void 0,[m,h,o,i,u+"."+h].concat(l));if(g)return g}}})},shape:p,contains:p,mapContains:function(e){return f(e,"Map",r.Map.isMap)},list:s("List",r.List.isList),map:s("Map",r.Map.isMap),orderedMap:s("OrderedMap",r.OrderedMap.isOrderedMap),set:s("Set",r.Set.isSet),orderedSet:s("OrderedSet",r.OrderedSet.isOrderedSet),stack:s("Stack",r.Stack.isStack),seq:s("Seq",r.Seq.isSeq),record:s("Record",function(e){return e instanceof r.Record}),iterable:s("Iterable",r.Iterable.isIterable)};function a(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":e instanceof r.Iterable?"Immutable."+e.toSource().split(" ")[0]:t}function u(e){function t(t,n,r,i,a,u){for(var s=arguments.length,l=Array(s>6?s-6:0),c=6;c<s;c++)l[c-6]=arguments[c];return u=u||r,i=i||o,null!=n[r]?e.apply(void 0,[n,r,i,a,u].concat(l)):t?new Error("Required "+a+" `"+u+"` was not specified in `"+i+"`."):void 0}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function s(e,t){return u(function(n,r,o,i,u){var s=n[r];if(!t(s)){var l=a(s);return new Error("Invalid "+i+" `"+u+"` of type `"+l+"` supplied to `"+o+"`, expected `"+e+"`.")}return null})}function l(e,t,n){return u(function(r,o,i,u,s){for(var l=arguments.length,c=Array(l>5?l-5:0),f=5;f<l;f++)c[f-5]=arguments[f];var p=r[o];if(!n(p)){var d=u,h=a(p);return new Error("Invalid "+d+" `"+s+"` of type `"+h+"` supplied to `"+i+"`, expected an Immutable.js "+t+".")}if("function"!=typeof e)return new Error("Invalid typeChecker supplied to `"+i+"` for propType `"+s+"`, expected a function.");for(var v=p.toArray(),m=0,g=v.length;m<g;m++){var y=e.apply(void 0,[v,m,i,u,s+"["+m+"]"].concat(c));if(y instanceof Error)return y}})}function c(e,t,n,r){return u(function(){for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return l(e,n,r).apply(void 0,i)||t&&(s=t,u(function(e,t,n,r,o){for(var i=arguments.length,a=Array(i>5?i-5:0),u=5;u<i;u++)a[u-5]=arguments[u];var l=e[t];if("function"!=typeof s)return new Error("Invalid keysTypeChecker (optional second argument) supplied to `"+n+"` for propType `"+o+"`, expected a function.");for(var c=l.keySeq().toArray(),f=0,p=c.length;f<p;f++){var d=s.apply(void 0,[c,f,n,r,o+" -> key("+c[f]+")"].concat(a));if(d instanceof Error)return d}})).apply(void 0,i);var s})}function f(e){var t=void 0===arguments[1]?"Iterable":arguments[1],n=void 0===arguments[2]?r.Iterable.isIterable:arguments[2];return u(function(r,o,i,u,s){for(var l=arguments.length,c=Array(l>5?l-5:0),f=5;f<l;f++)c[f-5]=arguments[f];var p=r[o];if(!n(p)){var d=a(p);return new Error("Invalid "+u+" `"+s+"` of type `"+d+"` supplied to `"+i+"`, expected an Immutable.js "+t+".")}var h=p.toObject();for(var v in e){var m=e[v];if(m){var g=m.apply(void 0,[h,v,i,u,s+"."+v].concat(c));if(g)return g}}})}function p(e){return f(e)}e.exports=i},function(e,t,n){"use strict"; /* object-assign (c) Sindre Sorhus @license MIT */var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,u=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var l in n=Object(arguments[s]))o.call(n,l)&&(u[l]=n[l]);if(r){a=r(n);for(var c=0;c<a.length;c++)i.call(n,a[c])&&(u[a[c]]=n[a[c]])}}return u}},function(e,t,n){"use strict";var r=n(11),o=n(87),i=n(351),a=(n(8),o.ID_ATTRIBUTE_NAME),u=i,s="__reactInternalInstance$"+Math.random().toString(36).slice(2);function l(e,t){return 1===e.nodeType&&e.getAttribute(a)===String(t)||8===e.nodeType&&e.nodeValue===" react-text: "+t+" "||8===e.nodeType&&e.nodeValue===" react-empty: "+t+" "}function c(e){for(var t;t=e._renderedComponent;)e=t;return e}function f(e,t){var n=c(e);n._hostNode=t,t[s]=n}function p(e,t){if(!(e._flags&u.hasCachedChildNodes)){var n=e._renderedChildren,o=t.firstChild;e:for(var i in n)if(n.hasOwnProperty(i)){var a=n[i],s=c(a)._domID;if(0!==s){for(;null!==o;o=o.nextSibling)if(l(o,s)){f(a,o);continue e}r("32",s)}}e._flags|=u.hasCachedChildNodes}}function d(e){if(e[s])return e[s];for(var t,n,r=[];!e[s];){if(r.push(e),!e.parentNode)return null;e=e.parentNode}for(;e&&(n=e[s]);e=r.pop())t=n,r.length&&p(n,e);return t}var h={getClosestInstanceFromNode:d,getInstanceFromNode:function(e){var t=d(e);return null!=t&&t._hostNode===e?t:null},getNodeFromInstance:function(e){if(void 0===e._hostNode&&r("33"),e._hostNode)return e._hostNode;for(var t=[];!e._hostNode;)t.push(e),e._hostParent||r("34"),e=e._hostParent;for(;t.length;e=t.pop())p(e,e._hostNode);return e._hostNode},precacheChildNodes:p,precacheNode:f,uncacheNode:function(e){var t=e._hostNode;t&&(delete t[s],e._hostNode=null)}};e.exports=h},function(e,t){var n=e.exports={version:"2.5.5"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";var r=n(107),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach(function(t){if(-1===o.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach(function(e){n[e].forEach(function(t){a[String(t)]=e})}),a),-1===i.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t,n){"use strict";t.__esModule=!0;var r=i(n(569)),o=i(n(91));function i(e){return e&&e.__esModule?e:{default:e}}t.default=function(){return function(e,t){if(Array.isArray(e))return e;if((0,r.default)(Object(e)))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var u,s=(0,o.default)(e);!(r=(u=s.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(e,t,n){var r=n(243)("wks"),o=n(168),i=n(33).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){var r=n(163)("wks"),o=n(116),i=n(21).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){var r=n(21),o=n(15),i=n(49),a=n(50),u=n(52),s=function(e,t,n){var l,c,f,p=e&s.F,d=e&s.G,h=e&s.S,v=e&s.P,m=e&s.B,g=e&s.W,y=d?o:o[t]||(o[t]={}),b=y.prototype,_=d?r:h?r[t]:(r[t]||{}).prototype;for(l in d&&(n=t),n)(c=!p&&_&&void 0!==_[l])&&u(y,l)||(f=c?_[l]:n[l],y[l]=d&&"function"!=typeof _[l]?n[l]:m&&c?i(f,r):g&&_[l]==f?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(f):v&&"function"==typeof f?i(Function.call,f):f,v&&((y.virtual||(y.virtual={}))[l]=f,e&s.R&&b&&!b[l]&&a(b,l,f)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(263),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(e,t,n){return t in e?(0,i.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){e.exports={default:n(534),__esModule:!0}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(23),i=(r=o)&&r.__esModule?r:{default:r};t.default=i.default||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}},function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=o},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function o(e,t){return!!e&&r.call(e,t)}var i=/\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function a(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function u(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/&([a-z#][a-z0-9]{1,31});/gi,l=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,c=n(417);function f(e,t){var n=0;return o(c,t)?c[t]:35===t.charCodeAt(0)&&l.test(t)&&a(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?u(n):e}var p=/[&<>"]/,d=/[&<>"]/g,h={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function v(e){return h[e]}t.assign=function(e){return[].slice.call(arguments,1).forEach(function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=o,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(i,"$1")},t.isValidEntityCode=a,t.fromCodePoint=u,t.replaceEntities=function(e){return e.indexOf("&")<0?e:e.replace(s,f)},t.escapeHtml=function(e){return p.test(e)?e.replace(d,v):e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(33),o=n(60),i=n(58),a=n(73),u=n(120),s=function(e,t,n){var l,c,f,p,d=e&s.F,h=e&s.G,v=e&s.S,m=e&s.P,g=e&s.B,y=h?r:v?r[t]||(r[t]={}):(r[t]||{}).prototype,b=h?o:o[t]||(o[t]={}),_=b.prototype||(b.prototype={});for(l in h&&(n=t),n)f=((c=!d&&y&&void 0!==y[l])?y:n)[l],p=g&&c?u(f,r):m&&"function"==typeof f?u(Function.call,f):f,y&&a(y,l,f,e&s.U),b[l]!=f&&i(b,l,p),m&&_[l]!=f&&(_[l]=f)};r.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t,n){var r=n(29),o=n(101),i=n(53),a=/"/g,u=function(e,t,n,r){var o=String(i(e)),u="<"+t;return""!==n&&(u+=" "+n+'="'+String(r).replace(a,"&quot;")+'"'),u+">"+o+"</"+t+">"};e.exports=function(e,t){var n={};n[e]=t(u),r(r.P+r.F*o(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r,o=n(91),i=(r=o)&&r.__esModule?r:{default:r};e.exports=function(){var e={location:{},history:{},open:function(){},close:function(){},File:function(){}};if("undefined"==typeof window)return e;try{e=window;var t=!0,n=!1,r=void 0;try{for(var o,a=(0,i.default)(["File","Blob","FormData"]);!(t=(o=a.next()).done);t=!0){var u=o.value;u in window&&(e[u]=window[u])}}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}}catch(e){console.error(e)}return e}()},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(25));t.isOAS3=a,t.isSwagger2=function(e){var t=e.get("swagger");if("string"!=typeof t)return!1;return t.startsWith("2.0")},t.OAS3ComponentWrapFactory=function(e){return function(t,n){return function(i){if(n&&n.specSelectors&&n.specSelectors.specJson){var u=n.specSelectors.specJson();return a(u)?o.default.createElement(e,(0,r.default)({},i,n,{Ori:t})):o.default.createElement(t,i)}return console.warn("OAS3 wrapper: couldn't get spec"),null}}};var o=i(n(0));function i(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.get("openapi");return"string"==typeof t&&(t.startsWith("3.0.")&&t.length>4)}},function(e,t,n){var r=n(28);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var r=n(279),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";var r=null;e.exports={debugTool:r}},function(e,t,n){var r=n(36),o=n(239),i=n(158),a=Object.defineProperty;t.f=n(44)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports={default:n(517),__esModule:!0}},function(e,t,n){e.exports={default:n(518),__esModule:!0}},function(e,t,n){"use strict";var r=n(11),o=n(13),i=n(355),a=n(69),u=n(356),s=n(88),l=n(148),c=n(8),f=[],p=0,d=i.getPooled(),h=!1,v=null;function m(){E.ReactReconcileTransaction&&v||r("123")}var g=[{initialize:function(){this.dirtyComponentsLength=f.length},close:function(){this.dirtyComponentsLength!==f.length?(f.splice(0,this.dirtyComponentsLength),w()):f.length=0}},{initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}}];function y(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=i.getPooled(),this.reconcileTransaction=E.ReactReconcileTransaction.getPooled(!0)}function b(e,t){return e._mountOrder-t._mountOrder}function _(e){var t=e.dirtyComponentsLength;t!==f.length&&r("124",t,f.length),f.sort(b),p++;for(var n=0;n<t;n++){var o,i=f[n],a=i._pendingCallbacks;if(i._pendingCallbacks=null,u.logTopLevelRenders){var l=i;i._currentElement.type.isReactTopLevelWrapper&&(l=i._renderedComponent),o="React update: "+l.getName(),console.time(o)}if(s.performUpdateIfNecessary(i,e.reconcileTransaction,p),o&&console.timeEnd(o),a)for(var c=0;c<a.length;c++)e.callbackQueue.enqueue(a[c],i.getPublicInstance())}}o(y.prototype,l,{getTransactionWrappers:function(){return g},destructor:function(){this.dirtyComponentsLength=null,i.release(this.callbackQueue),this.callbackQueue=null,E.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return l.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),a.addPoolingTo(y);var w=function(){for(;f.length||h;){if(f.length){var e=y.getPooled();e.perform(_,null,e),y.release(e)}if(h){h=!1;var t=d;d=i.getPooled(),t.notifyAll(),i.release(t)}}};var E={ReactReconcileTransaction:null,batchedUpdates:function(e,t,n,r,o,i){return m(),v.batchedUpdates(e,t,n,r,o,i)},enqueueUpdate:function e(t){m(),v.isBatchingUpdates?(f.push(t),null==t._updateBatchNumber&&(t._updateBatchNumber=p+1)):v.batchedUpdates(e,t)},flushBatchedUpdates:w,injection:{injectReconcileTransaction:function(e){e||r("126"),E.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){e||r("127"),"function"!=typeof e.batchedUpdates&&r("128"),"boolean"!=typeof e.isBatchingUpdates&&r("129"),v=e}},asap:function(e,t){c(v.isBatchingUpdates,"ReactUpdates.asap: Can't enqueue an asap callback in a context whereupdates are not being batched."),d.enqueue(e,t),h=!0}};e.exports=E},function(e,t,n){e.exports=!n(51)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(520)),o=a(n(522)),i="function"==typeof o.default&&"symbol"==typeof r.default?function(e){return typeof e}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":typeof e};function a(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof o.default&&"symbol"===i(r.default)?function(e){return void 0===e?"undefined":i(e)}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":void 0===e?"undefined":i(e)}},function(e,t,n){"use strict";e.exports={current:null}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";var r=n(13),o=n(69),i=n(34),a=(n(10),["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"]),u={type:null,target:null,currentTarget:i.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};function s(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n;var o=this.constructor.Interface;for(var a in o)if(o.hasOwnProperty(a)){0;var u=o[a];u?this[a]=u(n):"target"===a?this.target=r:this[a]=n[a]}var s=null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue;return this.isDefaultPrevented=s?i.thatReturnsTrue:i.thatReturnsFalse,this.isPropagationStopped=i.thatReturnsFalse,this}r(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=i.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=i.thatReturnsTrue)},persist:function(){this.isPersistent=i.thatReturnsTrue},isPersistent:i.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;for(var n=0;n<a.length;n++)this[a[n]]=null}}),s.Interface=u,s.augmentClass=function(e,t){var n=function(){};n.prototype=this.prototype;var i=new n;r(i,e.prototype),e.prototype=i,e.prototype.constructor=e,e.Interface=r({},this.Interface,t),e.augmentClass=this.augmentClass,o.addPoolingTo(e,o.fourArgumentPooler)},o.addPoolingTo(s,o.fourArgumentPooler),e.exports=s},function(e,t,n){var r=n(94);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(40),o=n(95);e.exports=n(44)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <[email protected]> <http://feross.org> * @license MIT */ var r=n(529),o=n(530),i=n(262);function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=s.prototype:(null===e&&(e=new s(t)),e.length=t),e}function s(e,t,n){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return l(this,e,t,n)}function l(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);s.TYPED_ARRAY_SUPPORT?(e=t).__proto__=s.prototype:e=p(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n),o=(e=u(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(s.isBuffer(t)){var n=0|d(t.length);return 0===(e=u(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?u(e,0):p(e,t);if("Buffer"===t.type&&i(t.data))return p(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(c(t),e=u(e,t<0?0:0|d(t)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function p(e,t){var n=t.length<0?0:0|d(t.length);e=u(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:g(e,t,n,r,o);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):g(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,o){var i,a=1,u=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,u/=2,s/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var c=-1;for(i=n;i<u;i++)if(l(e,i)===l(t,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===s)return c*a}else-1!==c&&(i-=i-c),c=-1}else for(n+s>u&&(n=u-s),i=n;i>=0;i--){for(var f=!0,p=0;p<s;p++)if(l(e,i+p)!==l(t,p)){f=!1;break}if(f)return i}return-1}function y(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var u=parseInt(t.substr(2*a,2),16);if(isNaN(u))return a;e[n+a]=u}return a}function b(e,t,n,r){return B(F(t,e.length-n),e,n,r)}function _(e,t,n,r){return B(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function w(e,t,n,r){return _(e,t,n,r)}function E(e,t,n,r){return B(z(t),e,n,r)}function x(e,t,n,r){return B(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,u,s,l=e[o],c=null,f=l>239?4:l>223?3:l>191?2:1;if(o+f<=n)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(i=e[o+1]))&&(s=(31&l)<<6|63&i)>127&&(c=s);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(s=(15&l)<<12|(63&i)<<6|63&a)>2047&&(s<55296||s>57343)&&(c=s);break;case 4:i=e[o+1],a=e[o+2],u=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&u)&&(s=(15&l)<<18|(63&i)<<12|(63&a)<<6|63&u)>65535&&s<1114112&&(c=s)}null===c?(c=65533,f=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),o+=f}return function(e){var t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=k));return n}(r)}t.Buffer=s,t.SlowBuffer=function(e){+e!=e&&(e=0);return s.alloc(+e)},t.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),s.poolSize=8192,s._augment=function(e){return e.__proto__=s.prototype,e},s.from=function(e,t,n){return l(null,e,t,n)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(e,t,n){return function(e,t,n,r){return c(t),t<=0?u(e,t):void 0!==n?"string"==typeof r?u(e,t).fill(n,r):u(e,t).fill(n):u(e,t)}(null,e,t,n)},s.allocUnsafe=function(e){return f(null,e)},s.allocUnsafeSlow=function(e){return f(null,e)},s.isBuffer=function(e){return!(null==e||!e._isBuffer)},s.compare=function(e,t){if(!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=s.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!s.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},s.byteLength=h,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},s.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?C(this,0,e):function(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return A(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},s.prototype.compare=function(e,t,n,r,o){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,o>>>=0,this===e)return 0;for(var i=o-r,a=n-t,u=Math.min(i,a),l=this.slice(r,o),c=e.slice(t,n),f=0;f<u;++f)if(l[f]!==c[f]){i=l[f],a=c[f];break}return i<a?-1:a<i?1:0},s.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},s.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},s.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return _(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function A(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function O(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function P(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=q(e[i]);return o}function T(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function M(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,o,i){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function j(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function R(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(e,t,n,r,i){return i||R(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,i){return i||R(e,0,n,8),o.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){var n,r=this.length;if(e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),s.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=s.prototype;else{var o=t-e;n=new s(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},s.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},s.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},s.prototype.readUInt8=function(e,t){return t||M(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||M(e,4,this.length),o.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),o.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),o.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||M(e,8,this.length),o.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},s.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);I(this,e,t,n,o-1,-o)}var i=0,a=1,u=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===u&&0!==this[t+i-1]&&(u=1),this[t+i]=(e/a>>0)-u&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);I(this,e,t,n,o-1,-o)}var i=n-1,a=1,u=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===u&&0!==this[t+i+1]&&(u=1),this[t+i]=(e/a>>0)-u&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!s.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},s.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var a=s.isBuffer(e)?e:F(new s(e,r).toString()),u=a.length;for(i=0;i<n-t;++i)this[i+t]=a[i%u]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function q(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(t,n(31))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,l=[],c=!1,f=-1;function p(){c&&s&&(c=!1,s.length?l=s.concat(l):f=-1,l.length&&d())}function d(){if(!c){var e=u(p);c=!0;for(var t=l.length;t;){for(s=l,l=[];++f<t;)s&&s[f].run();f=-1,t=l.length}s=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new h(e,t)),1!==l.length||c||u(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";function r(e,t){return e===t}function o(e){var t=arguments.length<=1||void 0===arguments[1]?r:arguments[1],n=null,o=null;return function(){for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return null!==n&&n.length===i.length&&i.every(function(e,r){return t(e,n[r])})||(o=e.apply(void 0,i)),n=i,o}}function i(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];var i=0,a=r.pop(),u=function(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(e){return"function"==typeof e})){var n=t.map(function(e){return typeof e}).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return t}(r),s=e.apply(void 0,[function(){return i++,a.apply(void 0,arguments)}].concat(n)),l=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=u.map(function(n){return n.apply(void 0,[e,t].concat(r))});return s.apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(i))};return l.resultFunc=a,l.recomputations=function(){return i},l.resetRecomputations=function(){return i=0},l}}t.__esModule=!0,t.defaultMemoize=o,t.createSelectorCreator=i,t.createStructuredSelector=function(e){var t=arguments.length<=1||void 0===arguments[1]?a:arguments[1];if("object"!=typeof e)throw new Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);var n=Object.keys(e);return t(n.map(function(t){return e[t]}),function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce(function(e,t,r){return e[n[r]]=t,e},{})})};var a=t.createSelector=i(o)},function(e,t,n){var r=n(117),o=n(244);e.exports=n(100)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(74);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){var n=e.exports={version:"2.5.5"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(278);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(77),o=n(575),i=n(576),a="[object Null]",u="[object Undefined]",s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?u:a:s&&s in Object(e)?o(e):i(e)}},function(e,t,n){var r=n(593),o=n(596);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(296),o=n(633),i=n(78);e.exports=function(e){return i(e)?r(e):o(e)}},function(e,t,n){"use strict";var r=n(140),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var i=n(106);i.inherits=n(81);var a=n(306),u=n(197);i.inherits(f,a);for(var s=o(u.prototype),l=0;l<s.length;l++){var c=s[l];f.prototype[c]||(f.prototype[c]=u.prototype[c])}function f(e){if(!(this instanceof f))return new f(e);a.call(this,e),u.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",p)}function p(){this.allowHalfOpen||this._writableState.ended||r.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t,n){"use strict";var r=n(313)();e.exports=function(e){return e!==r&&null!==e}},function(e,t,n){"use strict";var r=n(671),o=Math.max;e.exports=function(e){return o(0,r(e))}},function(e,t,n){"use strict"},function(e,t,n){"use strict";var r=n(11),o=(n(8),function(e){if(this.instancePool.length){var t=this.instancePool.pop();return this.call(t,e),t}return new this(e)}),i=function(e){e instanceof this||r("25"),e.destructor(),this.instancePool.length<this.poolSize&&this.instancePool.push(e)},a=o,u={addPoolingTo:function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||a,n.poolSize||(n.poolSize=10),n.release=i,n},oneArgumentPooler:o,twoArgumentPooler:function(e,t){if(this.instancePool.length){var n=this.instancePool.pop();return this.call(n,e,t),n}return new this(e,t)},threeArgumentPooler:function(e,t,n){if(this.instancePool.length){var r=this.instancePool.pop();return this.call(r,e,t,n),r}return new this(e,t,n)},fourArgumentPooler:function(e,t,n,r){if(this.instancePool.length){var o=this.instancePool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)}};e.exports=u},function(e,t){e.exports={}},function(e,t,n){var r=n(155),o=n(156);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(156);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(33),o=n(58),i=n(118),a=n(168)("src"),u=Function.toString,s=(""+u).split("toString");n(60).inspectSource=function(e){return u.call(e)},(e.exports=function(e,t,n,u){var l="function"==typeof n;l&&(i(n,"name")||o(n,"name",t)),e[t]!==n&&(l&&(i(n,a)||o(n,a,e[t]?""+e[t]:s.join(String(t)))),e===r?e[t]=n:u?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||u.call(this)})},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){"use strict";var r=n(13),o=n(265),i=n(537),a=n(542),u=n(76),s=n(543),l=n(546),c=n(547),f=n(549),p=u.createElement,d=u.createFactory,h=u.cloneElement,v=r,m=function(e){return e},g={Children:{map:i.map,forEach:i.forEach,count:i.count,toArray:i.toArray,only:f},Component:o.Component,PureComponent:o.PureComponent,createElement:p,cloneElement:h,isValidElement:u.isValidElement,PropTypes:s,createClass:c,createFactory:d,createMixin:m,DOM:a,version:l,__spread:v};e.exports=g},function(e,t,n){"use strict";var r=n(13),o=n(46),i=(n(10),n(267),Object.prototype.hasOwnProperty),a=n(268),u={key:!0,ref:!0,__self:!0,__source:!0};function s(e){return void 0!==e.ref}function l(e){return void 0!==e.key}var c=function(e,t,n,r,o,i,u){var s={$$typeof:a,type:e,key:t,ref:n,props:u,_owner:i};return s};c.createElement=function(e,t,n){var r,a={},f=null,p=null;if(null!=t)for(r in s(t)&&(p=t.ref),l(t)&&(f=""+t.key),void 0===t.__self?null:t.__self,void 0===t.__source?null:t.__source,t)i.call(t,r)&&!u.hasOwnProperty(r)&&(a[r]=t[r]);var d=arguments.length-2;if(1===d)a.children=n;else if(d>1){for(var h=Array(d),v=0;v<d;v++)h[v]=arguments[v+2];0,a.children=h}if(e&&e.defaultProps){var m=e.defaultProps;for(r in m)void 0===a[r]&&(a[r]=m[r])}return c(e,f,p,0,0,o.current,a)},c.createFactory=function(e){var t=c.createElement.bind(null,e);return t.type=e,t},c.cloneAndReplaceKey=function(e,t){return c(e.type,t,e.ref,e._self,e._source,e._owner,e.props)},c.cloneElement=function(e,t,n){var a,f,p=r({},e.props),d=e.key,h=e.ref,v=(e._self,e._source,e._owner);if(null!=t)for(a in s(t)&&(h=t.ref,v=o.current),l(t)&&(d=""+t.key),e.type&&e.type.defaultProps&&(f=e.type.defaultProps),t)i.call(t,a)&&!u.hasOwnProperty(a)&&(void 0===t[a]&&void 0!==f?p[a]=f[a]:p[a]=t[a]);var m=arguments.length-2;if(1===m)p.children=n;else if(m>1){for(var g=Array(m),y=0;y<m;y++)g[y]=arguments[y+2];p.children=g}return c(e.type,d,h,0,0,v,p)},c.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},e.exports=c},function(e,t,n){var r=n(37).Symbol;e.exports=r},function(e,t,n){var r=n(286),o=n(189);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(24),o=n(192),i=n(641),a=n(61);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},function(e,t,n){var r=n(128),o=1/0;e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";var r=n(66);e.exports=function(e){if(!r(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(729),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return(0,i.default)(e)}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},function(e,t,n){"use strict";function r(e){return void 0===e||null===e}e.exports.isNothing=r,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:r(e)?[]:[e]},e.exports.repeat=function(e,t){var n,r="";for(n=0;n<t;n+=1)r+=e;return r},e.exports.isNegativeZero=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},e.exports.extend=function(e,t){var n,r,o,i;if(t)for(n=0,r=(i=Object.keys(t)).length;n<r;n+=1)e[o=i[n]]=t[o];return e}},function(e,t,n){"use strict";var r=n(85),o=n(107),i=n(16);function a(e,t,n){var r=[];return e.include.forEach(function(e){n=a(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,n){t.tag===e.tag&&t.kind===e.kind&&r.push(n)}),n.push(e)}),n.filter(function(e,t){return-1===r.indexOf(t)})}function u(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new o("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=a(this,"implicit",[]),this.compiledExplicit=a(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{}};function r(e){n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(r);return n}(this.compiledImplicit,this.compiledExplicit)}u.DEFAULT=null,u.create=function(){var e,t;switch(arguments.length){case 1:e=u.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new o("Wrong number of arguments for Schema.create function")}if(e=r.toArray(e),t=r.toArray(t),!e.every(function(e){return e instanceof u}))throw new o("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every(function(e){return e instanceof i}))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new u({include:e,explicit:t})},e.exports=u},function(e,t,n){"use strict";var r=n(11);n(8);function o(e,t){return(e&t)===t}var i={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,injectDOMPropertyConfig:function(e){var t=i,n=e.Properties||{},a=e.DOMAttributeNamespaces||{},s=e.DOMAttributeNames||{},l=e.DOMPropertyNames||{},c=e.DOMMutationMethods||{};for(var f in e.isCustomAttribute&&u._isCustomAttributeFunctions.push(e.isCustomAttribute),n){u.properties.hasOwnProperty(f)&&r("48",f);var p=f.toLowerCase(),d=n[f],h={attributeName:p,attributeNamespace:null,propertyName:f,mutationMethod:null,mustUseProperty:o(d,t.MUST_USE_PROPERTY),hasBooleanValue:o(d,t.HAS_BOOLEAN_VALUE),hasNumericValue:o(d,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:o(d,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:o(d,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(h.hasBooleanValue+h.hasNumericValue+h.hasOverloadedBooleanValue<=1||r("50",f),s.hasOwnProperty(f)){var v=s[f];h.attributeName=v}a.hasOwnProperty(f)&&(h.attributeNamespace=a[f]),l.hasOwnProperty(f)&&(h.propertyName=l[f]),c.hasOwnProperty(f)&&(h.mutationMethod=c[f]),u.properties[f]=h}}},a=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",u={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",ATTRIBUTE_NAME_START_CHAR:a,ATTRIBUTE_NAME_CHAR:a+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<u._isCustomAttributeFunctions.length;t++){if((0,u._isCustomAttributeFunctions[t])(e))return!0}return!1},injection:i};e.exports=u},function(e,t,n){"use strict";var r=n(784);n(39),n(10);function o(){r.attachRefs(this,this._currentElement)}var i={mountComponent:function(e,t,n,r,i,a){var u=e.mountComponent(t,n,r,i,a);return e._currentElement&&null!=e._currentElement.ref&&t.getReactMountReady().enqueue(o,e),u},getHostNode:function(e){return e.getHostNode()},unmountComponent:function(e,t){r.detachRefs(e,e._currentElement),e.unmountComponent(t)},receiveComponent:function(e,t,n,i){var a=e._currentElement;if(t!==a||i!==e._context){0;var u=r.shouldUpdateRefs(a,t);u&&r.detachRefs(e,a),e.receiveComponent(t,n,i),u&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(o,e)}},performUpdateIfNecessary:function(e,t,n){e._updateBatchNumber===n&&e.performUpdateIfNecessary(t)}};e.exports=i},function(e,t,n){"use strict";var r=n(218),o=n(150),i=n(219),a=n(360),u="undefined"!=typeof document&&"number"==typeof document.documentMode||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&/\bEdge\/\d/.test(navigator.userAgent);function s(e){if(u){var t=e.node,n=e.children;if(n.length)for(var r=0;r<n.length;r++)l(t,n[r],null);else null!=e.html?o(t,e.html):null!=e.text&&a(t,e.text)}}var l=i(function(e,t,n){11===t.node.nodeType||1===t.node.nodeType&&"object"===t.node.nodeName.toLowerCase()&&(null==t.node.namespaceURI||t.node.namespaceURI===r.html)?(s(t),e.insertBefore(t.node,n)):(e.insertBefore(t.node,n),s(t))});function c(){return this.node.nodeName}function f(e){return{node:e,children:[],html:null,text:null,toString:c}}f.insertTreeBefore=l,f.replaceChildWithTree=function(e,t){e.parentNode.replaceChild(t.node,e),s(t)},f.queueChild=function(e,t){u?e.children.push(t):e.node.appendChild(t.node)},f.queueHTML=function(e,t){u?e.html=t:o(e.node,t)},f.queueText=function(e,t){u?e.text=t:a(e.node,t)},e.exports=f},function(e,t,n){var r=n(147),o=n(345);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var u=-1,s=t.length;++u<s;){var l=t[u],c=i?i(n[l],e[l],l,n,e):void 0;void 0===c&&(c=e[l]),a?o(n,l,c):r(n,l,c)}return n}},function(e,t,n){e.exports={default:n(448),__esModule:!0}},function(e,t,n){n(449);for(var r=n(21),o=n(50),i=n(70),a=n(19)("toStringTag"),u="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),s=0;s<u.length;s++){var l=u[s],c=r[l],f=c&&c.prototype;f&&!f[a]&&o(f,a,l),i[l]=i.Array}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(240),o=n(164);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(40).f,o=n(52),i=n(19)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(456)(!0);n(238)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){e.exports=!n(101)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports={}},function(e,t,n){var r=n(119),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){"use strict";e.exports=function(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var o=new Error(n);throw o.name="Invariant Violation",o.framesToPop=1,o}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){(function(e){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(t,n(54).Buffer)},function(e,t,n){"use strict";function r(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},e.exports=r},function(e,t,n){"use strict";var r=n(86);e.exports=new r({include:[n(341)],implicit:[n(752),n(753)],explicit:[n(754),n(755),n(756),n(757)]})},function(e,t,n){"use strict";var r=n(110),o=n(212),i=n(352),a=n(353),u=(n(10),r.getListener);function s(e,t,n){var r=function(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return u(e,r)}(e,n,t);r&&(n._dispatchListeners=i(n._dispatchListeners,r),n._dispatchInstances=i(n._dispatchInstances,e))}function l(e){e&&e.dispatchConfig.phasedRegistrationNames&&o.traverseTwoPhase(e._targetInst,s,e)}function c(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst,n=t?o.getParentInstance(t):null;o.traverseTwoPhase(n,s,e)}}function f(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=u(e,r);o&&(n._dispatchListeners=i(n._dispatchListeners,o),n._dispatchInstances=i(n._dispatchInstances,e))}}function p(e){e&&e.dispatchConfig.registrationName&&f(e._targetInst,0,e)}var d={accumulateTwoPhaseDispatches:function(e){a(e,l)},accumulateTwoPhaseDispatchesSkipTarget:function(e){a(e,c)},accumulateDirectDispatches:function(e){a(e,p)},accumulateEnterLeaveDispatches:function(e,t,n,r){o.traverseEnterLeave(n,r,f,e,t)}};e.exports=d},function(e,t,n){"use strict";var r=n(11),o=n(211),i=n(212),a=n(213),u=n(352),s=n(353),l=(n(8),{}),c=null,f=function(e,t){e&&(i.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},p=function(e){return f(e,!0)},d=function(e){return f(e,!1)},h=function(e){return"."+e._rootNodeID};var v={injection:{injectEventPluginOrder:o.injectEventPluginOrder,injectEventPluginsByName:o.injectEventPluginsByName},putListener:function(e,t,n){"function"!=typeof n&&r("94",t,typeof n);var i=h(e);(l[t]||(l[t]={}))[i]=n;var a=o.registrationNameModules[t];a&&a.didPutListener&&a.didPutListener(e,t,n)},getListener:function(e,t){var n=l[t];if(function(e,t,n){switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||(r=t,"button"!==r&&"input"!==r&&"select"!==r&&"textarea"!==r));default:return!1}var r}(t,e._currentElement.type,e._currentElement.props))return null;var r=h(e);return n&&n[r]},deleteListener:function(e,t){var n=o.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var r=l[t];r&&delete r[h(e)]},deleteAllListeners:function(e){var t=h(e);for(var n in l)if(l.hasOwnProperty(n)&&l[n][t]){var r=o.registrationNameModules[n];r&&r.willDeleteListener&&r.willDeleteListener(e,n),delete l[n][t]}},extractEvents:function(e,t,n,r){for(var i,a=o.plugins,s=0;s<a.length;s++){var l=a[s];if(l){var c=l.extractEvents(e,t,n,r);c&&(i=u(i,c))}}return i},enqueueEvents:function(e){e&&(c=u(c,e))},processEventQueue:function(e){var t=c;c=null,s(t,e?p:d),c&&r("95"),a.rethrowCaughtError()},__purge:function(){l={}},__getListenerBank:function(){return l}};e.exports=v},function(e,t,n){"use strict";var r=n(48),o=n(214),i={view:function(e){if(e.view)return e.view;var t=o(e);if(t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};function a(e,t,n,o){return r.call(this,e,t,n,o)}r.augmentClass(a,i),e.exports=a},function(e,t,n){"use strict";var r={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};e.exports=r},function(e,t,n){var r; /*! Copyright (c) 2016 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /*! Copyright (c) 2016 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ !function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r))e.push(o.apply(null,r));else if("object"===i)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}void 0!==e&&e.exports?e.exports=o:void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=!0},function(e,t,n){var r=n(161),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(59),o=n(460),i=n(461),a=Object.defineProperty;t.f=n(100)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(121);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(466),o=n(53);e.exports=function(e){return r(o(e))}},function(e,t,n){"use strict";var r=n(58),o=n(73),i=n(101),a=n(53),u=n(18);e.exports=function(e,t,n){var s=u(e),l=n(a,s,""[e]),c=l[0],f=l[1];i(function(){var t={};return t[s]=function(){return 7},7!=""[e](t)})&&(o(String.prototype,e,c),r(RegExp.prototype,s,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)}))}},function(e,t,n){var r=n(116)("meta"),o=n(28),i=n(52),a=n(40).f,u=0,s=Object.isExtensible||function(){return!0},l=!n(51)(function(){return s(Object.preventExtensions({}))}),c=function(e){a(e,r,{value:{i:"O"+ ++u,w:{}}})},f=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!s(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!i(e,r)){if(!s(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return l&&f.NEED&&s(e)&&!i(e,r)&&c(e),e}}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CLEAR_BY=t.CLEAR=t.NEW_AUTH_ERR=t.NEW_SPEC_ERR_BATCH=t.NEW_SPEC_ERR=t.NEW_THROWN_ERR_BATCH=t.NEW_THROWN_ERR=void 0,t.newThrownErr=function(e){return{type:a,payload:(0,i.default)(e)}},t.newThrownErrBatch=function(e){return{type:u,payload:e}},t.newSpecErr=function(e){return{type:s,payload:e}},t.newSpecErrBatch=function(e){return{type:l,payload:e}},t.newAuthErr=function(e){return{type:c,payload:e}},t.clear=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:f,payload:e}},t.clearBy=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0};return{type:p,payload:e}};var r,o=n(180),i=(r=o)&&r.__esModule?r:{default:r};var a=t.NEW_THROWN_ERR="err_new_thrown_err",u=t.NEW_THROWN_ERR_BATCH="err_new_thrown_err_batch",s=t.NEW_SPEC_ERR="err_new_spec_err",l=t.NEW_SPEC_ERR_BATCH="err_new_spec_err_batch",c=t.NEW_AUTH_ERR="err_new_auth_err",f=t.CLEAR="err_clear",p=t.CLEAR_BY="err_clear_by"},function(e,t,n){var r=n(62),o=n(47),i="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||o(e)&&r(e)==i}},function(e,t,n){var r=n(63)(Object,"create");e.exports=r},function(e,t,n){var r=n(601),o=n(602),i=n(603),a=n(604),u=n(605);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=u,e.exports=s},function(e,t,n){var r=n(105);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(607);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(612),o=n(640),i=n(193),a=n(24),u=n(645);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):u(e)}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var o=typeof e;return!!(t=null==t?n:t)&&("number"==o||"symbol"!=o&&r.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(635),o=n(183),i=n(636),a=n(637),u=n(638),s=n(62),l=n(287),c=l(r),f=l(o),p=l(i),d=l(a),h=l(u),v=s;(r&&"[object DataView]"!=v(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=v(new o)||i&&"[object Promise]"!=v(i.resolve())||a&&"[object Set]"!=v(new a)||u&&"[object WeakMap]"!=v(new u))&&(v=function(e){var t=s(e),n="[object Object]"==t?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case c:return"[object DataView]";case f:return"[object Map]";case p:return"[object Promise]";case d:return"[object Set]";case h:return"[object WeakMap]"}return t}),e.exports=v},function(e,t,n){var r=n(139);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},function(e,t,n){var r=n(79),o=n(80);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}},function(e,t,n){"use strict";(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,n,r,o){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,a,u=arguments.length;switch(u){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,n)});case 3:return t.nextTick(function(){e.call(null,n,r)});case 4:return t.nextTick(function(){e.call(null,n,r,o)});default:for(i=new Array(u-1),a=0;a<i.length;)i[a++]=arguments[a];return t.nextTick(function(){e.apply(null,i)})}}}:e.exports=t}).call(t,n(55))},function(e,t,n){var r=n(54),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";e.exports=n(676)("forEach")},function(e,t,n){"use strict";var r=n(315),o=n(312),i=n(198),a=n(685);(e.exports=function(e,t){var n,i,u,s,l;return arguments.length<2||"string"!=typeof e?(s=t,t=e,e=null):s=arguments[2],null==e?(n=u=!0,i=!1):(n=a.call(e,"c"),i=a.call(e,"e"),u=a.call(e,"w")),l={value:t,configurable:n,enumerable:i,writable:u},s?r(o(s),l):l}).gs=function(e,t,n){var u,s,l,c;return"string"!=typeof e?(l=n,n=t,t=e,e=null):l=arguments[3],null==t?t=void 0:i(t)?null==n?n=void 0:i(n)||(l=n,n=void 0):(l=t,t=n=void 0),null==e?(u=!0,s=!1):(u=a.call(e,"c"),s=a.call(e,"e")),c={get:t,set:n,configurable:u,enumerable:s},l?r(o(l),c):c}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBeforeExecute=t.canExecuteScheme=t.operationScheme=t.hasHost=t.operationWithMeta=t.parameterWithMeta=t.parameterInclusionSettingFor=t.parameterWithMetaByIdentity=t.allowTryItOutFor=t.mutatedRequestFor=t.requestFor=t.responseFor=t.mutatedRequests=t.requests=t.responses=t.taggedOperations=t.operationsWithTags=t.tagDetails=t.tags=t.operationsWithRootInherited=t.schemes=t.host=t.basePath=t.definitions=t.findDefinition=t.securityDefinitions=t.security=t.produces=t.consumes=t.operations=t.paths=t.semver=t.version=t.externalDocs=t.info=t.isOAS3=t.spec=t.specJsonWithResolvedSubtrees=t.specResolvedSubtree=t.specResolved=t.specJson=t.specSource=t.specStr=t.url=t.lastError=void 0;var r=s(n(17)),o=s(n(83));t.getParameter=function(e,t,n,r){return t=t||[],e.getIn(["meta","paths"].concat((0,o.default)(t),["parameters"]),(0,u.fromJS)([])).find(function(e){return u.Map.isMap(e)&&e.get("name")===n&&e.get("in")===r})||(0,u.Map)()},t.parameterValues=function(e,t,n){return t=t||[],P.apply(void 0,[e].concat((0,o.default)(t))).get("parameters",(0,u.List)()).reduce(function(e,t){var r=n&&"body"===t.get("in")?t.get("value_xml"):t.get("value");return e.set(t.get("in")+"."+t.get("name"),r)},(0,u.fromJS)({}))},t.parametersIncludeIn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(u.List.isList(e))return e.some(function(e){return u.Map.isMap(e)&&e.get("in")===t})},t.parametersIncludeType=T,t.contentTypeValues=function(e,t){t=t||[];var n=d(e).getIn(["paths"].concat((0,o.default)(t)),(0,u.fromJS)({})),r=e.getIn(["meta","paths"].concat((0,o.default)(t)),(0,u.fromJS)({})),i=M(e,t),a=n.get("parameters")||new u.List,s=r.get("consumes_value")?r.get("consumes_value"):T(a,"file")?"multipart/form-data":T(a,"formData")?"application/x-www-form-urlencoded":void 0;return(0,u.fromJS)({requestContentType:s,responseContentType:i})},t.currentProducesFor=M,t.producesOptionsFor=function(e,t){t=t||[];var n=d(e),i=n.getIn(["paths"].concat((0,o.default)(t)),null);if(null===i)return;var a=t,u=(0,r.default)(a,1)[0],s=i.get("produces",null),l=n.getIn(["paths",u,"produces"],null),c=n.getIn(["produces"],null);return s||l||c},t.consumesOptionsFor=function(e,t){t=t||[];var n=d(e),i=n.getIn(["paths"].concat((0,o.default)(t)),null);if(null===i)return;var a=t,u=(0,r.default)(a,1)[0],s=i.get("consumes",null),l=n.getIn(["paths",u,"consumes"],null),c=n.getIn(["consumes"],null);return s||l||c};var i=n(57),a=n(9),u=n(7);function s(e){return e&&e.__esModule?e:{default:e}}var l=["get","put","post","delete","options","head","patch","trace"],c=function(e){return e||(0,u.Map)()},f=(t.lastError=(0,i.createSelector)(c,function(e){return e.get("lastError")}),t.url=(0,i.createSelector)(c,function(e){return e.get("url")}),t.specStr=(0,i.createSelector)(c,function(e){return e.get("spec")||""}),t.specSource=(0,i.createSelector)(c,function(e){return e.get("specSource")||"not-editor"}),t.specJson=(0,i.createSelector)(c,function(e){return e.get("json",(0,u.Map)())})),p=(t.specResolved=(0,i.createSelector)(c,function(e){return e.get("resolved",(0,u.Map)())}),t.specResolvedSubtree=function(e,t){return e.getIn(["resolvedSubtrees"].concat((0,o.default)(t)),void 0)},function e(t,n){return u.Map.isMap(t)&&u.Map.isMap(n)?n.get("$$ref")?n:(0,u.OrderedMap)().mergeWith(e,t,n):n}),d=t.specJsonWithResolvedSubtrees=(0,i.createSelector)(c,function(e){return(0,u.OrderedMap)().mergeWith(p,e.get("json"),e.get("resolvedSubtrees"))}),h=t.spec=function(e){return f(e)},v=(t.isOAS3=(0,i.createSelector)(h,function(){return!1}),t.info=(0,i.createSelector)(h,function(e){return j(e&&e.get("info"))})),m=(t.externalDocs=(0,i.createSelector)(h,function(e){return j(e&&e.get("externalDocs"))}),t.version=(0,i.createSelector)(v,function(e){return e&&e.get("version")})),g=(t.semver=(0,i.createSelector)(m,function(e){return/v?([0-9]*)\.([0-9]*)\.([0-9]*)/i.exec(e).slice(1)}),t.paths=(0,i.createSelector)(d,function(e){return e.get("paths")})),y=t.operations=(0,i.createSelector)(g,function(e){if(!e||e.size<1)return(0,u.List)();var t=(0,u.List)();return e&&e.forEach?(e.forEach(function(e,n){if(!e||!e.forEach)return{};e.forEach(function(e,r){l.indexOf(r)<0||(t=t.push((0,u.fromJS)({path:n,method:r,operation:e,id:r+"-"+n})))})}),t):(0,u.List)()}),b=t.consumes=(0,i.createSelector)(h,function(e){return(0,u.Set)(e.get("consumes"))}),_=t.produces=(0,i.createSelector)(h,function(e){return(0,u.Set)(e.get("produces"))}),w=(t.security=(0,i.createSelector)(h,function(e){return e.get("security",(0,u.List)())}),t.securityDefinitions=(0,i.createSelector)(h,function(e){return e.get("securityDefinitions")}),t.findDefinition=function(e,t){var n=e.getIn(["resolvedSubtrees","definitions",t],null),r=e.getIn(["json","definitions",t],null);return n||r||null},t.definitions=(0,i.createSelector)(h,function(e){var t=e.get("definitions");return u.Map.isMap(t)?t:(0,u.Map)()}),t.basePath=(0,i.createSelector)(h,function(e){return e.get("basePath")}),t.host=(0,i.createSelector)(h,function(e){return e.get("host")}),t.schemes=(0,i.createSelector)(h,function(e){return e.get("schemes",(0,u.Map)())}),t.operationsWithRootInherited=(0,i.createSelector)(y,b,_,function(e,t,n){return e.map(function(e){return e.update("operation",function(e){if(e){if(!u.Map.isMap(e))return;return e.withMutations(function(e){return e.get("consumes")||e.update("consumes",function(e){return(0,u.Set)(e).merge(t)}),e.get("produces")||e.update("produces",function(e){return(0,u.Set)(e).merge(n)}),e})}return(0,u.Map)()})})})),E=t.tags=(0,i.createSelector)(h,function(e){return e.get("tags",(0,u.List)())}),x=t.tagDetails=function(e,t){return(E(e)||(0,u.List)()).filter(u.Map.isMap).find(function(e){return e.get("name")===t},(0,u.Map)())},S=t.operationsWithTags=(0,i.createSelector)(w,E,function(e,t){return e.reduce(function(e,t){var n=(0,u.Set)(t.getIn(["operation","tags"]));return n.count()<1?e.update("default",(0,u.List)(),function(e){return e.push(t)}):n.reduce(function(e,n){return e.update(n,(0,u.List)(),function(e){return e.push(t)})},e)},t.reduce(function(e,t){return e.set(t.get("name"),(0,u.List)())},(0,u.OrderedMap)()))}),C=(t.taggedOperations=function(e){return function(t){var n=(0,t.getConfigs)(),r=n.tagsSorter,o=n.operationsSorter;return S(e).sortBy(function(e,t){return t},function(e,t){var n="function"==typeof r?r:a.sorters.tagsSorter[r];return n?n(e,t):null}).map(function(t,n){var r="function"==typeof o?o:a.sorters.operationsSorter[o],i=r?t.sort(r):t;return(0,u.Map)({tagDetails:x(e,n),operations:i})})}},t.responses=(0,i.createSelector)(c,function(e){return e.get("responses",(0,u.Map)())})),k=t.requests=(0,i.createSelector)(c,function(e){return e.get("requests",(0,u.Map)())}),A=t.mutatedRequests=(0,i.createSelector)(c,function(e){return e.get("mutatedRequests",(0,u.Map)())}),O=(t.responseFor=function(e,t,n){return C(e).getIn([t,n],null)},t.requestFor=function(e,t,n){return k(e).getIn([t,n],null)},t.mutatedRequestFor=function(e,t,n){return A(e).getIn([t,n],null)},t.allowTryItOutFor=function(){return!0},t.parameterWithMetaByIdentity=function(e,t,n){var r=d(e).getIn(["paths"].concat((0,o.default)(t),["parameters"]),(0,u.OrderedMap)()),i=e.getIn(["meta","paths"].concat((0,o.default)(t),["parameters"]),(0,u.OrderedMap)());return r.map(function(e){var t=i.get(n.get("name")+"."+n.get("in")),r=i.get(n.get("name")+"."+n.get("in")+".hash-"+n.hashCode());return(0,u.OrderedMap)().merge(e,t,r)}).find(function(e){return e.get("in")===n.get("in")&&e.get("name")===n.get("name")},(0,u.OrderedMap)())}),P=(t.parameterInclusionSettingFor=function(e,t,n,r){var i=n+"."+r;return e.getIn(["meta","paths"].concat((0,o.default)(t),["parameter_inclusions",i]),!1)},t.parameterWithMeta=function(e,t,n,r){var i=d(e).getIn(["paths"].concat((0,o.default)(t),["parameters"]),(0,u.OrderedMap)()).find(function(e){return e.get("in")===r&&e.get("name")===n},(0,u.OrderedMap)());return O(e,t,i)},t.operationWithMeta=function(e,t,n){var r=d(e).getIn(["paths",t,n],(0,u.OrderedMap)()),o=e.getIn(["meta","paths",t,n],(0,u.OrderedMap)()),i=r.get("parameters",(0,u.List)()).map(function(r){return O(e,[t,n],r)});return(0,u.OrderedMap)().merge(r,o).set("parameters",i)});t.hasHost=(0,i.createSelector)(h,function(e){var t=e.get("host");return"string"==typeof t&&t.length>0&&"/"!==t[0]});function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(u.List.isList(e))return e.some(function(e){return u.Map.isMap(e)&&e.get("type")===t})}function M(e,t){t=t||[];var n=d(e).getIn(["paths"].concat((0,o.default)(t)),null);if(null!==n){var r=e.getIn(["meta","paths"].concat((0,o.default)(t),["produces_value"]),null),i=n.getIn(["produces",0],null);return r||i||"application/json"}}var I=t.operationScheme=function(e,t,n){var r=e.get("url").match(/^([a-z][a-z0-9+\-.]*):/),o=Array.isArray(r)?r[1]:null;return e.getIn(["scheme",t,n])||e.getIn(["scheme","_defaultScheme"])||o||""};t.canExecuteScheme=function(e,t,n){return["http","https"].indexOf(I(e,t,n))>-1},t.validateBeforeExecute=function(e,t){t=t||[];var n=!0;return e.getIn(["meta","paths"].concat((0,o.default)(t),["parameters"]),(0,u.fromJS)([])).forEach(function(e){var t=e.get("errors");t&&t.count()&&(n=!1)}),n};function j(e){return u.Map.isMap(e)?e:new u.Map}},function(e,t,n){var r=n(49),o=n(330),i=n(331),a=n(36),u=n(115),s=n(165),l={},c={};(t=e.exports=function(e,t,n,f,p){var d,h,v,m,g=p?function(){return e}:s(e),y=r(n,f,t?2:1),b=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(i(g)){for(d=u(e.length);d>b;b++)if((m=t?y(a(h=e[b])[0],h[1]):y(e[b]))===l||m===c)return m}else for(v=g.call(e);!(h=v.next()).done;)if((m=o(v,y,h.value,t))===l||m===c)return m}).BREAK=l,t.RETURN=c},function(e,t,n){"use strict";var r=n(86);e.exports=r.DEFAULT=new r({include:[n(108)],explicit:[n(758),n(759),n(760)]})},function(e,t,n){var r=n(345),o=n(105),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){"use strict";var r=n(11),o=(n(8),{}),i={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,t,n,o,i,a,u,s){var l,c;this.isInTransaction()&&r("27");try{this._isInTransaction=!0,l=!0,this.initializeAll(0),c=e.call(t,n,o,i,a,u,s),l=!1}finally{try{if(l)try{this.closeAll(0)}catch(e){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return c},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var r=t[n];try{this.wrapperInitData[n]=o,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===o)try{this.initializeAll(n+1)}catch(e){}}}},closeAll:function(e){this.isInTransaction()||r("28");for(var t=this.transactionWrappers,n=e;n<t.length;n++){var i,a=t[n],u=this.wrapperInitData[n];try{i=!0,u!==o&&a.close&&a.close.call(this,u),i=!1}finally{if(i)try{this.closeAll(n+1)}catch(e){}}}this.wrapperInitData.length=0}};e.exports=i},function(e,t,n){"use strict";var r=n(111),o=n(359),i={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:n(216),button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+o.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+o.currentScrollTop}};function a(e,t,n,o){return r.call(this,e,t,n,o)}r.augmentClass(a,i),e.exports=a},function(e,t,n){"use strict";var r,o=n(26),i=n(218),a=/^[ \r\n\t\f]/,u=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,s=n(219)(function(e,t){if(e.namespaceURI!==i.svg||"innerHTML"in e)e.innerHTML=t;else{(r=r||document.createElement("div")).innerHTML="<svg>"+t+"</svg>";for(var n=r.firstChild;n.firstChild;)e.appendChild(n.firstChild)}});if(o.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(s=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),a.test(t)||"<"===t[0]&&u.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),l=null}e.exports=s},function(e,t,n){"use strict";var r=/["'&<>]/;e.exports=function(e){return"boolean"==typeof e||"number"==typeof e?""+e:function(e){var t,n=""+e,o=r.exec(n);if(!o)return n;var i="",a=0,u=0;for(a=o.index;a<n.length;a++){switch(n.charCodeAt(a)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#x27;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}u!==a&&(i+=n.substring(u,a)),u=a+1,i+=t}return u!==a?i+n.substring(u,a):i}(e)}},function(e,t,n){"use strict";var r,o=n(13),i=n(211),a=n(805),u=n(359),s=n(806),l=n(215),c={},f=!1,p=0,d={topAbort:"abort",topAnimationEnd:s("animationend")||"animationend",topAnimationIteration:s("animationiteration")||"animationiteration",topAnimationStart:s("animationstart")||"animationstart",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:s("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},h="_reactListenersID"+String(Math.random()).slice(2);var v=o({},a,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(v.handleTopLevel),v.ReactEventListener=e}},setEnabled:function(e){v.ReactEventListener&&v.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!v.ReactEventListener||!v.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,r=function(e){return Object.prototype.hasOwnProperty.call(e,h)||(e[h]=p++,c[e[h]]={}),c[e[h]]}(n),o=i.registrationNameDependencies[e],a=0;a<o.length;a++){var u=o[a];r.hasOwnProperty(u)&&r[u]||("topWheel"===u?l("wheel")?v.ReactEventListener.trapBubbledEvent("topWheel","wheel",n):l("mousewheel")?v.ReactEventListener.trapBubbledEvent("topWheel","mousewheel",n):v.ReactEventListener.trapBubbledEvent("topWheel","DOMMouseScroll",n):"topScroll"===u?l("scroll",!0)?v.ReactEventListener.trapCapturedEvent("topScroll","scroll",n):v.ReactEventListener.trapBubbledEvent("topScroll","scroll",v.ReactEventListener.WINDOW_HANDLE):"topFocus"===u||"topBlur"===u?(l("focus",!0)?(v.ReactEventListener.trapCapturedEvent("topFocus","focus",n),v.ReactEventListener.trapCapturedEvent("topBlur","blur",n)):l("focusin")&&(v.ReactEventListener.trapBubbledEvent("topFocus","focusin",n),v.ReactEventListener.trapBubbledEvent("topBlur","focusout",n)),r.topBlur=!0,r.topFocus=!0):d.hasOwnProperty(u)&&v.ReactEventListener.trapBubbledEvent(u,d[u],n),r[u]=!0)}},trapBubbledEvent:function(e,t,n){return v.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return v.ReactEventListener.trapCapturedEvent(e,t,n)},supportsEventPageXY:function(){if(!document.createEvent)return!1;var e=document.createEvent("MouseEvent");return null!=e&&"pageX"in e},ensureScrollValueMonitoring:function(){if(void 0===r&&(r=v.supportsEventPageXY()),!r&&!f){var e=u.refreshScrollValues;v.ReactEventListener.monitorScrollValue(e),f=!0}}});e.exports=v},function(e,t,n){"use strict";function r(){this.__rules__=[],this.__cache__=null}r.prototype.__find__=function(e){for(var t=this.__rules__.length,n=-1;t--;)if(this.__rules__[++n].name===e)return n;return-1},r.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach(function(e){e.enabled&&e.alt.forEach(function(e){t.indexOf(e)<0&&t.push(e)})}),e.__cache__={},t.forEach(function(t){e.__cache__[t]=[],e.__rules__.forEach(function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))})})},r.prototype.at=function(e,t,n){var r=this.__find__(e),o=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=o.alt||[],this.__cache__=null},r.prototype.before=function(e,t,n,r){var o=this.__find__(e),i=r||{};if(-1===o)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},r.prototype.after=function(e,t,n,r){var o=this.__find__(e),i=r||{};if(-1===o)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},r.prototype.push=function(e,t,n){var r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},r.prototype.enable=function(e,t){e=Array.isArray(e)?e:[e],t&&this.__rules__.forEach(function(e){e.enabled=!1}),e.forEach(function(e){var t=this.__find__(e);if(t<0)throw new Error("Rules manager: invalid rule name "+e);this.__rules__[t].enabled=!0},this),this.__cache__=null},r.prototype.disable=function(e){(e=Array.isArray(e)?e:[e]).forEach(function(e){var t=this.__find__(e);if(t<0)throw new Error("Rules manager: invalid rule name "+e);this.__rules__[t].enabled=!1},this),this.__cache__=null},r.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,o,i=-1,a=e.posMax,u=e.pos,s=e.isInLabel;if(e.isInLabel)return-1;if(e.labelUnmatchedScopes)return e.labelUnmatchedScopes--,-1;for(e.pos=t+1,e.isInLabel=!0,n=1;e.pos<a;){if(91===(o=e.src.charCodeAt(e.pos)))n++;else if(93===o&&0===--n){r=!0;break}e.parser.skipToken(e)}return r?(i=e.pos,e.labelUnmatchedScopes=0):e.labelUnmatchedScopes=n-1,e.pos=u,e.isInLabel=s,i}},function(e,t,n){var r=n(93);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(28),o=n(21).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){var r=n(28);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){e.exports=n(50)},function(e,t,n){var r=n(36),o=n(453),i=n(164),a=n(162)("IE_PROTO"),u=function(){},s=function(){var e,t=n(157)("iframe"),r=i.length;for(t.style.display="none",n(241).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),s=e.F;r--;)delete s.prototype[i[r]];return s()};e.exports=Object.create||function(e,t){var n;return null!==e?(u.prototype=r(e),n=new u,u.prototype=null,n[a]=e):n=s(),void 0===t?n:o(n,t)}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(163)("keys"),o=n(116);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(21),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(166),o=n(19)("iterator"),i=n(70);e.exports=n(15).getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){var r=n(93),o=n(19)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:i?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(99),o=n(18)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:i?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(74),o=n(33).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){var r=n(243)("keys"),o=n(168);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(117).f,o=n(118),i=n(18)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(121);e.exports.f=function(e){return new function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=r(t),this.reject=r(n)}(e)}},function(e,t,n){var r=n(257),o=n(53);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(e))}},function(e,t,n){var r=n(18)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){t.f=n(19)},function(e,t,n){var r=n(21),o=n(15),i=n(114),a=n(175),u=n(40).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||u(t,e,{value:a.f(e)})}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){},function(e,t,n){"use strict";(function(t){ /*! * @description Recursive object extending * @author Viacheslav Lotsmanov <[email protected]> * @license MIT * * The MIT License (MIT) * * Copyright (c) 2013-2018 Viacheslav Lotsmanov * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof t){var n=t.alloc?t.alloc(e.length):new t(e.length);return e.copy(n),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}function o(e,t){return"__proto__"===t?void 0:e[t]}var i=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,t,a=arguments[0];return Array.prototype.slice.call(arguments,1).forEach(function(u){"object"!=typeof u||null===u||Array.isArray(u)||Object.keys(u).forEach(function(s){return t=o(a,s),(e=o(u,s))===a?void 0:"object"!=typeof e||null===e?void(a[s]=e):Array.isArray(e)?void(a[s]=function e(t){var o=[];return t.forEach(function(t,a){"object"==typeof t&&null!==t?Array.isArray(t)?o[a]=e(t):n(t)?o[a]=r(t):o[a]=i({},t):o[a]=t}),o}(e)):n(e)?void(a[s]=r(e)):"object"!=typeof t||null===t||Array.isArray(t)?void(a[s]=i({},e)):void(a[s]=i(t,e))})}),a}}).call(t,n(54).Buffer)},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e?function e(t,n){var r;r=Array.isArray(t)?[]:{};n.push(t);Object.keys(t).forEach(function(o){var i=t[o];"function"!=typeof i&&(i&&"object"==typeof i?-1!==n.indexOf(t[o])?r[o]="[Circular]":r[o]=e(t[o],n.slice(0)):r[o]=i)});"string"==typeof t.name&&(r.name=t.name);"string"==typeof t.message&&(r.message=t.message);"string"==typeof t.stack&&(r.stack=t.stack);return r}(e,[]):"function"==typeof e?"[Function: "+(e.name||"anonymous")+"]":e}},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function o(e){return null===e?"null":void 0===e?"undefined":"object"===(void 0===e?"undefined":r(e))?Array.isArray(e)?"array":"object":void 0===e?"undefined":r(e)}function i(e){return"object"===o(e)?u(e):"array"===o(e)?a(e):e}function a(e){return e.map(i)}function u(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=i(e[n]));return t}function s(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n={arrayBehaviour:(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).arrayBehaviour||"replace"},r=t.map(function(e){return e||{}}),i=e||{},l=0;l<r.length;l++)for(var c=r[l],f=Object.keys(c),p=0;p<f.length;p++){var d=f[p],h=c[d],v=o(h),m=o(i[d]);if("object"===v)if("undefined"!==m){var g="object"===m?i[d]:{};i[d]=s({},[g,u(h)],n)}else i[d]=u(h);else if("array"===v)if("array"===m){var y=a(h);i[d]="merge"===n.arrayBehaviour?i[d].concat(y):y}else i[d]=a(h);else i[d]=h}return i}e.exports=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return s(e,n)},e.exports.noMutate=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return s({},t)},e.exports.withOptions=function(e,t,n){return s(e,t,n)}},function(e,t,n){var r=n(590),o=n(606),i=n(608),a=n(609),u=n(610);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=u,e.exports=s},function(e,t,n){var r=n(63)(n(37),"Map");e.exports=r},function(e,t,n){var r=n(130),o=n(614),i=n(615),a=n(616),u=n(617),s=n(618);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=u,l.prototype.set=s,e.exports=l},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t,n){var r=n(628),o=n(295),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,u=a?function(e){return null==e?[]:(e=Object(e),r(a(e),function(t){return i.call(e,t)}))}:o;e.exports=u},function(e,t,n){var r=n(630),o=n(47),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!u.call(e,"callee")};e.exports=s},function(e,t,n){(function(e){var r=n(37),o=n(631),i="object"==typeof t&&t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,u=a&&a.exports===i?r.Buffer:void 0,s=(u?u.isBuffer:void 0)||o;e.exports=s}).call(t,n(134)(e))},function(e,t){var n=9007199254740991;e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(279),o="object"==typeof t&&t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,u=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=u}).call(t,n(134)(e))},function(e,t,n){var r=n(24),o=n(128),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||a.test(e)||!i.test(e)||null!=t&&e in Object(t)}},function(e,t){e.exports=function(e){return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.memoizedSampleFromSchema=t.memoizedCreateXMLExample=t.sampleXmlFromSchema=t.inferSchema=t.sampleFromSchema=void 0,t.createXMLExample=p;var r=n(9),o=u(n(657)),i=u(n(670)),a=u(n(181));function u(e){return e&&e.__esModule?e:{default:e}}var s={string:function(){return"string"},string_email:function(){return"[email protected]"},"string_date-time":function(){return(new Date).toISOString()},string_date:function(){return(new Date).toISOString().substring(0,10)},string_uuid:function(){return"3fa85f64-5717-4562-b3fc-2c963f66afa6"},string_hostname:function(){return"example.com"},string_ipv4:function(){return"198.51.100.42"},string_ipv6:function(){return"2001:0db8:5b96:0000:0000:426f:8e17:642a"},number:function(){return 0},number_float:function(){return 0},integer:function(){return 0},boolean:function(e){return"boolean"!=typeof e.default||e.default}},l=function(e){var t=e=(0,r.objectify)(e),n=t.type,o=t.format,i=s[n+"_"+o]||s[n];return(0,r.isFunc)(i)?i(e):"Unknown Type: "+e.type},c=t.sampleFromSchema=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(0,r.objectify)(t),i=o.type,a=o.example,u=o.properties,s=o.additionalProperties,c=o.items,f=n.includeReadOnly,p=n.includeWriteOnly;if(void 0!==a)return(0,r.deeplyStripKey)(a,"$$ref",function(e){return"string"==typeof e&&e.indexOf("#")>-1});if(!i)if(u)i="object";else{if(!c)return;i="array"}if("object"===i){var d=(0,r.objectify)(u),h={};for(var v in d)d[v]&&d[v].deprecated||d[v]&&d[v].readOnly&&!f||d[v]&&d[v].writeOnly&&!p||(h[v]=e(d[v],n));if(!0===s)h.additionalProp1={};else if(s)for(var m=(0,r.objectify)(s),g=e(m,n),y=1;y<4;y++)h["additionalProp"+y]=g;return h}return"array"===i?Array.isArray(c.anyOf)?c.anyOf.map(function(t){return e(t,n)}):Array.isArray(c.oneOf)?c.oneOf.map(function(t){return e(t,n)}):[e(c,n)]:t.enum?t.default?t.default:(0,r.normalizeArray)(t.enum)[0]:"file"!==i?l(t):void 0},f=(t.inferSchema=function(e){return e.schema&&(e=e.schema),e.properties&&(e.type="object"),e},t.sampleXmlFromSchema=function e(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,a.default)({},(0,r.objectify)(t)),u=i.type,s=i.properties,c=i.additionalProperties,f=i.items,p=i.example,d=o.includeReadOnly,h=o.includeWriteOnly,v=i.default,m={},g={},y=t.xml,b=y.name,_=y.prefix,w=y.namespace,E=i.enum,x=void 0;if(!u)if(s||c)u="object";else{if(!f)return;u="array"}(b=b||"notagname",n=(_?_+":":"")+b,w)&&(g[_?"xmlns:"+_:"xmlns"]=w);if("array"===u&&f){if(f.xml=f.xml||y||{},f.xml.name=f.xml.name||y.name,y.wrapped)return m[n]=[],Array.isArray(p)?p.forEach(function(t){f.example=t,m[n].push(e(f,o))}):Array.isArray(v)?v.forEach(function(t){f.default=t,m[n].push(e(f,o))}):m[n]=[e(f,o)],g&&m[n].push({_attr:g}),m;var S=[];return Array.isArray(p)?(p.forEach(function(t){f.example=t,S.push(e(f,o))}),S):Array.isArray(v)?(v.forEach(function(t){f.default=t,S.push(e(f,o))}),S):e(f,o)}if("object"===u){var C=(0,r.objectify)(s);for(var k in m[n]=[],p=p||{},C)if(C.hasOwnProperty(k)&&(!C[k].readOnly||d)&&(!C[k].writeOnly||h))if(C[k].xml=C[k].xml||{},C[k].xml.attribute){var A=Array.isArray(C[k].enum)&&C[k].enum[0],O=C[k].example,P=C[k].default;g[C[k].xml.name||k]=void 0!==O&&O||void 0!==p[k]&&p[k]||void 0!==P&&P||A||l(C[k])}else{C[k].xml.name=C[k].xml.name||k,void 0===C[k].example&&void 0!==p[k]&&(C[k].example=p[k]);var T=e(C[k]);Array.isArray(T)?m[n]=m[n].concat(T):m[n].push(T)}return!0===c?m[n].push({additionalProp:"Anything can be here"}):c&&m[n].push({additionalProp:l(c)}),g&&m[n].push({_attr:g}),m}return x=void 0!==p?p:void 0!==v?v:Array.isArray(E)?E[0]:l(t),m[n]=g?[{_attr:g},x]:x,m});function p(e,t){var n=f(e,t);if(n)return(0,o.default)(n,{declaration:!0,indent:"\t"})}t.memoizedCreateXMLExample=(0,i.default)(p),t.memoizedSampleFromSchema=(0,i.default)(c)},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function o(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,a,u,s,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(i(n=this._events[e]))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:u=Array.prototype.slice.call(arguments,1),n.apply(this,u)}else if(o(n))for(u=Array.prototype.slice.call(arguments,1),a=(l=n.slice()).length,s=0;s<a;s++)l[s].apply(this,u);return!0},n.prototype.addListener=function(e,t){var a;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(a=i(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&a>0&&this._events[e].length>a&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function o(){this.removeListener(e,o),n||(n=!0,t.apply(this,arguments))}return o.listener=t,this.on(e,o),this},n.prototype.removeListener=function(e,t){var n,i,a,u;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(n=this._events[e]).length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(u=a;u-- >0;)if(n[u]===t||n[u].listener&&n[u].listener===t){i=u;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){(t=e.exports=n(306)).Stream=t,t.Readable=t,t.Writable=n(197),t.Duplex=n(65),t.Transform=n(311),t.PassThrough=n(665)},function(e,t,n){"use strict";(function(t,r,o){var i=n(140);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=y;var u,s=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:i.nextTick;y.WritableState=g;var l=n(106);l.inherits=n(81);var c={deprecate:n(664)},f=n(307),p=n(141).Buffer,d=o.Uint8Array||function(){};var h,v=n(308);function m(){}function g(e,t){u=u||n(65),e=e||{};var r=t instanceof u;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var o=e.highWaterMark,l=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(l||0===l)?l:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),S(e,t))}(e,n,r,t,o);else{var a=E(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||w(e,n),r?s(_,e,n,a,o):_(e,n,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function y(e){if(u=u||n(65),!(h.call(y,this)||this instanceof u))return new y(e);this._writableState=new g(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function b(e,t,n,r,o,i,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function _(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),S(e,t)}function w(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),i=t.corkedRequestsFree;i.entry=n;for(var u=0,s=!0;n;)o[u]=n,n.isBuf||(s=!1),n=n.next,u+=1;o.allBuffers=s,b(e,t,!0,t.length,o,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,f=n.callback;if(b(e,t,!1,t.objectMode?1:l.length,l,c,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function x(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),S(e,t)})}function S(e,t){var n=E(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(x,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}l.inherits(y,f),g.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(g.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===y&&(e&&e._writableState instanceof g)}})):h=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,n){var r,o=this._writableState,a=!1,u=!o.objectMode&&(r=e,p.isBuffer(r)||r instanceof d);return u&&!p.isBuffer(e)&&(e=function(e){return p.from(e)}(e)),"function"==typeof t&&(n=t,t=null),u?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=m),o.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}(this,n):(u||function(e,t,n,r){var o=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),i.nextTick(r,a),o=!1),o}(this,o,e,n))&&(o.pendingcb++,a=function(e,t,n,r,o,i){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=p.from(t,n));return t}(t,r,o);r!==a&&(n=!0,o="buffer",r=a)}var u=t.objectMode?1:r.length;t.length+=u;var s=t.length<t.highWaterMark;s||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:o,isBuf:n,callback:i,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,u,r,o,i);return s}(this,o,u,e,t,n)),a},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||w(this,e))},y.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,S(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=v.destroy,y.prototype._undestroy=v.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}}).call(t,n(55),n(309).setImmediate,n(31))},function(e,t,n){"use strict";e.exports=function(e){return"function"==typeof e}},function(e,t,n){"use strict";e.exports=n(691)()?Array.from:n(692)},function(e,t,n){"use strict";var r=n(705),o=n(67),i=n(82),a=Array.prototype.indexOf,u=Object.prototype.hasOwnProperty,s=Math.abs,l=Math.floor;e.exports=function(e){var t,n,c,f;if(!r(e))return a.apply(this,arguments);for(n=o(i(this).length),c=arguments[1],t=c=isNaN(c)?0:c>=0?l(c):o(this.length)-l(s(c));t<n;++t)if(u.call(this,t)&&(f=this[t],r(f)))return t;return-1}},function(e,t,n){"use strict";(function(t,n){var r,o;r=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},o=function(e){var t,n,o=document.createTextNode(""),i=0;return new e(function(){var e;if(t)n&&(t=n.concat(t));else{if(!n)return;t=n}if(n=t,t=null,"function"==typeof n)return e=n,n=null,void e();for(o.data=i=++i%2;n;)e=n.shift(),n.length||(n=null),e()}).observe(o,{characterData:!0}),function(e){r(e),t?"function"==typeof t?t=[t,e]:t.push(e):(t=e,o.data=i=++i%2)}},e.exports=function(){if("object"==typeof t&&t&&"function"==typeof t.nextTick)return t.nextTick;if("object"==typeof document&&document){if("function"==typeof MutationObserver)return o(MutationObserver);if("function"==typeof WebKitMutationObserver)return o(WebKitMutationObserver)}return"function"==typeof n?function(e){n(r(e))}:"function"==typeof setTimeout||"object"==typeof setTimeout?function(e){setTimeout(r(e),0)}:null}()}).call(t,n(55),n(309).setImmediate)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHOW=t.UPDATE_MODE=t.UPDATE_FILTER=t.UPDATE_LAYOUT=void 0,t.updateLayout=function(e){return{type:o,payload:e}},t.updateFilter=function(e){return{type:i,payload:e}},t.show=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e=(0,r.normalizeArray)(e),{type:u,payload:{thing:e,shown:t}}},t.changeMode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e=(0,r.normalizeArray)(e),{type:a,payload:{thing:e,mode:t}}};var r=n(9),o=t.UPDATE_LAYOUT="layout_update_layout",i=t.UPDATE_FILTER="layout_update_filter",a=t.UPDATE_MODE="layout_update_mode",u=t.SHOW="layout_show"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.execute=t.executeRequest=t.logRequest=t.setMutatedRequest=t.setRequest=t.setResponse=t.updateEmptyParamInclusion=t.validateParams=t.invalidateResolvedSubtreeCache=t.updateResolvedSubtree=t.requestResolvedSubtree=t.resolveSpec=t.parseToJson=t.SET_SCHEME=t.UPDATE_RESOLVED_SUBTREE=t.UPDATE_RESOLVED=t.UPDATE_OPERATION_META_VALUE=t.CLEAR_VALIDATE_PARAMS=t.CLEAR_REQUEST=t.CLEAR_RESPONSE=t.LOG_REQUEST=t.SET_MUTATED_REQUEST=t.SET_REQUEST=t.SET_RESPONSE=t.VALIDATE_PARAMS=t.UPDATE_EMPTY_PARAM_INCLUSION=t.UPDATE_PARAM=t.UPDATE_JSON=t.UPDATE_URL=t.UPDATE_SPEC=void 0;var r=b(n(25)),o=b(n(84)),i=b(n(23)),a=b(n(42)),u=b(n(204)),s=b(n(339)),l=b(n(340)),c=b(n(45));t.updateSpec=function(e){var t=L(e).replace(/\t/g," ");if("string"==typeof e)return{type:_,payload:t}},t.updateResolved=function(e){return{type:N,payload:e}},t.updateUrl=function(e){return{type:w,payload:e}},t.updateJsonSpec=function(e){return{type:E,payload:e}},t.changeParam=function(e,t,n,r,o){return{type:x,payload:{path:e,value:r,paramName:t,paramIn:n,isXml:o}}},t.changeParamByIdentity=function(e,t,n,r){return{type:x,payload:{path:e,param:t,value:n,isXml:r}}},t.clearValidateParams=function(e){return{type:I,payload:{pathMethod:e}}},t.changeConsumesValue=function(e,t){return{type:j,payload:{path:e,value:t,key:"consumes_value"}}},t.changeProducesValue=function(e,t){return{type:j,payload:{path:e,value:t,key:"produces_value"}}},t.clearResponse=function(e,t){return{type:T,payload:{path:e,method:t}}},t.clearRequest=function(e,t){return{type:M,payload:{path:e,method:t}}},t.setScheme=function(e,t,n){return{type:D,payload:{scheme:e,path:t,method:n}}};var f=b(n(208)),p=n(7),d=b(n(210)),h=b(n(180)),v=b(n(343)),m=b(n(764)),g=b(n(766)),y=n(9);function b(e){return e&&e.__esModule?e:{default:e}}var _=t.UPDATE_SPEC="spec_update_spec",w=t.UPDATE_URL="spec_update_url",E=t.UPDATE_JSON="spec_update_json",x=t.UPDATE_PARAM="spec_update_param",S=t.UPDATE_EMPTY_PARAM_INCLUSION="spec_update_empty_param_inclusion",C=t.VALIDATE_PARAMS="spec_validate_param",k=t.SET_RESPONSE="spec_set_response",A=t.SET_REQUEST="spec_set_request",O=t.SET_MUTATED_REQUEST="spec_set_mutated_request",P=t.LOG_REQUEST="spec_log_request",T=t.CLEAR_RESPONSE="spec_clear_response",M=t.CLEAR_REQUEST="spec_clear_request",I=t.CLEAR_VALIDATE_PARAMS="spec_clear_validate_param",j=t.UPDATE_OPERATION_META_VALUE="spec_update_operation_meta_value",N=t.UPDATE_RESOLVED="spec_update_resolved",R=t.UPDATE_RESOLVED_SUBTREE="spec_update_resolved_subtree",D=t.SET_SCHEME="set_scheme",L=function(e){return(0,v.default)(e)?e:""};t.parseToJson=function(e){return function(t){var n=t.specActions,r=t.specSelectors,o=t.errActions,i=r.specStr,a=null;try{e=e||i(),o.clear({source:"parser"}),a=f.default.safeLoad(e)}catch(e){return console.error(e),o.newSpecErr({source:"parser",level:"error",message:e.reason,line:e.mark&&e.mark.line?e.mark.line+1:void 0})}return a&&"object"===(void 0===a?"undefined":(0,c.default)(a))?n.updateJsonSpec(a):{}}};var U=!1,q=(t.resolveSpec=function(e,t){return function(n){var r=n.specActions,o=n.specSelectors,i=n.errActions,a=n.fn,u=a.fetch,s=a.resolve,l=a.AST,c=void 0===l?{}:l,f=n.getConfigs;U||(console.warn("specActions.resolveSpec is deprecated since v3.10.0 and will be removed in v4.0.0; use requestResolvedSubtree instead!"),U=!0);var p=f(),d=p.modelPropertyMacro,h=p.parameterMacro,v=p.requestInterceptor,m=p.responseInterceptor;void 0===e&&(e=o.specJson()),void 0===t&&(t=o.url());var g=c.getLineNumberForPath?c.getLineNumberForPath:function(){},y=o.specStr();return s({fetch:u,spec:e,baseDoc:t,modelPropertyMacro:d,parameterMacro:h,requestInterceptor:v,responseInterceptor:m}).then(function(e){var t=e.spec,n=e.errors;if(i.clear({type:"thrown"}),Array.isArray(n)&&n.length>0){var o=n.map(function(e){return console.error(e),e.line=e.fullPath?g(y,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",Object.defineProperty(e,"message",{enumerable:!0,value:e.message}),e});i.newThrownErrBatch(o)}return r.updateResolved(t)})}},[]),F=(0,m.default)((0,l.default)(s.default.mark(function e(){var t,n,r,o,i,a,c,f,d,h,v,m,y,b,_,w,E;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=q.system){e.next=4;break}return console.error("debResolveSubtrees: don't have a system to operate on, aborting."),e.abrupt("return");case 4:if(n=t.errActions,r=t.errSelectors,o=t.fn,i=o.resolveSubtree,a=o.AST,c=void 0===a?{}:a,f=t.specSelectors,d=t.specActions,i){e.next=8;break}return console.error("Error: Swagger-Client did not provide a `resolveSubtree` method, doing nothing."),e.abrupt("return");case 8:return h=c.getLineNumberForPath?c.getLineNumberForPath:function(){},v=f.specStr(),m=t.getConfigs(),y=m.modelPropertyMacro,b=m.parameterMacro,_=m.requestInterceptor,w=m.responseInterceptor,e.prev=11,e.next=14,q.reduce(function(){var e=(0,l.default)(s.default.mark(function e(t,o){var a,u,l,c,p,d,m;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return a=e.sent,u=a.resultMap,l=a.specWithCurrentSubtrees,e.next=7,i(l,o,{baseDoc:f.url(),modelPropertyMacro:y,parameterMacro:b,requestInterceptor:_,responseInterceptor:w});case 7:return c=e.sent,p=c.errors,d=c.spec,r.allErrors().size&&n.clear({type:"thrown"}),Array.isArray(p)&&p.length>0&&(m=p.map(function(e){return e.line=e.fullPath?h(v,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",Object.defineProperty(e,"message",{enumerable:!0,value:e.message}),e}),n.newThrownErrBatch(m)),(0,g.default)(u,o,d),(0,g.default)(l,o,d),e.abrupt("return",{resultMap:u,specWithCurrentSubtrees:l});case 15:case"end":return e.stop()}},e,void 0)}));return function(t,n){return e.apply(this,arguments)}}(),u.default.resolve({resultMap:(f.specResolvedSubtree([])||(0,p.Map)()).toJS(),specWithCurrentSubtrees:f.specJson().toJS()}));case 14:E=e.sent,delete q.system,q=[],e.next=22;break;case 19:e.prev=19,e.t0=e.catch(11),console.error(e.t0);case 22:d.updateResolvedSubtree([],E.resultMap);case 23:case"end":return e.stop()}},e,void 0,[[11,19]])})),35);t.requestResolvedSubtree=function(e){return function(t){q.push(e),q.system=t,F()}};t.updateResolvedSubtree=function(e,t){return{type:R,payload:{path:e,value:t}}},t.invalidateResolvedSubtreeCache=function(){return{type:R,payload:{path:[],value:(0,p.Map)()}}},t.validateParams=function(e,t){return{type:C,payload:{pathMethod:e,isOAS3:t}}},t.updateEmptyParamInclusion=function(e,t,n,r){return{type:S,payload:{pathMethod:e,paramName:t,paramIn:n,includeEmptyValue:r}}};t.setResponse=function(e,t,n){return{payload:{path:e,method:t,res:n},type:k}},t.setRequest=function(e,t,n){return{payload:{path:e,method:t,req:n},type:A}},t.setMutatedRequest=function(e,t,n){return{payload:{path:e,method:t,req:n},type:O}},t.logRequest=function(e){return{payload:e,type:P}},t.executeRequest=function(e){return function(t){var n=t.fn,r=t.specActions,o=t.specSelectors,u=t.getConfigs,s=t.oas3Selectors,l=e.pathName,c=e.method,f=e.operation,p=u(),v=p.requestInterceptor,m=p.responseInterceptor,g=f.toJS();if(g&&g.parameters&&g.parameters.length&&g.parameters.filter(function(e){return e&&!0===e.allowEmptyValue}).forEach(function(t){if(o.parameterInclusionSettingFor([l,c],t.name,t.in)){e.parameters=e.parameters||{};var n=e.parameters[t.name];(!n||n&&0===n.size)&&(e.parameters[t.name]="")}}),e.contextUrl=(0,d.default)(o.url()).toString(),g&&g.operationId?e.operationId=g.operationId:g&&l&&c&&(e.operationId=n.opId(g,l,c)),o.isOAS3()){var b=l+":"+c;e.server=s.selectedServer(b)||s.selectedServer();var _=s.serverVariables({server:e.server,namespace:b}).toJS(),w=s.serverVariables({server:e.server}).toJS();e.serverVariables=(0,a.default)(_).length?_:w,e.requestContentType=s.requestContentType(l,c),e.responseContentType=s.responseContentType(l,c)||"*/*";var E=s.requestBodyValue(l,c);(0,y.isJSONObject)(E)?e.requestBody=JSON.parse(E):E&&E.toJS?e.requestBody=E.toJS():e.requestBody=E}var x=(0,i.default)({},e);x=n.buildRequest(x),r.setRequest(e.pathName,e.method,x);e.requestInterceptor=function(t){var n=v.apply(this,[t]),o=(0,i.default)({},n);return r.setMutatedRequest(e.pathName,e.method,o),n},e.responseInterceptor=m;var S=Date.now();return n.execute(e).then(function(t){t.duration=Date.now()-S,r.setResponse(e.pathName,e.method,t)}).catch(function(t){return r.setResponse(e.pathName,e.method,{error:!0,err:(0,h.default)(t)})})}};t.execute=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.path,n=e.method,i=(0,o.default)(e,["path","method"]);return function(e){var o=e.fn.fetch,a=e.specSelectors,u=e.specActions,s=a.specJsonWithResolvedSubtrees().toJS(),l=a.operationScheme(t,n),c=a.contentTypeValues([t,n]).toJS(),f=c.requestContentType,p=c.responseContentType,d=/xml/i.test(f),h=a.parameterValues([t,n],d).toJS();return u.executeRequest((0,r.default)({},i,{fetch:o,spec:s,pathName:t,method:n,parameters:h,requestContentType:f,scheme:l,responseContentType:p}))}}},function(e,t,n){e.exports={default:n(733),__esModule:!0}},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){"use strict";var r=n(94);e.exports.f=function(e){return new function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=r(t),this.reject=r(n)}(e)}},function(e,t,n){var r=n(50);e.exports=function(e,t,n){for(var o in t)n&&e[o]?e[o]=t[o]:r(e,o,t[o]);return e}},function(e,t,n){"use strict";var r=n(742);e.exports=r},function(e,t,n){"use strict";var r=n(86);e.exports=new r({explicit:[n(745),n(746),n(747)]})},function(e,t,n){"use strict";(function(t){var r=n(762),o=n(763),i=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,u=[["#","hash"],["?","query"],["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],s={hash:1,query:1};function l(e){var n,r={},o=typeof(e=e||t.location||{});if("blob:"===e.protocol)r=new f(unescape(e.pathname),{});else if("string"===o)for(n in r=new f(e,{}),s)delete r[n];else if("object"===o){for(n in e)n in s||(r[n]=e[n]);void 0===r.slashes&&(r.slashes=a.test(e.href))}return r}function c(e){var t=i.exec(e);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!t[2],rest:t[3]}}function f(e,t,n){if(!(this instanceof f))return new f(e,t,n);var i,a,s,p,d,h,v=u.slice(),m=typeof t,g=this,y=0;for("object"!==m&&"string"!==m&&(n=t,t=null),n&&"function"!=typeof n&&(n=o.parse),t=l(t),i=!(a=c(e||"")).protocol&&!a.slashes,g.slashes=a.slashes||i&&t.slashes,g.protocol=a.protocol||t.protocol||"",e=a.rest,a.slashes||(v[2]=[/(.*)/,"pathname"]);y<v.length;y++)s=(p=v[y])[0],h=p[1],s!=s?g[h]=e:"string"==typeof s?~(d=e.indexOf(s))&&("number"==typeof p[2]?(g[h]=e.slice(0,d),e=e.slice(d+p[2])):(g[h]=e.slice(d),e=e.slice(0,d))):(d=s.exec(e))&&(g[h]=d[1],e=e.slice(0,d.index)),g[h]=g[h]||i&&p[3]&&t[h]||"",p[4]&&(g[h]=g[h].toLowerCase());n&&(g.query=n(g.query)),i&&t.slashes&&"/"!==g.pathname.charAt(0)&&(""!==g.pathname||""!==t.pathname)&&(g.pathname=function(e,t){for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,o=n[r-1],i=!1,a=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),a++):a&&(0===r&&(i=!0),n.splice(r,1),a--);return i&&n.unshift(""),"."!==o&&".."!==o||n.push(""),n.join("/")}(g.pathname,t.pathname)),r(g.port,g.protocol)||(g.host=g.hostname,g.port=""),g.username=g.password="",g.auth&&(p=g.auth.split(":"),g.username=p[0]||"",g.password=p[1]||""),g.origin=g.protocol&&g.host&&"file:"!==g.protocol?g.protocol+"//"+g.host:"null",g.href=g.toString()}f.prototype={set:function(e,t,n){var i=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||o.parse)(t)),i[e]=t;break;case"port":i[e]=t,r(t,i.protocol)?t&&(i.host=i.hostname+":"+t):(i.host=i.hostname,i[e]="");break;case"hostname":i[e]=t,i.port&&(t+=":"+i.port),i.host=t;break;case"host":i[e]=t,/:\d+$/.test(t)?(t=t.split(":"),i.port=t.pop(),i.hostname=t.join(":")):(i.hostname=t,i.port="");break;case"protocol":i.protocol=t.toLowerCase(),i.slashes=!n;break;case"pathname":case"hash":if(t){var a="pathname"===e?"/":"#";i[e]=t.charAt(0)!==a?a+t:t}else i[e]=t;break;default:i[e]=t}for(var s=0;s<u.length;s++){var l=u[s];l[4]&&(i[l[1]]=i[l[1]].toLowerCase())}return i.origin=i.protocol&&i.host&&"file:"!==i.protocol?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(e){e&&"function"==typeof e||(e=o.stringify);var t,n=this,r=n.protocol;r&&":"!==r.charAt(r.length-1)&&(r+=":");var i=r+(n.slashes?"//":"");return n.username&&(i+=n.username,n.password&&(i+=":"+n.password),i+="@"),i+=n.host+n.pathname,(t="object"==typeof n.query?e(n.query):n.query)&&(i+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(i+=n.hash),i}},f.extractProtocol=c,f.location=l,f.qs=o,e.exports=f}).call(t,n(31))},function(e,t,n){"use strict";var r=n(11),o=(n(8),null),i={};function a(){if(o)for(var e in i){var t=i[e],n=o.indexOf(e);if(n>-1||r("96",e),!l.plugins[n]){t.extractEvents||r("97",e),l.plugins[n]=t;var a=t.eventTypes;for(var s in a)u(a[s],t,s)||r("98",s,e)}}}function u(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)&&r("99",n),l.eventNameDispatchConfigs[n]=e;var o=e.phasedRegistrationNames;if(o){for(var i in o){if(o.hasOwnProperty(i))s(o[i],t,n)}return!0}return!!e.registrationName&&(s(e.registrationName,t,n),!0)}function s(e,t,n){l.registrationNameModules[e]&&r("100",e),l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){o&&r("101"),o=Array.prototype.slice.call(e),a()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];i.hasOwnProperty(n)&&i[n]===o||(i[n]&&r("102",n),i[n]=o,t=!0)}t&&a()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;if(void 0!==t.phasedRegistrationNames){var n=t.phasedRegistrationNames;for(var r in n)if(n.hasOwnProperty(r)){var o=l.registrationNameModules[n[r]];if(o)return o}}return null},_resetEventPlugins:function(){for(var e in o=null,i)i.hasOwnProperty(e)&&delete i[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var a in r)r.hasOwnProperty(a)&&delete r[a]}};e.exports=l},function(e,t,n){"use strict";var r,o,i=n(11),a=n(213);n(8),n(10);function u(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=s.getNodeFromInstance(r),t?a.invokeGuardedCallbackWithCatch(o,n,e):a.invokeGuardedCallback(o,n,e),e.currentTarget=null}var s={isEndish:function(e){return"topMouseUp"===e||"topTouchEnd"===e||"topTouchCancel"===e},isMoveish:function(e){return"topMouseMove"===e||"topTouchMove"===e},isStartish:function(e){return"topMouseDown"===e||"topTouchStart"===e},executeDirectDispatch:function(e){var t=e._dispatchListeners,n=e._dispatchInstances;Array.isArray(t)&&i("103"),e.currentTarget=t?s.getNodeFromInstance(n):null;var r=t?t(e):null;return e.currentTarget=null,e._dispatchListeners=null,e._dispatchInstances=null,r},executeDispatchesInOrder:function(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)u(e,t,n[o],r[o]);else n&&u(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null},executeDispatchesInOrderStopAtTrue:function(e){var t=function(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r]))return n[r]}else if(t&&t(e,n))return n;return null}(e);return e._dispatchInstances=null,e._dispatchListeners=null,t},hasDispatches:function(e){return!!e._dispatchListeners},getInstanceFromNode:function(e){return r.getInstanceFromNode(e)},getNodeFromInstance:function(e){return r.getNodeFromInstance(e)},isAncestor:function(e,t){return o.isAncestor(e,t)},getLowestCommonAncestor:function(e,t){return o.getLowestCommonAncestor(e,t)},getParentInstance:function(e){return o.getParentInstance(e)},traverseTwoPhase:function(e,t,n){return o.traverseTwoPhase(e,t,n)},traverseEnterLeave:function(e,t,n,r,i){return o.traverseEnterLeave(e,t,n,r,i)},injection:{injectComponentTree:function(e){r=e},injectTreeTraversal:function(e){o=e}}};e.exports=s},function(e,t,n){"use strict";var r=null;function o(e,t,n){try{t(n)}catch(e){null===r&&(r=e)}}var i={invokeGuardedCallback:o,invokeGuardedCallbackWithCatch:o,rethrowCaughtError:function(){if(r){var e=r;throw r=null,e}}};e.exports=i},function(e,t,n){"use strict";e.exports=function(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}},function(e,t,n){"use strict";var r,o=n(26);o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")) /** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, * `reset`, `load`, `error`, and `select`. * * Borrows from Modernizr. * * @param {string} eventNameSuffix Event name, e.g. "click". * @param {?boolean} capture Check if the capture phase is supported. * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */,e.exports=function(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var a=document.createElement("div");a.setAttribute(n,"return;"),i="function"==typeof a[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},function(e,t,n){"use strict";var r={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function o(e){var t=this.nativeEvent;if(t.getModifierState)return t.getModifierState(e);var n=r[e];return!!n&&!!t[n]}e.exports=function(e){return o}},function(e,t,n){"use strict";var r=n(89),o=n(790),i=(n(14),n(39),n(219)),a=n(150),u=n(360);function s(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}var l=i(function(e,t,n){e.insertBefore(t,n)});function c(e,t,n){r.insertTreeBefore(e,t,n)}function f(e,t,n){Array.isArray(t)?function(e,t,n,r){var o=t;for(;;){var i=o.nextSibling;if(l(e,o,r),o===n)break;o=i}}(e,t[0],t[1],n):l(e,t,n)}function p(e,t){if(Array.isArray(t)){var n=t[1];d(e,t=t[0],n),e.removeChild(n)}e.removeChild(t)}function d(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChild(r)}}var h=o.dangerouslyReplaceNodeWithMarkup;var v={dangerouslyReplaceNodeWithMarkup:h,replaceDelimitedText:function(e,t,n){var r=e.parentNode,o=e.nextSibling;o===t?n&&l(r,document.createTextNode(n),o):n?(u(o,n),d(r,o,t)):d(r,e,t)},processUpdates:function(e,t){for(var n=0;n<t.length;n++){var r=t[n];switch(r.type){case"INSERT_MARKUP":c(e,r.content,s(e,r.afterNode));break;case"MOVE_EXISTING":f(e,r.fromNode,s(e,r.afterNode));break;case"SET_MARKUP":a(e,r.content);break;case"TEXT_CONTENT":u(e,r.content);break;case"REMOVE_NODE":p(e,r.fromNode)}}}};e.exports=v},function(e,t,n){"use strict";e.exports={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"}},function(e,t,n){"use strict";e.exports=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}},function(e,t,n){"use strict";var r=n(11),o=n(808),i=n(269)(n(75).isValidElement),a=(n(8),n(10),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0});function u(e){null!=e.checkedLink&&null!=e.valueLink&&r("87")}function s(e){u(e),(null!=e.value||null!=e.onChange)&&r("88")}function l(e){u(e),(null!=e.checked||null!=e.onChange)&&r("89")}var c={value:function(e,t,n){return!e[t]||a[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:i.func},f={};function p(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var d={checkPropTypes:function(e,t,n){for(var r in c){if(c.hasOwnProperty(r))var i=c[r](t,r,e,"prop",null,o);if(i instanceof Error&&!(i.message in f)){f[i.message]=!0;p(n)}}},getValue:function(e){return e.valueLink?(s(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(l(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(s(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(l(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};e.exports=d},function(e,t,n){"use strict";var r=n(11),o=(n(8),!1),i={replaceNodeWithMarkup:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){o&&r("104"),i.replaceNodeWithMarkup=e.replaceNodeWithMarkup,i.processChildrenUpdates=e.processChildrenUpdates,o=!0}}};e.exports=i},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function o(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}e.exports=function(e,t){if(o(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var a=0;a<n.length;a++)if(!r.call(t,n[a])||!o(e[n[a]],t[n[a]]))return!1;return!0}},function(e,t,n){"use strict";e.exports=function(e,t){var n=null===e||!1===e,r=null===t||!1===t;if(n||r)return n===r;var o=typeof e,i=typeof t;return"string"===o||"number"===o?"string"===i||"number"===i:"object"===i&&e.type===t.type&&e.key===t.key}},function(e,t,n){"use strict";var r={escape:function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})},unescape:function(e){var t={"=0":"=","=2":":"};return(""+("."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1))).replace(/(=0|=2)/g,function(e){return t[e]})}};e.exports=r},function(e,t,n){"use strict";var r=n(11),o=(n(46),n(112)),i=(n(39),n(43));n(8),n(10);function a(e){i.enqueueUpdate(e)}function u(e){var t=typeof e;if("object"!==t)return t;var n=e.constructor&&e.constructor.name||t,r=Object.keys(e);return r.length>0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function s(e,t){var n=o.get(e);return n||null}var l={isMounted:function(e){var t=o.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){l.validateCallback(t,n);var r=s(e);if(!r)return null;r._pendingCallbacks?r._pendingCallbacks.push(t):r._pendingCallbacks=[t],a(r)},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],a(e)},enqueueForceUpdate:function(e){var t=s(e);t&&(t._pendingForceUpdate=!0,a(t))},enqueueReplaceState:function(e,t,n){var r=s(e);r&&(r._pendingStateQueue=[t],r._pendingReplaceState=!0,void 0!==n&&null!==n&&(l.validateCallback(n,"replaceState"),r._pendingCallbacks?r._pendingCallbacks.push(n):r._pendingCallbacks=[n]),a(r))},enqueueSetState:function(e,t){var n=s(e);n&&((n._pendingStateQueue||(n._pendingStateQueue=[])).push(t),a(n))},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,a(e)},validateCallback:function(e,t){e&&"function"!=typeof e&&r("122",t,u(e))}};e.exports=l},function(e,t,n){"use strict";n(13);var r=n(34),o=(n(10),r);e.exports=o},function(e,t,n){"use strict";e.exports=function(e){var t,n=e.keyCode;return"charCode"in e?0===(t=e.charCode)&&13===n&&(t=13):t=n,t>=32||13===t?t:0}},function(e,t,n){var r=n(62),o=n(229),i=n(47),a="[object Object]",u=Function.prototype,s=Object.prototype,l=u.toString,c=s.hasOwnProperty,f=l.call(Object);e.exports=function(e){if(!i(e)||r(e)!=a)return!1;var t=o(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==f}},function(e,t,n){var r=n(298)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(292);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t){var n=this&&this.__extends||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function r(){this.constructor=e}e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},r=Object.prototype.hasOwnProperty; /*! * https://github.com/Starcounter-Jack/JSON-Patch * (c) 2017 Joachim Wester * MIT license */function o(e,t){return r.call(e,t)}function i(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);t=[];for(var r in e)o(e,r)&&t.push(r);return t}function a(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function u(e,t){var n;for(var r in e)if(o(e,r)){if(e[r]===t)return a(r)+"/";if("object"==typeof e[r]&&""!=(n=u(e[r],t)))return a(r)+"/"+n}return""}t.hasOwnProperty=o,t._objectKeys=i,t._deepClone=function(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}},t.isInteger=function(e){for(var t,n=0,r=e.length;n<r;){if(!((t=e.charCodeAt(n))>=48&&t<=57))return!1;n++}return!0},t.escapePathComponent=a,t.unescapePathComponent=function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")},t._getPathRecursive=u,t.getPath=function(e,t){if(e===t)return"/";var n=u(e,t);if(""===n)throw new Error("Object not found in root");return"/"+n},t.hasUndefined=function e(t){if(void 0===t)return!0;if(t)if(Array.isArray(t)){for(var n=0,r=t.length;n<r;n++)if(e(t[n]))return!0}else if("object"==typeof t){var o=i(t),a=o.length;for(n=0;n<a;n++)if(e(t[o[n]]))return!0}return!1};var s=function(e){function t(t,n,r,o,i){e.call(this,t),this.message=t,this.name=n,this.index=r,this.operation=o,this.tree=i}return n(t,e),t}(Error);t.PatchError=s},function(e,t,n){var r=n(49),o=n(155),i=n(72),a=n(115),u=n(917);e.exports=function(e,t){var n=1==e,s=2==e,l=3==e,c=4==e,f=6==e,p=5==e||f,d=t||u;return function(t,u,h){for(var v,m,g=i(t),y=o(g),b=r(u,h,3),_=a(y.length),w=0,E=n?d(t,_):s?d(t,0):void 0;_>w;w++)if((p||w in y)&&(m=b(v=y[w],w,g),e))if(n)E[w]=m;else if(m)switch(e){case 3:return!0;case 5:return v;case 6:return w;case 2:E.push(v)}else if(c)return!1;return f?-1:l||c?c:E}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.authorizeRequest=t.authorizeAccessCodeWithBasicAuthentication=t.authorizeAccessCodeWithFormParams=t.authorizeApplication=t.authorizePassword=t.preAuthorizeImplicit=t.CONFIGURE_AUTH=t.VALIDATE=t.AUTHORIZE_OAUTH2=t.PRE_AUTHORIZE_OAUTH2=t.LOGOUT=t.AUTHORIZE=t.SHOW_AUTH_POPUP=void 0;var r=l(n(45)),o=l(n(23)),i=l(n(41));t.showDefinitions=function(e){return{type:c,payload:e}},t.authorize=function(e){return{type:f,payload:e}},t.logout=function(e){return{type:p,payload:e}},t.authorizeOauth2=function(e){return{type:d,payload:e}},t.configureAuth=function(e){return{type:h,payload:e}};var a=l(n(210)),u=l(n(32)),s=n(9);function l(e){return e&&e.__esModule?e:{default:e}}var c=t.SHOW_AUTH_POPUP="show_popup",f=t.AUTHORIZE="authorize",p=t.LOGOUT="logout",d=(t.PRE_AUTHORIZE_OAUTH2="pre_authorize_oauth2",t.AUTHORIZE_OAUTH2="authorize_oauth2"),h=(t.VALIDATE="validate",t.CONFIGURE_AUTH="configure_auth");t.preAuthorizeImplicit=function(e){return function(t){var n=t.authActions,r=t.errActions,o=e.auth,a=e.token,s=e.isValid,l=o.schema,c=o.name,f=l.get("flow");delete u.default.swaggerUIRedirectOauth2,"accessCode"===f||s||r.newAuthErr({authId:c,source:"auth",level:"warning",message:"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"}),a.error?r.newAuthErr({authId:c,source:"auth",level:"error",message:(0,i.default)(a)}):n.authorizeOauth2({auth:o,token:a})}};t.authorizePassword=function(e){return function(t){var n=t.authActions,r=e.schema,i=e.name,a=e.username,u=e.password,l=e.passwordType,c=e.clientId,f=e.clientSecret,p={grant_type:"password",scope:e.scopes.join(" "),username:a,password:u},d={};switch(l){case"request-body":!function(e,t,n){t&&(0,o.default)(e,{client_id:t});n&&(0,o.default)(e,{client_secret:n})}(p,c,f);break;case"basic":d.Authorization="Basic "+(0,s.btoa)(c+":"+f);break;default:console.warn("Warning: invalid passwordType "+l+" was passed, not including client id and secret")}return n.authorizeRequest({body:(0,s.buildFormData)(p),url:r.get("tokenUrl"),name:i,headers:d,query:{},auth:e})}};t.authorizeApplication=function(e){return function(t){var n=t.authActions,r=e.schema,o=e.scopes,i=e.name,a=e.clientId,u=e.clientSecret,l={Authorization:"Basic "+(0,s.btoa)(a+":"+u)},c={grant_type:"client_credentials",scope:o.join(" ")};return n.authorizeRequest({body:(0,s.buildFormData)(c),name:i,url:r.get("tokenUrl"),auth:e,headers:l})}},t.authorizeAccessCodeWithFormParams=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,i=t.name,a=t.clientId,u=t.clientSecret,l={grant_type:"authorization_code",code:t.code,client_id:a,client_secret:u,redirect_uri:n};return r.authorizeRequest({body:(0,s.buildFormData)(l),name:i,url:o.get("tokenUrl"),auth:t})}},t.authorizeAccessCodeWithBasicAuthentication=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,i=t.name,a=t.clientId,u=t.clientSecret,l={Authorization:"Basic "+(0,s.btoa)(a+":"+u)},c={grant_type:"authorization_code",code:t.code,client_id:a,redirect_uri:n};return r.authorizeRequest({body:(0,s.buildFormData)(c),name:i,url:o.get("tokenUrl"),auth:t,headers:l})}},t.authorizeRequest=function(e){return function(t){var n=t.fn,u=t.getConfigs,s=t.authActions,l=t.errActions,c=t.oas3Selectors,f=t.specSelectors,p=t.authSelectors,d=e.body,h=e.query,v=void 0===h?{}:h,m=e.headers,g=void 0===m?{}:m,y=e.name,b=e.url,_=e.auth,w=(p.getConfigs()||{}).additionalQueryStringParams,E=void 0;E=f.isOAS3()?(0,a.default)(b,c.selectedServer(),!0):(0,a.default)(b,f.url(),!0),"object"===(void 0===w?"undefined":(0,r.default)(w))&&(E.query=(0,o.default)({},E.query,w));var x=E.toString(),S=(0,o.default)({Accept:"application/json, text/plain, */*","Content-Type":"application/x-www-form-urlencoded"},g);n.fetch({url:x,method:"post",headers:S,query:v,body:d,requestInterceptor:u().requestInterceptor,responseInterceptor:u().responseInterceptor}).then(function(e){var t=JSON.parse(e.data),n=t&&(t.error||""),r=t&&(t.parseError||"");e.ok?n||r?l.newAuthErr({authId:y,level:"error",source:"auth",message:(0,i.default)(t)}):s.authorizeOauth2({auth:_,token:t}):l.newAuthErr({authId:y,level:"error",source:"auth",message:e.statusText})}).catch(function(e){var t=new Error(e).message;if(e.response&&e.response.data){var n=e.response.data;try{var r="string"==typeof n?JSON.parse(n):n;r.error&&(t+=", error: "+r.error),r.error_description&&(t+=", description: "+r.error_description)}catch(e){}}l.newAuthErr({authId:y,level:"error",source:"auth",message:t})})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseYamlConfig=void 0;var r,o=n(208),i=(r=o)&&r.__esModule?r:{default:r};t.parseYamlConfig=function(e,t){try{return i.default.safeLoad(e)}catch(e){return t&&t.errActions.newThrownErr(new Error(e)),{}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loaded=t.TOGGLE_CONFIGS=t.UPDATE_CONFIGS=void 0;var r,o=n(22),i=(r=o)&&r.__esModule?r:{default:r};t.update=function(e,t){return{type:a,payload:(0,i.default)({},e,t)}},t.toggle=function(e){return{type:u,payload:e}};var a=t.UPDATE_CONFIGS="configs_update",u=t.TOGGLE_CONFIGS="configs_toggle";t.loaded=function(){return function(){}}},function(e,t,n){"use strict";function r(e,t,n,r,o){this.src=e,this.env=r,this.options=n,this.parser=t,this.tokens=o,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache=[],this.isInLabel=!1,this.linkLevel=0,this.linkContent="",this.labelUnmatchedScopes=0}r.prototype.pushPending=function(){this.tokens.push({type:"text",content:this.pending,level:this.pendingLevel}),this.pending=""},r.prototype.push=function(e){this.pending&&this.pushPending(),this.tokens.push(e),this.pendingLevel=this.level},r.prototype.cacheSet=function(e,t){for(var n=this.cache.length;n<=e;n++)this.cache.push(0);this.cache[e]=t},r.prototype.cacheGet=function(e){return e<this.cache.length?this.cache[e]:0},e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setSelectedServer=function(e,t){return{type:r,payload:{selectedServerUrl:e,namespace:t}}},t.setRequestBodyValue=function(e){var t=e.value,n=e.pathMethod;return{type:o,payload:{value:t,pathMethod:n}}},t.setRequestContentType=function(e){var t=e.value,n=e.pathMethod;return{type:i,payload:{value:t,pathMethod:n}}},t.setResponseContentType=function(e){var t=e.value,n=e.path,r=e.method;return{type:a,payload:{value:t,path:n,method:r}}},t.setServerVariableValue=function(e){var t=e.server,n=e.namespace,r=e.key,o=e.val;return{type:u,payload:{server:t,namespace:n,key:r,val:o}}};var r=t.UPDATE_SELECTED_SERVER="oas3_set_servers",o=t.UPDATE_REQUEST_BODY_VALUE="oas3_set_request_body_value",i=t.UPDATE_REQUEST_CONTENT_TYPE="oas3_set_request_content_type",a=t.UPDATE_RESPONSE_CONTENT_TYPE="oas3_set_response_content_type",u=t.UPDATE_SERVER_VARIABLE_VALUE="oas3_set_server_variable_value"},function(e,t,n){"use strict";var r=n(114),o=n(20),i=n(159),a=n(50),u=n(70),s=n(452),l=n(97),c=n(242),f=n(19)("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};e.exports=function(e,t,n,h,v,m,g){s(n,t,h);var y,b,_,w=function(e){if(!p&&e in C)return C[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},E=t+" Iterator",x="values"==v,S=!1,C=e.prototype,k=C[f]||C["@@iterator"]||v&&C[v],A=k||w(v),O=v?x?w("entries"):A:void 0,P="Array"==t&&C.entries||k;if(P&&(_=c(P.call(new e)))!==Object.prototype&&_.next&&(l(_,E,!0),r||"function"==typeof _[f]||a(_,f,d)),x&&k&&"values"!==k.name&&(S=!0,A=function(){return k.call(this)}),r&&!g||!p&&!S&&C[f]||a(C,f,A),u[t]=A,u[E]=d,v)if(y={values:x?A:w("values"),keys:m?A:w("keys"),entries:O},g)for(b in y)b in C||i(C,b,y[b]);else o(o.P+o.F*(p||S),t,y);return y}},function(e,t,n){e.exports=!n(44)&&!n(51)(function(){return 7!=Object.defineProperty(n(157)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(52),o=n(71),i=n(454)(!1),a=n(162)("IE_PROTO");e.exports=function(e,t){var n,u=o(e),s=0,l=[];for(n in u)n!=a&&r(u,n)&&l.push(n);for(;t.length>s;)r(u,n=t[s++])&&(~i(l,n)||l.push(n));return l}},function(e,t,n){var r=n(21).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(52),o=n(72),i=n(162)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var r=n(33),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var r=n(246)(!0);n(247)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(119),o=n(53);e.exports=function(e){return function(t,n){var i,a,u=String(o(t)),s=r(n),l=u.length;return s<0||s>=l?e?"":void 0:(i=u.charCodeAt(s))<55296||i>56319||s+1===l||(a=u.charCodeAt(s+1))<56320||a>57343?e?u.charAt(s):i:e?u.slice(s,s+2):a-56320+(i-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(248),o=n(29),i=n(73),a=n(58),u=n(102),s=n(462),l=n(171),c=n(468),f=n(18)("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};e.exports=function(e,t,n,h,v,m,g){s(n,t,h);var y,b,_,w=function(e){if(!p&&e in C)return C[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},E=t+" Iterator",x="values"==v,S=!1,C=e.prototype,k=C[f]||C["@@iterator"]||v&&C[v],A=k||w(v),O=v?x?w("entries"):A:void 0,P="Array"==t&&C.entries||k;if(P&&(_=c(P.call(new e)))!==Object.prototype&&_.next&&(l(_,E,!0),r||"function"==typeof _[f]||a(_,f,d)),x&&k&&"values"!==k.name&&(S=!0,A=function(){return k.call(this)}),r&&!g||!p&&!S&&C[f]||a(C,f,A),u[t]=A,u[E]=d,v)if(y={values:x?A:w("values"),keys:m?A:w("keys"),entries:O},g)for(b in y)b in C||i(C,b,y[b]);else o(o.P+o.F*(p||S),t,y);return y}},function(e,t){e.exports=!1},function(e,t,n){var r=n(465),o=n(251);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(119),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(33).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(59),o=n(121),i=n(18)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||void 0==(n=r(a)[i])?t:o(n)}},function(e,t,n){var r,o,i,a=n(120),u=n(480),s=n(252),l=n(169),c=n(33),f=c.process,p=c.setImmediate,d=c.clearImmediate,h=c.MessageChannel,v=c.Dispatch,m=0,g={},y=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},b=function(e){y.call(e.data)};p&&d||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return g[++m]=function(){u("function"==typeof e?e:Function(e),t)},r(m),m},d=function(e){delete g[e]},"process"==n(99)(f)?r=function(e){f.nextTick(a(y,e,1))}:v&&v.now?r=function(e){v.now(a(y,e,1))}:h?(i=(o=new h).port2,o.port1.onmessage=b,r=a(i.postMessage,i,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",b,!1)):r="onreadystatechange"in l("script")?function(e){s.appendChild(l("script")).onreadystatechange=function(){s.removeChild(this),y.call(e)}}:function(e){setTimeout(a(y,e,1),0)}),e.exports={set:p,clear:d}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var r=n(59),o=n(74),i=n(172);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){var r=n(74),o=n(99),i=n(18)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},function(e,t,n){var r=n(20),o=n(15),i=n(51);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},function(e,t,n){var r=n(93);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(240),o=n(164).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){var r=n(125),o=n(95),i=n(71),a=n(158),u=n(52),s=n(239),l=Object.getOwnPropertyDescriptor;t.f=n(44)?l:function(e,t){if(e=i(e),t=a(t,!0),s)try{return l(e,t)}catch(e){}if(u(e,t))return o(!r.f.call(e,t),e[t])}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){e.exports={default:n(532),__esModule:!0}},function(e,t,n){"use strict";var r=n(96),o=n(177),i=n(125),a=n(72),u=n(155),s=Object.assign;e.exports=!s||n(51)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=s({},e)[n]||Object.keys(s({},t)).join("")!=r})?function(e,t){for(var n=a(e),s=arguments.length,l=1,c=o.f,f=i.f;s>l;)for(var p,d=u(arguments[l++]),h=c?r(d).concat(c(d)):r(d),v=h.length,m=0;v>m;)f.call(d,p=h[m++])&&(n[p]=d[p]);return n}:s},function(e,t,n){"use strict";var r=n(104),o=n(13),i=n(266),a=(n(267),n(126));n(8),n(536);function u(e,t,n){this.props=e,this.context=t,this.refs=a,this.updater=n||i}function s(e,t,n){this.props=e,this.context=t,this.refs=a,this.updater=n||i}function l(){}u.prototype.isReactComponent={},u.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&r("85"),this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t,"setState")},u.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e,"forceUpdate")},l.prototype=u.prototype,s.prototype=new l,s.prototype.constructor=s,o(s.prototype,u.prototype),s.prototype.isPureReactComponent=!0,e.exports={Component:u,PureComponent:s}},function(e,t,n){"use strict";n(10);var r={isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){},enqueueReplaceState:function(e,t){},enqueueSetState:function(e,t){}};e.exports=r},function(e,t,n){"use strict";var r=!1;e.exports=r},function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=r},function(e,t,n){"use strict";var r=n(544);e.exports=function(e){return r(e,!1)}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(272),o=n(561),i=n(562),a=n(563),u=n(276);n(275);n.d(t,"createStore",function(){return r.b}),n.d(t,"combineReducers",function(){return o.a}),n.d(t,"bindActionCreators",function(){return i.a}),n.d(t,"applyMiddleware",function(){return a.a}),n.d(t,"compose",function(){return u.a})},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),t.b=function e(t,n,a){var u;"function"==typeof n&&void 0===a&&(a=n,n=void 0);if(void 0!==a){if("function"!=typeof a)throw new Error("Expected the enhancer to be a function.");return a(e)(t,n)}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var s=t;var l=n;var c=[];var f=c;var p=!1;function d(){f===c&&(f=c.slice())}function h(){return l}function v(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return d(),f.push(e),function(){if(t){t=!1,d();var n=f.indexOf(e);f.splice(n,1)}}}function m(e){if(!r.a(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(p)throw new Error("Reducers may not dispatch actions.");try{p=!0,l=s(l,e)}finally{p=!1}for(var t=c=f,n=0;n<t.length;n++){var o=t[n];o()}return e}m({type:i.INIT});return u={dispatch:m,subscribe:v,getState:h,replaceReducer:function(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");s=e,m({type:i.INIT})}},u[o.a]=function(){var e,t=v;return(e={subscribe:function(e){if("object"!=typeof e)throw new TypeError("Expected the observer to be an object.");function n(){e.next&&e.next(h())}n();var r=t(n);return{unsubscribe:r}}})[o.a]=function(){return this},e},u};var r=n(273),o=n(558),i={INIT:"@@redux/INIT"}},function(e,t,n){"use strict";var r=n(550),o=n(555),i=n(557),a="[object Object]",u=Function.prototype,s=Object.prototype,l=u.toString,c=s.hasOwnProperty,f=l.call(Object);t.a=function(e){if(!i.a(e)||r.a(e)!=a)return!1;var t=o.a(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==f}},function(e,t,n){"use strict";var r=n(551).a.Symbol;t.a=r},function(e,t,n){"use strict"},function(e,t,n){"use strict";t.a=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)return function(e){return e};if(1===t.length)return t[0];return t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e&&"@@redux/INIT"===e.type?"initialState argument passed to createStore":"previous state received by the reducer"},e.exports=t.default},function(e,t,n){var r=n(77),o=n(280),i=n(24),a=n(128),u=1/0,s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-u?"-0":n}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,n(31))},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},function(e,t,n){var r=n(577)("toUpperCase");e.exports=r},function(e,t){e.exports=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}},function(e,t){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return n.test(e)}},function(e,t){e.exports=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}},function(e,t,n){var r=n(182),o="Expected a function";function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(o);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},function(e,t,n){var r=n(62),o=n(38),i="[object AsyncFunction]",a="[object Function]",u="[object GeneratorFunction]",s="[object Proxy]";e.exports=function(e){if(!o(e))return!1;var t=r(e);return t==a||t==u||t==i||t==s}},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(611)(n(648));e.exports=r},function(e,t,n){var r=n(619),o=n(47);e.exports=function e(t,n,i,a,u){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,u))}},function(e,t,n){var r=n(620),o=n(291),i=n(623),a=1,u=2;e.exports=function(e,t,n,s,l,c){var f=n&a,p=e.length,d=t.length;if(p!=d&&!(f&&d>p))return!1;var h=c.get(e);if(h&&c.get(t))return h==t;var v=-1,m=!0,g=n&u?new r:void 0;for(c.set(e,t),c.set(t,e);++v<p;){var y=e[v],b=t[v];if(s)var _=f?s(b,y,v,t,e,c):s(y,b,v,e,t,c);if(void 0!==_){if(_)continue;m=!1;break}if(g){if(!o(t,function(e,t){if(!i(g,t)&&(y===e||l(y,e,n,s,c)))return g.push(t)})){m=!1;break}}else if(y!==b&&!l(y,b,n,s,c)){m=!1;break}}return c.delete(e),c.delete(t),m}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t,n){var r=n(37).Uint8Array;e.exports=r},function(e,t,n){var r=n(294),o=n(186),i=n(64);e.exports=function(e){return r(e,i,o)}},function(e,t,n){var r=n(185),o=n(24);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(629),o=n(187),i=n(24),a=n(188),u=n(135),s=n(297),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),c=!n&&o(e),f=!n&&!c&&a(e),p=!n&&!c&&!f&&s(e),d=n||c||f||p,h=d?r(e.length,String):[],v=h.length;for(var m in e)!t&&!l.call(e,m)||d&&("length"==m||f&&("offset"==m||"parent"==m)||p&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||u(m,v))||h.push(m);return h}},function(e,t,n){var r=n(632),o=n(190),i=n(191),a=i&&i.isTypedArray,u=a?o(a):r;e.exports=u},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(38);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},function(e,t,n){var r=n(643),o=n(644);e.exports=function(e,t){return null!=e&&o(e,t,r)}},function(e,t,n){var r=n(650);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},function(e,t,n){var r=n(38),o=n(128),i=NaN,a=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return i;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var n=s.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):u.test(e)?i:+e}},function(e,t,n){var r=n(653),o=n(656)(r);e.exports=o},function(e,t,n){var r=n(105),o=n(78),i=n(135),a=n(38);e.exports=function(e,t,n){if(!a(n))return!1;var u=typeof t;return!!("number"==u?o(n)&&i(t,n.length):"string"==u&&t in n)&&r(n[t],e)}},function(e,t,n){"use strict";(function(t,r){var o=n(140);e.exports=b;var i,a=n(262);b.ReadableState=y;n(195).EventEmitter;var u=function(e,t){return e.listeners(t).length},s=n(307),l=n(141).Buffer,c=t.Uint8Array||function(){};var f=n(106);f.inherits=n(81);var p=n(660),d=void 0;d=p&&p.debuglog?p.debuglog("stream"):function(){};var h,v=n(661),m=n(308);f.inherits(b,s);var g=["error","close","destroy","pause","resume"];function y(e,t){i=i||n(65),e=e||{};var r=t instanceof i;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var o=e.highWaterMark,a=e.readableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(a||0===a)?a:u,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new v,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(h||(h=n(310).StringDecoder),this.decoder=new h(e.encoding),this.encoding=e.encoding)}function b(e){if(i=i||n(65),!(this instanceof b))return new b(e);this._readableState=new y(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function _(e,t,n,r,o){var i,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,S(e)}(e,a)):(o||(i=function(e,t){var n;r=t,l.isBuffer(r)||r instanceof c||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(a,t)),i?e.emit("error",i):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?w(e,a,t,!1):k(e,a)):w(e,a,t,!1))):r||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function w(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&S(e)),k(e,t)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),b.prototype.destroy=m.destroy,b.prototype._undestroy=m.undestroy,b.prototype._destroy=function(e,t){this.push(null),t(e)},b.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=l.from(e,t),t=""),n=!0),_(this,e,t,!1,n)},b.prototype.unshift=function(e){return _(this,e,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(e){return h||(h=n(310).StringDecoder),this._readableState.decoder=new h(e),this._readableState.encoding=e,this};var E=8388608;function x(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=E?e=E:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(C,e):C(e))}function C(e){d("emit readable"),e.emit("readable"),T(e)}function k(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(A,e,t))}function A(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(d("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function O(e){d("readable nexttick read 0"),e.read(0)}function P(e,t){t.reading||(d("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),T(e),t.flowing&&!t.reading&&e.read(0)}function T(e){var t=e._readableState;for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function M(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,o=n.data;e-=o.length;for(;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(a===i.length?o+=i:o+=i.slice(0,e),0===(e-=a)){a===i.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(a));break}++r}return t.length-=r,o}(e,t):function(e,t){var n=l.allocUnsafe(e),r=t.head,o=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(n,n.length-e,0,a),0===(e-=a)){a===i.length?(++o,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(a));break}++o}return t.length-=o,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function I(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(j,t,e))}function j(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function N(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}b.prototype.read=function(e){d("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?I(this):S(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&I(this),null;var r,o=t.needReadable;return d("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",o=!0),t.ended||t.reading?d("reading or ended",o=!1):o&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=x(n,t))),null===(r=e>0?M(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&I(this)),null!==r&&this.emit("data",r),r},b.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,d("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?c:b;function l(t,r){d("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,d("cleanup"),e.removeListener("close",g),e.removeListener("finish",y),e.removeListener("drain",f),e.removeListener("error",m),e.removeListener("unpipe",l),n.removeListener("end",c),n.removeListener("end",b),n.removeListener("data",v),p=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function c(){d("onend"),e.end()}i.endEmitted?o.nextTick(s):n.once("end",s),e.on("unpipe",l);var f=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&u(e,"data")&&(t.flowing=!0,T(e))}}(n);e.on("drain",f);var p=!1;var h=!1;function v(t){d("ondata"),h=!1,!1!==e.write(t)||h||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==N(i.pipes,e))&&!p&&(d("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,h=!0),n.pause())}function m(t){d("onerror",t),b(),e.removeListener("error",m),0===u(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",y),b()}function y(){d("onfinish"),e.removeListener("close",g),b()}function b(){d("unpipe"),n.unpipe(e)}return n.on("data",v),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",m),e.once("close",g),e.once("finish",y),e.emit("pipe",n),i.flowing||(d("pipe resume"),n.resume()),e},b.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)r[i].emit("unpipe",this,n);return this}var a=N(t.pipes,e);return-1===a?this:(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},b.prototype.on=function(e,t){var n=s.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&S(this):o.nextTick(O,this))}return n},b.prototype.addListener=b.prototype.on,b.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,o.nextTick(P,e,t))}(this,e)),this},b.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},b.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var o in e.on("end",function(){if(d("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(o){(d("wrapped data"),n.decoder&&(o=n.decoder.write(o)),!n.objectMode||null!==o&&void 0!==o)&&((n.objectMode||o&&o.length)&&(t.push(o)||(r=!0,e.pause())))}),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var i=0;i<g.length;i++)e.on(g[i],this.emit.bind(this,g[i]));return this._read=function(t){d("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=M}).call(t,n(31),n(55))},function(e,t,n){e.exports=n(195).EventEmitter},function(e,t,n){"use strict";var r=n(140);function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(o,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(o,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(663),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(t,n(31))},function(e,t,n){"use strict";var r=n(141).Buffer,o=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=s,this.end=l,t=4;break;case"utf8":this.fillLast=u,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=p,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function u(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function s(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function p(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var o=a(t[r]);if(o>=0)return o>0&&(e.lastNeed=o-1),o;if(--r<n||-2===o)return 0;if((o=a(t[r]))>=0)return o>0&&(e.lastNeed=o-2),o;if(--r<n||-2===o)return 0;if((o=a(t[r]))>=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";e.exports=i;var r=n(65),o=n(106);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e),this._transformState={afterTransform:function(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){u(e,t,n)}):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}o.inherits=n(81),o.inherits(i,r),i.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},i.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},i.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var o=this._readableState;(r.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},i.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},i.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){"use strict";var r=n(66),o=Array.prototype.forEach,i=Object.create;e.exports=function(e){var t=i(null);return o.call(arguments,function(e){r(e)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(e),t)}),t}},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var r=n(67);e.exports=function(e,t,n){var o;return isNaN(e)?(o=t)>=0?n&&o?o-1:o:1:!1!==e&&r(e)}},function(e,t,n){"use strict";e.exports=n(679)()?Object.assign:n(680)},function(e,t,n){"use strict";var r,o,i,a,u,s=n(67),l=function(e,t){return t};try{Object.defineProperty(l,"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(e){}1===l.length?(r={configurable:!0,writable:!1,enumerable:!1},o=Object.defineProperty,e.exports=function(e,t){return t=s(t),e.length===t?e:(r.value=t,o(e,"length",r))}):(a=n(317),u=[],i=function(e){var t,n=0;if(u[e])return u[e];for(t=[];e--;)t.push("a"+(++n).toString(36));return new Function("fn","return function ("+t.join(", ")+") { return fn.apply(this, arguments); };")},e.exports=function(e,t){var n;if(t=s(t),e.length===t)return e;n=i(t)(e);try{a(n,e)}catch(e){}return n})},function(e,t,n){"use strict";var r=n(82),o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols;e.exports=function(e,t){var n,s=Object(r(t));if(e=Object(r(e)),a(s).forEach(function(r){try{o(e,r,i(t,r))}catch(e){n=e}}),"function"==typeof u&&u(s).forEach(function(r){try{o(e,r,i(t,r))}catch(e){n=e}}),void 0!==n)throw n;return e}},function(e,t,n){"use strict";var r=n(56),o=n(142),i=Function.prototype.call;e.exports=function(e,t){var n={},a=arguments[2];return r(t),o(e,function(e,r,o,u){n[r]=i.call(t,a,e,r,o,u)}),n}},function(e,t){e.exports=function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{statePlugins:{err:{reducers:(0,i.default)(e),actions:a,selectors:u}}}};var r,o=n(321),i=(r=o)&&r.__esModule?r:{default:r},a=s(n(127)),u=s(n(326));function s(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(22)),o=s(n(23));t.default=function(e){var t;return t={},(0,r.default)(t,i.NEW_THROWN_ERR,function(t,n){var r=n.payload,i=(0,o.default)(l,r,{type:"thrown"});return t.update("errors",function(e){return(e||(0,a.List)()).push((0,a.fromJS)(i))}).update("errors",function(t){return(0,u.default)(t,e.getSystem())})}),(0,r.default)(t,i.NEW_THROWN_ERR_BATCH,function(t,n){var r=n.payload;return r=r.map(function(e){return(0,a.fromJS)((0,o.default)(l,e,{type:"thrown"}))}),t.update("errors",function(e){return(e||(0,a.List)()).concat((0,a.fromJS)(r))}).update("errors",function(t){return(0,u.default)(t,e.getSystem())})}),(0,r.default)(t,i.NEW_SPEC_ERR,function(t,n){var r=n.payload,o=(0,a.fromJS)(r);return o=o.set("type","spec"),t.update("errors",function(e){return(e||(0,a.List)()).push((0,a.fromJS)(o)).sortBy(function(e){return e.get("line")})}).update("errors",function(t){return(0,u.default)(t,e.getSystem())})}),(0,r.default)(t,i.NEW_SPEC_ERR_BATCH,function(t,n){var r=n.payload;return r=r.map(function(e){return(0,a.fromJS)((0,o.default)(l,e,{type:"spec"}))}),t.update("errors",function(e){return(e||(0,a.List)()).concat((0,a.fromJS)(r))}).update("errors",function(t){return(0,u.default)(t,e.getSystem())})}),(0,r.default)(t,i.NEW_AUTH_ERR,function(t,n){var r=n.payload,i=(0,a.fromJS)((0,o.default)({},r));return i=i.set("type","auth"),t.update("errors",function(e){return(e||(0,a.List)()).push((0,a.fromJS)(i))}).update("errors",function(t){return(0,u.default)(t,e.getSystem())})}),(0,r.default)(t,i.CLEAR,function(e,t){var n=t.payload;if(!n||!e.get("errors"))return e;var r=e.get("errors").filter(function(e){return e.keySeq().every(function(t){var r=e.get(t),o=n[t];return!o||r!==o})});return e.merge({errors:r})}),(0,r.default)(t,i.CLEAR_BY,function(e,t){var n=t.payload;if(!n||"function"!=typeof n)return e;var r=e.get("errors").filter(function(e){return n(e)});return e.merge({errors:r})}),t};var i=n(127),a=n(7),u=s(n(322));function s(e){return e&&e.__esModule?e:{default:e}}var l={line:0,level:"error",message:"Unknown error"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n={jsSpec:t.specSelectors.specJson().toJS()};return(0,i.default)(u,function(e,t){try{var r=t.transform(e,n);return r.filter(function(e){return!!e})}catch(t){return console.error("Transformer error:",t),e}},e).filter(function(e){return!!e}).map(function(e){return!e.get("line")&&e.get("path"),e})};var r,o=n(727),i=(r=o)&&r.__esModule?r:{default:r};function a(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}var u=[a(n(323)),a(n(324)),a(n(325))]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transform=function(e){return e.map(function(e){var t=e.get("message").indexOf("is not of a type(s)");if(t>-1){var n=e.get("message").slice(t+"is not of a type(s)".length).split(",");return e.set("message",e.get("message").slice(0,t)+function(e){return e.reduce(function(e,t,n,r){return n===r.length-1&&r.length>1?e+"or "+t:r[n+1]&&r.length>2?e+t+", ":r[n+1]?e+t+" ":e+t},"should be a")}(n))}return e})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transform=function(e,t){t.jsSpec;return e};var r,o=n(138);(r=o)&&r.__esModule,n(7)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transform=function(e){return e.map(function(e){return"schema"===e.get("type")?e.set("message",(t=e.get("message"),n="instance\\.",t.replace(new RegExp(n,"g"),""))):e;var t,n})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastError=t.allErrors=void 0;var r=n(7),o=n(57),i=t.allErrors=(0,o.createSelector)(function(e){return e},function(e){return e.get("errors",(0,r.List)())});t.lastError=(0,o.createSelector)(i,function(e){return e.last()})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{statePlugins:{layout:{reducers:i.default,actions:a,selectors:u}}}};var r,o=n(328),i=(r=o)&&r.__esModule?r:{default:r},a=s(n(202)),u=s(n(329));function s(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o,i=n(22),a=(r=i)&&r.__esModule?r:{default:r},u=n(7),s=n(202);t.default=(o={},(0,a.default)(o,s.UPDATE_LAYOUT,function(e,t){return e.set("layout",t.payload)}),(0,a.default)(o,s.UPDATE_FILTER,function(e,t){return e.set("filter",t.payload)}),(0,a.default)(o,s.SHOW,function(e,t){var n=t.payload.shown,r=(0,u.fromJS)(t.payload.thing);return e.update("shown",(0,u.fromJS)({}),function(e){return e.set(r,n)})}),(0,a.default)(o,s.UPDATE_MODE,function(e,t){var n=t.payload.thing,r=t.payload.mode;return e.setIn(["modes"].concat(n),(r||"")+"")}),o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showSummary=t.whatMode=t.isShown=t.currentFilter=t.current=void 0;var r,o=n(83),i=(r=o)&&r.__esModule?r:{default:r},a=n(57),u=n(9),s=n(7);t.current=function(e){return e.get("layout")},t.currentFilter=function(e){return e.get("filter")};var l=t.isShown=function(e,t,n){return t=(0,u.normalizeArray)(t),e.get("shown",(0,s.fromJS)({})).get((0,s.fromJS)(t),n)};t.whatMode=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return t=(0,u.normalizeArray)(t),e.getIn(["modes"].concat((0,i.default)(t)),n)},t.showSummary=(0,a.createSelector)(function(e){return e},function(e){return!l(e,"editor")})},function(e,t,n){var r=n(36);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},function(e,t,n){var r=n(70),o=n(19)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},function(e,t,n){var r=n(19)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},e(i)}catch(e){}return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{statePlugins:{spec:{wrapActions:s,reducers:i.default,actions:a,selectors:u}}}};var r,o=n(334),i=(r=o)&&r.__esModule?r:{default:r},a=l(n(203)),u=l(n(144)),s=l(n(347));function l(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=p(n(22)),i=p(n(23)),a=p(n(83)),u=n(7),s=n(9),l=p(n(32)),c=n(144),f=n(203);function p(e){return e&&e.__esModule?e:{default:e}}t.default=(r={},(0,o.default)(r,f.UPDATE_SPEC,function(e,t){return"string"==typeof t.payload?e.set("spec",t.payload):e}),(0,o.default)(r,f.UPDATE_URL,function(e,t){return e.set("url",t.payload+"")}),(0,o.default)(r,f.UPDATE_JSON,function(e,t){return e.set("json",(0,s.fromJSOrdered)(t.payload))}),(0,o.default)(r,f.UPDATE_RESOLVED,function(e,t){return e.setIn(["resolved"],(0,s.fromJSOrdered)(t.payload))}),(0,o.default)(r,f.UPDATE_RESOLVED_SUBTREE,function(e,t){var n=t.payload,r=n.value,o=n.path;return e.setIn(["resolvedSubtrees"].concat((0,a.default)(o)),(0,s.fromJSOrdered)(r))}),(0,o.default)(r,f.UPDATE_PARAM,function(e,t){var n=t.payload,r=n.path,o=n.paramName,i=n.paramIn,u=n.param,s=n.value,l=n.isXml,c=void 0;c=u&&u.hashCode&&!i&&!o?u.get("name")+"."+u.get("in")+".hash-"+u.hashCode():o+"."+i;var f=l?"value_xml":"value";return e.setIn(["meta","paths"].concat((0,a.default)(r),["parameters",c,f]),s)}),(0,o.default)(r,f.UPDATE_EMPTY_PARAM_INCLUSION,function(e,t){var n=t.payload,r=n.pathMethod,o=n.paramName,i=n.paramIn,u=n.includeEmptyValue;if(!o||!i)return console.warn("Warning: UPDATE_EMPTY_PARAM_INCLUSION could not generate a paramKey."),e;var s=o+"."+i;return e.setIn(["meta","paths"].concat((0,a.default)(r),["parameter_inclusions",s]),u)}),(0,o.default)(r,f.VALIDATE_PARAMS,function(e,t){var n=t.payload,r=n.pathMethod,o=n.isOAS3,i=e.getIn(["meta","paths"].concat((0,a.default)(r)),(0,u.fromJS)({})),l=/xml/i.test(i.get("consumes_value")),f=c.operationWithMeta.apply(void 0,[e].concat((0,a.default)(r)));return e.updateIn(["meta","paths"].concat((0,a.default)(r),["parameters"]),(0,u.fromJS)({}),function(e){return f.get("parameters",(0,u.List)()).reduce(function(e,t){var n=(0,s.validateParam)(t,l,o);return e.setIn([t.get("name")+"."+t.get("in"),"errors"],(0,u.fromJS)(n))},e)})}),(0,o.default)(r,f.CLEAR_VALIDATE_PARAMS,function(e,t){var n=t.payload.pathMethod;return e.updateIn(["meta","paths"].concat((0,a.default)(n),["parameters"]),(0,u.fromJS)([]),function(e){return e.map(function(e){return e.set("errors",(0,u.fromJS)([]))})})}),(0,o.default)(r,f.SET_RESPONSE,function(e,t){var n=t.payload,r=n.res,o=n.path,a=n.method,u=void 0;(u=r.error?(0,i.default)({error:!0,name:r.err.name,message:r.err.message,statusCode:r.err.statusCode},r.err.response):r).headers=u.headers||{};var c=e.setIn(["responses",o,a],(0,s.fromJSOrdered)(u));return l.default.Blob&&r.data instanceof l.default.Blob&&(c=c.setIn(["responses",o,a,"text"],r.data)),c}),(0,o.default)(r,f.SET_REQUEST,function(e,t){var n=t.payload,r=n.req,o=n.path,i=n.method;return e.setIn(["requests",o,i],(0,s.fromJSOrdered)(r))}),(0,o.default)(r,f.SET_MUTATED_REQUEST,function(e,t){var n=t.payload,r=n.req,o=n.path,i=n.method;return e.setIn(["mutatedRequests",o,i],(0,s.fromJSOrdered)(r))}),(0,o.default)(r,f.UPDATE_OPERATION_META_VALUE,function(e,t){var n=t.payload,r=n.path,o=n.value,i=n.key,s=["paths"].concat((0,a.default)(r)),l=["meta","paths"].concat((0,a.default)(r));return e.getIn(["json"].concat((0,a.default)(s)))||e.getIn(["resolved"].concat((0,a.default)(s)))||e.getIn(["resolvedSubtrees"].concat((0,a.default)(s)))?e.setIn([].concat((0,a.default)(l),[i]),(0,u.fromJS)(o)):e}),(0,o.default)(r,f.CLEAR_RESPONSE,function(e,t){var n=t.payload,r=n.path,o=n.method;return e.deleteIn(["responses",r,o])}),(0,o.default)(r,f.CLEAR_REQUEST,function(e,t){var n=t.payload,r=n.path,o=n.method;return e.deleteIn(["requests",r,o])}),(0,o.default)(r,f.SET_SCHEME,function(e,t){var n=t.payload,r=n.scheme,o=n.path,i=n.method;return o&&i?e.setIn(["scheme",o,i],r):o||i?void 0:e.setIn(["scheme","_defaultScheme"],r)}),r)},function(e,t,n){var r=n(36),o=n(94),i=n(19)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||void 0==(n=r(a)[i])?t:o(n)}},function(e,t,n){var r,o,i,a=n(49),u=n(735),s=n(241),l=n(157),c=n(21),f=c.process,p=c.setImmediate,d=c.clearImmediate,h=c.MessageChannel,v=c.Dispatch,m=0,g={},y=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},b=function(e){y.call(e.data)};p&&d||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return g[++m]=function(){u("function"==typeof e?e:Function(e),t)},r(m),m},d=function(e){delete g[e]},"process"==n(93)(f)?r=function(e){f.nextTick(a(y,e,1))}:v&&v.now?r=function(e){v.now(a(y,e,1))}:h?(i=(o=new h).port2,o.port1.onmessage=b,r=a(i.postMessage,i,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",b,!1)):r="onreadystatechange"in l("script")?function(e){s.appendChild(l("script")).onreadystatechange=function(){s.removeChild(this),y.call(e)}}:function(e){setTimeout(a(y,e,1),0)}),e.exports={set:p,clear:d}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var r=n(36),o=n(28),i=n(206);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){e.exports=n(740)},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(204),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(e){return function(){var t=e.apply(this,arguments);return new i.default(function(e,n){return function r(o,a){try{var u=t[o](a),s=u.value}catch(e){return void n(e)}if(!u.done)return i.default.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}("next")})}}},function(e,t,n){"use strict";var r=n(86);e.exports=new r({include:[n(342)]})},function(e,t,n){"use strict";var r=n(86);e.exports=new r({include:[n(209)],implicit:[n(748),n(749),n(750),n(751)]})},function(e,t,n){var r=n(62),o=n(24),i=n(47),a="[object String]";e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&r(e)==a}},function(e,t,n){var r=n(147),o=n(79),i=n(135),a=n(38),u=n(80);e.exports=function(e,t,n,s){if(!a(e))return e;for(var l=-1,c=(t=o(t,e)).length,f=c-1,p=e;null!=p&&++l<c;){var d=u(t[l]),h=n;if(l!=f){var v=p[d];void 0===(h=s?s(v,d,p):void 0)&&(h=a(v)?v:i(t[l+1])?[]:{})}r(p,d,h),p=p[d]}return e}},function(e,t,n){var r=n(346);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(63),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateParams=t.executeRequest=t.updateJsonSpec=t.updateSpec=void 0;var r=i(n(42)),o=i(n(138));function i(e){return e&&e.__esModule?e:{default:e}}t.updateSpec=function(e,t){var n=t.specActions;return function(){e.apply(void 0,arguments),n.parseToJson.apply(n,arguments)}},t.updateJsonSpec=function(e,t){var n=t.specActions;return function(){for(var t=arguments.length,i=Array(t),a=0;a<t;a++)i[a]=arguments[a];e.apply(void 0,i),n.invalidateResolvedSubtreeCache();var u=i[0],s=(0,o.default)(u,["paths"])||{};(0,r.default)(s).forEach(function(e){(0,o.default)(s,[e]).$ref&&n.requestResolvedSubtree(["paths",e])}),n.requestResolvedSubtree(["components","securitySchemes"])}},t.executeRequest=function(e,t){var n=t.specActions;return function(t){return n.logRequest(t),e(t)}},t.validateParams=function(e,t){var n=t.specSelectors;return function(t){return e(t,n.isOAS3())}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.getComponents,n=e.getStore,i=e.getSystem,a=r.getComponent,u=r.render,s=r.makeMappedContainer,l=(0,o.memoize)(a.bind(null,i,n,t));return{rootInjects:{getComponent:l,makeMappedContainer:(0,o.memoize)(s.bind(null,i,n,l,t)),render:u.bind(null,i,n,a,t)}}};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(349)),o=n(9)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getComponent=t.render=t.makeMappedContainer=void 0;var r=g(n(45)),o=g(n(42)),i=g(n(23)),a=g(n(25)),u=g(n(4)),s=g(n(2)),l=g(n(3)),c=g(n(5)),f=g(n(6)),p=n(0),d=g(p),h=g(n(775)),v=n(852),m=g(n(860));function g(e){return e&&e.__esModule?e:{default:e}}var y=function(e,t,n){var r=function(e,t){return function(n){function r(){return(0,s.default)(this,r),(0,c.default)(this,(r.__proto__||(0,u.default)(r)).apply(this,arguments))}return(0,f.default)(r,n),(0,l.default)(r,[{key:"render",value:function(){return d.default.createElement(t,(0,a.default)({},e(),this.props,this.context))}}]),r}(p.Component)}(e,t),o=(0,v.connect)(function(n,r){var o=(0,i.default)({},r,e());return(t.prototype.mapStateToProps||function(e){return{state:e}})(n,o)})(r);return n?function(e,t){return function(n){function r(){return(0,s.default)(this,r),(0,c.default)(this,(r.__proto__||(0,u.default)(r)).apply(this,arguments))}return(0,f.default)(r,n),(0,l.default)(r,[{key:"render",value:function(){return d.default.createElement(v.Provider,{store:e},d.default.createElement(t,(0,a.default)({},this.props,this.context)))}}]),r}(p.Component)}(n,o):o},b=function(e,t,n,r){for(var o in t){var i=t[o];"function"==typeof i&&i(n[o],r[o],e())}},_=(t.makeMappedContainer=function(e,t,n,r,i,a){return function(t){function r(t,n){(0,s.default)(this,r);var o=(0,c.default)(this,(r.__proto__||(0,u.default)(r)).call(this,t,n));return b(e,a,t,{}),o}return(0,f.default)(r,t),(0,l.default)(r,[{key:"componentWillReceiveProps",value:function(t){b(e,a,t,this.props)}},{key:"render",value:function(){var e=(0,m.default)(this.props,a?(0,o.default)(a):[]),t=n(i,"root");return d.default.createElement(t,e)}}]),r}(p.Component)},t.render=function(e,t,n,r,o){var i=n(e,t,r,"App","root");h.default.render(d.default.createElement(i,null),o)},function(e){var t=e.name;return d.default.createElement("div",{style:{padding:"1em",color:"#aaa"}},"😱 ",d.default.createElement("i",null,"Could not render ","t"===t?"this component":t,", see the console."))}),w=function(e){var t=function(e){return!(e.prototype&&e.prototype.isReactComponent)}(e)?function(e){return function(t){function n(){return(0,s.default)(this,n),(0,c.default)(this,(n.__proto__||(0,u.default)(n)).apply(this,arguments))}return(0,f.default)(n,t),(0,l.default)(n,[{key:"render",value:function(){return e(this.props)}}]),n}(p.Component)}(e):e,n=t.prototype.render;return t.prototype.render=function(){try{for(var e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];return n.apply(this,r)}catch(e){return console.error(e),d.default.createElement(_,{error:e,name:t.name})}},t};t.getComponent=function(e,t,n,o,i){if("string"!=typeof o)throw new TypeError("Need a string, to fetch a component. Was given a "+(void 0===o?"undefined":(0,r.default)(o)));var a=n(o);return a?i?"root"===i?y(e,a,t()):y(e,w(a)):w(a):(e().log.warn("Could not find component",o),null)}},function(e,t,n){e.exports={default:n(773),__esModule:!0}},function(e,t,n){"use strict";e.exports={hasCachedChildNodes:1}},function(e,t,n){"use strict";var r=n(11);n(8);e.exports=function(e,t){return null==t&&r("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}},function(e,t,n){"use strict";e.exports=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}},function(e,t,n){"use strict";var r=n(26),o=null;e.exports=function(){return!o&&r.canUseDOM&&(o="textContent"in document.documentElement?"textContent":"innerText"),o}},function(e,t,n){"use strict";var r=n(11);var o=n(69),i=(n(8),function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._callbacks=null,this._contexts=null,this._arg=t}return e.prototype.enqueue=function(e,t){this._callbacks=this._callbacks||[],this._callbacks.push(e),this._contexts=this._contexts||[],this._contexts.push(t)},e.prototype.notifyAll=function(){var e=this._callbacks,t=this._contexts,n=this._arg;if(e&&t){e.length!==t.length&&r("24"),this._callbacks=null,this._contexts=null;for(var o=0;o<e.length;o++)e[o].call(t[o],n);e.length=0,t.length=0}},e.prototype.checkpoint=function(){return this._callbacks?this._callbacks.length:0},e.prototype.rollback=function(e){this._callbacks&&this._contexts&&(this._callbacks.length=e,this._contexts.length=e)},e.prototype.reset=function(){this._callbacks=null,this._contexts=null},e.prototype.destructor=function(){this.reset()},e}());e.exports=o.addPoolingTo(i)},function(e,t,n){"use strict";e.exports={logTopLevelRenders:!1}},function(e,t,n){"use strict";var r=n(14);function o(e){var t=e.type,n=e.nodeName;return n&&"input"===n.toLowerCase()&&("checkbox"===t||"radio"===t)}function i(e){return e._wrapperState.valueTracker}var a={_getTrackerFromNode:function(e){return i(r.getInstanceFromNode(e))},track:function(e){if(!i(e)){var t=r.getNodeFromInstance(e),n=o(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,n),u=""+t[n];t.hasOwnProperty(n)||"function"!=typeof a.get||"function"!=typeof a.set||(Object.defineProperty(t,n,{enumerable:a.enumerable,configurable:!0,get:function(){return a.get.call(this)},set:function(e){u=""+e,a.set.call(this,e)}}),function(e,t){e._wrapperState.valueTracker=t}(e,{getValue:function(){return u},setValue:function(e){u=""+e},stopTracking:function(){!function(e){e._wrapperState.valueTracker=null}(e),delete t[n]}}))}},updateValueIfChanged:function(e){if(!e)return!1;var t=i(e);if(!t)return a.track(e),!0;var n,u,s=t.getValue(),l=((n=r.getNodeFromInstance(e))&&(u=o(n)?""+n.checked:n.value),u);return l!==s&&(t.setValue(l),!0)},stopTracking:function(e){var t=i(e);t&&t.stopTracking()}};e.exports=a},function(e,t,n){"use strict";var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!r[e.type]:"textarea"===t}},function(e,t,n){"use strict";var r={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){r.currentScrollLeft=e.x,r.currentScrollTop=e.y}};e.exports=r},function(e,t,n){"use strict";var r=n(26),o=n(151),i=n(150),a=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){3!==e.nodeType?i(e,o(t)):e.nodeValue=t})),e.exports=a},function(e,t,n){"use strict";e.exports=function(e){try{e.focus()}catch(e){}}},function(e,t,n){"use strict";var r={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};var o=["Webkit","ms","Moz","O"];Object.keys(r).forEach(function(e){o.forEach(function(t){r[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(t,e)]=r[e]})});var i={isUnitlessNumber:r,shorthandPropertyExpansions:{background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}}};e.exports=i},function(e,t,n){"use strict";var r=n(87),o=(n(14),n(39),n(804)),i=(n(10),new RegExp("^["+r.ATTRIBUTE_NAME_START_CHAR+"]["+r.ATTRIBUTE_NAME_CHAR+"]*$")),a={},u={};function s(e){return!!u.hasOwnProperty(e)||!a.hasOwnProperty(e)&&(i.test(e)?(u[e]=!0,!0):(a[e]=!0,!1))}function l(e,t){return null==t||e.hasBooleanValue&&!t||e.hasNumericValue&&isNaN(t)||e.hasPositiveNumericValue&&t<1||e.hasOverloadedBooleanValue&&!1===t}var c={createMarkupForID:function(e){return r.ID_ATTRIBUTE_NAME+"="+o(e)},setAttributeForID:function(e,t){e.setAttribute(r.ID_ATTRIBUTE_NAME,t)},createMarkupForRoot:function(){return r.ROOT_ATTRIBUTE_NAME+'=""'},setAttributeForRoot:function(e){e.setAttribute(r.ROOT_ATTRIBUTE_NAME,"")},createMarkupForProperty:function(e,t){var n=r.properties.hasOwnProperty(e)?r.properties[e]:null;if(n){if(l(n,t))return"";var i=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&!0===t?i+'=""':i+"="+o(t)}return r.isCustomAttribute(e)?null==t?"":e+"="+o(t):null},createMarkupForCustomAttribute:function(e,t){return s(e)&&null!=t?e+"="+o(t):""},setValueForProperty:function(e,t,n){var o=r.properties.hasOwnProperty(t)?r.properties[t]:null;if(o){var i=o.mutationMethod;if(i)i(e,n);else{if(l(o,n))return void this.deleteValueForProperty(e,t);if(o.mustUseProperty)e[o.propertyName]=n;else{var a=o.attributeName,u=o.attributeNamespace;u?e.setAttributeNS(u,a,""+n):o.hasBooleanValue||o.hasOverloadedBooleanValue&&!0===n?e.setAttribute(a,""):e.setAttribute(a,""+n)}}}else if(r.isCustomAttribute(t))return void c.setValueForAttribute(e,t,n)},setValueForAttribute:function(e,t,n){s(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForAttribute:function(e,t){e.removeAttribute(t)},deleteValueForProperty:function(e,t){var n=r.properties.hasOwnProperty(t)?r.properties[t]:null;if(n){var o=n.mutationMethod;if(o)o(e,void 0);else if(n.mustUseProperty){var i=n.propertyName;n.hasBooleanValue?e[i]=!1:e[i]=""}else e.removeAttribute(n.attributeName)}else r.isCustomAttribute(t)&&e.removeAttribute(t)}};e.exports=c},function(e,t,n){"use strict";var r=n(13),o=n(220),i=n(14),a=n(43),u=(n(10),!1);function s(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var e=this._currentElement.props,t=o.getValue(e);null!=t&&l(this,Boolean(e.multiple),t)}}function l(e,t,n){var r,o,a=i.getNodeFromInstance(e).options;if(t){for(r={},o=0;o<n.length;o++)r[""+n[o]]=!0;for(o=0;o<a.length;o++){var u=r.hasOwnProperty(a[o].value);a[o].selected!==u&&(a[o].selected=u)}}else{for(r=""+n,o=0;o<a.length;o++)if(a[o].value===r)return void(a[o].selected=!0);a.length&&(a[0].selected=!0)}}var c={getHostProps:function(e,t){return r({},t,{onChange:e._wrapperState.onChange,value:void 0})},mountWrapper:function(e,t){var n=o.getValue(t);e._wrapperState={pendingUpdate:!1,initialValue:null!=n?n:t.defaultValue,listeners:null,onChange:function(e){var t=this._currentElement.props,n=o.executeOnChange(t,e);this._rootNodeID&&(this._wrapperState.pendingUpdate=!0);return a.asap(s,this),n}.bind(e),wasMultiple:Boolean(t.multiple)},void 0===t.value||void 0===t.defaultValue||u||(u=!0)},getSelectValueContext:function(e){return e._wrapperState.initialValue},postUpdateWrapper:function(e){var t=e._currentElement.props;e._wrapperState.initialValue=void 0;var n=e._wrapperState.wasMultiple;e._wrapperState.wasMultiple=Boolean(t.multiple);var r=o.getValue(t);null!=r?(e._wrapperState.pendingUpdate=!1,l(e,Boolean(t.multiple),r)):n!==Boolean(t.multiple)&&(null!=t.defaultValue?l(e,Boolean(t.multiple),t.defaultValue):l(e,Boolean(t.multiple),t.multiple?[]:""))}};e.exports=c},function(e,t,n){"use strict";var r=n(11),o=n(13),i=n(813),a=n(367),u=n(368),s=(n(814),n(8),n(10),function(e){this.construct(e)});function l(e,t){var n;if(null===e||!1===e)n=a.create(l);else if("object"==typeof e){var o=e,i=o.type;if("function"!=typeof i&&"string"!=typeof i){var c="";0,c+=function(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}(o._owner),r("130",null==i?i:typeof i,c)}"string"==typeof o.type?n=u.createInternalComponent(o):!function(e){return"function"==typeof e&&void 0!==e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}(o.type)?n=new s(o):(n=new o.type(o)).getHostNode||(n.getHostNode=n.getNativeNode)}else"string"==typeof e||"number"==typeof e?n=u.createInstanceForText(e):r("131",typeof e);return n._mountIndex=0,n._mountImage=null,n}o(s.prototype,i,{_instantiateReactComponent:l}),e.exports=l},function(e,t,n){"use strict";var r=n(11),o=n(75),i=(n(8),{HOST:0,COMPOSITE:1,EMPTY:2,getType:function(e){return null===e||!1===e?i.EMPTY:o.isValidElement(e)?"function"==typeof e.type?i.COMPOSITE:i.HOST:void r("26",e)}});e.exports=i},function(e,t,n){"use strict";var r,o={injectEmptyComponentFactory:function(e){r=e}},i={create:function(e){return r(e)}};i.injection=o,e.exports=i},function(e,t,n){"use strict";var r=n(11),o=(n(8),null),i=null;var a={createInternalComponent:function(e){return o||r("111",e.type),new o(e)},createInstanceForText:function(e){return new i(e)},isTextComponent:function(e){return e instanceof i},injection:{injectGenericComponentClass:function(e){o=e},injectTextComponentClass:function(e){i=e}}};e.exports=a},function(e,t,n){"use strict";var r=n(11),o=(n(46),n(815)),i=n(816),a=(n(8),n(224)),u=(n(10),"."),s=":";function l(e,t){return e&&"object"==typeof e&&null!=e.key?a.escape(e.key):t.toString(36)}e.exports=function(e,t,n){return null==e?0:function e(t,n,c,f){var p,d=typeof t;if("undefined"!==d&&"boolean"!==d||(t=null),null===t||"string"===d||"number"===d||"object"===d&&t.$$typeof===o)return c(f,t,""===n?u+l(t,0):n),1;var h=0,v=""===n?u:n+s;if(Array.isArray(t))for(var m=0;m<t.length;m++)h+=e(p=t[m],v+l(p,m),c,f);else{var g=i(t);if(g){var y,b=g.call(t);if(g!==t.entries)for(var _=0;!(y=b.next()).done;)h+=e(p=y.value,v+l(p,_++),c,f);else for(;!(y=b.next()).done;){var w=y.value;w&&(h+=e(p=w[1],v+a.escape(w[0])+s+l(p,0),c,f))}}else if("object"===d){var E="",x=String(t);r("31","[object Object]"===x?"object with keys {"+Object.keys(t).join(", ")+"}":x,E)}}return h}(e,"",t,n)}},function(e,t,n){"use strict";var r,o,i,a,u,s,l,c=n(104),f=n(46);n(8),n(10);function p(e){var t=Function.prototype.toString,n=Object.prototype.hasOwnProperty,r=RegExp("^"+t.call(n).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");try{var o=t.call(e);return r.test(o)}catch(e){return!1}}if("function"==typeof Array.from&&"function"==typeof Map&&p(Map)&&null!=Map.prototype&&"function"==typeof Map.prototype.keys&&p(Map.prototype.keys)&&"function"==typeof Set&&p(Set)&&null!=Set.prototype&&"function"==typeof Set.prototype.keys&&p(Set.prototype.keys)){var d=new Map,h=new Set;r=function(e,t){d.set(e,t)},o=function(e){return d.get(e)},i=function(e){d.delete(e)},a=function(){return Array.from(d.keys())},u=function(e){h.add(e)},s=function(e){h.delete(e)},l=function(){return Array.from(h.keys())}}else{var v={},m={},g=function(e){return"."+e},y=function(e){return parseInt(e.substr(1),10)};r=function(e,t){var n=g(e);v[n]=t},o=function(e){var t=g(e);return v[t]},i=function(e){var t=g(e);delete v[t]},a=function(){return Object.keys(v).map(y)},u=function(e){var t=g(e);m[t]=!0},s=function(e){var t=g(e);delete m[t]},l=function(){return Object.keys(m).map(y)}}var b=[];function _(e){var t=o(e);if(t){var n=t.childIDs;i(e),n.forEach(_)}}function w(e,t,n){return"\n in "+(e||"Unknown")+(t?" (at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+")":n?" (created by "+n+")":"")}function E(e){return null==e?"#empty":"string"==typeof e||"number"==typeof e?"#text":"string"==typeof e.type?e.type:e.type.displayName||e.type.name||"Unknown"}function x(e){var t,n=S.getDisplayName(e),r=S.getElement(e),o=S.getOwnerID(e);return o&&(t=S.getDisplayName(o)),w(n,r&&r._source,t)}var S={onSetChildren:function(e,t){var n=o(e);n||c("144"),n.childIDs=t;for(var r=0;r<t.length;r++){var i=t[r],a=o(i);a||c("140"),null==a.childIDs&&"object"==typeof a.element&&null!=a.element&&c("141"),a.isMounted||c("71"),null==a.parentID&&(a.parentID=e),a.parentID!==e&&c("142",i,a.parentID,e)}},onBeforeMountComponent:function(e,t,n){r(e,{element:t,parentID:n,text:null,childIDs:[],isMounted:!1,updateCount:0})},onBeforeUpdateComponent:function(e,t){var n=o(e);n&&n.isMounted&&(n.element=t)},onMountComponent:function(e){var t=o(e);t||c("144"),t.isMounted=!0,0===t.parentID&&u(e)},onUpdateComponent:function(e){var t=o(e);t&&t.isMounted&&t.updateCount++},onUnmountComponent:function(e){var t=o(e);t&&(t.isMounted=!1,0===t.parentID&&s(e));b.push(e)},purgeUnmountedComponents:function(){if(!S._preventPurging){for(var e=0;e<b.length;e++){_(b[e])}b.length=0}},isMounted:function(e){var t=o(e);return!!t&&t.isMounted},getCurrentStackAddendum:function(e){var t="";if(e){var n=E(e),r=e._owner;t+=w(n,e._source,r&&r.getName())}var o=f.current,i=o&&o._debugID;return t+=S.getStackAddendumByID(i)},getStackAddendumByID:function(e){for(var t="";e;)t+=x(e),e=S.getParentID(e);return t},getChildIDs:function(e){var t=o(e);return t?t.childIDs:[]},getDisplayName:function(e){var t=S.getElement(e);return t?E(t):null},getElement:function(e){var t=o(e);return t?t.element:null},getOwnerID:function(e){var t=S.getElement(e);return t&&t._owner?t._owner._debugID:null},getParentID:function(e){var t=o(e);return t?t.parentID:null},getSource:function(e){var t=o(e),n=t?t.element:null;return null!=n?n._source:null},getText:function(e){var t=S.getElement(e);return"string"==typeof t?t:"number"==typeof t?""+t:null},getUpdateCount:function(e){var t=o(e);return t?t.updateCount:0},getRootIDs:l,getRegisteredIDs:a,pushNonStandardWarningStack:function(e,t){if("function"==typeof console.reactStack){var n=[],r=f.current,o=r&&r._debugID;try{for(e&&n.push({name:o?S.getDisplayName(o):null,fileName:t?t.fileName:null,lineNumber:t?t.lineNumber:null});o;){var i=S.getElement(o),a=S.getParentID(o),u=S.getOwnerID(o),s=u?S.getDisplayName(u):null,l=i&&i._source;n.push({name:s,fileName:l?l.fileName:null,lineNumber:l?l.lineNumber:null}),o=a}}catch(e){}console.reactStack(n)}},popNonStandardWarningStack:function(){"function"==typeof console.reactStackEnd&&console.reactStackEnd()}};e.exports=S},function(e,t,n){"use strict";var r=n(34),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};e.exports=o},function(e,t,n){"use strict";var r=n(828),o=n(830),i=n(361),a=n(373);var u={hasSelectionCapabilities:function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)},getSelectionInformation:function(){var e=a();return{focusedElem:e,selectionRange:u.hasSelectionCapabilities(e)?u.getSelection(e):null}},restoreSelection:function(e){var t,n=a(),r=e.focusedElem,s=e.selectionRange;n!==r&&(t=r,o(document.documentElement,t))&&(u.hasSelectionCapabilities(r)&&u.setSelection(r,s),i(r))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=r.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,o=t.end;if(void 0===o&&(o=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(o,e.value.length);else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var i=e.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",o-n),i.select()}else r.setOffsets(e,t)}};e.exports=u},function(e,t,n){"use strict";e.exports=function(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}},function(e,t,n){"use strict";var r=n(11),o=n(89),i=n(87),a=n(75),u=n(152),s=(n(46),n(14)),l=n(845),c=n(846),f=n(356),p=n(112),d=(n(39),n(847)),h=n(88),v=n(225),m=n(43),g=n(126),y=n(365),b=(n(8),n(150)),_=n(223),w=(n(10),i.ID_ATTRIBUTE_NAME),E=i.ROOT_ATTRIBUTE_NAME,x=1,S=9,C=11,k={};function A(e){return e?e.nodeType===S?e.documentElement:e.firstChild:null}function O(e){return e.getAttribute&&e.getAttribute(w)||""}function P(e,t,n,r,o){var i;if(f.logTopLevelRenders){var a=e._currentElement.props.child.type;i="React mount: "+("string"==typeof a?a:a.displayName||a.name),console.time(i)}var u=h.mountComponent(e,n,null,l(e,t),o,0);i&&console.timeEnd(i),e._renderedComponent._topLevelWrapper=e,L._mountImageIntoNode(u,t,e,r,n)}function T(e,t,n,r){var o=m.ReactReconcileTransaction.getPooled(!n&&c.useCreateElement);o.perform(P,null,e,t,o,n,r),m.ReactReconcileTransaction.release(o)}function M(e,t,n){for(0,h.unmountComponent(e,n),t.nodeType===S&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function I(e){var t=A(e);if(t){var n=s.getInstanceFromNode(t);return!(!n||!n._hostParent)}}function j(e){return!(!e||e.nodeType!==x&&e.nodeType!==S&&e.nodeType!==C)}function N(e){var t=function(e){var t=A(e),n=t&&s.getInstanceFromNode(t);return n&&!n._hostParent?n:null}(e);return t?t._hostContainerInfo._topLevelWrapper:null}var R=1,D=function(){this.rootID=R++};D.prototype.isReactComponent={},D.prototype.render=function(){return this.props.child},D.isReactTopLevelWrapper=!0;var L={TopLevelWrapper:D,_instancesByReactRootID:k,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r,o){return L.scrollMonitor(r,function(){v.enqueueElementInternal(e,t,n),o&&v.enqueueCallbackInternal(e,o)}),e},_renderNewRootComponent:function(e,t,n,o){j(t)||r("37"),u.ensureScrollValueMonitoring();var i=y(e,!1);m.batchedUpdates(T,i,t,n,o);var a=i._instance.rootID;return k[a]=i,i},renderSubtreeIntoContainer:function(e,t,n,o){return null!=e&&p.has(e)||r("38"),L._renderSubtreeIntoContainer(e,t,n,o)},_renderSubtreeIntoContainer:function(e,t,n,o){v.validateCallback(o,"ReactDOM.render"),a.isValidElement(t)||r("39","string"==typeof t?" Instead of passing a string like 'div', pass React.createElement('div') or <div />.":"function"==typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or <Foo />.":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":"");var i,u=a.createElement(D,{child:t});if(e){var s=p.get(e);i=s._processChildContext(s._context)}else i=g;var l=N(n);if(l){var c=l._currentElement.props.child;if(_(c,t)){var f=l._renderedComponent.getPublicInstance(),d=o&&function(){o.call(f)};return L._updateRootComponent(l,u,i,n,d),f}L.unmountComponentAtNode(n)}var h=A(n),m=h&&!!O(h),y=I(n),b=m&&!l&&!y,w=L._renderNewRootComponent(u,n,b,i)._renderedComponent.getPublicInstance();return o&&o.call(w),w},render:function(e,t,n){return L._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){j(e)||r("40");var t=N(e);if(!t){I(e),1===e.nodeType&&e.hasAttribute(E);return!1}return delete k[t._instance.rootID],m.batchedUpdates(M,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,i,a){if(j(t)||r("41"),i){var u=A(t);if(d.canReuseMarkup(e,u))return void s.precacheNode(n,u);var l=u.getAttribute(d.CHECKSUM_ATTR_NAME);u.removeAttribute(d.CHECKSUM_ATTR_NAME);var c=u.outerHTML;u.setAttribute(d.CHECKSUM_ATTR_NAME,l);var f=e,p=function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}(f,c),h=" (client) "+f.substring(p-20,p+20)+"\n (server) "+c.substring(p-20,p+20);t.nodeType===S&&r("42",h)}if(t.nodeType===S&&r("43"),a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);o.insertTreeBefore(t,e,null)}else b(t,e),s.precacheNode(n,t.firstChild)}};e.exports=L},function(e,t,n){"use strict";var r=n(366);e.exports=function(e){for(var t;(t=e._renderedNodeType)===r.COMPOSITE;)e=e._renderedComponent;return t===r.HOST?e._renderedComponent:t===r.EMPTY?null:void 0}},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r};t.default=i.default.shape({subscribe:i.default.func.isRequired,dispatch:i.default.func.isRequired,getState:i.default.func.isRequired})},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}},function(e,t,n){var r=n(184),o=n(861),i=n(147),a=n(862),u=n(863),s=n(866),l=n(867),c=n(868),f=n(869),p=n(293),d=n(381),h=n(137),v=n(870),m=n(871),g=n(876),y=n(24),b=n(188),_=n(878),w=n(38),E=n(880),x=n(64),S=1,C=2,k=4,A="[object Arguments]",O="[object Function]",P="[object GeneratorFunction]",T="[object Object]",M={};M[A]=M["[object Array]"]=M["[object ArrayBuffer]"]=M["[object DataView]"]=M["[object Boolean]"]=M["[object Date]"]=M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Map]"]=M["[object Number]"]=M[T]=M["[object RegExp]"]=M["[object Set]"]=M["[object String]"]=M["[object Symbol]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M["[object Error]"]=M[O]=M["[object WeakMap]"]=!1,e.exports=function e(t,n,I,j,N,R){var D,L=n&S,U=n&C,q=n&k;if(I&&(D=N?I(t,j,N,R):I(t)),void 0!==D)return D;if(!w(t))return t;var F=y(t);if(F){if(D=v(t),!L)return l(t,D)}else{var z=h(t),B=z==O||z==P;if(b(t))return s(t,L);if(z==T||z==A||B&&!N){if(D=U||B?{}:g(t),!L)return U?f(t,u(D,t)):c(t,a(D,t))}else{if(!M[z])return N?t:{};D=m(t,z,L)}}R||(R=new r);var V=R.get(t);if(V)return V;if(R.set(t,D),E(t))return t.forEach(function(r){D.add(e(r,n,I,r,t,R))}),D;if(_(t))return t.forEach(function(r,o){D.set(o,e(r,n,I,o,t,R))}),D;var H=q?U?d:p:U?keysIn:x,W=F?void 0:H(t);return o(W||t,function(r,o){W&&(r=t[o=r]),i(D,o,e(r,n,I,o,t,R))}),D}},function(e,t,n){var r=n(296),o=n(864),i=n(78);e.exports=function(e){return i(e)?r(e,!0):o(e)}},function(e,t,n){var r=n(185),o=n(229),i=n(186),a=n(295),u=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=u},function(e,t,n){var r=n(294),o=n(380),i=n(379);e.exports=function(e){return r(e,i,o)}},function(e,t,n){var r=n(886),o=n(383),i=n(384);e.exports=function(e){return i(o(e,void 0,r),e+"")}},function(e,t,n){var r=n(889),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,u=o(i.length-t,0),s=Array(u);++a<u;)s[a]=i[t+a];a=-1;for(var l=Array(t+1);++a<t;)l[a]=i[a];return l[t]=n(s),r(e,this,l)}}},function(e,t,n){var r=n(890),o=n(892)(r);e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{fn:r}};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(194))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t={debug:0,info:1,log:2,warn:3,error:4},n=function(e){return t[e]||-1},r=e.configs.logLevel,o=n(r);function i(e){for(var t,r=arguments.length,i=Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];n(e)>=o&&(t=console)[e].apply(t,i)}return i.warn=i.bind(null,"warn"),i.error=i.bind(null,"error"),i.info=i.bind(null,"info"),i.debug=i.bind(null,"debug"),{rootInjects:{log:i}}}},function(e,t,n){"use strict";var r,o=n(388),i=(r=o)&&r.__esModule?r:{default:r};e.exports=function(e){var t=e.configs,n=e.getConfigs;return{fn:{fetch:i.default.makeHttp(t.preFetch,t.postFetch),buildRequest:i.default.buildRequest,execute:i.default.execute,resolve:i.default.resolve,resolveSubtree:function(e,t,r){for(var o=arguments.length,a=Array(o>3?o-3:0),u=3;u<o;u++)a[u-3]=arguments[u];if(void 0===r){var s=n();r={modelPropertyMacro:s.modelPropertyMacro,parameterMacro:s.parameterMacro,requestInterceptor:s.requestInterceptor,responseInterceptor:s.responseInterceptor}}return i.default.resolveSubtree.apply(i.default,[e,t,r].concat(a))},serializeRes:i.default.serializeRes,opId:i.default.helpers.opId}}}},function(e,t,n){e.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=23)}([function(e,t){e.exports=n(42)},function(e,t){e.exports=n(45)},function(e,t){e.exports=n(23)},function(e,t){e.exports=n(25)},function(e,t){e.exports=n(339)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).v2OperationIdCompatibilityMode;return e&&"object"===(void 0===e?"undefined":(0,c.default)(e))?(e.operationId||"").replace(/\s/g,"").length?h(e.operationId):i(t,n,{v2OperationIdCompatibilityMode:r}):null}function i(e,t){if((arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).v2OperationIdCompatibilityMode){var n=(t.toLowerCase()+"_"+e).replace(/[\s!@#$%^&*()_+=[{\]};:<>|.\/?,\\'""-]/g,"_");return(n=n||e.substring(1)+"_"+t).replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return""+d(t)+h(e)}function a(e,t){return d(t)+"-"+e}function u(e,t){return s(e,t,!0)||null}function s(e,t,n){if(!e||"object"!==(void 0===e?"undefined":(0,c.default)(e))||!e.paths||"object"!==(0,c.default)(e.paths))return null;var r=e.paths;for(var o in r)for(var i in r[o])if("PARAMETERS"!==i.toUpperCase()){var a=r[o][i];if(a&&"object"===(void 0===a?"undefined":(0,c.default)(a))){var u={spec:e,pathName:o,method:i.toUpperCase(),operation:a},s=t(u);if(n&&s)return u}}}Object.defineProperty(t,"__esModule",{value:!0});var l=r(n(18)),c=r(n(1));t.isOAS3=function(e){var t=e.openapi;return!!t&&(0,p.default)(t,"3")},t.isSwagger2=function(e){var t=e.swagger;return!!t&&(0,p.default)(t,"2")},t.opId=o,t.idFromPathMethod=i,t.legacyIdFromPathMethod=a,t.getOperationRaw=function(e,t){return e&&e.paths?u(e,function(e){var n=e.pathName,r=e.method,i=e.operation;if(!i||"object"!==(void 0===i?"undefined":(0,c.default)(i)))return!1;var u=i.operationId;return[o(i,n,r),a(n,r),u].some(function(e){return e&&e===t})}):null},t.findOperation=u,t.eachOperation=s,t.normalizeSwagger=function(e){var t=e.spec,n=t.paths,r={};if(!n||t.$$normalized)return e;for(var i in n){var a=n[i];if((0,f.default)(a)){var u=a.parameters;for(var s in a)!function(e){var n=a[e];if(!(0,f.default)(n))return"continue";var s=o(n,i,e);if(s){r[s]?r[s].push(n):r[s]=[n];var c=r[s];if(c.length>1)c.forEach(function(e,t){e.__originalOperationId=e.__originalOperationId||e.operationId,e.operationId=""+s+(t+1)});else if(void 0!==n.operationId){var p=c[0];p.__originalOperationId=p.__originalOperationId||n.operationId,p.operationId=s}}if("parameters"!==e){var d=[],h={};for(var v in t)"produces"!==v&&"consumes"!==v&&"security"!==v||(h[v]=t[v],d.push(h));if(u&&(h.parameters=u,d.push(h)),d.length){var m=!0,g=!1,y=void 0;try{for(var b,_=(0,l.default)(d);!(m=(b=_.next()).done);m=!0){var w=b.value;for(var E in w)if(n[E]){if("parameters"===E){var x=!0,S=!1,C=void 0;try{for(var k,A=(0,l.default)(w[E]);!(x=(k=A.next()).done);x=!0)!function(){var e=k.value;n[E].some(function(t){return t.name&&t.name===e.name||t.$ref&&t.$ref===e.$ref||t.$$ref&&t.$$ref===e.$$ref||t===e})||n[E].push(e)}()}catch(e){S=!0,C=e}finally{try{!x&&A.return&&A.return()}finally{if(S)throw C}}}}else n[E]=w[E]}}catch(e){g=!0,y=e}finally{try{!m&&_.return&&_.return()}finally{if(g)throw y}}}}}(s)}}return t.$$normalized=!0,e};var f=r(n(47)),p=r(n(14)),d=function(e){return String.prototype.toLowerCase.call(e)},h=function(e){return e.replace(/[^\w]/gi,"_")}},function(e,t){e.exports=n(893)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).loadSpec,r=void 0!==n&&n,o={ok:e.ok,url:e.url||t,status:e.status,statusText:e.statusText,headers:i(e.headers)},a=o.headers["content-type"],u=r||_(a);return(u?e.text:e.blob||e.buffer).call(e).then(function(e){if(o.text=e,o.data=e,u)try{var t=function(e,t){return"application/json"===t?JSON.parse(e):g.default.safeLoad(e)}(e,a);o.body=t,o.obj=t}catch(e){o.parseError=e}return o})}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return"function"==typeof e.forEach?(e.forEach(function(e,n){void 0!==t[n]?(t[n]=Array.isArray(t[n])?t[n]:[t[n]],t[n].push(e)):t[n]=e}),t):t}function a(e,t){return t||"undefined"==typeof navigator||(t=navigator),t&&"ReactNative"===t.product?!(!e||"object"!==(void 0===e?"undefined":(0,h.default)(e))||"string"!=typeof e.uri):"undefined"!=typeof File?e instanceof File:null!==e&&"object"===(void 0===e?"undefined":(0,h.default)(e))&&"function"==typeof e.pipe}function u(e,t){var n=e.collectionFormat,r=e.allowEmptyValue,o="object"===(void 0===e?"undefined":(0,h.default)(e))?e.value:e;if(void 0===o&&r)return"";if(a(o)||"boolean"==typeof o)return o;var i=encodeURIComponent;return t&&(i=(0,y.default)(o)?function(e){return e}:function(e){return(0,p.default)(e)}),"object"!==(void 0===o?"undefined":(0,h.default)(o))||Array.isArray(o)?Array.isArray(o)?Array.isArray(o)&&!n?o.map(i).join(","):"multi"===n?o.map(i):o.map(i).join({csv:",",ssv:"%20",tsv:"%09",pipes:"|"}[n]):i(o):""}function s(e){var t=(0,f.default)(e).reduce(function(t,n){var r=e[n],o=!!r.skipEncoding,i=o?n:encodeURIComponent(n),a=function(e){return e&&"object"===(void 0===e?"undefined":(0,h.default)(e))}(r)&&!Array.isArray(r);return t[i]=u(a?r:{value:r},o),t},{});return m.default.stringify(t,{encode:!1,indices:!1})||""}function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,r=void 0===t?"":t,o=e.query,i=e.form;if(i){var l=(0,f.default)(i).some(function(e){return a(i[e].value)}),p=e.headers["content-type"]||e.headers["Content-Type"];if(l||/multipart\/form-data/i.test(p)){var d=n(30);e.body=new d,(0,f.default)(i).forEach(function(t){e.body.append(t,u(i[t],!0))})}else e.body=s(i);delete e.form}if(o){var h=r.split("?"),v=(0,c.default)(h,2),g=v[0],y=v[1],b="";if(y){var _=m.default.parse(y);(0,f.default)(o).forEach(function(e){return delete _[e]}),b=m.default.stringify(_,{encode:!0})}var w=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(function(e){return e}).join("&");return r?"?"+r:""}(b,s(o));e.url=g+w,delete e.query}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldDownloadAsText=t.self=void 0;var c=r(n(26)),f=r(n(0)),p=r(n(8)),d=r(n(4)),h=r(n(1)),v=r(n(11));t.serializeRes=o,t.serializeHeaders=i,t.isFile=a,t.encodeFormOrQuery=s,t.mergeInQueryOrForm=l,t.makeHttp=function(e,t,n){return n=n||function(e){return e},t=t||function(e){return e},function(r){return"string"==typeof r&&(r={url:r}),b.mergeInQueryOrForm(r),r=t(r),n(e(r))}},n(27);var m=r(n(28)),g=r(n(15)),y=r(n(29)),b=t.self={serializeRes:o,mergeInQueryOrForm:l};t.default=function(){var e=(0,v.default)(d.default.mark(function e(t){var n,r,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return d.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("object"===(void 0===t?"undefined":(0,h.default)(t))&&(t=(a=t).url),a.headers=a.headers||{},b.mergeInQueryOrForm(a),!a.requestInterceptor){e.next=10;break}return e.next=6,a.requestInterceptor(a);case 6:if(e.t0=e.sent,e.t0){e.next=9;break}e.t0=a;case 9:a=e.t0;case 10:return n=a.headers["content-type"]||a.headers["Content-Type"],/multipart\/form-data/i.test(n)&&(delete a.headers["content-type"],delete a.headers["Content-Type"]),r=void 0,e.prev=13,e.next=16,(a.userFetch||fetch)(a.url,a);case 16:return r=e.sent,e.next=19,b.serializeRes(r,t,a);case 19:if(r=e.sent,!a.responseInterceptor){e.next=27;break}return e.next=23,a.responseInterceptor(r);case 23:if(e.t1=e.sent,e.t1){e.next=26;break}e.t1=r;case 26:r=e.t1;case 27:e.next=37;break;case 29:if(e.prev=29,e.t2=e.catch(13),r){e.next=33;break}throw e.t2;case 33:throw(o=new Error(r.statusText)).statusCode=o.status=r.status,o.responseError=e.t2,o;case 37:if(r.ok){e.next=42;break}throw(i=new Error(r.statusText)).statusCode=i.status=r.status,i.response=r,i;case 42:return e.abrupt("return",r);case 43:case"end":return e.stop()}},e,this,[[13,29]])}));return function(t){return e.apply(this,arguments)}}();var _=t.shouldDownloadAsText=function(){return/(json|xml|yaml|text)\b/.test(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")}},function(e,t){e.exports=n(41)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return Array.isArray(e)?e.length<1?"":"/"+e.map(function(e){return(e+"").replace(/~/g,"~0").replace(/\//g,"~1")}).join("/"):e}function i(e,t,n){return{op:"replace",path:e,value:t,meta:n}}function a(e,t,n){return f(c(e.filter(m).map(function(e){return t(e.value,n,e.path)})||[]))}function u(e,t,n){return n=n||[],Array.isArray(e)?e.map(function(e,r){return u(e,t,n.concat(r))}):p(e)?(0,w.default)(e).map(function(r){return u(e[r],t,n.concat(r))}):t(e,n[n.length-1],n)}function s(e,t,n){var r=[];if((n=n||[]).length>0){var o=t(e,n[n.length-1],n);o&&(r=r.concat(o))}if(Array.isArray(e)){var i=e.map(function(e,r){return s(e,t,n.concat(r))});i&&(r=r.concat(i))}else if(p(e)){var a=(0,w.default)(e).map(function(r){return s(e[r],t,n.concat(r))});a&&(r=r.concat(a))}return c(r)}function l(e){return Array.isArray(e)?e:[e]}function c(e){var t;return(t=[]).concat.apply(t,(0,_.default)(e.map(function(e){return Array.isArray(e)?c(e):e})))}function f(e){return e.filter(function(e){return void 0!==e})}function p(e){return e&&"object"===(void 0===e?"undefined":(0,b.default)(e))}function d(e){return e&&"function"==typeof e}function h(e){if(g(e)){var t=e.op;return"add"===t||"remove"===t||"replace"===t}return!1}function v(e){return h(e)||g(e)&&"mutation"===e.type}function m(e){return v(e)&&("add"===e.op||"replace"===e.op||"merge"===e.op||"mergeDeep"===e.op)}function g(e){return e&&"object"===(void 0===e?"undefined":(0,b.default)(e))}function y(e,t){try{return S.default.getValueByPointer(e,t)}catch(e){return console.error(e),{}}}Object.defineProperty(t,"__esModule",{value:!0});var b=r(n(1)),_=r(n(34)),w=r(n(0)),E=r(n(35)),x=r(n(2)),S=r(n(36)),C=r(n(4)),k=r(n(37)),A=r(n(38));t.default={add:function(e,t){return{op:"add",path:e,value:t}},replace:i,remove:function(e,t){return{op:"remove",path:e}},merge:function(e,t){return{type:"mutation",op:"merge",path:e,value:t}},mergeDeep:function(e,t){return{type:"mutation",op:"mergeDeep",path:e,value:t}},context:function(e,t){return{type:"context",path:e,value:t}},getIn:function(e,t){return t.reduce(function(e,t){return void 0!==t&&e?e[t]:e},e)},applyPatch:function(e,t,n){if(n=n||{},"merge"===(t=(0,x.default)({},t,{path:t.path&&o(t.path)})).op){var r=y(e,t.path);(0,x.default)(r,t.value),S.default.applyPatch(e,[i(t.path,r)])}else if("mergeDeep"===t.op){var a=y(e,t.path);for(var u in t.value){var s=t.value[u],l=Array.isArray(s);if(l){var c=a[u]||[];a[u]=c.concat(s)}else if(p(s)&&!l){var f=(0,x.default)({},a[u]);for(var d in s){if(Object.prototype.hasOwnProperty.call(f,d)){f=(0,k.default)((0,A.default)({},f),s);break}(0,x.default)(f,(0,E.default)({},d,s[d]))}a[u]=f}else a[u]=s}}else if("add"===t.op&&""===t.path&&p(t.value)){var h=(0,w.default)(t.value).reduce(function(e,n){return e.push({op:"add",path:"/"+o(n),value:t.value[n]}),e},[]);S.default.applyPatch(e,h)}else if("replace"===t.op&&""===t.path){var v=t.value;n.allowMetaPatches&&t.meta&&m(t)&&(Array.isArray(t.value)||p(t.value))&&(v=(0,x.default)({},v,t.meta)),e=v}else if(S.default.applyPatch(e,[t]),n.allowMetaPatches&&t.meta&&m(t)&&(Array.isArray(t.value)||p(t.value))){var g=y(e,t.path),b=(0,x.default)({},g,t.meta);S.default.applyPatch(e,[i(t.path,b)])}return e},parentPathMatch:function(e,t){if(!Array.isArray(t))return!1;for(var n=0,r=t.length;n<r;n++)if(t[n]!==e[n])return!1;return!0},flatten:c,fullyNormalizeArray:function(e){return f(c(l(e)))},normalizeArray:l,isPromise:function(e){return p(e)&&d(e.then)},forEachNew:function(e,t){try{return a(e,s,t)}catch(e){return e}},forEachNewPrimitive:function(e,t){try{return a(e,u,t)}catch(e){return e}},isJsonPatch:h,isContextPatch:function(e){return g(e)&&"context"===e.type},isPatch:g,isMutation:v,isAdditiveMutation:m,isGenerator:function(e){return C.default.isGeneratorFunction(e)},isFunction:d,isObject:p,isError:function(e){return e instanceof Error}},e.exports=t.default},function(e,t){e.exports=n(896)},function(e,t){e.exports=n(340)},function(e,t){e.exports=n(138)},function(e,t){e.exports=n(902)},function(e,t){e.exports=n(903)},function(e,t){e.exports=n(208)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.requestInterceptor,r=t.responseInterceptor,o=e.withCredentials?"include":"same-origin";return function(t){return e({url:t,loadSpec:!0,requestInterceptor:n,responseInterceptor:r,headers:{Accept:"application/json"},credentials:o}).then(function(e){return e.body})}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(4)),a=r(n(11));t.makeFetchJSON=o,t.clearCache=function(){s.plugins.refs.clearCache()},t.default=function(e){function t(e){var t=this;E&&(s.plugins.refs.docCache[E]=e),s.plugins.refs.fetchJSON=o(w,{requestInterceptor:y,responseInterceptor:b});var n=[s.plugins.refs];return"function"==typeof g&&n.push(s.plugins.parameters),"function"==typeof m&&n.push(s.plugins.properties),"strict"!==p&&n.push(s.plugins.allOf),(0,l.default)({spec:e,context:{baseDoc:E},plugins:n,allowMetaPatches:h,pathDiscriminator:v,parameterMacro:g,modelPropertyMacro:m}).then(_?function(){var e=(0,a.default)(i.default.mark(function e(n){return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n);case 1:case"end":return e.stop()}},e,t)}));return function(t){return e.apply(this,arguments)}}():c.normalizeSwagger)}var n=e.fetch,r=e.spec,f=e.url,p=e.mode,d=e.allowMetaPatches,h=void 0===d||d,v=e.pathDiscriminator,m=e.modelPropertyMacro,g=e.parameterMacro,y=e.requestInterceptor,b=e.responseInterceptor,_=e.skipNormalization,w=e.http,E=e.baseDoc;return E=E||f,w=n||w||u.default,r?t(r):o(w,{requestInterceptor:y,responseInterceptor:b})(E).then(t)};var u=r(n(7)),s=n(31),l=r(s),c=n(5)},function(e,t){e.exports=n(204)},function(e,t){e.exports=n(91)},function(e,t){e.exports=n(2)},function(e,t){e.exports=n(3)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){function n(){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack;for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];this.message=n[0],t&&t.apply(this,n)}return n.prototype=new Error,n.prototype.name=e,n.prototype.constructor=n,n},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFreelyNamed=function(e){var t=e[e.length-1],n=e[e.length-2],u=e.join("/");return r.indexOf(t)>-1&&-1===o.indexOf(n)||i.indexOf(u)>-1||a.some(function(e){return u.indexOf(e)>-1})};var r=["properties"],o=["properties"],i=["definitions","parameters","responses","securityDefinitions","components/schemas","components/responses","components/parameters","components/securitySchemes"],a=["schema/example"]},function(e,t,n){e.exports=n(24)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof e?n.url=e:n=e,!(this instanceof o))return new o(n);(0,a.default)(this,n);var r=this.resolve().then(function(){return t.disableInterfaces||(0,a.default)(t,o.makeApisTagOperation(t)),t});return r.client=this,r}Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(3)),a=r((r(n(25)),n(6))),u=r(n(14)),s=r(n(10)),l=n(7),c=r(l),f=n(16),p=r(f),d=r(n(48)),h=n(49),v=n(51),m=n(5);o.http=c.default,o.makeHttp=l.makeHttp.bind(null,o.http),o.resolve=p.default,o.resolveSubtree=d.default,o.execute=v.execute,o.serializeRes=l.serializeRes,o.serializeHeaders=l.serializeHeaders,o.clearCache=f.clearCache,o.parameterBuilders=v.PARAMETER_BUILDERS,o.makeApisTagOperation=h.makeApisTagOperation,o.buildRequest=v.buildRequest,o.helpers={opId:m.opId},o.prototype={http:c.default,execute:function(e){return this.applyDefaults(),o.execute((0,i.default)({spec:this.spec,http:this.http,securities:{authorized:this.authorizations},contextUrl:"string"==typeof this.url?this.url:void 0},e))},resolve:function(){var e=this;return o.resolve({spec:this.spec,url:this.url,allowMetaPatches:this.allowMetaPatches,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null}).then(function(t){return e.originalSpec=e.spec,e.spec=t.spec,e.errors=t.errors,e})}},o.prototype.applyDefaults=function(){var e=this.spec,t=this.url;if(t&&(0,u.default)(t,"http")){var n=s.default.parse(t);e.host||(e.host=n.host),e.schemes||(e.schemes=[n.protocol.replace(":","")]),e.basePath||(e.basePath="/")}},t.default=o,e.exports=t.default},function(e,t){e.exports=n(905)},function(e,t){e.exports=n(17)},function(e,t){e.exports=n(906)},function(e,t){e.exports=n(907)},function(e,t){e.exports=n(343)},function(e,t){e.exports=n(910)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.plugins=t.SpecMap=void 0;var o=r(n(8)),i=r(n(1)),a=r(n(17)),u=r(n(4)),s=r(n(0)),l=r(n(18)),c=r(n(32)),f=r(n(2)),p=r(n(19)),d=r(n(20));t.default=function(e){return new w(e).dispatch()};var h=r(n(33)),v=r(n(9)),m=r(n(39)),g=r(n(43)),y=r(n(44)),b=r(n(45)),_=r(n(46)),w=function(){function e(t){(0,p.default)(this,e),(0,f.default)(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new _.default,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:(0,f.default)((0,c.default)(this),v.default),allowMetaPatches:!1},t),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter(v.default.isFunction),this.patches.push(v.default.add([],this.spec)),this.patches.push(v.default.context([],this.context)),this.updatePatches(this.patches)}return(0,d.default)(e,[{key:"debug",value:function(e){if(this.debugLevel===e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];(t=console).log.apply(t,r)}}},{key:"verbose",value:function(e){if("verbose"===this.debugLevel){for(var t,n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];(t=console).log.apply(t,["["+e+"] "].concat(r))}}},{key:"wrapPlugin",value:function(e,t){var n=this.pathDiscriminator,r=null,o=void 0;return e[this.pluginProp]?(r=e,o=e[this.pluginProp]):v.default.isFunction(e)?o=e:v.default.isObject(e)&&(o=function(e){var t=function(e,t){return!Array.isArray(e)||e.every(function(e,n){return e===t[n]})};return u.default.mark(function r(o,i){var a,c,f,p,d,h,m,g,y;return u.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:y=function r(o,f,p){var d,h,m,g,y,b,_,w,E,x,S,C,k,A,O,P;return u.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(v.default.isObject(o)){a.next=6;break}if(e.key!==f[f.length-1]){a.next=4;break}return a.next=4,e.plugin(o,e.key,f,i);case 4:a.next=48;break;case 6:d=f.length-1,h=f[d],m=f.indexOf("properties"),g="properties"===h&&d===m,y=i.allowMetaPatches&&c[o.$$ref],b=!0,_=!1,w=void 0,a.prev=14,E=(0,l.default)((0,s.default)(o));case 16:if(b=(x=E.next()).done){a.next=34;break}if(S=x.value,C=o[S],k=f.concat(S),A=v.default.isObject(C),O=o.$$ref,y){a.next=26;break}if(!A){a.next=26;break}return i.allowMetaPatches&&O&&(c[O]=!0),a.delegateYield(r(C,k,p),"t0",26);case 26:if(g||S!==e.key){a.next=31;break}if(P=t(n,f),n&&!P){a.next=31;break}return a.next=31,e.plugin(C,S,k,i,p);case 31:b=!0,a.next=16;break;case 34:a.next=40;break;case 36:a.prev=36,a.t1=a.catch(14),_=!0,w=a.t1;case 40:a.prev=40,a.prev=41,!b&&E.return&&E.return();case 43:if(a.prev=43,!_){a.next=46;break}throw w;case 46:return a.finish(43);case 47:return a.finish(40);case 48:case"end":return a.stop()}},a,this,[[14,36,40,48],[41,,43,47]])},a=u.default.mark(y),c={},f=!0,p=!1,d=void 0,r.prev=6,h=(0,l.default)(o.filter(v.default.isAdditiveMutation));case 8:if(f=(m=h.next()).done){r.next=14;break}return g=m.value,r.delegateYield(y(g.value,g.path,g),"t0",11);case 11:f=!0,r.next=8;break;case 14:r.next=20;break;case 16:r.prev=16,r.t1=r.catch(6),p=!0,d=r.t1;case 20:r.prev=20,r.prev=21,!f&&h.return&&h.return();case 23:if(r.prev=23,!p){r.next=26;break}throw d;case 26:return r.finish(23);case 27:return r.finish(20);case 28:case"end":return r.stop()}},r,this,[[6,16,20,28],[21,,23,27]])})}(e)),(0,f.default)(o.bind(r),{pluginName:e.name||t,isGenerator:v.default.isGenerator(o)})}},{key:"nextPlugin",value:function(){var e=this;return(0,h.default)(this.wrappedPlugins,function(t){return e.getMutationsForPlugin(t).length>0})}},{key:"nextPromisedPatch",value:function(){if(this.promisedPatches.length>0)return a.default.race(this.promisedPatches.map(function(e){return e.value}))}},{key:"getPluginHistory",value:function(e){var t=this.getPluginName(e);return this.pluginHistory[t]||[]}},{key:"getPluginRunCount",value:function(e){return this.getPluginHistory(e).length}},{key:"getPluginHistoryTip",value:function(e){var t=this.getPluginHistory(e);return t&&t[t.length-1]||{}}},{key:"getPluginMutationIndex",value:function(e){var t=this.getPluginHistoryTip(e).mutationIndex;return"number"!=typeof t?-1:t}},{key:"getPluginName",value:function(e){return e.pluginName}},{key:"updatePluginHistory",value:function(e,t){var n=this.getPluginName(e);(this.pluginHistory[n]=this.pluginHistory[n]||[]).push(t)}},{key:"updatePatches",value:function(e,t){var n=this;v.default.normalizeArray(e).forEach(function(e){if(e instanceof Error)n.errors.push(e);else try{if(!v.default.isObject(e))return void n.debug("updatePatches","Got a non-object patch",e);if(n.showDebug&&n.allPatches.push(e),v.default.isPromise(e.value))return n.promisedPatches.push(e),void n.promisedPatchThen(e);if(v.default.isContextPatch(e))return void n.setContext(e.path,e.value);if(v.default.isMutation(e))return void n.updateMutations(e)}catch(e){console.error(e),n.errors.push(e)}})}},{key:"updateMutations",value:function(e){"object"===(0,i.default)(e.value)&&!Array.isArray(e.value)&&this.allowMetaPatches&&(e.value=(0,f.default)({},e.value));var t=v.default.applyPatch(this.state,e,{allowMetaPatches:this.allowMetaPatches});t&&(this.mutations.push(e),this.state=t)}},{key:"removePromisedPatch",value:function(e){var t=this.promisedPatches.indexOf(e);t<0?this.debug("Tried to remove a promisedPatch that isn't there!"):this.promisedPatches.splice(t,1)}},{key:"promisedPatchThen",value:function(e){var t=this;return e.value=e.value.then(function(n){var r=(0,f.default)({},e,{value:n});t.removePromisedPatch(e),t.updatePatches(r)}).catch(function(n){t.removePromisedPatch(e),t.updatePatches(n)})}},{key:"getMutations",value:function(e,t){return e=e||0,"number"!=typeof t&&(t=this.mutations.length),this.mutations.slice(e,t)}},{key:"getCurrentMutations",value:function(){return this.getMutationsForPlugin(this.getCurrentPlugin())}},{key:"getMutationsForPlugin",value:function(e){var t=this.getPluginMutationIndex(e);return this.getMutations(t+1)}},{key:"getCurrentPlugin",value:function(){return this.currentPlugin}},{key:"getPatchesOfType",value:function(e,t){return e.filter(t)}},{key:"getLib",value:function(){return this.libMethods}},{key:"_get",value:function(e){return v.default.getIn(this.state,e)}},{key:"_getContext",value:function(e){return this.contextTree.get(e)}},{key:"setContext",value:function(e,t){return this.contextTree.set(e,t)}},{key:"_hasRun",value:function(e){return this.getPluginRunCount(this.getCurrentPlugin())>(e||0)}},{key:"_clone",value:function(e){return JSON.parse((0,o.default)(e))}},{key:"dispatch",value:function(){function e(e){e&&(e=v.default.fullyNormalizeArray(e),n.updatePatches(e,r))}var t=this,n=this,r=this.nextPlugin();if(!r){var o=this.nextPromisedPatch();if(o)return o.then(function(){return t.dispatch()}).catch(function(){return t.dispatch()});var i={spec:this.state,errors:this.errors};return this.showDebug&&(i.patches=this.allPatches),a.default.resolve(i)}if(n.pluginCount=n.pluginCount||{},n.pluginCount[r]=(n.pluginCount[r]||0)+1,n.pluginCount[r]>100)return a.default.resolve({spec:n.state,errors:n.errors.concat(new Error("We've reached a hard limit of 100 plugin runs"))});if(r!==this.currentPlugin&&this.promisedPatches.length){var u=this.promisedPatches.map(function(e){return e.value});return a.default.all(u.map(function(e){return e.then(Function,Function)})).then(function(){return t.dispatch()})}return function(){n.currentPlugin=r;var t=n.getCurrentMutations(),o=n.mutations.length-1;try{if(r.isGenerator){var i=!0,a=!1,u=void 0;try{for(var s,p=(0,l.default)(r(t,n.getLib()));!(i=(s=p.next()).done);i=!0)e(s.value)}catch(e){a=!0,u=e}finally{try{!i&&p.return&&p.return()}finally{if(a)throw u}}}else e(r(t,n.getLib()))}catch(t){console.error(t),e([(0,f.default)((0,c.default)(t),{plugin:r})])}finally{n.updatePluginHistory(r,{mutationIndex:o})}return n.dispatch()}()}}]),e}(),E={refs:m.default,allOf:g.default,parameters:y.default,properties:b.default};t.SpecMap=w,t.plugins=E},function(e,t){e.exports=n(350)},function(e,t){e.exports=n(288)},function(e,t){e.exports=n(83)},function(e,t){e.exports=n(22)},function(e,t){e.exports=n(911)},function(e,t){e.exports=n(179)},function(e,t){e.exports=n(181)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!A.test(e)){if(!t)throw new O("Tried to resolve a relative URL, without having a basePath. path: '"+e+"' basePath: '"+t+"'");return x.default.resolve(t,e)}return e}function i(e,t){var n;return n=e&&e.response&&e.response.body?e.response.body.code+" "+e.response.body.message:e.message,new O("Could not resolve reference: "+n,t,e)}function a(e){return(e+"").split("#")}function u(e,t){var n=P[e];if(n&&!S.default.isPromise(n))try{var r=l(t,n);return(0,b.default)(g.default.resolve(r),{__value:r})}catch(e){return g.default.reject(e)}return s(e).then(function(e){return l(t,e)})}function s(e){var t=P[e];return t?S.default.isPromise(t)?t:g.default.resolve(t):(P[e]=I.fetchJSON(e).then(function(t){return P[e]=t,t}),P[e])}function l(e,t){var n=c(e);if(n.length<1)return t;var r=S.default.getIn(t,n);if(void 0===r)throw new O("Could not resolve pointer: "+e+" does not exist in document",{pointer:e});return r}function c(e){if("string"!=typeof e)throw new TypeError("Expected a string, got a "+(void 0===e?"undefined":(0,v.default)(e)));return"/"===e[0]&&(e=e.substr(1)),""===e?[]:e.split("/").map(f)}function f(e){return"string"!=typeof e?e:E.default.unescape(e.replace(/~1/g,"/").replace(/~0/g,"~"))}function p(e){return E.default.escape(e.replace(/~/g,"~0").replace(/\//g,"~1"))}function d(e,t){if(j(t))return!0;var n=e.charAt(t.length),r=t.slice(-1);return 0===e.indexOf(t)&&(!n||"/"===n||"#"===n)&&"#"!==r}function h(e,t,n,r){var o=T.get(r);o||(o={},T.set(r,o));var i=function(e){return 0===e.length?"":"/"+e.map(p).join("/")}(n),a=(t||"<specmap-base>")+"#"+e;if(t==r.contextTree.get([]).baseDoc&&d(i,e))return!0;var u="";if(n.some(function(e){return u=u+"/"+p(e),o[u]&&o[u].some(function(e){return d(e,a)||d(a,e)})}))return!0;o[i]=(o[i]||[]).concat(a)}Object.defineProperty(t,"__esModule",{value:!0});var v=r(n(1)),m=r(n(0)),g=r(n(17)),y=r(n(40)),b=r(n(2)),_=n(41),w=r(n(15)),E=r(n(42)),x=r(n(10)),S=r(n(9)),C=r(n(21)),k=n(22),A=new RegExp("^([a-z]+://|//)","i"),O=(0,C.default)("JSONRefError",function(e,t,n){this.originalError=n,(0,b.default)(this,t||{})}),P={},T=new y.default,M={key:"$ref",plugin:function(e,t,n,r){var s=n.slice(0,-1);if(!(0,k.isFreelyNamed)(s)){var l=r.getContext(n).baseDoc;if("string"!=typeof e)return new O("$ref: must be a string (JSON-Ref)",{$ref:e,baseDoc:l,fullPath:n});var f=a(e),p=f[0],d=f[1]||"",v=void 0;try{v=l||p?o(p,l):null}catch(t){return i(t,{pointer:d,$ref:e,basePath:v,fullPath:n})}var g=void 0,y=void 0;if(!h(d,v,s,r)){if(null==v?(y=c(d),void 0===(g=r.get(y))&&(g=new O("Could not resolve reference: "+e,{pointer:d,$ref:e,baseDoc:l,fullPath:n}))):g=null!=(g=u(v,d)).__value?g.__value:g.catch(function(t){throw i(t,{pointer:d,$ref:e,baseDoc:l,fullPath:n})}),g instanceof Error)return[S.default.remove(n),g];var b=S.default.replace(s,g,{$$ref:e});if(v&&v!==l)return[b,S.default.context(s,{baseDoc:v})];try{if(!function(e,t){var n=[e];return t.path.reduce(function(e,t){return n.push(e[t]),e[t]},e),function e(t){return S.default.isObject(t)&&(n.indexOf(t)>=0||(0,m.default)(t).some(function(n){return e(t[n])}))}(t.value)}(r.state,b))return b}catch(e){return null}}}}},I=(0,b.default)(M,{docCache:P,absoluteify:o,clearCache:function(e){void 0!==e?delete P[e]:(0,m.default)(P).forEach(function(e){delete P[e]})},JSONRefError:O,wrapError:i,getDoc:s,split:a,extractFromDoc:u,fetchJSON:function(e){return(0,_.fetch)(e,{headers:{Accept:"application/json, application/yaml"},loadSpec:!0}).then(function(e){return e.text()}).then(function(e){return w.default.safeLoad(e)})},extract:l,jsonPointerToArray:c,unescapeJsonPointerToken:f});t.default=I;var j=function(e){return!e||"/"===e||"#"===e};e.exports=t.default},function(e,t){e.exports=n(914)},function(e,t){e.exports=n(925)},function(e,t){e.exports=n(926)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e&&e.__esModule?e:{default:e}}(n(2)),o=n(22);t.default={key:"allOf",plugin:function(e,t,n,i,a){if(!a.meta||!a.meta.$$ref){var u=n.slice(0,-1);if(!(0,o.isFreelyNamed)(u)){if(!Array.isArray(e)){var s=new TypeError("allOf must be an array");return s.fullPath=n,s}var l=!1,c=a.value;u.forEach(function(e){c&&(c=c[e])}),delete(c=(0,r.default)({},c)).allOf;var f=[i.replace(u,{})].concat(e.map(function(e,t){if(!i.isObject(e)){if(l)return null;l=!0;var r=new TypeError("Elements in allOf must be objects");return r.fullPath=n,r}return i.mergeDeep(u,e)}));return f.push(i.mergeDeep(u,c)),c.$$ref||f.push(i.remove([].concat(u,"$$ref"))),f}}}},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(2)),i=r(n(9));t.default={key:"parameters",plugin:function(e,t,n,r,a){if(Array.isArray(e)&&e.length){var u=(0,o.default)([],e),s=n.slice(0,-1),l=(0,o.default)({},i.default.getIn(r.spec,s));return e.forEach(function(e,t){try{u[t].default=r.parameterMacro(l,e)}catch(e){var o=new Error(e);return o.fullPath=n,o}}),i.default.replace(n,u)}return i.default.replace(n,e)}},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(2)),i=r(n(9));t.default={key:"properties",plugin:function(e,t,n,r){var a=(0,o.default)({},e);for(var u in e)try{a[u].default=r.modelPropertyMacro(a[u])}catch(e){var s=new Error(e);return s.fullPath=n,s}return i.default.replace(n,a)}},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return i({children:{}},e,t)}function i(e,t,n){return e.value=t||{},e.protoValue=n?(0,u.default)({},n.protoValue,e.value):e.value,(0,a.default)(e.children).forEach(function(t){var n=e.children[t];e.children[t]=i(n,n.value,e)}),e}Object.defineProperty(t,"__esModule",{value:!0});var a=r(n(0)),u=r(n(3)),s=r(n(19)),l=r(n(20)),c=function(){function e(t){(0,s.default)(this,e),this.root=o(t||{})}return(0,l.default)(e,[{key:"set",value:function(e,t){var n=this.getParent(e,!0);if(n){var r=e[e.length-1],a=n.children;a[r]?i(a[r],t,n):a[r]=o(t,n)}else i(this.root,t,null)}},{key:"get",value:function(e){if((e=e||[]).length<1)return this.root.value;for(var t=this.root,n=void 0,r=void 0,o=0;o<e.length&&(r=e[o],(n=t.children)[r]);o++)t=n[r];return t&&t.protoValue}},{key:"getParent",value:function(e,t){return!e||e.length<1?null:e.length<2?this.root:e.slice(0,-1).reduce(function(e,n){if(!e)return e;var r=e.children;return!r[n]&&t&&(r[n]=o(null,e)),r[n]},this.root)}}]),e}();t.default=c,e.exports=t.default},function(e,t){e.exports=n(38)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(4)),i=r(n(3)),a=r(n(11)),u=r(n(12)),s=r(n(16)),l=n(5);t.default=function(){var e=(0,a.default)(o.default.mark(function e(t,n){var r,a,c,f,p,d,h,v,m,g,y=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=y.returnEntireTree,a=y.baseDoc,c=y.requestInterceptor,f=y.responseInterceptor,p=y.parameterMacro,d=y.modelPropertyMacro,h={pathDiscriminator:n,baseDoc:a,requestInterceptor:c,responseInterceptor:f,parameterMacro:p,modelPropertyMacro:d},v=(0,l.normalizeSwagger)({spec:t}),m=v.spec,e.next=5,(0,s.default)((0,i.default)({},h,{spec:m,allowMetaPatches:!0,skipNormalization:!0}));case 5:return g=e.sent,!r&&Array.isArray(n)&&n.length&&(g.spec=(0,u.default)(g.spec,n)||null),e.abrupt("return",g);case 8:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=t.pathName,r=t.method,o=t.operationId;return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.execute((0,a.default)({spec:e.spec},(0,u.default)(e,"requestInterceptor","responseInterceptor","userFetch"),{pathName:n,method:r,parameters:t,operationId:o},i))}}}function i(e){var t=e.spec,n=e.cb,r=void 0===n?l:n,o=e.defaultTag,i=void 0===o?"default":o,a=e.v2OperationIdCompatibilityMode,u={},f={};return(0,s.eachOperation)(t,function(e){var n=e.pathName,o=e.method,l=e.operation;(l.tags?c(l.tags):[i]).forEach(function(e){if("string"==typeof e){var i=f[e]=f[e]||{},c=(0,s.opId)(l,n,o,{v2OperationIdCompatibilityMode:a}),p=r({spec:t,pathName:n,method:o,operation:l,operationId:c});if(u[c])u[c]++,i[""+c+u[c]]=p;else if(void 0!==i[c]){var d=u[c]||1;u[c]=d+1,i[""+c+u[c]]=p;var h=i[c];delete i[c],i[""+c+d]=h}else i[c]=p}})}),f}Object.defineProperty(t,"__esModule",{value:!0}),t.self=void 0;var a=r(n(3));t.makeExecute=o,t.makeApisTagOperationsOperationExecute=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=f.makeExecute(e),n=f.mapTagOperations({v2OperationIdCompatibilityMode:e.v2OperationIdCompatibilityMode,spec:e.spec,cb:t}),r={};for(var o in n)for(var i in r[o]={operations:{}},n[o])r[o].operations[i]={execute:n[o][i]};return{apis:r}},t.makeApisTagOperation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=f.makeExecute(e);return{apis:f.mapTagOperations({v2OperationIdCompatibilityMode:e.v2OperationIdCompatibilityMode,spec:e.spec,cb:t})}},t.mapTagOperations=i;var u=r(n(50)),s=n(5),l=function(){return null},c=function(e){return Array.isArray(e)?e:[e]},f=t.self={mapTagOperations:i,makeExecute:o}},function(e,t){e.exports=n(927)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.spec,n=e.operationId,r=(e.securities,e.requestContentType,e.responseContentType),o=e.scheme,a=e.requestInterceptor,s=e.responseInterceptor,c=e.contextUrl,f=e.userFetch,p=(e.requestBody,e.server),d=e.serverVariables,h=e.http,g=e.parameters,y=e.parameterBuilders,O=(0,x.isOAS3)(t);y||(y=O?_.default:b.default);var P={url:"",credentials:h&&h.withCredentials?"include":"same-origin",headers:{},cookies:{}};a&&(P.requestInterceptor=a),s&&(P.responseInterceptor=s),f&&(P.userFetch=f);var T=(0,x.getOperationRaw)(t,n);if(!T)throw new C("Operation "+n+" not found");var M=T.operation,I=void 0===M?{}:M,j=T.method,N=T.pathName;if(P.url+=i({spec:t,scheme:o,contextUrl:c,server:p,serverVariables:d,pathName:N,method:j}),!n)return delete P.cookies,P;P.url+=N,P.method=(""+j).toUpperCase(),g=g||{};var R=t.paths[N]||{};r&&(P.headers.accept=r);var D=A([].concat(S(I.parameters)).concat(S(R.parameters)));D.forEach(function(e){var n=y[e.in],r=void 0;if("body"===e.in&&e.schema&&e.schema.properties&&(r=g),void 0===(r=e&&e.name&&g[e.name])?r=e&&e.name&&g[e.in+"."+e.name]:k(e.name,D).length>1&&console.warn("Parameter '"+e.name+"' is ambiguous because the defined spec has more than one parameter with the name: '"+e.name+"' and the passed-in parameter values did not define an 'in' value."),null!==r){if(void 0!==e.default&&void 0===r&&(r=e.default),void 0===r&&e.required&&!e.allowEmptyValue)throw new Error("Required parameter "+e.name+" is not provided");if(O&&e.schema&&"object"===e.schema.type&&"string"==typeof r)try{r=JSON.parse(r)}catch(e){throw new Error("Could not parse object parameter value string as JSON")}n&&n({req:P,parameter:e,value:r,operation:I,spec:t})}});var L=(0,u.default)({},e,{operation:I});if((P=O?(0,w.default)(L,P):(0,E.default)(L,P)).cookies&&(0,l.default)(P.cookies).length){var U=(0,l.default)(P.cookies).reduce(function(e,t){var n=P.cookies[t];return e+(e?"&":"")+v.default.serialize(t,n)},"");P.headers.Cookie=U}return P.cookies&&delete P.cookies,(0,m.mergeInQueryOrForm)(P),P}function i(e){return(0,x.isOAS3)(e.spec)?function(e){var t=e.spec,n=e.pathName,r=e.method,o=e.server,i=e.contextUrl,a=e.serverVariables,u=void 0===a?{}:a,s=(0,f.default)(t,["paths",n,(r||"").toLowerCase(),"servers"])||(0,f.default)(t,["paths",n,"servers"])||(0,f.default)(t,["servers"]),l="",c=null;if(o&&s&&s.length){var p=s.map(function(e){return e.url});p.indexOf(o)>-1&&(l=o,c=s[p.indexOf(o)])}!l&&s&&s.length&&(l=s[0].url,c=s[0]),l.indexOf("{")>-1&&function(e){for(var t=[],n=/{([^}]+)}/g,r=void 0;r=n.exec(e);)t.push(r[1]);return t}(l).forEach(function(e){if(c.variables&&c.variables[e]){var t=c.variables[e],n=u[e]||t.default,r=new RegExp("{"+e+"}","g");l=l.replace(r,n)}});return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=h.default.parse(e),r=h.default.parse(t),o=P(n.protocol)||P(r.protocol)||"",i=n.host||r.host,a=n.pathname||"",u=void 0;return"/"===(u=o&&i?o+"://"+(i+a):a)[u.length-1]?u.slice(0,-1):u}(l,i)}(e):function(e){var t=e.spec,n=e.scheme,r=e.contextUrl,o=void 0===r?"":r,i=h.default.parse(o),a=Array.isArray(t.schemes)?t.schemes[0]:null,u=n||a||P(i.protocol)||"http",s=t.host||i.host||"",l=t.basePath||"",c=void 0;return"/"===(c=u&&s?u+"://"+(s+l):l)[c.length-1]?c.slice(0,-1):c}(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.self=void 0;var a=r(n(8)),u=r(n(3)),s=r(n(52)),l=r(n(0)),c=r(n(2));t.execute=function(e){var t=e.http,n=e.fetch,r=e.spec,o=e.operationId,i=e.pathName,l=e.method,c=e.parameters,f=e.securities,h=(0,s.default)(e,["http","fetch","spec","operationId","pathName","method","parameters","securities"]),v=t||n||g.default;i&&l&&!o&&(o=(0,x.legacyIdFromPathMethod)(i,l));var m=O.buildRequest((0,u.default)({spec:r,operationId:o,parameters:c,securities:f,http:v},h));return m.body&&((0,p.default)(m.body)||(0,d.default)(m.body))&&(m.body=(0,a.default)(m.body)),v(m)},t.buildRequest=o,t.baseUrl=i;var f=r((r(n(6)),n(12))),p=r(n(53)),d=r(n(54)),h=r((r(n(13)),n(10))),v=r(n(55)),m=n(7),g=r(m),y=r(n(21)),b=r(n(56)),_=r(n(57)),w=r(n(62)),E=r(n(64)),x=n(5),S=function(e){return Array.isArray(e)?e:[]},C=(0,y.default)("OperationNotFoundError",function(e,t,n){this.originalError=n,(0,c.default)(this,t||{})}),k=function(e,t){return t.filter(function(t){return t.name===e})},A=function(e){var t={};e.forEach(function(e){t[e.in]||(t[e.in]={}),t[e.in][e.name]=e});var n=[];return(0,l.default)(t).forEach(function(e){(0,l.default)(t[e]).forEach(function(r){n.push(t[e][r])})}),n},O=t.self={buildRequest:o},P=function(e){return e?e.replace(/\W/g,""):null}},function(e,t){e.exports=n(84)},function(e,t){e.exports=n(228)},function(e,t){e.exports=n(24)},function(e,t){e.exports=n(930)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={body:function(e){var t=e.req,n=e.value;t.body=n},header:function(e){var t=e.req,n=e.parameter,r=e.value;t.headers=t.headers||{},void 0!==r&&(t.headers[n.name]=r)},query:function(e){var t=e.req,n=e.value,r=e.parameter;if(t.query=t.query||{},!1===n&&"boolean"===r.type&&(n="false"),0===n&&["number","integer"].indexOf(r.type)>-1&&(n="0"),n)t.query[r.name]={collectionFormat:r.collectionFormat,value:n};else if(r.allowEmptyValue&&void 0!==n){var o=r.name;t.query[o]=t.query[o]||{},t.query[o].allowEmptyValue=!0}},path:function(e){var t=e.req,n=e.value,r=e.parameter;t.url=t.url.replace("{"+r.name+"}",encodeURIComponent(n))},formData:function(e){var t=e.req,n=e.value,r=e.parameter;(n||r.allowEmptyValue)&&(t.form=t.form||{},t.form[r.name]={value:n,allowEmptyValue:r.allowEmptyValue,collectionFormat:r.collectionFormat})}},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(0)),i=r(n(1)),a=r(n(58));t.default={path:function(e){var t=e.req,n=e.value,r=e.parameter,o=r.name,i=r.style,u=r.explode,s=(0,a.default)({key:r.name,value:n,style:i||"simple",explode:u||!1,escape:!0});t.url=t.url.replace("{"+o+"}",s)},query:function(e){var t=e.req,n=e.value,r=e.parameter;if(t.query=t.query||{},!1===n&&(n="false"),0===n&&(n="0"),n){var u=void 0===n?"undefined":(0,i.default)(n);"deepObject"===r.style?(0,o.default)(n).forEach(function(e){var o=n[e];t.query[r.name+"["+e+"]"]={value:(0,a.default)({key:e,value:o,style:"deepObject",escape:r.allowReserved?"unsafe":"reserved"}),skipEncoding:!0}}):"object"!==u||Array.isArray(n)||"form"!==r.style&&r.style||!r.explode&&void 0!==r.explode?t.query[r.name]={value:(0,a.default)({key:r.name,value:n,style:r.style||"form",explode:void 0===r.explode||r.explode,escape:r.allowReserved?"unsafe":"reserved"}),skipEncoding:!0}:(0,o.default)(n).forEach(function(e){var o=n[e];t.query[e]={value:(0,a.default)({key:e,value:o,style:r.style||"form",escape:r.allowReserved?"unsafe":"reserved"}),skipEncoding:!0}})}else if(r.allowEmptyValue&&void 0!==n){var s=r.name;t.query[s]=t.query[s]||{},t.query[s].allowEmptyValue=!0}},header:function(e){var t=e.req,n=e.parameter,r=e.value;t.headers=t.headers||{},u.indexOf(n.name.toLowerCase())>-1||void 0!==r&&(t.headers[n.name]=(0,a.default)({key:n.name,value:r,style:n.style||"simple",explode:void 0!==n.explode&&n.explode,escape:!1}))},cookie:function(e){var t=e.req,n=e.parameter,r=e.value;t.headers=t.headers||{};var o=void 0===r?"undefined":(0,i.default)(r);if("undefined"!==o){var u="object"===o&&!Array.isArray(r)&&n.explode?"":n.name+"=";t.headers.Cookie=u+(0,a.default)({key:n.name,value:r,escape:!1,style:n.style||"form",explode:void 0!==n.explode&&n.explode})}}};var u=["accept","authorization","content-type"];e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).escape,n=arguments[2];return"number"==typeof e&&(e=e.toString()),"string"==typeof e&&e.length&&t?n?JSON.parse(e):(0,s.stringToCharArray)(e).map(function(e){return c(e)?e:l(e)&&"unsafe"===t?e:((0,u.default)(e)||[]).map(function(e){return("0"+e.toString(16).toUpperCase()).slice(-2)}).map(function(e){return"%"+e}).join("")}).join(""):e}Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(0)),a=r(n(1));t.encodeDisallowedCharacters=o,t.default=function(e){var t=e.value;return Array.isArray(t)?function(e){var t=e.key,n=e.value,r=e.style,i=e.explode,a=e.escape,u=function(e){return o(e,{escape:a})};if("simple"===r)return n.map(function(e){return u(e)}).join(",");if("label"===r)return"."+n.map(function(e){return u(e)}).join(".");if("matrix"===r)return n.map(function(e){return u(e)}).reduce(function(e,n){return!e||i?(e||"")+";"+t+"="+n:e+","+n},"");if("form"===r){var s=i?"&"+t+"=":",";return n.map(function(e){return u(e)}).join(s)}if("spaceDelimited"===r){var l=i?t+"=":"";return n.map(function(e){return u(e)}).join(" "+l)}if("pipeDelimited"===r){var c=i?t+"=":"";return n.map(function(e){return u(e)}).join("|"+c)}}(e):"object"===(void 0===t?"undefined":(0,a.default)(t))?function(e){var t=e.key,n=e.value,r=e.style,a=e.explode,u=e.escape,s=function(e){return o(e,{escape:u})},l=(0,i.default)(n);return"simple"===r?l.reduce(function(e,t){var r=s(n[t]);return(e?e+",":"")+t+(a?"=":",")+r},""):"label"===r?l.reduce(function(e,t){var r=s(n[t]);return(e?e+".":".")+t+(a?"=":".")+r},""):"matrix"===r&&a?l.reduce(function(e,t){var r=s(n[t]);return(e?e+";":";")+t+"="+r},""):"matrix"===r?l.reduce(function(e,r){var o=s(n[r]);return(e?e+",":";"+t+"=")+r+","+o},""):"form"===r?l.reduce(function(e,t){var r=s(n[t]);return(e?e+(a?"&":","):"")+t+(a?"=":",")+r},""):void 0}(e):function(e){var t=e.key,n=e.value,r=e.style,i=e.escape,a=function(e){return o(e,{escape:i})};return"simple"===r?a(n):"label"===r?"."+a(n):"matrix"===r?";"+t+"="+a(n):"form"===r?a(n):"deepObject"===r?a(n):void 0}(e)};var u=r((r(n(59)),n(60))),s=n(61),l=function(e){return":/?#[]@!$&'()*+,;=".indexOf(e)>-1},c=function(e){return/^[a-z0-9\-._~]+$/i.test(e)}},function(e,t){e.exports=n(931)},function(e,t){e.exports=n(932)},function(e,t){e.exports=n(933)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.request,n=e.securities,r=void 0===n?{}:n,o=e.operation,i=void 0===o?{}:o,a=e.spec,f=(0,s.default)({},t),p=r.authorized,d=void 0===p?{}:p,h=i.security||a.security||[],v=d&&!!(0,u.default)(d).length,m=(0,l.default)(a,["components","securitySchemes"])||{};return f.headers=f.headers||{},f.query=f.query||{},(0,u.default)(r).length&&v&&h&&(!Array.isArray(i.security)||i.security.length)?(h.forEach(function(e,t){for(var n in e){var r=d[n],o=m[n];if(r){var i=r.value||r,a=o.type;if(r)if("apiKey"===a)"query"===o.in&&(f.query[o.name]=i),"header"===o.in&&(f.headers[o.name]=i),"cookie"===o.in&&(f.cookies[o.name]=i);else if("http"===a){if("basic"===o.scheme){var u=i.username,s=i.password,l=(0,c.default)(u+":"+s);f.headers.Authorization="Basic "+l}"bearer"===o.scheme&&(f.headers.Authorization="Bearer "+i)}else if("oauth2"===a){var p=r.token||{},h=p.access_token,v=p.token_type;v&&"bearer"!==v.toLowerCase()||(v="Bearer"),f.headers.Authorization=v+" "+h}}}}),f):t}Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(8)),a=r(n(1)),u=r(n(0));t.default=function(e,t){var n=e.operation,r=e.requestBody,s=e.securities,l=e.spec,c=e.attachContentTypeForEmptyPayload,p=e.requestContentType;t=o({request:t,securities:s,operation:n,spec:l});var d=n.requestBody||{},h=(0,u.default)(d.content||{}),v=p&&h.indexOf(p)>-1;if(r||c){if(p&&v)t.headers["Content-Type"]=p;else if(!p){var m=h[0];m&&(t.headers["Content-Type"]=m,p=m)}}else p&&v&&(t.headers["Content-Type"]=p);return r&&(p?h.indexOf(p)>-1&&("application/x-www-form-urlencoded"===p||0===p.indexOf("multipart/")?"object"===(void 0===r?"undefined":(0,a.default)(r))?(t.form={},(0,u.default)(r).forEach(function(e){var n,o=r[e],u=void 0;"undefined"!=typeof File&&(u=o instanceof File),"undefined"!=typeof Blob&&(u=u||o instanceof Blob),void 0!==f.Buffer&&(u=u||f.Buffer.isBuffer(o)),n="object"!==(void 0===o?"undefined":(0,a.default)(o))||u?o:Array.isArray(o)?o.toString():(0,i.default)(o),t.form[e]={value:n}})):t.form=r:t.body=r):t.body=r),t},t.applySecurities=o;var s=r(n(6)),l=r(n(12)),c=r(n(13)),f=n(63)},function(e,t){e.exports=n(54)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.request,n=e.securities,r=void 0===n?{}:n,o=e.operation,s=void 0===o?{}:o,l=e.spec,c=(0,u.default)({},t),f=r.authorized,p=void 0===f?{}:f,d=r.specSecurity,h=void 0===d?[]:d,v=s.security||h,m=p&&!!(0,i.default)(p).length,g=l.securityDefinitions;return c.headers=c.headers||{},c.query=c.query||{},(0,i.default)(r).length&&m&&v&&(!Array.isArray(s.security)||s.security.length)?(v.forEach(function(e,t){for(var n in e){var r=p[n];if(r){var o=r.token,i=r.value||r,u=g[n],s=u.type,l=u["x-tokenName"]||"access_token",f=o&&o[l],d=o&&o.token_type;if(r)if("apiKey"===s){var h="query"===u.in?"query":"headers";c[h]=c[h]||{},c[h][u.name]=i}else"basic"===s?i.header?c.headers.authorization=i.header:(i.base64=(0,a.default)(i.username+":"+i.password),c.headers.authorization="Basic "+i.base64):"oauth2"===s&&f&&(d=d&&"bearer"!==d.toLowerCase()?d:"Bearer",c.headers.authorization=d+" "+f)}}}),c):t}Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(0));t.default=function(e,t){var n=e.spec,r=e.operation,i=e.securities,a=e.requestContentType,u=e.attachContentTypeForEmptyPayload;if((t=o({request:t,securities:i,operation:r,spec:n})).body||t.form||u)a?t.headers["Content-Type"]=a:Array.isArray(r.consumes)?t.headers["Content-Type"]=r.consumes[0]:Array.isArray(n.consumes)?t.headers["Content-Type"]=n.consumes[0]:r.parameters&&r.parameters.filter(function(e){return"file"===e.type}).length?t.headers["Content-Type"]="multipart/form-data":r.parameters&&r.parameters.filter(function(e){return"formData"===e.in}).length&&(t.headers["Content-Type"]="application/x-www-form-urlencoded");else if(a){var s=r.parameters&&r.parameters.filter(function(e){return"body"===e.in}).length>0,l=r.parameters&&r.parameters.filter(function(e){return"formData"===e.in}).length>0;(s||l)&&(t.headers["Content-Type"]=a)}return t},t.applySecurities=o;var a=r(n(13)),u=r(n(6));r(n(7))}])},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}();t.arrayToObject=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n},t.merge=function(e,n,o){if(!n)return e;if("object"!=typeof n){if(Array.isArray(e))e.push(n);else{if("object"!=typeof e)return[e,n];(o.plainObjects||o.allowPrototypes||!r.call(Object.prototype,n))&&(e[n]=!0)}return e}if("object"!=typeof e)return[e].concat(n);var i=e;return Array.isArray(e)&&!Array.isArray(n)&&(i=t.arrayToObject(e,o)),Array.isArray(e)&&Array.isArray(n)?(n.forEach(function(n,i){r.call(e,i)?e[i]&&"object"==typeof e[i]?e[i]=t.merge(e[i],n,o):e.push(n):e[i]=n}),e):Object.keys(n).reduce(function(e,i){var a=n[i];return r.call(e,i)?e[i]=t.merge(e[i],a,o):e[i]=a,e},i)},t.assign=function(e,t){return Object.keys(t).reduce(function(e,n){return e[n]=t[n],e},e)},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.encode=function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:String(e),n="",r=0;r<t.length;++r){var i=t.charCodeAt(r);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?n+=t.charAt(r):i<128?n+=o[i]:i<2048?n+=o[192|i>>6]+o[128|63&i]:i<55296||i>=57344?n+=o[224|i>>12]+o[128|i>>6&63]+o[128|63&i]:(r+=1,i=65536+((1023&i)<<10|1023&t.charCodeAt(r)),n+=o[240|i>>18]+o[128|i>>12&63]+o[128|i>>6&63]+o[128|63&i])}return n},t.compact=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var o=t[r],i=o.obj[o.prop],a=Object.keys(i),u=0;u<a.length;++u){var s=a[u],l=i[s];"object"==typeof l&&null!==l&&-1===n.indexOf(l)&&(t.push({obj:i,prop:s}),n.push(l))}return function(e){for(var t;e.length;){var n=e.pop();if(t=n.obj[n.prop],Array.isArray(t)){for(var r=[],o=0;o<t.length;++o)void 0!==t[o]&&r.push(t[o]);n.obj[n.prop]=r}}return t}(t)},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null!==e&&void 0!==e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},function(e,t,n){"use strict";var r=String.prototype.replace,o=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return r.call(e,o,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(e,t,n){var r=Array.prototype.slice,o=n(912),i=n(913),a=e.exports=function(e,t,n){return n||(n={}),e===t||(e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:function(e,t,n){var l,c;if(u(e)||u(t))return!1;if(e.prototype!==t.prototype)return!1;if(i(e))return!!i(t)&&(e=r.call(e),t=r.call(t),a(e,t,n));if(s(e)){if(!s(t))return!1;if(e.length!==t.length)return!1;for(l=0;l<e.length;l++)if(e[l]!==t[l])return!1;return!0}try{var f=o(e),p=o(t)}catch(e){return!1}if(f.length!=p.length)return!1;for(f.sort(),p.sort(),l=f.length-1;l>=0;l--)if(f[l]!=p[l])return!1;for(l=f.length-1;l>=0;l--)if(c=f[l],!a(e[c],t[c],n))return!1;return typeof e==typeof t}(e,t,n))};function u(e){return null===e||void 0===e}function s(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length)&&("function"==typeof e.copy&&"function"==typeof e.slice&&!(e.length>0&&"number"!=typeof e[0]))}},function(e,t,n){var r={strict:!0},o=n(391),i=function(e,t){return o(e,t,r)},a=n(231);t.JsonPatchError=a.PatchError,t.deepClone=a._deepClone;var u={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=l(n,this.path);r&&(r=a._deepClone(r));var o=c(n,{op:"remove",path:this.from}).removed;return c(n,{op:"add",path:this.path,value:o}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=l(n,this.from);return c(n,{op:"add",path:this.path,value:a._deepClone(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:i(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},s={add:function(e,t,n){return a.isInteger(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){return{newDocument:n,removed:e.splice(t,1)[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:u.move,copy:u.copy,test:u.test,_get:u._get};function l(e,t){if(""==t)return e;var n={op:"_get",path:t};return c(e,n),n.value}function c(e,n,r,o){if(void 0===r&&(r=!1),void 0===o&&(o=!0),r&&("function"==typeof r?r(n,0,e,n.path):p(n,0)),""===n.path){var c={newDocument:e};if("add"===n.op)return c.newDocument=n.value,c;if("replace"===n.op)return c.newDocument=n.value,c.removed=e,c;if("move"===n.op||"copy"===n.op)return c.newDocument=l(e,n.from),"move"===n.op&&(c.removed=e),c;if("test"===n.op){if(c.test=i(e,n.value),!1===c.test)throw new t.JsonPatchError("Test operation failed","TEST_OPERATION_FAILED",0,n,e);return c.newDocument=e,c}if("remove"===n.op)return c.removed=e,c.newDocument=null,c;if("_get"===n.op)return n.value=e,c;if(r)throw new t.JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",0,n,e);return c}o||(e=a._deepClone(e));var f=(n.path||"").split("/"),d=e,h=1,v=f.length,m=void 0,g=void 0,y=void 0;for(y="function"==typeof r?r:p;;){if(g=f[h],r&&void 0===m&&(void 0===d[g]?m=f.slice(0,h).join("/"):h==v-1&&(m=n.path),void 0!==m&&y(n,0,e,m)),h++,Array.isArray(d)){if("-"===g)g=d.length;else{if(r&&!a.isInteger(g))throw new t.JsonPatchError("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",0,n.path,n);a.isInteger(g)&&(g=~~g)}if(h>=v){if(r&&"add"===n.op&&g>d.length)throw new t.JsonPatchError("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",0,n.path,n);if(!1===(c=s[n.op].call(n,d,g,e)).test)throw new t.JsonPatchError("Test operation failed","TEST_OPERATION_FAILED",0,n,e);return c}}else if(g&&-1!=g.indexOf("~")&&(g=a.unescapePathComponent(g)),h>=v){if(!1===(c=u[n.op].call(n,d,g,e)).test)throw new t.JsonPatchError("Test operation failed","TEST_OPERATION_FAILED",0,n,e);return c}d=d[g]}}function f(e,n,r,o){if(void 0===o&&(o=!0),r&&!Array.isArray(n))throw new t.JsonPatchError("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");o||(e=a._deepClone(e));for(var i=new Array(n.length),u=0,s=n.length;u<s;u++)i[u]=c(e,n[u],r),e=i[u].newDocument;return i.newDocument=e,i}function p(e,n,r,o){if("object"!=typeof e||null===e||Array.isArray(e))throw new t.JsonPatchError("Operation is not an object","OPERATION_NOT_AN_OBJECT",n,e,r);if(!u[e.op])throw new t.JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",n,e,r);if("string"!=typeof e.path)throw new t.JsonPatchError("Operation `path` property is not a string","OPERATION_PATH_INVALID",n,e,r);if(0!==e.path.indexOf("/")&&e.path.length>0)throw new t.JsonPatchError('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",n,e,r);if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new t.JsonPatchError("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",n,e,r);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new t.JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",n,e,r);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&a.hasUndefined(e.value))throw new t.JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",n,e,r);if(r)if("add"==e.op){var i=e.path.split("/").length,s=o.split("/").length;if(i!==s+1&&i!==s)throw new t.JsonPatchError("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",n,e,r)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==o)throw new t.JsonPatchError("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",n,e,r)}else if("move"===e.op||"copy"===e.op){var l=d([{op:"_get",path:e.from,value:void 0}],r);if(l&&"OPERATION_PATH_UNRESOLVABLE"===l.name)throw new t.JsonPatchError("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",n,e,r)}}function d(e,n,r){try{if(!Array.isArray(e))throw new t.JsonPatchError("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(n)f(a._deepClone(n),a._deepClone(e),r||!0);else{r=r||p;for(var o=0;o<e.length;o++)r(e[o],o,n,void 0)}}catch(e){if(e instanceof t.JsonPatchError)return e;throw e}}t.getValueByPointer=l,t.applyOperation=c,t.applyPatch=f,t.applyReducer=function(e,n){var r=c(e,n);if(!1===r.test)throw new t.JsonPatchError("Test operation failed","TEST_OPERATION_FAILED",0,n,e);return r.newDocument},t.validator=p,t.validate=d},function(e,t,n){var r=n(28);e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(22));t.default=function(){return{afterLoad:function(e){this.rootInjects=this.rootInjects||{},this.rootInjects.initOAuth=e.authActions.configureAuth,this.rootInjects.preauthorizeApiKey=f.bind(null,e),this.rootInjects.preauthorizeBasic=c.bind(null,e)},statePlugins:{auth:{reducers:o.default,actions:i,selectors:a},spec:{wrapActions:u}}}},t.preauthorizeBasic=c,t.preauthorizeApiKey=f;var o=l(n(395)),i=s(n(233)),a=s(n(396)),u=s(n(397));function s(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n,o){var i=e.authActions.authorize,a=e.specSelectors,u=a.specJson,s=(0,a.isOAS3)()?["components","securitySchemes"]:["securityDefinitions"],l=u().getIn([].concat(s,[t]));return l?i((0,r.default)({},t,{value:{username:n,password:o},schema:l.toJS()})):null}function f(e,t,n){var o=e.authActions.authorize,i=e.specSelectors,a=i.specJson,u=(0,i.isOAS3)()?["components","securitySchemes"]:["securityDefinitions"],s=a().getIn([].concat(u,[t]));return s?o((0,r.default)({},t,{value:n,schema:s.toJS()})):null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=c(n(22)),i=c(n(23)),a=c(n(17)),u=n(7),s=n(9),l=n(233);function c(e){return e&&e.__esModule?e:{default:e}}t.default=(r={},(0,o.default)(r,l.SHOW_AUTH_POPUP,function(e,t){var n=t.payload;return e.set("showDefinitions",n)}),(0,o.default)(r,l.AUTHORIZE,function(e,t){var n=t.payload,r=(0,u.fromJS)(n),o=e.get("authorized")||(0,u.Map)();return r.entrySeq().forEach(function(e){var t=(0,a.default)(e,2),n=t[0],r=t[1],i=r.getIn(["schema","type"]);if("apiKey"===i||"http"===i)o=o.set(n,r);else if("basic"===i){var u=r.getIn(["value","username"]),l=r.getIn(["value","password"]);o=(o=o.setIn([n,"value"],{username:u,header:"Basic "+(0,s.btoa)(u+":"+l)})).setIn([n,"schema"],r.get("schema"))}}),e.set("authorized",o)}),(0,o.default)(r,l.AUTHORIZE_OAUTH2,function(e,t){var n=t.payload,r=n.auth,o=n.token,a=void 0;return r.token=(0,i.default)({},o),a=(0,u.fromJS)(r),e.setIn(["authorized",a.get("name")],a)}),(0,o.default)(r,l.LOGOUT,function(e,t){var n=t.payload,r=e.get("authorized").withMutations(function(e){n.forEach(function(t){e.delete(t)})});return e.set("authorized",r)}),(0,o.default)(r,l.CONFIGURE_AUTH,function(e,t){var n=t.payload;return e.set("configs",n)}),r)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getConfigs=t.isAuthorized=t.authorized=t.definitionsForRequirements=t.getDefinitionsByNames=t.definitionsToAuthorize=t.shownDefinitions=void 0;var r=u(n(42)),o=u(n(17)),i=n(57),a=n(7);function u(e){return e&&e.__esModule?e:{default:e}}var s=function(e){return e};t.shownDefinitions=(0,i.createSelector)(s,function(e){return e.get("showDefinitions")}),t.definitionsToAuthorize=(0,i.createSelector)(s,function(){return function(e){var t=e.specSelectors.securityDefinitions()||(0,a.Map)({}),n=(0,a.List)();return t.entrySeq().forEach(function(e){var t=(0,o.default)(e,2),r=t[0],i=t[1],u=(0,a.Map)();u=u.set(r,i),n=n.push(u)}),n}}),t.getDefinitionsByNames=function(e,t){return function(e){var n=e.specSelectors;console.warn("WARNING: getDefinitionsByNames is deprecated and will be removed in the next major version.");var r=n.securityDefinitions(),i=(0,a.List)();return t.valueSeq().forEach(function(e){var t=(0,a.Map)();e.entrySeq().forEach(function(e){var n=(0,o.default)(e,2),i=n[0],a=n[1],u=r.get(i),s=void 0;"oauth2"===u.get("type")&&a.size&&((s=u.get("scopes")).keySeq().forEach(function(e){a.contains(e)||(s=s.delete(e))}),u=u.set("allowedScopes",s)),t=t.set(i,u)}),i=i.push(t)}),i}},t.definitionsForRequirements=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,a.List)();return function(e){return(e.authSelectors.definitionsToAuthorize()||(0,a.List)()).filter(function(e){return t.some(function(t){return t.get(e.keySeq().first())})})}},t.authorized=(0,i.createSelector)(s,function(e){return e.get("authorized")||(0,a.Map)()}),t.isAuthorized=function(e,t){return function(e){var n=e.authSelectors.authorized();return a.List.isList(t)?!!t.toJS().filter(function(e){return-1===(0,r.default)(e).map(function(e){return!!n.get(e)}).indexOf(!1)}).length:null}},t.getConfigs=(0,i.createSelector)(s,function(e){return e.get("configs")})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.execute=void 0;var r,o=n(25),i=(r=o)&&r.__esModule?r:{default:r};t.execute=function(e,t){var n=t.authSelectors,r=t.specSelectors;return function(t){var o=t.path,a=t.method,u=t.operation,s=t.extras,l={authorized:n.authorized()&&n.authorized().toJS(),definitions:r.securityDefinitions()&&r.securityDefinitions().toJS(),specSecurity:r.security()&&r.security().toJS()};return e((0,i.default)({path:o,method:a,operation:u,securities:l},s))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{fn:{shallowEqualKeys:r.shallowEqualKeys}}};var r=n(9)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(41)),o=s(n(23));t.default=function(e){var t=e.fn,n={download:function(e){return function(n){var r=n.errActions,i=n.specSelectors,a=n.specActions,s=n.getConfigs,l=t.fetch,c=s();function f(t){if(t instanceof Error||t.status>=400)return a.updateLoadingStatus("failed"),r.newThrownErr((0,o.default)(new Error((t.message||t.statusText)+" "+e),{source:"fetch"})),void(!t.status&&t instanceof Error&&function(){try{var t=void 0;if("URL"in u.default?t=new URL(e):(t=document.createElement("a")).href=e,"https:"!==t.protocol&&"https:"===u.default.location.protocol){var n=(0,o.default)(new Error("Possible mixed-content issue? The page was loaded over https:// but a "+t.protocol+"// URL was specified. Check that you are not attempting to load mixed content."),{source:"fetch"});return void r.newThrownErr(n)}if(t.origin!==u.default.location.origin){var i=(0,o.default)(new Error("Possible cross-origin (CORS) issue? The URL origin ("+t.origin+") does not match the page ("+u.default.location.origin+"). Check the server returns the correct 'Access-Control-Allow-*' headers."),{source:"fetch"});r.newThrownErr(i)}}catch(e){return}}());a.updateLoadingStatus("success"),a.updateSpec(t.text),i.url()!==e&&a.updateUrl(e)}e=e||i.url(),a.updateLoadingStatus("loading"),r.clear({source:"fetch"}),l({url:e,loadSpec:!0,requestInterceptor:c.requestInterceptor||function(e){return e},responseInterceptor:c.responseInterceptor||function(e){return e},credentials:"same-origin",headers:{Accept:"application/json,*/*"}}).then(f,f)}},updateLoadingStatus:function(e){var t=[null,"loading","failed","success","failedConfig"];return-1===t.indexOf(e)&&console.error("Error: "+e+" is not one of "+(0,r.default)(t)),{type:"spec_update_loading_status",payload:e}}},s={loadingStatus:(0,i.createSelector)(function(e){return e||(0,a.Map)()},function(e){return e.get("loadingStatus")||null})};return{statePlugins:{spec:{actions:n,reducers:{spec_update_loading_status:function(e,t){return"string"==typeof t.payload?e.set("loadingStatus",t.payload):e}},selectors:s}}}};var i=n(57),a=n(7),u=s(n(32));function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{statePlugins:{spec:{actions:a,selectors:f},configs:{reducers:s.default,actions:i,selectors:u}}}};var r=c(n(934)),o=n(234),i=l(n(235)),a=l(n(401)),u=l(n(402)),s=c(n(403));function l(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function c(e){return e&&e.__esModule?e:{default:e}}var f={getLocalConfig:function(){return(0,o.parseYamlConfig)(r.default)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getConfigByUrl=t.downloadConfig=void 0;var r=n(234);t.downloadConfig=function(e){return function(t){return(0,t.fn.fetch)(e)}},t.getConfigByUrl=function(e,t){return function(n){var o=n.specActions;if(e)return o.downloadConfig(e).then(i,i);function i(n){n instanceof Error||n.status>=400?(o.updateLoadingStatus("failedConfig"),o.updateLoadingStatus("failedConfig"),o.updateUrl(""),console.error(n.statusText+" "+e.url),t(null)):t((0,r.parseYamlConfig)(n.text))}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.get=function(e,t){return e.getIn(Array.isArray(t)?t:[t])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o,i=n(22),a=(r=i)&&r.__esModule?r:{default:r},u=n(7),s=n(235);t.default=(o={},(0,a.default)(o,s.UPDATE_CONFIGS,function(e,t){return e.merge((0,u.fromJS)(t.payload))}),(0,a.default)(o,s.TOGGLE_CONFIGS,function(e,t){var n=t.payload,r=e.get(n);return e.set(n,!r)}),o)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return[r.default,{statePlugins:{configs:{wrapActions:{loaded:function(e,t){return function(){e.apply(void 0,arguments);var n=decodeURIComponent(window.location.hash);t.layoutActions.parseDeepLinkHash(n)}}}}},wrapComponents:{operation:o.default,OperationTag:i.default}}]};var r=a(n(405)),o=a(n(407)),i=a(n(408));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearScrollTo=t.scrollToElement=t.readyToScroll=t.parseDeepLinkHash=t.scrollTo=t.show=void 0;var r,o=f(n(22)),i=f(n(17)),a=n(406),u=f(n(935)),s=n(9),l=n(7),c=f(l);function f(e){return e&&e.__esModule?e:{default:e}}var p=t.show=function(e,t){var n=t.getConfigs,r=t.layoutSelectors;return function(){for(var t=arguments.length,o=Array(t),u=0;u<t;u++)o[u]=arguments[u];if(e.apply(void 0,o),n().deepLinking)try{var l=o[0],c=o[1];l=Array.isArray(l)?l:[l];var f=r.urlHashArrayFromIsShownKey(l);if(!f.length)return;var p=(0,i.default)(f,2),d=p[0],h=p[1];if(!c)return(0,a.setHash)("/");2===f.length?(0,a.setHash)((0,s.createDeepLinkPath)("/"+encodeURIComponent(d)+"/"+encodeURIComponent(h))):1===f.length&&(0,a.setHash)((0,s.createDeepLinkPath)("/"+encodeURIComponent(d)))}catch(e){console.error(e)}}},d=t.scrollTo=function(e){return{type:"layout_scroll_to",payload:Array.isArray(e)?e:[e]}},h=t.parseDeepLinkHash=function(e){return function(t){var n=t.layoutActions,r=t.layoutSelectors;if((0,t.getConfigs)().deepLinking&&e){var o=e.slice(1);"!"===o[0]&&(o=o.slice(1)),"/"===o[0]&&(o=o.slice(1));var a=o.split("/").map(function(e){return e||""}),u=r.isShownKeyFromUrlHashArray(a),s=(0,i.default)(u,3),l=s[0],c=s[1],f=void 0===c?"":c,p=s[2],d=void 0===p?"":p;if("operations"===l){var h=r.isShownKeyFromUrlHashArray([f]);f.indexOf("_")>-1&&(console.warn("Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead."),n.show(h.map(function(e){return e.replace(/_/g," ")}),!0)),n.show(h,!0)}(f.indexOf("_")>-1||d.indexOf("_")>-1)&&(console.warn("Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead."),n.show(u.map(function(e){return e.replace(/_/g," ")}),!0)),n.show(u,!0),n.scrollTo(u)}}},v=t.readyToScroll=function(e,t){return function(n){var r=n.layoutSelectors.getScrollToKey();c.default.is(r,(0,l.fromJS)(e))&&(n.layoutActions.scrollToElement(t),n.layoutActions.clearScrollTo())}},m=t.scrollToElement=function(e,t){return function(n){try{t=t||n.fn.getScrollParent(e),u.default.createScroller(t).to(e)}catch(e){console.error(e)}}},g=t.clearScrollTo=function(){return{type:"layout_clear_scroll"}};t.default={fn:{getScrollParent:function(e,t){var n=document.documentElement,r=getComputedStyle(e),o="absolute"===r.position,i=t?/(auto|scroll|hidden)/:/(auto|scroll)/;if("fixed"===r.position)return n;for(var a=e;a=a.parentElement;)if(r=getComputedStyle(a),(!o||"static"!==r.position)&&i.test(r.overflow+r.overflowY+r.overflowX))return a;return n}},statePlugins:{layout:{actions:{scrollToElement:m,scrollTo:d,clearScrollTo:g,readyToScroll:v,parseDeepLinkHash:h},selectors:{getScrollToKey:function(e){return e.get("scrollToKey")},isShownKeyFromUrlHashArray:function(e,t){var n=(0,i.default)(t,2),r=n[0],o=n[1];return o?["operations",r,o]:r?["operations-tag",r]:[]},urlHashArrayFromIsShownKey:function(e,t){var n=(0,i.default)(t,3),r=n[0],o=n[1],a=n[2];return"operations"==r?[o,a]:"operations-tag"==r?[o]:[]}},reducers:(r={},(0,o.default)(r,"layout_scroll_to",function(e,t){return e.set("scrollToKey",c.default.fromJS(t.payload))}),(0,o.default)(r,"layout_clear_scroll",function(e){return e.delete("scrollToKey")}),r),wrapActions:{show:p}}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.setHash=function(e){return e?history.pushState(null,null,"#"+e):window.location.hash=""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(2)),i=l(n(3)),a=l(n(5)),u=l(n(6)),s=l(n(0));l(n(12));function l(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){return function(n){function l(){var e,n,i,u;(0,o.default)(this,l);for(var s=arguments.length,c=Array(s),f=0;f<s;f++)c[f]=arguments[f];return n=i=(0,a.default)(this,(e=l.__proto__||(0,r.default)(l)).call.apply(e,[this].concat(c))),i.onLoad=function(e){var n=i.props.operation.toObject(),r=["operations",n.tag,n.operationId];t.layoutActions.readyToScroll(r,e)},u=n,(0,a.default)(i,u)}return(0,u.default)(l,n),(0,i.default)(l,[{key:"render",value:function(){return s.default.createElement("span",{ref:this.onLoad},s.default.createElement(e,this.props))}}]),l}(s.default.Component)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(2)),i=l(n(3)),a=l(n(5)),u=l(n(6)),s=l(n(0));n(1);function l(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){return function(n){function l(){var e,n,i,u;(0,o.default)(this,l);for(var s=arguments.length,c=Array(s),f=0;f<s;f++)c[f]=arguments[f];return n=i=(0,a.default)(this,(e=l.__proto__||(0,r.default)(l)).call.apply(e,[this].concat(c))),i.onLoad=function(e){var n=["operations-tag",i.props.tag];t.layoutActions.readyToScroll(n,e)},u=n,(0,a.default)(i,u)}return(0,u.default)(l,n),(0,i.default)(l,[{key:"render",value:function(){return s.default.createElement("span",{ref:this.onLoad},s.default.createElement(e,this.props))}}]),l}(s.default.Component)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{fn:{opsFilter:i.default}}};var r,o=n(410),i=(r=o)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return e.filter(function(e,n){return-1!==n.indexOf(t)})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{statePlugins:{spec:{wrapActions:{updateSpec:function(e){return function(){return r=!0,e.apply(void 0,arguments)}},updateJsonSpec:function(e,t){return function(){var n=t.getConfigs().onComplete;return r&&"function"==typeof n&&(setTimeout(n,0),r=!1),e.apply(void 0,arguments)}}}}}}};var r=!1},function(e,t){e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwcHgiICBoZWlnaHQ9IjIwMHB4IiAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiIGNsYXNzPSJsZHMtcm9sbGluZyIgc3R5bGU9ImJhY2tncm91bmQtaW1hZ2U6IG5vbmU7IGJhY2tncm91bmQtcG9zaXRpb246IGluaXRpYWwgaW5pdGlhbDsgYmFja2dyb3VuZC1yZXBlYXQ6IGluaXRpYWwgaW5pdGlhbDsiPjxjaXJjbGUgY3g9IjUwIiBjeT0iNTAiIGZpbGw9Im5vbmUiIG5nLWF0dHItc3Ryb2tlPSJ7e2NvbmZpZy5jb2xvcn19IiBuZy1hdHRyLXN0cm9rZS13aWR0aD0ie3tjb25maWcud2lkdGh9fSIgbmctYXR0ci1yPSJ7e2NvbmZpZy5yYWRpdXN9fSIgbmctYXR0ci1zdHJva2UtZGFzaGFycmF5PSJ7e2NvbmZpZy5kYXNoYXJyYXl9fSIgc3Ryb2tlPSIjNTU1NTU1IiBzdHJva2Utd2lkdGg9IjEwIiByPSIzNSIgc3Ryb2tlLWRhc2hhcnJheT0iMTY0LjkzMzYxNDMxMzQ2NDE1IDU2Ljk3Nzg3MTQzNzgyMTM4Ij48YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InJvdGF0ZSIgY2FsY01vZGU9ImxpbmVhciIgdmFsdWVzPSIwIDUwIDUwOzM2MCA1MCA1MCIga2V5VGltZXM9IjA7MSIgZHVyPSIxcyIgYmVnaW49IjBzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSI+PC9hbmltYXRlVHJhbnNmb3JtPjwvY2lyY2xlPjwvc3ZnPgo="},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Collapse=t.Link=t.Select=t.Input=t.TextArea=t.Button=t.Row=t.Col=t.Container=void 0;var r=f(n(25)),o=f(n(84)),i=f(n(4)),a=f(n(2)),u=f(n(3)),s=f(n(5)),l=f(n(6)),c=f(n(0));f(n(1));function f(e){return e&&e.__esModule?e:{default:e}}function p(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(function(e){return!!e}).join(" ").trim()}t.Container=function(e){function t(){return(0,a.default)(this,t),(0,s.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=this.props,t=e.fullscreen,n=e.full,i=(0,o.default)(e,["fullscreen","full"]);if(t)return c.default.createElement("section",i);var a="swagger-container"+(n?"-full":"");return c.default.createElement("section",(0,r.default)({},i,{className:p(i.className,a)}))}}]),t}(c.default.Component);var d={mobile:"",tablet:"-tablet",desktop:"-desktop",large:"-hd"};t.Col=function(e){function t(){return(0,a.default)(this,t),(0,s.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=this.props,t=e.hide,n=e.keepContents,i=(e.mobile,e.tablet,e.desktop,e.large,(0,o.default)(e,["hide","keepContents","mobile","tablet","desktop","large"]));if(t&&!n)return c.default.createElement("span",null);var a=[];for(var u in d)if(d.hasOwnProperty(u)){var s=d[u];if(u in this.props){var l=this.props[u];if(l<1){a.push("none"+s);continue}a.push("block"+s),a.push("col-"+l+s)}}var f=p.apply(void 0,[i.className].concat(a));return c.default.createElement("section",(0,r.default)({},i,{style:{display:t?"none":null},className:f}))}}]),t}(c.default.Component),t.Row=function(e){function t(){return(0,a.default)(this,t),(0,s.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){return c.default.createElement("div",(0,r.default)({},this.props,{className:p(this.props.className,"wrapper")}))}}]),t}(c.default.Component);(t.Button=function(e){function t(){return(0,a.default)(this,t),(0,s.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){return c.default.createElement("button",(0,r.default)({},this.props,{className:p(this.props.className,"button")}))}}]),t}(c.default.Component)).defaultProps={className:""};t.TextArea=function(e){return c.default.createElement("textarea",e)},t.Input=function(e){return c.default.createElement("input",e)};(t.Select=function(e){function t(e,n){(0,a.default)(this,t);var r=(0,s.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e,n));h.call(r);var o=void 0;return o=e.value?e.value:e.multiple?[""]:"",r.state={value:o},r}return(0,l.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=this.props,t=e.allowedValues,n=e.multiple,r=e.allowEmptyValue,o=this.state.value.toJS?this.state.value.toJS():this.state.value;return c.default.createElement("select",{className:this.props.className,multiple:n,value:o,onChange:this.onChange},r?c.default.createElement("option",{value:""},"--"):null,t.map(function(e,t){return c.default.createElement("option",{key:t,value:String(e)},String(e))}))}}]),t}(c.default.Component)).defaultProps={multiple:!1,allowEmptyValue:!0};var h=function(){var e=this;this.onChange=function(t){var n=e.props,r=n.onChange,o=n.multiple,i=[].slice.call(t.target.options),a=void 0;a=o?i.filter(function(e){return e.selected}).map(function(e){return e.value}):t.target.value,e.setState({value:a}),r&&r(a)}},v=(t.Link=function(e){function t(){return(0,a.default)(this,t),(0,s.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){return c.default.createElement("a",(0,r.default)({},this.props,{rel:"noopener noreferrer",className:p(this.props.className,"link")}))}}]),t}(c.default.Component),function(e){var t=e.children;return c.default.createElement("div",{style:{height:"auto",border:"none",margin:0,padding:0}}," ",t," ")});(t.Collapse=function(e){function t(){return(0,a.default)(this,t),(0,s.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,u.default)(t,[{key:"renderNotAnimated",value:function(){return this.props.isOpened?c.default.createElement(v,null,this.props.children):c.default.createElement("noscript",null)}},{key:"render",value:function(){var e=this.props,t=e.animated,n=e.isOpened,r=e.children;return t?(r=n?r:null,c.default.createElement(v,null,r)):this.renderNotAnimated()}}]),t}(c.default.Component)).defaultProps={isOpened:!1,animated:!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(25)),o=d(n(4)),i=d(n(2)),a=d(n(3)),u=d(n(5)),s=d(n(6)),l=d(n(0)),c=d(n(990)),f=d(n(12)),p=d(n(1));function d(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(){var e,n,r,a;(0,i.default)(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=r=(0,u.default)(this,(e=t.__proto__||(0,o.default)(t)).call.apply(e,[this].concat(l))),r.getModelName=function(e){return-1!==e.indexOf("#/definitions/")?e.replace(/^.*#\/definitions\//,""):-1!==e.indexOf("#/components/schemas/")?e.replace("#/components/schemas/",""):void 0},r.getRefSchema=function(e){return r.props.specSelectors.findDefinition(e)},a=n,(0,u.default)(r,a)}return(0,s.default)(t,e),(0,a.default)(t,[{key:"render",value:function(){var e=this.props,t=e.getComponent,o=e.getConfigs,i=e.specSelectors,a=e.schema,u=e.required,s=e.name,c=e.isRef,f=e.specPath,p=e.displayName,d=t("ObjectModel"),h=t("ArrayModel"),v=t("PrimitiveModel"),m="object",g=a&&a.get("$$ref");if(!s&&g&&(s=this.getModelName(g)),!a&&g&&(a=this.getRefSchema(s)),!a)return l.default.createElement("span",{className:"model model-title"},l.default.createElement("span",{className:"model-title__text"},p||s),l.default.createElement("img",{src:n(412),height:"20px",width:"20px",style:{marginLeft:"1em",position:"relative",bottom:"0px"}}));var y=i.isOAS3()&&a.get("deprecated");switch(c=void 0!==c?c:!!g,m=a&&a.get("type")||m){case"object":return l.default.createElement(d,(0,r.default)({className:"object"},this.props,{specPath:f,getConfigs:o,schema:a,name:s,deprecated:y,isRef:c}));case"array":return l.default.createElement(h,(0,r.default)({className:"array"},this.props,{getConfigs:o,schema:a,name:s,deprecated:y,required:u}));case"string":case"number":case"integer":case"boolean":default:return l.default.createElement(v,(0,r.default)({},this.props,{getComponent:t,getConfigs:o,schema:a,name:s,deprecated:y,required:u}))}}}]),t}(c.default);h.propTypes={schema:f.default.orderedMap.isRequired,getComponent:p.default.func.isRequired,getConfigs:p.default.func.isRequired,specSelectors:p.default.object.isRequired,name:p.default.string,displayName:p.default.string,isRef:p.default.bool,required:p.default.bool,expandDepth:p.default.number,depth:p.default.number,specPath:f.default.list.isRequired},t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizer=l;var r=u(n(0)),o=(u(n(1)),u(n(416))),i=u(n(1053)),a=u(n(113));function u(e){return e&&e.__esModule?e:{default:e}}i.default.addHook("beforeSanitizeElements",function(e){return e.href&&e.setAttribute("rel","noopener noreferrer"),e});var s=function(e){return/^[A-Z\s0-9!?\.]+$/gi.test(e)};function l(e){return i.default.sanitize(e,{ADD_ATTR:["target"]})}t.default=function(e){var t=e.source,n=e.className,i=void 0===n?"":n;if(s(t))return r.default.createElement("div",{className:"markdown"},t);var u=new o.default({html:!0,typographer:!0,breaks:!0,linkify:!0,linkTarget:"_blank"}).render(t),c=l(u);return t&&u&&c?r.default.createElement("div",{className:(0,a.default)(i,"markdown"),dangerouslySetInnerHTML:{__html:c}}):null}},function(e,t,n){"use strict";e.exports=n(1002)},function(e,t,n){"use strict";e.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",GT:">",Gt:"≫",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",LT:"<",Lt:"≪",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},function(e,t,n){"use strict";var r=n(419),o=n(27).unescapeMd;e.exports=function(e,t){var n,i,a,u=t,s=e.posMax;if(60===e.src.charCodeAt(t)){for(t++;t<s;){if(10===(n=e.src.charCodeAt(t)))return!1;if(62===n)return a=r(o(e.src.slice(u+1,t))),!!e.parser.validateLink(a)&&(e.pos=t+1,e.linkContent=a,!0);92===n&&t+1<s?t+=2:t++}return!1}for(i=0;t<s&&32!==(n=e.src.charCodeAt(t))&&!(n>8&&n<14);)if(92===n&&t+1<s)t+=2;else{if(40===n&&++i>1)break;if(41===n&&--i<0)break;t++}return u!==t&&(a=o(e.src.slice(u,t)),!!e.parser.validateLink(a)&&(e.linkContent=a,e.pos=t,!0))}},function(e,t,n){"use strict";var r=n(27).replaceEntities;e.exports=function(e){var t=r(e);try{t=decodeURI(t)}catch(e){}return encodeURI(t)}},function(e,t,n){"use strict";var r=n(27).unescapeMd;e.exports=function(e,t){var n,o=t,i=e.posMax,a=e.src.charCodeAt(t);if(34!==a&&39!==a&&40!==a)return!1;for(t++,40===a&&(a=41);t<i;){if((n=e.src.charCodeAt(t))===a)return e.pos=t+1,e.linkContent=r(e.src.slice(o+1,t)),!0;92===n&&t+1<i?t+=2:t++}return!1}},function(e,t,n){"use strict";e.exports=function(e){return e.trim().replace(/\s+/g," ").toUpperCase()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{components:a.default,wrapComponents:u.default,statePlugins:{spec:{wrapSelectors:r,selectors:i},auth:{wrapSelectors:o},oas3:{actions:s,reducers:c.default,selectors:l}}}};var r=p(n(423)),o=p(n(424)),i=p(n(425)),a=f(n(426)),u=f(n(435)),s=p(n(237)),l=p(n(443)),c=f(n(444));function f(e){return e&&e.__esModule?e:{default:e}}function p(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSwagger2=t.isOAS3=t.servers=t.schemes=t.produces=t.consumes=t.basePath=t.host=t.securityDefinitions=t.hasHost=t.definitions=void 0;var r=n(57),o=n(144),i=n(7),a=n(35);function u(e){return function(t,n){return function(){var r=n.getSystem().specSelectors.specJson();return(0,a.isOAS3)(r)?e.apply(void 0,arguments):t.apply(void 0,arguments)}}}var s=function(e){return e||(0,i.Map)()},l=u((0,r.createSelector)(function(){return null})),c=(0,r.createSelector)(s,function(e){return e.get("json",(0,i.Map)())}),f=(0,r.createSelector)(s,function(e){return e.get("resolved",(0,i.Map)())}),p=function(e){var t=f(e);return t.count()<1&&(t=c(e)),t};t.definitions=u((0,r.createSelector)(p,function(e){var t=e.getIn(["components","schemas"]);return i.Map.isMap(t)?t:(0,i.Map)()})),t.hasHost=u(function(e){return p(e).hasIn(["servers",0])}),t.securityDefinitions=u((0,r.createSelector)(o.specJsonWithResolvedSubtrees,function(e){return e.getIn(["components","securitySchemes"])||null})),t.host=l,t.basePath=l,t.consumes=l,t.produces=l,t.schemes=l,t.servers=u((0,r.createSelector)(p,function(e){return e.getIn(["servers"])||(0,i.Map)()})),t.isOAS3=function(e,t){return function(){var e=t.getSystem().specSelectors.specJson();return(0,a.isOAS3)(i.Map.isMap(e)?e:(0,i.Map)())}},t.isSwagger2=function(e,t){return function(){var e=t.getSystem().specSelectors.specJson();return(0,a.isSwagger2)(i.Map.isMap(e)?e:(0,i.Map)())}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.definitionsToAuthorize=void 0;var r=s(n(22)),o=s(n(17)),i=n(57),a=n(7),u=n(35);function s(e){return e&&e.__esModule?e:{default:e}}var l;t.definitionsToAuthorize=(l=(0,i.createSelector)(function(e){return e},function(e){return e.specSelectors.securityDefinitions()},function(e,t){var n=(0,a.List)();return t?(t.entrySeq().forEach(function(e){var t=(0,o.default)(e,2),i=t[0],u=t[1],s=u.get("type");"oauth2"===s&&u.get("flows").entrySeq().forEach(function(e){var t=(0,o.default)(e,2),s=t[0],l=t[1],c=(0,a.fromJS)({flow:s,authorizationUrl:l.get("authorizationUrl"),tokenUrl:l.get("tokenUrl"),scopes:l.get("scopes"),type:u.get("type")});n=n.push(new a.Map((0,r.default)({},i,c.filter(function(e){return void 0!==e}))))}),"http"!==s&&"apiKey"!==s||(n=n.push(new a.Map((0,r.default)({},i,u))))}),n):n}),function(e,t){return function(n){for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];var a=t.getSystem().specSelectors.specJson();return(0,u.isOAS3)(a)?l.apply(void 0,[t].concat(o)):e.apply(void 0,o)}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSwagger2=t.servers=void 0;var r=n(57),o=n(7),i=n(35);var a,u=function(e){return e||(0,o.Map)()},s=(0,r.createSelector)(u,function(e){return e.get("json",(0,o.Map)())}),l=(0,r.createSelector)(u,function(e){return e.get("resolved",(0,o.Map)())});t.servers=(a=(0,r.createSelector)(function(e){var t=l(e);return t.count()<1&&(t=s(e)),t},function(e){return e.getIn(["servers"])||(0,o.Map)()}),function(){return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=e.getSystem().specSelectors.specJson();return(0,i.isOAS3)(o)?a.apply(void 0,n):null}}),t.isSwagger2=function(e,t){return function(){var e=t.getSystem().specSelectors.specJson();return(0,i.isSwagger2)(e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(427)),o=f(n(428)),i=f(n(429)),a=f(n(430)),u=f(n(431)),s=f(n(432)),l=f(n(433)),c=f(n(434));function f(e){return e&&e.__esModule?e:{default:e}}t.default={Callbacks:r.default,HttpAuth:l.default,RequestBody:o.default,Servers:a.default,ServersContainer:u.default,RequestBodyEditor:s.default,OperationServers:c.default,operationLink:i.default}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(25)),o=a(n(0)),i=(a(n(1)),a(n(12)),n(7));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=e.callbacks,n=e.getComponent,a=e.specPath,u=n("OperationContainer",!0);if(!t)return o.default.createElement("span",null,"No callbacks");var s=t.map(function(t,n){return o.default.createElement("div",{key:n},o.default.createElement("h2",null,n),t.map(function(t,s){return"$$ref"===s?null:o.default.createElement("div",{key:s},t.map(function(t,l){if("$$ref"===l)return null;var c=(0,i.fromJS)({operation:t});return o.default.createElement(u,(0,r.default)({},e,{op:c,key:l,tag:"",method:l,path:s,specPath:a.push(n,s,l),allowTryItOut:!1}))}))}))});return o.default.createElement("div",null,s)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(0)),o=(a(n(1)),a(n(12)),n(7)),i=n(9);function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=e.requestBody,n=e.requestBodyValue,a=e.getComponent,u=e.getConfigs,s=e.specSelectors,l=e.fn,c=e.contentType,f=e.isExecute,p=e.specPath,d=e.onChange,h=a("Markdown"),v=a("modelExample"),m=a("RequestBodyEditor"),g=u().showCommonExtensions,y=t&&t.get("description")||null,b=t&&t.get("content")||new o.OrderedMap;c=c||b.keySeq().first();var _=b.get(c);if(!_)return null;var w="object"===_.getIn(["schema","type"]);if("application/octet-stream"===c||0===c.indexOf("image/")||0===c.indexOf("audio/")||0===c.indexOf("video/")){var E=a("Input");return f?r.default.createElement(E,{type:"file",onChange:function(e){d(e.target.files[0])}}):r.default.createElement("i",null,"Example values are not available for ",r.default.createElement("code",null,"application/octet-stream")," media types.")}if(w&&("application/x-www-form-urlencoded"===c||0===c.indexOf("multipart/"))){var x=a("JsonSchemaForm"),S=a("ParameterExt"),C=t.getIn(["content",c,"schema"],(0,o.OrderedMap)()),k=C.getIn(["properties"],(0,o.OrderedMap)());return n=o.Map.isMap(n)?n:(0,o.OrderedMap)(),r.default.createElement("div",{className:"table-container"},y&&r.default.createElement(h,{source:y}),r.default.createElement("table",null,r.default.createElement("tbody",null,k.map(function(e,t){var u=g?(0,i.getCommonExtensions)(e):null,s=C.get("required",(0,o.List)()).includes(t),c=e.get("type"),p=e.get("format"),v=e.get("description"),m=n.get(t),y=e.get("default")||e.get("example")||"";""===y&&"object"===c&&(y=(0,i.getSampleSchema)(e,!1,{includeWriteOnly:!0}));var b="string"===c&&("binary"===p||"base64"===p);return r.default.createElement("tr",{key:t,className:"parameters"},r.default.createElement("td",{className:"col parameters-col_name"},r.default.createElement("div",{className:s?"parameter__name required":"parameter__name"},t,s?r.default.createElement("span",{style:{color:"red"}}," *"):null),r.default.createElement("div",{className:"parameter__type"},c,p&&r.default.createElement("span",{className:"prop-format"},"($",p,")"),g&&u.size?u.map(function(e,t){return r.default.createElement(S,{key:t+"-"+e,xKey:t,xVal:e})}):null),r.default.createElement("div",{className:"parameter__deprecated"},e.get("deprecated")?"deprecated":null)),r.default.createElement("td",{className:"col parameters-col_description"},r.default.createElement(h,{source:v}),f?r.default.createElement("div",null,r.default.createElement(x,{fn:l,dispatchInitialValue:!b,schema:e,description:t,getComponent:a,value:void 0===m?y:m,onChange:function(e){d(e,[t])}})):null))}))))}return r.default.createElement("div",null,y&&r.default.createElement(h,{source:y}),r.default.createElement(v,{getComponent:a,getConfigs:u,specSelectors:s,expandDepth:1,isExecute:f,schema:_.get("schema"),specPath:p.push("content",c),example:r.default.createElement(m,{requestBody:t,onChange:d,mediaType:c,getComponent:a,isExecute:f,specSelectors:s})}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(41)),o=f(n(4)),i=f(n(2)),a=f(n(3)),u=f(n(5)),s=f(n(6)),l=n(0),c=f(l);f(n(1)),f(n(12));function f(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(){return(0,i.default)(this,t),(0,u.default)(this,(t.__proto__||(0,o.default)(t)).apply(this,arguments))}return(0,s.default)(t,e),(0,a.default)(t,[{key:"render",value:function(){var e=this.props,t=e.link,n=e.name,o=(0,e.getComponent)("Markdown"),i=t.get("operationId")||t.get("operationRef"),a=t.get("parameters")&&t.get("parameters").toJS(),u=t.get("description");return c.default.createElement("div",{style:{marginBottom:"1.5em"}},c.default.createElement("div",{style:{marginBottom:".5em"}},c.default.createElement("b",null,c.default.createElement("code",null,n)),u?c.default.createElement(o,{source:u}):null),c.default.createElement("pre",null,"Operation `",i,"`",c.default.createElement("br",null),c.default.createElement("br",null),"Parameters ",function(e,t){if("string"!=typeof t)return"";return t.split("\n").map(function(t,n){return n>0?Array(e+1).join(" ")+t:t}).join("\n")}(0,(0,r.default)(a,null,2))||"{}",c.default.createElement("br",null)))}}]),t}(l.Component);t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(4)),o=c(n(2)),i=c(n(3)),a=c(n(5)),u=c(n(6)),s=c(n(0)),l=n(7);c(n(1)),c(n(12));function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(){var e,n,i,u;(0,o.default)(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=i=(0,a.default)(this,(e=t.__proto__||(0,r.default)(t)).call.apply(e,[this].concat(l))),i.onServerChange=function(e){i.setServer(e.target.value)},i.onServerVariableValueChange=function(e){var t=i.props,n=t.setServerVariableValue,r=t.currentServer,o=e.target.getAttribute("data-variable"),a=e.target.value;"function"==typeof n&&n({server:r,key:o,val:a})},i.setServer=function(e){(0,i.props.setSelectedServer)(e)},u=n,(0,a.default)(i,u)}return(0,u.default)(t,e),(0,i.default)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.servers;e.currentServer||this.setServer(t.first().get("url"))}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.servers,r=t.setServerVariableValue,o=t.getServerVariable;if(this.props.currentServer!==e.currentServer){var i=n.find(function(t){return t.get("url")===e.currentServer});if(!i)return this.setServer(n.first().get("url"));(i.get("variables")||(0,l.OrderedMap)()).map(function(t,n){o(e.currentServer,n)||r({server:e.currentServer,key:n,val:t.get("default")||""})})}}},{key:"render",value:function(){var e=this,t=this.props,n=t.servers,r=t.currentServer,o=t.getServerVariable,i=t.getEffectiveServerValue,a=(n.find(function(e){return e.get("url")===r})||(0,l.OrderedMap)()).get("variables")||(0,l.OrderedMap)(),u=0!==a.size;return s.default.createElement("div",{className:"servers"},s.default.createElement("label",{htmlFor:"servers"},s.default.createElement("select",{onChange:this.onServerChange},n.valueSeq().map(function(e){return s.default.createElement("option",{value:e.get("url"),key:e.get("url")},e.get("url"),e.get("description")&&" - "+e.get("description"))}).toArray())),u?s.default.createElement("div",null,s.default.createElement("div",{className:"computed-url"},"Computed URL:",s.default.createElement("code",null,i(r))),s.default.createElement("h4",null,"Server variables"),s.default.createElement("table",null,s.default.createElement("tbody",null,a.map(function(t,n){return s.default.createElement("tr",{key:n},s.default.createElement("td",null,n),s.default.createElement("td",null,t.get("enum")?s.default.createElement("select",{"data-variable":n,onChange:e.onServerVariableValueChange},t.get("enum").map(function(e){return s.default.createElement("option",{selected:e===o(r,n),key:e,value:e},e)})):s.default.createElement("input",{type:"text",value:o(r,n)||"",onChange:e.onServerVariableValueChange,"data-variable":n})))})))):null)}}]),t}(s.default.Component);t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(2)),i=l(n(3)),a=l(n(5)),u=l(n(6)),s=l(n(0));l(n(1));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.specSelectors,n=e.oas3Selectors,r=e.oas3Actions,o=e.getComponent,i=t.servers(),a=o("Servers");return i&&i.size?s.default.createElement("div",null,s.default.createElement("span",{className:"servers-title"},"Servers"),s.default.createElement(a,{servers:i,currentServer:n.selectedServer(),setSelectedServer:r.setSelectedServer,setServerVariableValue:r.setServerVariableValue,getServerVariable:n.serverVariableValue,getEffectiveServerValue:n.serverEffectiveValue})):null}}]),t}(s.default.Component);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p(n(4)),o=p(n(2)),i=p(n(3)),a=p(n(5)),u=p(n(6)),s=n(0),l=p(s),c=(p(n(1)),n(7)),f=n(9);function p(e){return e&&e.__esModule?e:{default:e}}var d=Function.prototype,h=function(e){function t(e,n){(0,o.default)(this,t);var i=(0,a.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e,n));return i.setValueToSample=function(e){i.onChange(i.sample(e))},i.resetValueToSample=function(e){i.setState({userDidModify:!1}),i.setValueToSample(e)},i.sample=function(e){var t=i.props,n=t.requestBody,r=t.mediaType,o=n.getIn(["content",e||r]),a=o.get("schema").toJS();return(void 0!==o.get("example")?(0,f.stringify)(o.get("example")):null)||(0,f.getSampleSchema)(a,e||r,{includeWriteOnly:!0})},i.onChange=function(e){i.setState({value:e}),i.props.onChange(e)},i.handleOnChange=function(e){var t=i.props.mediaType,n=/json/i.test(t)?e.target.value.trim():e.target.value;i.setState({userDidModify:!0}),i.onChange(n)},i.toggleIsEditBox=function(){return i.setState(function(e){return{isEditBox:!e.isEditBox}})},i.state={isEditBox:!1,userDidModify:!1,value:""},i}return(0,u.default)(t,e),(0,i.default)(t,[{key:"componentDidMount",value:function(){this.setValueToSample.call(this)}},{key:"componentWillReceiveProps",value:function(e){this.props.mediaType!==e.mediaType&&this.setValueToSample(e.mediaType),!this.props.isExecute&&e.isExecute&&this.setState({isEditBox:!0})}},{key:"componentDidUpdate",value:function(e){this.props.requestBody!==e.requestBody&&this.setValueToSample(this.props.mediaType)}},{key:"render",value:function(){var e=this,t=this.props,n=t.isExecute,r=t.getComponent,o=t.mediaType,i=r("Button"),a=r("TextArea"),u=r("highlightCode"),s=this.state,c=s.value,f=s.isEditBox,p=s.userDidModify;return l.default.createElement("div",{className:"body-param"},f&&n?l.default.createElement(a,{className:"body-param__text",value:c,onChange:this.handleOnChange}):c&&l.default.createElement(u,{className:"body-param__example",value:c}),l.default.createElement("div",{className:"body-param-options"},l.default.createElement("div",{className:"body-param-edit"},n?l.default.createElement(i,{className:f?"btn cancel body-param__example-edit":"btn edit body-param__example-edit",onClick:this.toggleIsEditBox},f?"Cancel":"Edit"):null,p&&l.default.createElement(i,{className:"btn ml3",onClick:function(){e.resetValueToSample(o)}},"Reset"))))}}]),t}(s.PureComponent);h.defaultProps={mediaType:"application/json",requestBody:(0,c.fromJS)({}),onChange:d},t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(23)),o=c(n(4)),i=c(n(2)),a=c(n(3)),u=c(n(5)),s=c(n(6)),l=c(n(0));c(n(1));function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e,n){(0,i.default)(this,t);var r=(0,u.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e,n));p.call(r);var a=r.props,s=a.name,l=a.schema,c=r.getValue();return r.state={name:s,schema:l,value:c},r}return(0,s.default)(t,e),(0,a.default)(t,[{key:"getValue",value:function(){var e=this.props,t=e.name,n=e.authorized;return n&&n.getIn([t,"value"])}},{key:"render",value:function(){var e=this.props,t=e.schema,n=e.getComponent,r=e.errSelectors,o=e.name,i=n("Input"),a=n("Row"),u=n("Col"),s=n("authError"),c=n("Markdown"),f=n("JumpToPath",!0),p=(t.get("scheme")||"").toLowerCase(),d=this.getValue(),h=r.allErrors().filter(function(e){return e.get("authId")===o});if("basic"===p){var v=d?d.get("username"):null;return l.default.createElement("div",null,l.default.createElement("h4",null,l.default.createElement("code",null,o||t.get("name")),"  (http, Basic)",l.default.createElement(f,{path:["securityDefinitions",o]})),v&&l.default.createElement("h6",null,"Authorized"),l.default.createElement(a,null,l.default.createElement(c,{source:t.get("description")})),l.default.createElement(a,null,l.default.createElement("label",null,"Username:"),v?l.default.createElement("code",null," ",v," "):l.default.createElement(u,null,l.default.createElement(i,{type:"text",required:"required",name:"username",onChange:this.onChange}))),l.default.createElement(a,null,l.default.createElement("label",null,"Password:"),v?l.default.createElement("code",null," ****** "):l.default.createElement(u,null,l.default.createElement(i,{required:"required",autoComplete:"new-password",name:"password",type:"password",onChange:this.onChange}))),h.valueSeq().map(function(e,t){return l.default.createElement(s,{error:e,key:t})}))}return"bearer"===p?l.default.createElement("div",null,l.default.createElement("h4",null,l.default.createElement("code",null,o||t.get("name")),"  (http, Bearer)",l.default.createElement(f,{path:["securityDefinitions",o]})),d&&l.default.createElement("h6",null,"Authorized"),l.default.createElement(a,null,l.default.createElement(c,{source:t.get("description")})),l.default.createElement(a,null,l.default.createElement("label",null,"Value:"),d?l.default.createElement("code",null," ****** "):l.default.createElement(u,null,l.default.createElement(i,{type:"text",onChange:this.onChange}))),h.valueSeq().map(function(e,t){return l.default.createElement(s,{error:e,key:t})})):l.default.createElement("div",null,l.default.createElement("em",null,l.default.createElement("b",null,o)," HTTP authentication: unsupported scheme ","'"+p+"'"))}}]),t}(l.default.Component),p=function(){var e=this;this.onChange=function(t){var n=e.props.onChange,o=t.target,i=o.value,a=o.name,u=(0,r.default)({},e.state.value);a?u[a]=i:u=i,e.setState({value:u},function(){return n(e.state)})}};t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(25)),o=c(n(4)),i=c(n(2)),a=c(n(3)),u=c(n(5)),s=c(n(6)),l=c(n(0));c(n(1)),c(n(12));function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(){var e,n,a,s;(0,i.default)(this,t);for(var l=arguments.length,c=Array(l),f=0;f<l;f++)c[f]=arguments[f];return n=a=(0,u.default)(this,(e=t.__proto__||(0,o.default)(t)).call.apply(e,[this].concat(c))),a.setSelectedServer=function(e){var t=a.props,n=t.path,r=t.method;return a.forceUpdate(),a.props.setSelectedServer(e,n+":"+r)},a.setServerVariableValue=function(e){var t=a.props,n=t.path,o=t.method;return a.forceUpdate(),a.props.setServerVariableValue((0,r.default)({},e,{namespace:n+":"+o}))},a.getSelectedServer=function(){var e=a.props,t=e.path,n=e.method;return a.props.getSelectedServer(t+":"+n)},a.getServerVariable=function(e,t){var n=a.props,r=n.path,o=n.method;return a.props.getServerVariable({namespace:r+":"+o,server:e},t)},a.getEffectiveServerValue=function(e){var t=a.props,n=t.path,r=t.method;return a.props.getEffectiveServerValue({server:e,namespace:n+":"+r})},s=n,(0,u.default)(a,s)}return(0,s.default)(t,e),(0,a.default)(t,[{key:"render",value:function(){var e=this.props,t=e.operationServers,n=e.pathServers,r=e.getComponent;if(!t&&!n)return null;var o=r("Servers"),i=t||n,a=t?"operation":"path";return l.default.createElement("div",{className:"opblock-section operation-servers"},l.default.createElement("div",{className:"opblock-section-header"},l.default.createElement("div",{className:"tab-header"},l.default.createElement("h4",{className:"opblock-title"},"Servers"))),l.default.createElement("div",{className:"opblock-description-wrapper"},l.default.createElement("h4",{className:"message"},"These ",a,"-level options override the global server options."),l.default.createElement(o,{servers:i,currentServer:this.getSelectedServer(),setSelectedServer:this.setSelectedServer,setServerVariableValue:this.setServerVariableValue,getServerVariable:this.getServerVariable,getEffectiveServerValue:this.getEffectiveServerValue})))}}]),t}(l.default.Component);t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(436)),o=c(n(437)),i=c(n(438)),a=c(n(439)),u=c(n(440)),s=c(n(441)),l=c(n(442));function c(e){return e&&e.__esModule?e:{default:e}}t.default={Markdown:r.default,AuthItem:o.default,parameters:i.default,JsonSchema_string:l.default,VersionStamp:a.default,model:s.default,onlineValidatorBadge:u.default}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Markdown=void 0;var r=s(n(0)),o=(s(n(1)),s(n(113))),i=s(n(416)),a=n(35),u=n(415);function s(e){return e&&e.__esModule?e:{default:e}}var l=new i.default("commonmark");l.set({linkTarget:"_blank"});var c=t.Markdown=function(e){var t=e.source,n=e.className,i=void 0===n?"":n;if(t){var a=l.render(t),s=(0,u.sanitizer)(a),c=void 0;return"string"==typeof s&&(c=s.trim()),r.default.createElement("div",{dangerouslySetInnerHTML:{__html:c},className:(0,o.default)(i,"renderedMarkdown")})}return null};t.default=(0,a.OAS3ComponentWrapFactory)(c)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(84)),o=a(n(0)),i=n(35);function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.OAS3ComponentWrapFactory)(function(e){var t=e.Ori,n=(0,r.default)(e,["Ori"]),i=n.schema,a=n.getComponent,u=n.errSelectors,s=n.authorized,l=n.onAuthChange,c=n.name,f=a("HttpAuth");return"http"===i.get("type")?o.default.createElement(f,{key:c,schema:i,name:c,errSelectors:u,authorized:s,getComponent:a,onChange:l}):o.default.createElement(t,n)})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=h(n(83)),o=h(n(4)),i=h(n(2)),a=h(n(3)),u=h(n(5)),s=h(n(6)),l=n(0),c=h(l),f=(h(n(1)),n(7)),p=h(f),d=(h(n(12)),n(35));function h(e){return e&&e.__esModule?e:{default:e}}var v=function(e){function t(e){(0,i.default)(this,t);var n=(0,u.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.onChange=function(e,t,r){var o=n.props;(0,o.specActions.changeParamByIdentity)(o.onChangeKey,e,t,r)},n.onChangeConsumesWrapper=function(e){var t=n.props;(0,t.specActions.changeConsumesValue)(t.onChangeKey,e)},n.toggleTab=function(e){return"parameters"===e?n.setState({parametersVisible:!0,callbackVisible:!1}):"callbacks"===e?n.setState({callbackVisible:!0,parametersVisible:!1}):void 0},n.state={callbackVisible:!1,parametersVisible:!0},n}return(0,s.default)(t,e),(0,a.default)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.onTryoutClick,o=t.onCancelClick,i=t.parameters,a=t.allowTryItOut,u=t.tryItOutEnabled,s=t.fn,l=t.getComponent,d=t.getConfigs,h=t.specSelectors,v=t.specActions,m=t.oas3Actions,g=t.oas3Selectors,y=t.pathMethod,b=t.specPath,_=t.operation,w=l("parameterRow"),E=l("TryItOutButton"),x=l("contentType"),S=l("Callbacks",!0),C=l("RequestBody",!0),k=u&&a,A=h.isOAS3,O=_.get("requestBody"),P=b.slice(0,-1).push("requestBody");return c.default.createElement("div",{className:"opblock-section"},c.default.createElement("div",{className:"opblock-section-header"},c.default.createElement("div",{className:"tab-header"},c.default.createElement("div",{onClick:function(){return e.toggleTab("parameters")},className:"tab-item "+(this.state.parametersVisible&&"active")},c.default.createElement("h4",{className:"opblock-title"},c.default.createElement("span",null,"Parameters"))),_.get("callbacks")?c.default.createElement("div",{onClick:function(){return e.toggleTab("callbacks")},className:"tab-item "+(this.state.callbackVisible&&"active")},c.default.createElement("h4",{className:"opblock-title"},c.default.createElement("span",null,"Callbacks"))):null),a?c.default.createElement(E,{enabled:u,onCancelClick:o,onTryoutClick:n}):null),this.state.parametersVisible?c.default.createElement("div",{className:"parameters-container"},i.count()?c.default.createElement("div",{className:"table-container"},c.default.createElement("table",{className:"parameters"},c.default.createElement("thead",null,c.default.createElement("tr",null,c.default.createElement("th",{className:"col col_header parameters-col_name"},"Name"),c.default.createElement("th",{className:"col col_header parameters-col_description"},"Description"))),c.default.createElement("tbody",null,function(e,t){return e.valueSeq().filter(p.default.Map.isMap).map(t)}(i,function(t,n){return c.default.createElement(w,{fn:s,getComponent:l,specPath:b.push(n),getConfigs:d,rawParam:t,param:h.parameterWithMetaByIdentity(y,t),key:t.get("name"),onChange:e.onChange,onChangeConsumes:e.onChangeConsumesWrapper,specSelectors:h,specActions:v,pathMethod:y,isExecute:k})}).toArray()))):c.default.createElement("div",{className:"opblock-description-wrapper"},c.default.createElement("p",null,"No parameters"))):"",this.state.callbackVisible?c.default.createElement("div",{className:"callbacks-container opblock-description-wrapper"},c.default.createElement(S,{callbacks:(0,f.Map)(_.get("callbacks")),specPath:b.slice(0,-1).push("callbacks")})):"",A()&&O&&this.state.parametersVisible&&c.default.createElement("div",{className:"opblock-section"},c.default.createElement("div",{className:"opblock-section-header"},c.default.createElement("h4",{className:"opblock-title parameter__name "+(O.get("required")&&"required")},"Request body"),c.default.createElement("label",null,c.default.createElement(x,{value:g.requestContentType.apply(g,(0,r.default)(y)),contentTypes:O.get("content",(0,f.List)()).keySeq(),onChange:function(e){m.setRequestContentType({value:e,pathMethod:y})},className:"body-param-content-type"}))),c.default.createElement("div",{className:"opblock-description-wrapper"},c.default.createElement(C,{specPath:P,requestBody:O,requestBodyValue:g.requestBodyValue.apply(g,(0,r.default)(y))||(0,f.Map)(),isExecute:k,onChange:function(e,t){if(t){var n=g.requestBodyValue.apply(g,(0,r.default)(y)),o=f.Map.isMap(n)?n:(0,f.Map)();return m.setRequestBodyValue({pathMethod:y,value:o.setIn(t,e)})}m.setRequestBodyValue({value:e,pathMethod:y})},contentType:g.requestContentType.apply(g,(0,r.default)(y))}))))}}]),t}(l.Component);v.defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,tryItOutEnabled:!1,allowTryItOut:!0,onChangeKey:[]},t.default=(0,d.OAS3ComponentWrapFactory)(v)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r},a=n(35);t.default=(0,a.OAS3ComponentWrapFactory)(function(e){var t=e.Ori;return i.default.createElement("span",null,i.default.createElement(t,e),i.default.createElement("small",{style:{backgroundColor:"#89bf04"}},i.default.createElement("pre",{className:"version"},"OAS3")))})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(35);t.default=(0,r.OAS3ComponentWrapFactory)(function(){return null})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(25)),o=d(n(4)),i=d(n(2)),a=d(n(3)),u=d(n(5)),s=d(n(6)),l=n(0),c=d(l),f=(d(n(1)),n(35)),p=n(414);function d(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(){return(0,i.default)(this,t),(0,u.default)(this,(t.__proto__||(0,o.default)(t)).apply(this,arguments))}return(0,s.default)(t,e),(0,a.default)(t,[{key:"render",value:function(){var e=this.props,t=e.getConfigs,n=["model-box"],o=null;return!0===e.schema.get("deprecated")&&(n.push("deprecated"),o=c.default.createElement("span",{className:"model-deprecated-warning"},"Deprecated:")),c.default.createElement("div",{className:n.join(" ")},o,c.default.createElement(p.Model,(0,r.default)({},this.props,{getConfigs:t,depth:1,expandDepth:this.props.expandDepth||0})))}}]),t}(l.Component);t.default=(0,f.OAS3ComponentWrapFactory)(h)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(84)),o=a(n(0)),i=n(35);function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.OAS3ComponentWrapFactory)(function(e){var t=e.Ori,n=(0,r.default)(e,["Ori"]),i=n.schema,a=n.getComponent,u=n.errors,s=n.onChange,l=i.type,c=i.format,f=a("Input");return"string"!==l||"binary"!==c&&"base64"!==c?o.default.createElement(t,n):o.default.createElement(f,{type:"file",className:u.length?"invalid":"",title:u.length?u:"",onChange:function(e){s(e.target.files[0])},disabled:t.isDisabled})})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serverEffectiveValue=t.serverVariables=t.serverVariableValue=t.responseContentType=t.requestContentType=t.requestBodyValue=t.selectedServer=void 0;var r=n(7),o=n(35);function i(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(t){var r=t.getSystem().specSelectors.specJson();return(0,o.isOAS3)(r)?e.apply(void 0,n):null}}}t.selectedServer=i(function(e,t){var n=t?[t,"selectedServer"]:["selectedServer"];return e.getIn(n)||""}),t.requestBodyValue=i(function(e,t,n){return e.getIn(["requestData",t,n,"bodyValue"])||null}),t.requestContentType=i(function(e,t,n){return e.getIn(["requestData",t,n,"requestContentType"])||null}),t.responseContentType=i(function(e,t,n){return e.getIn(["requestData",t,n,"responseContentType"])||null}),t.serverVariableValue=i(function(e,t,n){var r=void 0;if("string"!=typeof t){var o=t.server,i=t.namespace;r=i?[i,"serverVariableValues",o,n]:["serverVariableValues",o,n]}else{r=["serverVariableValues",t,n]}return e.getIn(r)||null}),t.serverVariables=i(function(e,t){var n=void 0;if("string"!=typeof t){var o=t.server,i=t.namespace;n=i?[i,"serverVariableValues",o]:["serverVariableValues",o]}else{n=["serverVariableValues",t]}return e.getIn(n)||(0,r.OrderedMap)()}),t.serverEffectiveValue=i(function(e,t){var n,o;if("string"!=typeof t){var i=t.server,a=t.namespace;o=i,n=a?e.getIn([a,"serverVariableValues",o]):e.getIn(["serverVariableValues",o])}else o=t,n=e.getIn(["serverVariableValues",o]);var u=o;return(n=n||(0,r.OrderedMap)()).map(function(e,t){u=u.replace(new RegExp("{"+t+"}","g"),e)}),u})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=u(n(22)),i=u(n(17)),a=n(237);function u(e){return e&&e.__esModule?e:{default:e}}t.default=(r={},(0,o.default)(r,a.UPDATE_SELECTED_SERVER,function(e,t){var n=t.payload,r=n.selectedServerUrl,o=n.namespace,i=o?[o,"selectedServer"]:["selectedServer"];return e.setIn(i,r)}),(0,o.default)(r,a.UPDATE_REQUEST_BODY_VALUE,function(e,t){var n=t.payload,r=n.value,o=n.pathMethod,a=(0,i.default)(o,2),u=a[0],s=a[1];return e.setIn(["requestData",u,s,"bodyValue"],r)}),(0,o.default)(r,a.UPDATE_REQUEST_CONTENT_TYPE,function(e,t){var n=t.payload,r=n.value,o=n.pathMethod,a=(0,i.default)(o,2),u=a[0],s=a[1];return e.setIn(["requestData",u,s,"requestContentType"],r)}),(0,o.default)(r,a.UPDATE_RESPONSE_CONTENT_TYPE,function(e,t){var n=t.payload,r=n.value,o=n.path,i=n.method;return e.setIn(["requestData",o,i,"responseContentType"],r)}),(0,o.default)(r,a.UPDATE_SERVER_VARIABLE_VALUE,function(e,t){var n=t.payload,r=n.server,o=n.namespace,i=n.key,a=n.val,u=o?[o,"serverVariableValues",r,i]:["serverVariableValues",r,i];return e.setIn(u,a)}),r)},function(e,t,n){"use strict";var r=n(9),o=n(1059);o.keys().forEach(function(t){if("./index.js"!==t){var n=o(t);e.exports[(0,r.pascalCaseFilename)(t)]=n.default?n.default:n}})},function(e,t,n){n(447),e.exports=n(516)},function(e,t,n){"use strict";var r,o=n(32);void 0===((r=o)&&r.__esModule?r:{default:r}).default.Promise&&n(458),String.prototype.startsWith||n(487)},function(e,t,n){n(92),n(98),e.exports=n(457)},function(e,t,n){"use strict";var r=n(450),o=n(451),i=n(70),a=n(71);e.exports=n(238)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var r=n(160),o=n(95),i=n(97),a={};n(50)(a,n(19)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var r=n(40),o=n(36),i=n(96);e.exports=n(44)?Object.defineProperties:function(e,t){o(e);for(var n,a=i(t),u=a.length,s=0;u>s;)r.f(e,n=a[s++],t[n]);return e}},function(e,t,n){var r=n(71),o=n(115),i=n(455);e.exports=function(e){return function(t,n,a){var u,s=r(t),l=o(s.length),c=i(a,l);if(e&&n!=n){for(;l>c;)if((u=s[c++])!=u)return!0}else for(;l>c;c++)if((e||c in s)&&s[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){var r=n(161),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},function(e,t,n){var r=n(161),o=n(156);e.exports=function(e){return function(t,n){var i,a,u=String(o(t)),s=r(n),l=u.length;return s<0||s>=l?e?"":void 0:(i=u.charCodeAt(s))<55296||i>56319||s+1===l||(a=u.charCodeAt(s+1))<56320||a>57343?e?u.charAt(s):i:e?u.slice(s,s+2):a-56320+(i-55296<<10)+65536}}},function(e,t,n){var r=n(36),o=n(165);e.exports=n(15).getIterator=function(e){var t=o(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},function(e,t,n){n(459),n(245),n(470),n(474),n(485),n(486),e.exports=n(60).Promise},function(e,t,n){"use strict";var r=n(167),o={};o[n(18)("toStringTag")]="z",o+""!="[object z]"&&n(73)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(e,t,n){e.exports=!n(100)&&!n(101)(function(){return 7!=Object.defineProperty(n(169)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(74);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){"use strict";var r=n(463),o=n(244),i=n(171),a={};n(58)(a,n(18)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var r=n(59),o=n(464),i=n(251),a=n(170)("IE_PROTO"),u=function(){},s=function(){var e,t=n(169)("iframe"),r=i.length;for(t.style.display="none",n(252).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),s=e.F;r--;)delete s.prototype[i[r]];return s()};e.exports=Object.create||function(e,t){var n;return null!==e?(u.prototype=r(e),n=new u,u.prototype=null,n[a]=e):n=s(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(117),o=n(59),i=n(249);e.exports=n(100)?Object.defineProperties:function(e,t){o(e);for(var n,a=i(t),u=a.length,s=0;u>s;)r.f(e,n=a[s++],t[n]);return e}},function(e,t,n){var r=n(118),o=n(122),i=n(467)(!1),a=n(170)("IE_PROTO");e.exports=function(e,t){var n,u=o(e),s=0,l=[];for(n in u)n!=a&&r(u,n)&&l.push(n);for(;t.length>s;)r(u,n=t[s++])&&(~i(l,n)||l.push(n));return l}},function(e,t,n){var r=n(99);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(122),o=n(103),i=n(250);e.exports=function(e){return function(t,n,a){var u,s=r(t),l=o(s.length),c=i(a,l);if(e&&n!=n){for(;l>c;)if((u=s[c++])!=u)return!0}else for(;l>c;c++)if((e||c in s)&&s[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){var r=n(118),o=n(469),i=n(170)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var r=n(53);e.exports=function(e){return Object(r(e))}},function(e,t,n){for(var r=n(471),o=n(249),i=n(73),a=n(33),u=n(58),s=n(102),l=n(18),c=l("iterator"),f=l("toStringTag"),p=s.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=o(d),v=0;v<h.length;v++){var m,g=h[v],y=d[g],b=a[g],_=b&&b.prototype;if(_&&(_[c]||u(_,c,p),_[f]||u(_,f,g),s[g]=p,y))for(m in r)_[m]||i(_,m,r[m],!0)}},function(e,t,n){"use strict";var r=n(472),o=n(473),i=n(102),a=n(122);e.exports=n(247)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t,n){var r=n(18)("unscopables"),o=Array.prototype;void 0==o[r]&&n(58)(o,r,{}),e.exports=function(e){o[r][e]=!0}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var r,o,i,a,u=n(248),s=n(33),l=n(120),c=n(167),f=n(29),p=n(74),d=n(121),h=n(475),v=n(476),m=n(253),g=n(254).set,y=n(481)(),b=n(172),_=n(255),w=n(256),E=s.TypeError,x=s.process,S=s.Promise,C="process"==c(x),k=function(){},A=o=b.f,O=!!function(){try{var e=S.resolve(1),t=(e.constructor={})[n(18)("species")]=function(e){e(k,k)};return(C||"function"==typeof PromiseRejectionEvent)&&e.then(k)instanceof t}catch(e){}}(),P=function(e){var t;return!(!p(e)||"function"!=typeof(t=e.then))&&t},T=function(e,t){if(!e._n){e._n=!0;var n=e._c;y(function(){for(var r=e._v,o=1==e._s,i=0,a=function(t){var n,i,a,u=o?t.ok:t.fail,s=t.resolve,l=t.reject,c=t.domain;try{u?(o||(2==e._h&&j(e),e._h=1),!0===u?n=r:(c&&c.enter(),n=u(r),c&&(c.exit(),a=!0)),n===t.promise?l(E("Promise-chain cycle")):(i=P(n))?i.call(n,s,l):s(n)):l(r)}catch(e){c&&!a&&c.exit(),l(e)}};n.length>i;)a(n[i++]);e._c=[],e._n=!1,t&&!e._h&&M(e)})}},M=function(e){g.call(s,function(){var t,n,r,o=e._v,i=I(e);if(i&&(t=_(function(){C?x.emit("unhandledRejection",o,e):(n=s.onunhandledrejection)?n({promise:e,reason:o}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",o)}),e._h=C||I(e)?2:1),e._a=void 0,i&&t.e)throw t.v})},I=function(e){return 1!==e._h&&0===(e._a||e._c).length},j=function(e){g.call(s,function(){var t;C?x.emit("rejectionHandled",e):(t=s.onrejectionhandled)&&t({promise:e,reason:e._v})})},N=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),T(t,!0))},R=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw E("Promise can't be resolved itself");(t=P(e))?y(function(){var r={_w:n,_d:!1};try{t.call(e,l(R,r,1),l(N,r,1))}catch(e){N.call(r,e)}}):(n._v=e,n._s=1,T(n,!1))}catch(e){N.call({_w:n,_d:!1},e)}}};O||(S=function(e){h(this,S,"Promise","_h"),d(e),r.call(this);try{e(l(R,this,1),l(N,this,1))}catch(e){N.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(482)(S.prototype,{then:function(e,t){var n=A(m(this,S));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=C?x.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&T(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r;this.promise=e,this.resolve=l(R,e,1),this.reject=l(N,e,1)},b.f=A=function(e){return e===S||e===a?new i(e):o(e)}),f(f.G+f.W+f.F*!O,{Promise:S}),n(171)(S,"Promise"),n(483)("Promise"),a=n(60).Promise,f(f.S+f.F*!O,"Promise",{reject:function(e){var t=A(this);return(0,t.reject)(e),t.promise}}),f(f.S+f.F*(u||!O),"Promise",{resolve:function(e){return w(u&&this===a?S:this,e)}}),f(f.S+f.F*!(O&&n(484)(function(e){S.all(e).catch(k)})),"Promise",{all:function(e){var t=this,n=A(t),r=n.resolve,o=n.reject,i=_(function(){var n=[],i=0,a=1;v(e,!1,function(e){var u=i++,s=!1;n.push(void 0),a++,t.resolve(e).then(function(e){s||(s=!0,n[u]=e,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(e){var t=this,n=A(t),r=n.reject,o=_(function(){v(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(120),o=n(477),i=n(478),a=n(59),u=n(103),s=n(479),l={},c={};(t=e.exports=function(e,t,n,f,p){var d,h,v,m,g=p?function(){return e}:s(e),y=r(n,f,t?2:1),b=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(i(g)){for(d=u(e.length);d>b;b++)if((m=t?y(a(h=e[b])[0],h[1]):y(e[b]))===l||m===c)return m}else for(v=g.call(e);!(h=v.next()).done;)if((m=o(v,y,h.value,t))===l||m===c)return m}).BREAK=l,t.RETURN=c},function(e,t,n){var r=n(59);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},function(e,t,n){var r=n(102),o=n(18)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},function(e,t,n){var r=n(167),o=n(18)("iterator"),i=n(102);e.exports=n(60).getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(33),o=n(254).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,u=r.Promise,s="process"==n(99)(a);e.exports=function(){var e,t,n,l=function(){var r,o;for(s&&(r=a.domain)&&r.exit();e;){o=e.fn,e=e.next;try{o()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(s)n=function(){a.nextTick(l)};else if(!i||r.navigator&&r.navigator.standalone)if(u&&u.resolve){var c=u.resolve();n=function(){c.then(l)}}else n=function(){o.call(r,l)};else{var f=!0,p=document.createTextNode("");new i(l).observe(p,{characterData:!0}),n=function(){p.data=f=!f}}return function(r){var o={fn:r,next:void 0};t&&(t.next=o),e||(e=o,n()),t=o}}},function(e,t,n){var r=n(73);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},function(e,t,n){"use strict";var r=n(33),o=n(117),i=n(100),a=n(18)("species");e.exports=function(e){var t=r[e];i&&t&&!t[a]&&o.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(18)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},e(i)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(29),o=n(60),i=n(33),a=n(253),u=n(256);r(r.P+r.R,"Promise",{finally:function(e){var t=a(this,o.Promise||i.Promise),n="function"==typeof e;return this.then(n?function(n){return u(t,e()).then(function(){return n})}:e,n?function(n){return u(t,e()).then(function(){throw n})}:e)}})},function(e,t,n){"use strict";var r=n(29),o=n(172),i=n(255);r(r.S,"Promise",{try:function(e){var t=o.f(this),n=i(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},function(e,t,n){n(488),n(489),n(490),n(245),n(493),n(494),n(495),n(496),n(498),n(499),n(500),n(501),n(502),n(503),n(504),n(505),n(506),n(507),n(508),n(509),n(510),n(511),n(512),n(513),n(514),n(515),e.exports=n(60).String},function(e,t,n){var r=n(29),o=n(250),i=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],o(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(29),o=n(122),i=n(103);r(r.S,"String",{raw:function(e){for(var t=o(e.raw),n=i(t.length),r=arguments.length,a=[],u=0;n>u;)a.push(String(t[u++])),u<r&&a.push(String(arguments[u]));return a.join("")}})},function(e,t,n){"use strict";n(491)("trim",function(e){return function(){return e(this,3)}})},function(e,t,n){var r=n(29),o=n(53),i=n(101),a=n(492),u="["+a+"]",s=RegExp("^"+u+u+"*"),l=RegExp(u+u+"*$"),c=function(e,t,n){var o={},u=i(function(){return!!a[e]()||"​…"!="​…"[e]()}),s=o[e]=u?t(f):a[e];n&&(o[n]=s),r(r.P+r.F*u,"String",o)},f=c.trim=function(e,t){return e=String(o(e)),1&t&&(e=e.replace(s,"")),2&t&&(e=e.replace(l,"")),e};e.exports=c},function(e,t){e.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(e,t,n){"use strict";var r=n(29),o=n(246)(!1);r(r.P,"String",{codePointAt:function(e){return o(this,e)}})},function(e,t,n){"use strict";var r=n(29),o=n(103),i=n(173),a="".endsWith;r(r.P+r.F*n(174)("endsWith"),"String",{endsWith:function(e){var t=i(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=o(t.length),u=void 0===n?r:Math.min(o(n),r),s=String(e);return a?a.call(t,s,u):t.slice(u-s.length,u)===s}})},function(e,t,n){"use strict";var r=n(29),o=n(173);r(r.P+r.F*n(174)("includes"),"String",{includes:function(e){return!!~o(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(29);r(r.P,"String",{repeat:n(497)})},function(e,t,n){"use strict";var r=n(119),o=n(53);e.exports=function(e){var t=String(o(this)),n="",i=r(e);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n}},function(e,t,n){"use strict";var r=n(29),o=n(103),i=n(173),a="".startsWith;r(r.P+r.F*n(174)("startsWith"),"String",{startsWith:function(e){var t=i(this,e,"startsWith"),n=o(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return a?a.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(30)("anchor",function(e){return function(t){return e(this,"a","name",t)}})},function(e,t,n){"use strict";n(30)("big",function(e){return function(){return e(this,"big","","")}})},function(e,t,n){"use strict";n(30)("blink",function(e){return function(){return e(this,"blink","","")}})},function(e,t,n){"use strict";n(30)("bold",function(e){return function(){return e(this,"b","","")}})},function(e,t,n){"use strict";n(30)("fixed",function(e){return function(){return e(this,"tt","","")}})},function(e,t,n){"use strict";n(30)("fontcolor",function(e){return function(t){return e(this,"font","color",t)}})},function(e,t,n){"use strict";n(30)("fontsize",function(e){return function(t){return e(this,"font","size",t)}})},function(e,t,n){"use strict";n(30)("italics",function(e){return function(){return e(this,"i","","")}})},function(e,t,n){"use strict";n(30)("link",function(e){return function(t){return e(this,"a","href",t)}})},function(e,t,n){"use strict";n(30)("small",function(e){return function(){return e(this,"small","","")}})},function(e,t,n){"use strict";n(30)("strike",function(e){return function(){return e(this,"strike","","")}})},function(e,t,n){"use strict";n(30)("sub",function(e){return function(){return e(this,"sub","","")}})},function(e,t,n){"use strict";n(30)("sup",function(e){return function(){return e(this,"sup","","")}})},function(e,t,n){n(123)("match",1,function(e,t,n){return[function(n){"use strict";var r=e(this),o=void 0==n?void 0:n[t];return void 0!==o?o.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){n(123)("replace",2,function(e,t,n){return[function(r,o){"use strict";var i=e(this),a=void 0==r?void 0:r[t];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},n]})},function(e,t,n){n(123)("search",1,function(e,t,n){return[function(n){"use strict";var r=e(this),o=void 0==n?void 0:n[t];return void 0!==o?o.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){n(123)("split",2,function(e,t,r){"use strict";var o=n(257),i=r,a=[].push;if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length){var u=void 0===/()??/.exec("")[1];r=function(e,t){var n=String(this);if(void 0===e&&0===t)return[];if(!o(e))return i.call(n,e,t);var r,s,l,c,f,p=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),h=0,v=void 0===t?4294967295:t>>>0,m=new RegExp(e.source,d+"g");for(u||(r=new RegExp("^"+m.source+"$(?!\\s)",d));(s=m.exec(n))&&!((l=s.index+s[0].length)>h&&(p.push(n.slice(h,s.index)),!u&&s.length>1&&s[0].replace(r,function(){for(f=1;f<arguments.length-2;f++)void 0===arguments[f]&&(s[f]=void 0)}),s.length>1&&s.index<n.length&&a.apply(p,s.slice(1)),c=s[0].length,h=l,p.length>=v));)m.lastIndex===s.index&&m.lastIndex++;return h===n.length?!c&&m.test("")||p.push(""):p.push(n.slice(h)),p.length>v?p.slice(0,v):p}}else"0".split(void 0,0).length&&(r=function(e,t){return void 0===e&&0===t?[]:i.call(this,e,t)});return[function(n,o){var i=e(this),a=void 0==n?void 0:n[t];return void 0!==a?a.call(n,i,o):r.call(String(i),n,o)},r]})},function(e,t,n){"use strict";var r=p(n(41)),o=p(n(42)),i=p(n(45)),a=p(n(179)),u=p(n(531)),s=p(n(32)),l=p(n(725)),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(445)),f=n(9);function p(e){return e&&e.__esModule?e:{default:e}}var d=!0,h="g315819b2",v="3.20.5",m="jenins-swagger-oss",g="Sat, 12 Jan 2019 07:08:24 GMT";e.exports=function(e){s.default.versions=s.default.versions||{},s.default.versions.swaggerUi={version:v,gitRevision:h,gitDirty:d,buildTimestamp:g,machine:m};var t={dom_id:null,domNode:null,spec:{},url:"",urls:null,layout:"BaseLayout",docExpansion:"list",maxDisplayedTags:null,filter:null,validatorUrl:"https://online.swagger.io/validator",oauth2RedirectUrl:window.location.protocol+"//"+window.location.host+"/oauth2-redirect.html",configs:{},custom:{},displayOperationId:!1,displayRequestDuration:!1,deepLinking:!1,requestInterceptor:function(e){return e},responseInterceptor:function(e){return e},showMutatedRequest:!0,defaultModelRendering:"example",defaultModelExpandDepth:1,defaultModelsExpandDepth:1,showExtensions:!1,showCommonExtensions:!1,supportedSubmitMethods:["get","put","post","delete","options","head","patch","trace"],presets:[l.default],plugins:[],initialState:{},fn:{},components:{}},n=(0,f.parseSearch)(),c=e.domNode;delete e.domNode;var p=(0,a.default)({},t,e,n),y={system:{configs:p.configs},plugins:p.presets,state:(0,a.default)({layout:{layout:p.layout,filter:p.filter},spec:{spec:"",url:p.url}},p.initialState)};if(p.initialState)for(var b in p.initialState)p.initialState.hasOwnProperty(b)&&void 0===p.initialState[b]&&delete y.state[b];var _=new u.default(y);_.register([p.plugins,function(){return{fn:p.fn,components:p.components,state:p.state}}]);var w=_.getSystem(),E=function(e){var t=w.specSelectors.getLocalConfig?w.specSelectors.getLocalConfig():{},u=(0,a.default)({},t,p,e||{},n);if(c&&(u.domNode=c),_.setConfigs(u),w.configsActions.loaded(),null!==e&&(!n.url&&"object"===(0,i.default)(u.spec)&&(0,o.default)(u.spec).length?(w.specActions.updateUrl(""),w.specActions.updateLoadingStatus("success"),w.specActions.updateSpec((0,r.default)(u.spec))):w.specActions.download&&u.url&&(w.specActions.updateUrl(u.url),w.specActions.download(u.url))),u.domNode)w.render(u.domNode,"App");else if(u.dom_id){var s=document.querySelector(u.dom_id);w.render(s,"App")}else null===u.dom_id||null===u.domNode||console.error("Skipped rendering: no `dom_id` or `domNode` was specified");return w},x=n.config||p.configUrl;return x&&w.specActions&&w.specActions.getConfigByUrl&&(!w.specActions.getConfigByUrl||w.specActions.getConfigByUrl({url:x,loadRemoteConfig:!0,requestInterceptor:p.requestInterceptor,responseInterceptor:p.responseInterceptor},E))?(w.specActions.getConfigByUrl(x,E),w):E()},e.exports.presets={apis:l.default},e.exports.plugins=c},function(e,t,n){var r=n(15),o=r.JSON||(r.JSON={stringify:JSON.stringify});e.exports=function(e){return o.stringify.apply(o,arguments)}},function(e,t,n){n(519),e.exports=n(15).Object.keys},function(e,t,n){var r=n(72),o=n(96);n(258)("keys",function(){return function(e){return o(r(e))}})},function(e,t,n){e.exports={default:n(521),__esModule:!0}},function(e,t,n){n(98),n(92),e.exports=n(175).f("iterator")},function(e,t,n){e.exports={default:n(523),__esModule:!0}},function(e,t,n){n(524),n(178),n(527),n(528),e.exports=n(15).Symbol},function(e,t,n){"use strict";var r=n(21),o=n(52),i=n(44),a=n(20),u=n(159),s=n(124).KEY,l=n(51),c=n(163),f=n(97),p=n(116),d=n(19),h=n(175),v=n(176),m=n(525),g=n(259),y=n(36),b=n(28),_=n(71),w=n(158),E=n(95),x=n(160),S=n(526),C=n(261),k=n(40),A=n(96),O=C.f,P=k.f,T=S.f,M=r.Symbol,I=r.JSON,j=I&&I.stringify,N=d("_hidden"),R=d("toPrimitive"),D={}.propertyIsEnumerable,L=c("symbol-registry"),U=c("symbols"),q=c("op-symbols"),F=Object.prototype,z="function"==typeof M,B=r.QObject,V=!B||!B.prototype||!B.prototype.findChild,H=i&&l(function(){return 7!=x(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=O(F,t);r&&delete F[t],P(e,t,n),r&&e!==F&&P(F,t,r)}:P,W=function(e){var t=U[e]=x(M.prototype);return t._k=e,t},J=z&&"symbol"==typeof M.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof M},Y=function(e,t,n){return e===F&&Y(q,t,n),y(e),t=w(t,!0),y(n),o(U,t)?(n.enumerable?(o(e,N)&&e[N][t]&&(e[N][t]=!1),n=x(n,{enumerable:E(0,!1)})):(o(e,N)||P(e,N,E(1,{})),e[N][t]=!0),H(e,t,n)):P(e,t,n)},K=function(e,t){y(e);for(var n,r=m(t=_(t)),o=0,i=r.length;i>o;)Y(e,n=r[o++],t[n]);return e},G=function(e){var t=D.call(this,e=w(e,!0));return!(this===F&&o(U,e)&&!o(q,e))&&(!(t||!o(this,e)||!o(U,e)||o(this,N)&&this[N][e])||t)},$=function(e,t){if(e=_(e),t=w(t,!0),e!==F||!o(U,t)||o(q,t)){var n=O(e,t);return!n||!o(U,t)||o(e,N)&&e[N][t]||(n.enumerable=!0),n}},Z=function(e){for(var t,n=T(_(e)),r=[],i=0;n.length>i;)o(U,t=n[i++])||t==N||t==s||r.push(t);return r},X=function(e){for(var t,n=e===F,r=T(n?q:_(e)),i=[],a=0;r.length>a;)!o(U,t=r[a++])||n&&!o(F,t)||i.push(U[t]);return i};z||(u((M=function(){if(this instanceof M)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(n){this===F&&t.call(q,n),o(this,N)&&o(this[N],e)&&(this[N][e]=!1),H(this,e,E(1,n))};return i&&V&&H(F,e,{configurable:!0,set:t}),W(e)}).prototype,"toString",function(){return this._k}),C.f=$,k.f=Y,n(260).f=S.f=Z,n(125).f=G,n(177).f=X,i&&!n(114)&&u(F,"propertyIsEnumerable",G,!0),h.f=function(e){return W(d(e))}),a(a.G+a.W+a.F*!z,{Symbol:M});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Q.length>ee;)d(Q[ee++]);for(var te=A(d.store),ne=0;te.length>ne;)v(te[ne++]);a(a.S+a.F*!z,"Symbol",{for:function(e){return o(L,e+="")?L[e]:L[e]=M(e)},keyFor:function(e){if(!J(e))throw TypeError(e+" is not a symbol!");for(var t in L)if(L[t]===e)return t},useSetter:function(){V=!0},useSimple:function(){V=!1}}),a(a.S+a.F*!z,"Object",{create:function(e,t){return void 0===t?x(e):K(x(e),t)},defineProperty:Y,defineProperties:K,getOwnPropertyDescriptor:$,getOwnPropertyNames:Z,getOwnPropertySymbols:X}),I&&a(a.S+a.F*(!z||l(function(){var e=M();return"[null]"!=j([e])||"{}"!=j({a:e})||"{}"!=j(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(b(t)||void 0!==e)&&!J(e))return g(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!J(t))return t}),r[1]=t,j.apply(I,r)}}),M.prototype[R]||n(50)(M.prototype,R,M.prototype.valueOf),f(M,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(e,t,n){var r=n(96),o=n(177),i=n(125);e.exports=function(e){var t=r(e),n=o.f;if(n)for(var a,u=n(e),s=i.f,l=0;u.length>l;)s.call(e,a=u[l++])&&t.push(a);return t}},function(e,t,n){var r=n(71),o=n(260).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?function(e){try{return o(e)}catch(e){return a.slice()}}(e):o(r(e))}},function(e,t,n){n(176)("asyncIterator")},function(e,t,n){n(176)("observable")},function(e,t,n){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){for(var t,n=l(e),r=n[0],a=n[1],u=new i(function(e,t,n){return 3*(t+n)/4-n}(0,r,a)),s=0,c=a>0?r-4:r,f=0;f<c;f+=4)t=o[e.charCodeAt(f)]<<18|o[e.charCodeAt(f+1)]<<12|o[e.charCodeAt(f+2)]<<6|o[e.charCodeAt(f+3)],u[s++]=t>>16&255,u[s++]=t>>8&255,u[s++]=255&t;2===a&&(t=o[e.charCodeAt(f)]<<2|o[e.charCodeAt(f+1)]>>4,u[s++]=255&t);1===a&&(t=o[e.charCodeAt(f)]<<10|o[e.charCodeAt(f+1)]<<4|o[e.charCodeAt(f+2)]>>2,u[s++]=t>>8&255,u[s++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,u=n-o;a<u;a+=16383)i.push(c(e,a,a+16383>u?u:a+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,s=a.length;u<s;++u)r[u]=a[u],o[a.charCodeAt(u)]=u;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var o,i,a=[],u=t;u<n;u+=3)o=(e[u]<<16&16711680)+(e[u+1]<<8&65280)+(255&e[u+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,a,u=8*o-r-1,s=(1<<u)-1,l=s>>1,c=-7,f=n?o-1:0,p=n?-1:1,d=e[t+f];for(f+=p,i=d&(1<<-c)-1,d>>=-c,c+=u;c>0;i=256*i+e[t+f],f+=p,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=r;c>0;a=256*a+e[t+f],f+=p,c-=8);if(0===i)i=1-l;else{if(i===s)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),i-=l}return(d?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,u,s,l=8*i-o-1,c=(1<<l)-1,f=c>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,h=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-a))<1&&(a--,s*=2),(t+=a+f>=1?p/s:p*Math.pow(2,1-f))*s>=2&&(a++,s/=2),a+f>=c?(u=0,a=c):a+f>=1?(u=(t*s-1)*Math.pow(2,o),a+=f):(u=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+d]=255&u,d+=h,u/=256,o-=8);for(a=a<<o|u,l+=o;l>0;e[n+d]=255&a,d+=h,a/=256,l-=8);e[n+d-h]|=128*v}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=b(n(42)),o=b(n(22)),i=b(n(23)),a=b(n(2)),u=b(n(3)),s=b(n(0)),l=n(271),c=n(7),f=b(c),p=b(n(179)),d=n(564),h=b(n(180)),v=b(n(181)),m=n(127),g=b(n(32)),y=n(9);function b(e){return e&&e.__esModule?e:{default:e}}var _=function(e){return e};var w=function(){function e(){var t,n,r,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.default)(this,e),(0,p.default)(this,{state:{},plugins:[],system:{configs:{},fn:{},components:{},rootInjects:{},statePlugins:{}},boundSystem:{},toolbox:{}},o),this.getSystem=this._getSystem.bind(this),this.store=(t=_,n=(0,c.fromJS)(this.state),r=this.getSystem,function(e,t,n){var r=[(0,y.systemThunkMiddleware)(n)],o=g.default.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||l.compose;return(0,l.createStore)(e,t,o(l.applyMiddleware.apply(void 0,r)))}(t,n,r)),this.buildSystem(!1),this.register(this.plugins)}return(0,u.default)(e,[{key:"getStore",value:function(){return this.store}},{key:"register",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=function e(t,n){if((0,y.isObject)(t)&&!(0,y.isArray)(t))return(0,v.default)({},t);if((0,y.isFunc)(t))return e(t(n),n);if((0,y.isArray)(t))return t.map(function(t){return e(t,n)}).reduce(E,{});return{}}(e,this.getSystem());E(this.system,n),t&&this.buildSystem(),function e(t,n){var r=this;var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.hasLoaded;var a=i;(0,y.isObject)(t)&&!(0,y.isArray)(t)&&"function"==typeof t.afterLoad&&(a=!0,x(t.afterLoad).call(this,n));if((0,y.isFunc)(t))return e.call(this,t(n),n,{hasLoaded:a});if((0,y.isArray)(t))return t.map(function(t){return e.call(r,t,n,{hasLoaded:a})});return a}.call(this.system,e,this.getSystem())&&this.buildSystem()}},{key:"buildSystem",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.getStore().dispatch,n=this.getStore().getState;this.boundSystem=(0,i.default)({},this.getRootInjects(),this.getWrappedAndBoundActions(t),this.getWrappedAndBoundSelectors(n,this.getSystem),this.getStateThunks(n),this.getFn(),this.getConfigs()),e&&this.rebuildReducer()}},{key:"_getSystem",value:function(){return this.boundSystem}},{key:"getRootInjects",value:function(){return(0,i.default)({getSystem:this.getSystem,getStore:this.getStore.bind(this),getComponents:this.getComponents.bind(this),getState:this.getStore().getState,getConfigs:this._getConfigs.bind(this),Im:f.default,React:s.default},this.system.rootInjects||{})}},{key:"_getConfigs",value:function(){return this.system.configs}},{key:"getConfigs",value:function(){return{configs:this.system.configs}}},{key:"setConfigs",value:function(e){this.system.configs=e}},{key:"rebuildReducer",value:function(){var e,t,n;this.store.replaceReducer((n=this.system.statePlugins,e=(0,y.objMap)(n,function(e){return e.reducers}),t=(0,r.default)(e).reduce(function(t,n){var r;return t[n]=(r=e[n],function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new c.Map,t=arguments[1];if(!r)return e;var n=r[t.type];if(n){var o=x(n)(e,t);return null===o?e:o}return e}),t},{}),(0,r.default)(t).length?(0,d.combineReducers)(t):_))}},{key:"getType",value:function(e){var t=e[0].toUpperCase()+e.slice(1);return(0,y.objReduce)(this.system.statePlugins,function(n,r){var i=n[e];if(i)return(0,o.default)({},r+t,i)})}},{key:"getSelectors",value:function(){return this.getType("selectors")}},{key:"getActions",value:function(){var e=this.getType("actions");return(0,y.objMap)(e,function(e){return(0,y.objReduce)(e,function(e,t){if((0,y.isFn)(e))return(0,o.default)({},t,e)})})}},{key:"getWrappedAndBoundActions",value:function(e){var t=this,n=this.getBoundActions(e);return(0,y.objMap)(n,function(e,n){var r=t.system.statePlugins[n.slice(0,-7)].wrapActions;return r?(0,y.objMap)(e,function(e,n){var o=r[n];return o?(Array.isArray(o)||(o=[o]),o.reduce(function(e,n){var r=function(){return n(e,t.getSystem()).apply(void 0,arguments)};if(!(0,y.isFn)(r))throw new TypeError("wrapActions needs to return a function that returns a new function (ie the wrapped action)");return x(r)},e||Function.prototype)):e}):e})}},{key:"getWrappedAndBoundSelectors",value:function(e,t){var n=this,r=this.getBoundSelectors(e,t);return(0,y.objMap)(r,function(t,r){var o=[r.slice(0,-9)],i=n.system.statePlugins[o].wrapSelectors;return i?(0,y.objMap)(t,function(t,r){var a=i[r];return a?(Array.isArray(a)||(a=[a]),a.reduce(function(t,r){var i=function(){for(var i=arguments.length,a=Array(i),u=0;u<i;u++)a[u]=arguments[u];return r(t,n.getSystem()).apply(void 0,[e().getIn(o)].concat(a))};if(!(0,y.isFn)(i))throw new TypeError("wrapSelector needs to return a function that returns a new function (ie the wrapped action)");return i},t||Function.prototype)):t}):t})}},{key:"getStates",value:function(e){return(0,r.default)(this.system.statePlugins).reduce(function(t,n){return t[n]=e.get(n),t},{})}},{key:"getStateThunks",value:function(e){return(0,r.default)(this.system.statePlugins).reduce(function(t,n){return t[n]=function(){return e().get(n)},t},{})}},{key:"getFn",value:function(){return{fn:this.system.fn}}},{key:"getComponents",value:function(e){var t=this,n=this.system.components[e];return Array.isArray(n)?n.reduce(function(e,n){return n(e,t.getSystem())}):void 0!==e?this.system.components[e]:this.system.components}},{key:"getBoundSelectors",value:function(e,t){return(0,y.objMap)(this.getSelectors(),function(n,r){var o=[r.slice(0,-9)];return(0,y.objMap)(n,function(n){return function(){for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];var u=x(n).apply(null,[e().getIn(o)].concat(i));return"function"==typeof u&&(u=x(u)(t())),u}})})}},{key:"getBoundActions",value:function(e){e=e||this.getStore().dispatch;var t=this.getActions();return(0,y.objMap)(t,function(t){return(0,l.bindActionCreators)(function e(t){return"function"!=typeof t?(0,y.objMap)(t,function(t){return e(t)}):function(){var e=null;try{e=t.apply(void 0,arguments)}catch(t){e={type:m.NEW_THROWN_ERR,error:!0,payload:(0,h.default)(t)}}finally{return e}}}(t),e)})}},{key:"getMapStateToProps",value:function(){var e=this;return function(){return(0,i.default)({},e.getSystem())}}},{key:"getMapDispatchToProps",value:function(e){var t=this;return function(n){return(0,p.default)({},t.getWrappedAndBoundActions(n),t.getFn(),e)}}}]),e}();function E(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,y.isObject)(e))return{};if(!(0,y.isObject)(t))return e;t.wrapComponents&&((0,y.objMap)(t.wrapComponents,function(n,r){var o=e.components&&e.components[r];o&&Array.isArray(o)?(e.components[r]=o.concat([n]),delete t.wrapComponents[r]):o&&(e.components[r]=[o,n],delete t.wrapComponents[r])}),(0,r.default)(t.wrapComponents).length||delete t.wrapComponents);var n=e.statePlugins;if((0,y.isObject)(n))for(var o in n){var i=n[o];if((0,y.isObject)(i)&&(0,y.isObject)(i.wrapActions)){var a=i.wrapActions;for(var u in a){var s=a[u];Array.isArray(s)||(s=[s],a[u]=s),t&&t.statePlugins&&t.statePlugins[o]&&t.statePlugins[o].wrapActions&&t.statePlugins[o].wrapActions[u]&&(t.statePlugins[o].wrapActions[u]=a[u].concat(t.statePlugins[o].wrapActions[u]))}}}return(0,p.default)(e,t)}function x(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).logErrors,n=void 0===t||t;return"function"!=typeof e?e:function(){try{for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return e.call.apply(e,[this].concat(r))}catch(e){return n&&console.error(e),null}}}t.default=w},function(e,t,n){n(533);var r=n(15).Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},function(e,t,n){var r=n(20);r(r.S+r.F*!n(44),"Object",{defineProperty:n(40).f})},function(e,t,n){n(535),e.exports=n(15).Object.assign},function(e,t,n){var r=n(20);r(r.S+r.F,"Object",{assign:n(264)})},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";var r=n(538),o=n(76),i=n(34),a=n(539),u=r.twoArgumentPooler,s=r.fourArgumentPooler,l=/\/+/g;function c(e){return(""+e).replace(l,"$&/")}function f(e,t){this.func=e,this.context=t,this.count=0}function p(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function d(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function h(e,t,n){var r=e.result,a=e.keyPrefix,u=e.func,s=e.context,l=u.call(s,t,e.count++);Array.isArray(l)?v(l,r,n,i.thatReturnsArgument):null!=l&&(o.isValidElement(l)&&(l=o.cloneAndReplaceKey(l,a+(!l.key||t&&t.key===l.key?"":c(l.key)+"/")+n)),r.push(l))}function v(e,t,n,r,o){var i="";null!=n&&(i=c(n)+"/");var u=d.getPooled(t,i,r,o);a(e,h,u),d.release(u)}function m(e,t,n){return null}f.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},r.addPoolingTo(f,u),d.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},r.addPoolingTo(d,s);var g={forEach:function(e,t,n){if(null==e)return e;var r=f.getPooled(t,n);a(e,p,r),f.release(r)},map:function(e,t,n){if(null==e)return e;var r=[];return v(e,r,null,t,n),r},mapIntoWithKeyPrefixInternal:v,count:function(e,t){return a(e,m,null)},toArray:function(e){var t=[];return v(e,t,null,i.thatReturnsArgument),t}};e.exports=g},function(e,t,n){"use strict";var r=n(104),o=(n(8),function(e){if(this.instancePool.length){var t=this.instancePool.pop();return this.call(t,e),t}return new this(e)}),i=function(e){e instanceof this||r("25"),e.destructor(),this.instancePool.length<this.poolSize&&this.instancePool.push(e)},a=o,u={addPoolingTo:function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||a,n.poolSize||(n.poolSize=10),n.release=i,n},oneArgumentPooler:o,twoArgumentPooler:function(e,t){if(this.instancePool.length){var n=this.instancePool.pop();return this.call(n,e,t),n}return new this(e,t)},threeArgumentPooler:function(e,t,n){if(this.instancePool.length){var r=this.instancePool.pop();return this.call(r,e,t,n),r}return new this(e,t,n)},fourArgumentPooler:function(e,t,n,r){if(this.instancePool.length){var o=this.instancePool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)}};e.exports=u},function(e,t,n){"use strict";var r=n(104),o=(n(46),n(268)),i=n(540),a=(n(8),n(541)),u=(n(10),"."),s=":";function l(e,t){return e&&"object"==typeof e&&null!=e.key?a.escape(e.key):t.toString(36)}e.exports=function(e,t,n){return null==e?0:function e(t,n,c,f){var p,d=typeof t;if("undefined"!==d&&"boolean"!==d||(t=null),null===t||"string"===d||"number"===d||"object"===d&&t.$$typeof===o)return c(f,t,""===n?u+l(t,0):n),1;var h=0,v=""===n?u:n+s;if(Array.isArray(t))for(var m=0;m<t.length;m++)h+=e(p=t[m],v+l(p,m),c,f);else{var g=i(t);if(g){var y,b=g.call(t);if(g!==t.entries)for(var _=0;!(y=b.next()).done;)h+=e(p=y.value,v+l(p,_++),c,f);else for(;!(y=b.next()).done;){var w=y.value;w&&(h+=e(p=w[1],v+a.escape(w[0])+s+l(p,0),c,f))}}else if("object"===d){var E="",x=String(t);r("31","[object Object]"===x?"object with keys {"+Object.keys(t).join(", ")+"}":x,E)}}return h}(e,"",t,n)}},function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";e.exports=function(e){var t=e&&(r&&e[r]||e[o]);if("function"==typeof t)return t}},function(e,t,n){"use strict";var r={escape:function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})},unescape:function(e){var t={"=0":"=","=2":":"};return(""+("."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1))).replace(/(=0|=2)/g,function(e){return t[e]})}};e.exports=r},function(e,t,n){"use strict";var r=n(76).createFactory,o={a:r("a"),abbr:r("abbr"),address:r("address"),area:r("area"),article:r("article"),aside:r("aside"),audio:r("audio"),b:r("b"),base:r("base"),bdi:r("bdi"),bdo:r("bdo"),big:r("big"),blockquote:r("blockquote"),body:r("body"),br:r("br"),button:r("button"),canvas:r("canvas"),caption:r("caption"),cite:r("cite"),code:r("code"),col:r("col"),colgroup:r("colgroup"),data:r("data"),datalist:r("datalist"),dd:r("dd"),del:r("del"),details:r("details"),dfn:r("dfn"),dialog:r("dialog"),div:r("div"),dl:r("dl"),dt:r("dt"),em:r("em"),embed:r("embed"),fieldset:r("fieldset"),figcaption:r("figcaption"),figure:r("figure"),footer:r("footer"),form:r("form"),h1:r("h1"),h2:r("h2"),h3:r("h3"),h4:r("h4"),h5:r("h5"),h6:r("h6"),head:r("head"),header:r("header"),hgroup:r("hgroup"),hr:r("hr"),html:r("html"),i:r("i"),iframe:r("iframe"),img:r("img"),input:r("input"),ins:r("ins"),kbd:r("kbd"),keygen:r("keygen"),label:r("label"),legend:r("legend"),li:r("li"),link:r("link"),main:r("main"),map:r("map"),mark:r("mark"),menu:r("menu"),menuitem:r("menuitem"),meta:r("meta"),meter:r("meter"),nav:r("nav"),noscript:r("noscript"),object:r("object"),ol:r("ol"),optgroup:r("optgroup"),option:r("option"),output:r("output"),p:r("p"),param:r("param"),picture:r("picture"),pre:r("pre"),progress:r("progress"),q:r("q"),rp:r("rp"),rt:r("rt"),ruby:r("ruby"),s:r("s"),samp:r("samp"),script:r("script"),section:r("section"),select:r("select"),small:r("small"),source:r("source"),span:r("span"),strong:r("strong"),style:r("style"),sub:r("sub"),summary:r("summary"),sup:r("sup"),table:r("table"),tbody:r("tbody"),td:r("td"),textarea:r("textarea"),tfoot:r("tfoot"),th:r("th"),thead:r("thead"),time:r("time"),title:r("title"),tr:r("tr"),track:r("track"),u:r("u"),ul:r("ul"),var:r("var"),video:r("video"),wbr:r("wbr"),circle:r("circle"),clipPath:r("clipPath"),defs:r("defs"),ellipse:r("ellipse"),g:r("g"),image:r("image"),line:r("line"),linearGradient:r("linearGradient"),mask:r("mask"),path:r("path"),pattern:r("pattern"),polygon:r("polygon"),polyline:r("polyline"),radialGradient:r("radialGradient"),rect:r("rect"),stop:r("stop"),svg:r("svg"),text:r("text"),tspan:r("tspan")};e.exports=o},function(e,t,n){"use strict";var r=n(76).isValidElement,o=n(269);e.exports=o(r)},function(e,t,n){"use strict";var r=n(34),o=n(8),i=n(10),a=n(13),u=n(270),s=n(545);e.exports=function(e,t){var n="function"==typeof Symbol&&Symbol.iterator,l="@@iterator";var c="<<anonymous>>",f={array:v("array"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:h(r.thatReturnsNull),arrayOf:function(e){return h(function(t,n,r,o,i){if("function"!=typeof e)return new d("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a)){var s=g(a);return new d("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+r+"`, expected an array.")}for(var l=0;l<a.length;l++){var c=e(a,l,r,o,i+"["+l+"]",u);if(c instanceof Error)return c}return null})},element:function(){return h(function(t,n,r,o,i){var a=t[n];if(!e(a)){var u=g(a);return new d("Invalid "+o+" `"+i+"` of type `"+u+"` supplied to `"+r+"`, expected a single ReactElement.")}return null})}(),instanceOf:function(e){return h(function(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||c,u=function(e){if(!e.constructor||!e.constructor.name)return c;return e.constructor.name}(t[n]);return new d("Invalid "+o+" `"+i+"` of type `"+u+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}return null})},node:function(){return h(function(e,t,n,r,o){if(!m(e[t]))return new d("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.");return null})}(),objectOf:function(e){return h(function(t,n,r,o,i){if("function"!=typeof e)return new d("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=t[n],s=g(a);if("object"!==s)return new d("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+r+"`, expected an object.");for(var l in a)if(a.hasOwnProperty(l)){var c=e(a,l,r,o,i+"."+l,u);if(c instanceof Error)return c}return null})},oneOf:function(e){if(!Array.isArray(e))return r.thatReturnsNull;return h(function(t,n,r,o,i){for(var a=t[n],u=0;u<e.length;u++)if(p(a,e[u]))return null;var s=JSON.stringify(e);return new d("Invalid "+o+" `"+i+"` of value `"+a+"` supplied to `"+r+"`, expected one of "+s+".")})},oneOfType:function(e){if(!Array.isArray(e))return r.thatReturnsNull;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return i(!1,"Invalid argument supplied to oneOfType. Expected an array of check functions, but received %s at index %s.",b(n),t),r.thatReturnsNull}return h(function(t,n,r,o,i){for(var a=0;a<e.length;a++){var s=e[a];if(null==s(t,n,r,o,i,u))return null}return new d("Invalid "+o+" `"+i+"` supplied to `"+r+"`.")})},shape:function(e){return h(function(t,n,r,o,i){var a=t[n],s=g(a);if("object"!==s)return new d("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+r+"`, expected `object`.");for(var l in e){var c=e[l];if(c){var f=c(a,l,r,o,i+"."+l,u);if(f)return f}}return null})},exact:function(e){return h(function(t,n,r,o,i){var s=t[n],l=g(s);if("object"!==l)return new d("Invalid "+o+" `"+i+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");var c=a({},t[n],e);for(var f in c){var p=e[f];if(!p)return new d("Invalid "+o+" `"+i+"` key `"+f+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var h=p(s,f,r,o,i+"."+f,u);if(h)return h}return null})}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function d(e){this.message=e,this.stack=""}function h(e){function n(n,r,i,a,s,l,f){(a=a||c,l=l||i,f!==u)&&(t&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"));return null==r[i]?n?null===r[i]?new d("The "+s+" `"+l+"` is marked as required in `"+a+"`, but its value is `null`."):new d("The "+s+" `"+l+"` is marked as required in `"+a+"`, but its value is `undefined`."):null:e(r,i,a,s,l)}var r=n.bind(null,!1);return r.isRequired=n.bind(null,!0),r}function v(e){return h(function(t,n,r,o,i,a){var u=t[n];return g(u)!==e?new d("Invalid "+o+" `"+i+"` of type `"+y(u)+"` supplied to `"+r+"`, expected `"+e+"`."):null})}function m(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(m);if(null===t||e(t))return!0;var r=function(e){var t=e&&(n&&e[n]||e[l]);if("function"==typeof t)return t}(t);if(!r)return!1;var o,i=r.call(t);if(r!==t.entries){for(;!(o=i.next()).done;)if(!m(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!m(a[1]))return!1}return!0;default:return!1}}function g(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||"Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol}(t,e)?"symbol":t}function y(e){if(void 0===e||null===e)return""+e;var t=g(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function b(e){var t=y(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return d.prototype=Error.prototype,f.checkPropTypes=s,f.PropTypes=f,f}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o){}},function(e,t,n){"use strict";e.exports="15.6.2"},function(e,t,n){"use strict";var r=n(265).Component,o=n(76).isValidElement,i=n(266),a=n(548);e.exports=a(r,o,i)},function(e,t,n){"use strict";var r=n(13),o=n(126),i=n(8),a="mixins";e.exports=function(e,t,n){var u=[],s={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},l={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},c={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)p(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=r({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=r({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=h(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=r({},e.propTypes,t)},statics:function(e,t){!function(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in c;i(!o,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n);var a=n in e;if(a){var u=l.hasOwnProperty(n)?l[n]:null;return i("DEFINE_MANY_MERGED"===u,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),void(e[n]=h(e[n],r))}e[n]=r}}}(e,t)},autobind:function(){}};function f(e,t){var n=s.hasOwnProperty(t)?s[t]:null;b.hasOwnProperty(t)&&i("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&i("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function p(e,n){if(n){i("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),i(!t(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=e.prototype,o=r.__reactAutoBindPairs;for(var u in n.hasOwnProperty(a)&&c.mixins(e,n.mixins),n)if(n.hasOwnProperty(u)&&u!==a){var l=n[u],p=r.hasOwnProperty(u);if(f(p,u),c.hasOwnProperty(u))c[u](e,l);else{var d=s.hasOwnProperty(u);if("function"!=typeof l||d||p||!1===n.autobind)if(p){var m=s[u];i(d&&("DEFINE_MANY_MERGED"===m||"DEFINE_MANY"===m),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",m,u),"DEFINE_MANY_MERGED"===m?r[u]=h(r[u],l):"DEFINE_MANY"===m&&(r[u]=v(r[u],l))}else r[u]=l;else o.push(u,l),r[u]=l}}}}function d(e,t){for(var n in i(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects."),t)t.hasOwnProperty(n)&&(i(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function h(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return d(o,n),d(o,r),o}}function v(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function m(e,t){var n=t.bind(e);return n}var g={componentDidMount:function(){this.__isMounted=!0}},y={componentWillUnmount:function(){this.__isMounted=!1}},b={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return!!this.__isMounted}},_=function(){};return r(_.prototype,e.prototype,b),function(e){var t=function(e,r,a){this.__reactAutoBindPairs.length&&function(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],o=t[n+1];e[r]=m(e,o)}}(this),this.props=e,this.context=r,this.refs=o,this.updater=a||n,this.state=null;var u=this.getInitialState?this.getInitialState():null;i("object"==typeof u&&!Array.isArray(u),"%s.getInitialState(): must return an object or null",t.displayName||"ReactCompositeComponent"),this.state=u};for(var r in t.prototype=new _,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],u.forEach(p.bind(null,t)),p(t,g),p(t,e),p(t,y),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),i(t.prototype.render,"createClass(...): Class specification must implement a `render` method."),s)t.prototype[r]||(t.prototype[r]=null);return t}}},function(e,t,n){"use strict";var r=n(104),o=n(76);n(8);e.exports=function(e){return o.isValidElement(e)||r("143"),e}},function(e,t,n){"use strict";var r=n(274),o=n(553),i=n(554),a="[object Null]",u="[object Undefined]",s=r.a?r.a.toStringTag:void 0;t.a=function(e){return null==e?void 0===e?u:a:s&&s in Object(e)?o.a(e):i.a(e)}},function(e,t,n){"use strict";var r=n(552),o="object"==typeof self&&self&&self.Object===Object&&self,i=r.a||o||Function("return this")();t.a=i},function(e,t,n){"use strict";(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.a=n}).call(t,n(31))},function(e,t,n){"use strict";var r=n(274),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r.a?r.a.toStringTag:void 0;t.a=function(e){var t=i.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t,n){"use strict";var r=Object.prototype.toString;t.a=function(e){return r.call(e)}},function(e,t,n){"use strict";var r=n(556).a(Object.getPrototypeOf,Object);t.a=r},function(e,t,n){"use strict";t.a=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){"use strict";t.a=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";(function(e,r){var o,i=n(560);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var a=i.a(o);t.a=a}).call(t,n(31),n(559)(e))},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";t.a=function(e){var t,n=e.Symbol;"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable";return t}},function(e,t,n){"use strict";t.a=function(e){for(var t=Object.keys(e),n={},i=0;i<t.length;i++){var a=t[i];0,"function"==typeof e[a]&&(n[a]=e[a])}var u=Object.keys(n);0;var s=void 0;try{!function(e){Object.keys(e).forEach(function(t){var n=e[t],o=n(void 0,{type:r.a.INIT});if(void 0===o)throw new Error('Reducer "'+t+"\" 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. If you don't want to set a value for this reducer, you can use null instead of undefined.");var i="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if(void 0===n(void 0,{type:i}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+r.a.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, but can be null.')})}(n)}catch(e){s=e}return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(s)throw s;for(var r=!1,i={},a=0;a<u.length;a++){var l=u[a],c=n[l],f=e[l],p=c(f,t);if(void 0===p){var d=o(l,t);throw new Error(d)}i[l]=p,r=r||p!==f}return r?i:e}};var r=n(272);n(273),n(275);function o(e,t){var n=t&&t.type;return"Given action "+(n&&'"'+n.toString()+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}},function(e,t,n){"use strict";function r(e,t){return function(){return t(e.apply(void 0,arguments))}}t.a=function(e,t){if("function"==typeof e)return r(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var n=Object.keys(e),o={},i=0;i<n.length;i++){var a=n[i],u=e[a];"function"==typeof u&&(o[a]=r(u,t))}return o}},function(e,t,n){"use strict";t.a=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(n,i,a){var u=e(n,i,a),s=u.dispatch,l=[],c={getState:u.getState,dispatch:function(e){return s(e)}};return l=t.map(function(e){return e(c)}),s=r.a.apply(void 0,l)(u.dispatch),o({},u,{dispatch:s})}}};var r=n(276),o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineReducers=void 0;var r,o=n(565),i=(r=o)&&r.__esModule?r:{default:r};t.combineReducers=i.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(7),i=(r=o)&&r.__esModule?r:{default:r},a=n(566);t.default=function(e){var t=Object.keys(e);return function(){var n=arguments.length<=0||void 0===arguments[0]?i.default.Map():arguments[0],r=arguments[1];return n.withMutations(function(n){t.forEach(function(t){var o=(0,e[t])(n.get(t),r);(0,a.validateNextState)(o,t,r),n.set(t,o)})})}},e.exports=t.default},function(e,t,n){"use strict";"create index";Object.defineProperty(t,"__esModule",{value:!0}),t.validateNextState=t.getUnexpectedInvocationParameterMessage=t.getStateName=void 0;var r=a(n(277)),o=a(n(567)),i=a(n(568));function a(e){return e&&e.__esModule?e:{default:e}}t.getStateName=r.default,t.getUnexpectedInvocationParameterMessage=o.default,t.validateNextState=i.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(7)),o=i(n(277));function i(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t,n){var i=Object.keys(t);if(!i.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";var a=(0,o.default)(n);if(!r.default.Iterable.isIterable(e))return"The "+a+' is of unexpected type. Expected argument to be an instance of Immutable.Iterable with the following properties: "'+i.join('", "')+'".';var u=e.keySeq().toArray().filter(function(e){return!t.hasOwnProperty(e)});return u.length>0?"Unexpected "+(1===u.length?"property":"properties")+' "'+u.join('", "')+'" found in '+a+'. Expected to find one of the known reducer property names instead: "'+i.join('", "')+'". Unexpected properties will be ignored.':null},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(void 0===e)throw new Error('Reducer "'+t+'" returned undefined when handling "'+n.type+'" action. To ignore an action, you must explicitly return the previous state.');return null},e.exports=t.default},function(e,t,n){e.exports={default:n(570),__esModule:!0}},function(e,t,n){n(92),n(98),e.exports=n(571)},function(e,t,n){var r=n(166),o=n(19)("iterator"),i=n(70);e.exports=n(15).isIterable=function(e){var t=Object(e);return void 0!==t[o]||"@@iterator"in t||i.hasOwnProperty(r(t))}},function(e,t,n){"use strict";var r=/^(%20|\s)*(javascript|data)/im,o=/[^\x20-\x7E]/gim,i=/^([^:]+):/gm,a=[".","/"];e.exports={sanitizeUrl:function(e){var t,n,u=e.replace(o,"");return function(e){return a.indexOf(e[0])>-1}(u)?u:(n=u.match(i))?(t=n[0],r.test(t)?"about:blank":u):"about:blank"}}},function(e,t,n){var r=n(574),o=n(582)(function(e,t,n){return t=t.toLowerCase(),e+(n?r(t):t)});e.exports=o},function(e,t,n){var r=n(61),o=n(281);e.exports=function(e){return o(r(e).toLowerCase())}},function(e,t,n){var r=n(77),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(578),o=n(283),i=n(579),a=n(61);e.exports=function(e){return function(t){t=a(t);var n=o(t)?i(t):void 0,u=n?n[0]:t.charAt(0),s=n?r(n,1).join(""):t.slice(1);return u[e]()+s}}},function(e,t,n){var r=n(282);e.exports=function(e,t,n){var o=e.length;return n=void 0===n?o:n,!t&&n>=o?e:r(e,t,n)}},function(e,t,n){var r=n(580),o=n(283),i=n(581);e.exports=function(e){return o(e)?i(e):r(e)}},function(e,t){e.exports=function(e){return e.split("")}},function(e,t){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+r+"|"+o+")"+"?",l="[\\ufe0e\\ufe0f]?"+s+("(?:\\u200d(?:"+[i,a,u].join("|")+")[\\ufe0e\\ufe0f]?"+s+")*"),c="(?:"+[i+r+"?",r,a,u,n].join("|")+")",f=RegExp(o+"(?="+o+")|"+c+l,"g");e.exports=function(e){return e.match(f)||[]}},function(e,t,n){var r=n(284),o=n(583),i=n(586),a=RegExp("['’]","g");e.exports=function(e){return function(t){return r(i(o(t).replace(a,"")),e,"")}}},function(e,t,n){var r=n(584),o=n(61),i=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=o(e))&&e.replace(i,r).replace(a,"")}},function(e,t,n){var r=n(585)({"À":"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","ſ":"s"});e.exports=r},function(e,t){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},function(e,t,n){var r=n(587),o=n(588),i=n(61),a=n(589);e.exports=function(e,t,n){return e=i(e),void 0===(t=n?void 0:t)?o(e)?a(e):r(e):e.match(t)||[]}},function(e,t){var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(n)||[]}},function(e,t){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=function(e){return n.test(e)}},function(e,t){var n="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",r="["+n+"]",o="\\d+",i="[\\u2700-\\u27bf]",a="[a-z\\xdf-\\xf6\\xf8-\\xff]",u="[^\\ud800-\\udfff"+n+o+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",l="[\\ud800-\\udbff][\\udc00-\\udfff]",c="[A-Z\\xc0-\\xd6\\xd8-\\xde]",f="(?:"+a+"|"+u+")",p="(?:"+c+"|"+u+")",d="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",h="[\\ufe0e\\ufe0f]?"+d+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",s,l].join("|")+")[\\ufe0e\\ufe0f]?"+d+")*"),v="(?:"+[i,s,l].join("|")+")"+h,m=RegExp([c+"?"+a+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[r,c,"$"].join("|")+")",p+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[r,c+f,"$"].join("|")+")",c+"?"+f+"+(?:['’](?:d|ll|m|re|s|t|ve))?",c+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",o,v].join("|"),"g");e.exports=function(e){return e.match(m)||[]}},function(e,t,n){var r=n(591),o=n(130),i=n(183);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(592),o=n(597),i=n(598),a=n(599),u=n(600);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=u,e.exports=s},function(e,t,n){var r=n(129);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t,n){var r=n(286),o=n(594),i=n(38),a=n(287),u=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,f=l.hasOwnProperty,p=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?p:u).test(a(e))}},function(e,t,n){var r,o=n(595),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},function(e,t,n){var r=n(37)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(129),o="__lodash_hash_undefined__",i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return n===o?void 0:n}return i.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(129),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},function(e,t,n){var r=n(129),o="__lodash_hash_undefined__";e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?o:t,this}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(131),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}},function(e,t,n){var r=n(131);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(131);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(131);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(132);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(132);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(132);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(132);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},function(e,t,n){var r=n(133),o=n(78),i=n(64);e.exports=function(e){return function(t,n,a){var u=Object(t);if(!o(t)){var s=r(n,3);t=i(t),n=function(e){return s(u[e],e,u)}}var l=e(t,n,a);return l>-1?u[s?t[l]:l]:void 0}}},function(e,t,n){var r=n(613),o=n(639),i=n(300);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(184),o=n(289),i=1,a=2;e.exports=function(e,t,n,u){var s=n.length,l=s,c=!u;if(null==e)return!l;for(e=Object(e);s--;){var f=n[s];if(c&&f[2]?f[1]!==e[f[0]]:!(f[0]in e))return!1}for(;++s<l;){var p=(f=n[s])[0],d=e[p],h=f[1];if(c&&f[2]){if(void 0===d&&!(p in e))return!1}else{var v=new r;if(u)var m=u(d,h,p,e,t,v);if(!(void 0===m?o(h,d,i|a,u,v):m))return!1}}return!0}},function(e,t,n){var r=n(130);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(130),o=n(183),i=n(182),a=200;e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var u=n.__data__;if(!o||u.length<a-1)return u.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(u)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(184),o=n(290),i=n(624),a=n(627),u=n(137),s=n(24),l=n(188),c=n(297),f=1,p="[object Arguments]",d="[object Array]",h="[object Object]",v=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,m,g,y){var b=s(e),_=s(t),w=b?d:u(e),E=_?d:u(t),x=(w=w==p?h:w)==h,S=(E=E==p?h:E)==h,C=w==E;if(C&&l(e)){if(!l(t))return!1;b=!0,x=!1}if(C&&!x)return y||(y=new r),b||c(e)?o(e,t,n,m,g,y):i(e,t,w,n,m,g,y);if(!(n&f)){var k=x&&v.call(e,"__wrapped__"),A=S&&v.call(t,"__wrapped__");if(k||A){var O=k?e.value():e,P=A?t.value():t;return y||(y=new r),g(O,P,n,m,y)}}return!!C&&(y||(y=new r),a(e,t,n,m,g,y))}},function(e,t,n){var r=n(182),o=n(621),i=n(622);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},function(e,t){var n="__lodash_hash_undefined__";e.exports=function(e){return this.__data__.set(e,n),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(77),o=n(292),i=n(105),a=n(290),u=n(625),s=n(626),l=1,c=2,f="[object Boolean]",p="[object Date]",d="[object Error]",h="[object Map]",v="[object Number]",m="[object RegExp]",g="[object Set]",y="[object String]",b="[object Symbol]",_="[object ArrayBuffer]",w="[object DataView]",E=r?r.prototype:void 0,x=E?E.valueOf:void 0;e.exports=function(e,t,n,r,E,S,C){switch(n){case w:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case _:return!(e.byteLength!=t.byteLength||!S(new o(e),new o(t)));case f:case p:case v:return i(+e,+t);case d:return e.name==t.name&&e.message==t.message;case m:case y:return e==t+"";case h:var k=u;case g:var A=r&l;if(k||(k=s),e.size!=t.size&&!A)return!1;var O=C.get(e);if(O)return O==t;r|=c,C.set(e,t);var P=a(k(e),k(t),r,E,S,C);return C.delete(e),P;case b:if(x)return x.call(e)==x.call(t)}return!1}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},function(e,t,n){var r=n(293),o=1,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,a,u,s){var l=n&o,c=r(e),f=c.length;if(f!=r(t).length&&!l)return!1;for(var p=f;p--;){var d=c[p];if(!(l?d in t:i.call(t,d)))return!1}var h=s.get(e);if(h&&s.get(t))return h==t;var v=!0;s.set(e,t),s.set(t,e);for(var m=l;++p<f;){var g=e[d=c[p]],y=t[d];if(a)var b=l?a(y,g,d,t,e,s):a(g,y,d,e,t,s);if(!(void 0===b?g===y||u(g,y,n,a,s):b)){v=!1;break}m||(m="constructor"==d)}if(v&&!m){var _=e.constructor,w=t.constructor;_!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w)&&(v=!1)}return s.delete(e),s.delete(t),v}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(62),o=n(47),i="[object Arguments]";e.exports=function(e){return o(e)&&r(e)==i}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(62),o=n(189),i=n(47),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},function(e,t,n){var r=n(136),o=n(634),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(298)(Object.keys,Object);e.exports=r},function(e,t,n){var r=n(63)(n(37),"DataView");e.exports=r},function(e,t,n){var r=n(63)(n(37),"Promise");e.exports=r},function(e,t,n){var r=n(63)(n(37),"Set");e.exports=r},function(e,t,n){var r=n(63)(n(37),"WeakMap");e.exports=r},function(e,t,n){var r=n(299),o=n(64);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}},function(e,t,n){var r=n(289),o=n(138),i=n(301),a=n(192),u=n(299),s=n(300),l=n(80),c=1,f=2;e.exports=function(e,t){return a(e)&&u(t)?s(l(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,c|f)}}},function(e,t,n){var r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,i=n(642)(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(r,function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)}),t});e.exports=i},function(e,t,n){var r=n(285),o=500;e.exports=function(e){var t=r(e,function(e){return n.size===o&&n.clear(),e}),n=t.cache;return t}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(79),o=n(187),i=n(24),a=n(135),u=n(189),s=n(80);e.exports=function(e,t,n){for(var l=-1,c=(t=r(t,e)).length,f=!1;++l<c;){var p=s(t[l]);if(!(f=null!=e&&n(e,p)))break;e=e[p]}return f||++l!=c?f:!!(c=null==e?0:e.length)&&u(c)&&a(p,c)&&(i(e)||o(e))}},function(e,t,n){var r=n(646),o=n(647),i=n(192),a=n(80);e.exports=function(e){return i(e)?r(a(e)):o(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(139);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(649),o=n(133),i=n(302),a=Math.max;e.exports=function(e,t,n){var u=null==e?0:e.length;if(!u)return-1;var s=null==n?0:i(n);return s<0&&(s=a(u+s,0)),r(e,o(t,3),s)}},function(e,t){e.exports=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}},function(e,t,n){var r=n(303),o=1/0,i=1.7976931348623157e308;e.exports=function(e){return e?(e=r(e))===o||e===-o?(e<0?-1:1)*i:e==e?e:0:0===e?e:0}},function(e,t,n){var r=n(291),o=n(133),i=n(652),a=n(24),u=n(305);e.exports=function(e,t,n){var s=a(e)?r:i;return n&&u(e,t,n)&&(t=void 0),s(e,o(t,3))}},function(e,t,n){var r=n(304);e.exports=function(e,t){var n;return r(e,function(e,r,o){return!(n=t(e,r,o))}),!!n}},function(e,t,n){var r=n(654),o=n(64);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(655)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),u=a.length;u--;){var s=a[e?u:++o];if(!1===n(i[s],s,i))break}return t}}},function(e,t,n){var r=n(78);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,a=t?i:-1,u=Object(n);(t?a--:++a<i)&&!1!==o(u[a],a,u););return n}}},function(e,t,n){(function(t){var r=n(658),o=n(659).Stream,i=" ";function a(e,t,n){n=n||0;var o,i,u=(o=t,new Array(n||0).join(o||"")),s=e;if("object"==typeof e&&((s=e[i=Object.keys(e)[0]])&&s._elem))return s._elem.name=i,s._elem.icount=n,s._elem.indent=t,s._elem.indents=u,s._elem.interrupt=s,s._elem;var l,c=[],f=[];function p(e){Object.keys(e).forEach(function(t){c.push(function(e,t){return e+'="'+r(t)+'"'}(t,e[t]))})}switch(typeof s){case"object":if(null===s)break;s._attr&&p(s._attr),s._cdata&&f.push(("<![CDATA["+s._cdata).replace(/\]\]>/g,"]]]]><![CDATA[>")+"]]>"),s.forEach&&(l=!1,f.push(""),s.forEach(function(e){"object"==typeof e?"_attr"==Object.keys(e)[0]?p(e._attr):f.push(a(e,t,n+1)):(f.pop(),l=!0,f.push(r(e)))}),l||f.push(""));break;default:f.push(r(s))}return{name:i,interrupt:!1,attributes:c,content:f,icount:n,indents:u,indent:t}}function u(e,t,n){if("object"!=typeof t)return e(!1,t);var r=t.interrupt?1:t.content.length;function o(){for(;t.content.length;){var o=t.content.shift();if(void 0!==o){if(i(o))return;u(e,o)}}e(!1,(r>1?t.indents:"")+(t.name?"</"+t.name+">":"")+(t.indent&&!n?"\n":"")),n&&n()}function i(t){return!!t.interrupt&&(t.interrupt.append=e,t.interrupt.end=o,t.interrupt=!1,e(!0),!0)}if(e(!1,t.indents+(t.name?"<"+t.name:"")+(t.attributes.length?" "+t.attributes.join(" "):"")+(r?t.name?">":"":t.name?"/>":"")+(t.indent&&r>1?"\n":"")),!r)return e(!1,t.indent?"\n":"");i(t)||o()}e.exports=function(e,n){"object"!=typeof n&&(n={indent:n});var r,s,l=n.stream?new o:null,c="",f=!1,p=n.indent?!0===n.indent?i:n.indent:"",d=!0;function h(e){d?t.nextTick(e):e()}function v(e,t){if(void 0!==t&&(c+=t),e&&!f&&(l=l||new o,f=!0),e&&f){var n=c;h(function(){l.emit("data",n)}),c=""}}function m(e,t){u(v,a(e,p,p?1:0),t)}function g(){if(l){var e=c;h(function(){l.emit("data",e),l.emit("end"),l.readable=!1,l.emit("close")})}}return h(function(){d=!1}),n.declaration&&(r=n.declaration,s={version:"1.0",encoding:r.encoding||"UTF-8"},r.standalone&&(s.standalone=r.standalone),m({"?xml":{_attr:s}}),c=c.replace("/>","?>")),e&&e.forEach?e.forEach(function(t,n){var r;n+1===e.length&&(r=g),m(t,r)}):m(e,g),l?(l.readable=!0,l):c},e.exports.element=e.exports.Element=function(){var e={_elem:a(Array.prototype.slice.call(arguments)),push:function(e){if(!this.append)throw new Error("not assigned to a parent!");var t=this,n=this._elem.indent;u(this.append,a(e,n,this._elem.icount+(n?1:0)),function(){t.append(!0)})},close:function(e){void 0!==e&&this.push(e),this.end&&this.end()}};return e}}).call(t,n(55))},function(e,t){var n={"&":"&amp;",'"':"&quot;","'":"&apos;","<":"&lt;",">":"&gt;"};e.exports=function(e){return e&&e.replace?e.replace(/([&"<>'])/g,function(e,t){return n[t]}):e}},function(e,t,n){e.exports=o;var r=n(195).EventEmitter;function o(){r.call(this)}n(81)(o,r),o.Readable=n(196),o.Writable=n(666),o.Duplex=n(667),o.Transform=n(668),o.PassThrough=n(669),o.Stream=o,o.prototype.pipe=function(e,t){var n=this;function o(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function i(){n.readable&&n.resume&&n.resume()}n.on("data",o),e.on("drain",i),e._isStdio||t&&!1===t.end||(n.on("end",u),n.on("close",s));var a=!1;function u(){a||(a=!0,e.end())}function s(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",o),e.removeListener("drain",i),n.removeListener("end",u),n.removeListener("close",s),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",l),e.on("error",l),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e}},function(e,t){},function(e,t,n){"use strict";var r=n(141).Buffer,o=n(662);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,o,i=r.allocUnsafe(e>>>0),a=this.head,u=0;a;)t=a.data,n=i,o=u,t.copy(n,o),u+=a.data.length,a=a.next;return i},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,u,s=1,l={},c=!1,f=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){h(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(h,0,e)}:(a="setImmediate$"+Math.random()+"$",u=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&h(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",u,!1):e.attachEvent("onmessage",u),r=function(t){e.postMessage(a+t,"*")}),p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var o={callback:e,args:t};return l[s]=o,r(s),s++},p.clearImmediate=d}function d(e){delete l[e]}function h(e){if(c)setTimeout(h,0,e);else{var t=l[e];if(t){c=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}(t)}finally{d(e),c=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(t,n(31),n(55))},function(e,t,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(t,n(31))},function(e,t,n){"use strict";e.exports=i;var r=n(311),o=n(106);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}o.inherits=n(81),o.inherits(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){e.exports=n(197)},function(e,t,n){e.exports=n(65)},function(e,t,n){e.exports=n(196).Transform},function(e,t,n){e.exports=n(196).PassThrough},function(e,t,n){"use strict";var r=n(312),o=n(314),i=n(675);e.exports=function(e){var t,a=r(arguments[1]);return a.normalizer||0!==(t=a.length=o(a.length,e.length,a.async))&&(a.primitive?!1===t?a.normalizer=n(702):t>1&&(a.normalizer=n(703)(t)):a.normalizer=!1===t?n(704)():1===t?n(708)():n(709)(t)),a.async&&n(710),a.promise&&n(711),a.dispose&&n(717),a.maxAge&&n(718),a.max&&n(721),a.refCounter&&n(723),i(e,a)}},function(e,t,n){"use strict";var r=n(672),o=Math.abs,i=Math.floor;e.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?r(e)*i(o(e)):e}},function(e,t,n){"use strict";e.exports=n(673)()?Math.sign:n(674)},function(e,t,n){"use strict";e.exports=function(){var e=Math.sign;return"function"==typeof e&&(1===e(10)&&-1===e(-20))}},function(e,t,n){"use strict";e.exports=function(e){return e=Number(e),isNaN(e)||0===e?e:e>0?1:-1}},function(e,t,n){"use strict";var r=n(56),o=n(142),i=n(68),a=n(677),u=n(314);e.exports=function e(t){var n,s,l;if(r(t),(n=Object(arguments[1])).async&&n.promise)throw new Error("Options 'async' and 'promise' cannot be used together");return hasOwnProperty.call(t,"__memoized__")&&!n.force?t:(s=u(n.length,t.length,n.async&&i.async),l=a(t,s,n),o(i,function(e,t){n[t]&&e(n[t],l,n)}),e.__profiler__&&e.__profiler__(l),l.updateEnv(),l.memoized)}},function(e,t,n){"use strict";var r=n(56),o=n(82),i=Function.prototype.bind,a=Function.prototype.call,u=Object.keys,s=Object.prototype.propertyIsEnumerable;e.exports=function(e,t){return function(n,l){var c,f=arguments[2],p=arguments[3];return n=Object(o(n)),r(l),c=u(n),p&&c.sort("function"==typeof p?i.call(p,n):void 0),"function"!=typeof e&&(e=c[e]),a.call(e,c,function(e,r){return s.call(n,e)?a.call(l,f,n[e],e,n,r):t})}}},function(e,t,n){"use strict";var r=n(678),o=n(316),i=n(143),a=n(688).methods,u=n(689),s=n(701),l=Function.prototype.apply,c=Function.prototype.call,f=Object.create,p=Object.defineProperties,d=a.on,h=a.emit;e.exports=function(e,t,n){var a,v,m,g,y,b,_,w,E,x,S,C,k,A,O,P=f(null);return v=!1!==t?t:isNaN(e.length)?1:e.length,n.normalizer&&(x=s(n.normalizer),m=x.get,g=x.set,y=x.delete,b=x.clear),null!=n.resolvers&&(O=u(n.resolvers)),A=m?o(function(t){var n,o,i=arguments;if(O&&(i=O(i)),null!==(n=m(i))&&hasOwnProperty.call(P,n))return S&&a.emit("get",n,i,this),P[n];if(o=1===i.length?c.call(e,this,i[0]):l.call(e,this,i),null===n){if(null!==(n=m(i)))throw r("Circular invocation","CIRCULAR_INVOCATION");n=g(i)}else if(hasOwnProperty.call(P,n))throw r("Circular invocation","CIRCULAR_INVOCATION");return P[n]=o,C&&a.emit("set",n,null,o),o},v):0===t?function(){var t;if(hasOwnProperty.call(P,"data"))return S&&a.emit("get","data",arguments,this),P.data;if(t=arguments.length?l.call(e,this,arguments):c.call(e,this),hasOwnProperty.call(P,"data"))throw r("Circular invocation","CIRCULAR_INVOCATION");return P.data=t,C&&a.emit("set","data",null,t),t}:function(t){var n,o,i=arguments;if(O&&(i=O(arguments)),o=String(i[0]),hasOwnProperty.call(P,o))return S&&a.emit("get",o,i,this),P[o];if(n=1===i.length?c.call(e,this,i[0]):l.call(e,this,i),hasOwnProperty.call(P,o))throw r("Circular invocation","CIRCULAR_INVOCATION");return P[o]=n,C&&a.emit("set",o,null,n),n},a={original:e,memoized:A,profileName:n.profileName,get:function(e){return O&&(e=O(e)),m?m(e):String(e[0])},has:function(e){return hasOwnProperty.call(P,e)},delete:function(e){var t;hasOwnProperty.call(P,e)&&(y&&y(e),t=P[e],delete P[e],k&&a.emit("delete",e,t))},clear:function(){var e=P;b&&b(),P=f(null),a.emit("clear",e)},on:function(e,t){return"get"===e?S=!0:"set"===e?C=!0:"delete"===e&&(k=!0),d.call(this,e,t)},emit:h,updateEnv:function(){e=a.original}},_=m?o(function(e){var t,n=arguments;O&&(n=O(n)),null!==(t=m(n))&&a.delete(t)},v):0===t?function(){return a.delete("data")}:function(e){return O&&(e=O(arguments)[0]),a.delete(e)},w=o(function(){var e,n=arguments;return 0===t?P.data:(O&&(n=O(n)),e=m?m(n):String(n[0]),P[e])}),E=o(function(){var e,n=arguments;return 0===t?a.has("data"):(O&&(n=O(n)),null!==(e=m?m(n):String(n[0]))&&a.has(e))}),p(A,{__memoized__:i(!0),delete:i(_),clear:i(a.clear),_get:i(w),_has:i(E)}),a}},function(e,t,n){"use strict";var r=n(315),o=n(684),i=n(66),a=Error.captureStackTrace;t=e.exports=function(e){var n=new Error(e),u=arguments[1],s=arguments[2];return i(s)||o(u)&&(s=u,u=null),i(s)&&r(n,s),i(u)&&(n.code=u),a&&a(n,t),n}},function(e,t,n){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,n){"use strict";var r=n(681),o=n(82),i=Math.max;e.exports=function(e,t){var n,a,u,s=i(arguments.length,2);for(e=Object(o(e)),u=function(r){try{e[r]=t[r]}catch(e){n||(n=e)}},a=1;a<s;++a)t=arguments[a],r(t).forEach(u);if(void 0!==n)throw n;return e}},function(e,t,n){"use strict";e.exports=n(682)()?Object.keys:n(683)},function(e,t,n){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,n){"use strict";var r=n(66),o=Object.keys;e.exports=function(e){return o(r(e)?Object(e):e)}},function(e,t,n){"use strict";var r=n(66),o={function:!0,object:!0};e.exports=function(e){return r(e)&&o[typeof e]||!1}},function(e,t,n){"use strict";e.exports=n(686)()?String.prototype.contains:n(687)},function(e,t,n){"use strict";var r="razdwatrzy";e.exports=function(){return"function"==typeof r.contains&&(!0===r.contains("dwa")&&!1===r.contains("foo"))}},function(e,t,n){"use strict";var r=String.prototype.indexOf;e.exports=function(e){return r.call(this,e,arguments[1])>-1}},function(e,t,n){"use strict";var r,o,i,a,u,s,l,c=n(143),f=n(56),p=Function.prototype.apply,d=Function.prototype.call,h=Object.create,v=Object.defineProperty,m=Object.defineProperties,g=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};u={on:r=function(e,t){var n;return f(t),g.call(this,"__ee__")?n=this.__ee__:(n=y.value=h(null),v(this,"__ee__",y),y.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},once:o=function(e,t){var n,o;return f(t),o=this,r.call(this,e,n=function(){i.call(o,e,n),p.call(t,this,arguments)}),n.__eeOnceListener__=t,this},off:i=function(e,t){var n,r,o,i;if(f(t),!g.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"==typeof(r=n[e]))for(i=0;o=r[i];++i)o!==t&&o.__eeOnceListener__!==t||(2===r.length?n[e]=r[i?0:1]:r.splice(i,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},emit:a=function(e){var t,n,r,o,i;if(g.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"==typeof o){for(n=arguments.length,i=new Array(n-1),t=1;t<n;++t)i[t-1]=arguments[t];for(o=o.slice(),t=0;r=o[t];++t)p.call(r,this,i)}else switch(arguments.length){case 1:d.call(o,this);break;case 2:d.call(o,this,arguments[1]);break;case 3:d.call(o,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,i=new Array(n-1),t=1;t<n;++t)i[t-1]=arguments[t];p.call(o,this,i)}}},s={on:c(r),once:c(o),off:c(i),emit:c(a)},l=m({},s),e.exports=t=function(e){return null==e?h(l):m(Object(e),s)},t.methods=u},function(e,t,n){"use strict";var r,o=n(690),i=n(66),a=n(56),u=Array.prototype.slice;r=function(e){return this.map(function(t,n){return t?t(e[n]):e[n]}).concat(u.call(e,this.length))},e.exports=function(e){return(e=o(e)).forEach(function(e){i(e)&&a(e)}),r.bind(e)}},function(e,t,n){"use strict";var r=n(199),o=Array.isArray;e.exports=function(e){return o(e)?e:r(e)}},function(e,t,n){"use strict";e.exports=function(){var e,t,n=Array.from;return"function"==typeof n&&(t=n(e=["raz","dwa"]),Boolean(t&&t!==e&&"dwa"===t[1]))}},function(e,t,n){"use strict";var r=n(693).iterator,o=n(698),i=n(699),a=n(67),u=n(56),s=n(82),l=n(66),c=n(700),f=Array.isArray,p=Function.prototype.call,d={configurable:!0,enumerable:!0,writable:!0,value:null},h=Object.defineProperty;e.exports=function(e){var t,n,v,m,g,y,b,_,w,E,x=arguments[1],S=arguments[2];if(e=Object(s(e)),l(x)&&u(x),this&&this!==Array&&i(this))t=this;else{if(!x){if(o(e))return 1!==(g=e.length)?Array.apply(null,e):((m=new Array(1))[0]=e[0],m);if(f(e)){for(m=new Array(g=e.length),n=0;n<g;++n)m[n]=e[n];return m}}m=[]}if(!f(e))if(void 0!==(w=e[r])){for(b=u(w).call(e),t&&(m=new t),_=b.next(),n=0;!_.done;)E=x?p.call(x,S,_.value,n):_.value,t?(d.value=E,h(m,n,d)):m[n]=E,_=b.next(),++n;g=n}else if(c(e)){for(g=e.length,t&&(m=new t),n=0,v=0;n<g;++n)E=e[n],n+1<g&&(y=E.charCodeAt(0))>=55296&&y<=56319&&(E+=e[++n]),E=x?p.call(x,S,E,v):E,t?(d.value=E,h(m,v,d)):m[v]=E,++v;g=v}if(void 0===g)for(g=a(e.length),t&&(m=new t(g)),n=0;n<g;++n)E=x?p.call(x,S,e[n],n):e[n],t?(d.value=E,h(m,n,d)):m[n]=E;return t&&(d.value=null,m.length=g),m}},function(e,t,n){"use strict";e.exports=n(694)()?Symbol:n(695)},function(e,t,n){"use strict";var r={object:!0,symbol:!0};e.exports=function(){var e;if("function"!=typeof Symbol)return!1;e=Symbol("test symbol");try{String(e)}catch(e){return!1}return!!r[typeof Symbol.iterator]&&(!!r[typeof Symbol.toPrimitive]&&!!r[typeof Symbol.toStringTag])}},function(e,t,n){"use strict";var r,o,i,a,u=n(143),s=n(696),l=Object.create,c=Object.defineProperties,f=Object.defineProperty,p=Object.prototype,d=l(null);if("function"==typeof Symbol){r=Symbol;try{String(r()),a=!0}catch(e){}}var h,v=(h=l(null),function(e){for(var t,n,r=0;h[e+(r||"")];)++r;return h[e+=r||""]=!0,f(p,t="@@"+e,u.gs(null,function(e){n||(n=!0,f(this,t,u(e)),n=!1)})),t});i=function(e){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return o(e)},e.exports=o=function e(t){var n;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return a?r(t):(n=l(i.prototype),t=void 0===t?"":String(t),c(n,{__description__:u("",t),__name__:u("",v(t))}))},c(o,{for:u(function(e){return d[e]?d[e]:d[e]=o(String(e))}),keyFor:u(function(e){var t;for(t in s(e),d)if(d[t]===e)return t}),hasInstance:u("",r&&r.hasInstance||o("hasInstance")),isConcatSpreadable:u("",r&&r.isConcatSpreadable||o("isConcatSpreadable")),iterator:u("",r&&r.iterator||o("iterator")),match:u("",r&&r.match||o("match")),replace:u("",r&&r.replace||o("replace")),search:u("",r&&r.search||o("search")),species:u("",r&&r.species||o("species")),split:u("",r&&r.split||o("split")),toPrimitive:u("",r&&r.toPrimitive||o("toPrimitive")),toStringTag:u("",r&&r.toStringTag||o("toStringTag")),unscopables:u("",r&&r.unscopables||o("unscopables"))}),c(i.prototype,{constructor:u(o),toString:u("",function(){return this.__name__})}),c(o.prototype,{toString:u(function(){return"Symbol ("+s(this).__description__+")"}),valueOf:u(function(){return s(this)})}),f(o.prototype,o.toPrimitive,u("",function(){var e=s(this);return"symbol"==typeof e?e:e.toString()})),f(o.prototype,o.toStringTag,u("c","Symbol")),f(i.prototype,o.toStringTag,u("c",o.prototype[o.toStringTag])),f(i.prototype,o.toPrimitive,u("c",o.prototype[o.toPrimitive]))},function(e,t,n){"use strict";var r=n(697);e.exports=function(e){if(!r(e))throw new TypeError(e+" is not a symbol");return e}},function(e,t,n){"use strict";e.exports=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&("Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag]))}},function(e,t,n){"use strict";var r=Object.prototype.toString,o=r.call(function(){return arguments}());e.exports=function(e){return r.call(e)===o}},function(e,t,n){"use strict";var r=Object.prototype.toString,o=r.call(n(313));e.exports=function(e){return"function"==typeof e&&r.call(e)===o}},function(e,t,n){"use strict";var r=Object.prototype.toString,o=r.call("");e.exports=function(e){return"string"==typeof e||e&&"object"==typeof e&&(e instanceof String||r.call(e)===o)||!1}},function(e,t,n){"use strict";var r=n(56);e.exports=function(e){var t;return"function"==typeof e?{set:e,get:e}:(t={get:r(e.get)},void 0!==e.set?(t.set=r(e.set),e.delete&&(t.delete=r(e.delete)),e.clear&&(t.clear=r(e.clear)),t):(t.set=t.get,t))}},function(e,t,n){"use strict";e.exports=function(e){var t,n,r=e.length;if(!r)return"";for(t=String(e[n=0]);--r;)t+=""+e[++n];return t}},function(e,t,n){"use strict";e.exports=function(e){return e?function(t){for(var n=String(t[0]),r=0,o=e;--o;)n+=""+t[++r];return n}:function(){return""}}},function(e,t,n){"use strict";var r=n(200),o=Object.create;e.exports=function(){var e=0,t=[],n=o(null);return{get:function(e){var n,o=0,i=t,a=e.length;if(0===a)return i[a]||null;if(i=i[a]){for(;o<a-1;){if(-1===(n=r.call(i[0],e[o])))return null;i=i[1][n],++o}return-1===(n=r.call(i[0],e[o]))?null:i[1][n]||null}return null},set:function(o){var i,a=0,u=t,s=o.length;if(0===s)u[s]=++e;else{for(u[s]||(u[s]=[[],[]]),u=u[s];a<s-1;)-1===(i=r.call(u[0],o[a]))&&(i=u[0].push(o[a])-1,u[1].push([[],[]])),u=u[1][i],++a;-1===(i=r.call(u[0],o[a]))&&(i=u[0].push(o[a])-1),u[1][i]=++e}return n[e]=o,e},delete:function(e){var o,i=0,a=t,u=n[e],s=u.length,l=[];if(0===s)delete a[s];else if(a=a[s]){for(;i<s-1;){if(-1===(o=r.call(a[0],u[i])))return;l.push(a,o),a=a[1][o],++i}if(-1===(o=r.call(a[0],u[i])))return;for(e=a[1][o],a[0].splice(o,1),a[1].splice(o,1);!a[0].length&&l.length;)o=l.pop(),(a=l.pop())[0].splice(o,1),a[1].splice(o,1)}delete n[e]},clear:function(){t=[],n=o(null)}}}},function(e,t,n){"use strict";e.exports=n(706)()?Number.isNaN:n(707)},function(e,t,n){"use strict";e.exports=function(){var e=Number.isNaN;return"function"==typeof e&&(!e({})&&e(NaN)&&!e(34))}},function(e,t,n){"use strict";e.exports=function(e){return e!=e}},function(e,t,n){"use strict";var r=n(200);e.exports=function(){var e=0,t=[],n=[];return{get:function(e){var o=r.call(t,e[0]);return-1===o?null:n[o]},set:function(r){return t.push(r[0]),n.push(++e),e},delete:function(e){var o=r.call(n,e);-1!==o&&(t.splice(o,1),n.splice(o,1))},clear:function(){t=[],n=[]}}}},function(e,t,n){"use strict";var r=n(200),o=Object.create;e.exports=function(e){var t=0,n=[[],[]],i=o(null);return{get:function(t){for(var o,i=0,a=n;i<e-1;){if(-1===(o=r.call(a[0],t[i])))return null;a=a[1][o],++i}return-1===(o=r.call(a[0],t[i]))?null:a[1][o]||null},set:function(o){for(var a,u=0,s=n;u<e-1;)-1===(a=r.call(s[0],o[u]))&&(a=s[0].push(o[u])-1,s[1].push([[],[]])),s=s[1][a],++u;return-1===(a=r.call(s[0],o[u]))&&(a=s[0].push(o[u])-1),s[1][a]=++t,i[t]=o,t},delete:function(t){for(var o,a=0,u=n,s=[],l=i[t];a<e-1;){if(-1===(o=r.call(u[0],l[a])))return;s.push(u,o),u=u[1][o],++a}if(-1!==(o=r.call(u[0],l[a]))){for(t=u[1][o],u[0].splice(o,1),u[1].splice(o,1);!u[0].length&&s.length;)o=s.pop(),(u=s.pop())[0].splice(o,1),u[1].splice(o,1);delete i[t]}},clear:function(){n=[[],[]],i=o(null)}}}},function(e,t,n){"use strict";var r=n(199),o=n(318),i=n(317),a=n(316),u=n(201),s=Array.prototype.slice,l=Function.prototype.apply,c=Object.create;n(68).async=function(e,t){var n,f,p,d=c(null),h=c(null),v=t.memoized,m=t.original;t.memoized=a(function(e){var t=arguments,r=t[t.length-1];return"function"==typeof r&&(n=r,t=s.call(t,0,-1)),v.apply(f=this,p=t)},v);try{i(t.memoized,v)}catch(e){}t.on("get",function(e){var r,o,i;if(n){if(d[e])return"function"==typeof d[e]?d[e]=[d[e],n]:d[e].push(n),void(n=null);r=n,o=f,i=p,n=f=p=null,u(function(){var a;hasOwnProperty.call(h,e)?(a=h[e],t.emit("getasync",e,i,o),l.call(r,a.context,a.args)):(n=r,f=o,p=i,v.apply(o,i))})}}),t.original=function(){var e,o,i,a;return n?(e=r(arguments),o=function e(n){var o,i,s=e.id;if(null!=s){if(delete e.id,o=d[s],delete d[s],o)return i=r(arguments),t.has(s)&&(n?t.delete(s):(h[s]={context:this,args:i},t.emit("setasync",s,"function"==typeof o?1:o.length))),"function"==typeof o?a=l.call(o,this,i):o.forEach(function(e){a=l.call(e,this,i)},this),a}else u(l.bind(e,this,arguments))},i=n,n=f=p=null,e.push(o),a=l.call(m,this,e),o.cb=i,n=o,a):l.call(m,this,arguments)},t.on("set",function(e){n?(d[e]?"function"==typeof d[e]?d[e]=[d[e],n.cb]:d[e].push(n.cb):d[e]=n.cb,delete n.cb,n.id=e,n=null):t.delete(e)}),t.on("delete",function(e){var n;hasOwnProperty.call(d,e)||h[e]&&(n=h[e],delete h[e],t.emit("deleteasync",e,s.call(n.args,1)))}),t.on("clear",function(){var e=h;h=c(null),t.emit("clearasync",o(e,function(e){return s.call(e.args,1)}))})}},function(e,t,n){"use strict";var r=n(318),o=n(712),i=n(713),a=n(715),u=n(319),s=n(201),l=Object.create,c=o("then","then:finally","done","done:finally");n(68).promise=function(e,t){var n=l(null),o=l(null),f=l(null);if(!0===e)e=null;else if(e=i(e),!c[e])throw new TypeError("'"+a(e)+"' is not valid promise mode");t.on("set",function(r,i,a){var l=!1;if(!u(a))return o[r]=a,void t.emit("setasync",r,1);n[r]=1,f[r]=a;var c=function(e){var i=n[r];if(l)throw new Error("Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode)\nConsider to rely on 'then' or 'done' mode instead.");i&&(delete n[r],o[r]=e,t.emit("setasync",r,i))},p=function(){l=!0,n[r]&&(delete n[r],delete f[r],t.delete(r))},d=e;if(d||(d="then"),"then"===d)a.then(function(e){s(c.bind(this,e))},function(){s(p)});else if("done"===d){if("function"!=typeof a.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");a.done(c,p)}else if("done:finally"===d){if("function"!=typeof a.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if("function"!=typeof a.finally)throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");a.done(c),a.finally(p)}}),t.on("get",function(e,r,o){var i;if(n[e])++n[e];else{i=f[e];var a=function(){t.emit("getasync",e,r,o)};u(i)?"function"==typeof i.done?i.done(a):i.then(function(){s(a)}):a()}}),t.on("delete",function(e){if(delete f[e],n[e])delete n[e];else if(hasOwnProperty.call(o,e)){var r=o[e];delete o[e],t.emit("deleteasync",e,[r])}}),t.on("clear",function(){var e=o;o=l(null),n=l(null),f=l(null),t.emit("clearasync",r(e,function(e){return[e]}))})}},function(e,t,n){"use strict";var r=Array.prototype.forEach,o=Object.create;e.exports=function(e){var t=o(null);return r.call(arguments,function(e){t[e]=!0}),t}},function(e,t,n){"use strict";var r=n(82),o=n(714);e.exports=function(e){return o(r(e))}},function(e,t,n){"use strict";var r=n(198);e.exports=function(e){try{return e&&r(e.toString)?e.toString():String(e)}catch(e){throw new TypeError("Passed argument cannot be stringifed")}}},function(e,t,n){"use strict";var r=n(716),o=/[\n\r\u2028\u2029]/g;e.exports=function(e){var t=r(e);return t.length>100&&(t=t.slice(0,99)+"…"),t=t.replace(o,function(e){return JSON.stringify(e).slice(1,-1)})}},function(e,t,n){"use strict";var r=n(198);e.exports=function(e){try{return e&&r(e.toString)?e.toString():String(e)}catch(e){return"[Non-coercible (to string) value]"}}},function(e,t,n){"use strict";var r=n(56),o=n(142),i=n(68),a=Function.prototype.apply;i.dispose=function(e,t,n){var u;if(r(e),n.async&&i.async||n.promise&&i.promise)return t.on("deleteasync",u=function(t,n){a.call(e,null,n)}),void t.on("clearasync",function(e){o(e,function(e,t){u(t,e)})});t.on("delete",u=function(t,n){e(n)}),t.on("clear",function(e){o(e,function(e,t){u(t,e)})})}},function(e,t,n){"use strict";var r=n(199),o=n(142),i=n(201),a=n(319),u=n(719),s=n(68),l=Function.prototype,c=Math.max,f=Math.min,p=Object.create;s.maxAge=function(e,t,n){var d,h,v,m;(e=u(e))&&(d=p(null),h=n.async&&s.async||n.promise&&s.promise?"async":"",t.on("set"+h,function(n){d[n]=setTimeout(function(){t.delete(n)},e),"function"==typeof d[n].unref&&d[n].unref(),m&&(m[n]&&"nextTick"!==m[n]&&clearTimeout(m[n]),m[n]=setTimeout(function(){delete m[n]},v),"function"==typeof m[n].unref&&m[n].unref())}),t.on("delete"+h,function(e){clearTimeout(d[e]),delete d[e],m&&("nextTick"!==m[e]&&clearTimeout(m[e]),delete m[e])}),n.preFetch&&(v=!0===n.preFetch||isNaN(n.preFetch)?.333:c(f(Number(n.preFetch),1),0))&&(m={},v=(1-v)*e,t.on("get"+h,function(e,o,u){m[e]||(m[e]="nextTick",i(function(){var i;"nextTick"===m[e]&&(delete m[e],t.delete(e),n.async&&(o=r(o)).push(l),i=t.memoized.apply(u,o),n.promise&&a(i)&&("function"==typeof i.done?i.done(l,l):i.then(l,l)))}))})),t.on("clear"+h,function(){o(d,function(e){clearTimeout(e)}),d={},m&&(o(m,function(e){"nextTick"!==e&&clearTimeout(e)}),m={})}))}},function(e,t,n){"use strict";var r=n(67),o=n(720);e.exports=function(e){if((e=r(e))>o)throw new TypeError(e+" exceeds maximum possible timeout");return e}},function(e,t,n){"use strict";e.exports=2147483647},function(e,t,n){"use strict";var r=n(67),o=n(722),i=n(68);i.max=function(e,t,n){var a,u,s;(e=r(e))&&(u=o(e),a=n.async&&i.async||n.promise&&i.promise?"async":"",t.on("set"+a,s=function(e){void 0!==(e=u.hit(e))&&t.delete(e)}),t.on("get"+a,s),t.on("delete"+a,u.delete),t.on("clear"+a,u.clear))}},function(e,t,n){"use strict";var r=n(67),o=Object.create,i=Object.prototype.hasOwnProperty;e.exports=function(e){var t,n=0,a=1,u=o(null),s=o(null),l=0;return e=r(e),{hit:function(r){var o=s[r],c=++l;if(u[c]=r,s[r]=c,!o){if(++n<=e)return;return r=u[a],t(r),r}if(delete u[o],a===o)for(;!i.call(u,++a);)continue},delete:t=function(e){var t=s[e];if(t&&(delete u[t],delete s[e],--n,a===t)){if(!n)return l=0,void(a=1);for(;!i.call(u,++a);)continue}},clear:function(){n=0,a=1,u=o(null),s=o(null),l=0}}}},function(e,t,n){"use strict";var r=n(143),o=n(68),i=Object.create,a=Object.defineProperties;o.refCounter=function(e,t,n){var u,s;u=i(null),s=n.async&&o.async||n.promise&&o.promise?"async":"",t.on("set"+s,function(e,t){u[e]=t||1}),t.on("get"+s,function(e){++u[e]}),t.on("delete"+s,function(e){delete u[e]}),t.on("clear"+s,function(){u={}}),a(t.memoized,{deleteRef:r(function(){var e=t.get(arguments);return null===e?null:u[e]?!--u[e]&&(t.delete(e),!0):null}),getRefCount:r(function(){var e=t.get(arguments);return null===e?0:u[e]?u[e]:0})})}},function(e,t,n){(function(t){var n,r;n=void 0!==t?t:this,r=function(e){if(e.CSS&&e.CSS.escape)return e.CSS.escape;var t=function(e){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var t,n=String(e),r=n.length,o=-1,i="",a=n.charCodeAt(0);++o<r;)0!=(t=n.charCodeAt(o))?i+=t>=1&&t<=31||127==t||0==o&&t>=48&&t<=57||1==o&&t>=48&&t<=57&&45==a?"\\"+t.toString(16)+" ":(0!=o||1!=r||45!=t)&&(t>=128||45==t||95==t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122)?n.charAt(o):"\\"+n.charAt(o):i+="�";return i};return e.CSS||(e.CSS={}),e.CSS.escape=t,t},e.exports=r(n)}).call(t,n(31))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return[r.default,o.default]};var r=i(n(726)),o=i(n(422));function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e={components:{App:y.default,authorizationPopup:b.default,authorizeBtn:_.default,AuthorizeBtnContainer:w.default,authorizeOperationBtn:E.default,auths:x.default,AuthItem:S.default,authError:C.default,oauth2:O.default,apiKeyAuth:k.default,basicAuth:A.default,clear:P.default,liveResponse:T.default,info:ee.default,InfoContainer:te.default,JumpToPath:ne.default,onlineValidatorBadge:M.default,operations:I.default,operation:N.default,OperationSummary:R.default,OperationSummaryMethod:D.default,OperationSummaryPath:L.default,highlightCode:F.default,responses:z.default,response:B.default,responseBody:V.default,parameters:H.default,parameterRow:Y.default,execute:K.default,headers:G.default,errors:$.default,contentType:Z.default,overview:X.default,footer:re.default,FilterContainer:oe.default,ParamBody:ie.default,curl:ae.default,schemes:ue.default,SchemesContainer:se.default,modelExample:ce.default,ModelWrapper:fe.default,ModelCollapse:le.default,Model:pe.default,Models:de.default,EnumModel:he.default,ObjectModel:ve.default,ArrayModel:me.default,PrimitiveModel:ge.default,Property:ye.default,TryItOutButton:be.default,Markdown:Se.default,BaseLayout:Ce.default,VersionPragmaFilter:_e.default,VersionStamp:we.default,OperationExt:U.default,OperationExtRow:q.default,ParameterExt:W.default,ParameterIncludeEmpty:J.default,OperationTag:j.default,OperationContainer:g.default,DeepLink:Ee.default,InfoUrl:Q.InfoUrl,InfoBasePath:Q.InfoBasePath,SvgAssets:xe.default}},t={components:ke},n={components:Ae};return[d.default,f.default,s.default,a.default,i.default,r.default,o.default,u.default,e,t,l.default,n,c.default,p.default,h.default,v.default,m.default]};var r=Pe(n(320)),o=Pe(n(327)),i=Pe(n(333)),a=Pe(n(348)),u=Pe(n(385)),s=Pe(n(386)),l=Pe(n(387)),c=Pe(n(394)),f=Pe(n(398)),p=Pe(n(399)),d=Pe(n(400)),h=Pe(n(404)),v=Pe(n(409)),m=Pe(n(411)),g=Pe(n(936)),y=Pe(n(937)),b=Pe(n(938)),_=Pe(n(939)),w=Pe(n(940)),E=Pe(n(941)),x=Pe(n(942)),S=Pe(n(943)),C=Pe(n(944)),k=Pe(n(945)),A=Pe(n(946)),O=Pe(n(947)),P=Pe(n(949)),T=Pe(n(950)),M=Pe(n(951)),I=Pe(n(952)),j=Pe(n(953)),N=Pe(n(954)),R=Pe(n(955)),D=Pe(n(956)),L=Pe(n(957)),U=Pe(n(958)),q=Pe(n(959)),F=Pe(n(960)),z=Pe(n(962)),B=Pe(n(963)),V=Pe(n(964)),H=Pe(n(968)),W=Pe(n(969)),J=Pe(n(970)),Y=Pe(n(971)),K=Pe(n(972)),G=Pe(n(973)),$=Pe(n(974)),Z=Pe(n(975)),X=Pe(n(976)),Q=n(977),ee=Pe(Q),te=Pe(n(978)),ne=Pe(n(979)),re=Pe(n(980)),oe=Pe(n(981)),ie=Pe(n(982)),ae=Pe(n(983)),ue=Pe(n(985)),se=Pe(n(986)),le=Pe(n(987)),ce=Pe(n(988)),fe=Pe(n(989)),pe=Pe(n(414)),de=Pe(n(991)),he=Pe(n(992)),ve=Pe(n(993)),me=Pe(n(994)),ge=Pe(n(995)),ye=Pe(n(996)),be=Pe(n(997)),_e=Pe(n(998)),we=Pe(n(999)),Ee=Pe(n(1e3)),xe=Pe(n(1001)),Se=Pe(n(415)),Ce=Pe(n(1054)),ke=Oe(n(413)),Ae=Oe(n(1055));function Oe(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function Pe(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){var r=n(284),o=n(304),i=n(133),a=n(728),u=n(24);e.exports=function(e,t,n){var s=u(e)?r:a,l=arguments.length<3;return s(e,i(t,4),n,l,o)}},function(e,t){e.exports=function(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}},function(e,t,n){e.exports={default:n(730),__esModule:!0}},function(e,t,n){n(98),n(731),e.exports=n(15).Array.from},function(e,t,n){"use strict";var r=n(49),o=n(20),i=n(72),a=n(330),u=n(331),s=n(115),l=n(732),c=n(165);o(o.S+o.F*!n(332)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,o,f,p=i(e),d="function"==typeof this?this:Array,h=arguments.length,v=h>1?arguments[1]:void 0,m=void 0!==v,g=0,y=c(p);if(m&&(v=r(v,h>2?arguments[2]:void 0,2)),void 0==y||d==Array&&u(y))for(n=new d(t=s(p.length));t>g;g++)l(n,g,m?v(p[g],g):p[g]);else for(f=y.call(p),n=new d;!(o=f.next()).done;g++)l(n,g,m?a(f,v,[o.value,g],!0):o.value);return n.length=g,n}})},function(e,t,n){"use strict";var r=n(40),o=n(95);e.exports=function(e,t,n){t in e?r.f(e,t,o(0,n)):e[t]=n}},function(e,t,n){n(178),n(98),n(92),n(734),n(738),n(739),e.exports=n(15).Promise},function(e,t,n){"use strict";var r,o,i,a,u=n(114),s=n(21),l=n(49),c=n(166),f=n(20),p=n(28),d=n(94),h=n(205),v=n(145),m=n(335),g=n(336).set,y=n(736)(),b=n(206),_=n(337),w=n(338),E=s.TypeError,x=s.process,S=s.Promise,C="process"==c(x),k=function(){},A=o=b.f,O=!!function(){try{var e=S.resolve(1),t=(e.constructor={})[n(19)("species")]=function(e){e(k,k)};return(C||"function"==typeof PromiseRejectionEvent)&&e.then(k)instanceof t}catch(e){}}(),P=function(e){var t;return!(!p(e)||"function"!=typeof(t=e.then))&&t},T=function(e,t){if(!e._n){e._n=!0;var n=e._c;y(function(){for(var r=e._v,o=1==e._s,i=0,a=function(t){var n,i,a,u=o?t.ok:t.fail,s=t.resolve,l=t.reject,c=t.domain;try{u?(o||(2==e._h&&j(e),e._h=1),!0===u?n=r:(c&&c.enter(),n=u(r),c&&(c.exit(),a=!0)),n===t.promise?l(E("Promise-chain cycle")):(i=P(n))?i.call(n,s,l):s(n)):l(r)}catch(e){c&&!a&&c.exit(),l(e)}};n.length>i;)a(n[i++]);e._c=[],e._n=!1,t&&!e._h&&M(e)})}},M=function(e){g.call(s,function(){var t,n,r,o=e._v,i=I(e);if(i&&(t=_(function(){C?x.emit("unhandledRejection",o,e):(n=s.onunhandledrejection)?n({promise:e,reason:o}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",o)}),e._h=C||I(e)?2:1),e._a=void 0,i&&t.e)throw t.v})},I=function(e){return 1!==e._h&&0===(e._a||e._c).length},j=function(e){g.call(s,function(){var t;C?x.emit("rejectionHandled",e):(t=s.onrejectionhandled)&&t({promise:e,reason:e._v})})},N=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),T(t,!0))},R=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw E("Promise can't be resolved itself");(t=P(e))?y(function(){var r={_w:n,_d:!1};try{t.call(e,l(R,r,1),l(N,r,1))}catch(e){N.call(r,e)}}):(n._v=e,n._s=1,T(n,!1))}catch(e){N.call({_w:n,_d:!1},e)}}};O||(S=function(e){h(this,S,"Promise","_h"),d(e),r.call(this);try{e(l(R,this,1),l(N,this,1))}catch(e){N.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(207)(S.prototype,{then:function(e,t){var n=A(m(this,S));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=C?x.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&T(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r;this.promise=e,this.resolve=l(R,e,1),this.reject=l(N,e,1)},b.f=A=function(e){return e===S||e===a?new i(e):o(e)}),f(f.G+f.W+f.F*!O,{Promise:S}),n(97)(S,"Promise"),n(737)("Promise"),a=n(15).Promise,f(f.S+f.F*!O,"Promise",{reject:function(e){var t=A(this);return(0,t.reject)(e),t.promise}}),f(f.S+f.F*(u||!O),"Promise",{resolve:function(e){return w(u&&this===a?S:this,e)}}),f(f.S+f.F*!(O&&n(332)(function(e){S.all(e).catch(k)})),"Promise",{all:function(e){var t=this,n=A(t),r=n.resolve,o=n.reject,i=_(function(){var n=[],i=0,a=1;v(e,!1,function(e){var u=i++,s=!1;n.push(void 0),a++,t.resolve(e).then(function(e){s||(s=!0,n[u]=e,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(e){var t=this,n=A(t),r=n.reject,o=_(function(){v(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(21),o=n(336).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,u=r.Promise,s="process"==n(93)(a);e.exports=function(){var e,t,n,l=function(){var r,o;for(s&&(r=a.domain)&&r.exit();e;){o=e.fn,e=e.next;try{o()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(s)n=function(){a.nextTick(l)};else if(!i||r.navigator&&r.navigator.standalone)if(u&&u.resolve){var c=u.resolve();n=function(){c.then(l)}}else n=function(){o.call(r,l)};else{var f=!0,p=document.createTextNode("");new i(l).observe(p,{characterData:!0}),n=function(){p.data=f=!f}}return function(r){var o={fn:r,next:void 0};t&&(t.next=o),e||(e=o,n()),t=o}}},function(e,t,n){"use strict";var r=n(21),o=n(15),i=n(40),a=n(44),u=n(19)("species");e.exports=function(e){var t="function"==typeof o[e]?o[e]:r[e];a&&t&&!t[u]&&i.f(t,u,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=n(20),o=n(15),i=n(21),a=n(335),u=n(338);r(r.P+r.R,"Promise",{finally:function(e){var t=a(this,o.Promise||i.Promise),n="function"==typeof e;return this.then(n?function(n){return u(t,e()).then(function(){return n})}:e,n?function(n){return u(t,e()).then(function(){throw n})}:e)}})},function(e,t,n){"use strict";var r=n(20),o=n(206),i=n(337);r(r.S,"Promise",{try:function(e){var t=o.f(this),n=i(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},function(e,t,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(741),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag",l="object"==typeof e,c=t.regeneratorRuntime;if(c)l&&(e.exports=c);else{(c=t.regeneratorRuntime=l?e.exports:{}).wrap=_;var f="suspendedStart",p="suspendedYield",d="executing",h="completed",v={},m={};m[a]=function(){return this};var g=Object.getPrototypeOf,y=g&&g(g(M([])));y&&y!==r&&o.call(y,a)&&(m=y);var b=S.prototype=E.prototype=Object.create(m);x.prototype=b.constructor=S,S.constructor=x,S[s]=x.displayName="GeneratorFunction",c.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===x||"GeneratorFunction"===(t.displayName||t.name))},c.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(b),e},c.awrap=function(e){return{__await:e}},C(k.prototype),k.prototype[u]=function(){return this},c.AsyncIterator=k,c.async=function(e,t,n,r){var o=new k(_(e,t,n,r));return c.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},C(b),b[s]="Generator",b[a]=function(){return this},b.toString=function(){return"[object Generator]"},c.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},c.values=M,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(P),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,o){return u.type="throw",u.arg=e,t.next=r,o&&(t.method="next",t.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:M(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function _(e,t,n,r){var o=t&&t.prototype instanceof E?t:E,i=Object.create(o.prototype),a=new T(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===d)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw i;return I()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=A(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var s=w(e,t,n);if("normal"===s.type){if(r=n.done?h:p,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=h,n.method="throw",n.arg=s.arg)}}}(e,n,a),i}function w(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function E(){}function x(){}function S(){}function C(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function k(e){var t;this._invoke=function(n,r){function i(){return new Promise(function(t,i){!function t(n,r,i,a){var u=w(e[n],e,r);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&o.call(l,"__await")?Promise.resolve(l.__await).then(function(e){t("next",e,i,a)},function(e){t("throw",e,i,a)}):Promise.resolve(l).then(function(e){s.value=e,i(s)},a)}a(u.arg)}(n,r,t,i)})}return t=t?t.then(i,i):i()}}function A(e,t){var r=e.iterator[t.method];if(r===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,A(e,t),"throw"===t.method))return v;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=w(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,v;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,v):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function M(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(o.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=n,t.done=!0,t};return i.next=i}}return{next:I}}function I(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())},function(e,t,n){"use strict";var r=n(743),o=n(761);function i(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=n(16),e.exports.Schema=n(86),e.exports.FAILSAFE_SCHEMA=n(209),e.exports.JSON_SCHEMA=n(342),e.exports.CORE_SCHEMA=n(341),e.exports.DEFAULT_SAFE_SCHEMA=n(108),e.exports.DEFAULT_FULL_SCHEMA=n(146),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.safeLoad=r.safeLoad,e.exports.safeLoadAll=r.safeLoadAll,e.exports.dump=o.dump,e.exports.safeDump=o.safeDump,e.exports.YAMLException=n(107),e.exports.MINIMAL_SCHEMA=n(209),e.exports.SAFE_SCHEMA=n(108),e.exports.DEFAULT_SCHEMA=n(146),e.exports.scan=i("scan"),e.exports.parse=i("parse"),e.exports.compose=i("compose"),e.exports.addConstructor=i("addConstructor")},function(e,t,n){"use strict";var r=n(85),o=n(107),i=n(744),a=n(108),u=n(146),s=Object.prototype.hasOwnProperty,l=1,c=2,f=3,p=4,d=1,h=2,v=3,m=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,g=/[\x85\u2028\u2029]/,y=/[,\[\]\{\}]/,b=/^(?:!|!!|![a-z\-]+!)$/i,_=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function w(e){return 10===e||13===e}function E(e){return 9===e||32===e}function x(e){return 9===e||32===e||10===e||13===e}function S(e){return 44===e||91===e||93===e||123===e||125===e}function C(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function k(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e?"\t":9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function A(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var O=new Array(256),P=new Array(256),T=0;T<256;T++)O[T]=k(T)?1:0,P[T]=k(T);function M(e,t){return new o(t,new i(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function I(e,t){throw M(e,t)}function j(e,t){e.onWarning&&e.onWarning.call(null,M(e,t))}var N={YAML:function(e,t,n){var r,o,i;null!==e.version&&I(e,"duplication of %YAML directive"),1!==n.length&&I(e,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&I(e,"ill-formed argument of the YAML directive"),o=parseInt(r[1],10),i=parseInt(r[2],10),1!==o&&I(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=i<2,1!==i&&2!==i&&j(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,o;2!==n.length&&I(e,"TAG directive accepts exactly two arguments"),r=n[0],o=n[1],b.test(r)||I(e,"ill-formed tag handle (first argument) of the TAG directive"),s.call(e.tagMap,r)&&I(e,'there is a previously declared suffix for "'+r+'" tag handle'),_.test(o)||I(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[r]=o}};function R(e,t,n,r){var o,i,a,u;if(t<n){if(u=e.input.slice(t,n),r)for(o=0,i=u.length;o<i;o+=1)9===(a=u.charCodeAt(o))||32<=a&&a<=1114111||I(e,"expected valid JSON character");else m.test(u)&&I(e,"the stream contains non-printable characters");e.result+=u}}function D(e,t,n,o){var i,a,u,l;for(r.isObject(n)||I(e,"cannot merge mappings; the provided source object is unacceptable"),u=0,l=(i=Object.keys(n)).length;u<l;u+=1)a=i[u],s.call(t,a)||(t[a]=n[a],o[a]=!0)}function L(e,t,n,r,o,i,a,u){var l,c;if(o=String(o),null===t&&(t={}),"tag:yaml.org,2002:merge"===r)if(Array.isArray(i))for(l=0,c=i.length;l<c;l+=1)D(e,t,i[l],n);else D(e,t,i,n);else e.json||s.call(n,o)||!s.call(t,o)||(e.line=a||e.line,e.position=u||e.position,I(e,"duplicated mapping key")),t[o]=i,delete n[o];return t}function U(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):I(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function q(e,t,n){for(var r=0,o=e.input.charCodeAt(e.position);0!==o;){for(;E(o);)o=e.input.charCodeAt(++e.position);if(t&&35===o)do{o=e.input.charCodeAt(++e.position)}while(10!==o&&13!==o&&0!==o);if(!w(o))break;for(U(e),o=e.input.charCodeAt(e.position),r++,e.lineIndent=0;32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position)}return-1!==n&&0!==r&&e.lineIndent<n&&j(e,"deficient indentation"),r}function F(e){var t,n=e.position;return!(45!==(t=e.input.charCodeAt(n))&&46!==t||t!==e.input.charCodeAt(n+1)||t!==e.input.charCodeAt(n+2)||(n+=3,0!==(t=e.input.charCodeAt(n))&&!x(t)))}function z(e,t){1===t?e.result+=" ":t>1&&(e.result+=r.repeat("\n",t-1))}function B(e,t){var n,r,o=e.tag,i=e.anchor,a=[],u=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),r=e.input.charCodeAt(e.position);0!==r&&45===r&&x(e.input.charCodeAt(e.position+1));)if(u=!0,e.position++,q(e,!0,-1)&&e.lineIndent<=t)a.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,W(e,t,f,!1,!0),a.push(e.result),q(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)I(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!u&&(e.tag=o,e.anchor=i,e.kind="sequence",e.result=a,!0)}function V(e){var t,n,r,o,i=!1,a=!1;if(33!==(o=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&I(e,"duplication of a tag property"),60===(o=e.input.charCodeAt(++e.position))?(i=!0,o=e.input.charCodeAt(++e.position)):33===o?(a=!0,n="!!",o=e.input.charCodeAt(++e.position)):n="!",t=e.position,i){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&62!==o);e.position<e.length?(r=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):I(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==o&&!x(o);)33===o&&(a?I(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),b.test(n)||I(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);r=e.input.slice(t,e.position),y.test(r)&&I(e,"tag suffix cannot contain flow indicator characters")}return r&&!_.test(r)&&I(e,"tag name cannot contain such characters: "+r),i?e.tag=r:s.call(e.tagMap,n)?e.tag=e.tagMap[n]+r:"!"===n?e.tag="!"+r:"!!"===n?e.tag="tag:yaml.org,2002:"+r:I(e,'undeclared tag handle "'+n+'"'),!0}function H(e){var t,n;if(38!==(n=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&I(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!x(n)&&!S(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&I(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function W(e,t,n,o,i){var a,u,m,g,y,b,_,k,T=1,M=!1,j=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=u=m=p===n||f===n,o&&q(e,!0,-1)&&(M=!0,e.lineIndent>t?T=1:e.lineIndent===t?T=0:e.lineIndent<t&&(T=-1)),1===T)for(;V(e)||H(e);)q(e,!0,-1)?(M=!0,m=a,e.lineIndent>t?T=1:e.lineIndent===t?T=0:e.lineIndent<t&&(T=-1)):m=!1;if(m&&(m=M||i),1!==T&&p!==n||(_=l===n||c===n?t:t+1,k=e.position-e.lineStart,1===T?m&&(B(e,k)||function(e,t,n){var r,o,i,a,u,s=e.tag,l=e.anchor,f={},d={},h=null,v=null,m=null,g=!1,y=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=f),u=e.input.charCodeAt(e.position);0!==u;){if(r=e.input.charCodeAt(e.position+1),i=e.line,a=e.position,63!==u&&58!==u||!x(r)){if(!W(e,n,c,!1,!0))break;if(e.line===i){for(u=e.input.charCodeAt(e.position);E(u);)u=e.input.charCodeAt(++e.position);if(58===u)x(u=e.input.charCodeAt(++e.position))||I(e,"a whitespace character is expected after the key-value separator within a block mapping"),g&&(L(e,f,d,h,v,null),h=v=m=null),y=!0,g=!1,o=!1,h=e.tag,v=e.result;else{if(!y)return e.tag=s,e.anchor=l,!0;I(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!y)return e.tag=s,e.anchor=l,!0;I(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===u?(g&&(L(e,f,d,h,v,null),h=v=m=null),y=!0,g=!0,o=!0):g?(g=!1,o=!0):I(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,u=r;if((e.line===i||e.lineIndent>t)&&(W(e,t,p,!0,o)&&(g?v=e.result:m=e.result),g||(L(e,f,d,h,v,m,i,a),h=v=m=null),q(e,!0,-1),u=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==u)I(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return g&&L(e,f,d,h,v,null),y&&(e.tag=s,e.anchor=l,e.kind="mapping",e.result=f),y}(e,k,_))||function(e,t){var n,r,o,i,a,u,s,c,f,p,d=!0,h=e.tag,v=e.anchor,m={};if(91===(p=e.input.charCodeAt(e.position)))o=93,u=!1,r=[];else{if(123!==p)return!1;o=125,u=!0,r={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=r),p=e.input.charCodeAt(++e.position);0!==p;){if(q(e,!0,t),(p=e.input.charCodeAt(e.position))===o)return e.position++,e.tag=h,e.anchor=v,e.kind=u?"mapping":"sequence",e.result=r,!0;d||I(e,"missed comma between flow collection entries"),c=s=f=null,i=a=!1,63===p&&x(e.input.charCodeAt(e.position+1))&&(i=a=!0,e.position++,q(e,!0,t)),n=e.line,W(e,t,l,!1,!0),c=e.tag,s=e.result,q(e,!0,t),p=e.input.charCodeAt(e.position),!a&&e.line!==n||58!==p||(i=!0,p=e.input.charCodeAt(++e.position),q(e,!0,t),W(e,t,l,!1,!0),f=e.result),u?L(e,r,m,c,s,f):i?r.push(L(e,null,m,c,s,f)):r.push(s),q(e,!0,t),44===(p=e.input.charCodeAt(e.position))?(d=!0,p=e.input.charCodeAt(++e.position)):d=!1}I(e,"unexpected end of the stream within a flow collection")}(e,_)?j=!0:(u&&function(e,t){var n,o,i,a,u,s=d,l=!1,c=!1,f=t,p=0,m=!1;if(124===(a=e.input.charCodeAt(e.position)))o=!1;else{if(62!==a)return!1;o=!0}for(e.kind="scalar",e.result="";0!==a;)if(43===(a=e.input.charCodeAt(++e.position))||45===a)d===s?s=43===a?v:h:I(e,"repeat of a chomping mode identifier");else{if(!((i=48<=(u=a)&&u<=57?u-48:-1)>=0))break;0===i?I(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?I(e,"repeat of an indentation width identifier"):(f=t+i-1,c=!0)}if(E(a)){do{a=e.input.charCodeAt(++e.position)}while(E(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!w(a)&&0!==a)}for(;0!==a;){for(U(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!c||e.lineIndent<f)&&32===a;)e.lineIndent++,a=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>f&&(f=e.lineIndent),w(a))p++;else{if(e.lineIndent<f){s===v?e.result+=r.repeat("\n",l?1+p:p):s===d&&l&&(e.result+="\n");break}for(o?E(a)?(m=!0,e.result+=r.repeat("\n",l?1+p:p)):m?(m=!1,e.result+=r.repeat("\n",p+1)):0===p?l&&(e.result+=" "):e.result+=r.repeat("\n",p):e.result+=r.repeat("\n",l?1+p:p),l=!0,c=!0,p=0,n=e.position;!w(a)&&0!==a;)a=e.input.charCodeAt(++e.position);R(e,n,e.position,!1)}}return!0}(e,_)||function(e,t){var n,r,o;if(39!==(n=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(R(e,r,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;r=e.position,e.position++,o=e.position}else w(n)?(R(e,r,o,!0),z(e,q(e,!1,t)),r=o=e.position):e.position===e.lineStart&&F(e)?I(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);I(e,"unexpected end of the stream within a single quoted scalar")}(e,_)||function(e,t){var n,r,o,i,a,u,s;if(34!==(u=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;0!==(u=e.input.charCodeAt(e.position));){if(34===u)return R(e,n,e.position,!0),e.position++,!0;if(92===u){if(R(e,n,e.position,!0),w(u=e.input.charCodeAt(++e.position)))q(e,!1,t);else if(u<256&&O[u])e.result+=P[u],e.position++;else if((a=120===(s=u)?2:117===s?4:85===s?8:0)>0){for(o=a,i=0;o>0;o--)(a=C(u=e.input.charCodeAt(++e.position)))>=0?i=(i<<4)+a:I(e,"expected hexadecimal character");e.result+=A(i),e.position++}else I(e,"unknown escape sequence");n=r=e.position}else w(u)?(R(e,n,r,!0),z(e,q(e,!1,t)),n=r=e.position):e.position===e.lineStart&&F(e)?I(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}I(e,"unexpected end of the stream within a double quoted scalar")}(e,_)?j=!0:!function(e){var t,n,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!x(r)&&!S(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&I(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||I(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],q(e,!0,-1),!0}(e)?function(e,t,n){var r,o,i,a,u,s,l,c,f=e.kind,p=e.result;if(x(c=e.input.charCodeAt(e.position))||S(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return!1;if((63===c||45===c)&&(x(r=e.input.charCodeAt(e.position+1))||n&&S(r)))return!1;for(e.kind="scalar",e.result="",o=i=e.position,a=!1;0!==c;){if(58===c){if(x(r=e.input.charCodeAt(e.position+1))||n&&S(r))break}else if(35===c){if(x(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&F(e)||n&&S(c))break;if(w(c)){if(u=e.line,s=e.lineStart,l=e.lineIndent,q(e,!1,-1),e.lineIndent>=t){a=!0,c=e.input.charCodeAt(e.position);continue}e.position=i,e.line=u,e.lineStart=s,e.lineIndent=l;break}}a&&(R(e,o,i,!1),z(e,e.line-u),o=i=e.position,a=!1),E(c)||(i=e.position+1),c=e.input.charCodeAt(++e.position)}return R(e,o,i,!1),!!e.result||(e.kind=f,e.result=p,!1)}(e,_,l===n)&&(j=!0,null===e.tag&&(e.tag="?")):(j=!0,null===e.tag&&null===e.anchor||I(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===T&&(j=m&&B(e,k))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(g=0,y=e.implicitTypes.length;g<y;g+=1)if((b=e.implicitTypes[g]).resolve(e.result)){e.result=b.construct(e.result),e.tag=b.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else s.call(e.typeMap[e.kind||"fallback"],e.tag)?(b=e.typeMap[e.kind||"fallback"][e.tag],null!==e.result&&b.kind!==e.kind&&I(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+b.kind+'", not "'+e.kind+'"'),b.resolve(e.result)?(e.result=b.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):I(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):I(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||j}function J(e){var t,n,r,o,i=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(o=e.input.charCodeAt(e.position))&&(q(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==o));){for(a=!0,o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!x(o);)o=e.input.charCodeAt(++e.position);for(r=[],(n=e.input.slice(t,e.position)).length<1&&I(e,"directive name must not be less than one character in length");0!==o;){for(;E(o);)o=e.input.charCodeAt(++e.position);if(35===o){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&!w(o));break}if(w(o))break;for(t=e.position;0!==o&&!x(o);)o=e.input.charCodeAt(++e.position);r.push(e.input.slice(t,e.position))}0!==o&&U(e),s.call(N,n)?N[n](e,n,r):j(e,'unknown document directive "'+n+'"')}q(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,q(e,!0,-1)):a&&I(e,"directives end mark is expected"),W(e,e.lineIndent-1,p,!1,!0),q(e,!0,-1),e.checkLineBreaks&&g.test(e.input.slice(i,e.position))&&j(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&F(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,q(e,!0,-1)):e.position<e.length-1&&I(e,"end of the stream or a document separator is expected")}function Y(e,t){e=String(e),t=t||{},0!==e.length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new function(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||u,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}(e,t);for(n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)J(n);return n.documents}function K(e,t,n){var r,o,i=Y(e,n);if("function"!=typeof t)return i;for(r=0,o=i.length;r<o;r+=1)t(i[r])}function G(e,t){var n=Y(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new o("expected a single document in the stream, but found more")}}e.exports.loadAll=K,e.exports.load=G,e.exports.safeLoadAll=function(e,t,n){if("function"!=typeof t)return K(e,r.extend({schema:a},n));K(e,t,r.extend({schema:a},n))},e.exports.safeLoad=function(e,t){return G(e,r.extend({schema:a},t))}},function(e,t,n){"use strict";var r=n(85);function o(e,t,n,r,o){this.name=e,this.buffer=t,this.position=n,this.line=r,this.column=o}o.prototype.getSnippet=function(e,t){var n,o,i,a,u;if(!this.buffer)return null;for(e=e||4,t=t||75,n="",o=this.position;o>0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(o-1));)if(o-=1,this.position-o>t/2-1){n=" ... ",o+=5;break}for(i="",a=this.position;a<this.buffer.length&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(a));)if((a+=1)-this.position>t/2-1){i=" ... ",a-=5;break}return u=this.buffer.slice(o,a),r.repeat(" ",e)+n+u+i+"\n"+r.repeat(" ",e+this.position-o+n.length)+"^"},o.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},e.exports=o},function(e,t,n){"use strict";var r=n(16);e.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},function(e,t,n){"use strict";var r=n(16);e.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},function(e,t,n){"use strict";var r=n(16);e.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},function(e,t,n){"use strict";var r=n(16);e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(16);e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(85),o=n(16);function i(e){return 48<=e&&e<=55}function a(e){return 48<=e&&e<=57}e.exports=new o("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=e.length,o=0,u=!1;if(!r)return!1;if("-"!==(t=e[o])&&"+"!==t||(t=e[++o]),"0"===t){if(o+1===r)return!0;if("b"===(t=e[++o])){for(o++;o<r;o++)if("_"!==(t=e[o])){if("0"!==t&&"1"!==t)return!1;u=!0}return u&&"_"!==t}if("x"===t){for(o++;o<r;o++)if("_"!==(t=e[o])){if(!(48<=(n=e.charCodeAt(o))&&n<=57||65<=n&&n<=70||97<=n&&n<=102))return!1;u=!0}return u&&"_"!==t}for(;o<r;o++)if("_"!==(t=e[o])){if(!i(e.charCodeAt(o)))return!1;u=!0}return u&&"_"!==t}if("_"===t)return!1;for(;o<r;o++)if("_"!==(t=e[o])){if(":"===t)break;if(!a(e.charCodeAt(o)))return!1;u=!0}return!(!u||"_"===t)&&(":"!==t||/^(:[0-5]?[0-9])+$/.test(e.slice(o)))},construct:function(e){var t,n,r=e,o=1,i=[];return-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(t=r[0])&&"+"!==t||("-"===t&&(o=-1),t=(r=r.slice(1))[0]),"0"===r?0:"0"===t?"b"===r[1]?o*parseInt(r.slice(2),2):"x"===r[1]?o*parseInt(r,16):o*parseInt(r,8):-1!==r.indexOf(":")?(r.split(":").forEach(function(e){i.unshift(parseInt(e,10))}),r=0,n=1,i.forEach(function(e){r+=e*n,n*=60}),o*r):o*parseInt(r,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!r.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},function(e,t,n){"use strict";var r=n(85),o=n(16),i=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var a=/^[-+]?[0-9]+e/;e.exports=new o("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!i.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n,r,o;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,o=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(e){o.unshift(parseFloat(e,10))}),t=0,r=1,o.forEach(function(e){t+=e*r,r*=60}),n*t):n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||r.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(16),o=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==o.exec(e)||null!==i.exec(e))},construct:function(e){var t,n,r,a,u,s,l,c,f=0,p=null;if(null===(t=o.exec(e))&&(t=i.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(n,r,a));if(u=+t[4],s=+t[5],l=+t[6],t[7]){for(f=t[7].slice(0,3);f.length<3;)f+="0";f=+f}return t[9]&&(p=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(p=-p)),c=new Date(Date.UTC(n,r,a,u,s,l,f)),p&&c.setTime(c.getTime()-p),c},instanceOf:Date,represent:function(e){return e.toISOString()}})},function(e,t,n){"use strict";var r=n(16);e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},function(e,t,n){"use strict";var r;try{r=n(54).Buffer}catch(e){}var o=n(16),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new o("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=0,o=e.length,a=i;for(n=0;n<o;n++)if(!((t=a.indexOf(e.charAt(n)))>64)){if(t<0)return!1;r+=6}return r%8==0},construct:function(e){var t,n,o=e.replace(/[\r\n=]/g,""),a=o.length,u=i,s=0,l=[];for(t=0;t<a;t++)t%4==0&&t&&(l.push(s>>16&255),l.push(s>>8&255),l.push(255&s)),s=s<<6|u.indexOf(o.charAt(t));return 0==(n=a%4*6)?(l.push(s>>16&255),l.push(s>>8&255),l.push(255&s)):18===n?(l.push(s>>10&255),l.push(s>>2&255)):12===n&&l.push(s>>4&255),r?r.from?r.from(l):new r(l):l},predicate:function(e){return r&&r.isBuffer(e)},represent:function(e){var t,n,r="",o=0,a=e.length,u=i;for(t=0;t<a;t++)t%3==0&&t&&(r+=u[o>>18&63],r+=u[o>>12&63],r+=u[o>>6&63],r+=u[63&o]),o=(o<<8)+e[t];return 0==(n=a%3)?(r+=u[o>>18&63],r+=u[o>>12&63],r+=u[o>>6&63],r+=u[63&o]):2===n?(r+=u[o>>10&63],r+=u[o>>4&63],r+=u[o<<2&63],r+=u[64]):1===n&&(r+=u[o>>2&63],r+=u[o<<4&63],r+=u[64],r+=u[64]),r}})},function(e,t,n){"use strict";var r=n(16),o=Object.prototype.hasOwnProperty,i=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,a,u,s=[],l=e;for(t=0,n=l.length;t<n;t+=1){if(r=l[t],u=!1,"[object Object]"!==i.call(r))return!1;for(a in r)if(o.call(r,a)){if(u)return!1;u=!0}if(!u)return!1;if(-1!==s.indexOf(a))return!1;s.push(a)}return!0},construct:function(e){return null!==e?e:[]}})},function(e,t,n){"use strict";var r=n(16),o=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,i,a,u=e;for(a=new Array(u.length),t=0,n=u.length;t<n;t+=1){if(r=u[t],"[object Object]"!==o.call(r))return!1;if(1!==(i=Object.keys(r)).length)return!1;a[t]=[i[0],r[i[0]]]}return!0},construct:function(e){if(null===e)return[];var t,n,r,o,i,a=e;for(i=new Array(a.length),t=0,n=a.length;t<n;t+=1)r=a[t],o=Object.keys(r),i[t]=[o[0],r[o[0]]];return i}})},function(e,t,n){"use strict";var r=n(16),o=Object.prototype.hasOwnProperty;e.exports=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,n=e;for(t in n)if(o.call(n,t)&&null!==n[t])return!1;return!0},construct:function(e){return null!==e?e:{}}})},function(e,t,n){"use strict";var r=n(16);e.exports=new r("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(e){return void 0===e},represent:function(){return""}})},function(e,t,n){"use strict";var r=n(16);e.exports=new r("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,n=/\/([gim]*)$/.exec(e),r="";if("/"===t[0]){if(n&&(r=n[1]),r.length>3)return!1;if("/"!==t[t.length-r.length-1])return!1}return!0},construct:function(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},function(e,t,n){"use strict";var r;"undefined"!=typeof window&&(r=window.esprima);var o=n(16);e.exports=new o("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",n=r.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&("ArrowFunctionExpression"===n.body[0].expression.type||"FunctionExpression"===n.body[0].expression.type)}catch(e){return!1}},construct:function(e){var t,n="("+e+")",o=r.parse(n,{range:!0}),i=[];if("Program"!==o.type||1!==o.body.length||"ExpressionStatement"!==o.body[0].type||"ArrowFunctionExpression"!==o.body[0].expression.type&&"FunctionExpression"!==o.body[0].expression.type)throw new Error("Failed to resolve function");return o.body[0].expression.params.forEach(function(e){i.push(e.name)}),t=o.body[0].expression.body.range,"BlockStatement"===o.body[0].expression.body.type?new Function(i,n.slice(t[0]+1,t[1]-1)):new Function(i,"return "+n.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},function(e,t,n){"use strict";var r=n(85),o=n(107),i=n(146),a=n(108),u=Object.prototype.toString,s=Object.prototype.hasOwnProperty,l=9,c=10,f=32,p=33,d=34,h=35,v=37,m=38,g=39,y=42,b=44,_=45,w=58,E=62,x=63,S=64,C=91,k=93,A=96,O=123,P=124,T=125,M={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},I=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function j(e){var t,n,i;if(t=e.toString(16).toUpperCase(),e<=255)n="x",i=2;else if(e<=65535)n="u",i=4;else{if(!(e<=4294967295))throw new o("code point within a string may not be greater than 0xFFFFFFFF");n="U",i=8}return"\\"+n+r.repeat("0",i-t.length)+t}function N(e){this.schema=e.schema||i,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=r.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var n,r,o,i,a,u,l;if(null===t)return{};for(n={},o=0,i=(r=Object.keys(t)).length;o<i;o+=1)a=r[o],u=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(l=e.compiledTypeMap.fallback[a])&&s.call(l.styleAliases,u)&&(u=l.styleAliases[u]),n[a]=u;return n}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function R(e,t){for(var n,o=r.repeat(" ",t),i=0,a=-1,u="",s=e.length;i<s;)-1===(a=e.indexOf("\n",i))?(n=e.slice(i),i=s):(n=e.slice(i,a+1),i=a+1),n.length&&"\n"!==n&&(u+=o),u+=n;return u}function D(e,t){return"\n"+r.repeat(" ",e.indent*t)}function L(e){return e===f||e===l}function U(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function q(e){return U(e)&&65279!==e&&e!==b&&e!==C&&e!==k&&e!==O&&e!==T&&e!==w&&e!==h}function F(e){return/^\n* /.test(e)}var z=1,B=2,V=3,H=4,W=5;function J(e,t,n,r,o){var i,a,u,s=!1,l=!1,f=-1!==r,M=-1,I=U(u=e.charCodeAt(0))&&65279!==u&&!L(u)&&u!==_&&u!==x&&u!==w&&u!==b&&u!==C&&u!==k&&u!==O&&u!==T&&u!==h&&u!==m&&u!==y&&u!==p&&u!==P&&u!==E&&u!==g&&u!==d&&u!==v&&u!==S&&u!==A&&!L(e.charCodeAt(e.length-1));if(t)for(i=0;i<e.length;i++){if(!U(a=e.charCodeAt(i)))return W;I=I&&q(a)}else{for(i=0;i<e.length;i++){if((a=e.charCodeAt(i))===c)s=!0,f&&(l=l||i-M-1>r&&" "!==e[M+1],M=i);else if(!U(a))return W;I=I&&q(a)}l=l||f&&i-M-1>r&&" "!==e[M+1]}return s||l?n>9&&F(e)?W:l?H:V:I&&!o(e)?z:B}function Y(e,t,n,r){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==I.indexOf(t))return"'"+t+"'";var i=e.indent*Math.max(1,n),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),u=r||e.flowLevel>-1&&n>=e.flowLevel;switch(J(t,u,e.indent,a,function(t){return function(e,t){var n,r;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}(e,t)})){case z:return t;case B:return"'"+t.replace(/'/g,"''")+"'";case V:return"|"+K(t,e.indent)+G(R(t,i));case H:return">"+K(t,e.indent)+G(R(function(e,t){var n,r,o=/(\n+)([^\n]*)/g,i=(u=e.indexOf("\n"),u=-1!==u?u:e.length,o.lastIndex=u,$(e.slice(0,u),t)),a="\n"===e[0]||" "===e[0];var u;for(;r=o.exec(e);){var s=r[1],l=r[2];n=" "===l[0],i+=s+(a||n||""===l?"":"\n")+$(l,t),a=n}return i}(t,a),i));case W:return'"'+function(e){for(var t,n,r,o="",i=0;i<e.length;i++)(t=e.charCodeAt(i))>=55296&&t<=56319&&(n=e.charCodeAt(i+1))>=56320&&n<=57343?(o+=j(1024*(t-55296)+n-56320+65536),i++):(r=M[t],o+=!r&&U(t)?e[i]:r||j(t));return o}(t)+'"';default:throw new o("impossible error: invalid scalar style")}}()}function K(e,t){var n=F(e)?String(t):"",r="\n"===e[e.length-1];return n+(r&&("\n"===e[e.length-2]||"\n"===e)?"+":r?"":"-")+"\n"}function G(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function $(e,t){if(""===e||" "===e[0])return e;for(var n,r,o=/ [^ ]/g,i=0,a=0,u=0,s="";n=o.exec(e);)(u=n.index)-i>t&&(r=a>i?a:u,s+="\n"+e.slice(i,r),i=r+1),a=u;return s+="\n",e.length-i>t&&a>i?s+=e.slice(i,a)+"\n"+e.slice(a+1):s+=e.slice(i),s.slice(1)}function Z(e,t,n){var r,i,a,l,c,f;for(a=0,l=(i=n?e.explicitTypes:e.implicitTypes).length;a<l;a+=1)if(((c=i[a]).instanceOf||c.predicate)&&(!c.instanceOf||"object"==typeof t&&t instanceof c.instanceOf)&&(!c.predicate||c.predicate(t))){if(e.tag=n?c.tag:"?",c.represent){if(f=e.styleMap[c.tag]||c.defaultStyle,"[object Function]"===u.call(c.represent))r=c.represent(t,f);else{if(!s.call(c.represent,f))throw new o("!<"+c.tag+'> tag resolver accepts not "'+f+'" style');r=c.represent[f](t,f)}e.dump=r}return!0}return!1}function X(e,t,n,r,i,a){e.tag=null,e.dump=n,Z(e,n,!1)||Z(e,n,!0);var s=u.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var l,f,p="[object Object]"===s||"[object Array]"===s;if(p&&(f=-1!==(l=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&t>0)&&(i=!1),f&&e.usedDuplicates[l])e.dump="*ref_"+l;else{if(p&&f&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0),"[object Object]"===s)r&&0!==Object.keys(e.dump).length?(!function(e,t,n,r){var i,a,u,s,l,f,p="",d=e.tag,h=Object.keys(n);if(!0===e.sortKeys)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new o("sortKeys must be a boolean or a function");for(i=0,a=h.length;i<a;i+=1)f="",r&&0===i||(f+=D(e,t)),s=n[u=h[i]],X(e,t+1,u,!0,!0,!0)&&((l=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&c===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,l&&(f+=D(e,t)),X(e,t+1,s,!0,l)&&(e.dump&&c===e.dump.charCodeAt(0)?f+=":":f+=": ",p+=f+=e.dump));e.tag=d,e.dump=p||"{}"}(e,t,e.dump,i),f&&(e.dump="&ref_"+l+e.dump)):(!function(e,t,n){var r,o,i,a,u,s="",l=e.tag,c=Object.keys(n);for(r=0,o=c.length;r<o;r+=1)u=e.condenseFlow?'"':"",0!==r&&(u+=", "),a=n[i=c[r]],X(e,t,i,!1,!1)&&(e.dump.length>1024&&(u+="? "),u+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),X(e,t,a,!1,!1)&&(s+=u+=e.dump));e.tag=l,e.dump="{"+s+"}"}(e,t,e.dump),f&&(e.dump="&ref_"+l+" "+e.dump));else if("[object Array]"===s)r&&0!==e.dump.length?(!function(e,t,n,r){var o,i,a="",u=e.tag;for(o=0,i=n.length;o<i;o+=1)X(e,t+1,n[o],!0,!0)&&(r&&0===o||(a+=D(e,t)),e.dump&&c===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=u,e.dump=a||"[]"}(e,t,e.dump,i),f&&(e.dump="&ref_"+l+e.dump)):(!function(e,t,n){var r,o,i="",a=e.tag;for(r=0,o=n.length;r<o;r+=1)X(e,t,n[r],!1,!1)&&(0!==r&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}(e,t,e.dump),f&&(e.dump="&ref_"+l+" "+e.dump));else{if("[object String]"!==s){if(e.skipInvalid)return!1;throw new o("unacceptable kind of an object to dump "+s)}"?"!==e.tag&&Y(e,e.dump,t,a)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function Q(e,t){var n,r,o=[],i=[];for(function e(t,n,r){var o,i,a;if(null!==t&&"object"==typeof t)if(-1!==(i=n.indexOf(t)))-1===r.indexOf(i)&&r.push(i);else if(n.push(t),Array.isArray(t))for(i=0,a=t.length;i<a;i+=1)e(t[i],n,r);else for(o=Object.keys(t),i=0,a=o.length;i<a;i+=1)e(t[o[i]],n,r)}(e,o,i),n=0,r=i.length;n<r;n+=1)t.duplicates.push(o[i[n]]);t.usedDuplicates=new Array(r)}function ee(e,t){var n=new N(t=t||{});return n.noRefs||Q(e,n),X(n,0,e,!0,!0)?n.dump+"\n":""}e.exports.dump=ee,e.exports.safeDump=function(e,t){return ee(e,r.extend({schema:a},t))}},function(e,t,n){"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function o(e){return decodeURIComponent(e.replace(/\+/g," "))}t.stringify=function(e,t){t=t||"";var n=[];for(var o in"string"!=typeof t&&(t="?"),e)r.call(e,o)&&n.push(encodeURIComponent(o)+"="+encodeURIComponent(e[o]));return n.length?t+n.join("&"):""},t.parse=function(e){for(var t,n=/([^=?&]+)=?([^&]*)/g,r={};t=n.exec(e);){var i=o(t[1]),a=o(t[2]);i in r||(r[i]=a)}return r}},function(e,t,n){var r=n(38),o=n(765),i=n(303),a="Expected a function",u=Math.max,s=Math.min;e.exports=function(e,t,n){var l,c,f,p,d,h,v=0,m=!1,g=!1,y=!0;if("function"!=typeof e)throw new TypeError(a);function b(t){var n=l,r=c;return l=c=void 0,v=t,p=e.apply(r,n)}function _(e){var n=e-h;return void 0===h||n>=t||n<0||g&&e-v>=f}function w(){var e=o();if(_(e))return E(e);d=setTimeout(w,function(e){var n=t-(e-h);return g?s(n,f-(e-v)):n}(e))}function E(e){return d=void 0,y&&l?b(e):(l=c=void 0,p)}function x(){var e=o(),n=_(e);if(l=arguments,c=this,h=e,n){if(void 0===d)return function(e){return v=e,d=setTimeout(w,t),m?b(e):p}(h);if(g)return d=setTimeout(w,t),b(h)}return void 0===d&&(d=setTimeout(w,t)),p}return t=i(t)||0,r(n)&&(m=!!n.leading,f=(g="maxWait"in n)?u(i(n.maxWait)||0,t):f,y="trailing"in n?!!n.trailing:y),x.cancel=function(){void 0!==d&&clearTimeout(d),v=0,l=h=c=d=void 0},x.flush=function(){return void 0===d?p:E(o())},x}},function(e,t,n){var r=n(37);e.exports=function(){return r.Date.now()}},function(e,t,n){var r=n(344);e.exports=function(e,t,n){return null==e?e:r(e,t,n)}},function(e,t,n){n(768),e.exports=n(15).Object.getPrototypeOf},function(e,t,n){var r=n(72),o=n(242);n(258)("getPrototypeOf",function(){return function(e){return o(r(e))}})},function(e,t,n){e.exports={default:n(770),__esModule:!0}},function(e,t,n){n(771),e.exports=n(15).Object.setPrototypeOf},function(e,t,n){var r=n(20);r(r.S,"Object",{setPrototypeOf:n(772).set})},function(e,t,n){var r=n(28),o=n(36),i=function(e,t){if(o(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(49)(Function.call,n(261).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return i(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:i}},function(e,t,n){n(774);var r=n(15).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(20);r(r.S,"Object",{create:n(160)})},function(e,t,n){"use strict";e.exports=n(776)},function(e,t,n){"use strict";var r=n(14),o=n(777),i=n(374),a=n(88),u=n(43),s=n(849),l=n(850),c=n(375),f=n(851);n(10);o.inject();var p={findDOMNode:l,render:i.render,unmountComponentAtNode:i.unmountComponentAtNode,version:s,unstable_batchedUpdates:u.batchedUpdates,unstable_renderSubtreeIntoContainer:f};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:r.getClosestInstanceFromNode,getNodeFromInstance:function(e){return e._renderedComponent&&(e=c(e)),e?r.getNodeFromInstance(e):null}},Mount:i,Reconciler:a}),e.exports=p},function(e,t,n){"use strict";var r=n(778),o=n(779),i=n(783),a=n(786),u=n(787),s=n(788),l=n(789),c=n(795),f=n(14),p=n(820),d=n(821),h=n(822),v=n(823),m=n(824),g=n(826),y=n(827),b=n(833),_=n(834),w=n(835),E=!1;e.exports={inject:function(){E||(E=!0,g.EventEmitter.injectReactEventListener(m),g.EventPluginHub.injectEventPluginOrder(a),g.EventPluginUtils.injectComponentTree(f),g.EventPluginUtils.injectTreeTraversal(d),g.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:w,EnterLeaveEventPlugin:u,ChangeEventPlugin:i,SelectEventPlugin:_,BeforeInputEventPlugin:o}),g.HostComponent.injectGenericComponentClass(c),g.HostComponent.injectTextComponentClass(h),g.DOMProperty.injectDOMPropertyConfig(r),g.DOMProperty.injectDOMPropertyConfig(s),g.DOMProperty.injectDOMPropertyConfig(b),g.EmptyComponent.injectEmptyComponentFactory(function(e){return new p(e)}),g.Updates.injectReconcileTransaction(y),g.Updates.injectBatchingStrategy(v),g.Component.injectEnvironment(l))}}},function(e,t,n){"use strict";e.exports={Properties:{"aria-current":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},DOMAttributeNames:{},DOMPropertyNames:{}}},function(e,t,n){"use strict";var r=n(109),o=n(26),i=n(780),a=n(781),u=n(782),s=[9,13,27,32],l=229,c=o.canUseDOM&&"CompositionEvent"in window,f=null;o.canUseDOM&&"documentMode"in document&&(f=document.documentMode);var p,d=o.canUseDOM&&"TextEvent"in window&&!f&&!("object"==typeof(p=window.opera)&&"function"==typeof p.version&&parseInt(p.version(),10)<=12),h=o.canUseDOM&&(!c||f&&f>8&&f<=11);var v=32,m=String.fromCharCode(v),g={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},y=!1;function b(e,t){switch(e){case"topKeyUp":return-1!==s.indexOf(t.keyCode);case"topKeyDown":return t.keyCode!==l;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function _(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}var w=null;function E(e,t,n,o){var u,s;if(c?u=function(e){switch(e){case"topCompositionStart":return g.compositionStart;case"topCompositionEnd":return g.compositionEnd;case"topCompositionUpdate":return g.compositionUpdate}}(e):w?b(e,n)&&(u=g.compositionEnd):function(e,t){return"topKeyDown"===e&&t.keyCode===l}(e,n)&&(u=g.compositionStart),!u)return null;h&&(w||u!==g.compositionStart?u===g.compositionEnd&&w&&(s=w.getData()):w=i.getPooled(o));var f=a.getPooled(u,t,n,o);if(s)f.data=s;else{var p=_(n);null!==p&&(f.data=p)}return r.accumulateTwoPhaseDispatches(f),f}function x(e,t,n,o){var a;if(!(a=d?function(e,t){switch(e){case"topCompositionEnd":return _(t);case"topKeyPress":return t.which!==v?null:(y=!0,m);case"topTextInput":var n=t.data;return n===m&&y?null:n;default:return null}}(e,n):function(e,t){if(w){if("topCompositionEnd"===e||!c&&b(e,t)){var n=w.getData();return i.release(w),w=null,n}return null}switch(e){case"topPaste":return null;case"topKeyPress":return t.which&&!function(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}(t)?String.fromCharCode(t.which):null;case"topCompositionEnd":return h?null:t.data;default:return null}}(e,n)))return null;var s=u.getPooled(g.beforeInput,t,n,o);return s.data=a,r.accumulateTwoPhaseDispatches(s),s}var S={eventTypes:g,extractEvents:function(e,t,n,r){return[E(e,t,n,r),x(e,t,n,r)]}};e.exports=S},function(e,t,n){"use strict";var r=n(13),o=n(69),i=n(354);function a(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}r(a.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[i()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);var u=t>1?1-t:void 0;return this._fallbackText=o.slice(e,u),this._fallbackText}}),o.addPoolingTo(a),e.exports=a},function(e,t,n){"use strict";var r=n(48);function o(e,t,n,o){return r.call(this,e,t,n,o)}r.augmentClass(o,{data:null}),e.exports=o},function(e,t,n){"use strict";var r=n(48);function o(e,t,n,o){return r.call(this,e,t,n,o)}r.augmentClass(o,{data:null}),e.exports=o},function(e,t,n){"use strict";var r=n(110),o=n(109),i=n(26),a=n(14),u=n(43),s=n(48),l=n(357),c=n(214),f=n(215),p=n(358),d={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:["topBlur","topChange","topClick","topFocus","topInput","topKeyDown","topKeyUp","topSelectionChange"]}};function h(e,t,n){var r=s.getPooled(d.change,e,t,n);return r.type="change",o.accumulateTwoPhaseDispatches(r),r}var v=null,m=null;var g=!1;function y(e){var t=h(m,e,c(e));u.batchedUpdates(b,t)}function b(e){r.enqueueEvents(e),r.processEventQueue(!1)}function _(){v&&(v.detachEvent("onchange",y),v=null,m=null)}function w(e,t){var n=l.updateValueIfChanged(e),r=!0===t.simulated&&M._allowSimulatedPassThrough;if(n||r)return e}function E(e,t){if("topChange"===e)return t}function x(e,t,n){"topFocus"===e?(_(),function(e,t){m=t,(v=e).attachEvent("onchange",y)}(t,n)):"topBlur"===e&&_()}i.canUseDOM&&(g=f("change")&&(!document.documentMode||document.documentMode>8));var S=!1;function C(){v&&(v.detachEvent("onpropertychange",k),v=null,m=null)}function k(e){"value"===e.propertyName&&w(m,e)&&y(e)}function A(e,t,n){"topFocus"===e?(C(),function(e,t){m=t,(v=e).attachEvent("onpropertychange",k)}(t,n)):"topBlur"===e&&C()}function O(e,t,n){if("topSelectionChange"===e||"topKeyUp"===e||"topKeyDown"===e)return w(m,n)}function P(e,t,n){if("topClick"===e)return w(t,n)}function T(e,t,n){if("topInput"===e||"topChange"===e)return w(t,n)}i.canUseDOM&&(S=f("input")&&(!document.documentMode||document.documentMode>9));var M={eventTypes:d,_allowSimulatedPassThrough:!0,_isInputEventSupported:S,extractEvents:function(e,t,n,r){var o,i,u,s,l=t?a.getNodeFromInstance(t):window;if("select"===(s=(u=l).nodeName&&u.nodeName.toLowerCase())||"input"===s&&"file"===u.type?g?o=E:i=x:p(l)?S?o=T:(o=O,i=A):function(e){var t=e.nodeName;return t&&"input"===t.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}(l)&&(o=P),o){var c=o(e,t,n);if(c)return h(c,n,r)}i&&i(e,l,t),"topBlur"===e&&function(e,t){if(null!=e){var n=e._wrapperState||t._wrapperState;if(n&&n.controlled&&"number"===t.type){var r=""+t.value;t.getAttribute("value")!==r&&t.setAttribute("value",r)}}}(t,l)}};e.exports=M},function(e,t,n){"use strict";var r=n(785),o={};o.attachRefs=function(e,t){if(null!==t&&"object"==typeof t){var n=t.ref;null!=n&&function(e,t,n){"function"==typeof e?e(t.getPublicInstance()):r.addComponentAsRefTo(t,e,n)}(n,e,t._owner)}},o.shouldUpdateRefs=function(e,t){var n=null,r=null;null!==e&&"object"==typeof e&&(n=e.ref,r=e._owner);var o=null,i=null;return null!==t&&"object"==typeof t&&(o=t.ref,i=t._owner),n!==o||"string"==typeof o&&i!==r},o.detachRefs=function(e,t){if(null!==t&&"object"==typeof t){var n=t.ref;null!=n&&function(e,t,n){"function"==typeof e?e(null):r.removeComponentAsRefFrom(t,e,n)}(n,e,t._owner)}},e.exports=o},function(e,t,n){"use strict";var r=n(11);n(8);function o(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)}var i={addComponentAsRefTo:function(e,t,n){o(n)||r("119"),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){o(n)||r("120");var i=n.getPublicInstance();i&&i.refs[t]===e.getPublicInstance()&&n.detachRef(t)}};e.exports=i},function(e,t,n){"use strict";e.exports=["ResponderEventPlugin","SimpleEventPlugin","TapEventPlugin","EnterLeaveEventPlugin","ChangeEventPlugin","SelectEventPlugin","BeforeInputEventPlugin"]},function(e,t,n){"use strict";var r=n(109),o=n(14),i=n(149),a={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},u={eventTypes:a,extractEvents:function(e,t,n,u){if("topMouseOver"===e&&(n.relatedTarget||n.fromElement))return null;if("topMouseOut"!==e&&"topMouseOver"!==e)return null;var s,l,c;if(u.window===u)s=u;else{var f=u.ownerDocument;s=f?f.defaultView||f.parentWindow:window}if("topMouseOut"===e){l=t;var p=n.relatedTarget||n.toElement;c=p?o.getClosestInstanceFromNode(p):null}else l=null,c=t;if(l===c)return null;var d=null==l?s:o.getNodeFromInstance(l),h=null==c?s:o.getNodeFromInstance(c),v=i.getPooled(a.mouseLeave,l,n,u);v.type="mouseleave",v.target=d,v.relatedTarget=h;var m=i.getPooled(a.mouseEnter,c,n,u);return m.type="mouseenter",m.target=h,m.relatedTarget=d,r.accumulateEnterLeaveDispatches(v,m,l,c),[v,m]}};e.exports=u},function(e,t,n){"use strict";var r=n(87),o=r.injection.MUST_USE_PROPERTY,i=r.injection.HAS_BOOLEAN_VALUE,a=r.injection.HAS_NUMERIC_VALUE,u=r.injection.HAS_POSITIVE_NUMERIC_VALUE,s=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,l={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:i,allowTransparency:0,alt:0,as:0,async:i,autoComplete:0,autoPlay:i,capture:i,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:o|i,cite:0,classID:0,className:0,cols:u,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:i,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:i,defer:i,dir:0,disabled:i,download:s,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:i,formTarget:0,frameBorder:0,headers:0,height:0,hidden:i,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:i,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:o|i,muted:o|i,name:0,nonce:0,noValidate:i,open:i,optimum:0,pattern:0,placeholder:0,playsInline:i,poster:0,preload:0,profile:0,radioGroup:0,readOnly:i,referrerPolicy:0,rel:0,required:i,reversed:i,role:0,rows:u,rowSpan:a,sandbox:0,scope:0,scoped:i,scrolling:0,seamless:i,selected:o|i,shape:0,size:u,sizes:0,span:u,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:a,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:i,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{},DOMMutationMethods:{value:function(e,t){if(null==t)return e.removeAttribute("value");"number"!==e.type||!1===e.hasAttribute("value")?e.setAttribute("value",""+t):e.validity&&!e.validity.badInput&&e.ownerDocument.activeElement!==e&&e.setAttribute("value",""+t)}}};e.exports=l},function(e,t,n){"use strict";var r=n(217),o={processChildrenUpdates:n(794).dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup};e.exports=o},function(e,t,n){"use strict";var r=n(11),o=n(89),i=n(26),a=n(791),u=n(34),s=(n(8),{dangerouslyReplaceNodeWithMarkup:function(e,t){if(i.canUseDOM||r("56"),t||r("57"),"HTML"===e.nodeName&&r("58"),"string"==typeof t){var n=a(t,u)[0];e.parentNode.replaceChild(n,e)}else o.replaceChildWithTree(e,t)}});e.exports=s},function(e,t,n){"use strict";var r=n(26),o=n(792),i=n(793),a=n(8),u=r.canUseDOM?document.createElement("div"):null,s=/^\s*<(\w+)/;e.exports=function(e,t){var n=u;u||a(!1);var r=function(e){var t=e.match(s);return t&&t[1].toLowerCase()}(e),l=r&&i(r);if(l){n.innerHTML=l[1]+e+l[2];for(var c=l[0];c--;)n=n.lastChild}else n.innerHTML=e;var f=n.getElementsByTagName("script");f.length&&(t||a(!1),o(f).forEach(t));for(var p=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return p}},function(e,t,n){"use strict";var r=n(8);e.exports=function(e){return function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}(e)?Array.isArray(e)?e.slice():function(e){var t=e.length;if((Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e)&&r(!1),"number"!=typeof t&&r(!1),0===t||t-1 in e||r(!1),"function"==typeof e.callee&&r(!1),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(e){}for(var n=Array(t),o=0;o<t;o++)n[o]=e[o];return n}(e):[e]}},function(e,t,n){"use strict";var r=n(26),o=n(8),i=r.canUseDOM?document.createElement("div"):null,a={},u=[1,'<select multiple="true">',"</select>"],s=[1,"<table>","</table>"],l=[3,"<table><tbody><tr>","</tr></tbody></table>"],c=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"],f={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:u,option:u,caption:s,colgroup:s,tbody:s,tfoot:s,thead:s,td:l,th:l};["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"].forEach(function(e){f[e]=c,a[e]=!0}),e.exports=function(e){return i||o(!1),f.hasOwnProperty(e)||(e="*"),a.hasOwnProperty(e)||(i.innerHTML="*"===e?"<link />":"<"+e+"></"+e+">",a[e]=!i.firstChild),a[e]?f[e]:null}},function(e,t,n){"use strict";var r=n(217),o=n(14),i={dangerouslyProcessChildrenUpdates:function(e,t){var n=o.getNodeFromInstance(e);r.processUpdates(n,t)}};e.exports=i},function(e,t,n){"use strict";var r=n(11),o=n(13),i=n(796),a=n(797),u=n(89),s=n(218),l=n(87),c=n(363),f=n(110),p=n(211),d=n(152),h=n(351),v=n(14),m=n(807),g=n(809),y=n(364),b=n(810),_=(n(39),n(811)),w=n(818),E=(n(34),n(151)),x=(n(8),n(215),n(222),n(357)),S=(n(226),n(10),h),C=f.deleteListener,k=v.getNodeFromInstance,A=d.listenTo,O=p.registrationNameModules,P={string:!0,number:!0},T="__html",M={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},I=11;function j(e){if(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function N(e,t){t&&(J[e._tag]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&r("137",e._tag,e._currentElement._owner?" Check the render method of "+e._currentElement._owner.getName()+".":""),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&r("60"),"object"==typeof t.dangerouslySetInnerHTML&&T in t.dangerouslySetInnerHTML||r("61")),null!=t.style&&"object"!=typeof t.style&&r("62",j(e)))}function R(e,t,n,r){if(!(r instanceof w)){0;var o=e._hostContainerInfo,i=o._node&&o._node.nodeType===I?o._node:o._ownerDocument;A(t,i),r.getReactMountReady().enqueue(D,{inst:e,registrationName:t,listener:n})}}function D(){f.putListener(this.inst,this.registrationName,this.listener)}function L(){m.postMountWrapper(this)}function U(){b.postMountWrapper(this)}function q(){g.postMountWrapper(this)}var F={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"};function z(){x.track(this)}function B(){this._rootNodeID||r("63");var e=k(this);switch(e||r("64"),this._tag){case"iframe":case"object":this._wrapperState.listeners=[d.trapBubbledEvent("topLoad","load",e)];break;case"video":case"audio":for(var t in this._wrapperState.listeners=[],F)F.hasOwnProperty(t)&&this._wrapperState.listeners.push(d.trapBubbledEvent(t,F[t],e));break;case"source":this._wrapperState.listeners=[d.trapBubbledEvent("topError","error",e)];break;case"img":this._wrapperState.listeners=[d.trapBubbledEvent("topError","error",e),d.trapBubbledEvent("topLoad","load",e)];break;case"form":this._wrapperState.listeners=[d.trapBubbledEvent("topReset","reset",e),d.trapBubbledEvent("topSubmit","submit",e)];break;case"input":case"select":case"textarea":this._wrapperState.listeners=[d.trapBubbledEvent("topInvalid","invalid",e)]}}function V(){y.postUpdateWrapper(this)}var H={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},W={listing:!0,pre:!0,textarea:!0},J=o({menuitem:!0},H),Y=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,K={},G={}.hasOwnProperty;function $(e,t){return e.indexOf("-")>=0||null!=t.is}var Z=1;function X(e){var t=e.type;!function(e){G.call(K,e)||(Y.test(e)||r("65",e),K[e]=!0)}(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}X.displayName="ReactDOMComponent",X.Mixin={mountComponent:function(e,t,n,r){this._rootNodeID=Z++,this._domID=n._idCounter++,this._hostParent=t,this._hostContainerInfo=n;var o,a,l,f=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(B,this);break;case"input":m.mountWrapper(this,f,t),f=m.getHostProps(this,f),e.getReactMountReady().enqueue(z,this),e.getReactMountReady().enqueue(B,this);break;case"option":g.mountWrapper(this,f,t),f=g.getHostProps(this,f);break;case"select":y.mountWrapper(this,f,t),f=y.getHostProps(this,f),e.getReactMountReady().enqueue(B,this);break;case"textarea":b.mountWrapper(this,f,t),f=b.getHostProps(this,f),e.getReactMountReady().enqueue(z,this),e.getReactMountReady().enqueue(B,this)}if(N(this,f),null!=t?(o=t._namespaceURI,a=t._tag):n._tag&&(o=n._namespaceURI,a=n._tag),(null==o||o===s.svg&&"foreignobject"===a)&&(o=s.html),o===s.html&&("svg"===this._tag?o=s.svg:"math"===this._tag&&(o=s.mathml)),this._namespaceURI=o,e.useCreateElement){var p,d=n._ownerDocument;if(o===s.html)if("script"===this._tag){var h=d.createElement("div"),_=this._currentElement.type;h.innerHTML="<"+_+"></"+_+">",p=h.removeChild(h.firstChild)}else p=f.is?d.createElement(this._currentElement.type,f.is):d.createElement(this._currentElement.type);else p=d.createElementNS(o,this._currentElement.type);v.precacheNode(this,p),this._flags|=S.hasCachedChildNodes,this._hostParent||c.setAttributeForRoot(p),this._updateDOMProperties(null,f,e);var w=u(p);this._createInitialChildren(e,f,r,w),l=w}else{var E=this._createOpenTagMarkupAndPutListeners(e,f),x=this._createContentMarkup(e,f,r);l=!x&&H[this._tag]?E+"/>":E+">"+x+"</"+this._currentElement.type+">"}switch(this._tag){case"input":e.getReactMountReady().enqueue(L,this),f.autoFocus&&e.getReactMountReady().enqueue(i.focusDOMComponent,this);break;case"textarea":e.getReactMountReady().enqueue(U,this),f.autoFocus&&e.getReactMountReady().enqueue(i.focusDOMComponent,this);break;case"select":case"button":f.autoFocus&&e.getReactMountReady().enqueue(i.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(q,this)}return l},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(null!=i)if(O.hasOwnProperty(r))i&&R(this,r,i,e);else{"style"===r&&(i&&(i=this._previousStyleCopy=o({},t.style)),i=a.createMarkupForStyles(i,this));var u=null;null!=this._tag&&$(this._tag,t)?M.hasOwnProperty(r)||(u=c.createMarkupForCustomAttribute(r,i)):u=c.createMarkupForProperty(r,i),u&&(n+=" "+u)}}return e.renderToStaticMarkup?n:(this._hostParent||(n+=" "+c.createMarkupForRoot()),n+=" "+c.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var i=P[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)r=E(i);else if(null!=a){r=this.mountChildren(a,e,n).join("")}}return W[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&u.queueHTML(r,o.__html);else{var i=P[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)""!==i&&u.queueText(r,i);else if(null!=a)for(var s=this.mountChildren(a,e,n),l=0;l<s.length;l++)u.queueChild(r,s[l])}},receiveComponent:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,n,r){var o=t.props,i=this._currentElement.props;switch(this._tag){case"input":o=m.getHostProps(this,o),i=m.getHostProps(this,i);break;case"option":o=g.getHostProps(this,o),i=g.getHostProps(this,i);break;case"select":o=y.getHostProps(this,o),i=y.getHostProps(this,i);break;case"textarea":o=b.getHostProps(this,o),i=b.getHostProps(this,i)}switch(N(this,i),this._updateDOMProperties(o,i,e),this._updateDOMChildren(o,i,e,r),this._tag){case"input":m.updateWrapper(this),x.updateValueIfChanged(this);break;case"textarea":b.updateWrapper(this);break;case"select":e.getReactMountReady().enqueue(V,this)}},_updateDOMProperties:function(e,t,n){var r,i,u;for(r in e)if(!t.hasOwnProperty(r)&&e.hasOwnProperty(r)&&null!=e[r])if("style"===r){var s=this._previousStyleCopy;for(i in s)s.hasOwnProperty(i)&&((u=u||{})[i]="");this._previousStyleCopy=null}else O.hasOwnProperty(r)?e[r]&&C(this,r):$(this._tag,e)?M.hasOwnProperty(r)||c.deleteValueForAttribute(k(this),r):(l.properties[r]||l.isCustomAttribute(r))&&c.deleteValueForProperty(k(this),r);for(r in t){var f=t[r],p="style"===r?this._previousStyleCopy:null!=e?e[r]:void 0;if(t.hasOwnProperty(r)&&f!==p&&(null!=f||null!=p))if("style"===r)if(f?f=this._previousStyleCopy=o({},f):this._previousStyleCopy=null,p){for(i in p)!p.hasOwnProperty(i)||f&&f.hasOwnProperty(i)||((u=u||{})[i]="");for(i in f)f.hasOwnProperty(i)&&p[i]!==f[i]&&((u=u||{})[i]=f[i])}else u=f;else if(O.hasOwnProperty(r))f?R(this,r,f,n):p&&C(this,r);else if($(this._tag,t))M.hasOwnProperty(r)||c.setValueForAttribute(k(this),r,f);else if(l.properties[r]||l.isCustomAttribute(r)){var d=k(this);null!=f?c.setValueForProperty(d,r,f):c.deleteValueForProperty(d,r)}}u&&a.setValueForStyles(k(this),u,this)},_updateDOMChildren:function(e,t,n,r){var o=P[typeof e.children]?e.children:null,i=P[typeof t.children]?t.children:null,a=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,u=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,s=null!=o?null:e.children,l=null!=i?null:t.children,c=null!=o||null!=a,f=null!=i||null!=u;null!=s&&null==l?this.updateChildren(null,n,r):c&&!f&&this.updateTextContent(""),null!=i?o!==i&&this.updateTextContent(""+i):null!=u?a!==u&&this.updateMarkup(""+u):null!=l&&this.updateChildren(l,n,r)},getHostNode:function(){return k(this)},unmountComponent:function(e){switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":var t=this._wrapperState.listeners;if(t)for(var n=0;n<t.length;n++)t[n].remove();break;case"input":case"textarea":x.stopTracking(this);break;case"html":case"head":case"body":r("66",this._tag)}this.unmountChildren(e),v.uncacheNode(this),f.deleteAllListeners(this),this._rootNodeID=0,this._domID=0,this._wrapperState=null},getPublicInstance:function(){return k(this)}},o(X.prototype,X.Mixin,_.Mixin),e.exports=X},function(e,t,n){"use strict";var r=n(14),o=n(361),i={focusDOMComponent:function(){o(r.getNodeFromInstance(this))}};e.exports=i},function(e,t,n){"use strict";var r=n(362),o=n(26),i=(n(39),n(798),n(800)),a=n(801),u=n(803),s=(n(10),u(function(e){return a(e)})),l=!1,c="cssFloat";if(o.canUseDOM){var f=document.createElement("div").style;try{f.font=""}catch(e){l=!0}void 0===document.documentElement.style.cssFloat&&(c="styleFloat")}var p={createMarkupForStyles:function(e,t){var n="";for(var r in e)if(e.hasOwnProperty(r)){var o=0===r.indexOf("--"),a=e[r];0,null!=a&&(n+=s(r)+":",n+=i(r,a,t,o)+";")}return n||null},setValueForStyles:function(e,t,n){var o=e.style;for(var a in t)if(t.hasOwnProperty(a)){var u=0===a.indexOf("--");0;var s=i(a,t[a],n,u);if("float"!==a&&"cssFloat"!==a||(a=c),u)o.setProperty(a,s);else if(s)o[a]=s;else{var f=l&&r.shorthandPropertyExpansions[a];if(f)for(var p in f)o[p]="";else o[a]=""}}}};e.exports=p},function(e,t,n){"use strict";var r=n(799),o=/^-ms-/;e.exports=function(e){return r(e.replace(o,"ms-"))}},function(e,t,n){"use strict";var r=/-(.)/g;e.exports=function(e){return e.replace(r,function(e,t){return t.toUpperCase()})}},function(e,t,n){"use strict";var r=n(362),o=(n(10),r.isUnitlessNumber);e.exports=function(e,t,n,r){if(null==t||"boolean"==typeof t||""===t)return"";var i=isNaN(t);return r||i||0===t||o.hasOwnProperty(e)&&o[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}},function(e,t,n){"use strict";var r=n(802),o=/^ms-/;e.exports=function(e){return r(e).replace(o,"-ms-")}},function(e,t,n){"use strict";var r=/([A-Z])/g;e.exports=function(e){return e.replace(r,"-$1").toLowerCase()}},function(e,t,n){"use strict";e.exports=function(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}},function(e,t,n){"use strict";var r=n(151);e.exports=function(e){return'"'+r(e)+'"'}},function(e,t,n){"use strict";var r=n(110);var o={handleTopLevel:function(e,t,n,o){!function(e){r.enqueueEvents(e),r.processEventQueue(!1)}(r.extractEvents(e,t,n,o))}};e.exports=o},function(e,t,n){"use strict";var r=n(26);function o(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}var i={animationend:o("Animation","AnimationEnd"),animationiteration:o("Animation","AnimationIteration"),animationstart:o("Animation","AnimationStart"),transitionend:o("Transition","TransitionEnd")},a={},u={};r.canUseDOM&&(u=document.createElement("div").style,"AnimationEvent"in window||(delete i.animationend.animation,delete i.animationiteration.animation,delete i.animationstart.animation),"TransitionEvent"in window||delete i.transitionend.transition),e.exports=function(e){if(a[e])return a[e];if(!i[e])return e;var t=i[e];for(var n in t)if(t.hasOwnProperty(n)&&n in u)return a[e]=t[n];return""}},function(e,t,n){"use strict";var r=n(11),o=n(13),i=n(363),a=n(220),u=n(14),s=n(43);n(8),n(10);function l(){this._rootNodeID&&f.updateWrapper(this)}function c(e){return"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}var f={getHostProps:function(e,t){var n=a.getValue(t),r=a.getChecked(t);return o({type:void 0,step:void 0,min:void 0,max:void 0},t,{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=r?r:e._wrapperState.initialChecked,onChange:e._wrapperState.onChange})},mountWrapper:function(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:null!=t.checked?t.checked:t.defaultChecked,initialValue:null!=t.value?t.value:n,listeners:null,onChange:function(e){var t=this._currentElement.props,n=a.executeOnChange(t,e);s.asap(l,this);var o=t.name;if("radio"===t.type&&null!=o){for(var i=u.getNodeFromInstance(this),c=i;c.parentNode;)c=c.parentNode;for(var f=c.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),p=0;p<f.length;p++){var d=f[p];if(d!==i&&d.form===i.form){var h=u.getInstanceFromNode(d);h||r("90"),s.asap(l,h)}}}return n}.bind(e),controlled:c(t)}},updateWrapper:function(e){var t=e._currentElement.props,n=t.checked;null!=n&&i.setValueForProperty(u.getNodeFromInstance(e),"checked",n||!1);var r=u.getNodeFromInstance(e),o=a.getValue(t);if(null!=o)if(0===o&&""===r.value)r.value="0";else if("number"===t.type){var s=parseFloat(r.value,10)||0;(o!=s||o==s&&r.value!=o)&&(r.value=""+o)}else r.value!==""+o&&(r.value=""+o);else null==t.value&&null!=t.defaultValue&&r.defaultValue!==""+t.defaultValue&&(r.defaultValue=""+t.defaultValue),null==t.checked&&null!=t.defaultChecked&&(r.defaultChecked=!!t.defaultChecked)},postMountWrapper:function(e){var t=e._currentElement.props,n=u.getNodeFromInstance(e);switch(t.type){case"submit":case"reset":break;case"color":case"date":case"datetime":case"datetime-local":case"month":case"time":case"week":n.value="",n.value=n.defaultValue;break;default:n.value=n.value}var r=n.name;""!==r&&(n.name=""),n.defaultChecked=!n.defaultChecked,n.defaultChecked=!n.defaultChecked,""!==r&&(n.name=r)}};e.exports=f},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";var r=n(13),o=n(75),i=n(14),a=n(364),u=(n(10),!1);function s(e){var t="";return o.Children.forEach(e,function(e){null!=e&&("string"==typeof e||"number"==typeof e?t+=e:u||(u=!0))}),t}var l={mountWrapper:function(e,t,n){var r=null;if(null!=n){var o=n;"optgroup"===o._tag&&(o=o._hostParent),null!=o&&"select"===o._tag&&(r=a.getSelectValueContext(o))}var i,u=null;if(null!=r)if(i=null!=t.value?t.value+"":s(t.children),u=!1,Array.isArray(r)){for(var l=0;l<r.length;l++)if(""+r[l]===i){u=!0;break}}else u=""+r===i;e._wrapperState={selected:u}},postMountWrapper:function(e){var t=e._currentElement.props;null!=t.value&&i.getNodeFromInstance(e).setAttribute("value",t.value)},getHostProps:function(e,t){var n=r({selected:void 0,children:void 0},t);null!=e._wrapperState.selected&&(n.selected=e._wrapperState.selected);var o=s(t.children);return o&&(n.children=o),n}};e.exports=l},function(e,t,n){"use strict";var r=n(11),o=n(13),i=n(220),a=n(14),u=n(43);n(8),n(10);function s(){this._rootNodeID&&l.updateWrapper(this)}var l={getHostProps:function(e,t){return null!=t.dangerouslySetInnerHTML&&r("91"),o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue,onChange:e._wrapperState.onChange})},mountWrapper:function(e,t){var n=i.getValue(t),o=n;if(null==n){var a=t.defaultValue,l=t.children;null!=l&&(null!=a&&r("92"),Array.isArray(l)&&(l.length<=1||r("93"),l=l[0]),a=""+l),null==a&&(a=""),o=a}e._wrapperState={initialValue:""+o,listeners:null,onChange:function(e){var t=this._currentElement.props,n=i.executeOnChange(t,e);return u.asap(s,this),n}.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=a.getNodeFromInstance(e),r=i.getValue(t);if(null!=r){var o=""+r;o!==n.value&&(n.value=o),null==t.defaultValue&&(n.defaultValue=o)}null!=t.defaultValue&&(n.defaultValue=t.defaultValue)},postMountWrapper:function(e){var t=a.getNodeFromInstance(e),n=t.textContent;n===e._wrapperState.initialValue&&(t.value=n)}};e.exports=l},function(e,t,n){"use strict";var r=n(11),o=n(221),i=(n(112),n(39),n(46),n(88)),a=n(812),u=(n(34),n(817));n(8);function s(e,t){return t&&(e=e||[]).push(t),e}function l(e,t){o.processChildrenUpdates(e,t)}var c={Mixin:{_reconcilerInstantiateChildren:function(e,t,n){return a.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,r,o,i){var s,l=0;return s=u(t,l),a.updateChildren(e,s,n,r,o,this,this._hostContainerInfo,i,l),s},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var o=[],a=0;for(var u in r)if(r.hasOwnProperty(u)){var s=r[u],l=0;0;var c=i.mountComponent(s,t,this,this._hostContainerInfo,n,l);s._mountIndex=a++,o.push(c)}return o},updateTextContent:function(e){var t,n=this._renderedChildren;for(var o in a.unmountChildren(n,!1),n)n.hasOwnProperty(o)&&r("118");l(this,[(t=e,{type:"TEXT_CONTENT",content:t,fromIndex:null,fromNode:null,toIndex:null,afterNode:null})])},updateMarkup:function(e){var t,n=this._renderedChildren;for(var o in a.unmountChildren(n,!1),n)n.hasOwnProperty(o)&&r("118");l(this,[(t=e,{type:"SET_MARKUP",content:t,fromIndex:null,fromNode:null,toIndex:null,afterNode:null})])},updateChildren:function(e,t,n){this._updateChildren(e,t,n)},_updateChildren:function(e,t,n){var r=this._renderedChildren,o={},a=[],u=this._reconcilerUpdateChildren(r,e,a,o,t,n);if(u||r){var c,f=null,p=0,d=0,h=0,v=null;for(c in u)if(u.hasOwnProperty(c)){var m=r&&r[c],g=u[c];m===g?(f=s(f,this.moveChild(m,v,p,d)),d=Math.max(m._mountIndex,d),m._mountIndex=p):(m&&(d=Math.max(m._mountIndex,d)),f=s(f,this._mountChildAtIndex(g,a[h],v,p,t,n)),h++),p++,v=i.getHostNode(g)}for(c in o)o.hasOwnProperty(c)&&(f=s(f,this._unmountChild(r[c],o[c])));f&&l(this,f),this._renderedChildren=u}},unmountChildren:function(e){var t=this._renderedChildren;a.unmountChildren(t,e),this._renderedChildren=null},moveChild:function(e,t,n,r){if(e._mountIndex<r)return function(e,t,n){return{type:"MOVE_EXISTING",content:null,fromIndex:e._mountIndex,fromNode:i.getHostNode(e),toIndex:n,afterNode:t}}(e,t,n)},createChild:function(e,t,n){return function(e,t,n){return{type:"INSERT_MARKUP",content:e,fromIndex:null,fromNode:null,toIndex:n,afterNode:t}}(n,t,e._mountIndex)},removeChild:function(e,t){return function(e,t){return{type:"REMOVE_NODE",content:null,fromIndex:e._mountIndex,fromNode:t,toIndex:null,afterNode:null}}(e,t)},_mountChildAtIndex:function(e,t,n,r,o,i){return e._mountIndex=r,this.createChild(e,n,t)},_unmountChild:function(e,t){var n=this.removeChild(e,t);return e._mountIndex=null,n}}};e.exports=c},function(e,t,n){"use strict";(function(t){var r=n(88),o=n(365),i=(n(224),n(223)),a=n(369);n(10);function u(e,t,n,r){var i=void 0===e[n];null!=t&&i&&(e[n]=o(t,!0))}void 0!==t&&Object({NODE_ENV:"production",WEBPACK_INLINE_STYLES:!1});var s={instantiateChildren:function(e,t,n,r){if(null==e)return null;var o={};return a(e,u,o),o},updateChildren:function(e,t,n,a,u,s,l,c,f){if(t||e){var p,d;for(p in t)if(t.hasOwnProperty(p)){var h=(d=e&&e[p])&&d._currentElement,v=t[p];if(null!=d&&i(h,v))r.receiveComponent(d,v,u,c),t[p]=d;else{d&&(a[p]=r.getHostNode(d),r.unmountComponent(d,!1));var m=o(v,!0);t[p]=m;var g=r.mountComponent(m,u,s,l,c,f);n.push(g)}}for(p in e)!e.hasOwnProperty(p)||t&&t.hasOwnProperty(p)||(d=e[p],a[p]=r.getHostNode(d),r.unmountComponent(d,!1))}},unmountChildren:function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];r.unmountComponent(o,t)}}};e.exports=s}).call(t,n(55))},function(e,t,n){"use strict";var r=n(11),o=n(13),i=n(75),a=n(221),u=n(46),s=n(213),l=n(112),c=(n(39),n(366)),f=n(88),p=n(126),d=(n(8),n(222)),h=n(223),v=(n(10),0),m=1,g=2;function y(e){}function b(e,t){0}y.prototype.render=function(){var e=l.get(this)._currentElement.type,t=e(this.props,this.context,this.updater);return b(e,t),t};var _=1,w={construct:function(e){this._currentElement=e,this._rootNodeID=0,this._compositeType=null,this._instance=null,this._hostParent=null,this._hostContainerInfo=null,this._updateBatchNumber=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedNodeType=null,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null,this._calledComponentWillUnmount=!1},mountComponent:function(e,t,n,o){this._context=o,this._mountOrder=_++,this._hostParent=t,this._hostContainerInfo=n;var a,u=this._currentElement.props,s=this._processContext(o),c=this._currentElement.type,f=e.getUpdateQueue(),d=function(e){return!(!e.prototype||!e.prototype.isReactComponent)}(c),h=this._constructComponent(d,u,s,f);d||null!=h&&null!=h.render?!function(e){return!(!e.prototype||!e.prototype.isPureReactComponent)}(c)?this._compositeType=v:this._compositeType=m:(a=h,b(),null===h||!1===h||i.isValidElement(h)||r("105",c.displayName||c.name||"Component"),h=new y(c),this._compositeType=g),h.props=u,h.context=s,h.refs=p,h.updater=f,this._instance=h,l.set(h,this);var w,E=h.state;return void 0===E&&(h.state=E=null),("object"!=typeof E||Array.isArray(E))&&r("106",this.getName()||"ReactCompositeComponent"),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,w=h.unstable_handleError?this.performInitialMountWithErrorHandling(a,t,n,e,o):this.performInitialMount(a,t,n,e,o),h.componentDidMount&&e.getReactMountReady().enqueue(h.componentDidMount,h),w},_constructComponent:function(e,t,n,r){return this._constructComponentWithoutOwner(e,t,n,r)},_constructComponentWithoutOwner:function(e,t,n,r){var o=this._currentElement.type;return e?new o(t,n,r):o(t,n,r)},performInitialMountWithErrorHandling:function(e,t,n,r,o){var i,a=r.checkpoint();try{i=this.performInitialMount(e,t,n,r,o)}catch(u){r.rollback(a),this._instance.unstable_handleError(u),this._pendingStateQueue&&(this._instance.state=this._processPendingState(this._instance.props,this._instance.context)),a=r.checkpoint(),this._renderedComponent.unmountComponent(!0),r.rollback(a),i=this.performInitialMount(e,t,n,r,o)}return i},performInitialMount:function(e,t,n,r,o){var i=this._instance,a=0;i.componentWillMount&&(i.componentWillMount(),this._pendingStateQueue&&(i.state=this._processPendingState(i.props,i.context))),void 0===e&&(e=this._renderValidatedComponent());var u=c.getType(e);this._renderedNodeType=u;var s=this._instantiateReactComponent(e,u!==c.EMPTY);return this._renderedComponent=s,f.mountComponent(s,r,t,n,this._processChildContext(o),a)},getHostNode:function(){return f.getHostNode(this._renderedComponent)},unmountComponent:function(e){if(this._renderedComponent){var t=this._instance;if(t.componentWillUnmount&&!t._calledComponentWillUnmount)if(t._calledComponentWillUnmount=!0,e){var n=this.getName()+".componentWillUnmount()";s.invokeGuardedCallback(n,t.componentWillUnmount.bind(t))}else t.componentWillUnmount();this._renderedComponent&&(f.unmountComponent(this._renderedComponent,e),this._renderedNodeType=null,this._renderedComponent=null,this._instance=null),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=0,this._topLevelWrapper=null,l.remove(t)}},_maskContext:function(e){var t=this._currentElement.type.contextTypes;if(!t)return p;var n={};for(var r in t)n[r]=e[r];return n},_processContext:function(e){var t=this._maskContext(e);return t},_processChildContext:function(e){var t,n=this._currentElement.type,i=this._instance;if(i.getChildContext&&(t=i.getChildContext()),t){for(var a in"object"!=typeof n.childContextTypes&&r("107",this.getName()||"ReactCompositeComponent"),t)a in n.childContextTypes||r("108",this.getName()||"ReactCompositeComponent",a);return o({},e,t)}return e},_checkContextTypes:function(e,t,n){0},receiveComponent:function(e,t,n){var r=this._currentElement,o=this._context;this._pendingElement=null,this.updateComponent(t,r,e,o,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement?f.receiveComponent(this,this._pendingElement,e,this._context):null!==this._pendingStateQueue||this._pendingForceUpdate?this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context):this._updateBatchNumber=null},updateComponent:function(e,t,n,o,i){var a=this._instance;null==a&&r("136",this.getName()||"ReactCompositeComponent");var u,s=!1;this._context===i?u=a.context:(u=this._processContext(i),s=!0);var l=t.props,c=n.props;t!==n&&(s=!0),s&&a.componentWillReceiveProps&&a.componentWillReceiveProps(c,u);var f=this._processPendingState(c,u),p=!0;this._pendingForceUpdate||(a.shouldComponentUpdate?p=a.shouldComponentUpdate(c,f,u):this._compositeType===m&&(p=!d(l,c)||!d(a.state,f))),this._updateBatchNumber=null,p?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,c,f,u,e,i)):(this._currentElement=n,this._context=i,a.props=c,a.state=f,a.context=u)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,i=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(i&&1===r.length)return r[0];for(var a=o({},i?r[0]:n.state),u=i?1:0;u<r.length;u++){var s=r[u];o(a,"function"==typeof s?s.call(n,a,e,t):s)}return a},_performComponentUpdate:function(e,t,n,r,o,i){var a,u,s,l=this._instance,c=Boolean(l.componentDidUpdate);c&&(a=l.props,u=l.state,s=l.context),l.componentWillUpdate&&l.componentWillUpdate(t,n,r),this._currentElement=e,this._context=i,l.props=t,l.state=n,l.context=r,this._updateRenderedComponent(o,i),c&&o.getReactMountReady().enqueue(l.componentDidUpdate.bind(l,a,u,s),l)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,r=n._currentElement,o=this._renderValidatedComponent(),i=0;if(h(r,o))f.receiveComponent(n,o,e,this._processChildContext(t));else{var a=f.getHostNode(n);f.unmountComponent(n,!1);var u=c.getType(o);this._renderedNodeType=u;var s=this._instantiateReactComponent(o,u!==c.EMPTY);this._renderedComponent=s;var l=f.mountComponent(s,e,this._hostParent,this._hostContainerInfo,this._processChildContext(t),i);this._replaceNodeWithMarkup(a,l,n)}},_replaceNodeWithMarkup:function(e,t,n){a.replaceNodeWithMarkup(e,t,n)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e=this._instance;return e.render()},_renderValidatedComponent:function(){var e;if(this._compositeType!==g){u.current=this;try{e=this._renderValidatedComponentWithoutOwnerOrContext()}finally{u.current=null}}else e=this._renderValidatedComponentWithoutOwnerOrContext();return null===e||!1===e||i.isValidElement(e)||r("109",this.getName()||"ReactCompositeComponent"),e},attachRef:function(e,t){var n=this.getPublicInstance();null==n&&r("110");var o=t.getPublicInstance();(n.refs===p?n.refs={}:n.refs)[e]=o},detachRef:function(e){delete this.getPublicInstance().refs[e]},getName:function(){var e=this._currentElement.type,t=this._instance&&this._instance.constructor;return e.displayName||t&&t.displayName||e.name||t&&t.name||null},getPublicInstance:function(){var e=this._instance;return this._compositeType===g?null:e},_instantiateReactComponent:null};e.exports=w},function(e,t,n){"use strict";var r=1;e.exports=function(){return r++}},function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=r},function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";e.exports=function(e){var t=e&&(r&&e[r]||e[o]);if("function"==typeof t)return t}},function(e,t,n){"use strict";(function(t){n(224);var r=n(369);n(10);function o(e,t,n,r){if(e&&"object"==typeof e){var o=e,i=void 0===o[n];0,i&&null!=t&&(o[n]=t)}}void 0!==t&&Object({NODE_ENV:"production",WEBPACK_INLINE_STYLES:!1}),e.exports=function(e,t){if(null==e)return e;var n={};return r(e,o,n),n}}).call(t,n(55))},function(e,t,n){"use strict";var r=n(13),o=n(69),i=n(148),a=(n(39),n(819)),u=[];var s={enqueue:function(){}};function l(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.useCreateElement=!1,this.updateQueue=new a(this)}var c={getTransactionWrappers:function(){return u},getReactMountReady:function(){return s},getUpdateQueue:function(){return this.updateQueue},destructor:function(){},checkpoint:function(){},rollback:function(){}};r(l.prototype,i,c),o.addPoolingTo(l),e.exports=l},function(e,t,n){"use strict";var r=n(225);n(10);var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.transaction=t}return e.prototype.isMounted=function(e){return!1},e.prototype.enqueueCallback=function(e,t,n){this.transaction.isInTransaction()&&r.enqueueCallback(e,t,n)},e.prototype.enqueueForceUpdate=function(e){this.transaction.isInTransaction()&&r.enqueueForceUpdate(e)},e.prototype.enqueueReplaceState=function(e,t){this.transaction.isInTransaction()&&r.enqueueReplaceState(e,t)},e.prototype.enqueueSetState=function(e,t){this.transaction.isInTransaction()&&r.enqueueSetState(e,t)},e}();e.exports=o},function(e,t,n){"use strict";var r=n(13),o=n(89),i=n(14),a=function(e){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};r(a.prototype,{mountComponent:function(e,t,n,r){var a=n._idCounter++;this._domID=a,this._hostParent=t,this._hostContainerInfo=n;var u=" react-empty: "+this._domID+" ";if(e.useCreateElement){var s=n._ownerDocument.createComment(u);return i.precacheNode(this,s),o(s)}return e.renderToStaticMarkup?"":"\x3c!--"+u+"--\x3e"},receiveComponent:function(){},getHostNode:function(){return i.getNodeFromInstance(this)},unmountComponent:function(){i.uncacheNode(this)}}),e.exports=a},function(e,t,n){"use strict";var r=n(11);n(8);function o(e,t){"_hostNode"in e||r("33"),"_hostNode"in t||r("33");for(var n=0,o=e;o;o=o._hostParent)n++;for(var i=0,a=t;a;a=a._hostParent)i++;for(;n-i>0;)e=e._hostParent,n--;for(;i-n>0;)t=t._hostParent,i--;for(var u=n;u--;){if(e===t)return e;e=e._hostParent,t=t._hostParent}return null}e.exports={isAncestor:function(e,t){"_hostNode"in e||r("35"),"_hostNode"in t||r("35");for(;t;){if(t===e)return!0;t=t._hostParent}return!1},getLowestCommonAncestor:o,getParentInstance:function(e){return"_hostNode"in e||r("36"),e._hostParent},traverseTwoPhase:function(e,t,n){for(var r,o=[];e;)o.push(e),e=e._hostParent;for(r=o.length;r-- >0;)t(o[r],"captured",n);for(r=0;r<o.length;r++)t(o[r],"bubbled",n)},traverseEnterLeave:function(e,t,n,r,i){for(var a=e&&t?o(e,t):null,u=[];e&&e!==a;)u.push(e),e=e._hostParent;for(var s,l=[];t&&t!==a;)l.push(t),t=t._hostParent;for(s=0;s<u.length;s++)n(u[s],"bubbled",r);for(s=l.length;s-- >0;)n(l[s],"captured",i)}}},function(e,t,n){"use strict";var r=n(11),o=n(13),i=n(217),a=n(89),u=n(14),s=n(151),l=(n(8),n(226),function(e){this._currentElement=e,this._stringText=""+e,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(l.prototype,{mountComponent:function(e,t,n,r){var o=n._idCounter++,i=" react-text: "+o+" ";if(this._domID=o,this._hostParent=t,e.useCreateElement){var l=n._ownerDocument,c=l.createComment(i),f=l.createComment(" /react-text "),p=a(l.createDocumentFragment());return a.queueChild(p,a(c)),this._stringText&&a.queueChild(p,a(l.createTextNode(this._stringText))),a.queueChild(p,a(f)),u.precacheNode(this,c),this._closingComment=f,p}var d=s(this._stringText);return e.renderToStaticMarkup?d:"\x3c!--"+i+"--\x3e"+d+"\x3c!-- /react-text --\x3e"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();i.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=u.getNodeFromInstance(this).nextSibling;;){if(null==t&&r("67",this._domID),8===t.nodeType&&" /react-text "===t.nodeValue){this._closingComment=t;break}t=t.nextSibling}return e=[this._hostNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,u.uncacheNode(this)}}),e.exports=l},function(e,t,n){"use strict";var r=n(13),o=n(43),i=n(148),a=n(34),u={initialize:a,close:function(){f.isBatchingUpdates=!1}},s=[{initialize:a,close:o.flushBatchedUpdates.bind(o)},u];function l(){this.reinitializeTransaction()}r(l.prototype,i,{getTransactionWrappers:function(){return s}});var c=new l,f={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,i){var a=f.isBatchingUpdates;return f.isBatchingUpdates=!0,a?e(t,n,r,o,i):c.perform(e,null,t,n,r,o,i)}};e.exports=f},function(e,t,n){"use strict";var r=n(13),o=n(371),i=n(26),a=n(69),u=n(14),s=n(43),l=n(214),c=n(825);function f(e){for(;e._hostParent;)e=e._hostParent;var t=u.getNodeFromInstance(e).parentNode;return u.getClosestInstanceFromNode(t)}function p(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function d(e){var t=l(e.nativeEvent),n=u.getClosestInstanceFromNode(t),r=n;do{e.ancestors.push(r),r=r&&f(r)}while(r);for(var o=0;o<e.ancestors.length;o++)n=e.ancestors[o],h._handleTopLevel(e.topLevelType,n,e.nativeEvent,l(e.nativeEvent))}r(p.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),a.addPoolingTo(p,a.twoArgumentPooler);var h={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:i.canUseDOM?window:null,setHandleTopLevel:function(e){h._handleTopLevel=e},setEnabled:function(e){h._enabled=!!e},isEnabled:function(){return h._enabled},trapBubbledEvent:function(e,t,n){return n?o.listen(n,t,h.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){return n?o.capture(n,t,h.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=function(e){e(c(window))}.bind(null,e);o.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(h._enabled){var n=p.getPooled(e,t);try{s.batchedUpdates(d,n)}finally{p.release(n)}}}};e.exports=h},function(e,t,n){"use strict";e.exports=function(e){return e.Window&&e instanceof e.Window?{x:e.pageXOffset||e.document.documentElement.scrollLeft,y:e.pageYOffset||e.document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}},function(e,t,n){"use strict";var r=n(87),o=n(110),i=n(212),a=n(221),u=n(367),s=n(152),l=n(368),c=n(43),f={Component:a.injection,DOMProperty:r.injection,EmptyComponent:u.injection,EventPluginHub:o.injection,EventPluginUtils:i.injection,EventEmitter:s.injection,HostComponent:l.injection,Updates:c.injection};e.exports=f},function(e,t,n){"use strict";var r=n(13),o=n(355),i=n(69),a=n(152),u=n(372),s=(n(39),n(148)),l=n(225),c=[{initialize:u.getSelectionInformation,close:u.restoreSelection},{initialize:function(){var e=a.isEnabled();return a.setEnabled(!1),e},close:function(e){a.setEnabled(e)}},{initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}}];function f(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=o.getPooled(null),this.useCreateElement=e}var p={getTransactionWrappers:function(){return c},getReactMountReady:function(){return this.reactMountReady},getUpdateQueue:function(){return l},checkpoint:function(){return this.reactMountReady.checkpoint()},rollback:function(e){this.reactMountReady.rollback(e)},destructor:function(){o.release(this.reactMountReady),this.reactMountReady=null}};r(f.prototype,s,p),i.addPoolingTo(f),e.exports=f},function(e,t,n){"use strict";var r=n(26),o=n(829),i=n(354);function a(e,t,n,r){return e===n&&t===r}var u=r.canUseDOM&&"selection"in document&&!("getSelection"in window),s={getOffsets:u?function(e){var t=document.selection.createRange(),n=t.text.length,r=t.duplicate();r.moveToElementText(e),r.setEndPoint("EndToStart",t);var o=r.text.length;return{start:o,end:o+n}}:function(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,r=t.anchorOffset,o=t.focusNode,i=t.focusOffset,u=t.getRangeAt(0);try{u.startContainer.nodeType,u.endContainer.nodeType}catch(e){return null}var s=a(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset)?0:u.toString().length,l=u.cloneRange();l.selectNodeContents(e),l.setEnd(u.startContainer,u.startOffset);var c=a(l.startContainer,l.startOffset,l.endContainer,l.endOffset)?0:l.toString().length,f=c+s,p=document.createRange();p.setStart(n,r),p.setEnd(o,i);var d=p.collapsed;return{start:d?f:c,end:d?c:f}},setOffsets:u?function(e,t){var n,r,o=document.selection.createRange().duplicate();void 0===t.end?r=n=t.start:t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}:function(e,t){if(window.getSelection){var n=window.getSelection(),r=e[i()].length,a=Math.min(t.start,r),u=void 0===t.end?a:Math.min(t.end,r);if(!n.extend&&a>u){var s=u;u=a,a=s}var l=o(e,a),c=o(e,u);if(l&&c){var f=document.createRange();f.setStart(l.node,l.offset),n.removeAllRanges(),a>u?(n.addRange(f),n.extend(c.node,c.offset)):(f.setEnd(c.node,c.offset),n.addRange(f))}}}};e.exports=s},function(e,t,n){"use strict";function r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function o(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}e.exports=function(e,t){for(var n=r(e),i=0,a=0;n;){if(3===n.nodeType){if(a=i+n.textContent.length,i<=t&&a>=t)return{node:n,offset:t-i};i=a}n=r(o(n))}}},function(e,t,n){"use strict";var r=n(831);e.exports=function e(t,n){return!(!t||!n)&&(t===n||!r(t)&&(r(n)?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}},function(e,t,n){"use strict";var r=n(832);e.exports=function(e){return r(e)&&3==e.nodeType}},function(e,t,n){"use strict";e.exports=function(e){var t=(e?e.ownerDocument||e:document).defaultView||window;return!(!e||!("function"==typeof t.Node?e instanceof t.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}},function(e,t,n){"use strict";var r="http://www.w3.org/1999/xlink",o="http://www.w3.org/XML/1998/namespace",i={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},a={Properties:{},DOMAttributeNamespaces:{xlinkActuate:r,xlinkArcrole:r,xlinkHref:r,xlinkRole:r,xlinkShow:r,xlinkTitle:r,xlinkType:r,xmlBase:o,xmlLang:o,xmlSpace:o},DOMAttributeNames:{}};Object.keys(i).forEach(function(e){a.Properties[e]=0,i[e]&&(a.DOMAttributeNames[e]=i[e])}),e.exports=a},function(e,t,n){"use strict";var r=n(109),o=n(26),i=n(14),a=n(372),u=n(48),s=n(373),l=n(358),c=n(222),f=o.canUseDOM&&"documentMode"in document&&document.documentMode<=11,p={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},d=null,h=null,v=null,m=!1,g=!1;function y(e,t){if(m||null==d||d!==s())return null;var n=function(e){if("selectionStart"in e&&a.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}(d);if(!v||!c(v,n)){v=n;var o=u.getPooled(p.select,h,e,t);return o.type="select",o.target=d,r.accumulateTwoPhaseDispatches(o),o}return null}var b={eventTypes:p,extractEvents:function(e,t,n,r){if(!g)return null;var o=t?i.getNodeFromInstance(t):window;switch(e){case"topFocus":(l(o)||"true"===o.contentEditable)&&(d=o,h=t,v=null);break;case"topBlur":d=null,h=null,v=null;break;case"topMouseDown":m=!0;break;case"topContextMenu":case"topMouseUp":return m=!1,y(n,r);case"topSelectionChange":if(f)break;case"topKeyDown":case"topKeyUp":return y(n,r)}return null},didPutListener:function(e,t,n){"onSelect"===t&&(g=!0)}};e.exports=b},function(e,t,n){"use strict";var r=n(11),o=n(371),i=n(109),a=n(14),u=n(836),s=n(837),l=n(48),c=n(838),f=n(839),p=n(149),d=n(841),h=n(842),v=n(843),m=n(111),g=n(844),y=n(34),b=n(227),_=(n(8),{}),w={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(e){var t=e[0].toUpperCase()+e.slice(1),n="on"+t,r="top"+t,o={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[r]};_[e]=o,w[r]=o});var E={};function x(e){return"."+e._rootNodeID}function S(e){return"button"===e||"input"===e||"select"===e||"textarea"===e}var C={eventTypes:_,extractEvents:function(e,t,n,o){var a,y=w[e];if(!y)return null;switch(e){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":a=l;break;case"topKeyPress":if(0===b(n))return null;case"topKeyDown":case"topKeyUp":a=f;break;case"topBlur":case"topFocus":a=c;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":a=p;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":a=d;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":a=h;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":a=u;break;case"topTransitionEnd":a=v;break;case"topScroll":a=m;break;case"topWheel":a=g;break;case"topCopy":case"topCut":case"topPaste":a=s}a||r("86",e);var _=a.getPooled(y,t,n,o);return i.accumulateTwoPhaseDispatches(_),_},didPutListener:function(e,t,n){if("onClick"===t&&!S(e._tag)){var r=x(e),i=a.getNodeFromInstance(e);E[r]||(E[r]=o.listen(i,"click",y))}},willDeleteListener:function(e,t){if("onClick"===t&&!S(e._tag)){var n=x(e);E[n].remove(),delete E[n]}}};e.exports=C},function(e,t,n){"use strict";var r=n(48);function o(e,t,n,o){return r.call(this,e,t,n,o)}r.augmentClass(o,{animationName:null,elapsedTime:null,pseudoElement:null}),e.exports=o},function(e,t,n){"use strict";var r=n(48),o={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};function i(e,t,n,o){return r.call(this,e,t,n,o)}r.augmentClass(i,o),e.exports=i},function(e,t,n){"use strict";var r=n(111);function o(e,t,n,o){return r.call(this,e,t,n,o)}r.augmentClass(o,{relatedTarget:null}),e.exports=o},function(e,t,n){"use strict";var r=n(111),o=n(227),i={key:n(840),location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:n(216),charCode:function(e){return"keypress"===e.type?o(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?o(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};function a(e,t,n,o){return r.call(this,e,t,n,o)}r.augmentClass(a,i),e.exports=a},function(e,t,n){"use strict";var r=n(227),o={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=function(e){if(e.key){var t=o[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=r(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?i[e.keyCode]||"Unidentified":""}},function(e,t,n){"use strict";var r=n(149);function o(e,t,n,o){return r.call(this,e,t,n,o)}r.augmentClass(o,{dataTransfer:null}),e.exports=o},function(e,t,n){"use strict";var r=n(111),o={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:n(216)};function i(e,t,n,o){return r.call(this,e,t,n,o)}r.augmentClass(i,o),e.exports=i},function(e,t,n){"use strict";var r=n(48);function o(e,t,n,o){return r.call(this,e,t,n,o)}r.augmentClass(o,{propertyName:null,elapsedTime:null,pseudoElement:null}),e.exports=o},function(e,t,n){"use strict";var r=n(149);function o(e,t,n,o){return r.call(this,e,t,n,o)}r.augmentClass(o,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),e.exports=o},function(e,t,n){"use strict";n(226);var r=9;e.exports=function(e,t){var n={_topLevelWrapper:e,_idCounter:1,_ownerDocument:t?t.nodeType===r?t:t.ownerDocument:null,_node:t,_tag:t?t.nodeName.toLowerCase():null,_namespaceURI:t?t.namespaceURI:null};return n}},function(e,t,n){"use strict";e.exports={useCreateElement:!0,useFiber:!1}},function(e,t,n){"use strict";var r=n(848),o=/\/?>/,i=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return i.test(e)?e:e.replace(o," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);return n=n&&parseInt(n,10),r(e)===n}};e.exports=a},function(e,t,n){"use strict";var r=65521;e.exports=function(e){for(var t=1,n=0,o=0,i=e.length,a=-4&i;o<a;){for(var u=Math.min(o+4096,a);o<u;o+=4)n+=(t+=e.charCodeAt(o))+(t+=e.charCodeAt(o+1))+(t+=e.charCodeAt(o+2))+(t+=e.charCodeAt(o+3));t%=r,n%=r}for(;o<i;o++)n+=t+=e.charCodeAt(o);return(t%=r)|(n%=r)<<16}},function(e,t,n){"use strict";e.exports="15.6.2"},function(e,t,n){"use strict";var r=n(11),o=(n(46),n(14)),i=n(112),a=n(375);n(8),n(10);e.exports=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=i.get(e);if(t)return(t=a(t))?o.getNodeFromInstance(t):null;"function"==typeof e.render?r("44"):r("45",Object.keys(e))}},function(e,t,n){"use strict";var r=n(374);e.exports=r.renderSubtreeIntoContainer},function(e,t,n){"use strict";t.__esModule=!0,t.connect=t.Provider=void 0;var r=i(n(853)),o=i(n(855));function i(e){return e&&e.__esModule?e:{default:e}}t.Provider=r.default,t.connect=o.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(0),o=a(n(1)),i=a(n(376));a(n(377));function a(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n,r));return o.store=n.store,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getChildContext=function(){return{store:this.store}},t.prototype.render=function(){return r.Children.only(this.props.children)},t}(r.Component);t.default=u,u.propTypes={store:i.default.isRequired,children:o.default.element.isRequired},u.childContextTypes={store:i.default.isRequired}},function(e,t,n){"use strict";var r=n(34),o=n(8),i=n(270);e.exports=function(){function e(e,t,n,r,a,u){u!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(e,t,n){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},m=Boolean(e),g=e||f,y=void 0;y="function"==typeof t?t:t?(0,u.default)(t):p;var b=n||d,_=c.pure,w=void 0===_||_,E=c.withRef,x=void 0!==E&&E,S=w&&b!==d,C=v++;return function(e){var t="Connect("+function(e){return e.displayName||e.name||"Component"}(e)+")";var n=function(n){function i(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,n.call(this,e,r));o.version=C,o.store=e.store||r.store,(0,l.default)(o.store,'Could not find "store" in either the context or props of "'+t+'". Either wrap the root component in a <Provider>, or explicitly pass "store" as a prop to "'+t+'".');var a=o.store.getState();return o.state={storeState:a},o.clearCache(),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,n),i.prototype.shouldComponentUpdate=function(){return!w||this.haveOwnPropsChanged||this.hasStoreStateChanged},i.prototype.computeStateProps=function(e,t){if(!this.finalMapStateToProps)return this.configureFinalMapState(e,t);var n=e.getState(),r=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(n,t):this.finalMapStateToProps(n);return r},i.prototype.configureFinalMapState=function(e,t){var n=g(e.getState(),t),r="function"==typeof n;return this.finalMapStateToProps=r?n:g,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,r?this.computeStateProps(e,t):n},i.prototype.computeDispatchProps=function(e,t){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(e,t);var n=e.dispatch,r=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(n,t):this.finalMapDispatchToProps(n);return r},i.prototype.configureFinalMapDispatch=function(e,t){var n=y(e.dispatch,t),r="function"==typeof n;return this.finalMapDispatchToProps=r?n:y,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,r?this.computeDispatchProps(e,t):n},i.prototype.updateStatePropsIfNeeded=function(){var e=this.computeStateProps(this.store,this.props);return(!this.stateProps||!(0,a.default)(e,this.stateProps))&&(this.stateProps=e,!0)},i.prototype.updateDispatchPropsIfNeeded=function(){var e=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!(0,a.default)(e,this.dispatchProps))&&(this.dispatchProps=e,!0)},i.prototype.updateMergedPropsIfNeeded=function(){var e=function(e,t,n){var r=b(e,t,n);0;return r}(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&S&&(0,a.default)(e,this.mergedProps))&&(this.mergedProps=e,!0)},i.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},i.prototype.trySubscribe=function(){m&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},i.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},i.prototype.componentDidMount=function(){this.trySubscribe()},i.prototype.componentWillReceiveProps=function(e){w&&(0,a.default)(e,this.props)||(this.haveOwnPropsChanged=!0)},i.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},i.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},i.prototype.handleChange=function(){if(this.unsubscribe){var e=this.store.getState(),t=this.state.storeState;if(!w||t!==e){if(w&&!this.doStatePropsDependOnOwnProps){var n=function(e,t){try{return e.apply(t)}catch(e){return h.value=e,h}}(this.updateStatePropsIfNeeded,this);if(!n)return;n===h&&(this.statePropsPrecalculationError=h.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:e})}}},i.prototype.getWrappedInstance=function(){return(0,l.default)(x,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},i.prototype.render=function(){var t=this.haveOwnPropsChanged,n=this.hasStoreStateChanged,i=this.haveStatePropsBeenPrecalculated,a=this.statePropsPrecalculationError,u=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,a)throw a;var s=!0,l=!0;w&&u&&(s=n||t&&this.doStatePropsDependOnOwnProps,l=t&&this.doDispatchPropsDependOnOwnProps);var c=!1,f=!1;i?c=!0:s&&(c=this.updateStatePropsIfNeeded()),l&&(f=this.updateDispatchPropsIfNeeded());return!(!!(c||f||t)&&this.updateMergedPropsIfNeeded())&&u?u:(this.renderedElement=x?(0,o.createElement)(e,r({},this.mergedProps,{ref:"wrappedInstance"})):(0,o.createElement)(e,this.mergedProps),this.renderedElement)},i}(o.Component);return n.displayName=t,n.WrappedComponent=e,n.contextTypes={store:i.default},n.propTypes={store:i.default},(0,s.default)(n,e)}};var o=n(0),i=c(n(376)),a=c(n(856)),u=c(n(857)),s=(c(n(377)),c(n(228)),c(n(858))),l=c(n(859));function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){return{}},p=function(e){return{dispatch:e}},d=function(e,t,n){return r({},n,e,t)};var h={value:null};var v=0},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(e===t)return!0;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=Object.prototype.hasOwnProperty,i=0;i<n.length;i++)if(!o.call(t,n[i])||e[n[i]]!==t[n[i]])return!1;return!0}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return function(t){return(0,r.bindActionCreators)(e,t)}};var r=n(271)},function(e,t,n){var r;r=function(){"use strict";var e={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},t={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n=Object.defineProperty,r=Object.getOwnPropertyNames,o=Object.getOwnPropertySymbols,i=Object.getOwnPropertyDescriptor,a=Object.getPrototypeOf,u=a&&a(Object);return function s(l,c,f){if("string"!=typeof c){if(u){var p=a(c);p&&p!==u&&s(l,p,f)}var d=r(c);o&&(d=d.concat(o(c)));for(var h=0;h<d.length;++h){var v=d[h];if(!(e[v]||t[v]||f&&f[v])){var m=i(c,v);try{n(l,v,m)}catch(e){}}}return l}return l}},e.exports=r()},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,i,a,u){if(!e){var s;if(void 0===t)s=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,o,i,a,u],c=0;(s=new Error(t.replace(/%s/g,function(){return l[c++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}}},function(e,t,n){var r=n(280),o=n(378),i=n(882),a=n(79),u=n(90),s=n(885),l=n(382),c=n(381),f=l(function(e,t){var n={};if(null==e)return n;var l=!1;t=r(t,function(t){return t=a(t,e),l||(l=t.length>1),t}),u(e,c(e),n),l&&(n=o(n,7,s));for(var f=t.length;f--;)i(n,t[f]);return n});e.exports=f},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t,n){var r=n(90),o=n(64);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(90),o=n(379);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(38),o=n(136),i=n(865),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&a.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(37),o="object"==typeof t&&t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,u=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(t,n(134)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t,n){var r=n(90),o=n(186);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(90),o=n(380);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},function(e,t,n){var r=n(230),o=n(872),i=n(873),a=n(874),u=n(875),s="[object Boolean]",l="[object Date]",c="[object Map]",f="[object Number]",p="[object RegExp]",d="[object Set]",h="[object String]",v="[object Symbol]",m="[object ArrayBuffer]",g="[object DataView]",y="[object Float32Array]",b="[object Float64Array]",_="[object Int8Array]",w="[object Int16Array]",E="[object Int32Array]",x="[object Uint8Array]",S="[object Uint8ClampedArray]",C="[object Uint16Array]",k="[object Uint32Array]";e.exports=function(e,t,n){var A=e.constructor;switch(t){case m:return r(e);case s:case l:return new A(+e);case g:return o(e,n);case y:case b:case _:case w:case E:case x:case S:case C:case k:return u(e,n);case c:return new A;case f:case h:return new A(e);case p:return i(e);case d:return new A;case v:return a(e)}}},function(e,t,n){var r=n(230);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,n){var r=n(77),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},function(e,t,n){var r=n(230);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(877),o=n(229),i=n(136);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},function(e,t,n){var r=n(38),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},function(e,t,n){var r=n(879),o=n(190),i=n(191),a=i&&i.isMap,u=a?o(a):r;e.exports=u},function(e,t,n){var r=n(137),o=n(47),i="[object Map]";e.exports=function(e){return o(e)&&r(e)==i}},function(e,t,n){var r=n(881),o=n(190),i=n(191),a=i&&i.isSet,u=a?o(a):r;e.exports=u},function(e,t,n){var r=n(137),o=n(47),i="[object Set]";e.exports=function(e){return o(e)&&r(e)==i}},function(e,t,n){var r=n(79),o=n(883),i=n(884),a=n(80);e.exports=function(e,t){return t=r(t,e),null==(e=i(e,t))||delete e[a(o(t))]}},function(e,t){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},function(e,t,n){var r=n(139),o=n(282);e.exports=function(e,t){return t.length<2?e:r(e,o(t,0,-1))}},function(e,t,n){var r=n(228);e.exports=function(e){return r(e)?void 0:e}},function(e,t,n){var r=n(887);e.exports=function(e){return null!=e&&e.length?r(e,1):[]}},function(e,t,n){var r=n(185),o=n(888);e.exports=function e(t,n,i,a,u){var s=-1,l=t.length;for(i||(i=o),u||(u=[]);++s<l;){var c=t[s];n>0&&i(c)?n>1?e(c,n-1,i,a,u):r(u,c):a||(u[u.length]=c)}return u}},function(e,t,n){var r=n(77),o=n(187),i=n(24),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},function(e,t){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},function(e,t,n){var r=n(891),o=n(346),i=n(193),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=a},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t){var n=800,r=16,o=Date.now;e.exports=function(e){var t=0,i=0;return function(){var a=o(),u=r-(a-i);if(i=a,u>0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,n){var r=n(147),o=n(90),i=n(894),a=n(78),u=n(136),s=n(64),l=Object.prototype.hasOwnProperty,c=i(function(e,t){if(u(t)||a(t))o(t,s(t),e);else for(var n in t)l.call(t,n)&&r(e,n,t[n])});e.exports=c},function(e,t,n){var r=n(895),o=n(305);e.exports=function(e){return r(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,u=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,u&&o(n[0],n[1],u)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}},function(e,t,n){var r=n(193),o=n(383),i=n(384);e.exports=function(e,t){return i(o(e,t,r),e+"")}},function(e,t,n){"use strict";var r=n(897),o=n(898);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){o.isString(e)&&(e=b(e));return e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var a=/^([a-z0-9.+-]+:)/i,u=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(l),f=["%","/","?",";","#"].concat(c),p=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(899);function b(e,t,n){if(e&&o.isObject(e)&&e instanceof i)return e;var r=new i;return r.parse(e,t,n),r}i.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),u=-1!==i&&i<e.indexOf("#")?"?":"#",l=e.split(u);l[0]=l[0].replace(/\\/g,"/");var b=e=l.join(u);if(b=b.trim(),!n&&1===e.split("#").length){var _=s.exec(b);if(_)return this.path=b,this.href=b,this.pathname=_[1],_[2]?(this.search=_[2],this.query=t?y.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var w=a.exec(b);if(w){var E=(w=w[0]).toLowerCase();this.protocol=E,b=b.substr(w.length)}if(n||w||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var x="//"===b.substr(0,2);!x||w&&m[w]||(b=b.substr(2),this.slashes=!0)}if(!m[w]&&(x||w&&!g[w])){for(var S,C,k=-1,A=0;A<p.length;A++){-1!==(O=b.indexOf(p[A]))&&(-1===k||O<k)&&(k=O)}-1!==(C=-1===k?b.lastIndexOf("@"):b.lastIndexOf("@",k))&&(S=b.slice(0,C),b=b.slice(C+1),this.auth=decodeURIComponent(S)),k=-1;for(A=0;A<f.length;A++){var O;-1!==(O=b.indexOf(f[A]))&&(-1===k||O<k)&&(k=O)}-1===k&&(k=b.length),this.host=b.slice(0,k),b=b.slice(k),this.parseHost(),this.hostname=this.hostname||"";var P="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!P)for(var T=this.hostname.split(/\./),M=(A=0,T.length);A<M;A++){var I=T[A];if(I&&!I.match(d)){for(var j="",N=0,R=I.length;N<R;N++)I.charCodeAt(N)>127?j+="x":j+=I[N];if(!j.match(d)){var D=T.slice(0,A),L=T.slice(A+1),U=I.match(h);U&&(D.push(U[1]),L.unshift(U[2])),L.length&&(b="/"+L.join(".")+b),this.hostname=D.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=r.toASCII(this.hostname));var q=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+q,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!v[E])for(A=0,M=c.length;A<M;A++){var z=c[A];if(-1!==b.indexOf(z)){var B=encodeURIComponent(z);B===z&&(B=escape(z)),b=b.split(z).join(B)}}var V=b.indexOf("#");-1!==V&&(this.hash=b.substr(V),b=b.slice(0,V));var H=b.indexOf("?");if(-1!==H?(this.search=b.substr(H),this.query=b.substr(H+1),t&&(this.query=y.parse(this.query)),b=b.slice(0,H)):t&&(this.search="",this.query={}),b&&(this.pathname=b),g[E]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){q=this.pathname||"";var W=this.search||"";this.path=q+W}return this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,a="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(a=y.stringify(this.query));var u=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||g[t])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),u&&"?"!==u.charAt(0)&&(u="?"+u),t+i+(n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(u=u.replace("#","%23"))+r},i.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if(o.isString(e)){var t=new i;t.parse(e,!1,!0),e=t}for(var n=new i,r=Object.keys(this),a=0;a<r.length;a++){var u=r[a];n[u]=this[u]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),l=0;l<s.length;l++){var c=s[l];"protocol"!==c&&(n[c]=e[c])}return g[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!g[e.protocol]){for(var f=Object.keys(e),p=0;p<f.length;p++){var d=f[p];n[d]=e[d]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||m[e.protocol])n.pathname=e.pathname;else{for(var h=(e.pathname||"").split("/");h.length&&!(e.host=h.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),n.pathname=h.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var v=n.pathname||"",y=n.search||"";n.path=v+y}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var b=n.pathname&&"/"===n.pathname.charAt(0),_=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=_||b||n.host&&e.pathname,E=w,x=n.pathname&&n.pathname.split("/")||[],S=(h=e.pathname&&e.pathname.split("/")||[],n.protocol&&!g[n.protocol]);if(S&&(n.hostname="",n.port=null,n.host&&(""===x[0]?x[0]=n.host:x.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),w=w&&(""===h[0]||""===x[0])),_)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,x=h;else if(h.length)x||(x=[]),x.pop(),x=x.concat(h),n.search=e.search,n.query=e.query;else if(!o.isNullOrUndefined(e.search)){if(S)n.hostname=n.host=x.shift(),(P=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=P.shift(),n.host=n.hostname=P.shift());return n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!x.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var C=x.slice(-1)[0],k=(n.host||e.host||x.length>1)&&("."===C||".."===C)||""===C,A=0,O=x.length;O>=0;O--)"."===(C=x[O])?x.splice(O,1):".."===C?(x.splice(O,1),A++):A&&(x.splice(O,1),A--);if(!w&&!E)for(;A--;A)x.unshift("..");!w||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),k&&"/"!==x.join("/").substr(-1)&&x.push("");var P,T=""===x[0]||x[0]&&"/"===x[0].charAt(0);S&&(n.hostname=n.host=T?"":x.length?x.shift():"",(P=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=P.shift(),n.host=n.hostname=P.shift()));return(w=w||n.host&&x.length)&&!T&&x.unshift(""),x.length?n.pathname=x.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var e=this.host,t=u.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){(function(e,r){var o;/*! https://mths.be/punycode v1.3.2 by @mathias */!function(i){"object"==typeof t&&t&&t.nodeType,"object"==typeof e&&e&&e.nodeType;var a="object"==typeof r&&r;a.global!==a&&a.window!==a&&a.self;var u,s=2147483647,l=36,c=1,f=26,p=38,d=700,h=72,v=128,m="-",g=/^xn--/,y=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,_={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=l-c,E=Math.floor,x=String.fromCharCode;function S(e){throw RangeError(_[e])}function C(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function k(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+C((e=e.replace(b,".")).split("."),t).join(".")}function A(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function O(e){return C(e,function(e){var t="";return e>65535&&(t+=x((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=x(e)}).join("")}function P(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function T(e,t,n){var r=0;for(e=n?E(e/d):e>>1,e+=E(e/t);e>w*f>>1;r+=l)e=E(e/w);return E(r+(w+1)*e/(e+p))}function M(e){var t,n,r,o,i,a,u,p,d,g,y,b=[],_=e.length,w=0,x=v,C=h;for((n=e.lastIndexOf(m))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&S("not-basic"),b.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<_;){for(i=w,a=1,u=l;o>=_&&S("invalid-input"),((p=(y=e.charCodeAt(o++))-48<10?y-22:y-65<26?y-65:y-97<26?y-97:l)>=l||p>E((s-w)/a))&&S("overflow"),w+=p*a,!(p<(d=u<=C?c:u>=C+f?f:u-C));u+=l)a>E(s/(g=l-d))&&S("overflow"),a*=g;C=T(w-i,t=b.length+1,0==i),E(w/t)>s-x&&S("overflow"),x+=E(w/t),w%=t,b.splice(w++,0,x)}return O(b)}function I(e){var t,n,r,o,i,a,u,p,d,g,y,b,_,w,C,k=[];for(b=(e=A(e)).length,t=v,n=0,i=h,a=0;a<b;++a)(y=e[a])<128&&k.push(x(y));for(r=o=k.length,o&&k.push(m);r<b;){for(u=s,a=0;a<b;++a)(y=e[a])>=t&&y<u&&(u=y);for(u-t>E((s-n)/(_=r+1))&&S("overflow"),n+=(u-t)*_,t=u,a=0;a<b;++a)if((y=e[a])<t&&++n>s&&S("overflow"),y==t){for(p=n,d=l;!(p<(g=d<=i?c:d>=i+f?f:d-i));d+=l)C=p-g,w=l-g,k.push(x(P(g+C%w,0))),p=E(C/w);k.push(x(P(p,0))),i=T(n,_,r==o),n=0,++r}++n,++t}return k.join("")}u={version:"1.3.2",ucs2:{decode:A,encode:O},decode:M,encode:I,toASCII:function(e){return k(e,function(e){return y.test(e)?"xn--"+I(e):e})},toUnicode:function(e){return k(e,function(e){return g.test(e)?M(e.slice(4).toLowerCase()):e})}},void 0===(o=function(){return u}.call(t,n,t,e))||(e.exports=o)}()}).call(t,n(134)(e),n(31))},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(900),t.encode=t.stringify=n(901)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var u=/\+/g;e=e.split(t);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var l=e.length;s>0&&l>s&&(l=s);for(var c=0;c<l;++c){var f,p,d,h,v=e[c].replace(u,"%20"),m=v.indexOf(n);m>=0?(f=v.substr(0,m),p=v.substr(m+1)):(f=v,p=""),d=decodeURIComponent(f),h=decodeURIComponent(p),r(a,d)?o(a[d])?a[d].push(h):a[d]=[a[d],h]:a[d]=h}return a};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,u){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?i(a(e),function(a){var u=encodeURIComponent(r(a))+n;return o(e[a])?i(e[a],function(e){return u+encodeURIComponent(r(e))}).join(t):u+encodeURIComponent(r(e[a]))}).join(t):u?encodeURIComponent(r(u))+n+encodeURIComponent(r(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var a=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){(function(t){!function(){"use strict";e.exports=function(e){return(e instanceof t?e:new t(e.toString(),"binary")).toString("base64")}}()}).call(t,n(54).Buffer)},function(e,t,n){var r=n(904),o=n(278),i=n(302),a=n(61);e.exports=function(e,t,n){return e=a(e),n=null==n?0:r(i(n),0,e.length),t=o(t),e.slice(n,n+t.length)==t}},function(e,t){e.exports=function(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}},function(e,t,n){var r=n(378),o=1,i=4;e.exports=function(e){return r(e,o|i)}},function(e,t){!function(e){"use strict";function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function r(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return h.iterable&&(t[Symbol.iterator]=function(){return t}),t}function o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function i(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function a(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function u(e){var t=new FileReader,n=a(t);return t.readAsArrayBuffer(e),n}function s(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function l(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(h.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(h.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(h.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(h.arrayBuffer&&h.blob&&m(e))this._bodyArrayBuffer=s(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!h.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!g(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=s(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):h.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},h.blob&&(this.blob=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?i(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(u)}),this.text=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=a(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},h.formData&&(this.formData=function(){return this.text().then(f)}),this.json=function(){return this.text().then(JSON.parse)},this}function c(e,t){var n=(t=t||{}).body;if(e instanceof c){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=function(e){var t=e.toUpperCase();return y.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function f(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function p(e){var t=new o;return e.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t}function d(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var h={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(h.arrayBuffer)var v=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],m=function(e){return e&&DataView.prototype.isPrototypeOf(e)},g=ArrayBuffer.isView||function(e){return e&&v.indexOf(Object.prototype.toString.call(e))>-1};o.prototype.append=function(e,r){e=t(e),r=n(r);var o=this.map[e];this.map[e]=o?o+","+r:r},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,r){this.map[t(e)]=n(r)},o.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},h.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];c.prototype.clone=function(){return new c(this,{body:this._bodyInit})},l.call(c.prototype),l.call(d.prototype),d.prototype.clone=function(){return new d(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},d.error=function(){var e=new d(null,{status:0,statusText:""});return e.type="error",e};var b=[301,302,303,307,308];d.redirect=function(e,t){if(-1===b.indexOf(t))throw new RangeError("Invalid status code");return new d(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=c,e.Response=d,e.fetch=function(e,t){return new Promise(function(n,r){var o=new c(e,t),i=new XMLHttpRequest;i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:p(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var t="response"in i?i.response:i.responseText;n(new d(t,e))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.open(o.method,o.url,!0),"include"===o.credentials&&(i.withCredentials=!0),"responseType"in i&&h.blob&&(i.responseType="blob"),o.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send(void 0===o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},function(e,t,n){"use strict";var r=n(908),o=n(909),i=n(390);e.exports={formats:i,parse:o,stringify:r}},function(e,t,n){"use strict";var r=n(389),o=n(390),i={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},a=Date.prototype.toISOString,u={delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,serializeDate:function(e){return a.call(e)},skipNulls:!1,strictNullHandling:!1},s=function e(t,n,o,i,a,s,l,c,f,p,d,h){var v=t;if("function"==typeof l)v=l(n,v);else if(v instanceof Date)v=p(v);else if(null===v){if(i)return s&&!h?s(n,u.encoder):n;v=""}if("string"==typeof v||"number"==typeof v||"boolean"==typeof v||r.isBuffer(v))return s?[d(h?n:s(n,u.encoder))+"="+d(s(v,u.encoder))]:[d(n)+"="+d(String(v))];var m,g=[];if(void 0===v)return g;if(Array.isArray(l))m=l;else{var y=Object.keys(v);m=c?y.sort(c):y}for(var b=0;b<m.length;++b){var _=m[b];a&&null===v[_]||(g=Array.isArray(v)?g.concat(e(v[_],o(n,_),o,i,a,s,l,c,f,p,d,h)):g.concat(e(v[_],n+(f?"."+_:"["+_+"]"),o,i,a,s,l,c,f,p,d,h)))}return g};e.exports=function(e,t){var n=e,a=t?r.assign({},t):{};if(null!==a.encoder&&void 0!==a.encoder&&"function"!=typeof a.encoder)throw new TypeError("Encoder has to be a function.");var l=void 0===a.delimiter?u.delimiter:a.delimiter,c="boolean"==typeof a.strictNullHandling?a.strictNullHandling:u.strictNullHandling,f="boolean"==typeof a.skipNulls?a.skipNulls:u.skipNulls,p="boolean"==typeof a.encode?a.encode:u.encode,d="function"==typeof a.encoder?a.encoder:u.encoder,h="function"==typeof a.sort?a.sort:null,v=void 0!==a.allowDots&&a.allowDots,m="function"==typeof a.serializeDate?a.serializeDate:u.serializeDate,g="boolean"==typeof a.encodeValuesOnly?a.encodeValuesOnly:u.encodeValuesOnly;if(void 0===a.format)a.format=o.default;else if(!Object.prototype.hasOwnProperty.call(o.formatters,a.format))throw new TypeError("Unknown format option provided.");var y,b,_=o.formatters[a.format];"function"==typeof a.filter?n=(b=a.filter)("",n):Array.isArray(a.filter)&&(y=b=a.filter);var w,E=[];if("object"!=typeof n||null===n)return"";w=a.arrayFormat in i?a.arrayFormat:"indices"in a?a.indices?"indices":"repeat":"indices";var x=i[w];y||(y=Object.keys(n)),h&&y.sort(h);for(var S=0;S<y.length;++S){var C=y[S];f&&null===n[C]||(E=E.concat(s(n[C],C,x,c,f,p?d:null,b,h,v,m,_,g)))}var k=E.join(l),A=!0===a.addQueryPrefix?"?":"";return k.length>0?A+k:""}},function(e,t,n){"use strict";var r=n(389),o=Object.prototype.hasOwnProperty,i={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:r.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(e,t,n){if(e){var r=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=/(\[[^[\]]*])/.exec(r),u=a?r.slice(0,a.index):r,s=[];if(u){if(!n.plainObjects&&o.call(Object.prototype,u)&&!n.allowPrototypes)return;s.push(u)}for(var l=0;null!==(a=i.exec(r))&&l<n.depth;){if(l+=1,!n.plainObjects&&o.call(Object.prototype,a[1].slice(1,-1))&&!n.allowPrototypes)return;s.push(a[1])}return a&&s.push("["+r.slice(a.index)+"]"),function(e,t,n){for(var r=t,o=e.length-1;o>=0;--o){var i,a=e[o];if("[]"===a)i=(i=[]).concat(r);else{i=n.plainObjects?Object.create(null):{};var u="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,s=parseInt(u,10);!isNaN(s)&&a!==u&&String(s)===u&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(i=[])[s]=r:i[u]=r}r=i}return r}(s,t,n)}};e.exports=function(e,t){var n=t?r.assign({},t):{};if(null!==n.decoder&&void 0!==n.decoder&&"function"!=typeof n.decoder)throw new TypeError("Decoder has to be a function.");if(n.ignoreQueryPrefix=!0===n.ignoreQueryPrefix,n.delimiter="string"==typeof n.delimiter||r.isRegExp(n.delimiter)?n.delimiter:i.delimiter,n.depth="number"==typeof n.depth?n.depth:i.depth,n.arrayLimit="number"==typeof n.arrayLimit?n.arrayLimit:i.arrayLimit,n.parseArrays=!1!==n.parseArrays,n.decoder="function"==typeof n.decoder?n.decoder:i.decoder,n.allowDots="boolean"==typeof n.allowDots?n.allowDots:i.allowDots,n.plainObjects="boolean"==typeof n.plainObjects?n.plainObjects:i.plainObjects,n.allowPrototypes="boolean"==typeof n.allowPrototypes?n.allowPrototypes:i.allowPrototypes,n.parameterLimit="number"==typeof n.parameterLimit?n.parameterLimit:i.parameterLimit,n.strictNullHandling="boolean"==typeof n.strictNullHandling?n.strictNullHandling:i.strictNullHandling,""===e||null===e||void 0===e)return n.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){for(var n={},r=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,u=r.split(t.delimiter,a),s=0;s<u.length;++s){var l,c,f=u[s],p=f.indexOf("]="),d=-1===p?f.indexOf("="):p+1;-1===d?(l=t.decoder(f,i.decoder),c=t.strictNullHandling?null:""):(l=t.decoder(f.slice(0,d),i.decoder),c=t.decoder(f.slice(d+1),i.decoder)),o.call(n,l)?n[l]=[].concat(n[l]).concat(c):n[l]=c}return n}(e,n):e,s=n.plainObjects?Object.create(null):{},l=Object.keys(u),c=0;c<l.length;++c){var f=l[c],p=a(f,u[f],n);s=r.merge(s,p,n)}return r.compact(s)}},function(e,t){e.exports=FormData},function(e,t,n){n(391);var r=n(231),o=n(392),i=n(392);t.applyOperation=i.applyOperation,t.applyPatch=i.applyPatch,t.applyReducer=i.applyReducer,t.getValueByPointer=i.getValueByPointer,t.validate=i.validate,t.validator=i.validator;var a=n(231);t.JsonPatchError=a.PatchError,t.deepClone=a._deepClone,t.escapePathComponent=a.escapePathComponent,t.unescapePathComponent=a.unescapePathComponent;var u=new WeakMap,s=function(){return function(e){this.observers=new Map,this.obj=e}}(),l=function(){return function(e,t){this.callback=e,this.observer=t}}();function c(e){var t=u.get(e.object);f(t.value,e.object,e.patches,""),e.patches.length&&o.applyPatch(t.value,e.patches);var n=e.patches;return n.length>0&&(e.patches=[],e.callback&&e.callback(n)),n}function f(e,t,n,o){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var i=r._objectKeys(t),a=r._objectKeys(e),u=!1,s=a.length-1;s>=0;s--){var l=e[p=a[s]];if(!r.hasOwnProperty(t,p)||void 0===t[p]&&void 0!==l&&!1===Array.isArray(t))n.push({op:"remove",path:o+"/"+r.escapePathComponent(p)}),u=!0;else{var c=t[p];"object"==typeof l&&null!=l&&"object"==typeof c&&null!=c?f(l,c,n,o+"/"+r.escapePathComponent(p)):l!==c&&(!0,n.push({op:"replace",path:o+"/"+r.escapePathComponent(p),value:r._deepClone(c)}))}}if(u||i.length!=a.length)for(s=0;s<i.length;s++){var p=i[s];r.hasOwnProperty(e,p)||void 0===t[p]||n.push({op:"add",path:o+"/"+r.escapePathComponent(p),value:r._deepClone(t[p])})}}}t.unobserve=function(e,t){t.unobserve()},t.observe=function(e,t){var n,o=function(e){return u.get(e)}(e);if(o){var i=function(e,t){return e.observers.get(t)}(o,t);n=i&&i.observer}else o=new s(e),u.set(e,o);if(n)return n;if(n={},o.value=r._deepClone(e),t){n.callback=t,n.next=null;var a=function(){c(n)},f=function(){clearTimeout(n.next),n.next=setTimeout(a)};"undefined"!=typeof window&&(window.addEventListener?(window.addEventListener("mouseup",f),window.addEventListener("keyup",f),window.addEventListener("mousedown",f),window.addEventListener("keydown",f),window.addEventListener("change",f)):(document.documentElement.attachEvent("onmouseup",f),document.documentElement.attachEvent("onkeyup",f),document.documentElement.attachEvent("onmousedown",f),document.documentElement.attachEvent("onkeydown",f),document.documentElement.attachEvent("onchange",f)))}return n.patches=[],n.object=e,n.unobserve=function(){c(n),clearTimeout(n.next),function(e,t){e.observers.delete(t.callback)}(o,n),"undefined"!=typeof window&&(window.removeEventListener?(window.removeEventListener("mouseup",f),window.removeEventListener("keyup",f),window.removeEventListener("mousedown",f),window.removeEventListener("keydown",f)):(document.documentElement.detachEvent("onmouseup",f),document.documentElement.detachEvent("onkeyup",f),document.documentElement.detachEvent("onmousedown",f),document.documentElement.detachEvent("onkeydown",f)))},o.observers.set(t,new l(t,n)),n},t.generate=c,t.compare=function(e,t){var n=[];return f(e,t,n,""),n}},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}(e.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(e,t){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function r(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function o(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}(t=e.exports=n?r:o).supported=r,t.unsupported=o},function(e,t,n){e.exports={default:n(915),__esModule:!0}},function(e,t,n){n(178),n(92),n(916),n(921),n(923),e.exports=n(15).WeakMap},function(e,t,n){"use strict";var r,o=n(232)(0),i=n(159),a=n(124),u=n(264),s=n(919),l=n(28),c=n(51),f=n(393),p=a.getWeak,d=Object.isExtensible,h=s.ufstore,v={},m=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},g={get:function(e){if(l(e)){var t=p(e);return!0===t?h(f(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return s.def(f(this,"WeakMap"),e,t)}},y=e.exports=n(920)("WeakMap",m,g,s,!0,!0);c(function(){return 7!=(new y).set((Object.freeze||Object)(v),7).get(v)})&&(u((r=s.getConstructor(m,"WeakMap")).prototype,g),a.NEED=!0,o(["delete","has","get","set"],function(e){var t=y.prototype,n=t[e];i(t,e,function(t,o){if(l(t)&&!d(t)){this._f||(this._f=new r);var i=this._f[e](t,o);return"set"==e?this:i}return n.call(this,t,o)})}))},function(e,t,n){var r=n(918);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(28),o=n(259),i=n(19)("species");e.exports=function(e){var t;return o(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!o(t.prototype)||(t=void 0),r(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){"use strict";var r=n(207),o=n(124).getWeak,i=n(36),a=n(28),u=n(205),s=n(145),l=n(232),c=n(52),f=n(393),p=l(5),d=l(6),h=0,v=function(e){return e._l||(e._l=new m)},m=function(){this.a=[]},g=function(e,t){return p(e.a,function(e){return e[0]===t})};m.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var n=g(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=d(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,i){var l=e(function(e,r){u(e,l,t,"_i"),e._t=t,e._i=h++,e._l=void 0,void 0!=r&&s(r,n,e[i],e)});return r(l.prototype,{delete:function(e){if(!a(e))return!1;var n=o(e);return!0===n?v(f(this,t)).delete(e):n&&c(n,this._i)&&delete n[this._i]},has:function(e){if(!a(e))return!1;var n=o(e);return!0===n?v(f(this,t)).has(e):n&&c(n,this._i)}}),l},def:function(e,t,n){var r=o(i(t),!0);return!0===r?v(e).set(t,n):r[e._i]=n,e},ufstore:v}},function(e,t,n){"use strict";var r=n(21),o=n(20),i=n(124),a=n(51),u=n(50),s=n(207),l=n(145),c=n(205),f=n(28),p=n(97),d=n(40).f,h=n(232)(0),v=n(44);e.exports=function(e,t,n,m,g,y){var b=r[e],_=b,w=g?"set":"add",E=_&&_.prototype,x={};return v&&"function"==typeof _&&(y||E.forEach&&!a(function(){(new _).entries().next()}))?(_=t(function(t,n){c(t,_,e,"_c"),t._c=new b,void 0!=n&&l(n,g,t[w],t)}),h("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in E&&(!y||"clear"!=e)&&u(_.prototype,e,function(n,r){if(c(this,_,e),!t&&y&&!f(n))return"get"==e&&void 0;var o=this._c[e](0===n?0:n,r);return t?this:o})}),y||d(_.prototype,"size",{get:function(){return this._c.size}})):(_=m.getConstructor(t,e,g,w),s(_.prototype,n),i.NEED=!0),p(_,e),x[e]=_,o(o.G+o.W+o.F,x),y||m.setStrong(_,e,g),_}},function(e,t,n){n(922)("WeakMap")},function(e,t,n){"use strict";var r=n(20);e.exports=function(e){r(r.S,e,{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},function(e,t,n){n(924)("WeakMap")},function(e,t,n){"use strict";var r=n(20),o=n(94),i=n(49),a=n(145);e.exports=function(e){r(r.S,e,{from:function(e){var t,n,r,u,s=arguments[1];return o(this),(t=void 0!==s)&&o(s),void 0==e?new this:(n=[],t?(r=0,u=i(s,arguments[2],2),a(e,!1,function(e){n.push(u(e,r++))})):a(e,!1,n.push,n),new this(n))}})}},function(e,t){var n={};!function(e){"use strict";function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function r(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return h.iterable&&(t[Symbol.iterator]=function(){return t}),t}function o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function i(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function a(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function u(e){var t=new FileReader,n=a(t);return t.readAsArrayBuffer(e),n}function s(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function l(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(h.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(h.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(h.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(h.arrayBuffer&&h.blob&&m(e))this._bodyArrayBuffer=s(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!h.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!g(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=s(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):h.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},h.blob&&(this.blob=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?i(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(u)}),this.text=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=a(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},h.formData&&(this.formData=function(){return this.text().then(f)}),this.json=function(){return this.text().then(JSON.parse)},this}function c(e,t){var n=(t=t||{}).body;if(e instanceof c){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=function(e){var t=e.toUpperCase();return y.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function f(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function p(e){var t=new o;return e.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t}function d(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var h={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(h.arrayBuffer)var v=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],m=function(e){return e&&DataView.prototype.isPrototypeOf(e)},g=ArrayBuffer.isView||function(e){return e&&v.indexOf(Object.prototype.toString.call(e))>-1};o.prototype.append=function(e,r){e=t(e),r=n(r);var o=this.map[e];this.map[e]=o?o+","+r:r},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,r){this.map[t(e)]=n(r)},o.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},h.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];c.prototype.clone=function(){return new c(this,{body:this._bodyInit})},l.call(c.prototype),l.call(d.prototype),d.prototype.clone=function(){return new d(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},d.error=function(){var e=new d(null,{status:0,statusText:""});return e.type="error",e};var b=[301,302,303,307,308];d.redirect=function(e,t){if(-1===b.indexOf(t))throw new RangeError("Invalid status code");return new d(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=c,e.Response=d,e.fetch=function(e,t){return new Promise(function(n,r){var o=new c(e,t),i=new XMLHttpRequest;i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:p(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var t="response"in i?i.response:i.responseText;n(new d(t,e))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.open(o.method,o.url,!0),"include"===o.credentials&&(i.withCredentials=!0),"responseType"in i&&h.blob&&(i.responseType="blob"),o.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send(void 0===o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}(void 0!==n?n:this),e.exports=n},function(e,t,n){"use strict";var r=t,o=n(54).Buffer;function i(e,t){try{return decodeURIComponent(e)}catch(n){return r.unescapeBuffer(e,t).toString()}}r.unescapeBuffer=function(e,t){for(var n,r,i,a=new o(e.length),u=0,s=0,l=0;s<=e.length;s++){var c=s<e.length?e.charCodeAt(s):NaN;switch(u){case 0:switch(c){case 37:n=0,r=0,u=1;break;case 43:t&&(c=32);default:a[l++]=c}break;case 1:if(i=c,c>=48&&c<=57)n=c-48;else if(c>=65&&c<=70)n=c-65+10;else{if(!(c>=97&&c<=102)){a[l++]=37,a[l++]=c,u=0;break}n=c-97+10}u=2;break;case 2:if(u=0,c>=48&&c<=57)r=c-48;else if(c>=65&&c<=70)r=c-65+10;else{if(!(c>=97&&c<=102)){a[l++]=37,a[l++]=i,a[l++]=c;break}r=c-97+10}a[l++]=16*n+r}}return a.slice(0,l-1)},r.unescape=i;for(var a=new Array(256),u=0;u<256;++u)a[u]="%"+((u<16?"0":"")+u.toString(16)).toUpperCase();r.escape=function(e){"string"!=typeof e&&(e+="");for(var t="",n=0,r=0;r<e.length;++r){var o=e.charCodeAt(r);if(!(33===o||45===o||46===o||95===o||126===o||o>=39&&o<=42||o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122))if(r-n>0&&(t+=e.slice(n,r)),o<128)n=r+1,t+=a[o];else if(o<2048)n=r+1,t+=a[192|o>>6]+a[128|63&o];else if(o<55296||o>=57344)n=r+1,t+=a[224|o>>12]+a[128|o>>6&63]+a[128|63&o];else{var i;if(!(++r<e.length))throw new URIError("URI malformed");i=1023&e.charCodeAt(r),n=r+1,t+=a[240|(o=65536+((1023&o)<<10|i))>>18]+a[128|o>>12&63]+a[128|o>>6&63]+a[128|63&o]}}return 0===n?e:n<e.length?t+e.slice(n):t};var s=function(e){return"string"==typeof e?e:"number"==typeof e&&isFinite(e)?""+e:"boolean"==typeof e?e?"true":"false":""};function l(e,t){try{return t(e)}catch(t){return r.unescape(e,!0)}}r.stringify=r.encode=function(e,t,n,o){t=t||"&",n=n||"=";var i=r.escape;if(o&&"function"==typeof o.encodeURIComponent&&(i=o.encodeURIComponent),null!==e&&"object"==typeof e){for(var a=Object.keys(e),u=a.length,l=u-1,c="",f=0;f<u;++f){var p=a[f],d=e[p],h=i(s(p))+n;if(Array.isArray(d)){for(var v=d.length,m=v-1,g=0;g<v;++g)c+=h+i(s(d[g])),g<m&&(c+=t);v&&f<l&&(c+=t)}else c+=h+i(s(d)),f<l&&(c+=t)}return c}return""},r.parse=r.decode=function(e,t,n,o){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;"string"!=typeof t&&(t+="");var u=n.length,s=t.length,c=1e3;o&&"number"==typeof o.maxKeys&&(c=o.maxKeys);var f=1/0;c>0&&(f=c);var p=r.unescape;o&&"function"==typeof o.decodeURIComponent&&(p=o.decodeURIComponent);for(var d=p!==i,h=[],v=0,m=0,g=0,y="",b="",_=d,w=d,E=0,x=0;x<e.length;++x){var S=e.charCodeAt(x);if(S!==t.charCodeAt(m)){if(m=0,w||(37===S?E=1:E>0&&(S>=48&&S<=57||S>=65&&S<=70||S>=97&&S<=102)?3==++E&&(w=!0):E=0),g<u){if(S===n.charCodeAt(g)){if(++g===u)v<(k=x-g+1)&&(y+=e.slice(v,k)),E=0,v=x+1;continue}g=0,_||(37===S?E=1:E>0&&(S>=48&&S<=57||S>=65&&S<=70||S>=97&&S<=102)?3==++E&&(_=!0):E=0)}43===S&&(g<u?(x-v>0&&(y+=e.slice(v,x)),y+="%20",_=!0):(x-v>0&&(b+=e.slice(v,x)),b+="%20",w=!0),v=x+1)}else if(++m===s){var C,k=x-m+1;if(g<u?v<k&&(y+=e.slice(v,k)):v<k&&(b+=e.slice(v,k)),_&&(y=l(y,p)),w&&(b=l(b,p)),-1===h.indexOf(y))a[y]=b,h[h.length]=y;else(C=a[y])instanceof Array?C[C.length]=b:a[y]=[C,b];if(0==--f)break;_=w=d,E=0,y=b="",v=x+1,m=g=0}}f>0&&(v<e.length||g>0)&&(v<e.length&&(g<u?y+=e.slice(v):m<s&&(b+=e.slice(v))),_&&(y=l(y,p)),w&&(b=l(b,p)),-1===h.indexOf(y)?(a[y]=b,h[h.length]=y):(C=a[y])instanceof Array?C[C.length]=b:a[y]=[C,b]);return a}},function(e,t,n){var r=n(928),o=n(382)(function(e,t){return null==e?{}:r(e,t)});e.exports=o},function(e,t,n){var r=n(929),o=n(301);e.exports=function(e,t){return r(e,t,function(t,n){return o(e,n)})}},function(e,t,n){var r=n(139),o=n(344),i=n(79);e.exports=function(e,t,n){for(var a=-1,u=t.length,s={};++a<u;){var l=t[a],c=r(e,l);n(c,l)&&o(s,i(l,e),c)}return s}},function(e,t,n){"use strict"; /*! * cookie * Copyright(c) 2012-2014 Roman Shtylman * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},o=t||{},a=e.split(i),s=o.decode||r,l=0;l<a.length;l++){var c=a[l],f=c.indexOf("=");if(!(f<0)){var p=c.substr(0,f).trim(),d=c.substr(++f,c.length).trim();'"'==d[0]&&(d=d.slice(1,-1)),void 0==n[p]&&(n[p]=u(d,s))}}return n},t.serialize=function(e,t,n){var r=n||{},i=r.encode||o;if("function"!=typeof i)throw new TypeError("option encode is invalid");if(!a.test(e))throw new TypeError("argument name is invalid");var u=i(t);if(u&&!a.test(u))throw new TypeError("argument val is invalid");var s=e+"="+u;if(null!=r.maxAge){var l=r.maxAge-0;if(isNaN(l))throw new Error("maxAge should be a Number");s+="; Max-Age="+Math.floor(l)}if(r.domain){if(!a.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain="+r.domain}if(r.path){if(!a.test(r.path))throw new TypeError("option path is invalid");s+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");s+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(s+="; HttpOnly");r.secure&&(s+="; Secure");if(r.sameSite){var c="string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite;switch(c){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;default:throw new TypeError("option sameSite is invalid")}}return s};var r=decodeURIComponent,o=encodeURIComponent,i=/; */,a=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function u(e,t){try{return t(e)}catch(t){return e}}},function(e,t,n){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}},function(e,t){e.exports=function(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r>=55296&&r<=56319&&n+1<e.length){var o=e.charCodeAt(n+1);if(o>=56320&&o<=57343){var i=1024*(r-55296)+o-56320+65536;t.push(240+Math.floor(i/64/64/64),128+Math.floor(i/64/64)%64,128+Math.floor(i/64)%64,128+i%64),n+=1;continue}}r>=2048?t.push(224+Math.floor(r/64/64),128+Math.floor(r/64)%64,128+r%64):r>=128?t.push(192+Math.floor(r/64),128+r%64):t.push(r)}return t}},function(e,t){!function(){var e;function n(e,t){function n(e,t,n){if(!r(e))return n;var o=0,i=0;do{var a=t.exec(e);if(null===a)break;if(!(i<n))break;o+=a[0].length,i++}while(null!==a);return o>=e.length?-1:o}function r(e){return a.test(e)}function o(e,n){void 0==e&&(e=["[^]"]),void 0==n&&(n="g");var r=[];return t.forEach(function(e){r.push(e.source)}),r.push(i.source),r=r.concat(e),new RegExp(r.join("|"),n)}e.findCharIndex=function(e,t){if(t>=e.length)return-1;if(!r(e))return t;for(var n=o(),i=0;null!==n.exec(e)&&!(n.lastIndex>t);)i++;return i},e.findByteIndex=function(e,t){return t>=this.length(e)?-1:n(e,o(),t)},e.charAt=function(e,t){var n=this.findByteIndex(e,t);if(n<0||n>=e.length)return"";var r=e.slice(n,n+8),o=a.exec(r);return null===o?r[0]:o[0]},e.charCodeAt=function(e,t){var r=function(e,t){return n(e,new RegExp(i.source,"g"),t)}(e,t);if(r<0)return NaN;var o=e.charCodeAt(r);return 55296<=o&&o<=56319?1024*(o-55296)+(e.charCodeAt(r+1)-56320)+65536:o},e.fromCharCode=function(e){return e>65535?(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e))):String.fromCharCode(e)},e.indexOf=function(e,t,n){void 0!==n&&null!==n||(n=0);var r=this.findByteIndex(e,n),o=e.indexOf(t,r);return o<0?-1:this.findCharIndex(e,o)},e.lastIndexOf=function(e,t,n){var r;if(void 0===n||null===n)r=e.lastIndexOf(t);else{var o=this.findByteIndex(e,n);r=e.lastIndexOf(t,o)}return r<0?-1:this.findCharIndex(e,r)},e.slice=function(e,t,n){var r,o=this.findByteIndex(e,t);return o<0&&(o=e.length),void 0===n||null===n?r=e.length:(r=this.findByteIndex(e,n))<0&&(r=e.length),e.slice(o,r)},e.substr=function(e,t,n){return t<0&&(t=this.length(e)+t),void 0===n||null===n?this.slice(e,t):this.slice(e,t,t+n)},e.substring=e.slice,e.length=function(e){return this.findCharIndex(e,e.length-1)+1},e.stringToCodePoints=function(e){for(var t=[],n=0;n<e.length&&(codePoint=this.charCodeAt(e,n),codePoint);n++)t.push(codePoint);return t},e.codePointsToString=function(e){for(var t=[],n=0;n<e.length;n++)t.push(this.fromCharCode(e[n]));return t.join("")},e.stringToBytes=function(e){for(var t=[],n=0;n<e.length;n++){for(var r=e.charCodeAt(n),o=[];r>0;)o.push(255&r),r>>=8;1==o.length&&o.push(0),t=t.concat(o.reverse())}return t},e.bytesToString=function(e){for(var t=[],n=0;n<e.length;n+=2){var r=e[n]<<8|e[n+1];t.push(String.fromCharCode(r))}return t.join("")},e.stringToCharArray=function(e){var t=[],n=o();do{var r=n.exec(e);if(null===r)break;t.push(r[0])}while(null!==r);return t};var i=/[\uD800-\uDBFF][\uDC00-\uDFFF]/,a=o([],"")}void 0!==t&&null!==t?e=t:"undefined"!=typeof window&&null!==window&&(void 0!==window.UtfString&&null!==window.UtfString||(window.UtfString={}),e=window.UtfString);e.visual={},n(e,[]),n(e.visual,[/\uD83C[\uDDE6-\uDDFF]\uD83C[\uDDE6-\uDDFF]/])}()},function(e,t){e.exports='---\nurl: "https://petstore.swagger.io/v2/swagger.json"\ndom_id: "#swagger-ui"\nvalidatorUrl: "https://online.swagger.io/validator"'},function(e,t,n){var r,o,i;o=[],r=function(){"use strict";var e=function(e){return e&&"getComputedStyle"in window&&"smooth"===window.getComputedStyle(e)["scroll-behavior"]};if("undefined"==typeof window||!("document"in window))return{};var t=function(t,n,r){var o;n=n||999,r||0===r||(r=9);var i=function(e){o=e},a=function(){clearTimeout(o),i(0)},u=function(e){return Math.max(0,t.getTopOf(e)-r)},s=function(r,o,u){if(a(),0===o||o&&o<0||e(t.body))t.toY(r),u&&u();else{var s=t.getY(),l=Math.max(0,r)-s,c=(new Date).getTime();o=o||Math.min(Math.abs(l),n),function e(){i(setTimeout(function(){var n=Math.min(1,((new Date).getTime()-c)/o),r=Math.max(0,Math.floor(s+l*(n<.5?2*n*n:n*(4-2*n)-1)));t.toY(r),n<1&&t.getHeight()+r<t.body.scrollHeight?e():(setTimeout(a,99),u&&u())},9))}()}},l=function(e,t,n){s(u(e),t,n)};return{setup:function(e,t){return(0===e||e)&&(n=e),(0===t||t)&&(r=t),{defaultDuration:n,edgeOffset:r}},to:l,toY:s,intoView:function(e,n,o){var i=e.getBoundingClientRect().height,a=t.getTopOf(e)+i,c=t.getHeight(),f=t.getY(),p=f+c;u(e)<f||i+r>c?l(e,n,o):a+r>p?s(a-c+r,n,o):o&&o()},center:function(e,n,r,o){s(Math.max(0,t.getTopOf(e)-t.getHeight()/2+(r||e.getBoundingClientRect().height/2)),n,o)},stop:a,moving:function(){return!!o},getY:t.getY,getTopOf:t.getTopOf}},n=document.documentElement,r=function(){return window.scrollY||n.scrollTop},o=t({body:document.scrollingElement||document.body,toY:function(e){window.scrollTo(0,e)},getY:r,getHeight:function(){return window.innerHeight||n.clientHeight},getTopOf:function(e){return e.getBoundingClientRect().top+r()-n.offsetTop}});if(o.createScroller=function(e,r,o){return t({body:e,toY:function(t){e.scrollTop=t},getY:function(){return e.scrollTop},getHeight:function(){return Math.min(e.clientHeight,window.innerHeight||n.clientHeight)},getTopOf:function(e){return e.offsetTop}},r,o)},"addEventListener"in window&&!window.noZensmooth&&!e(document.body)){var i="history"in window&&"pushState"in history,a=i&&"scrollRestoration"in history;a&&(history.scrollRestoration="auto"),window.addEventListener("load",function(){a&&(setTimeout(function(){history.scrollRestoration="manual"},9),window.addEventListener("popstate",function(e){e.state&&"zenscrollY"in e.state&&o.toY(e.state.zenscrollY)},!1)),window.location.hash&&setTimeout(function(){var e=o.setup().edgeOffset;if(e){var t=document.getElementById(window.location.href.split("#")[1]);if(t){var n=Math.max(0,o.getTopOf(t)-e),r=o.getY()-n;0<=r&&r<9&&window.scrollTo(0,n)}}},9)},!1);var u=new RegExp("(^|\\s)noZensmooth(\\s|$)");window.addEventListener("click",function(e){for(var t=e.target;t&&"A"!==t.tagName;)t=t.parentNode;if(!(!t||1!==e.which||e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)){if(a){var n=history.state&&"object"==typeof history.state?history.state:{};n.zenscrollY=o.getY();try{history.replaceState(n,"")}catch(e){}}var r=t.getAttribute("href")||"";if(0===r.indexOf("#")&&!u.test(t.className)){var s=0,l=document.getElementById(r.substring(1));if("#"!==r){if(!l)return;s=o.getTopOf(l)}e.preventDefault();var c=function(){window.location=r},f=o.setup().edgeOffset;f&&(s=Math.max(0,s-f),i&&(c=function(){history.pushState({},"",r)})),o.toY(s,null,c)}}},!1)}return o}(),void 0===(i="function"==typeof r?r.apply(t,o):r)||(e.exports=i)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p(n(4)),o=p(n(2)),i=p(n(3)),a=p(n(5)),u=p(n(6)),s=n(0),l=p(s),c=(p(n(1)),p(n(12)),n(388)),f=n(7);function p(e){return e&&e.__esModule?e:{default:e}}var d=c.helpers.opId,h=function(e){function t(e,n){(0,o.default)(this,t);var i=(0,a.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e,n));return i.toggleShown=function(){var e=i.props,t=e.layoutActions,n=e.tag,r=e.operationId,o=e.isShown,a=i.getResolvedSubtree();o||void 0!==a||i.requestResolvedSubtree(),t.show(["operations",n,r],!o)},i.onCancelClick=function(){i.setState({tryItOutEnabled:!i.state.tryItOutEnabled})},i.onTryoutClick=function(){var e=i.props,t=e.specActions,n=e.path,r=e.method;i.setState({tryItOutEnabled:!i.state.tryItOutEnabled}),t.clearValidateParams([n,r])},i.onExecute=function(){i.setState({executeInProgress:!0})},i.getResolvedSubtree=function(){var e=i.props,t=e.specSelectors,n=e.path,r=e.method,o=e.specPath;return o?t.specResolvedSubtree(o.toJS()):t.specResolvedSubtree(["paths",n,r])},i.requestResolvedSubtree=function(){var e=i.props,t=e.specActions,n=e.path,r=e.method,o=e.specPath;return o?t.requestResolvedSubtree(o.toJS()):t.requestResolvedSubtree(["paths",n,r])},i.state={tryItOutEnabled:!1,executeInProgress:!1},i}return(0,u.default)(t,e),(0,i.default)(t,[{key:"mapStateToProps",value:function(e,t){var n=t.op,r=t.layoutSelectors,o=(0,t.getConfigs)(),i=o.docExpansion,a=o.deepLinking,u=o.displayOperationId,s=o.displayRequestDuration,l=o.supportedSubmitMethods,c=r.showSummary(),f=n.getIn(["operation","__originalOperationId"])||n.getIn(["operation","operationId"])||d(n.get("operation"),t.path,t.method)||n.get("id"),p=["operations",t.tag,f],h=a&&"false"!==a,v=l.indexOf(t.method)>=0&&(void 0===t.allowTryItOut?t.specSelectors.allowTryItOutFor(t.path,t.method):t.allowTryItOut),m=n.getIn(["operation","security"])||t.specSelectors.security();return{operationId:f,isDeepLinkingEnabled:h,showSummary:c,displayOperationId:u,displayRequestDuration:s,allowTryItOut:v,security:m,isAuthorized:t.authSelectors.isAuthorized(m),isShown:r.isShown(p,"full"===i),jumpToKey:"paths."+t.path+"."+t.method,response:t.specSelectors.responseFor(t.path,t.method),request:t.specSelectors.requestFor(t.path,t.method)}}},{key:"componentDidMount",value:function(){var e=this.props.isShown,t=this.getResolvedSubtree();e&&void 0===t&&this.requestResolvedSubtree()}},{key:"componentWillReceiveProps",value:function(e){var t=e.response,n=e.isShown,r=this.getResolvedSubtree();t!==this.props.response&&this.setState({executeInProgress:!1}),n&&void 0===r&&this.requestResolvedSubtree()}},{key:"render",value:function(){var e=this.props,t=e.op,n=e.tag,r=e.path,o=e.method,i=e.security,a=e.isAuthorized,u=e.operationId,s=e.showSummary,c=e.isShown,p=e.jumpToKey,d=e.allowTryItOut,h=e.response,v=e.request,m=e.displayOperationId,g=e.displayRequestDuration,y=e.isDeepLinkingEnabled,b=e.specPath,_=e.specSelectors,w=e.specActions,E=e.getComponent,x=e.getConfigs,S=e.layoutSelectors,C=e.layoutActions,k=e.authActions,A=e.authSelectors,O=e.oas3Actions,P=e.oas3Selectors,T=e.fn,M=E("operation"),I=this.getResolvedSubtree()||(0,f.Map)(),j=(0,f.fromJS)({op:I,tag:n,path:r,summary:t.getIn(["operation","summary"])||"",deprecated:I.get("deprecated")||t.getIn(["operation","deprecated"])||!1,method:o,security:i,isAuthorized:a,operationId:u,originalOperationId:I.getIn(["operation","__originalOperationId"]),showSummary:s,isShown:c,jumpToKey:p,allowTryItOut:d,request:v,displayOperationId:m,displayRequestDuration:g,isDeepLinkingEnabled:y,executeInProgress:this.state.executeInProgress,tryItOutEnabled:this.state.tryItOutEnabled});return l.default.createElement(M,{operation:j,response:h,request:v,isShown:c,toggleShown:this.toggleShown,onTryoutClick:this.onTryoutClick,onCancelClick:this.onCancelClick,onExecute:this.onExecute,specPath:b,specActions:w,specSelectors:_,oas3Actions:O,oas3Selectors:P,layoutActions:C,layoutSelectors:S,authActions:k,authSelectors:A,getComponent:E,getConfigs:x,fn:T})}}]),t}(s.PureComponent);h.defaultProps={showSummary:!0,response:null,allowTryItOut:!0,displayOperationId:!1,displayRequestDuration:!1},t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(2)),i=l(n(3)),a=l(n(5)),u=l(n(6)),s=l(n(0));l(n(1));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"getLayout",value:function(){var e=this.props,t=e.getComponent,n=e.layoutSelectors.current(),r=t(n,!0);return r||function(){return s.default.createElement("h1",null,' No layout defined for "',n,'" ')}}},{key:"render",value:function(){var e=this.getLayout();return s.default.createElement(e,null)}}]),t}(s.default.Component);t.default=c,c.defaultProps={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(2)),i=l(n(3)),a=l(n(5)),u=l(n(6)),s=l(n(0));l(n(1));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){var e,n,i,u;(0,o.default)(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=i=(0,a.default)(this,(e=t.__proto__||(0,r.default)(t)).call.apply(e,[this].concat(l))),i.close=function(){i.props.authActions.showDefinitions(!1)},u=n,(0,a.default)(i,u)}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.authSelectors,n=e.authActions,r=e.getComponent,o=e.errSelectors,i=e.specSelectors,a=e.fn.AST,u=void 0===a?{}:a,l=t.shownDefinitions(),c=r("auths");return s.default.createElement("div",{className:"dialog-ux"},s.default.createElement("div",{className:"backdrop-ux"}),s.default.createElement("div",{className:"modal-ux"},s.default.createElement("div",{className:"modal-dialog-ux"},s.default.createElement("div",{className:"modal-ux-inner"},s.default.createElement("div",{className:"modal-ux-header"},s.default.createElement("h3",null,"Available authorizations"),s.default.createElement("button",{type:"button",className:"close-modal",onClick:this.close},s.default.createElement("svg",{width:"20",height:"20"},s.default.createElement("use",{href:"#close",xlinkHref:"#close"})))),s.default.createElement("div",{className:"modal-ux-content"},l.valueSeq().map(function(e,a){return s.default.createElement(c,{key:a,AST:u,definitions:e,getComponent:r,errSelectors:o,authSelectors:t,authActions:n,specSelectors:i})}))))))}}]),t}(s.default.Component);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(2)),i=l(n(3)),a=l(n(5)),u=l(n(6)),s=l(n(0));l(n(1));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.isAuthorized,n=e.showPopup,r=e.onClick,o=(0,e.getComponent)("authorizationPopup",!0);return s.default.createElement("div",{className:"auth-wrapper"},s.default.createElement("button",{className:t?"btn authorize locked":"btn authorize unlocked",onClick:r},s.default.createElement("span",null,"Authorize"),s.default.createElement("svg",{width:"20",height:"20"},s.default.createElement("use",{href:t?"#locked":"#unlocked",xlinkHref:t?"#locked":"#unlocked"}))),n&&s.default.createElement(o,null))}}]),t}(s.default.Component);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(2)),i=l(n(3)),a=l(n(5)),u=l(n(6)),s=l(n(0));l(n(1));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.authActions,n=e.authSelectors,r=e.specSelectors,o=e.getComponent,i=r.securityDefinitions(),a=n.definitionsToAuthorize(),u=o("authorizeBtn");return i?s.default.createElement(u,{onClick:function(){return t.showDefinitions(a)},isAuthorized:!!n.authorized().size,showPopup:!!n.shownDefinitions(),getComponent:o}):null}}]),t}(s.default.Component);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(2)),i=l(n(3)),a=l(n(5)),u=l(n(6)),s=l(n(0));l(n(1));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){var e,n,i,u;(0,o.default)(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=i=(0,a.default)(this,(e=t.__proto__||(0,r.default)(t)).call.apply(e,[this].concat(l))),i.onClick=function(e){e.stopPropagation();var t=i.props.onClick;t&&t()},u=n,(0,a.default)(i,u)}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props.isAuthorized;return s.default.createElement("button",{className:e?"authorization__btn locked":"authorization__btn unlocked","aria-label":e?"authorization button locked":"authorization button unlocked",onClick:this.onClick},s.default.createElement("svg",{width:"20",height:"20"},s.default.createElement("use",{href:e?"#locked":"#unlocked",xlinkHref:e?"#locked":"#unlocked"})))}}]),t}(s.default.Component);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(22)),o=c(n(4)),i=c(n(2)),a=c(n(3)),u=c(n(5)),s=c(n(6)),l=c(n(0));c(n(1)),c(n(12));function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e,n){(0,i.default)(this,t);var a=(0,u.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e,n));return a.onAuthChange=function(e){var t=e.name;a.setState((0,r.default)({},t,e))},a.submitAuth=function(e){e.preventDefault(),a.props.authActions.authorize(a.state)},a.logoutClick=function(e){e.preventDefault();var t=a.props,n=t.authActions,r=t.definitions.map(function(e,t){return t}).toArray();n.logout(r)},a.close=function(e){e.preventDefault(),a.props.authActions.showDefinitions(!1)},a.state={},a}return(0,s.default)(t,e),(0,a.default)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.definitions,r=t.getComponent,o=t.authSelectors,i=t.errSelectors,a=r("AuthItem"),u=r("oauth2",!0),s=r("Button"),c=o.authorized(),f=n.filter(function(e,t){return!!c.get(t)}),p=n.filter(function(e){return"oauth2"!==e.get("type")}),d=n.filter(function(e){return"oauth2"===e.get("type")});return l.default.createElement("div",{className:"auth-container"},!!p.size&&l.default.createElement("form",{onSubmit:this.submitAuth},p.map(function(t,n){return l.default.createElement(a,{key:n,schema:t,name:n,getComponent:r,onAuthChange:e.onAuthChange,authorized:c,errSelectors:i})}).toArray(),l.default.createElement("div",{className:"auth-btn-wrapper"},p.size===f.size?l.default.createElement(s,{className:"btn modal-btn auth",onClick:this.logoutClick},"Logout"):l.default.createElement(s,{type:"submit",className:"btn modal-btn auth authorize"},"Authorize"),l.default.createElement(s,{className:"btn modal-btn auth btn-done",onClick:this.close},"Close"))),d&&d.size?l.default.createElement("div",null,l.default.createElement("div",{className:"scope-def"},l.default.createElement("p",null,"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes."),l.default.createElement("p",null,"API requires the following scopes. Select which ones you want to grant to Swagger UI.")),n.filter(function(e){return"oauth2"===e.get("type")}).map(function(e,t){return l.default.createElement("div",{key:t},l.default.createElement(u,{authorized:c,schema:e,name:t}))}).toArray()):null)}}]),t}(l.default.Component);t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(2)),i=l(n(3)),a=l(n(5)),u=l(n(6)),s=l(n(0));l(n(1)),l(n(12));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.schema,n=e.name,r=e.getComponent,o=e.onAuthChange,i=e.authorized,a=e.errSelectors,u=r("apiKeyAuth"),l=r("basicAuth"),c=void 0,f=t.get("type");switch(f){case"apiKey":c=s.default.createElement(u,{key:n,schema:t,name:n,errSelectors:a,authorized:i,getComponent:r,onChange:o});break;case"basic":c=s.default.createElement(l,{key:n,schema:t,name:n,errSelectors:a,authorized:i,getComponent:r,onChange:o});break;default:c=s.default.createElement("div",{key:n},"Unknown security definition type ",f)}return s.default.createElement("div",{key:n+"-jump"},c)}}]),t}(s.default.Component);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(2)),i=l(n(3)),a=l(n(5)),u=l(n(6)),s=l(n(0));l(n(1));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props.error,t=e.get("level"),n=e.get("message"),r=e.get("source");return s.default.createElement("div",{className:"errors",style:{backgroundColor:"#ffeeee",color:"red",margin:"1em"}},s.default.createElement("b",{style:{textTransform:"capitalize",marginRight:"1em"}},r," ",t),s.default.createElement("span",null,n))}}]),t}(s.default.Component);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(23)),o=c(n(4)),i=c(n(2)),a=c(n(3)),u=c(n(5)),s=c(n(6)),l=c(n(0));c(n(1));function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e,n){(0,i.default)(this,t);var r=(0,u.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e,n));p.call(r);var a=r.props,s=a.name,l=a.schema,c=r.getValue();return r.state={name:s,schema:l,value:c},r}return(0,s.default)(t,e),(0,a.default)(t,[{key:"getValue",value:function(){var e=this.props,t=e.name,n=e.authorized;return n&&n.getIn([t,"value"])}},{key:"render",value:function(){var e=this.props,t=e.schema,n=e.getComponent,r=e.errSelectors,o=e.name,i=n("Input"),a=n("Row"),u=n("Col"),s=n("authError"),c=n("Markdown"),f=n("JumpToPath",!0),p=this.getValue(),d=r.allErrors().filter(function(e){return e.get("authId")===o});return l.default.createElement("div",null,l.default.createElement("h4",null,l.default.createElement("code",null,o||t.get("name")),"  (apiKey)",l.default.createElement(f,{path:["securityDefinitions",o]})),p&&l.default.createElement("h6",null,"Authorized"),l.default.createElement(a,null,l.default.createElement(c,{source:t.get("description")})),l.default.createElement(a,null,l.default.createElement("p",null,"Name: ",l.default.createElement("code",null,t.get("name")))),l.default.createElement(a,null,l.default.createElement("p",null,"In: ",l.default.createElement("code",null,t.get("in")))),l.default.createElement(a,null,l.default.createElement("label",null,"Value:"),p?l.default.createElement("code",null," ****** "):l.default.createElement(u,null,l.default.createElement(i,{type:"text",onChange:this.onChange}))),d.valueSeq().map(function(e,t){return l.default.createElement(s,{error:e,key:t})}))}}]),t}(l.default.Component),p=function(){var e=this;this.onChange=function(t){var n=e.props.onChange,o=t.target.value,i=(0,r.default)({},e.state,{value:o});e.setState(i),n(i)}};t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(2)),i=l(n(3)),a=l(n(5)),u=l(n(6)),s=l(n(0));l(n(1)),l(n(12));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e,n){(0,o.default)(this,t);var i=(0,a.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e,n));f.call(i);var u=i.props,s=u.schema,l=u.name,c=i.getValue().username;return i.state={name:l,schema:s,value:c?{username:c}:{}},i}return(0,u.default)(t,e),(0,i.default)(t,[{key:"getValue",value:function(){var e=this.props,t=e.authorized,n=e.name;return t&&t.getIn([n,"value"])||{}}},{key:"render",value:function(){var e=this.props,t=e.schema,n=e.getComponent,r=e.name,o=e.errSelectors,i=n("Input"),a=n("Row"),u=n("Col"),l=n("authError"),c=n("JumpToPath",!0),f=n("Markdown"),p=this.getValue().username,d=o.allErrors().filter(function(e){return e.get("authId")===r});return s.default.createElement("div",null,s.default.createElement("h4",null,"Basic authorization",s.default.createElement(c,{path:["securityDefinitions",r]})),p&&s.default.createElement("h6",null,"Authorized"),s.default.createElement(a,null,s.default.createElement(f,{source:t.get("description")})),s.default.createElement(a,null,s.default.createElement("label",null,"Username:"),p?s.default.createElement("code",null," ",p," "):s.default.createElement(u,null,s.default.createElement(i,{type:"text",required:"required",name:"username",onChange:this.onChange}))),s.default.createElement(a,null,s.default.createElement("label",null,"Password:"),p?s.default.createElement("code",null," ****** "):s.default.createElement(u,null,s.default.createElement(i,{required:"required",autoComplete:"new-password",name:"password",type:"password",onChange:this.onChange}))),d.valueSeq().map(function(e,t){return s.default.createElement(l,{error:e,key:t})}))}}]),t}(s.default.Component),f=function(){var e=this;this.onChange=function(t){var n=e.props.onChange,r=t.target,o=r.value,i=r.name,a=e.state.value;a[i]=o,e.setState({value:a}),n(e.state)}};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(22)),o=f(n(4)),i=f(n(2)),a=f(n(3)),u=f(n(5)),s=f(n(6)),l=f(n(0)),c=(f(n(1)),f(n(948)));function f(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(e,n){(0,i.default)(this,t);var r=(0,u.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e,n));d.call(r);var a=r.props,s=a.name,l=a.schema,c=a.authorized,f=a.authSelectors,p=c&&c.get(s),h=f.getConfigs()||{},v=p&&p.get("username")||"",m=p&&p.get("clientId")||h.clientId||"",g=p&&p.get("clientSecret")||h.clientSecret||"",y=p&&p.get("passwordType")||"basic";return r.state={appName:h.appName,name:s,schema:l,scopes:[],clientId:m,clientSecret:g,username:v,password:"",passwordType:y},r}return(0,s.default)(t,e),(0,a.default)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.schema,r=t.getComponent,o=t.authSelectors,i=t.errSelectors,a=t.name,u=t.specSelectors,s=r("Input"),c=r("Row"),f=r("Col"),p=r("Button"),d=r("authError"),h=r("JumpToPath",!0),v=r("Markdown"),m=u.isOAS3,g=m()?"authorizationCode":"accessCode",y=m()?"clientCredentials":"application",b=n.get("flow"),_=n.get("allowedScopes")||n.get("scopes"),w=!!o.authorized().get(a),E=i.allErrors().filter(function(e){return e.get("authId")===a}),x=!E.filter(function(e){return"validation"===e.get("source")}).size,S=n.get("description");return l.default.createElement("div",null,l.default.createElement("h4",null,a," (OAuth2, ",n.get("flow"),") ",l.default.createElement(h,{path:["securityDefinitions",a]})),this.state.appName?l.default.createElement("h5",null,"Application: ",this.state.appName," "):null,S&&l.default.createElement(v,{source:n.get("description")}),w&&l.default.createElement("h6",null,"Authorized"),("implicit"===b||b===g)&&l.default.createElement("p",null,"Authorization URL: ",l.default.createElement("code",null,n.get("authorizationUrl"))),("password"===b||b===g||b===y)&&l.default.createElement("p",null,"Token URL:",l.default.createElement("code",null," ",n.get("tokenUrl"))),l.default.createElement("p",{className:"flow"},"Flow: ",l.default.createElement("code",null,n.get("flow"))),"password"!==b?null:l.default.createElement(c,null,l.default.createElement(c,null,l.default.createElement("label",{htmlFor:"oauth_username"},"username:"),w?l.default.createElement("code",null," ",this.state.username," "):l.default.createElement(f,{tablet:10,desktop:10},l.default.createElement("input",{id:"oauth_username",type:"text","data-name":"username",onChange:this.onInputChange}))),l.default.createElement(c,null,l.default.createElement("label",{htmlFor:"oauth_password"},"password:"),w?l.default.createElement("code",null," ****** "):l.default.createElement(f,{tablet:10,desktop:10},l.default.createElement("input",{id:"oauth_password",type:"password","data-name":"password",onChange:this.onInputChange}))),l.default.createElement(c,null,l.default.createElement("label",{htmlFor:"password_type"},"Client credentials location:"),w?l.default.createElement("code",null," ",this.state.passwordType," "):l.default.createElement(f,{tablet:10,desktop:10},l.default.createElement("select",{id:"password_type","data-name":"passwordType",onChange:this.onInputChange},l.default.createElement("option",{value:"basic"},"Authorization header"),l.default.createElement("option",{value:"request-body"},"Request body"))))),(b===y||"implicit"===b||b===g||"password"===b)&&(!w||w&&this.state.clientId)&&l.default.createElement(c,null,l.default.createElement("label",{htmlFor:"client_id"},"client_id:"),w?l.default.createElement("code",null," ****** "):l.default.createElement(f,{tablet:10,desktop:10},l.default.createElement("input",{id:"client_id",type:"text",required:"password"===b,value:this.state.clientId,"data-name":"clientId",onChange:this.onInputChange}))),(b===y||b===g||"password"===b)&&l.default.createElement(c,null,l.default.createElement("label",{htmlFor:"client_secret"},"client_secret:"),w?l.default.createElement("code",null," ****** "):l.default.createElement(f,{tablet:10,desktop:10},l.default.createElement("input",{id:"client_secret",value:this.state.clientSecret,type:"text","data-name":"clientSecret",onChange:this.onInputChange}))),!w&&_&&_.size?l.default.createElement("div",{className:"scopes"},l.default.createElement("h2",null,"Scopes:"),_.map(function(t,n){return l.default.createElement(c,{key:n},l.default.createElement("div",{className:"checkbox"},l.default.createElement(s,{"data-value":n,id:n+"-"+b+"-checkbox-"+e.state.name,disabled:w,type:"checkbox",onChange:e.onScopeChange}),l.default.createElement("label",{htmlFor:n+"-"+b+"-checkbox-"+e.state.name},l.default.createElement("span",{className:"item"}),l.default.createElement("div",{className:"text"},l.default.createElement("p",{className:"name"},n),l.default.createElement("p",{className:"description"},t)))))}).toArray()):null,E.valueSeq().map(function(e,t){return l.default.createElement(d,{error:e,key:t})}),l.default.createElement("div",{className:"auth-btn-wrapper"},x&&(w?l.default.createElement(p,{className:"btn modal-btn auth authorize",onClick:this.logout},"Logout"):l.default.createElement(p,{className:"btn modal-btn auth authorize",onClick:this.authorize},"Authorize")),l.default.createElement(p,{className:"btn modal-btn auth btn-done",onClick:this.close},"Close")))}}]),t}(l.default.Component),d=function(){var e=this;this.close=function(t){t.preventDefault(),e.props.authActions.showDefinitions(!1)},this.authorize=function(){var t=e.props,n=t.authActions,r=t.errActions,o=t.getConfigs,i=t.authSelectors,a=o(),u=i.getConfigs();r.clear({authId:name,type:"auth",source:"auth"}),(0,c.default)({auth:e.state,authActions:n,errActions:r,configs:a,authConfigs:u})},this.onScopeChange=function(t){var n=t.target,r=n.checked,o=n.dataset.value;if(r&&-1===e.state.scopes.indexOf(o)){var i=e.state.scopes.concat([o]);e.setState({scopes:i})}else!r&&e.state.scopes.indexOf(o)>-1&&e.setState({scopes:e.state.scopes.filter(function(e){return e!==o})})},this.onInputChange=function(t){var n=t.target,o=n.dataset.name,i=n.value,a=(0,r.default)({},o,i);e.setState(a)},this.logout=function(t){t.preventDefault();var n=e.props,r=n.authActions,o=n.errActions,i=n.name;o.clear({authId:i,type:"auth",source:"auth"}),r.logout([i])}};t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.auth,n=e.authActions,r=e.errActions,o=e.configs,u=e.authConfigs,s=void 0===u?{}:u,l=t.schema,c=t.scopes,f=t.name,p=t.clientId,d=l.get("flow"),h=[];switch(d){case"password":return void n.authorizePassword(t);case"application":return void n.authorizeApplication(t);case"accessCode":h.push("response_type=code");break;case"implicit":h.push("response_type=token");break;case"clientCredentials":return void n.authorizeApplication(t);case"authorizationCode":h.push("response_type=code")}"string"==typeof p&&h.push("client_id="+encodeURIComponent(p));var v=o.oauth2RedirectUrl;if(void 0===v)return void r.newAuthErr({authId:f,source:"validation",level:"error",message:"oauth2RedirectUrl configuration is not passed. Oauth2 authorization cannot be performed."});if(h.push("redirect_uri="+encodeURIComponent(v)),Array.isArray(c)&&0<c.length){var m=s.scopeSeparator||" ";h.push("scope="+encodeURIComponent(c.join(m)))}var g=(0,a.btoa)(new Date);h.push("state="+encodeURIComponent(g)),void 0!==s.realm&&h.push("realm="+encodeURIComponent(s.realm));var y=s.additionalQueryStringParams;for(var b in y)void 0!==y[b]&&h.push([b,y[b]].map(encodeURIComponent).join("="));var _=l.get("authorizationUrl"),w=[_,h.join("&")].join(-1===_.indexOf("?")?"?":"&"),E=void 0;E="implicit"===d?n.preAuthorizeImplicit:s.useBasicAuthenticationWithAccessCodeGrant?n.authorizeAccessCodeWithBasicAuthentication:n.authorizeAccessCodeWithFormParams;i.default.swaggerUIRedirectOauth2={auth:t,state:g,redirectUrl:v,callback:E,errCb:r.newAuthErr},i.default.open(w)};var r,o=n(32),i=(r=o)&&r.__esModule?r:{default:r},a=n(9)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(4)),o=c(n(2)),i=c(n(3)),a=c(n(5)),u=c(n(6)),s=n(0),l=c(s);c(n(1));function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(){var e,n,i,u;(0,o.default)(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=i=(0,a.default)(this,(e=t.__proto__||(0,r.default)(t)).call.apply(e,[this].concat(l))),i.onClick=function(){var e=i.props,t=e.specActions,n=e.path,r=e.method;t.clearResponse(n,r),t.clearRequest(n,r)},u=n,(0,a.default)(i,u)}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){return l.default.createElement("button",{className:"btn btn-clear opblock-control__btn",onClick:this.onClick},"Clear")}}]),t}(s.Component);t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(42)),o=c(n(4)),i=c(n(2)),a=c(n(3)),u=c(n(5)),s=c(n(6)),l=c(n(0));c(n(1)),c(n(12)),n(7);function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){var t=e.headers;return l.default.createElement("div",null,l.default.createElement("h5",null,"Response headers"),l.default.createElement("pre",null,t))},p=function(e){var t=e.duration;return l.default.createElement("div",null,l.default.createElement("h5",null,"Request duration"),l.default.createElement("pre",null,t," ms"))},d=function(e){function t(){return(0,i.default)(this,t),(0,u.default)(this,(t.__proto__||(0,o.default)(t)).apply(this,arguments))}return(0,s.default)(t,e),(0,a.default)(t,[{key:"shouldComponentUpdate",value:function(e){return this.props.response!==e.response||this.props.path!==e.path||this.props.method!==e.method||this.props.displayRequestDuration!==e.displayRequestDuration}},{key:"render",value:function(){var e=this.props,t=e.response,n=e.getComponent,o=e.getConfigs,i=e.displayRequestDuration,a=e.specSelectors,u=e.path,s=e.method,c=o().showMutatedRequest?a.mutatedRequestFor(u,s):a.requestFor(u,s),d=t.get("status"),h=c.get("url"),v=t.get("headers").toJS(),m=t.get("notDocumented"),g=t.get("error"),y=t.get("text"),b=t.get("duration"),_=(0,r.default)(v),w=v["content-type"]||v["Content-Type"],E=n("curl"),x=n("responseBody"),S=_.map(function(e){return l.default.createElement("span",{className:"headerline",key:e}," ",e,": ",v[e]," ")}),C=0!==S.length;return l.default.createElement("div",null,c&&l.default.createElement(E,{request:c}),h&&l.default.createElement("div",null,l.default.createElement("h4",null,"Request URL"),l.default.createElement("div",{className:"request-url"},l.default.createElement("pre",null,h))),l.default.createElement("h4",null,"Server response"),l.default.createElement("table",{className:"responses-table live-responses-table"},l.default.createElement("thead",null,l.default.createElement("tr",{className:"responses-header"},l.default.createElement("td",{className:"col col_header response-col_status"},"Code"),l.default.createElement("td",{className:"col col_header response-col_description"},"Details"))),l.default.createElement("tbody",null,l.default.createElement("tr",{className:"response"},l.default.createElement("td",{className:"col response-col_status"},d,m?l.default.createElement("div",{className:"response-undocumented"},l.default.createElement("i",null," Undocumented ")):null),l.default.createElement("td",{className:"col response-col_description"},g?l.default.createElement("span",null,t.get("name")+": "+t.get("message")):null,y?l.default.createElement(x,{content:y,contentType:w,url:h,headers:v,getComponent:n}):null,C?l.default.createElement(f,{headers:S}):null,i&&b?l.default.createElement(p,{duration:b}):null)))))}}]),t}(l.default.Component);t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=h(n(42)),o=h(n(45)),i=h(n(4)),a=h(n(2)),u=h(n(3)),s=h(n(5)),l=h(n(6)),c=h(n(0)),f=h(n(210)),p=(h(n(1)),n(9)),d=h(n(32));function h(e){return e&&e.__esModule?e:{default:e}}var v=function(e){function t(e,n){(0,a.default)(this,t);var r=(0,s.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e,n));r.getDefinitionUrl=function(){var e=r.props.specSelectors;return new f.default(e.url(),d.default.location).toString()};var o=(0,e.getConfigs)().validatorUrl;return r.state={url:r.getDefinitionUrl(),validatorUrl:void 0===o?"https://online.swagger.io/validator":o},r}return(0,l.default)(t,e),(0,u.default)(t,[{key:"componentWillReceiveProps",value:function(e){var t=(0,e.getConfigs)().validatorUrl;this.setState({url:this.getDefinitionUrl(),validatorUrl:void 0===t?"https://online.swagger.io/validator":t})}},{key:"render",value:function(){var e=(0,this.props.getConfigs)().spec,t=(0,p.sanitizeUrl)(this.state.validatorUrl);return"object"===(void 0===e?"undefined":(0,o.default)(e))&&(0,r.default)(e).length?null:!this.state.url||!this.state.validatorUrl||this.state.url.indexOf("localhost")>=0||this.state.url.indexOf("127.0.0.1")>=0?null:c.default.createElement("span",{style:{float:"right"}},c.default.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:t+"/debug?url="+encodeURIComponent(this.state.url)},c.default.createElement(m,{src:t+"?url="+encodeURIComponent(this.state.url),alt:"Online validator badge"})))}}]),t}(c.default.Component);t.default=v;var m=function(e){function t(e){(0,a.default)(this,t);var n=(0,s.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e));return n.state={loaded:!1,error:!1},n}return(0,l.default)(t,e),(0,u.default)(t,[{key:"componentDidMount",value:function(){var e=this,t=new Image;t.onload=function(){e.setState({loaded:!0})},t.onerror=function(){e.setState({error:!0})},t.src=this.props.src}},{key:"componentWillReceiveProps",value:function(e){var t=this;if(e.src!==this.props.src){var n=new Image;n.onload=function(){t.setState({loaded:!0})},n.onerror=function(){t.setState({error:!0})},n.src=e.src}}},{key:"render",value:function(){return this.state.error?c.default.createElement("img",{alt:"Error"}):this.state.loaded?c.default.createElement("img",{src:this.props.src,alt:this.props.alt}):null}}]),t}(c.default.Component)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(4)),o=c(n(2)),i=c(n(3)),a=c(n(5)),u=c(n(6)),s=c(n(0)),l=(c(n(1)),c(n(7)));function c(e){return e&&e.__esModule?e:{default:e}}var f=["get","put","post","delete","options","head","patch"],p=f.concat(["trace"]),d=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.specSelectors,n=e.getComponent,r=e.layoutSelectors,o=e.layoutActions,i=e.getConfigs,a=e.fn,u=t.taggedOperations(),c=n("OperationContainer",!0),d=n("OperationTag"),h=i().maxDisplayedTags,v=r.currentFilter();return v&&!0!==v&&(u=a.opsFilter(u,v)),h&&!isNaN(h)&&h>=0&&(u=u.slice(0,h)),s.default.createElement("div",null,u.map(function(e,a){var u=e.get("operations");return s.default.createElement(d,{key:"operation-"+a,tagObj:e,tag:a,layoutSelectors:r,layoutActions:o,getConfigs:i,getComponent:n},u.map(function(e){var n=e.get("path"),r=e.get("method"),o=l.default.List(["paths",n,r]);return-1===(t.isOAS3()?p:f).indexOf(r)?null:s.default.createElement(c,{key:n+"-"+r,specPath:o,op:e,path:n,method:r,tag:a})}).toArray())}).toArray(),u.size<1?s.default.createElement("h3",null," No operations defined in spec! "):null)}}]),t}(s.default.Component);t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(4)),o=f(n(2)),i=f(n(3)),a=f(n(5)),u=f(n(6)),s=f(n(0)),l=(f(n(1)),f(n(12)),f(n(7))),c=n(9);function f(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.tagObj,n=e.tag,r=e.children,o=e.layoutSelectors,i=e.layoutActions,a=e.getConfigs,u=e.getComponent,l=a(),f=l.docExpansion,p=l.deepLinking,d=p&&"false"!==p,h=u("Collapse"),v=u("Markdown"),m=u("DeepLink"),g=u("Link"),y=t.getIn(["tagDetails","description"],null),b=t.getIn(["tagDetails","externalDocs","description"]),_=t.getIn(["tagDetails","externalDocs","url"]),w=["operations-tag",n],E=o.isShown(w,"full"===f||"list"===f);return s.default.createElement("div",{className:E?"opblock-tag-section is-open":"opblock-tag-section"},s.default.createElement("h4",{onClick:function(){return i.show(w,!E)},className:y?"opblock-tag":"opblock-tag no-desc",id:w.map(function(e){return(0,c.escapeDeepLinkPath)(e)}).join("-"),"data-tag":n,"data-is-open":E},s.default.createElement(m,{enabled:d,isShown:E,path:(0,c.createDeepLinkPath)(n),text:n}),y?s.default.createElement("small",null,s.default.createElement(v,{source:y})):s.default.createElement("small",null),s.default.createElement("div",null,b?s.default.createElement("small",null,b,_?": ":null,_?s.default.createElement(g,{href:(0,c.sanitizeUrl)(_),onClick:function(e){return e.stopPropagation()},target:"_blank"},_):null):null),s.default.createElement("button",{className:"expand-operation",title:E?"Collapse operation":"Expand operation",onClick:function(){return i.show(w,!E)}},s.default.createElement("svg",{className:"arrow",width:"20",height:"20"},s.default.createElement("use",{href:E?"#large-arrow-down":"#large-arrow",xlinkHref:E?"#large-arrow-down":"#large-arrow"})))),s.default.createElement(h,{isOpened:E},r))}}]),t}(s.default.Component);p.defaultProps={tagObj:l.default.fromJS({}),tag:""},t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p(n(4)),o=p(n(2)),i=p(n(3)),a=p(n(5)),u=p(n(6)),s=n(0),l=p(s),c=(p(n(1)),n(9)),f=n(7);p(n(12));function p(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.specPath,r=e.response,o=e.request,i=e.toggleShown,a=e.onTryoutClick,u=e.onCancelClick,s=e.onExecute,f=e.fn,p=e.getComponent,d=e.getConfigs,h=e.specActions,v=e.specSelectors,m=e.authActions,g=e.authSelectors,y=e.oas3Actions,b=e.oas3Selectors,_=this.props.operation,w=_.toJS(),E=w.deprecated,x=w.isShown,S=w.path,C=w.method,k=w.op,A=w.tag,O=w.operationId,P=w.allowTryItOut,T=w.displayRequestDuration,M=w.tryItOutEnabled,I=w.executeInProgress,j=k.description,N=k.externalDocs,R=k.schemes,D=_.getIn(["op"]),L=D.get("responses"),U=(0,c.getList)(D,["parameters"]),q=v.operationScheme(S,C),F=["operations",A,O],z=(0,c.getExtensions)(D),B=p("responses"),V=p("parameters"),H=p("execute"),W=p("clear"),J=p("Collapse"),Y=p("Markdown"),K=p("schemes"),G=p("OperationServers"),$=p("OperationExt"),Z=p("OperationSummary"),X=p("Link"),Q=d().showExtensions;if(L&&r&&r.size>0){var ee=!L.get(String(r.get("status")))&&!L.get("default");r=r.set("notDocumented",ee)}var te=[S,C];return l.default.createElement("div",{className:E?"opblock opblock-deprecated":x?"opblock opblock-"+C+" is-open":"opblock opblock-"+C,id:(0,c.escapeDeepLinkPath)(F.join("-"))},l.default.createElement(Z,{operationProps:_,toggleShown:i,getComponent:p,authActions:m,authSelectors:g,specPath:t}),l.default.createElement(J,{isOpened:x},l.default.createElement("div",{className:"opblock-body"},D&&D.size||null===D?null:l.default.createElement("img",{height:"32px",width:"32px",src:n(412),className:"opblock-loading-animation"}),E&&l.default.createElement("h4",{className:"opblock-title_normal"}," Warning: Deprecated"),j&&l.default.createElement("div",{className:"opblock-description-wrapper"},l.default.createElement("div",{className:"opblock-description"},l.default.createElement(Y,{source:j}))),N&&N.url?l.default.createElement("div",{className:"opblock-external-docs-wrapper"},l.default.createElement("h4",{className:"opblock-title_normal"},"Find more details"),l.default.createElement("div",{className:"opblock-external-docs"},l.default.createElement("span",{className:"opblock-external-docs__description"},l.default.createElement(Y,{source:N.description})),l.default.createElement(X,{target:"_blank",className:"opblock-external-docs__link",href:(0,c.sanitizeUrl)(N.url)},N.url))):null,D&&D.size?l.default.createElement(V,{parameters:U,specPath:t.push("parameters"),operation:D,onChangeKey:te,onTryoutClick:a,onCancelClick:u,tryItOutEnabled:M,allowTryItOut:P,fn:f,getComponent:p,specActions:h,specSelectors:v,pathMethod:[S,C],getConfigs:d}):null,M?l.default.createElement(G,{getComponent:p,path:S,method:C,operationServers:D.get("servers"),pathServers:v.paths().getIn([S,"servers"]),getSelectedServer:b.selectedServer,setSelectedServer:y.setSelectedServer,setServerVariableValue:y.setServerVariableValue,getServerVariable:b.serverVariableValue,getEffectiveServerValue:b.serverEffectiveValue}):null,M&&P&&R&&R.size?l.default.createElement("div",{className:"opblock-schemes"},l.default.createElement(K,{schemes:R,path:S,method:C,specActions:h,currentScheme:q})):null,l.default.createElement("div",{className:M&&r&&P?"btn-group":"execute-wrapper"},M&&P?l.default.createElement(H,{operation:D,specActions:h,specSelectors:v,path:S,method:C,onExecute:s}):null,M&&r&&P?l.default.createElement(W,{specActions:h,path:S,method:C}):null),I?l.default.createElement("div",{className:"loading-container"},l.default.createElement("div",{className:"loading"})):null,L?l.default.createElement(B,{responses:L,request:o,tryItOutResponse:r,getComponent:p,getConfigs:d,specSelectors:v,oas3Actions:y,specActions:h,produces:v.producesOptionsFor([S,C]),producesValue:v.currentProducesFor([S,C]),specPath:t.push("responses"),path:S,method:C,displayRequestDuration:T,fn:f}):null,Q&&z.size?l.default.createElement($,{extensions:z,getComponent:p}):null)))}}]),t}(s.PureComponent);d.defaultProps={operation:null,response:null,request:null,specPath:(0,f.List)(),summary:""},t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(4)),o=f(n(2)),i=f(n(3)),a=f(n(5)),u=f(n(6)),s=n(0),l=f(s),c=(f(n(1)),n(7));f(n(12));function f(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.toggleShown,n=e.getComponent,r=e.authActions,o=e.authSelectors,i=e.operationProps,a=e.specPath,u=i.toJS(),s=u.summary,c=u.isAuthorized,f=u.method,p=u.op,d=u.showSummary,h=u.operationId,v=u.originalOperationId,m=u.displayOperationId,g=p.summary,y=i.get("security"),b=n("authorizeOperationBtn"),_=n("OperationSummaryMethod"),w=n("OperationSummaryPath"),E=n("JumpToPath",!0);return l.default.createElement("div",{className:"opblock-summary opblock-summary-"+f,onClick:t},l.default.createElement(_,{method:f}),l.default.createElement(w,{getComponent:n,operationProps:i,specPath:a}),d?l.default.createElement("div",{className:"opblock-summary-description"},g||s):null,m&&(v||h)?l.default.createElement("span",{className:"opblock-summary-operation-id"},v||h):null,y&&y.count()?l.default.createElement(b,{isAuthorized:c,onClick:function(){var e=o.definitionsForRequirements(y);r.showDefinitions(e)}}):null,l.default.createElement(E,{path:a}))}}]),t}(s.PureComponent);p.defaultProps={operationProps:null,specPath:(0,c.List)(),summary:""},t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(4)),o=c(n(2)),i=c(n(3)),a=c(n(5)),u=c(n(6)),s=n(0),l=c(s);c(n(1)),n(7);function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props.method;return l.default.createElement("span",{className:"opblock-summary-method"},e.toUpperCase())}}]),t}(s.PureComponent);f.defaultProps={operationProps:null},t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(4)),o=f(n(2)),i=f(n(3)),a=f(n(5)),u=f(n(6)),s=n(0),l=f(s),c=(f(n(1)),n(7),n(9));f(n(12));function f(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.getComponent,n=e.operationProps.toJS(),r=n.deprecated,o=n.isShown,i=n.path,a=n.tag,u=n.operationId,s=n.isDeepLinkingEnabled,f=t("DeepLink");return l.default.createElement("span",{className:r?"opblock-summary-path__deprecated":"opblock-summary-path"},l.default.createElement(f,{enabled:s,isShown:o,path:(0,c.createDeepLinkPath)(a+"/"+u),text:i}))}}]),t}(s.PureComponent);t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationExt=void 0;var r=i(n(17)),o=i(n(0));i(n(1));function i(e){return e&&e.__esModule?e:{default:e}}var a=t.OperationExt=function(e){var t=e.extensions,n=(0,e.getComponent)("OperationExtRow");return o.default.createElement("div",{className:"opblock-section"},o.default.createElement("div",{className:"opblock-section-header"},o.default.createElement("h4",null,"Extensions")),o.default.createElement("div",{className:"table-container"},o.default.createElement("table",null,o.default.createElement("thead",null,o.default.createElement("tr",null,o.default.createElement("td",{className:"col col_header"},"Field"),o.default.createElement("td",{className:"col col_header"},"Value"))),o.default.createElement("tbody",null,t.entrySeq().map(function(e){var t=(0,r.default)(e,2),i=t[0],a=t[1];return o.default.createElement(n,{key:i+"-"+a,xKey:i,xVal:a})})))))};t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationExtRow=void 0;var r=i(n(41)),o=i(n(0));i(n(1));function i(e){return e&&e.__esModule?e:{default:e}}var a=t.OperationExtRow=function(e){var t=e.xKey,n=e.xVal,i=n?n.toJS?n.toJS():n:null;return o.default.createElement("tr",null,o.default.createElement("td",null,t),o.default.createElement("td",null,(0,r.default)(i)))};t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p(n(4)),o=p(n(2)),i=p(n(3)),a=p(n(5)),u=p(n(6)),s=n(0),l=p(s),c=(p(n(1)),n(9)),f=p(n(961));function p(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(){var e,n,i,u;(0,o.default)(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=i=(0,a.default)(this,(e=t.__proto__||(0,r.default)(t)).call.apply(e,[this].concat(l))),i.initializeComponent=function(e){i.el=e},i.downloadText=function(){(0,f.default)(i.props.value,i.props.fileName||"response.txt")},i.preventYScrollingBeyondElement=function(e){var t=e.target,n=e.nativeEvent.deltaY,r=t.scrollHeight,o=t.offsetHeight,i=t.scrollTop;r>o&&(0===i&&n<0||o+i>=r&&n>0)&&e.preventDefault()},u=n,(0,a.default)(i,u)}return(0,u.default)(t,e),(0,i.default)(t,[{key:"componentDidMount",value:function(){(0,c.highlight)(this.el)}},{key:"componentDidUpdate",value:function(){(0,c.highlight)(this.el)}},{key:"render",value:function(){var e=this.props,t=e.value,n=e.className,r=e.downloadable;return n=n||"",l.default.createElement("div",{className:"highlight-code"},r?l.default.createElement("div",{className:"download-contents",onClick:this.downloadText},"Download"):null,l.default.createElement("pre",{ref:this.initializeComponent,onWheel:this.preventYScrollingBeyondElement,className:n+" microlight"},t))}}]),t}(s.Component);t.default=d},function(e,t){e.exports=function(e,t,n){var r=new Blob([e],{type:n||"application/octet-stream"});if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(r,t);else{var o=window.URL.createObjectURL(r),i=document.createElement("a");i.style.display="none",i.href=o,i.setAttribute("download",t),void 0===i.download&&i.setAttribute("target","_blank"),document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(o)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p(n(17)),o=p(n(4)),i=p(n(2)),a=p(n(3)),u=p(n(5)),s=p(n(6)),l=p(n(0)),c=n(7),f=(p(n(1)),p(n(12)),n(9));function p(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(){var e,n,r,a;(0,i.default)(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=r=(0,u.default)(this,(e=t.__proto__||(0,o.default)(t)).call.apply(e,[this].concat(l))),r.onChangeProducesWrapper=function(e){return r.props.specActions.changeProducesValue([r.props.path,r.props.method],e)},r.onResponseContentTypeChange=function(e){var t=e.controlsAcceptHeader,n=e.value,o=r.props,i=o.oas3Actions,a=o.path,u=o.method;t&&i.setResponseContentType({value:n,path:a,method:u})},a=n,(0,u.default)(r,a)}return(0,s.default)(t,e),(0,a.default)(t,[{key:"shouldComponentUpdate",value:function(e){return this.props.tryItOutResponse!==e.tryItOutResponse||this.props.responses!==e.responses||this.props.produces!==e.produces||this.props.producesValue!==e.producesValue||this.props.displayRequestDuration!==e.displayRequestDuration||this.props.path!==e.path||this.props.method!==e.method}},{key:"render",value:function(){var e=this,n=this.props,o=n.responses,i=n.tryItOutResponse,a=n.getComponent,u=n.getConfigs,s=n.specSelectors,c=n.fn,p=n.producesValue,d=n.displayRequestDuration,h=n.specPath,v=(0,f.defaultStatusCode)(o),m=a("contentType"),g=a("liveResponse"),y=a("response"),b=this.props.produces&&this.props.produces.size?this.props.produces:t.defaultProps.produces,_=s.isOAS3()?(0,f.getAcceptControllingResponse)(o):null;return l.default.createElement("div",{className:"responses-wrapper"},l.default.createElement("div",{className:"opblock-section-header"},l.default.createElement("h4",null,"Responses"),s.isOAS3()?null:l.default.createElement("label",null,l.default.createElement("span",null,"Response content type"),l.default.createElement(m,{value:p,onChange:this.onChangeProducesWrapper,contentTypes:b,className:"execute-content-type"}))),l.default.createElement("div",{className:"responses-inner"},i?l.default.createElement("div",null,l.default.createElement(g,{response:i,getComponent:a,getConfigs:u,specSelectors:s,path:this.props.path,method:this.props.method,displayRequestDuration:d}),l.default.createElement("h4",null,"Responses")):null,l.default.createElement("table",{className:"responses-table"},l.default.createElement("thead",null,l.default.createElement("tr",{className:"responses-header"},l.default.createElement("td",{className:"col col_header response-col_status"},"Code"),l.default.createElement("td",{className:"col col_header response-col_description"},"Description"),s.isOAS3()?l.default.createElement("td",{className:"col col_header response-col_links"},"Links"):null)),l.default.createElement("tbody",null,o.entrySeq().map(function(t){var n=(0,r.default)(t,2),o=n[0],f=n[1],d=i&&i.get("status")==o?"response_current":"";return l.default.createElement(y,{key:o,specPath:h.push(o),isDefault:v===o,fn:c,className:d,code:o,response:f,specSelectors:s,controlsAcceptHeader:f===_,onContentTypeChange:e.onResponseContentTypeChange,contentType:p,getConfigs:u,getComponent:a})}).toArray()))))}}]),t}(l.default.Component);d.defaultProps={tryItOutResponse:null,produces:(0,c.fromJS)(["application/json"]),displayRequestDuration:!1},t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(4)),o=d(n(2)),i=d(n(3)),a=d(n(5)),u=d(n(6)),s=d(n(17)),l=d(n(0)),c=(d(n(1)),d(n(12)),d(n(113))),f=n(7),p=n(9);function d(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(e,n){(0,o.default)(this,t);var i=(0,a.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e,n));return i._onContentTypeChange=function(e){var t=i.props,n=t.onContentTypeChange,r=t.controlsAcceptHeader;i.setState({responseContentType:e}),n({value:e,controlsAcceptHeader:r})},i.state={responseContentType:""},i}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e,t,n,r,o=this.props,i=o.code,a=o.response,u=o.className,d=o.specPath,h=o.fn,v=o.getComponent,m=o.getConfigs,g=o.specSelectors,y=o.contentType,b=o.controlsAcceptHeader,_=h.inferSchema,w=g.isOAS3,E=a.get("headers"),x=a.get("examples"),S=a.get("links"),C=v("headers"),k=v("highlightCode"),A=v("modelExample"),O=v("Markdown"),P=v("operationLink"),T=v("contentType"),M=this.state.responseContentType||y;if(w()){var I=a.getIn(["content",M],(0,f.Map)({})),j=I.get("schema",(0,f.Map)({}));t=void 0!==I.get("example")?(0,p.stringify)(I.get("example")):(0,p.getSampleSchema)(j.toJS(),this.state.responseContentType,{includeReadOnly:!0}),e=j?t:null,n=j?_(j.toJS()):null,r=j?(0,f.List)(["content",this.state.responseContentType,"schema"]):d}else n=_(a.toJS()),r=a.has("schema")?d.push("schema"):d,e=n?(0,p.getSampleSchema)(n,M,{includeReadOnly:!0,includeWriteOnly:!0}):null;x&&(x=x.map(function(e){return e.set?e.set("$$ref",void 0):e}));var N=function(e,t,n){return t&&t.size?t.entrySeq().map(function(e){var t=(0,s.default)(e,2),r=t[0],o=t[1],i=(0,p.stringify)(o);return l.default.createElement("div",{key:r},l.default.createElement("h5",null,r),l.default.createElement(n,{className:"example",value:i}))}).toArray():e?l.default.createElement("div",null,l.default.createElement(n,{className:"example",value:e})):null}(e,x,k);return l.default.createElement("tr",{className:"response "+(u||""),"data-code":i},l.default.createElement("td",{className:"col response-col_status"},i),l.default.createElement("td",{className:"col response-col_description"},l.default.createElement("div",{className:"response-col_description__inner"},l.default.createElement(O,{source:a.get("description")})),w?l.default.createElement("div",{className:(0,c.default)("response-content-type",{"controls-accept-header":b})},l.default.createElement(T,{value:this.state.responseContentType,contentTypes:a.get("content")?a.get("content").keySeq():(0,f.Seq)(),onChange:this._onContentTypeChange}),b?l.default.createElement("small",null,"Controls ",l.default.createElement("code",null,"Accept")," header."):null):null,N?l.default.createElement(A,{specPath:r,getComponent:v,getConfigs:m,specSelectors:g,schema:(0,p.fromJSOrdered)(n),example:N}):null,E?l.default.createElement(C,{headers:E,getComponent:v}):null),g.isOAS3()?l.default.createElement("td",{className:"col response-col_links"},S?S.toSeq().map(function(e,t){return l.default.createElement(P,{key:t,name:t,link:e,getComponent:v})}):l.default.createElement("i",null,"No links")):null)}}]),t}(l.default.Component);h.defaultProps={response:(0,f.fromJS)({}),onContentTypeChange:function(){}},t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=h(n(41)),o=h(n(4)),i=h(n(2)),a=h(n(3)),u=h(n(5)),s=h(n(6)),l=h(n(0)),c=(h(n(1)),h(n(965))),f=h(n(967)),p=n(9),d=h(n(32));function h(e){return e&&e.__esModule?e:{default:e}}var v=function(e){function t(){var e,n,r,a;(0,i.default)(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=r=(0,u.default)(this,(e=t.__proto__||(0,o.default)(t)).call.apply(e,[this].concat(l))),r.state={parsedContent:null},r.updateParsedContent=function(e){var t=r.props.content;if(e!==t)if(t&&t instanceof Blob){var n=new FileReader;n.onload=function(){r.setState({parsedContent:n.result})},n.readAsText(t)}else r.setState({parsedContent:t.toString()})},a=n,(0,u.default)(r,a)}return(0,s.default)(t,e),(0,a.default)(t,[{key:"componentDidMount",value:function(){this.updateParsedContent(null)}},{key:"componentDidUpdate",value:function(e){this.updateParsedContent(e.content)}},{key:"render",value:function(){var e=this.props,t=e.content,n=e.contentType,o=e.url,i=e.headers,a=void 0===i?{}:i,u=e.getComponent,s=this.state.parsedContent,h=u("highlightCode"),v="response_"+(new Date).getTime(),m=void 0,g=void 0;if(o=o||"",/^application\/octet-stream/i.test(n)||a["Content-Disposition"]&&/attachment/i.test(a["Content-Disposition"])||a["content-disposition"]&&/attachment/i.test(a["content-disposition"])||a["Content-Description"]&&/File Transfer/i.test(a["Content-Description"])||a["content-description"]&&/File Transfer/i.test(a["content-description"]))if("Blob"in window){var y=n||"text/html",b=t instanceof Blob?t:new Blob([t],{type:y}),_=window.URL.createObjectURL(b),w=[y,o.substr(o.lastIndexOf("/")+1),_].join(":"),E=a["content-disposition"]||a["Content-Disposition"];if(void 0!==E){var x=(0,p.extractFileNameFromContentDispositionHeader)(E);null!==x&&(w=x)}g=d.default.navigator&&d.default.navigator.msSaveOrOpenBlob?l.default.createElement("div",null,l.default.createElement("a",{href:_,onClick:function(){return d.default.navigator.msSaveOrOpenBlob(b,w)}},"Download file")):l.default.createElement("div",null,l.default.createElement("a",{href:_,download:w},"Download file"))}else g=l.default.createElement("pre",null,"Download headers detected but your browser does not support downloading binary via XHR (Blob).");else if(/json/i.test(n)){try{m=(0,r.default)(JSON.parse(t),null," ")}catch(e){m="can't parse JSON. Raw result:\n\n"+t}g=l.default.createElement(h,{downloadable:!0,fileName:v+".json",value:m})}else/xml/i.test(n)?(m=(0,c.default)(t,{textNodesOnSameLine:!0,indentor:" "}),g=l.default.createElement(h,{downloadable:!0,fileName:v+".xml",value:m})):g="text/html"===(0,f.default)(n)||/text\/plain/.test(n)?l.default.createElement(h,{downloadable:!0,fileName:v+".html",value:t}):/^image\//i.test(n)?n.includes("svg")?l.default.createElement("div",null," ",t," "):l.default.createElement("img",{style:{maxWidth:"100%"},src:window.URL.createObjectURL(t)}):/^audio\//i.test(n)?l.default.createElement("pre",null,l.default.createElement("audio",{controls:!0},l.default.createElement("source",{src:o,type:n}))):"string"==typeof t?l.default.createElement(h,{downloadable:!0,fileName:v+".txt",value:t}):t.size>0?s?l.default.createElement("div",null,l.default.createElement("p",{className:"i"},"Unrecognized response type; displaying content as text."),l.default.createElement(h,{downloadable:!0,fileName:v+".txt",value:s})):l.default.createElement("p",{className:"i"},"Unrecognized response type; unable to display."):null;return g?l.default.createElement("div",null,l.default.createElement("h5",null,"Response body"),g):null}}]),t}(l.default.PureComponent);t.default=v},function(e,t,n){"use strict";var r=n(966),o=function(e){return e.split(/(<\/?[^>]+>)/g).filter(function(e){return""!==e.trim()})},i=function(e){return/<\/+[^>]+>/.test(e)},a=function(e){return/<[^>]+\/>/.test(e)},u=function(e){return function(e){return/<[^>!]+>/.test(e)}(e)&&!i(e)&&!a(e)};e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.indentor,s=t.textNodesOnSameLine,l=0,c=[];n=n||" ";var f,p=(f=e,o(f).map(function(e){return{value:e,type:(t=e,i(t)?"ClosingTag":u(t)?"OpeningTag":a(t)?"SelfClosingTag":"Text")};var t})).map(function(e,t,o){var i=e.value,a=e.type;"ClosingTag"===a&&l--;var u=r(n,l),f=u+i;if("OpeningTag"===a&&l++,s){var p=o[t-1],d=o[t-2];"ClosingTag"===a&&"Text"===p.type&&"OpeningTag"===d.type&&(f=""+u+d.value+p.value+i,c.push(t-2,t-1))}return f});return c.forEach(function(e){return p[e]=null}),p.filter(function(e){return!!e}).join("\n")}},function(e,t,n){"use strict"; /*! * repeat-string <https://github.com/jonschlinkert/repeat-string> * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. */var r,o="";e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");if(1===t)return e;if(2===t)return e+e;var n=e.length*t;if(r!==e||void 0===r)r=e,o="";else if(o.length>=n)return o.substr(0,n);for(;n>o.length&&t>1;)1&t&&(o+=e),t>>=1,e+=e;return o=(o+=e).substr(0,n)}},function(e,t,n){var r=n(61);e.exports=function(e){return r(e).toLowerCase()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(4)),o=f(n(2)),i=f(n(3)),a=f(n(5)),u=f(n(6)),s=n(0),l=f(s),c=(f(n(1)),f(n(12)),f(n(7)));function f(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(){var e,n,i,u;(0,o.default)(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=i=(0,a.default)(this,(e=t.__proto__||(0,r.default)(t)).call.apply(e,[this].concat(l))),i.onChange=function(e,t,n){var r=i.props;(0,r.specActions.changeParamByIdentity)(r.onChangeKey,e,t,n)},i.onChangeConsumesWrapper=function(e){var t=i.props;(0,t.specActions.changeConsumesValue)(t.onChangeKey,e)},u=n,(0,a.default)(i,u)}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.onTryoutClick,r=t.onCancelClick,o=t.parameters,i=t.allowTryItOut,a=t.tryItOutEnabled,u=t.specPath,s=t.fn,f=t.getComponent,p=t.getConfigs,d=t.specSelectors,h=t.specActions,v=t.pathMethod,m=f("parameterRow"),g=f("TryItOutButton"),y=a&&i;return l.default.createElement("div",{className:"opblock-section"},l.default.createElement("div",{className:"opblock-section-header"},l.default.createElement("div",{className:"tab-header"},l.default.createElement("h4",{className:"opblock-title"},"Parameters")),i?l.default.createElement(g,{enabled:a,onCancelClick:r,onTryoutClick:n}):null),o.count()?l.default.createElement("div",{className:"table-container"},l.default.createElement("table",{className:"parameters"},l.default.createElement("thead",null,l.default.createElement("tr",null,l.default.createElement("th",{className:"col col_header parameters-col_name"},"Name"),l.default.createElement("th",{className:"col col_header parameters-col_description"},"Description"))),l.default.createElement("tbody",null,function(e,t){return e.valueSeq().filter(c.default.Map.isMap).map(t)}(o,function(t,n){return l.default.createElement(m,{fn:s,specPath:u.push(n.toString()),getComponent:f,getConfigs:p,rawParam:t,param:d.parameterWithMetaByIdentity(v,t),key:t.get("in")+"."+t.get("name"),onChange:e.onChange,onChangeConsumes:e.onChangeConsumesWrapper,specSelectors:d,specActions:h,pathMethod:v,isExecute:y})}).toArray()))):l.default.createElement("div",{className:"opblock-description-wrapper"},l.default.createElement("p",null,"No parameters")))}}]),t}(s.Component);p.defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,tryItOutEnabled:!1,allowTryItOut:!0,onChangeKey:[],specPath:[]},t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParameterExt=void 0;var r=o(n(0));o(n(1));function o(e){return e&&e.__esModule?e:{default:e}}var i=t.ParameterExt=function(e){var t=e.xKey,n=e.xVal;return r.default.createElement("div",{className:"parameter__extension"},t,": ",String(n))};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParameterIncludeEmpty=void 0;var r=i(n(0)),o=i(n(113));i(n(1)),i(n(12));function i(e){return e&&e.__esModule?e:{default:e}}var a=t.ParameterIncludeEmpty=function(e){var t=e.param,n=e.isIncluded,i=e.onChange,a=e.isDisabled;return t.get("allowEmptyValue")?r.default.createElement("div",{className:(0,o.default)("parameter__empty_value_toggle",{disabled:a})},r.default.createElement("input",{type:"checkbox",disabled:a,checked:!a&&n,onChange:function(e){i(e.target.checked)}}),"Send empty value"):null};t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(4)),o=d(n(2)),i=d(n(3)),a=d(n(5)),u=d(n(6)),s=n(0),l=d(s),c=n(7),f=(d(n(1)),d(n(12)),d(n(32))),p=n(9);function d(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(e,n){(0,o.default)(this,t);var i=(0,a.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e,n));return i.onChangeWrapper=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=i.props;return(0,n.onChange)(n.rawParam,""===e||e&&0===e.size?null:e,t)},i.onChangeIncludeEmpty=function(e){var t=i.props,n=t.specActions,r=t.param,o=t.pathMethod,a=r.get("name"),u=r.get("in");return n.updateEmptyParamInclusion(o,a,u,e)},i.setDefaultValue=function(){var e=i.props,t=e.specSelectors,n=e.pathMethod,r=e.rawParam,o=t.parameterWithMetaByIdentity(n,r);if(o&&void 0===o.get("value")&&"body"!==o.get("in")){var a=void 0;t.isSwagger2()?a=o.get("x-example")||o.getIn(["default"])||o.getIn(["schema","example"])||o.getIn(["schema","default"]):t.isOAS3()&&(a=o.get("example")||o.getIn(["schema","example"])||o.getIn(["schema","default"])),void 0!==a&&i.onChangeWrapper((0,p.numberToString)(a))}},i.setDefaultValue(),i}return(0,u.default)(t,e),(0,i.default)(t,[{key:"componentWillReceiveProps",value:function(e){var t=e.specSelectors,n=e.pathMethod,r=e.rawParam,o=t.isOAS3,i=t.parameterWithMetaByIdentity(n,r)||new c.Map;i=i.isEmpty()?r:i;var a=void 0;o()?a=(i.get("schema")||(0,c.Map)()).get("enum"):a=i?i.get("enum"):void 0;var u=i?i.get("value"):void 0,s=void 0;void 0!==u?s=u:r.get("required")&&a&&a.size&&(s=a.first()),void 0!==s&&s!==u&&this.onChangeWrapper((0,p.numberToString)(s)),this.setDefaultValue()}},{key:"render",value:function(){var e=this.props,t=e.param,n=e.rawParam,r=e.getComponent,o=e.getConfigs,i=e.isExecute,a=e.fn,u=e.onChangeConsumes,s=e.specSelectors,c=e.pathMethod,d=e.specPath,h=s.isOAS3,v=o(),m=v.showExtensions,g=v.showCommonExtensions;t||(t=n);var y=r("JsonSchemaForm"),b=r("ParamBody"),_=t.get("in"),w="body"!==_?null:l.default.createElement(b,{getComponent:r,fn:a,param:t,consumes:s.consumesOptionsFor(c),consumesValue:s.contentTypeValues(c).get("requestContentType"),onChange:this.onChangeWrapper,onChangeConsumes:u,isExecute:i,specSelectors:s,pathMethod:c}),E=r("modelExample"),x=r("Markdown"),S=r("ParameterExt"),C=r("ParameterIncludeEmpty"),k=s.parameterWithMetaByIdentity(c,n),A=t.get("format"),O=h&&h()?t.get("schema"):t,P=O.get("type"),T="formData"===_,M="FormData"in f.default,I=t.get("required"),j=O.getIn(["items","type"]),N=k?k.get("value"):"",R=g?(0,p.getCommonExtensions)(t):null,D=m?(0,p.getExtensions)(t):null,L=void 0,U=void 0,q=void 0,F=!1;return void 0!==t&&(L=O.get("items")),void 0!==L?(U=L.get("enum"),q=L.get("default")):U=O.get("enum"),void 0!==U&&U.size>0&&(F=!0),void 0!==t&&(q=O.get("default"),void 0===t.get("example")&&t.get("x-example")),l.default.createElement("tr",{"data-param-name":t.get("name"),"data-param-in":t.get("in")},l.default.createElement("td",{className:"col parameters-col_name"},l.default.createElement("div",{className:I?"parameter__name required":"parameter__name"},t.get("name"),I?l.default.createElement("span",{style:{color:"red"}}," *"):null),l.default.createElement("div",{className:"parameter__type"},P,j&&"["+j+"]",A&&l.default.createElement("span",{className:"prop-format"},"($",A,")")),l.default.createElement("div",{className:"parameter__deprecated"},h&&h()&&t.get("deprecated")?"deprecated":null),l.default.createElement("div",{className:"parameter__in"},"(",t.get("in"),")"),g&&R.size?R.map(function(e,t){return l.default.createElement(S,{key:t+"-"+e,xKey:t,xVal:e})}):null,m&&D.size?D.map(function(e,t){return l.default.createElement(S,{key:t+"-"+e,xKey:t,xVal:e})}):null),l.default.createElement("td",{className:"col parameters-col_description"},t.get("description")?l.default.createElement(x,{source:t.get("description")}):null,!w&&i||!F?null:l.default.createElement(x,{className:"parameter__enum",source:"<i>Available values</i> : "+U.map(function(e){return e}).toArray().join(", ")}),!w&&i||void 0===q?null:l.default.createElement(x,{className:"parameter__default",source:"<i>Default value</i> : "+q}),T&&!M&&l.default.createElement("div",null,"Error: your browser does not support FormData"),w||!i?null:l.default.createElement(y,{fn:a,getComponent:r,value:N,required:I,description:t.get("description")?t.get("name")+" - "+t.get("description"):""+t.get("name"),onChange:this.onChangeWrapper,errors:k.get("errors"),schema:O}),w&&O?l.default.createElement(E,{getComponent:r,specPath:d.push("schema"),getConfigs:o,isExecute:i,specSelectors:s,schema:t.get("schema"),example:w}):null,!w&&i?l.default.createElement(C,{onChange:this.onChangeIncludeEmpty,isIncluded:s.parameterInclusionSettingFor(c,t.get("name"),t.get("in")),isDisabled:N&&0!==N.size,param:t}):null))}}]),t}(s.Component);t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(4)),o=c(n(2)),i=c(n(3)),a=c(n(5)),u=c(n(6)),s=n(0),l=c(s);c(n(1));function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(){var e,n,i,u;(0,o.default)(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=i=(0,a.default)(this,(e=t.__proto__||(0,r.default)(t)).call.apply(e,[this].concat(l))),i.onClick=function(){var e=i.props,t=e.specSelectors,n=e.specActions,r=e.operation,o=e.path,a=e.method;n.validateParams([o,a]),t.validateBeforeExecute([o,a])&&(i.props.onExecute&&i.props.onExecute(),n.execute({operation:r,path:o,method:a}))},i.onChangeProducesWrapper=function(e){return i.props.specActions.changeProducesValue([i.props.path,i.props.method],e)},u=n,(0,a.default)(i,u)}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){return l.default.createElement("button",{className:"btn execute opblock-control__btn",onClick:this.onClick},"Execute")}}]),t}(s.Component);t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(17)),o=f(n(4)),i=f(n(2)),a=f(n(3)),u=f(n(5)),s=f(n(6)),l=f(n(0)),c=(f(n(1)),f(n(7)));function f(e){return e&&e.__esModule?e:{default:e}}var p={color:"#999",fontStyle:"italic"},d=function(e){function t(){return(0,i.default)(this,t),(0,u.default)(this,(t.__proto__||(0,o.default)(t)).apply(this,arguments))}return(0,s.default)(t,e),(0,a.default)(t,[{key:"render",value:function(){var e=this.props,t=e.headers,n=e.getComponent,o=n("Property"),i=n("Markdown");return t&&t.size?l.default.createElement("div",{className:"headers-wrapper"},l.default.createElement("h4",{className:"headers__title"},"Headers:"),l.default.createElement("table",{className:"headers"},l.default.createElement("thead",null,l.default.createElement("tr",{className:"header-row"},l.default.createElement("th",{className:"header-col"},"Name"),l.default.createElement("th",{className:"header-col"},"Description"),l.default.createElement("th",{className:"header-col"},"Type"))),l.default.createElement("tbody",null,t.entrySeq().map(function(e){var t=(0,r.default)(e,2),n=t[0],a=t[1];if(!c.default.Map.isMap(a))return null;var u=a.get("description"),s=a.getIn(["schema"])?a.getIn(["schema","type"]):a.getIn(["type"]),f=a.getIn(["schema","example"]);return l.default.createElement("tr",{key:n},l.default.createElement("td",{className:"header-col"},n),l.default.createElement("td",{className:"header-col"},u?l.default.createElement(i,{source:u}):null),l.default.createElement("td",{className:"header-col"},s," ",f?l.default.createElement(o,{propKey:"Example",propVal:f,propStyle:p}):null))}).toArray()))):null}}]),t}(l.default.Component);t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(4)),o=c(n(2)),i=c(n(3)),a=c(n(5)),u=c(n(6)),s=c(n(0)),l=(c(n(1)),n(7));function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.editorActions,n=e.errSelectors,r=e.layoutSelectors,o=e.layoutActions,i=(0,e.getComponent)("Collapse");if(t&&t.jumpToLine)var a=t.jumpToLine;var u=n.allErrors().filter(function(e){return"thrown"===e.get("type")||"error"===e.get("level")});if(!u||u.count()<1)return null;var l=r.isShown(["errorPane"],!0),c=u.sortBy(function(e){return e.get("line")});return s.default.createElement("pre",{className:"errors-wrapper"},s.default.createElement("hgroup",{className:"error"},s.default.createElement("h4",{className:"errors__title"},"Errors"),s.default.createElement("button",{className:"btn errors__clear-btn",onClick:function(){return o.show(["errorPane"],!l)}},l?"Hide":"Show")),s.default.createElement(i,{isOpened:l,animated:!0},s.default.createElement("div",{className:"errors"},c.map(function(e,t){var n=e.get("type");return"thrown"===n||"auth"===n?s.default.createElement(p,{key:t,error:e.get("error")||e,jumpToLine:a}):"spec"===n?s.default.createElement(d,{key:t,error:e,jumpToLine:a}):void 0}))))}}]),t}(s.default.Component);t.default=f;var p=function(e){var t=e.error,n=e.jumpToLine;if(!t)return null;var r=t.get("line");return s.default.createElement("div",{className:"error-wrapper"},t?s.default.createElement("div",null,s.default.createElement("h4",null,t.get("source")&&t.get("level")?h(t.get("source"))+" "+t.get("level"):"",t.get("path")?s.default.createElement("small",null," at ",t.get("path")):null),s.default.createElement("span",{style:{whiteSpace:"pre-line",maxWidth:"100%"}},t.get("message")),s.default.createElement("div",{style:{"text-decoration":"underline",cursor:"pointer"}},r&&n?s.default.createElement("a",{onClick:n.bind(null,r)},"Jump to line ",r):null)):null)},d=function(e){var t=e.error,n=e.jumpToLine,r=null;return t.get("path")?r=l.List.isList(t.get("path"))?s.default.createElement("small",null,"at ",t.get("path").join(".")):s.default.createElement("small",null,"at ",t.get("path")):t.get("line")&&!n&&(r=s.default.createElement("small",null,"on line ",t.get("line"))),s.default.createElement("div",{className:"error-wrapper"},t?s.default.createElement("div",null,s.default.createElement("h4",null,h(t.get("source"))+" "+t.get("level")," ",r),s.default.createElement("span",{style:{whiteSpace:"pre-line"}},t.get("message")),s.default.createElement("div",{style:{"text-decoration":"underline",cursor:"pointer"}},n?s.default.createElement("a",{onClick:n.bind(null,t.get("line"))},"Jump to line ",t.get("line")):null)):null)};function h(e){return(e||"").split(" ").map(function(e){return e[0].toUpperCase()+e.slice(1)}).join(" ")}p.defaultProps={jumpToLine:null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(4)),o=c(n(2)),i=c(n(3)),a=c(n(5)),u=c(n(6)),s=c(n(0)),l=(c(n(1)),c(n(12)),n(7));function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(){var e,n,i,u;(0,o.default)(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=i=(0,a.default)(this,(e=t.__proto__||(0,r.default)(t)).call.apply(e,[this].concat(l))),i.onChangeWrapper=function(e){return i.props.onChange(e.target.value)},u=n,(0,a.default)(i,u)}return(0,u.default)(t,e),(0,i.default)(t,[{key:"componentDidMount",value:function(){this.props.contentTypes&&this.props.onChange(this.props.contentTypes.first())}},{key:"componentWillReceiveProps",value:function(e){e.contentTypes&&e.contentTypes.size&&(e.contentTypes.includes(e.value)||e.onChange(e.contentTypes.first()))}},{key:"render",value:function(){var e=this.props,t=e.contentTypes,n=e.className,r=e.value;return t&&t.size?s.default.createElement("div",{className:"content-type-wrapper "+(n||"")},s.default.createElement("select",{className:"content-type",value:r||"",onChange:this.onChangeWrapper},t.map(function(e){return s.default.createElement("option",{key:e,value:e},e)}).toArray())):null}}]),t}(s.default.Component);f.defaultProps={onChange:function(){},value:null,contentTypes:(0,l.fromJS)(["application/json"])},t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationLink=void 0;var r=c(n(4)),o=c(n(2)),i=c(n(3)),a=c(n(5)),u=c(n(6)),s=c(n(0)),l=(c(n(1)),n(413));function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(){var e;(0,o.default)(this,t);for(var n=arguments.length,i=Array(n),u=0;u<n;u++)i[u]=arguments[u];var s=(0,a.default)(this,(e=t.__proto__||(0,r.default)(t)).call.apply(e,[this].concat(i)));return s.setTagShown=s._setTagShown.bind(s),s}return(0,u.default)(t,e),(0,i.default)(t,[{key:"_setTagShown",value:function(e,t){this.props.layoutActions.show(e,t)}},{key:"showOp",value:function(e,t){this.props.layoutActions.show(e,t)}},{key:"render",value:function(){var e=this.props,t=e.specSelectors,n=e.layoutSelectors,r=e.layoutActions,o=e.getComponent,i=t.taggedOperations(),a=o("Collapse");return s.default.createElement("div",null,s.default.createElement("h4",{className:"overview-title"},"Overview"),i.map(function(e,t){var o=e.get("operations"),i=["overview-tags",t],u=n.isShown(i,!0);return s.default.createElement("div",{key:"overview-"+t},s.default.createElement("h4",{onClick:function(){return r.show(i,!u)},className:"link overview-tag"}," ",u?"-":"+",t),s.default.createElement(a,{isOpened:u,animated:!0},o.map(function(e){var t=e.toObject(),o=t.path,i=t.method,a=t.id,u=a,l=n.isShown(["operations",u]);return s.default.createElement(p,{key:a,path:o,method:i,id:o+"-"+i,shown:l,showOpId:u,showOpIdPrefix:"operations",href:"#operation-"+u,onClick:r.show})}).toArray()))}).toArray(),i.size<1&&s.default.createElement("h3",null," No operations defined in spec! "))}}]),t}(s.default.Component);t.default=f;var p=t.OperationLink=function(e){function t(e){(0,o.default)(this,t);var n=(0,a.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.onClick=n._onClick.bind(n),n}return(0,u.default)(t,e),(0,i.default)(t,[{key:"_onClick",value:function(){var e=this.props,t=e.showOpId,n=e.showOpIdPrefix;(0,e.onClick)([n,t],!e.shown)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.method,r=e.shown,o=e.href;return s.default.createElement(l.Link,{href:o,style:{fontWeight:r?"bold":"normal"},onClick:this.onClick,className:"block opblock-link"},s.default.createElement("div",null,s.default.createElement("small",{className:"bold-label-"+n},n.toUpperCase()),s.default.createElement("span",{className:"bold-label"},t)))}}]),t}(s.default.Component)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InfoUrl=t.InfoBasePath=void 0;var r=f(n(4)),o=f(n(2)),i=f(n(3)),a=f(n(5)),u=f(n(6)),s=f(n(0)),l=(f(n(1)),n(7)),c=(f(n(12)),n(9));function f(e){return e&&e.__esModule?e:{default:e}}t.InfoBasePath=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.host,n=e.basePath;return s.default.createElement("pre",{className:"base-url"},"[ Base URL: ",t,n," ]")}}]),t}(s.default.Component);var p=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.data,n=e.getComponent,r=t.get("name")||"the developer",o=t.get("url"),i=t.get("email"),a=n("Link");return s.default.createElement("div",{className:"info__contact"},o&&s.default.createElement("div",null,s.default.createElement(a,{href:(0,c.sanitizeUrl)(o),target:"_blank"},r," - Website")),i&&s.default.createElement(a,{href:(0,c.sanitizeUrl)("mailto:"+i)},o?"Send email to "+r:"Contact "+r))}}]),t}(s.default.Component),d=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.license,n=(0,e.getComponent)("Link"),r=t.get("name")||"License",o=t.get("url");return s.default.createElement("div",{className:"info__license"},o?s.default.createElement(n,{target:"_blank",href:(0,c.sanitizeUrl)(o)},r):s.default.createElement("span",null,r))}}]),t}(s.default.Component),h=(t.InfoUrl=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.url,n=(0,e.getComponent)("Link");return s.default.createElement(n,{target:"_blank",href:(0,c.sanitizeUrl)(t)},s.default.createElement("span",{className:"url"}," ",t," "))}}]),t}(s.default.PureComponent),function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.info,n=e.url,r=e.host,o=e.basePath,i=e.getComponent,a=e.externalDocs,u=t.get("version"),f=t.get("description"),h=t.get("title"),v=t.get("termsOfService"),m=t.get("contact"),g=t.get("license"),y=(a||(0,l.fromJS)({})).toJS(),b=y.url,_=y.description,w=i("Markdown"),E=i("Link"),x=i("VersionStamp"),S=i("InfoUrl"),C=i("InfoBasePath");return s.default.createElement("div",{className:"info"},s.default.createElement("hgroup",{className:"main"},s.default.createElement("h2",{className:"title"},h,u&&s.default.createElement(x,{version:u})),r||o?s.default.createElement(C,{host:r,basePath:o}):null,n&&s.default.createElement(S,{getComponent:i,url:n})),s.default.createElement("div",{className:"description"},s.default.createElement(w,{source:f})),v&&s.default.createElement("div",{className:"info__tos"},s.default.createElement(E,{target:"_blank",href:(0,c.sanitizeUrl)(v)},"Terms of service")),m&&m.size?s.default.createElement(p,{getComponent:i,data:m}):null,g&&g.size?s.default.createElement(d,{getComponent:i,license:g}):null,b?s.default.createElement(E,{className:"info__extdocs",target:"_blank",href:(0,c.sanitizeUrl)(b)},_||b):null)}}]),t}(s.default.Component));t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(2)),i=l(n(3)),a=l(n(5)),u=l(n(6)),s=l(n(0));l(n(1));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.specSelectors,n=e.getComponent,r=t.info(),o=t.url(),i=t.basePath(),a=t.host(),u=t.externalDocs(),l=n("info");return s.default.createElement("div",null,r&&r.count()?s.default.createElement(l,{info:r,url:o,host:a,basePath:i,externalDocs:u,getComponent:n}):null)}}]),t}(s.default.Component);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(4)),o=s(n(2)),i=s(n(3)),a=s(n(5)),u=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){return null}}]),t}(s(n(0)).default.Component);t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(2)),i=l(n(3)),a=l(n(5)),u=l(n(6)),s=l(n(0));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){return s.default.createElement("div",{className:"footer"})}}]),t}(s.default.Component);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(2)),i=l(n(3)),a=l(n(5)),u=l(n(6)),s=l(n(0));l(n(1));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){var e,n,i,u;(0,o.default)(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=i=(0,a.default)(this,(e=t.__proto__||(0,r.default)(t)).call.apply(e,[this].concat(l))),i.onFilterChange=function(e){var t=e.target.value;i.props.layoutActions.updateFilter(t)},u=n,(0,a.default)(i,u)}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.specSelectors,n=e.layoutSelectors,r=(0,e.getComponent)("Col"),o="loading"===t.loadingStatus(),i="failed"===t.loadingStatus(),a=n.currentFilter(),u={};return i&&(u.color="red"),o&&(u.color="#aaa"),s.default.createElement("div",null,null===a||!1===a?null:s.default.createElement("div",{className:"filter-container"},s.default.createElement(r,{className:"filter wrapper",mobile:12},s.default.createElement("input",{className:"operation-filter-input",placeholder:"Filter by tag",type:"text",onChange:this.onFilterChange,value:!0===a||"true"===a?"":a,disabled:o,style:u}))))}}]),t}(s.default.Component);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p(n(4)),o=p(n(2)),i=p(n(3)),a=p(n(5)),u=p(n(6)),s=n(0),l=p(s),c=(p(n(1)),n(7)),f=n(9);function p(e){return e&&e.__esModule?e:{default:e}}var d=Function.prototype,h=function(e){function t(e,n){(0,o.default)(this,t);var i=(0,a.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e,n));return v.call(i),i.state={isEditBox:!1,value:""},i}return(0,u.default)(t,e),(0,i.default)(t,[{key:"componentDidMount",value:function(){this.updateValues.call(this,this.props)}},{key:"componentWillReceiveProps",value:function(e){this.updateValues.call(this,e)}},{key:"render",value:function(){var e=this.props,n=e.onChangeConsumes,r=e.param,o=e.isExecute,i=e.specSelectors,a=e.pathMethod,u=e.getComponent,s=u("Button"),f=u("TextArea"),p=u("highlightCode"),d=u("contentType"),h=(i?i.parameterWithMetaByIdentity(a,r):r).get("errors",(0,c.List)()),v=i.contentTypeValues(a).get("requestContentType"),m=this.props.consumes&&this.props.consumes.size?this.props.consumes:t.defaultProp.consumes,g=this.state,y=g.value,b=g.isEditBox;return l.default.createElement("div",{className:"body-param","data-param-name":r.get("name"),"data-param-in":r.get("in")},b&&o?l.default.createElement(f,{className:"body-param__text"+(h.count()?" invalid":""),value:y,onChange:this.handleOnChange}):y&&l.default.createElement(p,{className:"body-param__example",value:y}),l.default.createElement("div",{className:"body-param-options"},o?l.default.createElement("div",{className:"body-param-edit"},l.default.createElement(s,{className:b?"btn cancel body-param__example-edit":"btn edit body-param__example-edit",onClick:this.toggleIsEditBox},b?"Cancel":"Edit")):null,l.default.createElement("label",{htmlFor:""},l.default.createElement("span",null,"Parameter content type"),l.default.createElement(d,{value:v,contentTypes:m,onChange:n,className:"body-param-content-type"}))))}}]),t}(s.PureComponent);h.defaultProp={consumes:(0,c.fromJS)(["application/json"]),param:(0,c.fromJS)({}),onChange:d,onChangeConsumes:d};var v=function(){var e=this;this.updateValues=function(t){var n=t.param,r=t.isExecute,o=t.consumesValue,i=void 0===o?"":o,a=/xml/i.test(i),u=/json/i.test(i),s=a?n.get("value_xml"):n.get("value");if(void 0!==s){var l=!s&&u?"{}":s;e.setState({value:l}),e.onChange(l,{isXml:a,isEditBox:r})}else a?e.onChange(e.sample("xml"),{isXml:a,isEditBox:r}):e.onChange(e.sample(),{isEditBox:r})},this.sample=function(t){var n=e.props,r=n.param,o=(0,n.fn.inferSchema)(r.toJS());return(0,f.getSampleSchema)(o,t,{includeWriteOnly:!0})},this.onChange=function(t,n){var r=n.isEditBox,o=n.isXml;e.setState({value:t,isEditBox:r}),e._onChange(t,o)},this._onChange=function(t,n){(e.props.onChange||d)(t,n)},this.handleOnChange=function(t){var n=e.props.consumesValue,r=/json/i.test(n),o=/xml/i.test(n),i=r?t.target.value.trim():t.target.value;e.onChange(i,{isXml:o})},this.toggleIsEditBox=function(){return e.setState(function(e){return{isEditBox:!e.isEditBox}})}};t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(4)),o=c(n(2)),i=c(n(3)),a=c(n(5)),u=c(n(6)),s=c(n(0)),l=(c(n(1)),c(n(984)));function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"handleFocus",value:function(e){e.target.select(),document.execCommand("copy")}},{key:"render",value:function(){var e=this.props.request,t=(0,l.default)(e);return s.default.createElement("div",null,s.default.createElement("h4",null,"Curl"),s.default.createElement("div",{className:"copy-paste"},s.default.createElement("textarea",{onFocus:this.handleFocus,readOnly:"true",className:"curl",style:{whiteSpace:"normal"},value:t})))}}]),t}(s.default.Component);t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(41)),o=u(n(17)),i=u(n(91));t.default=function(e){var t=[],n="",u=e.get("headers");if(t.push("curl"),t.push("-X",e.get("method")),t.push('"'+e.get("url")+'"'),u&&u.size){var s=!0,l=!1,c=void 0;try{for(var f,p=(0,i.default)(e.get("headers").entries());!(s=(f=p.next()).done);s=!0){var d=f.value,h=(0,o.default)(d,2),v=h[0],m=h[1];n=m,t.push("-H "),t.push('"'+v+": "+m+'"')}}catch(e){l=!0,c=e}finally{try{!s&&p.return&&p.return()}finally{if(l)throw c}}}if(e.get("body"))if("multipart/form-data"===n&&"POST"===e.get("method")){var g=!0,y=!1,b=void 0;try{for(var _,w=(0,i.default)(e.get("body").entrySeq());!(g=(_=w.next()).done);g=!0){var E=(0,o.default)(_.value,2),x=E[0],m=E[1];t.push("-F"),m instanceof a.default.File?t.push('"'+x+"=@"+m.name+(m.type?";type="+m.type:"")+'"'):t.push('"'+x+"="+m+'"')}}catch(e){y=!0,b=e}finally{try{!g&&w.return&&w.return()}finally{if(y)throw b}}}else t.push("-d"),t.push((0,r.default)(e.get("body")).replace(/\\n/g,""));return t.join(" ")};var a=u(n(32));function u(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(2)),i=l(n(3)),a=l(n(5)),u=l(n(6)),s=l(n(0));l(n(1));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){var e,n,i,u;(0,o.default)(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=i=(0,a.default)(this,(e=t.__proto__||(0,r.default)(t)).call.apply(e,[this].concat(l))),i.onChange=function(e){i.setScheme(e.target.value)},i.setScheme=function(e){var t=i.props,n=t.path,r=t.method;t.specActions.setScheme(e,n,r)},u=n,(0,a.default)(i,u)}return(0,u.default)(t,e),(0,i.default)(t,[{key:"componentWillMount",value:function(){var e=this.props.schemes;this.setScheme(e.first())}},{key:"componentWillReceiveProps",value:function(e){this.props.currentScheme&&e.schemes.includes(this.props.currentScheme)||this.setScheme(e.schemes.first())}},{key:"render",value:function(){var e=this.props,t=e.schemes,n=e.currentScheme;return s.default.createElement("label",{htmlFor:"schemes"},s.default.createElement("span",{className:"schemes-title"},"Schemes"),s.default.createElement("select",{onChange:this.onChange,value:n},t.valueSeq().map(function(e){return s.default.createElement("option",{value:e,key:e},e)}).toArray()))}}]),t}(s.default.Component);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(2)),i=l(n(3)),a=l(n(5)),u=l(n(6)),s=l(n(0));l(n(1));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.specActions,n=e.specSelectors,r=e.getComponent,o=n.operationScheme(),i=n.schemes(),a=r("schemes");return i&&i.size?s.default.createElement(a,{currentScheme:o,schemes:i,specActions:t}):null}}]),t}(s.default.Component);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(4)),o=c(n(2)),i=c(n(3)),a=c(n(5)),u=c(n(6)),s=n(0),l=c(s);c(n(1));function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e,n){(0,o.default)(this,t);var i=(0,a.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e,n));i.toggleCollapsed=function(){i.props.onToggle&&i.props.onToggle(i.props.modelName,!i.state.expanded),i.setState({expanded:!i.state.expanded})};var u=i.props,s=u.expanded,l=u.collapsedContent;return i.state={expanded:s,collapsedContent:l||t.defaultProps.collapsedContent},i}return(0,u.default)(t,e),(0,i.default)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.hideSelfOnExpand,n=e.expanded,r=e.modelName;t&&n&&this.props.onToggle(r,n)}},{key:"componentWillReceiveProps",value:function(e){this.props.expanded!==e.expanded&&this.setState({expanded:e.expanded})}},{key:"render",value:function(){var e=this.props,t=e.title,n=e.classes;return this.state.expanded&&this.props.hideSelfOnExpand?l.default.createElement("span",{className:n||""},this.props.children):l.default.createElement("span",{className:n||""},t&&l.default.createElement("span",{onClick:this.toggleCollapsed,style:{cursor:"pointer"}},t),l.default.createElement("span",{onClick:this.toggleCollapsed,style:{cursor:"pointer"}},l.default.createElement("span",{className:"model-toggle"+(this.state.expanded?"":" collapsed")})),this.state.expanded?this.props.children:this.state.collapsedContent)}}]),t}(s.Component);f.defaultProps={collapsedContent:"{...}",expanded:!1,title:null,onToggle:function(){},hideSelfOnExpand:!1},t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(2)),i=l(n(3)),a=l(n(5)),u=l(n(6)),s=l(n(0));l(n(1)),l(n(12));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e,n){(0,o.default)(this,t);var i=(0,a.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e,n));i.activeTab=function(e){var t=e.target.dataset.name;i.setState({activeTab:t})};var u=i.props,s=u.getConfigs,l=u.isExecute,c=s().defaultModelRendering;return"example"!==c&&"model"!==c&&(c="example"),i.state={activeTab:l?"example":c},i}return(0,u.default)(t,e),(0,i.default)(t,[{key:"componentWillReceiveProps",value:function(e){e.isExecute&&e.isExecute!==this.props.isExecute&&this.setState({activeTab:"example"})}},{key:"render",value:function(){var e=this.props,t=e.getComponent,n=e.specSelectors,r=e.schema,o=e.example,i=e.isExecute,a=e.getConfigs,u=e.specPath,l=a().defaultModelExpandDepth,c=t("ModelWrapper"),f=n.isOAS3();return s.default.createElement("div",null,s.default.createElement("ul",{className:"tab"},s.default.createElement("li",{className:"tabitem"+("example"===this.state.activeTab?" active":"")},s.default.createElement("a",{className:"tablinks","data-name":"example",onClick:this.activeTab},i?"Edit Value":"Example Value")),r?s.default.createElement("li",{className:"tabitem"+("model"===this.state.activeTab?" active":"")},s.default.createElement("a",{className:"tablinks"+(i?" inactive":""),"data-name":"model",onClick:this.activeTab},f?"Schema":"Model")):null),s.default.createElement("div",null,"example"===this.state.activeTab&&o,"model"===this.state.activeTab&&s.default.createElement(c,{schema:r,getComponent:t,getConfigs:a,specSelectors:n,expandDepth:l,specPath:u})))}}]),t}(s.default.Component);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(25)),o=f(n(4)),i=f(n(2)),a=f(n(3)),u=f(n(5)),s=f(n(6)),l=n(0),c=f(l);f(n(1));function f(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(){var e,n,r,a;(0,i.default)(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return n=r=(0,u.default)(this,(e=t.__proto__||(0,o.default)(t)).call.apply(e,[this].concat(l))),r.onToggle=function(e,t){r.props.layoutActions&&r.props.layoutActions.show(["models",e],t)},a=n,(0,u.default)(r,a)}return(0,s.default)(t,e),(0,a.default)(t,[{key:"render",value:function(){var e=this.props,t=e.getComponent,n=e.getConfigs,o=t("Model"),i=void 0;return this.props.layoutSelectors&&(i=this.props.layoutSelectors.isShown(["models",this.props.name])),c.default.createElement("div",{className:"model-box"},c.default.createElement(o,(0,r.default)({},this.props,{getConfigs:n,expanded:i,depth:1,onToggle:this.onToggle,expandDepth:this.props.expandDepth||0})))}}]),t}(l.Component);t.default=p},function(e,t,n){(function(e,t,n){"use strict";t=t&&"default"in t?t.default:t;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var i=function(e){function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,t.Component),o(i,[{key:"shouldComponentUpdate",value:function(e){var t=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.state||{};return!(this.updateOnProps||Object.keys(r({},e,this.props))).every(function(r){return n.is(e[r],t.props[r])})||!(this.updateOnStates||Object.keys(r({},o,i))).every(function(e){return n.is(o[e],i[e])})}}]),i}();e.ImmutablePureComponent=i,e.default=i,Object.defineProperty(e,"__esModule",{value:!0})})(t,n(0),n(7))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=h(n(17)),o=h(n(83)),i=h(n(4)),a=h(n(2)),u=h(n(3)),s=h(n(5)),l=h(n(6)),c=n(0),f=h(c),p=n(7),d=h(p);h(n(1));function h(e){return e&&e.__esModule?e:{default:e}}var v=function(e){function t(){var e,n,r,u;(0,a.default)(this,t);for(var l=arguments.length,c=Array(l),f=0;f<l;f++)c[f]=arguments[f];return n=r=(0,s.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(c))),r.getSchemaBasePath=function(){return r.props.specSelectors.isOAS3()?["components","schemas"]:["definitions"]},r.getCollapsedContent=function(){return" "},r.handleToggle=function(e,t){r.props.layoutActions.show(["models",e],t),t&&r.props.specActions.requestResolvedSubtree([].concat((0,o.default)(r.getSchemaBasePath()),[e]))},u=n,(0,s.default)(r,u)}return(0,l.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.specSelectors,i=t.getComponent,a=t.layoutSelectors,u=t.layoutActions,s=t.getConfigs,l=n.definitions(),c=s(),h=c.docExpansion,v=c.defaultModelsExpandDepth;if(!l.size||v<0)return null;var m=a.isShown("models",v>0&&"none"!==h),g=this.getSchemaBasePath(),y=n.isOAS3(),b=i("ModelWrapper"),_=i("Collapse"),w=i("ModelCollapse"),E=i("JumpToPath");return f.default.createElement("section",{className:m?"models is-open":"models"},f.default.createElement("h4",{onClick:function(){return u.show("models",!m)}},f.default.createElement("span",null,y?"Schemas":"Models"),f.default.createElement("svg",{width:"20",height:"20"},f.default.createElement("use",{xlinkHref:m?"#large-arrow-down":"#large-arrow"}))),f.default.createElement(_,{isOpened:m},l.entrySeq().map(function(t){var l=(0,r.default)(t,1)[0],c=[].concat((0,o.default)(g),[l]),h=n.specResolvedSubtree(c),m=n.specJson().getIn(c),y=p.Map.isMap(h)?h:d.default.Map(),_=p.Map.isMap(m)?m:d.default.Map(),x=y.get("title")||_.get("title")||l;a.isShown(["models",l],!1)&&0===y.size&&_.size>0&&e.props.specActions.requestResolvedSubtree([].concat((0,o.default)(e.getSchemaBasePath()),[l]));var S=d.default.List([].concat((0,o.default)(g),[l])),C=f.default.createElement(b,{name:l,expandDepth:v,schema:y||d.default.Map(),displayName:x,specPath:S,getComponent:i,specSelectors:n,getConfigs:s,layoutSelectors:a,layoutActions:u}),k=f.default.createElement("span",{className:"model-box"},f.default.createElement("span",{className:"model model-title"},x));return f.default.createElement("div",{id:"model-"+l,className:"model-container",key:"models-section-"+l},f.default.createElement("span",{className:"models-jump-to-path"},f.default.createElement(E,{specPath:S})),f.default.createElement(w,{classes:"model-box",collapsedContent:e.getCollapsedContent(l),onToggle:e.handleToggle,title:k,displayName:x,modelName:l,hideSelfOnExpand:!0,expanded:v>1},C))}).toArray()))}}]),t}(c.Component);t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(0));o(n(12));function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=e.value,n=(0,e.getComponent)("ModelCollapse"),o=r.default.createElement("span",null,"Array [ ",t.count()," ]");return r.default.createElement("span",{className:"prop-enum"},"Enum:",r.default.createElement("br",null),r.default.createElement(n,{collapsedContent:o},"[ ",t.join(", ")," ]"))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=v(n(41)),o=v(n(25)),i=v(n(17)),a=v(n(84)),u=v(n(4)),s=v(n(2)),l=v(n(3)),c=v(n(5)),f=v(n(6)),p=n(0),d=v(p),h=(v(n(1)),n(7));v(n(12));function v(e){return e&&e.__esModule?e:{default:e}}var m=function(e){function t(){return(0,s.default)(this,t),(0,c.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,f.default)(t,e),(0,l.default)(t,[{key:"render",value:function(){var e=this.props,t=e.schema,n=e.name,u=e.displayName,s=e.isRef,l=e.getComponent,c=e.getConfigs,f=e.depth,p=e.onToggle,v=e.expanded,m=e.specPath,g=(0,a.default)(e,["schema","name","displayName","isRef","getComponent","getConfigs","depth","onToggle","expanded","specPath"]),y=g.specSelectors,b=g.expandDepth,_=y.isOAS3;if(!t)return null;var w=c().showExtensions,E=t.get("description"),x=t.get("properties"),S=t.get("additionalProperties"),C=t.get("title")||u||n,k=t.get("required"),A=l("JumpToPath",!0),O=l("Markdown"),P=l("Model"),T=l("ModelCollapse"),M=function(){return d.default.createElement("span",{className:"model-jump-to-path"},d.default.createElement(A,{specPath:m}))},I=d.default.createElement("span",null,d.default.createElement("span",null,"{"),"...",d.default.createElement("span",null,"}"),s?d.default.createElement(M,null):""),j=y.isOAS3()?t.get("anyOf"):null,N=y.isOAS3()?t.get("oneOf"):null,R=y.isOAS3()?t.get("not"):null,D=C&&d.default.createElement("span",{className:"model-title"},s&&t.get("$$ref")&&d.default.createElement("span",{className:"model-hint"},t.get("$$ref")),d.default.createElement("span",{className:"model-title__text"},C));return d.default.createElement("span",{className:"model"},d.default.createElement(T,{modelName:n,title:D,onToggle:p,expanded:!!v||f<=b,collapsedContent:I},d.default.createElement("span",{className:"brace-open object"},"{"),s?d.default.createElement(M,null):null,d.default.createElement("span",{className:"inner-object"},d.default.createElement("table",{className:"model"},d.default.createElement("tbody",null,E?d.default.createElement("tr",{style:{color:"#666",fontStyle:"italic"}},d.default.createElement("td",null,"description:"),d.default.createElement("td",null,d.default.createElement(O,{source:E}))):null,x&&x.size?x.entrySeq().map(function(e){var t=(0,i.default)(e,2),r=t[0],a=t[1],u=_()&&a.get("deprecated"),s=h.List.isList(k)&&k.contains(r),p={verticalAlign:"top",paddingRight:"0.2em"};return s&&(p.fontWeight="bold"),d.default.createElement("tr",{key:r,className:u&&"deprecated"},d.default.createElement("td",{style:p},r,s&&d.default.createElement("span",{style:{color:"red"}},"*")),d.default.createElement("td",{style:{verticalAlign:"top"}},d.default.createElement(P,(0,o.default)({key:"object-"+n+"-"+r+"_"+a},g,{required:s,getComponent:l,specPath:m.push("properties",r),getConfigs:c,schema:a,depth:f+1}))))}).toArray():null,w?d.default.createElement("tr",null," "):null,w?t.entrySeq().map(function(e){var t=(0,i.default)(e,2),n=t[0],o=t[1];if("x-"===n.slice(0,2)){var a=o?o.toJS?o.toJS():o:null;return d.default.createElement("tr",{key:n,style:{color:"#777"}},d.default.createElement("td",null,n),d.default.createElement("td",{style:{verticalAlign:"top"}},(0,r.default)(a)))}}).toArray():null,S&&S.size?d.default.createElement("tr",null,d.default.createElement("td",null,"< * >:"),d.default.createElement("td",null,d.default.createElement(P,(0,o.default)({},g,{required:!1,getComponent:l,specPath:m.push("additionalProperties"),getConfigs:c,schema:S,depth:f+1})))):null,j?d.default.createElement("tr",null,d.default.createElement("td",null,"anyOf ->"),d.default.createElement("td",null,j.map(function(e,t){return d.default.createElement("div",{key:t},d.default.createElement(P,(0,o.default)({},g,{required:!1,getComponent:l,specPath:m.push("anyOf",t),getConfigs:c,schema:e,depth:f+1})))}))):null,N?d.default.createElement("tr",null,d.default.createElement("td",null,"oneOf ->"),d.default.createElement("td",null,N.map(function(e,t){return d.default.createElement("div",{key:t},d.default.createElement(P,(0,o.default)({},g,{required:!1,getComponent:l,specPath:m.push("oneOf",t),getConfigs:c,schema:e,depth:f+1})))}))):null,R?d.default.createElement("tr",null,d.default.createElement("td",null,"not ->"),d.default.createElement("td",null,d.default.createElement("div",null,d.default.createElement(P,(0,o.default)({},g,{required:!1,getComponent:l,specPath:m.push("not"),getConfigs:c,schema:R,depth:f+1}))))):null))),d.default.createElement("span",{className:"brace-close"},"}")))}}]),t}(p.Component);t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p(n(25)),o=p(n(17)),i=p(n(4)),a=p(n(2)),u=p(n(3)),s=p(n(5)),l=p(n(6)),c=n(0),f=p(c);p(n(1)),p(n(12));function p(e){return e&&e.__esModule?e:{default:e}}var d={color:"#999",fontStyle:"italic"},h=function(e){function t(){return(0,a.default)(this,t),(0,s.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=this.props,t=e.getComponent,n=e.getConfigs,i=e.schema,a=e.depth,u=e.expandDepth,s=e.name,l=e.displayName,c=e.specPath,p=i.get("description"),h=i.get("items"),v=i.get("title")||l||s,m=i.filter(function(e,t){return-1===["type","items","description","$$ref"].indexOf(t)}),g=t("Markdown"),y=t("ModelCollapse"),b=t("Model"),_=t("Property"),w=v&&f.default.createElement("span",{className:"model-title"},f.default.createElement("span",{className:"model-title__text"},v));return f.default.createElement("span",{className:"model"},f.default.createElement(y,{title:w,expanded:a<=u,collapsedContent:"[...]"},"[",m.size?m.entrySeq().map(function(e){var t=(0,o.default)(e,2),n=t[0],r=t[1];return f.default.createElement(_,{key:n+"-"+r,propKey:n,propVal:r,propStyle:d})}):null,p?f.default.createElement(g,{source:p}):m.size?f.default.createElement("div",{className:"markdown"}):null,f.default.createElement("span",null,f.default.createElement(b,(0,r.default)({},this.props,{getConfigs:n,specPath:c.push("items"),name:null,schema:h,required:!1,depth:a+1}))),"]"))}}]),t}(c.Component);t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p(n(17)),o=p(n(4)),i=p(n(2)),a=p(n(3)),u=p(n(5)),s=p(n(6)),l=n(0),c=p(l),f=(p(n(1)),n(9));function p(e){return e&&e.__esModule?e:{default:e}}var d={color:"#6b6b6b",fontStyle:"italic"},h=function(e){function t(){return(0,i.default)(this,t),(0,u.default)(this,(t.__proto__||(0,o.default)(t)).apply(this,arguments))}return(0,s.default)(t,e),(0,a.default)(t,[{key:"render",value:function(){var e=this.props,t=e.schema,n=e.getComponent,o=e.getConfigs,i=e.name,a=e.displayName,u=e.depth,s=o().showExtensions;if(!t||!t.get)return c.default.createElement("div",null);var l=t.get("type"),p=t.get("format"),h=t.get("xml"),v=t.get("enum"),m=t.get("title")||a||i,g=t.get("description"),y=(0,f.getExtensions)(t),b=t.filter(function(e,t){return-1===["enum","type","format","description","$$ref"].indexOf(t)}).filterNot(function(e,t){return y.has(t)}),_=n("Markdown"),w=n("EnumModel"),E=n("Property");return c.default.createElement("span",{className:"model"},c.default.createElement("span",{className:"prop"},i&&c.default.createElement("span",{className:(1===u&&"model-title")+" prop-name"},m),c.default.createElement("span",{className:"prop-type"},l),p&&c.default.createElement("span",{className:"prop-format"},"($",p,")"),b.size?b.entrySeq().map(function(e){var t=(0,r.default)(e,2),n=t[0],o=t[1];return c.default.createElement(E,{key:n+"-"+o,propKey:n,propVal:o,propStyle:d})}):null,s&&y.size?y.entrySeq().map(function(e){var t=(0,r.default)(e,2),n=t[0],o=t[1];return c.default.createElement(E,{key:n+"-"+o,propKey:n,propVal:o,propStyle:d})}):null,g?c.default.createElement(_,{source:g}):null,h&&h.size?c.default.createElement("span",null,c.default.createElement("br",null),c.default.createElement("span",{style:d},"xml:"),h.entrySeq().map(function(e){var t=(0,r.default)(e,2),n=t[0],o=t[1];return c.default.createElement("span",{key:n+"-"+o,style:d},c.default.createElement("br",null),"   ",n,": ",String(o))}).toArray()):null,v&&c.default.createElement(w,{value:v,getComponent:n})))}}]),t}(l.Component);t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Property=void 0;var r=o(n(0));o(n(1));function o(e){return e&&e.__esModule?e:{default:e}}var i=t.Property=function(e){var t=e.propKey,n=e.propVal,o=e.propStyle;return r.default.createElement("span",{style:o},r.default.createElement("br",null),t,": ",String(n))};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(2)),i=l(n(3)),a=l(n(5)),u=l(n(6)),s=l(n(0));l(n(1));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.onTryoutClick,n=e.onCancelClick,r=e.enabled;return s.default.createElement("div",{className:"try-out"},r?s.default.createElement("button",{className:"btn try-out__btn cancel",onClick:n},"Cancel"):s.default.createElement("button",{className:"btn try-out__btn",onClick:t},"Try it out "))}}]),t}(s.default.Component);c.defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,enabled:!1},t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(2)),i=l(n(3)),a=l(n(5)),u=l(n(6)),s=l(n(0));l(n(1));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.bypass,n=e.isSwagger2,r=e.isOAS3,o=e.alsoShow;return t?s.default.createElement("div",null,this.props.children):n&&r?s.default.createElement("div",{className:"version-pragma"},o,s.default.createElement("div",{className:"version-pragma__message version-pragma__message--ambiguous"},s.default.createElement("div",null,s.default.createElement("h3",null,"Unable to render this definition"),s.default.createElement("p",null,s.default.createElement("code",null,"swagger")," and ",s.default.createElement("code",null,"openapi")," fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields."),s.default.createElement("p",null,"Supported version fields are ",s.default.createElement("code",null,"swagger: ",'"2.0"')," and those that match ",s.default.createElement("code",null,"openapi: 3.0.n")," (for example, ",s.default.createElement("code",null,"openapi: 3.0.0"),").")))):n||r?s.default.createElement("div",null,this.props.children):s.default.createElement("div",{className:"version-pragma"},o,s.default.createElement("div",{className:"version-pragma__message version-pragma__message--missing"},s.default.createElement("div",null,s.default.createElement("h3",null,"Unable to render this definition"),s.default.createElement("p",null,"The provided definition does not specify a valid version field."),s.default.createElement("p",null,"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are ",s.default.createElement("code",null,"swagger: ",'"2.0"')," and those that match ",s.default.createElement("code",null,"openapi: 3.0.n")," (for example, ",s.default.createElement("code",null,"openapi: 3.0.0"),")."))))}}]),t}(s.default.PureComponent);c.defaultProps={alsoShow:null,children:null,bypass:!1},t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(0));o(n(1));function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=e.version;return r.default.createElement("small",null,r.default.createElement("pre",{className:"version"}," ",t," "))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeepLink=void 0;var r=o(n(0));o(n(1));function o(e){return e&&e.__esModule?e:{default:e}}var i=t.DeepLink=function(e){var t=e.enabled,n=e.path,o=e.text;return r.default.createElement("a",{className:"nostyle",onClick:t?function(e){return e.preventDefault()}:null,href:t?"#/"+n:null},r.default.createElement("span",null,o))};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(){return i.default.createElement("div",null,i.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",style:{position:"absolute",width:0,height:0}},i.default.createElement("defs",null,i.default.createElement("symbol",{viewBox:"0 0 20 20",id:"unlocked"},i.default.createElement("path",{d:"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z"})),i.default.createElement("symbol",{viewBox:"0 0 20 20",id:"locked"},i.default.createElement("path",{d:"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z"})),i.default.createElement("symbol",{viewBox:"0 0 20 20",id:"close"},i.default.createElement("path",{d:"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z"})),i.default.createElement("symbol",{viewBox:"0 0 20 20",id:"large-arrow"},i.default.createElement("path",{d:"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z"})),i.default.createElement("symbol",{viewBox:"0 0 20 20",id:"large-arrow-down"},i.default.createElement("path",{d:"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z"})),i.default.createElement("symbol",{viewBox:"0 0 24 24",id:"jump-to"},i.default.createElement("path",{d:"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"})),i.default.createElement("symbol",{viewBox:"0 0 24 24",id:"expand"},i.default.createElement("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"})))))}},function(e,t,n){"use strict";var r=n(27).assign,o=n(1003),i=n(1005),a=n(1016),u=n(1031),s=n(153),l={default:n(1050),full:n(1051),commonmark:n(1052)};function c(e,t,n){this.src=t,this.env=n,this.options=e.options,this.tokens=[],this.inlineMode=!1,this.inline=e.inline,this.block=e.block,this.renderer=e.renderer,this.typographer=e.typographer}function f(e,t){"string"!=typeof e&&(t=e,e="default"),this.inline=new u,this.block=new a,this.core=new i,this.renderer=new o,this.ruler=new s,this.options={},this.configure(l[e]),this.set(t||{})}f.prototype.set=function(e){r(this.options,e)},f.prototype.configure=function(e){var t=this;if(!e)throw new Error("Wrong `remarkable` preset, check name/content");e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enable(e.components[n].rules,!0)})},f.prototype.use=function(e,t){return e(this,t),this},f.prototype.parse=function(e,t){var n=new c(this,e,t);return this.core.process(n),n.tokens},f.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},f.prototype.parseInline=function(e,t){var n=new c(this,e,t);return n.inlineMode=!0,this.core.process(n),n.tokens},f.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=f,e.exports.utils=n(27)},function(e,t,n){"use strict";var r=n(27),o=n(1004);function i(){this.rules=r.assign({},o),this.getBreak=o.getBreak}e.exports=i,i.prototype.renderInline=function(e,t,n){for(var r=this.rules,o=e.length,i=0,a="";o--;)a+=r[e[i].type](e,i++,t,n,this);return a},i.prototype.render=function(e,t,n){for(var r=this.rules,o=e.length,i=-1,a="";++i<o;)"inline"===e[i].type?a+=this.renderInline(e[i].children,t,n):a+=r[e[i].type](e,i,t,n,this);return a}},function(e,t,n){"use strict";var r=n(27).has,o=n(27).unescapeMd,i=n(27).replaceEntities,a=n(27).escapeHtml,u={};u.blockquote_open=function(){return"<blockquote>\n"},u.blockquote_close=function(e,t){return"</blockquote>"+s(e,t)},u.code=function(e,t){return e[t].block?"<pre><code>"+a(e[t].content)+"</code></pre>"+s(e,t):"<code>"+a(e[t].content)+"</code>"},u.fence=function(e,t,n,u,l){var c,f,p=e[t],d="",h=n.langPrefix;if(p.params){if(f=(c=p.params.split(/\s+/g)).join(" "),r(l.rules.fence_custom,c[0]))return l.rules.fence_custom[c[0]](e,t,n,u,l);d=' class="'+h+a(i(o(f)))+'"'}return"<pre><code"+d+">"+(n.highlight&&n.highlight.apply(n.highlight,[p.content].concat(c))||a(p.content))+"</code></pre>"+s(e,t)},u.fence_custom={},u.heading_open=function(e,t){return"<h"+e[t].hLevel+">"},u.heading_close=function(e,t){return"</h"+e[t].hLevel+">\n"},u.hr=function(e,t,n){return(n.xhtmlOut?"<hr />":"<hr>")+s(e,t)},u.bullet_list_open=function(){return"<ul>\n"},u.bullet_list_close=function(e,t){return"</ul>"+s(e,t)},u.list_item_open=function(){return"<li>"},u.list_item_close=function(){return"</li>\n"},u.ordered_list_open=function(e,t){var n=e[t];return"<ol"+(n.order>1?' start="'+n.order+'"':"")+">\n"},u.ordered_list_close=function(e,t){return"</ol>"+s(e,t)},u.paragraph_open=function(e,t){return e[t].tight?"":"<p>"},u.paragraph_close=function(e,t){var n=!(e[t].tight&&t&&"inline"===e[t-1].type&&!e[t-1].content);return(e[t].tight?"":"</p>")+(n?s(e,t):"")},u.link_open=function(e,t,n){var r=e[t].title?' title="'+a(i(e[t].title))+'"':"",o=n.linkTarget?' target="'+n.linkTarget+'"':"";return'<a href="'+a(e[t].href)+'"'+r+o+">"},u.link_close=function(){return"</a>"},u.image=function(e,t,n){var r=' src="'+a(e[t].src)+'"',u=e[t].title?' title="'+a(i(e[t].title))+'"':"";return"<img"+r+(' alt="'+(e[t].alt?a(i(o(e[t].alt))):"")+'"')+u+(n.xhtmlOut?" /":"")+">"},u.table_open=function(){return"<table>\n"},u.table_close=function(){return"</table>\n"},u.thead_open=function(){return"<thead>\n"},u.thead_close=function(){return"</thead>\n"},u.tbody_open=function(){return"<tbody>\n"},u.tbody_close=function(){return"</tbody>\n"},u.tr_open=function(){return"<tr>"},u.tr_close=function(){return"</tr>\n"},u.th_open=function(e,t){var n=e[t];return"<th"+(n.align?' style="text-align:'+n.align+'"':"")+">"},u.th_close=function(){return"</th>"},u.td_open=function(e,t){var n=e[t];return"<td"+(n.align?' style="text-align:'+n.align+'"':"")+">"},u.td_close=function(){return"</td>"},u.strong_open=function(){return"<strong>"},u.strong_close=function(){return"</strong>"},u.em_open=function(){return"<em>"},u.em_close=function(){return"</em>"},u.del_open=function(){return"<del>"},u.del_close=function(){return"</del>"},u.ins_open=function(){return"<ins>"},u.ins_close=function(){return"</ins>"},u.mark_open=function(){return"<mark>"},u.mark_close=function(){return"</mark>"},u.sub=function(e,t){return"<sub>"+a(e[t].content)+"</sub>"},u.sup=function(e,t){return"<sup>"+a(e[t].content)+"</sup>"},u.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},u.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},u.text=function(e,t){return a(e[t].content)},u.htmlblock=function(e,t){return e[t].content},u.htmltag=function(e,t){return e[t].content},u.abbr_open=function(e,t){return'<abbr title="'+a(i(e[t].title))+'">'},u.abbr_close=function(){return"</abbr>"},u.footnote_ref=function(e,t){var n=Number(e[t].id+1).toString(),r="fnref"+n;return e[t].subId>0&&(r+=":"+e[t].subId),'<sup class="footnote-ref"><a href="#fn'+n+'" id="'+r+'">['+n+"]</a></sup>"},u.footnote_block_open=function(e,t,n){return(n.xhtmlOut?'<hr class="footnotes-sep" />\n':'<hr class="footnotes-sep">\n')+'<section class="footnotes">\n<ol class="footnotes-list">\n'},u.footnote_block_close=function(){return"</ol>\n</section>\n"},u.footnote_open=function(e,t){return'<li id="fn'+Number(e[t].id+1).toString()+'" class="footnote-item">'},u.footnote_close=function(){return"</li>\n"},u.footnote_anchor=function(e,t){var n="fnref"+Number(e[t].id+1).toString();return e[t].subId>0&&(n+=":"+e[t].subId),' <a href="#'+n+'" class="footnote-backref">↩</a>'},u.dl_open=function(){return"<dl>\n"},u.dt_open=function(){return"<dt>"},u.dd_open=function(){return"<dd>"},u.dl_close=function(){return"</dl>\n"},u.dt_close=function(){return"</dt>\n"},u.dd_close=function(){return"</dd>\n"};var s=u.getBreak=function(e,t){return(t=function e(t,n){return++n>=t.length-2?n:"paragraph_open"===t[n].type&&t[n].tight&&"inline"===t[n+1].type&&0===t[n+1].content.length&&"paragraph_close"===t[n+2].type&&t[n+2].tight?e(t,n+2):n}(e,t))<e.length&&"list_item_close"===e[t].type?"":"\n"};e.exports=u},function(e,t,n){"use strict";var r=n(153),o=[["block",n(1006)],["abbr",n(1007)],["references",n(1008)],["inline",n(1009)],["footnote_tail",n(1010)],["abbr2",n(1011)],["replacements",n(1012)],["smartquotes",n(1013)],["linkify",n(1014)]];function i(){this.options={},this.ruler=new r;for(var e=0;e<o.length;e++)this.ruler.push(o[e][0],o[e][1])}i.prototype.process=function(e){var t,n,r;for(t=0,n=(r=this.ruler.getRules("")).length;t<n;t++)r[t](e)},e.exports=i},function(e,t,n){"use strict";e.exports=function(e){e.inlineMode?e.tokens.push({type:"inline",content:e.src.replace(/\n/g," ").trim(),level:0,lines:[0,1],children:[]}):e.block.parse(e.src,e.options,e.env,e.tokens)}},function(e,t,n){"use strict";var r=n(236),o=n(154);function i(e,t,n,i){var a,u,s,l,c,f;if(42!==e.charCodeAt(0))return-1;if(91!==e.charCodeAt(1))return-1;if(-1===e.indexOf("]:"))return-1;if(a=new r(e,t,n,i,[]),(u=o(a,1))<0||58!==e.charCodeAt(u+1))return-1;for(l=a.posMax,s=u+2;s<l&&10!==a.src.charCodeAt(s);s++);return c=e.slice(2,u),0===(f=e.slice(u+2,s).trim()).length?-1:(i.abbreviations||(i.abbreviations={}),void 0===i.abbreviations[":"+c]&&(i.abbreviations[":"+c]=f),s)}e.exports=function(e){var t,n,r,o,a=e.tokens;if(!e.inlineMode)for(t=1,n=a.length-1;t<n;t++)if("paragraph_open"===a[t-1].type&&"inline"===a[t].type&&"paragraph_close"===a[t+1].type){for(r=a[t].content;r.length&&!((o=i(r,e.inline,e.options,e.env))<0);)r=r.slice(o).trim();a[t].content=r,r.length||(a[t-1].tight=!0,a[t+1].tight=!0)}}},function(e,t,n){"use strict";var r=n(236),o=n(154),i=n(418),a=n(420),u=n(421);function s(e,t,n,s){var l,c,f,p,d,h,v,m,g;if(91!==e.charCodeAt(0))return-1;if(-1===e.indexOf("]:"))return-1;if(l=new r(e,t,n,s,[]),(c=o(l,0))<0||58!==e.charCodeAt(c+1))return-1;for(p=l.posMax,f=c+2;f<p&&(32===(d=l.src.charCodeAt(f))||10===d);f++);if(!i(l,f))return-1;for(v=l.linkContent,h=f=l.pos,f+=1;f<p&&(32===(d=l.src.charCodeAt(f))||10===d);f++);for(f<p&&h!==f&&a(l,f)?(m=l.linkContent,f=l.pos):(m="",f=h);f<p&&32===l.src.charCodeAt(f);)f++;return f<p&&10!==l.src.charCodeAt(f)?-1:(g=u(e.slice(1,c)),void 0===s.references[g]&&(s.references[g]={title:m,href:v}),f)}e.exports=function(e){var t,n,r,o,i=e.tokens;if(e.env.references=e.env.references||{},!e.inlineMode)for(t=1,n=i.length-1;t<n;t++)if("inline"===i[t].type&&"paragraph_open"===i[t-1].type&&"paragraph_close"===i[t+1].type){for(r=i[t].content;r.length&&!((o=s(r,e.inline,e.options,e.env))<0);)r=r.slice(o).trim();i[t].content=r,r.length||(i[t-1].tight=!0,i[t+1].tight=!0)}}},function(e,t,n){"use strict";e.exports=function(e){var t,n,r,o=e.tokens;for(n=0,r=o.length;n<r;n++)"inline"===(t=o[n]).type&&e.inline.parse(t.content,e.options,e.env,t.children)}},function(e,t,n){"use strict";e.exports=function(e){var t,n,r,o,i,a,u,s,l,c=0,f=!1,p={};if(e.env.footnotes&&(e.tokens=e.tokens.filter(function(e){return"footnote_reference_open"===e.type?(f=!0,s=[],l=e.label,!1):"footnote_reference_close"===e.type?(f=!1,p[":"+l]=s,!1):(f&&s.push(e),!f)}),e.env.footnotes.list)){for(a=e.env.footnotes.list,e.tokens.push({type:"footnote_block_open",level:c++}),t=0,n=a.length;t<n;t++){for(e.tokens.push({type:"footnote_open",id:t,level:c++}),a[t].tokens?((u=[]).push({type:"paragraph_open",tight:!1,level:c++}),u.push({type:"inline",content:"",level:c,children:a[t].tokens}),u.push({type:"paragraph_close",tight:!1,level:--c})):a[t].label&&(u=p[":"+a[t].label]),e.tokens=e.tokens.concat(u),i="paragraph_close"===e.tokens[e.tokens.length-1].type?e.tokens.pop():null,o=a[t].count>0?a[t].count:1,r=0;r<o;r++)e.tokens.push({type:"footnote_anchor",id:t,subId:r,level:c});i&&e.tokens.push(i),e.tokens.push({type:"footnote_close",level:--c})}e.tokens.push({type:"footnote_block_close",level:--c})}}},function(e,t,n){"use strict";function r(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1")}e.exports=function(e){var t,n,o,i,a,u,s,l,c,f,p,d,h=e.tokens;if(e.env.abbreviations)for(e.env.abbrRegExp||(d="(^|["+" \n()[]'\".,!?-".split("").map(r).join("")+"])("+Object.keys(e.env.abbreviations).map(function(e){return e.substr(1)}).sort(function(e,t){return t.length-e.length}).map(r).join("|")+")($|["+" \n()[]'\".,!?-".split("").map(r).join("")+"])",e.env.abbrRegExp=new RegExp(d,"g")),f=e.env.abbrRegExp,n=0,o=h.length;n<o;n++)if("inline"===h[n].type)for(t=(i=h[n].children).length-1;t>=0;t--)if("text"===(a=i[t]).type){for(l=0,u=a.content,f.lastIndex=0,c=a.level,s=[];p=f.exec(u);)f.lastIndex>l&&s.push({type:"text",content:u.slice(l,p.index+p[1].length),level:c}),s.push({type:"abbr_open",title:e.env.abbreviations[":"+p[2]],level:c++}),s.push({type:"text",content:p[2],level:c}),s.push({type:"abbr_close",level:--c}),l=f.lastIndex-p[3].length;s.length&&(l<u.length&&s.push({type:"text",content:u.slice(l),level:c}),h[n].children=i=[].concat(i.slice(0,t),s,i.slice(t+1)))}}},function(e,t,n){"use strict";var r=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,o=/\((c|tm|r|p)\)/gi,i={c:"©",r:"®",p:"§",tm:"™"};e.exports=function(e){var t,n,a,u,s,l;if(e.options.typographer)for(s=e.tokens.length-1;s>=0;s--)if("inline"===e.tokens[s].type)for(t=(u=e.tokens[s].children).length-1;t>=0;t--)"text"===(n=u[t]).type&&(a=n.content,a=(l=a).indexOf("(")<0?l:l.replace(o,function(e,t){return i[t.toLowerCase()]}),r.test(a)&&(a=a.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2")),n.content=a)}},function(e,t,n){"use strict";var r=/['"]/,o=/['"]/g,i=/[-\s()\[\]]/;function a(e,t){return!(t<0||t>=e.length)&&!i.test(e[t])}function u(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}e.exports=function(e){var t,n,i,s,l,c,f,p,d,h,v,m,g,y,b,_,w;if(e.options.typographer)for(w=[],b=e.tokens.length-1;b>=0;b--)if("inline"===e.tokens[b].type)for(_=e.tokens[b].children,w.length=0,t=0;t<_.length;t++)if("text"===(n=_[t]).type&&!r.test(n.text)){for(f=_[t].level,g=w.length-1;g>=0&&!(w[g].level<=f);g--);w.length=g+1,l=0,c=(i=n.content).length;e:for(;l<c&&(o.lastIndex=l,s=o.exec(i));)if(p=!a(i,s.index-1),l=s.index+1,y="'"===s[0],(d=!a(i,l))||p){if(v=!d,m=!p)for(g=w.length-1;g>=0&&(h=w[g],!(w[g].level<f));g--)if(h.single===y&&w[g].level===f){h=w[g],y?(_[h.token].content=u(_[h.token].content,h.pos,e.options.quotes[2]),n.content=u(n.content,s.index,e.options.quotes[3])):(_[h.token].content=u(_[h.token].content,h.pos,e.options.quotes[0]),n.content=u(n.content,s.index,e.options.quotes[1])),w.length=g;continue e}v?w.push({token:t,pos:s.index,single:y,level:f}):m&&y&&(n.content=u(n.content,s.index,"’"))}else y&&(n.content=u(n.content,s.index,"’"))}}},function(e,t,n){"use strict";var r=n(1015),o=/www|@|\:\/\//;function i(e){return/^<\/a\s*>/i.test(e)}function a(){var e=[],t=new r({stripPrefix:!1,url:!0,email:!0,twitter:!1,replaceFn:function(t,n){switch(n.getType()){case"url":e.push({text:n.matchedText,url:n.getUrl()});break;case"email":e.push({text:n.matchedText,url:"mailto:"+n.getEmail().replace(/^mailto:/i,"")})}return!1}});return{links:e,autolinker:t}}e.exports=function(e){var t,n,r,u,s,l,c,f,p,d,h,v,m,g,y=e.tokens,b=null;if(e.options.linkify)for(n=0,r=y.length;n<r;n++)if("inline"===y[n].type)for(h=0,t=(u=y[n].children).length-1;t>=0;t--)if("link_close"!==(s=u[t]).type){if("htmltag"===s.type&&(g=s.content,/^<a[>\s]/i.test(g)&&h>0&&h--,i(s.content)&&h++),!(h>0)&&"text"===s.type&&o.test(s.content)){if(b||(v=(b=a()).links,m=b.autolinker),l=s.content,v.length=0,m.link(l),!v.length)continue;for(c=[],d=s.level,f=0;f<v.length;f++)e.inline.validateLink(v[f].url)&&((p=l.indexOf(v[f].text))&&(d=d,c.push({type:"text",content:l.slice(0,p),level:d})),c.push({type:"link_open",href:v[f].url,title:"",level:d++}),c.push({type:"text",content:v[f].text,level:d}),c.push({type:"link_close",level:--d}),l=l.slice(p+v[f].text.length));l.length&&c.push({type:"text",content:l,level:d}),y[n].children=u=[].concat(u.slice(0,t),c,u.slice(t+1))}}else for(t--;u[t].level!==s.level&&"link_open"!==u[t].type;)t--}},function(e,t,n){var r,o,i;o=this,i=function(){ /*! * Autolinker.js * 0.15.3 * * Copyright(c) 2015 Gregory Jacobs <[email protected]> * MIT Licensed. http://www.opensource.org/licenses/mit-license.php * * https://github.com/gregjacobs/Autolinker.js */ var e,t,n,r,o=function(e){o.Util.assign(this,e)};return o.prototype={constructor:o,urls:!0,email:!0,twitter:!0,newWindow:!0,stripPrefix:!0,truncate:void 0,className:"",htmlParser:void 0,matchParser:void 0,tagBuilder:void 0,link:function(e){for(var t=this.getHtmlParser().parse(e),n=0,r=[],o=0,i=t.length;o<i;o++){var a=t[o],u=a.getType(),s=a.getText();if("element"===u)"a"===a.getTagName()&&(a.isClosing()?n=Math.max(n-1,0):n++),r.push(s);else if("entity"===u)r.push(s);else if(0===n){var l=this.linkifyStr(s);r.push(l)}else r.push(s)}return r.join("")},linkifyStr:function(e){return this.getMatchParser().replace(e,this.createMatchReturnVal,this)},createMatchReturnVal:function(e){var t;return this.replaceFn&&(t=this.replaceFn.call(this,this,e)),"string"==typeof t?t:!1===t?e.getMatchedText():t instanceof o.HtmlTag?t.toString():this.getTagBuilder().build(e).toString()},getHtmlParser:function(){var e=this.htmlParser;return e||(e=this.htmlParser=new o.htmlParser.HtmlParser),e},getMatchParser:function(){var e=this.matchParser;return e||(e=this.matchParser=new o.matchParser.MatchParser({urls:this.urls,email:this.email,twitter:this.twitter,stripPrefix:this.stripPrefix})),e},getTagBuilder:function(){var e=this.tagBuilder;return e||(e=this.tagBuilder=new o.AnchorTagBuilder({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),e}},o.link=function(e,t){return new o(t).link(e)},o.match={},o.htmlParser={},o.matchParser={},o.Util={abstractMethod:function(){throw"abstract"},assign:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},extend:function(e,t){var n,r=e.prototype,i=function(){};i.prototype=r;var a=(n=t.hasOwnProperty("constructor")?t.constructor:function(){r.constructor.apply(this,arguments)}).prototype=new i;return a.constructor=n,a.superclass=r,delete t.constructor,o.Util.assign(a,t),n},ellipsis:function(e,t,n){return e.length>t&&(n=null==n?"..":n,e=e.substring(0,t-n.length)+n),e},indexOf:function(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},splitAndCapture:function(e,t){if(!t.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var n,r=[],o=0;n=t.exec(e);)r.push(e.substring(o,n.index)),r.push(n[0]),o=n.index+n[0].length;return r.push(e.substring(o)),r}},o.HtmlTag=o.Util.extend(Object,{whitespaceRegex:/\s+/,constructor:function(e){o.Util.assign(this,e),this.innerHtml=this.innerHtml||this.innerHTML},setTagName:function(e){return this.tagName=e,this},getTagName:function(){return this.tagName||""},setAttr:function(e,t){return this.getAttrs()[e]=t,this},getAttr:function(e){return this.getAttrs()[e]},setAttrs:function(e){var t=this.getAttrs();return o.Util.assign(t,e),this},getAttrs:function(){return this.attrs||(this.attrs={})},setClass:function(e){return this.setAttr("class",e)},addClass:function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,i=o.Util.indexOf,a=n?n.split(r):[],u=e.split(r);t=u.shift();)-1===i(a,t)&&a.push(t);return this.getAttrs().class=a.join(" "),this},removeClass:function(e){for(var t,n=this.getClass(),r=this.whitespaceRegex,i=o.Util.indexOf,a=n?n.split(r):[],u=e.split(r);a.length&&(t=u.shift());){var s=i(a,t);-1!==s&&a.splice(s,1)}return this.getAttrs().class=a.join(" "),this},getClass:function(){return this.getAttrs().class||""},hasClass:function(e){return-1!==(" "+this.getClass()+" ").indexOf(" "+e+" ")},setInnerHtml:function(e){return this.innerHtml=e,this},getInnerHtml:function(){return this.innerHtml||""},toString:function(){var e=this.getTagName(),t=this.buildAttrsStr();return["<",e,t=t?" "+t:"",">",this.getInnerHtml(),"</",e,">"].join("")},buildAttrsStr:function(){if(!this.attrs)return"";var e=this.getAttrs(),t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+'="'+e[n]+'"');return t.join(" ")}}),o.AnchorTagBuilder=o.Util.extend(Object,{constructor:function(e){o.Util.assign(this,e)},build:function(e){return new o.HtmlTag({tagName:"a",attrs:this.createAttrs(e.getType(),e.getAnchorHref()),innerHtml:this.processAnchorText(e.getAnchorText())})},createAttrs:function(e,t){var n={href:t},r=this.createCssClass(e);return r&&(n.class=r),this.newWindow&&(n.target="_blank"),n},createCssClass:function(e){var t=this.className;return t?t+" "+t+"-"+e:""},processAnchorText:function(e){return e=this.doTruncate(e)},doTruncate:function(e){return o.Util.ellipsis(e,this.truncate||Number.POSITIVE_INFINITY)}}),o.htmlParser.HtmlParser=o.Util.extend(Object,{htmlRegex:(e=/(?:"[^"]*?"|'[^']*?'|[^'"=<>`\s]+)/,t=/[^\s\0"'>\/=\x01-\x1F\x7F]+/.source+"(?:\\s*=\\s*"+e.source+")?",new RegExp(["(?:","<(!DOCTYPE)","(?:","\\s+","(?:",t,"|",e.source+")",")*",">",")","|","(?:","<(/)?","("+/[0-9a-zA-Z][0-9a-zA-Z:]*/.source+")","(?:","\\s+",t,")*","\\s*/?",">",")"].join(""),"gi")),htmlCharacterEntitiesRegex:/(&nbsp;|&#160;|&lt;|&#60;|&gt;|&#62;|&quot;|&#34;|&#39;)/gi,parse:function(e){for(var t,n,r=this.htmlRegex,o=0,i=[];null!==(t=r.exec(e));){var a=t[0],u=t[1]||t[3],s=!!t[2],l=e.substring(o,t.index);l&&(n=this.parseTextAndEntityNodes(l),i.push.apply(i,n)),i.push(this.createElementNode(a,u,s)),o=t.index+a.length}if(o<e.length){var c=e.substring(o);c&&(n=this.parseTextAndEntityNodes(c),i.push.apply(i,n))}return i},parseTextAndEntityNodes:function(e){for(var t=[],n=o.Util.splitAndCapture(e,this.htmlCharacterEntitiesRegex),r=0,i=n.length;r<i;r+=2){var a=n[r],u=n[r+1];a&&t.push(this.createTextNode(a)),u&&t.push(this.createEntityNode(u))}return t},createElementNode:function(e,t,n){return new o.htmlParser.ElementNode({text:e,tagName:t.toLowerCase(),closing:n})},createEntityNode:function(e){return new o.htmlParser.EntityNode({text:e})},createTextNode:function(e){return new o.htmlParser.TextNode({text:e})}}),o.htmlParser.HtmlNode=o.Util.extend(Object,{text:"",constructor:function(e){o.Util.assign(this,e)},getType:o.Util.abstractMethod,getText:function(){return this.text}}),o.htmlParser.ElementNode=o.Util.extend(o.htmlParser.HtmlNode,{tagName:"",closing:!1,getType:function(){return"element"},getTagName:function(){return this.tagName},isClosing:function(){return this.closing}}),o.htmlParser.EntityNode=o.Util.extend(o.htmlParser.HtmlNode,{getType:function(){return"entity"}}),o.htmlParser.TextNode=o.Util.extend(o.htmlParser.HtmlNode,{getType:function(){return"text"}}),o.matchParser.MatchParser=o.Util.extend(Object,{urls:!0,email:!0,twitter:!0,stripPrefix:!0,matcherRegex:(n=/[A-Za-z0-9\.\-]*[A-Za-z0-9\-]/,r=/\.(?:international|construction|contractors|enterprises|photography|productions|foundation|immobilien|industries|management|properties|technology|christmas|community|directory|education|equipment|institute|marketing|solutions|vacations|bargains|boutique|builders|catering|cleaning|clothing|computer|democrat|diamonds|graphics|holdings|lighting|partners|plumbing|supplies|training|ventures|academy|careers|company|cruises|domains|exposed|flights|florist|gallery|guitars|holiday|kitchen|neustar|okinawa|recipes|rentals|reviews|shiksha|singles|support|systems|agency|berlin|camera|center|coffee|condos|dating|estate|events|expert|futbol|kaufen|luxury|maison|monash|museum|nagoya|photos|repair|report|social|supply|tattoo|tienda|travel|viajes|villas|vision|voting|voyage|actor|build|cards|cheap|codes|dance|email|glass|house|mango|ninja|parts|photo|shoes|solar|today|tokyo|tools|watch|works|aero|arpa|asia|best|bike|blue|buzz|camp|club|cool|coop|farm|fish|gift|guru|info|jobs|kiwi|kred|land|limo|link|menu|mobi|moda|name|pics|pink|post|qpon|rich|ruhr|sexy|tips|vote|voto|wang|wien|wiki|zone|bar|bid|biz|cab|cat|ceo|com|edu|gov|int|kim|mil|net|onl|org|pro|pub|red|tel|uno|wed|xxx|xyz|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw)\b/,new RegExp(["(",/(^|[^\w])@(\w{1,15})/.source,")","|","(",/(?:[\-;:&=\+\$,\w\.]+@)/.source,n.source,r.source,")","|","(","(?:","(",/(?:[A-Za-z][-.+A-Za-z0-9]+:(?![A-Za-z][-.+A-Za-z0-9]+:\/\/)(?!\d+\/?)(?:\/\/)?)/.source,n.source,")","|","(?:","(.?//)?",/(?:www\.)/.source,n.source,")","|","(?:","(.?//)?",n.source,r.source,")",")","(?:"+/[\-A-Za-z0-9+&@#\/%=~_()|'$*\[\]?!:,.;]*[\-A-Za-z0-9+&@#\/%=~_()|'$*\[\]]/.source+")?",")"].join(""),"gi")),charBeforeProtocolRelMatchRegex:/^(.)?\/\//,constructor:function(e){o.Util.assign(this,e),this.matchValidator=new o.MatchValidator},replace:function(e,t,n){var r=this;return e.replace(this.matcherRegex,function(e,o,i,a,u,s,l,c,f){var p=r.processCandidateMatch(e,o,i,a,u,s,l,c,f);if(p){var d=t.call(n,p.match);return p.prefixStr+d+p.suffixStr}return e})},processCandidateMatch:function(e,t,n,r,i,a,u,s,l){var c,f=s||l,p="",d="";if(t&&!this.twitter||i&&!this.email||a&&!this.urls||!this.matchValidator.isValidMatch(a,u,f))return null;if(this.matchHasUnbalancedClosingParen(e)&&(e=e.substr(0,e.length-1),d=")"),i)c=new o.match.Email({matchedText:e,email:i});else if(t)n&&(p=n,e=e.slice(1)),c=new o.match.Twitter({matchedText:e,twitterHandle:r});else{if(f){var h=f.match(this.charBeforeProtocolRelMatchRegex)[1]||"";h&&(p=h,e=e.slice(1))}c=new o.match.Url({matchedText:e,url:e,protocolUrlMatch:!!u,protocolRelativeMatch:!!f,stripPrefix:this.stripPrefix})}return{prefixStr:p,suffixStr:d,match:c}},matchHasUnbalancedClosingParen:function(e){if(")"===e.charAt(e.length-1)){var t=e.match(/\(/g),n=e.match(/\)/g);if((t&&t.length||0)<(n&&n.length||0))return!0}return!1}}),o.MatchValidator=o.Util.extend(Object,{invalidProtocolRelMatchRegex:/^[\w]\/\//,hasFullProtocolRegex:/^[A-Za-z][-.+A-Za-z0-9]+:\/\//,uriSchemeRegex:/^[A-Za-z][-.+A-Za-z0-9]+:/,hasWordCharAfterProtocolRegex:/:[^\s]*?[A-Za-z]/,isValidMatch:function(e,t,n){return!(t&&!this.isValidUriScheme(t)||this.urlMatchDoesNotHaveProtocolOrDot(e,t)||this.urlMatchDoesNotHaveAtLeastOneWordChar(e,t)||this.isInvalidProtocolRelativeMatch(n))},isValidUriScheme:function(e){var t=e.match(this.uriSchemeRegex)[0].toLowerCase();return"javascript:"!==t&&"vbscript:"!==t},urlMatchDoesNotHaveProtocolOrDot:function(e,t){return!(!e||t&&this.hasFullProtocolRegex.test(t)||-1!==e.indexOf("."))},urlMatchDoesNotHaveAtLeastOneWordChar:function(e,t){return!(!e||!t)&&!this.hasWordCharAfterProtocolRegex.test(e)},isInvalidProtocolRelativeMatch:function(e){return!!e&&this.invalidProtocolRelMatchRegex.test(e)}}),o.match.Match=o.Util.extend(Object,{constructor:function(e){o.Util.assign(this,e)},getType:o.Util.abstractMethod,getMatchedText:function(){return this.matchedText},getAnchorHref:o.Util.abstractMethod,getAnchorText:o.Util.abstractMethod}),o.match.Email=o.Util.extend(o.match.Match,{getType:function(){return"email"},getEmail:function(){return this.email},getAnchorHref:function(){return"mailto:"+this.email},getAnchorText:function(){return this.email}}),o.match.Twitter=o.Util.extend(o.match.Match,{getType:function(){return"twitter"},getTwitterHandle:function(){return this.twitterHandle},getAnchorHref:function(){return"https://twitter.com/"+this.twitterHandle},getAnchorText:function(){return"@"+this.twitterHandle}}),o.match.Url=o.Util.extend(o.match.Match,{urlPrefixRegex:/^(https?:\/\/)?(www\.)?/i,protocolRelativeRegex:/^\/\//,protocolPrepended:!1,getType:function(){return"url"},getUrl:function(){var e=this.url;return this.protocolRelativeMatch||this.protocolUrlMatch||this.protocolPrepended||(e=this.url="http://"+e,this.protocolPrepended=!0),e},getAnchorHref:function(){return this.getUrl().replace(/&amp;/g,"&")},getAnchorText:function(){var e=this.getUrl();return this.protocolRelativeMatch&&(e=this.stripProtocolRelativePrefix(e)),this.stripPrefix&&(e=this.stripUrlPrefix(e)),e=this.removeTrailingSlash(e)},stripUrlPrefix:function(e){return e.replace(this.urlPrefixRegex,"")},stripProtocolRelativePrefix:function(e){return e.replace(this.protocolRelativeRegex,"")},removeTrailingSlash:function(e){return"/"===e.charAt(e.length-1)&&(e=e.slice(0,-1)),e}}),o},void 0===(r=function(){return o.Autolinker=i()}.apply(t,[]))||(e.exports=r)},function(e,t,n){"use strict";var r=n(153),o=n(1017),i=[["code",n(1018)],["fences",n(1019),["paragraph","blockquote","list"]],["blockquote",n(1020),["paragraph","blockquote","list"]],["hr",n(1021),["paragraph","blockquote","list"]],["list",n(1022),["paragraph","blockquote"]],["footnote",n(1023),["paragraph"]],["heading",n(1024),["paragraph","blockquote"]],["lheading",n(1025)],["htmlblock",n(1026),["paragraph","blockquote"]],["table",n(1028),["paragraph"]],["deflist",n(1029),["paragraph"]],["paragraph",n(1030)]];function a(){this.ruler=new r;for(var e=0;e<i.length;e++)this.ruler.push(i[e][0],i[e][1],{alt:(i[e][2]||[]).slice()})}a.prototype.tokenize=function(e,t,n){for(var r,o=this.ruler.getRules(""),i=o.length,a=t,u=!1;a<n&&(e.line=a=e.skipEmptyLines(a),!(a>=n))&&!(e.tShift[a]<e.blkIndent);){for(r=0;r<i&&!o[r](e,a,n,!1);r++);if(e.tight=!u,e.isEmpty(e.line-1)&&(u=!0),(a=e.line)<n&&e.isEmpty(a)){if(u=!0,++a<n&&"list"===e.parentType&&e.isEmpty(a))break;e.line=a}}};var u=/[\n\t]/g,s=/\r[\n\u0085]|[\u2424\u2028\u0085]/g,l=/\u00a0/g;a.prototype.parse=function(e,t,n,r){var i,a=0,c=0;if(!e)return[];(e=(e=e.replace(l," ")).replace(s,"\n")).indexOf("\t")>=0&&(e=e.replace(u,function(t,n){var r;return 10===e.charCodeAt(n)?(a=n+1,c=0,t):(r=" ".slice((n-a-c)%4),c=n-a+1,r)})),i=new o(e,this,t,n,r),this.tokenize(i,i.line,i.lineMax)},e.exports=a},function(e,t,n){"use strict";function r(e,t,n,r,o){var i,a,u,s,l,c,f;for(this.src=e,this.parser=t,this.options=n,this.env=r,this.tokens=o,this.bMarks=[],this.eMarks=[],this.tShift=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",c=0,f=!1,u=s=c=0,l=(a=this.src).length;s<l;s++){if(i=a.charCodeAt(s),!f){if(32===i){c++;continue}f=!0}10!==i&&s!==l-1||(10!==i&&s++,this.bMarks.push(u),this.eMarks.push(s),this.tShift.push(c),f=!1,c=0,u=s+1)}this.bMarks.push(a.length),this.eMarks.push(a.length),this.tShift.push(0),this.lineMax=this.bMarks.length-1}r.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},r.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},r.prototype.skipSpaces=function(e){for(var t=this.src.length;e<t&&32===this.src.charCodeAt(e);e++);return e},r.prototype.skipChars=function(e,t){for(var n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},r.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},r.prototype.getLines=function(e,t,n,r){var o,i,a,u,s,l=e;if(e>=t)return"";if(l+1===t)return i=this.bMarks[l]+Math.min(this.tShift[l],n),a=r?this.eMarks[l]+1:this.eMarks[l],this.src.slice(i,a);for(u=new Array(t-e),o=0;l<t;l++,o++)(s=this.tShift[l])>n&&(s=n),s<0&&(s=0),i=this.bMarks[l]+s,a=l+1<t||r?this.eMarks[l]+1:this.eMarks[l],u[o]=this.src.slice(i,a);return u.join("")},e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,o;if(e.tShift[t]-e.blkIndent<4)return!1;for(o=r=t+1;r<n;)if(e.isEmpty(r))r++;else{if(!(e.tShift[r]-e.blkIndent>=4))break;o=++r}return e.line=r,e.tokens.push({type:"code",content:e.getLines(t,o,4+e.blkIndent,!0),block:!0,lines:[t,e.line],level:e.level}),!0}},function(e,t,n){"use strict";e.exports=function(e,t,n,r){var o,i,a,u,s,l=!1,c=e.bMarks[t]+e.tShift[t],f=e.eMarks[t];if(c+3>f)return!1;if(126!==(o=e.src.charCodeAt(c))&&96!==o)return!1;if(s=c,(i=(c=e.skipChars(c,o))-s)<3)return!1;if((a=e.src.slice(c,f).trim()).indexOf("`")>=0)return!1;if(r)return!0;for(u=t;!(++u>=n)&&!((c=s=e.bMarks[u]+e.tShift[u])<(f=e.eMarks[u])&&e.tShift[u]<e.blkIndent);)if(e.src.charCodeAt(c)===o&&!(e.tShift[u]-e.blkIndent>=4||(c=e.skipChars(c,o))-s<i||(c=e.skipSpaces(c))<f)){l=!0;break}return i=e.tShift[t],e.line=u+(l?1:0),e.tokens.push({type:"fence",params:a,content:e.getLines(t+1,u,i,!0),lines:[t,e.line],level:e.level}),!0}},function(e,t,n){"use strict";e.exports=function(e,t,n,r){var o,i,a,u,s,l,c,f,p,d,h,v=e.bMarks[t]+e.tShift[t],m=e.eMarks[t];if(v>m)return!1;if(62!==e.src.charCodeAt(v++))return!1;if(e.level>=e.options.maxNesting)return!1;if(r)return!0;for(32===e.src.charCodeAt(v)&&v++,s=e.blkIndent,e.blkIndent=0,u=[e.bMarks[t]],e.bMarks[t]=v,i=(v=v<m?e.skipSpaces(v):v)>=m,a=[e.tShift[t]],e.tShift[t]=v-e.bMarks[t],f=e.parser.ruler.getRules("blockquote"),o=t+1;o<n&&!((v=e.bMarks[o]+e.tShift[o])>=(m=e.eMarks[o]));o++)if(62!==e.src.charCodeAt(v++)){if(i)break;for(h=!1,p=0,d=f.length;p<d;p++)if(f[p](e,o,n,!0)){h=!0;break}if(h)break;u.push(e.bMarks[o]),a.push(e.tShift[o]),e.tShift[o]=-1337}else 32===e.src.charCodeAt(v)&&v++,u.push(e.bMarks[o]),e.bMarks[o]=v,i=(v=v<m?e.skipSpaces(v):v)>=m,a.push(e.tShift[o]),e.tShift[o]=v-e.bMarks[o];for(l=e.parentType,e.parentType="blockquote",e.tokens.push({type:"blockquote_open",lines:c=[t,0],level:e.level++}),e.parser.tokenize(e,t,o),e.tokens.push({type:"blockquote_close",level:--e.level}),e.parentType=l,c[1]=e.line,p=0;p<a.length;p++)e.bMarks[p+t]=u[p],e.tShift[p+t]=a[p];return e.blkIndent=s,!0}},function(e,t,n){"use strict";e.exports=function(e,t,n,r){var o,i,a,u=e.bMarks[t],s=e.eMarks[t];if((u+=e.tShift[t])>s)return!1;if(42!==(o=e.src.charCodeAt(u++))&&45!==o&&95!==o)return!1;for(i=1;u<s;){if((a=e.src.charCodeAt(u++))!==o&&32!==a)return!1;a===o&&i++}return!(i<3)&&(!!r||(e.line=t+1,e.tokens.push({type:"hr",lines:[t,e.line],level:e.level}),!0))}},function(e,t,n){"use strict";function r(e,t){var n,r,o;return(r=e.bMarks[t]+e.tShift[t])>=(o=e.eMarks[t])?-1:42!==(n=e.src.charCodeAt(r++))&&45!==n&&43!==n?-1:r<o&&32!==e.src.charCodeAt(r)?-1:r}function o(e,t){var n,r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(r+1>=o)return-1;if((n=e.src.charCodeAt(r++))<48||n>57)return-1;for(;;){if(r>=o)return-1;if(!((n=e.src.charCodeAt(r++))>=48&&n<=57)){if(41===n||46===n)break;return-1}}return r<o&&32!==e.src.charCodeAt(r)?-1:r}e.exports=function(e,t,n,i){var a,u,s,l,c,f,p,d,h,v,m,g,y,b,_,w,E,x,S,C,k,A=!0;if((d=o(e,t))>=0)g=!0;else{if(!((d=r(e,t))>=0))return!1;g=!1}if(e.level>=e.options.maxNesting)return!1;if(m=e.src.charCodeAt(d-1),i)return!0;for(b=e.tokens.length,g?(p=e.bMarks[t]+e.tShift[t],v=Number(e.src.substr(p,d-p-1)),e.tokens.push({type:"ordered_list_open",order:v,lines:w=[t,0],level:e.level++})):e.tokens.push({type:"bullet_list_open",lines:w=[t,0],level:e.level++}),a=t,_=!1,x=e.parser.ruler.getRules("list");!(!(a<n)||((h=(y=e.skipSpaces(d))>=e.eMarks[a]?1:y-d)>4&&(h=1),h<1&&(h=1),u=d-e.bMarks[a]+h,e.tokens.push({type:"list_item_open",lines:E=[t,0],level:e.level++}),l=e.blkIndent,c=e.tight,s=e.tShift[t],f=e.parentType,e.tShift[t]=y-e.bMarks[t],e.blkIndent=u,e.tight=!0,e.parentType="list",e.parser.tokenize(e,t,n,!0),e.tight&&!_||(A=!1),_=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=l,e.tShift[t]=s,e.tight=c,e.parentType=f,e.tokens.push({type:"list_item_close",level:--e.level}),a=t=e.line,E[1]=a,y=e.bMarks[t],a>=n)||e.isEmpty(a)||e.tShift[a]<e.blkIndent);){for(k=!1,S=0,C=x.length;S<C;S++)if(x[S](e,a,n,!0)){k=!0;break}if(k)break;if(g){if((d=o(e,a))<0)break}else if((d=r(e,a))<0)break;if(m!==e.src.charCodeAt(d-1))break}return e.tokens.push({type:g?"ordered_list_close":"bullet_list_close",level:--e.level}),w[1]=a,e.line=a,A&&function(e,t){var n,r,o=e.level+2;for(n=t+2,r=e.tokens.length-2;n<r;n++)e.tokens[n].level===o&&"paragraph_open"===e.tokens[n].type&&(e.tokens[n+2].tight=!0,e.tokens[n].tight=!0,n+=2)}(e,b),!0}},function(e,t,n){"use strict";e.exports=function(e,t,n,r){var o,i,a,u,s,l=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(l+4>c)return!1;if(91!==e.src.charCodeAt(l))return!1;if(94!==e.src.charCodeAt(l+1))return!1;if(e.level>=e.options.maxNesting)return!1;for(u=l+2;u<c;u++){if(32===e.src.charCodeAt(u))return!1;if(93===e.src.charCodeAt(u))break}return u!==l+2&&(!(u+1>=c||58!==e.src.charCodeAt(++u))&&(!!r||(u++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),s=e.src.slice(l+2,u-2),e.env.footnotes.refs[":"+s]=-1,e.tokens.push({type:"footnote_reference_open",label:s,level:e.level++}),o=e.bMarks[t],i=e.tShift[t],a=e.parentType,e.tShift[t]=e.skipSpaces(u)-u,e.bMarks[t]=u,e.blkIndent+=4,e.parentType="footnote",e.tShift[t]<e.blkIndent&&(e.tShift[t]+=e.blkIndent,e.bMarks[t]-=e.blkIndent),e.parser.tokenize(e,t,n,!0),e.parentType=a,e.blkIndent-=4,e.tShift[t]=i,e.bMarks[t]=o,e.tokens.push({type:"footnote_reference_close",level:--e.level}),!0)))}},function(e,t,n){"use strict";e.exports=function(e,t,n,r){var o,i,a,u=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];if(u>=s)return!1;if(35!==(o=e.src.charCodeAt(u))||u>=s)return!1;for(i=1,o=e.src.charCodeAt(++u);35===o&&u<s&&i<=6;)i++,o=e.src.charCodeAt(++u);return!(i>6||u<s&&32!==o)&&(!!r||(s=e.skipCharsBack(s,32,u),(a=e.skipCharsBack(s,35,u))>u&&32===e.src.charCodeAt(a-1)&&(s=a),e.line=t+1,e.tokens.push({type:"heading_open",hLevel:i,lines:[t,e.line],level:e.level}),u<s&&e.tokens.push({type:"inline",content:e.src.slice(u,s).trim(),level:e.level+1,lines:[t,e.line],children:[]}),e.tokens.push({type:"heading_close",hLevel:i,level:e.level}),!0))}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,o,i,a=t+1;return!(a>=n)&&(!(e.tShift[a]<e.blkIndent)&&(!(e.tShift[a]-e.blkIndent>3)&&(!((o=e.bMarks[a]+e.tShift[a])>=(i=e.eMarks[a]))&&((45===(r=e.src.charCodeAt(o))||61===r)&&(o=e.skipChars(o,r),!((o=e.skipSpaces(o))<i)&&(o=e.bMarks[t]+e.tShift[t],e.line=a+1,e.tokens.push({type:"heading_open",hLevel:61===r?1:2,lines:[t,e.line],level:e.level}),e.tokens.push({type:"inline",content:e.src.slice(o,e.eMarks[t]).trim(),level:e.level+1,lines:[t,e.line-1],children:[]}),e.tokens.push({type:"heading_close",hLevel:61===r?1:2,level:e.level}),!0))))))}},function(e,t,n){"use strict";var r=n(1027),o=/^<([a-zA-Z]{1,15})[\s\/>]/,i=/^<\/([a-zA-Z]{1,15})[\s>]/;e.exports=function(e,t,n,a){var u,s,l,c=e.bMarks[t],f=e.eMarks[t],p=e.tShift[t];if(c+=p,!e.options.html)return!1;if(p>3||c+2>=f)return!1;if(60!==e.src.charCodeAt(c))return!1;if(33===(u=e.src.charCodeAt(c+1))||63===u){if(a)return!0}else{if(47!==u&&!function(e){var t=32|e;return t>=97&&t<=122}(u))return!1;if(47===u){if(!(s=e.src.slice(c,f).match(i)))return!1}else if(!(s=e.src.slice(c,f).match(o)))return!1;if(!0!==r[s[1].toLowerCase()])return!1;if(a)return!0}for(l=t+1;l<e.lineMax&&!e.isEmpty(l);)l++;return e.line=l,e.tokens.push({type:"htmlblock",level:e.level,lines:[t,e.line],content:e.getLines(t,l,0,!0)}),!0}},function(e,t,n){"use strict";var r={};["article","aside","button","blockquote","body","canvas","caption","col","colgroup","dd","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","iframe","li","map","object","ol","output","p","pre","progress","script","section","style","table","tbody","td","textarea","tfoot","th","tr","thead","ul","video"].forEach(function(e){r[e]=!0}),e.exports=r},function(e,t,n){"use strict";function r(e,t){var n=e.bMarks[t]+e.blkIndent,r=e.eMarks[t];return e.src.substr(n,r-n)}e.exports=function(e,t,n,o){var i,a,u,s,l,c,f,p,d,h,v;if(t+2>n)return!1;if(l=t+1,e.tShift[l]<e.blkIndent)return!1;if((u=e.bMarks[l]+e.tShift[l])>=e.eMarks[l])return!1;if(124!==(i=e.src.charCodeAt(u))&&45!==i&&58!==i)return!1;if(a=r(e,t+1),!/^[-:| ]+$/.test(a))return!1;if((c=a.split("|"))<=2)return!1;for(p=[],s=0;s<c.length;s++){if(!(d=c[s].trim())){if(0===s||s===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(d))return!1;58===d.charCodeAt(d.length-1)?p.push(58===d.charCodeAt(0)?"center":"right"):58===d.charCodeAt(0)?p.push("left"):p.push("")}if(-1===(a=r(e,t).trim()).indexOf("|"))return!1;if(c=a.replace(/^\||\|$/g,"").split("|"),p.length!==c.length)return!1;if(o)return!0;for(e.tokens.push({type:"table_open",lines:h=[t,0],level:e.level++}),e.tokens.push({type:"thead_open",lines:[t,t+1],level:e.level++}),e.tokens.push({type:"tr_open",lines:[t,t+1],level:e.level++}),s=0;s<c.length;s++)e.tokens.push({type:"th_open",align:p[s],lines:[t,t+1],level:e.level++}),e.tokens.push({type:"inline",content:c[s].trim(),lines:[t,t+1],level:e.level,children:[]}),e.tokens.push({type:"th_close",level:--e.level});for(e.tokens.push({type:"tr_close",level:--e.level}),e.tokens.push({type:"thead_close",level:--e.level}),e.tokens.push({type:"tbody_open",lines:v=[t+2,0],level:e.level++}),l=t+2;l<n&&!(e.tShift[l]<e.blkIndent)&&-1!==(a=r(e,l).trim()).indexOf("|");l++){for(c=a.replace(/^\||\|$/g,"").split("|"),e.tokens.push({type:"tr_open",level:e.level++}),s=0;s<c.length;s++)e.tokens.push({type:"td_open",align:p[s],level:e.level++}),f=c[s].substring(124===c[s].charCodeAt(0)?1:0,124===c[s].charCodeAt(c[s].length-1)?c[s].length-1:c[s].length).trim(),e.tokens.push({type:"inline",content:f,level:e.level,children:[]}),e.tokens.push({type:"td_close",level:--e.level});e.tokens.push({type:"tr_close",level:--e.level})}return e.tokens.push({type:"tbody_close",level:--e.level}),e.tokens.push({type:"table_close",level:--e.level}),h[1]=v[1]=l,e.line=l,!0}},function(e,t,n){"use strict";function r(e,t){var n,r,o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];return o>=i?-1:126!==(r=e.src.charCodeAt(o++))&&58!==r?-1:o===(n=e.skipSpaces(o))?-1:n>=i?-1:n}e.exports=function(e,t,n,o){var i,a,u,s,l,c,f,p,d,h,v,m,g,y;if(o)return!(e.ddIndent<0)&&r(e,t)>=0;if(f=t+1,e.isEmpty(f)&&++f>n)return!1;if(e.tShift[f]<e.blkIndent)return!1;if((i=r(e,f))<0)return!1;if(e.level>=e.options.maxNesting)return!1;c=e.tokens.length,e.tokens.push({type:"dl_open",lines:l=[t,0],level:e.level++}),u=t,a=f;e:for(;;){for(y=!0,g=!1,e.tokens.push({type:"dt_open",lines:[u,u],level:e.level++}),e.tokens.push({type:"inline",content:e.getLines(u,u+1,e.blkIndent,!1).trim(),level:e.level+1,lines:[u,u],children:[]}),e.tokens.push({type:"dt_close",level:--e.level});;){if(e.tokens.push({type:"dd_open",lines:s=[f,0],level:e.level++}),m=e.tight,d=e.ddIndent,p=e.blkIndent,v=e.tShift[a],h=e.parentType,e.blkIndent=e.ddIndent=e.tShift[a]+2,e.tShift[a]=i-e.bMarks[a],e.tight=!0,e.parentType="deflist",e.parser.tokenize(e,a,n,!0),e.tight&&!g||(y=!1),g=e.line-a>1&&e.isEmpty(e.line-1),e.tShift[a]=v,e.tight=m,e.parentType=h,e.blkIndent=p,e.ddIndent=d,e.tokens.push({type:"dd_close",level:--e.level}),s[1]=f=e.line,f>=n)break e;if(e.tShift[f]<e.blkIndent)break e;if((i=r(e,f))<0)break;a=f}if(f>=n)break;if(u=f,e.isEmpty(u))break;if(e.tShift[u]<e.blkIndent)break;if((a=u+1)>=n)break;if(e.isEmpty(a)&&a++,a>=n)break;if(e.tShift[a]<e.blkIndent)break;if((i=r(e,a))<0)break}return e.tokens.push({type:"dl_close",level:--e.level}),l[1]=f,e.line=f,y&&function(e,t){var n,r,o=e.level+2;for(n=t+2,r=e.tokens.length-2;n<r;n++)e.tokens[n].level===o&&"paragraph_open"===e.tokens[n].type&&(e.tokens[n+2].tight=!0,e.tokens[n].tight=!0,n+=2)}(e,c),!0}},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,o,i,a,u,s=t+1;if(s<(n=e.lineMax)&&!e.isEmpty(s))for(u=e.parser.ruler.getRules("paragraph");s<n&&!e.isEmpty(s);s++)if(!(e.tShift[s]-e.blkIndent>3)){for(o=!1,i=0,a=u.length;i<a;i++)if(u[i](e,s,n,!0)){o=!0;break}if(o)break}return r=e.getLines(t,s,e.blkIndent,!1).trim(),e.line=s,r.length&&(e.tokens.push({type:"paragraph_open",tight:!1,lines:[t,e.line],level:e.level}),e.tokens.push({type:"inline",content:r,level:e.level+1,lines:[t,e.line],children:[]}),e.tokens.push({type:"paragraph_close",tight:!1,level:e.level})),!0}},function(e,t,n){"use strict";var r=n(153),o=n(236),i=n(27),a=[["text",n(1032)],["newline",n(1033)],["escape",n(1034)],["backticks",n(1035)],["del",n(1036)],["ins",n(1037)],["mark",n(1038)],["emphasis",n(1039)],["sub",n(1040)],["sup",n(1041)],["links",n(1042)],["footnote_inline",n(1043)],["footnote_ref",n(1044)],["autolink",n(1045)],["htmltag",n(1047)],["entity",n(1049)]];function u(){this.ruler=new r;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1]);this.validateLink=s}function s(e){var t=e.trim().toLowerCase();return-1===(t=i.replaceEntities(t)).indexOf(":")||-1===["vbscript","javascript","file","data"].indexOf(t.split(":")[0])}u.prototype.skipToken=function(e){var t,n,r=this.ruler.getRules(""),o=r.length,i=e.pos;if((n=e.cacheGet(i))>0)e.pos=n;else{for(t=0;t<o;t++)if(r[t](e,!0))return void e.cacheSet(i,e.pos);e.pos++,e.cacheSet(i,e.pos)}},u.prototype.tokenize=function(e){for(var t,n,r=this.ruler.getRules(""),o=r.length,i=e.posMax;e.pos<i;){for(n=0;n<o&&!(t=r[n](e,!1));n++);if(t){if(e.pos>=i)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},u.prototype.parse=function(e,t,n,r){var i=new o(e,this,t,n,r);this.tokenize(i)},e.exports=u},function(e,t,n){"use strict";function r(e){switch(e){case 10:case 92:case 96:case 42:case 95:case 94:case 91:case 93:case 33:case 38:case 60:case 62:case 123:case 125:case 36:case 37:case 64:case 126:case 43:case 61:case 58:return!0;default:return!1}}e.exports=function(e,t){for(var n=e.pos;n<e.posMax&&!r(e.src.charCodeAt(n));)n++;return n!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,o=e.pos;if(10!==e.src.charCodeAt(o))return!1;if(n=e.pending.length-1,r=e.posMax,!t)if(n>=0&&32===e.pending.charCodeAt(n))if(n>=1&&32===e.pending.charCodeAt(n-1)){for(var i=n-2;i>=0;i--)if(32!==e.pending.charCodeAt(i)){e.pending=e.pending.substring(0,i+1);break}e.push({type:"hardbreak",level:e.level})}else e.pending=e.pending.slice(0,-1),e.push({type:"softbreak",level:e.level});else e.push({type:"softbreak",level:e.level});for(o++;o<r&&32===e.src.charCodeAt(o);)o++;return e.pos=o,!0}},function(e,t,n){"use strict";for(var r=[],o=0;o<256;o++)r.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){r[e.charCodeAt(0)]=1}),e.exports=function(e,t){var n,o=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(++o<i){if((n=e.src.charCodeAt(o))<256&&0!==r[n])return t||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===n){for(t||e.push({type:"hardbreak",level:e.level}),o++;o<i&&32===e.src.charCodeAt(o);)o++;return e.pos=o,!0}}return t||(e.pending+="\\"),e.pos++,!0}},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,o,i,a,u=e.pos;if(96!==e.src.charCodeAt(u))return!1;for(n=u,u++,r=e.posMax;u<r&&96===e.src.charCodeAt(u);)u++;for(o=e.src.slice(n,u),i=a=u;-1!==(i=e.src.indexOf("`",a));){for(a=i+1;a<r&&96===e.src.charCodeAt(a);)a++;if(a-i===o.length)return t||e.push({type:"code",content:e.src.slice(u,i).replace(/[ \n]+/g," ").trim(),block:!1,level:e.level}),e.pos=a,!0}return t||(e.pending+=o),e.pos+=o.length,!0}},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,o,i,a,u=e.posMax,s=e.pos;if(126!==e.src.charCodeAt(s))return!1;if(t)return!1;if(s+4>=u)return!1;if(126!==e.src.charCodeAt(s+1))return!1;if(e.level>=e.options.maxNesting)return!1;if(i=s>0?e.src.charCodeAt(s-1):-1,a=e.src.charCodeAt(s+2),126===i)return!1;if(126===a)return!1;if(32===a||10===a)return!1;for(r=s+2;r<u&&126===e.src.charCodeAt(r);)r++;if(r>s+3)return e.pos+=r-s,t||(e.pending+=e.src.slice(s,r)),!0;for(e.pos=s+2,o=1;e.pos+1<u;){if(126===e.src.charCodeAt(e.pos)&&126===e.src.charCodeAt(e.pos+1)&&(i=e.src.charCodeAt(e.pos-1),126!==(a=e.pos+2<u?e.src.charCodeAt(e.pos+2):-1)&&126!==i&&(32!==i&&10!==i?o--:32!==a&&10!==a&&o++,o<=0))){n=!0;break}e.parser.skipToken(e)}return n?(e.posMax=e.pos,e.pos=s+2,t||(e.push({type:"del_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"del_close",level:--e.level})),e.pos=e.posMax+2,e.posMax=u,!0):(e.pos=s,!1)}},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,o,i,a,u=e.posMax,s=e.pos;if(43!==e.src.charCodeAt(s))return!1;if(t)return!1;if(s+4>=u)return!1;if(43!==e.src.charCodeAt(s+1))return!1;if(e.level>=e.options.maxNesting)return!1;if(i=s>0?e.src.charCodeAt(s-1):-1,a=e.src.charCodeAt(s+2),43===i)return!1;if(43===a)return!1;if(32===a||10===a)return!1;for(r=s+2;r<u&&43===e.src.charCodeAt(r);)r++;if(r!==s+2)return e.pos+=r-s,t||(e.pending+=e.src.slice(s,r)),!0;for(e.pos=s+2,o=1;e.pos+1<u;){if(43===e.src.charCodeAt(e.pos)&&43===e.src.charCodeAt(e.pos+1)&&(i=e.src.charCodeAt(e.pos-1),43!==(a=e.pos+2<u?e.src.charCodeAt(e.pos+2):-1)&&43!==i&&(32!==i&&10!==i?o--:32!==a&&10!==a&&o++,o<=0))){n=!0;break}e.parser.skipToken(e)}return n?(e.posMax=e.pos,e.pos=s+2,t||(e.push({type:"ins_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"ins_close",level:--e.level})),e.pos=e.posMax+2,e.posMax=u,!0):(e.pos=s,!1)}},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,o,i,a,u=e.posMax,s=e.pos;if(61!==e.src.charCodeAt(s))return!1;if(t)return!1;if(s+4>=u)return!1;if(61!==e.src.charCodeAt(s+1))return!1;if(e.level>=e.options.maxNesting)return!1;if(i=s>0?e.src.charCodeAt(s-1):-1,a=e.src.charCodeAt(s+2),61===i)return!1;if(61===a)return!1;if(32===a||10===a)return!1;for(r=s+2;r<u&&61===e.src.charCodeAt(r);)r++;if(r!==s+2)return e.pos+=r-s,t||(e.pending+=e.src.slice(s,r)),!0;for(e.pos=s+2,o=1;e.pos+1<u;){if(61===e.src.charCodeAt(e.pos)&&61===e.src.charCodeAt(e.pos+1)&&(i=e.src.charCodeAt(e.pos-1),61!==(a=e.pos+2<u?e.src.charCodeAt(e.pos+2):-1)&&61!==i&&(32!==i&&10!==i?o--:32!==a&&10!==a&&o++,o<=0))){n=!0;break}e.parser.skipToken(e)}return n?(e.posMax=e.pos,e.pos=s+2,t||(e.push({type:"mark_open",level:e.level++}),e.parser.tokenize(e),e.push({type:"mark_close",level:--e.level})),e.pos=e.posMax+2,e.posMax=u,!0):(e.pos=s,!1)}},function(e,t,n){"use strict";function r(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122}function o(e,t){var n,o,i,a=t,u=!0,s=!0,l=e.posMax,c=e.src.charCodeAt(t);for(n=t>0?e.src.charCodeAt(t-1):-1;a<l&&e.src.charCodeAt(a)===c;)a++;return a>=l&&(u=!1),(i=a-t)>=4?u=s=!1:(32!==(o=a<l?e.src.charCodeAt(a):-1)&&10!==o||(u=!1),32!==n&&10!==n||(s=!1),95===c&&(r(n)&&(u=!1),r(o)&&(s=!1))),{can_open:u,can_close:s,delims:i}}e.exports=function(e,t){var n,r,i,a,u,s,l,c=e.posMax,f=e.pos,p=e.src.charCodeAt(f);if(95!==p&&42!==p)return!1;if(t)return!1;if(n=(l=o(e,f)).delims,!l.can_open)return e.pos+=n,t||(e.pending+=e.src.slice(f,e.pos)),!0;if(e.level>=e.options.maxNesting)return!1;for(e.pos=f+n,s=[n];e.pos<c;)if(e.src.charCodeAt(e.pos)!==p)e.parser.skipToken(e);else{if(r=(l=o(e,e.pos)).delims,l.can_close){for(a=s.pop(),u=r;a!==u;){if(u<a){s.push(a-u);break}if(u-=a,0===s.length)break;e.pos+=a,a=s.pop()}if(0===s.length){n=a,i=!0;break}e.pos+=r;continue}l.can_open&&s.push(r),e.pos+=r}return i?(e.posMax=e.pos,e.pos=f+n,t||(2!==n&&3!==n||e.push({type:"strong_open",level:e.level++}),1!==n&&3!==n||e.push({type:"em_open",level:e.level++}),e.parser.tokenize(e),1!==n&&3!==n||e.push({type:"em_close",level:--e.level}),2!==n&&3!==n||e.push({type:"strong_close",level:--e.level})),e.pos=e.posMax+n,e.posMax=c,!0):(e.pos=f,!1)}},function(e,t,n){"use strict";var r=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;e.exports=function(e,t){var n,o,i=e.posMax,a=e.pos;if(126!==e.src.charCodeAt(a))return!1;if(t)return!1;if(a+2>=i)return!1;if(e.level>=e.options.maxNesting)return!1;for(e.pos=a+1;e.pos<i;){if(126===e.src.charCodeAt(e.pos)){n=!0;break}e.parser.skipToken(e)}return n&&a+1!==e.pos?(o=e.src.slice(a+1,e.pos)).match(/(^|[^\\])(\\\\)*\s/)?(e.pos=a,!1):(e.posMax=e.pos,e.pos=a+1,t||e.push({type:"sub",level:e.level,content:o.replace(r,"$1")}),e.pos=e.posMax+1,e.posMax=i,!0):(e.pos=a,!1)}},function(e,t,n){"use strict";var r=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;e.exports=function(e,t){var n,o,i=e.posMax,a=e.pos;if(94!==e.src.charCodeAt(a))return!1;if(t)return!1;if(a+2>=i)return!1;if(e.level>=e.options.maxNesting)return!1;for(e.pos=a+1;e.pos<i;){if(94===e.src.charCodeAt(e.pos)){n=!0;break}e.parser.skipToken(e)}return n&&a+1!==e.pos?(o=e.src.slice(a+1,e.pos)).match(/(^|[^\\])(\\\\)*\s/)?(e.pos=a,!1):(e.posMax=e.pos,e.pos=a+1,t||e.push({type:"sup",level:e.level,content:o.replace(r,"$1")}),e.pos=e.posMax+1,e.posMax=i,!0):(e.pos=a,!1)}},function(e,t,n){"use strict";var r=n(154),o=n(418),i=n(420),a=n(421);e.exports=function(e,t){var n,u,s,l,c,f,p,d,h=!1,v=e.pos,m=e.posMax,g=e.pos,y=e.src.charCodeAt(g);if(33===y&&(h=!0,y=e.src.charCodeAt(++g)),91!==y)return!1;if(e.level>=e.options.maxNesting)return!1;if(n=g+1,(u=r(e,g))<0)return!1;if((f=u+1)<m&&40===e.src.charCodeAt(f)){for(f++;f<m&&(32===(d=e.src.charCodeAt(f))||10===d);f++);if(f>=m)return!1;for(g=f,o(e,f)?(l=e.linkContent,f=e.pos):l="",g=f;f<m&&(32===(d=e.src.charCodeAt(f))||10===d);f++);if(f<m&&g!==f&&i(e,f))for(c=e.linkContent,f=e.pos;f<m&&(32===(d=e.src.charCodeAt(f))||10===d);f++);else c="";if(f>=m||41!==e.src.charCodeAt(f))return e.pos=v,!1;f++}else{if(e.linkLevel>0)return!1;for(;f<m&&(32===(d=e.src.charCodeAt(f))||10===d);f++);if(f<m&&91===e.src.charCodeAt(f)&&(g=f+1,(f=r(e,f))>=0?s=e.src.slice(g,f++):f=g-1),s||(void 0===s&&(f=u+1),s=e.src.slice(n,u)),!(p=e.env.references[a(s)]))return e.pos=v,!1;l=p.href,c=p.title}return t||(e.pos=n,e.posMax=u,h?e.push({type:"image",src:l,title:c,alt:e.src.substr(n,u-n),level:e.level}):(e.push({type:"link_open",href:l,title:c,level:e.level++}),e.linkLevel++,e.parser.tokenize(e),e.linkLevel--,e.push({type:"link_close",level:--e.level}))),e.pos=f,e.posMax=m,!0}},function(e,t,n){"use strict";var r=n(154);e.exports=function(e,t){var n,o,i,a,u=e.posMax,s=e.pos;return!(s+2>=u)&&(94===e.src.charCodeAt(s)&&(91===e.src.charCodeAt(s+1)&&(!(e.level>=e.options.maxNesting)&&(n=s+2,!((o=r(e,s+1))<0)&&(t||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),i=e.env.footnotes.list.length,e.pos=n,e.posMax=o,e.push({type:"footnote_ref",id:i,level:e.level}),e.linkLevel++,a=e.tokens.length,e.parser.tokenize(e),e.env.footnotes.list[i]={tokens:e.tokens.splice(a)},e.linkLevel--),e.pos=o+1,e.posMax=u,!0)))))}},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,o,i,a=e.posMax,u=e.pos;if(u+3>a)return!1;if(!e.env.footnotes||!e.env.footnotes.refs)return!1;if(91!==e.src.charCodeAt(u))return!1;if(94!==e.src.charCodeAt(u+1))return!1;if(e.level>=e.options.maxNesting)return!1;for(r=u+2;r<a;r++){if(32===e.src.charCodeAt(r))return!1;if(10===e.src.charCodeAt(r))return!1;if(93===e.src.charCodeAt(r))break}return r!==u+2&&(!(r>=a)&&(r++,n=e.src.slice(u+2,r-1),void 0!==e.env.footnotes.refs[":"+n]&&(t||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+n]<0?(o=e.env.footnotes.list.length,e.env.footnotes.list[o]={label:n,count:0},e.env.footnotes.refs[":"+n]=o):o=e.env.footnotes.refs[":"+n],i=e.env.footnotes.list[o].count,e.env.footnotes.list[o].count++,e.push({type:"footnote_ref",id:o,subId:i,level:e.level})),e.pos=r,e.posMax=a,!0)))}},function(e,t,n){"use strict";var r=n(1046),o=n(419),i=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,a=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;e.exports=function(e,t){var n,u,s,l,c,f=e.pos;return 60===e.src.charCodeAt(f)&&(!((n=e.src.slice(f)).indexOf(">")<0)&&((u=n.match(a))?!(r.indexOf(u[1].toLowerCase())<0)&&(l=u[0].slice(1,-1),c=o(l),!!e.parser.validateLink(l)&&(t||(e.push({type:"link_open",href:c,level:e.level}),e.push({type:"text",content:l,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=u[0].length,!0)):!!(s=n.match(i))&&(l=s[0].slice(1,-1),c=o("mailto:"+l),!!e.parser.validateLink(c)&&(t||(e.push({type:"link_open",href:c,level:e.level}),e.push({type:"text",content:l,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=s[0].length,!0))))}},function(e,t,n){"use strict";e.exports=["coap","doi","javascript","aaa","aaas","about","acap","cap","cid","crid","data","dav","dict","dns","file","ftp","geo","go","gopher","h323","http","https","iax","icap","im","imap","info","ipp","iris","iris.beep","iris.xpc","iris.xpcs","iris.lwz","ldap","mailto","mid","msrp","msrps","mtqp","mupdate","news","nfs","ni","nih","nntp","opaquelocktoken","pop","pres","rtsp","service","session","shttp","sieve","sip","sips","sms","snmp","soap.beep","soap.beeps","tag","tel","telnet","tftp","thismessage","tn3270","tip","tv","urn","vemmi","ws","wss","xcon","xcon-userid","xmlrpc.beep","xmlrpc.beeps","xmpp","z39.50r","z39.50s","adiumxtra","afp","afs","aim","apt","attachment","aw","beshare","bitcoin","bolo","callto","chrome","chrome-extension","com-eventbrite-attendee","content","cvs","dlna-playsingle","dlna-playcontainer","dtn","dvb","ed2k","facetime","feed","finger","fish","gg","git","gizmoproject","gtalk","hcp","icon","ipn","irc","irc6","ircs","itms","jar","jms","keyparc","lastfm","ldaps","magnet","maps","market","message","mms","ms-help","msnim","mumble","mvn","notes","oid","palm","paparazzi","platform","proxy","psyc","query","res","resource","rmi","rsync","rtmp","secondlife","sftp","sgn","skype","smb","soldat","spotify","ssh","steam","svn","teamspeak","things","udp","unreal","ut2004","ventrilo","view-source","webcal","wtai","wyciwyg","xfire","xri","ymsgr"]},function(e,t,n){"use strict";var r=n(1048).HTML_TAG_RE;e.exports=function(e,t){var n,o,i,a=e.pos;return!!e.options.html&&(i=e.posMax,!(60!==e.src.charCodeAt(a)||a+2>=i)&&(!(33!==(n=e.src.charCodeAt(a+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(o=e.src.slice(a).match(r))&&(t||e.push({type:"htmltag",content:e.src.slice(a,a+o[0].length),level:e.level}),e.pos+=o[0].length,!0))))}},function(e,t,n){"use strict";function r(e,t){return e=e.source,t=t||"",function n(r,o){return r?(o=o.source||o,e=e.replace(r,o),n):new RegExp(e,t)}}var o=r(/(?:unquoted|single_quoted|double_quoted)/)("unquoted",/[^"'=<>`\x00-\x20]+/)("single_quoted",/'[^']*'/)("double_quoted",/"[^"]*"/)(),i=r(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name",/[a-zA-Z_:][a-zA-Z0-9:._-]*/)("attr_value",o)(),a=r(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute",i)(),u=r(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag",a)("close_tag",/<\/[A-Za-z][A-Za-z0-9]*\s*>/)("comment",/<!--([^-]+|[-][^-]+)*-->/)("processing",/<[?].*?[?]>/)("declaration",/<![A-Z]+\s+[^>]*>/)("cdata",/<!\[CDATA\[([^\]]+|\][^\]]|\]\][^>])*\]\]>/)();e.exports.HTML_TAG_RE=u},function(e,t,n){"use strict";var r=n(417),o=n(27).has,i=n(27).isValidEntityCode,a=n(27).fromCodePoint,u=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,s=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,l,c=e.pos,f=e.posMax;if(38!==e.src.charCodeAt(c))return!1;if(c+1<f)if(35===e.src.charCodeAt(c+1)){if(l=e.src.slice(c).match(u))return t||(n="x"===l[1][0].toLowerCase()?parseInt(l[1].slice(1),16):parseInt(l[1],10),e.pending+=i(n)?a(n):a(65533)),e.pos+=l[0].length,!0}else if((l=e.src.slice(c).match(s))&&o(r,l[1]))return t||(e.pending+=r[l[1]]),e.pos+=l[0].length,!0;return t||(e.pending+="&"),e.pos++,!0}},function(e,t,n){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","replacements","linkify","smartquotes","references","abbr2","footnote_tail"]},block:{rules:["blockquote","code","fences","footnote","heading","hr","htmlblock","lheading","list","paragraph","table"]},inline:{rules:["autolink","backticks","del","emphasis","entity","escape","footnote_ref","htmltag","links","newline","text"]}}}},function(e,t,n){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{},block:{},inline:{}}}},function(e,t,n){"use strict";e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","abbr2"]},block:{rules:["blockquote","code","fences","heading","hr","htmlblock","lheading","list","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","htmltag","links","newline","text"]}}}},function(e,t,n){var r;r=function(){"use strict";var e=["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"],t=["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"],n=["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"],r=["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmuliscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mpspace","msqrt","mystyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"],o=["#text"],i=["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","coords","crossorigin","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","integrity","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns"],a=["accent-height","accumulate","additivive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"],u=["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"],s=["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"];function l(e,t){for(var n=t.length;n--;)"string"==typeof t[n]&&(t[n]=t[n].toLowerCase()),e[t[n]]=!0;return e}function c(e){var t={},n=void 0;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}var f=/\{\{[\s\S]*|[\s\S]*\}\}/gm,p=/<%[\s\S]*|[\s\S]*%>/gm,d=/^data-[\-\w.\u00B7-\uFFFF]/,h=/^aria-[\-\w]+$/,v=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,m=/^(?:\w+script|data):/i,g=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function b(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var _=function(){return"undefined"==typeof window?null:window};return function w(){var E=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_(),x=function(e){return w(e)};if(x.version="1.0.4",x.removed=[],!E||!E.document||9!==E.document.nodeType)return x.isSupported=!1,x;var S=E.document,C=!1,k=!1,A=E.document,O=E.DocumentFragment,P=E.HTMLTemplateElement,T=E.Node,M=E.NodeFilter,I=E.NamedNodeMap,j=void 0===I?E.NamedNodeMap||E.MozNamedAttrMap:I,N=E.Text,R=E.Comment,D=E.DOMParser,L=E.XMLHttpRequest,U=void 0===L?E.XMLHttpRequest:L,q=E.encodeURI,F=void 0===q?E.encodeURI:q;if("function"==typeof P){var z=A.createElement("template");z.content&&z.content.ownerDocument&&(A=z.content.ownerDocument)}var B=A,V=B.implementation,H=B.createNodeIterator,W=B.getElementsByTagName,J=B.createDocumentFragment,Y=S.importNode,K={};x.isSupported=V&&void 0!==V.createHTMLDocument&&9!==A.documentMode;var G=f,$=p,Z=d,X=h,Q=m,ee=g,te=v,ne=null,re=l({},[].concat(b(e),b(t),b(n),b(r),b(o))),oe=null,ie=l({},[].concat(b(i),b(a),b(u),b(s))),ae=null,ue=null,se=!0,le=!0,ce=!1,fe=!1,pe=!1,de=!1,he=!1,ve=!1,me=!1,ge=!1,ye=!1,be=!0,_e=!0,we={},Ee=l({},["audio","head","math","script","style","template","svg","video"]),xe=l({},["audio","video","img","source","image"]),Se=l({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ce=null,ke=A.createElement("form"),Ae=function(f){"object"!==(void 0===f?"undefined":y(f))&&(f={}),ne="ALLOWED_TAGS"in f?l({},f.ALLOWED_TAGS):re,oe="ALLOWED_ATTR"in f?l({},f.ALLOWED_ATTR):ie,ae="FORBID_TAGS"in f?l({},f.FORBID_TAGS):{},ue="FORBID_ATTR"in f?l({},f.FORBID_ATTR):{},we="USE_PROFILES"in f&&f.USE_PROFILES,se=!1!==f.ALLOW_ARIA_ATTR,le=!1!==f.ALLOW_DATA_ATTR,ce=f.ALLOW_UNKNOWN_PROTOCOLS||!1,fe=f.SAFE_FOR_JQUERY||!1,pe=f.SAFE_FOR_TEMPLATES||!1,de=f.WHOLE_DOCUMENT||!1,me=f.RETURN_DOM||!1,ge=f.RETURN_DOM_FRAGMENT||!1,ye=f.RETURN_DOM_IMPORT||!1,ve=f.FORCE_BODY||!1,be=!1!==f.SANITIZE_DOM,_e=!1!==f.KEEP_CONTENT,te=f.ALLOWED_URI_REGEXP||te,pe&&(le=!1),ge&&(me=!0),we&&(ne=l({},[].concat(b(o))),oe=[],!0===we.html&&(l(ne,e),l(oe,i)),!0===we.svg&&(l(ne,t),l(oe,a),l(oe,s)),!0===we.svgFilters&&(l(ne,n),l(oe,a),l(oe,s)),!0===we.mathMl&&(l(ne,r),l(oe,u),l(oe,s))),f.ADD_TAGS&&(ne===re&&(ne=c(ne)),l(ne,f.ADD_TAGS)),f.ADD_ATTR&&(oe===ie&&(oe=c(oe)),l(oe,f.ADD_ATTR)),f.ADD_URI_SAFE_ATTR&&l(Se,f.ADD_URI_SAFE_ATTR),_e&&(ne["#text"]=!0),Object&&"freeze"in Object&&Object.freeze(f),Ce=f},Oe=function(e){x.removed.push({element:e});try{e.parentNode.removeChild(e)}catch(t){e.outerHTML=""}},Pe=function(e,t){try{x.removed.push({attribute:t.getAttributeNode(e),from:t})}catch(e){x.removed.push({attribute:null,from:t})}t.removeAttribute(e)},Te=function(e){var t=void 0,n=void 0;if(ve&&(e="<remove></remove>"+e),k){try{e=F(e)}catch(e){}var r=new U;r.responseType="document",r.open("GET","data:text/html;charset=utf-8,"+e,!1),r.send(null),t=r.response}if(C)try{t=(new D).parseFromString(e,"text/html")}catch(e){}return t&&t.documentElement||((n=(t=V.createHTMLDocument("")).body).parentNode.removeChild(n.parentNode.firstElementChild),n.outerHTML=e),W.call(t,de?"html":"body")[0]};x.isSupported&&function(){var e=Te('<svg><g onload="this.parentNode.remove()"></g></svg>');e.querySelector("svg")||(k=!0);try{(e=Te('<svg><p><style><img src="</style><img src=x onerror=alert(1)//">')).querySelector("svg img")&&(C=!0)}catch(e){}}();var Me=function(e){return H.call(e.ownerDocument||e,e,M.SHOW_ELEMENT|M.SHOW_COMMENT|M.SHOW_TEXT,function(){return M.FILTER_ACCEPT},!1)},Ie=function(e){return"object"===(void 0===T?"undefined":y(T))?e instanceof T:e&&"object"===(void 0===e?"undefined":y(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},je=function(e,t,n){K[e]&&K[e].forEach(function(e){e.call(x,t,n,Ce)})},Ne=function(e){var t,n=void 0;if(je("beforeSanitizeElements",e,null),!((t=e)instanceof N||t instanceof R||"string"==typeof t.nodeName&&"string"==typeof t.textContent&&"function"==typeof t.removeChild&&t.attributes instanceof j&&"function"==typeof t.removeAttribute&&"function"==typeof t.setAttribute))return Oe(e),!0;var r=e.nodeName.toLowerCase();if(je("uponSanitizeElement",e,{tagName:r,allowedTags:ne}),!ne[r]||ae[r]){if(_e&&!Ee[r]&&"function"==typeof e.insertAdjacentHTML)try{e.insertAdjacentHTML("AfterEnd",e.innerHTML)}catch(e){}return Oe(e),!0}return!fe||e.firstElementChild||e.content&&e.content.firstElementChild||!/</g.test(e.textContent)||(x.removed.push({element:e.cloneNode()}),e.innerHTML=e.textContent.replace(/</g,"&lt;")),pe&&3===e.nodeType&&(n=(n=(n=e.textContent).replace(G," ")).replace($," "),e.textContent!==n&&(x.removed.push({element:e.cloneNode()}),e.textContent=n)),je("afterSanitizeElements",e,null),!1},Re=function(e){var t=void 0,n=void 0,r=void 0,o=void 0,i=void 0,a=void 0,u=void 0;if(je("beforeSanitizeAttributes",e,null),a=e.attributes){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:oe};for(u=a.length;u--;){if(n=(t=a[u]).name,r=t.value.trim(),o=n.toLowerCase(),s.attrName=o,s.attrValue=r,s.keepAttr=!0,je("uponSanitizeAttribute",e,s),r=s.attrValue,"name"===o&&"IMG"===e.nodeName&&a.id)i=a.id,a=Array.prototype.slice.apply(a),Pe("id",e),Pe(n,e),a.indexOf(i)>u&&e.setAttribute("id",i.value);else{if("INPUT"===e.nodeName&&"type"===o&&"file"===r&&(oe[o]||!ue[o]))continue;"id"===n&&e.setAttribute(n,""),Pe(n,e)}if(s.keepAttr&&(!be||"id"!==o&&"name"!==o||!(r in A||r in ke))){if(pe&&(r=(r=r.replace(G," ")).replace($," ")),le&&Z.test(o));else if(se&&X.test(o));else{if(!oe[o]||ue[o])continue;if(Se[o]);else if(te.test(r.replace(ee,"")));else if("src"!==o&&"xlink:href"!==o||0!==r.indexOf("data:")||!xe[e.nodeName.toLowerCase()])if(ce&&!Q.test(r.replace(ee,"")));else if(r)continue}try{e.setAttribute(n,r),x.removed.pop()}catch(e){}}}je("afterSanitizeAttributes",e,null)}},De=function e(t){var n=void 0,r=Me(t);for(je("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)je("uponSanitizeShadowNode",n,null),Ne(n)||(n.content instanceof O&&e(n.content),Re(n));je("afterSanitizeShadowDOM",t,null)};return x.sanitize=function(e,t){var n=void 0,r=void 0,o=void 0,i=void 0,a=void 0;if(e||(e="\x3c!--\x3e"),"string"!=typeof e&&!Ie(e)){if("function"!=typeof e.toString)throw new TypeError("toString is not a function");if("string"!=typeof(e=e.toString()))throw new TypeError("dirty is not a string, aborting")}if(!x.isSupported){if("object"===y(E.toStaticHTML)||"function"==typeof E.toStaticHTML){if("string"==typeof e)return E.toStaticHTML(e);if(Ie(e))return E.toStaticHTML(e.outerHTML)}return e}if(he||Ae(t),x.removed=[],e instanceof T)1===(r=(n=Te("\x3c!--\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===r.nodeName?n=r:n.appendChild(r);else{if(!me&&!de&&-1===e.indexOf("<"))return e;if(!(n=Te(e)))return me?null:""}ve&&Oe(n.firstChild);for(var u=Me(n);o=u.nextNode();)3===o.nodeType&&o===i||Ne(o)||(o.content instanceof O&&De(o.content),Re(o),i=o);if(me){if(ge)for(a=J.call(n.ownerDocument);n.firstChild;)a.appendChild(n.firstChild);else a=n;return ye&&(a=Y.call(S,a,!0)),a}return de?n.outerHTML:n.innerHTML},x.setConfig=function(e){Ae(e),he=!0},x.clearConfig=function(){Ce=null,he=!1},x.addHook=function(e,t){"function"==typeof t&&(K[e]=K[e]||[],K[e].push(t))},x.removeHook=function(e){K[e]&&K[e].pop()},x.removeHooks=function(e){K[e]&&(K[e]=[])},x.removeAllHooks=function(){K={}},x}()},e.exports=r()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(2)),i=l(n(3)),a=l(n(5)),u=l(n(6)),s=l(n(0));l(n(1));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.specSelectors,n=e.getComponent,r=n("SvgAssets"),o=n("InfoContainer",!0),i=n("VersionPragmaFilter"),a=n("operations",!0),u=n("Models",!0),l=n("Row"),c=n("Col"),f=n("errors",!0),p=n("ServersContainer",!0),d=n("SchemesContainer",!0),h=n("AuthorizeBtnContainer",!0),v=n("FilterContainer",!0),m=t.isSwagger2(),g=t.isOAS3();if(!t.specStr()){var y=void 0;return y="loading"===t.loadingStatus()?s.default.createElement("div",{className:"loading"}):s.default.createElement("h4",null,"No API definition provided."),s.default.createElement("div",{className:"swagger-ui"},s.default.createElement("div",{className:"loading-container"},y))}var b=t.servers(),_=t.schemes(),w=b&&b.size,E=_&&_.size,x=!!t.securityDefinitions();return s.default.createElement("div",{className:"swagger-ui"},s.default.createElement(r,null),s.default.createElement(i,{isSwagger2:m,isOAS3:g,alsoShow:s.default.createElement(f,null)},s.default.createElement(f,null),s.default.createElement(l,{className:"information-container"},s.default.createElement(c,{mobile:12},s.default.createElement(o,null))),w||E||x?s.default.createElement("div",{className:"scheme-container"},s.default.createElement(c,{className:"schemes wrapper",mobile:12},w?s.default.createElement(p,null):null,E?s.default.createElement(d,null):null,x?s.default.createElement(h,null):null)):null,s.default.createElement(v,null),s.default.createElement(l,null,s.default.createElement(c,{mobile:12,desktop:12},s.default.createElement(a,null))),s.default.createElement(l,null,s.default.createElement(c,{mobile:12,desktop:12},s.default.createElement(u,null)))))}}]),t}(s.default.Component);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonSchema_object=t.JsonSchema_boolean=t.JsonSchema_array=t.JsonSchema_string=t.JsonSchemaForm=void 0;var r=y(n(23)),o=y(n(25)),i=y(n(4)),a=y(n(2)),u=y(n(3)),s=y(n(5)),l=y(n(6)),c=n(0),f=y(c),p=y(n(1)),d=n(7),h=y(n(113)),v=y(n(12)),m=y(n(1056)),g=n(9);function y(e){return e&&e.__esModule?e:{default:e}}p.default.func.isRequired,p.default.any,p.default.func,p.default.any,p.default.object.isRequired,p.default.object,v.default.list,p.default.bool,p.default.bool,p.default.any;var b={value:"",onChange:function(){},schema:{},keyName:"",required:!1,errors:(0,d.List)()};function _(e){return d.List.isList(e)?e:(0,d.List)()}(t.JsonSchemaForm=function(e){function t(){return(0,a.default)(this,t),(0,s.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,u.default)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.dispatchInitialValue,n=e.value,r=e.onChange;t&&r(n)}},{key:"render",value:function(){var e=this.props,t=e.schema,n=e.errors,r=e.value,i=e.onChange,a=e.getComponent,u=e.fn;t.toJS&&(t=t.toJS());var s=t,l=s.type,c=s.format,p=void 0===c?"":c,d=a(p?"JsonSchema_"+l+"_"+p:"JsonSchema_"+l)||a("JsonSchema_string");return f.default.createElement(d,(0,o.default)({},this.props,{errors:n,fn:u,getComponent:a,value:r,onChange:i,schema:t}))}}]),t}(c.Component)).defaultProps=b,(t.JsonSchema_string=function(e){function t(){var e,n,r,o;(0,a.default)(this,t);for(var u=arguments.length,l=Array(u),c=0;c<u;c++)l[c]=arguments[c];return n=r=(0,s.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(l))),r.onChange=function(e){var t="file"===r.props.schema.type?e.target.files[0]:e.target.value;r.props.onChange(t,r.props.keyName)},r.onEnumChange=function(e){return r.props.onChange(e)},o=n,(0,s.default)(r,o)}return(0,l.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=this.props,t=e.getComponent,n=e.value,r=e.schema,o=e.errors,i=e.required,a=e.description,u=r.enum;if(o=o.toJS?o.toJS():[],u){var s=t("Select");return f.default.createElement(s,{className:o.length?"invalid":"",title:o.length?o:"",allowedValues:u,value:n,allowEmptyValue:!i,onChange:this.onEnumChange})}var l="formData"===r.in&&!("FormData"in window),c=t("Input");return"file"===r.type?f.default.createElement(c,{type:"file",className:o.length?"invalid":"",title:o.length?o:"",onChange:this.onChange,disabled:l}):f.default.createElement(m.default,{type:"password"===r.format?"password":"text",className:o.length?"invalid":"",title:o.length?o:"",value:n,minLength:0,debounceTimeout:350,placeholder:a,onChange:this.onChange,disabled:l})}}]),t}(c.Component)).defaultProps=b,(t.JsonSchema_array=function(e){function t(e,n){(0,a.default)(this,t);var r=(0,s.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e,n));return r.onChange=function(){return r.props.onChange(r.state.value)},r.onItemChange=function(e,t){r.setState(function(n){return{value:n.value.set(t,e)}},r.onChange)},r.removeItem=function(e){r.setState(function(t){return{value:t.value.remove(e)}},r.onChange)},r.addItem=function(){r.setState(function(e){return e.value=_(e.value),{value:e.value.push("")}},r.onChange)},r.onEnumChange=function(e){r.setState(function(){return{value:e}},r.onChange)},r.state={value:_(e.value)},r}return(0,l.default)(t,e),(0,u.default)(t,[{key:"componentWillReceiveProps",value:function(e){e.value!==this.state.value&&this.setState({value:e.value})}},{key:"render",value:function(){var e=this,t=this.props,n=t.getComponent,o=t.required,i=t.schema,a=t.errors,u=t.fn;a=a.toJS?a.toJS():[];var s=u.inferSchema(i.items),l=n("JsonSchemaForm"),c=n("Button"),p=s.enum,d=this.state.value;if(p){var h=n("Select");return f.default.createElement(h,{className:a.length?"invalid":"",title:a.length?a:"",multiple:!0,value:d,allowedValues:p,allowEmptyValue:!o,onChange:this.onEnumChange})}return f.default.createElement("div",null,!d||!d.count||d.count()<1?null:d.map(function(t,o){var i=(0,r.default)({},s);if(a.length){var p=a.filter(function(e){return e.index===o});p.length&&(a=[p[0].error+o])}return f.default.createElement("div",{key:o,className:"json-schema-form-item"},f.default.createElement(l,{fn:u,getComponent:n,value:t,onChange:function(t){return e.onItemChange(t,o)},schema:i}),f.default.createElement(c,{className:"btn btn-sm json-schema-form-item-remove",onClick:function(){return e.removeItem(o)}}," - "))}).toArray(),f.default.createElement(c,{className:"btn btn-sm json-schema-form-item-add "+(a.length?"invalid":null),onClick:this.addItem}," Add item "))}}]),t}(c.PureComponent)).defaultProps=b,(t.JsonSchema_boolean=function(e){function t(){var e,n,r,o;(0,a.default)(this,t);for(var u=arguments.length,l=Array(u),c=0;c<u;c++)l[c]=arguments[c];return n=r=(0,s.default)(this,(e=t.__proto__||(0,i.default)(t)).call.apply(e,[this].concat(l))),r.onEnumChange=function(e){return r.props.onChange(e)},o=n,(0,s.default)(r,o)}return(0,l.default)(t,e),(0,u.default)(t,[{key:"render",value:function(){var e=this.props,t=e.getComponent,n=e.value,r=e.errors,o=e.schema,i=e.required;r=r.toJS?r.toJS():[];var a=t("Select");return f.default.createElement(a,{className:r.length?"invalid":"",title:r.length?r:"",value:String(n),allowedValues:(0,d.fromJS)(o.enum||["true","false"]),allowEmptyValue:!o.enum||!i,onChange:this.onEnumChange})}}]),t}(c.Component)).defaultProps=b,(t.JsonSchema_object=function(e){function t(){(0,a.default)(this,t);var e=(0,s.default)(this,(t.__proto__||(0,i.default)(t)).call(this));return e.resetValueToSample=function(){e.onChange((0,g.getSampleSchema)(e.props.schema))},e.onChange=function(t){e.props.onChange(t)},e.handleOnChange=function(t){var n=t.target.value;e.onChange(n)},e}return(0,l.default)(t,e),(0,u.default)(t,[{key:"componentDidMount",value:function(){!this.props.value&&this.props.schema&&this.resetValueToSample()}},{key:"render",value:function(){var e=this.props,t=e.getComponent,n=e.value,r=e.errors,o=t("TextArea");return f.default.createElement("div",null,f.default.createElement(o,{className:(0,h.default)({invalid:r.size}),title:r.size?r.join(", "):"",value:n,onChange:this.handleOnChange}))}}]),t}(c.PureComponent)).defaultProps=b},function(e,t,n){"use strict";var r=n(1057).DebounceInput;r.DebounceInput=r,e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebounceInput=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=u(n(0)),a=u(n(1058));function u(e){return e&&e.__esModule?e:{default:e}}(t.DebounceInput=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onChange=function(e){e.persist();var t=n.state.value;n.setState({value:e.target.value},function(){var o=n.state.value;o.length>=n.props.minLength?n.notify(e):t.length>o.length&&n.notify(r({},e,{target:r({},e.target,{value:""})}))})},n.onKeyDown=function(e){var t=n.props.onKeyDown;"Enter"===e.key&&n.forceNotify(e),t&&t(e)},n.onBlur=function(e){var t=n.props.onBlur;n.forceNotify(e),t&&t(e)},n.createNotifier=function(e){if(e<0)n.notify=function(){return null};else if(0===e)n.notify=n.doNotify;else{var t=(0,a.default)(function(e){n.isDebouncing=!1,n.doNotify(e)},e);n.notify=function(e){n.isDebouncing=!0,t(e)},n.flush=function(){return t.flush()},n.cancel=function(){n.isDebouncing=!1,t.cancel()}}},n.doNotify=function(){n.props.onChange.apply(void 0,arguments)},n.forceNotify=function(e){if(n.isDebouncing){n.cancel&&n.cancel();var t=n.state.value,o=n.props.minLength;t.length>=o?n.doNotify(e):n.doNotify(r({},e,{target:r({},e.target,{value:t})}))}},n.state={value:e.value||""},n.isDebouncing=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default.PureComponent),o(t,[{key:"componentWillMount",value:function(){this.createNotifier(this.props.debounceTimeout)}},{key:"componentWillReceiveProps",value:function(e){var t=e.value,n=e.debounceTimeout;this.isDebouncing||(void 0!==t&&this.state.value!==t&&this.setState({value:t}),n!==this.props.debounceTimeout&&this.createNotifier(n))}},{key:"componentWillUnmount",value:function(){this.flush&&this.flush()}},{key:"render",value:function(){var e=this.props,t=e.element,n=(e.onChange,e.value,e.minLength,e.debounceTimeout,e.forceNotifyByEnter),o=e.forceNotifyOnBlur,a=e.onKeyDown,u=e.onBlur,s=e.inputRef,l=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["element","onChange","value","minLength","debounceTimeout","forceNotifyByEnter","forceNotifyOnBlur","onKeyDown","onBlur","inputRef"]),c=void 0;c=n?{onKeyDown:this.onKeyDown}:a?{onKeyDown:a}:{};var f=void 0;f=o?{onBlur:this.onBlur}:u?{onBlur:u}:{};var p=s?{ref:s}:{};return i.default.createElement(t,r({},l,{onChange:this.onChange,value:this.state.value},c,f,p))}}]),t}()).defaultProps={element:"input",type:"text",onKeyDown:void 0,onBlur:void 0,value:void 0,minLength:0,debounceTimeout:100,forceNotifyByEnter:!0,forceNotifyOnBlur:!0,inputRef:void 0}},function(e,t,n){(function(t){var n="Expected a function",r=NaN,o="[object Symbol]",i=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof t&&t&&t.Object===Object&&t,f="object"==typeof self&&self&&self.Object===Object&&self,p=c||f||Function("return this")(),d=Object.prototype.toString,h=Math.max,v=Math.min,m=function(){return p.Date.now()};function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&d.call(e)==o}(e))return r;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=u.test(e);return n||s.test(e)?l(e.slice(2),n?2:8):a.test(e)?r:+e}e.exports=function(e,t,r){var o,i,a,u,s,l,c=0,f=!1,p=!1,d=!0;if("function"!=typeof e)throw new TypeError(n);function b(t){var n=o,r=i;return o=i=void 0,c=t,u=e.apply(r,n)}function _(e){var n=e-l;return void 0===l||n>=t||n<0||p&&e-c>=a}function w(){var e=m();if(_(e))return E(e);s=setTimeout(w,function(e){var n=t-(e-l);return p?v(n,a-(e-c)):n}(e))}function E(e){return s=void 0,d&&o?b(e):(o=i=void 0,u)}function x(){var e=m(),n=_(e);if(o=arguments,i=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(w,t),f?b(e):u}(l);if(p)return s=setTimeout(w,t),b(l)}return void 0===s&&(s=setTimeout(w,t)),u}return t=y(t)||0,g(r)&&(f=!!r.leading,a=(p="maxWait"in r)?h(y(r.maxWait)||0,t):a,d="trailing"in r?!!r.trailing:d),x.cancel=function(){void 0!==s&&clearTimeout(s),c=0,o=l=i=s=void 0},x.flush=function(){return void 0===s?u:E(m())},x}}).call(t,n(31))},function(e,t,n){var r={"./all.js":445,"./auth/actions.js":233,"./auth/index.js":394,"./auth/reducers.js":395,"./auth/selectors.js":396,"./auth/spec-wrap-actions.js":397,"./configs/actions.js":235,"./configs/helpers.js":234,"./configs/index.js":400,"./configs/reducers.js":403,"./configs/selectors.js":402,"./configs/spec-actions.js":401,"./deep-linking/helpers.js":406,"./deep-linking/index.js":404,"./deep-linking/layout.js":405,"./deep-linking/operation-tag-wrapper.jsx":408,"./deep-linking/operation-wrapper.jsx":407,"./download-url.js":399,"./err/actions.js":127,"./err/error-transformers/hook.js":322,"./err/error-transformers/transformers/not-of-type.js":323,"./err/error-transformers/transformers/parameter-oneof.js":324,"./err/error-transformers/transformers/strip-instance.js":325,"./err/index.js":320,"./err/reducers.js":321,"./err/selectors.js":326,"./filter/index.js":409,"./filter/opsFilter.js":410,"./layout/actions.js":202,"./layout/index.js":327,"./layout/reducers.js":328,"./layout/selectors.js":329,"./logs/index.js":386,"./oas3/actions.js":237,"./oas3/auth-extensions/wrap-selectors.js":424,"./oas3/components/callbacks.jsx":427,"./oas3/components/http-auth.jsx":433,"./oas3/components/index.js":426,"./oas3/components/operation-link.jsx":429,"./oas3/components/operation-servers.jsx":434,"./oas3/components/request-body-editor.jsx":432,"./oas3/components/request-body.jsx":428,"./oas3/components/servers-container.jsx":431,"./oas3/components/servers.jsx":430,"./oas3/helpers.jsx":35,"./oas3/index.js":422,"./oas3/reducers.js":444,"./oas3/selectors.js":443,"./oas3/spec-extensions/selectors.js":425,"./oas3/spec-extensions/wrap-selectors.js":423,"./oas3/wrap-components/auth-item.jsx":437,"./oas3/wrap-components/index.js":435,"./oas3/wrap-components/json-schema-string.jsx":442,"./oas3/wrap-components/markdown.jsx":436,"./oas3/wrap-components/model.jsx":441,"./oas3/wrap-components/online-validator-badge.js":440,"./oas3/wrap-components/parameters.jsx":438,"./oas3/wrap-components/version-stamp.jsx":439,"./on-complete/index.js":411,"./samples/fn.js":194,"./samples/index.js":385,"./spec/actions.js":203,"./spec/index.js":333,"./spec/reducers.js":334,"./spec/selectors.js":144,"./spec/wrap-actions.js":347,"./swagger-js/index.js":387,"./util/index.js":398,"./view/index.js":348,"./view/root-injects.jsx":349};function o(e){return n(i(e))}function i(e){var t=r[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id=1059}])}); //# sourceMappingURL=swagger-ui-bundle.js.map
examples/componentjs/bower_components/componentjs/component.js
edwardpark/todomvc
/* ** ComponentJS -- Component System for JavaScript <http://componentjs.com> ** Copyright (c) 2009-2013 Ralf S. Engelschall <http://engelschall.com> ** ** This Source Code Form is subject to the terms of the Mozilla Public ** License, v. 2.0. If a copy of the MPL was not distributed with this ** file, You can obtain one at http://mozilla.org/MPL/2.0/. */ (function (GLOBAL, EXPORTS, DEFINE) { /* ** GLOBAL LIBRARY NAMESPACING */ /* internal API */ var _cs = function () {}; /* external API */ var $cs = function () { /* under run-time just pass through to lookup functionality */ return _cs.hook("ComponentJS:lookup", "pass", _cs.lookup.apply(GLOBAL, arguments)); }; /* pattern sub-namespace */ $cs.pattern = {}; /* top-level API method: change symbol of external API */ $cs.symbol = (function () { /* internal state */ var value_original; value_original = undefined; var symbol_current = null; /* top-level API method */ return function (symbol) { /* release old occupation */ if (symbol_current !== null) GLOBAL[symbol_current] = value_original; /* perform new occupation */ if (typeof symbol === "undefined" || symbol === "") /* occupy no global slot at all */ symbol_current = null; else { /* occupy new global slot */ symbol_current = symbol; value_original = GLOBAL[symbol_current]; GLOBAL[symbol_current] = $cs; } /* return the global API */ return $cs; }; })(); /* top-level API method: create a global namespace and optionally assign a value to the leaf object */ $cs.ns = function (name, value) { /* sanity check name argument */ if (typeof name !== "string" || name === "") throw "invalid namespace path"; /* determine path */ var path = name.split("."); var len = path.length; if (typeof value !== "undefined") len--; /* iterate over the path and create missing objects */ var i = 0; var ctx = GLOBAL; while (i < len) { if (typeof ctx[path[i]] === "undefined") ctx[path[i]] = {}; ctx = ctx[path[i++]]; } /* optionally assign a value to the leaf object */ if (typeof value !== "undefined") { ctx[path[i]] = value; ctx = value; } /* return the leaf object */ return ctx; }; /* API version */ $cs.version = { major: 1, minor: 0, micro: 1, date: 20131009 }; /* ** COMMON UTILITY FUNCTIONALITIES */ /* utility function: create an exception string for throwing */ _cs.exception = function (method, error) { var trace; /* optionally log stack trace to console */ if ($cs.debug() > 0) { if (typeof GLOBAL.console === "object") { if (typeof GLOBAL.console.trace === "function") GLOBAL.console.trace(); else if ( typeof GLOBAL.printStackTrace !== "undefined" && typeof GLOBAL.console.log === "function") { trace = GLOBAL.printStackTrace(); GLOBAL.console.log(trace.join("\n")); } } } /* return Error exception object */ return new Error("[ComponentJS]: ERROR: " + method + ": " + error); }; /* utility function: logging via environment console */ _cs.log = function (msg) { /* try ComponentJS debugger */ if (_cs.hook("ComponentJS:log", "or", msg)) {} /* do nothing, as plugins have already logged the message */ /* try Firebug-style console (in regular browser or Node) */ else if ( typeof GLOBAL.console !== "undefined" && typeof GLOBAL.console.log !== "undefined") GLOBAL.console.log("[ComponentJS]: " + msg); /* try API of Appcelerator Titanium */ else if ( typeof GLOBAL.Titanium !== "undefined" && typeof GLOBAL.Titanium.API !== "undefined" && typeof GLOBAL.Titanium.API.log === "function") GLOBAL.Titanium.API.log("[ComponentJS]: " + msg); }; /* utility function: debugging */ $cs.debug = (function () { var debug_level = 9; return function (level, msg) { if (arguments.length === 0) /* return old debug level */ return debug_level; else if (arguments.length === 1) /* configure new debug level */ debug_level = level; else { /* perform runtime logging */ if (level <= debug_level) { /* determine indentation based on debug level */ var indent = ""; for (var i = 1; i < level; i++) indent += " "; /* display debug message */ _cs.log("DEBUG[" + level + "]: " + indent + msg); } } }; })(); /* utility function: no operation (for passing as dummy callback) */ $cs.nop = function () {}; /* utility function: annotate an object */ _cs.annotation = function (obj, name, value) { var result = null; var __name__ = "__ComponentJS_" + name + "__"; if (typeof obj !== "undefined" && obj !== null) { /* get annotation value */ if (typeof obj[__name__] !== "undefined") result = obj[__name__]; if (typeof value !== "undefined") { /* set annotation value */ if (value !== null) obj[__name__] = value; else delete obj[__name__]; } } return result; }; /* utility function: conveniently check for defined variable */ _cs.isdefined = function (obj) { return (typeof obj !== "undefined"); }; /* utility function: check whether a field is directly owned by object (instead of implicitly resolved through the constructor's prototype object) */ _cs.isown = function (obj, field) { var isown = Object.hasOwnProperty.call(obj, field); if (field === "constructor" || field === "prototype") { isown = isown && Object.propertyIsEnumerable.call(obj, field); if (obj[field].toString().indexOf("[native code]") !== -1) isown = false; } return isown; }; /* utility function: determine type of anything, an improved version of the built-in "typeof" operator */ _cs.istypeof = function (obj) { var type = typeof obj; if (type === "object") { if (obj === null) /* JavaScript nasty special case: null object */ type = "null"; else if (Object.prototype.toString.call(obj) === "[object String]") /* JavaScript nasty special case: String object */ type = "string"; else if (Object.prototype.toString.call(obj) === "[object Number]") /* JavaScript nasty special case: Number object */ type = "number"; else if (Object.prototype.toString.call(obj) === "[object Boolean]") /* JavaScript nasty special case: Boolean object */ type = "boolean"; else if (Object.prototype.toString.call(obj) === "[object Function]") /* JavaScript nasty special case: Function object */ type = "function"; else if (Object.prototype.toString.call(obj) === "[object Array]") /* JavaScript nasty special case: Array object */ type = "array"; else if (_cs.annotation(obj, "type") !== null) /* ComponentJS special case: "component" */ type = _cs.annotation(obj, "type"); } else if (type === "function") { /* ComponentJS special case: "{clazz,trait}" */ if (_cs.annotation(obj, "type") !== null) type = _cs.annotation(obj, "type"); } return type; }; /* utility function: retrieve keys of object */ _cs.keysof = function (obj) { var keys = []; for (var key in obj) { if (obj.hasOwnProperty(key)) keys.push(key); } return keys; }; /* utility function: JSON encoding of object */ _cs.json = (function () { var escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; var meta = { "\b": "\\b", "\t": "\\t", "\n": "\\n", "\f": "\\f", "\r": "\\r", "\"": "\\\"", "\\": "\\\\" }; var quote = function (string) { escapable.lastIndex = 0; return ( escapable.test(string) ? "\"" + string.replace(escapable, function (a) { var c = meta[a]; return typeof c === "string" ? c : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4); }) + "\"" : "\"" + string + "\"" ); }; var encode = function (value, seen) { if (typeof value !== "boolean" && typeof value !== "number" && typeof value !== "string") { if (typeof seen[value] !== "undefined") return "null /* CYCLE! */"; else seen[value] = true; } switch (typeof value) { case "boolean": value = String(value); break; case "number": value = (isFinite(value) ? String(value) : "NaN"); break; case "string": value = quote(value); break; case "function": if (_cs.annotation(value, "type") !== null) value = "<" + _cs.annotation(value, "type") + ">"; else value = "<function>"; break; case "object": var a = []; if (value === null) value = "null"; else if (_cs.annotation(value, "type") !== null) value = "<" + _cs.annotation(value, "type") + ">"; else if (Object.prototype.toString.call(value) === "[object Function]") value = "<function>"; else if ( Object.prototype.toString.call(value) === "[object Array]" || value instanceof Array) { for (var i = 0; i < value.length; i++) a[i] = arguments.callee(value[i], seen); /* RECURSION */ value = (a.length === 0 ? "[]" : "[" + a.join(",") + "]"); } else { for (var k in value) { if (Object.hasOwnProperty.call(value, k)) { var v = arguments.callee(value[k], seen); /* RECURSION */ a.push(quote(k) + ":" + v); } } value = (a.length === 0 ? "{}" : "{" + a.join(",") + "}"); } break; default: value = "<unknown>"; } return value; }; return function (value) { return encode(value, {}); }; })(); /* utility function: deep cloning of arbitrary data-structure */ _cs.clone = function (source, continue_recursion) { /* allow recursive cloning to be controlled */ if (typeof continue_recursion === "undefined") continue_recursion = function (/* name, value */) { return true; }; else if (typeof continue_recursion === "string") { var pattern = continue_recursion; continue_recursion = function (name /*, value */) { return name.match(pattern); }; } /* helper functions */ var myself = arguments.callee; var clone_func = function (f, continue_recursion) { var g = function ComponentJS_function_clone () { return f.apply(this, arguments); }; g.prototype = f.prototype; for (var prop in f) { if (_cs.isown(f, prop)) { if (continue_recursion(prop, f)) g[prop] = myself(f[prop], continue_recursion); /* RECURSION */ else g[prop] = f[prop]; } } _cs.annotation(g, "clone", true); return g; }; var target; target = undefined; if (typeof source === "function") /* special case: primitive function */ target = clone_func(source, continue_recursion); else if (typeof source === "object") { if (source === null) /* special case: null object */ target = null; else if (Object.prototype.toString.call(source) === "[object String]") /* special case: String object */ target = "" + source.valueOf(); else if (Object.prototype.toString.call(source) === "[object Number]") /* special case: Number object */ target = 0 + source.valueOf(); else if (Object.prototype.toString.call(source) === "[object Boolean]") /* special case: Boolean object */ target = !!source.valueOf(); else if (Object.prototype.toString.call(source) === "[object Function]") /* special case: Function object */ target = clone_func(source, continue_recursion); else if (Object.prototype.toString.call(source) === "[object Date]") /* special case: Date object */ target = new Date(source.getTime()); else if (Object.prototype.toString.call(source) === "[object RegExp]") /* special case: RegExp object */ target = new RegExp(source.source); else if (Object.prototype.toString.call(source) === "[object Array]") { /* special case: array object */ var len = source.length; target = []; for (var i = 0; i < len; i++) target.push(myself(source[i], continue_recursion)); /* RECURSION */ } else { /* special case: hash object */ target = {}; for (var key in source) { if (key !== "constructor" && _cs.isown(source, key)) { if (continue_recursion(key, source)) target[key] = myself(source[key], continue_recursion); /* RECURSION */ else target[key] = source[key]; } } if (typeof source.constructor === "function") target.constructor = source.constructor; if (typeof source.prototype === "object") target.prototype = source.prototype; } } else /* regular case: anything else (just primitive data types and undefined value) */ target = source; return target; }; /* utility function: extend an object with other object(s) */ _cs.extend = function (target, source, filter) { if (typeof filter === "undefined") filter = function (/* name, value */) { return true; }; else if (typeof filter === "string") { var pattern = filter; filter = function (name /*, value */) { return name.match(pattern); }; } for (var key in source) if (_cs.isown(source, key)) if (filter(key, source[key])) target[key] = source[key]; return target; }; /* utility function: mixin objects into another object by chaining methods */ _cs.mixin = function (target, source, filter) { if (typeof filter === "undefined") filter = function (/* name, value */) { return true; }; else if (typeof filter === "string") { var pattern = filter; filter = function (name /*, value */) { return name.match(pattern); }; } for (var key in source) { if (_cs.isown(source, key)) { if (filter(key, source[key])) { if (_cs.istypeof(source[key]) === "function") { /* method/function */ var src = _cs.clone(source[key], filter); _cs.annotation(src, "name", key); if ( _cs.istypeof(target[key]) === "function" && _cs.isown(target, key) ) _cs.annotation(src, "base", target[key]); target[key] = src; } else { /* property/field */ target[key] = source[key]; } } } } return target; }; /* utility function: concatenate array values */ _cs.concat = function () { var target = []; for (var i = 0; i < arguments.length; i++) { var source = arguments[i]; for (var j = 0; j < source.length; j++) target.push(source[j]); } return target; }; /* utility function: slice array values */ _cs.slice = function (source, start, len) { var target = []; if (typeof len === "undefined") len = source.length; for (var i = start; i < len; i++) target.push(source[i]); return target; }; /* utility function: map array values */ _cs.map = function (source, mapper) { var target = []; for (var i = 0; i < source.length; i++) target.push(mapper(source[i], i)); return target; }; /* utility function: filter array values */ _cs.filter = function (source, filter) { var target = []; for (var i = 0; i < source.length; i++) if (filter(source[i], i)) target.push(source[i]); return target; }; /* utility function: iterate over values */ _cs.foreach = function (source, callback) { for (var i = 0; i < source.length; i++) callback(source[i], i); }; /* custom Token class */ _cs.token = function () { this.text = ""; this.tokens = []; this.pos = 0; this.len = 0; }; _cs.token.prototype = { /* setter for plain-text input */ setText: function (text) { this.text = text; }, /* setter for additional token symbols */ addToken: function (b1, b2, e2, e1, symbol) { this.tokens.push({ b1: b1, b2: b2, e2: e2, e1: e1, symbol: symbol }); this.len++; }, /* peek at the next token or token at particular offset */ peek: function (offset) { if (typeof offset === "undefined") offset = 0; if (offset >= this.len) throw new Error("parse error: not enough tokens"); return this.tokens[this.pos + offset].symbol; }, /* skip one or more tokens */ skip: function (len) { if (typeof len === "undefined") len = 1; if (len > this.len) throw new Error("parse error: not enough tokens available to skip: " + this.ctx()); this.pos += len; this.len -= len; }, /* consume the current token (by expecting it to be a particular symbol) */ consume: function (symbol) { if (this.len <= 0) throw new Error("parse error: no more tokens available to consume: " + this.ctx()); if (this.tokens[this.pos].symbol !== symbol) throw new Error("parse error: expected token symbol \"" + symbol + "\": " + this.ctx()); this.pos++; this.len--; }, /* return a textual description of the token parsing context */ ctx: function (width) { if (typeof width === "undefined") width = 78; var tok = this.tokens[this.pos]; /* the current token itself */ var ctx = "<" + this.text.substr(tok.b2, tok.e2 - tok.b2 + 1) + ">"; ctx = this.text.substr(tok.b1, tok.b2 - tok.b1) + ctx; ctx = ctx + this.text.substr(tok.e2, tok.e1 - tok.e2); /* the previous and following token(s) */ var k = (width - ctx.length); if (k > 0) { k = Math.floor(k / 2); var i, str; if (this.pos > 0) { /* previous token(s) */ var k1 = 0; for (i = this.pos - 1; i >= 0; i--) { tok = this.tokens[i]; str = this.text.substr(tok.b1, tok.e1 - tok.b1 + 1); k1 += str.length; if (k1 > k) break; ctx = str + ctx; } if (i > 0) ctx = "[...]" + ctx; } if (this.len > 1) { /* following token(s) */ var k2 = 0; for (i = this.pos + 1; i < this.pos + this.len; i++) { tok = this.tokens[i]; str = this.text.substr(tok.b1, tok.e1 - tok.b1 + 1); k2 += str.length; if (k2 > k) break; ctx = ctx + str; } if (i < this.pos + this.len) ctx = ctx + "[...]"; } } /* place everything on a single line through escape sequences */ ctx = ctx.replace(/\r/, "\\r") .replace(/\n/, "\\n") .replace(/\t/, "\\t"); return ctx; } }; /* API function: validate an arbitrary value against a type specification */ $cs.validate = function (value, spec, non_cache) { /* compile validation AST from specification or reuse cached pre-compiled validation AST */ var ast; if (!non_cache) ast = _cs.validate_cache[spec]; if (typeof ast === "undefined") ast = _cs.validate_compile(spec); if (!non_cache) _cs.validate_cache[spec] = ast; /* execute validation AST against the value */ return _cs.validate_executor.exec_spec(value, ast); }; /* the internal compile cache */ _cs.validate_cache = {}; /* * VALIDATION SPECIFICATION COMPILER */ /* compile validation specification into validation AST */ _cs.validate_compile = function (spec) { /* tokenize the specification string into a token stream */ var token = _cs.validate_tokenize(spec); /* parse the token stream into an AST */ return _cs.validate_parser.parse_spec(token); }; /* tokenize the validation specification */ _cs.validate_tokenize = function (spec) { /* create new Token abstraction */ var token = new _cs.token(); token.setText(spec); /* determine individual token symbols */ var m; var b = 0; while (spec !== "") { m = spec.match(/^(\s*)([^{}\[\]:,?*+()!|\s]+|[{}\[\]:,?*+()!|])(\s*)/); if (m === null) throw new Error("parse error: cannot further canonicalize: \"" + spec + "\""); token.addToken( b, b + m[1].length, b + m[1].length + m[2].length - 1, b + m[0].length - 1, m[2] ); spec = spec.substr(m[0].length); b += m[0].length; } return token; }; /* parse specification */ _cs.validate_parser = { parse_spec: function (token) { if (token.len <= 0) return null; var ast; var symbol = token.peek(); if (symbol === "!") ast = this.parse_not(token); else if (symbol === "(") ast = this.parse_group(token); else if (symbol === "{") ast = this.parse_hash(token); else if (symbol === "[") ast = this.parse_array(token); else if (symbol.match(/^(?:null|undefined|boolean|number|string|function|object)$/)) ast = this.parse_primary(token); else if (symbol.match(/^(?:clazz|trait|component)$/)) ast = this.parse_special(token); else if (symbol === "any") ast = this.parse_any(token); else if (symbol.match(/^[A-Z][_a-zA-Z$0-9]*$/)) ast = this.parse_class(token); else throw new Error("parse error: invalid token symbol: \"" + token.ctx() + "\""); return ast; }, /* parse boolean "not" operation */ parse_not: function (token) { token.consume("!"); var ast = this.parse_spec(token); /* RECURSION */ ast = { type: "not", op: ast }; return ast; }, /* parse group (for boolean "or" operation) */ parse_group: function (token) { token.consume("("); var ast = this.parse_spec(token); while (token.peek() === "|") { token.consume("|"); var child = this.parse_spec(token); /* RECURSION */ ast = { type: "or", op1: ast, op2: child }; } token.consume(")"); return ast; }, /* parse hash type specification */ parse_hash: function (token) { token.consume("{"); var elements = []; while (token.peek() !== "}") { var key = this.parse_key(token); var arity = this.parse_arity(token, "?"); token.consume(":"); var spec = this.parse_spec(token); /* RECURSION */ elements.push({ type: "element", key: key, arity: arity, element: spec }); if (token.peek() === ",") token.skip(); else break; } var ast = { type: "hash", elements: elements }; token.consume("}"); return ast; }, /* parse array type specification */ parse_array: function (token) { token.consume("["); var elements = []; while (token.peek() !== "]") { var spec = this.parse_spec(token); /* RECURSION */ var arity = this.parse_arity(token, "?*+"); elements.push({ type: "element", element: spec, arity: arity }); if (token.peek() === ",") token.skip(); else break; } var ast = { type: "array", elements: elements }; token.consume("]"); return ast; }, /* parse primary type specification */ parse_primary: function (token) { var primary = token.peek(); if (!primary.match(/^(?:null|undefined|boolean|number|string|function|object)$/)) throw new Error("parse error: invalid primary type \"" + primary + "\""); token.skip(); return { type: "primary", name: primary }; }, /* parse special ComponentJS type specification */ parse_special: function (token) { var special = token.peek(); if (!special.match(/^(?:clazz|trait|component)$/)) throw new Error("parse error: invalid special type \"" + special + "\""); token.skip(); return { type: "special", name: special }; }, /* parse special "any" type specification */ parse_any: function (token) { var any = token.peek(); if (any !== "any") throw new Error("parse error: invalid any type \"" + any + "\""); token.skip(); return { type: "any" }; }, /* parse JavaScript class specification */ parse_class: function (token) { var clazz = token.peek(); if (!clazz.match(/^[A-Z][_a-zA-Z$0-9]*$/)) throw new Error("parse error: invalid class type \"" + clazz + "\""); token.skip(); return { type: "class", name: clazz }; }, /* parse arity specification */ parse_arity: function (token, charset) { var arity = [ 1, 1 ]; if ( token.len >= 5 && token.peek(0) === "{" && token.peek(1).match(/^[0-9]+$/) && token.peek(2) === "," && token.peek(3).match(/^(?:[0-9]+|oo)$/) && token.peek(4) === "}" ) { arity = [ parseInt(token.peek(1), 10), ( token.peek(3) === "oo" ? Number.MAX_VALUE : parseInt(token.peek(3), 10)) ]; token.skip(5); } else if ( token.len >= 1 && token.peek().length === 1 && charset.indexOf(token.peek()) >= 0) { var c = token.peek(); switch (c) { case "?": arity = [ 0, 1 ]; break; case "*": arity = [ 0, Number.MAX_VALUE ]; break; case "+": arity = [ 1, Number.MAX_VALUE ]; break; } token.skip(); } return arity; }, /* parse hash key specification */ parse_key: function (token) { var key = token.peek(); if (!key.match(/^[_a-zA-Z$][_a-zA-Z$0-9]*$/)) throw new Error("parse error: invalid key \"" + key + "\""); token.skip(); return key; } }; /* * VALIDATION AST EXECUTOR */ _cs.validate_executor = { /* validate specification (top-level) */ exec_spec: function (value, node) { var valid = false; if (node !== null) { switch (node.type) { case "not": valid = this.exec_not (value, node); break; case "or": valid = this.exec_or (value, node); break; case "hash": valid = this.exec_hash (value, node); break; case "array": valid = this.exec_array (value, node); break; case "primary": valid = this.exec_primary(value, node); break; case "special": valid = this.exec_special(value, node); break; case "class": valid = this.exec_class (value, node); break; case "any": valid = true; break; default: throw new Error("validation error: invalid validation AST: " + "node has unknown type \"" + node.type + "\""); } } return valid; }, /* validate through boolean "not" operation */ exec_not: function (value, node) { return !this.exec_spec(value, node.op); /* RECURSION */ }, /* validate through boolean "or" operation */ exec_or: function (value, node) { return ( this.exec_spec(value, node.op1) /* RECURSION */ || this.exec_spec(value, node.op2) /* RECURSION */ ); }, /* validate hash type */ exec_hash: function (value, node) { var i, el; var valid = (typeof value === "object"); var fields = {}; if (valid) { /* pass 1: ensure that all mandatory fields exist and determine map of valid fields for pass 2 */ for (i = 0; i < node.elements.length; i++) { el = node.elements[i]; fields[el.key] = el.element; if (el.arity[0] > 0 && typeof value[el.key] === "undefined") { valid = false; break; } } } if (valid) { /* pass 2: ensure that no unknown fields exist and that all existing fields are valid */ for (var field in value) { if ( !Object.hasOwnProperty.call(value, field) || !Object.propertyIsEnumerable.call(value, field) || (field === "constructor" || field === "prototype")) continue; if ( typeof fields[field] === "undefined" || !this.exec_spec(value[field], fields[field])) { /* RECURSION */ valid = false; break; } } } return valid; }, /* validate array type */ exec_array: function (value, node) { var i, el; var valid = (typeof value === "object" && value instanceof Array); if (valid) { var pos = 0; for (i = 0; i < node.elements.length; i++) { el = node.elements[i]; var found = 0; while (found < el.arity[1] && pos < value.length) { if (!this.exec_spec(value[pos], el.element)) /* RECURSION */ break; found++; pos++; } if (found < el.arity[0]) { valid = false; break; } } if (pos < value.length) valid = false; } return valid; }, /* validate standard JavaScript type */ exec_primary: function (value, node) { return (node.name === "null" && value === null) || (typeof value === node.name); }, /* validate custom JavaScript type */ exec_class: function (value, node) { /* jshint evil:true */ return ( typeof value === "object" && ( Object.prototype.toString.call(value) === "[object " + node.name + "]") || eval("value instanceof " + node.name) ); }, /* validate special ComponentJS type */ exec_special: function (value, node) { var valid = false; if (typeof value === (node.name === "component" ? "object" : "function")) valid = (_cs.annotation(value, "type") === node.name); return valid; } }; /* utility function: flexible parameter handling */ $cs.params = function (func_name, func_args, spec) { /* provide parameter processing hook */ _cs.hook("ComponentJS:params:" + func_name + ":enter", "none", { args: func_args, spec: spec }); /* start with a fresh parameter object */ var params = {}; /* 1. determine number of total positional parameters, 2. determine number of required positional parameters, 3. set default values */ var positional = 0; var required = 0; var pos2name = {}; var name; for (name in spec) { if (_cs.isown(spec, name)) { /* process parameter position */ if (typeof spec[name].pos !== "undefined") { pos2name[spec[name].pos] = name; if (typeof spec[name].pos === "number") positional++; if (typeof spec[name].req !== "undefined" && spec[name].req) required++; } /* process default value */ if (typeof spec[name].def !== "undefined") params[name] = spec[name].def; } } /* determine or at least guess whether we were called with positional or name-based parameters */ var name_based = false; if ( func_args.length === 1 && _cs.istypeof(func_args[0]) === "object") { /* ok, looks like a regular call like "foo({ foo: ..., bar: ...})" */ name_based = true; /* ...but do not be mislead by a positional use like "foo(bar)" where "bar" is an arbitrary object! */ for (name in func_args[0]) { if (_cs.isown(func_args[0], name)) { if (typeof spec[name] === "undefined") name_based = false; } } } /* common value validity checking */ var check_validity = function (func, name, value, valid) { if (typeof valid === "string") { if (!$cs.validate(value, valid)) throw _cs.exception(func, "value of parameter \"" + name + "\" not valid"); } else if (typeof valid === "object" && valid instanceof RegExp) { if (!(typeof value === "string" && value.match(valid))) throw _cs.exception(func, "value of parameter \"" + name + "\" not valid (regexp)"); } else if (typeof valid === "function") { if (!valid(value)) throw _cs.exception(func, "value of parameter \"" + name + "\" not valid (callback)"); } }; /* set actual values */ var i; var args; if (name_based) { /* case 1: name-based parameter specification */ args = func_args[0]; for (name in args) { if (_cs.isown(args, name)) { if (typeof spec[name] === "undefined") throw _cs.exception(func_name, "unknown parameter \"" + name + "\""); check_validity(func_name, name, args[name], spec[name].valid); params[name] = args[name]; } } for (name in spec) { if (_cs.isown(spec, name)) { if ( typeof spec[name].req !== "undefined" && spec[name].req && typeof args[name] === "undefined") throw _cs.exception(func_name, "required parameter \"" + name + "\" missing"); } } } else { /* case 2: positional parameter specification */ if (func_args.length < required) throw _cs.exception(func_name, "invalid number of arguments " + "(at least " + required + " required)"); for (i = 0; i < positional && i < func_args.length; i++) { check_validity(func_name, pos2name[i], func_args[i], spec[pos2name[i]].valid); params[pos2name[i]] = func_args[i]; } if (i < func_args.length) { if (typeof pos2name["..."] === "undefined") throw _cs.exception(func_name, "too many arguments provided"); args = []; for (; i < func_args.length; i++) { check_validity(func_name, pos2name["..."], func_args[i], spec[pos2name["..."]].valid); args.push(func_args[i]); } params[pos2name["..."]] = args; } } /* provide parameter processing hook */ _cs.hook("ComponentJS:params:" + func_name + ":leave", "none", { args: func_args, spec: spec, params: params }); /* return prepared parameter object */ return params; }; /* Base16 encoding (number) */ _cs.base16_number = function (num, min, uppercase) { var base16 = ""; if (typeof min === "undefined") min = 0; if (typeof uppercase === "undefined") uppercase = false; var charset = uppercase ? "0123456789ABCDEF" : "0123456789abcdef"; while (num > 0 || min > 0) { base16 = charset.charAt(Math.floor(num % 16)) + base16; num = Math.floor(num / 16); if (min > 0) min--; } return base16; }; /* advanced: 128-bit Counter-ID generation */ _cs.cid = (function () { /* 128-bit emulated via 4 x 32-bit JavaScript 64-bit-floating-point-based "number" */ var counter = [ 0, 0, 0, 0 ]; var base = 4294967296; /* = 2^32 */ /* generate the next Counter-ID */ return function () { /* increase counter */ counter[3]++; var carry = 0; for (var i = 3; i >= 0; i--) { carry += counter[i]; counter[i] = Math.floor(carry % base); carry = Math.floor(carry / base); } /* return counter */ return ( _cs.base16_number(counter[0], 8, true) + _cs.base16_number(counter[1], 8, true) + _cs.base16_number(counter[2], 8, true) + _cs.base16_number(counter[3], 8, true) ); }; })(); /* for passing a function as a callback parameter, wrap the function into a proxy function which has a particular excecution scope. Also supports optional cloning which allows to carry a private context which will be cloned together with function */ _cs.proxy = function (ctx, func, clonable) { /* support plain method name */ if (_cs.istypeof(func) === "string") if (_cs.istypeof(ctx) === "object") if (_cs.istypeof(ctx[func]) === "function") func = ctx[func]; /* fallback for clonable parameter */ if (!_cs.isdefined(clonable)) clonable = false; /* define the generator */ var generator = function () { /* generate new wrapper function */ var proxy = function () { /* if context is an object, annotate it with the real "this" pointer of this method call */ if (_cs.istypeof(arguments.callee.__ctx__) === "object") arguments.callee.__ctx__.__this__ = this; /* just pass execution through to wrapped function with our attached store as its execution context object */ return func.apply(arguments.callee.__ctx__, arguments); }; /* create the attached store object (either with fresh or cloned context) */ proxy.__ctx__ = (clonable ? _cs.clone(_cs.isdefined(this.__ctx__) ? this.__ctx__ : ctx) : ctx); /* add ourself as the cloning function */ if (clonable) proxy.clone = generator; /* set "guid" property to the same of original function, so it is garbage collected correctly */ proxy.guid = func.guid = (func.guid || proxy.guid || _cs.cid()); /* return the new wrapper function */ return proxy; }; /* run the generator once */ return generator.call({}); }; /* generate a proxy function which memoizes/caches the result of an idempotent function (a function without side-effects which always returns the same output value on the same input parameters) */ _cs.memoize = function (func) { var f = function () { var key = _cs.json(_cs.slice(arguments, 0)); var val; val = undefined; if (typeof arguments.callee.cache[key] !== "undefined") { /* take memoized/cached value */ val = arguments.callee.cache[key]; } else { /* calculate new value and memoize/cache it */ val = func.apply(this, arguments); arguments.callee.cache[key] = val; } return val; }; f.cache = {}; return f; }; /* generate a proxy function which uses "currying" to remember its initially supplied arguments */ _cs.curry = function (func) { var args_stored = _cs.slice(arguments, 1); return function () { var args_supplied = _cs.slice(arguments, 0); var args = _cs.concat(args_stored, args_supplied); return func.apply(this, args); }; }; /* for defining getter/setter style attributes */ $cs.attribute = function () { /* determine parameters */ var params = $cs.params("attribute", arguments, { name: { pos: 0, req: true }, def: { pos: 1, req: true }, validate: { pos: 2, def: null } }); /* return closure-based getter/setter method */ return _cs.proxy({ value: params.def }, function (value_new, validate_only) { /* remember old value */ var value_old = this.value; /* act on new value if given */ if (arguments.length > 0) { /* check whether new value is valid */ var is_valid = true; if (params.validate !== null) { /* case 1: plain type comparison */ if ( typeof params.validate === "string" || typeof params.validate === "boolean" || typeof params.validate === "number" ) is_valid = (value_new === params.validate); /* case 2: regular expression string match */ else if ( typeof params.validate === "object" && params.validate instanceof RegExp ) is_valid = params.validate.test(value_new); /* case 3: flexible callback function check */ else if (typeof params.validate === "function") is_valid = params.validate(value_new, value_old, validate_only, params.name); /* otherwise: error */ else throw _cs.exception("attribute", "validation value \"" + params.validate + "\" " + "for attribute \"" + params.name + "\" " + "is of unsupported type \"" + (typeof params.validate) + "\""); } /* either return validation result... */ if (typeof validate_only !== "undefined" && validate_only) return is_valid; /* ...or set new valid value... */ else if (is_valid) { /* set new value */ this.value = value_new; /* optionally notify observers */ var obj = this.__this__; if ( typeof obj !== "undefined" && typeof obj.notify === "function") obj.notify.call(obj, "attribute:set:" + params.name, value_new, value_old, params.name); } /* ...or throw an exception */ else throw _cs.exception("attribute", "invalid value \"" + value_new + "\" " + "for attribute \"" + params.name + "\""); } /* return old value */ return value_old; }, true); }; /* internal hook registry */ _cs.hooks = {}; /* internal hook processing */ _cs.hook_proc = { "none": { init: undefined, step: function ( ) { } }, "pass": { init: function (a) { return a[0]; }, step: function (a, b) { return b; } }, "or": { init: false, step: function (a, b) { return a || b; } }, "and": { init: true, step: function (a, b) { return a && b; } }, "mult": { init: 1, step: function (a, b) { return a * b; } }, "add": { init: 0, step: function (a, b) { return a + b; } }, "append": { init: "", step: function (a, b) { return a + b; } }, "push": { init: [], step: function (a, b) { a.push(b); return a; } }, "concat": { init: [], step: function (a, b) { return _cs.concat(a, b); } }, "insert": { init: {}, step: function (a, b) { a[b] = true; return a; } }, "extend": { init: {}, step: function (a, b) { return _cs.extend(a, b); } } }; /* latch into internal ComponentJS hook */ _cs.latch = function (name, cb) { /* sanity check arguments */ if (arguments.length < 2) throw _cs.exception("latch(internal)", "missing arguments"); /* on-the-fly create hook callback registry */ if (typeof _cs.hooks[name] === "undefined") _cs.hooks[name] = []; /* store callback in hook callback registry */ var args = _cs.slice(arguments, 2); var id = _cs.cid(); _cs.hooks[name].push({ id: id, cb: cb, args: args }); return id; }; /* unlatch from internal ComponentJS hook */ _cs.unlatch = function (name, id) { /* sanity check arguments */ if (arguments.length !== 2) throw _cs.exception("unlatch(internal)", "invalid number of arguments"); if (typeof _cs.hooks[name] === "undefined") throw _cs.exception("unlatch(internal)", "no such hook"); /* search for callback in hook callback registry */ var k = -1; for (var i = 0; i < _cs.hooks[name].length; i++) { if (_cs.hooks[name][i].id === id) { k = i; break; } } if (k === -1) throw _cs.exception("unlatch(internal)", "no such latched callback"); /* remove callback from hook callback registry */ _cs.hooks[name] = _cs.hooks[name].splice(k, 1); return; }; /* provide internal ComponentJS hook */ _cs.hook = function (name, proc) { /* sanity check arguments */ if (arguments.length < 2) throw _cs.exception("hook(internal)", "missing argument"); if (typeof _cs.hook_proc[proc] === "undefined") throw _cs.exception("hook(internal)", "no such result processing defined"); /* start result with the initial value */ var result = _cs.hook_proc[proc].init; var args = null; if (typeof result === "function") { args = _cs.slice(arguments, 2); result = result.call(null, args); } /* give all registered callbacks a chance to execute and modify the current result */ if (typeof _cs.hooks[name] !== "undefined") { if (args === null) args = _cs.slice(arguments, 2); _cs.foreach(_cs.hooks[name], function (l) { /* call latched callback */ var r = l.cb.apply({ args: l.args, /* latch arguments */ result: result, /* current result */ hooks: _cs.hooks[name].length, /* total number of hooks latched */ _cs: _cs, /* internal ComponentJS API */ $cs: $cs /* external ComponentJS API */ }, args); /* hook arguments */ /* process/merge results */ result = _cs.hook_proc[proc].step.call(null, result, r); }); } /* return the final result */ return result; }; /* ** CLASS SYSTEM */ /* utility function: define a JavaScript "class" */ _cs.clazz_or_trait = function (params, is_clazz) { /* * STEP 1: CREATE NEW CLASS */ /* create technical class constructor */ var clazz = function () { /* remember information */ var obj = this; var clz = arguments.callee; var arg = arguments; /* support also calls like "foo()" instead of "new foo()" */ if (!(obj instanceof clz)) return new clz(); /* RECURSION */ /* initialize all mixin traits and this class (or trait) */ var init = function (obj, clz, arg, exec_cons) { /* depth-first visit of parent class */ var extend = _cs.annotation(clz, "extend"); if (extend !== null) arguments.callee(obj, extend, arg, false); /* RECURSION */ /* depth-first visit of mixin traits */ var mixin = _cs.annotation(clz, "mixin"); if (mixin !== null) for (var i = 0; i < mixin.length; i++) arguments.callee(obj, mixin[i], arg, true); /* RECURSION */ /* establish clones of all own dynamic fields */ var dynamics = _cs.annotation(clz, "dynamics"); if (dynamics !== null) { for (var field in dynamics) { if (_cs.isown(dynamics, field)) { if ( _cs.istypeof(dynamics[field]) !== "null" && _cs.istypeof(dynamics[field].clone) === "function") obj[field] = dynamics[field].clone(); else obj[field] = _cs.clone(dynamics[field]); } } } /* explicitly call optional constructor function NOTICE: a clazz gets supplied the original constructor parameters (we assume that it knows what to do with all or at least the N initial parameters as it is a real parent/base/super class) and has to call its own parent/base/super constructor itself via this.base(), but a trait intentionally gets no constructor parameters passed-through (as it cannot know where it gets mixed into, so it cannot know what to do with the parameters) */ if (exec_cons) { var cons = _cs.annotation(clz, "cons"); if (cons !== null) { if (_cs.istypeof(clz) === "clazz") cons.apply(obj, arg); else cons.call(obj); } } }; init(obj, clz, arg, true); return; }; /* * STEP 2: OPTIONALLY IMPLICITLY INHERIT FROM PARENT CLASS */ var no_internals = function (name /*, value */) { return !name.match("^(?:base|__ComponentJS_[A-Za-z]+__)$"); }; if (_cs.isdefined(params.extend)) { /* inherit all static fields */ _cs.extend(clazz, params.extend, no_internals); /* set the prototype chain to inherit from parent class, but WITHOUT calling the parent class's constructor function */ var ctor = function () { this.constructor = clazz; }; ctor.prototype = params.extend.prototype; clazz.prototype = new ctor(); /* remember parent class */ _cs.annotation(clazz, "extend", params.extend); } /* * STEP 3: OPTIONALLY EXPLICITLY INHERIT FROM MIXIN CLASSES */ if (_cs.isdefined(params.mixin)) { /* inherit from mixin classes */ for (var i = 0; i < params.mixin.length; i++) { /* inherit all static fields */ _cs.extend(clazz, params.mixin[i], no_internals); /* inherit prototype methods */ _cs.mixin(clazz.prototype, params.mixin[i].prototype, no_internals); } /* remember mixin classes */ _cs.annotation(clazz, "mixin", params.mixin); } /* * STEP 4: OPTIONALLY SET OWN FIELDS/METHODS */ /* remember user-supplied constructor function (and provide fallback implementation) */ var cons = $cs.nop; if (_cs.isdefined(params.cons)) cons = params.cons; else if (_cs.isdefined(params.extend)) cons = function () { this.base(); }; _cs.annotation(clazz, "cons", cons); /* provide name for underlying implementation of "base()" for constructor */ _cs.annotation(cons, "name", "cons"); if (_cs.isdefined(params.extend)) _cs.annotation(cons, "base", _cs.annotation(params.extend, "cons")); /* remember user-supplied setup function */ if (_cs.isdefined(params.setup)) _cs.annotation(clazz, "setup", params.setup); /* extend class with own properties and methods */ if (_cs.isdefined(params.statics)) _cs.extend(clazz, params.statics); if (_cs.isdefined(params.protos)) _cs.mixin(clazz.prototype, params.protos); /* remember dynamics for per-object initialization */ if (_cs.isdefined(params.dynamics)) _cs.annotation(clazz, "dynamics", params.dynamics); /* internal utility method for resolving an annotation on a possibly cloned function (just for the following "base" method). Notice: for a cloned function the clone is a wrapper annotated with the annoation "clone" set to "true"! */ var resolve = function (func, name) { var result = _cs.annotation(func, name); while (result === null && _cs.annotation(func.caller, "clone") === true) { result = _cs.annotation(func.caller, name); func = func.caller; } return result; }; /* explicitly add "base()" utility method for calling the base/super/parent function in the inheritance/mixin chain */ clazz.prototype.base = function () { /* NOTICE: arguments.callee are we just ourself (this function), while arguments.callee.caller is the function calling this.base()! and because our cs.clone() creates wrapper functions we optionally have to take those into account during resolving, too! */ var name = resolve(arguments.callee.caller, "name"); var base = resolve(arguments.callee.caller, "base"); var extend = _cs.annotation(this.constructor, "extend"); /* attempt 1: call base/super/parent function in mixin chain */ if (_cs.istypeof(base) === "function") return base.apply(this, arguments); /* attempt 2: call base/super/parent function in inheritance chain (directly on object) */ else if ( _cs.istypeof(name) === "string" && _cs.istypeof(extend) === "clazz" && _cs.istypeof(extend[name]) === "function") return extend[name].apply(this, arguments); /* attempt 3: call base/super/parent function in inheritance chain (via prototype object) */ else if ( _cs.istypeof(name) === "string" && _cs.istypeof(extend) === "clazz" && _cs.istypeof(extend.prototype) === "object" && _cs.istypeof(extend.prototype[name]) === "function") return extend.prototype[name].apply(this, arguments); /* else just give up and throw an exception */ else throw _cs.exception("base", "no base method found for method \"" + name + "\" in inheritance/mixin chain"); }; /* * STEP 5: ALLOW TRAITS TO POST-ADJUST/SETUP DEFINED CLASS */ /* only classes execute trait setups... */ if (is_clazz) { var setup = function (clazz, trait) { /* depth-first traversal */ if (_cs.istypeof(_cs.annotation(trait, "mixin")) === "array") { var mixin = _cs.annotation(trait, "mixin"); for (var i = 0; i < mixin.length; i++) arguments.callee(clazz, mixin[i]); /* RECURSION */ } /* execute optionally existing setup function */ if (_cs.istypeof(_cs.annotation(trait, "setup")) === "function") _cs.annotation(trait, "setup").call(clazz); }; setup(clazz, clazz); } /* * STEP 6: PROVIDE RESULTS */ /* optionally insert class into global namespace ourself */ if (typeof params.name === "string") $cs.ns(params.name, clazz); /* return created class */ return clazz; }; /* API function: define a usual JavaScript "class" */ $cs.clazz = function () { /* determine parameters */ var params = $cs.params("clazz", arguments, { name: { def: undefined, valid: "string" }, extend: { def: undefined, valid: "clazz" }, mixin: { def: undefined, valid: "[trait*]" }, cons: { def: undefined, valid: "function" }, dynamics: { def: undefined, valid: "object" }, protos: { def: undefined, valid: "object" }, statics: { def: undefined, valid: "object" } }); /* just pass through definition */ var clazz = _cs.clazz_or_trait(params, true); /* mark object as a logical ComponentJS "class" */ _cs.annotation(clazz, "type", "clazz"); /* return created class */ return clazz; }; /* API function: define a Scala-inspired "trait" */ $cs.trait = function () { /* determine parameters */ var params = $cs.params("trait", arguments, { name: { def: undefined, valid: "string" }, mixin: { def: undefined, valid: "[trait*]" }, cons: { def: undefined, valid: "function" }, setup: { def: undefined, valid: "function" }, dynamics: { def: undefined, valid: "object" }, protos: { def: undefined, valid: "object" }, statics: { def: undefined, valid: "object" } }); /* just pass through definition */ var trait = _cs.clazz_or_trait(params, false); /* mark object as a logical ComponentJS "trait" */ _cs.annotation(trait, "type", "trait"); /* return created trait */ return trait; }; /* ** GENERIC PATTERN TRAITS */ /* generic pattern: id */ $cs.pattern.id = $cs.trait({ dynamics: { id: $cs.attribute("id", null) } }); /* generic pattern: name */ $cs.pattern.name = $cs.trait({ dynamics: { name: $cs.attribute("name", "") } }); /* generic pattern: tree */ $cs.pattern.tree = $cs.trait({ mixin: [ $cs.pattern.name ], dynamics: { parent: $cs.attribute("parent", null), children: $cs.attribute("children", []) }, protos: { /* method: path to (and including) node as either object array or name string */ path: function (separator) { var path, node; if (typeof separator === "undefined") { /* return path as object array */ path = []; for (node = this; node !== null; node = node.parent()) path.push(node); } else { /* return path as name string */ path = ""; if (this.parent() === null) path = separator; else { for (node = this; node.parent() !== null; node = node.parent()) path = separator + node.name() + path; } } return path; }, /* method: attach node to tree */ attach: function (theparent) { if (this.parent() !== null) this.detach(); var children = theparent.children(); children.push(this); theparent.children(children); this.parent(theparent); }, /* method: detach node from tree */ detach: function () { if (this.parent() !== null) { var self = this; this.parent().children(_cs.filter(this.parent().children(), function (x) { return x !== self; })); this.parent(null); } }, /* method: walk tree up */ walk_up: function (callback, ctx) { var depth, node; for (depth = 0, node = this; node !== null; node = node.parent(), depth++) ctx = callback(depth, node, ctx); return ctx; }, /* method: walk tree downward */ walk_down: function (callback, ctx) { var _walk = function (depth, node, ctx) { if (typeof callback === "function") ctx = callback(depth, node, ctx, false); var children = node.children(); for (var i = 0; i < children.length; i++) ctx = _walk(depth + 1, children[i], ctx); if (typeof callback === "function") ctx = callback(depth, node, ctx, true); return ctx; }; ctx = _walk(0, this, ctx); return ctx; }, /* method: dump tree as indented string representation */ _tree_dump: function (callback) { return this.walk_down(function (depth, node, output, depth_first) { if (!depth_first) { for (var n = 0; n < depth; n++) output += " "; output += "\"" + node.name() + "\""; if (typeof callback === "function") output += ": " + callback(node); output += "\n"; } return output; }, ""); } } }); /* generic pattern: configuration */ $cs.pattern.config = $cs.trait({ dynamics: { /* attributes */ __config: {} }, protos: { /* method: get/set particular configuration item */ cfg: function (name, value) { var result; if (arguments.length === 0) { /* return list of keys */ result = []; for (var key in this.__config) if (_cs.isown(this.__config, key)) result.push(key); } else if (arguments.length === 1 && typeof name === "string") { /* retrieve value */ result = this.__config[name]; } else if (arguments.length === 2 && value !== null) { /* set value */ result = this.__config[name]; this.__config[name] = value; } else if (arguments.length === 2) { /* remove key/value pair */ result = this.__config[name]; delete this.__config[name]; } else throw _cs.exception("cfg", "invalid arguments"); return result; } } }); /* generic pattern: spool */ $cs.pattern.spool = $cs.trait({ dynamics: { /* attributes */ __spool: {} }, protos: { /* spool an action for grouped execution */ spool: function () { /* determine parameters */ var params = $cs.params("spool", arguments, { name: { pos: 0, req: true }, ctx: { pos: 1, req: true }, func: { pos: 2, req: true }, args: { pos: "...", def: [] } }); /* sanity check parameters */ if (!_cs.istypeof(params.func).match(/^(string|function)$/)) throw _cs.exception("spool", "invalid function parameter (neither function object nor method name)"); if (_cs.istypeof(params.func) === "string") { if (_cs.istypeof(params.ctx[params.func]) !== "function") throw _cs.exception("spool", "invalid method name: \"" + params.func + "\""); params.func = params.ctx[params.func]; } /* spool cleanup action */ if (!_cs.isdefined(this.__spool[params.name])) this.__spool[params.name] = []; this.__spool[params.name].push(params); return; }, /* return number of actions which are spooled */ spooled: function () { /* determine parameters */ var params = $cs.params("spooled", arguments, { name: { pos: 0, req: true } }); /* return number of actions which are spooled */ return ( _cs.isdefined(this.__spool[params.name]) ? this.__spool[params.name].length : 0 ); }, /* execute spooled actions */ unspool: function () { /* determine parameters */ var params = $cs.params("unspool", arguments, { name: { pos: 0, req: true } }); /* execute spooled actions (in reverse spooling order) */ var actions = this.__spool[params.name]; if (!_cs.isdefined(actions)) throw _cs.exception("unspool", "no such spool: \"" + params.name + "\""); for (var i = actions.length - 1; i >= 0; i--) actions[i].func.apply(actions[i].ctx, actions[i].args); /* destroy spool of now executed cleanup actions */ delete this.__spool[params.name]; return; } } }); /* internal utility function: split "[path:]name" specification into a component object and a spool name */ _cs.spool_spec_parse = function (comp, spec) { var info = {}; info.comp = comp; info.name = spec; var m = info.name.match(/^([^:]+):(.+)$/); if (m !== null) { info.comp = $cs(comp, m[1]); info.name = m[2]; } return info; }; /* generic pattern: tree property */ $cs.pattern.property = $cs.trait({ mixin: [ $cs.pattern.tree, $cs.pattern.config ], protos: { /* get/set a property */ property: function () { /* determine parameters */ var params = $cs.params("property", arguments, { name: { pos: 0, req: true }, value: { pos: 1, def: undefined }, scope: { def: undefined }, bubbling: { def: true }, targeting: { def: true }, returnowner: { def: false } }); /* sanity check usage */ if (!params.targeting && !params.bubbling) throw _cs.exception("property", "disabling both targeting and bubbling makes no sense"); /* start resolving with an undefined value */ var result; result = undefined; /* get old configuration value (on current node or on any parent node) */ var v; for (var scope = [], node = this; node !== null; scope.unshift(node.name()), node = node.parent()) { /* optionally skip the target component (usually if a property on the parent components should be resolved only, but the scoping for the target component should be still taken into account on the parent) */ if (scope.length === 0 && !params.targeting) continue; /* first try: child-scoped property */ if (scope.length > 0) { for (var i = scope.length - 1; i >= 0; i--) { var probePath = scope.slice(0, i + 1).join("/"); v = node.cfg("ComponentJS:property:" + params.name + "@" + probePath); if (typeof v !== "undefined") break; } if (typeof v !== "undefined") { result = (params.returnowner ? node : v); break; } } /* second try: unscoped property */ v = node.cfg("ComponentJS:property:" + params.name); if (typeof v !== "undefined") { result = (params.returnowner ? node : v); break; } /* if we should not bubble, stop immediately */ if (!params.bubbling) break; } /* optionally set new configuration value (on current node only) */ if (typeof params.value !== "undefined") if (typeof params.scope !== "undefined") this.cfg("ComponentJS:property:" + params.name + "@" + params.scope, params.value); else this.cfg("ComponentJS:property:" + params.name, params.value); /* return result (either the old configuration value or the owning component) */ return result; } } }); /* generic pattern: specification */ $cs.pattern.spec = $cs.trait({ mixin: [ /* name-based identification (mandatory) */ $cs.pattern.name ], dynamics: { /* key/value-based specification (optional) */ __spec: {} }, protos: { /* method: configure specification */ spec: function () { var spec = this.__spec; if (arguments.length === 0) return spec; else if (arguments.length === 1 && typeof arguments[0] === "string") return spec[arguments[0]]; else { for (var i = 0; i < arguments.length; i++) { if (typeof arguments[i] === "string") { spec[arguments[i]] = arguments[i + 1]; i++; } else if (typeof arguments[i] === "object") { for (var key in arguments[i]) if (_cs.isown(arguments[i], key)) spec[key] = arguments[i][key]; } } } return; }, /* method: determine whether this object matches the name/spec patterns */ matches: function (name_pattern, spec_pattern) { /* step 1: match mandatory name */ if (typeof name_pattern === "string") { if (this.name() !== name_pattern) return false; } else if ( typeof name_pattern === "object" && name_pattern instanceof RegExp) { if (!(this.name().match(name_pattern))) return false; } else throw _cs.exception("matches", "invalid name pattern"); /* step 2: match optional specification */ var spec = this.__spec; for (var key in spec_pattern) { if (!_cs.isown(spec_pattern, key)) continue; if (!_cs.isdefined(spec[key])) return false; var value = spec_pattern[key]; switch (typeof spec[key]) { case "number": case "boolean": if (spec[key] !== value) return false; break; case "string": if (!( ( typeof value === "string" && spec[key] === value) || ( typeof value === "object" && value instanceof RegExp && !(spec[key].match(value))))) return false; break; } } return true; } } }); /* generic pattern: observable */ $cs.pattern.observable = $cs.trait({ dynamics: { /* internal state */ __listener: {} }, protos: { /* attach a listener */ listen: function () { /* determine parameters */ var params = $cs.params("listen", arguments, { name: { pos: 0, req: true }, ctx: { def: this }, func: { pos: 1, req: true }, args: { pos: "...", def: [] }, spec: { def: null } /* customized matching */ }); /* attach listener information */ var id = _cs.cid(); this.__listener[id] = params; return id; }, /* check for an attached listener */ listening: function () { /* determine parameters */ var params = $cs.params("listening", arguments, { id: { pos: 0, req: true } }); /* check whether listener is attached */ return (typeof this.__listener[params.id] !== "undefined"); }, /* detach a listener */ unlisten: function () { /* determine parameters */ var params = $cs.params("unlisten", arguments, { id: { pos: 0, req: true } }); /* detach parameters from component */ if (typeof this.__listener[params.id] === "undefined") throw _cs.exception("unlisten", "listener not found"); var listener = this.__listener[params.id]; delete this.__listener[params.id]; return listener; }, /* notify all listeners */ notify: function () { /* determine parameters */ var params = $cs.params("notify", arguments, { name: { pos: 0, req: true }, args: { pos: "...", def: [] }, matches: { def: function (p, l) { return p.name === l.name; } } /* customized matching */ }); /* notify all listeners */ for (var id in this.__listener) { if (_cs.isown(this.__listener, id)) { var listener = this.__listener[id]; if (params.matches(params, listener)) { var args = _cs.concat(listener.args, params.args); listener.func.apply(listener.ctx, args); } } } } } }); /* generic pattern: event */ $cs.pattern.event = $cs.clazz({ mixin: [ $cs.pattern.spec ], dynamics: { /* attributes */ target: $cs.attribute("target", null), /* target object the event is send to */ propagation: $cs.attribute("propagation", true), /* whether event propagation should continue */ processing: $cs.attribute("processing", true), /* whether final default event processing should be performed */ dispatched: $cs.attribute("dispatched", false), /* whether event was dispatched at least once to a subscriber */ decline: $cs.attribute("decline", false), /* whether event was declined by subscriber */ state: $cs.attribute("state", "targeting"), /* state of dispatching: capturing, targeting, spreading, bubbling */ result: $cs.attribute("result", undefined), /* optional result value event subscribers can provide */ async: $cs.attribute("async", false) /* whether event is dispatched asynchronously */ } }); /* event factory */ $cs.event = function () { /* determine parameters */ var params = $cs.params("event", arguments, { name: { pos: 0, req: true }, spec: { def: {} }, target: { pos: 1, req: true }, propagation: { pos: 2, def: true }, processing: { pos: 3, def: true }, dispatched: { pos: 4, def: false }, decline: { pos: 5, def: false }, state: { pos: 6, def: "targeting" }, result: { pos: 7, def: undefined }, async: { pos: 8, def: false } }); /* create new event */ var ev = new $cs.pattern.event(); /* configure event */ ev.name (params.name); ev.target (params.target); ev.propagation(params.propagation); ev.processing (params.processing); ev.dispatched (params.dispatched); ev.decline (params.decline); ev.state (params.state); ev.result (params.result); ev.spec (params.spec); ev.async (params.async); return ev; }; /* generic pattern: eventing */ $cs.pattern.eventing = $cs.trait({ dynamics: { __subscription: {} }, protos: { /* subscribe on an event */ subscribe: function () { /* determine parameters */ var params = $cs.params("subscribe", arguments, { name: { pos: 0, req: true }, spec: { def: {} }, ctx: { def: this }, func: { pos: 1, req: true }, args: { pos: "...", def: [] }, capturing: { def: false }, spreading: { def: false }, bubbling: { def: true }, noevent: { def: false }, exclusive: { def: false }, spool: { def: null } }); /* honor exclusive request */ var subscriptions = this._subscriptions(params.name, params.spec); if (subscriptions.length === 1 && subscriptions[0].exclusive) throw _cs.exception("subscribe", "existing exclusive subscription prevents additional one"); if (params.exclusive && subscriptions.length > 0) throw _cs.exception("subscribe", "non-exclusive subscription(s) prevent exclusive one"); /* attach parameters to component */ var id = _cs.cid(); this.__subscription[id] = params; /* optionally spool reverse operation */ if (params.spool !== null) { var info = _cs.spool_spec_parse(this, params.spool); info.comp.spool(info.name, this, "unsubscribe", id); } return id; }, /* unsubscribe from an event */ unsubscribe: function () { /* determine parameters */ var params = $cs.params("unsubscribe", arguments, { id: { pos: 0, req: true } }); /* detach parameters from component */ if (typeof this.__subscription[params.id] === "undefined") throw _cs.exception("unsubscribe", "subscription not found"); delete this.__subscription[params.id]; return; }, /* determine subscription existence */ subscription: function () { /* determine parameters */ var params = $cs.params("subscription", arguments, { id: { pos: 0, req: true } }); /* determine whether subscription exists */ return (typeof this.__subscription[params.id] !== "undefined"); }, /* determine subscriptions (internal) */ _subscriptions: function () { /* determine parameters */ var params = $cs.params("subscriptions", arguments, { name: { pos: 0, req: true }, spec: { pos: 1, def: {} } }); /* make an event for matching only */ var ev = $cs.event({ name: params.name, spec: params.spec, target: $cs.nop }); /* find and return all matching subscriptions */ var subscriptions = []; for (var id in this.__subscription) { if (!_cs.isown(this.__subscription, id)) continue; var s = this.__subscription[id]; if (ev.matches(s.name, s.spec)) subscriptions.push(s); } return subscriptions; }, /* publish an event */ publish: function () { var i; var self = this; /* determine parameters */ var params = $cs.params("publish", arguments, { name: { pos: 0, req: true }, spec: { def: {} }, async: { def: false }, capturing: { def: true }, spreading: { def: false }, bubbling: { def: true }, completed: { def: $cs.nop }, resultinit: { def: undefined }, resultstep: { def: function (a, b) { return b; } }, directresult: { def: false }, noresult: { def: false }, firstonly: { def: false }, silent: { def: false }, args: { pos: "...", def: [] } }); /* short-circuit processing (1/2) to speed up cases where no subscribers exist for a local event */ var short_circuit = false; if (!params.capturing && !params.spreading && !params.bubbling) { var subscribers = false; for (var id in this.__subscription) { if (!_cs.isown(this.__subscription, id)) continue; subscribers = true; break; } if (!subscribers) { if (params.noresult) return; else if (params.directresult) return params.resultinit; else short_circuit = true; } } /* create event */ var ev = $cs.event({ name: params.name, spec: params.spec, async: params.async, result: params.resultinit, target: self, propagation: true, processing: true, dispatched: false }); /* short-circuit processing (2/2) */ if (short_circuit) return ev; /* tracing */ if (!params.silent) { $cs.debug(1, "event:" + " " + ev.target().path("/") + ": publish:" + " name=" + ev.name() + " async=" + ev.async() + " capturing=" + params.capturing + " spreading=" + params.spreading + " bubbling=" + params.bubbling + " directresult=" + params.directresult + " noresult=" + params.noresult + " firstonly=" + params.firstonly ); } /* helper function for dispatching event to single component */ var event_dispatch_single = function (ev, comp, params, state) { for (var id in comp.__subscription) { if (!_cs.isown(comp.__subscription, id)) continue; var s = comp.__subscription[id]; if ( ( (state === "capturing" && s.capturing) || (state === "targeting" ) || (state === "spreading" && s.spreading) || (state === "bubbling" && s.bubbling )) && ev.matches(s.name, s.spec) ) { /* verbosity */ if (!params.silent) $cs.debug(1, "event: " + comp.path("/") + ": dispatch on " + state); /* further annotate event object */ ev.state(state); ev.decline(false); /* call subscription method */ var args = _cs.concat( s.noevent ? [] : [ ev ], s.args, params.args ); var result = s.func.apply(s.ctx, args); /* process return value */ if (s.noevent && _cs.isdefined(result)) ev.result(params.resultstep(ev.result(), result)); /* control the further dispatching */ if (!ev.decline()) { ev.dispatched(true); if (params.firstonly) ev.propagation(false); } } } }; /* helper function for dispatching event to all components on hierarchy path */ var event_dispatch_all = function (ev, comp, params) { /* determine component tree path */ var comp_path; if (params.capturing || params.bubbling) comp_path = comp.path(); /* phase 1: CAPTURING optionally dispatch event downwards from root component towards target component for capturing subscribers */ if (params.capturing) { for (i = comp_path.length - 1; i >= 1; i--) { event_dispatch_single(ev, comp_path[i], params, "capturing"); if (!ev.propagation()) break; } } /* phase 2: TARGETING dispatch event to target component */ if (ev.propagation()) event_dispatch_single(ev, comp, params, "targeting"); /* phase 3: SPREADING dispatch event to all descendant components */ if (params.spreading && ev.propagation()) { var visit = function (comp, isTarget) { var cont = true; if (!isTarget) { /* dispatch on non-target component */ event_dispatch_single(ev, comp, params, "spreading"); if (!ev.propagation()) { /* if propagation should stop, reset the flag again as in the spreading phase propagation stops only(!) for the particular sub-tree, not the propagation process as a whole! */ ev.propagation(true); cont = false; } } if (cont) { /* dispatch onto all direct child components */ var children = comp.children(); for (var i = 0; i < children.length; i++) visit(children[i], false); } }; visit(comp, true); } /* phase 4: BUBBLING dispatch event upwards from target component towards root component for bubbling (regular) subscribers */ if (params.bubbling && ev.propagation()) { for (i = 1; i < comp_path.length; i++) { event_dispatch_single(ev, comp_path[i], params, "bubbling"); if (!ev.propagation()) break; } } /* notify publisher on dispatch completion */ params.completed.call(comp, ev); }; /* perform event publishing, either asynchronous or synchronous */ if (ev.async()) /* global setTimeout:false */ setTimeout(_cs.hook("ComponentJS:settimeout:func", "pass", function () { event_dispatch_all(ev, self, params); }), 0); else event_dispatch_all(ev, self, params); /* return the event, directly the result value or no result value at all */ if (params.noresult) return; else if (params.directresult) return ev.result(); else return ev; } } }); /* generic pattern: command */ $cs.pattern.command = $cs.clazz({ mixin: [ $cs.pattern.observable ], dynamics: { /* standard attributes */ ctx: $cs.attribute("ctx", null), func: $cs.attribute("func", $cs.nop), args: $cs.attribute("args", []), async: $cs.attribute("async", false), /* usually observed attribute */ enabled: $cs.attribute({ name: "enabled", def: true, validate: function (v) { return typeof v === "boolean"; } }) }, protos: { /* method: execute the command */ execute: function (caller_args, caller_result) { if (!this.enabled()) return; var args = []; if (this.async()) { args.push(function (value) { if (typeof caller_result === "function") caller_result(value); }); } args = _cs.concat(args, this.args(), caller_args); return this.func().apply(this.ctx(), args); } } }); /* command factory */ $cs.command = function () { /* determine parameters */ var params = $cs.params("command", arguments, { ctx: { def: null }, func: { pos: 0, req: true }, args: { pos: "...", def: [] }, async: { def: false }, enabled: { def: true }, wrap: { def: false } }); /* create new command */ var cmd = new $cs.pattern.command(); /* configure command */ cmd.ctx (params.ctx); cmd.func (params.func); cmd.args (params.args); cmd.async (params.async); cmd.enabled(params.enabled); /* optionally wrap into convenient "execute" closure */ var result = cmd; if (params.wrap) { result = function () { var args = _cs.concat(arguments); var cb = null; if (arguments.callee.command.async()) cb = args.pop(); return arguments.callee.command.execute.call(arguments.callee.command, args, cb); }; result.command = cmd; } return result; }; /* component states */ _cs.states = [ { /* component is not existing (bootstrapping state transitions only) */ enter: null, leave: null, state: "dead", color: "#000000" } ]; /* clear all state transitions (except for "dead" state) */ _cs.states_clear = function () { _cs.states = _cs.slice(_cs.states, 0, 1); return; }; /* add a state transition */ _cs.states_add = function (target, enter, leave, color, source) { /* create new state configuration */ var state = { enter: enter, leave: leave, state: target, color: color }; /* determine storage position */ var pos = 1; while (pos < _cs.states.length) { if ( source !== null && _cs.states[pos].state === source) break; pos++; } /* store state */ _cs.states.splice(pos, 0, state); }; /* determine state index via state name */ _cs.state_name2idx = function (name) { var idx = -1; var i; for (i = 0; i < _cs.states.length; i++) { if (_cs.states[i].state === name) { idx = i; break; } } return idx; }; /* perform a state enter/leave method call */ _cs.state_method_call = function (type, comp, method) { var result = true; var obj = comp.obj(); if (obj !== null && typeof obj[method] === "function") { var info = { type: type, comp: comp, method: method, ctx: obj, func: obj[method] }; _cs.hook("ComponentJS:state-method-call", "none", info); result = info.func.call(info.ctx); } return result; }; /* set of current state transition requests (modeled via a map to the components) */ _cs.state_requests = {}; /* spawn all progression runs (asynchronously) */ _cs.state_progression = function () { /* global setTimeout:false */ setTimeout(_cs.hook("ComponentJS:settimeout:func", "pass", function () { /* try to process the transition requests */ var remove = []; for (var cid in _cs.state_requests) { if (!_cs.isown(_cs.state_requests, cid)) continue; var req = _cs.state_requests[cid]; if (_cs.state_progression_single(req)) remove.push(cid); } /* perform deferred removal of original fields */ _cs.foreach(remove, function (cid) { delete _cs.state_requests[cid]; }); /* give plugins a chance to react */ _cs.hook("ComponentJS:state-change", "none"); }), 0); }; /* execute single progression run */ _cs.state_progression_single = function (req) { var done = false; _cs.state_progression_run(req.comp, req.state); if (_cs.states[req.comp.__state].state === req.state) { if (typeof req.callback === "function") req.callback.call(req.comp, req.state); done = true; } return done; }; /* perform a single synchronous progression run for a particular component */ _cs.state_progression_run = function (comp, arg, _direction) { var i, children; var state, enter, leave, spooled; /* handle optional argument (USED INTERNALLY ONLY) */ if (typeof _direction === "undefined") _direction = "upward-and-downward"; /* determine index of state by name */ var state_new = _cs.state_name2idx(arg); if (state_new === -1) throw _cs.exception("state", "invalid argument \"" + arg + "\""); /* perform upward/downward state transition(s) */ if (comp.__state < state_new) { /* transition to higher state */ while (comp.__state < state_new) { /* determine names of state and enter method */ state = _cs.states[comp.__state + 1].state; enter = _cs.states[comp.__state + 1].enter; /* mandatory transition parent component to higher state first */ if (comp.parent() !== null) { if (comp.parent().state_compare(state) < 0) { _cs.state_progression_run(comp.parent(), state, "upward"); /* RECURSION */ if (comp.parent().state_compare(state) < 0) { $cs.debug(1, "state: " + comp.path("/") + ": transition (increase) " + "REJECTED BY PARENT COMPONENT (" + comp.parent().path("/") + "): " + "@" + _cs.states[comp.__state].state + " --(" + enter + ")--> " + "@" + _cs.states[comp.__state + 1].state + ": SUSPENDING CURRENT TRANSITION RUN" ); return; } } } /* transition current component to higher state second */ if (_cs.isdefined(comp.__state_guards[enter])) { $cs.debug(1, "state: " + comp.path("/") + ": transition (increase) REJECTED BY ENTER GUARD: " + "@" + _cs.states[comp.__state].state + " --(" + enter + ")--> " + "@" + _cs.states[comp.__state + 1].state + ": SUSPENDING CURRENT TRANSITION RUN" ); return; } comp.__state++; $cs.debug(1, "state: " + comp.path("/") + ": transition (increase): " + "@" + _cs.states[comp.__state - 1].state + " --(" + enter + ")--> " + "@" + _cs.states[comp.__state].state ); _cs.hook("ComponentJS:state-invalidate", "none", "states"); _cs.hook("ComponentJS:state-change", "none"); /* execute enter method */ if (_cs.state_method_call("enter", comp, enter) === false) { /* FULL STOP: state enter method rejected state transition */ $cs.debug(1, "state: " + comp.path("/") + ": transition (increase) REJECTED BY ENTER METHOD: " + "@" + _cs.states[comp.__state - 1].state + " --(" + enter + ")--> " + "@" + _cs.states[comp.__state].state + ": SUSPENDING CURRENT TRANSITION RUN" ); comp.__state--; return; } /* notify subscribers about new state */ comp.publish({ name: "ComponentJS:state:" + _cs.states[comp.__state].state, noresult: true, capturing: false, spreading: false, bubbling: false, async: true, silent: true }); /* optionally automatically transition child component(s) to higher state third */ if (_direction === "upward-and-downward" || _direction === "downward") { children = comp.children(); for (i = 0; i < children.length; i++) { if (children[i].state_compare(state) < 0) { if ( children[i].state_auto_increase() || children[i].property("ComponentJS:state-auto-increase") === true) { _cs.state_progression_run(children[i], state, "downward"); /* RECURSION */ if (children[i].state_compare(state) < 0) { /* enqueue state transition for child */ _cs.state_requests[children[i].id()] = { comp: children[i], state: state }; _cs.hook("ComponentJS:state-invalidate", "none", "requests"); _cs.hook("ComponentJS:state-change", "none"); } } } } } } } else if (comp.__state > state_new) { /* transition to lower state */ while (comp.__state > state_new) { /* determine names of state and leave method */ state = _cs.states[comp.__state].state; leave = _cs.states[comp.__state].leave; var state_lower = _cs.states[comp.__state - 1].state; /* mandatory transition children component(s) to lower state first */ children = comp.children(); for (i = 0; i < children.length; i++) { if (children[i].state_compare(state_lower) > 0) { _cs.state_progression_run(children[i], state_lower, "downward"); /* RECURSION */ if (children[i].state_compare(state_lower) > 0) { $cs.debug(1, "state: " + comp.path("/") + ": transition (decrease) " + "REJECTED BY CHILD COMPONENT (" + children[i].path("/") + "): " + "@" + _cs.states[comp.__state - 1].state + " <--(" + leave + ")-- " + "@" + _cs.states[comp.__state].state + ": SUSPENDING CURRENT TRANSITION RUN" ); return; } } } /* transition current component to lower state second */ if (_cs.isdefined(comp.__state_guards[leave])) { $cs.debug(1, "state: " + comp.path("/") + ": transition (decrease) REJECTED BY LEAVE GUARD: " + "@" + _cs.states[comp.__state - 1].state + " <--(" + leave + ")-- " + "@" + _cs.states[comp.__state].state + ": SUSPENDING CURRENT TRANSITION RUN" ); return; } comp.__state--; $cs.debug(1, "state: " + comp.path("/") + ": transition (decrease): " + "@" + _cs.states[comp.__state].state + " <--(" + leave + ")-- " + "@" + _cs.states[comp.__state + 1].state ); _cs.hook("ComponentJS:state-invalidate", "none", "states"); _cs.hook("ComponentJS:state-change", "none"); /* execute leave method */ if (_cs.state_method_call("leave", comp, leave) === false) { /* FULL STOP: state leave method rejected state transition */ $cs.debug(1, "state: " + comp.path("/") + ": transition (decrease) REJECTED BY LEAVE METHOD: " + "@" + _cs.states[comp.__state].state + " <--(" + leave + ")-- " + "@" + _cs.states[comp.__state + 1].state + ": SUSPENDING CURRENT TRANSITION RUN" ); comp.__state++; return; } else { /* in case leave method successful or not present automatically unspool still pending actions on spool named exactly like the left state */ spooled = comp.spooled(state); if (spooled > 0) { $cs.debug(1, "state: " + comp.path("/") + ": auto-unspooling " + spooled + " operation(s)"); comp.unspool(state); } } /* notify subscribers about new state */ comp.publish({ name: "ComponentJS:state:" + _cs.states[comp.__state].state, noresult: true, capturing: false, spreading: false, bubbling: false, async: true, silent: true }); /* optionally automatically transition parent component to lower state third */ if (_direction === "upward-and-downward" || _direction === "upward") { if (comp.parent() !== null) { if (comp.parent().state_compare(state_lower) > 0) { if ( comp.parent().state_auto_decrease() || comp.parent().property("ComponentJS:state-auto-decrease") === true) { _cs.state_progression_run(comp.parent(), state_lower, "upward"); /* RECURSION */ if (comp.parent().state_compare(state_lower) > 0) { /* enqueue state transition for parent */ _cs.state_requests[comp.parent().id()] = { comp: comp.parent(), state: state_lower }; _cs.hook("ComponentJS:state-invalidate", "none", "requests"); _cs.hook("ComponentJS:state-change", "none"); } } } } } } } }; /* generic pattern for state management */ $cs.pattern.state = $cs.trait({ mixin: [ $cs.pattern.tree ], dynamics: { /* attributes */ __state: 0, /* = dead */ __state_guards: {}, state_auto_increase: $cs.attribute("state_auto_increase", false), state_auto_decrease: $cs.attribute("state_auto_decrease", false) }, protos: { /* get state or set state (or at least trigger transition) */ state: function () { /* special case: just retrieve current state */ var state_old = _cs.states[this.__state].state; if (arguments.length === 0) return state_old; /* determine parameters */ var params = $cs.params("state", arguments, { state: { pos: 0, req: true, valid: function (s) { return _cs.state_name2idx(s) !== -1; } }, callback: { pos: 1, def: undefined }, sync: { def: false } }); /* if requested state is still not reached... */ if (_cs.states[this.__state].state !== params.state) { var enqueue = true; var request = { comp: this, state: params.state, callback: params.callback }; if (params.sync) { /* perform new state transition request (synchronously) */ if (_cs.state_progression_single(request)) enqueue = false; } if (enqueue) { /* enqueue new state transition request and trigger state transition progression (asynchronously) */ _cs.state_requests[this.id()] = request; _cs.hook("ComponentJS:state-invalidate", "none", "requests"); _cs.state_progression(); } } else { /* still run its optional callback function */ if (typeof params.callback === "function") params.callback.call(this, params.state); } /* return old (and perhaps still current) state */ return state_old; }, /* compare state of component */ state_compare: function () { /* determine parameters */ var params = $cs.params("state", arguments, { state: { pos: 0, req: true, valid: function (s) { return _cs.state_name2idx(s) !== -1; } } }); /* determine index of state by name */ var state = _cs.state_name2idx(params.state); /* compare given state against state of component */ return (this.__state - state); }, /* guard a state enter/leave method */ guard: function () { /* determine parameters */ var params = $cs.params("guard", arguments, { method: { pos: 0, valid: "string", req: true }, level: { pos: 1, valid: "number", req: true } }); /* sanity check enter/leave method name */ var valid = false; var i; for (i = 0; i < _cs.states.length; i++) { if ( _cs.states[i].enter === params.method || _cs.states[i].leave === params.method) { valid = true; break; } } if (!valid) throw _cs.exception("guard", "no such declared enter/leave method: \"" + params.method + "\""); /* ensure the guard slot exists */ if (!_cs.isdefined(this.__state_guards[params.method])) this.__state_guards[params.method] = 0; /* activate/deactivate guard */ var deactivate = false; if (params.level > 0) /* increase guard level */ this.__state_guards[params.method] += params.level; else if (params.level < 0) { /* decrease guard level */ if (this.__state_guards[params.method] < (-params.level)) throw _cs.exception("guard", "guard level decrease request too large"); this.__state_guards[params.method] += params.level; if (this.__state_guards[params.method] === 0) deactivate = true; } else { /* reset guard level */ this.__state_guards[params.method] = 0; deactivate = true; } if (deactivate) { /* finally deactivate guard */ delete this.__state_guards[params.method]; /* give all pending state transitions (which now might proceed) a chance */ _cs.state_progression(); } } } }); /* generic pattern: service */ $cs.pattern.service = $cs.trait({ mixin: [ $cs.pattern.eventing ], protos: { /* register a service */ register: function () { /* determine parameters */ var params = $cs.params("register", arguments, { name: { pos: 0, req: true }, ctx: { def: this }, func: { pos: 1, req: true }, args: { pos: "...", def: [] }, spool: { def: null }, capturing: { def: false }, spreading: { def: false }, bubbling: { def: true } }); /* create command object to wrap service */ var cmd = $cs.command({ ctx: params.ctx, func: params.func, args: params.args, wrap: true }); /* publish changes to command's callable status */ cmd.command.listen({ name: "attribute:set:enabled", args: [ this, params.name ], func: function (comp, name, value_new, value_old) { comp.publish({ name: "ComponentJS:service:" + name + ":callable", args: [ value_new, value_old ], capturing: false, spreading: false, bubbling: false, async: true, noresult: true }); } }); /* subscribe to service event */ var id = this.subscribe({ name: "ComponentJS:service:" + params.name, ctx: params.ctx, func: cmd, noevent: true, capturing: params.capturing, spreading: params.spreading, bubbling: params.bubbling, exclusive: true }); /* optionally spool reverse operation */ if (params.spool !== null) { var info = _cs.spool_spec_parse(this, params.spool); info.comp.spool(info.name, this, "unregister", id); } return id; }, /* determine registration existence */ registration: function () { /* determine parameters */ var params = $cs.params("registration", arguments, { id: { pos: 0, req: true } }); /* determine whether registration exists */ return this.subscription(params.id); }, /* unregister a service */ unregister: function () { /* determine parameters */ var params = $cs.params("unregister", arguments, { id: { pos: 0, req: true } }); /* unsubscribe from service event */ this.unsubscribe(params.id); return; }, /* make a service callable (enable/disable it) */ callable: function () { /* determine parameters */ var params = $cs.params("callable", arguments, { name: { pos: 0, req: true }, value: { pos: 1, def: undefined } }); /* find service command */ var subscriptions = this._subscriptions(params.name); if (subscriptions.length !== 1) return undefined; var cmd = subscriptions[0].func().command; /* get or set "enabled" attribute */ return cmd.enabled(params.value); }, /* call a service */ call: function () { /* determine parameters */ var params = $cs.params("call", arguments, { name: { pos: 0, req: true }, args: { pos: "...", def: [] }, capturing: { def: false }, spreading: { def: false }, bubbling: { def: true } }); /* dispatch service event onto target component */ var ev = this.publish({ name: "ComponentJS:service:" + params.name, args: params.args, capturing: params.capturing, spreading: params.spreading, bubbling: params.bubbling, firstonly: true, async: false }); /* ensure that the service event was successfully dispatched at least once (or our result value would have no meaning) */ if (!ev.dispatched()) throw _cs.exception("call", "no such registered service found:" + " \"" + params.name + "\""); /* return the result value */ return ev.result(); } } }); /* generic pattern: shadow object */ $cs.pattern.shadow = $cs.trait({ dynamics: { __obj: null }, protos: { /* get/set corresponding object */ obj: function (obj) { if (typeof obj === "undefined") /* get current object */ return this.__obj; else if (typeof obj === "object") { /* set new object */ if (obj !== null) { _cs.annotation(obj, "comp", this); this.__obj = obj; } else { if (this.__obj !== null) _cs.annotation(this.__obj, "comp", null); this.__obj = null; } } else throw _cs.exception("obj", "invalid argument"); return this; }, /* get/set attribute in corresponding object */ access: function (name, value) { /* sanity check scenario */ if (typeof name === "undefined") throw _cs.exception("access", "no attribute name given"); var obj = this.obj(); if (obj === null) throw _cs.exception("access", "still no object attached"); if (typeof obj[name] === "undefined") throw _cs.exception("access", "invalid attribute \"" + name + "\""); /* access the attribute */ var value_old = obj[name]; if (typeof value !== "undefined") obj[name] = value; return value_old; }, /* invoke method on corresponding object */ invoke: function (name) { /* sanity check scenario */ if (typeof name === "undefined") throw _cs.exception("invoke", "no method name given"); var obj = this.obj(); if (obj === null) throw _cs.exception("invoke", "still no object attached"); if (typeof obj[name] === "undefined") throw _cs.exception("invoke", "invalid method \"" + name + "\""); if (_cs.istypeof(obj[name]) !== "function") throw _cs.exception("invoke", "anything named \"" + name + "\" existing, but not a function"); /* call method */ var args = _cs.slice(arguments, 1); return obj[name].apply(obj, args); } } }); /* generic pattern: socket */ $cs.pattern.socket = $cs.trait({ mixin: [ $cs.pattern.tree, $cs.pattern.property ], dynamics: { __sockets: {}, __plugs: {} }, protos: { /* define a socket */ socket: function () { /* determine parameters */ var params = $cs.params("socket", arguments, { name: { def: "default" }, scope: { def: null }, ctx: { pos: 0, req: true }, plug: { pos: 1, req: true }, unplug: { pos: 2, req: true }, spool: { def: null } }); /* sanity check parameters */ if ( _cs.istypeof(params.plug) === "string" && _cs.istypeof(params.ctx[params.plug]) !== "function") throw _cs.exception("socket", "no plug method named \"" + params.plug + "\" found on context object"); else if ( _cs.istypeof(params.plug) !== "string" && _cs.istypeof(params.plug) !== "function") throw _cs.exception("socket", "plug operation neither method name nor function"); if ( _cs.istypeof(params.unplug) === "string" && _cs.istypeof(params.ctx[params.unplug]) !== "function") throw _cs.exception("socket", "no unplug method named \"" + params.unplug + "\" found on context object"); else if ( _cs.istypeof(params.unplug) !== "string" && _cs.istypeof(params.unplug) !== "function") throw _cs.exception("socket", "unplug operation neither method name nor function"); /* remember parameters as (optionally scoped) component property */ var name = "ComponentJS:socket:" + params.name; if (params.scope !== null) name += "@" + params.scope; $cs(this).property(name, params); /* remember socket under an id */ var id = _cs.cid(); this.__sockets[id] = name; /* optionally spool reverse operation */ if (params.spool !== null) { var info = _cs.spool_spec_parse(this, params.spool); info.comp.spool(info.name, this, "unsocket", id); } return id; }, /* destroy a socket */ unsocket: function () { /* determine parameters */ var params = $cs.params("unsocket", arguments, { id: { pos: 0, req: true } }); /* remove parameters from component */ if (typeof this.__sockets[params.id] === "undefined") throw _cs.exception("unsocket", "socket not found"); /* remove corresponding property */ var name = this.__sockets[params.id]; $cs(this).property(name, null); /* remove socket information */ delete this.__sockets[params.id]; return; }, /* create a linking/pass-through socket */ link: function () { /* determine parameters */ var params = $cs.params("link", arguments, { name: { def: "default" }, scope: { def: null }, target: { pos: 0, req: true }, socket: { pos: 1, req: true }, spool: { def: null } }); /* create a socket and pass-through the plug/unplug operations to the target */ return this.socket({ name: params.name, scope: params.scope, spool: params.spool, ctx: {}, plug: function (obj) { var id = _cs.annotation(obj, "link"); if (id !== null) throw _cs.exception("link:plug: cannot plug, you have to unplug first"); id = $cs(params.target).plug({ name: params.socket, object: obj, targeting: true }); _cs.annotation(obj, "link", id); }, unplug: function (obj) { var id = _cs.annotation(obj, "link"); if (id === null) throw _cs.exception("link:unplug: cannot unplug, you have to plug first"); $cs(params.target).unplug({ id: id, targeting: true }); _cs.annotation(obj, "link", null); } }); }, /* destroy a link */ unlink: function () { /* determine parameters */ var params = $cs.params("unlink", arguments, { id: { pos: 0, req: true } }); return this.unsocket(params.id); }, /* plug into a defined socket */ plug: function () { /* determine parameters */ var params = $cs.params("plug", arguments, { name: { def: "default" }, object: { pos: 0, req: true }, spool: { def: null }, targeting: { def: false } }); /* remember plug operation */ var id = _cs.cid(); this.__plugs[id] = params; /* pass-though operation to common helper function */ _cs.plugger("plug", this, params.name, params.object, params.targeting); /* optionally spool reverse operation */ if (params.spool !== null) { var info = _cs.spool_spec_parse(this, params.spool); info.comp.spool(info.name, this, "unplug", id); } return id; }, /* unplug from a defined socket */ unplug: function () { /* determine parameters */ var params = $cs.params("unplug", arguments, { id: { pos: 0, req: true }, targeting: { def: false } }); /* determine plugging information */ if (typeof this.__plugs[params.id] === "undefined") throw _cs.exception("unplug", "plugging not found"); var name = this.__plugs[params.id].name; var object = this.__plugs[params.id].object; /* pass-though operation to common helper function */ _cs.plugger("unplug", this, name, object, params.targeting); /* remove plugging */ delete this.__plugs[params.id]; return; } } }); /* internal "plug/unplug to socket" helper functionality */ _cs.plugger = function (op, origin, name, object, targeting) { /* resolve the socket property on the parents components NOTICE 1: we explicitly skip the origin component here as resolving the socket property also on the origin component might otherwise return the potentially existing socket for the child components of the orgin component. NOTICE 2: we intentionally skip the origin and do not directly resolve on the parent component as we want to take scoped sockets (on the parent component) into account! */ var property = "ComponentJS:socket:" + name; var socket = origin.property({ name: property, targeting: targeting }); if (!_cs.isdefined(socket)) throw _cs.exception(op, "no socket found on parent component(s)"); /* determine the actual component owning the socket (for logging purposes only) */ var owner = origin.property({ name: property, targeting: targeting, returnowner: true }); $cs.debug(1, "socket: " + owner.path("/") + ": " + name + " <--(" + op + ")-- " + origin.path("/")); /* perform plug/unplug operation */ if (_cs.istypeof(socket[op]) === "string") socket.ctx[socket[op]].call(socket.ctx, object, origin); else if (_cs.istypeof(socket[op]) === "function") socket[op].call(socket.ctx, object, origin); else throw _cs.exception(op, "failed to perform \"" + op + "\" operation"); }; /* utility function: mark a component */ $cs.mark = function (obj, name) { var marker = _cs.annotation(obj, "marker"); if (marker === null) marker = {}; marker[name] = true; _cs.annotation(obj, "marker", marker); }; /* utility function: determine whether a component is marked */ $cs.marked = function (obj, name) { var marker = _cs.annotation(obj, "marker"); if (marker === null) marker = {}; return (marker[name] === true); }; /* generic pattern for marking components */ $cs.pattern.marker = $cs.trait({ protos: { mark: function (name) { $cs.mark(this.obj(), name); }, marked: function (name) { return $cs.marked(this.obj(), name); } } }); /* convenient marker traits */ $cs.marker = { service: $cs.trait({ cons: function () { $cs.mark(this, "service"); } }), controller: $cs.trait({ cons: function () { $cs.mark(this, "controller"); } }), model: $cs.trait({ cons: function () { $cs.mark(this, "model"); } }), view: $cs.trait({ cons: function () { $cs.mark(this, "view"); } }) }; /* load store via optional plugin */ _cs.store_load = function (comp) { if (comp.__store === null) { _cs.hook("ComponentJS:store-load", "none", comp); if ( comp.__store === null || typeof comp.__store !== "object") comp.__store = {}; } }; /* save store via optional plugin */ _cs.store_save = function (comp) { if (comp.__store !== null) _cs.hook("ComponentJS:store-save", "none", comp); }; /* generic pattern for store management */ $cs.pattern.store = $cs.trait({ dynamics: { __store: null }, protos: { store: function () { var key, val; if (arguments.length === 0) { /* get all keys */ _cs.store_load(this); var keys = []; for (key in this.__store) keys.push(key); return keys; } else if (arguments.length === 1 && arguments[0] === null) { /* clear store */ this.__store = {}; _cs.store_save(this); return null; } else if (arguments.length === 1 && typeof arguments[0] === "string") { /* get value */ _cs.store_load(this); key = arguments[0]; if (typeof this.__store[key] === "undefined") return null; else return this.__store[key]; } else if (arguments.length === 2 && arguments[1] === null) { /* delete value */ _cs.store_load(this); key = arguments[0]; delete this.__store[key]; _cs.store_save(this); return null; } else if (arguments.length === 2) { /* set value */ _cs.store_load(this); key = arguments[0]; val = arguments[1]; this.__store[key] = val; _cs.store_save(this); return val; } else throw _cs.exception("store", "invalid argument(s)"); } } }); /* generic pattern for model management */ $cs.pattern.model = $cs.trait({ protos: { /* define model */ model: function () { /* determine parameters */ var params = $cs.params("model", arguments, { model: { pos: 0, def: null } }); /* simplify further processing */ var model = params.model; if (model === null) model = undefined; /* sanity check model */ var name; if (_cs.isdefined(model)) { for (name in model) { if (typeof model[name].value === "undefined") model[name].value = ""; if (typeof model[name].valid === "undefined") model[name].valid = "string"; if (typeof model[name].autoreset === "undefined") model[name].autoreset = false; if (typeof model[name].store === "undefined") model[name].store = false; for (var key in model[name]) { if (key !== "value" && key !== "valid" && key !== "autoreset" && key !== "store") throw _cs.exception("model", "invalid specification key \"" + key + "\" in specification of model field \"" + name + "\""); } if (!$cs.validate(model[name].value, model[name].valid)) throw _cs.exception("model", "model field \"" + name + "\" has " + "default value " + _cs.json(model[name].value) + ", which does not validate " + "against validation \"" + model[name].valid + "\""); } } /* try to load stored model values */ var store = this.store("model"); if (store !== null) { if (_cs.isdefined(model)) { for (name in model) { if (model[name].store) { if (_cs.isdefined(store[name])) model[name].value = store[name]; } } } } /* retrieve old model */ var model_old = this.property({ name: "ComponentJS:model", bubbling: false }); /* store model */ if (_cs.isdefined(model)) { if (_cs.isdefined(model_old)) { /* merge model into existing one */ var model_new = {}; _cs.extend(model_new, model_old); _cs.extend(model_new, model); this.property("ComponentJS:model", model_new); model = model_new; } else { /* set initial model */ this.property("ComponentJS:model", model); } /* optionally save stored model values */ store = {}; var save = false; for (name in model) { if (model[name].store) { store[name] = model[name].value; save = true; } } if (save) this.store("model", store); } /* return old model */ return model_old; }, /* get/set model value */ value: function () { /* determine parameters */ var params = $cs.params("value", arguments, { name: { pos: 0, req: true }, value: { pos: 1, def: undefined }, force: { pos: 2, def: false }, returnowner: { def: false } }); /* determine component owning model with requested value */ var owner = null; var model = null; var comp = this; while (comp !== null) { owner = comp.property({ name: "ComponentJS:model", returnowner: true }); if (!_cs.isdefined(owner)) throw _cs.exception("value", "no model found containing value \"" + params.name + "\""); model = owner.property("ComponentJS:model"); if (_cs.isdefined(model[params.name])) break; comp = owner.parent(); } if (comp === null) throw _cs.exception("value", "no model found containing value \"" + params.name + "\""); /* get new model value */ var value_new = params.value; /* get old model value */ var ev; var value_old = model[params.name].value; var result; if (typeof value_new === "undefined") { if (owner.property({ name: "ComponentJS:model:subscribers:get", bubbling: false }) === true) { /* send event to observers for value get and allow observers to reject value get operation and/or change old value to get */ ev = owner.publish({ name: "ComponentJS:model:" + params.name + ":get", args: [ value_old ], capturing: false, spreading: false, bubbling: false, async: false }); if (ev.processing()) { /* re-fetch value from model (in case the callback set a new value directly) */ value_old = model[params.name].value; /* allow value to be overridden by event result */ result = ev.result(); if (typeof result !== "undefined") value_old = result; } } } /* optionally set new model value */ if ( typeof value_new !== "undefined" && (params.force || value_old !== value_new)) { /* check validity of new value */ if (!$cs.validate(value_new, model[params.name].valid)) throw _cs.exception("value", "model field \"" + params.name + "\" receives " + "new value " + _cs.json(value_new) + ", which does not validate " + "against validation \"" + model[params.name].valid + "\""); /* send event to observers for value set operation and allow observers to reject value set operation and/or change new value to set */ var cont = true; if (owner.property({ name: "ComponentJS:model:subscribers:set", bubbling: false }) === true) { ev = owner.publish({ name: "ComponentJS:model:" + params.name + ":set", args: [ value_new, value_old ], capturing: false, spreading: false, bubbling: false, async: false }); if (!ev.processing()) cont = false; else { /* allow value to be overridden */ result = ev.result(); if (typeof result !== "undefined") value_new = result; } } if (cont && !model[params.name].autoreset) { /* set value in model */ model[params.name].value = value_new; /* synchronize model with underlying store */ if (model[params.name].store) { var store = owner.store("model"); store[params.name] = model[params.name].value; owner.store("model", store); } /* send event to observers after value finally changed */ if (owner.property({ name: "ComponentJS:model:subscribers:changed", bubbling: false }) === true) { owner.publish({ name: "ComponentJS:model:" + params.name + ":changed", args: [ value_new, value_old ], noresult: true, capturing: false, spreading: false, bubbling: false, async: true }); } } } /* return old model value */ return (params.returnowner ? owner : value_old); }, /* touch a model value and trigger event */ touch: function () { /* determine parameters */ var params = $cs.params("touch", arguments, { name: { pos: 0, req: true } }); /* simply force value to same value in order to trigger event */ this.value({ name: params.name, value: this.value(params.name), force: true }); }, /* start observing model value change */ observe: function () { /* determine parameters */ var params = $cs.params("observe", arguments, { name: { pos: 0, req: true }, func: { pos: 1, req: true }, touch: { def: false }, operation: { def: "set" }, spool: { def: null } }); /* determine the actual component owning the model as we want to subscribe the change event there only */ var owner = null; var model = null; var comp = this; while (comp !== null) { owner = comp.property({ name: "ComponentJS:model", returnowner: true }); if (!_cs.isdefined(owner)) throw _cs.exception("observe", "no model found containing value \"" + params.name + "\""); model = owner.property("ComponentJS:model"); if (_cs.isdefined(model[params.name])) break; comp = owner.parent(); } if (comp === null) throw _cs.exception("observe", "no model found containing value \"" + params.name + "\""); /* subscribe to model value change event */ var id = owner.subscribe({ name: "ComponentJS:model:" + params.name + ":" + params.operation, capturing: false, spreading: false, bubbling: false, func: params.func }); /* mark component for having subscribers of operation (for performance optimization reasons) */ owner.property("ComponentJS:model:subscribers:" + params.operation, true); /* optionally spool reverse operation */ if (params.spool !== null) { var info = _cs.spool_spec_parse(this, params.spool); info.comp.spool(info.name, this, "unobserve", id); } /* if requested, touch the model value once (for an initial observer run) */ if (params.touch) this.touch(params.name); return id; }, /* stop observing model value change */ unobserve: function () { /* determine parameters */ var params = $cs.params("unobserve", arguments, { id: { pos: 0, req: true } }); /* determine the actual component owning the model as we want to unsubscribe the change event there only */ var owner = null; var comp = this; while (comp !== null) { owner = comp.property({ name: "ComponentJS:model", returnowner: true }); if (!_cs.isdefined(owner)) throw _cs.exception("unobserve", "no model subscription found"); if (owner.subscription(params.id)) break; comp = owner.parent(); } if (comp === null) throw _cs.exception("unobserve", "no model subscription found"); /* subscribe to model value change event */ owner.unsubscribe(params.id); } } }); /* ** COMPONENT API */ /* component class definition (placeholder) */ _cs.comp = null; /* singleton component instances (placeholder) */ _cs.none = null; _cs.root = null; /* component mixins (default) */ _cs.comp_mixins = [ $cs.pattern.id, $cs.pattern.name, $cs.pattern.tree, $cs.pattern.config, $cs.pattern.spool, $cs.pattern.state, $cs.pattern.service, $cs.pattern.eventing, $cs.pattern.property, $cs.pattern.shadow, $cs.pattern.socket, $cs.pattern.model, $cs.pattern.store, $cs.pattern.marker ]; /* component constructor */ _cs.comp_cons = function (name, parent, children) { /* component marking */ _cs.annotation(this, "type", "component"); if (_cs.istypeof(name) !== "string") name = "<unknown>"; this.name(name); /* component tree and object attachment */ this.parent(_cs.istypeof(parent) === "object" ? parent : null); this.children(_cs.istypeof(children) === "array" ? children : []); }; /* component prototype methods */ _cs.comp_protos = { /* create a sub-component */ create: function () { return $cs.create.apply(this, _cs.concat([ this ], arguments)); }, /* destroy sub-component (or just this component) */ destroy: function () { return $cs.destroy.apply(this, _cs.concat([ this ], arguments)); }, /* check for existance of a component */ exists: function () { return (this.name() !== "<none>"); } }; /* internal bootstrapping flag */ _cs.bootstrapped = false; /* initialize library */ $cs.bootstrap = function () { /* sanity check environment */ if (_cs.bootstrapped) throw _cs.exception("bootstrap", "library already bootstrapped"); /* give plugins a chance to modify the component class definition */ _cs.hook("ComponentJS:bootstrap:comp:mixin", "none", _cs.comp_mixins); _cs.hook("ComponentJS:bootstrap:comp:protos", "none", _cs.comp_protos); /* lazy define component class (to give plugins a chance to have added mixins) */ _cs.comp = $cs.clazz({ mixin: _cs.comp_mixins, cons: _cs.comp_cons, protos: _cs.comp_protos }); /* create singleton component: root of the tree */ _cs.root = new _cs.comp("<root>", null, []); /* create singleton component: special return value on lookups */ _cs.none = new _cs.comp("<none>", null, []); /* reasonable error catching for _cs.none usage ATTENTION: method "exists" intentionally is missing here, because it is required to be called on _cs.none, of course! */ var methods = [ "call", "callable", "create", "destroy", "guard", "hook", "invoke", "latch", "link", "model", "observe", "plug", "property", "publish", "register", "registration", "socket", "spool", "spooled", "state", "state_compare", "store", "subscribe", "subscription", "touch", "unlatch", "unobserve", "unplug", "unregister", "unspool", "unsubscribe", "value" ]; _cs.foreach(methods, function (method) { _cs.none[method] = function () { throw _cs.exception(method, "no such component " + "(you are calling method \"" + method + "\" on component \"<none>\")"); }; }); /* give plugins a chance to bootstrap, too */ _cs.hook("ComponentJS:bootstrap", "none"); /* set new state */ _cs.bootstrapped = true; return; }; /* shutdown library */ $cs.shutdown = function () { /* sanity check environment */ if (!_cs.bootstrapped) throw _cs.exception("shutdown", "library still not bootstrapped"); /* give plugins a chance to shutdown, too */ _cs.hook("ComponentJS:shutdown", "none"); /* tear down the whole component tree */ _cs.foreach(_cs.root.children(), function (child) { child.destroy(); }); _cs.root.state({ state: "dead", sync: true }); /* destroy singleton "<none>" component */ _cs.none = null; /* destroy singleton "<root>" component */ _cs.root = null; /* destroy component class */ _cs.comp = null; /* set new state */ _cs.bootstrapped = false; return; }; /* lookup component by path */ _cs.lookup = function (base, path) { /* handle special calling conventions */ if (arguments.length === 1) { if (_cs.istypeof(arguments[0]) === "string") { /* special calling via path only: $cs("foo") -> $cs(_cs.root, "foo") */ path = base; base = _cs.root; } else /* special calling via base only: $cs(this) -> $cs(this, "") */ path = ""; } /* handle special cases for path in advance */ if (typeof path !== "string") return _cs.none; else if (path === "<root>") return _cs.root; else if (path === "<none>") return _cs.none; /* bootstrap component matching */ var comp; if (path.substr(0, 1) === "/") { /* ignore base */ comp = _cs.root; path = path.substring(1); } else { /* use base */ var base_type = _cs.istypeof(base); var base_comp = _cs.annotation(base, "comp"); if (base_type !== "component" && base_comp !== null) /* success: found component object via shadow object */ comp = base_comp; else if (base_type !== "component") /* failure: found other object which is not already component */ throw _cs.exception("lookup", "invalid base component (type is \"" + base_type + "\")"); else /* success: found component object */ comp = base; } if (path !== "") { /* lookup components */ var comps = []; _cs.lookup_step(comps, comp, path.split("/"), 0); /* post-process component result set */ if (comps.length === 0) /* no component found */ comp = _cs.none; else if (comps.length === 1) /* single and hence unambitous component found */ comp = comps[0]; else { /* more than one result found: try to reduce duplicates first */ var seen = {}; comps = _cs.filter(comps, function (comp) { var id = comp.id(); var take = (typeof seen[id] === "undefined"); seen[id] = true; return take; }); if (comps.length === 1) /* after de-duplication now only a single component found */ comp = comps[0]; else { /* error: still more than one component found */ var components = ""; for (var i = 0; i < comps.length; i++) components += " " + comps[i].path("/"); throw _cs.exception("lookup", "ambiguous component path \"" + path + "\" at " + comp.path("/") + ": " + "expected only 1 component, but found " + comps.length + " components:" + components ); } } } /* return component */ return comp; }; /* lookup component(s) at "comp", reachable via path segment "path[i]" */ _cs.lookup_step = function (result, comp, path, i) { var j, children, nodes; if (i >= path.length) /* stop recursion */ result.push(comp); else if (path[i] === ".") /* CASE 1: current component (= no-op) */ _cs.lookup_step(result, comp, path, i + 1); /* RECURSION */ else if (path[i] === "..") { /* CASE 2: parent component */ if (comp.parent() !== null) _cs.lookup_step(result, comp.parent(), path, i + 1); /* RECURSION */ } else if (path[i] === "*") { /* CASE 3: all child components */ children = comp.children(); for (j = 0; j < children.length; j++) _cs.lookup_step(result, children[j], path, i + 1); /* RECURSION */ } else if (path[i] === "") { /* CASE 4: all descendent components */ nodes = comp.walk_down(function (depth, node, nodes, depth_first) { if (!depth_first) nodes.push(node); return nodes; }, []); for (j = 0; j < nodes.length; j++) _cs.lookup_step(result, nodes[j], path, i + 1); /* RECURSION */ } else { /* CASE 5: a specific child component */ children = comp.children(); for (j = 0; j < children.length; j++) { if (children[j].name() === path[i]) { _cs.lookup_step(result, children[j], path, i + 1); /* RECURSION */ break; } } } }; /* top-level API: create one or more components */ $cs.create = function () { /* sanity check environment */ if (!_cs.bootstrapped) { /* give warning but still be backward compatible */ var msg = "ComponentJS: WARNING: component system still not bootstrapped " + "(please call \"bootstrap\" method before first \"create\" method call!)"; /* global alert:false */ if (typeof alert === "function") alert(msg); /* global console:false */ else if (typeof console !== "undefined" && typeof console.log === "function") console.log(msg); $cs.bootstrap(); } /* sanity check arguments */ if (arguments.length < 2) throw _cs.exception("create", "invalid number of arguments"); /* initialize processing state */ var k = 0; var comp = null; var base = null; var base_stack = []; /* determine base component */ if (_cs.istypeof(arguments[k]) === "string") { if (arguments[k].substr(0, 1) !== "/") throw _cs.exception("create", "either base component has to be given " + "or the tree specification has to start with the root component (\"/\")"); comp = _cs.root; } else { base = arguments[k++]; if (_cs.istypeof(base) !== "component") { base = _cs.annotation(base, "comp"); if (base === null) throw _cs.exception("create", "invalid base argument " + "(not an object attached to a component)"); } } /* tokenize the tree specification */ var token = []; var spec = arguments[k++]; var m; while (spec !== "") { m = spec.match(/^\s*([^\/{},]+|[\/{},])/); if (m === null) break; token.push(m[1]); spec = spec.substr(m[1].length); } /* return the tree specification, marked at token k */ var at_pos = function (token, k) { var str = ""; for (var i = 0; i < k && i < token.length; i++) str += token[i]; if (i < token.length) { str += "<"; str += token[i++]; str += ">"; for (; i < token.length; i++) str += token[i]; } return str; }; /* iterate over all tokens... */ for (var i = 0; i < token.length; i++) { if (token[i] === "/") { /* switch base */ if (comp === null) throw _cs.exception("create", "no parent component for step-down at " + at_pos(token, i)); base = comp; } else if (token[i] === "{") { /* save base */ base_stack.push(base); } else if (token[i] === ",") { /* reset base */ if (base_stack.length === 0) throw _cs.exception("create", "no open brace section for parallelism at " + at_pos(token, i)); base = base_stack[base_stack.length - 1]; } else if (token[i] === "}") { /* restore base */ if (base_stack.length === 0) throw _cs.exception("create", "no more open brace section for closing at " + at_pos(token, i)); base = base_stack.pop(); comp = null; } else { /* create new component */ if (base === null) throw _cs.exception("create", "no base component at " + at_pos(token, i)); comp = _cs.create_single(base, token[i], arguments[k++]); } } if (base_stack.length > 0) throw _cs.exception("create", "still open brace sections at end of tree specification"); /* return (last created) component */ return comp; }; /* internal: create a single component */ _cs.create_single = function (base, path, clazz) { /* sanity check parameters */ if (typeof path !== "string") throw _cs.exception("create", "invalid path argument (not a string)"); /* split path into existing tree and the not existing component leaf node */ var m = path.match(/^(.*?)\/?([^\/]+)$/); if (!m[0]) throw _cs.exception("create", "invalid path \"" + path + "\""); var path_tree = m[1]; var path_leaf = m[2]; /* create new component id */ var id = _cs.cid(); /* substitute special "{id}" constructs in leaf path */ path_leaf = path_leaf.replace(/\{id\}/g, id); /* lookup parent component (has to be existing) */ var comp_parent = _cs.lookup(base, path_tree); if (comp_parent === _cs.none) throw _cs.exception("create", "parent component path \"" + path_tree + "\" not already existing (please create first)"); /* attempt to lookup leaf component (has to be not existing) */ var comp = _cs.lookup(comp_parent, path_leaf); if (comp !== _cs.none) throw _cs.exception("create", "leaf component path \"" + path_leaf + "\" already existing (please destroy first)"); /* instanciate class */ var obj = null; switch (_cs.istypeof(clazz)) { case "clazz": case "trait": case "function": /* standard case: $cs.create(..., MyClass) ComponentJS clazz/trait or foreign "class" */ obj = new clazz(); break; case "object": /* special case: $cs.create(..., new MyClass(arg1, arg2)) manual instanciation because of parameter passing */ obj = clazz; break; case "null": /* special case: $cs.create(..., null) early component create & late object attachment */ break; default: throw _cs.exception("create", "invalid class argument"); } /* create new corresponding component object in tree */ comp = new _cs.comp(path_leaf); /* mark with component id */ comp.id(id); /* attach to tree */ comp.attach(comp_parent); /* remember bi-directional relationship between component and object */ comp.obj(obj); /* debug hint */ $cs.debug(1, "component: " + comp.path("/") + ": created component [" + comp.id() + "]"); /* give plugins a chance to react (before creation of a component) */ _cs.hook("ComponentJS:comp-created", "none", comp); /* switch state from "dead" to "created" (here synchronously as one expects that after a creation of a component, the state is really already "created", of course) */ comp.state({ state: "created", sync: true }); /* give plugins a chance to react (after creation of a component) */ _cs.hook("ComponentJS:state-invalidate", "none", "components"); _cs.hook("ComponentJS:state-change", "none"); /* return new component */ return comp; }; /* top-level API: destroy a component */ $cs.destroy = function () { /* sanity check arguments */ if (arguments.length !== 1 && arguments.length !== 2) throw _cs.exception("destroy", "invalid number of arguments"); /* determine component */ var comp = _cs.lookup.apply(this, arguments); if (comp === _cs.none) throw _cs.exception("destroy", "no such component found to destroy"); else if (comp === _cs.root) throw _cs.exception("destroy", "root component cannot be destroyed"); var path = comp.path("/"); var id = comp.id(); /* switch component state to "dead" (here synchronously as one expects that after a destruction of a component, the state is really already "dead", of course) */ comp.state({ state: "dead", sync: true }); /* give plugins a chance to react (before final destruction of a component) */ _cs.hook("ComponentJS:comp-destroyed", "none", comp); /* detach component from component tree */ comp.detach(); /* remove bi-directional relationship between component and object */ comp.obj(null); /* debug hint */ $cs.debug(1, "component: " + path + ": destroyed component [" + id + "]"); /* give plugins a chance to react (after final destruction of a component) */ _cs.hook("ComponentJS:state-invalidate", "none", "components"); _cs.hook("ComponentJS:state-change", "none"); return; }; /* define a state transition */ $cs.transition = function () { /* special case */ if (arguments.length === 1 && arguments[0] === null) { /* remove all user-defined transitions */ _cs.states_clear(); return; } /* determine parameters */ var params = $cs.params("transition", arguments, { target: { pos: 0, req: true }, enter: { pos: 1, req: true }, leave: { pos: 2, req: true }, color: { pos: 3, def: "#000000" }, source: { def: null } }); /* add new state */ _cs.states_add( params.target, params.enter, params.leave, params.color, params.source ); }; /* initialize state transition set with a reasonable default */ $cs.transition("created", "create", "destroy", "#cc3333"); /* created and attached to component tree */ $cs.transition("configured", "setup", "teardown", "#eabc43"); /* configured and wired */ $cs.transition("prepared", "prepare", "cleanup", "#f2ec00"); /* prepared and ready for rendering */ $cs.transition("materialized", "render", "release", "#6699cc"); /* rendered onto the DOM tree */ $cs.transition("visible", "show", "hide", "#669933"); /* visible to the user */ $cs.transition("enabled", "enable", "disable", "#336600"); /* enabled for interaction */ /* ** GLOBAL LIBRARY EXPORTING */ /* export our global API... */ if ( ( typeof EXPORTS === "object" && typeof GLOBAL.ComponentJS_export === "undefined") || ( typeof GLOBAL.ComponentJS_export !== "undefined" && GLOBAL.ComponentJS_export === "CommonJS" )) /* ...to scoped CommonJS environment */ EXPORTS.ComponentJS = $cs; else if ( ( typeof DEFINE === "function" && typeof DEFINE.amd === "object" && typeof GLOBAL.ComponentJS_export === "undefined") || ( typeof GLOBAL.ComponentJS_export !== "undefined" && GLOBAL.ComponentJS_export === "AMD" )) /* ...to scoped AMD environment */ DEFINE("ComponentJS", function () { return $cs; }); else { /* ...to regular global environment */ $cs.symbol("ComponentJS"); } /* internal plugin registry */ _cs.plugins = {}; /* external plugin API */ $cs.plugin = function (name, callback) { if (arguments.length === 0) { /* use case 1: return list of registered plugins */ var plugins = []; for (name in _cs.plugins) { if (!_cs.isown(_cs.plugins, name)) continue; plugins.push(name); } return plugins; } else if (arguments.length === 1) { /* use case 2: check whether particular plugin was registered */ if (typeof name !== "string") throw _cs.exception("plugin", "invalid plugin name parameter"); return (typeof _cs.plugins[name] !== "undefined"); } else if (arguments.length === 2) { /* use case 3: register a new plugin */ if (typeof name !== "string") throw _cs.exception("plugin", "invalid plugin name parameter"); if (typeof _cs.plugins[name] !== "undefined") throw _cs.exception("plugin", "plugin named \"" + name + "\" already registered"); callback.call(this, _cs, $cs, GLOBAL); _cs.plugins[name] = true; } else throw _cs.exception("plugin", "invalid number of parameters"); }; })( /* global window:false */ /* global global:false */ /* global exports:false */ /* global define:false */ ( typeof window !== "undefined" ? window : ( typeof global !== "undefined" ? global : ( typeof this !== "undefined" ? this : {} ))), ( typeof exports === "object" ? exports : undefined ), ( typeof define === "function" ? define : undefined ) );
test/components/button.js
jturle/postcss-sketch
import React from 'react'; import { Button } from 'semantic-ui-react'; const ButtonExampleEmphasis = () => <div> <Button primary>Primary</Button> <Button secondary>Secondary</Button> </div>; export default ButtonExampleEmphasis;
src/svg-icons/device/brightness-low.js
rscnt/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceBrightnessLow = (props) => ( <SvgIcon {...props}> <path d="M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6z"/> </SvgIcon> ); DeviceBrightnessLow = pure(DeviceBrightnessLow); DeviceBrightnessLow.displayName = 'DeviceBrightnessLow'; export default DeviceBrightnessLow;
blueocean-material-icons/src/js/components/svg-icons/device/access-time.js
jenkinsci/blueocean-plugin
import React from 'react'; import SvgIcon from '../../SvgIcon'; const DeviceAccessTime = (props) => ( <SvgIcon {...props}> <path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"/> </SvgIcon> ); DeviceAccessTime.displayName = 'DeviceAccessTime'; DeviceAccessTime.muiName = 'SvgIcon'; export default DeviceAccessTime;
ajax/libs/webshim/1.15.1-RC1/dev/shims/es6.js
him2him2/cdnjs
// ES6-shim 0.15.0 (c) 2013-2014 Paul Miller (http://paulmillr.com) // ES6-shim may be freely distributed under the MIT license. // For more details and documentation: // https://github.com/paulmillr/es6-shim/ webshim.register('es6', function($, webshim, window, document, undefined){ 'use strict'; var isCallableWithoutNew = function(func) { try { func(); } catch (e) { return false; } return true; }; var supportsSubclassing = function(C, f) { /* jshint proto:true */ try { var Sub = function() { C.apply(this, arguments); }; if (!Sub.__proto__) { return false; /* skip test on IE < 11 */ } Object.setPrototypeOf(Sub, C); Sub.prototype = Object.create(C.prototype, { constructor: { value: C } }); return f(Sub); } catch (e) { return false; } }; var arePropertyDescriptorsSupported = function() { try { Object.defineProperty({}, 'x', {}); return true; } catch (e) { /* this is IE 8. */ return false; } }; var startsWithRejectsRegex = function() { var rejectsRegex = false; if (String.prototype.startsWith) { try { '/a/'.startsWith(/a/); } catch (e) { /* this is spec compliant */ rejectsRegex = true; } } return rejectsRegex; }; /*jshint evil: true */ var getGlobal = new Function('return this;'); /*jshint evil: false */ var main = function() { var globals = getGlobal(); var global_isFinite = globals.isFinite; var supportsDescriptors = !!Object.defineProperty && arePropertyDescriptorsSupported(); var startsWithIsCompliant = startsWithRejectsRegex(); var _slice = Array.prototype.slice; var _indexOf = String.prototype.indexOf; var _toString = Object.prototype.toString; var _hasOwnProperty = Object.prototype.hasOwnProperty; var ArrayIterator; // make our implementation private // Define configurable, writable and non-enumerable props // if they don’t exist. var defineProperties = function(object, map) { Object.keys(map).forEach(function(name) { var method = map[name]; if (name in object) return; if (supportsDescriptors) { Object.defineProperty(object, name, { configurable: true, enumerable: false, writable: true, value: method }); } else { object[name] = method; } }); }; // Simple shim for Object.create on ES3 browsers // (unlike real shim, no attempt to support `prototype === null`) var create = Object.create || function(prototype, properties) { function Type() {} Type.prototype = prototype; var object = new Type(); if (typeof properties !== "undefined") { defineProperties(object, properties); } return object; }; // This is a private name in the es6 spec, equal to '[Symbol.iterator]' // we're going to use an arbitrary _-prefixed name to make our shims // work properly with each other, even though we don't have full Iterator // support. That is, `Array.from(map.keys())` will work, but we don't // pretend to export a "real" Iterator interface. var $iterator$ = (typeof Symbol === 'function' && Symbol.iterator) || '_es6shim_iterator_'; // Firefox ships a partial implementation using the name @@iterator. // https://bugzilla.mozilla.org/show_bug.cgi?id=907077#c14 // So use that name if we detect it. if (globals.Set && typeof new globals.Set()['@@iterator'] === 'function') { $iterator$ = '@@iterator'; } var addIterator = function(prototype, impl) { if (!impl) { impl = function iterator() { return this; }; } var o = {}; o[$iterator$] = impl; defineProperties(prototype, o); }; // taken directly from https://github.com/ljharb/is-arguments/blob/master/index.js // can be replaced with require('is-arguments') if we ever use a build process instead var isArguments = function isArguments(value) { var str = _toString.call(value); var result = str === '[object Arguments]'; if (!result) { result = str !== '[object Array]' && value !== null && typeof value === 'object' && typeof value.length === 'number' && value.length >= 0 && _toString.call(value.callee) === '[object Function]'; } return result; }; var emulateES6construct = function(o) { if (!ES.TypeIsObject(o)) throw new TypeError('bad object'); // es5 approximation to es6 subclass semantics: in es6, 'new Foo' // would invoke Foo.@@create to allocation/initialize the new object. // In es5 we just get the plain object. So if we detect an // uninitialized object, invoke o.constructor.@@create if (!o._es6construct) { if (o.constructor && ES.IsCallable(o.constructor['@@create'])) { o = o.constructor['@@create'](o); } defineProperties(o, { _es6construct: true }); } return o; }; var ES = { CheckObjectCoercible: function(x, optMessage) { /* jshint eqnull:true */ if (x == null) throw new TypeError(optMessage || ('Cannot call method on ' + x)); return x; }, TypeIsObject: function(x) { /* jshint eqnull:true */ // this is expensive when it returns false; use this function // when you expect it to return true in the common case. return x != null && Object(x) === x; }, ToObject: function(o, optMessage) { return Object(ES.CheckObjectCoercible(o, optMessage)); }, IsCallable: function(x) { return typeof x === 'function' && // some versions of IE say that typeof /abc/ === 'function' _toString.call(x) === '[object Function]'; }, ToInt32: function(x) { return x >> 0; }, ToUint32: function(x) { return x >>> 0; }, ToInteger: function(value) { var number = +value; if (Number.isNaN(number)) return 0; if (number === 0 || !Number.isFinite(number)) return number; return Math.sign(number) * Math.floor(Math.abs(number)); }, ToLength: function(value) { var len = ES.ToInteger(value); if (len <= 0) return 0; // includes converting -0 to +0 if (len > Number.MAX_SAFE_INTEGER) return Number.MAX_SAFE_INTEGER; return len; }, SameValue: function(a, b) { if (a === b) { // 0 === -0, but they are not identical. if (a === 0) return 1 / a === 1 / b; return true; } return Number.isNaN(a) && Number.isNaN(b); }, SameValueZero: function(a, b) { // same as SameValue except for SameValueZero(+0, -0) == true return (a === b) || (Number.isNaN(a) && Number.isNaN(b)); }, IsIterable: function(o) { return ES.TypeIsObject(o) && (o[$iterator$] !== undefined || isArguments(o)); }, GetIterator: function(o) { if (isArguments(o)) { // special case support for `arguments` return new ArrayIterator(o, "value"); } var it = o[$iterator$](); if (!ES.TypeIsObject(it)) { throw new TypeError('bad iterator'); } return it; }, IteratorNext: function(it) { var result = (arguments.length > 1) ? it.next(arguments[1]) : it.next(); if (!ES.TypeIsObject(result)) { throw new TypeError('bad iterator'); } return result; }, Construct: function(C, args) { // CreateFromConstructor var obj; if (ES.IsCallable(C['@@create'])) { obj = C['@@create'](); } else { // OrdinaryCreateFromConstructor obj = create(C.prototype || null); } // Mark that we've used the es6 construct path // (see emulateES6construct) defineProperties(obj, { _es6construct: true }); // Call the constructor. var result = C.apply(obj, args); return ES.TypeIsObject(result) ? result : obj; } }; var numberConversion = (function () { // from https://github.com/inexorabletash/polyfill/blob/master/typedarray.js#L176-L266 // with permission and license, per https://twitter.com/inexorabletash/status/372206509540659200 function roundToEven(n) { var w = Math.floor(n), f = n - w; if (f < 0.5) { return w; } if (f > 0.5) { return w + 1; } return w % 2 ? w + 1 : w; } function packIEEE754(v, ebits, fbits) { var bias = (1 << (ebits - 1)) - 1, s, e, f, ln, i, bits, str, bytes; // Compute sign, exponent, fraction if (v !== v) { // NaN // http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping e = (1 << ebits) - 1; f = Math.pow(2, fbits - 1); s = 0; } else if (v === Infinity || v === -Infinity) { e = (1 << ebits) - 1; f = 0; s = (v < 0) ? 1 : 0; } else if (v === 0) { e = 0; f = 0; s = (1 / v === -Infinity) ? 1 : 0; } else { s = v < 0; v = Math.abs(v); if (v >= Math.pow(2, 1 - bias)) { e = Math.min(Math.floor(Math.log(v) / Math.LN2), 1023); f = roundToEven(v / Math.pow(2, e) * Math.pow(2, fbits)); if (f / Math.pow(2, fbits) >= 2) { e = e + 1; f = 1; } if (e > bias) { // Overflow e = (1 << ebits) - 1; f = 0; } else { // Normal e = e + bias; f = f - Math.pow(2, fbits); } } else { // Subnormal e = 0; f = roundToEven(v / Math.pow(2, 1 - bias - fbits)); } } // Pack sign, exponent, fraction bits = []; for (i = fbits; i; i -= 1) { bits.push(f % 2 ? 1 : 0); f = Math.floor(f / 2); } for (i = ebits; i; i -= 1) { bits.push(e % 2 ? 1 : 0); e = Math.floor(e / 2); } bits.push(s ? 1 : 0); bits.reverse(); str = bits.join(''); // Bits to bytes bytes = []; while (str.length) { bytes.push(parseInt(str.slice(0, 8), 2)); str = str.slice(8); } return bytes; } function unpackIEEE754(bytes, ebits, fbits) { // Bytes to bits var bits = [], i, j, b, str, bias, s, e, f; for (i = bytes.length; i; i -= 1) { b = bytes[i - 1]; for (j = 8; j; j -= 1) { bits.push(b % 2 ? 1 : 0); b = b >> 1; } } bits.reverse(); str = bits.join(''); // Unpack sign, exponent, fraction bias = (1 << (ebits - 1)) - 1; s = parseInt(str.slice(0, 1), 2) ? -1 : 1; e = parseInt(str.slice(1, 1 + ebits), 2); f = parseInt(str.slice(1 + ebits), 2); // Produce number if (e === (1 << ebits) - 1) { return f !== 0 ? NaN : s * Infinity; } else if (e > 0) { // Normalized return s * Math.pow(2, e - bias) * (1 + f / Math.pow(2, fbits)); } else if (f !== 0) { // Denormalized return s * Math.pow(2, -(bias - 1)) * (f / Math.pow(2, fbits)); } else { return s < 0 ? -0 : 0; } } function unpackFloat64(b) { return unpackIEEE754(b, 11, 52); } function packFloat64(v) { return packIEEE754(v, 11, 52); } function unpackFloat32(b) { return unpackIEEE754(b, 8, 23); } function packFloat32(v) { return packIEEE754(v, 8, 23); } var conversions = { toFloat32: function (num) { return unpackFloat32(packFloat32(num)); } }; if (typeof Float32Array !== 'undefined') { var float32array = new Float32Array(1); conversions.toFloat32 = function (num) { float32array[0] = num; return float32array[0]; }; } return conversions; }()); defineProperties(String, { fromCodePoint: function(_) { // length = 1 var points = _slice.call(arguments, 0, arguments.length); var result = []; var next; for (var i = 0, length = points.length; i < length; i++) { next = Number(points[i]); if (!ES.SameValue(next, ES.ToInteger(next)) || next < 0 || next > 0x10FFFF) { throw new RangeError('Invalid code point ' + next); } if (next < 0x10000) { result.push(String.fromCharCode(next)); } else { next -= 0x10000; result.push(String.fromCharCode((next >> 10) + 0xD800)); result.push(String.fromCharCode((next % 0x400) + 0xDC00)); } } return result.join(''); }, raw: function(callSite) { // raw.length===1 var substitutions = _slice.call(arguments, 1, arguments.length); var cooked = ES.ToObject(callSite, 'bad callSite'); var rawValue = cooked.raw; var raw = ES.ToObject(rawValue, 'bad raw value'); var len = Object.keys(raw).length; var literalsegments = ES.ToLength(len); if (literalsegments === 0) { return ''; } var stringElements = []; var nextIndex = 0; var nextKey, next, nextSeg, nextSub; while (nextIndex < literalsegments) { nextKey = String(nextIndex); next = raw[nextKey]; nextSeg = String(next); stringElements.push(nextSeg); if (nextIndex + 1 >= literalsegments) { break; } next = substitutions[nextKey]; if (next === undefined) { break; } nextSub = String(next); stringElements.push(nextSub); nextIndex++; } return stringElements.join(''); } }); var StringShims = { // Fast repeat, uses the `Exponentiation by squaring` algorithm. // Perf: http://jsperf.com/string-repeat2/2 repeat: (function() { var repeat = function(s, times) { if (times < 1) return ''; if (times % 2) return repeat(s, times - 1) + s; var half = repeat(s, times / 2); return half + half; }; return function(times) { var thisStr = String(ES.CheckObjectCoercible(this)); times = ES.ToInteger(times); if (times < 0 || times === Infinity) { throw new RangeError('Invalid String#repeat value'); } return repeat(thisStr, times); }; })(), startsWith: function(searchStr) { var thisStr = String(ES.CheckObjectCoercible(this)); if (_toString.call(searchStr) === '[object RegExp]') throw new TypeError('Cannot call method "startsWith" with a regex'); searchStr = String(searchStr); var startArg = arguments.length > 1 ? arguments[1] : undefined; var start = Math.max(ES.ToInteger(startArg), 0); return thisStr.slice(start, start + searchStr.length) === searchStr; }, endsWith: function(searchStr) { var thisStr = String(ES.CheckObjectCoercible(this)); if (_toString.call(searchStr) === '[object RegExp]') throw new TypeError('Cannot call method "endsWith" with a regex'); searchStr = String(searchStr); var thisLen = thisStr.length; var posArg = arguments.length > 1 ? arguments[1] : undefined; var pos = posArg === undefined ? thisLen : ES.ToInteger(posArg); var end = Math.min(Math.max(pos, 0), thisLen); return thisStr.slice(end - searchStr.length, end) === searchStr; }, contains: function(searchString) { var position = arguments.length > 1 ? arguments[1] : undefined; // Somehow this trick makes method 100% compat with the spec. return _indexOf.call(this, searchString, position) !== -1; }, codePointAt: function(pos) { var thisStr = String(ES.CheckObjectCoercible(this)); var position = ES.ToInteger(pos); var length = thisStr.length; if (position < 0 || position >= length) return undefined; var first = thisStr.charCodeAt(position); var isEnd = (position + 1 === length); if (first < 0xD800 || first > 0xDBFF || isEnd) return first; var second = thisStr.charCodeAt(position + 1); if (second < 0xDC00 || second > 0xDFFF) return first; return ((first - 0xD800) * 1024) + (second - 0xDC00) + 0x10000; } }; defineProperties(String.prototype, StringShims); var hasStringTrimBug = '\u0085'.trim().length !== 1; if (hasStringTrimBug) { var originalStringTrim = String.prototype.trim; delete String.prototype.trim; // whitespace from: http://es5.github.io/#x15.5.4.20 // implementation from https://github.com/es-shims/es5-shim/blob/v3.4.0/es5-shim.js#L1304-L1324 var ws = [ '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003', '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028', '\u2029\uFEFF' ].join(''); var trimBeginRegexp = new RegExp('^[' + ws + '][' + ws + ']*'); var trimEndRegexp = new RegExp('[' + ws + '][' + ws + ']*$'); defineProperties(String.prototype, { trim: function() { if (this === undefined || this === null) { throw new TypeError("can't convert " + this + " to object"); } return String(this) .replace(trimBeginRegexp, "") .replace(trimEndRegexp, ""); } }); } // see https://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype-@@iterator var StringIterator = function(s) { this._s = String(ES.CheckObjectCoercible(s)); this._i = 0; }; StringIterator.prototype.next = function() { var s = this._s, i = this._i; if (s === undefined || i >= s.length) { this._s = undefined; return { value: undefined, done: true }; } var first = s.charCodeAt(i), second, len; if (first < 0xD800 || first > 0xDBFF || (i+1) == s.length) { len = 1; } else { second = s.charCodeAt(i+1); len = (second < 0xDC00 || second > 0xDFFF) ? 1 : 2; } this._i = i + len; return { value: s.substr(i, len), done: false }; }; addIterator(StringIterator.prototype); addIterator(String.prototype, function() { return new StringIterator(this); }); if (!startsWithIsCompliant) { // Firefox has a noncompliant startsWith implementation String.prototype.startsWith = StringShims.startsWith; String.prototype.endsWith = StringShims.endsWith; } defineProperties(Array, { from: function(iterable) { var mapFn = arguments.length > 1 ? arguments[1] : undefined; var thisArg = arguments.length > 2 ? arguments[2] : undefined; var list = ES.ToObject(iterable, 'bad iterable'); if (mapFn !== undefined && !ES.IsCallable(mapFn)) { throw new TypeError('Array.from: when provided, the second argument must be a function'); } var usingIterator = ES.IsIterable(list); // does the spec really mean that Arrays should use ArrayIterator? // https://bugs.ecmascript.org/show_bug.cgi?id=2416 //if (Array.isArray(list)) { usingIterator=false; } var length = usingIterator ? 0 : ES.ToLength(list.length); var result = ES.IsCallable(this) ? Object(usingIterator ? new this() : new this(length)) : new Array(length); var it = usingIterator ? ES.GetIterator(list) : null; var value; for (var i = 0; usingIterator || (i < length); i++) { if (usingIterator) { value = ES.IteratorNext(it); if (value.done) { length = i; break; } value = value.value; } else { value = list[i]; } if (mapFn) { result[i] = thisArg ? mapFn.call(thisArg, value, i) : mapFn(value, i); } else { result[i] = value; } } result.length = length; return result; }, of: function() { return Array.from(arguments); } }); // Our ArrayIterator is private; see // https://github.com/paulmillr/es6-shim/issues/252 ArrayIterator = function(array, kind) { this.i = 0; this.array = array; this.kind = kind; }; defineProperties(ArrayIterator.prototype, { next: function() { var i = this.i, array = this.array; if (i === undefined || this.kind === undefined) { throw new TypeError('Not an ArrayIterator'); } if (array!==undefined) { var len = ES.ToLength(array.length); for (; i < len; i++) { var kind = this.kind; var retval; if (kind === "key") { retval = i; } else if (kind === "value") { retval = array[i]; } else if (kind === "entry") { retval = [i, array[i]]; } this.i = i + 1; return { value: retval, done: false }; } } this.array = undefined; return { value: undefined, done: true }; } }); addIterator(ArrayIterator.prototype); defineProperties(Array.prototype, { copyWithin: function(target, start) { var end = arguments[2]; // copyWithin.length must be 2 var o = ES.ToObject(this); var len = ES.ToLength(o.length); target = ES.ToInteger(target); start = ES.ToInteger(start); var to = target < 0 ? Math.max(len + target, 0) : Math.min(target, len); var from = start < 0 ? Math.max(len + start, 0) : Math.min(start, len); end = (end===undefined) ? len : ES.ToInteger(end); var fin = end < 0 ? Math.max(len + end, 0) : Math.min(end, len); var count = Math.min(fin - from, len - to); var direction = 1; if (from < to && to < (from + count)) { direction = -1; from += count - 1; to += count - 1; } while (count > 0) { if (_hasOwnProperty.call(o, from)) { o[to] = o[from]; } else { delete o[from]; } from += direction; to += direction; count -= 1; } return o; }, fill: function(value) { var start = arguments.length > 1 ? arguments[1] : undefined; var end = arguments.length > 2 ? arguments[2] : undefined; var O = ES.ToObject(this); var len = ES.ToLength(O.length); start = ES.ToInteger(start === undefined ? 0 : start); end = ES.ToInteger(end === undefined ? len : end); var relativeStart = start < 0 ? Math.max(len + start, 0) : Math.min(start, len); var relativeEnd = end < 0 ? len + end : end; for (var i = relativeStart; i < len && i < relativeEnd; ++i) { O[i] = value; } return O; }, find: function(predicate) { var list = ES.ToObject(this); var length = ES.ToLength(list.length); if (!ES.IsCallable(predicate)) { throw new TypeError('Array#find: predicate must be a function'); } var thisArg = arguments[1]; for (var i = 0, value; i < length; i++) { if (i in list) { value = list[i]; if (predicate.call(thisArg, value, i, list)) return value; } } return undefined; }, findIndex: function(predicate) { var list = ES.ToObject(this); var length = ES.ToLength(list.length); if (!ES.IsCallable(predicate)) { throw new TypeError('Array#findIndex: predicate must be a function'); } var thisArg = arguments[1]; for (var i = 0; i < length; i++) { if (i in list) { if (predicate.call(thisArg, list[i], i, list)) return i; } } return -1; }, keys: function() { return new ArrayIterator(this, "key"); }, values: function() { return new ArrayIterator(this, "value"); }, entries: function() { return new ArrayIterator(this, "entry"); } }); addIterator(Array.prototype, function() { return this.values(); }); // Chrome defines keys/values/entries on Array, but doesn't give us // any way to identify its iterator. So add our own shimmed field. if (Object.getPrototypeOf) { addIterator(Object.getPrototypeOf([].values())); } var maxSafeInteger = Math.pow(2, 53) - 1; defineProperties(Number, { MAX_SAFE_INTEGER: maxSafeInteger, MIN_SAFE_INTEGER: -maxSafeInteger, EPSILON: 2.220446049250313e-16, parseInt: globals.parseInt, parseFloat: globals.parseFloat, isFinite: function(value) { return typeof value === 'number' && global_isFinite(value); }, isInteger: function(value) { return Number.isFinite(value) && ES.ToInteger(value) === value; }, isSafeInteger: function(value) { return Number.isInteger(value) && Math.abs(value) <= Number.MAX_SAFE_INTEGER; }, isNaN: function(value) { // NaN !== NaN, but they are identical. // NaNs are the only non-reflexive value, i.e., if x !== x, // then x is NaN. // isNaN is broken: it converts its argument to number, so // isNaN('foo') => true return value !== value; } }); if (supportsDescriptors) { defineProperties(Object, { getPropertyDescriptor: function(subject, name) { var pd = Object.getOwnPropertyDescriptor(subject, name); var proto = Object.getPrototypeOf(subject); while (pd === undefined && proto !== null) { pd = Object.getOwnPropertyDescriptor(proto, name); proto = Object.getPrototypeOf(proto); } return pd; }, getPropertyNames: function(subject) { var result = Object.getOwnPropertyNames(subject); var proto = Object.getPrototypeOf(subject); var addProperty = function(property) { if (result.indexOf(property) === -1) { result.push(property); } }; while (proto !== null) { Object.getOwnPropertyNames(proto).forEach(addProperty); proto = Object.getPrototypeOf(proto); } return result; } }); defineProperties(Object, { // 19.1.3.1 assign: function(target, source) { if (!ES.TypeIsObject(target)) { throw new TypeError('target must be an object'); } return Array.prototype.reduce.call(arguments, function(target, source) { return Object.keys(Object(source)).reduce(function(target, key) { target[key] = source[key]; return target; }, target); }); }, is: function(a, b) { return ES.SameValue(a, b); }, // 19.1.3.9 // shim from https://gist.github.com/WebReflection/5593554 setPrototypeOf: (function(Object, magic) { var set; var checkArgs = function(O, proto) { if (!ES.TypeIsObject(O)) { throw new TypeError('cannot set prototype on a non-object'); } if (!(proto===null || ES.TypeIsObject(proto))) { throw new TypeError('can only set prototype to an object or null'+proto); } }; var setPrototypeOf = function(O, proto) { checkArgs(O, proto); set.call(O, proto); return O; }; try { // this works already in Firefox and Safari set = Object.getOwnPropertyDescriptor(Object.prototype, magic).set; set.call({}, null); } catch (e) { if (Object.prototype !== {}[magic]) { // IE < 11 cannot be shimmed return; } // probably Chrome or some old Mobile stock browser set = function(proto) { this[magic] = proto; }; // please note that this will **not** work // in those browsers that do not inherit // __proto__ by mistake from Object.prototype // in these cases we should probably throw an error // or at least be informed about the issue setPrototypeOf.polyfill = setPrototypeOf( setPrototypeOf({}, null), Object.prototype ) instanceof Object; // setPrototypeOf.polyfill === true means it works as meant // setPrototypeOf.polyfill === false means it's not 100% reliable // setPrototypeOf.polyfill === undefined // or // setPrototypeOf.polyfill == null means it's not a polyfill // which means it works as expected // we can even delete Object.prototype.__proto__; } return setPrototypeOf; })(Object, '__proto__') }); } // Workaround bug in Opera 12 where setPrototypeOf(x, null) doesn't work, // but Object.create(null) does. if (Object.setPrototypeOf && Object.getPrototypeOf && Object.getPrototypeOf(Object.setPrototypeOf({}, null)) !== null && Object.getPrototypeOf(Object.create(null)) === null) { (function() { var FAKENULL = Object.create(null); var gpo = Object.getPrototypeOf, spo = Object.setPrototypeOf; Object.getPrototypeOf = function(o) { var result = gpo(o); return result === FAKENULL ? null : result; }; Object.setPrototypeOf = function(o, p) { if (p === null) { p = FAKENULL; } return spo(o, p); }; Object.setPrototypeOf.polyfill = false; })(); } try { Object.keys('foo'); } catch (e) { var originalObjectKeys = Object.keys; Object.keys = function (obj) { return originalObjectKeys(ES.ToObject(obj)); }; } var MathShims = { acosh: function(value) { value = Number(value); if (Number.isNaN(value) || value < 1) return NaN; if (value === 1) return 0; if (value === Infinity) return value; return Math.log(value + Math.sqrt(value * value - 1)); }, asinh: function(value) { value = Number(value); if (value === 0 || !global_isFinite(value)) { return value; } return value < 0 ? -Math.asinh(-value) : Math.log(value + Math.sqrt(value * value + 1)); }, atanh: function(value) { value = Number(value); if (Number.isNaN(value) || value < -1 || value > 1) { return NaN; } if (value === -1) return -Infinity; if (value === 1) return Infinity; if (value === 0) return value; return 0.5 * Math.log((1 + value) / (1 - value)); }, cbrt: function(value) { value = Number(value); if (value === 0) return value; var negate = value < 0, result; if (negate) value = -value; result = Math.pow(value, 1/3); return negate ? -result : result; }, clz32: function(value) { // See https://bugs.ecmascript.org/show_bug.cgi?id=2465 value = Number(value); var number = ES.ToUint32(value); if (number === 0) { return 32; } return 32 - (number).toString(2).length; }, cosh: function(value) { value = Number(value); if (value === 0) return 1; // +0 or -0 if (Number.isNaN(value)) return NaN; if (!global_isFinite(value)) return Infinity; if (value < 0) value = -value; if (value > 21) return Math.exp(value) / 2; return (Math.exp(value) + Math.exp(-value)) / 2; }, expm1: function(value) { value = Number(value); if (value === -Infinity) return -1; if (!global_isFinite(value) || value === 0) return value; return Math.exp(value) - 1; }, hypot: function(x, y) { var anyNaN = false; var allZero = true; var anyInfinity = false; var numbers = []; Array.prototype.every.call(arguments, function(arg) { var num = Number(arg); if (Number.isNaN(num)) anyNaN = true; else if (num === Infinity || num === -Infinity) anyInfinity = true; else if (num !== 0) allZero = false; if (anyInfinity) { return false; } else if (!anyNaN) { numbers.push(Math.abs(num)); } return true; }); if (anyInfinity) return Infinity; if (anyNaN) return NaN; if (allZero) return 0; numbers.sort(function (a, b) { return b - a; }); var largest = numbers[0]; var divided = numbers.map(function (number) { return number / largest; }); var sum = divided.reduce(function (sum, number) { return sum += number * number; }, 0); return largest * Math.sqrt(sum); }, log2: function(value) { return Math.log(value) * Math.LOG2E; }, log10: function(value) { return Math.log(value) * Math.LOG10E; }, log1p: function(value) { value = Number(value); if (value < -1 || Number.isNaN(value)) return NaN; if (value === 0 || value === Infinity) return value; if (value === -1) return -Infinity; var result = 0; var n = 50; if (value < 0 || value > 1) return Math.log(1 + value); for (var i = 1; i < n; i++) { if ((i % 2) === 0) { result -= Math.pow(value, i) / i; } else { result += Math.pow(value, i) / i; } } return result; }, sign: function(value) { var number = +value; if (number === 0) return number; if (Number.isNaN(number)) return number; return number < 0 ? -1 : 1; }, sinh: function(value) { value = Number(value); if (!global_isFinite(value) || value === 0) return value; return (Math.exp(value) - Math.exp(-value)) / 2; }, tanh: function(value) { value = Number(value); if (Number.isNaN(value) || value === 0) return value; if (value === Infinity) return 1; if (value === -Infinity) return -1; return (Math.exp(value) - Math.exp(-value)) / (Math.exp(value) + Math.exp(-value)); }, trunc: function(value) { var number = Number(value); return number < 0 ? -Math.floor(-number) : Math.floor(number); }, imul: function(x, y) { // taken from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul x = ES.ToUint32(x); y = ES.ToUint32(y); var ah = (x >>> 16) & 0xffff; var al = x & 0xffff; var bh = (y >>> 16) & 0xffff; var bl = y & 0xffff; // the shift by 0 fixes the sign on the high part // the final |0 converts the unsigned value into a signed value return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0)|0); }, fround: function(x) { if (x === 0 || x === Infinity || x === -Infinity || Number.isNaN(x)) { return x; } var num = Number(x); return numberConversion.toFloat32(num); } }; defineProperties(Math, MathShims); if (Math.imul(0xffffffff, 5) !== -5) { // Safari 6.1, at least, reports "0" for this value Math.imul = MathShims.imul; } // Promises // Simplest possible implementation; use a 3rd-party library if you // want the best possible speed and/or long stack traces. var PromiseShim = (function() { var Promise, Promise$prototype; ES.IsPromise = function(promise) { if (!ES.TypeIsObject(promise)) { return false; } if (!promise._promiseConstructor) { // _promiseConstructor is a bit more unique than _status, so we'll // check that instead of the [[PromiseStatus]] internal field. return false; } if (promise._status === undefined) { return false; // uninitialized } return true; }; // "PromiseCapability" in the spec is what most promise implementations // call a "deferred". var PromiseCapability = function(C) { if (!ES.IsCallable(C)) { throw new TypeError('bad promise constructor'); } var capability = this; var resolver = function(resolve, reject) { capability.resolve = resolve; capability.reject = reject; }; capability.promise = ES.Construct(C, [resolver]); // see https://bugs.ecmascript.org/show_bug.cgi?id=2478 if (!capability.promise._es6construct) { throw new TypeError('bad promise constructor'); } if (!(ES.IsCallable(capability.resolve) && ES.IsCallable(capability.reject))) { throw new TypeError('bad promise constructor'); } }; // find an appropriate setImmediate-alike var setTimeout = globals.setTimeout; var makeZeroTimeout; if (typeof window !== 'undefined' && ES.IsCallable(window.postMessage)) { makeZeroTimeout = function() { // from http://dbaron.org/log/20100309-faster-timeouts var timeouts = []; var messageName = "zero-timeout-message"; var setZeroTimeout = function(fn) { timeouts.push(fn); window.postMessage(messageName, "*"); }; var handleMessage = function(event) { if (event.source == window && event.data == messageName) { event.stopPropagation(); if (timeouts.length === 0) { return; } var fn = timeouts.shift(); fn(); } }; window.addEventListener("message", handleMessage, true); return setZeroTimeout; }; } var makePromiseAsap = function() { // An efficient task-scheduler based on a pre-existing Promise // implementation, which we can use even if we override the // global Promise below (in order to workaround bugs) // https://github.com/Raynos/observ-hash/issues/2#issuecomment-35857671 var P = globals.Promise; return P && P.resolve && function(task) { return P.resolve().then(task); }; }; var enqueue = ES.IsCallable(globals.setImmediate) ? globals.setImmediate.bind(globals) : typeof process === 'object' && process.nextTick ? process.nextTick : makePromiseAsap() || (ES.IsCallable(makeZeroTimeout) ? makeZeroTimeout() : function(task) { setTimeout(task, 0); }); // fallback var triggerPromiseReactions = function(reactions, x) { reactions.forEach(function(reaction) { enqueue(function() { // PromiseReactionTask var handler = reaction.handler; var capability = reaction.capability; var resolve = capability.resolve; var reject = capability.reject; try { var result = handler(x); if (result === capability.promise) { throw new TypeError('self resolution'); } var updateResult = updatePromiseFromPotentialThenable(result, capability); if (!updateResult) { resolve(result); } } catch (e) { reject(e); } }); }); }; var updatePromiseFromPotentialThenable = function(x, capability) { if (!ES.TypeIsObject(x)) { return false; } var resolve = capability.resolve; var reject = capability.reject; try { var then = x.then; // only one invocation of accessor if (!ES.IsCallable(then)) { return false; } then.call(x, resolve, reject); } catch(e) { reject(e); } return true; }; var promiseResolutionHandler = function(promise, onFulfilled, onRejected){ return function(x) { if (x === promise) { return onRejected(new TypeError('self resolution')); } var C = promise._promiseConstructor; var capability = new PromiseCapability(C); var updateResult = updatePromiseFromPotentialThenable(x, capability); if (updateResult) { return capability.promise.then(onFulfilled, onRejected); } else { return onFulfilled(x); } }; }; Promise = function(resolver) { var promise = this; promise = emulateES6construct(promise); if (!promise._promiseConstructor) { // we use _promiseConstructor as a stand-in for the internal // [[PromiseStatus]] field; it's a little more unique. throw new TypeError('bad promise'); } if (promise._status !== undefined) { throw new TypeError('promise already initialized'); } // see https://bugs.ecmascript.org/show_bug.cgi?id=2482 if (!ES.IsCallable(resolver)) { throw new TypeError('not a valid resolver'); } promise._status = 'unresolved'; promise._resolveReactions = []; promise._rejectReactions = []; var resolve = function(resolution) { if (promise._status !== 'unresolved') { return; } var reactions = promise._resolveReactions; promise._result = resolution; promise._resolveReactions = undefined; promise._rejectReactions = undefined; promise._status = 'has-resolution'; triggerPromiseReactions(reactions, resolution); }; var reject = function(reason) { if (promise._status !== 'unresolved') { return; } var reactions = promise._rejectReactions; promise._result = reason; promise._resolveReactions = undefined; promise._rejectReactions = undefined; promise._status = 'has-rejection'; triggerPromiseReactions(reactions, reason); }; try { resolver(resolve, reject); } catch (e) { reject(e); } return promise; }; Promise$prototype = Promise.prototype; defineProperties(Promise, { '@@create': function(obj) { var constructor = this; // AllocatePromise // The `obj` parameter is a hack we use for es5 // compatibility. var prototype = constructor.prototype || Promise$prototype; obj = obj || create(prototype); defineProperties(obj, { _status: undefined, _result: undefined, _resolveReactions: undefined, _rejectReactions: undefined, _promiseConstructor: undefined }); obj._promiseConstructor = constructor; return obj; } }); var _promiseAllResolver = function(index, values, capability, remaining) { var done = false; return function(x) { if (done) { return; } // protect against being called multiple times done = true; values[index] = x; if ((--remaining.count) === 0) { var resolve = capability.resolve; resolve(values); // call w/ this===undefined } }; }; Promise.all = function(iterable) { var C = this; var capability = new PromiseCapability(C); var resolve = capability.resolve; var reject = capability.reject; try { if (!ES.IsIterable(iterable)) { throw new TypeError('bad iterable'); } var it = ES.GetIterator(iterable); var values = [], remaining = { count: 1 }; for (var index = 0; ; index++) { var next = ES.IteratorNext(it); if (next.done) { break; } var nextPromise = C.resolve(next.value); var resolveElement = _promiseAllResolver( index, values, capability, remaining ); remaining.count++; nextPromise.then(resolveElement, capability.reject); } if ((--remaining.count) === 0) { resolve(values); // call w/ this===undefined } } catch (e) { reject(e); } return capability.promise; }; Promise.race = function(iterable) { var C = this; var capability = new PromiseCapability(C); var resolve = capability.resolve; var reject = capability.reject; try { if (!ES.IsIterable(iterable)) { throw new TypeError('bad iterable'); } var it = ES.GetIterator(iterable); while (true) { var next = ES.IteratorNext(it); if (next.done) { // If iterable has no items, resulting promise will never // resolve; see: // https://github.com/domenic/promises-unwrapping/issues/75 // https://bugs.ecmascript.org/show_bug.cgi?id=2515 break; } var nextPromise = C.resolve(next.value); nextPromise.then(resolve, reject); } } catch (e) { reject(e); } return capability.promise; }; Promise.reject = function(reason) { var C = this; var capability = new PromiseCapability(C); var reject = capability.reject; reject(reason); // call with this===undefined return capability.promise; }; Promise.resolve = function(v) { var C = this; if (ES.IsPromise(v)) { var constructor = v._promiseConstructor; if (constructor === C) { return v; } } var capability = new PromiseCapability(C); var resolve = capability.resolve; resolve(v); // call with this===undefined return capability.promise; }; Promise.prototype['catch'] = function( onRejected ) { return this.then(undefined, onRejected); }; Promise.prototype.then = function( onFulfilled, onRejected ) { var promise = this; if (!ES.IsPromise(promise)) { throw new TypeError('not a promise'); } // this.constructor not this._promiseConstructor; see // https://bugs.ecmascript.org/show_bug.cgi?id=2513 var C = this.constructor; var capability = new PromiseCapability(C); if (!ES.IsCallable(onRejected)) { onRejected = function(e) { throw e; }; } if (!ES.IsCallable(onFulfilled)) { onFulfilled = function(x) { return x; }; } var resolutionHandler = promiseResolutionHandler(promise, onFulfilled, onRejected); var resolveReaction = { capability: capability, handler: resolutionHandler }; var rejectReaction = { capability: capability, handler: onRejected }; switch (promise._status) { case 'unresolved': promise._resolveReactions.push(resolveReaction); promise._rejectReactions.push(rejectReaction); break; case 'has-resolution': triggerPromiseReactions([resolveReaction], promise._result); break; case 'has-rejection': triggerPromiseReactions([rejectReaction], promise._result); break; default: throw new TypeError('unexpected'); } return capability.promise; }; return Promise; })(); // export the Promise constructor. defineProperties(globals, { Promise: PromiseShim }); // In Chrome 33 (and thereabouts) Promise is defined, but the // implementation is buggy in a number of ways. Let's check subclassing // support to see if we have a buggy implementation. var promiseSupportsSubclassing = supportsSubclassing(globals.Promise, function(S) { return S.resolve(42) instanceof S; }); var promiseIgnoresNonFunctionThenCallbacks = (function () { try { globals.Promise.reject(42).then(null, 5).then(null, function () {}); return true; } catch (ex) { return false; } }()); if (!promiseSupportsSubclassing || !promiseIgnoresNonFunctionThenCallbacks) { globals.Promise = PromiseShim; } // Map and Set require a true ES5 environment if (supportsDescriptors) { var fastkey = function fastkey(key) { var type = typeof key; if (type === 'string') { return '$' + key; } else if (type === 'number') { // note that -0 will get coerced to "0" when used as a property key return key; } return null; }; var emptyObject = function emptyObject() { // accomodate some older not-quite-ES5 browsers return Object.create ? Object.create(null) : {}; }; var collectionShims = { Map: (function() { var empty = {}; function MapEntry(key, value) { this.key = key; this.value = value; this.next = null; this.prev = null; } MapEntry.prototype.isRemoved = function() { return this.key === empty; }; function MapIterator(map, kind) { this.head = map._head; this.i = this.head; this.kind = kind; } MapIterator.prototype = { next: function() { var i = this.i, kind = this.kind, head = this.head, result; if (this.i === undefined) { return { value: undefined, done: true }; } while (i.isRemoved() && i !== head) { // back up off of removed entries i = i.prev; } // advance to next unreturned element. while (i.next !== head) { i = i.next; if (!i.isRemoved()) { if (kind === "key") { result = i.key; } else if (kind === "value") { result = i.value; } else { result = [i.key, i.value]; } this.i = i; return { value: result, done: false }; } } // once the iterator is done, it is done forever. this.i = undefined; return { value: undefined, done: true }; } }; addIterator(MapIterator.prototype); function Map(iterable) { var map = this; map = emulateES6construct(map); if (!map._es6map) { throw new TypeError('bad map'); } var head = new MapEntry(null, null); // circular doubly-linked list. head.next = head.prev = head; defineProperties(map, { '_head': head, '_storage': emptyObject(), '_size': 0 }); // Optionally initialize map from iterable if (iterable !== undefined && iterable !== null) { var it = ES.GetIterator(iterable); var adder = map.set; if (!ES.IsCallable(adder)) { throw new TypeError('bad map'); } while (true) { var next = ES.IteratorNext(it); if (next.done) { break; } var nextItem = next.value; if (!ES.TypeIsObject(nextItem)) { throw new TypeError('expected iterable of pairs'); } adder.call(map, nextItem[0], nextItem[1]); } } return map; } var Map$prototype = Map.prototype; defineProperties(Map, { '@@create': function(obj) { var constructor = this; var prototype = constructor.prototype || Map$prototype; obj = obj || create(prototype); defineProperties(obj, { _es6map: true }); return obj; } }); Object.defineProperty(Map.prototype, 'size', { configurable: true, enumerable: false, get: function() { if (typeof this._size === 'undefined') { throw new TypeError('size method called on incompatible Map'); } return this._size; } }); defineProperties(Map.prototype, { get: function(key) { var fkey = fastkey(key); if (fkey !== null) { // fast O(1) path var entry = this._storage[fkey]; return entry ? entry.value : undefined; } var head = this._head, i = head; while ((i = i.next) !== head) { if (ES.SameValueZero(i.key, key)) { return i.value; } } return undefined; }, has: function(key) { var fkey = fastkey(key); if (fkey !== null) { // fast O(1) path return typeof this._storage[fkey] !== 'undefined'; } var head = this._head, i = head; while ((i = i.next) !== head) { if (ES.SameValueZero(i.key, key)) { return true; } } return false; }, set: function(key, value) { var head = this._head, i = head, entry; var fkey = fastkey(key); if (fkey !== null) { // fast O(1) path if (typeof this._storage[fkey] !== 'undefined') { this._storage[fkey].value = value; return; } else { entry = this._storage[fkey] = new MapEntry(key, value); i = head.prev; // fall through } } while ((i = i.next) !== head) { if (ES.SameValueZero(i.key, key)) { i.value = value; return; } } entry = entry || new MapEntry(key, value); if (ES.SameValue(-0, key)) { entry.key = +0; // coerce -0 to +0 in entry } entry.next = this._head; entry.prev = this._head.prev; entry.prev.next = entry; entry.next.prev = entry; this._size += 1; }, 'delete': function(key) { var head = this._head, i = head; var fkey = fastkey(key); if (fkey !== null) { // fast O(1) path if (typeof this._storage[fkey] === 'undefined') { return false; } i = this._storage[fkey].prev; delete this._storage[fkey]; // fall through } while ((i = i.next) !== head) { if (ES.SameValueZero(i.key, key)) { i.key = i.value = empty; i.prev.next = i.next; i.next.prev = i.prev; this._size -= 1; return true; } } return false; }, clear: function() { this._size = 0; this._storage = emptyObject(); var head = this._head, i = head, p = i.next; while ((i = p) !== head) { i.key = i.value = empty; p = i.next; i.next = i.prev = head; } head.next = head.prev = head; }, keys: function() { return new MapIterator(this, "key"); }, values: function() { return new MapIterator(this, "value"); }, entries: function() { return new MapIterator(this, "key+value"); }, forEach: function(callback) { var context = arguments.length > 1 ? arguments[1] : null; var it = this.entries(); for (var entry = it.next(); !entry.done; entry = it.next()) { callback.call(context, entry.value[1], entry.value[0], this); } } }); addIterator(Map.prototype, function() { return this.entries(); }); return Map; })(), Set: (function() { // Creating a Map is expensive. To speed up the common case of // Sets containing only string or numeric keys, we use an object // as backing storage and lazily create a full Map only when // required. var SetShim = function Set(iterable) { var set = this; set = emulateES6construct(set); if (!set._es6set) { throw new TypeError('bad set'); } defineProperties(set, { '[[SetData]]': null, '_storage': emptyObject() }); // Optionally initialize map from iterable if (iterable !== undefined && iterable !== null) { var it = ES.GetIterator(iterable); var adder = set.add; if (!ES.IsCallable(adder)) { throw new TypeError('bad set'); } while (true) { var next = ES.IteratorNext(it); if (next.done) { break; } var nextItem = next.value; adder.call(set, nextItem); } } return set; }; var Set$prototype = SetShim.prototype; defineProperties(SetShim, { '@@create': function(obj) { var constructor = this; var prototype = constructor.prototype || Set$prototype; obj = obj || create(prototype); defineProperties(obj, { _es6set: true }); return obj; } }); // Switch from the object backing storage to a full Map. var ensureMap = function ensureMap(set) { if (!set['[[SetData]]']) { var m = set['[[SetData]]'] = new collectionShims.Map(); Object.keys(set._storage).forEach(function(k) { // fast check for leading '$' if (k.charCodeAt(0) === 36) { k = k.slice(1); } else { k = +k; } m.set(k, k); }); set._storage = null; // free old backing storage } }; Object.defineProperty(SetShim.prototype, 'size', { configurable: true, enumerable: false, get: function() { if (typeof this._storage === 'undefined') { // https://github.com/paulmillr/es6-shim/issues/176 throw new TypeError('size method called on incompatible Set'); } ensureMap(this); return this['[[SetData]]'].size; } }); defineProperties(SetShim.prototype, { has: function(key) { var fkey; if (this._storage && (fkey = fastkey(key)) !== null) { return !!this._storage[fkey]; } ensureMap(this); return this['[[SetData]]'].has(key); }, add: function(key) { var fkey; if (this._storage && (fkey = fastkey(key)) !== null) { this._storage[fkey]=true; return; } ensureMap(this); return this['[[SetData]]'].set(key, key); }, 'delete': function(key) { var fkey; if (this._storage && (fkey = fastkey(key)) !== null) { delete this._storage[fkey]; return; } ensureMap(this); return this['[[SetData]]']['delete'](key); }, clear: function() { if (this._storage) { this._storage = emptyObject(); return; } return this['[[SetData]]'].clear(); }, keys: function() { ensureMap(this); return this['[[SetData]]'].keys(); }, values: function() { ensureMap(this); return this['[[SetData]]'].values(); }, entries: function() { ensureMap(this); return this['[[SetData]]'].entries(); }, forEach: function(callback) { var context = arguments.length > 1 ? arguments[1] : null; var entireSet = this; ensureMap(this); this['[[SetData]]'].forEach(function(value, key) { callback.call(context, key, key, entireSet); }); } }); addIterator(SetShim.prototype, function() { return this.values(); }); return SetShim; })() }; defineProperties(globals, collectionShims); if (globals.Map || globals.Set) { /* - In Firefox < 23, Map#size is a function. - In all current Firefox, Set#entries/keys/values & Map#clear do not exist - https://bugzilla.mozilla.org/show_bug.cgi?id=869996 - In Firefox 24, Map and Set do not implement forEach - In Firefox 25 at least, Map and Set are callable without "new" */ if ( typeof globals.Map.prototype.clear !== 'function' || new globals.Set().size !== 0 || new globals.Map().size !== 0 || typeof globals.Map.prototype.keys !== 'function' || typeof globals.Set.prototype.keys !== 'function' || typeof globals.Map.prototype.forEach !== 'function' || typeof globals.Set.prototype.forEach !== 'function' || isCallableWithoutNew(globals.Map) || isCallableWithoutNew(globals.Set) || !supportsSubclassing(globals.Map, function(M) { return (new M([])) instanceof M; }) ) { globals.Map = collectionShims.Map; globals.Set = collectionShims.Set; } } // Shim incomplete iterator implementations. addIterator(Object.getPrototypeOf((new globals.Map()).keys())); addIterator(Object.getPrototypeOf((new globals.Set()).keys())); } }; main(); // CommonJS and <script> });
example/src/pages/IconSnackbarContent/index.js
dlennox24/ricro-app-template
import Button from '@material-ui/core/Button'; import Divider from '@material-ui/core/Divider'; import Grid from '@material-ui/core/Grid'; import Portal from '@material-ui/core/Portal'; import Snackbar from '@material-ui/core/Snackbar'; import withStyles from '@material-ui/core/styles/withStyles'; import { IconSnackbarContent } from 'colostate-ricro-ui'; import IconCloseOctagon from 'mdi-material-ui/CloseOctagon'; import IconCommentText from 'mdi-material-ui/CommentText'; import IconContain from 'mdi-material-ui/Contain'; import IconFloppy from 'mdi-material-ui/Floppy'; import IconFolderMultiple from 'mdi-material-ui/FolderMultiple'; import PropTypes from 'prop-types'; import React from 'react'; import Form from './Form'; import Showcase from './Showcase'; import Source from './Source'; import styles from './styles'; const customIcons = { none: null, contain: IconContain, 'comment-text': IconCommentText, 'close-octagon': IconCloseOctagon, 'folder-multiple': IconFolderMultiple, floppy: IconFloppy, }; class IconSnackbarContentPage extends React.Component { state = { variant: 'info', message: 'Created new snackbar!', isOpen: false, anchorVert: 'bottom', anchorHorz: 'center', autoHideDuration: 6, isSourceOpen: false, isActionDisabled: false, isIconDisabled: false, customIcon: 'none', }; handleChange = name => event => { this.setState({ [name]: event.target.value, }); }; handleSwitchChange = name => event => { this.setState({ [name]: event.target.checked }); }; handleToggleSnackbarOpen = () => { this.setState(state => ({ isOpen: !state.isOpen, })); }; handleToggleSourceOpen = () => { this.setState(state => ({ isSourceOpen: !state.isSourceOpen, })); }; createSnackbarContentPreview = (disableClose = false) => { const { variant, message, isActionDisabled, isIconDisabled, customIcon } = this.state; return ( <IconSnackbarContent variant={variant} onClose={disableClose ? null : this.handleToggleSnackbarOpen} message={message} disableAction={isActionDisabled} disableIcon={isIconDisabled} icon={customIcons[customIcon]} /> ); }; render() { const { anchorHorz, anchorVert, autoHideDuration, isOpen, isSourceOpen } = this.state; const { classes } = this.props; return ( <React.Fragment> <Form {...this.state} customIcons={customIcons} onChange={this.handleChange} onSwitchChange={this.handleSwitchChange} /> <Grid container alignItems="center"> <Grid className={classes.gridItem} item xs={12} md={3}> <Button variant="contained" color="primary" onClick={this.handleToggleSnackbarOpen} fullWidth > Open Snackbar </Button> </Grid> <Grid className={classes.gridItem} item xs={12} md={3}> <Button onClick={this.handleToggleSourceOpen} variant="outlined" fullWidth> {isSourceOpen ? 'Close Source' : 'View Source'} </Button> </Grid> <Grid className={classes.gridItem} item xs={12} md={6}> {this.createSnackbarContentPreview('disableClose')} </Grid> </Grid> <Source {...this.state} /> <Divider className={classes.divider} /> <Showcase /> <Portal> <Snackbar anchorOrigin={{ vertical: anchorVert, horizontal: anchorHorz }} open={isOpen} autoHideDuration={autoHideDuration <= 0 ? null : autoHideDuration * 1000} onClose={this.handleToggleSnackbarOpen} > {this.createSnackbarContentPreview()} </Snackbar> </Portal> </React.Fragment> ); } } IconSnackbarContentPage.propTypes = { classes: PropTypes.object.isRequired, // MUI withStyles() }; export default withStyles(styles)(IconSnackbarContentPage);
src/main/webapp/static/jquery-validation/1.11.1/lib/jquery-1.9.0.js
xingguang2013/jeesite
/*! * jQuery JavaScript Library v1.9.0 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2013-1-14 */ (function( window, undefined ) { "use strict"; var // A central reference to the root jQuery(document) rootjQuery, // The deferred used on DOM ready readyList, // Use the correct document accordingly with window argument (sandbox) document = window.document, location = window.location, // Map over jQuery in case of overwrite _jQuery = window.jQuery, // Map over the $ in case of overwrite _$ = window.$, // [[Class]] -> type pairs class2type = {}, // List of deleted data cache ids, so we can reuse them core_deletedIds = [], core_version = "1.9.0", // Save a reference to some core methods core_concat = core_deletedIds.concat, core_push = core_deletedIds.push, core_slice = core_deletedIds.slice, core_indexOf = core_deletedIds.indexOf, core_toString = class2type.toString, core_hasOwn = class2type.hasOwnProperty, core_trim = core_version.trim, // Define a local copy of jQuery jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context, rootjQuery ); }, // Used for matching numbers core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, // Used for splitting on whitespace core_rnotwhite = /\S+/g, // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, // A simple way to check for HTML strings // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) // Strict HTML recognition (#11290: must start with <) rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/, // Match a standalone tag rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, // JSON RegExp rvalidchars = /^[\],:{}\s]*$/, rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, // Matches dashed string for camelizing rmsPrefix = /^-ms-/, rdashAlpha = /-([\da-z])/gi, // Used by jQuery.camelCase as callback to replace() fcamelCase = function( all, letter ) { return letter.toUpperCase(); }, // The ready event handler and self cleanup method DOMContentLoaded = function() { if ( document.addEventListener ) { document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); jQuery.ready(); } else if ( document.readyState === "complete" ) { // we're here because readyState === "complete" in oldIE // which is good enough for us to call the dom ready! document.detachEvent( "onreadystatechange", DOMContentLoaded ); jQuery.ready(); } }; jQuery.fn = jQuery.prototype = { // The current version of jQuery being used jquery: core_version, constructor: jQuery, init: function( selector, context, rootjQuery ) { var match, elem; // HANDLE: $(""), $(null), $(undefined), $(false) if ( !selector ) { return this; } // Handle HTML strings if ( typeof selector === "string" ) { if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { // Assume that strings that start and end with <> are HTML and skip the regex check match = [ null, selector, null ]; } else { match = rquickExpr.exec( selector ); } // Match html or make sure no context is specified for #id if ( match && (match[1] || !context) ) { // HANDLE: $(html) -> $(array) if ( match[1] ) { context = context instanceof jQuery ? context[0] : context; // scripts is true for back-compat jQuery.merge( this, jQuery.parseHTML( match[1], context && context.nodeType ? context.ownerDocument || context : document, true ) ); // HANDLE: $(html, props) if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { for ( match in context ) { // Properties of context are called as methods if possible if ( jQuery.isFunction( this[ match ] ) ) { this[ match ]( context[ match ] ); // ...and otherwise set as attributes } else { this.attr( match, context[ match ] ); } } } return this; // HANDLE: $(#id) } else { elem = document.getElementById( match[2] ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 if ( elem && elem.parentNode ) { // Handle the case where IE and Opera return items // by name instead of ID if ( elem.id !== match[2] ) { return rootjQuery.find( selector ); } // Otherwise, we inject the element directly into the jQuery object this.length = 1; this[0] = elem; } this.context = document; this.selector = selector; return this; } // HANDLE: $(expr, $(...)) } else if ( !context || context.jquery ) { return ( context || rootjQuery ).find( selector ); // HANDLE: $(expr, context) // (which is just equivalent to: $(context).find(expr) } else { return this.constructor( context ).find( selector ); } // HANDLE: $(DOMElement) } else if ( selector.nodeType ) { this.context = this[0] = selector; this.length = 1; return this; // HANDLE: $(function) // Shortcut for document ready } else if ( jQuery.isFunction( selector ) ) { return rootjQuery.ready( selector ); } if ( selector.selector !== undefined ) { this.selector = selector.selector; this.context = selector.context; } return jQuery.makeArray( selector, this ); }, // Start with an empty selector selector: "", // The default length of a jQuery object is 0 length: 0, // The number of elements contained in the matched element set size: function() { return this.length; }, toArray: function() { return core_slice.call( this ); }, // Get the Nth element in the matched element set OR // Get the whole matched element set as a clean array get: function( num ) { return num == null ? // Return a 'clean' array this.toArray() : // Return just the object ( num < 0 ? this[ this.length + num ] : this[ num ] ); }, // Take an array of elements and push it onto the stack // (returning the new matched element set) pushStack: function( elems ) { // Build a new jQuery matched element set var ret = jQuery.merge( this.constructor(), elems ); // Add the old object onto the stack (as a reference) ret.prevObject = this; ret.context = this.context; // Return the newly-formed element set return ret; }, // Execute a callback for every element in the matched set. // (You can seed the arguments with an array of args, but this is // only used internally.) each: function( callback, args ) { return jQuery.each( this, callback, args ); }, ready: function( fn ) { // Add the callback jQuery.ready.promise().done( fn ); return this; }, slice: function() { return this.pushStack( core_slice.apply( this, arguments ) ); }, first: function() { return this.eq( 0 ); }, last: function() { return this.eq( -1 ); }, eq: function( i ) { var len = this.length, j = +i + ( i < 0 ? len : 0 ); return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); }, map: function( callback ) { return this.pushStack( jQuery.map(this, function( elem, i ) { return callback.call( elem, i, elem ); })); }, end: function() { return this.prevObject || this.constructor(null); }, // For internal use only. // Behaves like an Array's method, not like a jQuery method. push: core_push, sort: [].sort, splice: [].splice }; // Give the init function the jQuery prototype for later instantiation jQuery.fn.init.prototype = jQuery.fn; jQuery.extend = jQuery.fn.extend = function() { var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false; // Handle a deep copy situation if ( typeof target === "boolean" ) { deep = target; target = arguments[1] || {}; // skip the boolean and the target i = 2; } // Handle case when target is a string or something (possible in deep copy) if ( typeof target !== "object" && !jQuery.isFunction(target) ) { target = {}; } // extend jQuery itself if only one argument is passed if ( length === i ) { target = this; --i; } for ( ; i < length; i++ ) { // Only deal with non-null/undefined values if ( (options = arguments[ i ]) != null ) { // Extend the base object for ( name in options ) { src = target[ name ]; copy = options[ name ]; // Prevent never-ending loop if ( target === copy ) { continue; } // Recurse if we're merging plain objects or arrays if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { if ( copyIsArray ) { copyIsArray = false; clone = src && jQuery.isArray(src) ? src : []; } else { clone = src && jQuery.isPlainObject(src) ? src : {}; } // Never move original objects, clone them target[ name ] = jQuery.extend( deep, clone, copy ); // Don't bring in undefined values } else if ( copy !== undefined ) { target[ name ] = copy; } } } } // Return the modified object return target; }; jQuery.extend({ noConflict: function( deep ) { if ( window.$ === jQuery ) { window.$ = _$; } if ( deep && window.jQuery === jQuery ) { window.jQuery = _jQuery; } return jQuery; }, // Is the DOM ready to be used? Set to true once it occurs. isReady: false, // A counter to track how many items to wait for before // the ready event fires. See #6781 readyWait: 1, // Hold (or release) the ready event holdReady: function( hold ) { if ( hold ) { jQuery.readyWait++; } else { jQuery.ready( true ); } }, // Handle when the DOM is ready ready: function( wait ) { // Abort if there are pending holds or we're already ready if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { return; } // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). if ( !document.body ) { return setTimeout( jQuery.ready ); } // Remember that the DOM is ready jQuery.isReady = true; // If a normal DOM Ready event fired, decrement, and wait if need be if ( wait !== true && --jQuery.readyWait > 0 ) { return; } // If there are functions bound, to execute readyList.resolveWith( document, [ jQuery ] ); // Trigger any bound ready events if ( jQuery.fn.trigger ) { jQuery( document ).trigger("ready").off("ready"); } }, // See test/unit/core.js for details concerning isFunction. // Since version 1.3, DOM methods and functions like alert // aren't supported. They return false on IE (#2968). isFunction: function( obj ) { return jQuery.type(obj) === "function"; }, isArray: Array.isArray || function( obj ) { return jQuery.type(obj) === "array"; }, isWindow: function( obj ) { return obj != null && obj == obj.window; }, isNumeric: function( obj ) { return !isNaN( parseFloat(obj) ) && isFinite( obj ); }, type: function( obj ) { if ( obj == null ) { return String( obj ); } return typeof obj === "object" || typeof obj === "function" ? class2type[ core_toString.call(obj) ] || "object" : typeof obj; }, isPlainObject: function( obj ) { // Must be an Object. // Because of IE, we also have to check the presence of the constructor property. // Make sure that DOM nodes and window objects don't pass through, as well if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { return false; } try { // Not own constructor property must be Object if ( obj.constructor && !core_hasOwn.call(obj, "constructor") && !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { return false; } } catch ( e ) { // IE8,9 Will throw exceptions on certain host objects #9897 return false; } // Own properties are enumerated firstly, so to speed up, // if last one is own, then all properties are own. var key; for ( key in obj ) {} return key === undefined || core_hasOwn.call( obj, key ); }, isEmptyObject: function( obj ) { var name; for ( name in obj ) { return false; } return true; }, error: function( msg ) { throw new Error( msg ); }, // data: string of html // context (optional): If specified, the fragment will be created in this context, defaults to document // keepScripts (optional): If true, will include scripts passed in the html string parseHTML: function( data, context, keepScripts ) { if ( !data || typeof data !== "string" ) { return null; } if ( typeof context === "boolean" ) { keepScripts = context; context = false; } context = context || document; var parsed = rsingleTag.exec( data ), scripts = !keepScripts && []; // Single tag if ( parsed ) { return [ context.createElement( parsed[1] ) ]; } parsed = jQuery.buildFragment( [ data ], context, scripts ); if ( scripts ) { jQuery( scripts ).remove(); } return jQuery.merge( [], parsed.childNodes ); }, parseJSON: function( data ) { // Attempt to parse using the native JSON parser first if ( window.JSON && window.JSON.parse ) { return window.JSON.parse( data ); } if ( data === null ) { return data; } if ( typeof data === "string" ) { // Make sure leading/trailing whitespace is removed (IE can't handle it) data = jQuery.trim( data ); if ( data ) { // Make sure the incoming data is actual JSON // Logic borrowed from http://json.org/json2.js if ( rvalidchars.test( data.replace( rvalidescape, "@" ) .replace( rvalidtokens, "]" ) .replace( rvalidbraces, "")) ) { return ( new Function( "return " + data ) )(); } } } jQuery.error( "Invalid JSON: " + data ); }, // Cross-browser xml parsing parseXML: function( data ) { var xml, tmp; if ( !data || typeof data !== "string" ) { return null; } try { if ( window.DOMParser ) { // Standard tmp = new DOMParser(); xml = tmp.parseFromString( data , "text/xml" ); } else { // IE xml = new ActiveXObject( "Microsoft.XMLDOM" ); xml.async = "false"; xml.loadXML( data ); } } catch( e ) { xml = undefined; } if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { jQuery.error( "Invalid XML: " + data ); } return xml; }, noop: function() {}, // Evaluates a script in a global context // Workarounds based on findings by Jim Driscoll // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context globalEval: function( data ) { if ( data && jQuery.trim( data ) ) { // We use execScript on Internet Explorer // We use an anonymous function so that context is window // rather than jQuery in Firefox ( window.execScript || function( data ) { window[ "eval" ].call( window, data ); } )( data ); } }, // Convert dashed to camelCase; used by the css and data modules // Microsoft forgot to hump their vendor prefix (#9572) camelCase: function( string ) { return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); }, nodeName: function( elem, name ) { return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); }, // args is for internal usage only each: function( obj, callback, args ) { var value, i = 0, length = obj.length, isArray = isArraylike( obj ); if ( args ) { if ( isArray ) { for ( ; i < length; i++ ) { value = callback.apply( obj[ i ], args ); if ( value === false ) { break; } } } else { for ( i in obj ) { value = callback.apply( obj[ i ], args ); if ( value === false ) { break; } } } // A special, fast, case for the most common use of each } else { if ( isArray ) { for ( ; i < length; i++ ) { value = callback.call( obj[ i ], i, obj[ i ] ); if ( value === false ) { break; } } } else { for ( i in obj ) { value = callback.call( obj[ i ], i, obj[ i ] ); if ( value === false ) { break; } } } } return obj; }, // Use native String.trim function wherever possible trim: core_trim && !core_trim.call("\uFEFF\xA0") ? function( text ) { return text == null ? "" : core_trim.call( text ); } : // Otherwise use our own trimming functionality function( text ) { return text == null ? "" : ( text + "" ).replace( rtrim, "" ); }, // results is for internal usage only makeArray: function( arr, results ) { var ret = results || []; if ( arr != null ) { if ( isArraylike( Object(arr) ) ) { jQuery.merge( ret, typeof arr === "string" ? [ arr ] : arr ); } else { core_push.call( ret, arr ); } } return ret; }, inArray: function( elem, arr, i ) { var len; if ( arr ) { if ( core_indexOf ) { return core_indexOf.call( arr, elem, i ); } len = arr.length; i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; for ( ; i < len; i++ ) { // Skip accessing in sparse arrays if ( i in arr && arr[ i ] === elem ) { return i; } } } return -1; }, merge: function( first, second ) { var l = second.length, i = first.length, j = 0; if ( typeof l === "number" ) { for ( ; j < l; j++ ) { first[ i++ ] = second[ j ]; } } else { while ( second[j] !== undefined ) { first[ i++ ] = second[ j++ ]; } } first.length = i; return first; }, grep: function( elems, callback, inv ) { var retVal, ret = [], i = 0, length = elems.length; inv = !!inv; // Go through the array, only saving the items // that pass the validator function for ( ; i < length; i++ ) { retVal = !!callback( elems[ i ], i ); if ( inv !== retVal ) { ret.push( elems[ i ] ); } } return ret; }, // arg is for internal usage only map: function( elems, callback, arg ) { var value, i = 0, length = elems.length, isArray = isArraylike( elems ), ret = []; // Go through the array, translating each of the items to their if ( isArray ) { for ( ; i < length; i++ ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret[ ret.length ] = value; } } // Go through every key on the object, } else { for ( i in elems ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret[ ret.length ] = value; } } } // Flatten any nested arrays return core_concat.apply( [], ret ); }, // A global GUID counter for objects guid: 1, // Bind a function to a context, optionally partially applying any // arguments. proxy: function( fn, context ) { var tmp, args, proxy; if ( typeof context === "string" ) { tmp = fn[ context ]; context = fn; fn = tmp; } // Quick check to determine if target is callable, in the spec // this throws a TypeError, but we will just return undefined. if ( !jQuery.isFunction( fn ) ) { return undefined; } // Simulated bind args = core_slice.call( arguments, 2 ); proxy = function() { return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); }; // Set the guid of unique handler to the same of original handler, so it can be removed proxy.guid = fn.guid = fn.guid || jQuery.guid++; return proxy; }, // Multifunctional method to get and set values of a collection // The value/s can optionally be executed if it's a function access: function( elems, fn, key, value, chainable, emptyGet, raw ) { var i = 0, length = elems.length, bulk = key == null; // Sets many values if ( jQuery.type( key ) === "object" ) { chainable = true; for ( i in key ) { jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); } // Sets one value } else if ( value !== undefined ) { chainable = true; if ( !jQuery.isFunction( value ) ) { raw = true; } if ( bulk ) { // Bulk operations run against the entire set if ( raw ) { fn.call( elems, value ); fn = null; // ...except when executing function values } else { bulk = fn; fn = function( elem, key, value ) { return bulk.call( jQuery( elem ), value ); }; } } if ( fn ) { for ( ; i < length; i++ ) { fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); } } } return chainable ? elems : // Gets bulk ? fn.call( elems ) : length ? fn( elems[0], key ) : emptyGet; }, now: function() { return ( new Date() ).getTime(); } }); jQuery.ready.promise = function( obj ) { if ( !readyList ) { readyList = jQuery.Deferred(); // Catch cases where $(document).ready() is called after the browser event has already occurred. // we once tried to use readyState "interactive" here, but it caused issues like the one // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 if ( document.readyState === "complete" ) { // Handle it asynchronously to allow scripts the opportunity to delay ready setTimeout( jQuery.ready ); // Standards-based browsers support DOMContentLoaded } else if ( document.addEventListener ) { // Use the handy event callback document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); // A fallback to window.onload, that will always work window.addEventListener( "load", jQuery.ready, false ); // If IE event model is used } else { // Ensure firing before onload, maybe late but safe also for iframes document.attachEvent( "onreadystatechange", DOMContentLoaded ); // A fallback to window.onload, that will always work window.attachEvent( "onload", jQuery.ready ); // If IE and not a frame // continually check to see if the document is ready var top = false; try { top = window.frameElement == null && document.documentElement; } catch(e) {} if ( top && top.doScroll ) { (function doScrollCheck() { if ( !jQuery.isReady ) { try { // Use the trick by Diego Perini // http://javascript.nwbox.com/IEContentLoaded/ top.doScroll("left"); } catch(e) { return setTimeout( doScrollCheck, 50 ); } // and execute any waiting functions jQuery.ready(); } })(); } } } return readyList.promise( obj ); }; // Populate the class2type map jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { class2type[ "[object " + name + "]" ] = name.toLowerCase(); }); function isArraylike( obj ) { var length = obj.length, type = jQuery.type( obj ); if ( jQuery.isWindow( obj ) ) { return false; } if ( obj.nodeType === 1 && length ) { return true; } return type === "array" || type !== "function" && ( length === 0 || typeof length === "number" && length > 0 && ( length - 1 ) in obj ); } // All jQuery objects should point back to these rootjQuery = jQuery(document); // String to Object options format cache var optionsCache = {}; // Convert String-formatted options into Object-formatted ones and store in cache function createOptions( options ) { var object = optionsCache[ options ] = {}; jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { object[ flag ] = true; }); return object; } /* * Create a callback list using the following parameters: * * options: an optional list of space-separated options that will change how * the callback list behaves or a more traditional option object * * By default a callback list will act like an event callback list and can be * "fired" multiple times. * * Possible options: * * once: will ensure the callback list can only be fired once (like a Deferred) * * memory: will keep track of previous values and will call any callback added * after the list has been fired right away with the latest "memorized" * values (like a Deferred) * * unique: will ensure a callback can only be added once (no duplicate in the list) * * stopOnFalse: interrupt callings when a callback returns false * */ jQuery.Callbacks = function( options ) { // Convert options from String-formatted to Object-formatted if needed // (we check in cache first) options = typeof options === "string" ? ( optionsCache[ options ] || createOptions( options ) ) : jQuery.extend( {}, options ); var // Last fire value (for non-forgettable lists) memory, // Flag to know if list was already fired fired, // Flag to know if list is currently firing firing, // First callback to fire (used internally by add and fireWith) firingStart, // End of the loop when firing firingLength, // Index of currently firing callback (modified by remove if needed) firingIndex, // Actual callback list list = [], // Stack of fire calls for repeatable lists stack = !options.once && [], // Fire callbacks fire = function( data ) { memory = options.memory && data; fired = true; firingIndex = firingStart || 0; firingStart = 0; firingLength = list.length; firing = true; for ( ; list && firingIndex < firingLength; firingIndex++ ) { if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { memory = false; // To prevent further calls using add break; } } firing = false; if ( list ) { if ( stack ) { if ( stack.length ) { fire( stack.shift() ); } } else if ( memory ) { list = []; } else { self.disable(); } } }, // Actual Callbacks object self = { // Add a callback or a collection of callbacks to the list add: function() { if ( list ) { // First, we save the current length var start = list.length; (function add( args ) { jQuery.each( args, function( _, arg ) { var type = jQuery.type( arg ); if ( type === "function" ) { if ( !options.unique || !self.has( arg ) ) { list.push( arg ); } } else if ( arg && arg.length && type !== "string" ) { // Inspect recursively add( arg ); } }); })( arguments ); // Do we need to add the callbacks to the // current firing batch? if ( firing ) { firingLength = list.length; // With memory, if we're not firing then // we should call right away } else if ( memory ) { firingStart = start; fire( memory ); } } return this; }, // Remove a callback from the list remove: function() { if ( list ) { jQuery.each( arguments, function( _, arg ) { var index; while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { list.splice( index, 1 ); // Handle firing indexes if ( firing ) { if ( index <= firingLength ) { firingLength--; } if ( index <= firingIndex ) { firingIndex--; } } } }); } return this; }, // Control if a given callback is in the list has: function( fn ) { return jQuery.inArray( fn, list ) > -1; }, // Remove all callbacks from the list empty: function() { list = []; return this; }, // Have the list do nothing anymore disable: function() { list = stack = memory = undefined; return this; }, // Is it disabled? disabled: function() { return !list; }, // Lock the list in its current state lock: function() { stack = undefined; if ( !memory ) { self.disable(); } return this; }, // Is it locked? locked: function() { return !stack; }, // Call all callbacks with the given context and arguments fireWith: function( context, args ) { args = args || []; args = [ context, args.slice ? args.slice() : args ]; if ( list && ( !fired || stack ) ) { if ( firing ) { stack.push( args ); } else { fire( args ); } } return this; }, // Call all the callbacks with the given arguments fire: function() { self.fireWith( this, arguments ); return this; }, // To know if the callbacks have already been called at least once fired: function() { return !!fired; } }; return self; }; jQuery.extend({ Deferred: function( func ) { var tuples = [ // action, add listener, listener list, final state [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], [ "notify", "progress", jQuery.Callbacks("memory") ] ], state = "pending", promise = { state: function() { return state; }, always: function() { deferred.done( arguments ).fail( arguments ); return this; }, then: function( /* fnDone, fnFail, fnProgress */ ) { var fns = arguments; return jQuery.Deferred(function( newDefer ) { jQuery.each( tuples, function( i, tuple ) { var action = tuple[ 0 ], fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; // deferred[ done | fail | progress ] for forwarding actions to newDefer deferred[ tuple[1] ](function() { var returned = fn && fn.apply( this, arguments ); if ( returned && jQuery.isFunction( returned.promise ) ) { returned.promise() .done( newDefer.resolve ) .fail( newDefer.reject ) .progress( newDefer.notify ); } else { newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); } }); }); fns = null; }).promise(); }, // Get a promise for this deferred // If obj is provided, the promise aspect is added to the object promise: function( obj ) { return obj != null ? jQuery.extend( obj, promise ) : promise; } }, deferred = {}; // Keep pipe for back-compat promise.pipe = promise.then; // Add list-specific methods jQuery.each( tuples, function( i, tuple ) { var list = tuple[ 2 ], stateString = tuple[ 3 ]; // promise[ done | fail | progress ] = list.add promise[ tuple[1] ] = list.add; // Handle state if ( stateString ) { list.add(function() { // state = [ resolved | rejected ] state = stateString; // [ reject_list | resolve_list ].disable; progress_list.lock }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); } // deferred[ resolve | reject | notify ] deferred[ tuple[0] ] = function() { deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); return this; }; deferred[ tuple[0] + "With" ] = list.fireWith; }); // Make the deferred a promise promise.promise( deferred ); // Call given func if any if ( func ) { func.call( deferred, deferred ); } // All done! return deferred; }, // Deferred helper when: function( subordinate /* , ..., subordinateN */ ) { var i = 0, resolveValues = core_slice.call( arguments ), length = resolveValues.length, // the count of uncompleted subordinates remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, // the master Deferred. If resolveValues consist of only a single Deferred, just use that. deferred = remaining === 1 ? subordinate : jQuery.Deferred(), // Update function for both resolve and progress values updateFunc = function( i, contexts, values ) { return function( value ) { contexts[ i ] = this; values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; if( values === progressValues ) { deferred.notifyWith( contexts, values ); } else if ( !( --remaining ) ) { deferred.resolveWith( contexts, values ); } }; }, progressValues, progressContexts, resolveContexts; // add listeners to Deferred subordinates; treat others as resolved if ( length > 1 ) { progressValues = new Array( length ); progressContexts = new Array( length ); resolveContexts = new Array( length ); for ( ; i < length; i++ ) { if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { resolveValues[ i ].promise() .done( updateFunc( i, resolveContexts, resolveValues ) ) .fail( deferred.reject ) .progress( updateFunc( i, progressContexts, progressValues ) ); } else { --remaining; } } } // if we're not waiting on anything, resolve the master if ( !remaining ) { deferred.resolveWith( resolveContexts, resolveValues ); } return deferred.promise(); } }); jQuery.support = (function() { var support, all, a, select, opt, input, fragment, eventName, isSupported, i, div = document.createElement("div"); // Setup div.setAttribute( "className", "t" ); div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; // Support tests won't run in some limited or non-browser environments all = div.getElementsByTagName("*"); a = div.getElementsByTagName("a")[ 0 ]; if ( !all || !a || !all.length ) { return {}; } // First batch of tests select = document.createElement("select"); opt = select.appendChild( document.createElement("option") ); input = div.getElementsByTagName("input")[ 0 ]; a.style.cssText = "top:1px;float:left;opacity:.5"; support = { // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) getSetAttribute: div.className !== "t", // IE strips leading whitespace when .innerHTML is used leadingWhitespace: div.firstChild.nodeType === 3, // Make sure that tbody elements aren't automatically inserted // IE will insert them into empty tables tbody: !div.getElementsByTagName("tbody").length, // Make sure that link elements get serialized correctly by innerHTML // This requires a wrapper element in IE htmlSerialize: !!div.getElementsByTagName("link").length, // Get the style information from getAttribute // (IE uses .cssText instead) style: /top/.test( a.getAttribute("style") ), // Make sure that URLs aren't manipulated // (IE normalizes it by default) hrefNormalized: a.getAttribute("href") === "/a", // Make sure that element opacity exists // (IE uses filter instead) // Use a regex to work around a WebKit issue. See #5145 opacity: /^0.5/.test( a.style.opacity ), // Verify style float existence // (IE uses styleFloat instead of cssFloat) cssFloat: !!a.style.cssFloat, // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) checkOn: !!input.value, // Make sure that a selected-by-default option has a working selected property. // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) optSelected: opt.selected, // Tests for enctype support on a form (#6743) enctype: !!document.createElement("form").enctype, // Makes sure cloning an html5 element does not cause problems // Where outerHTML is undefined, this still works html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>", // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode boxModel: document.compatMode === "CSS1Compat", // Will be defined later deleteExpando: true, noCloneEvent: true, inlineBlockNeedsLayout: false, shrinkWrapBlocks: false, reliableMarginRight: true, boxSizingReliable: true, pixelPosition: false }; // Make sure checked status is properly cloned input.checked = true; support.noCloneChecked = input.cloneNode( true ).checked; // Make sure that the options inside disabled selects aren't marked as disabled // (WebKit marks them as disabled) select.disabled = true; support.optDisabled = !opt.disabled; // Support: IE<9 try { delete div.test; } catch( e ) { support.deleteExpando = false; } // Check if we can trust getAttribute("value") input = document.createElement("input"); input.setAttribute( "value", "" ); support.input = input.getAttribute( "value" ) === ""; // Check if an input maintains its value after becoming a radio input.value = "t"; input.setAttribute( "type", "radio" ); support.radioValue = input.value === "t"; // #11217 - WebKit loses check when the name is after the checked attribute input.setAttribute( "checked", "t" ); input.setAttribute( "name", "t" ); fragment = document.createDocumentFragment(); fragment.appendChild( input ); // Check if a disconnected checkbox will retain its checked // value of true after appended to the DOM (IE6/7) support.appendChecked = input.checked; // WebKit doesn't clone checked state correctly in fragments support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; // Support: IE<9 // Opera does not clone events (and typeof div.attachEvent === undefined). // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() if ( div.attachEvent ) { div.attachEvent( "onclick", function() { support.noCloneEvent = false; }); div.cloneNode( true ).click(); } // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php for ( i in { submit: true, change: true, focusin: true }) { div.setAttribute( eventName = "on" + i, "t" ); support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; } div.style.backgroundClip = "content-box"; div.cloneNode( true ).style.backgroundClip = ""; support.clearCloneStyle = div.style.backgroundClip === "content-box"; // Run tests that need a body at doc ready jQuery(function() { var container, marginDiv, tds, divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", body = document.getElementsByTagName("body")[0]; if ( !body ) { // Return for frameset docs that don't have a body return; } container = document.createElement("div"); container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; body.appendChild( container ).appendChild( div ); // Support: IE8 // Check if table cells still have offsetWidth/Height when they are set // to display:none and there are still other visible table cells in a // table row; if so, offsetWidth/Height are not reliable for use when // determining if an element has been hidden directly using // display:none (it is still safe to use offsets if a parent element is // hidden; don safety goggles and see bug #4512 for more information). div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>"; tds = div.getElementsByTagName("td"); tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; isSupported = ( tds[ 0 ].offsetHeight === 0 ); tds[ 0 ].style.display = ""; tds[ 1 ].style.display = "none"; // Support: IE8 // Check if empty table cells still have offsetWidth/Height support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); // Check box-sizing and margin behavior div.innerHTML = ""; div.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%;"; support.boxSizing = ( div.offsetWidth === 4 ); support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); // Use window.getComputedStyle because jsdom on node.js will break without it. if ( window.getComputedStyle ) { support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; // Check if div with explicit width and no margin-right incorrectly // gets computed margin-right based on width of container. (#3333) // Fails in WebKit before Feb 2011 nightlies // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right marginDiv = div.appendChild( document.createElement("div") ); marginDiv.style.cssText = div.style.cssText = divReset; marginDiv.style.marginRight = marginDiv.style.width = "0"; div.style.width = "1px"; support.reliableMarginRight = !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); } if ( typeof div.style.zoom !== "undefined" ) { // Support: IE<8 // Check if natively block-level elements act like inline-block // elements when setting their display to 'inline' and giving // them layout div.innerHTML = ""; div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); // Support: IE6 // Check if elements with layout shrink-wrap their children div.style.display = "block"; div.innerHTML = "<div></div>"; div.firstChild.style.width = "5px"; support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); // Prevent IE 6 from affecting layout for positioned elements #11048 // Prevent IE from shrinking the body in IE 7 mode #12869 body.style.zoom = 1; } body.removeChild( container ); // Null elements to avoid leaks in IE container = div = tds = marginDiv = null; }); // Null elements to avoid leaks in IE all = select = fragment = opt = a = input = null; return support; })(); var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, rmultiDash = /([A-Z])/g; function internalData( elem, name, data, pvt /* Internal Use Only */ ){ if ( !jQuery.acceptData( elem ) ) { return; } var thisCache, ret, internalKey = jQuery.expando, getByName = typeof name === "string", // We have to handle DOM nodes and JS objects differently because IE6-7 // can't GC object references properly across the DOM-JS boundary isNode = elem.nodeType, // Only DOM nodes need the global jQuery cache; JS object data is // attached directly to the object so GC can occur automatically cache = isNode ? jQuery.cache : elem, // Only defining an ID for JS objects if its cache already exists allows // the code to shortcut on the same path as a DOM node with no cache id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; // Avoid doing any more work than we need to when trying to get data on an // object that has no data at all if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { return; } if ( !id ) { // Only DOM nodes need a new unique ID for each element since their data // ends up in the global cache if ( isNode ) { elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++; } else { id = internalKey; } } if ( !cache[ id ] ) { cache[ id ] = {}; // Avoids exposing jQuery metadata on plain JS objects when the object // is serialized using JSON.stringify if ( !isNode ) { cache[ id ].toJSON = jQuery.noop; } } // An object can be passed to jQuery.data instead of a key/value pair; this gets // shallow copied over onto the existing cache if ( typeof name === "object" || typeof name === "function" ) { if ( pvt ) { cache[ id ] = jQuery.extend( cache[ id ], name ); } else { cache[ id ].data = jQuery.extend( cache[ id ].data, name ); } } thisCache = cache[ id ]; // jQuery data() is stored in a separate object inside the object's internal data // cache in order to avoid key collisions between internal data and user-defined // data. if ( !pvt ) { if ( !thisCache.data ) { thisCache.data = {}; } thisCache = thisCache.data; } if ( data !== undefined ) { thisCache[ jQuery.camelCase( name ) ] = data; } // Check for both converted-to-camel and non-converted data property names // If a data property was specified if ( getByName ) { // First Try to find as-is property data ret = thisCache[ name ]; // Test for null|undefined property data if ( ret == null ) { // Try to find the camelCased property ret = thisCache[ jQuery.camelCase( name ) ]; } } else { ret = thisCache; } return ret; } function internalRemoveData( elem, name, pvt /* For internal use only */ ){ if ( !jQuery.acceptData( elem ) ) { return; } var thisCache, i, l, isNode = elem.nodeType, // See jQuery.data for more information cache = isNode ? jQuery.cache : elem, id = isNode ? elem[ jQuery.expando ] : jQuery.expando; // If there is already no cache entry for this object, there is no // purpose in continuing if ( !cache[ id ] ) { return; } if ( name ) { thisCache = pvt ? cache[ id ] : cache[ id ].data; if ( thisCache ) { // Support array or space separated string names for data keys if ( !jQuery.isArray( name ) ) { // try the string as a key before any manipulation if ( name in thisCache ) { name = [ name ]; } else { // split the camel cased version by spaces unless a key with the spaces exists name = jQuery.camelCase( name ); if ( name in thisCache ) { name = [ name ]; } else { name = name.split(" "); } } } else { // If "name" is an array of keys... // When data is initially created, via ("key", "val") signature, // keys will be converted to camelCase. // Since there is no way to tell _how_ a key was added, remove // both plain key and camelCase key. #12786 // This will only penalize the array argument path. name = name.concat( jQuery.map( name, jQuery.camelCase ) ); } for ( i = 0, l = name.length; i < l; i++ ) { delete thisCache[ name[i] ]; } // If there is no data left in the cache, we want to continue // and let the cache object itself get destroyed if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { return; } } } // See jQuery.data for more information if ( !pvt ) { delete cache[ id ].data; // Don't destroy the parent cache unless the internal data object // had been the only thing left in it if ( !isEmptyDataObject( cache[ id ] ) ) { return; } } // Destroy the cache if ( isNode ) { jQuery.cleanData( [ elem ], true ); // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) } else if ( jQuery.support.deleteExpando || cache != cache.window ) { delete cache[ id ]; // When all else fails, null } else { cache[ id ] = null; } } jQuery.extend({ cache: {}, // Unique for each copy of jQuery on the page // Non-digits removed to match rinlinejQuery expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), // The following elements throw uncatchable exceptions if you // attempt to add expando properties to them. noData: { "embed": true, // Ban all objects except for Flash (which handle expandos) "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", "applet": true }, hasData: function( elem ) { elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; return !!elem && !isEmptyDataObject( elem ); }, data: function( elem, name, data ) { return internalData( elem, name, data, false ); }, removeData: function( elem, name ) { return internalRemoveData( elem, name, false ); }, // For internal use only. _data: function( elem, name, data ) { return internalData( elem, name, data, true ); }, _removeData: function( elem, name ) { return internalRemoveData( elem, name, true ); }, // A method for determining if a DOM node can handle the data expando acceptData: function( elem ) { var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; // nodes accept data unless otherwise specified; rejection can be conditional return !noData || noData !== true && elem.getAttribute("classid") === noData; } }); jQuery.fn.extend({ data: function( key, value ) { var attrs, name, elem = this[0], i = 0, data = null; // Gets all values if ( key === undefined ) { if ( this.length ) { data = jQuery.data( elem ); if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { attrs = elem.attributes; for ( ; i < attrs.length; i++ ) { name = attrs[i].name; if ( !name.indexOf( "data-" ) ) { name = jQuery.camelCase( name.substring(5) ); dataAttr( elem, name, data[ name ] ); } } jQuery._data( elem, "parsedAttrs", true ); } } return data; } // Sets multiple values if ( typeof key === "object" ) { return this.each(function() { jQuery.data( this, key ); }); } return jQuery.access( this, function( value ) { if ( value === undefined ) { // Try to fetch any internally stored data first return elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; } this.each(function() { jQuery.data( this, key, value ); }); }, null, value, arguments.length > 1, null, true ); }, removeData: function( key ) { return this.each(function() { jQuery.removeData( this, key ); }); } }); function dataAttr( elem, key, data ) { // If nothing was found internally, try to fetch any // data from the HTML5 data-* attribute if ( data === undefined && elem.nodeType === 1 ) { var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); data = elem.getAttribute( name ); if ( typeof data === "string" ) { try { data = data === "true" ? true : data === "false" ? false : data === "null" ? null : // Only convert to a number if it doesn't change the string +data + "" === data ? +data : rbrace.test( data ) ? jQuery.parseJSON( data ) : data; } catch( e ) {} // Make sure we set the data so it isn't changed later jQuery.data( elem, key, data ); } else { data = undefined; } } return data; } // checks a cache object for emptiness function isEmptyDataObject( obj ) { var name; for ( name in obj ) { // if the public data object is empty, the private is still empty if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { continue; } if ( name !== "toJSON" ) { return false; } } return true; } jQuery.extend({ queue: function( elem, type, data ) { var queue; if ( elem ) { type = ( type || "fx" ) + "queue"; queue = jQuery._data( elem, type ); // Speed up dequeue by getting out quickly if this is just a lookup if ( data ) { if ( !queue || jQuery.isArray(data) ) { queue = jQuery._data( elem, type, jQuery.makeArray(data) ); } else { queue.push( data ); } } return queue || []; } }, dequeue: function( elem, type ) { type = type || "fx"; var queue = jQuery.queue( elem, type ), startLength = queue.length, fn = queue.shift(), hooks = jQuery._queueHooks( elem, type ), next = function() { jQuery.dequeue( elem, type ); }; // If the fx queue is dequeued, always remove the progress sentinel if ( fn === "inprogress" ) { fn = queue.shift(); startLength--; } hooks.cur = fn; if ( fn ) { // Add a progress sentinel to prevent the fx queue from being // automatically dequeued if ( type === "fx" ) { queue.unshift( "inprogress" ); } // clear up the last queue stop function delete hooks.stop; fn.call( elem, next, hooks ); } if ( !startLength && hooks ) { hooks.empty.fire(); } }, // not intended for public consumption - generates a queueHooks object, or returns the current one _queueHooks: function( elem, type ) { var key = type + "queueHooks"; return jQuery._data( elem, key ) || jQuery._data( elem, key, { empty: jQuery.Callbacks("once memory").add(function() { jQuery._removeData( elem, type + "queue" ); jQuery._removeData( elem, key ); }) }); } }); jQuery.fn.extend({ queue: function( type, data ) { var setter = 2; if ( typeof type !== "string" ) { data = type; type = "fx"; setter--; } if ( arguments.length < setter ) { return jQuery.queue( this[0], type ); } return data === undefined ? this : this.each(function() { var queue = jQuery.queue( this, type, data ); // ensure a hooks for this queue jQuery._queueHooks( this, type ); if ( type === "fx" && queue[0] !== "inprogress" ) { jQuery.dequeue( this, type ); } }); }, dequeue: function( type ) { return this.each(function() { jQuery.dequeue( this, type ); }); }, // Based off of the plugin by Clint Helfers, with permission. // http://blindsignals.com/index.php/2009/07/jquery-delay/ delay: function( time, type ) { time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; type = type || "fx"; return this.queue( type, function( next, hooks ) { var timeout = setTimeout( next, time ); hooks.stop = function() { clearTimeout( timeout ); }; }); }, clearQueue: function( type ) { return this.queue( type || "fx", [] ); }, // Get a promise resolved when queues of a certain type // are emptied (fx is the type by default) promise: function( type, obj ) { var tmp, count = 1, defer = jQuery.Deferred(), elements = this, i = this.length, resolve = function() { if ( !( --count ) ) { defer.resolveWith( elements, [ elements ] ); } }; if ( typeof type !== "string" ) { obj = type; type = undefined; } type = type || "fx"; while( i-- ) { tmp = jQuery._data( elements[ i ], type + "queueHooks" ); if ( tmp && tmp.empty ) { count++; tmp.empty.add( resolve ); } } resolve(); return defer.promise( obj ); } }); var nodeHook, boolHook, rclass = /[\t\r\n]/g, rreturn = /\r/g, rfocusable = /^(?:input|select|textarea|button|object)$/i, rclickable = /^(?:a|area)$/i, rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i, ruseDefault = /^(?:checked|selected)$/i, getSetAttribute = jQuery.support.getSetAttribute, getSetInput = jQuery.support.input; jQuery.fn.extend({ attr: function( name, value ) { return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); }, removeAttr: function( name ) { return this.each(function() { jQuery.removeAttr( this, name ); }); }, prop: function( name, value ) { return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); }, removeProp: function( name ) { name = jQuery.propFix[ name ] || name; return this.each(function() { // try/catch handles cases where IE balks (such as removing a property on window) try { this[ name ] = undefined; delete this[ name ]; } catch( e ) {} }); }, addClass: function( value ) { var classes, elem, cur, clazz, j, i = 0, len = this.length, proceed = typeof value === "string" && value; if ( jQuery.isFunction( value ) ) { return this.each(function( j ) { jQuery( this ).addClass( value.call( this, j, this.className ) ); }); } if ( proceed ) { // The disjunction here is for better compressibility (see removeClass) classes = ( value || "" ).match( core_rnotwhite ) || []; for ( ; i < len; i++ ) { elem = this[ i ]; cur = elem.nodeType === 1 && ( elem.className ? ( " " + elem.className + " " ).replace( rclass, " " ) : " " ); if ( cur ) { j = 0; while ( (clazz = classes[j++]) ) { if ( cur.indexOf( " " + clazz + " " ) < 0 ) { cur += clazz + " "; } } elem.className = jQuery.trim( cur ); } } } return this; }, removeClass: function( value ) { var classes, elem, cur, clazz, j, i = 0, len = this.length, proceed = arguments.length === 0 || typeof value === "string" && value; if ( jQuery.isFunction( value ) ) { return this.each(function( j ) { jQuery( this ).removeClass( value.call( this, j, this.className ) ); }); } if ( proceed ) { classes = ( value || "" ).match( core_rnotwhite ) || []; for ( ; i < len; i++ ) { elem = this[ i ]; // This expression is here for better compressibility (see addClass) cur = elem.nodeType === 1 && ( elem.className ? ( " " + elem.className + " " ).replace( rclass, " " ) : "" ); if ( cur ) { j = 0; while ( (clazz = classes[j++]) ) { // Remove *all* instances while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { cur = cur.replace( " " + clazz + " ", " " ); } } elem.className = value ? jQuery.trim( cur ) : ""; } } } return this; }, toggleClass: function( value, stateVal ) { var type = typeof value, isBool = typeof stateVal === "boolean"; if ( jQuery.isFunction( value ) ) { return this.each(function( i ) { jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); }); } return this.each(function() { if ( type === "string" ) { // toggle individual class names var className, i = 0, self = jQuery( this ), state = stateVal, classNames = value.match( core_rnotwhite ) || []; while ( (className = classNames[ i++ ]) ) { // check each className given, space separated list state = isBool ? state : !self.hasClass( className ); self[ state ? "addClass" : "removeClass" ]( className ); } // Toggle whole class name } else if ( type === "undefined" || type === "boolean" ) { if ( this.className ) { // store className if set jQuery._data( this, "__className__", this.className ); } // If the element has a class name or if we're passed "false", // then remove the whole classname (if there was one, the above saved it). // Otherwise bring back whatever was previously saved (if anything), // falling back to the empty string if nothing was stored. this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; } }); }, hasClass: function( selector ) { var className = " " + selector + " ", i = 0, l = this.length; for ( ; i < l; i++ ) { if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { return true; } } return false; }, val: function( value ) { var hooks, ret, isFunction, elem = this[0]; if ( !arguments.length ) { if ( elem ) { hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { return ret; } ret = elem.value; return typeof ret === "string" ? // handle most common string cases ret.replace(rreturn, "") : // handle cases where value is null/undef or number ret == null ? "" : ret; } return; } isFunction = jQuery.isFunction( value ); return this.each(function( i ) { var val, self = jQuery(this); if ( this.nodeType !== 1 ) { return; } if ( isFunction ) { val = value.call( this, i, self.val() ); } else { val = value; } // Treat null/undefined as ""; convert numbers to string if ( val == null ) { val = ""; } else if ( typeof val === "number" ) { val += ""; } else if ( jQuery.isArray( val ) ) { val = jQuery.map(val, function ( value ) { return value == null ? "" : value + ""; }); } hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; // If set returns undefined, fall back to normal setting if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { this.value = val; } }); } }); jQuery.extend({ valHooks: { option: { get: function( elem ) { // attributes.value is undefined in Blackberry 4.7 but // uses .value. See #6932 var val = elem.attributes.value; return !val || val.specified ? elem.value : elem.text; } }, select: { get: function( elem ) { var value, option, options = elem.options, index = elem.selectedIndex, one = elem.type === "select-one" || index < 0, values = one ? null : [], max = one ? index + 1 : options.length, i = index < 0 ? max : one ? index : 0; // Loop through all the selected options for ( ; i < max; i++ ) { option = options[ i ]; // oldIE doesn't update selected after form reset (#2551) if ( ( option.selected || i === index ) && // Don't return options that are disabled or in a disabled optgroup ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { // Get the specific value for the option value = jQuery( option ).val(); // We don't need an array for one selects if ( one ) { return value; } // Multi-Selects return an array values.push( value ); } } return values; }, set: function( elem, value ) { var values = jQuery.makeArray( value ); jQuery(elem).find("option").each(function() { this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; }); if ( !values.length ) { elem.selectedIndex = -1; } return values; } } }, attr: function( elem, name, value ) { var ret, hooks, notxml, nType = elem.nodeType; // don't get/set attributes on text, comment and attribute nodes if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { return; } // Fallback to prop when attributes are not supported if ( typeof elem.getAttribute === "undefined" ) { return jQuery.prop( elem, name, value ); } notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); // All attributes are lowercase // Grab necessary hook if one is defined if ( notxml ) { name = name.toLowerCase(); hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); } if ( value !== undefined ) { if ( value === null ) { jQuery.removeAttr( elem, name ); } else if ( hooks && notxml && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { return ret; } else { elem.setAttribute( name, value + "" ); return value; } } else if ( hooks && notxml && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { return ret; } else { // In IE9+, Flash objects don't have .getAttribute (#12945) // Support: IE9+ if ( typeof elem.getAttribute !== "undefined" ) { ret = elem.getAttribute( name ); } // Non-existent attributes return null, we normalize to undefined return ret == null ? undefined : ret; } }, removeAttr: function( elem, value ) { var name, propName, i = 0, attrNames = value && value.match( core_rnotwhite ); if ( attrNames && elem.nodeType === 1 ) { while ( (name = attrNames[i++]) ) { propName = jQuery.propFix[ name ] || name; // Boolean attributes get special treatment (#10870) if ( rboolean.test( name ) ) { // Set corresponding property to false for boolean attributes // Also clear defaultChecked/defaultSelected (if appropriate) for IE<8 if ( !getSetAttribute && ruseDefault.test( name ) ) { elem[ jQuery.camelCase( "default-" + name ) ] = elem[ propName ] = false; } else { elem[ propName ] = false; } // See #9699 for explanation of this approach (setting first, then removal) } else { jQuery.attr( elem, name, "" ); } elem.removeAttribute( getSetAttribute ? name : propName ); } } }, attrHooks: { type: { set: function( elem, value ) { if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { // Setting the type on a radio button after the value resets the value in IE6-9 // Reset value to default in case type is set after value during creation var val = elem.value; elem.setAttribute( "type", value ); if ( val ) { elem.value = val; } return value; } } } }, propFix: { tabindex: "tabIndex", readonly: "readOnly", "for": "htmlFor", "class": "className", maxlength: "maxLength", cellspacing: "cellSpacing", cellpadding: "cellPadding", rowspan: "rowSpan", colspan: "colSpan", usemap: "useMap", frameborder: "frameBorder", contenteditable: "contentEditable" }, prop: function( elem, name, value ) { var ret, hooks, notxml, nType = elem.nodeType; // don't get/set properties on text, comment and attribute nodes if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { return; } notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); if ( notxml ) { // Fix name and attach hooks name = jQuery.propFix[ name ] || name; hooks = jQuery.propHooks[ name ]; } if ( value !== undefined ) { if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { return ret; } else { return ( elem[ name ] = value ); } } else { if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { return ret; } else { return elem[ name ]; } } }, propHooks: { tabIndex: { get: function( elem ) { // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ var attributeNode = elem.getAttributeNode("tabindex"); return attributeNode && attributeNode.specified ? parseInt( attributeNode.value, 10 ) : rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? 0 : undefined; } } } }); // Hook for boolean attributes boolHook = { get: function( elem, name ) { var // Use .prop to determine if this attribute is understood as boolean prop = jQuery.prop( elem, name ), // Fetch it accordingly attr = typeof prop === "boolean" && elem.getAttribute( name ), detail = typeof prop === "boolean" ? getSetInput && getSetAttribute ? attr != null : // oldIE fabricates an empty string for missing boolean attributes // and conflates checked/selected into attroperties ruseDefault.test( name ) ? elem[ jQuery.camelCase( "default-" + name ) ] : !!attr : // fetch an attribute node for properties not recognized as boolean elem.getAttributeNode( name ); return detail && detail.value !== false ? name.toLowerCase() : undefined; }, set: function( elem, value, name ) { if ( value === false ) { // Remove boolean attributes when set to false jQuery.removeAttr( elem, name ); } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { // IE<8 needs the *property* name elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); // Use defaultChecked and defaultSelected for oldIE } else { elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; } return name; } }; // fix oldIE value attroperty if ( !getSetInput || !getSetAttribute ) { jQuery.attrHooks.value = { get: function( elem, name ) { var ret = elem.getAttributeNode( name ); return jQuery.nodeName( elem, "input" ) ? // Ignore the value *property* by using defaultValue elem.defaultValue : ret && ret.specified ? ret.value : undefined; }, set: function( elem, value, name ) { if ( jQuery.nodeName( elem, "input" ) ) { // Does not return so that setAttribute is also used elem.defaultValue = value; } else { // Use nodeHook if defined (#1954); otherwise setAttribute is fine return nodeHook && nodeHook.set( elem, value, name ); } } }; } // IE6/7 do not support getting/setting some attributes with get/setAttribute if ( !getSetAttribute ) { // Use this for any attribute in IE6/7 // This fixes almost every IE6/7 issue nodeHook = jQuery.valHooks.button = { get: function( elem, name ) { var ret = elem.getAttributeNode( name ); return ret && ( name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified ) ? ret.value : undefined; }, set: function( elem, value, name ) { // Set the existing or create a new attribute node var ret = elem.getAttributeNode( name ); if ( !ret ) { elem.setAttributeNode( (ret = elem.ownerDocument.createAttribute( name )) ); } ret.value = value += ""; // Break association with cloned elements by also using setAttribute (#9646) return name === "value" || value === elem.getAttribute( name ) ? value : undefined; } }; // Set contenteditable to false on removals(#10429) // Setting to empty string throws an error as an invalid value jQuery.attrHooks.contenteditable = { get: nodeHook.get, set: function( elem, value, name ) { nodeHook.set( elem, value === "" ? false : value, name ); } }; // Set width and height to auto instead of 0 on empty string( Bug #8150 ) // This is for removals jQuery.each([ "width", "height" ], function( i, name ) { jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { set: function( elem, value ) { if ( value === "" ) { elem.setAttribute( name, "auto" ); return value; } } }); }); } // Some attributes require a special call on IE // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx if ( !jQuery.support.hrefNormalized ) { jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { get: function( elem ) { var ret = elem.getAttribute( name, 2 ); return ret == null ? undefined : ret; } }); }); // href/src property should get the full normalized URL (#10299/#12915) jQuery.each([ "href", "src" ], function( i, name ) { jQuery.propHooks[ name ] = { get: function( elem ) { return elem.getAttribute( name, 4 ); } }; }); } if ( !jQuery.support.style ) { jQuery.attrHooks.style = { get: function( elem ) { // Return undefined in the case of empty string // Note: IE uppercases css property names, but if we were to .toLowerCase() // .cssText, that would destroy case senstitivity in URL's, like in "background" return elem.style.cssText || undefined; }, set: function( elem, value ) { return ( elem.style.cssText = value + "" ); } }; } // Safari mis-reports the default selected property of an option // Accessing the parent's selectedIndex property fixes it if ( !jQuery.support.optSelected ) { jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { get: function( elem ) { var parent = elem.parentNode; if ( parent ) { parent.selectedIndex; // Make sure that it also works with optgroups, see #5701 if ( parent.parentNode ) { parent.parentNode.selectedIndex; } } return null; } }); } // IE6/7 call enctype encoding if ( !jQuery.support.enctype ) { jQuery.propFix.enctype = "encoding"; } // Radios and checkboxes getter/setter if ( !jQuery.support.checkOn ) { jQuery.each([ "radio", "checkbox" ], function() { jQuery.valHooks[ this ] = { get: function( elem ) { // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified return elem.getAttribute("value") === null ? "on" : elem.value; } }; }); } jQuery.each([ "radio", "checkbox" ], function() { jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { set: function( elem, value ) { if ( jQuery.isArray( value ) ) { return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); } } }); }); var rformElems = /^(?:input|select|textarea)$/i, rkeyEvent = /^key/, rmouseEvent = /^(?:mouse|contextmenu)|click/, rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; function returnTrue() { return true; } function returnFalse() { return false; } /* * Helper functions for managing events -- not part of the public interface. * Props to Dean Edwards' addEvent library for many of the ideas. */ jQuery.event = { global: {}, add: function( elem, types, handler, data, selector ) { var handleObjIn, eventHandle, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, // Don't attach events to noData or text/comment nodes (but allow plain objects) elemData = elem.nodeType !== 3 && elem.nodeType !== 8 && jQuery._data( elem ); if ( !elemData ) { return; } // Caller can pass in an object of custom data in lieu of the handler if ( handler.handler ) { handleObjIn = handler; handler = handleObjIn.handler; selector = handleObjIn.selector; } // Make sure that the handler has a unique ID, used to find/remove it later if ( !handler.guid ) { handler.guid = jQuery.guid++; } // Init the element's event structure and main handler, if this is the first if ( !(events = elemData.events) ) { events = elemData.events = {}; } if ( !(eventHandle = elemData.handle) ) { eventHandle = elemData.handle = function( e ) { // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : undefined; }; // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events eventHandle.elem = elem; } // Handle multiple events separated by a space // jQuery(...).bind("mouseover mouseout", fn); types = ( types || "" ).match( core_rnotwhite ) || [""]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[t] ) || []; type = origType = tmp[1]; namespaces = ( tmp[2] || "" ).split( "." ).sort(); // If event changes its type, use the special event handlers for the changed type special = jQuery.event.special[ type ] || {}; // If selector defined, determine special event api type, otherwise given type type = ( selector ? special.delegateType : special.bindType ) || type; // Update special based on newly reset type special = jQuery.event.special[ type ] || {}; // handleObj is passed to all event handlers handleObj = jQuery.extend({ type: type, origType: origType, data: data, handler: handler, guid: handler.guid, selector: selector, needsContext: selector && jQuery.expr.match.needsContext.test( selector ), namespace: namespaces.join(".") }, handleObjIn ); // Init the event handler queue if we're the first if ( !(handlers = events[ type ]) ) { handlers = events[ type ] = []; handlers.delegateCount = 0; // Only use addEventListener/attachEvent if the special events handler returns false if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { // Bind the global event handler to the element if ( elem.addEventListener ) { elem.addEventListener( type, eventHandle, false ); } else if ( elem.attachEvent ) { elem.attachEvent( "on" + type, eventHandle ); } } } if ( special.add ) { special.add.call( elem, handleObj ); if ( !handleObj.handler.guid ) { handleObj.handler.guid = handler.guid; } } // Add to the element's handler list, delegates in front if ( selector ) { handlers.splice( handlers.delegateCount++, 0, handleObj ); } else { handlers.push( handleObj ); } // Keep track of which events have ever been used, for event optimization jQuery.event.global[ type ] = true; } // Nullify elem to prevent memory leaks in IE elem = null; }, // Detach an event or set of events from an element remove: function( elem, types, handler, selector, mappedTypes ) { var j, origCount, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = jQuery.hasData( elem ) && jQuery._data( elem ); if ( !elemData || !(events = elemData.events) ) { return; } // Once for each type.namespace in types; type may be omitted types = ( types || "" ).match( core_rnotwhite ) || [""]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[t] ) || []; type = origType = tmp[1]; namespaces = ( tmp[2] || "" ).split( "." ).sort(); // Unbind all events (on this namespace, if provided) for the element if ( !type ) { for ( type in events ) { jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); } continue; } special = jQuery.event.special[ type ] || {}; type = ( selector ? special.delegateType : special.bindType ) || type; handlers = events[ type ] || []; tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); // Remove matching events origCount = j = handlers.length; while ( j-- ) { handleObj = handlers[ j ]; if ( ( mappedTypes || origType === handleObj.origType ) && ( !handler || handler.guid === handleObj.guid ) && ( !tmp || tmp.test( handleObj.namespace ) ) && ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { handlers.splice( j, 1 ); if ( handleObj.selector ) { handlers.delegateCount--; } if ( special.remove ) { special.remove.call( elem, handleObj ); } } } // Remove generic event handler if we removed something and no more handlers exist // (avoids potential for endless recursion during removal of special event handlers) if ( origCount && !handlers.length ) { if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { jQuery.removeEvent( elem, type, elemData.handle ); } delete events[ type ]; } } // Remove the expando if it's no longer used if ( jQuery.isEmptyObject( events ) ) { delete elemData.handle; // removeData also checks for emptiness and clears the expando if empty // so use it instead of delete jQuery._removeData( elem, "events" ); } }, trigger: function( event, data, elem, onlyHandlers ) { var i, cur, tmp, bubbleType, ontype, handle, special, eventPath = [ elem || document ], type = event.type || event, namespaces = event.namespace ? event.namespace.split(".") : []; cur = tmp = elem = elem || document; // Don't do events on text and comment nodes if ( elem.nodeType === 3 || elem.nodeType === 8 ) { return; } // focus/blur morphs to focusin/out; ensure we're not firing them right now if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { return; } if ( type.indexOf(".") >= 0 ) { // Namespaced trigger; create a regexp to match event type in handle() namespaces = type.split("."); type = namespaces.shift(); namespaces.sort(); } ontype = type.indexOf(":") < 0 && "on" + type; // Caller can pass in a jQuery.Event object, Object, or just an event type string event = event[ jQuery.expando ] ? event : new jQuery.Event( type, typeof event === "object" && event ); event.isTrigger = true; event.namespace = namespaces.join("."); event.namespace_re = event.namespace ? new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : null; // Clean up the event in case it is being reused event.result = undefined; if ( !event.target ) { event.target = elem; } // Clone any incoming data and prepend the event, creating the handler arg list data = data == null ? [ event ] : jQuery.makeArray( data, [ event ] ); // Allow special events to draw outside the lines special = jQuery.event.special[ type ] || {}; if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { return; } // Determine event propagation path in advance, per W3C events spec (#9951) // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { bubbleType = special.delegateType || type; if ( !rfocusMorph.test( bubbleType + type ) ) { cur = cur.parentNode; } for ( ; cur; cur = cur.parentNode ) { eventPath.push( cur ); tmp = cur; } // Only add window if we got to document (e.g., not plain obj or detached DOM) if ( tmp === (elem.ownerDocument || document) ) { eventPath.push( tmp.defaultView || tmp.parentWindow || window ); } } // Fire handlers on the event path i = 0; while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { event.type = i > 1 ? bubbleType : special.bindType || type; // jQuery handler handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); if ( handle ) { handle.apply( cur, data ); } // Native handler handle = ontype && cur[ ontype ]; if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { event.preventDefault(); } } event.type = type; // If nobody prevented the default action, do it now if ( !onlyHandlers && !event.isDefaultPrevented() ) { if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { // Call a native DOM method on the target with the same name name as the event. // Can't use an .isFunction() check here because IE6/7 fails that test. // Don't do default actions on window, that's where global variables be (#6170) if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { // Don't re-trigger an onFOO event when we call its FOO() method tmp = elem[ ontype ]; if ( tmp ) { elem[ ontype ] = null; } // Prevent re-triggering of the same event, since we already bubbled it above jQuery.event.triggered = type; try { elem[ type ](); } catch ( e ) { // IE<9 dies on focus/blur to hidden element (#1486,#12518) // only reproducible on winXP IE8 native, not IE9 in IE8 mode } jQuery.event.triggered = undefined; if ( tmp ) { elem[ ontype ] = tmp; } } } } return event.result; }, dispatch: function( event ) { // Make a writable jQuery.Event from the native event object event = jQuery.event.fix( event ); var i, j, ret, matched, handleObj, handlerQueue = [], args = core_slice.call( arguments ), handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], special = jQuery.event.special[ event.type ] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event args[0] = event; event.delegateTarget = this; // Call the preDispatch hook for the mapped type, and let it bail if desired if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { return; } // Determine handlers handlerQueue = jQuery.event.handlers.call( this, event, handlers ); // Run delegates first; they may want to stop propagation beneath us i = 0; while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { event.currentTarget = matched.elem; j = 0; while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { // Triggered event must either 1) have no namespace, or // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { event.handleObj = handleObj; event.data = handleObj.data; ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) .apply( matched.elem, args ); if ( ret !== undefined ) { if ( (event.result = ret) === false ) { event.preventDefault(); event.stopPropagation(); } } } } } // Call the postDispatch hook for the mapped type if ( special.postDispatch ) { special.postDispatch.call( this, event ); } return event.result; }, handlers: function( event, handlers ) { var i, matches, sel, handleObj, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target; // Find delegate handlers // Black-hole SVG <use> instance trees (#13180) // Avoid non-left-click bubbling in Firefox (#3861) if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { for ( ; cur != this; cur = cur.parentNode || this ) { // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) if ( cur.disabled !== true || event.type !== "click" ) { matches = []; for ( i = 0; i < delegateCount; i++ ) { handleObj = handlers[ i ]; // Don't conflict with Object.prototype properties (#13203) sel = handleObj.selector + " "; if ( matches[ sel ] === undefined ) { matches[ sel ] = handleObj.needsContext ? jQuery( sel, this ).index( cur ) >= 0 : jQuery.find( sel, this, null, [ cur ] ).length; } if ( matches[ sel ] ) { matches.push( handleObj ); } } if ( matches.length ) { handlerQueue.push({ elem: cur, handlers: matches }); } } } } // Add the remaining (directly-bound) handlers if ( delegateCount < handlers.length ) { handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); } return handlerQueue; }, fix: function( event ) { if ( event[ jQuery.expando ] ) { return event; } // Create a writable copy of the event object and normalize some properties var i, prop, originalEvent = event, fixHook = jQuery.event.fixHooks[ event.type ] || {}, copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; event = new jQuery.Event( originalEvent ); i = copy.length; while ( i-- ) { prop = copy[ i ]; event[ prop ] = originalEvent[ prop ]; } // Support: IE<9 // Fix target property (#1925) if ( !event.target ) { event.target = originalEvent.srcElement || document; } // Support: Chrome 23+, Safari? // Target should not be a text node (#504, #13143) if ( event.target.nodeType === 3 ) { event.target = event.target.parentNode; } // Support: IE<9 // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) event.metaKey = !!event.metaKey; return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; }, // Includes some event props shared by KeyEvent and MouseEvent 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( event, original ) { // Add which for key events if ( event.which == null ) { event.which = original.charCode != null ? original.charCode : original.keyCode; } return event; } }, mouseHooks: { props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), filter: function( event, original ) { var eventDoc, doc, body, button = original.button, fromElement = original.fromElement; // Calculate pageX/Y if missing and clientX/Y available if ( event.pageX == null && original.clientX != null ) { eventDoc = event.target.ownerDocument || document; doc = eventDoc.documentElement; body = eventDoc.body; event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); } // Add relatedTarget, if necessary if ( !event.relatedTarget && fromElement ) { event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; } // Add which for click: 1 === left; 2 === middle; 3 === right // Note: button is not normalized, so don't use it if ( !event.which && button !== undefined ) { event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); } return event; } }, special: { load: { // Prevent triggered image.load events from bubbling to window.load noBubble: true }, click: { // For checkbox, fire native event so checked state will be right trigger: function() { if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { this.click(); return false; } } }, focus: { // Fire native event if possible so blur/focus sequence is correct trigger: function() { if ( this !== document.activeElement && this.focus ) { try { this.focus(); return false; } catch ( e ) { // Support: IE<9 // If we error on focus to hidden element (#1486, #12518), // let .trigger() run the handlers } } }, delegateType: "focusin" }, blur: { trigger: function() { if ( this === document.activeElement && this.blur ) { this.blur(); return false; } }, delegateType: "focusout" }, beforeunload: { postDispatch: function( event ) { // Even when returnValue equals to undefined Firefox will still show alert if ( event.result !== undefined ) { event.originalEvent.returnValue = event.result; } } } }, simulate: function( type, elem, event, bubble ) { // Piggyback on a donor event to simulate a different one. // Fake originalEvent to avoid donor's stopPropagation, but if the // simulated event prevents default then we do the same on the donor. var e = jQuery.extend( new jQuery.Event(), event, { type: type, isSimulated: true, originalEvent: {} } ); if ( bubble ) { jQuery.event.trigger( e, null, elem ); } else { jQuery.event.dispatch.call( elem, e ); } if ( e.isDefaultPrevented() ) { event.preventDefault(); } } }; jQuery.removeEvent = document.removeEventListener ? function( elem, type, handle ) { if ( elem.removeEventListener ) { elem.removeEventListener( type, handle, false ); } } : function( elem, type, handle ) { var name = "on" + type; if ( elem.detachEvent ) { // #8545, #7054, preventing memory leaks for custom events in IE6-8 // detachEvent needed property on element, by name of that event, to properly expose it to GC if ( typeof elem[ name ] === "undefined" ) { elem[ name ] = null; } elem.detachEvent( name, handle ); } }; jQuery.Event = function( src, props ) { // Allow instantiation without the 'new' keyword if ( !(this instanceof jQuery.Event) ) { return new jQuery.Event( src, props ); } // Event object if ( src && src.type ) { this.originalEvent = src; this.type = src.type; // Events bubbling up the document may have been marked as prevented // by a handler lower down the tree; reflect the correct value. this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; // Event type } else { this.type = src; } // Put explicitly provided properties onto the event object if ( props ) { jQuery.extend( this, props ); } // Create a timestamp if incoming event doesn't have one this.timeStamp = src && src.timeStamp || jQuery.now(); // Mark it as fixed this[ jQuery.expando ] = true; }; // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html jQuery.Event.prototype = { isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse, preventDefault: function() { var e = this.originalEvent; this.isDefaultPrevented = returnTrue; if ( !e ) { return; } // If preventDefault exists, run it on the original event if ( e.preventDefault ) { e.preventDefault(); // Support: IE // Otherwise set the returnValue property of the original event to false } else { e.returnValue = false; } }, stopPropagation: function() { var e = this.originalEvent; this.isPropagationStopped = returnTrue; if ( !e ) { return; } // If stopPropagation exists, run it on the original event if ( e.stopPropagation ) { e.stopPropagation(); } // Support: IE // Set the cancelBubble property of the original event to true e.cancelBubble = true; }, stopImmediatePropagation: function() { this.isImmediatePropagationStopped = returnTrue; this.stopPropagation(); } }; // Create mouseenter/leave events using mouseover/out and event-time checks jQuery.each({ mouseenter: "mouseover", mouseleave: "mouseout" }, function( orig, fix ) { jQuery.event.special[ orig ] = { delegateType: fix, bindType: fix, handle: function( event ) { var ret, target = this, related = event.relatedTarget, handleObj = event.handleObj; // For mousenter/leave call the handler if related is outside the target. // NB: No relatedTarget if the mouse left/entered the browser window if ( !related || (related !== target && !jQuery.contains( target, related )) ) { event.type = handleObj.origType; ret = handleObj.handler.apply( this, arguments ); event.type = fix; } return ret; } }; }); // IE submit delegation if ( !jQuery.support.submitBubbles ) { jQuery.event.special.submit = { setup: function() { // Only need this for delegated form submit events if ( jQuery.nodeName( this, "form" ) ) { return false; } // Lazy-add a submit handler when a descendant form may potentially be submitted jQuery.event.add( this, "click._submit keypress._submit", function( e ) { // Node name check avoids a VML-related crash in IE (#9807) var elem = e.target, form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; if ( form && !jQuery._data( form, "submitBubbles" ) ) { jQuery.event.add( form, "submit._submit", function( event ) { event._submit_bubble = true; }); jQuery._data( form, "submitBubbles", true ); } }); // return undefined since we don't need an event listener }, postDispatch: function( event ) { // If form was submitted by the user, bubble the event up the tree if ( event._submit_bubble ) { delete event._submit_bubble; if ( this.parentNode && !event.isTrigger ) { jQuery.event.simulate( "submit", this.parentNode, event, true ); } } }, teardown: function() { // Only need this for delegated form submit events if ( jQuery.nodeName( this, "form" ) ) { return false; } // Remove delegated handlers; cleanData eventually reaps submit handlers attached above jQuery.event.remove( this, "._submit" ); } }; } // IE change delegation and checkbox/radio fix if ( !jQuery.support.changeBubbles ) { jQuery.event.special.change = { setup: function() { if ( rformElems.test( this.nodeName ) ) { // IE doesn't fire change on a check/radio until blur; trigger it on click // after a propertychange. Eat the blur-change in special.change.handle. // This still fires onchange a second time for check/radio after blur. if ( this.type === "checkbox" || this.type === "radio" ) { jQuery.event.add( this, "propertychange._change", function( event ) { if ( event.originalEvent.propertyName === "checked" ) { this._just_changed = true; } }); jQuery.event.add( this, "click._change", function( event ) { if ( this._just_changed && !event.isTrigger ) { this._just_changed = false; } // Allow triggered, simulated change events (#11500) jQuery.event.simulate( "change", this, event, true ); }); } return false; } // Delegated event; lazy-add a change handler on descendant inputs jQuery.event.add( this, "beforeactivate._change", function( e ) { var elem = e.target; if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { jQuery.event.add( elem, "change._change", function( event ) { if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { jQuery.event.simulate( "change", this.parentNode, event, true ); } }); jQuery._data( elem, "changeBubbles", true ); } }); }, handle: function( event ) { var elem = event.target; // Swallow native change events from checkbox/radio, we already triggered them above if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { return event.handleObj.handler.apply( this, arguments ); } }, teardown: function() { jQuery.event.remove( this, "._change" ); return !rformElems.test( this.nodeName ); } }; } // Create "bubbling" focus and blur events if ( !jQuery.support.focusinBubbles ) { jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { // Attach a single capturing handler while someone wants focusin/focusout var attaches = 0, handler = function( event ) { jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); }; jQuery.event.special[ fix ] = { setup: function() { if ( attaches++ === 0 ) { document.addEventListener( orig, handler, true ); } }, teardown: function() { if ( --attaches === 0 ) { document.removeEventListener( orig, handler, true ); } } }; }); } jQuery.fn.extend({ on: function( types, selector, data, fn, /*INTERNAL*/ one ) { var origFn, type; // Types can be a map of types/handlers if ( typeof types === "object" ) { // ( types-Object, selector, data ) if ( typeof selector !== "string" ) { // ( types-Object, data ) data = data || selector; selector = undefined; } for ( type in types ) { this.on( type, selector, data, types[ type ], one ); } return this; } if ( data == null && fn == null ) { // ( types, fn ) fn = selector; data = selector = undefined; } else if ( fn == null ) { if ( typeof selector === "string" ) { // ( types, selector, fn ) fn = data; data = undefined; } else { // ( types, data, fn ) fn = data; data = selector; selector = undefined; } } if ( fn === false ) { fn = returnFalse; } else if ( !fn ) { return this; } if ( one === 1 ) { origFn = fn; fn = function( event ) { // Can use an empty set, since event contains the info jQuery().off( event ); return origFn.apply( this, arguments ); }; // Use same guid so caller can remove using origFn fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); } return this.each( function() { jQuery.event.add( this, types, fn, data, selector ); }); }, one: function( types, selector, data, fn ) { return this.on( types, selector, data, fn, 1 ); }, off: function( types, selector, fn ) { var handleObj, type; if ( types && types.preventDefault && types.handleObj ) { // ( event ) dispatched jQuery.Event handleObj = types.handleObj; jQuery( types.delegateTarget ).off( handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler ); return this; } if ( typeof types === "object" ) { // ( types-object [, selector] ) for ( type in types ) { this.off( type, selector, types[ type ] ); } return this; } if ( selector === false || typeof selector === "function" ) { // ( types [, fn] ) fn = selector; selector = undefined; } if ( fn === false ) { fn = returnFalse; } return this.each(function() { jQuery.event.remove( this, types, fn, selector ); }); }, bind: function( types, data, fn ) { return this.on( types, null, data, fn ); }, unbind: function( types, fn ) { return this.off( types, null, fn ); }, delegate: function( selector, types, data, fn ) { return this.on( types, selector, data, fn ); }, undelegate: function( selector, types, fn ) { // ( namespace ) or ( selector, types [, fn] ) return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); }, trigger: function( type, data ) { return this.each(function() { jQuery.event.trigger( type, data, this ); }); }, triggerHandler: function( type, data ) { var elem = this[0]; if ( elem ) { return jQuery.event.trigger( type, data, elem, true ); } }, hover: function( fnOver, fnOut ) { return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); } }); jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { // Handle event binding jQuery.fn[ name ] = function( data, fn ) { return arguments.length > 0 ? this.on( name, null, data, fn ) : this.trigger( name ); }; if ( rkeyEvent.test( name ) ) { jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; } if ( rmouseEvent.test( name ) ) { jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; } }); /*! * Sizzle CSS Selector Engine * Copyright 2012 jQuery Foundation and other contributors * Released under the MIT license * http://sizzlejs.com/ */ (function( window, undefined ) { var i, cachedruns, Expr, getText, isXML, compile, hasDuplicate, outermostContext, // Local document vars setDocument, document, docElem, documentIsXML, rbuggyQSA, rbuggyMatches, matches, contains, sortOrder, // Instance-specific data expando = "sizzle" + -(new Date()), preferredDoc = window.document, support = {}, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), // General-purpose constants strundefined = typeof undefined, MAX_NEGATIVE = 1 << 31, // Array methods arr = [], pop = arr.pop, push = arr.push, slice = arr.slice, // Use a stripped-down indexOf if we can't use a native one indexOf = arr.indexOf || function( elem ) { var i = 0, len = this.length; for ( ; i < len; i++ ) { if ( this[i] === elem ) { return i; } } return -1; }, // Regular expressions // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace whitespace = "[\\x20\\t\\r\\n\\f]", // http://www.w3.org/TR/css3-syntax/#characters characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", // Loosely modeled on CSS identifier characters // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier identifier = characterEncoding.replace( "w", "w#" ), // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors operators = "([*^$|!~]?=)", attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", // Prefer arguments quoted, // then not containing pseudos/brackets, // then attribute selectors/non-parenthetical expressions, // then anything else // These preferences are here to reduce the number of selectors // needing tokenize in the PSEUDO preFilter pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ), rpseudo = new RegExp( pseudos ), ridentifier = new RegExp( "^" + identifier + "$" ), matchExpr = { "ID": new RegExp( "^#(" + characterEncoding + ")" ), "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), "ATTR": new RegExp( "^" + attributes ), "PSEUDO": new RegExp( "^" + pseudos ), "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), // For use in libraries implementing .is() // We use this for POS matching in `select` "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) }, rsibling = /[\x20\t\r\n\f]*[+~]/, rnative = /\{\s*\[native code\]\s*\}/, // Easily-parseable/retrievable ID or TAG or CLASS selectors rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rescape = /'|\\/g, rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g, funescape = function( _, escaped ) { var high = "0x" + escaped - 0x10000; // NaN means non-codepoint return high !== high ? escaped : // BMP codepoint high < 0 ? String.fromCharCode( high + 0x10000 ) : // Supplemental Plane codepoint (surrogate pair) String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); }; // Use a stripped-down slice if we can't use a native one try { slice.call( docElem.childNodes, 0 )[0].nodeType; } catch ( e ) { slice = function( i ) { var elem, results = []; for ( ; (elem = this[i]); i++ ) { results.push( elem ); } return results; }; } /** * For feature detection * @param {Function} fn The function to test for native support */ function isNative( fn ) { return rnative.test( fn + "" ); } /** * Create key-value caches of limited size * @returns {Function(string, Object)} Returns the Object data after storing it on itself with * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) * deleting the oldest entry */ function createCache() { var cache, keys = []; return (cache = function( key, value ) { // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) if ( keys.push( key += " " ) > Expr.cacheLength ) { // Only keep the most recent entries delete cache[ keys.shift() ]; } return (cache[ key ] = value); }); } /** * Mark a function for special use by Sizzle * @param {Function} fn The function to mark */ function markFunction( fn ) { fn[ expando ] = true; return fn; } /** * Support testing using an element * @param {Function} fn Passed the created div and expects a boolean result */ function assert( fn ) { var div = document.createElement("div"); try { return fn( div ); } catch (e) { return false; } finally { // release memory in IE div = null; } } function Sizzle( selector, context, results, seed ) { var match, elem, m, nodeType, // QSA vars i, groups, old, nid, newContext, newSelector; if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { setDocument( context ); } context = context || document; results = results || []; if ( !selector || typeof selector !== "string" ) { return results; } if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { return []; } if ( !documentIsXML && !seed ) { // Shortcuts if ( (match = rquickExpr.exec( selector )) ) { // Speed-up: Sizzle("#ID") if ( (m = match[1]) ) { if ( nodeType === 9 ) { elem = context.getElementById( m ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 if ( elem && elem.parentNode ) { // Handle the case where IE, Opera, and Webkit return items // by name instead of ID if ( elem.id === m ) { results.push( elem ); return results; } } else { return results; } } else { // Context is not a document if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && contains( context, elem ) && elem.id === m ) { results.push( elem ); return results; } } // Speed-up: Sizzle("TAG") } else if ( match[2] ) { push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); return results; // Speed-up: Sizzle(".CLASS") } else if ( (m = match[3]) && support.getByClassName && context.getElementsByClassName ) { push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); return results; } } // QSA path if ( support.qsa && !rbuggyQSA.test(selector) ) { old = true; nid = expando; newContext = context; newSelector = nodeType === 9 && selector; // qSA works strangely on Element-rooted queries // We can work around this by specifying an extra ID on the root // and working up from there (Thanks to Andrew Dupont for the technique) // IE 8 doesn't work on object elements if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { groups = tokenize( selector ); if ( (old = context.getAttribute("id")) ) { nid = old.replace( rescape, "\\$&" ); } else { context.setAttribute( "id", nid ); } nid = "[id='" + nid + "'] "; i = groups.length; while ( i-- ) { groups[i] = nid + toSelector( groups[i] ); } newContext = rsibling.test( selector ) && context.parentNode || context; newSelector = groups.join(","); } if ( newSelector ) { try { push.apply( results, slice.call( newContext.querySelectorAll( newSelector ), 0 ) ); return results; } catch(qsaError) { } finally { if ( !old ) { context.removeAttribute("id"); } } } } } // All others return select( selector.replace( rtrim, "$1" ), context, results, seed ); } /** * Detect xml * @param {Element|Object} elem An element or a document */ isXML = Sizzle.isXML = function( elem ) { // documentElement is verified for cases where it doesn't yet exist // (such as loading iframes in IE - #4833) var documentElement = elem && (elem.ownerDocument || elem).documentElement; return documentElement ? documentElement.nodeName !== "HTML" : false; }; /** * Sets document-related variables once based on the current document * @param {Element|Object} [doc] An element or document object to use to set the document * @returns {Object} Returns the current document */ setDocument = Sizzle.setDocument = function( node ) { var doc = node ? node.ownerDocument || node : preferredDoc; // If no document and documentElement is available, return if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { return document; } // Set our document document = doc; docElem = doc.documentElement; // Support tests documentIsXML = isXML( doc ); // Check if getElementsByTagName("*") returns only elements support.tagNameNoComments = assert(function( div ) { div.appendChild( doc.createComment("") ); return !div.getElementsByTagName("*").length; }); // Check if attributes should be retrieved by attribute nodes support.attributes = assert(function( div ) { div.innerHTML = "<select></select>"; var type = typeof div.lastChild.getAttribute("multiple"); // IE8 returns a string for some attributes even when not present return type !== "boolean" && type !== "string"; }); // Check if getElementsByClassName can be trusted support.getByClassName = assert(function( div ) { // Opera can't find a second classname (in 9.6) div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>"; if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) { return false; } // Safari 3.2 caches class attributes and doesn't catch changes div.lastChild.className = "e"; return div.getElementsByClassName("e").length === 2; }); // Check if getElementById returns elements by name // Check if getElementsByName privileges form controls or returns elements by ID support.getByName = assert(function( div ) { // Inject content div.id = expando + 0; div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>"; docElem.insertBefore( div, docElem.firstChild ); // Test var pass = doc.getElementsByName && // buggy browsers will return fewer than the correct 2 doc.getElementsByName( expando ).length === 2 + // buggy browsers will return more than the correct 0 doc.getElementsByName( expando + 0 ).length; support.getIdNotName = !doc.getElementById( expando ); // Cleanup docElem.removeChild( div ); return pass; }); // IE6/7 return modified attributes Expr.attrHandle = assert(function( div ) { div.innerHTML = "<a href='#'></a>"; return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && div.firstChild.getAttribute("href") === "#"; }) ? {} : { "href": function( elem ) { return elem.getAttribute( "href", 2 ); }, "type": function( elem ) { return elem.getAttribute("type"); } }; // ID find and filter if ( support.getIdNotName ) { Expr.find["ID"] = function( id, context ) { if ( typeof context.getElementById !== strundefined && !documentIsXML ) { var m = context.getElementById( id ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 return m && m.parentNode ? [m] : []; } }; Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { return elem.getAttribute("id") === attrId; }; }; } else { Expr.find["ID"] = function( id, context ) { if ( typeof context.getElementById !== strundefined && !documentIsXML ) { var m = context.getElementById( id ); return m ? m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? [m] : undefined : []; } }; Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); return node && node.value === attrId; }; }; } // Tag Expr.find["TAG"] = support.tagNameNoComments ? function( tag, context ) { if ( typeof context.getElementsByTagName !== strundefined ) { return context.getElementsByTagName( tag ); } } : function( tag, context ) { var elem, tmp = [], i = 0, results = context.getElementsByTagName( tag ); // Filter out possible comments if ( tag === "*" ) { for ( ; (elem = results[i]); i++ ) { if ( elem.nodeType === 1 ) { tmp.push( elem ); } } return tmp; } return results; }; // Name Expr.find["NAME"] = support.getByName && function( tag, context ) { if ( typeof context.getElementsByName !== strundefined ) { return context.getElementsByName( name ); } }; // Class Expr.find["CLASS"] = support.getByClassName && function( className, context ) { if ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) { return context.getElementsByClassName( className ); } }; // QSA and matchesSelector support // matchesSelector(:active) reports false when true (IE9/Opera 11.5) rbuggyMatches = []; // qSa(:focus) reports false when true (Chrome 21), // no need to also add to buggyMatches since matches checks buggyQSA // A support test would require too much code (would include document ready) rbuggyQSA = [ ":focus" ]; if ( (support.qsa = isNative(doc.querySelectorAll)) ) { // Build QSA regex // Regex strategy adopted from Diego Perini assert(function( div ) { // Select is set to empty string on purpose // This is to test IE's treatment of not explictly // setting a boolean content attribute, // since its presence should be enough // http://bugs.jquery.com/ticket/12359 div.innerHTML = "<select><option selected=''></option></select>"; // IE8 - Some boolean attributes are not treated correctly if ( !div.querySelectorAll("[selected]").length ) { rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); } // Webkit/Opera - :checked should return selected option elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked // IE8 throws error here and will not see later tests if ( !div.querySelectorAll(":checked").length ) { rbuggyQSA.push(":checked"); } }); assert(function( div ) { // Opera 10-12/IE8 - ^= $= *= and empty values // Should not select anything div.innerHTML = "<input type='hidden' i=''/>"; if ( div.querySelectorAll("[i^='']").length ) { rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); } // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) // IE8 throws error here and will not see later tests if ( !div.querySelectorAll(":enabled").length ) { rbuggyQSA.push( ":enabled", ":disabled" ); } // Opera 10-11 does not throw on post-comma invalid pseudos div.querySelectorAll("*,:x"); rbuggyQSA.push(",.*:"); }); } if ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector || docElem.mozMatchesSelector || docElem.webkitMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector) )) ) { assert(function( div ) { // Check to see if it's possible to do matchesSelector // on a disconnected node (IE 9) support.disconnectedMatch = matches.call( div, "div" ); // This should fail with an exception // Gecko does not error, returns false instead matches.call( div, "[s!='']:x" ); rbuggyMatches.push( "!=", pseudos ); }); } rbuggyQSA = new RegExp( rbuggyQSA.join("|") ); rbuggyMatches = new RegExp( rbuggyMatches.join("|") ); // Element contains another // Purposefully does not implement inclusive descendent // As in, an element does not contain itself contains = isNative(docElem.contains) || docElem.compareDocumentPosition ? function( a, b ) { var adown = a.nodeType === 9 ? a.documentElement : a, bup = b && b.parentNode; return a === bup || !!( bup && bup.nodeType === 1 && ( adown.contains ? adown.contains( bup ) : a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 )); } : function( a, b ) { if ( b ) { while ( (b = b.parentNode) ) { if ( b === a ) { return true; } } } return false; }; // Document order sorting sortOrder = docElem.compareDocumentPosition ? function( a, b ) { var compare; if ( a === b ) { hasDuplicate = true; return 0; } if ( (compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b )) ) { if ( compare & 1 || a.parentNode && a.parentNode.nodeType === 11 ) { if ( a === doc || contains( preferredDoc, a ) ) { return -1; } if ( b === doc || contains( preferredDoc, b ) ) { return 1; } return 0; } return compare & 4 ? -1 : 1; } return a.compareDocumentPosition ? -1 : 1; } : function( a, b ) { var cur, i = 0, aup = a.parentNode, bup = b.parentNode, ap = [ a ], bp = [ b ]; // The nodes are identical, we can exit early if ( a === b ) { hasDuplicate = true; return 0; // Fallback to using sourceIndex (in IE) if it's available on both nodes } else if ( a.sourceIndex && b.sourceIndex ) { return ( ~b.sourceIndex || MAX_NEGATIVE ) - ( contains( preferredDoc, a ) && ~a.sourceIndex || MAX_NEGATIVE ); // Parentless nodes are either documents or disconnected } else if ( !aup || !bup ) { return a === doc ? -1 : b === doc ? 1 : aup ? -1 : bup ? 1 : 0; // If the nodes are siblings, we can do a quick check } else if ( aup === bup ) { return siblingCheck( a, b ); } // Otherwise we need full lists of their ancestors for comparison cur = a; while ( (cur = cur.parentNode) ) { ap.unshift( cur ); } cur = b; while ( (cur = cur.parentNode) ) { bp.unshift( cur ); } // Walk down the tree looking for a discrepancy while ( ap[i] === bp[i] ) { i++; } return i ? // Do a sibling check if the nodes have a common ancestor siblingCheck( ap[i], bp[i] ) : // Otherwise nodes in our document sort first ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0; }; // Always assume the presence of duplicates if sort doesn't // pass them to our comparison function (as in Google Chrome). hasDuplicate = false; [0, 0].sort( sortOrder ); support.detectDuplicates = hasDuplicate; return document; }; Sizzle.matches = function( expr, elements ) { return Sizzle( expr, null, null, elements ); }; Sizzle.matchesSelector = function( elem, expr ) { // Set document vars if needed if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } // Make sure that attribute selectors are quoted expr = expr.replace( rattributeQuotes, "='$1']" ); // rbuggyQSA always contains :focus, so no need for an existence check if ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) { try { var ret = matches.call( elem, expr ); // IE 9's matchesSelector returns false on disconnected nodes if ( ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document // fragment in IE 9 elem.document && elem.document.nodeType !== 11 ) { return ret; } } catch(e) {} } return Sizzle( expr, document, null, [elem] ).length > 0; }; Sizzle.contains = function( context, elem ) { // Set document vars if needed if ( ( context.ownerDocument || context ) !== document ) { setDocument( context ); } return contains( context, elem ); }; Sizzle.attr = function( elem, name ) { var val; // Set document vars if needed if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } if ( !documentIsXML ) { name = name.toLowerCase(); } if ( (val = Expr.attrHandle[ name ]) ) { return val( elem ); } if ( documentIsXML || support.attributes ) { return elem.getAttribute( name ); } return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ? name : val && val.specified ? val.value : null; }; Sizzle.error = function( msg ) { throw new Error( "Syntax error, unrecognized expression: " + msg ); }; // Document sorting and removing duplicates Sizzle.uniqueSort = function( results ) { var elem, duplicates = [], i = 1, j = 0; // Unless we *know* we can detect duplicates, assume their presence hasDuplicate = !support.detectDuplicates; results.sort( sortOrder ); if ( hasDuplicate ) { for ( ; (elem = results[i]); i++ ) { if ( elem === results[ i - 1 ] ) { j = duplicates.push( i ); } } while ( j-- ) { results.splice( duplicates[ j ], 1 ); } } return results; }; function siblingCheck( a, b ) { var cur = a && b && a.nextSibling; for ( ; cur; cur = cur.nextSibling ) { if ( cur === b ) { return -1; } } return a ? 1 : -1; } // Returns a function to use in pseudos for input types function createInputPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === type; }; } // Returns a function to use in pseudos for buttons function createButtonPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && elem.type === type; }; } // Returns a function to use in pseudos for positionals function createPositionalPseudo( fn ) { return markFunction(function( argument ) { argument = +argument; return markFunction(function( seed, matches ) { var j, matchIndexes = fn( [], seed.length, argument ), i = matchIndexes.length; // Match elements found at the specified indexes while ( i-- ) { if ( seed[ (j = matchIndexes[i]) ] ) { seed[j] = !(matches[j] = seed[j]); } } }); }); } /** * Utility function for retrieving the text value of an array of DOM nodes * @param {Array|Element} elem */ getText = Sizzle.getText = function( elem ) { var node, ret = "", i = 0, nodeType = elem.nodeType; if ( !nodeType ) { // If no nodeType, this is expected to be an array for ( ; (node = elem[i]); i++ ) { // Do not traverse comment nodes ret += getText( node ); } } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { // Use textContent for elements // innerText usage removed for consistency of new lines (see #11153) if ( typeof elem.textContent === "string" ) { return elem.textContent; } else { // Traverse its children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { ret += getText( elem ); } } } else if ( nodeType === 3 || nodeType === 4 ) { return elem.nodeValue; } // Do not include comment or processing instruction nodes return ret; }; Expr = Sizzle.selectors = { // Can be adjusted by the user cacheLength: 50, createPseudo: markFunction, match: matchExpr, find: {}, relative: { ">": { dir: "parentNode", first: true }, " ": { dir: "parentNode" }, "+": { dir: "previousSibling", first: true }, "~": { dir: "previousSibling" } }, preFilter: { "ATTR": function( match ) { match[1] = match[1].replace( runescape, funescape ); // Move the given value to match[3] whether quoted or unquoted match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); if ( match[2] === "~=" ) { match[3] = " " + match[3] + " "; } return match.slice( 0, 4 ); }, "CHILD": function( match ) { /* matches from matchExpr["CHILD"] 1 type (only|nth|...) 2 what (child|of-type) 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 4 xn-component of xn+y argument ([+-]?\d*n|) 5 sign of xn-component 6 x of xn-component 7 sign of y-component 8 y of y-component */ match[1] = match[1].toLowerCase(); if ( match[1].slice( 0, 3 ) === "nth" ) { // nth-* requires argument if ( !match[3] ) { Sizzle.error( match[0] ); } // numeric x and y parameters for Expr.filter.CHILD // remember that false/true cast respectively to 0/1 match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); // other types prohibit arguments } else if ( match[3] ) { Sizzle.error( match[0] ); } return match; }, "PSEUDO": function( match ) { var excess, unquoted = !match[5] && match[2]; if ( matchExpr["CHILD"].test( match[0] ) ) { return null; } // Accept quoted arguments as-is if ( match[4] ) { match[2] = match[4]; // Strip excess characters from unquoted arguments } else if ( unquoted && rpseudo.test( unquoted ) && // Get excess from tokenize (recursively) (excess = tokenize( unquoted, true )) && // advance to the next closing parenthesis (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { // excess is a negative index match[0] = match[0].slice( 0, excess ); match[2] = unquoted.slice( 0, excess ); } // Return only captures needed by the pseudo filter method (type and argument) return match.slice( 0, 3 ); } }, filter: { "TAG": function( nodeName ) { if ( nodeName === "*" ) { return function() { return true; }; } nodeName = nodeName.replace( runescape, funescape ).toLowerCase(); return function( elem ) { return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; }; }, "CLASS": function( className ) { var pattern = classCache[ className + " " ]; return pattern || (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && classCache( className, function( elem ) { return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); }); }, "ATTR": function( name, operator, check ) { return function( elem ) { var result = Sizzle.attr( elem, name ); if ( result == null ) { return operator === "!="; } if ( !operator ) { return true; } result += ""; return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf( check ) === 0 : operator === "*=" ? check && result.indexOf( check ) > -1 : operator === "$=" ? check && result.substr( result.length - check.length ) === check : operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : operator === "|=" ? result === check || result.substr( 0, check.length + 1 ) === check + "-" : false; }; }, "CHILD": function( type, what, argument, first, last ) { var simple = type.slice( 0, 3 ) !== "nth", forward = type.slice( -4 ) !== "last", ofType = what === "of-type"; return first === 1 && last === 0 ? // Shortcut for :nth-*(n) function( elem ) { return !!elem.parentNode; } : function( elem, context, xml ) { var cache, outerCache, node, diff, nodeIndex, start, dir = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType; if ( parent ) { // :(first|last|only)-(child|of-type) if ( simple ) { while ( dir ) { node = elem; while ( (node = node[ dir ]) ) { if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { return false; } } // Reverse direction for :only-* (if we haven't yet done so) start = dir = type === "only" && !start && "nextSibling"; } return true; } start = [ forward ? parent.firstChild : parent.lastChild ]; // non-xml :nth-child(...) stores cache data on `parent` if ( forward && useCache ) { // Seek `elem` from a previously-cached index outerCache = parent[ expando ] || (parent[ expando ] = {}); cache = outerCache[ type ] || []; nodeIndex = cache[0] === dirruns && cache[1]; diff = cache[0] === dirruns && cache[2]; node = nodeIndex && parent.childNodes[ nodeIndex ]; while ( (node = ++nodeIndex && node && node[ dir ] || // Fallback to seeking `elem` from the start (diff = nodeIndex = 0) || start.pop()) ) { // When found, cache indexes on `parent` and break if ( node.nodeType === 1 && ++diff && node === elem ) { outerCache[ type ] = [ dirruns, nodeIndex, diff ]; break; } } // Use previously-cached element index if available } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { diff = cache[1]; // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) } else { // Use the same loop as above to seek `elem` from the start while ( (node = ++nodeIndex && node && node[ dir ] || (diff = nodeIndex = 0) || start.pop()) ) { if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { // Cache the index of each encountered element if ( useCache ) { (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; } if ( node === elem ) { break; } } } } // Incorporate the offset, then check against cycle size diff -= last; return diff === first || ( diff % first === 0 && diff / first >= 0 ); } }; }, "PSEUDO": function( pseudo, argument ) { // pseudo-class names are case-insensitive // http://www.w3.org/TR/selectors/#pseudo-classes // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters // Remember that setFilters inherits from pseudos var args, fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || Sizzle.error( "unsupported pseudo: " + pseudo ); // The user may use createPseudo to indicate that // arguments are needed to create the filter function // just as Sizzle does if ( fn[ expando ] ) { return fn( argument ); } // But maintain support for old signatures if ( fn.length > 1 ) { args = [ pseudo, pseudo, "", argument ]; return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? markFunction(function( seed, matches ) { var idx, matched = fn( seed, argument ), i = matched.length; while ( i-- ) { idx = indexOf.call( seed, matched[i] ); seed[ idx ] = !( matches[ idx ] = matched[i] ); } }) : function( elem ) { return fn( elem, 0, args ); }; } return fn; } }, pseudos: { // Potentially complex pseudos "not": markFunction(function( selector ) { // Trim the selector passed to compile // to avoid treating leading and trailing // spaces as combinators var input = [], results = [], matcher = compile( selector.replace( rtrim, "$1" ) ); return matcher[ expando ] ? markFunction(function( seed, matches, context, xml ) { var elem, unmatched = matcher( seed, null, xml, [] ), i = seed.length; // Match elements unmatched by `matcher` while ( i-- ) { if ( (elem = unmatched[i]) ) { seed[i] = !(matches[i] = elem); } } }) : function( elem, context, xml ) { input[0] = elem; matcher( input, null, xml, results ); return !results.pop(); }; }), "has": markFunction(function( selector ) { return function( elem ) { return Sizzle( selector, elem ).length > 0; }; }), "contains": markFunction(function( text ) { return function( elem ) { return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; }; }), // "Whether an element is represented by a :lang() selector // is based solely on the element's language value // being equal to the identifier C, // or beginning with the identifier C immediately followed by "-". // The matching of C against the element's language value is performed case-insensitively. // The identifier C does not have to be a valid language name." // http://www.w3.org/TR/selectors/#lang-pseudo "lang": markFunction( function( lang ) { // lang value must be a valid identifider if ( !ridentifier.test(lang || "") ) { Sizzle.error( "unsupported lang: " + lang ); } lang = lang.replace( runescape, funescape ).toLowerCase(); return function( elem ) { var elemLang; do { if ( (elemLang = documentIsXML ? elem.getAttribute("xml:lang") || elem.getAttribute("lang") : elem.lang) ) { elemLang = elemLang.toLowerCase(); return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; } } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); return false; }; }), // Miscellaneous "target": function( elem ) { var hash = window.location && window.location.hash; return hash && hash.slice( 1 ) === elem.id; }, "root": function( elem ) { return elem === docElem; }, "focus": function( elem ) { return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); }, // Boolean properties "enabled": function( elem ) { return elem.disabled === false; }, "disabled": function( elem ) { return elem.disabled === true; }, "checked": function( elem ) { // In CSS3, :checked should return both checked and selected elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked var nodeName = elem.nodeName.toLowerCase(); return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); }, "selected": function( elem ) { // Accessing this property makes selected-by-default // options in Safari work properly if ( elem.parentNode ) { elem.parentNode.selectedIndex; } return elem.selected === true; }, // Contents "empty": function( elem ) { // http://www.w3.org/TR/selectors/#empty-pseudo // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), // not comment, processing instructions, or others // Thanks to Diego Perini for the nodeName shortcut // Greater than "@" means alpha characters (specifically not starting with "#" or "?") for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { return false; } } return true; }, "parent": function( elem ) { return !Expr.pseudos["empty"]( elem ); }, // Element/input types "header": function( elem ) { return rheader.test( elem.nodeName ); }, "input": function( elem ) { return rinputs.test( elem.nodeName ); }, "button": function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === "button" || name === "button"; }, "text": function( elem ) { var attr; // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) // use getAttribute instead to test this case return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); }, // Position-in-collection "first": createPositionalPseudo(function() { return [ 0 ]; }), "last": createPositionalPseudo(function( matchIndexes, length ) { return [ length - 1 ]; }), "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { return [ argument < 0 ? argument + length : argument ]; }), "even": createPositionalPseudo(function( matchIndexes, length ) { var i = 0; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; }), "odd": createPositionalPseudo(function( matchIndexes, length ) { var i = 1; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; }), "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; --i >= 0; ) { matchIndexes.push( i ); } return matchIndexes; }), "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; ++i < length; ) { matchIndexes.push( i ); } return matchIndexes; }) } }; // Add button/input type pseudos for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { Expr.pseudos[ i ] = createInputPseudo( i ); } for ( i in { submit: true, reset: true } ) { Expr.pseudos[ i ] = createButtonPseudo( i ); } function tokenize( selector, parseOnly ) { var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[ selector + " " ]; if ( cached ) { return parseOnly ? 0 : cached.slice( 0 ); } soFar = selector; groups = []; preFilters = Expr.preFilter; while ( soFar ) { // Comma and first run if ( !matched || (match = rcomma.exec( soFar )) ) { if ( match ) { // Don't consume trailing commas as valid soFar = soFar.slice( match[0].length ) || soFar; } groups.push( tokens = [] ); } matched = false; // Combinators if ( (match = rcombinators.exec( soFar )) ) { matched = match.shift(); tokens.push( { value: matched, // Cast descendant combinators to space type: match[0].replace( rtrim, " " ) } ); soFar = soFar.slice( matched.length ); } // Filters for ( type in Expr.filter ) { if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || (match = preFilters[ type ]( match ))) ) { matched = match.shift(); tokens.push( { value: matched, type: type, matches: match } ); soFar = soFar.slice( matched.length ); } } if ( !matched ) { break; } } // Return the length of the invalid excess // if we're just parsing // Otherwise, throw an error or return tokens return parseOnly ? soFar.length : soFar ? Sizzle.error( selector ) : // Cache the tokens tokenCache( selector, groups ).slice( 0 ); } function toSelector( tokens ) { var i = 0, len = tokens.length, selector = ""; for ( ; i < len; i++ ) { selector += tokens[i].value; } return selector; } function addCombinator( matcher, combinator, base ) { var dir = combinator.dir, checkNonElements = base && combinator.dir === "parentNode", doneName = done++; return combinator.first ? // Check against closest ancestor/preceding element function( elem, context, xml ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { return matcher( elem, context, xml ); } } } : // Check against all ancestor/preceding elements function( elem, context, xml ) { var data, cache, outerCache, dirkey = dirruns + " " + doneName; // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching if ( xml ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { if ( matcher( elem, context, xml ) ) { return true; } } } } else { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { outerCache = elem[ expando ] || (elem[ expando ] = {}); if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { if ( (data = cache[1]) === true || data === cachedruns ) { return data === true; } } else { cache = outerCache[ dir ] = [ dirkey ]; cache[1] = matcher( elem, context, xml ) || cachedruns; if ( cache[1] === true ) { return true; } } } } } }; } function elementMatcher( matchers ) { return matchers.length > 1 ? function( elem, context, xml ) { var i = matchers.length; while ( i-- ) { if ( !matchers[i]( elem, context, xml ) ) { return false; } } return true; } : matchers[0]; } function condense( unmatched, map, filter, context, xml ) { var elem, newUnmatched = [], i = 0, len = unmatched.length, mapped = map != null; for ( ; i < len; i++ ) { if ( (elem = unmatched[i]) ) { if ( !filter || filter( elem, context, xml ) ) { newUnmatched.push( elem ); if ( mapped ) { map.push( i ); } } } } return newUnmatched; } function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { if ( postFilter && !postFilter[ expando ] ) { postFilter = setMatcher( postFilter ); } if ( postFinder && !postFinder[ expando ] ) { postFinder = setMatcher( postFinder, postSelector ); } return markFunction(function( seed, results, context, xml ) { var temp, i, elem, preMap = [], postMap = [], preexisting = results.length, // Get initial elements from seed or context elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), // Prefilter to get matcher input, preserving a map for seed-results synchronization matcherIn = preFilter && ( seed || !selector ) ? condense( elems, preMap, preFilter, context, xml ) : elems, matcherOut = matcher ? // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, postFinder || ( seed ? preFilter : preexisting || postFilter ) ? // ...intermediate processing is necessary [] : // ...otherwise use results directly results : matcherIn; // Find primary matches if ( matcher ) { matcher( matcherIn, matcherOut, context, xml ); } // Apply postFilter if ( postFilter ) { temp = condense( matcherOut, postMap ); postFilter( temp, [], context, xml ); // Un-match failing elements by moving them back to matcherIn i = temp.length; while ( i-- ) { if ( (elem = temp[i]) ) { matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); } } } if ( seed ) { if ( postFinder || preFilter ) { if ( postFinder ) { // Get the final matcherOut by condensing this intermediate into postFinder contexts temp = []; i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) ) { // Restore matcherIn since elem is not yet a final match temp.push( (matcherIn[i] = elem) ); } } postFinder( null, (matcherOut = []), temp, xml ); } // Move matched elements from seed to results to keep them synchronized i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) && (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { seed[temp] = !(results[temp] = elem); } } } // Add elements to results, through postFinder if defined } else { matcherOut = condense( matcherOut === results ? matcherOut.splice( preexisting, matcherOut.length ) : matcherOut ); if ( postFinder ) { postFinder( null, results, matcherOut, xml ); } else { push.apply( results, matcherOut ); } } }); } function matcherFromTokens( tokens ) { var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[ tokens[0].type ], implicitRelative = leadingRelative || Expr.relative[" "], i = leadingRelative ? 1 : 0, // The foundational matcher ensures that elements are reachable from top-level context(s) matchContext = addCombinator( function( elem ) { return elem === checkContext; }, implicitRelative, true ), matchAnyContext = addCombinator( function( elem ) { return indexOf.call( checkContext, elem ) > -1; }, implicitRelative, true ), matchers = [ function( elem, context, xml ) { return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( (checkContext = context).nodeType ? matchContext( elem, context, xml ) : matchAnyContext( elem, context, xml ) ); } ]; for ( ; i < len; i++ ) { if ( (matcher = Expr.relative[ tokens[i].type ]) ) { matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; } else { matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); // Return special upon seeing a positional matcher if ( matcher[ expando ] ) { // Find the next relative operator (if any) for proper handling j = ++i; for ( ; j < len; j++ ) { if ( Expr.relative[ tokens[j].type ] ) { break; } } return setMatcher( i > 1 && elementMatcher( matchers ), i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ), matcher, i < j && matcherFromTokens( tokens.slice( i, j ) ), j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), j < len && toSelector( tokens ) ); } matchers.push( matcher ); } } return elementMatcher( matchers ); } function matcherFromGroupMatchers( elementMatchers, setMatchers ) { // A counter to specify which element is currently being matched var matcherCachedRuns = 0, bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function( seed, context, xml, results, expandContext ) { var elem, j, matcher, setMatched = [], matchedCount = 0, i = "0", unmatched = seed && [], outermost = expandContext != null, contextBackup = outermostContext, // We must always have either seed elements or context elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), // Nested matchers should use non-integer dirruns dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.E); if ( outermost ) { outermostContext = context !== document && context; cachedruns = matcherCachedRuns; } // Add elements passing elementMatchers directly to results for ( ; (elem = elems[i]) != null; i++ ) { if ( byElement && elem ) { for ( j = 0; (matcher = elementMatchers[j]); j++ ) { if ( matcher( elem, context, xml ) ) { results.push( elem ); break; } } if ( outermost ) { dirruns = dirrunsUnique; cachedruns = ++matcherCachedRuns; } } // Track unmatched elements for set filters if ( bySet ) { // They will have gone through all possible matchers if ( (elem = !matcher && elem) ) { matchedCount--; } // Lengthen the array for every element, matched or not if ( seed ) { unmatched.push( elem ); } } } // Apply set filters to unmatched elements // `i` starts as a string, so matchedCount would equal "00" if there are no elements matchedCount += i; if ( bySet && i !== matchedCount ) { for ( j = 0; (matcher = setMatchers[j]); j++ ) { matcher( unmatched, setMatched, context, xml ); } if ( seed ) { // Reintegrate element matches to eliminate the need for sorting if ( matchedCount > 0 ) { while ( i-- ) { if ( !(unmatched[i] || setMatched[i]) ) { setMatched[i] = pop.call( results ); } } } // Discard index placeholder values to get only actual matches setMatched = condense( setMatched ); } // Add matches to results push.apply( results, setMatched ); // Seedless set matches succeeding multiple successful matchers stipulate sorting if ( outermost && !seed && setMatched.length > 0 && ( matchedCount + setMatchers.length ) > 1 ) { Sizzle.uniqueSort( results ); } } // Override manipulation of globals by nested matchers if ( outermost ) { dirruns = dirrunsUnique; outermostContext = contextBackup; } return unmatched; }; return bySet ? markFunction( superMatcher ) : superMatcher; } compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { var i, setMatchers = [], elementMatchers = [], cached = compilerCache[ selector + " " ]; if ( !cached ) { // Generate a function of recursive functions that can be used to check each element if ( !group ) { group = tokenize( selector ); } i = group.length; while ( i-- ) { cached = matcherFromTokens( group[i] ); if ( cached[ expando ] ) { setMatchers.push( cached ); } else { elementMatchers.push( cached ); } } // Cache the compiled function cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); } return cached; }; function multipleContexts( selector, contexts, results ) { var i = 0, len = contexts.length; for ( ; i < len; i++ ) { Sizzle( selector, contexts[i], results ); } return results; } function select( selector, context, results, seed ) { var i, tokens, token, type, find, match = tokenize( selector ); if ( !seed ) { // Try to minimize operations if there is only one group if ( match.length === 1 ) { // Take a shortcut and set the context if the root selector is an ID tokens = match[0] = match[0].slice( 0 ); if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && context.nodeType === 9 && !documentIsXML && Expr.relative[ tokens[1].type ] ) { context = Expr.find["ID"]( token.matches[0].replace( runescape, funescape ), context )[0]; if ( !context ) { return results; } selector = selector.slice( tokens.shift().value.length ); } // Fetch a seed set for right-to-left matching for ( i = matchExpr["needsContext"].test( selector ) ? -1 : tokens.length - 1; i >= 0; i-- ) { token = tokens[i]; // Abort if we hit a combinator if ( Expr.relative[ (type = token.type) ] ) { break; } if ( (find = Expr.find[ type ]) ) { // Search, expanding context for leading sibling combinators if ( (seed = find( token.matches[0].replace( runescape, funescape ), rsibling.test( tokens[0].type ) && context.parentNode || context )) ) { // If seed is empty or no tokens remain, we can return early tokens.splice( i, 1 ); selector = seed.length && toSelector( tokens ); if ( !selector ) { push.apply( results, slice.call( seed, 0 ) ); return results; } break; } } } } } // Compile and execute a filtering function // Provide `match` to avoid retokenization if we modified the selector above compile( selector, match )( seed, context, documentIsXML, results, rsibling.test( selector ) ); return results; } // Deprecated Expr.pseudos["nth"] = Expr.pseudos["eq"]; // Easy API for creating new setFilters function setFilters() {} Expr.filters = setFilters.prototype = Expr.pseudos; Expr.setFilters = new setFilters(); // Initialize with the default document setDocument(); // Override sizzle attribute retrieval Sizzle.attr = jQuery.attr; jQuery.find = Sizzle; jQuery.expr = Sizzle.selectors; jQuery.expr[":"] = jQuery.expr.pseudos; jQuery.unique = Sizzle.uniqueSort; jQuery.text = Sizzle.getText; jQuery.isXMLDoc = Sizzle.isXML; jQuery.contains = Sizzle.contains; })( window ); var runtil = /Until$/, rparentsprev = /^(?:parents|prev(?:Until|All))/, isSimple = /^.[^:#\[\.,]*$/, rneedsContext = jQuery.expr.match.needsContext, // methods guaranteed to produce a unique set when starting from a unique set guaranteedUnique = { children: true, contents: true, next: true, prev: true }; jQuery.fn.extend({ find: function( selector ) { var i, ret, self; if ( typeof selector !== "string" ) { self = this; return this.pushStack( jQuery( selector ).filter(function() { for ( i = 0; i < self.length; i++ ) { if ( jQuery.contains( self[ i ], this ) ) { return true; } } }) ); } ret = []; for ( i = 0; i < this.length; i++ ) { jQuery.find( selector, this[ i ], ret ); } // Needed because $( selector, context ) becomes $( context ).find( selector ) ret = this.pushStack( jQuery.unique( ret ) ); ret.selector = ( this.selector ? this.selector + " " : "" ) + selector; return ret; }, has: function( target ) { var i, targets = jQuery( target, this ), len = targets.length; return this.filter(function() { for ( i = 0; i < len; i++ ) { if ( jQuery.contains( this, targets[i] ) ) { return true; } } }); }, not: function( selector ) { return this.pushStack( winnow(this, selector, false) ); }, filter: function( selector ) { return this.pushStack( winnow(this, selector, true) ); }, is: function( selector ) { return !!selector && ( typeof selector === "string" ? // If this is a positional/relative selector, check membership in the returned set // so $("p:first").is("p:last") won't return true for a doc with two "p". rneedsContext.test( selector ) ? jQuery( selector, this.context ).index( this[0] ) >= 0 : jQuery.filter( selector, this ).length > 0 : this.filter( selector ).length > 0 ); }, closest: function( selectors, context ) { var cur, i = 0, l = this.length, ret = [], pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? jQuery( selectors, context || this.context ) : 0; for ( ; i < l; i++ ) { cur = this[i]; while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { ret.push( cur ); break; } cur = cur.parentNode; } } return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); }, // Determine the position of an element within // the matched set of elements index: function( elem ) { // No argument, return index in parent if ( !elem ) { return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; } // index in selector if ( typeof elem === "string" ) { return jQuery.inArray( this[0], jQuery( elem ) ); } // Locate the position of the desired element return jQuery.inArray( // If it receives a jQuery object, the first element is used elem.jquery ? elem[0] : elem, this ); }, add: function( selector, context ) { var set = typeof selector === "string" ? jQuery( selector, context ) : jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), all = jQuery.merge( this.get(), set ); return this.pushStack( jQuery.unique(all) ); }, addBack: function( selector ) { return this.add( selector == null ? this.prevObject : this.prevObject.filter(selector) ); } }); jQuery.fn.andSelf = jQuery.fn.addBack; function sibling( cur, dir ) { do { cur = cur[ dir ]; } while ( cur && cur.nodeType !== 1 ); return cur; } jQuery.each({ parent: function( elem ) { var parent = elem.parentNode; return parent && parent.nodeType !== 11 ? parent : null; }, parents: function( elem ) { return jQuery.dir( elem, "parentNode" ); }, parentsUntil: function( elem, i, until ) { return jQuery.dir( elem, "parentNode", until ); }, next: function( elem ) { return sibling( elem, "nextSibling" ); }, prev: function( elem ) { return sibling( elem, "previousSibling" ); }, nextAll: function( elem ) { return jQuery.dir( elem, "nextSibling" ); }, prevAll: function( elem ) { return jQuery.dir( elem, "previousSibling" ); }, nextUntil: function( elem, i, until ) { return jQuery.dir( elem, "nextSibling", until ); }, prevUntil: function( elem, i, until ) { return jQuery.dir( elem, "previousSibling", until ); }, siblings: function( elem ) { return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); }, children: function( elem ) { return jQuery.sibling( elem.firstChild ); }, contents: function( elem ) { return jQuery.nodeName( elem, "iframe" ) ? elem.contentDocument || elem.contentWindow.document : jQuery.merge( [], elem.childNodes ); } }, function( name, fn ) { jQuery.fn[ name ] = function( until, selector ) { var ret = jQuery.map( this, fn, until ); if ( !runtil.test( name ) ) { selector = until; } if ( selector && typeof selector === "string" ) { ret = jQuery.filter( selector, ret ); } ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; if ( this.length > 1 && rparentsprev.test( name ) ) { ret = ret.reverse(); } return this.pushStack( ret ); }; }); jQuery.extend({ filter: function( expr, elems, not ) { if ( not ) { expr = ":not(" + expr + ")"; } return elems.length === 1 ? jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : jQuery.find.matches(expr, elems); }, dir: function( elem, dir, until ) { var matched = [], cur = elem[ dir ]; while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { if ( cur.nodeType === 1 ) { matched.push( cur ); } cur = cur[dir]; } return matched; }, sibling: function( n, elem ) { var r = []; for ( ; n; n = n.nextSibling ) { if ( n.nodeType === 1 && n !== elem ) { r.push( n ); } } return r; } }); // Implement the identical functionality for filter and not function winnow( elements, qualifier, keep ) { // Can't pass null or undefined to indexOf in Firefox 4 // Set to 0 to skip string check qualifier = qualifier || 0; if ( jQuery.isFunction( qualifier ) ) { return jQuery.grep(elements, function( elem, i ) { var retVal = !!qualifier.call( elem, i, elem ); return retVal === keep; }); } else if ( qualifier.nodeType ) { return jQuery.grep(elements, function( elem ) { return ( elem === qualifier ) === keep; }); } else if ( typeof qualifier === "string" ) { var filtered = jQuery.grep(elements, function( elem ) { return elem.nodeType === 1; }); if ( isSimple.test( qualifier ) ) { return jQuery.filter(qualifier, filtered, !keep); } else { qualifier = jQuery.filter( qualifier, filtered ); } } return jQuery.grep(elements, function( elem ) { return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; }); } function createSafeFragment( document ) { var list = nodeNames.split( "|" ), safeFrag = document.createDocumentFragment(); if ( safeFrag.createElement ) { while ( list.length ) { safeFrag.createElement( list.pop() ); } } return safeFrag; } var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), rleadingWhitespace = /^\s+/, rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, rtagName = /<([\w:]+)/, rtbody = /<tbody/i, rhtml = /<|&#?\w+;/, rnoInnerhtml = /<(?:script|style|link)/i, manipulation_rcheckableType = /^(?:checkbox|radio)$/i, // checked="checked" or checked rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, rscriptType = /^$|\/(?:java|ecma)script/i, rscriptTypeMasked = /^true\/(.*)/, rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, // We have to close these tags to support XHTML (#13200) wrapMap = { 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>" ], // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, // unless wrapped in a div with non-breaking characters in front of it. _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ] }, safeFragment = createSafeFragment( document ), fragmentDiv = safeFragment.appendChild( document.createElement("div") ); wrapMap.optgroup = wrapMap.option; wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; jQuery.fn.extend({ text: function( value ) { return jQuery.access( this, function( value ) { return value === undefined ? jQuery.text( this ) : this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); }, null, value, arguments.length ); }, wrapAll: function( html ) { if ( jQuery.isFunction( html ) ) { return this.each(function(i) { jQuery(this).wrapAll( html.call(this, i) ); }); } if ( this[0] ) { // The elements to wrap the target around var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); if ( this[0].parentNode ) { wrap.insertBefore( this[0] ); } wrap.map(function() { var elem = this; while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { elem = elem.firstChild; } return elem; }).append( this ); } return this; }, wrapInner: function( html ) { if ( jQuery.isFunction( html ) ) { return this.each(function(i) { jQuery(this).wrapInner( html.call(this, i) ); }); } return this.each(function() { var self = jQuery( this ), contents = self.contents(); if ( contents.length ) { contents.wrapAll( html ); } else { self.append( html ); } }); }, wrap: function( html ) { var isFunction = jQuery.isFunction( html ); return this.each(function(i) { jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); }); }, unwrap: function() { return this.parent().each(function() { if ( !jQuery.nodeName( this, "body" ) ) { jQuery( this ).replaceWith( this.childNodes ); } }).end(); }, append: function() { return this.domManip(arguments, true, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { this.appendChild( elem ); } }); }, prepend: function() { return this.domManip(arguments, true, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { this.insertBefore( elem, this.firstChild ); } }); }, before: function() { return this.domManip( arguments, false, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this ); } }); }, after: function() { return this.domManip( arguments, false, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this.nextSibling ); } }); }, // keepData is for internal use only--do not document remove: function( selector, keepData ) { var elem, i = 0; for ( ; (elem = this[i]) != null; i++ ) { if ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) { if ( !keepData && elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem ) ); } if ( elem.parentNode ) { if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { setGlobalEval( getAll( elem, "script" ) ); } elem.parentNode.removeChild( elem ); } } } return this; }, empty: function() { var elem, i = 0; for ( ; (elem = this[i]) != null; i++ ) { // Remove element nodes and prevent memory leaks if ( elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem, false ) ); } // Remove any remaining nodes while ( elem.firstChild ) { elem.removeChild( elem.firstChild ); } // If this is a select, ensure that it displays empty (#12336) // Support: IE<9 if ( elem.options && jQuery.nodeName( elem, "select" ) ) { elem.options.length = 0; } } return this; }, clone: function( dataAndEvents, deepDataAndEvents ) { dataAndEvents = dataAndEvents == null ? false : dataAndEvents; deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; return this.map( function () { return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); }); }, html: function( value ) { return jQuery.access( this, function( value ) { var elem = this[0] || {}, i = 0, l = this.length; if ( value === undefined ) { return elem.nodeType === 1 ? elem.innerHTML.replace( rinlinejQuery, "" ) : undefined; } // See if we can take a shortcut and just use innerHTML if ( typeof value === "string" && !rnoInnerhtml.test( value ) && ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { value = value.replace( rxhtmlTag, "<$1></$2>" ); try { for (; i < l; i++ ) { // Remove element nodes and prevent memory leaks elem = this[i] || {}; if ( elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem, false ) ); elem.innerHTML = value; } } elem = 0; // If using innerHTML throws an exception, use the fallback method } catch(e) {} } if ( elem ) { this.empty().append( value ); } }, null, value, arguments.length ); }, replaceWith: function( value ) { var isFunc = jQuery.isFunction( value ); // Make sure that the elements are removed from the DOM before they are inserted // this can help fix replacing a parent with child elements if ( !isFunc && typeof value !== "string" ) { value = jQuery( value ).not( this ).detach(); } return this.domManip( [ value ], true, function( elem ) { var next = this.nextSibling, parent = this.parentNode; if ( parent && this.nodeType === 1 || this.nodeType === 11 ) { jQuery( this ).remove(); if ( next ) { next.parentNode.insertBefore( elem, next ); } else { parent.appendChild( elem ); } } }); }, detach: function( selector ) { return this.remove( selector, true ); }, domManip: function( args, table, callback ) { // Flatten any nested arrays args = core_concat.apply( [], args ); var fragment, first, scripts, hasScripts, node, doc, i = 0, l = this.length, set = this, iNoClone = l - 1, value = args[0], isFunction = jQuery.isFunction( value ); // We can't cloneNode fragments that contain checked, in WebKit if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { return this.each(function( index ) { var self = set.eq( index ); if ( isFunction ) { args[0] = value.call( this, index, table ? self.html() : undefined ); } self.domManip( args, table, callback ); }); } if ( l ) { fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); first = fragment.firstChild; if ( fragment.childNodes.length === 1 ) { fragment = first; } if ( first ) { table = table && jQuery.nodeName( first, "tr" ); scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); hasScripts = scripts.length; // Use the original fragment for the last item instead of the first because it can end up // being emptied incorrectly in certain situations (#8070). for ( ; i < l; i++ ) { node = fragment; if ( i !== iNoClone ) { node = jQuery.clone( node, true, true ); // Keep references to cloned scripts for later restoration if ( hasScripts ) { jQuery.merge( scripts, getAll( node, "script" ) ); } } callback.call( table && jQuery.nodeName( this[i], "table" ) ? findOrAppend( this[i], "tbody" ) : this[i], node, i ); } if ( hasScripts ) { doc = scripts[ scripts.length - 1 ].ownerDocument; // Reenable scripts jQuery.map( scripts, restoreScript ); // Evaluate executable scripts on first document insertion for ( i = 0; i < hasScripts; i++ ) { node = scripts[ i ]; if ( rscriptType.test( node.type || "" ) && !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { if ( node.src ) { // Hope ajax is available... jQuery.ajax({ url: node.src, type: "GET", dataType: "script", async: false, global: false, "throws": true }); } else { jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); } } } } // Fix #11809: Avoid leaking memory fragment = first = null; } } return this; } }); function findOrAppend( elem, tag ) { return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); } // Replace/restore the type attribute of script elements for safe DOM manipulation function disableScript( elem ) { var attr = elem.getAttributeNode("type"); elem.type = ( attr && attr.specified ) + "/" + elem.type; return elem; } function restoreScript( elem ) { var match = rscriptTypeMasked.exec( elem.type ); if ( match ) { elem.type = match[1]; } else { elem.removeAttribute("type"); } return elem; } // Mark scripts as having already been evaluated function setGlobalEval( elems, refElements ) { var elem, i = 0; for ( ; (elem = elems[i]) != null; i++ ) { jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); } } function cloneCopyEvent( src, dest ) { if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { return; } var type, i, l, oldData = jQuery._data( src ), curData = jQuery._data( dest, oldData ), events = oldData.events; if ( events ) { delete curData.handle; curData.events = {}; for ( type in events ) { for ( i = 0, l = events[ type ].length; i < l; i++ ) { jQuery.event.add( dest, type, events[ type ][ i ] ); } } } // make the cloned public data object a copy from the original if ( curData.data ) { curData.data = jQuery.extend( {}, curData.data ); } } function fixCloneNodeIssues( src, dest ) { var nodeName, data, e; // We do not need to do anything for non-Elements if ( dest.nodeType !== 1 ) { return; } nodeName = dest.nodeName.toLowerCase(); // IE6-8 copies events bound via attachEvent when using cloneNode. if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { data = jQuery._data( dest ); for ( e in data.events ) { jQuery.removeEvent( dest, e, data.handle ); } // Event data gets referenced instead of copied if the expando gets copied too dest.removeAttribute( jQuery.expando ); } // IE blanks contents when cloning scripts, and tries to evaluate newly-set text if ( nodeName === "script" && dest.text !== src.text ) { disableScript( dest ).text = src.text; restoreScript( dest ); // IE6-10 improperly clones children of object elements using classid. // IE10 throws NoModificationAllowedError if parent is null, #12132. } else if ( nodeName === "object" ) { if ( dest.parentNode ) { dest.outerHTML = src.outerHTML; } // This path appears unavoidable for IE9. When cloning an object // element in IE9, the outerHTML strategy above is not sufficient. // If the src has innerHTML and the destination does not, // copy the src.innerHTML into the dest.innerHTML. #10324 if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { dest.innerHTML = src.innerHTML; } } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { // IE6-8 fails to persist the checked state of a cloned checkbox // or radio button. Worse, IE6-7 fail to give the cloned element // a checked appearance if the defaultChecked value isn't also set dest.defaultChecked = dest.checked = src.checked; // IE6-7 get confused and end up setting the value of a cloned // checkbox/radio button to an empty string instead of "on" if ( dest.value !== src.value ) { dest.value = src.value; } // IE6-8 fails to return the selected option to the default selected // state when cloning options } else if ( nodeName === "option" ) { dest.defaultSelected = dest.selected = src.defaultSelected; // IE6-8 fails to set the defaultValue to the correct value when // cloning other types of input fields } else if ( nodeName === "input" || nodeName === "textarea" ) { dest.defaultValue = src.defaultValue; } } jQuery.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function( name, original ) { jQuery.fn[ name ] = function( selector ) { var elems, i = 0, ret = [], insert = jQuery( selector ), last = insert.length - 1; for ( ; i <= last; i++ ) { elems = i === last ? this : this.clone(true); jQuery( insert[i] )[ original ]( elems ); // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() core_push.apply( ret, elems.get() ); } return this.pushStack( ret ); }; }); function getAll( context, tag ) { var elems, elem, i = 0, found = typeof context.getElementsByTagName !== "undefined" ? context.getElementsByTagName( tag || "*" ) : typeof context.querySelectorAll !== "undefined" ? context.querySelectorAll( tag || "*" ) : undefined; if ( !found ) { for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { if ( !tag || jQuery.nodeName( elem, tag ) ) { found.push( elem ); } else { jQuery.merge( found, getAll( elem, tag ) ); } } } return tag === undefined || tag && jQuery.nodeName( context, tag ) ? jQuery.merge( [ context ], found ) : found; } // Used in buildFragment, fixes the defaultChecked property function fixDefaultChecked( elem ) { if ( manipulation_rcheckableType.test( elem.type ) ) { elem.defaultChecked = elem.checked; } } jQuery.extend({ clone: function( elem, dataAndEvents, deepDataAndEvents ) { var destElements, srcElements, node, i, clone, inPage = jQuery.contains( elem.ownerDocument, elem ); if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { clone = elem.cloneNode( true ); // IE<=8 does not properly clone detached, unknown element nodes } else { fragmentDiv.innerHTML = elem.outerHTML; fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); } if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 destElements = getAll( clone ); srcElements = getAll( elem ); // Fix all IE cloning issues for ( i = 0; (node = srcElements[i]) != null; ++i ) { // Ensure that the destination node is not null; Fixes #9587 if ( destElements[i] ) { fixCloneNodeIssues( node, destElements[i] ); } } } // Copy the events from the original to the clone if ( dataAndEvents ) { if ( deepDataAndEvents ) { srcElements = srcElements || getAll( elem ); destElements = destElements || getAll( clone ); for ( i = 0; (node = srcElements[i]) != null; i++ ) { cloneCopyEvent( node, destElements[i] ); } } else { cloneCopyEvent( elem, clone ); } } // Preserve script evaluation history destElements = getAll( clone, "script" ); if ( destElements.length > 0 ) { setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); } destElements = srcElements = node = null; // Return the cloned set return clone; }, buildFragment: function( elems, context, scripts, selection ) { var contains, elem, tag, tmp, wrap, tbody, j, l = elems.length, // Ensure a safe fragment safe = createSafeFragment( context ), nodes = [], i = 0; for ( ; i < l; i++ ) { elem = elems[ i ]; if ( elem || elem === 0 ) { // Add nodes directly if ( jQuery.type( elem ) === "object" ) { jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); // Convert non-html into a text node } else if ( !rhtml.test( elem ) ) { nodes.push( context.createTextNode( elem ) ); // Convert html into DOM nodes } else { tmp = tmp || safe.appendChild( context.createElement("div") ); // Deserialize a standard representation tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); wrap = wrapMap[ tag ] || wrapMap._default; tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2]; // Descend through wrappers to the right content j = wrap[0]; while ( j-- ) { tmp = tmp.lastChild; } // Manually add leading whitespace removed by IE if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); } // Remove IE's autoinserted <tbody> from table fragments if ( !jQuery.support.tbody ) { // String was a <table>, *may* have spurious <tbody> elem = tag === "table" && !rtbody.test( elem ) ? tmp.firstChild : // String was a bare <thead> or <tfoot> wrap[1] === "<table>" && !rtbody.test( elem ) ? tmp : 0; j = elem && elem.childNodes.length; while ( j-- ) { if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { elem.removeChild( tbody ); } } } jQuery.merge( nodes, tmp.childNodes ); // Fix #12392 for WebKit and IE > 9 tmp.textContent = ""; // Fix #12392 for oldIE while ( tmp.firstChild ) { tmp.removeChild( tmp.firstChild ); } // Remember the top-level container for proper cleanup tmp = safe.lastChild; } } } // Fix #11356: Clear elements from fragment if ( tmp ) { safe.removeChild( tmp ); } // Reset defaultChecked for any radios and checkboxes // about to be appended to the DOM in IE 6/7 (#8060) if ( !jQuery.support.appendChecked ) { jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); } i = 0; while ( (elem = nodes[ i++ ]) ) { // #4087 - If origin and destination elements are the same, and this is // that element, do not do anything if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { continue; } contains = jQuery.contains( elem.ownerDocument, elem ); // Append to fragment tmp = getAll( safe.appendChild( elem ), "script" ); // Preserve script evaluation history if ( contains ) { setGlobalEval( tmp ); } // Capture executables if ( scripts ) { j = 0; while ( (elem = tmp[ j++ ]) ) { if ( rscriptType.test( elem.type || "" ) ) { scripts.push( elem ); } } } } tmp = null; return safe; }, cleanData: function( elems, /* internal */ acceptData ) { var data, id, elem, type, i = 0, internalKey = jQuery.expando, cache = jQuery.cache, deleteExpando = jQuery.support.deleteExpando, special = jQuery.event.special; for ( ; (elem = elems[i]) != null; i++ ) { if ( acceptData || jQuery.acceptData( elem ) ) { id = elem[ internalKey ]; data = id && cache[ id ]; if ( data ) { if ( data.events ) { for ( type in data.events ) { if ( special[ type ] ) { jQuery.event.remove( elem, type ); // This is a shortcut to avoid jQuery.event.remove's overhead } else { jQuery.removeEvent( elem, type, data.handle ); } } } // Remove cache only if it was not already removed by jQuery.event.remove if ( cache[ id ] ) { delete cache[ id ]; // IE does not allow us to delete expando properties from nodes, // nor does it have a removeAttribute function on Document nodes; // we must handle all of these cases if ( deleteExpando ) { delete elem[ internalKey ]; } else if ( typeof elem.removeAttribute !== "undefined" ) { elem.removeAttribute( internalKey ); } else { elem[ internalKey ] = null; } core_deletedIds.push( id ); } } } } } }); var curCSS, getStyles, iframe, ralpha = /alpha\([^)]*\)/i, ropacity = /opacity\s*=\s*([^)]*)/, rposition = /^(top|right|bottom|left)$/, // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display rdisplayswap = /^(none|table(?!-c[ea]).+)/, rmargin = /^margin/, rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), elemdisplay = { BODY: "block" }, cssShow = { position: "absolute", visibility: "hidden", display: "block" }, cssNormalTransform = { letterSpacing: 0, fontWeight: 400 }, cssExpand = [ "Top", "Right", "Bottom", "Left" ], cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; // return a css property mapped to a potentially vendor prefixed property function vendorPropName( style, name ) { // shortcut for names that are not vendor prefixed if ( name in style ) { return name; } // check for vendor prefixed names var capName = name.charAt(0).toUpperCase() + name.slice(1), origName = name, i = cssPrefixes.length; while ( i-- ) { name = cssPrefixes[ i ] + capName; if ( name in style ) { return name; } } return origName; } function isHidden( elem, el ) { // isHidden might be called from jQuery#filter function; // in that case, element will be second argument elem = el || elem; return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); } function showHide( elements, show ) { var elem, values = [], index = 0, length = elements.length; for ( ; index < length; index++ ) { elem = elements[ index ]; if ( !elem.style ) { continue; } values[ index ] = jQuery._data( elem, "olddisplay" ); if ( show ) { // Reset the inline display of this element to learn if it is // being hidden by cascaded rules or not if ( !values[ index ] && elem.style.display === "none" ) { elem.style.display = ""; } // Set elements which have been overridden with display: none // in a stylesheet to whatever the default browser style is // for such an element if ( elem.style.display === "" && isHidden( elem ) ) { values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); } } else if ( !values[ index ] && !isHidden( elem ) ) { jQuery._data( elem, "olddisplay", jQuery.css( elem, "display" ) ); } } // Set the display of most of the elements in a second loop // to avoid the constant reflow for ( index = 0; index < length; index++ ) { elem = elements[ index ]; if ( !elem.style ) { continue; } if ( !show || elem.style.display === "none" || elem.style.display === "" ) { elem.style.display = show ? values[ index ] || "" : "none"; } } return elements; } jQuery.fn.extend({ css: function( name, value ) { return jQuery.access( this, function( elem, name, value ) { var styles, len, map = {}, i = 0; if ( jQuery.isArray( name ) ) { styles = getStyles( elem ); len = name.length; for ( ; i < len; i++ ) { map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); } return map; } return value !== undefined ? jQuery.style( elem, name, value ) : jQuery.css( elem, name ); }, name, value, arguments.length > 1 ); }, show: function() { return showHide( this, true ); }, hide: function() { return showHide( this ); }, toggle: function( state ) { var bool = typeof state === "boolean"; return this.each(function() { if ( bool ? state : isHidden( this ) ) { jQuery( this ).show(); } else { jQuery( this ).hide(); } }); } }); jQuery.extend({ // Add in style property hooks for overriding the default // behavior of getting and setting a style property cssHooks: { opacity: { get: function( elem, computed ) { if ( computed ) { // We should always get a number back from opacity var ret = curCSS( elem, "opacity" ); return ret === "" ? "1" : ret; } } } }, // Exclude the following css properties to add px cssNumber: { "columnCount": true, "fillOpacity": true, "fontWeight": true, "lineHeight": true, "opacity": true, "orphans": true, "widows": true, "zIndex": true, "zoom": true }, // Add in properties whose names you wish to fix before // setting or getting the value cssProps: { // normalize float css property "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" }, // Get and set the style property on a DOM Node style: function( elem, name, value, extra ) { // Don't set styles on text and comment nodes if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { return; } // Make sure that we're working with the right name var ret, type, hooks, origName = jQuery.camelCase( name ), style = elem.style; name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); // gets hook for the prefixed version // followed by the unprefixed version hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // Check if we're setting a value if ( value !== undefined ) { type = typeof value; // convert relative number strings (+= or -=) to relative numbers. #7345 if ( type === "string" && (ret = rrelNum.exec( value )) ) { value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); // Fixes bug #9237 type = "number"; } // Make sure that NaN and null values aren't set. See: #7116 if ( value == null || type === "number" && isNaN( value ) ) { return; } // If a number was passed in, add 'px' to the (except for certain CSS properties) if ( type === "number" && !jQuery.cssNumber[ origName ] ) { value += "px"; } // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, // but it would mean to define eight (for every problematic property) identical functions if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { style[ name ] = "inherit"; } // If a hook was provided, use that value, otherwise just set the specified value if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { // Wrapped to prevent IE from throwing errors when 'invalid' values are provided // Fixes bug #5509 try { style[ name ] = value; } catch(e) {} } } else { // If a hook was provided get the non-computed value from there if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { return ret; } // Otherwise just get the value from the style object return style[ name ]; } }, css: function( elem, name, extra, styles ) { var val, num, hooks, origName = jQuery.camelCase( name ); // Make sure that we're working with the right name name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); // gets hook for the prefixed version // followed by the unprefixed version hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // If a hook was provided get the computed value from there if ( hooks && "get" in hooks ) { val = hooks.get( elem, true, extra ); } // Otherwise, if a way to get the computed value exists, use that if ( val === undefined ) { val = curCSS( elem, name, styles ); } //convert "normal" to computed value if ( val === "normal" && name in cssNormalTransform ) { val = cssNormalTransform[ name ]; } // Return, converting to number if forced or a qualifier was provided and val looks numeric if ( extra ) { num = parseFloat( val ); return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; } return val; }, // A method for quickly swapping in/out CSS properties to get correct calculations swap: function( elem, options, callback, args ) { var ret, name, old = {}; // Remember the old values, and insert the new ones for ( name in options ) { old[ name ] = elem.style[ name ]; elem.style[ name ] = options[ name ]; } ret = callback.apply( elem, args || [] ); // Revert the old values for ( name in options ) { elem.style[ name ] = old[ name ]; } return ret; } }); // NOTE: we've included the "window" in window.getComputedStyle // because jsdom on node.js will break without it. if ( window.getComputedStyle ) { getStyles = function( elem ) { return window.getComputedStyle( elem, null ); }; curCSS = function( elem, name, _computed ) { var width, minWidth, maxWidth, computed = _computed || getStyles( elem ), // getPropertyValue is only needed for .css('filter') in IE9, see #12537 ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, style = elem.style; if ( computed ) { if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { ret = jQuery.style( elem, name ); } // A tribute to the "awesome hack by Dean Edwards" // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { // Remember the original values width = style.width; minWidth = style.minWidth; maxWidth = style.maxWidth; // Put in the new values to get a computed value out style.minWidth = style.maxWidth = style.width = ret; ret = computed.width; // Revert the changed values style.width = width; style.minWidth = minWidth; style.maxWidth = maxWidth; } } return ret; }; } else if ( document.documentElement.currentStyle ) { getStyles = function( elem ) { return elem.currentStyle; }; curCSS = function( elem, name, _computed ) { var left, rs, rsLeft, computed = _computed || getStyles( elem ), ret = computed ? computed[ name ] : undefined, style = elem.style; // Avoid setting ret to empty string here // so we don't default to auto if ( ret == null && style && style[ name ] ) { ret = style[ name ]; } // From the awesome hack by Dean Edwards // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // If we're not dealing with a regular pixel number // but a number that has a weird ending, we need to convert it to pixels // but not position css attributes, as those are proportional to the parent element instead // and we can't measure the parent instead because it might trigger a "stacking dolls" problem if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { // Remember the original values left = style.left; rs = elem.runtimeStyle; rsLeft = rs && rs.left; // Put in the new values to get a computed value out if ( rsLeft ) { rs.left = elem.currentStyle.left; } style.left = name === "fontSize" ? "1em" : ret; ret = style.pixelLeft + "px"; // Revert the changed values style.left = left; if ( rsLeft ) { rs.left = rsLeft; } } return ret === "" ? "auto" : ret; }; } function setPositiveNumber( elem, value, subtract ) { var matches = rnumsplit.exec( value ); return matches ? // Guard against undefined "subtract", e.g., when used as in cssHooks Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : value; } function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { var i = extra === ( isBorderBox ? "border" : "content" ) ? // If we already have the right measurement, avoid augmentation 4 : // Otherwise initialize for horizontal or vertical properties name === "width" ? 1 : 0, val = 0; for ( ; i < 4; i += 2 ) { // both box models exclude margin, so add it if we want it if ( extra === "margin" ) { val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); } if ( isBorderBox ) { // border-box includes padding, so remove it if we want content if ( extra === "content" ) { val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); } // at this point, extra isn't border nor margin, so remove border if ( extra !== "margin" ) { val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } } else { // at this point, extra isn't content, so add padding val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); // at this point, extra isn't content nor padding, so add border if ( extra !== "padding" ) { val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } } } return val; } function getWidthOrHeight( elem, name, extra ) { // Start with offset property, which is equivalent to the border-box value var valueIsBorderBox = true, val = name === "width" ? elem.offsetWidth : elem.offsetHeight, styles = getStyles( elem ), isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; // some non-html elements return undefined for offsetWidth, so check for null/undefined // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 if ( val <= 0 || val == null ) { // Fall back to computed then uncomputed css if necessary val = curCSS( elem, name, styles ); if ( val < 0 || val == null ) { val = elem.style[ name ]; } // Computed unit is not pixels. Stop here and return. if ( rnumnonpx.test(val) ) { return val; } // we need the check for style in case a browser which returns unreliable values // for getComputedStyle silently falls back to the reliable elem.style valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); // Normalize "", auto, and prepare for extra val = parseFloat( val ) || 0; } // use the active box-sizing model to add/subtract irrelevant styles return ( val + augmentWidthOrHeight( elem, name, extra || ( isBorderBox ? "border" : "content" ), valueIsBorderBox, styles ) ) + "px"; } // Try to determine the default display value of an element function css_defaultDisplay( nodeName ) { var doc = document, display = elemdisplay[ nodeName ]; if ( !display ) { display = actualDisplay( nodeName, doc ); // If the simple way fails, read from inside an iframe if ( display === "none" || !display ) { // Use the already-created iframe if possible iframe = ( iframe || jQuery("<iframe frameborder='0' width='0' height='0'/>") .css( "cssText", "display:block !important" ) ).appendTo( doc.documentElement ); // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document; doc.write("<!doctype html><html><body>"); doc.close(); display = actualDisplay( nodeName, doc ); iframe.detach(); } // Store the correct default display elemdisplay[ nodeName ] = display; } return display; } // Called ONLY from within css_defaultDisplay function actualDisplay( name, doc ) { var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), display = jQuery.css( elem[0], "display" ); elem.remove(); return display; } jQuery.each([ "height", "width" ], function( i, name ) { jQuery.cssHooks[ name ] = { get: function( elem, computed, extra ) { if ( computed ) { // certain elements can have dimension info if we invisibly show them // however, it must have a current display style that would benefit from this return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ? jQuery.swap( elem, cssShow, function() { return getWidthOrHeight( elem, name, extra ); }) : getWidthOrHeight( elem, name, extra ); } }, set: function( elem, value, extra ) { var styles = extra && getStyles( elem ); return setPositiveNumber( elem, value, extra ? augmentWidthOrHeight( elem, name, extra, jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box", styles ) : 0 ); } }; }); if ( !jQuery.support.opacity ) { jQuery.cssHooks.opacity = { get: function( elem, computed ) { // IE uses filters for opacity return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : computed ? "1" : ""; }, set: function( elem, value ) { var style = elem.style, currentStyle = elem.currentStyle, opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", filter = currentStyle && currentStyle.filter || style.filter || ""; // IE has trouble with opacity if it does not have layout // Force it by setting the zoom level style.zoom = 1; // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 // if value === "", then remove inline opacity #12685 if ( ( value >= 1 || value === "" ) && jQuery.trim( filter.replace( ralpha, "" ) ) === "" && style.removeAttribute ) { // Setting style.filter to null, "" & " " still leave "filter:" in the cssText // if "filter:" is present at all, clearType is disabled, we want to avoid this // style.removeAttribute is IE Only, but so apparently is this code path... style.removeAttribute( "filter" ); // if there is no filter style applied in a css rule or unset inline opacity, we are done if ( value === "" || currentStyle && !currentStyle.filter ) { return; } } // otherwise, set new filter values style.filter = ralpha.test( filter ) ? filter.replace( ralpha, opacity ) : filter + " " + opacity; } }; } // These hooks cannot be added until DOM ready because the support test // for it is not run until after DOM ready jQuery(function() { if ( !jQuery.support.reliableMarginRight ) { jQuery.cssHooks.marginRight = { get: function( elem, computed ) { if ( computed ) { // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right // Work around by temporarily setting element display to inline-block return jQuery.swap( elem, { "display": "inline-block" }, curCSS, [ elem, "marginRight" ] ); } } }; } // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 // getComputedStyle returns percent when specified for top/left/bottom/right // rather than make the css module depend on the offset module, we just check for it here if ( !jQuery.support.pixelPosition && jQuery.fn.position ) { jQuery.each( [ "top", "left" ], function( i, prop ) { jQuery.cssHooks[ prop ] = { get: function( elem, computed ) { if ( computed ) { computed = curCSS( elem, prop ); // if curCSS returns percentage, fallback to offset return rnumnonpx.test( computed ) ? jQuery( elem ).position()[ prop ] + "px" : computed; } } }; }); } }); if ( jQuery.expr && jQuery.expr.filters ) { jQuery.expr.filters.hidden = function( elem ) { return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none"); }; jQuery.expr.filters.visible = function( elem ) { return !jQuery.expr.filters.hidden( elem ); }; } // These hooks are used by animate to expand properties jQuery.each({ margin: "", padding: "", border: "Width" }, function( prefix, suffix ) { jQuery.cssHooks[ prefix + suffix ] = { expand: function( value ) { var i = 0, expanded = {}, // assumes a single number if not a string parts = typeof value === "string" ? value.split(" ") : [ value ]; for ( ; i < 4; i++ ) { expanded[ prefix + cssExpand[ i ] + suffix ] = parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; } return expanded; } }; if ( !rmargin.test( prefix ) ) { jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; } }); var r20 = /%20/g, rbracket = /\[\]$/, rCRLF = /\r?\n/g, rsubmitterTypes = /^(?:submit|button|image|reset)$/i, rsubmittable = /^(?:input|select|textarea|keygen)/i; jQuery.fn.extend({ serialize: function() { return jQuery.param( this.serializeArray() ); }, serializeArray: function() { return this.map(function(){ // Can add propHook for "elements" to filter or add form elements var elements = jQuery.prop( this, "elements" ); return elements ? jQuery.makeArray( elements ) : this; }) .filter(function(){ var type = this.type; // Use .is(":disabled") so that fieldset[disabled] works return this.name && !jQuery( this ).is( ":disabled" ) && rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && ( this.checked || !manipulation_rcheckableType.test( type ) ); }) .map(function( i, elem ){ var val = jQuery( this ).val(); return val == null ? null : jQuery.isArray( val ) ? jQuery.map( val, function( val ){ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; }) : { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; }).get(); } }); //Serialize an array of form elements or a set of //key/values into a query string jQuery.param = function( a, traditional ) { var prefix, s = [], add = function( key, value ) { // If value is a function, invoke it and return its value value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); }; // Set traditional to true for jQuery <= 1.3.2 behavior. if ( traditional === undefined ) { traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; } // If an array was passed in, assume that it is an array of form elements. if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { // Serialize the form elements jQuery.each( a, function() { add( this.name, this.value ); }); } else { // If traditional, encode the "old" way (the way 1.3.2 or older // did it), otherwise encode params recursively. for ( prefix in a ) { buildParams( prefix, a[ prefix ], traditional, add ); } } // Return the resulting serialization return s.join( "&" ).replace( r20, "+" ); }; function buildParams( prefix, obj, traditional, add ) { var name; if ( jQuery.isArray( obj ) ) { // Serialize array item. jQuery.each( obj, function( i, v ) { if ( traditional || rbracket.test( prefix ) ) { // Treat each array item as a scalar. add( prefix, v ); } else { // Item is non-scalar (array or object), encode its numeric index. buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); } }); } else if ( !traditional && jQuery.type( obj ) === "object" ) { // Serialize object item. for ( name in obj ) { buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); } } else { // Serialize scalar item. add( prefix, obj ); } } var // Document location ajaxLocParts, ajaxLocation, ajax_nonce = jQuery.now(), ajax_rquery = /\?/, rhash = /#.*$/, rts = /([?&])_=[^&]*/, rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL // #7653, #8125, #8152: local protocol detection rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, // Keep a copy of the old load method _load = jQuery.fn.load, /* Prefilters * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) * 2) These are called: * - BEFORE asking for a transport * - AFTER param serialization (s.data is a string if s.processData is true) * 3) key is the dataType * 4) the catchall symbol "*" can be used * 5) execution will start with transport dataType and THEN continue down to "*" if needed */ prefilters = {}, /* Transports bindings * 1) key is the dataType * 2) the catchall symbol "*" can be used * 3) selection will start with transport dataType and THEN go to "*" if needed */ transports = {}, // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression allTypes = "*/".concat("*"); // #8138, IE may throw an exception when accessing // a field from window.location if document.domain has been set try { ajaxLocation = location.href; } catch( e ) { // Use the href attribute of an A element // since IE will modify it given document.location ajaxLocation = document.createElement( "a" ); ajaxLocation.href = ""; ajaxLocation = ajaxLocation.href; } // Segment location into parts ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport function addToPrefiltersOrTransports( structure ) { // dataTypeExpression is optional and defaults to "*" return function( dataTypeExpression, func ) { if ( typeof dataTypeExpression !== "string" ) { func = dataTypeExpression; dataTypeExpression = "*"; } var dataType, i = 0, dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || []; if ( jQuery.isFunction( func ) ) { // For each dataType in the dataTypeExpression while ( (dataType = dataTypes[i++]) ) { // Prepend if requested if ( dataType[0] === "+" ) { dataType = dataType.slice( 1 ) || "*"; (structure[ dataType ] = structure[ dataType ] || []).unshift( func ); // Otherwise append } else { (structure[ dataType ] = structure[ dataType ] || []).push( func ); } } } }; } // Base inspection function for prefilters and transports function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { var inspected = {}, seekingTransport = ( structure === transports ); function inspect( dataType ) { var selected; inspected[ dataType ] = true; jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { options.dataTypes.unshift( dataTypeOrTransport ); inspect( dataTypeOrTransport ); return false; } else if ( seekingTransport ) { return !( selected = dataTypeOrTransport ); } }); return selected; } return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); } // A special extend for ajax options // that takes "flat" options (not to be deep extended) // Fixes #9887 function ajaxExtend( target, src ) { var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {}; for ( key in src ) { if ( src[ key ] !== undefined ) { ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ]; } } if ( deep ) { jQuery.extend( true, target, deep ); } return target; } jQuery.fn.load = function( url, params, callback ) { if ( typeof url !== "string" && _load ) { return _load.apply( this, arguments ); } var selector, type, response, self = this, off = url.indexOf(" "); if ( off >= 0 ) { selector = url.slice( off, url.length ); url = url.slice( 0, off ); } // If it's a function if ( jQuery.isFunction( params ) ) { // We assume that it's the callback callback = params; params = undefined; // Otherwise, build a param string } else if ( params && typeof params === "object" ) { type = "POST"; } // If we have elements to modify, make the request if ( self.length > 0 ) { jQuery.ajax({ url: url, // if "type" variable is undefined, then "GET" method will be used type: type, dataType: "html", data: params }).done(function( responseText ) { // Save response for use in complete callback response = arguments; self.html( selector ? // If a selector was specified, locate the right elements in a dummy div // Exclude scripts to avoid IE 'Permission Denied' errors jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) : // Otherwise use the full result responseText ); }).complete( callback && function( jqXHR, status ) { self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); }); } return this; }; // Attach a bunch of functions for handling common AJAX events jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){ jQuery.fn[ type ] = function( fn ){ return this.on( type, fn ); }; }); jQuery.each( [ "get", "post" ], function( i, method ) { jQuery[ method ] = function( url, data, callback, type ) { // shift arguments if data argument was omitted if ( jQuery.isFunction( data ) ) { type = type || callback; callback = data; data = undefined; } return jQuery.ajax({ url: url, type: method, dataType: type, data: data, success: callback }); }; }); jQuery.extend({ // Counter for holding the number of active queries active: 0, // Last-Modified header cache for next request lastModified: {}, etag: {}, ajaxSettings: { url: ajaxLocation, type: "GET", isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), global: true, processData: true, async: true, contentType: "application/x-www-form-urlencoded; charset=UTF-8", /* timeout: 0, data: null, dataType: null, username: null, password: null, cache: null, throws: false, traditional: false, headers: {}, */ accepts: { "*": allTypes, 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" }, // Data converters // Keys separate source (or catchall "*") and destination types with a single space converters: { // Convert anything to text "* text": window.String, // Text to html (true = no transformation) "text html": true, // Evaluate text as a json expression "text json": jQuery.parseJSON, // Parse text as xml "text xml": jQuery.parseXML }, // For options that shouldn't be deep extended: // you can add your own custom options here if // and when you create one that shouldn't be // deep extended (see ajaxExtend) flatOptions: { url: true, context: true } }, // Creates a full fledged settings object into target // with both ajaxSettings and settings fields. // If target is omitted, writes into ajaxSettings. ajaxSetup: function( target, settings ) { return settings ? // Building a settings object ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : // Extending ajaxSettings ajaxExtend( jQuery.ajaxSettings, target ); }, ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), ajaxTransport: addToPrefiltersOrTransports( transports ), // Main method ajax: function( url, options ) { // If url is an object, simulate pre-1.5 signature if ( typeof url === "object" ) { options = url; url = undefined; } // Force options to be an object options = options || {}; var transport, // URL without anti-cache param cacheURL, // Response headers responseHeadersString, responseHeaders, // timeout handle timeoutTimer, // Cross-domain detection vars parts, // To know if global events are to be dispatched fireGlobals, // Loop variable i, // Create the final options object s = jQuery.ajaxSetup( {}, options ), // Callbacks context callbackContext = s.context || s, // Context for global events is callbackContext if it is a DOM node or jQuery collection globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? jQuery( callbackContext ) : jQuery.event, // Deferreds deferred = jQuery.Deferred(), completeDeferred = jQuery.Callbacks("once memory"), // Status-dependent callbacks statusCode = s.statusCode || {}, // Headers (they are sent all at once) requestHeaders = {}, requestHeadersNames = {}, // The jqXHR state state = 0, // Default abort message strAbort = "canceled", // Fake xhr jqXHR = { readyState: 0, // Builds headers hashtable if needed getResponseHeader: function( key ) { var match; if ( state === 2 ) { if ( !responseHeaders ) { responseHeaders = {}; while ( (match = rheaders.exec( responseHeadersString )) ) { responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; } } match = responseHeaders[ key.toLowerCase() ]; } return match == null ? null : match; }, // Raw string getAllResponseHeaders: function() { return state === 2 ? responseHeadersString : null; }, // Caches the header setRequestHeader: function( name, value ) { var lname = name.toLowerCase(); if ( !state ) { name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; requestHeaders[ name ] = value; } return this; }, // Overrides response content-type header overrideMimeType: function( type ) { if ( !state ) { s.mimeType = type; } return this; }, // Status-dependent callbacks statusCode: function( map ) { var code; if ( map ) { if ( state < 2 ) { for ( code in map ) { // Lazy-add the new callback in a way that preserves old ones statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; } } else { // Execute the appropriate callbacks jqXHR.always( map[ jqXHR.status ] ); } } return this; }, // Cancel the request abort: function( statusText ) { var finalText = statusText || strAbort; if ( transport ) { transport.abort( finalText ); } done( 0, finalText ); return this; } }; // Attach deferreds deferred.promise( jqXHR ).complete = completeDeferred.add; jqXHR.success = jqXHR.done; jqXHR.error = jqXHR.fail; // Remove hash character (#7531: and string promotion) // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) // Handle falsy url in the settings object (#10093: consistency with old signature) // We also use the url parameter if available s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); // Alias method option to type as per ticket #12004 s.type = options.method || options.type || s.method || s.type; // Extract dataTypes list s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""]; // A cross-domain request is in order when we have a protocol:host:port mismatch if ( s.crossDomain == null ) { parts = rurl.exec( s.url.toLowerCase() ); s.crossDomain = !!( parts && ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) ); } // Convert data if not already a string if ( s.data && s.processData && typeof s.data !== "string" ) { s.data = jQuery.param( s.data, s.traditional ); } // Apply prefilters inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); // If request was aborted inside a prefilter, stop there if ( state === 2 ) { return jqXHR; } // We can fire global events as of now if asked to fireGlobals = s.global; // Watch for a new set of requests if ( fireGlobals && jQuery.active++ === 0 ) { jQuery.event.trigger("ajaxStart"); } // Uppercase the type s.type = s.type.toUpperCase(); // Determine if request has content s.hasContent = !rnoContent.test( s.type ); // Save the URL in case we're toying with the If-Modified-Since // and/or If-None-Match header later on cacheURL = s.url; // More options handling for requests with no content if ( !s.hasContent ) { // If data is available, append data to url if ( s.data ) { cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data ); // #9682: remove data so that it's not used in an eventual retry delete s.data; } // Add anti-cache in url if needed if ( s.cache === false ) { s.url = rts.test( cacheURL ) ? // If there is already a '_' parameter, set its value cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) : // Otherwise add one to the end cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++; } } // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { if ( jQuery.lastModified[ cacheURL ] ) { jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); } if ( jQuery.etag[ cacheURL ] ) { jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); } } // Set the correct header, if data is being sent if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { jqXHR.setRequestHeader( "Content-Type", s.contentType ); } // Set the Accepts header for the server, depending on the dataType jqXHR.setRequestHeader( "Accept", s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : s.accepts[ "*" ] ); // Check for headers option for ( i in s.headers ) { jqXHR.setRequestHeader( i, s.headers[ i ] ); } // Allow custom headers/mimetypes and early abort if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { // Abort if not done already and return return jqXHR.abort(); } // aborting is no longer a cancellation strAbort = "abort"; // Install callbacks on deferreds for ( i in { success: 1, error: 1, complete: 1 } ) { jqXHR[ i ]( s[ i ] ); } // Get transport transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); // If no transport, we auto-abort if ( !transport ) { done( -1, "No Transport" ); } else { jqXHR.readyState = 1; // Send global event if ( fireGlobals ) { globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); } // Timeout if ( s.async && s.timeout > 0 ) { timeoutTimer = setTimeout(function() { jqXHR.abort("timeout"); }, s.timeout ); } try { state = 1; transport.send( requestHeaders, done ); } catch ( e ) { // Propagate exception as error if not done if ( state < 2 ) { done( -1, e ); // Simply rethrow otherwise } else { throw e; } } } // Callback for when everything is done function done( status, nativeStatusText, responses, headers ) { var isSuccess, success, error, response, modified, statusText = nativeStatusText; // Called once if ( state === 2 ) { return; } // State is "done" now state = 2; // Clear timeout if it exists if ( timeoutTimer ) { clearTimeout( timeoutTimer ); } // Dereference transport for early garbage collection // (no matter how long the jqXHR object will be used) transport = undefined; // Cache response headers responseHeadersString = headers || ""; // Set readyState jqXHR.readyState = status > 0 ? 4 : 0; // Get response data if ( responses ) { response = ajaxHandleResponses( s, jqXHR, responses ); } // If successful, handle type chaining if ( status >= 200 && status < 300 || status === 304 ) { // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { modified = jqXHR.getResponseHeader("Last-Modified"); if ( modified ) { jQuery.lastModified[ cacheURL ] = modified; } modified = jqXHR.getResponseHeader("etag"); if ( modified ) { jQuery.etag[ cacheURL ] = modified; } } // If not modified if ( status === 304 ) { isSuccess = true; statusText = "notmodified"; // If we have data } else { isSuccess = ajaxConvert( s, response ); statusText = isSuccess.state; success = isSuccess.data; error = isSuccess.error; isSuccess = !error; } } else { // We extract error from statusText // then normalize statusText and status for non-aborts error = statusText; if ( status || !statusText ) { statusText = "error"; if ( status < 0 ) { status = 0; } } } // Set data for the fake xhr object jqXHR.status = status; jqXHR.statusText = ( nativeStatusText || statusText ) + ""; // Success/Error if ( isSuccess ) { deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); } else { deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); } // Status-dependent callbacks jqXHR.statusCode( statusCode ); statusCode = undefined; if ( fireGlobals ) { globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", [ jqXHR, s, isSuccess ? success : error ] ); } // Complete completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); if ( fireGlobals ) { globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); // Handle the global AJAX counter if ( !( --jQuery.active ) ) { jQuery.event.trigger("ajaxStop"); } } } return jqXHR; }, getScript: function( url, callback ) { return jQuery.get( url, undefined, callback, "script" ); }, getJSON: function( url, data, callback ) { return jQuery.get( url, data, callback, "json" ); } }); /* Handles responses to an ajax request: * - sets all responseXXX fields accordingly * - finds the right dataType (mediates between content-type and expected dataType) * - returns the corresponding response */ function ajaxHandleResponses( s, jqXHR, responses ) { var ct, type, finalDataType, firstDataType, contents = s.contents, dataTypes = s.dataTypes, responseFields = s.responseFields; // Fill responseXXX fields for ( type in responseFields ) { if ( type in responses ) { jqXHR[ responseFields[type] ] = responses[ type ]; } } // Remove auto dataType and get content-type in the process while( dataTypes[ 0 ] === "*" ) { dataTypes.shift(); if ( ct === undefined ) { ct = s.mimeType || jqXHR.getResponseHeader("Content-Type"); } } // Check if we're dealing with a known content-type if ( ct ) { for ( type in contents ) { if ( contents[ type ] && contents[ type ].test( ct ) ) { dataTypes.unshift( type ); break; } } } // Check to see if we have a response for the expected dataType if ( dataTypes[ 0 ] in responses ) { finalDataType = dataTypes[ 0 ]; } else { // Try convertible dataTypes for ( type in responses ) { if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { finalDataType = type; break; } if ( !firstDataType ) { firstDataType = type; } } // Or just use first one finalDataType = finalDataType || firstDataType; } // If we found a dataType // We add the dataType to the list if needed // and return the corresponding response if ( finalDataType ) { if ( finalDataType !== dataTypes[ 0 ] ) { dataTypes.unshift( finalDataType ); } return responses[ finalDataType ]; } } // Chain conversions given the request and the original response function ajaxConvert( s, response ) { var conv, conv2, current, tmp, converters = {}, i = 0, // Work with a copy of dataTypes in case we need to modify it for conversion dataTypes = s.dataTypes.slice(), prev = dataTypes[ 0 ]; // Apply the dataFilter if provided if ( s.dataFilter ) { response = s.dataFilter( response, s.dataType ); } // Create converters map with lowercased keys if ( dataTypes[ 1 ] ) { for ( conv in s.converters ) { converters[ conv.toLowerCase() ] = s.converters[ conv ]; } } // Convert to each sequential dataType, tolerating list modification for ( ; (current = dataTypes[++i]); ) { // There's only work to do if current dataType is non-auto if ( current !== "*" ) { // Convert response if prev dataType is non-auto and differs from current if ( prev !== "*" && prev !== current ) { // Seek a direct converter conv = converters[ prev + " " + current ] || converters[ "* " + current ]; // If none found, seek a pair if ( !conv ) { for ( conv2 in converters ) { // If conv2 outputs current tmp = conv2.split(" "); if ( tmp[ 1 ] === current ) { // If prev can be converted to accepted input conv = converters[ prev + " " + tmp[ 0 ] ] || converters[ "* " + tmp[ 0 ] ]; if ( conv ) { // Condense equivalence converters if ( conv === true ) { conv = converters[ conv2 ]; // Otherwise, insert the intermediate dataType } else if ( converters[ conv2 ] !== true ) { current = tmp[ 0 ]; dataTypes.splice( i--, 0, current ); } break; } } } } // Apply converter (if not an equivalence) if ( conv !== true ) { // Unless errors are allowed to bubble, catch and return them if ( conv && s["throws"] ) { response = conv( response ); } else { try { response = conv( response ); } catch ( e ) { return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; } } } } // Update prev for next iteration prev = current; } } return { state: "success", data: response }; } // Install script dataType jQuery.ajaxSetup({ accepts: { script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" }, contents: { script: /(?:java|ecma)script/ }, converters: { "text script": function( text ) { jQuery.globalEval( text ); return text; } } }); // Handle cache's special case and global jQuery.ajaxPrefilter( "script", function( s ) { if ( s.cache === undefined ) { s.cache = false; } if ( s.crossDomain ) { s.type = "GET"; s.global = false; } }); // Bind script tag hack transport jQuery.ajaxTransport( "script", function(s) { // This transport only deals with cross domain requests if ( s.crossDomain ) { var script, head = document.head || jQuery("head")[0] || document.documentElement; return { send: function( _, callback ) { script = document.createElement("script"); script.async = true; if ( s.scriptCharset ) { script.charset = s.scriptCharset; } script.src = s.url; // Attach handlers for all browsers script.onload = script.onreadystatechange = function( _, isAbort ) { if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { // Handle memory leak in IE script.onload = script.onreadystatechange = null; // Remove the script if ( script.parentNode ) { script.parentNode.removeChild( script ); } // Dereference the script script = null; // Callback if not abort if ( !isAbort ) { callback( 200, "success" ); } } }; // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending // Use native DOM manipulation to avoid our domManip AJAX trickery head.insertBefore( script, head.firstChild ); }, abort: function() { if ( script ) { script.onload( undefined, true ); } } }; } }); var oldCallbacks = [], rjsonp = /(=)\?(?=&|$)|\?\?/; // Default jsonp settings jQuery.ajaxSetup({ jsonp: "callback", jsonpCallback: function() { var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) ); this[ callback ] = true; return callback; } }); // Detect, normalize options and install callbacks for jsonp requests jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { var callbackName, overwritten, responseContainer, jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? "url" : typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data" ); // Handle iff the expected data type is "jsonp" or we have a parameter to set if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { // Get callback name, remembering preexisting value associated with it callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback; // Insert callback into url or form data if ( jsonProp ) { s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); } else if ( s.jsonp !== false ) { s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; } // Use data converter to retrieve json after script execution s.converters["script json"] = function() { if ( !responseContainer ) { jQuery.error( callbackName + " was not called" ); } return responseContainer[ 0 ]; }; // force json dataType s.dataTypes[ 0 ] = "json"; // Install callback overwritten = window[ callbackName ]; window[ callbackName ] = function() { responseContainer = arguments; }; // Clean-up function (fires after converters) jqXHR.always(function() { // Restore preexisting value window[ callbackName ] = overwritten; // Save back as free if ( s[ callbackName ] ) { // make sure that re-using the options doesn't screw things around s.jsonpCallback = originalSettings.jsonpCallback; // save the callback name for future use oldCallbacks.push( callbackName ); } // Call if it was a function and we have a response if ( responseContainer && jQuery.isFunction( overwritten ) ) { overwritten( responseContainer[ 0 ] ); } responseContainer = overwritten = undefined; }); // Delegate to script return "script"; } }); var xhrCallbacks, xhrSupported, xhrId = 0, // #5280: Internet Explorer will keep connections alive if we don't abort on unload xhrOnUnloadAbort = window.ActiveXObject && function() { // Abort all pending requests var key; for ( key in xhrCallbacks ) { xhrCallbacks[ key ]( undefined, true ); } }; // Functions to create xhrs function createStandardXHR() { try { return new window.XMLHttpRequest(); } catch( e ) {} } function createActiveXHR() { try { return new window.ActiveXObject("Microsoft.XMLHTTP"); } catch( e ) {} } // Create the request object // (This is still attached to ajaxSettings for backward compatibility) jQuery.ajaxSettings.xhr = window.ActiveXObject ? /* Microsoft failed to properly * implement the XMLHttpRequest in IE7 (can't request local files), * so we use the ActiveXObject when it is available * Additionally XMLHttpRequest can be disabled in IE7/IE8 so * we need a fallback. */ function() { return !this.isLocal && createStandardXHR() || createActiveXHR(); } : // For all other browsers, use the standard XMLHttpRequest object createStandardXHR; // Determine support properties xhrSupported = jQuery.ajaxSettings.xhr(); jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); xhrSupported = jQuery.support.ajax = !!xhrSupported; // Create transport if the browser can provide an xhr if ( xhrSupported ) { jQuery.ajaxTransport(function( s ) { // Cross domain only allowed if supported through XMLHttpRequest if ( !s.crossDomain || jQuery.support.cors ) { var callback; return { send: function( headers, complete ) { // Get a new xhr var handle, i, xhr = s.xhr(); // Open the socket // Passing null username, generates a login popup on Opera (#2865) if ( s.username ) { xhr.open( s.type, s.url, s.async, s.username, s.password ); } else { xhr.open( s.type, s.url, s.async ); } // Apply custom fields if provided if ( s.xhrFields ) { for ( i in s.xhrFields ) { xhr[ i ] = s.xhrFields[ i ]; } } // Override mime type if needed if ( s.mimeType && xhr.overrideMimeType ) { xhr.overrideMimeType( s.mimeType ); } // X-Requested-With header // For cross-domain requests, seeing as conditions for a preflight are // akin to a jigsaw puzzle, we simply never set it to be sure. // (it can always be set on a per-request basis or even using ajaxSetup) // For same-domain requests, won't change header if already provided. if ( !s.crossDomain && !headers["X-Requested-With"] ) { headers["X-Requested-With"] = "XMLHttpRequest"; } // Need an extra try/catch for cross domain requests in Firefox 3 try { for ( i in headers ) { xhr.setRequestHeader( i, headers[ i ] ); } } catch( err ) {} // Do send the request // This may raise an exception which is actually // handled in jQuery.ajax (so no try/catch here) xhr.send( ( s.hasContent && s.data ) || null ); // Listener callback = function( _, isAbort ) { var status, statusText, responseHeaders, responses, xml; // Firefox throws exceptions when accessing properties // of an xhr when a network error occurred // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) try { // Was never called and is aborted or complete if ( callback && ( isAbort || xhr.readyState === 4 ) ) { // Only called once callback = undefined; // Do not keep as active anymore if ( handle ) { xhr.onreadystatechange = jQuery.noop; if ( xhrOnUnloadAbort ) { delete xhrCallbacks[ handle ]; } } // If it's an abort if ( isAbort ) { // Abort it manually if needed if ( xhr.readyState !== 4 ) { xhr.abort(); } } else { responses = {}; status = xhr.status; xml = xhr.responseXML; responseHeaders = xhr.getAllResponseHeaders(); // Construct response list if ( xml && xml.documentElement /* #4958 */ ) { responses.xml = xml; } // When requesting binary data, IE6-9 will throw an exception // on any attempt to access responseText (#11426) if ( typeof xhr.responseText === "string" ) { responses.text = xhr.responseText; } // Firefox throws an exception when accessing // statusText for faulty cross-domain requests try { statusText = xhr.statusText; } catch( e ) { // We normalize with Webkit giving an empty statusText statusText = ""; } // Filter status for non standard behaviors // If the request is local and we have data: assume a success // (success with no data won't get notified, that's the best we // can do given current implementations) if ( !status && s.isLocal && !s.crossDomain ) { status = responses.text ? 200 : 404; // IE - #1450: sometimes returns 1223 when it should be 204 } else if ( status === 1223 ) { status = 204; } } } } catch( firefoxAccessException ) { if ( !isAbort ) { complete( -1, firefoxAccessException ); } } // Call complete if needed if ( responses ) { complete( status, statusText, responses, responseHeaders ); } }; if ( !s.async ) { // if we're in sync mode we fire the callback callback(); } else if ( xhr.readyState === 4 ) { // (IE6 & IE7) if it's in cache and has been // retrieved directly we need to fire the callback setTimeout( callback ); } else { handle = ++xhrId; if ( xhrOnUnloadAbort ) { // Create the active xhrs callbacks list if needed // and attach the unload handler if ( !xhrCallbacks ) { xhrCallbacks = {}; jQuery( window ).unload( xhrOnUnloadAbort ); } // Add to list of active xhrs callbacks xhrCallbacks[ handle ] = callback; } xhr.onreadystatechange = callback; } }, abort: function() { if ( callback ) { callback( undefined, true ); } } }; } }); } var fxNow, timerId, rfxtypes = /^(?:toggle|show|hide)$/, rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), rrun = /queueHooks$/, animationPrefilters = [ defaultPrefilter ], tweeners = { "*": [function( prop, value ) { var end, unit, tween = this.createTween( prop, value ), parts = rfxnum.exec( value ), target = tween.cur(), start = +target || 0, scale = 1, maxIterations = 20; if ( parts ) { end = +parts[2]; unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" ); // We need to compute starting value if ( unit !== "px" && start ) { // Iteratively approximate from a nonzero starting point // Prefer the current property, because this process will be trivial if it uses the same units // Fallback to end or a simple constant start = jQuery.css( tween.elem, prop, true ) || end || 1; do { // If previous iteration zeroed out, double until we get *something* // Use a string for doubling factor so we don't accidentally see scale as unchanged below scale = scale || ".5"; // Adjust and apply start = start / scale; jQuery.style( tween.elem, prop, start + unit ); // Update scale, tolerating zero or NaN from tween.cur() // And breaking the loop if scale is unchanged or perfect, or if we've just had enough } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); } tween.unit = unit; tween.start = start; // If a +=/-= token was provided, we're doing a relative animation tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end; } return tween; }] }; // Animations created synchronously will run synchronously function createFxNow() { setTimeout(function() { fxNow = undefined; }); return ( fxNow = jQuery.now() ); } function createTweens( animation, props ) { jQuery.each( props, function( prop, value ) { var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), index = 0, length = collection.length; for ( ; index < length; index++ ) { if ( collection[ index ].call( animation, prop, value ) ) { // we're done with this property return; } } }); } function Animation( elem, properties, options ) { var result, stopped, index = 0, length = animationPrefilters.length, deferred = jQuery.Deferred().always( function() { // don't match elem in the :animated selector delete tick.elem; }), tick = function() { if ( stopped ) { return false; } var currentTime = fxNow || createFxNow(), remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497) temp = remaining / animation.duration || 0, percent = 1 - temp, index = 0, length = animation.tweens.length; for ( ; index < length ; index++ ) { animation.tweens[ index ].run( percent ); } deferred.notifyWith( elem, [ animation, percent, remaining ]); if ( percent < 1 && length ) { return remaining; } else { deferred.resolveWith( elem, [ animation ] ); return false; } }, animation = deferred.promise({ elem: elem, props: jQuery.extend( {}, properties ), opts: jQuery.extend( true, { specialEasing: {} }, options ), originalProperties: properties, originalOptions: options, startTime: fxNow || createFxNow(), duration: options.duration, tweens: [], createTween: function( prop, end ) { var tween = jQuery.Tween( elem, animation.opts, prop, end, animation.opts.specialEasing[ prop ] || animation.opts.easing ); animation.tweens.push( tween ); return tween; }, stop: function( gotoEnd ) { var index = 0, // if we are going to the end, we want to run all the tweens // otherwise we skip this part length = gotoEnd ? animation.tweens.length : 0; if ( stopped ) { return this; } stopped = true; for ( ; index < length ; index++ ) { animation.tweens[ index ].run( 1 ); } // resolve when we played the last frame // otherwise, reject if ( gotoEnd ) { deferred.resolveWith( elem, [ animation, gotoEnd ] ); } else { deferred.rejectWith( elem, [ animation, gotoEnd ] ); } return this; } }), props = animation.props; propFilter( props, animation.opts.specialEasing ); for ( ; index < length ; index++ ) { result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); if ( result ) { return result; } } createTweens( animation, props ); if ( jQuery.isFunction( animation.opts.start ) ) { animation.opts.start.call( elem, animation ); } jQuery.fx.timer( jQuery.extend( tick, { elem: elem, anim: animation, queue: animation.opts.queue }) ); // attach callbacks from options return animation.progress( animation.opts.progress ) .done( animation.opts.done, animation.opts.complete ) .fail( animation.opts.fail ) .always( animation.opts.always ); } function propFilter( props, specialEasing ) { var index, name, easing, value, hooks; // camelCase, specialEasing and expand cssHook pass for ( index in props ) { name = jQuery.camelCase( index ); easing = specialEasing[ name ]; value = props[ index ]; if ( jQuery.isArray( value ) ) { easing = value[ 1 ]; value = props[ index ] = value[ 0 ]; } if ( index !== name ) { props[ name ] = value; delete props[ index ]; } hooks = jQuery.cssHooks[ name ]; if ( hooks && "expand" in hooks ) { value = hooks.expand( value ); delete props[ name ]; // not quite $.extend, this wont overwrite keys already present. // also - reusing 'index' from above because we have the correct "name" for ( index in value ) { if ( !( index in props ) ) { props[ index ] = value[ index ]; specialEasing[ index ] = easing; } } } else { specialEasing[ name ] = easing; } } } jQuery.Animation = jQuery.extend( Animation, { tweener: function( props, callback ) { if ( jQuery.isFunction( props ) ) { callback = props; props = [ "*" ]; } else { props = props.split(" "); } var prop, index = 0, length = props.length; for ( ; index < length ; index++ ) { prop = props[ index ]; tweeners[ prop ] = tweeners[ prop ] || []; tweeners[ prop ].unshift( callback ); } }, prefilter: function( callback, prepend ) { if ( prepend ) { animationPrefilters.unshift( callback ); } else { animationPrefilters.push( callback ); } } }); function defaultPrefilter( elem, props, opts ) { /*jshint validthis:true */ var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire, anim = this, style = elem.style, orig = {}, handled = [], hidden = elem.nodeType && isHidden( elem ); // handle queue: false promises if ( !opts.queue ) { hooks = jQuery._queueHooks( elem, "fx" ); if ( hooks.unqueued == null ) { hooks.unqueued = 0; oldfire = hooks.empty.fire; hooks.empty.fire = function() { if ( !hooks.unqueued ) { oldfire(); } }; } hooks.unqueued++; anim.always(function() { // doing this makes sure that the complete handler will be called // before this completes anim.always(function() { hooks.unqueued--; if ( !jQuery.queue( elem, "fx" ).length ) { hooks.empty.fire(); } }); }); } // height/width overflow pass if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { // Make sure that nothing sneaks out // Record all 3 overflow attributes because IE does not // change the overflow attribute when overflowX and // overflowY are set to the same value opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; // Set display property to inline-block for height/width // animations on inline elements that are having width/height animated if ( jQuery.css( elem, "display" ) === "inline" && jQuery.css( elem, "float" ) === "none" ) { // inline-level elements accept inline-block; // block-level elements need to be inline with layout if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { style.display = "inline-block"; } else { style.zoom = 1; } } } if ( opts.overflow ) { style.overflow = "hidden"; if ( !jQuery.support.shrinkWrapBlocks ) { anim.done(function() { style.overflow = opts.overflow[ 0 ]; style.overflowX = opts.overflow[ 1 ]; style.overflowY = opts.overflow[ 2 ]; }); } } // show/hide pass for ( index in props ) { value = props[ index ]; if ( rfxtypes.exec( value ) ) { delete props[ index ]; toggle = toggle || value === "toggle"; if ( value === ( hidden ? "hide" : "show" ) ) { continue; } handled.push( index ); } } length = handled.length; if ( length ) { dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} ); if ( "hidden" in dataShow ) { hidden = dataShow.hidden; } // store state if its toggle - enables .stop().toggle() to "reverse" if ( toggle ) { dataShow.hidden = !hidden; } if ( hidden ) { jQuery( elem ).show(); } else { anim.done(function() { jQuery( elem ).hide(); }); } anim.done(function() { var prop; jQuery._removeData( elem, "fxshow" ); for ( prop in orig ) { jQuery.style( elem, prop, orig[ prop ] ); } }); for ( index = 0 ; index < length ; index++ ) { prop = handled[ index ]; tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 ); orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop ); if ( !( prop in dataShow ) ) { dataShow[ prop ] = tween.start; if ( hidden ) { tween.end = tween.start; tween.start = prop === "width" || prop === "height" ? 1 : 0; } } } } } function Tween( elem, options, prop, end, easing ) { return new Tween.prototype.init( elem, options, prop, end, easing ); } jQuery.Tween = Tween; Tween.prototype = { constructor: Tween, init: function( elem, options, prop, end, easing, unit ) { this.elem = elem; this.prop = prop; this.easing = easing || "swing"; this.options = options; this.start = this.now = this.cur(); this.end = end; this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); }, cur: function() { var hooks = Tween.propHooks[ this.prop ]; return hooks && hooks.get ? hooks.get( this ) : Tween.propHooks._default.get( this ); }, run: function( percent ) { var eased, hooks = Tween.propHooks[ this.prop ]; if ( this.options.duration ) { this.pos = eased = jQuery.easing[ this.easing ]( percent, this.options.duration * percent, 0, 1, this.options.duration ); } else { this.pos = eased = percent; } this.now = ( this.end - this.start ) * eased + this.start; if ( this.options.step ) { this.options.step.call( this.elem, this.now, this ); } if ( hooks && hooks.set ) { hooks.set( this ); } else { Tween.propHooks._default.set( this ); } return this; } }; Tween.prototype.init.prototype = Tween.prototype; Tween.propHooks = { _default: { get: function( tween ) { var result; if ( tween.elem[ tween.prop ] != null && (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { return tween.elem[ tween.prop ]; } // passing a non empty string as a 3rd parameter to .css will automatically // attempt a parseFloat and fallback to a string if the parse fails // so, simple values such as "10px" are parsed to Float. // complex values such as "rotate(1rad)" are returned as is. result = jQuery.css( tween.elem, tween.prop, "auto" ); // Empty strings, null, undefined and "auto" are converted to 0. return !result || result === "auto" ? 0 : result; }, set: function( tween ) { // use step hook for back compat - use cssHook if its there - use .style if its // available and use plain properties where available if ( jQuery.fx.step[ tween.prop ] ) { jQuery.fx.step[ tween.prop ]( tween ); } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); } else { tween.elem[ tween.prop ] = tween.now; } } } }; // Remove in 2.0 - this supports IE8's panic based approach // to setting things on disconnected nodes Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { set: function( tween ) { if ( tween.elem.nodeType && tween.elem.parentNode ) { tween.elem[ tween.prop ] = tween.now; } } }; jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { var cssFn = jQuery.fn[ name ]; jQuery.fn[ name ] = function( speed, easing, callback ) { return speed == null || typeof speed === "boolean" ? cssFn.apply( this, arguments ) : this.animate( genFx( name, true ), speed, easing, callback ); }; }); jQuery.fn.extend({ fadeTo: function( speed, to, easing, callback ) { // show any hidden elements after setting opacity to 0 return this.filter( isHidden ).css( "opacity", 0 ).show() // animate to the value specified .end().animate({ opacity: to }, speed, easing, callback ); }, animate: function( prop, speed, easing, callback ) { var empty = jQuery.isEmptyObject( prop ), optall = jQuery.speed( speed, easing, callback ), doAnimation = function() { // Operate on a copy of prop so per-property easing won't be lost var anim = Animation( this, jQuery.extend( {}, prop ), optall ); doAnimation.finish = function() { anim.stop( true ); }; // Empty animations, or finishing resolves immediately if ( empty || jQuery._data( this, "finish" ) ) { anim.stop( true ); } }; doAnimation.finish = doAnimation; return empty || optall.queue === false ? this.each( doAnimation ) : this.queue( optall.queue, doAnimation ); }, stop: function( type, clearQueue, gotoEnd ) { var stopQueue = function( hooks ) { var stop = hooks.stop; delete hooks.stop; stop( gotoEnd ); }; if ( typeof type !== "string" ) { gotoEnd = clearQueue; clearQueue = type; type = undefined; } if ( clearQueue && type !== false ) { this.queue( type || "fx", [] ); } return this.each(function() { var dequeue = true, index = type != null && type + "queueHooks", timers = jQuery.timers, data = jQuery._data( this ); if ( index ) { if ( data[ index ] && data[ index ].stop ) { stopQueue( data[ index ] ); } } else { for ( index in data ) { if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { stopQueue( data[ index ] ); } } } for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { timers[ index ].anim.stop( gotoEnd ); dequeue = false; timers.splice( index, 1 ); } } // start the next in the queue if the last step wasn't forced // timers currently will call their complete callbacks, which will dequeue // but only if they were gotoEnd if ( dequeue || !gotoEnd ) { jQuery.dequeue( this, type ); } }); }, finish: function( type ) { if ( type !== false ) { type = type || "fx"; } return this.each(function() { var index, data = jQuery._data( this ), queue = data[ type + "queue" ], hooks = data[ type + "queueHooks" ], timers = jQuery.timers, length = queue ? queue.length : 0; // enable finishing flag on private data data.finish = true; // empty the queue first jQuery.queue( this, type, [] ); if ( hooks && hooks.cur && hooks.cur.finish ) { hooks.cur.finish.call( this ); } // look for any active animations, and finish them for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && timers[ index ].queue === type ) { timers[ index ].anim.stop( true ); timers.splice( index, 1 ); } } // look for any animations in the old queue and finish them for ( index = 0; index < length; index++ ) { if ( queue[ index ] && queue[ index ].finish ) { queue[ index ].finish.call( this ); } } // turn off finishing flag delete data.finish; }); } }); // Generate parameters to create a standard animation function genFx( type, includeWidth ) { var which, attrs = { height: type }, i = 0; // if we include width, step value is 1 to do all cssExpand values, // if we don't include width, step value is 2 to skip over Left and Right includeWidth = includeWidth? 1 : 0; for( ; i < 4 ; i += 2 - includeWidth ) { which = cssExpand[ i ]; attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; } if ( includeWidth ) { attrs.opacity = attrs.width = type; } return attrs; } // Generate shortcuts for custom animations jQuery.each({ slideDown: genFx("show"), slideUp: genFx("hide"), slideToggle: genFx("toggle"), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function( name, props ) { jQuery.fn[ name ] = function( speed, easing, callback ) { return this.animate( props, speed, easing, callback ); }; }); jQuery.speed = function( speed, easing, fn ) { var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { complete: fn || !fn && easing || jQuery.isFunction( speed ) && speed, duration: speed, easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing }; opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; // normalize opt.queue - true/undefined/null -> "fx" if ( opt.queue == null || opt.queue === true ) { opt.queue = "fx"; } // Queueing opt.old = opt.complete; opt.complete = function() { if ( jQuery.isFunction( opt.old ) ) { opt.old.call( this ); } if ( opt.queue ) { jQuery.dequeue( this, opt.queue ); } }; return opt; }; jQuery.easing = { linear: function( p ) { return p; }, swing: function( p ) { return 0.5 - Math.cos( p*Math.PI ) / 2; } }; jQuery.timers = []; jQuery.fx = Tween.prototype.init; jQuery.fx.tick = function() { var timer, timers = jQuery.timers, i = 0; fxNow = jQuery.now(); for ( ; i < timers.length; i++ ) { timer = timers[ i ]; // Checks the timer has not already been removed if ( !timer() && timers[ i ] === timer ) { timers.splice( i--, 1 ); } } if ( !timers.length ) { jQuery.fx.stop(); } fxNow = undefined; }; jQuery.fx.timer = function( timer ) { if ( timer() && jQuery.timers.push( timer ) ) { jQuery.fx.start(); } }; jQuery.fx.interval = 13; jQuery.fx.start = function() { if ( !timerId ) { timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); } }; jQuery.fx.stop = function() { clearInterval( timerId ); timerId = null; }; jQuery.fx.speeds = { slow: 600, fast: 200, // Default speed _default: 400 }; // Back Compat <1.8 extension point jQuery.fx.step = {}; if ( jQuery.expr && jQuery.expr.filters ) { jQuery.expr.filters.animated = function( elem ) { return jQuery.grep(jQuery.timers, function( fn ) { return elem === fn.elem; }).length; }; } jQuery.fn.offset = function( options ) { if ( arguments.length ) { return options === undefined ? this : this.each(function( i ) { jQuery.offset.setOffset( this, options, i ); }); } var docElem, win, box = { top: 0, left: 0 }, elem = this[ 0 ], doc = elem && elem.ownerDocument; if ( !doc ) { return; } docElem = doc.documentElement; // Make sure it's not a disconnected DOM node if ( !jQuery.contains( docElem, elem ) ) { return box; } // If we don't have gBCR, just use 0,0 rather than error // BlackBerry 5, iOS 3 (original iPhone) if ( typeof elem.getBoundingClientRect !== "undefined" ) { box = elem.getBoundingClientRect(); } win = getWindow( doc ); return { top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ), left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 ) }; }; jQuery.offset = { setOffset: function( elem, options, i ) { var position = jQuery.css( elem, "position" ); // set position first, in-case top/left are set even on static elem if ( position === "static" ) { elem.style.position = "relative"; } var curElem = jQuery( elem ), curOffset = curElem.offset(), curCSSTop = jQuery.css( elem, "top" ), curCSSLeft = jQuery.css( elem, "left" ), calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, props = {}, curPosition = {}, curTop, curLeft; // need to be able to calculate position if either top or left is auto and position is either absolute or fixed if ( calculatePosition ) { curPosition = curElem.position(); curTop = curPosition.top; curLeft = curPosition.left; } else { curTop = parseFloat( curCSSTop ) || 0; curLeft = parseFloat( curCSSLeft ) || 0; } if ( jQuery.isFunction( options ) ) { options = options.call( elem, i, curOffset ); } if ( options.top != null ) { props.top = ( options.top - curOffset.top ) + curTop; } if ( options.left != null ) { props.left = ( options.left - curOffset.left ) + curLeft; } if ( "using" in options ) { options.using.call( elem, props ); } else { curElem.css( props ); } } }; jQuery.fn.extend({ position: function() { if ( !this[ 0 ] ) { return; } var offsetParent, offset, parentOffset = { top: 0, left: 0 }, elem = this[ 0 ]; // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent if ( jQuery.css( elem, "position" ) === "fixed" ) { // we assume that getBoundingClientRect is available when computed position is fixed offset = elem.getBoundingClientRect(); } else { // Get *real* offsetParent offsetParent = this.offsetParent(); // Get correct offsets offset = this.offset(); if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) { parentOffset = offsetParent.offset(); } // Add offsetParent borders parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ); parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ); } // Subtract parent offsets and element margins // note: when an element has margin: auto the offsetLeft and marginLeft // are the same in Safari causing offset.left to incorrectly be 0 return { top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true) }; }, offsetParent: function() { return this.map(function() { var offsetParent = this.offsetParent || document.documentElement; while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) { offsetParent = offsetParent.offsetParent; } return offsetParent || document.documentElement; }); } }); // Create scrollLeft and scrollTop methods jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { var top = /Y/.test( prop ); jQuery.fn[ method ] = function( val ) { return jQuery.access( this, function( elem, method, val ) { var win = getWindow( elem ); if ( val === undefined ) { return win ? (prop in win) ? win[ prop ] : win.document.documentElement[ method ] : elem[ method ]; } if ( win ) { win.scrollTo( !top ? val : jQuery( win ).scrollLeft(), top ? val : jQuery( win ).scrollTop() ); } else { elem[ method ] = val; } }, method, val, arguments.length, null ); }; }); function getWindow( elem ) { return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 ? elem.defaultView || elem.parentWindow : false; } // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { // margin is only for outerHeight, outerWidth jQuery.fn[ funcName ] = function( margin, value ) { var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); return jQuery.access( this, function( elem, type, value ) { var doc; if ( jQuery.isWindow( elem ) ) { // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there // isn't a whole lot we can do. See pull request at this URL for discussion: // https://github.com/jquery/jquery/pull/764 return elem.document.documentElement[ "client" + name ]; } // Get document width or height if ( elem.nodeType === 9 ) { doc = elem.documentElement; // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. return Math.max( elem.body[ "scroll" + name ], doc[ "scroll" + name ], elem.body[ "offset" + name ], doc[ "offset" + name ], doc[ "client" + name ] ); } return value === undefined ? // Get width or height on the element, requesting but not forcing parseFloat jQuery.css( elem, type, extra ) : // Set width or height on the element jQuery.style( elem, type, value, extra ); }, type, chainable ? margin : undefined, chainable, null ); }; }); }); // Limit scope pollution from any deprecated API // (function() { // })(); // Expose jQuery to the global object window.jQuery = window.$ = jQuery; // Expose jQuery as an AMD module, but only for AMD loaders that // understand the issues with loading multiple versions of jQuery // in a page that all might call define(). The loader will indicate // they have special allowances for multiple jQuery versions by // specifying define.amd.jQuery = true. Register as a named module, // since jQuery can be concatenated with other files that may use define, // but not use a proper concatenation script that understands anonymous // AMD modules. A named AMD is safest and most robust way to register. // Lowercase jquery is used because AMD module names are derived from // file names, and jQuery is normally delivered in a lowercase file name. // Do this after creating the global so that if an AMD module wants to call // noConflict to hide this version of jQuery, it will work. if ( typeof define === "function" && define.amd && define.amd.jQuery ) { define( "jquery", [], function () { return jQuery; } ); } })( window );
client/containers/Signup/Signup.js
joshjg/explore
import React from 'react'; import { connect } from 'react-redux'; import Dialog from 'material-ui/Dialog'; import FlatButton from 'material-ui/FlatButton'; import TextField from 'material-ui/TextField'; import { toggleActive } from '../App/actions'; import { signupRequest, setSignupField } from './actions'; const Signup = props => ( <Dialog open title="Sign up to manage your location" autoScrollBodyContent actions={[ <FlatButton label="Cancel" primary onTouchTap={props.toggleActive} />, <FlatButton label="Submit" primary onTouchTap={() => ( (!props.email || props.email.search(/@/) < 1 // loosely enforce 'valid' address || !props.password || props.password.length < 8 // enforce min length of 8 || props.password !== props.passwordAgain ) ? props.handleChange('missingField', true) : props.handleSubmit(props.email, props.password) )} />, ]} > <small style={{ color: '#C00' }}>{props.error}</small> <TextField value={props.email || ''} onChange={e => props.handleChange('email', e.target.value.trim())} floatingLabelText="Email address" type="email" style={{ display: 'block' }} errorText={(props.missingField && (!props.email || props.email.search(/@/) < 1)) ? 'Valid email address required' : null } /> <TextField value={props.password || ''} onChange={e => props.handleChange('password', e.target.value.trim())} floatingLabelText="Password" type="password" style={{ display: 'block' }} errorText={(props.missingField && (!props.password || props.password.length < 8)) ? 'At least 8 characters required' : null } /> <TextField value={props.passwordAgain || ''} onChange={e => props.handleChange('passwordAgain', e.target.value.trim())} floatingLabelText="Re-enter password" type="password" style={{ display: 'block' }} errorText={(props.missingField && (props.password !== props.passwordAgain)) ? 'Password must match' : null } /> </Dialog> ); Signup.propTypes = { email: React.PropTypes.string, password: React.PropTypes.string, passwordAgain: React.PropTypes.string, missingField: React.PropTypes.bool, error: React.PropTypes.string, // submission errors toggleActive: React.PropTypes.func, handleChange: React.PropTypes.func, handleSubmit: React.PropTypes.func, }; const mapStateToProps = state => ({ email: state.signup.email, password: state.signup.password, passwordAgain: state.signup.passwordAgain, missingField: state.signup.missingField, error: state.signup.error, }); const mapDispatchToProps = dispatch => ({ toggleActive: () => dispatch(toggleActive('signup')), handleChange: (field, value) => dispatch(setSignupField(field, value)), handleSubmit: (email, password) => dispatch(signupRequest(email, password)), }); export default connect( mapStateToProps, mapDispatchToProps )(Signup);
example/listView.js
lipingruan/react-native-refreshable-useful
'use strict'; import React, { Component } from 'react'; import { View, Text, Image, StyleSheet, TouchableOpacity, AppRegistry } from 'react-native'; import { ListView, GotoTopCreator } from 'react-native-refreshable-useful'; const ListViewWithScrollController = GotoTopCreator ( ListView ); export default class Main extends Component { constructor ( props ) { super ( props ); this.pageSize = 10; } componentDidMount() { this.refs.listView.onRefresh ( ); } onRefresh ( fn, params ) { this.getItems ( fn, 1 ) } getItems ( fn, page ) { let list = []; let currLayer = ( page - 1 ) * this.pageSize + 1; let loadLayer = currLayer + this.pageSize; if ( loadLayer > 999 ) loadLayer -= 1; // hasMore = false for (; currLayer < loadLayer; currLayer++) { list.push({num: Math.random(), layer: currLayer}); } fn && setTimeout(()=>{ fn ( list ) }, 500); return list; } onLoadMore ( fn, page ) { this.getItems ( fn, page ) } renderRow ( { item, index } ) { return <Row data={ item }/> } renderGotoTop ( ) { let props = { props: { hideStyle: { bottom: -100 }, showStyle: { bottom: 40 } } }; /* more info: please read source(listView.js: _renderGotoTop) */ return props; } renderFooter ( ) { let props = { style: { height: 44 } }; /* if listView props[dftFooter] equals false, you could do (return <View/>) */ return props; } onScroll(evt) { } onEndReached ( ) { /* just onEndReached */ } render() { return ( <View style={S.container}> <View style={S.titleBar}><Text style={S.titleText}>Hello World!</Text></View> <ListViewWithScrollController ref="listView" debug={true} /* (optional) debug mode [ test only ] */ data={ this.getItems ( null, 1 ) } /* (optional) init list */ pageSize={ 10 } dftFooter /* (optional) use default loadMore component */ onScroll={this.onScroll.bind(this)} /* (optional) */ onRefresh={this.onRefresh.bind(this)} /* (optional) refresh data */ ItemSeparatorComponent={ ItemSeparator } /* (optional) ... */ renderRow={this.renderRow.bind(this)} /* (required) ... */ renderHeader={ ()=><Header ref="header"/> } /* (optional) ... */ renderFooter={this.renderFooter.bind(this)} /* (optional) footer component / loadMore options */ renderGotoTop={this.renderGotoTop.bind(this)} /* (optional) scrollTo(y:0) controller */ onLoadMore={ this.onLoadMore.bind ( this ) } /* (optional) onEndReached & hasMore */ /* ...any FlatList props */ /* more info and option: please view source :) */ /> </View> ) } } class Header extends React.PureComponent { render ( ) { return <View> <Text>header</Text> </View> } } class ItemSeparator extends React.PureComponent { render ( ) { return ( <View style={S.separator}/> ) } } class Row extends React.PureComponent { render() { const { data: { num, layer } } = this.props; return ( <View style={S.row}> <View style={{flex: 1}}> <Text>{"layer" + layer}</Text> <Text style={S.rowDesc}>{num}</Text> </View> </View> ) } } const S = StyleSheet.create({ container: { flex: 1, backgroundColor: '#EEE' }, titleBar: { height: 64, paddingTop: 20, alignItems: 'center', justifyContent: 'center', backgroundColor: '#333', borderBottomColor: '#000', borderBottomWidth: StyleSheet.hairlineWidth }, titleText: { color: '#EEE' }, separator: { height: StyleSheet.hairlineWidth, backgroundColor: '#DDD' }, row: { alignItems: 'center', backgroundColor: 'white', flexDirection: 'row', padding: 6 }, rowChecked: { backgroundColor: '#666' }, rowCheckedTitle: { color: '#EEE' }, rowDesc: { marginTop: 12, fontSize: 12, color: '#888' }, cloudIcon: { width: 40, height: 40, resizeMode: 'contain' } })
packages/wix-style-react/src/PageFooter/test/PageFooter.spec.js
wix/wix-style-react
import React from 'react'; import { createRendererWithUniDriver, cleanup } from '../../../test/utils/unit'; import PageFooter from '../PageFooter'; import { pageFooterPrivateDriverFactory } from './PageFooter.private.uni.driver'; describe(PageFooter.displayName, () => { const render = createRendererWithUniDriver(pageFooterPrivateDriverFactory); afterEach(cleanup); it('should render', async () => { const { driver } = render(<PageFooter />); expect(await driver.exists()).toBe(true); }); });
ajax/libs/rxjs/2.2.24/rx.js
wormful/cdnjs
// 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 // Detect if promise exists }, helpers: { } }; // Defaults var noop = Rx.helpers.noop = function () { }, identity = Rx.helpers.identity = function (x) { return x; }, 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' && p.then !== Rx.Observable.prototype.then; }, asArray = Rx.helpers.asArray = function () { return Array.prototype.slice.call(arguments); }, not = Rx.helpers.not = function (a) { return !a; }; // Errors var sequenceContainsNoElements = 'Sequence contains no elements.'; var argumentOutOfRange = 'Argument out of range'; var objectDisposed = 'Object has been disposed'; function checkDisposed() { if (this.isDisposed) { throw new Error(objectDisposed); } } // Shim in iterator support var $iterator$ = (typeof Symbol === 'object' && Symbol.iterator) || '_es6shim_iterator_'; // Firefox ships a partial implementation using the name @@iterator. // https://bugzilla.mozilla.org/show_bug.cgi?id=907077#c14 // So use that name if we detect it. if (root.Set && typeof new root.Set()['@@iterator'] === 'function') { $iterator$ = '@@iterator'; } var doneEnumerator = { done: true, value: undefined }; /** `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 suportNodeClass, errorProto = Error.prototype, objectProto = Object.prototype, propertyIsEnumerable = objectProto.propertyIsEnumerable; try { suportNodeClass = !(toString.call(document) == objectClass && !({ 'toString': 0 } + '')); } catch(e) { suportNodeClass = true; } var shadowedProps = [ 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf' ]; 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)); function isObject(value) { // check if the value is the ECMAScript language type of Object // http://es5.github.io/#x8 // and avoid a V8 bug // https://code.google.com/p/v8/issues/detail?id=2291 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 = shadowedProps.length; if (object === (ctor && ctor.prototype)) { var className = object === stringProto ? stringClass : object === errorProto ? errorClass : toString.call(object), nonEnum = nonEnumProps[className]; } while (++index < length) { key = shadowedProps[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'; } function isArguments(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; }; } function isFunction(value) { return typeof value == 'function'; } // fallback for older versions of Chrome and Safari if (isFunction(/x/)) { isFunction = function(value) { return typeof value == 'function' && toString.call(value) == funcClass; }; } 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; 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 slice = Array.prototype.slice; function argsOrArray(args, idx) { return args.length === 1 && Array.isArray(args[idx]) ? args[idx] : slice.call(args); } var hasProp = {}.hasOwnProperty; /** @private */ var inherits = this.inherits = Rx.internals.inherits = function (child, parent) { function __() { this.constructor = child; } __.prototype = parent.prototype; child.prototype = new __(); }; /** @private */ var addProperties = Rx.internals.addProperties = function (obj) { var sources = slice.call(arguments, 1); for (var i = 0, len = sources.length; i < len; i++) { var source = sources[i]; 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)); }); }; // Collection polyfills function arrayInitialize(count, factory) { var a = new Array(count); for (var i = 0; i < count; i++) { a[i] = factory(); } return a; } // Collections var IndexedItem = function (id, value) { this.id = id; this.value = value; }; IndexedItem.prototype.compareTo = function (other) { var c = this.value.compareTo(other.value); if (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) { if (index === undefined) { 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]; delete this.items[this.length]; 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 () { this.disposables = argsOrArray(arguments, 0); this.isDisposed = false; this.length = this.disposables.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 currentDisposables = this.disposables.slice(0); this.disposables = []; this.length = 0; for (var i = 0, len = currentDisposables.length; i < len; i++) { currentDisposables[i].dispose(); } } }; /** * Removes and disposes all disposables from the CompositeDisposable, but does not dispose the CompositeDisposable. */ CompositeDisposablePrototype.clear = function () { var currentDisposables = this.disposables.slice(0); this.disposables = []; this.length = 0; for (var i = 0, len = currentDisposables.length; i < len; i++) { currentDisposables[i].dispose(); } }; /** * Determines whether the CompositeDisposable contains a specific disposable. * @param {Mixed} item Disposable to search for. * @returns {Boolean} true if the disposable was found; otherwise, false. */ CompositeDisposablePrototype.contains = function (item) { return this.disposables.indexOf(item) !== -1; }; /** * Converts the existing CompositeDisposable to an array of disposables * @returns {Array} An array of disposable objects. */ CompositeDisposablePrototype.toArray = function () { return this.disposables.slice(0); }; /** * Provides a set of static methods for creating Disposables. * * @constructor * @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 }; var BooleanDisposable = (function () { function BooleanDisposable (isSingle) { this.isSingle = isSingle; this.isDisposed = false; this.current = null; } var booleanDisposablePrototype = BooleanDisposable.prototype; /** * Gets the underlying disposable. * @return The underlying disposable. */ booleanDisposablePrototype.getDisposable = function () { return this.current; }; /** * Sets the underlying disposable. * @param {Disposable} value The new underlying disposable. */ booleanDisposablePrototype.setDisposable = function (value) { if (this.current && this.isSingle) { throw new Error('Disposable has already been assigned'); } var shouldDispose = this.isDisposed, old; if (!shouldDispose) { old = this.current; this.current = value; } if (old) { old.dispose(); } if (shouldDispose && value) { value.dispose(); } }; /** * Disposes the underlying disposable as well as all future replacements. */ booleanDisposablePrototype.dispose = function () { var old; if (!this.isDisposed) { this.isDisposed = true; old = this.current; this.current = null; } if (old) { old.dispose(); } }; return BooleanDisposable; }()); /** * Represents a disposable resource which only allows a single assignment of its underlying disposable resource. * If an underlying disposable resource has already been set, future attempts to set the underlying disposable resource will throw an Error. */ var SingleAssignmentDisposable = Rx.SingleAssignmentDisposable = (function (super_) { inherits(SingleAssignmentDisposable, super_); function SingleAssignmentDisposable() { super_.call(this, true); } return SingleAssignmentDisposable; }(BooleanDisposable)); /** * Represents a disposable resource whose underlying disposable resource can be replaced by another disposable resource, causing automatic disposal of the previous underlying disposable resource. */ var SerialDisposable = Rx.SerialDisposable = (function (super_) { inherits(SerialDisposable, super_); function SerialDisposable() { super_.call(this, false); } return SerialDisposable; }(BooleanDisposable)); /** * 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) { if (!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) { if (!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; })(); function ScheduledDisposable(scheduler, disposable) { this.scheduler = scheduler; this.disposable = disposable; this.isDisposed = false; } ScheduledDisposable.prototype.dispose = function () { var parent = this; this.scheduler.schedule(function () { if (!parent.isDisposed) { parent.isDisposed = true; parent.disposable.dispose(); } }); }; 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 () { /** * @constructor * @private */ function Scheduler(now, schedule, scheduleRelative, scheduleAbsolute) { this.now = now; this._schedule = schedule; this._scheduleRelative = scheduleRelative; this._scheduleAbsolute = scheduleAbsolute; } function invokeRecImmediate(scheduler, pair) { var state = pair.first, action = pair.second, group = new CompositeDisposable(), recursiveAction = function (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.first, action = pair.second, group = new CompositeDisposable(), recursiveAction = function (state1) { action(state1, function (state2, dueTime1) { var isAdded = false, isDone = false, d = scheduler[method].call(scheduler, 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 invokeAction(scheduler, action) { action(); return disposableEmpty; } var schedulerProto = Scheduler.prototype; /** * Returns a scheduler that wraps the original scheduler, adding exception handling for scheduled actions. * @param {Function} handler Handler that's run if an exception is caught. The exception will be rethrown if the handler returns false. * @returns {Scheduler} Wrapper around the original scheduler, enforcing exception handling. */ schedulerProto.catchException = schedulerProto['catch'] = function (handler) { return new CatchScheduler(this, handler); }; /** * 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). */ schedulerProto.schedulePeriodic = function (period, action) { return this.schedulePeriodicWithState(null, period, function () { 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). */ schedulerProto.schedulePeriodicWithState = function (state, period, action) { var s = state, id = setInterval(function () { s = action(s); }, period); return disposableCreate(function () { clearInterval(id); }); }; /** * 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); }; /** * 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({ first: state, second: action }, function (s, p) { return invokeRecImmediate(s, p); }); }; /** * 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, function (_action, self) { _action(function (dt) { self(_action, dt); }); }); }; /** * 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({ first: state, second: 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, function (_action, self) { _action(function (dt) { self(_action, dt); }); }); }; /** * 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({ first: state, second: action }, dueTime, function (s, p) { return invokeRecDate(s, p, 'scheduleWithAbsoluteAndState'); }); }; /** 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) { if (timeSpan < 0) { timeSpan = 0; } return timeSpan; }; return Scheduler; }()); var normalizeTime = Scheduler.normalize; 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; }()); /** * Gets a scheduler that schedules work immediately on the current thread. */ var immediateScheduler = Scheduler.immediate = (function () { function scheduleNow(state, action) { return action(this, state); } function scheduleRelative(state, dueTime, action) { var dt = normalizeTime(dt); while (dt - this.now() > 0) { } return action(this, state); } function scheduleAbsolute(state, dueTime, action) { return this.scheduleWithRelativeAndState(state, dueTime - this.now(), action); } return new Scheduler(defaultNow, scheduleNow, scheduleRelative, scheduleAbsolute); }()); /** * Gets a scheduler that schedules work as soon as possible on the current thread. */ var currentThreadScheduler = Scheduler.currentThread = (function () { var queue; function runTrampoline (q) { var item; while (q.length > 0) { item = q.dequeue(); if (!item.isCancelled()) { // Note, do not schedule blocking work! while (item.dueTime - Scheduler.now() > 0) { } if (!item.isCancelled()) { item.invoke(); } } } } function scheduleNow(state, action) { return this.scheduleWithRelativeAndState(state, 0, action); } function scheduleRelative(state, dueTime, action) { var dt = this.now() + Scheduler.normalize(dueTime), si = new ScheduledItem(this, state, action, dt), t; if (!queue) { queue = new PriorityQueue(4); queue.enqueue(si); try { runTrampoline(queue); } catch (e) { throw e; } finally { queue = null; } } else { queue.enqueue(si); } return si.disposable; } function scheduleAbsolute(state, dueTime, action) { return this.scheduleWithRelativeAndState(state, dueTime - this.now(), action); } var currentScheduler = new Scheduler(defaultNow, scheduleNow, scheduleRelative, scheduleAbsolute); currentScheduler.scheduleRequired = function () { return queue === null; }; currentScheduler.ensureTrampoline = function (action) { if (queue === null) { return this.schedule(action); } else { return action(); } }; return currentScheduler; }()); var scheduleMethod, clearMethod = noop; (function () { var reNative = RegExp('^' + String(toString) .replace(/[.*+?^${}()|[\]\\]/g, '\\$&') .replace(/toString| for [^\]]+/g, '.*?') + '$' ); var setImmediate = typeof (setImmediate = freeGlobal && moduleExports && freeGlobal.setImmediate) == 'function' && !reNative.test(setImmediate) && setImmediate, clearImmediate = typeof (clearImmediate = freeGlobal && moduleExports && freeGlobal.clearImmediate) == 'function' && !reNative.test(clearImmediate) && clearImmediate; 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, nextTick, setImmediate, postMessage, MessageChannel, script readystatechanged, setTimeout if (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]') { scheduleMethod = process.nextTick; } else if (typeof setImmediate === 'function') { scheduleMethod = setImmediate; clearMethod = clearImmediate; } else if (postMessageSupported()) { var MSG_PREFIX = 'ms.rx.schedule' + Math.random(), tasks = {}, taskId = 0; 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) { var handleId = event.data.substring(MSG_PREFIX.length), action = tasks[handleId]; action(); delete tasks[handleId]; } } if (root.addEventListener) { root.addEventListener('message', onGlobalPostMessage, false); } else { root.attachEvent('onmessage', onGlobalPostMessage, false); } scheduleMethod = function (action) { var currentId = taskId++; tasks[currentId] = action; root.postMessage(MSG_PREFIX + currentId, '*'); }; } else if (!!root.MessageChannel) { var channel = new root.MessageChannel(), channelTasks = {}, channelTaskId = 0; channel.port1.onmessage = function (event) { var id = event.data, action = channelTasks[id]; action(); delete channelTasks[id]; }; scheduleMethod = function (action) { var id = channelTaskId++; channelTasks[id] = action; channel.port2.postMessage(id); }; } else if ('document' in root && 'onreadystatechange' in root.document.createElement('script')) { scheduleMethod = function (action) { var scriptElement = root.document.createElement('script'); scriptElement.onreadystatechange = function () { action(); scriptElement.onreadystatechange = null; scriptElement.parentNode.removeChild(scriptElement); scriptElement = null; }; root.document.documentElement.appendChild(scriptElement); }; } else { scheduleMethod = function (action) { return setTimeout(action, 0); }; clearMethod = clearTimeout; } }()); /** * Gets a scheduler that schedules work via a timed callback based upon platform. */ var timeoutScheduler = Scheduler.timeout = (function () { function scheduleNow(state, action) { var scheduler = this, disposable = new SingleAssignmentDisposable(); var id = scheduleMethod(function () { if (!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); if (dt === 0) { return scheduler.scheduleWithState(state, action); } var disposable = new SingleAssignmentDisposable(); var id = setTimeout(function () { if (!disposable.isDisposed) { disposable.setDisposable(action(scheduler, state)); } }, dt); return new CompositeDisposable(disposable, disposableCreate(function () { clearTimeout(id); })); } function scheduleAbsolute(state, dueTime, action) { return this.scheduleWithRelativeAndState(state, dueTime - this.now(), action); } return new Scheduler(defaultNow, scheduleNow, scheduleRelative, scheduleAbsolute); })(); /** @private */ var CatchScheduler = (function (_super) { function localNow() { return this._scheduler.now(); } function scheduleNow(state, action) { return this._scheduler.scheduleWithState(state, this._wrap(action)); } function scheduleRelative(state, dueTime, action) { return this._scheduler.scheduleWithRelativeAndState(state, dueTime, this._wrap(action)); } function scheduleAbsolute(state, dueTime, action) { return this._scheduler.scheduleWithAbsoluteAndState(state, dueTime, this._wrap(action)); } inherits(CatchScheduler, _super); /** @private */ function CatchScheduler(scheduler, handler) { this._scheduler = scheduler; this._handler = handler; this._recursiveOriginal = null; this._recursiveWrapper = null; _super.call(this, localNow, scheduleNow, scheduleRelative, scheduleAbsolute); } /** @private */ CatchScheduler.prototype._clone = function (scheduler) { return new CatchScheduler(scheduler, this._handler); }; /** @private */ CatchScheduler.prototype._wrap = function (action) { var parent = this; return function (self, state) { try { return action(parent._getRecursiveWrapper(self), state); } catch (e) { if (!parent._handler(e)) { throw e; } return disposableEmpty; } }; }; /** @private */ CatchScheduler.prototype._getRecursiveWrapper = function (scheduler) { if (this._recursiveOriginal !== scheduler) { this._recursiveOriginal = scheduler; var wrapper = this._clone(scheduler); wrapper._recursiveOriginal = scheduler; wrapper._recursiveWrapper = wrapper; this._recursiveWrapper = wrapper; } return this._recursiveWrapper; }; /** @private */ CatchScheduler.prototype.schedulePeriodicWithState = function (state, period, action) { var self = this, failed = false, d = new SingleAssignmentDisposable(); d.setDisposable(this._scheduler.schedulePeriodicWithState(state, period, function (state1) { if (failed) { return null; } try { return action(state1); } catch (e) { failed = true; if (!self._handler(e)) { throw e; } d.dispose(); return null; } })); return d; }; return CatchScheduler; }(Scheduler)); /** * Represents a notification to an observer. */ var Notification = Rx.Notification = (function () { function Notification(kind, hasValue) { this.hasValue = hasValue == null ? false : hasValue; this.kind = kind; } var NotificationPrototype = Notification.prototype; /** * 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. */ NotificationPrototype.accept = function (observerOrOnNext, onError, onCompleted) { if (arguments.length === 1 && typeof observerOrOnNext === 'object') { return this._acceptObservable(observerOrOnNext); } return this._accept(observerOrOnNext, onError, onCompleted); }; /** * Returns an observable sequence with a single notification. * * @memberOf Notification * @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. */ NotificationPrototype.toObservable = function (scheduler) { var notification = this; scheduler || (scheduler = immediateScheduler); return new AnonymousObservable(function (observer) { return scheduler.schedule(function () { notification._acceptObservable(observer); if (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) { var notification = new Notification('N', true); notification.value = value; notification._accept = _accept; notification._acceptObservable = _acceptObservable; notification.toString = toString; return notification; }; }()); /** * 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 (exception) { var notification = new Notification('E'); notification.exception = exception; notification._accept = _accept; notification._acceptObservable = _acceptObservable; notification.toString = toString; return notification; }; }()); /** * 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 () { var notification = new Notification('C'); notification._accept = _accept; notification._acceptObservable = _acceptObservable; notification.toString = toString; return notification; }; }()); 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 (observer) { var e; try { e = sources[$iterator$](); } catch(err) { observer.onError(); return; } var isDisposed, subscription = new SerialDisposable(); var cancelable = immediateScheduler.scheduleRecursive(function (self) { var currentItem; if (isDisposed) { return; } try { currentItem = e.next(); } catch (ex) { observer.onError(ex); return; } if (currentItem.done) { observer.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( observer.onNext.bind(observer), observer.onError.bind(observer), function () { self(); }) ); }); return new CompositeDisposable(subscription, cancelable, disposableCreate(function () { isDisposed = true; })); }); }; Enumerable.prototype.catchException = function () { var sources = this; return new AnonymousObservable(function (observer) { var e; try { e = sources[$iterator$](); } catch(err) { observer.onError(); return; } var isDisposed, lastException, subscription = new SerialDisposable(); var cancelable = immediateScheduler.scheduleRecursive(function (self) { if (isDisposed) { return; } var currentItem; try { currentItem = e.next(); } catch (ex) { observer.onError(ex); return; } if (currentItem.done) { if (lastException) { observer.onError(lastException); } else { observer.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( observer.onNext.bind(observer), function (exn) { lastException = exn; self(); }, observer.onCompleted.bind(observer))); }); return new CompositeDisposable(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 enumerableFor = Enumerable.forEach = function (source, selector, thisArg) { selector || (selector = identity); return new Enumerable(function () { var index = -1; return new Enumerator( function () { return ++index < source.length ? { done: false, value: selector.call(thisArg, source[index], index, source) } : doneEnumerator; }); }); }; /** * Supports push-style iteration over an observable sequence. */ var Observer = Rx.Observer = function () { }; /** * Creates a notification callback from an observer. * * @param observer Observer object. * @returns The action that forwards its input notification to the underlying observer. */ Observer.prototype.toNotifier = function () { var observer = this; return function (n) { return n.accept(observer); }; }; /** * Hides the identity of an observer. * @returns An observer that hides the identity of the specified observer. */ Observer.prototype.asObserver = function () { return new AnonymousObserver(this.onNext.bind(this), this.onError.bind(this), this.onCompleted.bind(this)); }; /** * Checks access to the observer for grammar violations. This includes checking for multiple OnError or OnCompleted calls, as well as reentrancy in any of the observer methods. * If a violation is detected, an Error is thrown from the offending observer method call. * * @returns An observer that checks callbacks invocations against the observer grammar and, if the checks pass, forwards those to the specified observer. */ Observer.prototype.checked = function () { return new CheckedObserver(this); }; /** * Creates an observer from the specified OnNext, along with optional OnError, and OnCompleted actions. * * @static * @memberOf Observer * @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); }; /** * Creates an observer from a notification callback. * * @static * @memberOf Observer * @param {Function} handler Action that handles a notification. * @returns The observer object that invokes the specified handler using a notification corresponding to each message it receives. */ Observer.fromNotifier = function (handler) { return new AnonymousObserver(function (x) { return handler(notificationCreateOnNext(x)); }, function (exception) { return handler(notificationCreateOnError(exception)); }, function () { return handler(notificationCreateOnCompleted()); }); }; /** * Schedules the invocation of observer methods on the given scheduler. * @param {Scheduler} scheduler Scheduler to schedule observer messages on. * @returns {Observer} Observer whose messages are scheduled on the given scheduler. */ Observer.notifyOn = function (scheduler) { return new ObserveOnObserver(scheduler, this); }; /** * 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. * * @constructor */ function AbstractObserver() { this.isStopped = false; _super.call(this); } /** * Notifies the observer of a new element in the sequence. * * @memberOf AbstractObserver * @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. * * @memberOf AbstractObserver * @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 (exception) { this._onError(exception); }; /** * Calls the onCompleted action. */ AnonymousObserver.prototype.completed = function () { this._onCompleted(); }; return AnonymousObserver; }(AbstractObserver)); var CheckedObserver = (function (_super) { inherits(CheckedObserver, _super); function CheckedObserver(observer) { _super.call(this); this._observer = observer; this._state = 0; // 0 - idle, 1 - busy, 2 - done } var CheckedObserverPrototype = CheckedObserver.prototype; CheckedObserverPrototype.onNext = function (value) { this.checkAccess(); try { this._observer.onNext(value); } catch (e) { throw e; } finally { this._state = 0; } }; CheckedObserverPrototype.onError = function (err) { this.checkAccess(); try { this._observer.onError(err); } catch (e) { throw e; } finally { this._state = 2; } }; CheckedObserverPrototype.onCompleted = function () { this.checkAccess(); try { this._observer.onCompleted(); } catch (e) { throw e; } finally { this._state = 2; } }; CheckedObserverPrototype.checkAccess = function () { if (this._state === 1) { throw new Error('Re-entrancy detected'); } if (this._state === 2) { throw new Error('Observer completed'); } if (this._state === 0) { this._state = 1; } }; return CheckedObserver; }(Observer)); 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 (exception) { var self = this; this.queue.push(function () { self.observer.onError(exception); }); }; 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)); /** @private */ var ObserveOnObserver = (function (_super) { inherits(ObserveOnObserver, _super); /** @private */ function ObserveOnObserver() { _super.apply(this, arguments); } /** @private */ ObserveOnObserver.prototype.next = function (value) { _super.prototype.next.call(this, value); this.ensureActive(); }; /** @private */ ObserveOnObserver.prototype.error = function (e) { _super.prototype.error.call(this, e); this.ensureActive(); }; /** @private */ ObserveOnObserver.prototype.completed = function () { _super.prototype.completed.call(this); this.ensureActive(); }; return ObserveOnObserver; })(ScheduledObserver); var observableProto; /** * Represents a push-style collection. */ var Observable = Rx.Observable = (function () { function Observable(subscribe) { this._subscribe = subscribe; } observableProto = Observable.prototype; /** * Subscribes an observer to the observable sequence. * * @example * 1 - source.subscribe(); * 2 - source.subscribe(observer); * 3 - source.subscribe(function (x) { console.log(x); }); * 4 - source.subscribe(function (x) { console.log(x); }, function (err) { console.log(err); }); * 5 - source.subscribe(function (x) { console.log(x); }, function (err) { console.log(err); }, function () { console.log('done'); }); * @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} The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler. */ observableProto.subscribe = observableProto.forEach = function (observerOrOnNext, onError, onCompleted) { var subscriber = typeof observerOrOnNext === 'object' ? observerOrOnNext : observerCreate(observerOrOnNext, onError, onCompleted); return this._subscribe(subscriber); }; return Observable; })(); /** * Wraps the source sequence in order to run its observer callbacks on the specified scheduler. * * This only invokes observer callbacks on a scheduler. In case the subscription and/or unsubscription actions have side-effects * that require to be run on a scheduler, use subscribeOn. * * @param {Scheduler} scheduler Scheduler to notify observers on. * @returns {Observable} The source sequence whose observations happen on the specified scheduler. */ observableProto.observeOn = function (scheduler) { var source = this; return new AnonymousObservable(function (observer) { return source.subscribe(new ObserveOnObserver(scheduler, observer)); }); }; /** * Wraps the source sequence in order to run its subscription and unsubscription logic on the specified scheduler. This operation is not commonly used; * see the remarks section for more information on the distinction between subscribeOn and observeOn. * This only performs the side-effects of subscription and unsubscription on the specified scheduler. In order to invoke observer * callbacks on a scheduler, use observeOn. * @param {Scheduler} scheduler Scheduler to perform subscription and unsubscription actions on. * @returns {Observable} The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler. */ observableProto.subscribeOn = function (scheduler) { var source = this; return new AnonymousObservable(function (observer) { var m = new SingleAssignmentDisposable(), d = new SerialDisposable(); d.setDisposable(m); m.setDisposable(scheduler.schedule(function () { d.setDisposable(new ScheduledDisposable(scheduler, source.subscribe(observer))); })); return d; }); }; /** * 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 new AnonymousObservable(function (observer) { promise.then( function (value) { observer.onNext(value); observer.onCompleted(); }, function (reason) { observer.onError(reason); }); return function () { if (promise && promise.abort) { promise.abort(); } } }); }; /* * 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 Error('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; }, function (err) { reject(err); }, function () { if (hasValue) { resolve(value); } }); }); }; /** * Creates a list from an observable sequence. * @returns An observable sequence containing a single element with a list containing all the elements of the source sequence. */ observableProto.toArray = function () { var self = this; return new AnonymousObservable(function(observer) { var arr = []; return self.subscribe( arr.push.bind(arr), observer.onError.bind(observer), function () { observer.onNext(arr); observer.onCompleted(); }); }); }; /** * 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) { return new AnonymousObservable(subscribe); }; /** * 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); }); }; /** * 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) { scheduler || (scheduler = immediateScheduler); return new AnonymousObservable(function (observer) { return scheduler.schedule(function () { observer.onCompleted(); }); }); }; /** * Converts an array to an observable sequence, using an optional scheduler to enumerate the array. * * @example * var res = Rx.Observable.fromArray([1,2,3]); * var res = Rx.Observable.fromArray([1,2,3], Rx.Scheduler.timeout); * @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) { scheduler || (scheduler = currentThreadScheduler); return new AnonymousObservable(function (observer) { var count = 0; return scheduler.scheduleRecursive(function (self) { if (count < array.length) { observer.onNext(array[count++]); self(); } else { observer.onCompleted(); } }); }); }; /** * Converts an iterable into an Observable sequence * * @example * var res = Rx.Observable.fromIterable(new Map()); * var res = Rx.Observable.fromIterable(new Set(), Rx.Scheduler.timeout); * @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 generator sequence. */ Observable.fromIterable = function (iterable, scheduler) { scheduler || (scheduler = currentThreadScheduler); return new AnonymousObservable(function (observer) { var iterator; try { iterator = iterable[$iterator$](); } catch (e) { observer.onError(e); return; } return scheduler.scheduleRecursive(function (self) { var next; try { next = iterator.next(); } catch (err) { observer.onError(err); return; } if (next.done) { observer.onCompleted(); } else { observer.onNext(next.value); self(); } }); }); }; /** * Generates an observable sequence by running a state-driven loop producing the sequence's elements, using the specified scheduler to send out observer messages. * * @example * var res = Rx.Observable.generate(0, function (x) { return x < 10; }, function (x) { return x + 1; }, function (x) { return x; }); * var res = Rx.Observable.generate(0, function (x) { return x < 10; }, function (x) { return x + 1; }, function (x) { return x; }, Rx.Scheduler.timeout); * @param {Mixed} initialState Initial state. * @param {Function} condition Condition to terminate generation (upon returning false). * @param {Function} iterate Iteration step function. * @param {Function} resultSelector Selector function for results produced in the sequence. * @param {Scheduler} [scheduler] Scheduler on which to run the generator loop. If not provided, defaults to Scheduler.currentThread. * @returns {Observable} The generated sequence. */ Observable.generate = function (initialState, condition, iterate, resultSelector, scheduler) { scheduler || (scheduler = currentThreadScheduler); return new AnonymousObservable(function (observer) { var first = true, state = initialState; return scheduler.scheduleRecursive(function (self) { var hasResult, result; try { if (first) { first = false; } else { state = iterate(state); } hasResult = condition(state); if (hasResult) { result = resultSelector(state); } } catch (exception) { observer.onError(exception); return; } if (hasResult) { observer.onNext(result); self(); } else { observer.onCompleted(); } }); }); }; /** * 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 AnonymousObservable(function () { return disposableEmpty; }); }; /** * Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to send out observer messages. * * @example * var res = Rx.Observable.range(0, 10); * var res = Rx.Observable.range(0, 10, Rx.Scheduler.timeout); * @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) { scheduler || (scheduler = currentThreadScheduler); return new AnonymousObservable(function (observer) { return scheduler.scheduleRecursiveWithState(0, function (i, self) { if (i < count) { observer.onNext(start + i); self(i + 1); } else { observer.onCompleted(); } }); }); }; /** * Generates an observable sequence that repeats the given element the specified number of times, using the specified scheduler to send out observer messages. * * @example * var res = Rx.Observable.repeat(42); * var res = Rx.Observable.repeat(42, 4); * 3 - res = Rx.Observable.repeat(42, 4, Rx.Scheduler.timeout); * 4 - res = Rx.Observable.repeat(42, null, Rx.Scheduler.timeout); * @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) { scheduler || (scheduler = currentThreadScheduler); if (repeatCount == null) { repeatCount = -1; } return observableReturn(value, scheduler).repeat(repeatCount); }; /** * Returns an observable sequence that contains a single element, using the specified scheduler to send out observer messages. * There is an alias called 'returnValue' for browsers <IE9. * * @example * var res = Rx.Observable.return(42); * var res = Rx.Observable.return(42, Rx.Scheduler.timeout); * @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.returnValue = function (value, scheduler) { scheduler || (scheduler = immediateScheduler); return new AnonymousObservable(function (observer) { return scheduler.schedule(function () { observer.onNext(value); observer.onCompleted(); }); }); }; /** * 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 'throwException' for browsers <IE9. * * @example * var res = Rx.Observable.throwException(new Error('Error')); * var res = Rx.Observable.throwException(new Error('Error'), Rx.Scheduler.timeout); * @param {Mixed} exception 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.throwException = function (exception, scheduler) { scheduler || (scheduler = immediateScheduler); return new AnonymousObservable(function (observer) { return scheduler.schedule(function () { observer.onError(exception); }); }); }; /** * Constructs an observable sequence that depends on a resource object, whose lifetime is tied to the resulting observable sequence's lifetime. * * @example * var res = Rx.Observable.using(function () { return new AsyncSubject(); }, function (s) { return s; }); * @param {Function} resourceFactory Factory function to obtain a resource object. * @param {Function} observableFactory Factory function to obtain an observable sequence that depends on the obtained resource. * @returns {Observable} An observable sequence whose lifetime controls the lifetime of the dependent resource object. */ Observable.using = function (resourceFactory, observableFactory) { return new AnonymousObservable(function (observer) { var disposable = disposableEmpty, resource, source; try { resource = resourceFactory(); if (resource) { disposable = resource; } source = observableFactory(resource); } catch (exception) { return new CompositeDisposable(observableThrow(exception).subscribe(observer), disposable); } return new CompositeDisposable(source.subscribe(observer), disposable); }); }; /** * Propagates the observable sequence or Promise that reacts first. * @param {Observable} rightSource Second observable sequence or Promise. * @returns {Observable} {Observable} An observable sequence that surfaces either of the given sequences, whichever reacted first. */ observableProto.amb = function (rightSource) { var leftSource = this; return new AnonymousObservable(function (observer) { var choice, leftChoice = 'L', rightChoice = 'R', leftSubscription = new SingleAssignmentDisposable(), rightSubscription = new SingleAssignmentDisposable(); isPromise(rightSource) && (rightSource = observableFromPromise(rightSource)); function choiceL() { if (!choice) { choice = leftChoice; rightSubscription.dispose(); } } function choiceR() { if (!choice) { choice = rightChoice; leftSubscription.dispose(); } } leftSubscription.setDisposable(leftSource.subscribe(function (left) { choiceL(); if (choice === leftChoice) { observer.onNext(left); } }, function (err) { choiceL(); if (choice === leftChoice) { observer.onError(err); } }, function () { choiceL(); if (choice === leftChoice) { observer.onCompleted(); } })); rightSubscription.setDisposable(rightSource.subscribe(function (right) { choiceR(); if (choice === rightChoice) { observer.onNext(right); } }, function (err) { choiceR(); if (choice === rightChoice) { observer.onError(err); } }, function () { choiceR(); if (choice === rightChoice) { observer.onCompleted(); } })); return new CompositeDisposable(leftSubscription, rightSubscription); }); }; /** * Propagates the observable sequence or Promise that reacts first. * * @example * var = Rx.Observable.amb(xs, ys, zs); * @returns {Observable} An observable sequence that surfaces any of the given sequences, whichever reacted first. */ Observable.amb = function () { var acc = observableNever(), items = argsOrArray(arguments, 0); function func(previous, current) { return previous.amb(current); } for (var i = 0, len = items.length; i < len; i++) { acc = func(acc, items[i]); } return acc; }; function observableCatchHandler(source, handler) { return new AnonymousObservable(function (observer) { var d1 = new SingleAssignmentDisposable(), subscription = new SerialDisposable(); subscription.setDisposable(d1); d1.setDisposable(source.subscribe(observer.onNext.bind(observer), function (exception) { var d, result; try { result = handler(exception); } catch (ex) { observer.onError(ex); return; } isPromise(result) && (result = observableFromPromise(result)); d = new SingleAssignmentDisposable(); subscription.setDisposable(d); d.setDisposable(result.subscribe(observer)); }, observer.onCompleted.bind(observer))); return subscription; }); } /** * 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.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. * * @example * 1 - res = Rx.Observable.catchException(xs, ys, zs); * 2 - res = Rx.Observable.catchException([xs, ys, zs]); * @returns {Observable} An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully. */ var observableCatch = Observable.catchException = Observable['catch'] = function () { var items = argsOrArray(arguments, 0); return enumerableFor(items).catchException(); }; /** * 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 args = slice.call(arguments); 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 args = slice.call(arguments), resultSelector = args.pop(); 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, isDone = arrayInitialize(n, falseFactory), values = new Array(n); function next(i) { var res; hasValue[i] = true; if (hasValueAll || (hasValueAll = hasValue.every(identity))) { try { res = resultSelector.apply(null, values); } 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(identity)) { 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) { values[i] = x; next(i); }, observer.onError.bind(observer), function () { done(i); })); subscriptions[i] = sad; }(idx)); } return new CompositeDisposable(subscriptions); }); }; /** * Concatenates all the observable sequences. This takes in either an array or variable arguments to concatenate. * * @example * 1 - concatenated = xs.concat(ys, zs); * 2 - concatenated = xs.concat([ys, zs]); * @returns {Observable} An observable sequence that contains the elements of each given sequence, in sequential order. */ observableProto.concat = function () { var items = slice.call(arguments, 0); items.unshift(this); return observableConcat.apply(this, items); }; /** * Concatenates all the observable sequences. * * @example * 1 - res = Rx.Observable.concat(xs, ys, zs); * 2 - res = Rx.Observable.concat([xs, ys, zs]); * @returns {Observable} An observable sequence that contains the elements of each given sequence, in sequential order. */ var observableConcat = Observable.concat = function () { var sources = argsOrArray(arguments, 0); return enumerableFor(sources).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.concatObservable = observableProto.concatAll =function () { return this.merge(1); }; /** * 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) { if (typeof maxConcurrentOrOther !== 'number') { return observableMerge(this, maxConcurrentOrOther); } var sources = this; return new AnonymousObservable(function (observer) { var activeCount = 0, group = new CompositeDisposable(), isStopped = false, q = [], subscribe = function (xs) { var subscription = new SingleAssignmentDisposable(); group.add(subscription); // Check for promises support if (isPromise(xs)) { xs = observableFromPromise(xs); } subscription.setDisposable(xs.subscribe(observer.onNext.bind(observer), observer.onError.bind(observer), function () { var s; group.remove(subscription); if (q.length > 0) { s = q.shift(); subscribe(s); } else { activeCount--; if (isStopped && activeCount === 0) { observer.onCompleted(); } } })); }; group.add(sources.subscribe(function (innerSource) { if (activeCount < maxConcurrentOrOther) { activeCount++; subscribe(innerSource); } else { q.push(innerSource); } }, observer.onError.bind(observer), function () { isStopped = true; if (activeCount === 0) { observer.onCompleted(); } })); return group; }); }; /** * Merges all the observable sequences into a single observable sequence. * The scheduler is optional and if not specified, the immediate scheduler is used. * * @example * 1 - merged = Rx.Observable.merge(xs, ys, zs); * 2 - merged = Rx.Observable.merge([xs, ys, zs]); * 3 - merged = Rx.Observable.merge(scheduler, xs, ys, zs); * 4 - merged = Rx.Observable.merge(scheduler, [xs, ys, zs]); * @returns {Observable} The observable sequence that merges the elements of the observable sequences. */ var observableMerge = Observable.merge = function () { var scheduler, sources; if (!arguments[0]) { scheduler = immediateScheduler; sources = slice.call(arguments, 1); } else if (arguments[0].now) { scheduler = arguments[0]; sources = slice.call(arguments, 1); } else { scheduler = immediateScheduler; sources = slice.call(arguments, 0); } if (Array.isArray(sources[0])) { sources = sources[0]; } return observableFromArray(sources, scheduler).mergeObservable(); }; /** * 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.mergeObservable = observableProto.mergeAll =function () { var sources = this; return new AnonymousObservable(function (observer) { var group = new CompositeDisposable(), isStopped = false, m = new SingleAssignmentDisposable(); group.add(m); m.setDisposable(sources.subscribe(function (innerSource) { var innerSubscription = new SingleAssignmentDisposable(); group.add(innerSubscription); // Check if Promise or Observable if (isPromise(innerSource)) { innerSource = observableFromPromise(innerSource); } innerSubscription.setDisposable(innerSource.subscribe(function (x) { observer.onNext(x); }, observer.onError.bind(observer), function () { group.remove(innerSubscription); if (isStopped && group.length === 1) { observer.onCompleted(); } })); }, observer.onError.bind(observer), function () { isStopped = true; if (group.length === 1) { observer.onCompleted(); } })); return group; }); }; /** * Continues an observable sequence that is terminated normally or by an exception with the next observable sequence. * @param {Observable} second Second observable sequence used to produce results after the first sequence terminates. * @returns {Observable} An observable sequence that concatenates the first and second sequence, even if the first sequence terminates exceptionally. */ observableProto.onErrorResumeNext = function (second) { if (!second) { throw new Error('Second observable is required'); } return onErrorResumeNext([this, second]); }; /** * Continues an observable sequence that is terminated normally or by an exception with the next observable sequence. * * @example * 1 - res = Rx.Observable.onErrorResumeNext(xs, ys, zs); * 1 - res = Rx.Observable.onErrorResumeNext([xs, ys, zs]); * @returns {Observable} An observable sequence that concatenates the source sequences, even if a sequence terminates exceptionally. */ var onErrorResumeNext = Observable.onErrorResumeNext = function () { var sources = argsOrArray(arguments, 0); return new AnonymousObservable(function (observer) { var pos = 0, subscription = new SerialDisposable(), cancelable = immediateScheduler.scheduleRecursive(function (self) { var current, d; if (pos < sources.length) { current = sources[pos++]; isPromise(current) && (current = observableFromPromise(current)); d = new SingleAssignmentDisposable(); subscription.setDisposable(d); d.setDisposable(current.subscribe(observer.onNext.bind(observer), function () { self(); }, function () { self(); })); } else { observer.onCompleted(); } }); return new CompositeDisposable(subscription, cancelable); }); }; /** * 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 (observer) { var isOpen = false; var disposables = new CompositeDisposable(source.subscribe(function (left) { isOpen && observer.onNext(left); }, observer.onError.bind(observer), function () { isOpen && observer.onCompleted(); })); isPromise(other) && (other = observableFromPromise(other)); var rightSubscription = new SingleAssignmentDisposable(); disposables.add(rightSubscription); rightSubscription.setDisposable(other.subscribe(function () { isOpen = true; rightSubscription.dispose(); }, observer.onError.bind(observer), function () { rightSubscription.dispose(); })); return disposables; }); }; /** * 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 if (isPromise(innerSource)) { innerSource = observableFromPromise(innerSource); } d.setDisposable(innerSource.subscribe(function (x) { if (latest === id) { observer.onNext(x); } }, function (e) { if (latest === id) { observer.onError(e); } }, function () { if (latest === id) { hasLatest = false; if (isStopped) { observer.onCompleted(); } } })); }, observer.onError.bind(observer), function () { isStopped = true; if (!hasLatest) { observer.onCompleted(); } }); return new CompositeDisposable(subscription, innerSubscription); }); }; /** * 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 (observer) { isPromise(other) && (other = observableFromPromise(other)); return new CompositeDisposable( source.subscribe(observer), other.subscribe(observer.onCompleted.bind(observer), observer.onError.bind(observer), noop) ); }); }; 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) { observer.onError(e); return; } observer.onNext(result); } else { observer.onCompleted(); } }, observer.onError.bind(observer), observer.onCompleted.bind(observer)); }); } /** * 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 sources. * * @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 sources using the specified result selector function. */ observableProto.zip = function () { if (Array.isArray(arguments[0])) { return zipArray.apply(this, arguments); } var parent = this, sources = slice.call(arguments), resultSelector = sources.pop(); sources.unshift(parent); return new AnonymousObservable(function (observer) { var n = sources.length, queues = arrayInitialize(n, function () { return []; }), isDone = arrayInitialize(n, function () { return false; }); 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 = sources[i], sad = new SingleAssignmentDisposable(); isPromise(source) && (source = observableFromPromise(source)); sad.setDisposable(source.subscribe(function (x) { queues[i].push(x); next(i); }, observer.onError.bind(observer), function () { done(i); })); subscriptions[i] = sad; })(idx); } return new CompositeDisposable(subscriptions); }); }; /** * 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 args = slice.call(arguments, 0), 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 = argsOrArray(arguments, 0); 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); }, observer.onError.bind(observer), function () { done(i); })); })(idx); } var compositeDisposable = new CompositeDisposable(subscriptions); compositeDisposable.add(disposableCreate(function () { for (var qIdx = 0, qLen = queues.length; qIdx < qLen; qIdx++) { queues[qIdx] = []; } })); return compositeDisposable; }); }; /** * 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 (observer) { return source.subscribe(observer); }); }; /** * Projects each element of an observable sequence into zero or more buffers which are produced based on element count information. * * @example * var res = xs.bufferWithCount(10); * var res = xs.bufferWithCount(10, 1); * @param {Number} count Length of each buffer. * @param {Number} [skip] Number of elements to skip between creation of consecutive buffers. If not provided, defaults to the count. * @returns {Observable} An observable sequence of buffers. */ observableProto.bufferWithCount = function (count, skip) { if (typeof skip !== 'number') { skip = count; } return this.windowWithCount(count, skip).selectMany(function (x) { return x.toArray(); }).where(function (x) { return x.length > 0; }); }; /** * 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 (observer) { return source.subscribe(function (x) { return x.accept(observer); }, observer.onError.bind(observer), observer.onCompleted.bind(observer)); }); }; /** * 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; keySelector || (keySelector = identity); comparer || (comparer = defaultComparer); return new AnonymousObservable(function (observer) { var hasCurrentKey = false, currentKey; return source.subscribe(function (value) { var comparerEquals = false, key; try { key = keySelector(value); } catch (exception) { observer.onError(exception); return; } if (hasCurrentKey) { try { comparerEquals = comparer(currentKey, key); } catch (exception) { observer.onError(exception); return; } } if (!hasCurrentKey || !comparerEquals) { hasCurrentKey = true; currentKey = key; observer.onNext(value); } }, observer.onError.bind(observer), observer.onCompleted.bind(observer)); }); }; /** * 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. * * @example * var res = observable.doAction(observer); * var res = observable.doAction(onNext); * var res = observable.doAction(onNext, onError); * var res = observable.doAction(onNext, onError, onCompleted); * @param {Mixed} 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.doAction = function (observerOrOnNext, onError, onCompleted) { var source = this, onNextFunc; if (typeof observerOrOnNext === 'function') { onNextFunc = observerOrOnNext; } else { onNextFunc = observerOrOnNext.onNext.bind(observerOrOnNext); onError = observerOrOnNext.onError.bind(observerOrOnNext); onCompleted = observerOrOnNext.onCompleted.bind(observerOrOnNext); } return new AnonymousObservable(function (observer) { return source.subscribe(function (x) { try { onNextFunc(x); } catch (e) { observer.onError(e); } observer.onNext(x); }, function (exception) { if (!onError) { observer.onError(exception); } else { try { onError(exception); } catch (e) { observer.onError(e); } observer.onError(exception); } }, function () { if (!onCompleted) { observer.onCompleted(); } else { try { onCompleted(); } catch (e) { observer.onError(e); } observer.onCompleted(); } }); }); }; /** * Invokes a specified action after the source observable sequence terminates gracefully or exceptionally. * * @example * var res = observable.finallyAction(function () { console.log('sequence ended'; }); * @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.finallyAction = 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(); } }); }); }; /** * 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 (observer) { return source.subscribe(noop, observer.onError.bind(observer), observer.onCompleted.bind(observer)); }); }; /** * 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(); }); }); }; /** * Repeats the observable sequence a specified number of times. If the repeat count is not specified, the sequence repeats indefinitely. * * @example * var res = repeated = source.repeat(); * var res = repeated = source.repeat(42); * @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. * * @example * var res = retried = retry.repeat(); * var res = retried = retry.repeat(42); * @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).catchException(); }; /** * 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 (observer) { var hasAccumulation, accumulation, hasValue; return source.subscribe ( function (x) { try { if (!hasValue) { hasValue = true; } if (hasAccumulation) { accumulation = accumulator(accumulation, x); } else { accumulation = hasSeed ? accumulator(seed, x) : x; hasAccumulation = true; } } catch (e) { observer.onError(e); return; } observer.onNext(accumulation); }, observer.onError.bind(observer), function () { if (!hasValue && hasSeed) { observer.onNext(seed); } observer.onCompleted(); } ); }); }; /** * 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) { var source = this; return new AnonymousObservable(function (observer) { var q = []; return source.subscribe(function (x) { q.push(x); if (q.length > count) { observer.onNext(q.shift()); } }, observer.onError.bind(observer), observer.onCompleted.bind(observer)); }); }; /** * Prepends a sequence of values to an observable sequence with an optional scheduler and an argument list of values to prepend. * * var res = source.startWith(1, 2, 3); * var res = source.startWith(Rx.Scheduler.timeout, 1, 2, 3); * * @memberOf Observable# * @returns {Observable} The source sequence prepended with the specified values. */ observableProto.startWith = function () { var values, scheduler, start = 0; if (!!arguments.length && 'now' in Object(arguments[0])) { scheduler = arguments[0]; start = 1; } else { scheduler = immediateScheduler; } values = slice.call(arguments, start); return enumerableFor([observableFromArray(values, scheduler), this]).concat(); }; /** * Returns a specified number of contiguous elements from the end of an observable sequence, using an optional scheduler to drain the queue. * * @example * var res = source.takeLast(5); * var res = source.takeLast(5, Rx.Scheduler.timeout); * * @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. * @param {Scheduler} [scheduler] Scheduler used to drain the queue upon completion 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, scheduler) { return this.takeLastBuffer(count).selectMany(function (xs) { return observableFromArray(xs, scheduler); }); }; /** * Returns an array with the specified number of contiguous elements from the end of an observable sequence. * * @description * This operator accumulates a buffer with a length enough to store count elements. Upon completion of the * source sequence, this buffer is produced on the result sequence. * @param {Number} count Number of elements to take from the end of the source sequence. * @returns {Observable} An observable sequence containing a single array with the specified number of elements from the end of the source sequence. */ observableProto.takeLastBuffer = function (count) { var source = this; return new AnonymousObservable(function (observer) { var q = []; return source.subscribe(function (x) { q.push(x); if (q.length > count) { q.shift(); } }, observer.onError.bind(observer), function () { observer.onNext(q); observer.onCompleted(); }); }); }; /** * Projects each element of an observable sequence into zero or more windows which are produced based on element count information. * * var res = xs.windowWithCount(10); * var res = xs.windowWithCount(10, 1); * @param {Number} count Length of each window. * @param {Number} [skip] Number of elements to skip between creation of consecutive windows. If not specified, defaults to the count. * @returns {Observable} An observable sequence of windows. */ observableProto.windowWithCount = function (count, skip) { var source = this; if (count <= 0) { throw new Error(argumentOutOfRange); } if (arguments.length === 1) { skip = count; } if (skip <= 0) { throw new Error(argumentOutOfRange); } return new AnonymousObservable(function (observer) { var m = new SingleAssignmentDisposable(), refCountDisposable = new RefCountDisposable(m), n = 0, q = [], createWindow = function () { var s = new Subject(); q.push(s); observer.onNext(addRef(s, refCountDisposable)); }; createWindow(); m.setDisposable(source.subscribe(function (x) { var s; for (var i = 0, len = q.length; i < len; i++) { q[i].onNext(x); } var c = n - count + 1; if (c >= 0 && c % skip === 0) { s = q.shift(); s.onCompleted(); } n++; if (n % skip === 0) { createWindow(); } }, function (exception) { while (q.length > 0) { q.shift().onError(exception); } observer.onError(exception); }, function () { while (q.length > 0) { q.shift().onCompleted(); } observer.onCompleted(); })); return refCountDisposable; }); }; /** * Returns the elements of the specified sequence or the specified value in a singleton sequence if the sequence is empty. * * var res = obs = xs.defaultIfEmpty(); * 2 - obs = xs.defaultIfEmpty(false); * * @memberOf Observable# * @param defaultValue The value to return if the sequence is empty. If not provided, this defaults to null. * @returns {Observable} An observable sequence that contains the specified default value if the source is empty; otherwise, the elements of the source itself. */ observableProto.defaultIfEmpty = function (defaultValue) { var source = this; if (defaultValue === undefined) { defaultValue = null; } return new AnonymousObservable(function (observer) { var found = false; return source.subscribe(function (x) { found = true; observer.onNext(x); }, observer.onError.bind(observer), function () { if (!found) { observer.onNext(defaultValue); } observer.onCompleted(); }); }); }; /** * Returns an observable sequence that contains only distinct elements according to the keySelector and the comparer. * Usage of this operator should be considered carefully due to the maintenance of an internal lookup structure which can grow large. * * @example * var res = obs = xs.distinct(); * 2 - obs = xs.distinct(function (x) { return x.id; }); * 2 - obs = xs.distinct(function (x) { return x.id; }, function (x) { return x.toString(); }); * @param {Function} [keySelector] A function to compute the comparison key for each element. * @param {Function} [keySerializer] Used to serialize the given object into a string for object comparison. * @returns {Observable} An observable sequence only containing the distinct elements, based on a computed key value, from the source sequence. */ observableProto.distinct = function (keySelector, keySerializer) { var source = this; keySelector || (keySelector = identity); keySerializer || (keySerializer = defaultKeySerializer); return new AnonymousObservable(function (observer) { var hashSet = {}; return source.subscribe(function (x) { var key, serializedKey, otherKey, hasMatch = false; try { key = keySelector(x); serializedKey = keySerializer(key); } catch (exception) { observer.onError(exception); return; } for (otherKey in hashSet) { if (serializedKey === otherKey) { hasMatch = true; break; } } if (!hasMatch) { hashSet[serializedKey] = null; observer.onNext(x); } }, observer.onError.bind(observer), observer.onCompleted.bind(observer)); }); }; /** * Groups the elements of an observable sequence according to a specified key selector function and comparer and selects the resulting elements by using a specified function. * * @example * var res = observable.groupBy(function (x) { return x.id; }); * 2 - observable.groupBy(function (x) { return x.id; }), function (x) { return x.name; }); * 3 - observable.groupBy(function (x) { return x.id; }), function (x) { return x.name; }, function (x) { return x.toString(); }); * @param {Function} keySelector A function to extract the key for each element. * @param {Function} [elementSelector] A function to map each source element to an element in an observable group. * @param {Function} [keySerializer] Used to serialize the given object into a string for object comparison. * @returns {Observable} A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. */ observableProto.groupBy = function (keySelector, elementSelector, keySerializer) { return this.groupByUntil(keySelector, elementSelector, function () { return observableNever(); }, keySerializer); }; /** * Groups the elements of an observable sequence according to a specified key selector function. * A duration selector function is used to control the lifetime of groups. When a group expires, it receives an OnCompleted notification. When a new element with the same * key value as a reclaimed group occurs, the group will be reborn with a new lifetime request. * * @example * var res = observable.groupByUntil(function (x) { return x.id; }, null, function () { return Rx.Observable.never(); }); * 2 - observable.groupBy(function (x) { return x.id; }), function (x) { return x.name; }, function () { return Rx.Observable.never(); }); * 3 - observable.groupBy(function (x) { return x.id; }), function (x) { return x.name; }, function () { return Rx.Observable.never(); }, function (x) { return x.toString(); }); * @param {Function} keySelector A function to extract the key for each element. * @param {Function} durationSelector A function to signal the expiration of a group. * @param {Function} [keySerializer] Used to serialize the given object into a string for object comparison. * @returns {Observable} * A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. * If a group's lifetime expires, a new group with the same key value can be created once an element with such a key value is encoutered. * */ observableProto.groupByUntil = function (keySelector, elementSelector, durationSelector, keySerializer) { var source = this; elementSelector || (elementSelector = identity); keySerializer || (keySerializer = defaultKeySerializer); return new AnonymousObservable(function (observer) { var map = {}, groupDisposable = new CompositeDisposable(), refCountDisposable = new RefCountDisposable(groupDisposable); groupDisposable.add(source.subscribe(function (x) { var duration, durationGroup, element, fireNewMapEntry, group, key, serializedKey, md, writer, w; try { key = keySelector(x); serializedKey = keySerializer(key); } catch (e) { for (w in map) { map[w].onError(e); } observer.onError(e); return; } fireNewMapEntry = false; try { writer = map[serializedKey]; if (!writer) { writer = new Subject(); map[serializedKey] = writer; fireNewMapEntry = true; } } catch (e) { for (w in map) { map[w].onError(e); } observer.onError(e); return; } if (fireNewMapEntry) { group = new GroupedObservable(key, writer, refCountDisposable); durationGroup = new GroupedObservable(key, writer); try { duration = durationSelector(durationGroup); } catch (e) { for (w in map) { map[w].onError(e); } observer.onError(e); return; } observer.onNext(group); md = new SingleAssignmentDisposable(); groupDisposable.add(md); var expire = function () { if (serializedKey in map) { delete map[serializedKey]; writer.onCompleted(); } groupDisposable.remove(md); }; md.setDisposable(duration.take(1).subscribe(noop, function (exn) { for (w in map) { map[w].onError(exn); } observer.onError(exn); }, function () { expire(); })); } try { element = elementSelector(x); } catch (e) { for (w in map) { map[w].onError(e); } observer.onError(e); return; } writer.onNext(element); }, function (ex) { for (var w in map) { map[w].onError(ex); } observer.onError(ex); }, function () { for (var w in map) { map[w].onCompleted(); } observer.onCompleted(); })); return refCountDisposable; }); }; /** * 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.select = observableProto.map = function (selector, thisArg) { var parent = this; return new AnonymousObservable(function (observer) { var count = 0; return parent.subscribe(function (value) { var result; try { result = selector.call(thisArg, value, count++, parent); } catch (exception) { observer.onError(exception); return; } observer.onNext(result); }, observer.onError.bind(observer), observer.onCompleted.bind(observer)); }); }; /** * Retrieves the value of a specified property from all elements in the Observable sequence. * @param {String} property The property to pluck. * @returns {Observable} Returns a new Observable sequence of property values. */ observableProto.pluck = function (property) { return this.select(function (x) { return x[property]; }); }; function selectMany(selector) { return this.select(function (x, i) { var result = selector(x, i); return isPromise(result) ? observableFromPromise(result) : result; }).mergeObservable(); } /** * 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 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.selectMany = observableProto.flatMap = function (selector, resultSelector) { if (resultSelector) { return this.selectMany(function (x, i) { var selectorResult = selector(x, i), result = isPromise(selectorResult) ? observableFromPromise(selectorResult) : selectorResult; return result.select(function (y) { return resultSelector(x, y, i); }); }); } if (typeof selector === 'function') { return selectMany.call(this, selector); } return selectMany.call(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 = 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 Error(argumentOutOfRange); } var observable = this; return new AnonymousObservable(function (observer) { var remaining = count; return observable.subscribe(function (x) { if (remaining <= 0) { observer.onNext(x); } else { remaining--; } }, observer.onError.bind(observer), observer.onCompleted.bind(observer)); }); }; /** * 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; return new AnonymousObservable(function (observer) { var i = 0, running = false; return source.subscribe(function (x) { if (!running) { try { running = !predicate.call(thisArg, x, i++, source); } catch (e) { observer.onError(e); return; } } if (running) { observer.onNext(x); } }, observer.onError.bind(observer), observer.onCompleted.bind(observer)); }); }; /** * 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 Error(argumentOutOfRange); } if (count === 0) { return observableEmpty(scheduler); } var observable = this; return new AnonymousObservable(function (observer) { var remaining = count; return observable.subscribe(function (x) { if (remaining > 0) { remaining--; observer.onNext(x); if (remaining === 0) { observer.onCompleted(); } } }, observer.onError.bind(observer), observer.onCompleted.bind(observer)); }); }; /** * 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. * * @example * var res = source.takeWhile(function (value) { return value < 10; }); * var res = source.takeWhile(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 that occur before the element at which the test no longer passes. */ observableProto.takeWhile = function (predicate, thisArg) { var observable = this; return new AnonymousObservable(function (observer) { var i = 0, running = true; return observable.subscribe(function (x) { if (running) { try { running = predicate.call(thisArg, x, i++, observable); } catch (e) { observer.onError(e); return; } if (running) { observer.onNext(x); } else { observer.onCompleted(); } } }, observer.onError.bind(observer), observer.onCompleted.bind(observer)); }); }; /** * Filters the elements of an observable sequence based on a predicate by incorporating the element's index. * * @example * var res = source.where(function (value) { return value < 10; }); * var res = source.where(function (value, index) { return value < 10 || index < 10; }); * @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.where = observableProto.filter = function (predicate, thisArg) { var parent = this; return new AnonymousObservable(function (observer) { var count = 0; return parent.subscribe(function (value) { var shouldRun; try { shouldRun = predicate.call(thisArg, value, count++, parent); } catch (exception) { observer.onError(exception); return; } if (shouldRun) { observer.onNext(value); } }, observer.onError.bind(observer), observer.onCompleted.bind(observer)); }); }; 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) { if (typeof subscriber === 'undefined') { subscriber = disposableEmpty; } else if (typeof subscriber === 'function') { subscriber = disposableCreate(subscriber); } return subscriber; } function AnonymousObservable(subscribe) { if (!(this instanceof AnonymousObservable)) { return new AnonymousObservable(subscribe); } function s(observer) { var autoDetachObserver = new AutoDetachObserver(observer); if (currentThreadScheduler.scheduleRequired()) { currentThreadScheduler.schedule(function () { try { autoDetachObserver.setDisposable(fixSubscriber(subscribe(autoDetachObserver))); } catch (e) { if (!autoDetachObserver.fail(e)) { throw e; } } }); } else { try { autoDetachObserver.setDisposable(fixSubscriber(subscribe(autoDetachObserver))); } catch (e) { if (!autoDetachObserver.fail(e)) { throw e; } } } return autoDetachObserver; } _super.call(this, s); } return AnonymousObservable; }(Observable)); /** @private */ 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 noError = false; try { this.observer.onNext(value); noError = true; } catch (e) { throw e; } finally { if (!noError) { this.dispose(); } } }; AutoDetachObserverPrototype.error = function (exn) { try { this.observer.onError(exn); } catch (e) { throw e; } finally { this.dispose(); } }; AutoDetachObserverPrototype.completed = function () { try { this.observer.onCompleted(); } catch (e) { throw e; } finally { this.dispose(); } }; AutoDetachObserverPrototype.setDisposable = function (value) { this.m.setDisposable(value); }; AutoDetachObserverPrototype.getDisposable = function (value) { return this.m.getDisposable(); }; /* @private */ AutoDetachObserverPrototype.disposable = function (value) { return arguments.length ? this.getDisposable() : setDisposable(value); }; AutoDetachObserverPrototype.dispose = function () { _super.prototype.dispose.call(this); this.m.dispose(); }; return AutoDetachObserver; }(AbstractObserver)); /** @private */ var GroupedObservable = (function (_super) { inherits(GroupedObservable, _super); function subscribe(observer) { return this.underlyingObservable.subscribe(observer); } /** * @constructor * @private */ function GroupedObservable(key, underlyingObservable, mergedDisposable) { _super.call(this, subscribe); this.key = key; this.underlyingObservable = !mergedDisposable ? underlyingObservable : new AnonymousObservable(function (observer) { return new CompositeDisposable(mergedDisposable.getDisposable(), underlyingObservable.subscribe(observer)); }); } return GroupedObservable; }(Observable)); /** @private */ var InnerSubscription = function (subject, observer) { this.subject = subject; this.observer = observer; }; /** * @private * @memberOf InnerSubscription */ 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.call(this); if (!this.isStopped) { this.observers.push(observer); return new InnerSubscription(this, observer); } if (this.exception) { observer.onError(this.exception); return disposableEmpty; } observer.onCompleted(); return disposableEmpty; } inherits(Subject, _super); /** * Creates a subject. * @constructor */ function Subject() { _super.call(this, subscribe); this.isDisposed = false, this.isStopped = false, this.observers = []; } addProperties(Subject.prototype, Observer, { /** * 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.call(this); if (!this.isStopped) { var os = this.observers.slice(0); this.isStopped = true; for (var i = 0, len = os.length; i < len; i++) { os[i].onCompleted(); } this.observers = []; } }, /** * Notifies all subscribed observers about the exception. * @param {Mixed} error The exception to send to all observers. */ onError: function (exception) { checkDisposed.call(this); if (!this.isStopped) { var os = this.observers.slice(0); this.isStopped = true; this.exception = exception; for (var i = 0, len = os.length; i < len; i++) { os[i].onError(exception); } this.observers = []; } }, /** * 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.call(this); if (!this.isStopped) { var os = this.observers.slice(0); for (var i = 0, 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.call(this); if (!this.isStopped) { this.observers.push(observer); return new InnerSubscription(this, observer); } var ex = this.exception, hv = this.hasValue, v = this.value; if (ex) { observer.onError(ex); } else if (hv) { observer.onNext(v); 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.value = null; this.hasValue = false; this.observers = []; this.exception = null; } 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.call(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 o, i, len; checkDisposed.call(this); if (!this.isStopped) { this.isStopped = true; var os = this.observers.slice(0), v = this.value, hv = this.hasValue; if (hv) { for (i = 0, len = os.length; i < len; i++) { o = os[i]; o.onNext(v); o.onCompleted(); } } else { for (i = 0, len = os.length; i < len; i++) { os[i].onCompleted(); } } this.observers = []; } }, /** * Notifies all subscribed observers about the exception. * @param {Mixed} error The exception to send to all observers. */ onError: function (exception) { checkDisposed.call(this); if (!this.isStopped) { var os = this.observers.slice(0); this.isStopped = true; this.exception = exception; for (var i = 0, len = os.length; i < len; i++) { os[i].onError(exception); } this.observers = []; } }, /** * 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.call(this); if (!this.isStopped) { 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)); /** @private */ var AnonymousSubject = (function (_super) { inherits(AnonymousSubject, _super); function subscribe(observer) { return this.observable.subscribe(observer); } /** * @private * @constructor */ function AnonymousSubject(observer, observable) { _super.call(this, subscribe); this.observer = observer; this.observable = observable; } addProperties(AnonymousSubject.prototype, Observer, { /** * @private * @memberOf AnonymousSubject# */ onCompleted: function () { this.observer.onCompleted(); }, /** * @private * @memberOf AnonymousSubject# */ onError: function (exception) { this.observer.onError(exception); }, /** * @private * @memberOf AnonymousSubject# */ onNext: function (value) { this.observer.onNext(value); } }); return AnonymousSubject; }(Observable)); 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; } }.call(this));
components/lineup/VolleyCourt.js
nvbf/pepper
// @flow import React from 'react'; import { darken } from 'polished'; import GradientFill from '../svgs/GradientFill'; import color from '../../libs/color'; import VolleyNetAndPoles from './VolleyNetAndPoles'; function getLeftX(width: number, y: number) { return 0.25 * width * (1 - y); } function getRightX(width: number, y: number) { return width - getLeftX(width, y); } function CourtLine(props: { courtWidth: number, courtHeight: number, yPercent: number }) { return ( <line x1={getLeftX(props.courtWidth, props.yPercent)} y1={props.courtHeight * props.yPercent} x2={getRightX(props.courtWidth, props.yPercent)} y2={props.courtHeight * props.yPercent} style={{ stroke: '#fff', strokeWidth: 2 }} /> ); } function VolleyCourt(props: { width: number, height: number }) { return ( <svg shapeRendering="optimizeQuality" width={props.width + 8} height={props.height + 8} version="1.1" xmlns="http://www.w3.org/2000/svg" > <defs> <GradientFill start={darken(0.2, color.blue)} stop={color.blue} id="courtGrad" /> </defs> <g transform={'translate(4,0)'}> <polygon shapeRendering="optimizeQuality" points={` 0,${props.height} ${props.width},${props.height} ${props.width * 0.75},0 ${props.width * 0.25},0 `} fill="url(#courtGrad)" stroke={color.white} strokeWidth={4} /> <CourtLine yPercent={0.23} courtWidth={props.width} courtHeight={props.height} /> <CourtLine yPercent={0.36} courtWidth={props.width} courtHeight={props.height} /> <CourtLine yPercent={0.55} courtWidth={props.width} courtHeight={props.height} /> <VolleyNetAndPoles leftX={getLeftX(props.width, 0.55)} rightX={getRightX(props.width, 0.55)} bottomY={props.height * 0.36} netHeight={224} /> </g> </svg> ); } export default VolleyCourt;
cordova/myreact/node_modules/react-scripts/template/src/index.js
yjiang28/Hackers
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import './index.css'; ReactDOM.render( <App />, document.getElementById('root') );
src/components/widget/RawWidget.js
metasfresh/metasfresh-webui-frontend
import Moment from 'moment'; import React, { Component } from 'react'; import ReactCSSTransitionGroup from 'react-addons-css-transition-group'; import { connect } from 'react-redux'; import classnames from 'classnames'; import { List as ImmutableList } from 'immutable'; import { RawWidgetPropTypes, RawWidgetDefaultProps } from './PropTypes'; import { getClassNames, generateMomentObj } from './RawWidgetHelpers'; import { allowShortcut, disableShortcut } from '../../actions/WindowActions'; import { DATE_FORMAT, TIME_FORMAT, DATE_TIMEZONE_FORMAT, DATE_FIELD_FORMATS, } from '../../constants/Constants'; import ActionButton from './ActionButton'; import Attributes from './Attributes/Attributes'; import Checkbox from './Checkbox'; import DatePicker from './DatePicker'; import DatetimeRange from './DatetimeRange'; import DevicesWidget from './Devices/DevicesWidget'; import Image from './Image'; import Tooltips from '../tooltips/Tooltips'; import Labels from './Labels'; import Link from './Link'; import CharacterLimitInfo from './CharacterLimitInfo'; import List from './List/List'; import Lookup from './Lookup/Lookup'; /** * @file Class based component. * @module RawWidget * @extends Component */ export class RawWidget extends Component { constructor(props) { super(props); const { widgetData } = props; let cachedValue = undefined; if (widgetData && widgetData[0]) { if (widgetData[0].value !== undefined) { cachedValue = widgetData[0].value; } else if ( widgetData[0].status && widgetData[0].status.value !== undefined ) { cachedValue = widgetData[0].status.value; } } this.state = { isEdited: false, cachedValue, errorPopup: false, tooltipToggled: false, clearedFieldWarning: false, }; this.getClassNames = getClassNames.bind(this); this.generateMomentObj = generateMomentObj.bind(this); } componentDidMount() { const { autoFocus, textSelected } = this.props; const { rawWidget } = this; if (rawWidget && autoFocus) { rawWidget.focus(); } if (textSelected) { rawWidget.select(); } } /** * Re-rendering conditions by widgetType this to prevent unnecessary re-renders * Performance boost */ shouldComponentUpdate(nextProps) { switch (this.props.widgetType) { case 'YesNo': return nextProps.widgetData[0].value !== this.props.widgetData[0].value; default: return true; } } /** * @method focus * @summary Function used specifically for list widgets. It blocks outside clicks, which are * then enabled again in handleBlur. This is to avoid closing the list as it's a separate * DOM element outside of it's parent's tree. */ focus = () => { const { handleFocus, disableOnClickOutside } = this.props; const { rawWidget } = this; if (rawWidget && rawWidget.focus) { rawWidget.focus(); } disableOnClickOutside && disableOnClickOutside(); handleFocus && handleFocus(); }; /** * @method handleFocus * @summary ToDo: Describe the method. * @param {*} e */ handleFocus = () => { const { dispatch, handleFocus, listenOnKeysFalse } = this.props; dispatch(disableShortcut()); listenOnKeysFalse && listenOnKeysFalse(); setTimeout(() => { this.setState( { isEdited: true, }, () => { handleFocus && handleFocus(); } ); }, 0); }; /** * @method handleBlurBlur * @summary ToDo: Describe the method. * @param {*} widgetField * @param {*} value * @param {*} id */ handleBlur = (widgetField, value, id) => { const { dispatch, handleBlur, listenOnKeysTrue, enableOnClickOutside, } = this.props; this.setState( { isEdited: false, }, () => { enableOnClickOutside && enableOnClickOutside(); dispatch(allowShortcut()); handleBlur && handleBlur(this.willPatch(widgetField, value)); listenOnKeysTrue && listenOnKeysTrue(); if (widgetField) { this.handlePatch(widgetField, value, id); } } ); }; /** * @method updateTypedCharacters * @summary updates in the state the number of charactes typed * @param {typedText} string */ updateTypedCharacters = (typedText) => { const { fieldName } = this.props; let existingCharsTyped = { ...this.state.charsTyped }; existingCharsTyped[fieldName] = typedText.length; this.setState({ charsTyped: existingCharsTyped }); return true; }; /** * @method handleKeyDown * @summary key handler for the widgets. For number fields we're suppressing up/down * arrows to enable table row navigation * @param {*} e * @param {*} property * @param {*} value */ handleKeyDown = (e, property, value) => { const { lastFormField, widgetType, closeTableField } = this.props; const { key } = e; this.updateTypedCharacters(e.target.value); // for number fields submit them automatically on up/down arrow pressed and blur the field const NumberWidgets = ImmutableList([ 'Integer', 'Amount', 'Quantity', 'Number', 'CostPrice', ]); if ( (key === 'ArrowUp' || key === 'ArrowDown') && NumberWidgets.includes(widgetType) ) { closeTableField(); e.preventDefault(); this.handleBlur(); return this.handlePatch(property, value, null, null, true); } if ((key === 'Enter' || key === 'Tab') && !e.shiftKey) { if (key === 'Enter' && !lastFormField) { e.preventDefault(); } return this.handlePatch(property, value); } }; /** * @method willPatch * @summary Checks if the value has actually changed between what was cached before. * @param {*} property * @param {*} value * @param {*} valueTo */ willPatch = (property, value, valueTo) => { const { widgetData } = this.props; const { cachedValue } = this.state; // if there's no widget value, then nothing could've changed. Unless // it's a widget for actions (think ActionButton) const isValue = widgetData[0].value !== undefined || (widgetData[0].status && widgetData[0].status.value !== undefined); let fieldData = widgetData.find((widget) => widget.field === property); if (!fieldData) { fieldData = widgetData[0]; } let allowPatching = (isValue && (JSON.stringify(fieldData.value) != JSON.stringify(value) || JSON.stringify(fieldData.valueTo) != JSON.stringify(valueTo))) || JSON.stringify(cachedValue) != JSON.stringify(value) || // clear field that had it's cachedValue nulled before (cachedValue === null && value === null); if (cachedValue === undefined && !value) { allowPatching = false; } return allowPatching; }; /** * @method handlePatch * @summary Method for handling the actual patching from the widget(input), which in turn * calls the parent method (usually from MasterWidget) if the requirements are met * (value changed and patching is not in progress). `isForce` will be used for Datepicker * Datepicker is checking the cached value in datepicker component itself * and send a patch request only if date is changed * @param {*} property * @param {*} value * @param {*} id * @param {*} valueTo * @param {*} isForce */ handlePatch = (property, value, id, valueTo, isForce) => { const { handlePatch, inProgress, widgetType, maxLength } = this.props; const willPatch = this.willPatch(property, value, valueTo); if (widgetType === 'LongText' || widgetType === 'Text') { value = value.substring(0, maxLength); this.updateTypedCharacters(value); } // Do patch only when value is not equal state // or cache is set and it is not equal value if ((isForce || willPatch) && handlePatch && !inProgress) { if (widgetType === 'ZonedDateTime' && Moment.isMoment(value)) { value = Moment(value).format(DATE_TIMEZONE_FORMAT); } this.setState({ cachedValue: value, clearedFieldWarning: false, }); return handlePatch(property, value, id, valueTo); } return Promise.resolve(null); }; /** * @method handleProcess * @summary ToDo: Describe the method. */ handleProcess = () => { const { handleProcess, buttonProcessId, tabId, rowId, dataId, windowType, caption, } = this.props; handleProcess && handleProcess(caption, buttonProcessId, tabId, rowId, dataId, windowType); }; /** * @method handleErrorPopup * @summary ToDo: Describe the method. * @param {*} value */ handleErrorPopup = (value) => { this.setState({ errorPopup: value, }); }; /** * @method clearFieldWarning * @summary ToDo: Describe the method. * @param {*} warning */ clearFieldWarning = (warning) => { if (warning) { this.setState({ clearedFieldWarning: true, }); } }; /** * @method toggleTooltip * @summary ToDo: Describe the method. * @param {*} show */ toggleTooltip = (show) => { this.setState({ tooltipToggled: show, }); }; /** * @method renderErrorPopup * @summary ToDo: Describe the method. * @param {*} reason */ renderErrorPopup = (reason) => { return ( <div className="input-error-popup">{reason ? reason : 'Input error'}</div> ); }; /** * @method renderWidget * @summary ToDo: Describe the method. */ renderWidget = () => { const { handleChange, updated, modalVisible, isModal, filterWidget, filterId, id, range, onHide, handleBackdropLock, subentity, widgetType, subentityId, dropdownOpenCallback, autoFocus, fullScreen, //@TODO Looks like `fields` and `widgetData` are the very same thing 99.9% of the time. fields, windowType, dataId, type, widgetData, rowId, tabId, docId, activeTab, icon, gridAlign, entity, onShow, caption, viewId, data, listenOnKeys, listenOnKeysFalse, closeTableField, handleZoomInto, attribute, allowShowPassword, onBlurWidget, defaultValue, isOpenDatePicker, dateFormat, initialFocus, timeZone, fieldName, maxLength, } = this.props; let widgetValue = data != null ? data : widgetData[0].value; const { isEdited, charsTyped } = this.state; // TODO: API SHOULD RETURN THE SAME PROPERTIES FOR FILTERS const widgetField = filterWidget ? fields[0].parameterName : fields[0].field; const readonly = widgetData[0].readonly; let tabIndex = this.props.tabIndex; if (widgetValue === null) { widgetValue = ''; } if (fullScreen || readonly || (modalVisible && !isModal)) { tabIndex = -1; } // TODO: this logic should be removed and adapted below after widgetType === 'MultiListValue' is added const isMultiselect = widgetData[0].widgetType === 'List' && widgetData[0].multiListValue ? true : false; // TODO: ^^^^^^^^^^^^^ const widgetProperties = { ref: (c) => (this.rawWidget = c), //autocomplete=new-password did not work in chrome for non password fields anymore, //switched to autocomplete=off instead autoComplete: 'off', className: 'input-field js-input-field', value: widgetValue, defaultValue, placeholder: fields[0].emptyText, disabled: readonly, onFocus: this.handleFocus, tabIndex: tabIndex, onChange: (e) => handleChange && this.updateTypedCharacters(e.target.value) && handleChange(widgetField, e.target.value), onBlur: (e) => this.handleBlur(widgetField, e.target.value, id), onKeyDown: (e) => this.handleKeyDown(e, widgetField, e.target.value, widgetType), title: widgetValue, id, }; const showErrorBorder = charsTyped && charsTyped[fieldName] > maxLength; let selectedValue = widgetData[0].value ? widgetData[0].value : widgetData[0].defaultValue; switch (widgetType) { case 'Date': if (range) { // TODO: Watch out! The datetimerange widget as exception, // is non-controlled input! For further usage, needs // upgrade. return ( <DatetimeRange onChange={(value, valueTo) => this.handlePatch( widgetField, value ? Moment(value).format(DATE_FORMAT) : null, null, valueTo ? Moment(valueTo).format(DATE_FORMAT) : null ) } field={widgetField} mandatory={widgetData[0].mandatory} validStatus={widgetData[0].validStatus} value={widgetData[0].value} valueTo={widgetData[0].valueTo} {...{ tabIndex, onShow, onHide, timeZone, }} /> ); } else { return ( <div className={this.getClassNames({ icon: true })}> <DatePicker key={1} field={widgetField} timeFormat={false} dateFormat={dateFormat || true} inputProps={{ placeholder: fields[0].emptyText, disabled: readonly, tabIndex: tabIndex, }} value={widgetValue || widgetData[0].value} onChange={(date) => handleChange(widgetField, date)} patch={(date) => this.handlePatch( widgetField, this.generateMomentObj(date, DATE_FORMAT), null, null, true ) } handleChange={handleChange} {...{ handleBackdropLock, isOpenDatePicker, timeZone, }} /> </div> ); } case 'ZonedDateTime': return ( <div className={this.getClassNames({ icon: true })}> <DatePicker key={1} field={widgetField} timeFormat={true} dateFormat={dateFormat || true} hasTimeZone={true} inputProps={{ placeholder: fields[0].emptyText, disabled: readonly, tabIndex: tabIndex, }} value={widgetValue || widgetData[0].value} onChange={(date) => handleChange(widgetField, date)} patch={(date) => this.handlePatch( widgetField, this.generateMomentObj(date, DATE_TIMEZONE_FORMAT), null, null, true ) } handleChange={handleChange} {...{ handleBackdropLock, isOpenDatePicker, timeZone, }} /> </div> ); case 'Time': return ( <div className={this.getClassNames({ icon: true })}> <DatePicker field={widgetField} timeFormat={TIME_FORMAT} dateFormat={false} inputProps={{ placeholder: fields[0].emptyText, disabled: readonly, tabIndex: tabIndex, }} value={widgetValue} onChange={(date) => handleChange(widgetField, date)} patch={(date) => this.handlePatch( widgetField, this.generateMomentObj(date, TIME_FORMAT), null, null, true ) } tabIndex={tabIndex} handleChange={handleChange} handleBackdropLock={handleBackdropLock} /> </div> ); case 'Timestamp': return ( <div className={this.getClassNames({ icon: true })}> <DatePicker field={widgetField} timeFormat={false} dateFormat={DATE_FIELD_FORMATS[widgetType]} inputProps={{ placeholder: fields[0].emptyText, disabled: readonly, tabIndex: tabIndex, }} value={widgetValue} onChange={(date) => handleChange(widgetField, date)} patch={(date) => this.handlePatch( widgetField, this.generateMomentObj(date, `x`), null, null, true ) } tabIndex={tabIndex} handleChange={handleChange} handleBackdropLock={handleBackdropLock} /> </div> ); case 'DateRange': { return ( <DatetimeRange onChange={(value, valueTo) => { const val = Moment(value).format(DATE_FORMAT); const valTo = Moment(valueTo).format(DATE_FORMAT); this.handlePatch(widgetField, { ...(val && { value: val }), ...(valTo && { valueTo: valTo }), }); }} mandatory={widgetData[0].mandatory} validStatus={widgetData[0].validStatus} onShow={onShow} onHide={onHide} value={widgetData[0].value} valueTo={widgetData[0].valueTo} tabIndex={tabIndex} /> ); } case 'Lookup': return ( <Lookup {...{ attribute, }} entity={entity} subentity={subentity} subentityId={subentityId} recent={[]} dataId={dataId} properties={fields} windowType={windowType} widgetData={widgetData} placeholder={ this.props.emptyText ? this.props.emptyText : this.props.fields[0].emptyText } readonly={readonly} mandatory={widgetData[0].mandatory} rank={type} align={gridAlign} isModal={isModal} updated={updated} filterWidget={filterWidget} filterId={filterId} parameterName={fields[0].parameterName} selected={widgetValue} tabId={tabId} rowId={rowId} tabIndex={tabIndex} viewId={viewId} autoFocus={autoFocus} initialFocus={initialFocus} forceFullWidth={this.props.forceFullWidth} forceHeight={this.props.forceHeight} validStatus={widgetData[0].validStatus} newRecordCaption={fields[0].newRecordCaption} newRecordWindowId={fields[0].newRecordWindowId} listenOnKeys={listenOnKeys} listenOnKeysFalse={listenOnKeysFalse} closeTableField={closeTableField} onFocus={this.focus} onBlur={this.handleBlur} onChange={this.handlePatch} onBlurWidget={onBlurWidget} onClickOutside={this.props.onClickOutside} /> ); case 'List': return ( <List {...{ attribute, }} widgetField={widgetField} dataId={dataId} entity={entity} subentity={subentity} subentityId={subentityId} defaultValue={fields[0].emptyText} selected={selectedValue} properties={fields[0]} readonly={readonly} mandatory={widgetData[0].mandatory} windowType={windowType} rowId={rowId} tabId={tabId} onFocus={this.focus} onBlur={this.handleBlur} onChange={this.handlePatch} align={gridAlign} updated={updated} filterWidget={filterWidget} filterId={filterId} parameterName={fields[0].parameterName} emptyText={fields[0].emptyText} tabIndex={tabIndex} viewId={viewId} autoFocus={autoFocus} validStatus={widgetData[0].validStatus} isMultiselect={isMultiselect} /> ); case 'MultiListValue': return ( <List {...{ attribute, }} widgetField={widgetField} dataId={dataId} entity={entity} subentity={subentity} subentityId={subentityId} defaultValue={fields[0].emptyText} selected={widgetData[0].value || null} properties={fields[0]} readonly={readonly} mandatory={widgetData[0].mandatory} windowType={windowType} rowId={rowId} tabId={tabId} onFocus={this.focus} onBlur={this.handleBlur} onChange={this.handlePatch} align={gridAlign} updated={updated} filterWidget={filterWidget} filterId={filterId} parameterName={fields[0].parameterName} emptyText={fields[0].emptyText} tabIndex={tabIndex} viewId={viewId} autoFocus={autoFocus} validStatus={widgetData[0].validStatus} isMultiselect={true} /> ); case 'Link': return ( <Link getClassNames={() => this.getClassNames({ icon: true })} {...{ isEdited, widgetProperties, icon, widgetData, tabIndex, fullScreen, }} /> ); case 'Text': return ( <div> <div className={classnames( this.getClassNames({ icon: true, }), { 'input-focused': isEdited, }, { 'border-danger': showErrorBorder, } )} > <input {...widgetProperties} type="text" /> {icon && <i className="meta-icon-edit input-icon-right" />} </div> {charsTyped && charsTyped[fieldName] >= 0 && ( <CharacterLimitInfo charsTyped={charsTyped[fieldName]} maxLength={maxLength} /> )} </div> ); case 'LongText': return ( <div> <div className={classnames( this.getClassNames({ icon: false, forcedPrimary: true, }), { 'input-focused': isEdited, }, { 'border-danger': showErrorBorder, } )} > <textarea {...widgetProperties} /> </div> {charsTyped && charsTyped[fieldName] >= 0 && ( <CharacterLimitInfo charsTyped={charsTyped[fieldName]} maxLength={maxLength} /> )} </div> ); case 'Password': return ( <div className="input-inner-container"> <div className={classnames( this.getClassNames({ icon: true, }), { 'input-focused': isEdited, } )} > <input {...widgetProperties} type="password" ref={(c) => (this.rawWidget = c)} /> {icon && <i className="meta-icon-edit input-icon-right" />} </div> {allowShowPassword && ( <div onMouseDown={() => { this.rawWidget.type = 'text'; }} onMouseUp={() => { this.rawWidget.type = 'password'; }} className="btn btn-icon btn-meta-outline-secondary btn-inline pointer btn-distance-rev btn-sm" > <i className="meta-icon-show" /> </div> )} </div> ); case 'Integer': case 'Amount': case 'Quantity': return ( <div className={classnames(this.getClassNames(), 'number-field', { 'input-focused': isEdited, })} > <input {...widgetProperties} type="number" min={0} precision={widgetField === 'CableLength' ? 2 : 1} step={subentity === 'quickInput' ? 0.1 : 1} /> </div> ); case 'Number': case 'CostPrice': return ( <div className={classnames(this.getClassNames(), 'number-field', { 'input-focused': isEdited, })} > <input {...widgetProperties} type="number" /> </div> ); case 'YesNo': return ( <Checkbox {...{ widgetData, disabled: readonly, fullScreen, tabIndex, widgetField, id, filterWidget, }} handlePatch={this.handlePatch} /> ); case 'Switch': return ( <label className={classnames('input-switch', { 'input-disabled': readonly, 'input-mandatory': widgetData[0].mandatory && widgetData[0].value.length === 0, 'input-error': widgetData[0].validStatus && !widgetData[0].validStatus.valid, 'input-table': rowId && !isModal, })} tabIndex={tabIndex} ref={(c) => (this.rawWidget = c)} onKeyDown={(e) => { e.key === ' ' && this.handlePatch(widgetField, !widgetData[0].value, id); }} > <input type="checkbox" checked={widgetData[0].value} disabled={readonly} tabIndex="-1" onChange={(e) => this.handlePatch(widgetField, e.target.checked, id) } /> <div className="input-slider" /> </label> ); case 'Label': return ( <div className={classnames('tag tag-warning ', { [`text-${gridAlign}`]: gridAlign, })} tabIndex={tabIndex} ref={(c) => (this.rawWidget = c)} > {widgetData[0].value} </div> ); case 'Button': return ( <button className={ 'btn btn-sm btn-meta-primary ' + (gridAlign ? 'text-' + gridAlign + ' ' : '') + (readonly ? 'tag-disabled disabled ' : '') } onClick={() => this.handlePatch(widgetField)} tabIndex={tabIndex} ref={(c) => (this.rawWidget = c)} > {widgetData[0].value && widgetData[0].value[Object.keys(widgetData[0].value)[0]]} </button> ); case 'ProcessButton': return ( <button className={ 'btn btn-sm btn-meta-primary ' + (gridAlign ? 'text-' + gridAlign + ' ' : '') + (readonly ? 'tag-disabled disabled ' : '') } onClick={this.handleProcess} tabIndex={tabIndex} ref={(c) => (this.rawWidget = c)} > {caption} </button> ); case 'ActionButton': return ( <ActionButton data={widgetData[0]} windowType={windowType} fields={fields} dataId={dataId} docId={docId} activeTab={activeTab} onChange={(option) => this.handlePatch(fields[1].field, option)} tabIndex={tabIndex} dropdownOpenCallback={dropdownOpenCallback} ref={(c) => (this.rawWidget = c)} /> ); case 'ProductAttributes': return ( <Attributes entity={entity} attributeType="pattribute" fields={fields} dataId={dataId} widgetData={widgetData[0]} docType={windowType} tabId={tabId} rowId={rowId} viewId={viewId} onFocus={this.handleFocus} onBlur={this.handleBlur} fieldName={widgetField} handleBackdropLock={handleBackdropLock} patch={(option) => this.handlePatch(widgetField, option)} tabIndex={tabIndex} autoFocus={autoFocus} readonly={readonly} /> ); case 'Address': return ( <Attributes attributeType="address" entity={entity} fields={fields} dataId={dataId} widgetData={widgetData[0]} docType={windowType} tabId={tabId} rowId={rowId} fieldName={widgetField} handleBackdropLock={handleBackdropLock} patch={(option) => this.handlePatch(widgetField, option)} tabIndex={tabIndex} autoFocus={autoFocus} readonly={readonly} isModal={isModal} /> ); case 'Image': return ( <Image fields={fields} data={widgetData[0]} handlePatch={this.handlePatch} readonly={readonly} /> ); case 'ZoomIntoButton': return ( <button className={ 'btn btn-sm btn-meta-primary ' + (gridAlign ? 'text-' + gridAlign + ' ' : '') + (readonly ? 'tag-disabled disabled ' : '') } onClick={() => handleZoomInto(fields[0].field)} tabIndex={tabIndex} ref={(c) => (this.rawWidget = c)} > {caption} </button> ); case 'Labels': { let values = []; const entry = widgetData[0]; if (entry && entry.value && Array.isArray(entry.value.values)) { values = entry.value.values; } return ( <Labels name={widgetField} entity={entity} subentity={subentity} subentityId={subentityId} windowType={windowType} viewId={viewId} selected={values} className={this.getClassNames()} onChange={(value) => this.handlePatch(widgetField, { values: value, }) } tabIndex={tabIndex} /> ); } default: return false; } }; render() { const { caption, description, captionElement, fields, type, noLabel, widgetData, rowId, isModal, handlePatch, widgetType, handleZoomInto, dataEntry, subentity, fieldFormGroupClass, fieldLabelClass, fieldInputClass, } = this.props; const { errorPopup, clearedFieldWarning, tooltipToggled, isEdited, } = this.state; const widgetBody = this.renderWidget(); const { validStatus, warning } = widgetData[0]; const quickInput = subentity === 'quickInput'; // We have to hardcode that exception in case of having // wrong two line rendered one line widgets const oneLineException = ['Switch', 'YesNo', 'Label', 'Button'].indexOf(widgetType) > -1; // Unsupported widget type if (!widgetBody) { // eslint-disable-next-line no-console console.warn( 'The %c' + widgetType, 'font-weight:bold;', 'is unsupported type of widget.' ); return false; } // No display value or not displayed if (!widgetData[0].displayed || widgetData[0].displayed !== true) { return false; } const valueDescription = widgetData[0].value && widgetData[0].value.description ? widgetData[0].value.description : null; const widgetFieldsName = fields .map((field) => 'form-field-' + field.field) .join(' '); let labelClass; let fieldClass; let formGroupClass = ''; if (quickInput) { labelClass = fieldLabelClass; fieldClass = fieldInputClass; formGroupClass = fieldFormGroupClass; } else { labelClass = dataEntry ? 'col-sm-5' : ''; if (!labelClass) { labelClass = type === 'primary' && !oneLineException ? 'col-sm-12 panel-title' : type === 'primaryLongLabels' ? 'col-sm-6' : 'col-sm-3'; } fieldClass = dataEntry ? 'col-sm-7' : ''; if (!fieldClass) { fieldClass = ((type === 'primary' || noLabel) && !oneLineException ? 'col-sm-12 ' : type === 'primaryLongLabels' ? 'col-sm-6' : 'col-sm-9 ') + (fields[0].devices ? 'form-group-flex' : ''); } } const labelProps = {}; if (!noLabel && caption && fields[0].supportZoomInto) { labelProps.onClick = () => handleZoomInto(fields[0].field); } return ( <div className={classnames( 'form-group', formGroupClass, { 'form-group-table': rowId && !isModal, }, widgetFieldsName )} > <div className="row"> {captionElement || null} {!noLabel && caption && ( <label className={classnames('form-control-label', labelClass, { 'input-zoom': quickInput && fields[0].supportZoomInto, 'zoom-into': fields[0].supportZoomInto, })} title={description || caption} {...labelProps} > {caption} </label> )} <div className={fieldClass} onMouseEnter={() => this.handleErrorPopup(true)} onMouseLeave={() => this.handleErrorPopup(false)} > {!clearedFieldWarning && warning && ( <div className={classnames('field-warning', { 'field-warning-message': warning, 'field-error-message': warning && warning.error, })} onMouseEnter={() => this.toggleTooltip(true)} onMouseLeave={() => this.toggleTooltip(false)} > <span>{warning.caption}</span> <i className="meta-icon-close-alt" onClick={() => this.clearFieldWarning(warning)} /> {warning.message && tooltipToggled && ( <Tooltips action={warning.message} type="" /> )} </div> )} <div className={classnames('input-body-container', { focused: isEdited, })} title={valueDescription} > <ReactCSSTransitionGroup transitionName="fade" transitionEnterTimeout={200} transitionLeaveTimeout={200} > {errorPopup && validStatus && !validStatus.valid && !validStatus.initialValue && this.renderErrorPopup(validStatus.reason)} </ReactCSSTransitionGroup> {widgetBody} </div> {fields[0].devices && !widgetData[0].readonly && ( <DevicesWidget devices={fields[0].devices} tabIndex={1} handleChange={(value) => handlePatch && handlePatch(fields[0].field, value) } /> )} </div> </div> </div> ); } } RawWidget.propTypes = RawWidgetPropTypes; RawWidget.defaultProps = RawWidgetDefaultProps; export default connect((state) => ({ modalVisible: state.windowHandler.modal.visible, timeZone: state.appHandler.me.timeZone, }))(RawWidget);
src/components/LogosGrid/index.js
iris-dni/iris-frontend
import React from 'react'; import styles from './platform-supporters.scss'; import Section from 'components/Section'; import Container from 'components/Container'; import Image from 'components/Image'; const LogosGrid = ({ items = [] }) => ( <Section margin> <Container> <ul className={styles.root}> {items.map(item => <li className={styles.item} key={item.name}> <div className={styles.image}> {item.link && <a href={item.link} className={styles.link}> <Image src={item.image} alt={item.name} /> </a> } {!item.link && <Image src={item.image} alt={item.name} /> } </div> </li> )} </ul> </Container> </Section> ); export default LogosGrid;
fields/types/boolean/BooleanFilter.js
udp/keystone
import React from 'react'; import { SegmentedControl } from 'elemental'; const TOGGLE_OPTIONS = [ { label: 'Is Checked', value: true }, { label: 'Is NOT Checked', value: false } ]; function getDefaultValue () { return { value: true }; } var BooleanFilter = React.createClass({ statics: { getDefaultValue: getDefaultValue }, propTypes: { filter: React.PropTypes.shape({ value: React.PropTypes.bool }) }, getDefaultProps () { return { filter: getDefaultValue() }; }, updateValue (value) { this.props.onChange({ value }); }, render () { return <SegmentedControl equalWidthSegments options={TOGGLE_OPTIONS} value={this.props.filter.value} onChange={this.updateValue} />; } }); module.exports = BooleanFilter;
src/components/HtmlView.js
phodal/growth-ng
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { View, Platform } from 'react-native'; import RNFS from 'react-native-fs'; import Api from '../utils/api'; import AppStyle from '../theme/styles'; import Dialog from './dialog'; import CustomWebView from './CustomWebView'; import MarkdownHelper from '../utils/MarkdownHelper'; export const NATIVE = 'native'; export const NET = 'net'; class HtmlView extends Component { static componentName = 'HtmlView'; static propTypes = { type: PropTypes.string, url: PropTypes.string, domain: PropTypes.string, slug: PropTypes.string, dialogContent: PropTypes.string, isFullSlug: PropTypes.bool, }; static defaultProps = { type: NATIVE, url: '', domain: '', slug: '', dialogContent: '', isFullSlug: false, }; constructor(props) { super(props); this.state = { visible: true, html: '', }; } componentDidMount() { if (this.props.type === NET) { Api.get(this.props.url) .then(response => this.setState({ visible: false, html: MarkdownHelper.convert(response.data) })) .catch(err => this.setState({ visible: false, html: err.message, })); } else { const basePath = Platform.OS === 'ios' ? RNFS.MainBundlePath : RNFS.ExternalDirectoryPath; if (basePath) { let slug = ''; if (this.props.isFullSlug) { slug = this.props.slug; } else { slug = `/growth-content/${this.props.domain}/${this.props.slug}.html`; } RNFS.readFile(basePath.concat(slug), 'utf8') .then((result) => { this.setState({ html: result, visible: false, }); }); } } } render() { return ( <View style={[AppStyle.detailBasisStyle, { flex: 1 }]} > { this.props.type === NATIVE ? null : <Dialog show={this.state.visible} content={this.props.dialogContent} /> } <CustomWebView html={this.state.html} /> </View>); } } export default HtmlView;
src/api/reaction-measure.js
biorreator/bioreator-api
import { Router } from 'express' import Measure from '../models/measure' import { r } from '../db' import { densityToBrix, actualGLDegree } from '../helpers/transformations' export default ({ config, db }) => { let router = Router({ mergeParams: true }) router.param('measure', (req, resp, next, id) => { req.measure = Measure.get(id) next() }) router.get('/', async ({ reaction, params }, res) => { try { res.json((await reaction.getJoin({ measures: { _apply (sequence) { return sequence.orderBy(r.desc('time')) } }})).measures || []) } catch (err) { res.status(404).json({ error: err.name + ': ' + err.message }) } }) router.post('/', async ({ reaction, body }, res) => { try { var measure = {} measure.temperature = body.temperature measure.time = new Date() measure.density = body.density measure.ph = body.ph const brix = densityToBrix(body.density) measure.brix = brix var measuresModel = await reaction.getJoin({ measures: { _apply (sequence) { return sequence.orderBy(r.desc('time')) } } }) var measures = measuresModel.measures if (measures.length >= 1) { var lastDensity = measures[0].density var actualGL = actualGLDegree(lastDensity, body.density) console.log(measures[0].alcoholicContents, actualGL) measure.alcoholicContents = measures[0].alcoholicContents + (actualGL * 1) } else { measure.alcoholicContents = 0 } await Measure.save(measure) res.json(await reaction.addRelation('measures', await measure)) } catch (err) { res.status(404).json({ error: err.name + ': ' + err.message }) } }) router.delete('/:measure', async ({ reaction, measure }, res) => { try { res.json(await reaction.removeRelation('measures', await measure)) } catch (err) { res.status(404).json({ error: err.name + ': ' + err.message }) } }) router.get('/graph', async ({ reaction, params }, res) => { try { var measuresModel = await reaction.getJoin({ measures: { _apply (sequence) { return sequence.orderBy(r.desc('time')) } } }) var measures = measuresModel.measures var brixData = measures.map((measure, index) => { return { x: index, y: measure.brix } }) var glData = measures.map((measure, index) => { return { x: index, y: measure.alcoholicContents } }) var array = [glData, brixData] res.json(array) } catch (err) { res.status(404).json({ error: err.name + ': ' + err.message }) } }) return router }
src/renderers/dom/shared/ReactDefaultInjection.js
agileurbanite/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. * * @providesModule ReactDefaultInjection */ 'use strict'; var BeforeInputEventPlugin = require('BeforeInputEventPlugin'); var ChangeEventPlugin = require('ChangeEventPlugin'); var ClientReactRootIndex = require('ClientReactRootIndex'); var DefaultEventPluginOrder = require('DefaultEventPluginOrder'); var EnterLeaveEventPlugin = require('EnterLeaveEventPlugin'); var ExecutionEnvironment = require('ExecutionEnvironment'); var HTMLDOMPropertyConfig = require('HTMLDOMPropertyConfig'); var ReactBrowserComponentMixin = require('ReactBrowserComponentMixin'); var ReactComponentBrowserEnvironment = require('ReactComponentBrowserEnvironment'); var ReactDefaultBatchingStrategy = require('ReactDefaultBatchingStrategy'); var ReactDOMComponent = require('ReactDOMComponent'); var ReactDOMTextComponent = require('ReactDOMTextComponent'); var ReactEventListener = require('ReactEventListener'); var ReactInjection = require('ReactInjection'); var ReactInstanceHandles = require('ReactInstanceHandles'); var ReactMount = require('ReactMount'); var ReactReconcileTransaction = require('ReactReconcileTransaction'); var SelectEventPlugin = require('SelectEventPlugin'); var ServerReactRootIndex = require('ServerReactRootIndex'); var SimpleEventPlugin = require('SimpleEventPlugin'); var SVGDOMPropertyConfig = require('SVGDOMPropertyConfig'); var alreadyInjected = false; function inject() { if (alreadyInjected) { // TODO: This is currently true because these injections are shared between // the client and the server package. They should be built independently // and not share any injection state. Then this problem will be solved. return; } alreadyInjected = true; ReactInjection.EventEmitter.injectReactEventListener( ReactEventListener ); /** * Inject modules for resolving DOM hierarchy and plugin ordering. */ ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder); ReactInjection.EventPluginHub.injectInstanceHandle(ReactInstanceHandles); ReactInjection.EventPluginHub.injectMount(ReactMount); /** * Some important event plugins included by default (without having to require * them). */ ReactInjection.EventPluginHub.injectEventPluginsByName({ SimpleEventPlugin: SimpleEventPlugin, EnterLeaveEventPlugin: EnterLeaveEventPlugin, ChangeEventPlugin: ChangeEventPlugin, SelectEventPlugin: SelectEventPlugin, BeforeInputEventPlugin: BeforeInputEventPlugin, }); ReactInjection.NativeComponent.injectGenericComponentClass( ReactDOMComponent ); ReactInjection.NativeComponent.injectTextComponentClass( ReactDOMTextComponent ); ReactInjection.Class.injectMixin(ReactBrowserComponentMixin); ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig); ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig); ReactInjection.EmptyComponent.injectEmptyComponent('noscript'); ReactInjection.Updates.injectReconcileTransaction( ReactReconcileTransaction ); ReactInjection.Updates.injectBatchingStrategy( ReactDefaultBatchingStrategy ); ReactInjection.RootIndex.injectCreateReactRootIndex( ExecutionEnvironment.canUseDOM ? ClientReactRootIndex.createReactRootIndex : ServerReactRootIndex.createReactRootIndex ); ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment); if (__DEV__) { var url = (ExecutionEnvironment.canUseDOM && window.location.href) || ''; if ((/[?&]react_perf\b/).test(url)) { var ReactDefaultPerf = require('ReactDefaultPerf'); ReactDefaultPerf.start(); } } } module.exports = { inject: inject, };
packages/material-ui-icons/src/PhotoSizeSelectActualOutlined.js
Kagami/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path fill="none" d="M0 0h24v24H0V0z" /><g><path d="M21 3H3C2 3 1 4 1 5v14c0 1.1.9 2 2 2h18c1 0 2-1 2-2V5c0-1-1-2-2-2zm0 15.92c-.02.03-.06.06-.08.08H3V5.08L3.08 5h17.83c.03.02.06.06.08.08v13.84z" /><path d="M11 15.51L8.5 12.5 5 17h14l-4.5-6z" /></g></React.Fragment> , 'PhotoSizeSelectActualOutlined');
src/client/components/pages/entities/image.js
bookbrainz/bookbrainz-site
/* * Copyright (C) 2017 Ben Ockmore * * 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. * * 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 General Public License for more details. * * You should have received a copy of the GNU 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 * as bootstrap from 'react-bootstrap'; import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; import PropTypes from 'prop-types'; import React from 'react'; import {faSlash} from '@fortawesome/free-solid-svg-icons'; const {Image} = bootstrap; function EntityImage({backupIcon, deleted, imageUrl}) { if (imageUrl) { return ( <Image responsive src={imageUrl} /> ); } if (deleted) { return ( <div className="entity-display-icon fa-layers fa-fw"> <FontAwesomeIcon icon={backupIcon} key="entityIcon" size="5x" stack="1x" />, <FontAwesomeIcon icon={faSlash} key="deletedIcon" size="5x" stack="1x" /> </div>); } return ( <div className="entity-display-icon"> <FontAwesomeIcon icon={backupIcon} size="5x" /> </div> ); } EntityImage.displayName = 'EntityImage'; EntityImage.propTypes = { backupIcon: PropTypes.object.isRequired, deleted: PropTypes.bool, imageUrl: PropTypes.string }; EntityImage.defaultProps = { deleted: false, imageUrl: '' }; export default EntityImage;
src/react/js/app/main.js
lopezhansel/OctoDex
import React from 'react'; import Router from 'react-router'; import ReactDOM from 'react-dom'; import createBrowserHistory from 'history/lib/createBrowserHistory'; let history = createBrowserHistory();
app/javascript/mastodon/components/missing_indicator.js
honpya/taketodon
import React from 'react'; import { FormattedMessage } from 'react-intl'; const MissingIndicator = () => ( <div className='regeneration-indicator missing-indicator'> <div> <div className='regeneration-indicator__figure' /> <div className='regeneration-indicator__label'> <FormattedMessage id='missing_indicator.label' tagName='strong' defaultMessage='Not found' /> <FormattedMessage id='missing_indicator.sublabel' defaultMessage='This resource could not be found' /> </div> </div> </div> ); export default MissingIndicator;
ajax/libs/forerunnerdb/1.3.835/fdb-core+views.js
sufuf3/cdnjs
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ var Core = _dereq_('./core'), View = _dereq_('../lib/View'); if (typeof window !== 'undefined') { window.ForerunnerDB = Core; } module.exports = Core; },{"../lib/View":34,"./core":2}],2:[function(_dereq_,module,exports){ var Core = _dereq_('../lib/Core'), ShimIE8 = _dereq_('../lib/Shim.IE8'); if (typeof window !== 'undefined') { window.ForerunnerDB = Core; } module.exports = Core; },{"../lib/Core":9,"../lib/Shim.IE8":33}],3:[function(_dereq_,module,exports){ "use strict"; var Shared = _dereq_('./Shared'), Path = _dereq_('./Path'), sharedPathSolver; /** * Creates an always-sorted multi-key bucket that allows ForerunnerDB to * know the index that a document will occupy in an array with minimal * processing, speeding up things like sorted views. * @param {object} orderBy An order object. * @constructor */ var ActiveBucket = function (orderBy) { this._primaryKey = '_id'; this._keyArr = []; this._data = []; this._objLookup = {}; this._count = 0; this._keyArr = sharedPathSolver.parse(orderBy, true); }; Shared.addModule('ActiveBucket', ActiveBucket); Shared.mixin(ActiveBucket.prototype, 'Mixin.Sorting'); sharedPathSolver = new Path(); /** * Gets / sets the primary key used by the active bucket. * @returns {String} The current primary key. */ Shared.synthesize(ActiveBucket.prototype, 'primaryKey'); /** * Quicksorts a single document into the passed array and * returns the index that the document should occupy. * @param {object} obj The document to calculate index for. * @param {array} arr The array the document index will be * calculated for. * @param {string} item The string key representation of the * document whose index is being calculated. * @param {function} fn The comparison function that is used * to determine if a document is sorted below or above the * document we are calculating the index for. * @returns {number} The index the document should occupy. */ ActiveBucket.prototype.qs = function (obj, arr, item, fn) { // If the array is empty then return index zero if (!arr.length) { return 0; } var lastMidwayIndex = -1, midwayIndex, lookupItem, result, start = 0, end = arr.length - 1; // Loop the data until our range overlaps while (end >= start) { // Calculate the midway point (divide and conquer) midwayIndex = Math.floor((start + end) / 2); if (lastMidwayIndex === midwayIndex) { // No more items to scan break; } // Get the item to compare against lookupItem = arr[midwayIndex]; if (lookupItem !== undefined) { // Compare items result = fn(this, obj, item, lookupItem); if (result > 0) { start = midwayIndex + 1; } if (result < 0) { end = midwayIndex - 1; } } lastMidwayIndex = midwayIndex; } if (result > 0) { return midwayIndex + 1; } else { return midwayIndex; } }; /** * Calculates the sort position of an item against another item. * @param {object} sorter An object or instance that contains * sortAsc and sortDesc methods. * @param {object} obj The document to compare. * @param {string} a The first key to compare. * @param {string} b The second key to compare. * @returns {number} Either 1 for sort a after b or -1 to sort * a before b. * @private */ ActiveBucket.prototype._sortFunc = function (sorter, obj, a, b) { var aVals = a.split('.:.'), bVals = b.split('.:.'), arr = sorter._keyArr, count = arr.length, index, sortType, castType; for (index = 0; index < count; index++) { sortType = arr[index]; castType = typeof sharedPathSolver.get(obj, sortType.path); if (castType === 'number') { aVals[index] = Number(aVals[index]); bVals[index] = Number(bVals[index]); } // Check for non-equal items if (aVals[index] !== bVals[index]) { // Return the sorted items if (sortType.value === 1) { return sorter.sortAsc(aVals[index], bVals[index]); } if (sortType.value === -1) { return sorter.sortDesc(aVals[index], bVals[index]); } } } }; /** * Inserts a document into the active bucket. * @param {object} obj The document to insert. * @returns {number} The index the document now occupies. */ ActiveBucket.prototype.insert = function (obj) { var key, keyIndex; key = this.documentKey(obj); keyIndex = this._data.indexOf(key); if (keyIndex === -1) { // Insert key keyIndex = this.qs(obj, this._data, key, this._sortFunc); this._data.splice(keyIndex, 0, key); } else { this._data.splice(keyIndex, 0, key); } this._objLookup[obj[this._primaryKey]] = key; this._count++; return keyIndex; }; /** * Removes a document from the active bucket. * @param {object} obj The document to remove. * @returns {boolean} True if the document was removed * successfully or false if it wasn't found in the active * bucket. */ ActiveBucket.prototype.remove = function (obj) { var key, keyIndex; key = this._objLookup[obj[this._primaryKey]]; if (key) { keyIndex = this._data.indexOf(key); if (keyIndex > -1) { this._data.splice(keyIndex, 1); delete this._objLookup[obj[this._primaryKey]]; this._count--; return true; } else { return false; } } return false; }; /** * Get the index that the passed document currently occupies * or the index it will occupy if added to the active bucket. * @param {object} obj The document to get the index for. * @returns {number} The index. */ ActiveBucket.prototype.index = function (obj) { var key, keyIndex; key = this.documentKey(obj); keyIndex = this._data.indexOf(key); if (keyIndex === -1) { // Get key index keyIndex = this.qs(obj, this._data, key, this._sortFunc); } return keyIndex; }; /** * The key that represents the passed document. * @param {object} obj The document to get the key for. * @returns {string} The document key. */ ActiveBucket.prototype.documentKey = function (obj) { var key = '', arr = this._keyArr, count = arr.length, index, sortType; for (index = 0; index < count; index++) { sortType = arr[index]; if (key) { key += '.:.'; } key += sharedPathSolver.get(obj, sortType.path); } // Add the unique identifier on the end of the key key += '.:.' + obj[this._primaryKey]; return key; }; /** * Get the number of documents currently indexed in the active * bucket instance. * @returns {number} The number of documents. */ ActiveBucket.prototype.count = function () { return this._count; }; Shared.finishModule('ActiveBucket'); module.exports = ActiveBucket; },{"./Path":29,"./Shared":32}],4:[function(_dereq_,module,exports){ "use strict"; var Shared = _dereq_('./Shared'), Path = _dereq_('./Path'), sharedPathSolver = new Path(); var BinaryTree = function (data, compareFunc, hashFunc) { this.init.apply(this, arguments); }; BinaryTree.prototype.init = function (data, index, primaryKey, compareFunc, hashFunc) { this._store = []; this._keys = []; if (primaryKey !== undefined) { this.primaryKey(primaryKey); } if (index !== undefined) { this.index(index); } if (compareFunc !== undefined) { this.compareFunc(compareFunc); } if (hashFunc !== undefined) { this.hashFunc(hashFunc); } if (data !== undefined) { this.data(data); } }; Shared.addModule('BinaryTree', BinaryTree); Shared.mixin(BinaryTree.prototype, 'Mixin.ChainReactor'); Shared.mixin(BinaryTree.prototype, 'Mixin.Sorting'); Shared.mixin(BinaryTree.prototype, 'Mixin.Common'); Shared.synthesize(BinaryTree.prototype, 'compareFunc'); Shared.synthesize(BinaryTree.prototype, 'hashFunc'); Shared.synthesize(BinaryTree.prototype, 'indexDir'); Shared.synthesize(BinaryTree.prototype, 'primaryKey'); Shared.synthesize(BinaryTree.prototype, 'keys'); Shared.synthesize(BinaryTree.prototype, 'index', function (index) { if (index !== undefined) { if (this.debug()) { console.log('Setting index', index, sharedPathSolver.parse(index, true)); } // Convert the index object to an array of key val objects this.keys(sharedPathSolver.parse(index, true)); } return this.$super.call(this, index); }); /** * Remove all data from the binary tree. */ BinaryTree.prototype.clear = function () { delete this._data; delete this._left; delete this._right; this._store = []; }; /** * Sets this node's data object. All further inserted documents that * match this node's key and value will be pushed via the push() * method into the this._store array. When deciding if a new data * should be created left, right or middle (pushed) of this node the * new data is checked against the data set via this method. * @param val * @returns {*} */ BinaryTree.prototype.data = function (val) { if (val !== undefined) { this._data = val; if (this._hashFunc) { this._hash = this._hashFunc(val); } return this; } return this._data; }; /** * Pushes an item to the binary tree node's store array. * @param {*} val The item to add to the store. * @returns {*} */ BinaryTree.prototype.push = function (val) { if (val !== undefined) { this._store.push(val); return this; } return false; }; /** * Pulls an item from the binary tree node's store array. * @param {*} val The item to remove from the store. * @returns {*} */ BinaryTree.prototype.pull = function (val) { if (val !== undefined) { var index = this._store.indexOf(val); if (index > -1) { this._store.splice(index, 1); return this; } } return false; }; /** * Default compare method. Can be overridden. * @param a * @param b * @returns {number} * @private */ BinaryTree.prototype._compareFunc = function (a, b) { // Loop the index array var i, indexData, result = 0; for (i = 0; i < this._keys.length; i++) { indexData = this._keys[i]; if (indexData.value === 1) { result = this.sortAsc(sharedPathSolver.get(a, indexData.path), sharedPathSolver.get(b, indexData.path)); } else if (indexData.value === -1) { result = this.sortDesc(sharedPathSolver.get(a, indexData.path), sharedPathSolver.get(b, indexData.path)); } if (this.debug()) { console.log('Compared %s with %s order %d in path %s and result was %d', sharedPathSolver.get(a, indexData.path), sharedPathSolver.get(b, indexData.path), indexData.value, indexData.path, result); } if (result !== 0) { if (this.debug()) { console.log('Retuning result %d', result); } return result; } } if (this.debug()) { console.log('Retuning result %d', result); } return result; }; /** * Default hash function. Can be overridden. * @param obj * @private */ BinaryTree.prototype._hashFunc = function (obj) { /*var i, indexData, hash = ''; for (i = 0; i < this._keys.length; i++) { indexData = this._keys[i]; if (hash) { hash += '_'; } hash += obj[indexData.path]; } return hash;*/ return obj[this._keys[0].path]; }; /** * Removes (deletes reference to) either left or right child if the passed * node matches one of them. * @param {BinaryTree} node The node to remove. */ BinaryTree.prototype.removeChildNode = function (node) { if (this._left === node) { // Remove left delete this._left; } else if (this._right === node) { // Remove right delete this._right; } }; /** * Returns the branch this node matches (left or right). * @param node * @returns {String} */ BinaryTree.prototype.nodeBranch = function (node) { if (this._left === node) { return 'left'; } else if (this._right === node) { return 'right'; } }; /** * Inserts a document into the binary tree. * @param data * @returns {*} */ BinaryTree.prototype.insert = function (data) { var result, inserted, failed, i; if (data instanceof Array) { // Insert array of data inserted = []; failed = []; for (i = 0; i < data.length; i++) { if (this.insert(data[i])) { inserted.push(data[i]); } else { failed.push(data[i]); } } return { inserted: inserted, failed: failed }; } if (this.debug()) { console.log('Inserting', data); } if (!this._data) { if (this.debug()) { console.log('Node has no data, setting data', data); } // Insert into this node (overwrite) as there is no data this.data(data); //this.push(data); return true; } result = this._compareFunc(this._data, data); if (result === 0) { if (this.debug()) { console.log('Data is equal (currrent, new)', this._data, data); } //this.push(data); // Less than this node if (this._left) { // Propagate down the left branch this._left.insert(data); } else { // Assign to left branch this._left = new BinaryTree(data, this._index, this._binaryTree, this._compareFunc, this._hashFunc); this._left._parent = this; } return true; } if (result === -1) { if (this.debug()) { console.log('Data is greater (currrent, new)', this._data, data); } // Greater than this node if (this._right) { // Propagate down the right branch this._right.insert(data); } else { // Assign to right branch this._right = new BinaryTree(data, this._index, this._binaryTree, this._compareFunc, this._hashFunc); this._right._parent = this; } return true; } if (result === 1) { if (this.debug()) { console.log('Data is less (currrent, new)', this._data, data); } // Less than this node if (this._left) { // Propagate down the left branch this._left.insert(data); } else { // Assign to left branch this._left = new BinaryTree(data, this._index, this._binaryTree, this._compareFunc, this._hashFunc); this._left._parent = this; } return true; } return false; }; BinaryTree.prototype.remove = function (data) { var pk = this.primaryKey(), result, removed, i; if (data instanceof Array) { // Insert array of data removed = []; for (i = 0; i < data.length; i++) { if (this.remove(data[i])) { removed.push(data[i]); } } return removed; } if (this.debug()) { console.log('Removing', data); } if (this._data[pk] === data[pk]) { // Remove this node return this._remove(this); } // Compare the data to work out which branch to send the remove command down result = this._compareFunc(this._data, data); if (result === -1 && this._right) { return this._right.remove(data); } if (result === 1 && this._left) { return this._left.remove(data); } return false; }; BinaryTree.prototype._remove = function (node) { var leftNode, rightNode; if (this._left) { // Backup branch data leftNode = this._left; rightNode = this._right; // Copy data from left node this._left = leftNode._left; this._right = leftNode._right; this._data = leftNode._data; this._store = leftNode._store; if (rightNode) { // Attach the rightNode data to the right-most node // of the leftNode leftNode.rightMost()._right = rightNode; } } else if (this._right) { // Backup branch data rightNode = this._right; // Copy data from right node this._left = rightNode._left; this._right = rightNode._right; this._data = rightNode._data; this._store = rightNode._store; } else { this.clear(); } return true; }; BinaryTree.prototype.leftMost = function () { if (!this._left) { return this; } else { return this._left.leftMost(); } }; BinaryTree.prototype.rightMost = function () { if (!this._right) { return this; } else { return this._right.rightMost(); } }; /** * Searches the binary tree for all matching documents based on the data * passed (query). * @param {Object} data The data / document to use for lookups. * @param {Object} options An options object. * @param {Operation} op An optional operation instance. Pass undefined * if not being used. * @param {Array=} resultArr The results passed between recursive calls. * Do not pass anything into this argument when calling externally. * @returns {*|Array} */ BinaryTree.prototype.lookup = function (data, options, op, resultArr) { var result = this._compareFunc(this._data, data); resultArr = resultArr || []; if (result === 0) { if (this._left) { this._left.lookup(data, options, op, resultArr); } resultArr.push(this._data); if (this._right) { this._right.lookup(data, options, op, resultArr); } } if (result === -1) { if (this._right) { this._right.lookup(data, options, op, resultArr); } } if (result === 1) { if (this._left) { this._left.lookup(data, options, op, resultArr); } } return resultArr; }; /** * Returns the entire binary tree ordered. * @param {String} type * @param resultArr * @returns {*|Array} */ BinaryTree.prototype.inOrder = function (type, resultArr) { resultArr = resultArr || []; if (this._left) { this._left.inOrder(type, resultArr); } switch (type) { case 'hash': resultArr.push(this._hash); break; case 'data': resultArr.push(this._data); break; default: resultArr.push({ key: this._data, arr: this._store }); break; } if (this._right) { this._right.inOrder(type, resultArr); } return resultArr; }; /** * Searches the binary tree for all matching documents based on the regular * expression passed. * @param path * @param val * @param regex * @param {Array=} resultArr The results passed between recursive calls. * Do not pass anything into this argument when calling externally. * @returns {*|Array} */ BinaryTree.prototype.startsWith = function (path, val, regex, resultArr) { var reTest, thisDataPathVal = sharedPathSolver.get(this._data, path), thisDataPathValSubStr = thisDataPathVal.substr(0, val.length), result; //regex = regex || new RegExp('^' + val); resultArr = resultArr || []; if (resultArr._visitedCount === undefined) { resultArr._visitedCount = 0; } resultArr._visitedCount++; resultArr._visitedNodes = resultArr._visitedNodes || []; resultArr._visitedNodes.push(thisDataPathVal); result = this.sortAsc(thisDataPathValSubStr, val); reTest = thisDataPathValSubStr === val; if (result === 0) { if (this._left) { this._left.startsWith(path, val, regex, resultArr); } if (reTest) { resultArr.push(this._data); } if (this._right) { this._right.startsWith(path, val, regex, resultArr); } } if (result === -1) { if (reTest) { resultArr.push(this._data); } if (this._right) { this._right.startsWith(path, val, regex, resultArr); } } if (result === 1) { if (this._left) { this._left.startsWith(path, val, regex, resultArr); } if (reTest) { resultArr.push(this._data); } } return resultArr; }; /*BinaryTree.prototype.find = function (type, search, resultArr) { resultArr = resultArr || []; if (this._left) { this._left.find(type, search, resultArr); } // Check if this node's data is greater or less than the from value var fromResult = this.sortAsc(this._data[key], from), toResult = this.sortAsc(this._data[key], to); if ((fromResult === 0 || fromResult === 1) && (toResult === 0 || toResult === -1)) { // This data node is greater than or equal to the from value, // and less than or equal to the to value so include it switch (type) { case 'hash': resultArr.push(this._hash); break; case 'data': resultArr.push(this._data); break; default: resultArr.push({ key: this._data, arr: this._store }); break; } } if (this._right) { this._right.find(type, search, resultArr); } return resultArr; };*/ /** * * @param {String} type * @param {String} key The data key / path to range search against. * @param {Number} from Range search from this value (inclusive) * @param {Number} to Range search to this value (inclusive) * @param {Array=} resultArr Leave undefined when calling (internal use), * passes the result array between recursive calls to be returned when * the recursion chain completes. * @param {Path=} pathResolver Leave undefined when calling (internal use), * caches the path resolver instance for performance. * @returns {Array} Array of matching document objects */ BinaryTree.prototype.findRange = function (type, key, from, to, resultArr, pathResolver) { resultArr = resultArr || []; pathResolver = pathResolver || new Path(key); if (this._left) { this._left.findRange(type, key, from, to, resultArr, pathResolver); } // Check if this node's data is greater or less than the from value var pathVal = pathResolver.value(this._data), fromResult = this.sortAsc(pathVal, from), toResult = this.sortAsc(pathVal, to); if ((fromResult === 0 || fromResult === 1) && (toResult === 0 || toResult === -1)) { // This data node is greater than or equal to the from value, // and less than or equal to the to value so include it switch (type) { case 'hash': resultArr.push(this._hash); break; case 'data': resultArr.push(this._data); break; default: resultArr.push({ key: this._data, arr: this._store }); break; } } if (this._right) { this._right.findRange(type, key, from, to, resultArr, pathResolver); } return resultArr; }; /*BinaryTree.prototype.findRegExp = function (type, key, pattern, resultArr) { resultArr = resultArr || []; if (this._left) { this._left.findRegExp(type, key, pattern, resultArr); } // Check if this node's data is greater or less than the from value var fromResult = this.sortAsc(this._data[key], from), toResult = this.sortAsc(this._data[key], to); if ((fromResult === 0 || fromResult === 1) && (toResult === 0 || toResult === -1)) { // This data node is greater than or equal to the from value, // and less than or equal to the to value so include it switch (type) { case 'hash': resultArr.push(this._hash); break; case 'data': resultArr.push(this._data); break; default: resultArr.push({ key: this._data, arr: this._store }); break; } } if (this._right) { this._right.findRegExp(type, key, pattern, resultArr); } return resultArr; };*/ /** * Determines if the passed query and options object will be served * by this index successfully or not and gives a score so that the * DB search system can determine how useful this index is in comparison * to other indexes on the same collection. * @param query * @param queryOptions * @param matchOptions * @returns {{matchedKeys: Array, totalKeyCount: Number, score: number}} */ BinaryTree.prototype.match = function (query, queryOptions, matchOptions) { // Check if the passed query has data in the keys our index // operates on and if so, is the query sort matching our order var indexKeyArr, queryArr, matchedKeys = [], matchedKeyCount = 0, i; indexKeyArr = sharedPathSolver.parseArr(this._index, { verbose: true }); queryArr = sharedPathSolver.parseArr(query, matchOptions && matchOptions.pathOptions ? matchOptions.pathOptions : { ignore:/\$/, verbose: true }); // Loop the query array and check the order of keys against the // index key array to see if this index can be used for (i = 0; i < indexKeyArr.length; i++) { if (queryArr[i] === indexKeyArr[i]) { matchedKeyCount++; matchedKeys.push(queryArr[i]); } } return { matchedKeys: matchedKeys, totalKeyCount: queryArr.length, score: matchedKeyCount }; //return sharedPathSolver.countObjectPaths(this._keys, query); }; Shared.finishModule('BinaryTree'); module.exports = BinaryTree; },{"./Path":29,"./Shared":32}],5:[function(_dereq_,module,exports){ "use strict"; var crcTable, checksum; crcTable = (function () { var crcTable = [], c, n, k; for (n = 0; n < 256; n++) { c = n; for (k = 0; k < 8; k++) { c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); // jshint ignore:line } crcTable[n] = c; } return crcTable; }()); /** * Returns a checksum of a string. * @param {String} str The string to checksum. * @return {Number} The checksum generated. */ checksum = function(str) { var crc = 0 ^ (-1), // jshint ignore:line i; for (i = 0; i < str.length; i++) { crc = (crc >>> 8) ^ crcTable[(crc ^ str.charCodeAt(i)) & 0xFF]; // jshint ignore:line } return (crc ^ (-1)) >>> 0; // jshint ignore:line }; module.exports = checksum; },{}],6:[function(_dereq_,module,exports){ "use strict"; var Shared, Db, Metrics, KeyValueStore, Path, IndexHashMap, IndexBinaryTree, Index2d, Overload, ReactorIO, Condition, sharedPathSolver; Shared = _dereq_('./Shared'); /** * Creates a new collection. Collections store multiple documents and * handle CRUD against those documents. * @constructor */ var Collection = function (name, options) { this.init.apply(this, arguments); }; Collection.prototype.init = function (name, options) { this.sharedPathSolver = sharedPathSolver; this._primaryKey = '_id'; this._primaryIndex = new KeyValueStore('primary'); this._primaryCrc = new KeyValueStore('primaryCrc'); this._crcLookup = new KeyValueStore('crcLookup'); this._name = name; this._data = []; this._metrics = new Metrics(); this._options = options || { changeTimestamp: false }; if (this._options.db) { this.db(this._options.db); } // Create an object to store internal protected data 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 = true; // Set the subset to itself since it is the root collection this.subsetOf(this); }; Shared.addModule('Collection', Collection); Shared.mixin(Collection.prototype, 'Mixin.Common'); Shared.mixin(Collection.prototype, 'Mixin.Events'); Shared.mixin(Collection.prototype, 'Mixin.ChainReactor'); Shared.mixin(Collection.prototype, 'Mixin.CRUD'); Shared.mixin(Collection.prototype, 'Mixin.Constants'); Shared.mixin(Collection.prototype, 'Mixin.Triggers'); Shared.mixin(Collection.prototype, 'Mixin.Sorting'); Shared.mixin(Collection.prototype, 'Mixin.Matching'); Shared.mixin(Collection.prototype, 'Mixin.Updating'); Shared.mixin(Collection.prototype, 'Mixin.Tags'); Metrics = _dereq_('./Metrics'); KeyValueStore = _dereq_('./KeyValueStore'); Path = _dereq_('./Path'); IndexHashMap = _dereq_('./IndexHashMap'); IndexBinaryTree = _dereq_('./IndexBinaryTree'); Index2d = _dereq_('./Index2d'); Db = Shared.modules.Db; Overload = _dereq_('./Overload'); ReactorIO = _dereq_('./ReactorIO'); Condition = _dereq_('./Condition'); sharedPathSolver = new Path(); /** * Gets / sets the deferred calls flag. If set to true (default) * then operations on large data sets can be broken up and done * over multiple CPU cycles (creating an async state). For purely * synchronous behaviour set this to false. * @param {Boolean=} val The value to set. * @returns {Boolean} */ Shared.synthesize(Collection.prototype, 'deferredCalls'); /** * Gets / sets the current state. * @param {String=} val The name of the state to set. * @returns {*} */ Shared.synthesize(Collection.prototype, 'state'); /** * Gets / sets the name of the collection. * @param {String=} val The name of the collection to set. * @returns {*} */ Shared.synthesize(Collection.prototype, 'name'); /** * Gets / sets the metadata stored in the collection. * @param {Object=} val The data to set. * @returns {*} */ Shared.synthesize(Collection.prototype, 'metaData'); /** * Gets / sets boolean to determine if the collection should be * capped or not. * @param {Boolean=} val The value to set. * @returns {*} */ Shared.synthesize(Collection.prototype, 'capped'); /** * Gets / sets capped collection size. This is the maximum number * of records that the capped collection will store. * @param {Number=} val The value to set. * @returns {*} */ Shared.synthesize(Collection.prototype, 'cappedSize'); /** * Adds a job id to the async queue to signal to other parts * of the application that some async work is currently being * done. * @param {String} key The id of the async job. * @private */ Collection.prototype._asyncPending = function (key) { this._deferQueue.async.push(key); }; /** * Removes a job id from the async queue to signal to other * parts of the application that some async work has been * completed. If no further async jobs exist on the queue then * the "ready" event is emitted from this collection instance. * @param {String} key The id of the async job. * @private */ Collection.prototype._asyncComplete = function (key) { // Remove async flag for this type var index = this._deferQueue.async.indexOf(key); while (index > -1) { this._deferQueue.async.splice(index, 1); index = this._deferQueue.async.indexOf(key); } if (this._deferQueue.async.length === 0) { this.deferEmit('ready'); } }; /** * Get the data array that represents the collection's data. * This data is returned by reference and should not be altered outside * of the provided CRUD functionality of the collection as doing so * may cause unstable index behaviour within the collection. * @returns {Array} */ Collection.prototype.data = function () { return this._data; }; /** * Drops a collection and all it's stored data from the database. * @param {Function=} callback A callback method to call once the * operation has completed. * @returns {boolean} True on success, false on failure. */ Collection.prototype.drop = function (callback) { var key; if (!this.isDropped()) { 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]; // Remove any reactor IO chain links if (this._collate) { for (key in this._collate) { if (this._collate.hasOwnProperty(key)) { this.collateRemove(key); } } } delete this._primaryKey; delete this._primaryIndex; delete this._primaryCrc; delete this._crcLookup; delete this._data; delete this._metrics; delete this._listeners; if (callback) { callback.call(this, false, true); } return true; } } else { if (callback) { callback.call(this, false, true); } return true; } if (callback) { callback.call(this, false, true); } return false; }; /** * Gets / sets the primary key for this collection. * @param {String=} keyName The name of the primary key. * @returns {*} */ Collection.prototype.primaryKey = function (keyName) { if (keyName !== undefined) { if (this._primaryKey !== keyName) { var oldKey = this._primaryKey; this._primaryKey = keyName; // Set the primary key index primary key this._primaryIndex.primaryKey(keyName); // Rebuild the primary key index this.rebuildPrimaryKeyIndex(); // Propagate change down the chain this.chainSend('primaryKey', { keyName: keyName, oldData: oldKey }); } return this; } return this._primaryKey; }; /** * Handles insert events and routes changes to binds and views as required. * @param {Array} inserted An array of inserted documents. * @param {Array} failed An array of documents that failed to insert. * @private */ Collection.prototype._onInsert = function (inserted, failed) { this.emit('insert', inserted, failed); }; /** * Handles update events and routes changes to binds and views as required. * @param {Array} items An array of updated documents. * @private */ Collection.prototype._onUpdate = function (items) { this.emit('update', items); }; /** * Handles remove events and routes changes to binds and views as required. * @param {Array} items An array of removed documents. * @private */ Collection.prototype._onRemove = function (items) { this.emit('remove', items); }; /** * Handles any change to the collection by updating the * lastChange timestamp on the collection's metaData. This * only happens if the changeTimestamp option is enabled * on the collection (it is disabled by default). * @private */ Collection.prototype._onChange = function () { if (this._options.changeTimestamp) { // Record the last change timestamp this._metaData.lastChange = this.serialiser.convert(new Date()); } }; /** * Gets / sets the db instance this class instance belongs to. * @param {Db=} db The db instance. * @returns {*} */ Shared.synthesize(Collection.prototype, 'db', function (db) { if (db) { if (this.primaryKey() === '_id') { // Set primary key to the db's key by default this.primaryKey(db.primaryKey()); // Apply the same debug settings this.debug(db.debug()); } } return this.$super.apply(this, arguments); }); /** * Gets / sets mongodb emulation mode. * @param {Boolean=} val True to enable, false to disable. * @returns {*} */ Shared.synthesize(Collection.prototype, 'mongoEmulation'); Collection.prototype.setData = new Overload('Collection.prototype.setData', { /** * Sets the collection's data to the array / documents passed. If any * data already exists in the collection it will be removed before the * new data is set via the remove() method, and the remove event will * fire as well. * @name setData * @param {Array|Object} data The array of documents or a single document * that will be set as the collections data. */ '*': function (data) { return this.$main.call(this, data, {}); }, /** * Sets the collection's data to the array / documents passed. If any * data already exists in the collection it will be removed before the * new data is set via the remove() method, and the remove event will * fire as well. * @name setData * @param {Array|Object} data The array of documents or a single document * that will be set as the collections data. * @param {Object} options Optional options object. */ '*, object': function (data, options) { return this.$main.call(this, data, options); }, /** * Sets the collection's data to the array / documents passed. If any * data already exists in the collection it will be removed before the * new data is set via the remove() method, and the remove event will * fire as well. * @name setData * @param {Array|Object} data The array of documents or a single document * that will be set as the collections data. * @param {Function} callback Optional callback function. */ '*, function': function (data, callback) { return this.$main.call(this, data, {}, callback); }, /** * Sets the collection's data to the array / documents passed. If any * data already exists in the collection it will be removed before the * new data is set via the remove() method, and the remove event will * fire as well. * @name setData * @param {Array|Object} data The array of documents or a single document * that will be set as the collections data. * @param {*} options Optional options object. * @param {Function} callback Optional callback function. */ '*, *, function': function (data, options, callback) { return this.$main.call(this, data, options, callback); }, /** * Sets the collection's data to the array / documents passed. If any * data already exists in the collection it will be removed before the * new data is set via the remove() method, and the remove event will * fire as well. * @name setData * @param {Array|Object} data The array of documents or a single document * that will be set as the collections data. * @param {*} options Optional options object. * @param {*} callback Optional callback function. */ '*, *, *': function (data, options, callback) { return this.$main.call(this, data, options, callback); }, /** * Sets the collection's data to the array / documents passed. If any * data already exists in the collection it will be removed before the * new data is set via the remove() method, and the remove event will * fire as well. * @name setData * @param {Array|Object} data The array of documents or a single document * that will be set as the collections data. * @param {Object} options Optional options object. * @param {Function} callback Optional callback function. */ '$main': function (data, options, callback) { if (this.isDropped()) { throw(this.logIdentifier() + ' Cannot operate in a dropped state!'); } if (data) { var deferredSetting = this.deferredCalls(), oldData = [].concat(this._data); // Switch off deferred calls since setData should be // a synchronous call this.deferredCalls(false); options = this.options(options); if (options.$decouple) { data = this.decouple(data); } if (!(data instanceof Array)) { data = [data]; } // Remove all items from the collection this.remove({}); // Insert the new data this.insert(data); // Switch deferred calls back to previous settings this.deferredCalls(deferredSetting); this._onChange(); this.emit('setData', this._data, oldData); } if (callback) { callback.call(this); } return this; } }); /** * Drops and rebuilds the primary key index for all documents * in the collection. * @param {Object=} options An optional options object. * @private */ Collection.prototype.rebuildPrimaryKeyIndex = function (options) { options = options || { $ensureKeys: undefined, $violationCheck: undefined }; var ensureKeys = options && options.$ensureKeys !== undefined ? options.$ensureKeys : true, violationCheck = options && options.$violationCheck !== undefined ? options.$violationCheck : true, arr, arrCount, arrItem, pIndex = this._primaryIndex, crcIndex = this._primaryCrc, crcLookup = this._crcLookup, pKey = this._primaryKey, jString; // Drop the existing primary index pIndex.truncate(); crcIndex.truncate(); crcLookup.truncate(); // Loop the data and check for a primary key in each object arr = this._data; arrCount = arr.length; while (arrCount--) { arrItem = arr[arrCount]; if (ensureKeys) { // Make sure the item has a primary key this.ensurePrimaryKey(arrItem); } if (violationCheck) { // Check for primary key violation if (!pIndex.uniqueSet(arrItem[pKey], arrItem)) { // Primary key violation 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: ' + arrItem[this._primaryKey]); } } else { pIndex.set(arrItem[pKey], arrItem); } // Generate a hash string jString = this.hash(arrItem); crcIndex.set(arrItem[pKey], jString); crcLookup.set(jString, arrItem); } }; /** * Checks for a primary key on the document and assigns one if none * currently exists. * @param {Object} obj The object to check a primary key against. * @private */ Collection.prototype.ensurePrimaryKey = function (obj) { if (obj[this._primaryKey] === undefined) { // Assign a primary key automatically obj[this._primaryKey] = this.objectId(); } }; /** * Clears all data from the collection. * @returns {Collection} */ Collection.prototype.truncate = function () { if (this.isDropped()) { throw(this.logIdentifier() + ' Cannot operate in a dropped state!'); } // TODO: This should use remove so that chain reactor events are properly // TODO: handled, but ensure that chunking is switched off this.emit('truncate', this._data); // Clear all the data from the collection this._data.length = 0; // Re-create the primary index data this._primaryIndex = new KeyValueStore('primary'); this._primaryCrc = new KeyValueStore('primaryCrc'); this._crcLookup = new KeyValueStore('crcLookup'); this._onChange(); this.emit('immediateChange', {type: 'truncate'}); this.deferEmit('change', {type: 'truncate'}); return this; }; /** * Inserts a new document or updates an existing document in a * collection depending on if a matching primary key exists in * the collection already or not. * * If the document contains a primary key field (based on the * collections's primary key) then the database will search for * an existing document with a matching id. If a matching * document is found, the document will be updated. Any keys that * match keys on the existing document will be overwritten with * new data. Any keys that do not currently exist on the document * will be added to the document. * * If the document does not contain an id or the id passed does * not match an existing document, an insert is performed instead. * If no id is present a new primary key id is provided for the * document and the document is inserted. * * @param {Object} obj The document object to upsert or an array * containing documents to upsert. * @param {Function=} callback Optional callback method. * @returns {Object} An object containing two keys, "op" contains * either "insert" or "update" depending on the type of operation * that was performed and "result" contains the return data from * the operation used. */ Collection.prototype.upsert = function (obj, callback) { if (this.isDropped()) { throw(this.logIdentifier() + ' Cannot operate in a dropped state!'); } if (obj) { var queue = this._deferQueue.upsert, deferThreshold = this._deferThreshold.upsert, returnData = {}, query, i; // Determine if the object passed is an array or not if (obj instanceof Array) { if (this._deferredCalls && obj.length > deferThreshold) { // Break up upsert into blocks this._deferQueue.upsert = queue.concat(obj); this._asyncPending('upsert'); // Fire off the insert queue handler this.processQueue('upsert', callback); return {}; } else { // Loop the array and upsert each item returnData = []; for (i = 0; i < obj.length; i++) { returnData.push(this.upsert(obj[i])); } if (callback) { callback.call(this); } return returnData; } } // Determine if the operation is an insert or an update if (obj[this._primaryKey]) { // Check if an object with this primary key already exists query = {}; query[this._primaryKey] = obj[this._primaryKey]; if (this._primaryIndex.lookup(query)[0]) { // The document already exists with this id, this operation is an update returnData.op = 'update'; } else { // No document with this id exists, this operation is an insert returnData.op = 'insert'; } } else { // The document passed does not contain an id, this operation is an insert returnData.op = 'insert'; } switch (returnData.op) { case 'insert': returnData.result = this.insert(obj, callback); break; case 'update': returnData.result = this.update(query, obj, {}, callback); break; default: break; } return returnData; } else { if (callback) { callback.call(this); } } return {}; }; /** * Executes a method against each document that matches query and returns an * array of documents that may have been modified by the method. * @param {Object} query The query object. * @param {Function} func The method that each document is passed to. If this method * returns false for a particular document it is excluded from the results. * @param {Object=} options Optional options object. * @returns {Array} */ Collection.prototype.filter = function (query, func, options) { return (this.find(query, options)).filter(func); }; /** * Executes a method against each document that matches query and then executes * an update based on the return data of the method. * @param {Object} query The query object. * @param {Function} func The method that each document is passed to. If this method * returns false for a particular document it is excluded from the update. * @param {Object=} options Optional options object passed to the initial find call. * @returns {Array} */ Collection.prototype.filterUpdate = function (query, func, options) { var items = this.find(query, options), results = [], singleItem, singleQuery, singleUpdate, pk = this.primaryKey(), i; for (i = 0; i < items.length; i++) { singleItem = items[i]; singleUpdate = func(singleItem); if (singleUpdate) { singleQuery = {}; singleQuery[pk] = singleItem[pk]; results.push(this.update(singleQuery, singleUpdate)); } } return results; }; /** * Modifies an existing document or documents in a collection. * This will update all matches for 'query' with the data held * in 'update'. It will not overwrite the matched documents * with the update document. * * @param {Object} query The query that must be matched for a * document to be operated on. * @param {Object} update The object containing updated * key/values. Any keys that match keys on the existing document * will be overwritten with this data. Any keys that do not * currently exist on the document will be added to the document. * @param {Object=} options An options object. * @param {Function=} callback The callback method to call when * the update is complete. * @returns {Array} The items that were updated. */ Collection.prototype.update = function (query, update, options, callback) { if (this.isDropped()) { throw(this.logIdentifier() + ' Cannot operate in a dropped state!'); } // Convert queries from mongo dot notation to forerunner queries if (this.mongoEmulation()) { this.convertToFdb(query); this.convertToFdb(update); } else { // Decouple the update data update = this.decouple(update); } // Handle transform update = this.transformIn(update); return this._handleUpdate(query, update, options, callback); }; /** * Handles the update operation that was initiated by a call to update(). * @param {Object} query The query that must be matched for a * document to be operated on. * @param {Object} update The object containing updated * key/values. Any keys that match keys on the existing document * will be overwritten with this data. Any keys that do not * currently exist on the document will be added to the document. * @param {Object=} options An options object. * @param {Function=} callback The callback method to call when * the update is complete. * @returns {Array} The items that were updated. * @private */ Collection.prototype._handleUpdate = function (query, update, options, callback) { var self = this, op = this._metrics.create('update'), dataSet, updated, updateCall = function (referencedDoc) { var oldDoc = self.decouple(referencedDoc), newDoc, triggerOperation, result; if (self.willTrigger(self.TYPE_UPDATE, self.PHASE_BEFORE) || self.willTrigger(self.TYPE_UPDATE, self.PHASE_AFTER)) { newDoc = self.decouple(referencedDoc); triggerOperation = { type: 'update', query: self.decouple(query), update: self.decouple(update), options: self.decouple(options), op: op }; // Update newDoc with the update criteria so we know what the data will look // like AFTER the update is processed result = self.updateObject(newDoc, triggerOperation.update, triggerOperation.query, triggerOperation.options, ''); if (self.processTrigger(triggerOperation, self.TYPE_UPDATE, self.PHASE_BEFORE, referencedDoc, newDoc) !== false) { // No triggers complained so let's execute the replacement of the existing // object with the new one result = self.updateObject(referencedDoc, newDoc, triggerOperation.query, triggerOperation.options, ''); // NOTE: If for some reason we would only like to fire this event if changes are actually going // to occur on the object from the proposed update then we can add "result &&" to the if self.processTrigger(triggerOperation, self.TYPE_UPDATE, self.PHASE_AFTER, oldDoc, newDoc); } else { // Trigger cancelled operation so tell result that it was not updated result = false; } } else { // No triggers complained so let's execute the replacement of the existing // object with the new one result = self.updateObject(referencedDoc, update, query, options, ''); } // Inform indexes of the change self._updateIndexes(oldDoc, referencedDoc); return result; }; op.start(); op.time('Retrieve documents to update'); dataSet = this.find(query, {$decouple: false}); op.time('Retrieve documents to update'); if (dataSet.length) { op.time('Update documents'); updated = dataSet.filter(updateCall); op.time('Update documents'); if (updated.length) { if (this.debug()) { console.log(this.logIdentifier() + ' Updated some data'); } op.time('Resolve chains'); if (this.chainWillSend()) { this.chainSend('update', { query: query, update: update, dataSet: this.decouple(updated) }, options); } op.time('Resolve chains'); this._onUpdate(updated); this._onChange(); if (callback) { callback.call(this, updated || []); } this.emit('immediateChange', {type: 'update', data: updated}); this.deferEmit('change', {type: 'update', data: updated}); } else { if (callback) { callback.call(this, updated || []); } } } else { if (callback) { callback.call(this, updated || []); } } op.stop(); // TODO: Should we decouple the updated array before return by default? return updated || []; }; /** * Replaces an existing object with data from the new object without * breaking data references. It does this by removing existing keys * from the base object and then adding the passed object's keys to * the existing base object, thereby maintaining any references to * the existing base object but effectively replacing the object with * the new one. * @param {Object} currentObj The base object to alter. * @param {Object} newObj The new object to overwrite the existing one * with. * @returns {*} Chain. * @private */ Collection.prototype._replaceObj = function (currentObj, newObj) { var i; // Check if the new document has a different primary key value from the existing one // Remove item from indexes this._removeFromIndexes(currentObj); // Remove existing keys from current object for (i in currentObj) { if (currentObj.hasOwnProperty(i)) { delete currentObj[i]; } } // Add new keys to current object for (i in newObj) { if (newObj.hasOwnProperty(i)) { currentObj[i] = newObj[i]; } } // Update the item in the primary index if (!this._insertIntoIndexes(currentObj)) { throw(this.logIdentifier() + ' Primary key violation in update! Key violated: ' + currentObj[this._primaryKey]); } // Update the object in the collection data //this._data.splice(this._data.indexOf(currentObj), 1, newObj); return this; }; /** * Helper method to update a document via it's id. * @param {String} id The id of the document. * @param {Object} update The object containing the key/values to * update to. * @returns {Object} The document that was updated or undefined * if no document was updated. */ Collection.prototype.updateById = function (id, update) { var searchObj = {}; searchObj[this._primaryKey] = id; return this.update(searchObj, update)[0]; }; /** * Internal method for document updating. * @param {Object} doc The document to update. * @param {Object} update The object with key/value pairs to update * the document with. * @param {Object} query The query object that we need to match to * perform an update. * @param {Object} options An options object. * @param {String} path The current recursive path. * @param {String} opType The type of update operation to perform, * if none is specified default is to set new data against matching * fields. * @returns {Boolean} True if the document was updated with new / * changed data or false if it was not updated because the data was * the same. * @private */ Collection.prototype.updateObject = function (doc, update, query, options, path, opType) { // TODO: This method is long, try to break it into smaller pieces update = this.decouple(update); // Clear leading dots from path path = path || ''; if (path.substr(0, 1) === '.') { path = path.substr(1, path.length -1); } //var oldDoc = this.decouple(doc), var updated = false, recurseUpdated = false, operation, tmpArray, tmpIndex, tmpCount, tempIndex, tempKey, replaceObj, pk, pathInstance, sourceIsArray, updateIsArray, i; // Loop each key in the update object for (i in update) { if (update.hasOwnProperty(i)) { // Reset operation flag operation = false; // Check if the property starts with a dollar (function) if (i.substr(0, 1) === '$') { // Check for commands switch (i) { case '$key': case '$index': case '$data': case '$min': case '$max': // Ignore some operators operation = true; break; case '$each': operation = true; // Loop over the array of updates and run each one tmpCount = update.$each.length; for (tmpIndex = 0; tmpIndex < tmpCount; tmpIndex++) { recurseUpdated = this.updateObject(doc, update.$each[tmpIndex], query, options, path); if (recurseUpdated) { updated = true; } } updated = updated || recurseUpdated; break; case '$replace': operation = true; replaceObj = update.$replace; pk = this.primaryKey(); // Loop the existing item properties and compare with // the replacement (never remove primary key) for (tempKey in doc) { if (doc.hasOwnProperty(tempKey) && tempKey !== pk) { if (replaceObj[tempKey] === undefined) { // The new document doesn't have this field, remove it from the doc this._updateUnset(doc, tempKey); updated = true; } } } // Loop the new item props and update the doc for (tempKey in replaceObj) { if (replaceObj.hasOwnProperty(tempKey) && tempKey !== pk) { this._updateOverwrite(doc, tempKey, replaceObj[tempKey]); updated = true; } } break; default: operation = true; // Now run the operation recurseUpdated = this.updateObject(doc, update[i], query, options, path, i); updated = updated || recurseUpdated; break; } } // Check if the key has a .$ at the end, denoting an array lookup if (this._isPositionalKey(i)) { operation = true; // Modify i to be the name of the field i = i.substr(0, i.length - 2); pathInstance = new Path(path + '.' + i); // Check if the key is an array and has items if (doc[i] && doc[i] instanceof Array && doc[i].length) { tmpArray = []; // Loop the array and find matches to our search for (tmpIndex = 0; tmpIndex < doc[i].length; tmpIndex++) { if (this._match(doc[i][tmpIndex], pathInstance.value(query)[0], options, '', {})) { tmpArray.push(tmpIndex); } } // Loop the items that matched and update them for (tmpIndex = 0; tmpIndex < tmpArray.length; tmpIndex++) { recurseUpdated = this.updateObject(doc[i][tmpArray[tmpIndex]], update[i + '.$'], query, options, path + '.' + i, opType); updated = updated || recurseUpdated; } } } if (!operation) { if (!opType && typeof(update[i]) === 'object') { if (doc[i] !== null && typeof(doc[i]) === 'object') { // Check if we are dealing with arrays sourceIsArray = doc[i] instanceof Array; updateIsArray = update[i] instanceof Array; if (sourceIsArray || updateIsArray) { // Check if the update is an object and the doc is an array if (!updateIsArray && sourceIsArray) { // Update is an object, source is an array so match the array items // with our query object to find the one to update inside this array // Loop the array and find matches to our search for (tmpIndex = 0; tmpIndex < doc[i].length; tmpIndex++) { recurseUpdated = this.updateObject(doc[i][tmpIndex], update[i], query, options, path + '.' + i, opType); updated = updated || recurseUpdated; } } else { // Either both source and update are arrays or the update is // an array and the source is not, so set source to update if (doc[i] !== update[i]) { this._updateProperty(doc, i, update[i]); updated = true; } } } else { // The doc key is an object so traverse the // update further recurseUpdated = this.updateObject(doc[i], update[i], query, options, path + '.' + i, opType); updated = updated || recurseUpdated; } } else { if (doc[i] !== update[i]) { this._updateProperty(doc, i, update[i]); updated = true; } } } else { switch (opType) { case '$inc': var doUpdate = true; // Check for a $min / $max operator if (update[i] > 0) { if (update.$max) { // Check current value if (doc[i] >= update.$max) { // Don't update doUpdate = false; } } } else if (update[i] < 0) { if (update.$min) { // Check current value if (doc[i] <= update.$min) { // Don't update doUpdate = false; } } } if (doUpdate) { this._updateIncrement(doc, i, update[i]); updated = true; } break; case '$cast': // Casts a property to the type specified if it is not already // that type. If the cast is an array or an object and the property // is not already that type a new array or object is created and // set to the property, overwriting the previous value switch (update[i]) { case 'array': if (!(doc[i] instanceof Array)) { // Cast to an array this._updateProperty(doc, i, update.$data || []); updated = true; } break; case 'object': if (!(doc[i] instanceof Object) || (doc[i] instanceof Array)) { // Cast to an object this._updateProperty(doc, i, update.$data || {}); updated = true; } break; case 'number': if (typeof doc[i] !== 'number') { // Cast to a number this._updateProperty(doc, i, Number(doc[i])); updated = true; } break; case 'string': if (typeof doc[i] !== 'string') { // Cast to a string this._updateProperty(doc, i, String(doc[i])); updated = true; } break; default: throw(this.logIdentifier() + ' Cannot update cast to unknown type: ' + update[i]); } break; case '$push': // Check if the target key is undefined and if so, create an array if (doc[i] === undefined) { // Initialise a new array this._updateProperty(doc, i, []); } // Check that the target key is an array if (doc[i] instanceof Array) { // Check for a $position modifier with an $each if (update[i].$position !== undefined && update[i].$each instanceof Array) { // Grab the position to insert at tempIndex = update[i].$position; // Loop the each array and push each item tmpCount = update[i].$each.length; for (tmpIndex = 0; tmpIndex < tmpCount; tmpIndex++) { this._updateSplicePush(doc[i], tempIndex + tmpIndex, update[i].$each[tmpIndex]); } } else if (update[i].$each instanceof Array) { // Do a loop over the each to push multiple items tmpCount = update[i].$each.length; for (tmpIndex = 0; tmpIndex < tmpCount; tmpIndex++) { this._updatePush(doc[i], update[i].$each[tmpIndex]); } } else { // Do a standard push this._updatePush(doc[i], update[i]); } updated = true; } else { throw(this.logIdentifier() + ' Cannot push to a key that is not an array! (' + i + ')'); } break; case '$pull': if (doc[i] instanceof Array) { tmpArray = []; // Loop the array and find matches to our search for (tmpIndex = 0; tmpIndex < doc[i].length; tmpIndex++) { if (this._match(doc[i][tmpIndex], update[i], options, '', {})) { tmpArray.push(tmpIndex); } } tmpCount = tmpArray.length; // Now loop the pull array and remove items to be pulled while (tmpCount--) { this._updatePull(doc[i], tmpArray[tmpCount]); updated = true; } } break; case '$pullAll': if (doc[i] instanceof Array) { if (update[i] instanceof Array) { tmpArray = doc[i]; tmpCount = tmpArray.length; if (tmpCount > 0) { // Now loop the pull array and remove items to be pulled while (tmpCount--) { for (tempIndex = 0; tempIndex < update[i].length; tempIndex++) { if (tmpArray[tmpCount] === update[i][tempIndex]) { this._updatePull(doc[i], tmpCount); tmpCount--; updated = true; } } if (tmpCount < 0) { break; } } } } else { throw(this.logIdentifier() + ' Cannot pullAll without being given an array of values to pull! (' + i + ')'); } } break; case '$addToSet': // Check if the target key is undefined and if so, create an array if (doc[i] === undefined) { // Initialise a new array this._updateProperty(doc, i, []); } // Check that the target key is an array if (doc[i] instanceof Array) { // Loop the target array and check for existence of item var targetArr = doc[i], targetArrIndex, targetArrCount = targetArr.length, objHash, addObj = true, optionObj = (options && options.$addToSet), hashMode, pathSolver; // Check if we have an options object for our operation if (update[i].$key) { hashMode = false; pathSolver = new Path(update[i].$key); objHash = pathSolver.value(update[i])[0]; // Remove the key from the object before we add it delete update[i].$key; } else if (optionObj && optionObj.key) { hashMode = false; pathSolver = new Path(optionObj.key); objHash = pathSolver.value(update[i])[0]; } else { objHash = this.jStringify(update[i]); hashMode = true; } for (targetArrIndex = 0; targetArrIndex < targetArrCount; targetArrIndex++) { if (hashMode) { // Check if objects match via a string hash (JSON) if (this.jStringify(targetArr[targetArrIndex]) === objHash) { // The object already exists, don't add it addObj = false; break; } } else { // Check if objects match based on the path if (objHash === pathSolver.value(targetArr[targetArrIndex])[0]) { // The object already exists, don't add it addObj = false; break; } } } if (addObj) { this._updatePush(doc[i], update[i]); updated = true; } } else { throw(this.logIdentifier() + ' Cannot addToSet on a key that is not an array! (' + i + ')'); } break; case '$splicePush': // Check if the target key is undefined and if so, create an array if (doc[i] === undefined) { // Initialise a new array this._updateProperty(doc, i, []); } // Check that the target key is an array if (doc[i] instanceof Array) { tempIndex = update.$index; if (tempIndex !== undefined) { delete update.$index; // Check for out of bounds index if (tempIndex > doc[i].length) { tempIndex = doc[i].length; } this._updateSplicePush(doc[i], tempIndex, update[i]); updated = true; } else { throw(this.logIdentifier() + ' Cannot splicePush without a $index integer value!'); } } else { throw(this.logIdentifier() + ' Cannot splicePush with a key that is not an array! (' + i + ')'); } break; case '$splicePull': // Check that the target key is not undefined if (doc[i] !== undefined) { // Check that the target key is an array if (doc[i] instanceof Array) { tempIndex = update[i].$index; if (tempIndex !== undefined) { // Check for in bounds index if (tempIndex < doc[i].length) { this._updateSplicePull(doc[i], tempIndex); updated = true; } } else { throw(this.logIdentifier() + ' Cannot splicePull without a $index integer value!'); } } else { throw(this.logIdentifier() + ' Cannot splicePull from a key that is not an array! (' + i + ')'); } } break; case '$move': if (doc[i] instanceof Array) { // Loop the array and find matches to our search for (tmpIndex = 0; tmpIndex < doc[i].length; tmpIndex++) { if (this._match(doc[i][tmpIndex], update[i], options, '', {})) { var moveToIndex = update.$index; if (moveToIndex !== undefined) { delete update.$index; this._updateSpliceMove(doc[i], tmpIndex, moveToIndex); updated = true; } else { throw(this.logIdentifier() + ' Cannot move without a $index integer value!'); } break; } } } else { throw(this.logIdentifier() + ' Cannot move on a key that is not an array! (' + i + ')'); } break; case '$mul': this._updateMultiply(doc, i, update[i]); updated = true; break; case '$rename': this._updateRename(doc, i, update[i]); updated = true; break; case '$overwrite': this._updateOverwrite(doc, i, update[i]); updated = true; break; case '$unset': this._updateUnset(doc, i); updated = true; break; case '$clear': this._updateClear(doc, i); updated = true; break; case '$pop': if (doc[i] instanceof Array) { if (this._updatePop(doc[i], update[i])) { updated = true; } } else { throw(this.logIdentifier() + ' Cannot pop from a key that is not an array! (' + i + ')'); } break; case '$toggle': // Toggle the boolean property between true and false this._updateProperty(doc, i, !doc[i]); updated = true; break; default: if (doc[i] !== update[i]) { this._updateProperty(doc, i, update[i]); updated = true; } break; } } } } } return updated; }; /** * Determines if the passed key has an array positional mark * (a dollar at the end of its name). * @param {String} key The key to check. * @returns {Boolean} True if it is a positional or false if not. * @private */ Collection.prototype._isPositionalKey = function (key) { return key.substr(key.length - 2, 2) === '.$'; }; /** * Removes any documents from the collection that match the search * query key/values. * @param {Object} query The query object. * @param {Object=} options An options object. * @param {Function=} callback A callback method. * @returns {Array} An array of the documents that were removed. */ Collection.prototype.remove = function (query, options, callback) { if (this.isDropped()) { throw(this.logIdentifier() + ' Cannot operate in a dropped state!'); } var self = this, dataSet, index, arrIndex, returnArr, removeMethod, triggerOperation, doc, newDoc; if (typeof(options) === 'function') { callback = options; options = {}; } // Convert queries from mongo dot notation to forerunner queries if (this.mongoEmulation()) { this.convertToFdb(query); } if (query instanceof Array) { returnArr = []; for (arrIndex = 0; arrIndex < query.length; arrIndex++) { returnArr.push(this.remove(query[arrIndex], {noEmit: true})); } if (!options || (options && !options.noEmit)) { this._onRemove(returnArr); } if (callback) { callback.call(this, false, returnArr); } return returnArr; } else { returnArr = []; dataSet = this.find(query, {$decouple: false}); if (dataSet.length) { removeMethod = function (dataItem) { // Remove the item from the collection's indexes self._removeFromIndexes(dataItem); // Remove data from internal stores index = self._data.indexOf(dataItem); self._dataRemoveAtIndex(index); returnArr.push(dataItem); }; // Remove the data from the collection for (var i = 0; i < dataSet.length; i++) { doc = dataSet[i]; if (self.willTrigger(self.TYPE_REMOVE, self.PHASE_BEFORE) || self.willTrigger(self.TYPE_REMOVE, self.PHASE_AFTER)) { triggerOperation = { type: 'remove' }; newDoc = self.decouple(doc); if (self.processTrigger(triggerOperation, self.TYPE_REMOVE, self.PHASE_BEFORE, newDoc, newDoc) !== false) { // The trigger didn't ask to cancel so execute the removal method removeMethod(doc); self.processTrigger(triggerOperation, self.TYPE_REMOVE, self.PHASE_AFTER, newDoc, newDoc); } } else { // No triggers to execute removeMethod(doc); } } if (returnArr.length) { //op.time('Resolve chains'); self.chainSend('remove', { query: query, dataSet: returnArr }, options); //op.time('Resolve chains'); if (!options || (options && !options.noEmit)) { this._onRemove(returnArr); } this._onChange(); this.emit('immediateChange', {type: 'remove', data: returnArr}); this.deferEmit('change', {type: 'remove', data: returnArr}); } } if (callback) { callback.call(this, false, returnArr); } return returnArr; } }; /** * Helper method that removes a document that matches the given id. * @param {String} id The id of the document to remove. * @returns {Object} The document that was removed or undefined if * nothing was removed. */ Collection.prototype.removeById = function (id) { var searchObj = {}; searchObj[this._primaryKey] = id; return this.remove(searchObj)[0]; }; /** * Processes a deferred action queue. * @param {String} type The queue name to process. * @param {Function} callback A method to call when the queue has processed. * @param {Object=} resultObj A temp object to hold results in. */ Collection.prototype.processQueue = function (type, callback, resultObj) { var self = this, queue = this._deferQueue[type], deferThreshold = this._deferThreshold[type], deferTime = this._deferTime[type], dataArr, result; resultObj = resultObj || { deferred: true }; if (queue.length) { // Process items up to the threshold if (queue.length > deferThreshold) { // Grab items up to the threshold value dataArr = queue.splice(0, deferThreshold); } else { // Grab all the remaining items dataArr = queue.splice(0, queue.length); } result = self[type](dataArr); switch (type) { case 'insert': resultObj.inserted = resultObj.inserted || []; resultObj.failed = resultObj.failed || []; resultObj.inserted = resultObj.inserted.concat(result.inserted); resultObj.failed = resultObj.failed.concat(result.failed); break; } // Queue another process setTimeout(function () { self.processQueue.call(self, type, callback, resultObj); }, deferTime); } else { if (callback) { callback.call(this, resultObj); } this._asyncComplete(type); } // Check if all queues are complete if (!this.isProcessingQueue()) { this.deferEmit('queuesComplete'); } }; /** * Checks if any CRUD operations have been deferred and are still waiting to * be processed. * @returns {Boolean} True if there are still deferred CRUD operations to process * or false if all queues are clear. */ Collection.prototype.isProcessingQueue = function () { var i; for (i in this._deferQueue) { if (this._deferQueue.hasOwnProperty(i)) { if (this._deferQueue[i].length) { return true; } } } return false; }; /** * Inserts a document or array of documents into the collection. * @param {Object|Array} data Either a document object or array of document * @param {Number=} index Optional index to insert the record at. * @param {Collection~insertCallback=} callback Optional callback called * once the insert is complete. */ Collection.prototype.insert = function (data, index, callback) { if (this.isDropped()) { throw(this.logIdentifier() + ' Cannot operate in a dropped state!'); } if (typeof(index) === 'function') { callback = index; index = this._data.length; } else if (index === undefined) { index = this._data.length; } data = this.transformIn(data); return this._insertHandle(data, index, callback); }; /** * The insert operation's callback. * @callback Collection~insertCallback * @param {Object} result The result object will contain two arrays (inserted * and failed) which represent the documents that did get inserted and those * that didn't for some reason (usually index violation). Failed items also * contain a reason. Inspect the failed array for further information. * * A third field called "deferred" is a boolean value to indicate if the * insert operation was deferred across more than one CPU cycle (to avoid * blocking the main thread). */ /** * Inserts a document or array of documents into the collection. * @param {Object|Array} data Either a document object or array of document * @param {Number=} index Optional index to insert the record at. * @param {Collection~insertCallback=} callback Optional callback called * once the insert is complete. */ Collection.prototype._insertHandle = function (data, index, callback) { var //self = this, queue = this._deferQueue.insert, deferThreshold = this._deferThreshold.insert, //deferTime = this._deferTime.insert, inserted = [], failed = [], insertResult, resultObj, i; if (data instanceof Array) { // Check if there are more insert items than the insert defer // threshold, if so, break up inserts so we don't tie up the // ui or thread if (this._deferredCalls && data.length > deferThreshold) { // Break up insert into blocks this._deferQueue.insert = queue.concat(data); this._asyncPending('insert'); // Fire off the insert queue handler this.processQueue('insert', callback); return; } else { // Loop the array and add items for (i = 0; i < data.length; i++) { insertResult = this._insert(data[i], index + i); if (insertResult === true) { inserted.push(data[i]); } else { failed.push({ doc: data[i], reason: insertResult }); } } } } else { // Store the data item insertResult = this._insert(data, index); if (insertResult === true) { inserted.push(data); } else { failed.push({ doc: data, reason: insertResult }); } } resultObj = { deferred: false, inserted: inserted, failed: failed }; this._onInsert(inserted, failed); if (callback) { callback.call(this, resultObj); } this._onChange(); this.emit('immediateChange', {type: 'insert', data: inserted, failed: failed}); this.deferEmit('change', {type: 'insert', data: inserted, failed: failed}); return resultObj; }; /** * Internal method to insert a document into the collection. Will * check for index violations before allowing the document to be inserted. * @param {Object} doc The document to insert after passing index violation * tests. * @param {Number=} index Optional index to insert the document at. * @returns {Boolean|Object} True on success, false if no document passed, * or an object containing details about an index violation if one occurred. * @private */ Collection.prototype._insert = function (doc, index) { if (doc) { var self = this, indexViolation, triggerOperation, insertMethod, newDoc, capped = this.capped(), cappedSize = this.cappedSize(); this.ensurePrimaryKey(doc); // Check indexes are not going to be broken by the document indexViolation = this.insertIndexViolation(doc); insertMethod = function (doc) { // Add the item to the collection's indexes self._insertIntoIndexes(doc); // Check index overflow if (index > self._data.length) { index = self._data.length; } // Insert the document self._dataInsertAtIndex(index, doc); // Check capped collection status and remove first record // if we are over the threshold if (capped && self._data.length > cappedSize) { // Remove the first item in the data array self.removeById(self._data[0][self._primaryKey]); } //op.time('Resolve chains'); if (self.chainWillSend()) { self.chainSend('insert', { dataSet: self.decouple([doc]) }, { index: index }); } //op.time('Resolve chains'); }; if (!indexViolation) { if (self.willTrigger(self.TYPE_INSERT, self.PHASE_BEFORE) || self.willTrigger(self.TYPE_INSERT, self.PHASE_AFTER)) { triggerOperation = { type: 'insert' }; if (self.processTrigger(triggerOperation, self.TYPE_INSERT, self.PHASE_BEFORE, {}, doc) !== false) { insertMethod(doc); if (self.willTrigger(self.TYPE_INSERT, self.PHASE_AFTER)) { // Clone the doc so that the programmer cannot update the internal document // on the "after" phase trigger newDoc = self.decouple(doc); self.processTrigger(triggerOperation, self.TYPE_INSERT, self.PHASE_AFTER, {}, newDoc); } } else { // The trigger just wants to cancel the operation return 'Trigger cancelled operation'; } } else { // No triggers to execute insertMethod(doc); } return true; } else { return 'Index violation in index: ' + indexViolation; } } return 'No document passed to insert'; }; /** * Inserts a document into the internal collection data array at * Inserts a document into the internal collection data array at * the specified index. * @param {number} index The index to insert at. * @param {object} doc The document to insert. * @private */ Collection.prototype._dataInsertAtIndex = function (index, doc) { this._data.splice(index, 0, doc); }; /** * Removes a document from the internal collection data array at * the specified index. * @param {number} index The index to remove from. * @private */ Collection.prototype._dataRemoveAtIndex = function (index) { this._data.splice(index, 1); }; /** * Replaces all data in the collection's internal data array with * the passed array of data. * @param {array} data The array of data to replace existing data with. * @private */ Collection.prototype._dataReplace = function (data) { // Clear the array - using a while loop with pop is by far the // fastest way to clear an array currently while (this._data.length) { this._data.pop(); } // Append new items to the array this._data = this._data.concat(data); }; /** * Inserts a document into the collection indexes. * @param {Object} doc The document to insert. * @private */ Collection.prototype._insertIntoIndexes = function (doc) { var arr = this._indexByName, arrIndex, violated, hash = this.hash(doc), pk = this._primaryKey; // Insert to primary key index violated = this._primaryIndex.uniqueSet(doc[pk], doc); this._primaryCrc.uniqueSet(doc[pk], hash); this._crcLookup.uniqueSet(hash, doc); // Insert into other indexes for (arrIndex in arr) { if (arr.hasOwnProperty(arrIndex)) { arr[arrIndex].insert(doc); } } return violated; }; /** * Removes a document from the collection indexes. * @param {Object} doc The document to remove. * @private */ Collection.prototype._removeFromIndexes = function (doc) { var arr = this._indexByName, arrIndex, hash = this.hash(doc), pk = this._primaryKey; // Remove from primary key index this._primaryIndex.unSet(doc[pk]); this._primaryCrc.unSet(doc[pk]); this._crcLookup.unSet(hash); // Remove from other indexes for (arrIndex in arr) { if (arr.hasOwnProperty(arrIndex)) { arr[arrIndex].remove(doc); } } }; /** * Updates collection index data for the passed document. * @param {Object} oldDoc The old document as it was before the update. * @param {Object} newDoc The document as it now is after the update. * @private */ Collection.prototype._updateIndexes = function (oldDoc, newDoc) { this._removeFromIndexes(oldDoc); this._insertIntoIndexes(newDoc); }; /** * Rebuild collection indexes. * @private */ Collection.prototype._rebuildIndexes = function () { var arr = this._indexByName, arrIndex; // Remove from other indexes for (arrIndex in arr) { if (arr.hasOwnProperty(arrIndex)) { arr[arrIndex].rebuild(); } } }; /** * Uses the passed query to generate a new collection with results * matching the query parameters. * * @param {Object} query The query object to generate the subset with. * @param {Object=} options An options object. * @returns {*} */ Collection.prototype.subset = function (query, options) { var result = this.find(query, options), coll; coll = new Collection(); coll.db(this._db); coll.subsetOf(this) .primaryKey(this._primaryKey) .setData(result); return coll; }; /** * Gets / sets the collection that this collection is a subset of. * @param {Collection=} collection The collection to set as the parent of this subset. * @returns {Collection} */ Shared.synthesize(Collection.prototype, 'subsetOf'); /** * Checks if the collection is a subset of the passed collection. * @param {Collection} collection The collection to test against. * @returns {Boolean} True if the passed collection is the parent of * the current collection. */ Collection.prototype.isSubsetOf = function (collection) { return this._subsetOf === collection; }; /** * Find the distinct values for a specified field across a single collection and * returns the results in an array. * @param {String} key The field path to return distinct values for e.g. "person.name". * @param {Object=} query The query to use to filter the documents used to return values from. * @param {Object=} options The query options to use when running the query. * @returns {Array} */ Collection.prototype.distinct = function (key, query, options) { if (this.isDropped()) { throw(this.logIdentifier() + ' Cannot operate in a dropped state!'); } var data = this.find(query, options), pathSolver = new Path(key), valueUsed = {}, distinctValues = [], value, i; // Loop the data and build array of distinct values for (i = 0; i < data.length; i++) { value = pathSolver.value(data[i])[0]; if (value && !valueUsed[value]) { valueUsed[value] = true; distinctValues.push(value); } } return distinctValues; }; /** * Helper method to find a document by it's id. * @param {String} id The id of the document. * @param {Object=} options The options object, allowed keys are sort and limit. * @returns {Array} The items that were updated. */ Collection.prototype.findById = function (id, options) { var searchObj = {}; searchObj[this._primaryKey] = id; return this.find(searchObj, options)[0]; }; /** * Finds all documents that contain the passed string or search object * regardless of where the string might occur within the document. This * will match strings from the start, middle or end of the document's * string (partial match). * @param {String} search The string to search for. Case sensitive. * @param {Object=} options A standard find() options object. * @returns {Array} An array of documents that matched the search string. */ Collection.prototype.peek = function (search, options) { // Loop all items var arr = this._data, arrCount = arr.length, arrIndex, arrItem, tempColl = new Collection(), typeOfSearch = typeof search; if (typeOfSearch === 'string') { for (arrIndex = 0; arrIndex < arrCount; arrIndex++) { // Get json representation of object arrItem = this.jStringify(arr[arrIndex]); // Check if string exists in object json if (arrItem.indexOf(search) > -1) { // Add this item to the temp collection tempColl.insert(arr[arrIndex]); } } return tempColl.find({}, options); } else { return this.find(search, options); } }; /** * Provides a query plan / operations log for a query. * @param {Object} query The query to execute. * @param {Object=} options Optional options object. * @returns {Object} The query plan. */ Collection.prototype.explain = function (query, options) { var result = this.find(query, options); return result.__fdbOp._data; }; /** * Generates an options object with default values or adds default * values to a passed object if those values are not currently set * to anything. * @param {object=} obj Optional options object to modify. * @returns {object} The options object. */ Collection.prototype.options = function (obj) { obj = obj || {}; obj.$decouple = obj.$decouple !== undefined ? obj.$decouple : true; obj.$explain = obj.$explain !== undefined ? obj.$explain : false; return obj; }; /** * Queries the collection based on the query object passed. * @param {Object} query The query key/values that a document must match in * order for it to be returned in the result array. * @param {Object=} options An optional options object. * @param {Function=} callback !! DO NOT USE, THIS IS NON-OPERATIONAL !! * Optional callback. If specified the find process * will not return a value and will assume that you wish to operate under an * async mode. This will break up large find requests into smaller chunks and * process them in a non-blocking fashion allowing large datasets to be queried * without causing the browser UI to pause. Results from this type of operation * will be passed back to the callback once completed. * * @returns {Array} The results array from the find operation, containing all * documents that matched the query. */ Collection.prototype.find = function (query, options, callback) { // Convert queries from mongo dot notation to forerunner queries if (this.mongoEmulation()) { this.convertToFdb(query); } if (callback) { // Check the size of the collection's data array // Split operation into smaller tasks and callback when complete callback.call(this, 'Callbacks for the find() operation are not yet implemented!', []); return []; } return this._find.call(this, query, options, callback); }; Collection.prototype._find = function (query, options) { if (this.isDropped()) { throw(this.logIdentifier() + ' Cannot operate in a dropped state!'); } // TODO: This method is quite long, break into smaller pieces query = query || {}; var op = this._metrics.create('find'), pk = this.primaryKey(), self = this, analysis, scanLength, requiresTableScan = true, resultArr, joinIndex, joinSource = {}, joinQuery, joinPath, joinSourceKey, joinSourceType, joinSourceIdentifier, joinSourceData, resultRemove = [], i, j, k, fieldListOn = [], fieldListOff = [], elemMatchPathSolver, elemMatchSubArr, elemMatchSpliceArr, matcherTmpOptions = {}, result, cursor = {}, pathSolver, waterfallCollection, matcher; if (!(options instanceof Array)) { options = this.options(options); } matcher = function (doc) { return self._match(doc, query, options, 'and', matcherTmpOptions); }; op.start(); if (query) { // Check if the query is an array (multi-operation waterfall query) if (query instanceof Array) { waterfallCollection = this; // Loop the query operations for (i = 0; i < query.length; i++) { // Execute each operation and pass the result into the next // query operation waterfallCollection = waterfallCollection.subset(query[i], options && options[i] ? options[i] : {}); } return waterfallCollection.find(); } // Pre-process any data-changing query operators first if (query.$findSub) { // Check we have all the parts we need if (!query.$findSub.$path) { throw('$findSub missing $path property!'); } return this.findSub( query.$findSub.$query, query.$findSub.$path, query.$findSub.$subQuery, query.$findSub.$subOptions ); } if (query.$findSubOne) { // Check we have all the parts we need if (!query.$findSubOne.$path) { throw('$findSubOne missing $path property!'); } return this.findSubOne( query.$findSubOne.$query, query.$findSubOne.$path, query.$findSubOne.$subQuery, query.$findSubOne.$subOptions ); } // Get query analysis to execute best optimised code path op.time('analyseQuery'); analysis = this._analyseQuery(self.decouple(query), options, op); op.time('analyseQuery'); op.data('analysis', analysis); // Check if the query tries to limit by data that would only exist after // the join operation has been completed if (analysis.hasJoin && analysis.queriesJoin) { // The query has a join and tries to limit by it's joined data // Get references to the join sources op.time('joinReferences'); for (joinIndex = 0; joinIndex < analysis.joinsOn.length; joinIndex++) { joinSourceData = analysis.joinsOn[joinIndex]; joinSourceKey = joinSourceData.key; joinSourceType = joinSourceData.type; joinSourceIdentifier = joinSourceData.id; joinPath = new Path(analysis.joinQueries[joinSourceKey]); joinQuery = joinPath.value(query)[0]; joinSource[joinSourceIdentifier] = this._db[joinSourceType](joinSourceKey).subset(joinQuery); // Remove join clause from main query delete query[analysis.joinQueries[joinSourceKey]]; } op.time('joinReferences'); } // Check if an index lookup can be used to return this result if (analysis.indexMatch.length && (!options || (options && !options.$skipIndex))) { op.data('index.potential', analysis.indexMatch); op.data('index.used', analysis.indexMatch[0].index); // Get the data from the index op.time('indexLookup'); resultArr = analysis.indexMatch[0].lookup || []; op.time('indexLookup'); // Check if the index coverage is all keys, if not we still need to table scan it if (analysis.indexMatch[0].keyData.totalKeyCount === analysis.indexMatch[0].keyData.score) { // Don't require a table scan to find relevant documents requiresTableScan = false; } } else { op.flag('usedIndex', false); } if (requiresTableScan) { if (resultArr && resultArr.length) { scanLength = resultArr.length; op.time('tableScan: ' + scanLength); // Filter the source data and return the result resultArr = resultArr.filter(matcher); } else { // Filter the source data and return the result scanLength = this._data.length; op.time('tableScan: ' + scanLength); resultArr = this._data.filter(matcher); } op.time('tableScan: ' + scanLength); } // Order the array if we were passed a sort clause if (options.$orderBy) { op.time('sort'); resultArr = this.sort(options.$orderBy, resultArr); op.time('sort'); } if (options.$page !== undefined && options.$limit !== undefined) { // Record paging data cursor.page = options.$page; cursor.pages = Math.ceil(resultArr.length / options.$limit); cursor.records = resultArr.length; // Check if we actually need to apply the paging logic if (options.$page && options.$limit > 0) { op.data('cursor', cursor); // Skip to the page specified based on limit resultArr.splice(0, options.$page * options.$limit); } } if (options.$skip) { cursor.skip = options.$skip; // Skip past the number of records specified resultArr.splice(0, options.$skip); op.data('skip', options.$skip); } if (options.$limit && resultArr && resultArr.length > options.$limit) { cursor.limit = options.$limit; resultArr.length = options.$limit; op.data('limit', options.$limit); } if (options.$decouple) { // Now decouple the data from the original objects op.time('decouple'); resultArr = this.decouple(resultArr); op.time('decouple'); op.data('flag.decouple', true); } // Now process any joins on the final data if (options.$join) { resultRemove = resultRemove.concat(this.applyJoin(resultArr, options.$join, joinSource)); op.data('flag.join', true); } // Process removal queue if (resultRemove.length) { op.time('removalQueue'); this.spliceArrayByIndexList(resultArr, resultRemove); op.time('removalQueue'); } if (options.$transform) { op.time('transform'); for (i = 0; i < resultArr.length; i++) { resultArr.splice(i, 1, options.$transform(resultArr[i])); } op.time('transform'); op.data('flag.transform', true); } // Process transforms if (this._transformEnabled && this._transformOut) { op.time('transformOut'); resultArr = this.transformOut(resultArr); op.time('transformOut'); } op.data('results', resultArr.length); } else { resultArr = []; } // Check for an $as operator in the options object and if it exists // iterate over the fields and generate a rename function that will // operate over the entire returned data array and rename each object's // fields to their new names // TODO: Enable $as in collection find to allow renaming fields /*if (options.$as) { renameFieldPath = new Path(); renameFieldMethod = function (obj, oldFieldPath, newFieldName) { renameFieldPath.path(oldFieldPath); renameFieldPath.rename(newFieldName); }; for (i in options.$as) { if (options.$as.hasOwnProperty(i)) { } } }*/ if (!options.$aggregate) { // Generate a list of fields to limit data by // Each property starts off being enabled by default (= 1) then // if any property is explicitly specified as 1 then all switch to // zero except _id. // // Any that are explicitly set to zero are switched off. op.time('scanFields'); for (i in options) { if (options.hasOwnProperty(i) && i.indexOf('$') !== 0) { if (options[i] === 1) { fieldListOn.push(i); } else if (options[i] === 0) { fieldListOff.push(i); } } } op.time('scanFields'); // Limit returned fields by the options data if (fieldListOn.length || fieldListOff.length) { op.data('flag.limitFields', true); op.data('limitFields.on', fieldListOn); op.data('limitFields.off', fieldListOff); op.time('limitFields'); // We have explicit fields switched on or off for (i = 0; i < resultArr.length; i++) { result = resultArr[i]; for (j in result) { if (result.hasOwnProperty(j)) { if (fieldListOn.length) { // We have explicit fields switched on so remove all fields // that are not explicitly switched on // Check if the field name is not the primary key if (j !== pk) { if (fieldListOn.indexOf(j) === -1) { // This field is not in the on list, remove it delete result[j]; } } } if (fieldListOff.length) { // We have explicit fields switched off so remove fields // that are explicitly switched off if (fieldListOff.indexOf(j) > -1) { // This field is in the off list, remove it delete result[j]; } } } } } op.time('limitFields'); } // Now run any projections on the data required if (options.$elemMatch) { op.data('flag.elemMatch', true); op.time('projection-elemMatch'); for (i in options.$elemMatch) { if (options.$elemMatch.hasOwnProperty(i)) { elemMatchPathSolver = new Path(i); // Loop the results array for (j = 0; j < resultArr.length; j++) { elemMatchSubArr = elemMatchPathSolver.value(resultArr[j])[0]; // Check we have a sub-array to loop if (elemMatchSubArr && elemMatchSubArr.length) { // Loop the sub-array and check for projection query matches for (k = 0; k < elemMatchSubArr.length; k++) { // Check if the current item in the sub-array matches the projection query if (self._match(elemMatchSubArr[k], options.$elemMatch[i], options, '', {})) { // The item matches the projection query so set the sub-array // to an array that ONLY contains the matching item and then // exit the loop since we only want to match the first item elemMatchPathSolver.set(resultArr[j], i, [elemMatchSubArr[k]]); break; } } } } } } op.time('projection-elemMatch'); } if (options.$elemsMatch) { op.data('flag.elemsMatch', true); op.time('projection-elemsMatch'); for (i in options.$elemsMatch) { if (options.$elemsMatch.hasOwnProperty(i)) { elemMatchPathSolver = new Path(i); // Loop the results array for (j = 0; j < resultArr.length; j++) { elemMatchSubArr = elemMatchPathSolver.value(resultArr[j])[0]; // Check we have a sub-array to loop if (elemMatchSubArr && elemMatchSubArr.length) { elemMatchSpliceArr = []; // Loop the sub-array and check for projection query matches for (k = 0; k < elemMatchSubArr.length; k++) { // Check if the current item in the sub-array matches the projection query if (self._match(elemMatchSubArr[k], options.$elemsMatch[i], options, '', {})) { // The item matches the projection query so add it to the final array elemMatchSpliceArr.push(elemMatchSubArr[k]); } } // Now set the final sub-array to the matched items elemMatchPathSolver.set(resultArr[j], i, elemMatchSpliceArr); } } } } op.time('projection-elemsMatch'); } } // Process aggregation if (options.$aggregate) { op.data('flag.aggregate', true); op.time('aggregate'); pathSolver = new Path(options.$aggregate); resultArr = pathSolver.value(resultArr); op.time('aggregate'); } // Now process any $groupBy clause if (options.$groupBy) { op.data('flag.group', true); op.time('group'); resultArr = this.group(options.$groupBy, resultArr); op.time('group'); } op.stop(); resultArr.__fdbOp = op; resultArr.$cursor = cursor; return resultArr; }; /** * Returns one document that satisfies the specified query criteria. If multiple * documents satisfy the query, this method returns the first document to match * the query. * @returns {*} */ Collection.prototype.findOne = function () { return (this.find.apply(this, arguments))[0]; }; /** * Gets the index in the collection data array of the first item matched by * the passed query object. * @param {Object} query The query to run to find the item to return the index of. * @param {Object=} options An options object. * @returns {Number} */ Collection.prototype.indexOf = function (query, options) { var item = this.find(query, {$decouple: false})[0], sortedData; if (item) { if (!options || options && !options.$orderBy) { // Basic lookup from order of insert return this._data.indexOf(item); } else { // Trying to locate index based on query with sort order options.$decouple = false; sortedData = this.find(query, options); return sortedData.indexOf(item); } } return -1; }; /** * Returns the index of the document identified by the passed item's primary key. * @param {*} itemLookup The document whose primary key should be used to lookup * or the id to lookup. * @param {Object=} options An options object. * @returns {Number} The index the item with the matching primary key is occupying. */ Collection.prototype.indexOfDocById = function (itemLookup, options) { var item, sortedData; if (typeof itemLookup !== 'object') { item = this._primaryIndex.get(itemLookup); } else { item = this._primaryIndex.get(itemLookup[this._primaryKey]); } if (item) { if (!options || options && !options.$orderBy) { // Basic lookup return this._data.indexOf(item); } else { // Sorted lookup options.$decouple = false; sortedData = this.find({}, options); return sortedData.indexOf(item); } } return -1; }; /** * Removes a document from the collection by it's index in the collection's * data array. * @param {Number} index The index of the document to remove. * @returns {Object} The document that has been removed or false if none was * removed. */ Collection.prototype.removeByIndex = function (index) { var doc, docId; doc = this._data[index]; if (doc !== undefined) { doc = this.decouple(doc); docId = doc[this.primaryKey()]; return this.removeById(docId); } return false; }; /** * Gets / sets the collection transform options. * @param {Object} obj A collection transform options object. * @returns {*} */ Collection.prototype.transform = function (obj) { if (obj !== undefined) { if (typeof obj === "object") { if (obj.enabled !== undefined) { this._transformEnabled = obj.enabled; } if (obj.dataIn !== undefined) { this._transformIn = obj.dataIn; } if (obj.dataOut !== undefined) { this._transformOut = obj.dataOut; } } else { this._transformEnabled = obj !== false; } return this; } return { enabled: this._transformEnabled, dataIn: this._transformIn, dataOut: this._transformOut }; }; /** * Transforms data using the set transformIn method. * @param {Object} data The data to transform. * @returns {*} */ Collection.prototype.transformIn = function (data) { if (this._transformEnabled && this._transformIn) { if (data instanceof Array) { var finalArr = [], transformResult, i; for (i = 0; i < data.length; i++) { transformResult = this._transformIn(data[i]); // Support transforms returning multiple items if (transformResult instanceof Array) { finalArr = finalArr.concat(transformResult); } else { finalArr.push(transformResult); } } return finalArr; } else { return this._transformIn(data); } } return data; }; /** * Transforms data using the set transformOut method. * @param {Object} data The data to transform. * @returns {*} */ Collection.prototype.transformOut = function (data) { if (this._transformEnabled && this._transformOut) { if (data instanceof Array) { var finalArr = [], transformResult, i; for (i = 0; i < data.length; i++) { transformResult = this._transformOut(data[i]); // Support transforms returning multiple items if (transformResult instanceof Array) { finalArr = finalArr.concat(transformResult); } else { finalArr.push(transformResult); } } return finalArr; } else { return this._transformOut(data); } } return data; }; /** * Sorts an array of documents by the given sort path. * @param {*} sortObj The keys and orders the array objects should be sorted by. * @param {Array} arr The array of documents to sort. * @returns {Array} */ Collection.prototype.sort = function (sortObj, arr) { // Convert the index object to an array of key val objects var self = this, keys = sharedPathSolver.parse(sortObj, true); if (keys.length) { // Execute sort arr.sort(function (a, b) { // Loop the index array var i, indexData, result = 0; for (i = 0; i < keys.length; i++) { indexData = keys[i]; if (indexData.value === 1) { result = self.sortAsc(sharedPathSolver.get(a, indexData.path), sharedPathSolver.get(b, indexData.path)); } else if (indexData.value === -1) { result = self.sortDesc(sharedPathSolver.get(a, indexData.path), sharedPathSolver.get(b, indexData.path)); } if (result !== 0) { return result; } } return result; }); } return arr; }; /** * Groups an array of documents into multiple array fields, named by the value * of the given group path. * @param {*} groupObj The key path the array objects should be grouped by. * @param {Array} arr The array of documents to group. * @returns {Object} */ Collection.prototype.group = function (groupObj, arr) { // Convert the index object to an array of key val objects var keys = sharedPathSolver.parse(groupObj, true), groupPathSolver = new Path(), groupValue, groupResult = {}, keyIndex, i; if (keys.length) { for (keyIndex = 0; keyIndex < keys.length; keyIndex++) { groupPathSolver.path(keys[keyIndex].path); // Execute group for (i = 0; i < arr.length; i++) { groupValue = groupPathSolver.get(arr[i]); groupResult[groupValue] = groupResult[groupValue] || []; groupResult[groupValue].push(arr[i]); } } } return groupResult; }; // Commented as we have a new method that was originally implemented for binary trees. // This old method actually has problems with nested sort objects /*Collection.prototype.sortold = function (sortObj, arr) { // Make sure we have an array object arr = arr || []; var sortArr = [], sortKey, sortSingleObj; for (sortKey in sortObj) { if (sortObj.hasOwnProperty(sortKey)) { sortSingleObj = {}; sortSingleObj[sortKey] = sortObj[sortKey]; sortSingleObj.___fdbKey = String(sortKey); sortArr.push(sortSingleObj); } } if (sortArr.length < 2) { // There is only one sort criteria, do a simple sort and return it return this._sort(sortObj, arr); } else { return this._bucketSort(sortArr, arr); } };*/ /** * REMOVED AS SUPERCEDED BY BETTER SORT SYSTEMS * Takes array of sort paths and sorts them into buckets before returning final * array fully sorted by multi-keys. * @param keyArr * @param arr * @returns {*} * @private */ /*Collection.prototype._bucketSort = function (keyArr, arr) { var keyObj = keyArr.shift(), arrCopy, bucketData, bucketOrder, bucketKey, buckets, i, finalArr = []; if (keyArr.length > 0) { // Sort array by bucket key arr = this._sort(keyObj, arr); // Split items into buckets bucketData = this.bucket(keyObj.___fdbKey, arr); bucketOrder = bucketData.order; buckets = bucketData.buckets; // Loop buckets and sort contents for (i = 0; i < bucketOrder.length; i++) { bucketKey = bucketOrder[i]; arrCopy = [].concat(keyArr); finalArr = finalArr.concat(this._bucketSort(arrCopy, buckets[bucketKey])); } return finalArr; } else { return this._sort(keyObj, arr); } };*/ /** * Takes an array of objects and returns a new object with the array items * split into buckets by the passed key. * @param {String} key The key to split the array into buckets by. * @param {Array} arr An array of objects. * @returns {Object} */ /*Collection.prototype.bucket = function (key, arr) { var i, oldField, field, fieldArr = [], buckets = {}; for (i = 0; i < arr.length; i++) { field = String(arr[i][key]); if (oldField !== field) { fieldArr.push(field); oldField = field; } buckets[field] = buckets[field] || []; buckets[field].push(arr[i]); } return { buckets: buckets, order: fieldArr }; };*/ /** * Sorts array by individual sort path. * @param {String} key The path to sort by. * @param {Array} arr The array of objects to sort. * @returns {Array|*} * @private */ Collection.prototype._sort = function (key, arr) { var self = this, sorterMethod, pathSolver = new Path(), dataPath = pathSolver.parse(key, true)[0]; pathSolver.path(dataPath.path); if (dataPath.value === 1) { // Sort ascending sorterMethod = function (a, b) { var valA = pathSolver.value(a)[0], valB = pathSolver.value(b)[0]; return self.sortAsc(valA, valB); }; } else if (dataPath.value === -1) { // Sort descending sorterMethod = function (a, b) { var valA = pathSolver.value(a)[0], valB = pathSolver.value(b)[0]; return self.sortDesc(valA, valB); }; } else { throw(this.logIdentifier() + ' $orderBy clause has invalid direction: ' + dataPath.value + ', accepted values are 1 or -1 for ascending or descending!'); } return arr.sort(sorterMethod); }; /** * Internal method that takes a search query and options and * returns an object containing details about the query which * can be used to optimise the search. * * @param {Object} query The search query to analyse. * @param {Object} options The query options object. * @param {Operation} op The instance of the Operation class that * this operation is using to track things like performance and steps * taken etc. * @returns {Object} * @private */ Collection.prototype._analyseQuery = function (query, options, op) { var analysis = { queriesOn: [{id: '$collection.' + this._name, type: 'colletion', key: this._name}], indexMatch: [], hasJoin: false, queriesJoin: false, joinQueries: {}, query: query, options: options }, joinSourceIndex, joinSourceKey, joinSourceType, joinSourceIdentifier, joinMatch, joinSources = [], joinSourceReferences = [], queryPath, index, indexMatchData, indexRef, indexRefName, indexLookup, pathSolver, queryKeyCount, pkQueryType, lookupResult, i; // Check if the query is a primary key lookup op.time('checkIndexes'); pathSolver = new Path(); queryKeyCount = pathSolver.parseArr(query, { ignore:/\$/, verbose: true }).length; if (queryKeyCount) { if (query[this._primaryKey] !== undefined) { // Check suitability of querying key value index pkQueryType = typeof query[this._primaryKey]; if (pkQueryType === 'string' || pkQueryType === 'number' || query[this._primaryKey] instanceof Array) { // Return item via primary key possible op.time('checkIndexMatch: Primary Key'); lookupResult = this._primaryIndex.lookup(query, options, op); analysis.indexMatch.push({ lookup: lookupResult, keyData: { matchedKeys: [this._primaryKey], totalKeyCount: queryKeyCount, score: 1 }, index: this._primaryIndex }); op.time('checkIndexMatch: Primary Key'); } } // Check if an index can speed up the query for (i in this._indexById) { if (this._indexById.hasOwnProperty(i)) { indexRef = this._indexById[i]; indexRefName = indexRef.name(); op.time('checkIndexMatch: ' + indexRefName); indexMatchData = indexRef.match(query, options); if (indexMatchData.score > 0) { // This index can be used, store it indexLookup = indexRef.lookup(query, options, op); analysis.indexMatch.push({ lookup: indexLookup, keyData: indexMatchData, index: indexRef }); } op.time('checkIndexMatch: ' + indexRefName); if (indexMatchData.score === queryKeyCount) { // Found an optimal index, do not check for any more break; } } } op.time('checkIndexes'); // Sort array descending on index key count (effectively a measure of relevance to the query) if (analysis.indexMatch.length > 1) { op.time('findOptimalIndex'); analysis.indexMatch.sort(function (a, b) { if (a.keyData.score > b.keyData.score) { // This index has a higher score than the other return -1; } if (a.keyData.score < b.keyData.score) { // This index has a lower score than the other return 1; } // The indexes have the same score but can still be compared by the number of records // they return from the query. The fewer records they return the better so order by // record count if (a.keyData.score === b.keyData.score) { return a.lookup.length - b.lookup.length; } }); op.time('findOptimalIndex'); } } // Check for join data if (options.$join) { analysis.hasJoin = true; // Loop all join operations for (joinSourceIndex = 0; joinSourceIndex < options.$join.length; joinSourceIndex++) { // Loop the join sources and keep a reference to them for (joinSourceKey in options.$join[joinSourceIndex]) { if (options.$join[joinSourceIndex].hasOwnProperty(joinSourceKey)) { joinMatch = options.$join[joinSourceIndex][joinSourceKey]; joinSourceType = joinMatch.$sourceType || 'collection'; joinSourceIdentifier = '$' + joinSourceType + '.' + joinSourceKey; joinSources.push({ id: joinSourceIdentifier, type: joinSourceType, key: joinSourceKey }); // Check if the join uses an $as operator if (options.$join[joinSourceIndex][joinSourceKey].$as !== undefined) { joinSourceReferences.push(options.$join[joinSourceIndex][joinSourceKey].$as); } else { joinSourceReferences.push(joinSourceKey); } } } } // Loop the join source references and determine if the query references // any of the sources that are used in the join. If there no queries against // joined sources the find method can use a code path optimised for this. // Queries against joined sources requires the joined sources to be filtered // first and then joined so requires a little more work. for (index = 0; index < joinSourceReferences.length; index++) { // Check if the query references any source data that the join will create queryPath = this._queryReferencesSource(query, joinSourceReferences[index], ''); if (queryPath) { analysis.joinQueries[joinSources[index].key] = queryPath; analysis.queriesJoin = true; } } analysis.joinsOn = joinSources; analysis.queriesOn = analysis.queriesOn.concat(joinSources); } return analysis; }; /** * Checks if the passed query references a source object (such * as a collection) by name. * @param {Object} query The query object to scan. * @param {String} sourceName The source name to scan for in the query. * @param {String=} path The path to scan from. * @returns {*} * @private */ Collection.prototype._queryReferencesSource = function (query, sourceName, path) { var i; for (i in query) { if (query.hasOwnProperty(i)) { // Check if this key is a reference match if (i === sourceName) { if (path) { path += '.'; } return path + i; } else { if (typeof(query[i]) === 'object') { // Recurse if (path) { path += '.'; } path += i; return this._queryReferencesSource(query[i], sourceName, path); } } } } return false; }; /** * Returns the number of documents currently in the collection. * @returns {Number} */ Collection.prototype.count = function (query, options) { if (!query) { return this._data.length; } else { // Run query and return count return this.find(query, options).length; } }; /** * Finds sub-documents from the collection's documents. * @param {Object} match The query object to use when matching * parent documents from which the sub-documents are queried. * @param {String} path The path string used to identify the * key in which sub-documents are stored in parent documents. * @param {Object=} subDocQuery The query to use when matching * which sub-documents to return. * @param {Object=} subDocOptions The options object to use * when querying for sub-documents. * @returns {*} */ Collection.prototype.findSub = function (match, path, subDocQuery, subDocOptions) { return this._findSub(this.find(match), path, subDocQuery, subDocOptions); }; Collection.prototype._findSub = function (docArr, path, subDocQuery, subDocOptions) { var pathHandler = new Path(path), docCount = docArr.length, docIndex, subDocArr, subDocCollection = new Collection('__FDB_temp_' + this.objectId()).db(this._db), subDocResults, resultObj = { parents: docCount, subDocTotal: 0, subDocs: [], pathFound: false, err: '' }; subDocOptions = subDocOptions || {}; for (docIndex = 0; docIndex < docCount; docIndex++) { subDocArr = pathHandler.value(docArr[docIndex])[0]; if (subDocArr) { subDocCollection.setData(subDocArr); subDocResults = subDocCollection.find(subDocQuery, subDocOptions); if (subDocOptions.returnFirst && subDocResults.length) { return subDocResults[0]; } if (subDocOptions.$split) { resultObj.subDocs.push(subDocResults); } else { resultObj.subDocs = resultObj.subDocs.concat(subDocResults); } resultObj.subDocTotal += subDocResults.length; resultObj.pathFound = true; } } // Drop the sub-document collection subDocCollection.drop(); if (!resultObj.pathFound) { resultObj.err = 'No objects found in the parent documents with a matching path of: ' + path; } // Check if the call should not return stats, if so return only subDocs array if (subDocOptions.$stats) { return resultObj; } else { return resultObj.subDocs; } }; /** * Finds the first sub-document from the collection's documents * that matches the subDocQuery parameter. * @param {Object} match The query object to use when matching * parent documents from which the sub-documents are queried. * @param {String} path The path string used to identify the * key in which sub-documents are stored in parent documents. * @param {Object=} subDocQuery The query to use when matching * which sub-documents to return. * @param {Object=} subDocOptions The options object to use * when querying for sub-documents. * @returns {Object} */ Collection.prototype.findSubOne = function (match, path, subDocQuery, subDocOptions) { return this.findSub(match, path, subDocQuery, subDocOptions)[0]; }; /** * Checks that the passed document will not violate any index rules if * inserted into the collection. * @param {Object} doc The document to check indexes against. * @returns {Boolean} Either false (no violation occurred) or true if * a violation was detected. */ Collection.prototype.insertIndexViolation = function (doc) { var indexViolated, arr = this._indexByName, arrIndex, arrItem; // Check the item's primary key is not already in use if (this._primaryIndex.get(doc[this._primaryKey])) { indexViolated = this._primaryIndex; } else { // Check violations of other indexes for (arrIndex in arr) { if (arr.hasOwnProperty(arrIndex)) { arrItem = arr[arrIndex]; if (arrItem.unique()) { if (arrItem.violation(doc)) { indexViolated = arrItem; break; } } } } } return indexViolated ? indexViolated.name() : false; }; /** * Creates an index on the specified keys. * @param {Object} keys The object containing keys to index. * @param {Object} options An options object. * @returns {*} */ Collection.prototype.ensureIndex = function (keys, options) { if (this.isDropped()) { throw(this.logIdentifier() + ' Cannot operate in a dropped state!'); } this._indexByName = this._indexByName || {}; this._indexById = this._indexById || {}; var index, time = { start: new Date().getTime() }; if (options) { if (options.type) { // Check if the specified type is available if (Shared.index[options.type]) { // We found the type, generate it index = new Shared.index[options.type](keys, options, this); } else { throw(this.logIdentifier() + ' Cannot create index of type "' + options.type + '", type not found in the index type register (Shared.index)'); } } else { // Create default index type index = new IndexHashMap(keys, options, this); } } else { // Default index = new IndexHashMap(keys, options, this); } // Check the index does not already exist if (this._indexByName[index.name()]) { // Index already exists return { err: 'Index with that name already exists' }; } /*if (this._indexById[index.id()]) { // Index already exists return { err: 'Index with those keys already exists' }; }*/ // Create the index index.rebuild(); // Add the index this._indexByName[index.name()] = index; this._indexById[index.id()] = index; time.end = new Date().getTime(); time.total = time.end - time.start; this._lastOp = { type: 'ensureIndex', stats: { time: time } }; return { index: index, id: index.id(), name: index.name(), state: index.state() }; }; /** * Gets an index by it's name. * @param {String} name The name of the index to retreive. * @returns {*} */ Collection.prototype.index = function (name) { if (this._indexByName) { return this._indexByName[name]; } }; /** * Gets the last reporting operation's details such as run time. * @returns {Object} */ Collection.prototype.lastOp = function () { return this._metrics.list(); }; /** * Generates a difference object that contains insert, update and remove arrays * representing the operations to execute to make this collection have the same * data as the one passed. * @param {Collection} collection The collection to diff against. * @returns {{}} */ Collection.prototype.diff = function (collection) { var diff = { insert: [], update: [], remove: [] }; var pk = this.primaryKey(), arr, arrIndex, arrItem, arrCount; // Check if the primary key index of each collection can be utilised if (pk !== collection.primaryKey()) { throw(this.logIdentifier() + ' Diffing requires that both collections have the same primary key!'); } // Use the collection primary key index to do the diff (super-fast) arr = collection._data; // Check if we have an array or another collection while (arr && !(arr instanceof Array)) { // We don't have an array, assign collection and get data collection = arr; arr = collection._data; } arrCount = arr.length; // Loop the collection's data array and check for matching items for (arrIndex = 0; arrIndex < arrCount; arrIndex++) { arrItem = arr[arrIndex]; // Check for a matching item in this collection if (this._primaryIndex.get(arrItem[pk])) { // Matching item exists, check if the data is the same if (this._primaryCrc.get(arrItem[pk]) !== collection._primaryCrc.get(arrItem[pk])) { // The documents exist in both collections but data differs, update required diff.update.push(arrItem); } } else { // The document is missing from this collection, insert required diff.insert.push(arrItem); } } // Now loop this collection's data and check for matching items arr = this._data; arrCount = arr.length; for (arrIndex = 0; arrIndex < arrCount; arrIndex++) { arrItem = arr[arrIndex]; if (!collection._primaryIndex.get(arrItem[pk])) { // The document does not exist in the other collection, remove required diff.remove.push(arrItem); } } return diff; }; Collection.prototype.collateAdd = new Overload('Collection.prototype.collateAdd', { /** * Adds a data source to collate data from and specifies the * key name to collate data to. * @func collateAdd * @memberof Collection * @param {Collection} collection The collection to collate data from. * @param {String=} keyName Optional name of the key to collate data to. * If none is provided the record CRUD is operated on the root collection * data. */ 'object, string': function (collection, keyName) { var self = this; self.collateAdd(collection, function (packet) { var obj1, obj2; switch (packet.type) { case 'insert': if (keyName) { obj1 = { $push: {} }; obj1.$push[keyName] = self.decouple(packet.data.dataSet); self.update({}, obj1); } else { self.insert(packet.data.dataSet); } break; case 'update': if (keyName) { obj1 = {}; obj2 = {}; obj1[keyName] = packet.data.query; obj2[keyName + '.$'] = packet.data.update; self.update(obj1, obj2); } else { self.update(packet.data.query, packet.data.update); } break; case 'remove': if (keyName) { obj1 = { $pull: {} }; obj1.$pull[keyName] = {}; obj1.$pull[keyName][self.primaryKey()] = packet.data.dataSet[0][collection.primaryKey()]; self.update({}, obj1); } else { self.remove(packet.data.dataSet); } break; default: } }); }, /** * Adds a data source to collate data from and specifies a process * method that will handle the collation functionality (for custom * collation). * @func collateAdd * @memberof Collection * @param {Collection} collection The collection to collate data from. * @param {Function} process The process method. */ 'object, function': function (collection, process) { if (typeof collection === 'string') { // The collection passed is a name, not a reference so get // the reference from the name collection = this._db.collection(collection, { autoCreate: false, throwError: false }); } if (collection) { this._collate = this._collate || {}; this._collate[collection.name()] = new ReactorIO(collection, this, process); return this; } else { throw('Cannot collate from a non-existent collection!'); } } }); Collection.prototype.collateRemove = function (collection) { if (typeof collection === 'object') { // We need to have the name of the collection to remove it collection = collection.name(); } if (collection) { // Drop the reactor IO chain node this._collate[collection].drop(); // Remove the collection data from the collate object delete this._collate[collection]; return this; } else { throw('No collection name passed to collateRemove() or collection not found!'); } }; /** * Creates a condition handler that will react to changes in data on the * collection. * @example Create a condition handler that reacts when data changes. * var coll = db.collection('test'), * condition = coll.when({_id: 'test1', val: 1}) * .then(function () { * console.log('Condition met!'); * }) * .else(function () { * console.log('Condition un-met'); * }); * * coll.insert({_id: 'test1', val: 1}); * * @see Condition * @param {Object} query The query that will trigger the condition's then() * callback. * @returns {Condition} */ Collection.prototype.when = function (query) { var queryId = this.objectId(); this._when = this._when || {}; this._when[queryId] = this._when[queryId] || new Condition(this, queryId, query); return this._when[queryId]; }; Db.prototype.collection = new Overload('Db.prototype.collection', { /** * Get a collection with no name (generates a random name). If the * collection does not already exist then one is created for that * name automatically. * @func collection * @memberof Db * @returns {Collection} */ '': function () { return this.$main.call(this, { name: this.objectId() }); }, /** * Get a collection by name. If the collection does not already exist * then one is created for that name automatically. * @func collection * @memberof Db * @param {Object} data An options object or a collection instance. * @returns {Collection} */ 'object': function (data) { // Handle being passed an instance if (data instanceof Collection) { if (data.state() !== 'droppped') { return data; } else { return this.$main.call(this, { name: data.name() }); } } return this.$main.call(this, data); }, /** * Get a collection by name. If the collection does not already exist * then one is created for that name automatically. * @func collection * @memberof Db * @param {String} collectionName The name of the collection. * @returns {Collection} */ 'string': function (collectionName) { return this.$main.call(this, { name: collectionName }); }, /** * Get a collection by name. If the collection does not already exist * then one is created for that name automatically. * @func collection * @memberof Db * @param {String} collectionName The name of the collection. * @param {String} primaryKey Optional primary key to specify the * primary key field on the collection objects. Defaults to "_id". * @returns {Collection} */ 'string, string': function (collectionName, primaryKey) { return this.$main.call(this, { name: collectionName, primaryKey: primaryKey }); }, /** * Get a collection by name. If the collection does not already exist * then one is created for that name automatically. * @func collection * @memberof Db * @param {String} collectionName The name of the collection. * @param {Object} options An options object. * @returns {Collection} */ 'string, object': function (collectionName, options) { options.name = collectionName; return this.$main.call(this, options); }, /** * Get a collection by name. If the collection does not already exist * then one is created for that name automatically. * @func collection * @memberof Db * @param {String} collectionName The name of the collection. * @param {String} primaryKey Optional primary key to specify the * primary key field on the collection objects. Defaults to "_id". * @param {Object} options An options object. * @returns {Collection} */ 'string, string, object': function (collectionName, primaryKey, options) { options.name = collectionName; options.primaryKey = primaryKey; return this.$main.call(this, options); }, /** * The main handler method. This gets called by all the other * variants and handles the actual logic of the overloaded method. * @func collection * @memberof Db * @param {Object} options An options object. * @returns {*} */ '$main': function (options) { var self = this, name = options.name; if (name) { if (this._collection[name]) { return this._collection[name]; } else { if (options && options.autoCreate === false) { if (options && options.throwError !== false) { throw(this.logIdentifier() + ' Cannot get collection ' + name + ' because it does not exist and auto-create has been disabled!'); } return undefined; } if (this.debug()) { console.log(this.logIdentifier() + ' Creating collection ' + name); } } this._collection[name] = this._collection[name] || new Collection(name, options).db(this); this._collection[name].mongoEmulation(this.mongoEmulation()); if (options.primaryKey !== undefined) { this._collection[name].primaryKey(options.primaryKey); } if (options.capped !== undefined) { // Check we have a size if (options.size !== undefined) { this._collection[name].capped(options.capped); this._collection[name].cappedSize(options.size); } else { throw(this.logIdentifier() + ' Cannot create a capped collection without specifying a size!'); } } // Listen for events on this collection so we can fire global events // on the database in response to it self._collection[name].on('change', function () { self.emit('change', self._collection[name], 'collection', name); }); self.emit('create', self._collection[name], 'collection', name); return this._collection[name]; } else { if (!options || (options && options.throwError !== false)) { throw(this.logIdentifier() + ' Cannot get collection with undefined name!'); } } } }); /** * Determine if a collection with the passed name already exists. * @memberof Db * @param {String} viewName The name of the collection to check for. * @returns {boolean} */ Db.prototype.collectionExists = function (viewName) { return Boolean(this._collection[viewName]); }; /** * Returns an array of collections the DB currently has. * @memberof Db * @param {String|RegExp=} search The optional search string or * regular expression to use to match collection names against. * @returns {Array} An array of objects containing details of each * collection the database is currently managing. */ Db.prototype.collections = function (search) { var arr = [], collections = this._collection, collection, i; if (search) { if (!(search instanceof RegExp)) { // Turn the search into a regular expression search = new RegExp(search); } } for (i in collections) { if (collections.hasOwnProperty(i)) { collection = collections[i]; if (search) { if (search.exec(i)) { arr.push({ name: i, count: collection.count(), linked: collection.isLinked !== undefined ? collection.isLinked() : false }); } } else { arr.push({ name: i, count: collection.count(), linked: collection.isLinked !== undefined ? collection.isLinked() : false }); } } } arr.sort(function (a, b) { return a.name.localeCompare(b.name); }); return arr; }; Shared.finishModule('Collection'); module.exports = Collection; },{"./Condition":8,"./Index2d":12,"./IndexBinaryTree":13,"./IndexHashMap":14,"./KeyValueStore":15,"./Metrics":16,"./Overload":28,"./Path":29,"./ReactorIO":30,"./Shared":32}],7:[function(_dereq_,module,exports){ "use strict"; // Import external names locally var Shared, Db, DbInit, Collection; Shared = _dereq_('./Shared'); /** * Creates a new collection group. Collection groups allow single operations to be * propagated to multiple collections at once. CRUD operations against a collection * group are in fed to the group's collections. Useful when separating out slightly * different data into multiple collections but querying as one collection. * @constructor */ var CollectionGroup = function () { this.init.apply(this, arguments); }; CollectionGroup.prototype.init = function (name) { var self = this; self._name = name; self._data = new Collection('__FDB__cg_data_' + self._name); self._collections = []; self._view = []; }; Shared.addModule('CollectionGroup', CollectionGroup); Shared.mixin(CollectionGroup.prototype, 'Mixin.Common'); Shared.mixin(CollectionGroup.prototype, 'Mixin.ChainReactor'); Shared.mixin(CollectionGroup.prototype, 'Mixin.Constants'); Shared.mixin(CollectionGroup.prototype, 'Mixin.Triggers'); Shared.mixin(CollectionGroup.prototype, 'Mixin.Tags'); Shared.mixin(CollectionGroup.prototype, 'Mixin.Events'); Collection = _dereq_('./Collection'); Db = Shared.modules.Db; DbInit = Shared.modules.Db.prototype.init; CollectionGroup.prototype.on = function () { this._data.on.apply(this._data, arguments); }; CollectionGroup.prototype.off = function () { this._data.off.apply(this._data, arguments); }; CollectionGroup.prototype.emit = function () { this._data.emit.apply(this._data, arguments); }; /** * Gets / sets the primary key for this collection group. * @param {String=} keyName The name of the primary key. * @returns {*} */ CollectionGroup.prototype.primaryKey = function (keyName) { if (keyName !== undefined) { this._primaryKey = keyName; return this; } return this._primaryKey; }; /** * Gets / sets the current state. * @param {String=} val The name of the state to set. * @returns {*} */ Shared.synthesize(CollectionGroup.prototype, 'state'); /** * Gets / sets the db instance the collection group belongs to. * @param {Db=} db The db instance. * @returns {*} */ Shared.synthesize(CollectionGroup.prototype, 'db'); /** * Gets / sets the instance name. * @param {String=} name The new name to set. * @returns {*} */ Shared.synthesize(CollectionGroup.prototype, 'name'); CollectionGroup.prototype.addCollection = function (collection) { if (collection) { if (this._collections.indexOf(collection) === -1) { //var self = this; // Check for compatible primary keys if (this._collections.length) { if (this._primaryKey !== collection.primaryKey()) { throw(this.logIdentifier() + ' All collections in a collection group must have the same primary key!'); } } else { // Set the primary key to the first collection added this.primaryKey(collection.primaryKey()); } // Add the collection this._collections.push(collection); collection._groups = collection._groups || []; collection._groups.push(this); collection.chain(this); // Hook the collection's drop event to destroy group data collection.on('drop', function () { // Remove collection from any group associations if (collection._groups && collection._groups.length) { var groupArr = [], i; // Copy the group array because if we call removeCollection on a group // it will alter the groups array of this collection mid-loop! for (i = 0; i < collection._groups.length; i++) { groupArr.push(collection._groups[i]); } // Loop any groups we are part of and remove ourselves from them for (i = 0; i < groupArr.length; i++) { collection._groups[i].removeCollection(collection); } } delete collection._groups; }); // Add collection's data this._data.insert(collection.find()); } } return this; }; CollectionGroup.prototype.removeCollection = function (collection) { if (collection) { var collectionIndex = this._collections.indexOf(collection), groupIndex; if (collectionIndex !== -1) { collection.unChain(this); this._collections.splice(collectionIndex, 1); collection._groups = collection._groups || []; groupIndex = collection._groups.indexOf(this); if (groupIndex !== -1) { collection._groups.splice(groupIndex, 1); } collection.off('drop'); } if (this._collections.length === 0) { // Wipe the primary key delete this._primaryKey; } } return this; }; CollectionGroup.prototype._chainHandler = function (chainPacket) { //sender = chainPacket.sender; switch (chainPacket.type) { case 'setData': // Decouple the data to ensure we are working with our own copy chainPacket.data.dataSet = this.decouple(chainPacket.data.dataSet); // Remove old data this._data.remove(chainPacket.data.oldData); // Add new data this._data.insert(chainPacket.data.dataSet); break; case 'insert': // Decouple the data to ensure we are working with our own copy chainPacket.data.dataSet = this.decouple(chainPacket.data.dataSet); // Add new data this._data.insert(chainPacket.data.dataSet); break; case 'update': // Update data this._data.update(chainPacket.data.query, chainPacket.data.update, chainPacket.options); break; case 'remove': this._data.remove(chainPacket.data.query, chainPacket.options); break; default: break; } }; CollectionGroup.prototype.insert = function () { this._collectionsRun('insert', arguments); }; CollectionGroup.prototype.update = function () { this._collectionsRun('update', arguments); }; CollectionGroup.prototype.updateById = function () { this._collectionsRun('updateById', arguments); }; CollectionGroup.prototype.remove = function () { this._collectionsRun('remove', arguments); }; CollectionGroup.prototype._collectionsRun = function (type, args) { for (var i = 0; i < this._collections.length; i++) { this._collections[i][type].apply(this._collections[i], args); } }; CollectionGroup.prototype.find = function (query, options) { return this._data.find(query, options); }; /** * Helper method that removes a document that matches the given id. * @param {String} id The id of the document to remove. */ CollectionGroup.prototype.removeById = function (id) { // Loop the collections in this group and apply the remove for (var i = 0; i < this._collections.length; i++) { this._collections[i].removeById(id); } }; /** * Uses the passed query to generate a new collection with results * matching the query parameters. * * @param query * @param options * @returns {*} */ CollectionGroup.prototype.subset = function (query, options) { var result = this.find(query, options); return new Collection() .subsetOf(this) .primaryKey(this._primaryKey) .setData(result); }; /** * Drops a collection group from the database. * @returns {boolean} True on success, false on failure. */ CollectionGroup.prototype.drop = function (callback) { if (!this.isDropped()) { var i, collArr, viewArr; if (this._debug) { console.log(this.logIdentifier() + ' Dropping'); } this._state = 'dropped'; if (this._collections && this._collections.length) { collArr = [].concat(this._collections); for (i = 0; i < collArr.length; i++) { this.removeCollection(collArr[i]); } } if (this._view && this._view.length) { viewArr = [].concat(this._view); for (i = 0; i < viewArr.length; i++) { this._removeView(viewArr[i]); } } this.emit('drop', this); delete this._listeners; if (callback) { callback(false, true); } } return true; }; // Extend DB to include collection groups Db.prototype.init = function () { this._collectionGroup = {}; DbInit.apply(this, arguments); }; /** * Creates a new collectionGroup instance or returns an existing * instance if one already exists with the passed name. * @func collectionGroup * @memberOf Db * @param {String} name The name of the instance. * @returns {*} */ Db.prototype.collectionGroup = function (name) { var self = this; if (name) { // Handle being passed an instance if (name instanceof CollectionGroup) { return name; } if (this._collectionGroup && this._collectionGroup[name]) { return this._collectionGroup[name]; } this._collectionGroup[name] = new CollectionGroup(name).db(this); self.emit('create', self._collectionGroup[name], 'collectionGroup', name); return this._collectionGroup[name]; } else { // Return an object of collection data return this._collectionGroup; } }; /** * Returns an array of collection groups the DB currently has. * @returns {Array} An array of objects containing details of each collection group * the database is currently managing. */ Db.prototype.collectionGroups = function () { var arr = [], i; for (i in this._collectionGroup) { if (this._collectionGroup.hasOwnProperty(i)) { arr.push({ name: i }); } } return arr; }; module.exports = CollectionGroup; },{"./Collection":6,"./Shared":32}],8:[function(_dereq_,module,exports){ "use strict"; /** * The condition class monitors a data source and updates it's internal * state depending on clauses that it has been given. When all clauses * are satisfied the then() callback is fired. If conditions were met * but data changed that made them un-met, the else() callback is fired. */ var //Overload = require('./Overload'), Shared, Condition; Shared = _dereq_('./Shared'); /** * Create a constructor method that calls the instance's init method. * This allows the constructor to be overridden by other modules because * they can override the init method with their own. */ Condition = function () { this.init.apply(this, arguments); }; Condition.prototype.init = function (dataSource, id, clause) { this._dataSource = dataSource; this._id = id; this._query = [clause]; this._started = false; this._state = [false]; this._satisfied = false; // Set this to true by default for faster performance this.earlyExit(true); }; // Tell ForerunnerDB about our new module Shared.addModule('Condition', Condition); // Mixin some commonly used methods Shared.mixin(Condition.prototype, 'Mixin.Common'); Shared.mixin(Condition.prototype, 'Mixin.ChainReactor'); Shared.synthesize(Condition.prototype, 'id'); Shared.synthesize(Condition.prototype, 'then'); Shared.synthesize(Condition.prototype, 'else'); Shared.synthesize(Condition.prototype, 'earlyExit'); Shared.synthesize(Condition.prototype, 'debug'); /** * Adds a new clause to the condition. * @param {Object} clause The query clause to add to the condition. * @returns {Condition} */ Condition.prototype.and = function (clause) { this._query.push(clause); this._state.push(false); return this; }; /** * Starts the condition so that changes to data will call callback * methods according to clauses being met. * @param {*} initialState Initial state of condition. * @returns {Condition} */ Condition.prototype.start = function (initialState) { if (!this._started) { var self = this; if (arguments.length !== 0) { this._satisfied = initialState; } // Resolve the current state this._updateStates(); self._onChange = function () { self._updateStates(); }; // Create a chain reactor link to the data source so we start receiving CRUD ops from it this._dataSource.on('change', self._onChange); this._started = true; } return this; }; /** * Updates the internal status of all the clauses against the underlying * data source. * @private */ Condition.prototype._updateStates = function () { var satisfied = true, i; for (i = 0; i < this._query.length; i++) { this._state[i] = this._dataSource.count(this._query[i]) > 0; if (this._debug) { console.log(this.logIdentifier() + ' Evaluating', this._query[i], '=', this._query[i]); } if (!this._state[i]) { satisfied = false; // Early exit since we have found a state that is not true if (this._earlyExit) { break; } } } if (this._satisfied !== satisfied) { // Our state has changed, fire the relevant operation if (satisfied) { // Fire the "then" operation if (this._then) { this._then(); } } else { // Fire the "else" operation if (this._else) { this._else(); } } this._satisfied = satisfied; } }; /** * Stops the condition so that callbacks will no longer fire. * @returns {Condition} */ Condition.prototype.stop = function () { if (this._started) { this._dataSource.off('change', this._onChange); delete this._onChange; this._started = false; } return this; }; /** * Drops the condition and removes it from memory. * @returns {Condition} */ Condition.prototype.drop = function () { this.stop(); delete this._dataSource.when[this._id]; return this; }; // Tell ForerunnerDB that our module has finished loading Shared.finishModule('Condition'); module.exports = Condition; },{"./Shared":32}],9:[function(_dereq_,module,exports){ /* License Copyright (c) 2015 Irrelon Software Limited http://www.irrelon.com http://www.forerunnerdb.com Please visit the license page to see latest license information: http://www.forerunnerdb.com/licensing.html */ "use strict"; var Shared, Db, Metrics, Overload, _instances = []; Shared = _dereq_('./Shared'); Overload = _dereq_('./Overload'); /** * Creates a new ForerunnerDB instance. Core instances handle the lifecycle of * multiple database instances. * @constructor */ var Core = function (val) { this.init.apply(this, arguments); }; Core.prototype.init = function (name) { this._db = {}; this._debug = {}; this._name = name || 'ForerunnerDB'; _instances.push(this); }; /** * Returns the number of instantiated ForerunnerDB objects. * @returns {Number} The number of instantiated instances. */ Core.prototype.instantiatedCount = function () { return _instances.length; }; /** * Get all instances as an array or a single ForerunnerDB instance * by it's array index. * @param {Number=} index Optional index of instance to get. * @returns {Array|Object} Array of instances or a single instance. */ Core.prototype.instances = function (index) { if (index !== undefined) { return _instances[index]; } return _instances; }; /** * Get all instances as an array of instance names or a single ForerunnerDB * instance by it's name. * @param {String=} name Optional name of instance to get. * @returns {Array|Object} Array of instance names or a single instance. */ Core.prototype.namedInstances = function (name) { var i, instArr; if (name !== undefined) { for (i = 0; i < _instances.length; i++) { if (_instances[i].name === name) { return _instances[i]; } } return undefined; } instArr = []; for (i = 0; i < _instances.length; i++) { instArr.push(_instances[i].name); } return instArr; }; Core.prototype.moduleLoaded = new Overload({ /** * Checks if a module has been loaded into the database. * @func moduleLoaded * @memberof Core * @param {String} moduleName The name of the module to check for. * @returns {Boolean} True if the module is loaded, false if not. */ 'string': function (moduleName) { if (moduleName !== undefined) { moduleName = moduleName.replace(/ /g, ''); var modules = moduleName.split(','), index; for (index = 0; index < modules.length; index++) { if (!Shared.modules[modules[index]]) { return false; } } return true; } return false; }, /** * Checks if a module is loaded and if so calls the passed * callback method. * @func moduleLoaded * @memberof Core * @param {String} moduleName The name of the module to check for. * @param {Function} callback The callback method to call if module is loaded. */ 'string, function': function (moduleName, callback) { if (moduleName !== undefined) { moduleName = moduleName.replace(/ /g, ''); var modules = moduleName.split(','), index; for (index = 0; index < modules.length; index++) { if (!Shared.modules[modules[index]]) { return false; } } if (callback) { callback(); } } }, /** * Checks if an array of named modules are loaded and if so * calls the passed callback method. * @func moduleLoaded * @memberof Core * @param {Array} moduleName The array of module names to check for. * @param {Function} callback The callback method to call if modules are loaded. */ 'array, function': function (moduleNameArr, callback) { var moduleName, i; for (i = 0; i < moduleNameArr.length; i++) { moduleName = moduleNameArr[i]; if (moduleName !== undefined) { moduleName = moduleName.replace(/ /g, ''); var modules = moduleName.split(','), index; for (index = 0; index < modules.length; index++) { if (!Shared.modules[modules[index]]) { return false; } } } } if (callback) { callback(); } }, /** * Checks if a module is loaded and if so calls the passed * success method, otherwise calls the failure method. * @func moduleLoaded * @memberof Core * @param {String} moduleName The name of the module to check for. * @param {Function} success The callback method to call if module is loaded. * @param {Function} failure The callback method to call if module not loaded. */ 'string, function, function': function (moduleName, success, failure) { if (moduleName !== undefined) { moduleName = moduleName.replace(/ /g, ''); var modules = moduleName.split(','), index; for (index = 0; index < modules.length; index++) { if (!Shared.modules[modules[index]]) { failure(); return false; } } success(); } } }); /** * Checks version against the string passed and if it matches (or partially matches) * then the callback is called. * @param {String} val The version to check against. * @param {Function} callback The callback to call if match is true. * @returns {Boolean} */ Core.prototype.version = function (val, callback) { if (val !== undefined) { if (Shared.version.indexOf(val) === 0) { if (callback) { callback(); } return true; } return false; } return Shared.version; }; // Expose moduleLoaded() method to non-instantiated object ForerunnerDB Core.moduleLoaded = Core.prototype.moduleLoaded; // Expose version() method to non-instantiated object ForerunnerDB Core.version = Core.prototype.version; // Expose instances() method to non-instantiated object ForerunnerDB Core.instances = Core.prototype.instances; // Expose instantiatedCount() method to non-instantiated object ForerunnerDB Core.instantiatedCount = Core.prototype.instantiatedCount; // Provide public access to the Shared object Core.shared = Shared; Core.prototype.shared = Shared; Shared.addModule('Core', Core); Shared.mixin(Core.prototype, 'Mixin.Common'); Shared.mixin(Core.prototype, 'Mixin.Constants'); Db = _dereq_('./Db.js'); Metrics = _dereq_('./Metrics.js'); /** * Gets / sets the name of the instance. This is primarily used for * name-spacing persistent storage. * @param {String=} val The name of the instance to set. * @returns {*} */ Shared.synthesize(Core.prototype, 'name'); /** * Gets / sets mongodb emulation mode. * @param {Boolean=} val True to enable, false to disable. * @returns {*} */ Shared.synthesize(Core.prototype, 'mongoEmulation'); // Set a flag to determine environment Core.prototype._isServer = false; /** * Checks if the database is running on a client (browser) or * a server (node.js). * @returns {Boolean} Returns true if running on a browser. */ Core.prototype.isClient = function () { return !this._isServer; }; /** * Checks if the database is running on a client (browser) or * a server (node.js). * @returns {Boolean} Returns true if running on a server. */ Core.prototype.isServer = function () { return this._isServer; }; /** * Added to provide an error message for users who have not seen * the new instantiation breaking change warning and try to get * a collection directly from the core instance. */ Core.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"); }; module.exports = Core; },{"./Db.js":10,"./Metrics.js":16,"./Overload":28,"./Shared":32}],10:[function(_dereq_,module,exports){ "use strict"; var Shared, Core, Collection, Metrics, Checksum, Overload; Shared = _dereq_('./Shared'); Overload = _dereq_('./Overload'); /** * Creates a new ForerunnerDB database instance. * @constructor */ var Db = function (name, core) { this.init.apply(this, arguments); }; Db.prototype.init = function (name, core) { this.core(core); this._primaryKey = '_id'; this._name = name; this._collection = {}; this._debug = {}; }; Shared.addModule('Db', Db); Db.prototype.moduleLoaded = new Overload({ /** * Checks if a module has been loaded into the database. * @func moduleLoaded * @memberof Db * @param {String} moduleName The name of the module to check for. * @returns {Boolean} True if the module is loaded, false if not. */ 'string': function (moduleName) { if (moduleName !== undefined) { moduleName = moduleName.replace(/ /g, ''); var modules = moduleName.split(','), index; for (index = 0; index < modules.length; index++) { if (!Shared.modules[modules[index]]) { return false; } } return true; } return false; }, /** * Checks if a module is loaded and if so calls the passed * callback method. * @func moduleLoaded * @memberof Db * @param {String} moduleName The name of the module to check for. * @param {Function} callback The callback method to call if module is loaded. */ 'string, function': function (moduleName, callback) { if (moduleName !== undefined) { moduleName = moduleName.replace(/ /g, ''); var modules = moduleName.split(','), index; for (index = 0; index < modules.length; index++) { if (!Shared.modules[modules[index]]) { return false; } } if (callback) { callback(); } } }, /** * Checks if a module is loaded and if so calls the passed * success method, otherwise calls the failure method. * @func moduleLoaded * @memberof Db * @param {String} moduleName The name of the module to check for. * @param {Function} success The callback method to call if module is loaded. * @param {Function} failure The callback method to call if module not loaded. */ 'string, function, function': function (moduleName, success, failure) { if (moduleName !== undefined) { moduleName = moduleName.replace(/ /g, ''); var modules = moduleName.split(','), index; for (index = 0; index < modules.length; index++) { if (!Shared.modules[modules[index]]) { failure(); return false; } } success(); } } }); /** * Checks version against the string passed and if it matches (or partially matches) * then the callback is called. * @param {String} val The version to check against. * @param {Function} callback The callback to call if match is true. * @returns {Boolean} */ Db.prototype.version = function (val, callback) { if (val !== undefined) { if (Shared.version.indexOf(val) === 0) { if (callback) { callback(); } return true; } return false; } return Shared.version; }; // Expose moduleLoaded method to non-instantiated object ForerunnerDB Db.moduleLoaded = Db.prototype.moduleLoaded; // Expose version method to non-instantiated object ForerunnerDB Db.version = Db.prototype.version; // Provide public access to the Shared object Db.shared = Shared; Db.prototype.shared = Shared; Shared.addModule('Db', Db); Shared.mixin(Db.prototype, 'Mixin.Common'); Shared.mixin(Db.prototype, 'Mixin.ChainReactor'); Shared.mixin(Db.prototype, 'Mixin.Constants'); Shared.mixin(Db.prototype, 'Mixin.Tags'); Core = Shared.modules.Core; Collection = _dereq_('./Collection.js'); Metrics = _dereq_('./Metrics.js'); Checksum = _dereq_('./Checksum.js'); Db.prototype._isServer = false; /** * Gets / sets the core object this database belongs to. */ Shared.synthesize(Db.prototype, 'core'); /** * Gets / sets the default primary key for new collections. * @param {String=} val The name of the primary key to set. * @returns {*} */ Shared.synthesize(Db.prototype, 'primaryKey'); /** * Gets / sets the current state. * @param {String=} val The name of the state to set. * @returns {*} */ Shared.synthesize(Db.prototype, 'state'); /** * Gets / sets the name of the database. * @param {String=} val The name of the database to set. * @returns {*} */ Shared.synthesize(Db.prototype, 'name'); /** * Gets / sets mongodb emulation mode. * @param {Boolean=} val True to enable, false to disable. * @returns {*} */ Shared.synthesize(Db.prototype, 'mongoEmulation'); /** * Returns true if ForerunnerDB is running on a client browser. * @returns {boolean} */ Db.prototype.isClient = function () { return !this._isServer; }; /** * Returns true if ForerunnerDB is running on a server. * @returns {boolean} */ Db.prototype.isServer = function () { return this._isServer; }; /** * Returns a checksum of a string. * @param {String} string The string to checksum. * @return {String} The checksum generated. */ Db.prototype.Checksum = Checksum; /** * Checks if the database is running on a client (browser) or * a server (node.js). * @returns {Boolean} Returns true if running on a browser. */ Db.prototype.isClient = function () { return !this._isServer; }; /** * Checks if the database is running on a client (browser) or * a server (node.js). * @returns {Boolean} Returns true if running on a server. */ Db.prototype.isServer = function () { return this._isServer; }; /** * Converts a normal javascript array of objects into a DB collection. * @param {Array} arr An array of objects. * @returns {Collection} A new collection instance with the data set to the * array passed. */ Db.prototype.arrayToCollection = function (arr) { return new Collection().setData(arr); }; /** * Registers an event listener against an event name. * @param {String} event The name of the event to listen for. * @param {Function} listener The listener method to call when * the event is fired. * @returns {*} */ Db.prototype.on = function(event, listener) { this._listeners = this._listeners || {}; this._listeners[event] = this._listeners[event] || []; this._listeners[event].push(listener); return this; }; /** * De-registers an event listener from an event name. * @param {String} event The name of the event to stop listening for. * @param {Function} listener The listener method passed to on() when * registering the event listener. * @returns {*} */ Db.prototype.off = function(event, listener) { if (event in this._listeners) { var arr = this._listeners[event], index = arr.indexOf(listener); if (index > -1) { arr.splice(index, 1); } } return this; }; /** * Emits an event by name with the given data. * @param {String} event The name of the event to emit. * @param {*=} data The data to emit with the event. * @returns {*} */ Db.prototype.emit = function(event, data) { this._listeners = this._listeners || {}; if (event in this._listeners) { var arr = this._listeners[event], arrCount = arr.length, arrIndex; for (arrIndex = 0; arrIndex < arrCount; arrIndex++) { arr[arrIndex].apply(this, Array.prototype.slice.call(arguments, 1)); } } return this; }; Db.prototype.peek = function (search) { var i, coll, arr = [], typeOfSearch = typeof search; // Loop collections for (i in this._collection) { if (this._collection.hasOwnProperty(i)) { coll = this._collection[i]; if (typeOfSearch === 'string') { arr = arr.concat(coll.peek(search)); } else { arr = arr.concat(coll.find(search)); } } } return arr; }; /** * Find all documents across all collections in the database that match the passed * string or search object. * @param search String or search object. * @returns {Array} */ Db.prototype.peek = function (search) { var i, coll, arr = [], typeOfSearch = typeof search; // Loop collections for (i in this._collection) { if (this._collection.hasOwnProperty(i)) { coll = this._collection[i]; if (typeOfSearch === 'string') { arr = arr.concat(coll.peek(search)); } else { arr = arr.concat(coll.find(search)); } } } return arr; }; /** * Find all documents across all collections in the database that match the passed * string or search object and return them in an object where each key is the name * of the collection that the document was matched in. * @param search String or search object. * @returns {object} */ Db.prototype.peekCat = function (search) { var i, coll, cat = {}, arr, typeOfSearch = typeof search; // Loop collections for (i in this._collection) { if (this._collection.hasOwnProperty(i)) { coll = this._collection[i]; if (typeOfSearch === 'string') { arr = coll.peek(search); if (arr && arr.length) { cat[coll.name()] = arr; } } else { arr = coll.find(search); if (arr && arr.length) { cat[coll.name()] = arr; } } } } return cat; }; Db.prototype.drop = new Overload({ /** * Drops the database. * @func drop * @memberof Db */ '': function () { if (!this.isDropped()) { var arr = this.collections(), arrCount = arr.length, arrIndex; this._state = 'dropped'; for (arrIndex = 0; arrIndex < arrCount; arrIndex++) { this.collection(arr[arrIndex].name).drop(); delete this._collection[arr[arrIndex].name]; } this.emit('drop', this); delete this._listeners; delete this._core._db[this._name]; } return true; }, /** * Drops the database with optional callback method. * @func drop * @memberof Db * @param {Function} callback Optional callback method. */ 'function': function (callback) { if (!this.isDropped()) { var arr = this.collections(), arrCount = arr.length, arrIndex, finishCount = 0, afterDrop = function () { finishCount++; if (finishCount === arrCount) { if (callback) { callback(); } } }; this._state = 'dropped'; for (arrIndex = 0; arrIndex < arrCount; arrIndex++) { this.collection(arr[arrIndex].name).drop(afterDrop); delete this._collection[arr[arrIndex].name]; } this.emit('drop', this); delete this._listeners; delete this._core._db[this._name]; } return true; }, /** * Drops the database with optional persistent storage drop. Persistent * storage is dropped by default if no preference is provided. * @func drop * @memberof Db * @param {Boolean} removePersist Drop persistent storage for this database. */ 'boolean': function (removePersist) { if (!this.isDropped()) { var arr = this.collections(), arrCount = arr.length, arrIndex; this._state = 'dropped'; for (arrIndex = 0; arrIndex < arrCount; arrIndex++) { this.collection(arr[arrIndex].name).drop(removePersist); delete this._collection[arr[arrIndex].name]; } this.emit('drop', this); delete this._listeners; delete this._core._db[this._name]; } return true; }, /** * Drops the database and optionally controls dropping persistent storage * and callback method. * @func drop * @memberof Db * @param {Boolean} removePersist Drop persistent storage for this database. * @param {Function} callback Optional callback method. */ 'boolean, function': function (removePersist, callback) { if (!this.isDropped()) { var arr = this.collections(), arrCount = arr.length, arrIndex, finishCount = 0, afterDrop = function () { finishCount++; if (finishCount === arrCount) { if (callback) { callback(); } } }; this._state = 'dropped'; for (arrIndex = 0; arrIndex < arrCount; arrIndex++) { this.collection(arr[arrIndex].name).drop(removePersist, afterDrop); delete this._collection[arr[arrIndex].name]; } this.emit('drop', this); delete this._listeners; delete this._core._db[this._name]; } return true; } }); /** * Gets a database instance by name. * @memberof Core * @param {String=} name Optional name of the database. If none is provided * a random name is assigned. * @returns {Db} */ Core.prototype.db = function (name) { // Handle being passed an instance if (name instanceof Db) { return name; } if (!name) { name = this.objectId(); } this._db[name] = this._db[name] || new Db(name, this); this._db[name].mongoEmulation(this.mongoEmulation()); return this._db[name]; }; /** * Returns an array of databases that ForerunnerDB currently has. * @memberof Core * @param {String|RegExp=} search The optional search string or regular expression to use * to match collection names against. * @returns {Array} An array of objects containing details of each database * that ForerunnerDB is currently managing and it's child entities. */ Core.prototype.databases = function (search) { var arr = [], tmpObj, addDb, i; if (search) { if (!(search instanceof RegExp)) { // Turn the search into a regular expression search = new RegExp(search); } } for (i in this._db) { if (this._db.hasOwnProperty(i)) { addDb = true; if (search) { if (!search.exec(i)) { addDb = false; } } if (addDb) { tmpObj = { name: i, children: [] }; if (this.shared.moduleExists('Collection')) { tmpObj.children.push({ module: 'collection', moduleName: 'Collections', count: this._db[i].collections().length }); } if (this.shared.moduleExists('CollectionGroup')) { tmpObj.children.push({ module: 'collectionGroup', moduleName: 'Collection Groups', count: this._db[i].collectionGroups().length }); } if (this.shared.moduleExists('Document')) { tmpObj.children.push({ module: 'document', moduleName: 'Documents', count: this._db[i].documents().length }); } if (this.shared.moduleExists('Grid')) { tmpObj.children.push({ module: 'grid', moduleName: 'Grids', count: this._db[i].grids().length }); } if (this.shared.moduleExists('Overview')) { tmpObj.children.push({ module: 'overview', moduleName: 'Overviews', count: this._db[i].overviews().length }); } if (this.shared.moduleExists('View')) { tmpObj.children.push({ module: 'view', moduleName: 'Views', count: this._db[i].views().length }); } arr.push(tmpObj); } } } arr.sort(function (a, b) { return a.name.localeCompare(b.name); }); return arr; }; Shared.finishModule('Db'); module.exports = Db; },{"./Checksum.js":5,"./Collection.js":6,"./Metrics.js":16,"./Overload":28,"./Shared":32}],11:[function(_dereq_,module,exports){ // geohash.js // Geohash library for Javascript // (c) 2008 David Troy // Distributed under the MIT License // Original at: https://github.com/davetroy/geohash-js // Modified by Irrelon Software Limited (http://www.irrelon.com) // to clean up and modularise the code using Node.js-style exports // and add a few helper methods. // @by Rob Evans - [email protected] "use strict"; /* Define some shared constants that will be used by all instances of the module. */ var bits, base32, neighbors, borders, PI180 = Math.PI / 180, PI180R = 180 / Math.PI, earthRadius = 6371; // mean radius of the earth bits = [16, 8, 4, 2, 1]; base32 = "0123456789bcdefghjkmnpqrstuvwxyz"; neighbors = { right: {even: "bc01fg45238967deuvhjyznpkmstqrwx"}, left: {even: "238967debc01fg45kmstqrwxuvhjyznp"}, top: {even: "p0r21436x8zb9dcf5h7kjnmqesgutwvy"}, bottom: {even: "14365h7k9dcfesgujnmqp0r2twvyx8zb"} }; borders = { right: {even: "bcfguvyz"}, left: {even: "0145hjnp"}, top: {even: "prxz"}, bottom: {even: "028b"} }; neighbors.bottom.odd = neighbors.left.even; neighbors.top.odd = neighbors.right.even; neighbors.left.odd = neighbors.bottom.even; neighbors.right.odd = neighbors.top.even; borders.bottom.odd = borders.left.even; borders.top.odd = borders.right.even; borders.left.odd = borders.bottom.even; borders.right.odd = borders.top.even; var GeoHash = function () {}; /** * Converts degrees to radians. * @param {Number} degrees * @return {Number} radians */ GeoHash.prototype.radians = function radians (degrees) { return degrees * PI180; }; /** * Converts radians to degrees. * @param {Number} radians * @return {Number} degrees */ GeoHash.prototype.degrees = function (radians) { return radians * PI180R; }; GeoHash.prototype.refineInterval = function (interval, cd, mask) { if (cd & mask) { //jshint ignore: line interval[0] = (interval[0] + interval[1]) / 2; } else { interval[1] = (interval[0] + interval[1]) / 2; } }; /** * Calculates all surrounding neighbours of a hash and returns them. * @param {String} centerHash The hash at the center of the grid. * @param options * @returns {*} */ GeoHash.prototype.calculateNeighbours = function (centerHash, options) { var response; if (!options || options.type === 'object') { response = { center: centerHash, left: this.calculateAdjacent(centerHash, 'left'), right: this.calculateAdjacent(centerHash, 'right'), top: this.calculateAdjacent(centerHash, 'top'), bottom: this.calculateAdjacent(centerHash, 'bottom') }; response.topLeft = this.calculateAdjacent(response.left, 'top'); response.topRight = this.calculateAdjacent(response.right, 'top'); response.bottomLeft = this.calculateAdjacent(response.left, 'bottom'); response.bottomRight = this.calculateAdjacent(response.right, 'bottom'); } else { response = []; response[4] = centerHash; response[3] = this.calculateAdjacent(centerHash, 'left'); response[5] = this.calculateAdjacent(centerHash, 'right'); response[1] = this.calculateAdjacent(centerHash, 'top'); response[7] = this.calculateAdjacent(centerHash, 'bottom'); response[0] = this.calculateAdjacent(response[3], 'top'); response[2] = this.calculateAdjacent(response[5], 'top'); response[6] = this.calculateAdjacent(response[3], 'bottom'); response[8] = this.calculateAdjacent(response[5], 'bottom'); } return response; }; /** * Calculates a new lat/lng by travelling from the center point in the * bearing specified for the distance specified. * @param {Array} centerPoint An array with latitude at index 0 and * longitude at index 1. * @param {Number} distanceKm The distance to travel in kilometers. * @param {Number} bearing The bearing to travel in degrees (zero is * north). * @returns {{lat: Number, lng: Number}} */ GeoHash.prototype.calculateLatLngByDistanceBearing = function (centerPoint, distanceKm, bearing) { var curLon = centerPoint[1], curLat = centerPoint[0], destLat = Math.asin(Math.sin(this.radians(curLat)) * Math.cos(distanceKm / earthRadius) + Math.cos(this.radians(curLat)) * Math.sin(distanceKm / earthRadius) * Math.cos(this.radians(bearing))), tmpLon = this.radians(curLon) + Math.atan2(Math.sin(this.radians(bearing)) * Math.sin(distanceKm / earthRadius) * Math.cos(this.radians(curLat)), Math.cos(distanceKm / earthRadius) - Math.sin(this.radians(curLat)) * Math.sin(destLat)), destLon = (tmpLon + 3 * Math.PI) % (2 * Math.PI) - Math.PI; // normalise to -180..+180º return { lat: this.degrees(destLat), lng: this.degrees(destLon) }; }; /** * Calculates the extents of a bounding box around the center point which * encompasses the radius in kilometers passed. * @param {Array} centerPoint An array with latitude at index 0 and * longitude at index 1. * @param radiusKm Radius in kilometers. * @returns {{lat: Array, lng: Array}} */ GeoHash.prototype.calculateExtentByRadius = function (centerPoint, radiusKm) { var maxWest, maxEast, maxNorth, maxSouth, lat = [], lng = []; maxNorth = this.calculateLatLngByDistanceBearing(centerPoint, radiusKm, 0); maxEast = this.calculateLatLngByDistanceBearing(centerPoint, radiusKm, 90); maxSouth = this.calculateLatLngByDistanceBearing(centerPoint, radiusKm, 180); maxWest = this.calculateLatLngByDistanceBearing(centerPoint, radiusKm, 270); lat[0] = maxNorth.lat; lat[1] = maxSouth.lat; lng[0] = maxWest.lng; lng[1] = maxEast.lng; return { lat: lat, lng: lng }; }; /** * Calculates all the geohashes that make up the bounding box that surrounds * the circle created from the center point and radius passed. * @param {Array} centerPoint An array with latitude at index 0 and * longitude at index 1. * @param {Number} radiusKm The radius in kilometers to encompass. * @param {Number} precision The number of characters to limit the returned * geohash strings to. * @returns {Array} The array of geohashes that encompass the bounding box. */ GeoHash.prototype.calculateHashArrayByRadius = function (centerPoint, radiusKm, precision) { var extent = this.calculateExtentByRadius(centerPoint, radiusKm), northWest = [extent.lat[0], extent.lng[0]], northEast = [extent.lat[0], extent.lng[1]], southWest = [extent.lat[1], extent.lng[0]], northWestHash = this.encode(northWest[0], northWest[1], precision), northEastHash = this.encode(northEast[0], northEast[1], precision), southWestHash = this.encode(southWest[0], southWest[1], precision), hash, widthCount = 0, heightCount = 0, widthIndex, heightIndex, hashArray = []; hash = northWestHash; hashArray.push(hash); // Walk from north west to north east until we find the north east geohash while (hash !== northEastHash) { hash = this.calculateAdjacent(hash, 'right'); widthCount++; hashArray.push(hash); } hash = northWestHash; // Walk from north west to south west until we find the south west geohash while (hash !== southWestHash) { hash = this.calculateAdjacent(hash, 'bottom'); heightCount++; } // We now know the width and height in hash boxes of the area, fill in the // rest of the hashes into the hashArray array for (widthIndex = 0; widthIndex <= widthCount; widthIndex++) { hash = hashArray[widthIndex]; for (heightIndex = 0; heightIndex < heightCount; heightIndex++) { hash = this.calculateAdjacent(hash, 'bottom'); hashArray.push(hash); } } return hashArray; }; /** * Calculates an adjacent hash to the hash passed, in the direction * specified. * @param {String} srcHash The hash to calculate adjacent to. * @param {String} dir Either "top", "left", "bottom" or "right". * @returns {String} The resulting geohash. */ GeoHash.prototype.calculateAdjacent = function (srcHash, dir) { srcHash = srcHash.toLowerCase(); var lastChr = srcHash.charAt(srcHash.length - 1), type = (srcHash.length % 2) ? 'odd' : 'even', base = srcHash.substring(0, srcHash.length - 1); if (borders[dir][type].indexOf(lastChr) !== -1) { base = this.calculateAdjacent(base, dir); } return base + base32[neighbors[dir][type].indexOf(lastChr)]; }; /** * Decodes a string geohash back to a longitude/latitude array. * The array contains three latitudes and three longitudes. The * first of each is the lower extent of the geohash bounding box, * the second is the upper extent and the third is the center * of the geohash bounding box. * @param {String} geohash The hash to decode. * @returns {Object} */ GeoHash.prototype.decode = function (geohash) { var isEven = 1, lat = [], lon = [], i, c, cd, j, mask, latErr, lonErr; lat[0] = -90.0; lat[1] = 90.0; lon[0] = -180.0; lon[1] = 180.0; latErr = 90.0; lonErr = 180.0; for (i = 0; i < geohash.length; i++) { c = geohash[i]; cd = base32.indexOf(c); for (j = 0; j < 5; j++) { mask = bits[j]; if (isEven) { lonErr /= 2; this.refineInterval(lon, cd, mask); } else { latErr /= 2; this.refineInterval(lat, cd, mask); } isEven = !isEven; } } lat[2] = (lat[0] + lat[1]) / 2; lon[2] = (lon[0] + lon[1]) / 2; return { lat: lat, lng: lon }; }; /** * Encodes a longitude/latitude to geohash string. * @param latitude * @param longitude * @param {Number=} precision Length of the geohash string. Defaults to 12. * @returns {String} */ GeoHash.prototype.encode = function (latitude, longitude, precision) { var isEven = 1, mid, lat = [], lon = [], bit = 0, ch = 0, geoHash = ""; if (!precision) { precision = 12; } lat[0] = -90.0; lat[1] = 90.0; lon[0] = -180.0; lon[1] = 180.0; while (geoHash.length < precision) { if (isEven) { mid = (lon[0] + lon[1]) / 2; if (longitude > mid) { ch |= bits[bit]; //jshint ignore: line lon[0] = mid; } else { lon[1] = mid; } } else { mid = (lat[0] + lat[1]) / 2; if (latitude > mid) { ch |= bits[bit]; //jshint ignore: line lat[0] = mid; } else { lat[1] = mid; } } isEven = !isEven; if (bit < 4) { bit++; } else { geoHash += base32[ch]; bit = 0; ch = 0; } } return geoHash; }; if (typeof module !== 'undefined') { module.exports = GeoHash; } },{}],12:[function(_dereq_,module,exports){ "use strict"; /* name(string) id(string) rebuild(null) state ?? needed? match(query, options) lookup(query, options) insert(doc) remove(doc) primaryKey(string) collection(collection) */ var Shared = _dereq_('./Shared'), Path = _dereq_('./Path'), BinaryTree = _dereq_('./BinaryTree'), GeoHash = _dereq_('./GeoHash'), sharedPathSolver = new Path(), sharedGeoHashSolver = new GeoHash(), // GeoHash Distances in Kilometers geoHashDistance = [ 5000, 1250, 156, 39.1, 4.89, 1.22, 0.153, 0.0382, 0.00477, 0.00119, 0.000149, 0.0000372 ]; /** * The index class used to instantiate 2d indexes that the database can * use to handle high-performance geospatial queries. * @constructor */ var Index2d = function () { this.init.apply(this, arguments); }; /** * Create the index. * @param {Object} keys The object with the keys that the user wishes the index * to operate on. * @param {Object} options Can be undefined, if passed is an object with arbitrary * options keys and values. * @param {Collection} collection The collection the index should be created for. */ Index2d.prototype.init = function (keys, options, collection) { this._btree = new BinaryTree(); this._btree.index(keys); this._size = 0; this._id = this._itemKeyHash(keys, keys); this._debug = options && options.debug ? options.debug : false; this.unique(options && options.unique ? options.unique : false); if (keys !== undefined) { this.keys(keys); } if (collection !== undefined) { this.collection(collection); this._btree.primaryKey(collection.primaryKey()); } this.name(options && options.name ? options.name : this._id); this._btree.debug(this._debug); }; Shared.addModule('Index2d', Index2d); Shared.mixin(Index2d.prototype, 'Mixin.Common'); Shared.mixin(Index2d.prototype, 'Mixin.ChainReactor'); Shared.mixin(Index2d.prototype, 'Mixin.Sorting'); Index2d.prototype.id = function () { return this._id; }; Index2d.prototype.state = function () { return this._state; }; Index2d.prototype.size = function () { return this._size; }; Shared.synthesize(Index2d.prototype, 'data'); Shared.synthesize(Index2d.prototype, 'name'); Shared.synthesize(Index2d.prototype, 'collection'); Shared.synthesize(Index2d.prototype, 'type'); Shared.synthesize(Index2d.prototype, 'unique'); Index2d.prototype.keys = function (val) { if (val !== undefined) { this._keys = val; // Count the keys this._keyCount = sharedPathSolver.parse(this._keys).length; return this; } return this._keys; }; Index2d.prototype.rebuild = function () { // Do we have a collection? if (this._collection) { // Get sorted data var collection = this._collection.subset({}, { $decouple: false, $orderBy: this._keys }), collectionData = collection.find(), dataIndex, dataCount = collectionData.length; // Clear the index data for the index this._btree.clear(); this._size = 0; if (this._unique) { this._uniqueLookup = {}; } // Loop the collection data for (dataIndex = 0; dataIndex < dataCount; dataIndex++) { this.insert(collectionData[dataIndex]); } } this._state = { name: this._name, keys: this._keys, indexSize: this._size, built: new Date(), updated: new Date(), ok: true }; }; Index2d.prototype.insert = function (dataItem, options) { var uniqueFlag = this._unique, uniqueHash; dataItem = this.decouple(dataItem); if (uniqueFlag) { uniqueHash = this._itemHash(dataItem, this._keys); this._uniqueLookup[uniqueHash] = dataItem; } // Convert 2d indexed values to geohashes var keys = this._btree.keys(), pathVal, geoHash, lng, lat, i; for (i = 0; i < keys.length; i++) { pathVal = sharedPathSolver.get(dataItem, keys[i].path); if (pathVal instanceof Array) { lng = pathVal[0]; lat = pathVal[1]; geoHash = sharedGeoHashSolver.encode(lng, lat); sharedPathSolver.set(dataItem, keys[i].path, geoHash); } } if (this._btree.insert(dataItem)) { this._size++; return true; } return false; }; Index2d.prototype.remove = function (dataItem, options) { var uniqueFlag = this._unique, uniqueHash; if (uniqueFlag) { uniqueHash = this._itemHash(dataItem, this._keys); delete this._uniqueLookup[uniqueHash]; } if (this._btree.remove(dataItem)) { this._size--; return true; } return false; }; Index2d.prototype.violation = function (dataItem) { // Generate item hash var uniqueHash = this._itemHash(dataItem, this._keys); // Check if the item breaks the unique constraint return Boolean(this._uniqueLookup[uniqueHash]); }; Index2d.prototype.hashViolation = function (uniqueHash) { // Check if the item breaks the unique constraint return Boolean(this._uniqueLookup[uniqueHash]); }; /** * Looks up records that match the passed query and options. * @param query The query to execute. * @param options A query options object. * @param {Operation=} op Optional operation instance that allows * us to provide operation diagnostics and analytics back to the * main calling instance as the process is running. * @returns {*} */ Index2d.prototype.lookup = function (query, options, op) { // Loop the indexed keys and determine if the query has any operators // that we want to handle differently from a standard lookup var keys = this._btree.keys(), pathStr, pathVal, results, i; for (i = 0; i < keys.length; i++) { pathStr = keys[i].path; pathVal = sharedPathSolver.get(query, pathStr); if (typeof pathVal === 'object') { if (pathVal.$near) { results = []; // Do a near point lookup results = results.concat(this.near(pathStr, pathVal.$near, options, op)); } if (pathVal.$geoWithin) { results = []; // Do a geoWithin shape lookup results = results.concat(this.geoWithin(pathStr, pathVal.$geoWithin, options, op)); } return results; } } return this._btree.lookup(query, options); }; Index2d.prototype.near = function (pathStr, query, options, op) { var self = this, neighbours, visitedCount, visitedNodes, visitedData, search, results, finalResults = [], precision, maxDistanceKm, distance, distCache, latLng, pk = this._collection.primaryKey(), i; // Calculate the required precision to encapsulate the distance // TODO: Instead of opting for the "one size larger" than the distance boxes, // TODO: we should calculate closest divisible box size as a multiple and then // TODO: scan neighbours until we have covered the area otherwise we risk // TODO: opening the results up to vastly more information as the box size // TODO: increases dramatically between the geohash precisions if (query.$distanceUnits === 'km') { maxDistanceKm = query.$maxDistance; for (i = 0; i < geoHashDistance.length; i++) { if (maxDistanceKm > geoHashDistance[i]) { precision = i + 1; break; } } } else if (query.$distanceUnits === 'miles') { maxDistanceKm = query.$maxDistance * 1.60934; for (i = 0; i < geoHashDistance.length; i++) { if (maxDistanceKm > geoHashDistance[i]) { precision = i + 1; break; } } } if (precision === 0) { precision = 1; } // Calculate 9 box geohashes if (op) { op.time('index2d.calculateHashArea'); } neighbours = sharedGeoHashSolver.calculateHashArrayByRadius(query.$point, maxDistanceKm, precision); if (op) { op.time('index2d.calculateHashArea'); } if (op) { op.data('index2d.near.precision', precision); op.data('index2d.near.hashArea', neighbours); op.data('index2d.near.maxDistanceKm', maxDistanceKm); op.data('index2d.near.centerPointCoords', [query.$point[0], query.$point[1]]); } // Lookup all matching co-ordinates from the btree results = []; visitedCount = 0; visitedData = {}; visitedNodes = []; if (op) { op.time('index2d.near.getDocsInsideHashArea'); } for (i = 0; i < neighbours.length; i++) { search = this._btree.startsWith(pathStr, neighbours[i]); visitedData[neighbours[i]] = search; visitedCount += search._visitedCount; visitedNodes = visitedNodes.concat(search._visitedNodes); results = results.concat(search); } if (op) { op.time('index2d.near.getDocsInsideHashArea'); op.data('index2d.near.startsWith', visitedData); op.data('index2d.near.visitedTreeNodes', visitedNodes); } // Work with original data if (op) { op.time('index2d.near.lookupDocsById'); } results = this._collection._primaryIndex.lookup(results); if (op) { op.time('index2d.near.lookupDocsById'); } if (query.$distanceField) { // Decouple the results before we modify them results = this.decouple(results); } if (results.length) { distance = {}; if (op) { op.time('index2d.near.calculateDistanceFromCenter'); } // Loop the results and calculate distance for (i = 0; i < results.length; i++) { latLng = sharedPathSolver.get(results[i], pathStr); distCache = distance[results[i][pk]] = this.distanceBetweenPoints(query.$point[0], query.$point[1], latLng[0], latLng[1]); if (distCache <= maxDistanceKm) { if (query.$distanceField) { // Options specify a field to add the distance data to // so add it now sharedPathSolver.set(results[i], query.$distanceField, query.$distanceUnits === 'km' ? distCache : Math.round(distCache * 0.621371)); } if (query.$geoHashField) { // Options specify a field to add the distance data to // so add it now sharedPathSolver.set(results[i], query.$geoHashField, sharedGeoHashSolver.encode(latLng[0], latLng[1], precision)); } // Add item as it is inside radius distance finalResults.push(results[i]); } } if (op) { op.time('index2d.near.calculateDistanceFromCenter'); } // Sort by distance from center if (op) { op.time('index2d.near.sortResultsByDistance'); } finalResults.sort(function (a, b) { return self.sortAsc(distance[a[pk]], distance[b[pk]]); }); if (op) { op.time('index2d.near.sortResultsByDistance'); } } // Return data return finalResults; }; Index2d.prototype.geoWithin = function (pathStr, query, options) { console.log('geoWithin() is currently a prototype method with no actual implementation... it just returns a blank array.'); return []; }; Index2d.prototype.distanceBetweenPoints = function (lat1, lng1, lat2, lng2) { var R = 6371; // kilometres var lat1Rad = this.toRadians(lat1); var lat2Rad = this.toRadians(lat2); var lat2MinusLat1Rad = this.toRadians(lat2-lat1); var lng2MinusLng1Rad = this.toRadians(lng2-lng1); var a = Math.sin(lat2MinusLat1Rad/2) * Math.sin(lat2MinusLat1Rad/2) + Math.cos(lat1Rad) * Math.cos(lat2Rad) * Math.sin(lng2MinusLng1Rad/2) * Math.sin(lng2MinusLng1Rad/2); var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); return R * c; }; Index2d.prototype.toRadians = function (degrees) { return degrees * 0.01747722222222; }; Index2d.prototype.match = function (query, options) { // TODO: work out how to represent that this is a better match if the query has $near than // TODO: a basic btree index which will not be able to resolve a $near operator return this._btree.match(query, options); }; Index2d.prototype._itemHash = function (item, keys) { var path = new Path(), pathData, hash = '', k; pathData = path.parse(keys); for (k = 0; k < pathData.length; k++) { if (hash) { hash += '_'; } hash += path.value(item, pathData[k].path).join(':'); } return hash; }; Index2d.prototype._itemKeyHash = function (item, keys) { var path = new Path(), pathData, hash = '', k; pathData = path.parse(keys); for (k = 0; k < pathData.length; k++) { if (hash) { hash += '_'; } hash += path.keyValue(item, pathData[k].path); } return hash; }; Index2d.prototype._itemHashArr = function (item, keys) { var path = new Path(), pathData, //hash = '', hashArr = [], valArr, i, k, j; pathData = path.parse(keys); for (k = 0; k < pathData.length; k++) { valArr = path.value(item, pathData[k].path); for (i = 0; i < valArr.length; i++) { if (k === 0) { // Setup the initial hash array hashArr.push(valArr[i]); } else { // Loop the hash array and concat the value to it for (j = 0; j < hashArr.length; j++) { hashArr[j] = hashArr[j] + '_' + valArr[i]; } } } } return hashArr; }; // Register this index on the shared object Shared.index['2d'] = Index2d; Shared.finishModule('Index2d'); module.exports = Index2d; },{"./BinaryTree":4,"./GeoHash":11,"./Path":29,"./Shared":32}],13:[function(_dereq_,module,exports){ "use strict"; /* name(string) id(string) rebuild(null) state ?? needed? match(query, options) lookup(query, options) insert(doc) remove(doc) primaryKey(string) collection(collection) */ var Shared = _dereq_('./Shared'), Path = _dereq_('./Path'), BinaryTree = _dereq_('./BinaryTree'); /** * The index class used to instantiate btree indexes that the database can * use to speed up queries on collections and views. * @constructor */ var IndexBinaryTree = function () { this.init.apply(this, arguments); }; IndexBinaryTree.prototype.init = function (keys, options, collection) { this._btree = new BinaryTree(); this._btree.index(keys); this._size = 0; this._id = this._itemKeyHash(keys, keys); this._debug = options && options.debug ? options.debug : false; this.unique(options && options.unique ? options.unique : false); if (keys !== undefined) { this.keys(keys); } if (collection !== undefined) { this.collection(collection); this._btree.primaryKey(collection.primaryKey()); } this.name(options && options.name ? options.name : this._id); this._btree.debug(this._debug); }; Shared.addModule('IndexBinaryTree', IndexBinaryTree); Shared.mixin(IndexBinaryTree.prototype, 'Mixin.ChainReactor'); Shared.mixin(IndexBinaryTree.prototype, 'Mixin.Sorting'); IndexBinaryTree.prototype.id = function () { return this._id; }; IndexBinaryTree.prototype.state = function () { return this._state; }; IndexBinaryTree.prototype.size = function () { return this._size; }; Shared.synthesize(IndexBinaryTree.prototype, 'data'); Shared.synthesize(IndexBinaryTree.prototype, 'name'); Shared.synthesize(IndexBinaryTree.prototype, 'collection'); Shared.synthesize(IndexBinaryTree.prototype, 'type'); Shared.synthesize(IndexBinaryTree.prototype, 'unique'); IndexBinaryTree.prototype.keys = function (val) { if (val !== undefined) { this._keys = val; // Count the keys this._keyCount = (new Path()).parse(this._keys).length; return this; } return this._keys; }; IndexBinaryTree.prototype.rebuild = function () { // Do we have a collection? if (this._collection) { // Get sorted data var collection = this._collection.subset({}, { $decouple: false, $orderBy: this._keys }), collectionData = collection.find(), dataIndex, dataCount = collectionData.length; // Clear the index data for the index this._btree.clear(); this._size = 0; if (this._unique) { this._uniqueLookup = {}; } // Loop the collection data for (dataIndex = 0; dataIndex < dataCount; dataIndex++) { this.insert(collectionData[dataIndex]); } } this._state = { name: this._name, keys: this._keys, indexSize: this._size, built: new Date(), updated: new Date(), ok: true }; }; IndexBinaryTree.prototype.insert = function (dataItem, options) { var uniqueFlag = this._unique, uniqueHash; if (uniqueFlag) { uniqueHash = this._itemHash(dataItem, this._keys); this._uniqueLookup[uniqueHash] = dataItem; } if (this._btree.insert(dataItem)) { this._size++; return true; } return false; }; IndexBinaryTree.prototype.remove = function (dataItem, options) { var uniqueFlag = this._unique, uniqueHash; if (uniqueFlag) { uniqueHash = this._itemHash(dataItem, this._keys); delete this._uniqueLookup[uniqueHash]; } if (this._btree.remove(dataItem)) { this._size--; return true; } return false; }; IndexBinaryTree.prototype.violation = function (dataItem) { // Generate item hash var uniqueHash = this._itemHash(dataItem, this._keys); // Check if the item breaks the unique constraint return Boolean(this._uniqueLookup[uniqueHash]); }; IndexBinaryTree.prototype.hashViolation = function (uniqueHash) { // Check if the item breaks the unique constraint return Boolean(this._uniqueLookup[uniqueHash]); }; IndexBinaryTree.prototype.lookup = function (query, options, op) { return this._btree.lookup(query, options, op); }; IndexBinaryTree.prototype.match = function (query, options) { return this._btree.match(query, options); }; IndexBinaryTree.prototype._itemHash = function (item, keys) { var path = new Path(), pathData, hash = '', k; pathData = path.parse(keys); for (k = 0; k < pathData.length; k++) { if (hash) { hash += '_'; } hash += path.value(item, pathData[k].path).join(':'); } return hash; }; IndexBinaryTree.prototype._itemKeyHash = function (item, keys) { var path = new Path(), pathData, hash = '', k; pathData = path.parse(keys); for (k = 0; k < pathData.length; k++) { if (hash) { hash += '_'; } hash += path.keyValue(item, pathData[k].path); } return hash; }; IndexBinaryTree.prototype._itemHashArr = function (item, keys) { var path = new Path(), pathData, //hash = '', hashArr = [], valArr, i, k, j; pathData = path.parse(keys); for (k = 0; k < pathData.length; k++) { valArr = path.value(item, pathData[k].path); for (i = 0; i < valArr.length; i++) { if (k === 0) { // Setup the initial hash array hashArr.push(valArr[i]); } else { // Loop the hash array and concat the value to it for (j = 0; j < hashArr.length; j++) { hashArr[j] = hashArr[j] + '_' + valArr[i]; } } } } return hashArr; }; // Register this index on the shared object Shared.index.btree = IndexBinaryTree; Shared.finishModule('IndexBinaryTree'); module.exports = IndexBinaryTree; },{"./BinaryTree":4,"./Path":29,"./Shared":32}],14:[function(_dereq_,module,exports){ "use strict"; var Shared = _dereq_('./Shared'), Path = _dereq_('./Path'); /** * The index class used to instantiate hash map indexes that the database can * use to speed up queries on collections and views. * @constructor */ var IndexHashMap = function () { this.init.apply(this, arguments); }; IndexHashMap.prototype.init = function (keys, options, collection) { this._crossRef = {}; this._size = 0; this._id = this._itemKeyHash(keys, keys); this.data({}); this.unique(options && options.unique ? options.unique : false); if (keys !== undefined) { this.keys(keys); } if (collection !== undefined) { this.collection(collection); } this.name(options && options.name ? options.name : this._id); }; Shared.addModule('IndexHashMap', IndexHashMap); Shared.mixin(IndexHashMap.prototype, 'Mixin.ChainReactor'); IndexHashMap.prototype.id = function () { return this._id; }; IndexHashMap.prototype.state = function () { return this._state; }; IndexHashMap.prototype.size = function () { return this._size; }; Shared.synthesize(IndexHashMap.prototype, 'data'); Shared.synthesize(IndexHashMap.prototype, 'name'); Shared.synthesize(IndexHashMap.prototype, 'collection'); Shared.synthesize(IndexHashMap.prototype, 'type'); Shared.synthesize(IndexHashMap.prototype, 'unique'); IndexHashMap.prototype.keys = function (val) { if (val !== undefined) { this._keys = val; // Count the keys this._keyCount = (new Path()).parse(this._keys).length; return this; } return this._keys; }; IndexHashMap.prototype.rebuild = function () { // Do we have a collection? if (this._collection) { // Get sorted data var collection = this._collection.subset({}, { $decouple: false, $orderBy: this._keys }), collectionData = collection.find(), dataIndex, dataCount = collectionData.length; // Clear the index data for the index this._data = {}; this._size = 0; if (this._unique) { this._uniqueLookup = {}; } // Loop the collection data for (dataIndex = 0; dataIndex < dataCount; dataIndex++) { this.insert(collectionData[dataIndex]); } } this._state = { name: this._name, keys: this._keys, indexSize: this._size, built: new Date(), updated: new Date(), ok: true }; }; IndexHashMap.prototype.insert = function (dataItem, options) { var uniqueFlag = this._unique, uniqueHash, itemHashArr, hashIndex; if (uniqueFlag) { uniqueHash = this._itemHash(dataItem, this._keys); this._uniqueLookup[uniqueHash] = dataItem; } // Generate item hash itemHashArr = this._itemHashArr(dataItem, this._keys); // Get the path search results and store them for (hashIndex = 0; hashIndex < itemHashArr.length; hashIndex++) { this.pushToPathValue(itemHashArr[hashIndex], dataItem); } }; IndexHashMap.prototype.update = function (dataItem, options) { // TODO: Write updates to work // 1: Get uniqueHash for the dataItem primary key value (may need to generate a store for this) // 2: Remove the uniqueHash as it currently stands // 3: Generate a new uniqueHash for dataItem // 4: Insert the new uniqueHash }; IndexHashMap.prototype.remove = function (dataItem, options) { var uniqueFlag = this._unique, uniqueHash, itemHashArr, hashIndex; if (uniqueFlag) { uniqueHash = this._itemHash(dataItem, this._keys); delete this._uniqueLookup[uniqueHash]; } // Generate item hash itemHashArr = this._itemHashArr(dataItem, this._keys); // Get the path search results and store them for (hashIndex = 0; hashIndex < itemHashArr.length; hashIndex++) { this.pullFromPathValue(itemHashArr[hashIndex], dataItem); } }; IndexHashMap.prototype.violation = function (dataItem) { // Generate item hash var uniqueHash = this._itemHash(dataItem, this._keys); // Check if the item breaks the unique constraint return Boolean(this._uniqueLookup[uniqueHash]); }; IndexHashMap.prototype.hashViolation = function (uniqueHash) { // Check if the item breaks the unique constraint return Boolean(this._uniqueLookup[uniqueHash]); }; IndexHashMap.prototype.pushToPathValue = function (hash, obj) { var pathValArr = this._data[hash] = this._data[hash] || []; // Make sure we have not already indexed this object at this path/value if (pathValArr.indexOf(obj) === -1) { // Index the object pathValArr.push(obj); // Record the reference to this object in our index size this._size++; // Cross-reference this association for later lookup this.pushToCrossRef(obj, pathValArr); } }; IndexHashMap.prototype.pullFromPathValue = function (hash, obj) { var pathValArr = this._data[hash], indexOfObject; // Make sure we have already indexed this object at this path/value indexOfObject = pathValArr.indexOf(obj); if (indexOfObject > -1) { // Un-index the object pathValArr.splice(indexOfObject, 1); // Record the reference to this object in our index size this._size--; // Remove object cross-reference this.pullFromCrossRef(obj, pathValArr); } // Check if we should remove the path value array if (!pathValArr.length) { // Remove the array delete this._data[hash]; } }; IndexHashMap.prototype.pull = function (obj) { // Get all places the object has been used and remove them var id = obj[this._collection.primaryKey()], crossRefArr = this._crossRef[id], arrIndex, arrCount = crossRefArr.length, arrItem; for (arrIndex = 0; arrIndex < arrCount; arrIndex++) { arrItem = crossRefArr[arrIndex]; // Remove item from this index lookup array this._pullFromArray(arrItem, obj); } // Record the reference to this object in our index size this._size--; // Now remove the cross-reference entry for this object delete this._crossRef[id]; }; IndexHashMap.prototype._pullFromArray = function (arr, obj) { var arrCount = arr.length; while (arrCount--) { if (arr[arrCount] === obj) { arr.splice(arrCount, 1); } } }; IndexHashMap.prototype.pushToCrossRef = function (obj, pathValArr) { var id = obj[this._collection.primaryKey()], crObj; this._crossRef[id] = this._crossRef[id] || []; // Check if the cross-reference to the pathVal array already exists crObj = this._crossRef[id]; if (crObj.indexOf(pathValArr) === -1) { // Add the cross-reference crObj.push(pathValArr); } }; IndexHashMap.prototype.pullFromCrossRef = function (obj, pathValArr) { var id = obj[this._collection.primaryKey()]; delete this._crossRef[id]; }; IndexHashMap.prototype.lookup = function (query) { return this._data[this._itemHash(query, this._keys)] || []; }; IndexHashMap.prototype.match = function (query, options) { // Check if the passed query has data in the keys our index // operates on and if so, is the query sort matching our order var pathSolver = new Path(); var indexKeyArr = pathSolver.parseArr(this._keys), queryArr = pathSolver.parseArr(query), matchedKeys = [], matchedKeyCount = 0, i; // Loop the query array and check the order of keys against the // index key array to see if this index can be used for (i = 0; i < indexKeyArr.length; i++) { if (queryArr[i] === indexKeyArr[i]) { matchedKeyCount++; matchedKeys.push(queryArr[i]); } else { // Query match failed - this is a hash map index so partial key match won't work return { matchedKeys: [], totalKeyCount: queryArr.length, score: 0 }; } } return { matchedKeys: matchedKeys, totalKeyCount: queryArr.length, score: matchedKeyCount }; //return pathSolver.countObjectPaths(this._keys, query); }; IndexHashMap.prototype._itemHash = function (item, keys) { var path = new Path(), pathData, hash = '', k; pathData = path.parse(keys); for (k = 0; k < pathData.length; k++) { if (hash) { hash += '_'; } hash += path.value(item, pathData[k].path).join(':'); } return hash; }; IndexHashMap.prototype._itemKeyHash = function (item, keys) { var path = new Path(), pathData, hash = '', k; pathData = path.parse(keys); for (k = 0; k < pathData.length; k++) { if (hash) { hash += '_'; } hash += path.keyValue(item, pathData[k].path); } return hash; }; IndexHashMap.prototype._itemHashArr = function (item, keys) { var path = new Path(), pathData, //hash = '', hashArr = [], valArr, i, k, j; pathData = path.parse(keys); for (k = 0; k < pathData.length; k++) { valArr = path.value(item, pathData[k].path); for (i = 0; i < valArr.length; i++) { if (k === 0) { // Setup the initial hash array hashArr.push(valArr[i]); } else { // Loop the hash array and concat the value to it for (j = 0; j < hashArr.length; j++) { hashArr[j] = hashArr[j] + '_' + valArr[i]; } } } } return hashArr; }; // Register this index on the shared object Shared.index.hashed = IndexHashMap; Shared.finishModule('IndexHashMap'); module.exports = IndexHashMap; },{"./Path":29,"./Shared":32}],15:[function(_dereq_,module,exports){ "use strict"; var Shared = _dereq_('./Shared'); /** * The key value store class used when storing basic in-memory KV data, * and can be queried for quick retrieval. Mostly used for collection * primary key indexes and lookups. * @param {String=} name Optional KV store name. * @constructor */ var KeyValueStore = function (name) { this.init.apply(this, arguments); }; KeyValueStore.prototype.init = function (name) { this._name = name; this._data = {}; this._primaryKey = '_id'; }; Shared.addModule('KeyValueStore', KeyValueStore); Shared.mixin(KeyValueStore.prototype, 'Mixin.ChainReactor'); /** * Get / set the name of the key/value store. * @param {String} val The name to set. * @returns {*} */ Shared.synthesize(KeyValueStore.prototype, 'name'); /** * Get / set the primary key. * @param {String} key The key to set. * @returns {*} */ KeyValueStore.prototype.primaryKey = function (key) { if (key !== undefined) { this._primaryKey = key; return this; } return this._primaryKey; }; /** * Removes all data from the store. * @returns {*} */ KeyValueStore.prototype.truncate = function () { this._data = {}; return this; }; /** * Sets data against a key in the store. * @param {String} key The key to set data for. * @param {*} value The value to assign to the key. * @returns {*} */ KeyValueStore.prototype.set = function (key, value) { this._data[key] = value ? value : true; return this; }; /** * Gets data stored for the passed key. * @param {String} key The key to get data for. * @returns {*} */ KeyValueStore.prototype.get = function (key) { return this._data[key]; }; /** * Get / set the primary key. * @param {*} val A lookup query. * @returns {*} */ KeyValueStore.prototype.lookup = function (val) { var pk = this._primaryKey, valType = typeof val, arrIndex, arrCount, lookupItem, result = []; // Check for early exit conditions if (valType === 'string' || valType === 'number') { lookupItem = this.get(val); if (lookupItem !== undefined) { return [lookupItem]; } else { return []; } } else if (valType === 'object') { if (val instanceof Array) { // An array of primary keys, find all matches arrCount = val.length; result = []; for (arrIndex = 0; arrIndex < arrCount; arrIndex++) { lookupItem = this.lookup(val[arrIndex]); if (lookupItem) { if (lookupItem instanceof Array) { result = result.concat(lookupItem); } else { result.push(lookupItem); } } } return result; } else if (val[pk] !== undefined && val[pk] !== null) { return this.lookup(val[pk]); } } // COMMENTED AS CODE WILL NEVER BE REACHED // Complex lookup /*lookupData = this._lookupKeys(val); keys = lookupData.keys; negate = lookupData.negate; if (!negate) { // Loop keys and return values for (arrIndex = 0; arrIndex < keys.length; arrIndex++) { result.push(this.get(keys[arrIndex])); } } else { // Loop data and return non-matching keys for (arrIndex in this._data) { if (this._data.hasOwnProperty(arrIndex)) { if (keys.indexOf(arrIndex) === -1) { result.push(this.get(arrIndex)); } } } } return result;*/ }; // COMMENTED AS WE ARE NOT CURRENTLY PASSING COMPLEX QUERIES TO KEYVALUESTORE INDEXES /*KeyValueStore.prototype._lookupKeys = function (val) { var pk = this._primaryKey, valType = typeof val, arrIndex, arrCount, lookupItem, bool, result; if (valType === 'string' || valType === 'number') { return { keys: [val], negate: false }; } else if (valType === 'object') { if (val instanceof RegExp) { // Create new data result = []; for (arrIndex in this._data) { if (this._data.hasOwnProperty(arrIndex)) { if (val.test(arrIndex)) { result.push(arrIndex); } } } return { keys: result, negate: false }; } else if (val instanceof Array) { // An array of primary keys, find all matches arrCount = val.length; result = []; for (arrIndex = 0; arrIndex < arrCount; arrIndex++) { result = result.concat(this._lookupKeys(val[arrIndex]).keys); } return { keys: result, negate: false }; } else if (val.$in && (val.$in instanceof Array)) { return { keys: this._lookupKeys(val.$in).keys, negate: false }; } else if (val.$nin && (val.$nin instanceof Array)) { return { keys: this._lookupKeys(val.$nin).keys, negate: true }; } else if (val.$ne) { return { keys: this._lookupKeys(val.$ne, true).keys, negate: true }; } else if (val.$or && (val.$or instanceof Array)) { // Create new data result = []; for (arrIndex = 0; arrIndex < val.$or.length; arrIndex++) { result = result.concat(this._lookupKeys(val.$or[arrIndex]).keys); } return { keys: result, negate: false }; } else if (val[pk]) { return this._lookupKeys(val[pk]); } } };*/ /** * Removes data for the given key from the store. * @param {String} key The key to un-set. * @returns {*} */ KeyValueStore.prototype.unSet = function (key) { delete this._data[key]; return this; }; /** * Sets data for the give key in the store only where the given key * does not already have a value in the store. * @param {String} key The key to set data for. * @param {*} value The value to assign to the key. * @returns {Boolean} True if data was set or false if data already * exists for the key. */ KeyValueStore.prototype.uniqueSet = function (key, value) { if (this._data[key] === undefined) { this._data[key] = value; return true; } return false; }; Shared.finishModule('KeyValueStore'); module.exports = KeyValueStore; },{"./Shared":32}],16:[function(_dereq_,module,exports){ "use strict"; var Shared = _dereq_('./Shared'), Operation = _dereq_('./Operation'); /** * The metrics class used to store details about operations. * @constructor */ var Metrics = function () { this.init.apply(this, arguments); }; Metrics.prototype.init = function () { this._data = []; }; Shared.addModule('Metrics', Metrics); Shared.mixin(Metrics.prototype, 'Mixin.ChainReactor'); /** * Creates an operation within the metrics instance and if metrics * are currently enabled (by calling the start() method) the operation * is also stored in the metrics log. * @param {String} name The name of the operation. * @returns {Operation} */ Metrics.prototype.create = function (name) { var op = new Operation(name); if (this._enabled) { this._data.push(op); } return op; }; /** * Starts logging operations. * @returns {Metrics} */ Metrics.prototype.start = function () { this._enabled = true; return this; }; /** * Stops logging operations. * @returns {Metrics} */ Metrics.prototype.stop = function () { this._enabled = false; return this; }; /** * Clears all logged operations. * @returns {Metrics} */ Metrics.prototype.clear = function () { this._data = []; return this; }; /** * Returns an array of all logged operations. * @returns {Array} */ Metrics.prototype.list = function () { return this._data; }; Shared.finishModule('Metrics'); module.exports = Metrics; },{"./Operation":27,"./Shared":32}],17:[function(_dereq_,module,exports){ "use strict"; var CRUD = { preSetData: function () { }, postSetData: function () { } }; module.exports = CRUD; },{}],18:[function(_dereq_,module,exports){ "use strict"; /** * The chain reactor mixin, provides methods to the target object that allow chain * reaction events to propagate to the target and be handled, processed and passed * on down the chain. * @mixin */ var ChainReactor = { /** * Creates a chain link between the current reactor node and the passed * reactor node. Chain packets that are send by this reactor node will * then be propagated to the passed node for subsequent packets. * @param {*} obj The chain reactor node to link to. */ chain: function (obj) { if (this.debug && this.debug()) { if (obj._reactorIn && obj._reactorOut) { console.log(obj._reactorIn.logIdentifier() + ' Adding target "' + obj._reactorOut.instanceIdentifier() + '" to the chain reactor target list'); } else { console.log(this.logIdentifier() + ' Adding target "' + obj.instanceIdentifier() + '" to the chain reactor target list'); } } this._chain = this._chain || []; var index = this._chain.indexOf(obj); if (index === -1) { this._chain.push(obj); } }, /** * Removes a chain link between the current reactor node and the passed * reactor node. Chain packets sent from this reactor node will no longer * be received by the passed node. * @param {*} obj The chain reactor node to unlink from. */ unChain: function (obj) { if (this.debug && this.debug()) { if (obj._reactorIn && obj._reactorOut) { console.log(obj._reactorIn.logIdentifier() + ' Removing target "' + obj._reactorOut.instanceIdentifier() + '" from the chain reactor target list'); } else { console.log(this.logIdentifier() + ' Removing target "' + obj.instanceIdentifier() + '" from the chain reactor target list'); } } if (this._chain) { var index = this._chain.indexOf(obj); if (index > -1) { this._chain.splice(index, 1); } } }, /** * Gets / sets the flag that will enable / disable chain reactor sending * from this instance. Chain reactor sending is enabled by default on all * instances. * @param {Boolean} val True or false to enable or disable chain sending. * @returns {*} */ chainEnabled: function (val) { if (val !== undefined) { this._chainDisabled = !val; return this; } return !this._chainDisabled; }, /** * Determines if this chain reactor node has any listeners downstream. * @returns {Boolean} True if there are nodes downstream of this node. */ chainWillSend: function () { return Boolean(this._chain && !this._chainDisabled); }, /** * Sends a chain reactor packet downstream from this node to any of its * chained targets that were linked to this node via a call to chain(). * @param {String} type The type of chain reactor packet to send. This * can be any string but the receiving reactor nodes will not react to * it unless they recognise the string. Built-in strings include: "insert", * "update", "remove", "setData" and "debug". * @param {Object} data A data object that usually contains a key called * "dataSet" which is an array of items to work on, and can contain other * custom keys that help describe the operation. * @param {Object=} options An options object. Can also contain custom * key/value pairs that your custom chain reactor code can operate on. */ chainSend: function (type, data, options) { if (this._chain && !this._chainDisabled) { var arr = this._chain, arrItem, count = arr.length, index, dataCopy = this.decouple(data, count); for (index = 0; index < count; index++) { arrItem = arr[index]; if (!arrItem._state || (arrItem._state && !arrItem.isDropped())) { if (this.debug && this.debug()) { if (arrItem._reactorIn && arrItem._reactorOut) { console.log(arrItem._reactorIn.logIdentifier() + ' Sending data down the chain reactor pipe to "' + arrItem._reactorOut.instanceIdentifier() + '"'); } else { console.log(this.logIdentifier() + ' Sending data down the chain reactor pipe to "' + arrItem.instanceIdentifier() + '"'); } } if (arrItem.chainReceive) { arrItem.chainReceive(this, type, dataCopy[index], options); } } else { console.log('Reactor Data:', type, data, options); console.log('Reactor Node:', arrItem); throw('Chain reactor attempting to send data to target reactor node that is in a dropped state!'); } } } }, /** * Handles receiving a chain reactor message that was sent via the chainSend() * method. Creates the chain packet object and then allows it to be processed. * @param {Object} sender The node that is sending the packet. * @param {String} type The type of packet. * @param {Object} data The data related to the packet. * @param {Object=} options An options object. */ chainReceive: function (sender, type, data, options) { var chainPacket = { sender: sender, type: type, data: data, options: options }, cancelPropagate = false; if (this.debug && this.debug()) { console.log(this.logIdentifier() + ' Received data from parent reactor node'); } // Check if we have a chain handler method if (this._chainHandler) { // Fire our internal handler cancelPropagate = this._chainHandler(chainPacket); } // Check if we were told to cancel further propagation if (!cancelPropagate) { // Propagate the message down the chain this.chainSend(chainPacket.type, chainPacket.data, chainPacket.options); } } }; module.exports = ChainReactor; },{}],19:[function(_dereq_,module,exports){ "use strict"; var idCounter = 0, Overload = _dereq_('./Overload'), Serialiser = _dereq_('./Serialiser'), Common, serialiser = new Serialiser(); /** * Provides commonly used methods to most classes in ForerunnerDB. * @mixin */ Common = { // Expose the serialiser object so it can be extended with new data handlers. serialiser: serialiser, /** * Generates a JSON serialisation-compatible object instance. After the * instance has been passed through this method, it will be able to survive * a JSON.stringify() and JSON.parse() cycle and still end up as an * instance at the end. Further information about this process can be found * in the ForerunnerDB wiki at: https://github.com/Irrelon/ForerunnerDB/wiki/Serialiser-&-Performance-Benchmarks * @param {*} val The object instance such as "new Date()" or "new RegExp()". */ make: function (val) { // This is a conversion request, hand over to serialiser return serialiser.convert(val); }, /** * Gets / sets data in the item store. The store can be used to set and * retrieve data against a key. Useful for adding arbitrary key/value data * to a collection / view etc and retrieving it later. * @param {String|*} key The key under which to store the passed value or * retrieve the existing stored value. * @param {*=} val Optional value. If passed will overwrite the existing value * stored against the specified key if one currently exists. * @returns {*} */ store: function (key, val) { if (key !== undefined) { if (val !== undefined) { // Store the data this._store = this._store || {}; this._store[key] = val; return this; } if (this._store) { return this._store[key]; } } return undefined; }, /** * Removes a previously stored key/value pair from the item store, set previously * by using the store() method. * @param {String|*} key The key of the key/value pair to remove; * @returns {Common} Returns this for chaining. */ unStore: function (key) { if (key !== undefined) { delete this._store[key]; } return this; }, /** * Returns a non-referenced version of the passed object / array. * @param {Object} data The object or array to return as a non-referenced version. * @param {Number=} copies Optional number of copies to produce. If specified, the return * value will be an array of decoupled objects, each distinct from the other. * @returns {*} */ decouple: function (data, copies) { if (data !== undefined && data !== "") { if (!copies) { return this.jParse(this.jStringify(data)); } else { var i, json = this.jStringify(data), copyArr = []; for (i = 0; i < copies; i++) { copyArr.push(this.jParse(json)); } return copyArr; } } return undefined; }, /** * Parses and returns data from stringified version. * @param {String} data The stringified version of data to parse. * @returns {Object} The parsed JSON object from the data. */ jParse: function (data) { return JSON.parse(data, serialiser.reviver()); }, /** * Converts a JSON object into a stringified version. * @param {Object} data The data to stringify. * @returns {String} The stringified data. */ jStringify: function (data) { //return serialiser.stringify(data); return JSON.stringify(data); }, /** * Generates a new 16-character hexadecimal unique ID or * generates a new 16-character hexadecimal ID based on * the passed string. Will always generate the same ID * for the same string. * @param {String=} str A string to generate the ID from. * @return {String} */ objectId: function (str) { var id, pow = Math.pow(10, 17); if (!str) { idCounter++; id = (idCounter + ( Math.random() * pow + Math.random() * pow + Math.random() * pow + Math.random() * pow )).toString(16); } else { var val = 0, count = str.length, i; for (i = 0; i < count; i++) { val += str.charCodeAt(i) * pow; } id = val.toString(16); } return id; }, /** * Generates a unique hash for the passed object. * @param {Object} obj The object to generate a hash for. * @returns {String} */ hash: function (obj) { return JSON.stringify(obj); }, /** * Gets / sets debug flag that can enable debug message output to the * console if required. * @param {Boolean} val The value to set debug flag to. * @return {Boolean} True if enabled, false otherwise. */ /** * Sets debug flag for a particular type that can enable debug message * output to the console if required. * @param {String} type The name of the debug type to set flag for. * @param {Boolean} val The value to set debug flag to. * @return {Boolean} True if enabled, false otherwise. */ debug: new Overload([ function () { return this._debug && this._debug.all; }, function (val) { if (val !== undefined) { if (typeof val === 'boolean') { this._debug = this._debug || {}; this._debug.all = val; this.chainSend('debug', this._debug); return this; } else { return (this._debug && this._debug[val]) || (this._db && this._db._debug && this._db._debug[val]) || (this._debug && this._debug.all); } } return this._debug && this._debug.all; }, function (type, val) { if (type !== undefined) { if (val !== undefined) { this._debug = this._debug || {}; this._debug[type] = val; this.chainSend('debug', this._debug); return this; } return (this._debug && this._debug[val]) || (this._db && this._db._debug && this._db._debug[type]); } return this._debug && this._debug.all; } ]), /** * Returns a string describing the class this instance is derived from. * @returns {string} */ classIdentifier: function () { return 'ForerunnerDB.' + this.className; }, /** * Returns a string describing the instance by it's class name and instance * object name. * @returns {String} The instance identifier. */ instanceIdentifier: function () { return '[' + this.className + ']' + this.name(); }, /** * Returns a string used to denote a console log against this instance, * consisting of the class identifier and instance identifier. * @returns {string} The log identifier. */ logIdentifier: function () { return 'ForerunnerDB ' + this.instanceIdentifier(); }, /** * Converts a query object with MongoDB dot notation syntax * to Forerunner's object notation syntax. * @param {Object} obj The object to convert. */ convertToFdb: function (obj) { var varName, splitArr, objCopy, i; for (i in obj) { if (obj.hasOwnProperty(i)) { objCopy = obj; if (i.indexOf('.') > -1) { // Replace .$ with a placeholder before splitting by . char i = i.replace('.$', '[|$|]'); splitArr = i.split('.'); while ((varName = splitArr.shift())) { // Replace placeholder back to original .$ varName = varName.replace('[|$|]', '.$'); if (splitArr.length) { objCopy[varName] = {}; } else { objCopy[varName] = obj[i]; } objCopy = objCopy[varName]; } delete obj[i]; } } } }, /** * Checks if the state is dropped. * @returns {boolean} True when dropped, false otherwise. */ isDropped: function () { return this._state === 'dropped'; }, /** * Registers a timed callback that will overwrite itself if * the same id is used within the timeout period. Useful * for de-bouncing fast-calls. * @param {String} id An ID for the call (use the same one * to debounce the same calls). * @param {Function} callback The callback method to call on * timeout. * @param {Number} timeout The timeout in milliseconds before * the callback is called. */ debounce: function (id, callback, timeout) { var self = this, newData; self._debounce = self._debounce || {}; if (self._debounce[id]) { // Clear timeout for this item clearTimeout(self._debounce[id].timeout); } newData = { callback: callback, timeout: setTimeout(function () { // Delete existing reference delete self._debounce[id]; // Call the callback callback(); }, timeout) }; // Save current data self._debounce[id] = newData; } }; module.exports = Common; },{"./Overload":28,"./Serialiser":31}],20:[function(_dereq_,module,exports){ "use strict"; /** * Provides some database constants. * @mixin */ var Constants = { TYPE_INSERT: 0, TYPE_UPDATE: 1, TYPE_REMOVE: 2, PHASE_BEFORE: 0, PHASE_AFTER: 1 }; module.exports = Constants; },{}],21:[function(_dereq_,module,exports){ "use strict"; var Overload = _dereq_('./Overload'); /** * Provides event emitter functionality including the methods: on, off, once, emit, deferEmit. * @mixin */ var Events = { on: new Overload({ /** * Attach an event listener to the passed event. * @param {String} event The name of the event to listen for. * @param {Function} listener The method to call when the event is fired. */ 'string, function': function (event, listener) { this._listeners = this._listeners || {}; this._listeners[event] = this._listeners[event] || {}; this._listeners[event]['*'] = this._listeners[event]['*'] || []; this._listeners[event]['*'].push(listener); return this; }, /** * Attach an event listener to the passed event only if the passed * id matches the document id for the event being fired. * @param {String} event The name of the event to listen for. * @param {*} id The document id to match against. * @param {Function} listener The method to call when the event is fired. */ 'string, *, function': function (event, id, listener) { this._listeners = this._listeners || {}; this._listeners[event] = this._listeners[event] || {}; this._listeners[event][id] = this._listeners[event][id] || []; this._listeners[event][id].push(listener); return this; } }), once: new Overload({ 'string, function': function (eventName, callback) { var self = this, fired = false, internalCallback = function () { if (!fired) { self.off(eventName, internalCallback); callback.apply(self, arguments); fired = true; } }; return this.on(eventName, internalCallback); }, 'string, *, function': function (eventName, id, callback) { var self = this, fired = false, internalCallback = function () { if (!fired) { self.off(eventName, id, internalCallback); callback.apply(self, arguments); fired = true; } }; return this.on(eventName, id, internalCallback); } }), off: new Overload({ 'string': function (event) { var self = this; if (this._emitting) { this._eventRemovalQueue = this._eventRemovalQueue || []; this._eventRemovalQueue.push(function () { self.off(event); }); } else { if (this._listeners && this._listeners[event] && event in this._listeners) { delete this._listeners[event]; } } return this; }, 'string, function': function (event, listener) { var self = this, arr, index; if (this._emitting) { this._eventRemovalQueue = this._eventRemovalQueue || []; this._eventRemovalQueue.push(function () { self.off(event, listener); }); } else { if (typeof(listener) === 'string') { if (this._listeners && this._listeners[event] && this._listeners[event][listener]) { delete this._listeners[event][listener]; } } else { if (this._listeners && event in this._listeners) { arr = this._listeners[event]['*']; index = arr.indexOf(listener); if (index > -1) { arr.splice(index, 1); } } } } return this; }, 'string, *, function': function (event, id, listener) { var self = this; if (this._emitting) { this._eventRemovalQueue = this._eventRemovalQueue || []; this._eventRemovalQueue.push(function () { self.off(event, id, listener); }); } else { if (this._listeners && event in this._listeners && id in this.listeners[event]) { var arr = this._listeners[event][id], index = arr.indexOf(listener); if (index > -1) { arr.splice(index, 1); } } } }, 'string, *': function (event, id) { var self = this; if (this._emitting) { this._eventRemovalQueue = this._eventRemovalQueue || []; this._eventRemovalQueue.push(function () { self.off(event, id); }); } else { if (this._listeners && event in this._listeners && id in this._listeners[event]) { // Kill all listeners for this event id delete this._listeners[event][id]; } } } }), emit: function (event, data) { this._listeners = this._listeners || {}; this._emitting = true; if (event in this._listeners) { var arrIndex, arrCount, tmpFunc, arr, listenerIdArr, listenerIdCount, listenerIdIndex; // Handle global emit if (this._listeners[event]['*']) { arr = this._listeners[event]['*']; arrCount = arr.length; for (arrIndex = 0; arrIndex < arrCount; arrIndex++) { // Check we have a function to execute tmpFunc = arr[arrIndex]; if (typeof tmpFunc === 'function') { tmpFunc.apply(this, Array.prototype.slice.call(arguments, 1)); } } } // Handle individual emit if (data instanceof Array) { // Check if the array is an array of objects in the collection if (data[0] && data[0][this._primaryKey]) { // Loop the array and check for listeners against the primary key listenerIdArr = this._listeners[event]; arrCount = data.length; for (arrIndex = 0; arrIndex < arrCount; arrIndex++) { if (listenerIdArr[data[arrIndex][this._primaryKey]]) { // Emit for this id listenerIdCount = listenerIdArr[data[arrIndex][this._primaryKey]].length; for (listenerIdIndex = 0; listenerIdIndex < listenerIdCount; listenerIdIndex++) { tmpFunc = listenerIdArr[data[arrIndex][this._primaryKey]][listenerIdIndex]; if (typeof tmpFunc === 'function') { listenerIdArr[data[arrIndex][this._primaryKey]][listenerIdIndex].apply(this, Array.prototype.slice.call(arguments, 1)); } } } } } } } this._emitting = false; this._processRemovalQueue(); return this; }, /** * If events are cleared with the off() method while the event emitter is * actively processing any events then the off() calls get added to a * queue to be executed after the event emitter is finished. This stops * errors that might occur by potentially modifying the event queue while * the emitter is running through them. This method is called after the * event emitter is finished processing. * @private */ _processRemovalQueue: function () { var i; if (this._eventRemovalQueue && this._eventRemovalQueue.length) { // Execute each removal call for (i = 0; i < this._eventRemovalQueue.length; i++) { this._eventRemovalQueue[i](); } // Clear the removal queue this._eventRemovalQueue = []; } }, /** * Queues an event to be fired. This has automatic de-bouncing so that any * events of the same type that occur within 100 milliseconds of a previous * one will all be wrapped into a single emit rather than emitting tons of * events for lots of chained inserts etc. Only the data from the last * de-bounced event will be emitted. * @param {String} eventName The name of the event to emit. * @param {*=} data Optional data to emit with the event. */ deferEmit: function (eventName, data) { var self = this, args; if (!this._noEmitDefer && (!this._db || (this._db && !this._db._noEmitDefer))) { args = arguments; // Check for an existing timeout this._deferTimeout = this._deferTimeout || {}; if (this._deferTimeout[eventName]) { clearTimeout(this._deferTimeout[eventName]); } // Set a timeout this._deferTimeout[eventName] = setTimeout(function () { if (self.debug()) { console.log(self.logIdentifier() + ' Emitting ' + args[0]); } self.emit.apply(self, args); }, 1); } else { this.emit.apply(this, arguments); } return this; } }; module.exports = Events; },{"./Overload":28}],22:[function(_dereq_,module,exports){ "use strict"; /** * Provides object matching algorithm methods. * @mixin */ var Matching = { /** * Internal method that checks a document against a test object. * @param {*} source The source object or value to test against. * @param {*} test The test object or value to test with. * @param {Object} queryOptions The options the query was passed with. * @param {String=} opToApply The special operation to apply to the test such * as 'and' or an 'or' operator. * @param {Object=} options An object containing options to apply to the * operation such as limiting the fields returned etc. * @returns {Boolean} True if the test was positive, false on negative. * @private */ _match: function (source, test, queryOptions, opToApply, options) { // TODO: This method is quite long, break into smaller pieces var operation, applyOp = opToApply, recurseVal, tmpIndex, sourceType = typeof source, testType = typeof test, matchedAll = true, opResult, substringCache, i; if (sourceType === 'object' && source === null) { sourceType = 'null'; } if (testType === 'object' && test === null) { testType = 'null'; } options = options || {}; queryOptions = queryOptions || {}; // Check if options currently holds a root query object if (!options.$rootQuery) { // Root query not assigned, hold the root query options.$rootQuery = test; } // Check if options currently holds a root source object if (!options.$rootSource) { // Root query not assigned, hold the root query options.$rootSource = source; } // Assign current query data options.$currentQuery = test; options.$rootData = options.$rootData || {}; // Check if the comparison data are both strings or numbers if ((sourceType === 'string' || sourceType === 'number' || sourceType === 'null') && (testType === 'string' || testType === 'number' || testType === 'null')) { // The source and test data are flat types that do not require recursive searches, // so just compare them and return the result if (sourceType === 'number' || sourceType === 'null' || testType === 'null') { // Number or null comparison if (source !== test) { matchedAll = false; } } else { // String comparison // TODO: We can probably use a queryOptions.$locale as a second parameter here // TODO: to satisfy https://github.com/Irrelon/ForerunnerDB/issues/35 if (source.localeCompare(test)) { matchedAll = false; } } } else if ((sourceType === 'string' || sourceType === 'number') && (testType === 'object' && test instanceof RegExp)) { if (!test.test(source)) { matchedAll = false; } } else { for (i in test) { if (test.hasOwnProperty(i)) { // Assign previous query data options.$previousQuery = options.$parent; // Assign parent query data options.$parent = { query: test[i], key: i, parent: options.$previousQuery }; // Reset operation flag operation = false; // Grab first two chars of the key name to check for $ substringCache = i.substr(0, 2); // Check if the property is a comment (ignorable) if (substringCache === '//') { // Skip this property continue; } // Check if the property starts with a dollar (function) if (substringCache.indexOf('$') === 0) { // Ask the _matchOp method to handle the operation opResult = this._matchOp(i, source, test[i], queryOptions, options); // Check the result of the matchOp operation // If the result is -1 then no operation took place, otherwise the result // will be a boolean denoting a match (true) or no match (false) if (opResult > -1) { if (opResult) { if (opToApply === 'or') { return true; } } else { // Set the matchedAll flag to the result of the operation // because the operation did not return true matchedAll = opResult; } // Record that an operation was handled operation = true; } } // Check for regex if (!operation && test[i] instanceof RegExp) { operation = true; if (sourceType === 'object' && source[i] !== undefined && test[i].test(source[i])) { if (opToApply === 'or') { return true; } } else { matchedAll = false; } } if (!operation) { // Check if our query is an object if (typeof(test[i]) === 'object') { // Because test[i] is an object, source must also be an object // Check if our source data we are checking the test query against // is an object or an array if (source[i] !== undefined) { if (source[i] instanceof Array && !(test[i] instanceof Array)) { // The source data is an array, so check each item until a // match is found recurseVal = false; for (tmpIndex = 0; tmpIndex < source[i].length; tmpIndex++) { recurseVal = this._match(source[i][tmpIndex], test[i], queryOptions, applyOp, options); if (recurseVal) { // One of the array items matched the query so we can // include this item in the results, so break now break; } } if (recurseVal) { if (opToApply === 'or') { return true; } } else { matchedAll = false; } } else if (!(source[i] instanceof Array) && test[i] instanceof Array) { // The test key data is an array and the source key data is not so check // each item in the test key data to see if the source item matches one // of them. This is effectively an $in search. recurseVal = false; for (tmpIndex = 0; tmpIndex < test[i].length; tmpIndex++) { recurseVal = this._match(source[i], test[i][tmpIndex], queryOptions, applyOp, options); if (recurseVal) { // One of the array items matched the query so we can // include this item in the results, so break now break; } } if (recurseVal) { if (opToApply === 'or') { return true; } } else { matchedAll = false; } } else if (typeof(source) === 'object') { // Recurse down the object tree recurseVal = this._match(source[i], test[i], queryOptions, applyOp, options); if (recurseVal) { if (opToApply === 'or') { return true; } } else { matchedAll = false; } } else { recurseVal = this._match(undefined, test[i], queryOptions, applyOp, options); if (recurseVal) { if (opToApply === 'or') { return true; } } else { matchedAll = false; } } } else { // First check if the test match is an $exists if (test[i] && test[i].$exists !== undefined) { // Push the item through another match recurse recurseVal = this._match(undefined, test[i], queryOptions, applyOp, options); if (recurseVal) { if (opToApply === 'or') { return true; } } else { matchedAll = false; } } else { matchedAll = false; } } } else { // Check if the prop matches our test value if (source && source[i] === test[i]) { if (opToApply === 'or') { return true; } } else if (source && source[i] && source[i] instanceof Array && test[i] && typeof(test[i]) !== "object") { // We are looking for a value inside an array // The source data is an array, so check each item until a // match is found recurseVal = false; for (tmpIndex = 0; tmpIndex < source[i].length; tmpIndex++) { recurseVal = this._match(source[i][tmpIndex], test[i], queryOptions, applyOp, options); if (recurseVal) { // One of the array items matched the query so we can // include this item in the results, so break now break; } } if (recurseVal) { if (opToApply === 'or') { return true; } } else { matchedAll = false; } } else { matchedAll = false; } } } if (opToApply === 'and' && !matchedAll) { return false; } } } } return matchedAll; }, /** * Internal method, performs a matching process against a query operator such as $gt or $nin. * @param {String} key The property name in the test that matches the operator to perform * matching against. * @param {*} source The source data to match the query against. * @param {*} test The query to match the source against. * @param {Object} queryOptions The options the query was passed with. * @param {Object=} options An options object. * @returns {*} * @private */ _matchOp: function (key, source, test, queryOptions, options) { // Check for commands switch (key) { case '$gt': // Greater than return source > test; case '$gte': // Greater than or equal return source >= test; case '$lt': // Less than return source < test; case '$lte': // Less than or equal return source <= test; case '$exists': // Property exists return (source === undefined) !== test; case '$eq': // Equals return source == test; // jshint ignore:line case '$eeq': // Equals equals return source === test; case '$ne': // Not equals return source != test; // jshint ignore:line case '$nee': // Not equals equals return source !== test; case '$or': // Match true on ANY check to pass for (var orIndex = 0; orIndex < test.length; orIndex++) { if (this._match(source, test[orIndex], queryOptions, 'and', options)) { return true; } } return false; case '$and': // Match true on ALL checks to pass for (var andIndex = 0; andIndex < test.length; andIndex++) { if (!this._match(source, test[andIndex], queryOptions, 'and', options)) { return false; } } return true; case '$in': // In // Check that the in test is an array if (test instanceof Array) { var inArr = test, inArrCount = inArr.length, inArrIndex; for (inArrIndex = 0; inArrIndex < inArrCount; inArrIndex++) { if (this._match(source, inArr[inArrIndex], queryOptions, 'and', options)) { return true; } } return false; } else if (typeof test === 'object') { return this._match(source, test, queryOptions, 'and', options); } else { console.log(this.logIdentifier() + ' Cannot use an $in operator on a non-array key: ' + key, options.$rootQuery); return false; } break; case '$nin': // Not in // Check that the not-in test is an array if (test instanceof Array) { var notInArr = test, notInArrCount = notInArr.length, notInArrIndex; for (notInArrIndex = 0; notInArrIndex < notInArrCount; notInArrIndex++) { if (this._match(source, notInArr[notInArrIndex], queryOptions, 'and', options)) { return false; } } return true; } else if (typeof test === 'object') { return this._match(source, test, queryOptions, 'and', options); } else { console.log(this.logIdentifier() + ' Cannot use a $nin operator on a non-array key: ' + key, options.$rootQuery); return false; } break; case '$fastIn': if (test instanceof Array) { // Source is a string or number, use indexOf to identify match in array return test.indexOf(source) !== -1; } else { console.log(this.logIdentifier() + ' Cannot use an $fastIn operator on a non-array key: ' + key, options.$rootQuery); return false; } break; case '$distinct': // Ensure options holds a distinct lookup options.$rootData['//distinctLookup'] = options.$rootData['//distinctLookup'] || {}; for (var distinctProp in test) { if (test.hasOwnProperty(distinctProp)) { options.$rootData['//distinctLookup'][distinctProp] = options.$rootData['//distinctLookup'][distinctProp] || {}; // Check if the options distinct lookup has this field's value if (options.$rootData['//distinctLookup'][distinctProp][source[distinctProp]]) { // Value is already in use return false; } else { // Set the value in the lookup options.$rootData['//distinctLookup'][distinctProp][source[distinctProp]] = true; // Allow the item in the results return true; } } } break; case '$count': var countKey, countArr, countVal; // Iterate the count object's keys for (countKey in test) { if (test.hasOwnProperty(countKey)) { // Check the property exists and is an array. If the property being counted is not // an array (or doesn't exist) then use a value of zero in any further count logic countArr = source[countKey]; if (typeof countArr === 'object' && countArr instanceof Array) { countVal = countArr.length; } else { countVal = 0; } // Now recurse down the query chain further to satisfy the query for this key (countKey) if (!this._match(countVal, test[countKey], queryOptions, 'and', options)) { return false; } } } // Allow the item in the results return true; case '$find': case '$findOne': case '$findSub': var fromType = 'collection', findQuery, findOptions, subQuery, subOptions, subPath, result, operation = {}; // Check all parts of the $find operation exist if (!test.$from) { throw(key + ' missing $from property!'); } if (test.$fromType) { fromType = test.$fromType; // Check the fromType exists as a method if (!this.db()[fromType] || typeof this.db()[fromType] !== 'function') { throw(key + ' cannot operate against $fromType "' + fromType + '" because the database does not recognise this type of object!'); } } // Perform the find operation findQuery = test.$query || {}; findOptions = test.$options || {}; if (key === '$findSub') { if (!test.$path) { throw(key + ' missing $path property!'); } subPath = test.$path; subQuery = test.$subQuery || {}; subOptions = test.$subOptions || {}; if (options.$parent && options.$parent.parent && options.$parent.parent.key) { result = this.db()[fromType](test.$from).findSub(findQuery, subPath, subQuery, subOptions); } else { // This is a root $find* query // Test the source against the main findQuery if (this._match(source, findQuery, {}, 'and', options)) { result = this._findSub([source], subPath, subQuery, subOptions); } return result && result.length > 0; } } else { result = this.db()[fromType](test.$from)[key.substr(1)](findQuery, findOptions); } operation[options.$parent.parent.key] = result; return this._match(source, operation, queryOptions, 'and', options); } return -1; }, /** * * @param {Array | Object} docArr An array of objects to run the join * operation against or a single object. * @param {Array} joinClause The join clause object array (the array in * the $join key of a normal join options object). * @param {Object} joinSource An object containing join source reference * data or a blank object if you are doing a bespoke join operation. * @param {Object} options An options object or blank object if no options. * @returns {Array} * @private */ applyJoin: function (docArr, joinClause, joinSource, options) { var self = this, joinSourceIndex, joinSourceKey, joinMatch, joinSourceType, joinSourceIdentifier, resultKeyName, joinSourceInstance, resultIndex, joinSearchQuery, joinMulti, joinRequire, joinPrefix, joinMatchIndex, joinMatchData, joinSearchOptions, joinFindResults, joinFindResult, joinItem, resultRemove = [], l; if (!(docArr instanceof Array)) { // Turn the document into an array docArr = [docArr]; } for (joinSourceIndex = 0; joinSourceIndex < joinClause.length; joinSourceIndex++) { for (joinSourceKey in joinClause[joinSourceIndex]) { if (joinClause[joinSourceIndex].hasOwnProperty(joinSourceKey)) { // Get the match data for the join joinMatch = joinClause[joinSourceIndex][joinSourceKey]; // Check if the join is to a collection (default) or a specified source type // e.g 'view' or 'collection' joinSourceType = joinMatch.$sourceType || 'collection'; joinSourceIdentifier = '$' + joinSourceType + '.' + joinSourceKey; // Set the key to store the join result in to the collection name by default // can be overridden by the '$as' clause in the join object resultKeyName = joinSourceKey; // Get the join collection instance from the DB if (joinSource[joinSourceIdentifier]) { // We have a joinSource for this identifier already (given to us by // an index when we analysed the query earlier on) and we can use // that source instead. joinSourceInstance = joinSource[joinSourceIdentifier]; } else { // We do not already have a joinSource so grab the instance from the db if (this._db[joinSourceType] && typeof this._db[joinSourceType] === 'function') { joinSourceInstance = this._db[joinSourceType](joinSourceKey); } } // Loop our result data array for (resultIndex = 0; resultIndex < docArr.length; resultIndex++) { // Loop the join conditions and build a search object from them joinSearchQuery = {}; joinMulti = false; joinRequire = false; joinPrefix = ''; for (joinMatchIndex in joinMatch) { if (joinMatch.hasOwnProperty(joinMatchIndex)) { joinMatchData = joinMatch[joinMatchIndex]; // Check the join condition name for a special command operator if (joinMatchIndex.substr(0, 1) === '$') { // Special command switch (joinMatchIndex) { case '$where': if (joinMatchData.$query || joinMatchData.$options) { if (joinMatchData.$query) { // Commented old code here, new one does dynamic reverse lookups //joinSearchQuery = joinMatchData.query; joinSearchQuery = self.resolveDynamicQuery(joinMatchData.$query, docArr[resultIndex]); } if (joinMatchData.$options) { joinSearchOptions = joinMatchData.$options; } } else { throw('$join $where clause requires "$query" and / or "$options" keys to work!'); } break; case '$as': // Rename the collection when stored in the result document resultKeyName = joinMatchData; break; case '$multi': // Return an array of documents instead of a single matching document joinMulti = joinMatchData; break; case '$require': // Remove the result item if no matching join data is found joinRequire = joinMatchData; break; case '$prefix': // Add a prefix to properties mixed in joinPrefix = joinMatchData; break; default: break; } } else { // Get the data to match against and store in the search object // Resolve complex referenced query joinSearchQuery[joinMatchIndex] = self.resolveDynamicQuery(joinMatchData, docArr[resultIndex]); } } } // Do a find on the target collection against the match data joinFindResults = joinSourceInstance.find(joinSearchQuery, joinSearchOptions); // Check if we require a joined row to allow the result item if (!joinRequire || (joinRequire && joinFindResults[0])) { // Join is not required or condition is met if (resultKeyName === '$root') { // The property name to store the join results in is $root // which means we need to mixin the results but this only // works if joinMulti is disabled if (joinMulti !== false) { // Throw an exception here as this join is not physically possible! throw(this.logIdentifier() + ' Cannot combine [$as: "$root"] with [$multi: true] in $join clause!'); } // Mixin the result joinFindResult = joinFindResults[0]; joinItem = docArr[resultIndex]; for (l in joinFindResult) { if (joinFindResult.hasOwnProperty(l) && joinItem[joinPrefix + l] === undefined) { // Properties are only mixed in if they do not already exist // in the target item (are undefined). Using a prefix denoted via // $prefix is a good way to prevent property name conflicts joinItem[joinPrefix + l] = joinFindResult[l]; } } } else { docArr[resultIndex][resultKeyName] = joinMulti === false ? joinFindResults[0] : joinFindResults; } } else { // Join required but condition not met, add item to removal queue resultRemove.push(resultIndex); } } } } } return resultRemove; }, /** * Takes a query object with dynamic references and converts the references * into actual values from the references source. * @param {Object} query The query object with dynamic references. * @param {Object} item The document to apply the references to. * @returns {*} * @private */ resolveDynamicQuery: function (query, item) { var self = this, newQuery, propType, propVal, pathResult, i; // Check for early exit conditions if (typeof query === 'string') { // Check if the property name starts with a back-reference if (query.substr(0, 3) === '$$.') { // Fill the query with a back-referenced value pathResult = this.sharedPathSolver.value(item, query.substr(3, query.length - 3)); } else { pathResult = this.sharedPathSolver.value(item, query); } if (pathResult.length > 1) { return {$in: pathResult}; } else { return pathResult[0]; } } newQuery = {}; for (i in query) { if (query.hasOwnProperty(i)) { propType = typeof query[i]; propVal = query[i]; switch (propType) { case 'string': // Check if the property name starts with a back-reference if (propVal.substr(0, 3) === '$$.') { // Fill the query with a back-referenced value newQuery[i] = this.sharedPathSolver.value(item, propVal.substr(3, propVal.length - 3))[0]; } else { newQuery[i] = propVal; } break; case 'object': newQuery[i] = self.resolveDynamicQuery(propVal, item); break; default: newQuery[i] = propVal; break; } } } return newQuery; }, spliceArrayByIndexList: function (arr, list) { var i; for (i = list.length - 1; i >= 0; i--) { arr.splice(list[i], 1); } } }; module.exports = Matching; },{}],23:[function(_dereq_,module,exports){ "use strict"; /** * Provides sorting methods. * @mixin */ var Sorting = { /** * Sorts the passed value a against the passed value b ascending. * @param {*} a The first value to compare. * @param {*} b The second value to compare. * @returns {*} 1 if a is sorted after b, -1 if a is sorted before b. */ sortAsc: function (a, b) { if (typeof(a) === 'string' && typeof(b) === 'string') { return a.localeCompare(b); } else { if (a > b) { return 1; } else if (a < b) { return -1; } } return 0; }, /** * Sorts the passed value a against the passed value b descending. * @param {*} a The first value to compare. * @param {*} b The second value to compare. * @returns {*} 1 if a is sorted after b, -1 if a is sorted before b. */ sortDesc: function (a, b) { if (typeof(a) === 'string' && typeof(b) === 'string') { return b.localeCompare(a); } else { if (a > b) { return -1; } else if (a < b) { return 1; } } return 0; } }; module.exports = Sorting; },{}],24:[function(_dereq_,module,exports){ "use strict"; var Tags, tagMap = {}; /** * Provides class instance tagging and tag operation methods. * @mixin */ Tags = { /** * Tags a class instance for later lookup. * @param {String} name The tag to add. * @returns {boolean} */ tagAdd: function (name) { var i, self = this, mapArr = tagMap[name] = tagMap[name] || []; for (i = 0; i < mapArr.length; i++) { if (mapArr[i] === self) { return true; } } mapArr.push(self); // Hook the drop event for this so we can react if (self.on) { self.on('drop', function () { // We've been dropped so remove ourselves from the tag map self.tagRemove(name); }); } return true; }, /** * Removes a tag from a class instance. * @param {String} name The tag to remove. * @returns {boolean} */ tagRemove: function (name) { var i, mapArr = tagMap[name]; if (mapArr) { for (i = 0; i < mapArr.length; i++) { if (mapArr[i] === this) { mapArr.splice(i, 1); return true; } } } return false; }, /** * Gets an array of all instances tagged with the passed tag name. * @param {String} name The tag to lookup. * @returns {Array} The array of instances that have the passed tag. */ tagLookup: function (name) { return tagMap[name] || []; }, /** * Drops all instances that are tagged with the passed tag name. * @param {String} name The tag to lookup. * @param {Function} callback Callback once dropping has completed * for all instances that match the passed tag name. * @returns {boolean} */ tagDrop: function (name, callback) { var arr = this.tagLookup(name), dropCb, dropCount, i; dropCb = function () { dropCount--; if (callback && dropCount === 0) { callback(false); } }; if (arr.length) { dropCount = arr.length; // Loop the array and drop all items for (i = arr.length - 1; i >= 0; i--) { arr[i].drop(dropCb); } } return true; } }; module.exports = Tags; },{}],25:[function(_dereq_,module,exports){ "use strict"; var Overload = _dereq_('./Overload'); /** * Provides trigger functionality methods. * @mixin */ var Triggers = { /** * When called in a before phase the newDoc object can be directly altered * to modify the data in it before the operation is carried out. * @callback addTriggerCallback * @param {Object} operation The details about the operation. * @param {Object} oldDoc The document before the operation. * @param {Object} newDoc The document after the operation. */ /** * Add a trigger by id. * @param {String} id The id of the trigger. This must be unique to the type and * phase of the trigger. Only one trigger may be added with this id per type and * phase. * @param {Constants} type The type of operation to apply the trigger to. See * Mixin.Constants for constants to use. * @param {Constants} phase The phase of an operation to fire the trigger on. See * Mixin.Constants for constants to use. * @param {addTriggerCallback} method The method to call when the trigger is fired. * @returns {boolean} True if the trigger was added successfully, false if not. */ addTrigger: function (id, type, phase, method) { var self = this, triggerIndex; // Check if the trigger already exists triggerIndex = self._triggerIndexOf(id, type, phase); if (triggerIndex === -1) { self.triggerStack = {}; // The trigger does not exist, create it self._trigger = self._trigger || {}; self._trigger[type] = self._trigger[type] || {}; self._trigger[type][phase] = self._trigger[type][phase] || []; self._trigger[type][phase].push({ id: id, method: method, enabled: true }); return true; } return false; }, /** * * @param {String} id The id of the trigger to remove. * @param {Number} type The type of operation to remove the trigger from. See * Mixin.Constants for constants to use. * @param {Number} phase The phase of the operation to remove the trigger from. * See Mixin.Constants for constants to use. * @returns {boolean} True if removed successfully, false if not. */ removeTrigger: function (id, type, phase) { var self = this, triggerIndex; // Check if the trigger already exists triggerIndex = self._triggerIndexOf(id, type, phase); if (triggerIndex > -1) { // The trigger exists, remove it self._trigger[type][phase].splice(triggerIndex, 1); } return false; }, /** * Tells the current instance to fire or ignore all triggers whether they * are enabled or not. * @param {Boolean} val Set to true to ignore triggers or false to not * ignore them. * @returns {*} */ ignoreTriggers: function (val) { if (val !== undefined) { this._ignoreTriggers = val; return this; } return this._ignoreTriggers; }, /** * Generates triggers that fire in the after phase for all CRUD ops * that automatically transform data back and forth and keep both * import and export collections in sync with each other. * @param {String} id The unique id for this link IO. * @param {Object} ioData The settings for the link IO. */ addLinkIO: function (id, ioData) { var self = this, matchAll, exportData, importData, exportTriggerMethod, importTriggerMethod, exportTo, importFrom, allTypes, i; // Store the linkIO self._linkIO = self._linkIO || {}; self._linkIO[id] = ioData; exportData = ioData['export']; importData = ioData['import']; if (exportData) { exportTo = self.db().collection(exportData.to); } if (importData) { importFrom = self.db().collection(importData.from); } allTypes = [ self.TYPE_INSERT, self.TYPE_UPDATE, self.TYPE_REMOVE ]; matchAll = function (data, callback) { // Match all callback(false, true); }; if (exportData) { // Check for export match method if (!exportData.match) { // No match method found, use the match all method exportData.match = matchAll; } // Check for export types if (!exportData.types) { exportData.types = allTypes; } exportTriggerMethod = function (operation, oldDoc, newDoc) { // Check if we should execute against this data exportData.match(newDoc, function (err, doExport) { if (!err && doExport) { // Get data to upsert (if any) exportData.data(newDoc, operation.type, function (err, data, callback) { if (!err && data) { // Disable all currently enabled triggers so that we // don't go into a trigger loop exportTo.ignoreTriggers(true); if (operation.type !== 'remove') { // Do upsert exportTo.upsert(data, callback); } else { // Do remove exportTo.remove(data, callback); } // Re-enable the previous triggers exportTo.ignoreTriggers(false); } }); } }); }; } if (importData) { // Check for import match method if (!importData.match) { // No match method found, use the match all method importData.match = matchAll; } // Check for import types if (!importData.types) { importData.types = allTypes; } importTriggerMethod = function (operation, oldDoc, newDoc) { // Check if we should execute against this data importData.match(newDoc, function (err, doExport) { if (!err && doExport) { // Get data to upsert (if any) importData.data(newDoc, operation.type, function (err, data, callback) { if (!err && data) { // Disable all currently enabled triggers so that we // don't go into a trigger loop exportTo.ignoreTriggers(true); if (operation.type !== 'remove') { // Do upsert self.upsert(data, callback); } else { // Do remove self.remove(data, callback); } // Re-enable the previous triggers exportTo.ignoreTriggers(false); } }); } }); }; } if (exportData) { for (i = 0; i < exportData.types.length; i++) { self.addTrigger(id + 'export' + exportData.types[i], exportData.types[i], self.PHASE_AFTER, exportTriggerMethod); } } if (importData) { for (i = 0; i < importData.types.length; i++) { importFrom.addTrigger(id + 'import' + importData.types[i], importData.types[i], self.PHASE_AFTER, importTriggerMethod); } } }, /** * Removes a previously added link IO via it's ID. * @param {String} id The id of the link IO to remove. * @returns {boolean} True if successful, false if the link IO * was not found. */ removeLinkIO: function (id) { var self = this, linkIO = self._linkIO[id], exportData, importData, importFrom, i; if (linkIO) { exportData = linkIO['export']; importData = linkIO['import']; if (exportData) { for (i = 0; i < exportData.types.length; i++) { self.removeTrigger(id + 'export' + exportData.types[i], exportData.types[i], self.db.PHASE_AFTER); } } if (importData) { importFrom = self.db().collection(importData.from); for (i = 0; i < importData.types.length; i++) { importFrom.removeTrigger(id + 'import' + importData.types[i], importData.types[i], self.db.PHASE_AFTER); } } delete self._linkIO[id]; return true; } return false; }, enableTrigger: new Overload({ 'string': function (id) { // Alter all triggers of this type var self = this, types = self._trigger, phases, triggers, result = false, i, k, j; if (types) { for (j in types) { if (types.hasOwnProperty(j)) { phases = types[j]; if (phases) { for (i in phases) { if (phases.hasOwnProperty(i)) { triggers = phases[i]; // Loop triggers and set enabled flag for (k = 0; k < triggers.length; k++) { if (triggers[k].id === id) { triggers[k].enabled = true; result = true; } } } } } } } } return result; }, 'number': function (type) { // Alter all triggers of this type var self = this, phases = self._trigger[type], triggers, result = false, i, k; if (phases) { for (i in phases) { if (phases.hasOwnProperty(i)) { triggers = phases[i]; // Loop triggers and set to enabled for (k = 0; k < triggers.length; k++) { triggers[k].enabled = true; result = true; } } } } return result; }, 'number, number': function (type, phase) { // Alter all triggers of this type and phase var self = this, phases = self._trigger[type], triggers, result = false, k; if (phases) { triggers = phases[phase]; if (triggers) { // Loop triggers and set to enabled for (k = 0; k < triggers.length; k++) { triggers[k].enabled = true; result = true; } } } return result; }, 'string, number, number': function (id, type, phase) { // Check if the trigger already exists var self = this, triggerIndex = self._triggerIndexOf(id, type, phase); if (triggerIndex > -1) { // Update the trigger self._trigger[type][phase][triggerIndex].enabled = true; return true; } return false; } }), disableTrigger: new Overload({ 'string': function (id) { // Alter all triggers of this type var self = this, types = self._trigger, phases, triggers, result = false, i, k, j; if (types) { for (j in types) { if (types.hasOwnProperty(j)) { phases = types[j]; if (phases) { for (i in phases) { if (phases.hasOwnProperty(i)) { triggers = phases[i]; // Loop triggers and set enabled flag for (k = 0; k < triggers.length; k++) { if (triggers[k].id === id) { triggers[k].enabled = false; result = true; } } } } } } } } return result; }, 'number': function (type) { // Alter all triggers of this type var self = this, phases = self._trigger[type], triggers, result = false, i, k; if (phases) { for (i in phases) { if (phases.hasOwnProperty(i)) { triggers = phases[i]; // Loop triggers and set to disabled for (k = 0; k < triggers.length; k++) { triggers[k].enabled = false; result = true; } } } } return result; }, 'number, number': function (type, phase) { // Alter all triggers of this type and phase var self = this, phases = self._trigger[type], triggers, result = false, k; if (phases) { triggers = phases[phase]; if (triggers) { // Loop triggers and set to disabled for (k = 0; k < triggers.length; k++) { triggers[k].enabled = false; result = true; } } } return result; }, 'string, number, number': function (id, type, phase) { // Check if the trigger already exists var self = this, triggerIndex = self._triggerIndexOf(id, type, phase); if (triggerIndex > -1) { // Update the trigger self._trigger[type][phase][triggerIndex].enabled = false; return true; } return false; } }), /** * Checks if a trigger will fire based on the type and phase provided. * @param {Number} type The type of operation. See Mixin.Constants for * constants to use. * @param {Number} phase The phase of the operation. See Mixin.Constants * for constants to use. * @returns {Boolean} True if the trigger will fire, false otherwise. */ willTrigger: function (type, phase) { if (!this._ignoreTriggers && this._trigger && this._trigger[type] && this._trigger[type][phase] && this._trigger[type][phase].length) { // Check if a trigger in this array is enabled var arr = this._trigger[type][phase], i; for (i = 0; i < arr.length; i++) { if (arr[i].enabled) { return true; } } } return false; }, /** * Processes trigger actions based on the operation, type and phase. * @param {Object} operation Operation data to pass to the trigger. * @param {Number} type The type of operation. See Mixin.Constants for * constants to use. * @param {Number} phase The phase of the operation. See Mixin.Constants * for constants to use. * @param {Object} oldDoc The document snapshot before operations are * carried out against the data. * @param {Object} newDoc The document snapshot after operations are * carried out against the data. * @returns {boolean} */ processTrigger: function (operation, type, phase, oldDoc, newDoc) { var self = this, triggerArr, triggerIndex, triggerCount, triggerItem, response, typeName, phaseName; if (!self._ignoreTriggers && self._trigger && self._trigger[type] && self._trigger[type][phase]) { triggerArr = self._trigger[type][phase]; triggerCount = triggerArr.length; for (triggerIndex = 0; triggerIndex < triggerCount; triggerIndex++) { triggerItem = triggerArr[triggerIndex]; // Check if the trigger is enabled if (triggerItem.enabled) { if (self.debug()) { switch (type) { case this.TYPE_INSERT: typeName = 'insert'; break; case this.TYPE_UPDATE: typeName = 'update'; break; case this.TYPE_REMOVE: typeName = 'remove'; break; default: typeName = ''; break; } switch (phase) { case this.PHASE_BEFORE: phaseName = 'before'; break; case this.PHASE_AFTER: phaseName = 'after'; break; default: phaseName = ''; break; } console.log('Triggers: Processing trigger "' + triggerItem.id + '" for ' + typeName + ' in phase "' + phaseName + '"'); } // Check if the trigger is already in the stack, if it is, // don't fire it again (this is so we avoid infinite loops // where a trigger triggers another trigger which calls this // one and so on) if (self.triggerStack && self.triggerStack[type] && self.triggerStack[type][phase] && self.triggerStack[type][phase][triggerItem.id]) { // The trigger is already in the stack, do not fire the trigger again if (self.debug()) { console.log('Triggers: Will not run trigger "' + triggerItem.id + '" for ' + typeName + ' in phase "' + phaseName + '" as it is already in the stack!'); } continue; } // Add the trigger to the stack so we don't go down an endless // trigger loop self.triggerStack = self.triggerStack || {}; self.triggerStack[type] = {}; self.triggerStack[type][phase] = {}; self.triggerStack[type][phase][triggerItem.id] = true; // Run the trigger's method and store the response response = triggerItem.method.call(self, operation, oldDoc, newDoc); // Remove the trigger from the stack self.triggerStack = self.triggerStack || {}; self.triggerStack[type] = {}; self.triggerStack[type][phase] = {}; self.triggerStack[type][phase][triggerItem.id] = false; // Check the response for a non-expected result (anything other than // [undefined, true or false] is considered a throwable error) if (response === false) { // The trigger wants us to cancel operations return false; } if (response !== undefined && response !== true && response !== false) { // Trigger responded with error, throw the error throw('ForerunnerDB.Mixin.Triggers: Trigger error: ' + response); } } } // Triggers all ran without issue, return a success (true) return true; } }, /** * Returns the index of a trigger by id based on type and phase. * @param {String} id The id of the trigger to find the index of. * @param {Number} type The type of operation. See Mixin.Constants for * constants to use. * @param {Number} phase The phase of the operation. See Mixin.Constants * for constants to use. * @returns {number} * @private */ _triggerIndexOf: function (id, type, phase) { var self = this, triggerArr, triggerCount, triggerIndex; if (self._trigger && self._trigger[type] && self._trigger[type][phase]) { triggerArr = self._trigger[type][phase]; triggerCount = triggerArr.length; for (triggerIndex = 0; triggerIndex < triggerCount; triggerIndex++) { if (triggerArr[triggerIndex].id === id) { return triggerIndex; } } } return -1; } }; module.exports = Triggers; },{"./Overload":28}],26:[function(_dereq_,module,exports){ "use strict"; /** * Provides methods to handle object update operations. * @mixin */ var Updating = { /** * Updates a property on an object. * @param {Object} doc The object whose property is to be updated. * @param {String} prop The property to update. * @param {*} val The new value of the property. * @private */ _updateProperty: function (doc, prop, val) { doc[prop] = val; if (this.debug()) { console.log(this.logIdentifier() + ' Setting non-data-bound document property "' + prop + '" to val "' + val + '"'); } }, /** * Increments a value for a property on a document by the passed number. * @param {Object} doc The document to modify. * @param {String} prop The property to modify. * @param {Number} val The amount to increment by. * @private */ _updateIncrement: function (doc, prop, val) { doc[prop] += val; }, /** * Changes the index of an item in the passed array. * @param {Array} arr The array to modify. * @param {Number} indexFrom The index to move the item from. * @param {Number} indexTo The index to move the item to. * @private */ _updateSpliceMove: function (arr, indexFrom, indexTo) { arr.splice(indexTo, 0, arr.splice(indexFrom, 1)[0]); if (this.debug()) { console.log(this.logIdentifier() + ' Moving non-data-bound document array index from "' + indexFrom + '" to "' + indexTo + '"'); } }, /** * Inserts an item into the passed array at the specified index. * @param {Array} arr The array to insert into. * @param {Number} index The index to insert at. * @param {Object} doc The document to insert. * @private */ _updateSplicePush: function (arr, index, doc) { if (arr.length > index) { arr.splice(index, 0, doc); } else { arr.push(doc); } }, /** * Removes an item from the passed array at the specified index. * @param {Array} arr The array to remove from. * @param {Number} index The index of the item to remove. * @param {Number} count The number of items to remove. * @private */ _updateSplicePull: function (arr, index, count) { if (!count) { count = 1; } arr.splice(index, count); }, /** * Inserts an item at the end of an array. * @param {Array} arr The array to insert the item into. * @param {Object} doc The document to insert. * @private */ _updatePush: function (arr, doc) { arr.push(doc); }, /** * Removes an item from the passed array. * @param {Array} arr The array to modify. * @param {Number} index The index of the item in the array to remove. * @private */ _updatePull: function (arr, index) { arr.splice(index, 1); }, /** * Multiplies a value for a property on a document by the passed number. * @param {Object} doc The document to modify. * @param {String} prop The property to modify. * @param {Number} val The amount to multiply by. * @private */ _updateMultiply: function (doc, prop, val) { doc[prop] *= val; }, /** * Renames a property on a document to the passed property. * @param {Object} doc The document to modify. * @param {String} prop The property to rename. * @param {Number} val The new property name. * @private */ _updateRename: function (doc, prop, val) { doc[val] = doc[prop]; delete doc[prop]; }, /** * Sets a property on a document to the passed value. * @param {Object} doc The document to modify. * @param {String} prop The property to set. * @param {*} val The new property value. * @private */ _updateOverwrite: function (doc, prop, val) { doc[prop] = val; }, /** * Deletes a property on a document. * @param {Object} doc The document to modify. * @param {String} prop The property to delete. * @private */ _updateUnset: function (doc, prop) { delete doc[prop]; }, /** * Removes all properties from an object without destroying * the object instance, thereby maintaining data-bound linking. * @param {Object} doc The parent object to modify. * @param {String} prop The name of the child object to clear. * @private */ _updateClear: function (doc, prop) { var obj = doc[prop], i; if (obj && typeof obj === 'object') { for (i in obj) { if (obj.hasOwnProperty(i)) { this._updateUnset(obj, i); } } } }, /** * Pops an item or items from the array stack. * @param {Object} doc The document to modify. * @param {Number} val If set to a positive integer, will pop the number specified * from the stack, if set to a negative integer will shift the number specified * from the stack. * @return {Boolean} * @private */ _updatePop: function (doc, val) { var updated = false, i; if (doc.length > 0) { if (val > 0) { for (i = 0; i < val; i++) { doc.pop(); } updated = true; } else if (val < 0) { for (i = 0; i > val; i--) { doc.shift(); } updated = true; } } return updated; } }; module.exports = Updating; },{}],27:[function(_dereq_,module,exports){ "use strict"; var Shared = _dereq_('./Shared'), Path = _dereq_('./Path'); /** * The operation class, used to store details about an operation being * performed by the database. * @param {String} name The name of the operation. * @constructor */ var Operation = function (name) { this.pathSolver = new Path(); this.counter = 0; this.init.apply(this, arguments); }; Operation.prototype.init = function (name) { this._data = { operation: name, // The name of the operation executed such as "find", "update" etc index: { potential: [], // Indexes that could have potentially been used used: false // The index that was picked to use }, steps: [], // The steps taken to generate the query results, time: { startMs: 0, stopMs: 0, totalMs: 0, process: {} }, flag: {}, // An object with flags that denote certain execution paths log: [] // Any extra data that might be useful such as warnings or helpful hints }; }; Shared.addModule('Operation', Operation); Shared.mixin(Operation.prototype, 'Mixin.ChainReactor'); /** * Starts the operation timer. */ Operation.prototype.start = function () { this._data.time.startMs = new Date().getTime(); }; /** * Adds an item to the operation log. * @param {String} event The item to log. * @returns {*} */ Operation.prototype.log = function (event) { if (event) { var lastLogTime = this._log.length > 0 ? this._data.log[this._data.log.length - 1].time : 0, logObj = { event: event, time: new Date().getTime(), delta: 0 }; this._data.log.push(logObj); if (lastLogTime) { logObj.delta = logObj.time - lastLogTime; } return this; } return this._data.log; }; /** * Called when starting and ending a timed operation, used to time * internal calls within an operation's execution. * @param {String} section An operation name. * @returns {*} */ Operation.prototype.time = function (section) { if (section !== undefined) { var process = this._data.time.process, processObj = process[section] = process[section] || {}; if (!processObj.startMs) { // Timer started processObj.startMs = new Date().getTime(); processObj.stepObj = { name: section }; this._data.steps.push(processObj.stepObj); } else { processObj.stopMs = new Date().getTime(); processObj.totalMs = processObj.stopMs - processObj.startMs; processObj.stepObj.totalMs = processObj.totalMs; delete processObj.stepObj; } return this; } return this._data.time; }; /** * Used to set key/value flags during operation execution. * @param {String} key * @param {String} val * @returns {*} */ Operation.prototype.flag = function (key, val) { if (key !== undefined && val !== undefined) { this._data.flag[key] = val; } else if (key !== undefined) { return this._data.flag[key]; } else { return this._data.flag; } }; Operation.prototype.data = function (path, val, noTime) { if (val !== undefined) { // Assign value to object path this.pathSolver.set(this._data, path, val); return this; } return this.pathSolver.get(this._data, path); }; Operation.prototype.pushData = function (path, val, noTime) { // Assign value to object path this.pathSolver.push(this._data, path, val); }; /** * Stops the operation timer. */ Operation.prototype.stop = function () { this._data.time.stopMs = new Date().getTime(); this._data.time.totalMs = this._data.time.stopMs - this._data.time.startMs; }; Shared.finishModule('Operation'); module.exports = Operation; },{"./Path":29,"./Shared":32}],28:[function(_dereq_,module,exports){ "use strict"; /** * Allows a method to accept overloaded calls with different parameters controlling * which passed overload function is called. * @param {String=} name A name to provide this overload to help identify * it if any errors occur during the resolving phase of the overload. This * is purely for debug purposes and serves no functional purpose. * @param {Object} def The overload definition. * @returns {Function} * @constructor */ var Overload = function (name, def) { if (!def) { def = name; name = undefined; } if (def) { var self = this, index, count, tmpDef, defNewKey, sigIndex, signatures; if (!(def instanceof Array)) { tmpDef = {}; // Def is an object, make sure all prop names are devoid of spaces for (index in def) { if (def.hasOwnProperty(index)) { defNewKey = index.replace(/ /g, ''); // Check if the definition array has a * string in it if (defNewKey.indexOf('*') === -1) { // No * found tmpDef[defNewKey] = def[index]; } else { // A * was found, generate the different signatures that this // definition could represent signatures = this.generateSignaturePermutations(defNewKey); for (sigIndex = 0; sigIndex < signatures.length; sigIndex++) { if (!tmpDef[signatures[sigIndex]]) { tmpDef[signatures[sigIndex]] = def[index]; } } } } } def = tmpDef; } return function () { var arr = [], lookup, type, overloadName; // Check if we are being passed a key/function object or an array of functions if (def instanceof Array) { // We were passed an array of functions count = def.length; for (index = 0; index < count; index++) { if (def[index].length === arguments.length) { return self.callExtend(this, '$main', def, def[index], arguments); } } } else { // Generate lookup key from arguments // Copy arguments to an array for (index = 0; index < arguments.length; index++) { type = typeof arguments[index]; // Handle detecting arrays if (type === 'object' && arguments[index] instanceof Array) { type = 'array'; } // Handle been presented with a single undefined argument if (arguments.length === 1 && type === 'undefined') { break; } // Add the type to the argument types array arr.push(type); } lookup = arr.join(','); // Check for an exact lookup match if (def[lookup]) { return self.callExtend(this, '$main', def, def[lookup], arguments); } else { for (index = arr.length; index >= 0; index--) { // Get the closest match lookup = arr.slice(0, index).join(','); if (def[lookup + ',...']) { // Matched against arguments + "any other" return self.callExtend(this, '$main', def, def[lookup + ',...'], arguments); } } } } overloadName = name !== undefined ? name : typeof this.name === 'function' ? this.name() : 'Unknown'; console.log('Overload Definition:', def); throw('ForerunnerDB.Overload "' + overloadName + '": Overloaded method does not have a matching signature "' + lookup + '" for the passed arguments: ' + this.jStringify(arr)); }; } return function () {}; }; /** * Generates an array of all the different definition signatures that can be * created from the passed string with a catch-all wildcard *. E.g. it will * convert the signature: string,*,string to all potentials: * string,string,string * string,number,string * string,object,string, * string,function,string, * string,undefined,string * * @param {String} str Signature string with a wildcard in it. * @returns {Array} An array of signature strings that are generated. */ Overload.prototype.generateSignaturePermutations = function (str) { var signatures = [], newSignature, types = ['array', 'string', 'object', 'number', 'function', 'undefined'], index; if (str.indexOf('*') > -1) { // There is at least one "any" type, break out into multiple keys // We could do this at query time with regular expressions but // would be significantly slower for (index = 0; index < types.length; index++) { newSignature = str.replace('*', types[index]); signatures = signatures.concat(this.generateSignaturePermutations(newSignature)); } } else { signatures.push(str); } return signatures; }; Overload.prototype.callExtend = function (context, prop, propContext, func, args) { var tmp, ret; if (context && propContext[prop]) { tmp = context[prop]; context[prop] = propContext[prop]; ret = func.apply(context, args); context[prop] = tmp; return ret; } else { return func.apply(context, args); } }; module.exports = Overload; },{}],29:[function(_dereq_,module,exports){ "use strict"; var Shared = _dereq_('./Shared'); /** * Path object used to resolve object paths and retrieve data from * objects by using paths. * @param {String=} path The path to assign. * @constructor */ var Path = function (path) { this.init.apply(this, arguments); }; Path.prototype.init = function (path) { if (path) { this.path(path); } }; Shared.addModule('Path', Path); Shared.mixin(Path.prototype, 'Mixin.Common'); Shared.mixin(Path.prototype, 'Mixin.ChainReactor'); /** * Gets / sets the given path for the Path instance. * @param {String=} path The path to assign. */ Path.prototype.path = function (path) { if (path !== undefined) { this._path = this.clean(path); this._pathParts = this._path.split('.'); return this; } return this._path; }; /** * Tests if the passed object has the paths that are specified and that * a value exists in those paths. * @param {Object} testKeys The object describing the paths to test for. * @param {Object} testObj The object to test paths against. * @returns {Boolean} True if the object paths exist. */ Path.prototype.hasObjectPaths = function (testKeys, testObj) { var result = true, i; for (i in testKeys) { if (testKeys.hasOwnProperty(i)) { if (testObj[i] === undefined) { return false; } if (typeof testKeys[i] === 'object') { // Recurse object result = this.hasObjectPaths(testKeys[i], testObj[i]); // Should we exit early? if (!result) { return false; } } } } return result; }; /** * Counts the total number of key endpoints in the passed object. * @param {Object} testObj The object to count key endpoints for. * @returns {Number} The number of endpoints. */ Path.prototype.countKeys = function (testObj) { var totalKeys = 0, i; for (i in testObj) { if (testObj.hasOwnProperty(i)) { if (testObj[i] !== undefined) { if (typeof testObj[i] !== 'object') { totalKeys++; } else { totalKeys += this.countKeys(testObj[i]); } } } } return totalKeys; }; /** * Tests if the passed object has the paths that are specified and that * a value exists in those paths and if so returns the number matched. * @param {Object} testKeys The object describing the paths to test for. * @param {Object} testObj The object to test paths against. * @returns {Object} Stats on the matched keys */ Path.prototype.countObjectPaths = function (testKeys, testObj) { var matchData, matchedKeys = {}, matchedKeyCount = 0, totalKeyCount = 0, i; for (i in testObj) { if (testObj.hasOwnProperty(i)) { if (typeof testObj[i] === 'object') { // The test / query object key is an object, recurse matchData = this.countObjectPaths(testKeys[i], testObj[i]); matchedKeys[i] = matchData.matchedKeys; totalKeyCount += matchData.totalKeyCount; matchedKeyCount += matchData.matchedKeyCount; } else { // The test / query object has a property that is not an object so add it as a key totalKeyCount++; // Check if the test keys also have this key and it is also not an object if (testKeys && testKeys[i] && typeof testKeys[i] !== 'object') { matchedKeys[i] = true; matchedKeyCount++; } else { matchedKeys[i] = false; } } } } return { matchedKeys: matchedKeys, matchedKeyCount: matchedKeyCount, totalKeyCount: totalKeyCount }; }; /** * Takes a non-recursive object and converts the object hierarchy into * a path string. * @param {Object} obj The object to parse. * @param {Boolean=} withValue If true will include a 'value' key in the returned * object that represents the value the object path points to. * @returns {Object} */ Path.prototype.parse = function (obj, withValue) { var paths = [], path = '', resultData, i, k; for (i in obj) { if (obj.hasOwnProperty(i)) { // Set the path to the key path = i; if (typeof(obj[i]) === 'object') { if (withValue) { resultData = this.parse(obj[i], withValue); for (k = 0; k < resultData.length; k++) { paths.push({ path: path + '.' + resultData[k].path, value: resultData[k].value }); } } else { resultData = this.parse(obj[i]); for (k = 0; k < resultData.length; k++) { paths.push({ path: path + '.' + resultData[k].path }); } } } else { if (withValue) { paths.push({ path: path, value: obj[i] }); } else { paths.push({ path: path }); } } } } return paths; }; /** * Takes a non-recursive object and converts the object hierarchy into * an array of path strings that allow you to target all possible paths * in an object. * * The options object accepts an "ignore" field with a regular expression * as the value. If any key matches the expression it is not included in * the results. * * The options object accepts a boolean "verbose" field. If set to true * the results will include all paths leading up to endpoints as well as * they endpoints themselves. * * @returns {Array} */ Path.prototype.parseArr = function (obj, options) { options = options || {}; return this._parseArr(obj, '', [], options); }; Path.prototype._parseArr = function (obj, path, paths, options) { var i, newPath = ''; path = path || ''; paths = paths || []; for (i in obj) { if (obj.hasOwnProperty(i)) { if (!options.ignore || (options.ignore && !options.ignore.test(i))) { if (path) { newPath = path + '.' + i; } else { newPath = i; } if (typeof(obj[i]) === 'object') { if (options.verbose) { paths.push(newPath); } this._parseArr(obj[i], newPath, paths, options); } else { paths.push(newPath); } } } } return paths; }; /** * Sets a value on an object for the specified path. * @param {Object} obj The object to update. * @param {String} path The path to update. * @param {*} val The value to set the object path to. * @returns {*} */ Path.prototype.set = function (obj, path, val) { if (obj !== undefined && path !== undefined) { var pathParts, part; path = this.clean(path); pathParts = path.split('.'); part = pathParts.shift(); if (pathParts.length) { // Generate the path part in the object if it does not already exist obj[part] = obj[part] || {}; // Recurse this.set(obj[part], pathParts.join('.'), val); } else { // Set the value obj[part] = val; } } return obj; }; /** * Gets a single value from the passed object and given path. * @param {Object} obj The object to inspect. * @param {String} path The path to retrieve data from. * @returns {*} */ Path.prototype.get = function (obj, path) { return this.value(obj, path)[0]; }; /** * Gets the value(s) that the object contains for the currently assigned path string. * @param {Object} obj The object to evaluate the path against. * @param {String=} path A path to use instead of the existing one passed in path(). * @param {Object=} options An optional options object. * @returns {Array} An array of values for the given path. */ Path.prototype.value = function (obj, path, options) { var pathParts, arr, arrCount, objPart, objPartParent, valuesArr, returnArr, i, k; // Detect early exit if (path && path.indexOf('.') === -1) { return [obj[path]]; } if (obj !== undefined && typeof obj === 'object') { if (!options || options && !options.skipArrCheck) { // Check if we were passed an array of objects and if so, // iterate over the array and return the value from each // array item if (obj instanceof Array) { returnArr = []; for (i = 0; i < obj.length; i++) { returnArr.push(this.get(obj[i], path)); } return returnArr; } } valuesArr = []; if (path !== undefined) { path = this.clean(path); pathParts = path.split('.'); } arr = pathParts || this._pathParts; arrCount = arr.length; objPart = obj; for (i = 0; i < arrCount; i++) { objPart = objPart[arr[i]]; if (objPartParent instanceof Array) { // Search inside the array for the next key for (k = 0; k < objPartParent.length; k++) { valuesArr = valuesArr.concat(this.value(objPartParent, k + '.' + arr[i], {skipArrCheck: true})); } return valuesArr; } else { if (!objPart || typeof(objPart) !== 'object') { break; } } objPartParent = objPart; } return [objPart]; } else { return []; } }; /** * Push a value to an array on an object for the specified path. * @param {Object} obj The object to update. * @param {String} path The path to the array to push to. * @param {*} val The value to push to the array at the object path. * @returns {*} */ Path.prototype.push = function (obj, path, val) { if (obj !== undefined && path !== undefined) { var pathParts, part; path = this.clean(path); pathParts = path.split('.'); part = pathParts.shift(); if (pathParts.length) { // Generate the path part in the object if it does not already exist obj[part] = obj[part] || {}; // Recurse this.set(obj[part], pathParts.join('.'), val); } else { // Set the value obj[part] = obj[part] || []; if (obj[part] instanceof Array) { obj[part].push(val); } else { throw('ForerunnerDB.Path: Cannot push to a path whose endpoint is not an array!'); } } } return obj; }; /** * Gets the value(s) that the object contains for the currently assigned path string * with their associated keys. * @param {Object} obj The object to evaluate the path against. * @param {String=} path A path to use instead of the existing one passed in path(). * @returns {Array} An array of values for the given path with the associated key. */ Path.prototype.keyValue = function (obj, path) { var pathParts, arr, arrCount, objPart, objPartParent, objPartHash, i; if (path !== undefined) { path = this.clean(path); pathParts = path.split('.'); } arr = pathParts || this._pathParts; arrCount = arr.length; objPart = obj; for (i = 0; i < arrCount; i++) { objPart = objPart[arr[i]]; if (!objPart || typeof(objPart) !== 'object') { objPartHash = arr[i] + ':' + objPart; break; } objPartParent = objPart; } return objPartHash; }; /** * Sets a value on an object for the specified path. * @param {Object} obj The object to update. * @param {String} path The path to update. * @param {*} val The value to set the object path to. * @returns {*} */ Path.prototype.set = function (obj, path, val) { if (obj !== undefined && path !== undefined) { var pathParts, part; path = this.clean(path); pathParts = path.split('.'); part = pathParts.shift(); if (pathParts.length) { // Generate the path part in the object if it does not already exist obj[part] = obj[part] || {}; // Recurse this.set(obj[part], pathParts.join('.'), val); } else { // Set the value obj[part] = val; } } return obj; }; /** * Removes leading period (.) from string and returns it. * @param {String} str The string to clean. * @returns {*} */ Path.prototype.clean = function (str) { if (str.substr(0, 1) === '.') { str = str.substr(1, str.length -1); } return str; }; Shared.finishModule('Path'); module.exports = Path; },{"./Shared":32}],30:[function(_dereq_,module,exports){ "use strict"; var Shared = _dereq_('./Shared'); /** * Provides chain reactor node linking so that a chain reaction can propagate * down a node tree. Effectively creates a chain link between the reactorIn and * reactorOut objects where a chain reaction from the reactorIn is passed through * the reactorProcess before being passed to the reactorOut object. Reactor * packets are only passed through to the reactorOut if the reactor IO method * chainSend is used. * @param {*} reactorIn An object that has the Mixin.ChainReactor methods mixed * in to it. Chain reactions that occur inside this object will be passed through * to the reactorOut object. * @param {*} reactorOut An object that has the Mixin.ChainReactor methods mixed * in to it. Chain reactions that occur in the reactorIn object will be passed * through to this object. * @param {Function} reactorProcess The processing method to use when chain * reactions occur. * @constructor */ var ReactorIO = function (reactorIn, reactorOut, reactorProcess) { if (reactorIn && reactorOut && reactorProcess) { this._reactorIn = reactorIn; this._reactorOut = reactorOut; this._chainHandler = reactorProcess; if (!reactorIn.chain) { throw('ForerunnerDB.ReactorIO: ReactorIO requires passed in and out objects to implement the ChainReactor mixin!'); } // Register the reactorIO with the input reactorIn.chain(this); // Register the output with the reactorIO this.chain(reactorOut); } else { throw('ForerunnerDB.ReactorIO: ReactorIO requires in, out and process arguments to instantiate!'); } }; Shared.addModule('ReactorIO', ReactorIO); /** * Drop a reactor IO object, breaking the reactor link between the in and out * reactor nodes. * @returns {boolean} */ ReactorIO.prototype.drop = function () { if (!this.isDropped()) { this._state = 'dropped'; // Remove links if (this._reactorIn) { this._reactorIn.unChain(this); } if (this._reactorOut) { this.unChain(this._reactorOut); } delete this._reactorIn; delete this._reactorOut; delete this._chainHandler; this.emit('drop', this); delete this._listeners; } return true; }; /** * Gets / sets the current state. * @param {String=} val The name of the state to set. * @returns {*} */ Shared.synthesize(ReactorIO.prototype, 'state'); Shared.mixin(ReactorIO.prototype, 'Mixin.Common'); Shared.mixin(ReactorIO.prototype, 'Mixin.ChainReactor'); Shared.mixin(ReactorIO.prototype, 'Mixin.Events'); Shared.finishModule('ReactorIO'); module.exports = ReactorIO; },{"./Shared":32}],31:[function(_dereq_,module,exports){ "use strict"; /** * Provides functionality to encode and decode JavaScript objects to strings * and back again. This differs from JSON.stringify and JSON.parse in that * special objects such as dates can be encoded to strings and back again * so that the reconstituted version of the string still contains a JavaScript * date object. * @constructor */ var Serialiser = function () { this.init.apply(this, arguments); }; Serialiser.prototype.init = function () { var self = this; this._encoder = []; this._decoder = []; // Handler for Date() objects this.registerHandler('$date', function (objInstance) { if (objInstance instanceof Date) { // Augment this date object with a new toJSON method objInstance.toJSON = function () { return "$date:" + this.toISOString(); }; // Tell the converter we have matched this object return true; } // Tell converter to keep looking, we didn't match this object return false; }, function (data) { if (typeof data === 'string' && data.indexOf('$date:') === 0) { return self.convert(new Date(data.substr(6))); } return undefined; }); // Handler for RegExp() objects this.registerHandler('$regexp', function (objInstance) { if (objInstance instanceof RegExp) { objInstance.toJSON = function () { return "$regexp:" + this.source.length + ":" + this.source + ":" + (this.global ? 'g' : '') + (this.ignoreCase ? 'i' : ''); /*return { source: this.source, params: '' + (this.global ? 'g' : '') + (this.ignoreCase ? 'i' : '') };*/ }; // Tell the converter we have matched this object return true; } // Tell converter to keep looking, we didn't match this object return false; }, function (data) { if (typeof data === 'string' && data.indexOf('$regexp:') === 0) { var dataStr = data.substr(8),//± lengthEnd = dataStr.indexOf(':'), sourceLength = Number(dataStr.substr(0, lengthEnd)), source = dataStr.substr(lengthEnd + 1, sourceLength), params = dataStr.substr(lengthEnd + sourceLength + 2); return self.convert(new RegExp(source, params)); } return undefined; }); }; Serialiser.prototype.registerHandler = function (handles, encoder, decoder) { if (handles !== undefined) { // Register encoder this._encoder.push(encoder); // Register decoder this._decoder.push(decoder); } }; Serialiser.prototype.convert = function (data) { // Run through converters and check for match var arr = this._encoder, i; for (i = 0; i < arr.length; i++) { if (arr[i](data)) { // The converter we called matched the object and converted it // so let's return it now. return data; } } // No converter matched the object, return the unaltered one return data; }; Serialiser.prototype.reviver = function () { var arr = this._decoder; return function (key, value) { // Check if we have a decoder method for this key var decodedData, i; for (i = 0; i < arr.length; i++) { decodedData = arr[i](value); if (decodedData !== undefined) { // The decoder we called matched the object and decoded it // so let's return it now. return decodedData; } } // No decoder, return basic value return value; }; }; module.exports = Serialiser; },{}],32:[function(_dereq_,module,exports){ "use strict"; var Overload = _dereq_('./Overload'); /** * A shared object that can be used to store arbitrary data between class * instances, and access helper methods. * @mixin */ var Shared = { version: '1.3.835', modules: {}, plugins: {}, index: {}, _synth: {}, /** * Adds a module to ForerunnerDB. * @memberof Shared * @param {String} name The name of the module. * @param {Function} module The module class. */ addModule: function (name, module) { // Store the module in the module registry this.modules[name] = module; // Tell the universe we are loading this module this.emit('moduleLoad', [name, module]); }, /** * Called by the module once all processing has been completed. Used to determine * if the module is ready for use by other modules. * @memberof Shared * @param {String} name The name of the module. */ finishModule: function (name) { if (this.modules[name]) { // Set the finished loading flag to true this.modules[name]._fdbFinished = true; // Assign the module name to itself so it knows what it // is called if (this.modules[name].prototype) { this.modules[name].prototype.className = name; } else { this.modules[name].className = name; } this.emit('moduleFinished', [name, this.modules[name]]); } else { throw('ForerunnerDB.Shared: finishModule called on a module that has not been registered with addModule(): ' + name); } }, /** * Will call your callback method when the specified module has loaded. If the module * is already loaded the callback is called immediately. * @memberof Shared * @param {String} name The name of the module. * @param {Function} callback The callback method to call when the module is loaded. */ moduleFinished: function (name, callback) { if (this.modules[name] && this.modules[name]._fdbFinished) { if (callback) { callback(name, this.modules[name]); } } else { this.on('moduleFinished', callback); } }, /** * Determines if a module has been added to ForerunnerDB or not. * @memberof Shared * @param {String} name The name of the module. * @returns {Boolean} True if the module exists or false if not. */ moduleExists: function (name) { return Boolean(this.modules[name]); }, mixin: new Overload({ /** * Adds the properties and methods defined in the mixin to the passed * object. * @memberof Shared * @name mixin * @param {Object} obj The target object to add mixin key/values to. * @param {String} mixinName The name of the mixin to add to the object. */ 'object, string': function (obj, mixinName) { var mixinObj; if (typeof mixinName === 'string') { mixinObj = this.mixins[mixinName]; if (!mixinObj) { throw('ForerunnerDB.Shared: Cannot find mixin named: ' + mixinName); } } return this.$main.call(this, obj, mixinObj); }, /** * Adds the properties and methods defined in the mixin to the passed * object. * @memberof Shared * @name mixin * @param {Object} obj The target object to add mixin key/values to. * @param {Object} mixinObj The object containing the keys to mix into * the target object. */ 'object, *': function (obj, mixinObj) { return this.$main.call(this, obj, mixinObj); }, '$main': function (obj, mixinObj) { if (mixinObj && typeof mixinObj === 'object') { for (var i in mixinObj) { if (mixinObj.hasOwnProperty(i)) { obj[i] = mixinObj[i]; } } } return obj; } }), /** * Generates a generic getter/setter method for the passed method name. * @memberof Shared * @param {Object} obj The object to add the getter/setter to. * @param {String} name The name of the getter/setter to generate. * @param {Function=} extend A method to call before executing the getter/setter. * The existing getter/setter can be accessed from the extend method via the * $super e.g. this.$super(); */ synthesize: function (obj, name, extend) { this._synth[name] = this._synth[name] || function (val) { if (val !== undefined) { this['_' + name] = val; return this; } return this['_' + name]; }; if (extend) { var self = this; obj[name] = function () { var tmp = this.$super, ret; this.$super = self._synth[name]; ret = extend.apply(this, arguments); this.$super = tmp; return ret; }; } else { obj[name] = this._synth[name]; } }, /** * Allows a method to be overloaded. * @memberof Shared * @param arr * @returns {Function} * @constructor */ overload: Overload, /** * Define the mixins that other modules can use as required. * @memberof Shared */ mixins: { 'Mixin.Common': _dereq_('./Mixin.Common'), 'Mixin.Events': _dereq_('./Mixin.Events'), 'Mixin.ChainReactor': _dereq_('./Mixin.ChainReactor'), 'Mixin.CRUD': _dereq_('./Mixin.CRUD'), 'Mixin.Constants': _dereq_('./Mixin.Constants'), 'Mixin.Triggers': _dereq_('./Mixin.Triggers'), 'Mixin.Sorting': _dereq_('./Mixin.Sorting'), 'Mixin.Matching': _dereq_('./Mixin.Matching'), 'Mixin.Updating': _dereq_('./Mixin.Updating'), 'Mixin.Tags': _dereq_('./Mixin.Tags') } }; // Add event handling to shared Shared.mixin(Shared, 'Mixin.Events'); module.exports = Shared; },{"./Mixin.CRUD":17,"./Mixin.ChainReactor":18,"./Mixin.Common":19,"./Mixin.Constants":20,"./Mixin.Events":21,"./Mixin.Matching":22,"./Mixin.Sorting":23,"./Mixin.Tags":24,"./Mixin.Triggers":25,"./Mixin.Updating":26,"./Overload":28}],33:[function(_dereq_,module,exports){ /* jshint strict:false */ if (!Array.prototype.filter) { Array.prototype.filter = function(fun/*, thisArg*/) { if (this === void 0 || this === null) { throw new TypeError(); } var t = Object(this); var len = t.length >>> 0; // jshint ignore:line if (typeof fun !== 'function') { throw new TypeError(); } var res = []; var thisArg = arguments.length >= 2 ? arguments[1] : void 0; for (var i = 0; i < len; i++) { if (i in t) { var val = t[i]; // NOTE: Technically this should Object.defineProperty at // the next index, as push can be affected by // properties on Object.prototype and Array.prototype. // But that method's new, and collisions should be // rare, so use the more-compatible alternative. if (fun.call(thisArg, val, i, t)) { res.push(val); } } } return res; }; } if (typeof Object.create !== 'function') { Object.create = (function() { var Temp = function() {}; return function (prototype) { if (arguments.length > 1) { throw Error('Second argument not supported'); } if (typeof prototype !== 'object') { throw TypeError('Argument must be an object'); } Temp.prototype = prototype; var result = new Temp(); Temp.prototype = null; return result; }; })(); } // Production steps of ECMA-262, Edition 5, 15.4.4.14 // Reference: http://es5.github.io/#x15.4.4.14e if (!Array.prototype.indexOf) { Array.prototype.indexOf = function(searchElement, fromIndex) { var k; // 1. Let O be the result of calling ToObject passing // the this value as the argument. if (this === null) { throw new TypeError('"this" is null or not defined'); } var O = Object(this); // 2. Let lenValue be the result of calling the Get // internal method of O with the argument "length". // 3. Let len be ToUint32(lenValue). var len = O.length >>> 0; // jshint ignore:line // 4. If len is 0, return -1. if (len === 0) { return -1; } // 5. If argument fromIndex was passed let n be // ToInteger(fromIndex); else let n be 0. var n = +fromIndex || 0; if (Math.abs(n) === Infinity) { n = 0; } // 6. If n >= len, return -1. if (n >= len) { return -1; } // 7. If n >= 0, then Let k be n. // 8. Else, n<0, Let k be len - abs(n). // If k is less than 0, then let k be 0. k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); // 9. Repeat, while k < len while (k < len) { // a. Let Pk be ToString(k). // This is implicit for LHS operands of the in operator // b. Let kPresent be the result of calling the // HasProperty internal method of O with argument Pk. // This step can be combined with c // c. If kPresent is true, then // i. Let elementK be the result of calling the Get // internal method of O with the argument ToString(k). // ii. Let same be the result of applying the // Strict Equality Comparison Algorithm to // searchElement and elementK. // iii. If same is true, return k. if (k in O && O[k] === searchElement) { return k; } k++; } return -1; }; } module.exports = {}; },{}],34:[function(_dereq_,module,exports){ "use strict"; // Import external names locally var Shared, Db, Collection, CollectionGroup, CollectionInit, DbInit, ReactorIO, ActiveBucket, Overload = _dereq_('./Overload'), Path, sharedPathSolver; Shared = _dereq_('./Shared'); /** * Creates a new view instance. * @param {String} name The name of the view. * @param {Object=} query The view's query. * @param {Object=} options An options object. * @constructor */ var View = function (name, query, options) { this.init.apply(this, arguments); }; Shared.addModule('View', View); Shared.mixin(View.prototype, 'Mixin.Common'); Shared.mixin(View.prototype, 'Mixin.Matching'); Shared.mixin(View.prototype, 'Mixin.ChainReactor'); Shared.mixin(View.prototype, 'Mixin.Constants'); //Shared.mixin(View.prototype, 'Mixin.Triggers'); Shared.mixin(View.prototype, 'Mixin.Tags'); Collection = _dereq_('./Collection'); CollectionGroup = _dereq_('./CollectionGroup'); ActiveBucket = _dereq_('./ActiveBucket'); ReactorIO = _dereq_('./ReactorIO'); CollectionInit = Collection.prototype.init; Db = Shared.modules.Db; DbInit = Db.prototype.init; Path = Shared.modules.Path; sharedPathSolver = new Path(); View.prototype.init = function (name, query, options) { var self = this; this.sharedPathSolver = sharedPathSolver; this._name = name; this._listeners = {}; this._querySettings = {}; this._debug = {}; this.query(query, options, false); this._collectionDroppedWrap = function () { self._collectionDropped.apply(self, arguments); }; this._data = new Collection(this.name() + '_internal'); }; /** * This reactor IO node is given data changes from source data and * then acts as a firewall process between the source and view data. * Data needs to meet the requirements this IO node imposes before * the data is passed down the reactor chain (to the view). This * allows us to intercept data changes from the data source and act * on them such as applying transforms, checking the data matches * the view's query, applying joins to the data etc before sending it * down the reactor chain via the this.chainSend() calls. * * Update packets are especially complex to handle because an update * on the underlying source data could translate into an insert, * update or remove call on the view. Take a scenario where the view's * query limits the data see from the source. If the source data is * updated and the data now falls inside the view's query limitations * the data is technically now an insert on the view, not an update. * The same is true in reverse where the update becomes a remove. If * the updated data already exists in the view and will still exist * after the update operation then the update can remain an update. * @param {Object} chainPacket The chain reactor packet representing the * data operation that has just been processed on the source data. * @param {View} self The reference to the view we are operating for. * @private */ View.prototype._handleChainIO = function (chainPacket, self) { var type = chainPacket.type, hasActiveJoin, hasActiveQuery, hasTransformIn, sharedData; // NOTE: "self" in this context is the view instance. // NOTE: "this" in this context is the ReactorIO node sitting in // between the source (sender) and the destination (listener) and // in this case the source is the view's "from" data source and the // destination is the view's _data collection. This means // that "this.chainSend()" is asking the ReactorIO node to send the // packet on to the destination listener. // EARLY EXIT: Check that the packet is not a CRUD operation if (type !== 'setData' && type !== 'insert' && type !== 'update' && type !== 'remove') { // This packet is NOT a CRUD operation packet so exit early! // Returning false informs the chain reactor to continue propagation // of the chain packet down the graph tree return false; } // We only need to check packets under three conditions // 1) We have a limiting query on the view "active query", // 2) We have a query options with a $join clause on the view "active join" // 3) We have a transformIn operation registered on the view. // If none of these conditions exist we can just allow the chain // packet to proceed as normal hasActiveJoin = Boolean(self._querySettings.options && self._querySettings.options.$join); hasActiveQuery = Boolean(self._querySettings.query); hasTransformIn = self._data._transformIn !== undefined; // EARLY EXIT: Check for any complex operation flags and if none // exist, send the packet on and exit early if (!hasActiveJoin && !hasActiveQuery && !hasTransformIn) { // We don't have any complex operation flags so exit early! // Returning false informs the chain reactor to continue propagation // of the chain packet down the graph tree return false; } // We have either an active query, active join or a transformIn // function registered on the view // We create a shared data object here so that the disparate method // calls can share data with each other via this object whilst // still remaining separate methods to keep code relatively clean. sharedData = { dataArr: [], removeArr: [] }; // Check the packet type to get the data arrays to work on if (chainPacket.type === 'insert') { // Check if the insert data is an array if (chainPacket.data.dataSet instanceof Array) { // Use the insert data array sharedData.dataArr = chainPacket.data.dataSet; } else { // Generate an array from the single insert object sharedData.dataArr = [chainPacket.data.dataSet]; } } else if (chainPacket.type === 'update') { // Use the dataSet array sharedData.dataArr = chainPacket.data.dataSet; } else if (chainPacket.type === 'remove') { if (chainPacket.data.dataSet instanceof Array) { // Use the remove data array sharedData.removeArr = chainPacket.data.dataSet; } else { // Generate an array from the single remove object sharedData.removeArr = [chainPacket.data.dataSet]; } } // Safety check if (!(sharedData.dataArr instanceof Array)) { // This shouldn't happen, let's log it console.warn('WARNING: dataArr being processed by chain reactor in View class is inconsistent!'); sharedData.dataArr = []; } if (!(sharedData.removeArr instanceof Array)) { // This shouldn't happen, let's log it console.warn('WARNING: removeArr being processed by chain reactor in View class is inconsistent!'); sharedData.removeArr = []; } // We need to operate in this order: // 1) Check if there is an active join - active joins are operated // against the SOURCE data. The joined data can potentially be // utilised by any active query or transformIn so we do this step first. // 2) Check if there is an active query - this is a query that is run // against the SOURCE data after any active joins have been resolved // on the source data. This allows an active query to operate on data // that would only exist after an active join has been executed. // If the source data does not fall inside the limiting factors of the // active query then we add it to a removal array. If it does fall // inside the limiting factors when we add it to an upsert array. This // is because data that falls inside the query could end up being // either new data or updated data after a transformIn operation. // 3) Check if there is a transformIn function. If a transformIn function // exist we run it against the data after doing any active join and // active query. if (hasActiveJoin) { if (this.debug()) { console.time(this.logIdentifier() + ' :: _handleChainIO_ActiveJoin'); } self._handleChainIO_ActiveJoin(chainPacket, sharedData); if (this.debug()) { console.timeEnd(this.logIdentifier() + ' :: _handleChainIO_ActiveJoin'); } } if (hasActiveQuery) { if (this.debug()) { console.time(this.logIdentifier() + ' :: _handleChainIO_ActiveQuery'); } self._handleChainIO_ActiveQuery(chainPacket, sharedData); if (this.debug()) { console.timeEnd(this.logIdentifier() + ' :: _handleChainIO_ActiveQuery'); } } if (hasTransformIn) { if (this.debug()) { console.time(this.logIdentifier() + ' :: _handleChainIO_TransformIn'); } self._handleChainIO_TransformIn(chainPacket, sharedData); if (this.debug()) { console.timeEnd(this.logIdentifier() + ' :: _handleChainIO_TransformIn'); } } // Check if we still have data to operate on and exit // if there is none left if (!sharedData.dataArr.length && !sharedData.removeArr.length) { // There is no more data to operate on, exit without // sending any data down the chain reactor (return true // will tell reactor to exit without continuing)! return true; } // Grab the public data collection's primary key sharedData.pk = self._data.primaryKey(); // We still have data left, let's work out how to handle it // first let's loop through the removals as these are easy if (sharedData.removeArr.length) { if (this.debug()) { console.time(this.logIdentifier() + ' :: _handleChainIO_RemovePackets'); } self._handleChainIO_RemovePackets(this, chainPacket, sharedData); if (this.debug()) { console.timeEnd(this.logIdentifier() + ' :: _handleChainIO_RemovePackets'); } } if (sharedData.dataArr.length) { if (this.debug()) { console.time(this.logIdentifier() + ' :: _handleChainIO_UpsertPackets'); } self._handleChainIO_UpsertPackets(this, chainPacket, sharedData); if (this.debug()) { console.timeEnd(this.logIdentifier() + ' :: _handleChainIO_UpsertPackets'); } } // Now return true to tell the chain reactor not to propagate // the data itself as we have done all that work here return true; }; View.prototype._handleChainIO_ActiveJoin = function (chainPacket, sharedData) { var dataArr = sharedData.dataArr, removeArr; // Since we have an active join, all we need to do is operate // the join clause on each item in the packet's data array. removeArr = this.applyJoin(dataArr, this._querySettings.options.$join, {}, {}); // Now that we've run our join keep in mind that joins can exclude data // if there is no matching joined data and the require: true clause in // the join options is enabled. This means we have to store a removal // array that tells us which items from the original data we sent to // join did not match the join data and were set with a require flag. // Now that we have our array of items to remove, let's run through the // original data and remove them from there. this.spliceArrayByIndexList(dataArr, removeArr); // Make sure we add any items we removed to the shared removeArr sharedData.removeArr = sharedData.removeArr.concat(removeArr); }; View.prototype._handleChainIO_ActiveQuery = function (chainPacket, sharedData) { var self = this, dataArr = sharedData.dataArr, i; // Now we need to run the data against the active query to // see if the data should be in the final data list or not, // so we use the _match method. // Loop backwards so we can safely splice from the array // while we are looping for (i = dataArr.length - 1; i >= 0; i--) { if (!self._match(dataArr[i], self._querySettings.query, self._querySettings.options, 'and', {})) { // The data didn't match the active query, add it // to the shared removeArr sharedData.removeArr.push(dataArr[i]); // Now remove it from the shared dataArr dataArr.splice(i, 1); } } }; View.prototype._handleChainIO_TransformIn = function (chainPacket, sharedData) { var self = this, dataArr = sharedData.dataArr, removeArr = sharedData.removeArr, dataIn = self._data._transformIn, i; // At this stage we take the remaining items still left in the data // array and run our transformIn method on each one, modifying it // from what it was to what it should be on the view. We also have // to run this on items we want to remove too because transforms can // affect primary keys and therefore stop us from identifying the // correct items to run removal operations on. // It is important that these are transformed BEFORE they are passed // to the CRUD methods because we use the CU data to check the position // of the item in the array and that can only happen if it is already // pre-transformed. The removal stuff also needs pre-transformed // because ids can be modified by a transform. for (i = 0; i < dataArr.length; i++) { // Assign the new value dataArr[i] = dataIn(dataArr[i]); } for (i = 0; i < removeArr.length; i++) { // Assign the new value removeArr[i] = dataIn(removeArr[i]); } }; View.prototype._handleChainIO_RemovePackets = function (ioObj, chainPacket, sharedData) { var $or = [], pk = sharedData.pk, removeArr = sharedData.removeArr, packet = { dataSet: removeArr, query: { $or: $or } }, orObj, i; for (i = 0; i < removeArr.length; i++) { orObj = {}; orObj[pk] = removeArr[i][pk]; $or.push(orObj); } ioObj.chainSend('remove', packet); }; View.prototype._handleChainIO_UpsertPackets = function (ioObj, chainPacket, sharedData) { var data = this._data, primaryIndex = data._primaryIndex, primaryCrc = data._primaryCrc, pk = sharedData.pk, dataArr = sharedData.dataArr, arrItem, insertArr = [], updateArr = [], query, i; // Let's work out what type of operation this data should // generate between an insert or an update. for (i = 0; i < dataArr.length; i++) { arrItem = dataArr[i]; // Check if the data already exists in the data if (primaryIndex.get(arrItem[pk])) { // Matching item exists, check if the data is the same if (primaryCrc.get(arrItem[pk]) !== this.hash(arrItem[pk])) { // The document exists in the data collection but data differs, update required updateArr.push(arrItem); } } else { // The document is missing from this collection, insert required insertArr.push(arrItem); } } if (insertArr.length) { ioObj.chainSend('insert', { dataSet: insertArr }); } if (updateArr.length) { for (i = 0; i < updateArr.length; i++) { arrItem = updateArr[i]; query = {}; query[pk] = arrItem[pk]; ioObj.chainSend('update', { query: query, update: arrItem, dataSet: [arrItem] }); } } }; /** * Executes an insert against the view's underlying data-source. * @see Collection::insert() */ View.prototype.insert = function () { this._from.insert.apply(this._from, arguments); }; /** * Executes an update against the view's underlying data-source. * @see Collection::update() */ View.prototype.update = function (query, update, options, callback) { var finalQuery = { $and: [this.query(), query] }; this._from.update.call(this._from, finalQuery, update, options, callback); }; /** * Executes an updateById against the view's underlying data-source. * @see Collection::updateById() */ View.prototype.updateById = function () { this._from.updateById.apply(this._from, arguments); }; /** * Executes a remove against the view's underlying data-source. * @see Collection::remove() */ View.prototype.remove = function () { this._from.remove.apply(this._from, arguments); }; /** * Queries the view data. * @see Collection::find() * @returns {Array} The result of the find query. */ View.prototype.find = function (query, options) { return this._data.find(query, options); }; /** * Queries the view data for a single document. * @see Collection::findOne() * @returns {Object} The result of the find query. */ View.prototype.findOne = function (query, options) { return this._data.findOne(query, options); }; /** * Queries the view data by specific id. * @see Collection::findById() * @returns {Array} The result of the find query. */ View.prototype.findById = function (id, options) { return this._data.findById(id, options); }; /** * Queries the view data in a sub-array. * @see Collection::findSub() * @returns {Array} The result of the find query. */ View.prototype.findSub = function (match, path, subDocQuery, subDocOptions) { return this._data.findSub(match, path, subDocQuery, subDocOptions); }; /** * Queries the view data in a sub-array and returns first match. * @see Collection::findSubOne() * @returns {Object} The result of the find query. */ View.prototype.findSubOne = function (match, path, subDocQuery, subDocOptions) { return this._data.findSubOne(match, path, subDocQuery, subDocOptions); }; /** * Gets the module's internal data collection. * @returns {Collection} */ View.prototype.data = function () { return this._data; }; /** * Sets the source from which the view will assemble its data. * @param {Collection|View} source The source to use to assemble view data. * @param {Function=} callback A callback method. * @returns {*} If no argument is passed, returns the current value of from, * otherwise returns itself for chaining. */ View.prototype.from = function (source, callback) { var self = this; if (source !== undefined) { // Check if we have an existing from if (this._from) { // Remove the listener to the drop event this._from.off('drop', this._collectionDroppedWrap); // Remove the current reference to the _from since we // are about to replace it with a new one delete this._from; } // Check if we have an existing reactor io that links the // previous _from source to the view's internal data if (this._io) { // Drop the io and remove it this._io.drop(); delete this._io; } // Check if we were passed a source name rather than a // reference to a source object if (typeof(source) === 'string') { // We were passed a name, assume it is a collection and // get the reference to the collection of that name source = this._db.collection(source); } // Check if we were passed a reference to a view rather than // a collection. Views need to be handled slightly differently // since their data is stored in an internal data collection // rather than actually being a direct data source themselves. if (source.className === 'View') { // The source is a view so IO to the internal data collection // instead of the view proper source = source._data; if (this.debug()) { console.log(this.logIdentifier() + ' Using internal data "' + source.instanceIdentifier() + '" for IO graph linking'); } } // Assign the new data source as the view's _from this._from = source; // Hook the new data source's drop event so we can unhook // it as a data source if it gets dropped. This is important // so that we don't run into problems using a dropped source // for active data. this._from.on('drop', this._collectionDroppedWrap); // Create a new reactor IO graph node that intercepts chain packets from the // view's _from source and determines how they should be interpreted by // this view. See the _handleChainIO() method which does all the chain packet // processing for the view. this._io = new ReactorIO(this._from, this, function (chainPacket) { return self._handleChainIO.call(this, chainPacket, self); }); // Set the view's internal data primary key to the same as the // current active _from data source this._data.primaryKey(source.primaryKey()); // Do the initial data lookup and populate the view's internal data // since at this point we don't actually have any data in the view // yet. var collData = source.find(this._querySettings.query, this._querySettings.options); this._data.setData(collData, {}, callback); // If we have an active query and that query has an $orderBy clause, // update our active bucket which allows us to keep track of where // data should be placed in our internal data array. This is about // ordering of data and making sure that we maintain an ordered array // so that if we have data-binding we can place an item in the data- // bound view at the correct location. Active buckets use quick-sort // algorithms to quickly determine the position of an item inside an // existing array based on a sort protocol. if (this._querySettings.options && this._querySettings.options.$orderBy) { this.rebuildActiveBucket(this._querySettings.options.$orderBy); } else { this.rebuildActiveBucket(); } return this; } return this._from; }; /** * The chain reaction handler method for the view. * @param {Object} chainPacket The chain reaction packet to handle. * @private */ View.prototype._chainHandler = function (chainPacket) { var //self = this, arr, count, index, insertIndex, updates, primaryKey, item, currentIndex; if (this.debug()) { console.log(this.logIdentifier() + ' Received chain reactor data: ' + chainPacket.type); } switch (chainPacket.type) { case 'setData': if (this.debug()) { console.log(this.logIdentifier() + ' Setting data in underlying (internal) view collection "' + this._data.name() + '"'); } // Get the new data from our underlying data source sorted as we want var collData = this._from.find(this._querySettings.query, this._querySettings.options); this._data.setData(collData); // Rebuild active bucket as well this.rebuildActiveBucket(this._querySettings.options); break; case 'insert': if (this.debug()) { console.log(this.logIdentifier() + ' Inserting some data into underlying (internal) view collection "' + this._data.name() + '"'); } // Decouple the data to ensure we are working with our own copy chainPacket.data.dataSet = this.decouple(chainPacket.data.dataSet); // Make sure we are working with an array if (!(chainPacket.data.dataSet instanceof Array)) { chainPacket.data.dataSet = [chainPacket.data.dataSet]; } if (this._querySettings.options && this._querySettings.options.$orderBy) { // Loop the insert data and find each item's index arr = chainPacket.data.dataSet; count = arr.length; for (index = 0; index < count; index++) { insertIndex = this._activeBucket.insert(arr[index]); this._data._insertHandle(arr[index], insertIndex); } } else { // Set the insert index to the passed index, or if none, the end of the view data array insertIndex = this._data._data.length; this._data._insertHandle(chainPacket.data.dataSet, insertIndex); } break; case 'update': if (this.debug()) { console.log(this.logIdentifier() + ' Updating some data in underlying (internal) view collection "' + this._data.name() + '"'); } primaryKey = this._data.primaryKey(); // Do the update updates = this._data._handleUpdate( chainPacket.data.query, chainPacket.data.update, chainPacket.data.options ); if (this._querySettings.options && this._querySettings.options.$orderBy) { // TODO: This would be a good place to improve performance by somehow // TODO: inspecting the change that occurred when update was performed // TODO: above and determining if it affected the order clause keys // TODO: and if not, skipping the active bucket updates here // Loop the updated items and work out their new sort locations count = updates.length; for (index = 0; index < count; index++) { item = updates[index]; // Remove the item from the active bucket (via it's id) this._activeBucket.remove(item); // Get the current location of the item currentIndex = this._data._data.indexOf(item); // Add the item back in to the active bucket insertIndex = this._activeBucket.insert(item); if (currentIndex !== insertIndex) { // Move the updated item to the new index this._data._updateSpliceMove(this._data._data, currentIndex, insertIndex); } } } break; case 'remove': if (this.debug()) { console.log(this.logIdentifier() + ' Removing some data from underlying (internal) view collection "' + this._data.name() + '"'); } this._data.remove(chainPacket.data.query, chainPacket.options); if (this._querySettings.options && this._querySettings.options.$orderBy) { // Loop the dataSet and remove the objects from the ActiveBucket arr = chainPacket.data.dataSet; count = arr.length; for (index = 0; index < count; index++) { this._activeBucket.remove(arr[index]); } } break; default: break; } }; /** * Handles when an underlying collection the view is using as a data * source is dropped. * @param {Collection} collection The collection that has been dropped. * @private */ View.prototype._collectionDropped = function (collection) { if (collection) { // Collection was dropped, remove from view delete this._from; } }; /** * Creates an index on the view. * @see Collection::ensureIndex() * @returns {*} */ View.prototype.ensureIndex = function () { return this._data.ensureIndex.apply(this._data, arguments); }; /** /** * Listens for an event. * @see Mixin.Events::on() */ View.prototype.on = function () { return this._data.on.apply(this._data, arguments); }; /** * Cancels an event listener. * @see Mixin.Events::off() */ View.prototype.off = function () { return this._data.off.apply(this._data, arguments); }; /** * Emits an event. * @see Mixin.Events::emit() */ View.prototype.emit = function () { return this._data.emit.apply(this._data, arguments); }; /** * Emits an event. * @see Mixin.Events::deferEmit() */ View.prototype.deferEmit = function () { return this._data.deferEmit.apply(this._data, arguments); }; /** * Find the distinct values for a specified field across a single collection and * returns the results in an array. * @param {String} key The field path to return distinct values for e.g. "person.name". * @param {Object=} query The query to use to filter the documents used to return values from. * @param {Object=} options The query options to use when running the query. * @returns {Array} */ View.prototype.distinct = function (key, query, options) { return this._data.distinct(key, query, options); }; /** * Gets the primary key for this view from the assigned collection. * @see Collection::primaryKey() * @returns {String} */ View.prototype.primaryKey = function () { return this._data.primaryKey(); }; /** * @see Mixin.Triggers::addTrigger() */ View.prototype.addTrigger = function () { return this._data.addTrigger.apply(this._data, arguments); }; /** * @see Mixin.Triggers::removeTrigger() */ View.prototype.removeTrigger = function () { return this._data.removeTrigger.apply(this._data, arguments); }; /** * @see Mixin.Triggers::ignoreTriggers() */ View.prototype.ignoreTriggers = function () { return this._data.ignoreTriggers.apply(this._data, arguments); }; /** * @see Mixin.Triggers::addLinkIO() */ View.prototype.addLinkIO = function () { return this._data.addLinkIO.apply(this._data, arguments); }; /** * @see Mixin.Triggers::removeLinkIO() */ View.prototype.removeLinkIO = function () { return this._data.removeLinkIO.apply(this._data, arguments); }; /** * @see Mixin.Triggers::willTrigger() */ View.prototype.willTrigger = function () { return this._data.willTrigger.apply(this._data, arguments); }; /** * @see Mixin.Triggers::processTrigger() */ View.prototype.processTrigger = function () { return this._data.processTrigger.apply(this._data, arguments); }; /** * @see Mixin.Triggers::_triggerIndexOf() */ View.prototype._triggerIndexOf = function () { return this._data._triggerIndexOf.apply(this._data, arguments); }; /** * Drops a view and all it's stored data from the database. * @returns {boolean} True on success, false on failure. */ View.prototype.drop = function (callback) { if (!this.isDropped()) { if (this._from) { this._from.off('drop', this._collectionDroppedWrap); this._from._removeView(this); } if (this.debug() || (this._db && this._db.debug())) { console.log(this.logIdentifier() + ' Dropping'); } this._state = 'dropped'; // Clear io and chains if (this._io) { this._io.drop(); } // Drop the view's internal collection if (this._data) { this._data.drop(); } if (this._db && this._name) { delete this._db._view[this._name]; } this.emit('drop', this); if (callback) { callback(false, true); } delete this._chain; delete this._from; delete this._data; delete this._io; delete this._listeners; delete this._querySettings; delete this._db; return true; } return false; }; /** * Gets / sets the query object and query options that the view uses * to build it's data set. This call modifies both the query and * query options at the same time. * @param {Object=} query The query to set. * @param {Boolean=} options The query options object. * @param {Boolean=} refresh Whether to refresh the view data after * this operation. Defaults to true. * @returns {*} * @deprecated Use query(<query>, <options>, <refresh>) instead. Query * now supports being presented with multiple different variations of * arguments. */ View.prototype.queryData = function (query, options, refresh) { if (query !== undefined) { this._querySettings.query = query; if (query.$findSub && !query.$findSub.$from) { query.$findSub.$from = this._data.name(); } if (query.$findSubOne && !query.$findSubOne.$from) { query.$findSubOne.$from = this._data.name(); } } if (options !== undefined) { this._querySettings.options = options; } if (query !== undefined || options !== undefined) { if (refresh === undefined || refresh === true) { this.refresh(); } } if (query !== undefined) { this.emit('queryChange', query); } if (options !== undefined) { this.emit('queryOptionsChange', options); } if (query !== undefined || options !== undefined) { return this; } return this._querySettings; }; /** * Add data to the existing query. * @param {Object} obj The data whose keys will be added to the existing * query object. * @param {Boolean} overwrite Whether or not to overwrite data that already * exists in the query object. Defaults to true. * @param {Boolean=} refresh Whether or not to refresh the view data set * once the operation is complete. Defaults to true. */ View.prototype.queryAdd = function (obj, overwrite, refresh) { this._querySettings.query = this._querySettings.query || {}; var query = this._querySettings.query, i; if (obj !== undefined) { // Loop object properties and add to existing query for (i in obj) { if (obj.hasOwnProperty(i)) { if (query[i] === undefined || (query[i] !== undefined && overwrite !== false)) { query[i] = obj[i]; } } } } if (refresh === undefined || refresh === true) { this.refresh(); } if (query !== undefined) { this.emit('queryChange', query); } }; /** * Remove data from the existing query. * @param {Object} obj The data whose keys will be removed from the existing * query object. * @param {Boolean=} refresh Whether or not to refresh the view data set * once the operation is complete. Defaults to true. */ View.prototype.queryRemove = function (obj, refresh) { var query = this._querySettings.query, i; if (query) { if (obj !== undefined) { // Loop object properties and add to existing query for (i in obj) { if (obj.hasOwnProperty(i)) { delete query[i]; } } } if (refresh === undefined || refresh === true) { this.refresh(); } if (query !== undefined) { this.emit('queryChange', query); } } }; /** * Gets / sets the query being used to generate the view data. It * does not change or modify the view's query options. * @param {Object=} query The query to set. * @param {Boolean=} refresh Whether to refresh the view data after * this operation. Defaults to true. * @returns {*} */ View.prototype.query = new Overload({ '': function () { return this.decouple(this._querySettings.query); }, 'object': function (query) { return this.$main.call(this, query, undefined, true); }, '*, boolean': function (query, refresh) { return this.$main.call(this, query, undefined, refresh); }, 'object, object': function (query, options) { return this.$main.call(this, query, options, true); }, '*, *, boolean': function (query, options, refresh) { return this.$main.call(this, query, options, refresh); }, '$main': function (query, options, refresh) { if (query !== undefined) { this._querySettings.query = query; if (query.$findSub && !query.$findSub.$from) { query.$findSub.$from = this._data.name(); } if (query.$findSubOne && !query.$findSubOne.$from) { query.$findSubOne.$from = this._data.name(); } } if (options !== undefined) { this._querySettings.options = options; } if (query !== undefined || options !== undefined) { if (refresh === undefined || refresh === true) { this.refresh(); } } if (query !== undefined) { this.emit('queryChange', query); } if (options !== undefined) { this.emit('queryOptionsChange', options); } if (query !== undefined || options !== undefined) { return this; } return this.decouple(this._querySettings); } }); /** * Gets / sets the orderBy clause in the query options for the view. * @param {Object=} val The order object. * @returns {*} */ View.prototype.orderBy = function (val) { if (val !== undefined) { var queryOptions = this.queryOptions() || {}; queryOptions.$orderBy = val; this.queryOptions(queryOptions); return this; } return (this.queryOptions() || {}).$orderBy; }; /** * Gets / sets the page clause in the query options for the view. * @param {Number=} val The page number to change to (zero index). * @returns {*} */ View.prototype.page = function (val) { if (val !== undefined) { var queryOptions = this.queryOptions() || {}; // Only execute a query options update if page has changed if (val !== queryOptions.$page) { queryOptions.$page = val; this.queryOptions(queryOptions); } return this; } return (this.queryOptions() || {}).$page; }; /** * Jump to the first page in the data set. * @returns {*} */ View.prototype.pageFirst = function () { return this.page(0); }; /** * Jump to the last page in the data set. * @returns {*} */ View.prototype.pageLast = function () { var pages = this.cursor().pages, lastPage = pages !== undefined ? pages : 0; return this.page(lastPage - 1); }; /** * Move forward or backwards in the data set pages by passing a positive * or negative integer of the number of pages to move. * @param {Number} val The number of pages to move. * @returns {*} */ View.prototype.pageScan = function (val) { if (val !== undefined) { var pages = this.cursor().pages, queryOptions = this.queryOptions() || {}, currentPage = queryOptions.$page !== undefined ? queryOptions.$page : 0; currentPage += val; if (currentPage < 0) { currentPage = 0; } if (currentPage >= pages) { currentPage = pages - 1; } return this.page(currentPage); } }; /** * Gets / sets the query options used when applying sorting etc to the * view data set. * @param {Object=} options An options object. * @param {Boolean=} refresh Whether to refresh the view data after * this operation. Defaults to true. * @returns {*} */ View.prototype.queryOptions = function (options, refresh) { if (options !== undefined) { this._querySettings.options = options; if (options.$decouple === undefined) { options.$decouple = true; } if (refresh === undefined || refresh === true) { this.refresh(); } else { // TODO: This could be wasteful if the previous options $orderBy was identical, do a hash and check first! this.rebuildActiveBucket(options.$orderBy); } if (options !== undefined) { this.emit('queryOptionsChange', options); } return this; } return this._querySettings.options; }; /** * Clears the existing active bucket and builds a new one based * on the passed orderBy object (if one is passed). * @param {Object=} orderBy The orderBy object describing how to * order any data. */ View.prototype.rebuildActiveBucket = function (orderBy) { if (orderBy) { var arr = this._data._data, arrCount = arr.length; // Build a new active bucket this._activeBucket = new ActiveBucket(orderBy); this._activeBucket.primaryKey(this._data.primaryKey()); // Loop the current view data and add each item for (var i = 0; i < arrCount; i++) { this._activeBucket.insert(arr[i]); } } else { // Remove any existing active bucket delete this._activeBucket; } }; /** * Refreshes the view data such as ordering etc. */ View.prototype.refresh = function () { var self = this, refreshResults, joinArr, i, k; if (this._from) { // Clear the private data collection which will propagate to the public data // collection automatically via the chain reactor node between them this._data.remove(); // Grab all the data from the underlying data source refreshResults = this._from.find(this._querySettings.query, this._querySettings.options); this.cursor(refreshResults.$cursor); // Insert the underlying data into the private data collection this._data.insert(refreshResults); // Store the current cursor data this._data._data.$cursor = refreshResults.$cursor; } if (this._querySettings && this._querySettings.options && this._querySettings.options.$join && this._querySettings.options.$join.length) { // Define the change handler method self.__joinChange = self.__joinChange || function () { self._joinChange(); }; // Check for existing join collections if (this._joinCollections && this._joinCollections.length) { // Loop the join collections and remove change listeners // Loop the collections and hook change events for (i = 0; i < this._joinCollections.length; i++) { this._db.collection(this._joinCollections[i]).off('immediateChange', self.__joinChange); } } // Now start hooking any new / existing joins joinArr = this._querySettings.options.$join; this._joinCollections = []; // Loop the joined collections and hook change events for (i = 0; i < joinArr.length; i++) { for (k in joinArr[i]) { if (joinArr[i].hasOwnProperty(k)) { this._joinCollections.push(k); } } } if (this._joinCollections.length) { // Loop the collections and hook change events for (i = 0; i < this._joinCollections.length; i++) { this._db.collection(this._joinCollections[i]).on('immediateChange', self.__joinChange); } } } if (this._querySettings.options && this._querySettings.options.$orderBy) { this.rebuildActiveBucket(this._querySettings.options.$orderBy); } else { this.rebuildActiveBucket(); } return this; }; /** * Handles when a change has occurred on a collection that is joined * by query to this view. * @param objName * @param objType * @private */ View.prototype._joinChange = function (objName, objType) { this.emit('joinChange'); // TODO: This is a really dirty solution because it will require a complete // TODO: rebuild of the view data. We need to implement an IO handler to // TODO: selectively update the data of the view based on the joined // TODO: collection data operation. // FIXME: This isnt working, major performance killer, invest in some IO from chain reactor to make this a targeted call this.refresh(); }; /** * Returns the number of documents currently in the view. * @returns {Number} */ View.prototype.count = function () { return this._data.count.apply(this._data, arguments); }; // Call underlying View.prototype.subset = function () { return this._data.subset.apply(this._data, arguments); }; /** * Takes the passed data and uses it to set transform methods and globally * enable or disable the transform system for the view. * @param {Object} obj The new transform system settings "enabled", "dataIn" * and "dataOut": * { * "enabled": true, * "dataIn": function (data) { return data; }, * "dataOut": function (data) { return data; } * } * @returns {*} */ View.prototype.transform = function (obj) { var currentSettings, newSettings; currentSettings = this._data.transform(); this._data.transform(obj); newSettings = this._data.transform(); // Check if transforms are enabled, a dataIn method is set and these // settings did not match the previous transform settings if (newSettings.enabled && newSettings.dataIn && (currentSettings.enabled !== newSettings.enabled || currentSettings.dataIn !== newSettings.dataIn)) { // The data in the view is now stale, refresh it this.refresh(); } return newSettings; }; /** * Executes a method against each document that matches query and returns an * array of documents that may have been modified by the method. * @param {Object} query The query object. * @param {Function} func The method that each document is passed to. If this method * returns false for a particular document it is excluded from the results. * @param {Object=} options Optional options object. * @returns {Array} */ View.prototype.filter = function (query, func, options) { return this._data.filter(query, func, options); }; /** * Returns the non-transformed data the view holds as a collection * reference. * @return {Collection} The non-transformed collection reference. */ View.prototype.data = function () { return this._data; }; /** * @see Collection.indexOf * @returns {*} */ View.prototype.indexOf = function () { return this._data.indexOf.apply(this._data, arguments); }; /** * Gets / sets the db instance this class instance belongs to. * @param {Db=} db The db instance. * @memberof View * @returns {*} */ Shared.synthesize(View.prototype, 'db', function (db) { if (db) { this._data.db(db); // Apply the same debug settings this.debug(db.debug()); this._data.debug(db.debug()); } return this.$super.apply(this, arguments); }); /** * Gets / sets the current state. * @param {String=} val The name of the state to set. * @returns {*} */ Shared.synthesize(View.prototype, 'state'); /** * Gets / sets the current name. * @param {String=} val The new name to set. * @returns {*} */ Shared.synthesize(View.prototype, 'name'); /** * Gets / sets the current cursor. * @param {String=} val The new cursor to set. * @returns {*} */ Shared.synthesize(View.prototype, 'cursor', function (val) { if (val === undefined) { return this._cursor || {}; } this.$super.apply(this, arguments); }); // Extend collection with view init Collection.prototype.init = function () { this._view = []; CollectionInit.apply(this, arguments); }; /** * Creates a view and assigns the collection as its data source. * @param {String} name The name of the new view. * @param {Object} query The query to apply to the new view. * @param {Object} options The options object to apply to the view. * @returns {*} */ Collection.prototype.view = function (name, query, options) { if (this._db && this._db._view ) { if (!this._db._view[name]) { var view = new View(name, query, options) .db(this._db) .from(this); this._view = this._view || []; this._view.push(view); return view; } else { throw(this.logIdentifier() + ' Cannot create a view using this collection because a view with this name already exists: ' + name); } } }; /** * Adds a view to the internal view lookup. * @param {View} view The view to add. * @returns {Collection} * @private */ Collection.prototype._addView = CollectionGroup.prototype._addView = function (view) { if (view !== undefined) { this._view.push(view); } return this; }; /** * Removes a view from the internal view lookup. * @param {View} view The view to remove. * @returns {Collection} * @private */ Collection.prototype._removeView = CollectionGroup.prototype._removeView = function (view) { if (view !== undefined) { var index = this._view.indexOf(view); if (index > -1) { this._view.splice(index, 1); } } return this; }; // Extend DB with views init Db.prototype.init = function () { this._view = {}; DbInit.apply(this, arguments); }; /** * Gets a view by it's name. * @param {String} name The name of the view to retrieve. * @returns {*} */ Db.prototype.view = function (name) { var self = this; // Handle being passed an instance if (name instanceof View) { return name; } if (this._view[name]) { return this._view[name]; } if (this.debug() || (this._db && this._db.debug())) { console.log(this.logIdentifier() + ' Creating view ' + name); } this._view[name] = new View(name).db(this); self.emit('create', self._view[name], 'view', name); return this._view[name]; }; /** * Determine if a view with the passed name already exists. * @param {String} name The name of the view to check for. * @returns {boolean} */ Db.prototype.viewExists = function (name) { return Boolean(this._view[name]); }; /** * Returns an array of views the DB currently has. * @returns {Array} An array of objects containing details of each view * the database is currently managing. */ Db.prototype.views = function () { var arr = [], view, i; for (i in this._view) { if (this._view.hasOwnProperty(i)) { view = this._view[i]; arr.push({ name: i, count: view.count(), linked: view.isLinked !== undefined ? view.isLinked() : false }); } } return arr; }; Shared.finishModule('View'); module.exports = View; },{"./ActiveBucket":3,"./Collection":6,"./CollectionGroup":7,"./Overload":28,"./ReactorIO":30,"./Shared":32}]},{},[1]);
src/containers/NotFound/NotFound.js
quicksnap/react-redux-universal-hot-example
import React from 'react'; export default function NotFound() { return ( <div className="container"> <h1>Doh! 404!</h1> <p>These are <em>not</em> the droids you are looking for!</p> </div> ); }
blueprints/view/files/__root__/views/__name__View/__name__View.js
huangc28/palestine
import React from 'react' type Props = { }; export class <%= pascalEntityName %> extends React.Component { props: Props; render () { return ( <div></div> ) } } export default <%= pascalEntityName %>
src/Elevation/Elevation.js
kradio3/react-mdc-web
import PropTypes from 'prop-types'; import React from 'react'; import classnames from 'classnames'; import isDefined from '../utils/isDefined'; const propTypes = { className: PropTypes.string, children: PropTypes.node, transition: PropTypes.bool, z: PropTypes.number, }; const Elevation = ({ className, children, z, transition, ...otherProps }) => ( <div className={classnames({ [`mdc-elevation--z${z}`]: isDefined(z), 'mdc-elevation-transition': transition, }, className)} {...otherProps} > {children} </div> ); Elevation.propTypes = propTypes; export default Elevation;
ajax/libs/zxcvbn/1.0.4/zxcvbn.min.js
nolsherry/cdnjs
(function(){var aC,aM,aK,aB,ah,ag,af,ae,ad,ac,ab,t,ap,aL,ao,r,o,m,l,k,i;ab=function(n){var p,q;q=[];for(p in n){q.push(p)}return 0===q.length};ap=function(n,p){return n.push.apply(n,p)};k=function(n,p){var w,u,s,v,q;v=n.split("");q=[];u=0;for(s=v.length;u<s;u++){w=v[u],q.push(p[w]||w)}return q.join("")};r=function(n,p){var v,s,q,u;u=[];v=0;for(s=p.length;v<s;v++){q=p[v],ap(u,q(n))}return u.sort(function(x,w){return x.i-w.i||x.j-w.j})};ad=function(B,C){var A,y,x,z,w,v,s,u,q,p,n;p=[];z=B.length;v=B.toLowerCase();for(A=x=0;0<=z?x<z:x>z;A=0<=z?++x:--x){y=w=u=A;for(q=z;u<=q?w<q:w>q;y=u<=q?++w:--w){if(v.slice(A,+y+1||9000000000) in C){n=v.slice(A,+y+1||9000000000),s=C[n],p.push({pattern:"dictionary",i:A,j:y,token:B.slice(A,+y+1||9000000000),matched_word:n,rank:s})}}}return p};aK=function(n){var p,v,s,q,u;q={};p=1;v=0;for(s=n.length;v<s;v++){u=n[v],q[u]=p,p+=1}return q};aM=function(n,p){return function(v){var s,q,u;u=ad(v,p);v=0;for(s=u.length;v<s;v++){q=u[v],q.dictionary_name=n}return u}};ao={a:["4","@"],b:["8"],c:["(","{","[","<"],e:["3"],g:["6","9"],i:["1","!","|"],l:["1","|","7"],o:["0"],s:["$","5"],t:["+","7"],x:["%"],z:["2"]};o=function(n){var p,x,v,u,w;u={};w=n.split("");p=0;for(x=w.length;p<x;p++){n=w[p],u[n]=!0}n={};for(v in ao){x=ao[v];var s=w=void 0,q=void 0,q=[],s=0;for(w=x.length;s<w;s++){p=x[s],p in u&&q.push(p)}p=q;0<p.length&&(n[v]=p)}return n};t=function(C){var D,B,z,y,A,x,w,u,v,s,q,p,n;A=function(){var E;E=[];for(y in C){E.push(y)}return E}();n=[[]];B=function(M){var L,K,J,I,H,E,G,F;K=[];E={};J=0;for(H=M.length;J<H;J++){G=M[J],L=function(){var O,N,P;P=[];F=N=0;for(O=G.length;N<O;F=++N){y=G[F],P.push([y,F])}return P}(),L.sort(),I=function(){var N,P,O;O=[];F=P=0;for(N=L.length;P<N;F=++P){y=L[F],O.push(y+","+F)}return O}().join("-"),I in E||(E[I]=!0,K.push(G))}return K};z=function(Q){var P,O,N,L,M,K,J,I,H,G,F,R,E;if(Q.length){O=Q[0];R=Q.slice(1);I=[];G=C[O];Q=0;for(M=G.length;Q<M;Q++){L=G[Q];J=0;for(K=n.length;J<K;J++){E=n[J];P=-1;N=H=0;for(F=E.length;0<=F?H<F:H>F;N=0<=F?++H:--H){if(E[N][0]===L){P=N;break}}-1===P?(P=E.concat([[L,O]]),I.push(P)):(N=E.slice(0),N.splice(P,1),N.push([L,O]),I.push(E),I.push(N))}}n=B(I);return z(R)}};z(A);p=[];A=0;for(w=n.length;A<w;A++){s=n[A];q={};v=0;for(u=s.length;v<u;v++){D=s[v],x=D[0],D=D[1],q[x]=D}p.push(q)}return p};l=function(F,G,E){var C,B,D,A,z,x,y,w,v,u,p,q,s;p=[];for(x=0;x<F.length-1;){y=x+1;v=null;for(q=s=0;;){C=F.charAt(y-1);z=!1;A=-1;B=G[C]||[];if(y<F.length){D=F.charAt(y);w=0;for(u=B.length;w<u;w++){if(C=B[w],A+=1,C&&-1!==C.indexOf(D)){z=!0;1===C.indexOf(D)&&(q+=1);v!==A&&(s+=1,v=A);break}}}if(z){y+=1}else{2<y-x&&p.push({pattern:"spatial",i:x,j:y-1,token:F.slice(x,y),graph:E,turns:s,shifted_count:q});x=y;break}}}return p};aC={lower:"abcdefghijklmnopqrstuvwxyz",upper:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",digits:"01234567890"};m=function(n,p){var s,q;q=[];for(s=1;1<=p?s<=p:s>=p;1<=p?++s:--s){q.push(n)}return q.join("")};aL=function(n,p){var s,q;for(q=[];;){s=n.match(p);if(!s){break}s.i=s.index;s.j=s.index+s[0].length-1;q.push(s);n=n.replace(s[0],m(" ",s[0].length))}return q};ac=/\d{3,}/;i=/19\d\d|200\d|201\d/;ae=function(D){var E,C,A,z,B,y,x,v,w,u,s,q,n,p;z=[];n=aL(D,/\d{4,8}/);v=0;for(w=n.length;v<w;v++){y=n[v];x=[y.i,y.j];y=x[0];x=x[1];A=D.slice(y,+x+1||9000000000);E=A.length;C=[];6>=A.length&&(C.push({daymonth:A.slice(2),year:A.slice(0,2),i:y,j:x}),C.push({daymonth:A.slice(0,E-2),year:A.slice(E-2),i:y,j:x}));6<=A.length&&(C.push({daymonth:A.slice(4),year:A.slice(0,4),i:y,j:x}),C.push({daymonth:A.slice(0,E-4),year:A.slice(E-4),i:y,j:x}));A=[];s=0;for(u=C.length;s<u;s++){switch(E=C[s],E.daymonth.length){case 2:A.push({day:E.daymonth[0],month:E.daymonth[1],year:E.year,i:E.i,j:E.j});break;case 3:A.push({day:E.daymonth.slice(0,2),month:E.daymonth[2],year:E.year,i:E.i,j:E.j});A.push({day:E.daymonth[0],month:E.daymonth.slice(1,3),year:E.year,i:E.i,j:E.j});break;case 4:A.push({day:E.daymonth.slice(0,2),month:E.daymonth.slice(2,4),year:E.year,i:E.i,j:E.j})}}u=0;for(C=A.length;u<C;u++){E=A[u],B=parseInt(E.day),q=parseInt(E.month),p=parseInt(E.year),B=aB(B,q,p),s=B[0],p=B[1],B=p[0],q=p[1],p=p[2],s&&z.push({pattern:"date",i:E.i,j:E.j,token:D.slice(y,+x+1||9000000000),separator:"",day:B,month:q,year:p})}}return z};ag=/(\d{1,2})(\s|-|\/|\\|_|\.)(\d{1,2})\2(19\d{2}|200\d|201\d|\d{2})/;ah=/(19\d{2}|200\d|201\d|\d{2})(\s|-|\/|\\|_|\.)(\d{1,2})\2(\d{1,2})/;af=function(z){var A,y,w,v,x,u,s,p,q,n;u=[];p=aL(z,ag);w=0;for(v=p.length;w<v;w++){x=p[w],q=function(){var C,B,E,D;E=[1,3,4];D=[];B=0;for(C=E.length;B<C;B++){y=E[B],D.push(parseInt(x[y]))}return D}(),x.day=q[0],x.month=q[1],x.year=q[2],x.sep=x[2],u.push(x)}p=aL(z,ah);v=0;for(w=p.length;v<w;v++){x=p[v],q=function(){var C,B,E,D;E=[4,3,1];D=[];B=0;for(C=E.length;B<C;B++){y=E[B],D.push(parseInt(x[y]))}return D}(),x.day=q[0],x.month=q[1],x.year=q[2],x.sep=x[2],u.push(x)}p=[];v=0;for(w=u.length;v<w;v++){x=u[v],A=aB(x.day,x.month,x.year),q=A[0],n=A[1],A=n[0],s=n[1],n=n[2],q&&p.push({pattern:"date",i:x.i,j:x.j,token:z.slice(x.i,+x.j+1||9000000000),separator:x.sep,day:A,month:s,year:n})}return p};aB=function(n,p,q){12<=p&&31>=p&&12>=n&&(p=[p,n],n=p[0],p=p[1]);return 31<n||12<p||!(1900<=q&&2019>=q)?[!1,[]]:[!0,[n,p,q]]};var h,f,e,c,an,ax,aq,aO,ay,ar,a,az,at,b,aN,aA,aH,au,am,d,aE,av;aH=function(n,p){var u,s,q;if(p>n){return 0}if(0===p){return 1}for(u=s=q=1;1<=p?s<=p:s>=p;u=1<=p?++s:--s){q*=n,q/=u,n-=1}return q};aN=function(n){return Math.log(n)/Math.log(2)};aA=function(B,C){var A,y,x,z,w,v,s,u,q,p,n;y=an(B);n=[];A=[];z=v=0;for(p=B.length;0<=p?v<p:v>p;z=0<=p?++v:--v){n[z]=(n[z-1]||0)+aN(y);A[z]=null;u=0;for(s=C.length;u<s;u++){q=C[u],q.j===z&&(w=[q.i,q.j],x=w[0],w=w[1],x=(n[x-1]||0)+ax(q),x<n[w]&&(n[w]=x,A[w]=q))}}v=[];for(z=B.length-1;0<=z;){(q=A[z])?(v.push(q),z=q.i-1):z-=1}v.reverse();s=function(D,E){return{pattern:"bruteforce",i:D,j:E,token:B.slice(D,+E+1||9000000000),entropy:aN(Math.pow(y,E-D+1)),cardinality:y}};z=0;u=[];p=0;for(A=v.length;p<A;p++){q=v[p],w=[q.i,q.j],x=w[0],w=w[1],0<x-z&&u.push(s(z,x-1)),z=w+1,u.push(q)}z<B.length&&u.push(s(z,B.length-1));v=u;q=n[B.length-1]||0;z=az(q);return{password:B,entropy:am(q,3),match_sequence:v,crack_time:am(z,3),crack_time_display:a(z),score:aq(z)}};am=function(n,p){return Math.round(n*Math.pow(10,p))/Math.pow(10,p)};az=function(n){return 0.00005*Math.pow(2,n)};aq=function(n){return n<Math.pow(10,2)?0:n<Math.pow(10,4)?1:n<Math.pow(10,6)?2:n<Math.pow(10,8)?3:4};ax=function(n){var p;if(null!=n.entropy){return n.entropy}p=function(){switch(n.pattern){case"repeat":return au;case"sequence":return d;case"digits":return ar;case"year":return av;case"date":return aO;case"spatial":return aE;case"dictionary":return ay}}();return n.entropy=p(n)};au=function(n){var p;p=an(n.token);return aN(p*n.token.length)};d=function(n){var p;p=n.token.charAt(0);p="a"===p||"1"===p?1:p.match(/\d/)?aN(10):p.match(/[a-z]/)?aN(26):aN(26)+1;n.ascending||(p+=1);return p+aN(n.token.length)};ar=function(n){return aN(Math.pow(10,n.token.length))};av=function(){return aN(119)};aO=function(n){var p;p=100>n.year?aN(37200):aN(44268);n.separator&&(p+=2);return p};aE=function(z){var A,y,w,v,x,u,s,p,q,n;"qwerty"===(w=z.graph)||"dvorak"===w?(q=g,y=aG):(q=aw,y=j);s=0;A=z.token.length;n=z.turns;for(w=x=2;2<=A?x<=A:x>=A;w=2<=A?++x:--x){p=Math.min(n,w-1);for(v=u=1;1<=p?u<=p:u>=p;v=1<=p?++u:--u){s+=aH(w-1,v-1)*q*Math.pow(y,v)}}y=aN(s);if(z.shifted_count){A=z.shifted_count;z=z.token.length-z.shifted_count;w=v=s=0;for(x=Math.min(A,z);0<=x?v<=x:v>=x;w=0<=x?++v:--v){s+=aH(A+z,w)}y+=aN(s)}return y};ay=function(n){n.base_entropy=aN(n.rank);n.uppercase_entropy=b(n);n.l33t_entropy=at(n);return n.base_entropy+n.uppercase_entropy+n.l33t_entropy};c=/^[A-Z][^A-Z]+$/;e=/^[^A-Z]+[A-Z]$/;f=/^[^a-z]+$/;h=/^[^A-Z]+$/;b=function(n){var p,x,v,u,w,s,q;q=n.token;if(q.match(h)){return 0}v=[c,e,f];n=0;for(p=v.length;n<p;n++){if(u=v[n],q.match(u)){return 1}}p=function(){var z,y,B,A;B=q.split("");A=[];y=0;for(z=B.length;y<z;y++){x=B[y],x.match(/[A-Z]/)&&A.push(x)}return A}().length;n=function(){var z,y,B,A;B=q.split("");A=[];y=0;for(z=B.length;y<z;y++){x=B[y],x.match(/[a-z]/)&&A.push(x)}return A}().length;v=u=w=0;for(s=Math.min(p,n);0<=s?u<=s:u>=s;v=0<=s?++u:--u){w+=aH(p+n,v)}return aN(w)};at=function(z){var A,y,w,v,x,u,s,p,q,n;if(!z.l33t){return 0}u=0;s=z.sub;for(q in s){n=s[q];A=function(){var B,D,E,C;E=z.token.split("");C=[];B=0;for(D=E.length;B<D;B++){w=E[B],w===q&&C.push(w)}return C}().length;y=function(){var B,D,E,C;E=z.token.split("");C=[];B=0;for(D=E.length;B<D;B++){w=E[B],w===n&&C.push(w)}return C}().length;v=x=0;for(p=Math.min(y,A);0<=p?x<=p:x>=p;v=0<=p?++x:--x){u+=aH(y+A,v)}}return aN(u)||1};an=function(x){var y,w,u,s,v,q,p,n;v=[!1,!1,!1,!1,!1];s=v[0];n=v[1];w=v[2];p=v[3];v=v[4];q=x.split("");x=0;for(u=q.length;x<u;x++){y=q[x],y=y.charCodeAt(0),48<=y&&57>=y?w=!0:65<=y&&90>=y?n=!0:97<=y&&122>=y?s=!0:127>=y?p=!0:v=!0}x=0;w&&(x+=10);n&&(x+=26);s&&(x+=26);p&&(x+=33);v&&(x+=100);return x};a=function(n){return 60>n?"instant":3600>n?1+Math.ceil(n/60)+" minutes":86400>n?1+Math.ceil(n/3600)+" hours":2678400>n?1+Math.ceil(n/86400)+" days":32140800>n?1+Math.ceil(n/2678400)+" months":3214080000>n?1+Math.ceil(n/32140800)+" years":"centuries"};var al={"!":["`~",null,null,"2@","qQ",null],'"':[";:","[{","]}",null,null,"/?"],"#":["2@",null,null,"4$","eE","wW"],$:["3#",null,null,"5%","rR","eE"],"%":["4$",null,null,"6^","tT","rR"],"&":["6^",null,null,"8*","uU","yY"],"'":[";:","[{","]}",null,null,"/?"],"(":["8*",null,null,"0)","oO","iI"],")":["9(",null,null,"-_","pP","oO"],"*":["7&",null,null,"9(","iI","uU"],"+":["-_",null,null,null,"]}","[{"],",":["mM","kK","lL",".>",null,null],"-":["0)",null,null,"=+","[{","pP"],".":[",<","lL",";:","/?",null,null],"/":[".>",";:","'\"",null,null,null],"0":["9(",null,null,"-_","pP","oO"],1:["`~",null,null,"2@","qQ",null],2:["1!",null,null,"3#","wW","qQ"],3:["2@",null,null,"4$","eE","wW"],4:["3#",null,null,"5%","rR","eE"],5:["4$",null,null,"6^","tT","rR"],6:["5%",null,null,"7&","yY","tT"],7:["6^",null,null,"8*","uU","yY"],8:["7&",null,null,"9(","iI","uU"],9:["8*",null,null,"0)","oO","iI"],":":"lL,pP,[{,'\",/?,.>".split(","),";":"lL,pP,[{,'\",/?,.>".split(","),"<":["mM","kK","lL",".>",null,null],"=":["-_",null,null,null,"]}","[{"],">":[",<","lL",";:","/?",null,null],"?":[".>",";:","'\"",null,null,null],"@":["1!",null,null,"3#","wW","qQ"],A:[null,"qQ","wW","sS","zZ",null],B:["vV","gG","hH","nN",null,null],C:["xX","dD","fF","vV",null,null],D:"sS,eE,rR,fF,cC,xX".split(","),E:"wW,3#,4$,rR,dD,sS".split(","),F:"dD,rR,tT,gG,vV,cC".split(","),G:"fF,tT,yY,hH,bB,vV".split(","),H:"gG,yY,uU,jJ,nN,bB".split(","),I:"uU,8*,9(,oO,kK,jJ".split(","),J:"hH,uU,iI,kK,mM,nN".split(","),K:"jJ iI oO lL ,< mM".split(" "),L:"kK oO pP ;: .> ,<".split(" "),M:["nN","jJ","kK",",<",null,null],N:["bB","hH","jJ","mM",null,null],O:"iI,9(,0),pP,lL,kK".split(","),P:"oO,0),-_,[{,;:,lL".split(","),Q:[null,"1!","2@","wW","aA",null],R:"eE,4$,5%,tT,fF,dD".split(","),S:"aA,wW,eE,dD,xX,zZ".split(","),T:"rR,5%,6^,yY,gG,fF".split(","),U:"yY,7&,8*,iI,jJ,hH".split(","),V:["cC","fF","gG","bB",null,null],W:"qQ,2@,3#,eE,sS,aA".split(","),X:["zZ","sS","dD","cC",null,null],Y:"tT,6^,7&,uU,hH,gG".split(","),Z:[null,"aA","sS","xX",null,null],"[":"pP,-_,=+,]},'\",;:".split(","),"\\":["]}",null,null,null,null,null],"]":["[{","=+",null,"\\|",null,"'\""],"^":["5%",null,null,"7&","yY","tT"],_:["0)",null,null,"=+","[{","pP"],"`":[null,null,null,"1!",null,null],a:[null,"qQ","wW","sS","zZ",null],b:["vV","gG","hH","nN",null,null],c:["xX","dD","fF","vV",null,null],d:"sS,eE,rR,fF,cC,xX".split(","),e:"wW,3#,4$,rR,dD,sS".split(","),f:"dD,rR,tT,gG,vV,cC".split(","),g:"fF,tT,yY,hH,bB,vV".split(","),h:"gG,yY,uU,jJ,nN,bB".split(","),i:"uU,8*,9(,oO,kK,jJ".split(","),j:"hH,uU,iI,kK,mM,nN".split(","),k:"jJ iI oO lL ,< mM".split(" "),l:"kK oO pP ;: .> ,<".split(" "),m:["nN","jJ","kK",",<",null,null],n:["bB","hH","jJ","mM",null,null],o:"iI,9(,0),pP,lL,kK".split(","),p:"oO,0),-_,[{,;:,lL".split(","),q:[null,"1!","2@","wW","aA",null],r:"eE,4$,5%,tT,fF,dD".split(","),s:"aA,wW,eE,dD,xX,zZ".split(","),t:"rR,5%,6^,yY,gG,fF".split(","),u:"yY,7&,8*,iI,jJ,hH".split(","),v:["cC","fF","gG","bB",null,null],w:"qQ,2@,3#,eE,sS,aA".split(","),x:["zZ","sS","dD","cC",null,null],y:"tT,6^,7&,uU,hH,gG".split(","),z:[null,"aA","sS","xX",null,null],"{":"pP,-_,=+,]},'\",;:".split(","),"|":["]}",null,null,null,null,null],"}":["[{","=+",null,"\\|",null,"'\""],"~":[null,null,null,"1!",null,null]},ak={"*":["/",null,null,null,"-","+","9","8"],"+":["9","*","-",null,null,null,null,"6"],"-":["*",null,null,null,null,null,"+","9"],".":["0","2","3",null,null,null,null,null],"/":[null,null,null,null,"*","9","8","7"],"0":[null,"1","2","3",".",null,null,null],1:[null,null,"4","5","2","0",null,null],2:["1","4","5","6","3",".","0",null],3:["2","5","6",null,null,null,".","0"],4:[null,null,"7","8","5","2","1",null],5:"4,7,8,9,6,3,2,1".split(","),6:["5","8","9","+",null,null,"3","2"],7:[null,null,null,"/","8","5","4",null],8:["7",null,"/","*","9","6","5","4"],9:["8","/","*","-","+",null,"6","5"]},aF,aj,aG,g,j,aw,aJ,aI,aD,ai;aF=[aM("passwords",aK("password,123456,12345678,1234,qwerty,12345,dragon,pussy,baseball,football,letmein,monkey,696969,abc123,mustang,shadow,master,111111,2000,jordan,superman,harley,1234567,fuckme,hunter,fuckyou,trustno1,ranger,buster,tigger,soccer,fuck,batman,test,pass,killer,hockey,charlie,love,sunshine,asshole,6969,pepper,access,123456789,654321,maggie,starwars,silver,dallas,yankees,123123,666666,hello,orange,biteme,freedom,computer,sexy,thunder,ginger,hammer,summer,corvette,fucker,austin,1111,merlin,121212,golfer,cheese,princess,chelsea,diamond,yellow,bigdog,secret,asdfgh,sparky,cowboy,camaro,matrix,falcon,iloveyou,guitar,purple,scooter,phoenix,aaaaaa,tigers,porsche,mickey,maverick,cookie,nascar,peanut,131313,money,horny,samantha,panties,steelers,snoopy,boomer,whatever,iceman,smokey,gateway,dakota,cowboys,eagles,chicken,dick,black,zxcvbn,ferrari,knight,hardcore,compaq,coffee,booboo,bitch,bulldog,xxxxxx,welcome,player,ncc1701,wizard,scooby,junior,internet,bigdick,brandy,tennis,blowjob,banana,monster,spider,lakers,rabbit,enter,mercedes,fender,yamaha,diablo,boston,tiger,marine,chicago,rangers,gandalf,winter,bigtits,barney,raiders,porn,badboy,blowme,spanky,bigdaddy,chester,london,midnight,blue,fishing,000000,hannah,slayer,11111111,sexsex,redsox,thx1138,asdf,marlboro,panther,zxcvbnm,arsenal,qazwsx,mother,7777777,jasper,winner,golden,butthead,viking,iwantu,angels,prince,cameron,girls,madison,hooters,startrek,captain,maddog,jasmine,butter,booger,golf,rocket,theman,liverpoo,flower,forever,muffin,turtle,sophie,redskins,toyota,sierra,winston,giants,packers,newyork,casper,bubba,112233,lovers,mountain,united,driver,helpme,fucking,pookie,lucky,maxwell,8675309,bear,suckit,gators,5150,222222,shithead,fuckoff,jaguar,hotdog,tits,gemini,lover,xxxxxxxx,777777,canada,florida,88888888,rosebud,metallic,doctor,trouble,success,stupid,tomcat,warrior,peaches,apples,fish,qwertyui,magic,buddy,dolphins,rainbow,gunner,987654,freddy,alexis,braves,cock,2112,1212,cocacola,xavier,dolphin,testing,bond007,member,voodoo,7777,samson,apollo,fire,tester,beavis,voyager,porno,rush2112,beer,apple,scorpio,skippy,sydney,red123,power,beaver,star,jackass,flyers,boobs,232323,zzzzzz,scorpion,doggie,legend,ou812,yankee,blazer,runner,birdie,bitches,555555,topgun,asdfasdf,heaven,viper,animal,2222,bigboy,4444,private,godzilla,lifehack,phantom,rock,august,sammy,cool,platinum,jake,bronco,heka6w2,copper,cumshot,garfield,willow,cunt,slut,69696969,kitten,super,jordan23,eagle1,shelby,america,11111,free,123321,chevy,bullshit,broncos,horney,surfer,nissan,999999,saturn,airborne,elephant,shit,action,adidas,qwert,1313,explorer,police,christin,december,wolf,sweet,therock,online,dickhead,brooklyn,cricket,racing,penis,0000,teens,redwings,dreams,michigan,hentai,magnum,87654321,donkey,trinity,digital,333333,cartman,guinness,123abc,speedy,buffalo,kitty,pimpin,eagle,einstein,nirvana,vampire,xxxx,playboy,pumpkin,snowball,test123,sucker,mexico,beatles,fantasy,celtic,cherry,cassie,888888,sniper,genesis,hotrod,reddog,alexande,college,jester,passw0rd,bigcock,lasvegas,slipknot,3333,death,1q2w3e,eclipse,1q2w3e4r,drummer,montana,music,aaaa,carolina,colorado,creative,hello1,goober,friday,bollocks,scotty,abcdef,bubbles,hawaii,fluffy,horses,thumper,5555,pussies,darkness,asdfghjk,boobies,buddha,sandman,naughty,honda,azerty,6666,shorty,money1,beach,loveme,4321,simple,poohbear,444444,badass,destiny,vikings,lizard,assman,nintendo,123qwe,november,xxxxx,october,leather,bastard,101010,extreme,password1,pussy1,lacrosse,hotmail,spooky,amateur,alaska,badger,paradise,maryjane,poop,mozart,video,vagina,spitfire,cherokee,cougar,420420,horse,enigma,raider,brazil,blonde,55555,dude,drowssap,lovely,1qaz2wsx,booty,snickers,nipples,diesel,rocks,eminem,westside,suzuki,passion,hummer,ladies,alpha,suckme,147147,pirate,semperfi,jupiter,redrum,freeuser,wanker,stinky,ducati,paris,babygirl,windows,spirit,pantera,monday,patches,brutus,smooth,penguin,marley,forest,cream,212121,flash,maximus,nipple,vision,pokemon,champion,fireman,indian,softball,picard,system,cobra,enjoy,lucky1,boogie,marines,security,dirty,admin,wildcats,pimp,dancer,hardon,fucked,abcd1234,abcdefg,ironman,wolverin,freepass,bigred,squirt,justice,hobbes,pearljam,mercury,domino,9999,rascal,hitman,mistress,bbbbbb,peekaboo,naked,budlight,electric,sluts,stargate,saints,bondage,bigman,zombie,swimming,duke,qwerty1,babes,scotland,disney,rooster,mookie,swordfis,hunting,blink182,8888,samsung,bubba1,whore,general,passport,aaaaaaaa,erotic,liberty,arizona,abcd,newport,skipper,rolltide,balls,happy1,galore,christ,weasel,242424,wombat,digger,classic,bulldogs,poopoo,accord,popcorn,turkey,bunny,mouse,007007,titanic,liverpool,dreamer,everton,chevelle,psycho,nemesis,pontiac,connor,eatme,lickme,cumming,ireland,spiderma,patriots,goblue,devils,empire,asdfg,cardinal,shaggy,froggy,qwer,kawasaki,kodiak,phpbb,54321,chopper,hooker,whynot,lesbian,snake,teen,ncc1701d,qqqqqq,airplane,britney,avalon,sugar,sublime,wildcat,raven,scarface,elizabet,123654,trucks,wolfpack,pervert,redhead,american,bambam,woody,shaved,snowman,tiger1,chicks,raptor,1969,stingray,shooter,france,stars,madmax,sports,789456,simpsons,lights,chronic,hahaha,packard,hendrix,service,spring,srinivas,spike,252525,bigmac,suck,single,popeye,tattoo,texas,bullet,taurus,sailor,wolves,panthers,japan,strike,pussycat,chris1,loverboy,berlin,sticky,tarheels,russia,wolfgang,testtest,mature,catch22,juice,michael1,nigger,159753,alpha1,trooper,hawkeye,freaky,dodgers,pakistan,machine,pyramid,vegeta,katana,moose,tinker,coyote,infinity,pepsi,letmein1,bang,hercules,james1,tickle,outlaw,browns,billybob,pickle,test1,sucks,pavilion,changeme,caesar,prelude,darkside,bowling,wutang,sunset,alabama,danger,zeppelin,pppppp,2001,ping,darkstar,madonna,qwe123,bigone,casino,charlie1,mmmmmm,integra,wrangler,apache,tweety,qwerty12,bobafett,transam,2323,seattle,ssssss,openup,pandora,pussys,trucker,indigo,storm,malibu,weed,review,babydoll,doggy,dilbert,pegasus,joker,catfish,flipper,fuckit,detroit,cheyenne,bruins,smoke,marino,fetish,xfiles,stinger,pizza,babe,stealth,manutd,gundam,cessna,longhorn,presario,mnbvcxz,wicked,mustang1,victory,21122112,awesome,athena,q1w2e3r4,holiday,knicks,redneck,12341234,gizmo,scully,dragon1,devildog,triumph,bluebird,shotgun,peewee,angel1,metallica,madman,impala,lennon,omega,access14,enterpri,search,smitty,blizzard,unicorn,tight,asdf1234,trigger,truck,beauty,thailand,1234567890,cadillac,castle,bobcat,buddy1,sunny,stones,asian,butt,loveyou,hellfire,hotsex,indiana,panzer,lonewolf,trumpet,colors,blaster,12121212,fireball,precious,jungle,atlanta,gold,corona,polaris,timber,theone,baller,chipper,skyline,dragons,dogs,licker,engineer,kong,pencil,basketba,hornet,barbie,wetpussy,indians,redman,foobar,travel,morpheus,target,141414,hotstuff,photos,rocky1,fuck_inside,dollar,turbo,design,hottie,202020,blondes,4128,lestat,avatar,goforit,random,abgrtyu,jjjjjj,cancer,q1w2e3,smiley,express,virgin,zipper,wrinkle1,babylon,consumer,monkey1,serenity,samurai,99999999,bigboobs,skeeter,joejoe,master1,aaaaa,chocolat,christia,stephani,tang,1234qwer,98765432,sexual,maxima,77777777,buckeye,highland,seminole,reaper,bassman,nugget,lucifer,airforce,nasty,warlock,2121,dodge,chrissy,burger,snatch,pink,gang,maddie,huskers,piglet,photo,dodger,paladin,chubby,buckeyes,hamlet,abcdefgh,bigfoot,sunday,manson,goldfish,garden,deftones,icecream,blondie,spartan,charger,stormy,juventus,galaxy,escort,zxcvb,planet,blues,david1,ncc1701e,1966,51505150,cavalier,gambit,ripper,oicu812,nylons,aardvark,whiskey,bing,plastic,anal,babylon5,loser,racecar,insane,yankees1,mememe,hansolo,chiefs,fredfred,freak,frog,salmon,concrete,zxcv,shamrock,atlantis,wordpass,rommel,1010,predator,massive,cats,sammy1,mister,stud,marathon,rubber,ding,trunks,desire,montreal,justme,faster,irish,1999,jessica1,alpine,diamonds,00000,swinger,shan,stallion,pitbull,letmein2,ming,shadow1,clitoris,fuckers,jackoff,bluesky,sundance,renegade,hollywoo,151515,wolfman,soldier,ling,goddess,manager,sweety,titans,fang,ficken,niners,bubble,hello123,ibanez,sweetpea,stocking,323232,tornado,content,aragorn,trojan,christop,rockstar,geronimo,pascal,crimson,google,fatcat,lovelove,cunts,stimpy,finger,wheels,viper1,latin,greenday,987654321,creampie,hiphop,snapper,funtime,duck,trombone,adult,cookies,mulder,westham,latino,jeep,ravens,drizzt,madness,energy,kinky,314159,slick,rocker,55555555,mongoose,speed,dddddd,catdog,cheng,ghost,gogogo,tottenha,curious,butterfl,mission,january,shark,techno,lancer,lalala,chichi,orion,trixie,delta,bobbob,bomber,kang,1968,spunky,liquid,beagle,granny,network,kkkkkk,1973,biggie,beetle,teacher,toronto,anakin,genius,cocks,dang,karate,snakes,bangkok,fuckyou2,pacific,daytona,infantry,skywalke,sailing,raistlin,vanhalen,huang,blackie,tarzan,strider,sherlock,gong,dietcoke,ultimate,shai,sprite,ting,artist,chai,chao,devil,python,ninja,ytrewq,superfly,456789,tian,jing,jesus1,freedom1,drpepper,chou,hobbit,shen,nolimit,mylove,biscuit,yahoo,shasta,sex4me,smoker,pebbles,pics,philly,tong,tintin,lesbians,cactus,frank1,tttttt,chun,danni,emerald,showme,pirates,lian,dogg,xiao,xian,tazman,tanker,toshiba,gotcha,rang,keng,jazz,bigguy,yuan,tomtom,chaos,fossil,racerx,creamy,bobo,musicman,warcraft,blade,shuang,shun,lick,jian,microsoft,rong,feng,getsome,quality,1977,beng,wwwwww,yoyoyo,zhang,seng,harder,qazxsw,qian,cong,chuan,deng,nang,boeing,keeper,western,1963,subaru,sheng,thuglife,teng,jiong,miao,mang,maniac,pussie,a1b2c3,zhou,zhuang,xing,stonecol,spyder,liang,jiang,memphis,ceng,magic1,logitech,chuang,sesame,shao,poison,titty,kuan,kuai,mian,guan,hamster,guai,ferret,geng,duan,pang,maiden,quan,velvet,nong,neng,nookie,buttons,bian,bingo,biao,zhong,zeng,zhun,ying,zong,xuan,zang,0.0.000,suan,shei,shui,sharks,shang,shua,peng,pian,piao,liao,meng,miami,reng,guang,cang,ruan,diao,luan,qing,chui,chuo,cuan,nuan,ning,heng,huan,kansas,muscle,weng,1passwor,bluemoon,zhui,zhua,xiang,zheng,zhen,zhei,zhao,zhan,yomama,zhai,zhuo,zuan,tarheel,shou,shuo,tiao,leng,kuang,jiao,13579,basket,qiao,qiong,qiang,chuai,nian,niao,niang,huai,22222222,zhuan,zhuai,shuan,shuai,stardust,jumper,66666666,charlott,qwertz,bones,waterloo,2002,11223344,oldman,trains,vertigo,246810,black1,swallow,smiles,standard,alexandr,parrot,user,1976,surfing,pioneer,apple1,asdasd,auburn,hannibal,frontier,panama,welcome1,vette,blue22,shemale,111222,baggins,groovy,global,181818,1979,blades,spanking,byteme,lobster,dawg,japanese,1970,1964,2424,polo,coco,deedee,mikey,1972,171717,1701,strip,jersey,green1,capital,putter,vader,seven7,banshee,grendel,dicks,hidden,iloveu,1980,ledzep,147258,female,bugger,buffett,molson,2020,wookie,sprint,jericho,102030,ranger1,trebor,deepthroat,bonehead,molly1,mirage,models,1984,2468,showtime,squirrel,pentium,anime,gator,powder,twister,connect,neptune,engine,eatshit,mustangs,woody1,shogun,septembe,pooh,jimbo,russian,sabine,voyeur,2525,363636,camel,germany,giant,qqqq,nudist,bone,sleepy,tequila,fighter,obiwan,makaveli,vacation,walnut,1974,ladybug,cantona,ccbill,satan,rusty1,passwor1,columbia,kissme,motorola,william1,1967,zzzz,skater,smut,matthew1,valley,coolio,dagger,boner,bull,horndog,jason1,penguins,rescue,griffey,8j4ye3uz,californ,champs,qwertyuiop,portland,colt45,xxxxxxx,xanadu,tacoma,carpet,gggggg,safety,palace,italia,picturs,picasso,thongs,tempest,asd123,hairy,foxtrot,nimrod,hotboy,343434,1111111,asdfghjkl,goose,overlord,stranger,454545,shaolin,sooners,socrates,spiderman,peanuts,13131313,andrew1,filthy,ohyeah,africa,intrepid,pickles,assass,fright,potato,hhhhhh,kingdom,weezer,424242,pepsi1,throat,looker,puppy,butch,sweets,megadeth,analsex,nymets,ddddddd,bigballs,oakland,oooooo,qweasd,chucky,carrot,chargers,discover,dookie,condor,horny1,sunrise,sinner,jojo,megapass,martini,assfuck,ffffff,mushroom,jamaica,7654321,77777,cccccc,gizmodo,tractor,mypass,hongkong,1975,blue123,pissing,thomas1,redred,basketball,satan666,dublin,bollox,kingkong,1971,22222,272727,sexx,bbbb,grizzly,passat,defiant,bowler,knickers,monitor,wisdom,slappy,thor,letsgo,robert1,brownie,098765,playtime,lightnin,atomic,goku,llllll,qwaszx,cosmos,bosco,knights,beast,slapshot,assword,frosty,dumbass,mallard,dddd,159357,titleist,aussie,golfing,doobie,loveit,werewolf,vipers,1965,blabla,surf,sucking,tardis,thegame,legion,rebels,sarah1,onelove,loulou,toto,blackcat,0007,tacobell,soccer1,jedi,method,poopie,boob,breast,kittycat,belly,pikachu,thunder1,thankyou,celtics,frogger,scoobydo,sabbath,coltrane,budman,jackal,zzzzz,licking,gopher,geheim,lonestar,primus,pooper,newpass,brasil,heather1,husker,element,moomoo,beefcake,zzzzzzzz,shitty,smokin,jjjj,anthony1,anubis,backup,gorilla,fuckface,lowrider,punkrock,traffic,delta1,amazon,fatass,dodgeram,dingdong,qqqqqqqq,breasts,boots,honda1,spidey,poker,temp,johnjohn,147852,asshole1,dogdog,tricky,crusader,syracuse,spankme,speaker,meridian,amadeus,harley1,falcons,turkey50,kenwood,keyboard,ilovesex,1978,shazam,shalom,lickit,jimbob,roller,fatman,sandiego,magnus,cooldude,clover,mobile,plumber,texas1,tool,topper,mariners,rebel,caliente,celica,oxford,osiris,orgasm,punkin,porsche9,tuesday,breeze,bossman,kangaroo,latinas,astros,scruffy,qwertyu,hearts,jammer,java,1122,goodtime,chelsea1,freckles,flyboy,doodle,nebraska,bootie,kicker,webmaster,vulcan,191919,blueeyes,321321,farside,rugby,director,pussy69,power1,hershey,hermes,monopoly,birdman,blessed,blackjac,southern,peterpan,thumbs,fuckyou1,rrrrrr,a1b2c3d4,coke,bohica,elvis1,blacky,sentinel,snake1,richard1,1234abcd,guardian,candyman,fisting,scarlet,dildo,pancho,mandingo,lucky7,condom,munchkin,billyboy,summer1,sword,skiing,site,sony,thong,rootbeer,assassin,fffff,fitness,durango,postal,achilles,kisses,warriors,plymouth,topdog,asterix,hallo,cameltoe,fuckfuck,eeeeee,sithlord,theking,avenger,backdoor,chevrole,trance,cosworth,houses,homers,eternity,kingpin,verbatim,incubus,1961,blond,zaphod,shiloh,spurs,mighty,aliens,charly,dogman,omega1,printer,aggies,deadhead,bitch1,stone55,pineappl,thekid,rockets,camels,formula,oracle,pussey,porkchop,abcde,clancy,mystic,inferno,blackdog,steve1,alfa,grumpy,flames,puffy,proxy,valhalla,unreal,herbie,engage,yyyyyy,010101,pistol,celeb,gggg,portugal,a12345,newbie,mmmm,1qazxsw2,zorro,writer,stripper,sebastia,spread,links,metal,1221,565656,funfun,trojans,cyber,hurrican,moneys,1x2zkg8w,zeus,tomato,lion,atlantic,usa123,trans,aaaaaaa,homerun,hyperion,kevin1,blacks,44444444,skittles,fart,gangbang,fubar,sailboat,oilers,buster1,hithere,immortal,sticks,pilot,lexmark,jerkoff,maryland,cheers,possum,cutter,muppet,swordfish,sport,sonic,peter1,jethro,rockon,asdfghj,pass123,pornos,ncc1701a,bootys,buttman,bonjour,1960,bears,362436,spartans,tinman,threesom,maxmax,1414,bbbbb,camelot,chewie,gogo,fusion,saint,dilligaf,nopass,hustler,hunter1,whitey,beast1,yesyes,spank,smudge,pinkfloy,patriot,lespaul,hammers,formula1,sausage,scooter1,orioles,oscar1,colombia,cramps,exotic,iguana,suckers,slave,topcat,lancelot,magelan,racer,crunch,british,steph,456123,skinny,seeking,rockhard,filter,freaks,sakura,pacman,poontang,newlife,homer1,klingon,watcher,walleye,tasty,sinatra,starship,steel,starbuck,poncho,amber1,gonzo,catherin,candle,firefly,goblin,scotch,diver,usmc,huskies,kentucky,kitkat,beckham,bicycle,yourmom,studio,33333333,splash,jimmy1,12344321,sapphire,mailman,raiders1,ddddd,excalibu,illini,imperial,lansing,maxx,gothic,golfball,facial,front242,macdaddy,qwer1234,vectra,cowboys1,crazy1,dannyboy,aquarius,franky,ffff,sassy,pppp,pppppppp,prodigy,noodle,eatpussy,vortex,wanking,billy1,siemens,phillies,groups,chevy1,cccc,gggggggg,doughboy,dracula,nurses,loco,lollipop,utopia,chrono,cooler,nevada,wibble,summit,1225,capone,fugazi,panda,qazwsxed,puppies,triton,9876,nnnnnn,momoney,iforgot,wolfie,studly,hamburg,81fukkc,741852,catman,china,gagging,scott1,oregon,qweqwe,crazybab,daniel1,cutlass,holes,mothers,music1,walrus,1957,bigtime,xtreme,simba,ssss,rookie,bathing,rotten,maestro,turbo1,99999,butthole,hhhh,yoda,shania,phish,thecat,rightnow,baddog,greatone,gateway1,abstr,napster,brian1,bogart,hitler,wildfire,jackson1,1981,beaner,yoyo,0.0.0.000,super1,select,snuggles,slutty,phoenix1,technics,toon,raven1,rayray,123789,1066,albion,greens,gesperrt,brucelee,hehehe,kelly1,mojo,1998,bikini,woofwoof,yyyy,strap,sites,central,f**k,nyjets,punisher,username,vanilla,twisted,bunghole,viagra,veritas,pony,titts,labtec,jenny1,masterbate,mayhem,redbull,govols,gremlin,505050,gmoney,rovers,diamond1,trident,abnormal,deskjet,cuddles,bristol,milano,vh5150,jarhead,1982,bigbird,bizkit,sixers,slider,star69,starfish,penetration,tommy1,john316,caligula,flicks,films,railroad,cosmo,cthulhu,br0d3r,bearbear,swedish,spawn,patrick1,reds,anarchy,groove,fuckher,oooo,airbus,cobra1,clips,delete,duster,kitty1,mouse1,monkeys,jazzman,1919,262626,swinging,stroke,stocks,sting,pippen,labrador,jordan1,justdoit,meatball,females,vector,cooter,defender,nike,bubbas,bonkers,kahuna,wildman,4121,sirius,static,piercing,terror,teenage,leelee,microsof,mechanic,robotech,rated,chaser,salsero,macross,quantum,tsunami,daddy1,cruise,newpass6,nudes,hellyeah,1959,zaq12wsx,striker,spice,spectrum,smegma,thumb,jjjjjjjj,mellow,cancun,cartoon,sabres,samiam,oranges,oklahoma,lust,denali,nude,noodles,brest,hooter,mmmmmmmm,warthog,blueblue,zappa,wolverine,sniffing,jjjjj,calico,freee,rover,pooter,closeup,bonsai,emily1,keystone,iiii,1955,yzerman,theboss,tolkien,megaman,rasta,bbbbbbbb,hal9000,goofy,gringo,gofish,gizmo1,samsam,scuba,onlyme,tttttttt,corrado,clown,clapton,bulls,jayhawk,wwww,sharky,seeker,ssssssss,pillow,thesims,lighter,lkjhgf,melissa1,marcius2,guiness,gymnast,casey1,goalie,godsmack,lolo,rangers1,poppy,clemson,clipper,deeznuts,holly1,eeee,kingston,yosemite,sucked,sex123,sexy69,pic\\'s,tommyboy,masterbating,gretzky,happyday,frisco,orchid,orange1,manchest,aberdeen,ne1469,boxing,korn,intercourse,161616,1985,ziggy,supersta,stoney,amature,babyboy,bcfields,goliath,hack,hardrock,frodo,scout,scrappy,qazqaz,tracker,active,craving,commando,cohiba,cyclone,bubba69,katie1,mpegs,vsegda,irish1,sexy1,smelly,squerting,lions,jokers,jojojo,meathead,ashley1,groucho,cheetah,champ,firefox,gandalf1,packer,love69,tyler1,typhoon,tundra,bobby1,kenworth,village,volley,wolf359,0420,000007,swimmer,skydive,smokes,peugeot,pompey,legolas,redhot,rodman,redalert,grapes,4runner,carrera,floppy,ou8122,quattro,cloud9,davids,nofear,busty,homemade,mmmmm,whisper,vermont,webmaste,wives,insertion,jayjay,philips,topher,temptress,midget,ripken,havefun,canon,celebrity,ghetto,ragnarok,usnavy,conover,cruiser,dalshe,nicole1,buzzard,hottest,kingfish,misfit,milfnew,warlord,wassup,bigsexy,blackhaw,zippy,tights,kungfu,labia,meatloaf,area51,batman1,bananas,636363,ggggg,paradox,queens,adults,aikido,cigars,hoosier,eeyore,moose1,warez,interacial,streaming,313131,pertinant,pool6123,mayday,animated,banker,baddest,gordon24,ccccc,fantasies,aisan,deadman,homepage,ejaculation,whocares,iscool,jamesbon,1956,1pussy,womam,sweden,skidoo,spock,sssss,pepper1,pinhead,micron,allsop,amsterda,gunnar,666999,february,fletch,george1,sapper,sasha1,luckydog,lover1,magick,popopo,ultima,cypress,businessbabe,brandon1,vulva,vvvv,jabroni,bigbear,yummy,010203,searay,secret1,sinbad,sexxxx,soleil,software,piccolo,thirteen,leopard,legacy,memorex,redwing,rasputin,134679,anfield,greenbay,catcat,feather,scanner,pa55word,contortionist,danzig,daisy1,hores,exodus,iiiiii,1001,subway,snapple,sneakers,sonyfuck,picks,poodle,test1234,llll,junebug,marker,mellon,ronaldo,roadkill,amanda1,asdfjkl,beaches,great1,cheerleaers,doitnow,ozzy,boxster,brighton,housewifes,kkkk,mnbvcx,moocow,vides,1717,bigmoney,blonds,1000,storys,stereo,4545,420247,seductive,sexygirl,lesbean,justin1,124578,cabbage,canadian,gangbanged,dodge1,dimas,malaka,puss,probes,coolman,nacked,hotpussy,erotica,kool,implants,intruder,bigass,zenith,woohoo,womans,tango,pisces,laguna,maxell,andyod22,barcelon,chainsaw,chickens,flash1,orgasms,magicman,profit,pusyy,pothead,coconut,chuckie,clevelan,builder,budweise,hotshot,horizon,experienced,mondeo,wifes,1962,stumpy,smiths,slacker,pitchers,passwords,laptop,allmine,alliance,bbbbbbb,asscock,halflife,88888,chacha,saratoga,sandy1,doogie,qwert40,transexual,close-up,ib6ub9,volvo,jacob1,iiiii,beastie,sunnyday,stoned,sonics,starfire,snapon,pictuers,pepe,testing1,tiberius,lisalisa,lesbain,litle,retard,ripple,austin1,badgirl,golfgolf,flounder,royals,dragoon,dickie,passwor,majestic,poppop,trailers,nokia,bobobo,br549,minime,mikemike,whitesox,1954,3232,353535,seamus,solo,sluttey,pictere,titten,lback,1024,goodluck,fingerig,gallaries,goat,passme,oasis,lockerroom,logan1,rainman,treasure,custom,cyclops,nipper,bucket,homepage-,hhhhh,momsuck,indain,2345,beerbeer,bimmer,stunner,456456,tootsie,testerer,reefer,1012,harcore,gollum,545454,chico,caveman,fordf150,fishes,gaymen,saleen,doodoo,pa55w0rd,presto,qqqqq,cigar,bogey,helloo,dutch,kamikaze,wasser,vietnam,visa,japanees,0123,swords,slapper,peach,masterbaiting,redwood,1005,ametuer,chiks,fucing,sadie1,panasoni,mamas,rambo,unknown,absolut,dallas1,housewife,keywest,kipper,18436572,1515,zxczxc,303030,shaman,terrapin,masturbation,mick,redfish,1492,angus,goirish,hardcock,forfun,galary,freeporn,duchess,olivier,lotus,pornographic,ramses,purdue,traveler,crave,brando,enter1,killme,moneyman,welder,windsor,wifey,indon,yyyyy,taylor1,4417,picher,pickup,thumbnils,johnboy,jets,ameteur,amateurs,apollo13,hambone,goldwing,5050,sally1,doghouse,padres,pounding,quest,truelove,underdog,trader,climber,bolitas,hohoho,beanie,beretta,wrestlin,stroker,sexyman,jewels,johannes,mets,rhino,bdsm,balloons,grils,happy123,flamingo,route66,devo,outkast,paintbal,magpie,llllllll,twilight,critter,cupcake,nickel,bullseye,knickerless,videoes,binladen,xerxes,slim,slinky,pinky,thanatos,meister,menace,retired,albatros,balloon,goten,5551212,getsdown,donuts,nwo4life,tttt,comet,deer,dddddddd,deeznutz,nasty1,nonono,enterprise,eeeee,misfit99,milkman,vvvvvv,1818,blueboy,bigbutt,tech,toolman,juggalo,jetski,barefoot,50spanks,gobears,scandinavian,cubbies,nitram,kings,bilbo,yumyum,zzzzzzz,stylus,321654,shannon1,server,squash,starman,steeler,phrases,techniques,laser,135790,athens,cbr600,chemical,fester,gangsta,fucku2,droopy,objects,passwd,lllll,manchester,vedder,clit,chunky,darkman,buckshot,buddah,boobed,henti,winter1,bigmike,beta,zidane,talon,slave1,pissoff,thegreat,lexus,matador,readers,armani,goldstar,5656,fmale,fuking,fucku,ggggggg,sauron,diggler,pacers,looser,pounded,premier,triangle,cosmic,depeche,norway,helmet,mustard,misty1,jagger,3x7pxr,silver1,snowboar,penetrating,photoes,lesbens,lindros,roadking,rockford,1357,143143,asasas,goodboy,898989,chicago1,ferrari1,galeries,godfathe,gawker,gargoyle,gangster,rubble,rrrr,onetime,pussyman,pooppoop,trapper,cinder,newcastl,boricua,bunny1,boxer,hotred,hockey1,edward1,moscow,mortgage,bigtit,snoopdog,joshua1,july,1230,assholes,frisky,sanity,divine,dharma,lucky13,akira,butterfly,hotbox,hootie,howdy,earthlink,kiteboy,westwood,1988,blackbir,biggles,wrench,wrestle,slippery,pheonix,penny1,pianoman,thedude,jenn,jonjon,jones1,roadrunn,arrow,azzer,seahawks,diehard,dotcom,tunafish,chivas,cinnamon,clouds,deluxe,northern,boobie,momomo,modles,volume,23232323,bluedog,wwwwwww,zerocool,yousuck,pluto,limewire,joung,awnyce,gonavy,haha,films+pic+galeries,girsl,fuckthis,girfriend,uncencored,a123456,chrisbln,combat,cygnus,cupoi,netscape,hhhhhhhh,eagles1,elite,knockers,1958,tazmania,shonuf,pharmacy,thedog,midway,arsenal1,anaconda,australi,gromit,gotohell,787878,66666,carmex2,camber,gator1,ginger1,fuzzy,seadoo,lovesex,rancid,uuuuuu,911911,bulldog1,heater,monalisa,mmmmmmm,whiteout,virtual,jamie1,japanes,james007,2727,2469,blam,bitchass,zephyr,stiffy,sweet1,southpar,spectre,tigger1,tekken,lakota,lionking,jjjjjjj,megatron,1369,hawaiian,gymnastic,golfer1,gunners,7779311,515151,sanfran,optimus,panther1,love1,maggie1,pudding,aaron1,delphi,niceass,bounce,house1,killer1,momo,musashi,jammin,2003,234567,wp2003wp,submit,sssssss,spikes,sleeper,passwort,kume,meme,medusa,mantis,reebok,1017,artemis,harry1,cafc91,fettish,oceans,oooooooo,mango,ppppp,trainer,uuuu,909090,death1,bullfrog,hokies,holyshit,eeeeeee,jasmine1,&amp,&amp;,spinner,jockey,babyblue,gooner,474747,cheeks,pass1234,parola,okokok,poseidon,989898,crusher,cubswin,nnnn,kotaku,mittens,whatsup,vvvvv,iomega,insertions,bengals,biit,yellow1,012345,spike1,sowhat,pitures,pecker,theend,hayabusa,hawkeyes,florian,qaz123,usarmy,twinkle,chuckles,hounddog,hover,hothot,europa,kenshin,kojak,mikey1,water1,196969,wraith,zebra,wwwww,33333,simon1,spider1,snuffy,philippe,thunderb,teddy1,marino13,maria1,redline,renault,aloha,handyman,cerberus,gamecock,gobucks,freesex,duffman,ooooo,nuggets,magician,longbow,preacher,porno1,chrysler,contains,dalejr,navy,buffy1,hedgehog,hoosiers,honey1,hott,heyhey,dutchess,everest,wareagle,ihateyou,sunflowe,3434,senators,shag,spoon,sonoma,stalker,poochie,terminal,terefon,maradona,1007,142536,alibaba,america1,bartman,astro,goth,chicken1,cheater,ghost1,passpass,oral,r2d2c3po,civic,cicero,myxworld,kkkkk,missouri,wishbone,infiniti,1a2b3c,1qwerty,wonderboy,shojou,sparky1,smeghead,poiuy,titanium,lantern,jelly,1213,bayern,basset,gsxr750,cattle,fishing1,fullmoon,gilles,dima,obelix,popo,prissy,ramrod,bummer,hotone,dynasty,entry,konyor,missy1,282828,xyz123,426hemi,404040,seinfeld,pingpong,lazarus,marine1,12345a,beamer,babyface,greece,gustav,7007,ccccccc,faggot,foxy,gladiato,duckie,dogfood,packers1,longjohn,radical,tuna,clarinet,danny1,novell,bonbon,kashmir,kiki,mortimer,modelsne,moondog,vladimir,insert,1953,zxc123,supreme,3131,sexxx,softail,poipoi,pong,mars,martin1,rogue,avalanch,audia4,55bgates,cccccccc,came11,figaro,dogboy,dnsadm,dipshit,paradigm,othello,operator,tripod,chopin,coucou,cocksuck,borussia,heritage,hiziad,homerj,mullet,whisky,4242,speedo,starcraf,skylar,spaceman,piggy,tiger2,legos,jezebel,joker1,mazda,727272,chester1,rrrrrrrr,dundee,lumber,ppppppp,tranny,aaliyah,admiral,comics,delight,buttfuck,homeboy,eternal,kilroy,violin,wingman,walmart,bigblue,blaze,beemer,beowulf,bigfish,yyyyyyy,woodie,yeahbaby,0123456,tbone,syzygy,starter,linda1,merlot,mexican,11235813,banner,bangbang,badman,barfly,grease,charles1,ffffffff,doberman,dogshit,overkill,coolguy,claymore,demo,nomore,hhhhhhh,hondas,iamgod,enterme,electron,eastside,minimoni,mybaby,wildbill,wildcard,ipswich,200000,bearcat,zigzag,yyyyyyyy,sweetnes,369369,skyler,skywalker,pigeon,tipper,asdf123,alphabet,asdzxc,babybaby,banane,guyver,graphics,chinook,florida1,flexible,fuckinside,ursitesux,tototo,adam12,christma,chrome,buddie,bombers,hippie,misfits,292929,woofer,wwwwwwww,stubby,sheep,sparta,stang,spud,sporty,pinball,just4fun,maxxxx,rebecca1,fffffff,freeway,garion,rrrrr,sancho,outback,maggot,puddin,987456,hoops,mydick,19691969,bigcat,shiner,silverad,templar,lamer,juicy,mike1,maximum,1223,10101010,arrows,alucard,haggis,cheech,safari,dog123,orion1,paloma,qwerasdf,presiden,vegitto,969696,adonis,cookie1,newyork1,buddyboy,hellos,heineken,eraser,moritz,millwall,visual,jaybird,1983,beautifu,zodiac,steven1,sinister,slammer,smashing,slick1,sponge,teddybea,ticklish,jonny,1211,aptiva,applepie,bailey1,guitar1,canyon,gagged,fuckme1,digital1,dinosaur,98765,90210,clowns,cubs,deejay,nigga,naruto,boxcar,icehouse,hotties,electra,widget,1986,2004,bluefish,bingo1,*****,stratus,sultan,storm1,44444,4200,sentnece,sexyboy,sigma,smokie,spam,pippo,temppass,manman,1022,bacchus,aztnm,axio,bamboo,hakr,gregor,hahahaha,5678,camero1,dolphin1,paddle,magnet,qwert1,pyon,porsche1,tripper,noway,burrito,bozo,highheel,hookem,eddie1,entropy,kkkkkkkk,kkkkkkk,illinois,1945,1951,24680,21212121,100000,stonecold,taco,subzero,sexxxy,skolko,skyhawk,spurs1,sputnik,testpass,jiggaman,1224,hannah1,525252,4ever,carbon,scorpio1,rt6ytere,madison1,loki,coolness,coldbeer,citadel,monarch,morgan1,washingt,1997,bella1,yaya,superb,taxman,studman,3636,pizzas,tiffany1,lassie,larry1,joseph1,mephisto,reptile,razor,1013,hammer1,gypsy,grande,camper,chippy,cat123,chimera,fiesta,glock,domain,dieter,dragonba,onetwo,nygiants,password2,quartz,prowler,prophet,towers,ultra,cocker,corleone,dakota1,cumm,nnnnnnn,boxers,heynow,iceberg,kittykat,wasabi,vikings1,beerman,splinter,snoopy1,pipeline,mickey1,mermaid,micro,meowmeow,redbird,baura,chevys,caravan,frogman,diving,dogger,draven,drifter,oatmeal,paris1,longdong,quant4307s,rachel1,vegitta,cobras,corsair,dadada,mylife,bowwow,hotrats,eastwood,moonligh,modena,illusion,iiiiiii,jayhawks,swingers,shocker,shrimp,sexgod,squall,poiu,tigers1,toejam,tickler,julie1,jimbo1,jefferso,michael2,rodeo,robot,1023,annie1,bball,happy2,charter,flasher,falcon1,fiction,fastball,gadget,scrabble,diaper,dirtbike,oliver1,paco,macman,poopy,popper,postman,ttttttt,acura,cowboy1,conan,daewoo,nemrac58,nnnnn,nextel,bobdylan,eureka,kimmie,kcj9wx5n,killbill,musica,volkswag,wage,windmill,wert,vintage,iloveyou1,itsme,zippo,311311,starligh,smokey1,snappy,soulmate,plasma,krusty,just4me,marius,rebel1,1123,audi,fick,goaway,rusty2,dogbone,doofus,ooooooo,oblivion,mankind,mahler,lllllll,pumper,puck,pulsar,valkyrie,tupac,compass,concorde,cougars,delaware,niceguy,nocturne,bob123,boating,bronze,herewego,hewlett,houhou,earnhard,eeeeeeee,mingus,mobydick,venture,verizon,imation,1950,1948,1949,223344,bigbig,wowwow,sissy,spiker,snooker,sluggo,player1,jsbach,jumbo,medic,reddevil,reckless,123456a,1125,1031,astra,gumby,757575,585858,chillin,fuck1,radiohea,upyours,trek,coolcool,classics,choochoo,nikki1,nitro,boytoy,excite,kirsty,wingnut,wireless,icu812,1master,beatle,bigblock,wolfen,summer99,sugar1,tartar,sexysexy,senna,sexman,soprano,platypus,pixies,telephon,laura1,laurent,rimmer,1020,12qwaszx,hamish,halifax,fishhead,forum,dododo,doit,paramedi,lonesome,mandy1,uuuuu,uranus,ttttt,bruce1,helper,hopeful,eduard,dusty1,kathy1,moonbeam,muscles,monster1,monkeybo,windsurf,vvvvvvv,vivid,install,1947,187187,1941,1952,susan1,31415926,sinned,sexxy,smoothie,snowflak,playstat,playa,playboy1,toaster,jerry1,marie1,mason1,merlin1,roger1,roadster,112358,1121,andrea1,bacardi,hardware,789789,5555555,captain1,fergus,sascha,rrrrrrr,dome,onion,lololo,qqqqqqq,undertak,uuuuuuuu,uuuuuuu,cobain,cindy1,coors,descent,nimbus,nomad,nanook,norwich,bombay,broker,hookup,kiwi,winners,jackpot,1a2b3c4d,1776,beardog,bighead,bird33,0987,spooge,pelican,peepee,titan,thedoors,jeremy1,altima,baba,hardone,5454,catwoman,finance,farmboy,farscape,genesis1,salomon,loser1,r2d2,pumpkins,chriss,cumcum,ninjas,ninja1,killers,miller1,islander,jamesbond,intel,19841984,2626,bizzare,blue12,biker,yoyoma,sushi,shitface,spanker,steffi,sphinx,please1,paulie,pistons,tiburon,maxwell1,mdogg,rockies,armstron,alejandr,arctic,banger,audio,asimov,753951,4you,chilly,care1839,flyfish,fantasia,freefall,sandrine,oreo,ohshit,macbeth,madcat,loveya,qwerqwer,colnago,chocha,cobalt,crystal1,dabears,nevets,nineinch,broncos1,epsilon,kestrel,winston1,warrior1,iiiiiiii,iloveyou2,1616,woowoo,sloppy,specialk,tinkerbe,jellybea,reader,redsox1,1215,1112,arcadia,baggio,555666,cayman,cbr900rr,gabriell,glennwei,sausages,disco,pass1,lovebug,macmac,puffin,vanguard,trinitro,airwolf,aaa111,cocaine,cisco,datsun,bricks,bumper,eldorado,kidrock,wizard1,whiskers,wildwood,istheman,25802580,bigones,woodland,wolfpac,strawber,3030,sheba1,sixpack,peace1,physics,tigger2,toad,megan1,meow,ringo,amsterdam,717171,686868,5424,canuck,football1,footjob,fulham,seagull,orgy,lobo,mancity,vancouve,vauxhall,acidburn,derf,myspace1,boozer,buttercu,hola,minemine,munch,1dragon,biology,bestbuy,bigpoppa,blackout,blowfish,bmw325,bigbob,stream,talisman,tazz,sundevil,3333333,skate,shutup,shanghai,spencer1,slowhand,pinky1,tootie,thecrow,jubilee,jingle,matrix1,manowar,messiah,resident,redbaron,romans,andromed,athlon,beach1,badgers,guitars,harald,harddick,gotribe,6996,7grout,5wr2i7h8,635241,chase1,fallout,fiddle,fenris,francesc,fortuna,fairlane,felix1,gasman,fucks,sahara,sassy1,dogpound,dogbert,divx1,manila,pornporn,quasar,venom,987987,access1,clippers,daman,crusty,nathan1,nnnnnnnn,bruno1,budapest,kittens,kerouac,mother1,waldo1,whistler,whatwhat,wanderer,idontkno,1942,1946,bigdawg,bigpimp,zaqwsx,414141,3000gt,434343,serpent,smurf,pasword,thisisit,john1,robotics,redeye,rebelz,1011,alatam,asians,bama,banzai,harvest,575757,5329,fatty,fender1,flower2,funky,sambo,drummer1,dogcat,oedipus,osama,prozac,private1,rampage,concord,cinema,cornwall,cleaner,ciccio,clutch,corvet07,daemon,bruiser,boiler,hjkl,egghead,mordor,jamess,iverson3,bluesman,zouzou,090909,1002,stone1,4040,sexo,smith1,sperma,sneaky,polska,thewho,terminat,krypton,lekker,johnson1,johann,rockie,aspire,goodie,cheese1,fenway,fishon,fishin,fuckoff1,girls1,doomsday,pornking,ramones,rabbits,transit,aaaaa1,boyz,bookworm,bongo,bunnies,buceta,highbury,henry1,eastern,mischief,mopar,ministry,vienna,wildone,bigbooty,beavis1,xxxxxx1,yogibear,000001,0815,zulu,420000,sigmar,sprout,stalin,lkjhgfds,lagnaf,rolex,redfox,referee,123123123,1231,angus1,ballin,attila,greedy,grunt,747474,carpedie,caramel,foxylady,gatorade,futbol,frosch,saiyan,drums,donner,doggy1,drum,doudou,nutmeg,quebec,valdepen,tosser,tuscl,comein,cola,deadpool,bremen,hotass,hotmail1,eskimo,eggman,koko,kieran,katrin,kordell1,komodo,mone,munich,vvvvvvvv,jackson5,2222222,bergkamp,bigben,zanzibar,xxx123,sunny1,373737,slayer1,snoop,peachy,thecure,little1,jennaj,rasta69,1114,aries,havana,gratis,calgary,checkers,flanker,salope,dirty1,draco,dogface,luv2epus,rainbow6,qwerty123,umpire,turnip,vbnm,tucson,troll,codered,commande,neon,nico,nightwin,boomer1,bushido,hotmail0,enternow,keepout,karen1,mnbv,viewsoni,volcom,wizards,1995,berkeley,woodstoc,tarpon,shinobi,starstar,phat,toolbox,julien,johnny1,joebob,riders,reflex,120676,1235,angelus,anthrax,atlas,grandam,harlem,hawaii50,655321,cabron,challeng,callisto,firewall,firefire,flyer,flower1,gambler,frodo1,sam123,scania,dingo,papito,passmast,ou8123,randy1,twiggy,travis1,treetop,addict,admin1,963852,aceace,cirrus,bobdole,bonjovi,bootsy,boater,elway7,kenny1,moonshin,montag,wayne1,white1,jazzy,jakejake,1994,1991,2828,bluejays,belmont,sensei,southpark,peeper,pharao,pigpen,tomahawk,teensex,leedsutd,jeepster,jimjim,josephin,melons,matthias,robocop,1003,1027,antelope,azsxdc,gordo,hazard,granada,8989,7894,ceasar,cabernet,cheshire,chelle,candy1,fergie,fidelio,giorgio,fuckhead,dominion,qawsed,trucking,chloe1,daddyo,nostromo,boyboy,booster,bucky,honolulu,esquire,dynamite,mollydog,windows1,waffle,wealth,vincent1,jabber,jaguars,javelin,irishman,idefix,bigdog1,blue42,blanked,blue32,biteme1,bearcats,yessir,sylveste,sunfire,tbird,stryker,3ip76k2,sevens,pilgrim,tenchi,titman,leeds,lithium,linkin,marijuan,mariner,markie,midnite,reddwarf,1129,123asd,12312312,allstar,albany,asdf12,aspen,hardball,goldfing,7734,49ers,carnage,callum,carlos1,fitter,fandango,gofast,gamma,fucmy69,scrapper,dogwood,django,magneto,premium,9999999,abc1234,newyear,bookie,bounty,brown1,bologna,elway,killjoy,klondike,mouser,wayer,impreza,insomnia,24682468,2580,24242424,billbill,bellaco,blues1,blunts,teaser,sf49ers,shovel,solitude,spikey,pimpdadd,timeout,toffee,lefty,johndoe,johndeer,mega,manolo,ratman,robin1,1124,1210,1028,1226,babylove,barbados,gramma,646464,carpente,chaos1,fishbone,fireblad,frogs,screamer,scuba1,ducks,doggies,dicky,obsidian,rams,tottenham,aikman,comanche,corolla,cumslut,cyborg,boston1,houdini,helmut,elvisp,keksa12,monty1,wetter,watford,wiseguy,1989,1987,20202020,biatch,beezer,bigguns,blueball,bitchy,wyoming,yankees2,wrestler,stupid1,sealteam,sidekick,simple1,smackdow,sporting,spiral,smeller,plato,tophat,test2,toomuch,jello,junkie,maxim,maxime,meadow,remingto,roofer,124038,1018,1269,1227,123457,arkansas,aramis,beaker,barcelona,baltimor,googoo,goochi,852456,4711,catcher,champ1,fortress,fishfish,firefigh,geezer,rsalinas,samuel1,saigon,scooby1,dick1,doom,dontknow,magpies,manfred,vader1,universa,tulips,mygirl,bowtie,holycow,honeys,enforcer,waterboy,1992,23skidoo,bimbo,blue11,birddog,zildjian,030303,stinker,stoppedby,sexybabe,speakers,slugger,spotty,smoke1,polopolo,perfect1,torpedo,lakeside,jimmys,junior1,masamune,1214,april1,grinch,767676,5252,cherries,chipmunk,cezer121,carnival,capecod,finder,fearless,goats,funstuff,gideon,savior,seabee,sandro,schalke,salasana,disney1,duckman,pancake,pantera1,malice,love123,qwert123,tracer,creation,cwoui,nascar24,hookers,erection,ericsson,edthom,kokoko,kokomo,mooses,inter,1michael,1993,19781978,25252525,shibby,shamus,skibum,sheepdog,sex69,spliff,slipper,spoons,spanner,snowbird,toriamos,temp123,tennesse,lakers1,jomama,mazdarx7,recon,revolver,1025,1101,barney1,babycake,gotham,gravity,hallowee,616161,515000,caca,cannabis,chilli,fdsa,getout,fuck69,gators1,sable,rumble,dolemite,dork,duffer,dodgers1,onions,logger,lookout,magic32,poon,twat,coventry,citroen,civicsi,cocksucker,coochie,compaq1,nancy1,buzzer,boulder,butkus,bungle,hogtied,hotgirls,heidi1,eggplant,mustang6,monkey12,wapapapa,wendy1,volleyba,vibrate,blink,birthday4,xxxxx1,stephen1,suburban,sheeba,start1,soccer10,starcraft,soccer12,peanut1,plastics,penthous,peterbil,tetsuo,torino,tennis1,termite,lemmein,lakewood,jughead,melrose,megane,redone,angela1,goodgirl,gonzo1,golden1,gotyoass,656565,626262,capricor,chains,calvin1,getmoney,gabber,runaway,salami,dungeon,dudedude,opus,paragon,panhead,pasadena,opendoor,odyssey,magellan,printing,prince1,trustme,nono,buffet,hound,kajak,killkill,moto,winner1,vixen,whiteboy,versace,voyager1,indy,jackjack,bigal,beech,biggun,blake1,blue99,big1,synergy,success1,336699,sixty9,shark1,simba1,sebring,spongebo,spunk,springs,sliver,phialpha,password9,pizza1,pookey,tickling,lexingky,lawman,joe123,mike123,romeo1,redheads,apple123,backbone,aviation,green123,carlitos,byebye,cartman1,camden,chewy,camaross,favorite6,forumwp,ginscoot,fruity,sabrina1,devil666,doughnut,pantie,oldone,paintball,lumina,rainbow1,prosper,umbrella,ajax,951753,achtung,abc12345,compact,corndog,deerhunt,darklord,dank,nimitz,brandy1,hetfield,holein1,hillbill,hugetits,evolutio,kenobi,whiplash,wg8e3wjf,istanbul,invis,1996,bigjohn,bluebell,beater,benji,bluejay,xyzzy,suckdick,taichi,stellar,shaker,semper,splurge,squeak,pearls,playball,pooky,titfuck,joemama,johnny5,marcello,maxi,rhubarb,ratboy,reload,1029,1030,1220,bbking,baritone,gryphon,57chevy,494949,celeron,fishy,gladiator,fucker1,roswell,dougie,dicker,diva,donjuan,nympho,racers,truck1,trample,acer,cricket1,climax,denmark,cuervo,notnow,nittany,neutron,bosco1,buffa,breaker,hello2,hydro,kisskiss,kittys,montecar,modem,mississi,20012001,bigdick1,benfica,yahoo1,striper,tabasco,supra,383838,456654,seneca,shuttle,penguin1,pathfind,testibil,thethe,jeter2,marma,mark1,metoo,republic,rollin,redleg,redbone,redskin,1245,anthony7,altoids,barley,asswipe,bauhaus,bbbbbb1,gohome,harrier,golfpro,goldeney,818181,6666666,5000,5rxypn,cameron1,checker,calibra,freefree,faith1,fdm7ed,giraffe,giggles,fringe,scamper,rrpass1,screwyou,dimples,pacino,ontario,passthie,oberon,quest1,postov1000,puppydog,puffer,qwerty7,tribal,adam25,a1234567,collie,cleopatr,davide,namaste,buffalo1,bonovox,bukkake,burner,bordeaux,burly,hun999,enters,mohawk,vgirl,jayden,1812,1943,222333,bigjim,bigd,zoom,wordup,ziggy1,yahooo,workout,young1,xmas,zzzzzz1,surfer1,strife,sunlight,tasha1,skunk,sprinter,peaches1,pinetree,plum,pimping,theforce,thedon,toocool,laddie,lkjh,jupiter1,matty,redrose,1200,102938,antares,austin31,goose1,737373,78945612,789987,6464,calimero,caster,casper1,cement,chevrolet,chessie,caddy,canucks,fellatio,f00tball,gateway2,gamecube,rugby1,scheisse,dshade,dixie1,offshore,lucas1,macaroni,manga,pringles,puff,trouble1,ussy,coolhand,colonial,colt,darthvad,cygnusx1,natalie1,newark,hiking,errors,elcamino,koolaid,knight1,murphy1,volcano,idunno,2005,2233,blueberr,biguns,yamahar1,zapper,zorro1,0911,3006,sixsix,shopper,sextoy,snowboard,speedway,pokey,playboy2,titi,toonarmy,lambda,joecool,juniper,max123,mariposa,met2002,reggae,ricky1,1236,1228,1016,all4one,baberuth,asgard,484848,5683,6669,catnip,charisma,capslock,cashmone,galant,frenchy,gizmodo1,girlies,screwy,doubled,divers,dte4uw,dragonfl,treble,twinkie,tropical,crescent,cococo,dabomb,daffy,dandfa,cyrano,nathanie,boners,helium,hellas,espresso,killa,kikimora,w4g8at,ilikeit,iforget,1944,20002000,birthday1,beatles1,blue1,bigdicks,beethove,blacklab,blazers,benny1,woodwork,0069,0101,taffy,4567,shodan,pavlov,pinnacle,petunia,tito,teenie,lemonade,lalakers,lebowski,lalalala,ladyboy,jeeper,joyjoy,mercury1,mantle,mannn,rocknrol,riversid,123aaa,11112222,121314,1021,1004,1120,allen1,ambers,amstel,alice1,alleycat,allegro,ambrosia,gspot,goodsex,hattrick,harpoon,878787,8inches,4wwvte,cassandr,charlie123,gatsby,generic,gareth,fuckme2,samm,seadog,satchmo,scxakv,santafe,dipper,outoutout,madmad,london1,qbg26i,pussy123,tzpvaw,vamp,comp,cowgirl,coldplay,dawgs,nt5d27,novifarm,notredam,newness,mykids,bryan1,bouncer,hihihi,honeybee,iceman1,hotlips,dynamo,kappa,kahlua,muffy,mizzou,wannabe,wednesda,whatup,waterfal,willy1,bear1,billabon,youknow,yyyyyy1,zachary1,01234567,070462,zurich,superstar,stiletto,strat,427900,sigmachi,shells,sexy123,smile1,sophie1,stayout,somerset,playmate,pinkfloyd,phish1,payday,thebear,telefon,laetitia,kswbdu,jerky,metro,revoluti,1216,1201,1204,1222,1115,archange,barry1,handball,676767,chewbacc,furball,gocubs,fullback,gman,dewalt,dominiqu,diver1,dhip6a,olemiss,mandrake,mangos,pretzel,pusssy,tripleh,vagabond,clovis,dandan,csfbr5yy,deadspin,ninguna,ncc74656,bootsie,bp2002,bourbon,bumble,heyyou,houston1,hemlock,hippo,hornets,horseman,excess,extensa,muffin1,virginie,werdna,idontknow,jack1,1bitch,151nxjmt,bendover,bmwbmw,zaq123,wxcvbn,supernov,tahoe,shakur,sexyone,seviyi,smart1,speed1,pepito,phantom1,playoffs,terry1,terrier,laser1,lite,lancia,johngalt,jenjen,midori,maserati,matteo,miami1,riffraff,ronald1,1218,1026,123987,1015,1103,armada,architec,austria,gotmilk,cambridg,camero,flex,foreplay,getoff,glacier,glotest,froggie,gerbil,rugger,sanity72,donna1,orchard,oyster,palmtree,pajero,m5wkqf,magenta,luckyone,treefrog,vantage,usmarine,tyvugq,uptown,abacab,aaaaaa1,chuck1,darkange,cyclones,navajo,bubba123,iawgk2,hrfzlz,dylan1,enrico,encore,eclipse1,mutant,mizuno,mustang2,video1,viewer,weed420,whales,jaguar1,1990,159159,1love,bears1,bigtruck,bigboss,blitz,xqgann,yeahyeah,zeke,zardoz,stickman,3825,sentra,shiva,skipper1,singapor,southpaw,sonora,squid,slamdunk,slimjim,placid,photon,placebo,pearl1,test12,therock1,tiger123,leinad,legman,jeepers,joeblow,mike23,redcar,rhinos,rjw7x4,1102,13576479,112211,gwju3g,greywolf,7bgiqk,7878,535353,4snz9g,candyass,cccccc1,catfight,cali,fister,fosters,finland,frankie1,gizzmo,royalty,rugrat,dodo,oemdlg,out3xf,paddy,opennow,puppy1,qazwsxedc,ramjet,abraxas,cn42qj,dancer1,death666,nudity,nimda2k,buick,bobb,braves1,henrik,hooligan,everlast,karachi,mortis,monies,motocros,wally1,willie1,inspiron,1test,2929,bigblack,xytfu7,yackwin,zaq1xsw2,yy5rbfsc,100100,0660,tahiti,takehana,332211,3535,sedona,seawolf,skydiver,spleen,slash,spjfet,special1,slimshad,sopranos,spock1,penis1,patches1,thierry,thething,toohot,limpone,mash4077,matchbox,masterp,maxdog,ribbit,rockin,redhat,1113,14789632,1331,allday,aladin,andrey,amethyst,baseball1,athome,goofy1,greenman,goofball,ha8fyp,goodday,778899,charon,chappy,caracas,cardiff,capitals,canada1,cajun,catter,freddy1,favorite2,forme,forsaken,feelgood,gfxqx686,saskia,sanjose,salsa,dilbert1,dukeduke,downhill,longhair,locutus,lockdown,malachi,mamacita,lolipop,rainyday,pumpkin1,punker,prospect,rambo1,rainbows,quake,trinity1,trooper1,citation,coolcat,default,deniro,d9ungl,daddys,nautica,nermal,bukowski,bubbles1,bogota,buds,hulk,hitachi,ender,export,kikiki,kcchiefs,kram,morticia,montrose,mongo,waqw3p,wizzard,whdbtp,whkzyc,154ugeiu,1fuck,binky,bigred1,blubber,becky1,year2005,wonderfu,xrated,0001,tampabay,survey,tammy1,stuffer,3mpz4r,3000,3some,sierra1,shampoo,shyshy,slapnuts,standby,spartan1,sprocket,stanley1,poker1,theshit,lavalamp,light1,laserjet,jediknig,jjjjj1,mazda626,menthol,margaux,medic1,rhino1,1209,1234321,amigos,apricot,asdfgh1,hairball,hatter,grimace,7xm5rq,6789,cartoons,capcom,cashflow,carrots,fanatic,format,girlie,safeway,dogfart,dondon,outsider,odin,opiate,lollol,love12,mallrats,prague,primetime21,pugsley,r29hqq,valleywa,airman,abcdefg1,darkone,cummer,natedogg,nineball,ndeyl5,natchez,newone,normandy,nicetits,buddy123,buddys,homely,husky,iceland,hr3ytm,highlife,holla,earthlin,exeter,eatmenow,kimkim,k2trix,kernel,money123,moonman,miles1,mufasa,mousey,whites,warhamme,jackass1,2277,20spanks,blobby,blinky,bikers,blackjack,becca,blue23,xman,wyvern,085tzzqi,zxzxzx,zsmj2v,suede,t26gn4,sugars,tantra,swoosh,4226,4271,321123,383pdjvl,shane1,shelby1,spades,smother,sparhawk,pisser,photo1,pebble,peavey,pavement,thistle,kronos,lilbit,linux,melanie1,marbles,redlight,1208,1138,1008,alchemy,aolsucks,alexalex,atticus,auditt,b929ezzh,goodyear,gubber,863abgsg,7474,797979,464646,543210,4zqauf,4949,ch5nmk,carlito,chewey,carebear,checkmat,cheddar,chachi,forgetit,forlife,giants1,getit,gerhard,galileo,g3ujwg,ganja,rufus1,rushmore,discus,dudeman,olympus,oscars,osprey,madcow,locust,loyola,mammoth,proton,rabbit1,ptfe3xxp,pwxd5x,purple1,punkass,prophecy,uyxnyd,tyson1,aircraft,access99,abcabc,colts,civilwar,claudia1,contour,dddddd1,cypher,dapzu455,daisydog,noles,hoochie,hoser,eldiablo,kingrich,mudvayne,motown,mp8o6d,vipergts,italiano,2055,2211,bloke,blade1,yamato,zooropa,yqlgr667,050505,zxcvbnm1,zw6syj,suckcock,tango1,swampy,445566,333666,380zliki,sexpot,sexylady,sixtynin,sickboy,spiffy,skylark,sparkles,pintail,phreak,teller,timtim,thighs,latex,letsdoit,lkjhg,landmark,lizzard,marlins,marauder,metal1,manu,righton,1127,alain,alcat,amigo,basebal1,azertyui,azrael,hamper,gotenks,golfgti,hawkwind,h2slca,grace1,6chid8,789654,canine,casio,cazzo,cbr900,cabrio,calypso,capetown,feline,flathead,fisherma,flipmode,fungus,g9zns4,giggle,gabriel1,fuck123,saffron,dogmeat,dreamcas,dirtydog,douche,dresden,dickdick,destiny1,pappy,oaktree,luft4,puta,ramada,trumpet1,vcradq,tulip,tracy71,tycoon,aaaaaaa1,conquest,chitown,creepers,cornhole,danman,dada,density,d9ebk7,darth,nirvana1,nestle,brenda1,bonanza,hotspur,hufmqw,electro,erasure,elisabet,etvww4,ewyuza,eric1,kenken,kismet,klaatu,milamber,willi,isacs155,igor,1million,1letmein,x35v8l,yogi,ywvxpz,xngwoj,zippy1,020202,****,stonewal,sentry,sexsexsex,sonysony,smirnoff,star12,solace,star1,pkxe62,pilot1,pommes,paulpaul,tical,tictac,lighthou,lemans,kubrick,letmein22,letmesee,jys6wz,jonesy,jjjjjj1,jigga,redstorm,riley1,14141414,1126,allison1,badboy1,asthma,auggie,hardwood,gumbo,616913,57np39,56qhxs,4mnveh,fatluvr69,fqkw5m,fidelity,feathers,fresno,godiva,gecko,gibson1,gogators,general1,saxman,rowing,sammys,scotts,scout1,sasasa,samoht,dragon69,ducky,dragonball,driller,p3wqaw,papillon,oneone,openit,optimist,longshot,rapier,pussy2,ralphie,tuxedo,undertow,copenhag,delldell,culinary,deltas,mytime,noname,noles1,bucker,bopper,burnout,ibilltes,hihje863,hitter,ekim,espana,eatme69,elpaso,express1,eeeeee1,eatme1,karaoke,mustang5,wellingt,willem,waterski,webcam,jasons,infinite,iloveyou!,jakarta,belair,bigdad,beerme,yoshi,yinyang,x24ik3,063dyjuy,0000007,ztmfcq,stopit,stooges,symow8,strato,2hot4u,skins,shakes,sex1,snacks,softtail,slimed123,pizzaman,tigercat,tonton,lager,lizzy,juju,john123,jesse1,jingles,martian,mario1,rootedit,rochard,redwine,requiem,riverrat,1117,1014,1205,amor,amiga,alpina,atreides,banana1,bahamut,golfman,happines,7uftyx,5432,5353,5151,4747,foxfire,ffvdj474,foreskin,gayboy,gggggg1,gameover,glitter,funny1,scoobydoo,saxophon,dingbat,digimon,omicron,panda1,loloxx,macintos,lululu,lollypop,racer1,queen1,qwertzui,upnfmc,tyrant,trout1,9skw5g,aceman,acls2h,aaabbb,acapulco,aggie,comcast,cloudy,cq2kph,d6o8pm,cybersex,davecole,darian,crumbs,davedave,dasani,mzepab,myporn,narnia,booger1,bravo1,budgie,btnjey,highlander,hotel6,humbug,ewtosi,kristin1,kobe,knuckles,keith1,katarina,muff,muschi,montana1,wingchun,wiggle,whatthe,vette1,vols,virago,intj3a,ishmael,jachin,illmatic,199999,2010,blender,bigpenis,bengal,blue1234,zaqxsw,xray,xxxxxxx1,zebras,yanks,tadpole,stripes,3737,4343,3728,4444444,368ejhih,solar,sonne,sniffer,sonata,squirts,playstation,pktmxr,pescator,texaco,lesbos,l8v53x,jo9k2jw2,jimbeam,jimi,jupiter2,jurassic,marines1,rocket1,14725836,12345679,1219,123098,1233,alessand,althor,arch,alpha123,basher,barefeet,balboa,bbbbb1,badabing,gopack,golfnut,gsxr1000,gregory1,766rglqy,8520,753159,8dihc6,69camaro,666777,cheeba,chino,cheeky,camel1,fishcake,flubber,gianni,gnasher23,frisbee,fuzzy1,fuzzball,save13tx,russell1,sandra1,scrotum,scumbag,sabre,samdog,dripping,dragon12,dragster,orwell,mainland,maine,qn632o,poophead,rapper,porn4life,rapunzel,velocity,vanessa1,trueblue,vampire1,abacus,902100,crispy,chooch,d6wnro,dabulls,dehpye,navyseal,njqcw4,nownow,nigger1,nightowl,nonenone,nightmar,bustle,buddy2,boingo,bugman,bosshog,hybrid,hillside,hilltop,hotlegs,hzze929b,hhhhh1,hellohel,evilone,edgewise,e5pftu,eded,embalmer,excalibur,elefant,kenzie,killah,kleenex,mouses,mounta1n,motors,mutley,muffdive,vivitron,w00t88,iloveit,jarjar,incest,indycar,17171717,1664,17011701,222777,2663,beelch,benben,yitbos,yyyyy1,zzzzz1,stooge,tangerin,taztaz,stewart1,summer69,system1,surveyor,stirling,3qvqod,3way,456321,sizzle,simhrq,sparty,ssptx452,sphere,persian,ploppy,pn5jvw,poobear,pianos,plaster,testme,tiff,thriller,master12,rockey,1229,1217,1478,1009,anastasi,amonra,argentin,albino,azazel,grinder,6uldv8,83y6pv,8888888,4tlved,515051,carsten,flyers88,ffffff1,firehawk,firedog,flashman,ggggg1,godspeed,galway,giveitup,funtimes,gohan,giveme,geryfe,frenchie,sayang,rudeboy,sandals,dougal,drag0n,dga9la,desktop,onlyone,otter,pandas,mafia,luckys,lovelife,manders,qqh92r,qcmfd454,radar1,punani,ptbdhw,turtles,undertaker,trs8f7,ugejvp,abba,911turbo,acdc,abcd123,crash1,colony,delboy,davinci,notebook,nitrox,borabora,bonzai,brisbane,heeled,hooyah,hotgirl,i62gbq,horse1,hpk2qc,epvjb6,mnbvc,mommy1,munster,wiccan,2369,bettyboo,blondy,bismark,beanbag,bjhgfi,blackice,yvtte545,ynot,yess,zlzfrh,wolvie,007bond,******,tailgate,tanya1,sxhq65,stinky1,3234412,3ki42x,seville,shimmer,sienna,shitshit,skillet,sooners1,solaris,smartass,pedros,pennywis,pfloyd,tobydog,thetruth,letme1n,mario66,micky,rocky2,rewq,reindeer,1128,1207,1104,1432,aprilia,allstate,bagels,baggies,barrage,guru,72d5tn,606060,4wcqjn,chance1,flange,fartman,geil,gbhcf2,fussball,fuaqz4,gameboy,geneviev,rotary,seahawk,saab,samadams,devlt4,ditto,drevil,drinker,deuce,dipstick,octopus,ottawa,losangel,loverman,porky,q9umoz,rapture,pussy4me,triplex,ue8fpw,turbos,aaa340,churchil,crazyman,cutiepie,ddddd1,dejavu,cuxldv,nbvibt,nikon,niko,nascar1,bubba2,boobear,boogers,bullwink,bulldawg,horsemen,escalade,eagle2,dynamic,efyreg,minnesot,mogwai,msnxbi,mwq6qlzo,werder,verygood,voodoo1,iiiiii1,159951,1624,1911a1,2244,bellagio,bedlam,belkin,bill1,xirt2k,??????,susieq,sundown,sukebe,swifty,2fast4u,sexe,shroom,seaweed,skeeter1,snicker,spanky1,spook,phaedrus,pilots,peddler,thumper1,tiger7,tmjxn151,thematri,l2g7k3,letmeinn,jeffjeff,johnmish,mantra,mike69,mazda6,riptide,robots,1107,1130,142857,11001001,1134,armored,allnight,amatuers,bartok,astral,baboon,balls1,bassoon,hcleeb,happyman,granite,graywolf,golf1,gomets,8vjzus,7890,789123,8uiazp,5757,474jdvff,551scasi,50cent,camaro1,cherry1,chemist,firenze,fishtank,freewill,glendale,frogfrog,ganesh,scirocco,devilman,doodles,okinawa,olympic,orpheus,ohmygod,paisley,pallmall,lunchbox,manhatta,mahalo,mandarin,qwqwqw,qguvyt,pxx3eftp,rambler,poppy1,turk182,vdlxuc,tugboat,valiant,uwrl7c,chris123,cmfnpu,decimal,debbie1,dandy,daedalus,natasha1,nissan1,nancy123,nevermin,napalm,newcastle,bonghit,ibxnsm,hhhhhh1,holger,edmonton,equinox,dvader,kimmy,knulla,mustafa,monsoon,mistral,morgana,monica1,mojave,monterey,mrbill,vkaxcs,victor1,violator,vfdhif,wilson1,wavpzt,wildstar,winter99,iqzzt580,imback,1914,19741974,1monkey,1q2w3e4r5t,2500,2255,bigshow,bigbucks,blackcoc,zoomer,wtcacq,wobble,xmen,xjznq5,yesterda,yhwnqc,zzzxxx,393939,2fchbg,skinhead,skilled,shadow12,seaside,sinful,silicon,smk7366,snapshot,sniper1,soccer11,smutty,peepers,plokij,pdiddy,pimpdaddy,thrust,terran,topaz,today1,lionhear,littlema,lauren1,lincoln1,lgnu9d,juneau,methos,rogue1,romulus,redshift,1202,1469,12locked,arizona1,alfarome,al9agd,aol123,altec,apollo1,arse,baker1,bbb747,axeman,astro1,hawthorn,goodfell,hawks1,gstring,hannes,8543852,868686,4ng62t,554uzpad,5401,567890,5232,catfood,fire1,flipflop,fffff1,fozzie,fluff,fzappa,rustydog,scarab,satin,ruger,samsung1,destin,diablo2,dreamer1,detectiv,doqvq3,drywall,paladin1,papabear,offroad,panasonic,nyyankee,luetdi,qcfmtz,pyf8ah,puddles,pussyeat,ralph1,princeto,trivia,trewq,tri5a3,advent,9898,agyvorc,clarkie,coach1,courier,christo,chowder,cyzkhw,davidb,dad2ownu,daredevi,de7mdf,nazgul,booboo1,bonzo,butch1,huskers1,hgfdsa,hornyman,elektra,england1,elodie,kermit1,kaboom,morten,mocha,monday1,morgoth,weewee,weenie,vorlon,wahoo,ilovegod,insider,jayman,1911,1dallas,1900,1ranger,201jedlz,2501,1qaz,bignuts,bigbad,beebee,billows,belize,wvj5np,wu4etd,yamaha1,wrinkle5,zebra1,yankee1,zoomzoom,09876543,0311,?????,stjabn,tainted,3tmnej,skooter,skelter,starlite,spice1,stacey1,smithy,pollux,peternorth,pixie,piston,poets,toons,topspin,kugm7b,legends,jeepjeep,joystick,junkmail,jojojojo,jonboy,midland,mayfair,riches,reznor,rockrock,reboot,renee1,roadway,rasta220,1411,1478963,1019,archery,andyandy,barks,bagpuss,auckland,gooseman,hazmat,gucci,grammy,happydog,7kbe9d,7676,6bjvpe,5lyedn,5858,5291,charlie2,c7lrwu,candys,chateau,ccccc1,cardinals,fihdfv,fortune12,gocats,gaelic,fwsadn,godboy,gldmeo,fx3tuo,fubar1,generals,gforce,rxmtkp,rulz,sairam,dunhill,dogggg,ozlq6qwm,ov3ajy,lockout,makayla,macgyver,mallorca,prima,pvjegu,qhxbij,prelude1,totoro,tusymo,trousers,tulane,turtle1,tracy1,aerosmit,abbey1,clticic,cooper1,comets,delpiero,cyprus,dante1,dave1,nounours,nexus6,nogard,norfolk,brent1,booyah,bootleg,bulls23,bulls1,booper,heretic,icecube,hellno,hounds,honeydew,hooters1,hoes,hevnm4,hugohugo,epson,evangeli,eeeee1,eyphed".split(","))),aM("english",aK("you,i,to,the,a,and,that,it,of,me,what,is,in,this,know,i'm,for,no,have,my,don't,just,not,do,be,on,your,was,we,it's,with,so,but,all,well,are,he,oh,about,right,you're,get,here,out,going,like,yeah,if,her,she,can,up,want,think,that's,now,go,him,at,how,got,there,one,did,why,see,come,good,they,really,as,would,look,when,time,will,okay,back,can't,mean,tell,i'll,from,hey,were,he's,could,didn't,yes,his,been,or,something,who,because,some,had,then,say,ok,take,an,way,us,little,make,need,gonna,never,we're,too,she's,i've,sure,them,more,over,our,sorry,where,what's,let,thing,am,maybe,down,man,has,uh,very,by,there's,should,anything,said,much,any,life,even,off,doing,thank,give,only,thought,help,two,talk,people,god,still,wait,into,find,nothing,again,things,let's,doesn't,call,told,great,before,better,ever,night,than,away,first,believe,other,feel,everything,work,you've,fine,home,after,last,these,day,keep,does,put,around,stop,they're,i'd,guy,isn't,always,listen,wanted,mr,guys,huh,those,big,lot,happened,thanks,won't,trying,kind,wrong,through,talking,made,new,being,guess,hi,care,bad,mom,remember,getting,we'll,together,dad,leave,place,understand,wouldn't,actually,hear,baby,nice,father,else,stay,done,wasn't,their,course,might,mind,every,enough,try,hell,came,someone,you'll,own,family,whole,another,house,yourself,idea,ask,best,must,coming,old,looking,woman,which,years,room,left,knew,tonight,real,son,hope,name,same,went,um,hmm,happy,pretty,saw,girl,sir,show,friend,already,saying,next,three,job,problem,minute,found,world,thinking,haven't,heard,honey,matter,myself,couldn't,exactly,having,ah,probably,happen,we've,hurt,boy,both,while,dead,gotta,alone,since,excuse,start,kill,hard,you'd,today,car,ready,until,without,wants,hold,wanna,yet,seen,deal,took,once,gone,called,morning,supposed,friends,head,stuff,most,used,worry,second,part,live,truth,school,face,forget,true,business,each,cause,soon,knows,few,telling,wife,who's,use,chance,run,move,anyone,person,bye,somebody,dr,heart,such,miss,married,point,later,making,meet,anyway,many,phone,reason,damn,lost,looks,bring,case,turn,wish,tomorrow,kids,trust,check,change,end,late,anymore,five,least,town,aren't,ha,working,year,makes,taking,means,brother,play,hate,ago,says,beautiful,gave,fact,crazy,party,sit,open,afraid,between,important,rest,fun,kid,word,watch,glad,everyone,days,sister,minutes,everybody,bit,couple,whoa,either,mrs,feeling,daughter,wow,gets,asked,under,break,promise,door,set,close,hand,easy,question,tried,far,walk,needs,mine,though,times,different,killed,hospital,anybody,alright,wedding,shut,able,die,perfect,stand,comes,hit,story,ya,mm,waiting,dinner,against,funny,husband,almost,pay,answer,four,office,eyes,news,child,shouldn't,half,side,yours,moment,sleep,read,where's,started,men,sounds,sonny,pick,sometimes,em,bed,also,date,line,plan,hours,lose,hands,serious,behind,inside,high,ahead,week,wonderful,fight,past,cut,quite,number,he'll,sick,it'll,game,eat,nobody,goes,along,save,seems,finally,lives,worried,upset,carly,met,book,brought,seem,sort,safe,living,children,weren't,leaving,front,shot,loved,asking,running,clear,figure,hot,felt,six,parents,drink,absolutely,how's,daddy,alive,sense,meant,happens,special,bet,blood,ain't,kidding,lie,full,meeting,dear,seeing,sound,fault,water,ten,women,buy,months,hour,speak,lady,jen,thinks,christmas,body,order,outside,hang,possible,worse,company,mistake,ooh,handle,spend,totally,giving,control,here's,marriage,realize,president,unless,sex,send,needed,taken,died,scared,picture,talked,ass,hundred,changed,completely,explain,playing,certainly,sign,boys,relationship,loves,hair,lying,choice,anywhere,future,weird,luck,she'll,turned,known,touch,kiss,crane,questions,obviously,wonder,pain,calling,somewhere,throw,straight,cold,fast,words,food,none,drive,feelings,they'll,worked,marry,light,drop,cannot,sent,city,dream,protect,twenty,class,surprise,its,sweetheart,poor,looked,mad,except,gun,y'know,dance,takes,appreciate,especially,situation,besides,pull,himself,hasn't,act,worth,sheridan,amazing,top,given,expect,rather,involved,swear,piece,busy,law,decided,happening,movie,we'd,catch,country,less,perhaps,step,fall,watching,kept,darling,dog,win,air,honor,personal,moving,till,admit,problems,murder,he'd,evil,definitely,feels,information,honest,eye,broke,missed,longer,dollars,tired,evening,human,starting,red,entire,trip,club,niles,suppose,calm,imagine,fair,caught,blame,street,sitting,favor,apartment,court,terrible,clean,learn,works,frasier,relax,million,accident,wake,prove,smart,message,missing,forgot,interested,table,nbsp,become,mouth,pregnant,middle,ring,careful,shall,team,ride,figured,wear,shoot,stick,follow,angry,instead,write,stopped,early,ran,war,standing,forgive,jail,wearing,kinda,lunch,cristian,eight,greenlee,gotten,hoping,phoebe,thousand,ridge,paper,tough,tape,state,count,boyfriend,proud,agree,birthday,seven,they've,history,share,offer,hurry,feet,wondering,decision,building,ones,finish,voice,herself,would've,list,mess,deserve,evidence,cute,dress,interesting,hotel,quiet,concerned,road,staying,beat,sweetie,mention,clothes,finished,fell,neither,mmm,fix,respect,spent,prison,attention,holding,calls,near,surprised,bar,keeping,gift,hadn't,putting,dark,self,owe,using,ice,helping,normal,aunt,lawyer,apart,certain,plans,jax,girlfriend,floor,whether,everything's,present,earth,box,cover,judge,upstairs,sake,mommy,possibly,worst,station,acting,accept,blow,strange,saved,conversation,plane,mama,yesterday,lied,quick,lately,stuck,report,difference,rid,store,she'd,bag,bought,doubt,listening,walking,cops,deep,dangerous,buffy,sleeping,chloe,rafe,shh,record,lord,moved,join,card,crime,gentlemen,willing,window,return,walked,guilty,likes,fighting,difficult,soul,joke,favorite,uncle,promised,public,bother,island,seriously,cell,lead,knowing,broken,advice,somehow,paid,losing,push,helped,killing,usually,earlier,boss,beginning,liked,innocent,doc,rules,cop,learned,thirty,risk,letting,speaking,officer,ridiculous,support,afternoon,born,apologize,seat,nervous,across,song,charge,patient,boat,how'd,hide,detective,planning,nine,huge,breakfast,horrible,age,awful,pleasure,driving,hanging,picked,sell,quit,apparently,dying,notice,congratulations,chief,one's,month,visit,could've,c'mon,letter,decide,double,sad,press,forward,fool,showed,smell,seemed,spell,memory,pictures,slow,seconds,hungry,board,position,hearing,roz,kitchen,ma'am,force,fly,during,space,should've,realized,experience,kick,others,grab,mother's,discuss,third,cat,fifty,responsible,fat,reading,idiot,yep,suddenly,agent,destroy,bucks,track,shoes,scene,peace,arms,demon,low,livvie,consider,papers,medical,incredible,witch,drunk,attorney,tells,knock,ways,gives,department,nose,skye,turns,keeps,jealous,drug,sooner,cares,plenty,extra,tea,won,attack,ground,whose,outta,weekend,matters,wrote,type,father's,gosh,opportunity,impossible,books,waste,pretend,named,jump,eating,proof,complete,slept,career,arrest,breathe,perfectly,warm,pulled,twice,easier,goin,dating,suit,romantic,drugs,comfortable,finds,checked,fit,divorce,begin,ourselves,closer,ruin,although,smile,laugh,treat,god's,fear,what'd,guy's,otherwise,excited,mail,hiding,cost,stole,pacey,noticed,fired,excellent,lived,bringing,pop,bottom,note,sudden,bathroom,flight,honestly,sing,foot,games,remind,bank,charges,witness,finding,places,tree,dare,hardly,that'll,interest,steal,silly,contact,teach,shop,plus,colonel,fresh,trial,invited,roll,radio,reach,heh,choose,emergency,dropped,credit,obvious,cry,locked,loving,positive,nuts,agreed,prue,goodbye,condition,guard,fuckin,grow,cake,mood,dad's,total,crap,crying,belong,lay,partner,trick,pressure,ohh,arm,dressed,cup,lies,bus,taste,neck,south,something's,nurse,raise,lots,carry,group,whoever,drinking,they'd,breaking,file,lock,wine,closed,writing,spot,paying,study,assume,asleep,man's,turning,legal,viki,bedroom,shower,nikolas,camera,fill,reasons,forty,bigger,nope,breath,doctors,pants,level,movies,gee,area,folks,ugh,continue,focus,wild,truly,desk,convince,client,threw,band,hurts,spending,allow,grand,answers,shirt,chair,allowed,rough,doin,sees,government,ought,empty,round,hat,wind,shows,aware,dealing,pack,meaning,hurting,ship,subject,guest,mom's,pal,match,arrested,salem,confused,surgery,expecting,deacon,unfortunately,goddamn,lab,passed,bottle,beyond,whenever,pool,opinion,held,common,starts,jerk,secrets,falling,played,necessary,barely,dancing,health,tests,copy,cousin,planned,dry,ahem,twelve,simply,tess,skin,often,fifteen,speech,names,issue,orders,nah,final,results,code,believed,complicated,umm,research,nowhere,escape,biggest,restaurant,grateful,usual,burn,address,within,someplace,screw,everywhere,train,film,regret,goodness,mistakes,details,responsibility,suspect,corner,hero,dumb,terrific,further,gas,whoo,hole,memories,o'clock,following,ended,nobody's,teeth,ruined,split,airport,bite,stenbeck,older,liar,showing,project,cards,desperate,themselves,pathetic,damage,spoke,quickly,scare,marah,afford,vote,settle,mentioned,due,stayed,rule,checking,tie,hired,upon,heads,concern,blew,natural,alcazar,champagne,connection,tickets,happiness,form,saving,kissing,hated,personally,suggest,prepared,build,leg,onto,leaves,downstairs,ticket,it'd,taught,loose,holy,staff,sea,duty,convinced,throwing,defense,kissed,legs,according,loud,practice,saturday,babies,army,where'd,warning,miracle,carrying,flying,blind,ugly,shopping,hates,someone's,sight,bride,coat,account,states,clearly,celebrate,brilliant,wanting,add,forrester,lips,custody,center,screwed,buying,size,toast,thoughts,student,stories,however,professional,reality,birth,lexie,attitude,advantage,grandfather,sami,sold,opened,grandma,beg,changes,someday,grade,roof,brothers,signed,ahh,marrying,powerful,grown,grandmother,fake,opening,expected,eventually,must've,ideas,exciting,covered,familiar,bomb,bout,television,harmony,color,heavy,schedule,records,capable,practically,including,correct,clue,forgotten,immediately,appointment,social,nature,deserves,threat,bloody,lonely,ordered,shame,local,jacket,hook,destroyed,scary,investigation,above,invite,shooting,port,lesson,criminal,growing,caused,victim,professor,followed,funeral,nothing's,considering,burning,strength,loss,view,gia,sisters,everybody's,several,pushed,written,somebody's,shock,pushing,heat,chocolate,greatest,miserable,corinthos,nightmare,brings,zander,character,became,famous,enemy,crash,chances,sending,recognize,healthy,boring,feed,engaged,percent,headed,lines,treated,purpose,knife,rights,drag,san,fan,badly,hire,paint,pardon,built,behavior,closet,warn,gorgeous,milk,survive,forced,operation,offered,ends,dump,rent,remembered,lieutenant,trade,thanksgiving,rain,revenge,physical,available,program,prefer,baby's,spare,pray,disappeared,aside,statement,sometime,meat,fantastic,breathing,laughing,itself,tip,stood,market,affair,ours,depends,main,protecting,jury,national,brave,large,jack's,interview,fingers,murdered,explanation,process,picking,based,style,pieces,blah,assistant,stronger,aah,pie,handsome,unbelievable,anytime,nearly,shake,everyone's,oakdale,cars,wherever,serve,pulling,points,medicine,facts,waited,lousy,circumstances,stage,disappointed,weak,trusted,license,nothin,community,trash,understanding,slip,cab,sounded,awake,friendship,stomach,weapon,threatened,mystery,official,regular,river,vegas,understood,contract,race,basically,switch,frankly,issues,cheap,lifetime,deny,painting,ear,clock,weight,garbage,why'd,tear,ears,dig,selling,setting,indeed,changing,singing,tiny,particular,draw,decent,avoid,messed,filled,touched,score,people's,disappear,exact,pills,kicked,harm,recently,fortune,pretending,raised,insurance,fancy,drove,cared,belongs,nights,shape,lorelai,base,lift,stock,sonny's,fashion,timing,guarantee,chest,bridge,woke,source,patients,theory,original,burned,watched,heading,selfish,oil,drinks,failed,period,doll,committed,elevator,freeze,noise,exist,science,pair,edge,wasting,sat,ceremony,pig,uncomfortable,peg,guns,staring,files,bike,weather,name's,mostly,stress,permission,arrived,thrown,possibility,example,borrow,release,ate,notes,hoo,library,property,negative,fabulous,event,doors,screaming,xander,term,what're,meal,fellow,apology,anger,honeymoon,wet,bail,parking,non,protection,fixed,families,chinese,campaign,map,wash,stolen,sensitive,stealing,chose,lets,comfort,worrying,whom,pocket,mateo,bleeding,students,shoulder,ignore,fourth,neighborhood,fbi,talent,tied,garage,dies,demons,dumped,witches,training,rude,crack,model,bothering,radar,grew,remain,soft,meantime,gimme,connected,kinds,cast,sky,likely,fate,buried,hug,brother's,concentrate,prom,messages,east,unit,intend,crew,ashamed,somethin,manage,guilt,weapons,terms,interrupt,guts,tongue,distance,conference,treatment,shoe,basement,sentence,purse,glasses,cabin,universe,towards,repeat,mirror,wound,travers,tall,reaction,odd,engagement,therapy,letters,emotional,runs,magazine,jeez,decisions,soup,daughter's,thrilled,society,managed,stake,chef,moves,extremely,entirely,moments,expensive,counting,shots,kidnapped,square,son's,cleaning,shift,plate,impressed,smells,trapped,male,tour,aidan,knocked,charming,attractive,argue,puts,whip,language,embarrassed,settled,package,laid,animals,hitting,disease,bust,stairs,alarm,pure,nail,nerve,incredibly,walks,dirt,stamp,sister's,becoming,terribly,friendly,easily,damned,jobs,suffering,disgusting,stopping,deliver,riding,helps,federal,disaster,bars,dna,crossed,rate,create,trap,claim,california,talks,eggs,effect,chick,threatening,spoken,introduce,confession,embarrassing,bags,impression,gate,year's,reputation,attacked,among,knowledge,presents,inn,europe,chat,suffer,argument,talkin,crowd,homework,fought,coincidence,cancel,accepted,rip,pride,solve,hopefully,pounds,pine,mate,illegal,generous,streets,con,separate,outfit,maid,bath,punch,mayor,freaked,begging,recall,enjoying,bug,woman's,prepare,parts,wheel,signal,direction,defend,signs,painful,yourselves,rat,maris,amount,that'd,suspicious,flat,cooking,button,warned,sixty,pity,parties,crisis,coach,row,yelling,leads,awhile,pen,confidence,offering,falls,image,farm,pleased,panic,hers,gettin,role,refuse,determined,hell's,grandpa,progress,testify,passing,military,choices,uhh,gym,cruel,wings,bodies,mental,gentleman,coma,cutting,proteus,guests,girl's,expert,benefit,faces,cases,led,jumped,toilet,secretary,sneak,mix,firm,halloween,agreement,privacy,dates,anniversary,smoking,reminds,pot,created,twins,swing,successful,season,scream,considered,solid,options,commitment,senior,ill,else's,crush,ambulance,wallet,discovered,officially,til,rise,reached,eleven,option,laundry,former,assure,stays,skip,fail,accused,wide,challenge,popular,learning,discussion,clinic,plant,exchange,betrayed,bro,sticking,university,members,lower,bored,mansion,soda,sheriff,suite,handled,busted,senator,load,happier,younger,studying,romance,procedure,ocean,section,sec,commit,assignment,suicide,minds,swim,ending,bat,yell,llanview,league,chasing,seats,proper,command,believes,humor,hopes,fifth,winning,solution,leader,theresa's,sale,lawyers,nor,material,latest,highly,escaped,audience,parent,tricks,insist,dropping,cheer,medication,higher,flesh,district,routine,century,shared,sandwich,handed,false,beating,appear,warrant,family's,awfully,odds,article,treating,thin,suggesting,fever,sweat,silent,specific,clever,sweater,request,prize,mall,tries,mile,fully,estate,union,sharing,assuming,judgment,goodnight,divorced,despite,surely,steps,jet,confess,math,listened,comin,answered,vulnerable,bless,dreaming,rooms,chip,zero,potential,pissed,nate,kills,tears,knees,chill,carly's,brains,agency,harvard,degree,unusual,wife's,joint,packed,dreamed,cure,covering,newspaper,lookin,coast,grave,egg,direct,cheating,breaks,quarter,mixed,locker,husband's,gifts,awkward,toy,thursday,rare,policy,kid's,joking,competition,classes,assumed,reasonable,dozen,curse,quartermaine,millions,dessert,rolling,detail,alien,served,delicious,closing,vampires,released,ancient,wore,value,tail,secure,salad,murderer,hits,toward,spit,screen,offense,dust,conscience,bread,answering,admitted,lame,invitation,grief,smiling,path,stands,bowl,pregnancy,hollywood,prisoner,delivery,guards,virus,shrink,influence,freezing,concert,wreck,partners,massimo,chain,birds,life's,wire,technically,presence,blown,anxious,cave,version,holidays,cleared,wishes,survived,caring,candles,bound,related,charm,yup,pulse,jumping,jokes,frame,boom,vice,performance,occasion,silence,opera,nonsense,frightened,downtown,americans,slipped,dimera,blowing,world's,session,relationships,kidnapping,actual,spin,civil,roxy,packing,education,blaming,wrap,obsessed,fruit,torture,personality,location,effort,daddy's,commander,trees,there'll,owner,fairy,per,other's,necessarily,county,contest,seventy,print,motel,fallen,directly,underwear,grams,exhausted,believing,particularly,freaking,carefully,trace,touching,messing,committee,recovery,intention,consequences,belt,sacrifice,courage,officers,enjoyed,lack,attracted,appears,bay,yard,returned,remove,nut,carried,today's,testimony,intense,granted,violence,heal,defending,attempt,unfair,relieved,political,loyal,approach,slowly,plays,normally,buzz,alcohol,actor,surprises,psychiatrist,pre,plain,attic,who'd,uniform,terrified,sons,pet,cleaned,zach,threaten,teaching,mum,motion,fella,enemies,desert,collection,incident,failure,satisfied,imagination,hooked,headache,forgetting,counselor,andie,acted,opposite,highest,equipment,badge,italian,visiting,naturally,frozen,commissioner,sakes,labor,appropriate,trunk,armed,thousands,received,dunno,costume,temporary,sixteen,impressive,zone,kicking,junk,hon,grabbed,unlike,understands,describe,clients,owns,affect,witnesses,starving,instincts,happily,discussing,deserved,strangers,leading,intelligence,host,authority,surveillance,cow,commercial,admire,questioning,fund,dragged,barn,object,deeply,amp,wrapped,wasted,tense,route,reports,hoped,fellas,election,roommate,mortal,fascinating,chosen,stops,shown,arranged,abandoned,sides,delivered,becomes,arrangements,agenda,began,theater,series,literally,propose,honesty,underneath,forces,services,sauce,promises,lecture,eighty,torn,shocked,relief,explained,counter,circle,victims,transfer,response,channel,identity,differently,campus,spy,ninety,interests,guide,deck,biological,pheebs,ease,creep,will's,waitress,skills,telephone,ripped,raising,scratch,rings,prints,wave,thee,arguing,figures,ephram,asks,reception,pin,oops,diner,annoying,agents,taggert,goal,mass,ability,sergeant,julian's,international,gig,blast,basic,tradition,towel,earned,rub,president's,habit,customers,creature,bermuda,actions,snap,react,prime,paranoid,wha,handling,eaten,therapist,comment,charged,tax,sink,reporter,beats,priority,interrupting,gain,fed,warehouse,shy,pattern,loyalty,inspector,events,pleasant,media,excuses,threats,permanent,guessing,financial,demand,assault,tend,praying,motive,los,unconscious,trained,museum,tracks,range,nap,mysterious,unhappy,tone,switched,rappaport,award,sookie,neighbor,loaded,gut,childhood,causing,swore,piss,hundreds,balance,background,toss,mob,misery,valentine's,thief,squeeze,lobby,hah,goa'uld,geez,exercise,ego,drama,al's,forth,facing,booked,boo,songs,sandburg,eighteen,d'you,bury,perform,everyday,digging,creepy,compared,wondered,trail,liver,hmmm,drawn,device,magical,journey,fits,discussed,supply,moral,helpful,attached,timmy's,searching,flew,depressed,aisle,underground,pro,daughters,cris,amen,vows,proposal,pit,neighbors,darn,cents,arrange,annulment,uses,useless,squad,represent,product,joined,afterwards,adventure,resist,protected,net,fourteen,celebrating,piano,inch,flag,debt,violent,tag,sand,gum,dammit,teal'c,hip,celebration,below,reminded,claims,tonight's,replace,phones,paperwork,emotions,typical,stubborn,stable,sheridan's,pound,papa,lap,designed,current,bum,tension,tank,suffered,steady,provide,overnight,meanwhile,chips,beef,wins,suits,boxes,salt,cassadine,collect,boy's,tragedy,therefore,spoil,realm,profile,degrees,wipe,surgeon,stretch,stepped,nephew,neat,limo,confident,anti,perspective,designer,climb,title,suggested,punishment,finest,ethan's,springfield,occurred,hint,furniture,blanket,twist,surrounded,surface,proceed,lip,fries,worries,refused,niece,gloves,soap,signature,disappoint,crawl,convicted,zoo,result,pages,lit,flip,counsel,doubts,crimes,accusing,when's,shaking,remembering,phase,hallway,halfway,bothered,useful,makeup,madam,gather,concerns,cia,cameras,blackmail,symptoms,rope,ordinary,imagined,concept,cigarette,supportive,memorial,explosion,yay,woo,trauma,ouch,leo's,furious,cheat,avoiding,whew,thick,oooh,boarding,approve,urgent,shhh,misunderstanding,minister,drawer,sin,phony,joining,jam,interfere,governor,chapter,catching,bargain,tragic,schools,respond,punish,penthouse,hop,thou,remains,rach,ohhh,insult,doctor's,bugs,beside,begged,absolute,strictly,stefano,socks,senses,ups,sneaking,yah,serving,reward,polite,checks,tale,physically,instructions,fooled,blows,tabby,internal,bitter,adorable,y'all,tested,suggestion,string,jewelry,debate,com,alike,pitch,fax,distracted,shelter,lessons,foreign,average,twin,friend's,damnit,constable,circus,audition,tune,shoulders,mud,mask,helpless,feeding,explains,dated,robbery,objection,behave,valuable,shadows,courtroom,confusing,tub,talented,struck,smarter,mistaken,italy,customer,bizarre,scaring,punk,motherfucker,holds,focused,alert,activity,vecchio,reverend,highway,foolish,compliment,bastards,attend,scheme,aid,worker,wheelchair,protective,poetry,gentle,script,reverse,picnic,knee,intended,construction,cage,wednesday,voices,toes,stink,scares,pour,effects,cheated,tower,time's,slide,ruining,recent,jewish,filling,exit,cottage,corporate,upside,supplies,proves,parked,instance,grounds,diary,complaining,basis,wounded,thing's,politics,confessed,pipe,merely,massage,data,chop,budget,brief,spill,prayer,costs,betray,begins,arrangement,waiter,scam,rats,fraud,flu,brush,anyone's,adopted,tables,sympathy,pill,pee,web,seventeen,landed,expression,entrance,employee,drawing,cap,bracelet,principal,pays,jen's,fairly,facility,dru,deeper,arrive,unique,tracking,spite,shed,recommend,oughta,nanny,naive,menu,grades,diet,corn,authorities,separated,roses,patch,dime,devastated,description,tap,subtle,include,citizen,bullets,beans,ric,pile,las,executive,confirm,toe,strings,parade,harbor,charity's,bow,borrowed,toys,straighten,steak,status,remote,premonition,poem,planted,honored,youth,specifically,meetings,exam,convenient,traveling,matches,laying,insisted,apply,units,technology,dish,aitoro,sis,kindly,grandson,donor,temper,teenager,strategy,richard's,proven,iron,denial,couples,backwards,tent,swell,noon,happiest,episode,drives,thinkin,spirits,potion,fence,affairs,acts,whatsoever,rehearsal,proved,overheard,nuclear,lemme,hostage,faced,constant,bench,tryin,taxi,shove,sets,moron,limits,impress,entitled,needle,limit,lad,intelligent,instant,forms,disagree,stinks,rianna,recover,paul's,losers,groom,gesture,developed,constantly,blocks,bartender,tunnel,suspects,sealed,removed,legally,illness,hears,dresses,aye,vehicle,thy,teachers,sheet,receive,psychic,night's,denied,knocking,judging,bible,behalf,accidentally,waking,ton,superior,seek,rumor,natalie's,manners,homeless,hollow,desperately,critical,theme,tapes,referring,personnel,item,genoa,gear,majesty,fans,exposed,cried,tons,spells,producer,launch,instinct,belief,quote,motorcycle,convincing,appeal,advance,greater,fashioned,aids,accomplished,mommy's,grip,bump,upsetting,soldiers,scheduled,production,needing,invisible,forgiveness,feds,complex,compare,bothers,tooth,territory,sacred,mon,jessica's,inviting,inner,earn,compromise,cocktail,tramp,temperature,signing,landing,jabot,intimate,dignity,dealt,souls,informed,gods,entertainment,dressing,cigarettes,blessing,billion,alistair,upper,manner,lightning,leak,heaven's,fond,corky,alternative,seduce,players,operate,modern,liquor,fingerprints,enchantment,butters,stuffed,stavros,rome,filed,emotionally,division,conditions,uhm,transplant,tips,passes,oxygen,nicely,lunatic,hid,drill,designs,complain,announcement,visitors,unfortunate,slap,prayers,plug,organization,opens,oath,o'neill,mutual,graduate,confirmed,broad,yacht,spa,remembers,fried,extraordinary,bait,appearance,abuse,warton,sworn,stare,safely,reunion,plot,burst,aha,might've,experiment,dive,commission,cells,aboard,returning,independent,expose,environment,buddies,trusting,smaller,mountains,booze,sweep,sore,scudder,properly,parole,manhattan,effective,ditch,decides,canceled,bra,antonio's,speaks,spanish,reaching,glow,foundation,women's,wears,thirsty,skull,ringing,dorm,dining,bend,unexpected,systems,sob,pancakes,michael's,harsh,flattered,existence,ahhh,troubles,proposed,fights,favourite,eats,driven,computers,rage,luke's,causes,border,undercover,spoiled,sloane,shine,rug,identify,destroying,deputy,deliberately,conspiracy,clothing,thoughtful,similar,sandwiches,plates,nails,miracles,investment,fridge,drank,contrary,beloved,allergic,washed,stalking,solved,sack,misses,hope's,forgiven,erica's,cuz,bent,approval,practical,organized,maciver,involve,industry,fuel,dragging,cooked,possession,pointing,foul,editor,dull,beneath,ages,horror,heels,grass,faking,deaf,stunt,portrait,painted,jealousy,hopeless,fears,cuts,conclusion,volunteer,scenario,satellite,necklace,men's,crashed,chapel,accuse,restraining,jason's,humans,homicide,helicopter,formal,firing,shortly,safer,devoted,auction,videotape,tore,stores,reservations,pops,appetite,anybody's,wounds,vanquish,symbol,prevent,patrol,ironic,flow,fathers,excitement,anyhow,tearing,sends,sam's,rape,laughed,function,core,charmed,whatever's,sub,lucy's,dealer,cooperate,bachelor,accomplish,wakes,struggle,spotted,sorts,reservation,ashes,yards,votes,tastes,supposedly,loft,intentions,integrity,wished,towels,suspected,slightly,qualified,log,investigating,inappropriate,immediate,companies,backed,pan,owned,lipstick,lawn,compassion,cafeteria,belonged,affected,scarf,precisely,obsession,management,loses,lighten,jake's,infection,granddaughter,explode,chemistry,balcony,this'll,storage,spying,publicity,exists,employees,depend,cue,cracked,conscious,aww,ally,ace,accounts,absurd,vicious,tools,strongly,rap,invented,forbid,directions,defendant,bare,announce,alcazar's,screwing,salesman,robbed,leap,lakeview,insanity,injury,genetic,document,why's,reveal,religious,possibilities,kidnap,gown,entering,chairs,wishing,statue,setup,serial,punished,dramatic,dismissed,criminals,seventh,regrets,raped,quarters,produce,lamp,dentist,anyways,anonymous,added,semester,risks,regarding,owes,magazines,machines,lungs,explaining,delicate,child's,tricked,oldest,liv,eager,doomed,cafe,bureau,adoption,traditional,surrender,stab,sickness,scum,loop,independence,generation,floating,envelope,entered,combination,chamber,worn,vault,sorel,pretended,potatoes,plea,photograph,payback,misunderstood,kiddo,healing,cascade,capeside,application,stabbed,remarkable,cabinet,brat,wrestling,sixth,scale,privilege,passionate,nerves,lawsuit,kidney,disturbed,crossing,cozy,associate,tire,shirts,required,posted,oven,ordering,mill,journal,gallery,delay,clubs,risky,nest,monsters,honorable,grounded,favour,culture,closest,brenda's,breakdown,attempted,tony's,placed,conflict,bald,actress,abandon,steam,scar,pole,duh,collar,worthless,standards,resources,photographs,introduced,injured,graduation,enormous,disturbing,disturb,distract,deals,conclusions,vodka,situations,require,mid,measure,dishes,crawling,congress,children's,briefcase,wiped,whistle,sits,roast,rented,pigs,greek,flirting,existed,deposit,damaged,bottles,vanessa's,types,topic,riot,overreacting,minimum,logical,impact,hostile,embarrass,casual,beacon,amusing,altar,values,recognized,maintain,goods,covers,claus,battery,survival,skirt,shave,prisoners,porch,med,ghosts,favors,drops,dizzy,chili,begun,beaten,advise,transferred,strikes,rehab,raw,photographer,peaceful,leery,heavens,fortunately,fooling,expectations,draft,citizens,weakness,ski,ships,ranch,practicing,musical,movement,individual,homes,executed,examine,documents,cranes,column,bribe,task,species,sail,rum,resort,prescription,operating,hush,fragile,forensics,expense,drugged,differences,cows,conduct,comic,bells,avenue,attacking,assigned,visitor,suitcase,sources,sorta,scan,payment,motor,mini,manticore,inspired,insecure,imagining,hardest,clerk,yea,wrist,what'll,tube,starters,silk,pump,pale,nicer,haul,flies,demands,boot,arts,african,there'd,limited,how're,elders,connections,quietly,pulls,idiots,factor,erase,denying,attacks,ankle,amnesia,accepting,ooo,heartbeat,gal,devane,confront,backing,phrase,operations,minus,meets,legitimate,hurricane,fixing,communication,boats,auto,arrogant,supper,studies,slightest,sins,sayin,recipe,pier,paternity,humiliating,genuine,catholic,snack,rational,pointed,minded,guessed,grace's,display,dip,brooke's,advanced,weddings,unh,tumor,teams,reported,humiliated,destruction,copies,closely,bid,aspirin,academy,wig,throughout,spray,occur,logic,eyed,equal,drowning,contacts,shakespeare,ritual,perfume,kelly's,hiring,hating,generally,error,elected,docks,creatures,visions,thanking,thankful,sock,replaced,nineteen,nick's,fork,comedy,analysis,yale,throws,teenagers,studied,stressed,slice,rolls,requires,plead,ladder,kicks,detectives,assured,alison's,widow,tomorrow's,tissue,tellin,shallow,responsibilities,repay,rejected,permanently,girlfriends,deadly,comforting,ceiling,bonus,verdict,maintenance,jar,insensitive,factory,aim,triple,spilled,respected,recovered,messy,interrupted,halliwell,car's,bleed,benefits,wardrobe,takin,significant,objective,murders,doo,chart,backs,workers,waves,underestimate,ties,registered,multiple,justify,harmless,frustrated,fold,enzo,convention,communicate,bugging,attraction,arson,whack,salary,rumors,residence,party's,obligation,medium,liking,laura's,development,develop,dearest,david's,danny's,congratulate,vengeance,switzerland,severe,rack,puzzle,puerto,guidance,fires,courtesy,caller,blamed,tops,repair,quiz,prep,now's,involves,headquarters,curiosity,codes,circles,barbecue,troops,sunnydale,spinning,scores,pursue,psychotic,cough,claimed,accusations,shares,resent,money's,laughs,gathered,freshman,envy,drown,cristian's,bartlet,asses,sofa,scientist,poster,islands,highness,dock,apologies,welfare,victor's,theirs,stat,stall,spots,somewhat,ryan's,realizes,psych,fools,finishing,album,wee,understandable,unable,treats,theatre,succeed,stir,relaxed,makin,inches,gratitude,faithful,bin,accent,zip,witter,wandering,regardless,que,locate,inevitable,gretel,deed,crushed,controlling,taxes,smelled,settlement,robe,poet,opposed,marked,greenlee's,gossip,gambling,determine,cuba,cosmetics,cent,accidents,surprising,stiff,sincere,shield,rushed,resume,reporting,refrigerator,reference,preparing,nightmares,mijo,ignoring,hunch,fog,fireworks,drowned,crown,cooperation,brass,accurate,whispering,sophisticated,religion,luggage,investigate,hike,explore,emotion,creek,crashing,contacted,complications,ceo,acid,shining,rolled,righteous,reconsider,inspiration,goody,geek,frightening,festival,ethics,creeps,courthouse,camping,assistance,affection,vow,smythe,protest,lodge,haircut,forcing,essay,chairman,baked,apologized,vibe,respects,receipt,mami,includes,hats,exclusive,destructive,define,defeat,adore,adopt,voted,tracked,signals,shorts,rory's,reminding,relative,ninth,floors,dough,creations,continues,cancelled,cabot,barrel,adam's,snuck,slight,reporters,rear,pressing,novel,newspapers,magnificent,madame,lazy,glorious,fiancee,candidate,brick,bits,australia,activities,visitation,scholarship,sane,previous,kindness,ivy's,shoulda,rescued,mattress,maria's,lounge,lifted,label,importantly,glove,enterprises,driver's,disappointment,condo,cemetery,beings,admitting,yelled,waving,screech,satisfaction,requested,reads,plants,nun,nailed,described,dedicated,certificate,centuries,annual,worm,tick,resting,primary,polish,marvelous,fuss,funds,defensive,cortlandt,compete,chased,provided,pockets,luckily,lilith,filing,depression,conversations,consideration,consciousness,worlds,innocence,indicate,grandmother's,forehead,bam,appeared,aggressive,trailer,slam,retirement,quitting,pry,person's,narrow,levels,kay's,inform,encourage,dug,delighted,daylight,danced,currently,confidential,billy's,ben's,aunts,washing,vic,tossed,spectra,rick's,permit,marrow,lined,implying,hatred,grill,efforts,corpse,clues,sober,relatives,promotion,offended,morgue,larger,infected,humanity,eww,emily's,electricity,electrical,distraction,cart,broadcast,wired,violation,suspended,promising,harassment,glue,gathering,d'angelo,cursed,controlled,calendar,brutal,assets,warlocks,wagon,unpleasant,proving,priorities,observation,mustn't,lease,grows,flame,domestic,disappearance,depressing,thrill,sitter,ribs,offers,naw,flush,exception,earrings,deadline,corporal,collapsed,update,snapped,smack,orleans,offices,melt,figuring,delusional,coulda,burnt,actors,trips,tender,sperm,specialist,scientific,realise,pork,popped,planes,kev,interrogation,institution,included,esteem,communications,choosing,choir,undo,pres,prayed,plague,manipulate,lifestyle,insulting,honour,detention,delightful,coffeehouse,chess,betrayal,apologizing,adjust,wrecked,wont,whipped,rides,reminder,psychological,principle,monsieur,injuries,fame,faint,confusion,christ's,bon,bake,nearest,korea,industries,execution,distress,definition,creating,correctly,complaint,blocked,trophy,tortured,structure,rot,risking,pointless,household,heir,handing,eighth,dumping,cups,chloe's,alibi,absence,vital,tokyo,thus,struggling,shiny,risked,refer,mummy,mint,joey's,involvement,hose,hobby,fortunate,fleischman,fitting,curtain,counseling,addition,wit,transport,technical,rode,puppet,opportunities,modeling,memo,irresponsible,humiliation,hiya,freakin,fez,felony,choke,blackmailing,appreciated,tabloid,suspicion,recovering,rally,psychology,pledge,panicked,nursery,louder,jeans,investigator,identified,homecoming,helena's,height,graduated,frustrating,fabric,distant,buys,busting,buff,wax,sleeve,products,philosophy,irony,hospitals,dope,declare,autopsy,workin,torch,substitute,scandal,prick,limb,leaf,lady's,hysterical,growth,goddamnit,fetch,dimension,day's,crowded,clip,climbing,bonding,approved,yeh,woah,ultimately,trusts,returns,negotiate,millennium,majority,lethal,length,iced,deeds,bore,babysitter,questioned,outrageous,medal,kiriakis,insulted,grudge,established,driveway,deserted,definite,capture,beep,wires,suggestions,searched,owed,originally,nickname,lighting,lend,drunken,demanding,costanza,conviction,characters,bumped,weigh,touches,tempted,shout,resolve,relate,poisoned,pip,phoebe's,pete's,occasionally,molly's,meals,maker,invitations,haunted,fur,footage,depending,bogus,autograph,affects,tolerate,stepping,spontaneous,sleeps,probation,presentation,performed,manny,identical,fist,cycle,associates,aaron's,streak,spectacular,sector,lasted,isaac's,increase,hostages,heroin,havin,habits,encouraging,cult,consult,burgers,boyfriends,bailed,baggage,association,wealthy,watches,versus,troubled,torturing,teasing,sweetest,stations,sip,shawn's,rag,qualities,postpone,pad,overwhelmed,malkovich,impulse,hut,follows,classy,charging,barbara's,angel's,amazed,scenes,rising,revealed,representing,policeman,offensive,mug,hypocrite,humiliate,hideous,finals,experiences,d'ya,courts,costumes,captured,bluffing,betting,bein,bedtime,alcoholic,vegetable,tray,suspicions,spreading,splendid,shouting,roots,pressed,nooo,liza's,jew,intent,grieving,gladly,fling,eliminate,disorder,courtney's,cereal,arrives,aaah,yum,technique,statements,sonofabitch,servant,roads,republican,paralyzed,orb,lotta,locks,guaranteed,european,dummy,discipline,despise,dental,corporation,carries,briefing,bluff,batteries,atmosphere,whatta,tux,sounding,servants,rifle,presume,kevin's,handwriting,goals,gin,fainted,elements,dried,cape,allright,allowing,acknowledge,whacked,toxic,skating,reliable,quicker,penalty,panel,overwhelming,nearby,lining,importance,harassing,fatal,endless,elsewhere,dolls,convict,bold,ballet,whatcha,unlikely,spiritual,shutting,separation,recording,positively,overcome,goddam,failing,essence,dose,diagnosis,cured,claiming,bully,airline,ahold,yearbook,various,tempting,shelf,rig,pursuit,prosecution,pouring,possessed,partnership,miguel's,lindsay's,countries,wonders,tsk,thorough,spine,rath,psychiatric,meaningless,latte,jammed,ignored,fiance,exposure,exhibit,evidently,duties,contempt,compromised,capacity,cans,weekends,urge,theft,suing,shipment,scissors,responding,refuses,proposition,noises,matching,located,ink,hormones,hiv,hail,grandchildren,godfather,gently,establish,crane's,contracts,compound,buffy's,worldwide,smashed,sexually,sentimental,senor,scored,patient's,nicest,marketing,manipulated,jaw,intern,handcuffs,framed,errands,entertaining,discovery,crib,carriage,barge,awards,attending,ambassador,videos,tab,spends,slipping,seated,rubbing,rely,reject,recommendation,reckon,ratings,headaches,float,embrace,corners,whining,sweating,sole,skipped,restore,receiving,population,pep,mountie,motives,mama's,listens,korean,heroes,heart's,cristobel,controls,cheerleader,balsom,unnecessary,stunning,shipping,scent,santa's,quartermaines,praise,pose,montega,luxury,loosen,kyle's,keri's,info,hum,haunt,gracious,git,forgiving,fleet,errand,emperor,cakes,blames,abortion,worship,theories,strict,sketch,shifts,plotting,physician,perimeter,passage,pals,mere,mattered,lonigan,longest,jews,interference,eyewitness,enthusiasm,encounter,diapers,craig's,artists,strongest,shaken,serves,punched,projects,portal,outer,nazi,hal's,colleagues,catches,bearing,backyard,academic,winds,terrorists,sabotage,pea,organs,needy,mentor,measures,listed,lex,cuff,civilization,caribbean,articles,writes,woof,who'll,viki's,valid,rarely,rabbi,prank,performing,obnoxious,mates,improve,hereby,gabby,faked,cellar,whitelighter,void,substance,strangle,sour,skill,senate,purchase,native,muffins,interfering,hoh,gina's,demonic,colored,clearing,civilian,buildings,boutique,barrington,trading,terrace,smoked,seed,righty,relations,quack,published,preliminary,petey,pact,outstanding,opinions,knot,ketchup,items,examined,disappearing,cordy,coin,circuit,assist,administration,walt,uptight,ticking,terrifying,tease,tabitha's,syd,swamp,secretly,rejection,reflection,realizing,rays,pennsylvania,partly,mentally,marone,jurisdiction,frasier's,doubted,deception,crucial,congressman,cheesy,arrival,visited,supporting,stalling,scouts,scoop,ribbon,reserve,raid,notion,income,immune,grandma's,expects,edition,destined,constitution,classroom,bets,appreciation,appointed,accomplice,whitney's,wander,shoved,sewer,scroll,retire,paintings,lasts,fugitive,freezer,discount,cranky,crank,clearance,bodyguard,anxiety,accountant,abby's,whoops,volunteered,terrorist,tales,talents,stinking,resolved,remotely,protocol,livvie's,garlic,decency,cord,beds,asa's,areas,altogether,uniforms,tremendous,restaurants,rank,profession,popping,philadelphia,outa,observe,lung,largest,hangs,feelin,experts,enforcement,encouraged,economy,dudes,donation,disguise,diane's,curb,continued,competitive,businessman,bites,antique,advertising,ads,toothbrush,retreat,represents,realistic,profits,predict,nora's,lid,landlord,hourglass,hesitate,frank's,focusing,equally,consolation,boyfriend's,babbling,aged,troy's,tipped,stranded,smartest,sabrina's,rhythm,replacement,repeating,puke,psst,paycheck,overreacted,macho,leadership,kendall's,juvenile,john's,images,grocery,freshen,disposal,cuffs,consent,caffeine,arguments,agrees,abigail's,vanished,unfinished,tobacco,tin,syndrome,ripping,pinch,missiles,isolated,flattering,expenses,dinners,cos,colleague,ciao,buh,belthazor,belle's,attorneys,amber's,woulda,whereabouts,wars,waitin,visits,truce,tripped,tee,tasted,stu,steer,ruling,poisoning,nursing,manipulative,immature,husbands,heel,granddad,delivering,deaths,condoms,automatically,anchor,trashed,tournament,throne,raining,prices,pasta,needles,leaning,leaders,judges,ideal,detector,coolest,casting,batch,approximately,appointments,almighty,achieve,vegetables,sum,spark,ruled,revolution,principles,perfection,pains,momma,mole,interviews,initiative,hairs,getaway,employment,den,cracking,counted,compliments,behold,verge,tougher,timer,tapped,taped,stakes,specialty,snooping,shoots,semi,rendezvous,pentagon,passenger,leverage,jeopardize,janitor,grandparents,forbidden,examination,communist,clueless,cities,bidding,arriving,adding,ungrateful,unacceptable,tutor,soviet,shaped,serum,scuse,savings,pub,pajamas,mouths,modest,methods,lure,irrational,depth,cries,classified,bombs,beautifully,arresting,approaching,vessel,variety,traitor,sympathetic,smug,smash,rental,prostitute,premonitions,mild,jumps,inventory,ing,improved,grandfather's,developing,darlin,committing,caleb's,banging,asap,amendment,worms,violated,vent,traumatic,traced,tow,swiss,sweaty,shaft,recommended,overboard,literature,insight,healed,grasp,fluid,experiencing,crappy,crab,connecticut,chunk,chandler's,awww,applied,witnessed,traveled,stain,shack,reacted,pronounce,presented,poured,occupied,moms,marriages,jabez,invested,handful,gob,gag,flipped,fireplace,expertise,embarrassment,disappears,concussion,bruises,brakes,anything's,week's,twisting,tide,swept,summon,splitting,settling,scientists,reschedule,regard,purposes,ohio,notch,mike's,improvement,hooray,grabbing,extend,exquisite,disrespect,complaints,colin's,armor,voting,thornhart,sustained,straw,slapped,simon's,shipped,shattered,ruthless,reva's,refill,recorded,payroll,numb,mourning,marijuana,manly,jerry's,involving,hunk,entertain,earthquake,drift,dreadful,doorstep,confirmation,chops,bridget's,appreciates,announced,vague,tires,stressful,stem,stashed,stash,sensed,preoccupied,predictable,noticing,madly,halls,gunshot,embassy,dozens,dinner's,confuse,cleaners,charade,chalk,cappuccino,breed,bouquet,amulet,addiction,who've,warming,unlock,transition,satisfy,sacrificed,relaxing,lone,input,hampshire,girlfriend's,elaborate,concerning,completed,channels,category,cal,blocking,blend,blankets,america's,addicted,yuck,voters,professionals,positions,monica's,mode,initial,hunger,hamburger,greeting,greet,gravy,gram,dreamt,dice,declared,collecting,caution,brady's,backpack,agreeing,writers,whale,tribe,taller,supervisor,sacrifices,radiation,poo,phew,outcome,ounce,missile,meter,likewise,irrelevant,gran,felon,feature,favorites,farther,fade,experiments,erased,easiest,disk,convenience,conceived,compassionate,challenged,cane,blair's,backstage,agony,adores,veins,tweek,thieves,surgical,strangely,stetson,recital,proposing,productive,meaningful,marching,immunity,hassle,goddamned,frighten,directors,dearly,comments,closure,cease,ambition,wisconsin,unstable,sweetness,salvage,richer,refusing,raging,pumping,pressuring,petition,mortals,lowlife,jus,intimidated,intentionally,inspire,forgave,eric's,devotion,despicable,deciding,dash,comfy,breach,bo's,bark,alternate,aaaah,switching,swallowed,stove,slot,screamed,scars,russians,relevant,poof,pipes,persons,pawn,losses,legit,invest,generations,farewell,experimental,difficulty,curtains,civilized,championship,caviar,boost,token,tends,temporarily,superstition,supernatural,sunk,sadness,reduced,recorder,psyched,presidential,owners,motivated,microwave,lands,karen's,hallelujah,gap,fraternity,engines,dryer,cocoa,chewing,additional,acceptable,unbelievably,survivor,smiled,smelling,sized,simpler,sentenced,respectable,remarks,registration,premises,passengers,organ,occasional,khasinau,indication,gutter,grabs,goo,fulfill,flashlight,ellenor,courses,blooded,blessings,beware,beth's,bands,advised,water's,uhhh,turf,swings,slips,shocking,resistance,privately,olivia's,mirrors,lyrics,locking,instrument,historical,heartless,fras,decades,comparison,childish,cassie's,cardiac,admission,utterly,tuscany,ticked,suspension,stunned,statesville,sadly,resolution,reserved,purely,opponent,noted,lowest,kiddin,jerks,hitch,flirt,fare,extension,establishment,equals,dismiss,delayed,decade,christening,casket,c'mere,breakup,brad's,biting,antibiotics,accusation,abducted,witchcraft,whoever's,traded,thread,spelling,so's,school's,runnin,remaining,punching,protein,printed,paramedics,newest,murdering,mine's,masks,lawndale,intact,ins,initials,heights,grampa,democracy,deceased,colleen's,choking,charms,careless,bushes,buns,bummed,accounting,travels,taylor's,shred,saves,saddle,rethink,regards,references,precinct,persuade,patterns,meds,manipulating,llanfair,leash,kenny's,housing,hearted,guarantees,flown,feast,extent,educated,disgrace,determination,deposition,coverage,corridor,burial,bookstore,boil,abilities,vitals,veil,trespassing,teaches,sidewalk,sensible,punishing,overtime,optimistic,occasions,obsessing,oak,notify,mornin,jeopardy,jaffa,injection,hilarious,distinct,directed,desires,curve,confide,challenging,cautious,alter,yada,wilderness,where're,vindictive,vial,tomb,teeny,subjects,stroll,sittin,scrub,rebuild,rachel's,posters,parallel,ordeal,orbit,o'brien,nuns,max's,jennifer's,intimacy,inheritance,fails,exploded,donate,distracting,despair,democratic,defended,crackers,commercials,bryant's,ammunition,wildwind,virtue,thoroughly,tails,spicy,sketches,sights,sheer,shaving,seize,scarecrow,refreshing,prosecute,possess,platter,phillip's,napkin,misplaced,merchandise,membership,loony,jinx,heroic,frankenstein,fag,efficient,devil's,corps,clan,boundaries,attract,ambitious,virtually,syrup,solitary,resignation,resemblance,reacting,pursuing,premature,pod,liz's,lavery,journalist,honors,harvey's,genes,flashes,erm,contribution,company's,client's,cheque,charts,cargo,awright,acquainted,wrapping,untie,salute,ruins,resign,realised,priceless,partying,myth,moonlight,lightly,lifting,kasnoff,insisting,glowing,generator,flowing,explosives,employer,cutie,confronted,clause,buts,breakthrough,blouse,ballistic,antidote,analyze,allowance,adjourned,vet,unto,understatement,tucked,touchy,toll,subconscious,sequence,screws,sarge,roommates,reaches,rambaldi,programs,offend,nerd,knives,kin,irresistible,inherited,incapable,hostility,goddammit,fuse,frat,equation,curfew,centered,blackmailed,allows,alleged,walkin,transmission,text,starve,sleigh,sarcastic,recess,rebound,procedures,pinned,parlor,outfits,livin,issued,institute,industrial,heartache,head's,haired,fundraiser,doorman,documentary,discreet,dilucca,detect,cracks,cracker,considerate,climbed,catering,author,apophis,zoey,vacuum,urine,tunnels,todd's,tanks,strung,stitches,sordid,sark,referred,protector,portion,phoned,pets,paths,mat,lengths,kindergarten,hostess,flaw,flavor,discharge,deveraux,consumed,confidentiality,automatic,amongst,viktor,victim's,tactics,straightened,specials,spaghetti,soil,prettier,powerless,por,poems,playin,playground,parker's,paranoia,nsa,mainly,mac's,joe's,instantly,havoc,exaggerating,evaluation,eavesdropping,doughnuts,diversion,deepest,cutest,companion,comb,bela,behaving,avoided,anyplace,agh,accessory,zap,whereas,translate,stuffing,speeding,slime,polls,personalities,payments,musician,marital,lurking,lottery,journalism,interior,imaginary,hog,guinea,greetings,game's,fairwinds,ethical,equipped,environmental,elegant,elbow,customs,cuban,credibility,credentials,consistent,collapse,cloth,claws,chopped,challenges,bridal,boards,bedside,babysitting,authorized,assumption,ant,youngest,witty,vast,unforgivable,underworld,tempt,tabs,succeeded,sophomore,selfless,secrecy,runway,restless,programming,professionally,okey,movin,metaphor,messes,meltdown,lecter,incoming,hence,gasoline,gained,funding,episodes,diefenbaker,contain,comedian,collected,cam,buckle,assembly,ancestors,admired,adjustment,acceptance,weekly,warmth,throats,seduced,ridge's,reform,rebecca's,queer,poll,parenting,noses,luckiest,graveyard,gifted,footsteps,dimeras,cynical,assassination,wedded,voyage,volunteers,verbal,unpredictable,tuned,stoop,slides,sinking,show's,rio,rigged,regulations,region,promoted,plumbing,lingerie,layer,katie's,hankey,greed,everwood,essential,elope,dresser,departure,dat,dances,coup,chauffeur,bulletin,bugged,bouncing,website,tubes,temptation,supported,strangest,sorel's,slammed,selection,sarcasm,rib,primitive,platform,pending,partial,packages,orderly,obsessive,nevertheless,nbc,murderers,motto,meteor,inconvenience,glimpse,froze,fiber,execute,etc,ensure,drivers,dispute,damages,crop,courageous,consulate,closes,bosses,bees,amends,wuss,wolfram,wacky,unemployed,traces,town's,testifying,tendency,syringe,symphony,stew,startled,sorrow,sleazy,shaky,screams,rsquo,remark,poke,phone's,philip's,nutty,nobel,mentioning,mend,mayor's,iowa,inspiring,impulsive,housekeeper,germans,formed,foam,fingernails,economic,divide,conditioning,baking,whine,thug,starved,sedative,rose's,reversed,publishing,programmed,picket,paged,nowadays,newman's,mines,margo's,invasion,homosexual,homo,hips,forgets,flipping,flea,flatter,dwell,dumpster,consultant,choo,banking,assignments,apartments,ants,affecting,advisor,vile,unreasonable,tossing,thanked,steals,souvenir,screening,scratched,rep,psychopath,proportion,outs,operative,obstruction,obey,neutral,lump,lily's,insists,ian's,harass,gloat,flights,filth,extended,electronic,edgy,diseases,didn,coroner,confessing,cologne,cedar,bruise,betraying,bailing,attempting,appealing,adebisi,wrath,wandered,waist,vain,traps,transportation,stepfather,publicly,presidents,poking,obligated,marshal,lexie's,instructed,heavenly,halt,employed,diplomatic,dilemma,crazed,contagious,coaster,cheering,carved,bundle,approached,appearances,vomit,thingy,stadium,speeches,robbing,reflect,raft,qualify,pumped,pillows,peep,pageant,packs,neo,neglected,m'kay,loneliness,liberal,intrude,indicates,helluva,gardener,freely,forresters,err,drooling,continuing,betcha,alan's,addressed,acquired,vase,supermarket,squat,spitting,spaces,slaves,rhyme,relieve,receipts,racket,purchased,preserve,pictured,pause,overdue,officials,nod,motivation,morgendorffer,lucky's,lacking,kidnapper,introduction,insect,hunters,horns,feminine,eyeballs,dumps,disc,disappointing,difficulties,crock,convertible,context,claw,clamp,canned,cambias,bathtub,avanya,artery,weep,warmer,vendetta,tenth,suspense,summoned,stuff's,spiders,sings,reiber,raving,pushy,produced,poverty,postponed,ohhhh,noooo,mold,mice,laughter,incompetent,hugging,groceries,frequency,fastest,drip,differ,daphne's,communicating,body's,beliefs,bats,bases,auntie,adios,wraps,willingly,weirdest,voila,timmih,thinner,swelling,swat,steroids,sensitivity,scrape,rehearse,quarterback,organic,matched,ledge,justified,insults,increased,heavily,hateful,handles,feared,doorway,decorations,colour,chatting,buyer,buckaroo,bedrooms,batting,askin,ammo,tutoring,subpoena,span,scratching,requests,privileges,pager,mart,kel,intriguing,idiotic,hotels,grape,enlighten,dum,door's,dixie's,demonstrate,dairy,corrupt,combined,brunch,bridesmaid,barking,architect,applause,alongside,ale,acquaintance,yuh,wretched,superficial,sufficient,sued,soak,smoothly,sensing,restraint,quo,pow,posing,pleading,pittsburgh,peru,payoff,participate,organize,oprah,nemo,morals,loans,loaf,lists,laboratory,jumpy,intervention,ignorant,herbal,hangin,germs,generosity,flashing,country's,convent,clumsy,chocolates,captive,bianca's,behaved,apologise,vanity,trials,stumbled,republicans,represented,recognition,preview,poisonous,perjury,parental,onboard,mugged,minding,linen,learns,knots,interviewing,inmates,ingredients,humour,grind,greasy,goons,estimate,elementary,edmund's,drastic,database,coop,comparing,cocky,clearer,bruised,brag,bind,axe,asset,apparent,ann's,worthwhile,whoop,wedding's,vanquishing,tabloids,survivors,stenbeck's,sprung,spotlight,shops,sentencing,sentences,revealing,reduce,ram,racist,provoke,piper's,pining,overly,oui,ops,mop,louisiana,locket,king's,jab,imply,impatient,hovering,hotter,fest,endure,dots,doren,dim,diagnosed,debts,cultures,crawled,contained,condemned,chained,brit,breaths,adds,weirdo,warmed,wand,utah,troubling,tok'ra,stripped,strapped,soaked,skipping,sharon's,scrambled,rattle,profound,musta,mocking,mnh,misunderstand,merit,loading,linked,limousine,kacl,investors,interviewed,hustle,forensic,foods,enthusiastic,duct,drawers,devastating,democrats,conquer,concentration,comeback,clarify,chores,cheerleaders,cheaper,charlie's,callin,blushing,barging,abused,yoga,wrecking,wits,waffles,virginity,vibes,uninvited,unfaithful,underwater,tribute,strangled,state's,scheming,ropes,responded,residents,rescuing,rave,priests,postcard,overseas,orientation,ongoing,o'reily,newly,neil's,morphine,lotion,limitations,lesser,lectures,lads,kidneys,judgement,jog,itch,intellectual,installed,infant,indefinitely,grenade,glamorous,genetically,freud,faculty,engineering,doh,discretion,delusions,declaration,crate,competent,commonwealth,catalog,bakery,attempts,asylum,argh,applying,ahhhh,yesterday's,wedge,wager,unfit,tripping,treatments,torment,superhero,stirring,spinal,sorority,seminar,scenery,repairs,rabble,pneumonia,perks,owl,override,ooooh,moo,mija,manslaughter,mailed,love's,lime,lettuce,intimidate,instructor,guarded,grieve,grad,globe,frustration,extensive,exploring,exercises,eve's,doorbell,devices,deal's,dam,cultural,ctu,credits,commerce,chinatown,chemicals,baltimore,authentic,arraignment,annulled,altered,allergies,wanta,verify,vegetarian,tunes,tourist,tighter,telegram,suitable,stalk,specimen,spared,solving,shoo,satisfying,saddam,requesting,publisher,pens,overprotective,obstacles,notified,negro,nasedo,judged,jill's,identification,grandchild,genuinely,founded,flushed,fluids,floss,escaping,ditched,demon's,decorated,criticism,cramp,corny,contribute,connecting,bunk,bombing,bitten,billions,bankrupt,yikes,wrists,ultrasound,ultimatum,thirst,spelled,sniff,scope,ross's,room's,retrieve,releasing,reassuring,pumps,properties,predicted,neurotic,negotiating,needn't,multi,monitors,millionaire,microphone,mechanical,lydecker,limp,incriminating,hatchet,gracias,gordie,fills,feeds,egypt,doubting,dedication,decaf,dawson's,competing,cellular,biopsy,whiz,voluntarily,visible,ventilator,unpack,unload,universal,tomatoes,targets,suggests,strawberry,spooked,snitch,schillinger,sap,reassure,providing,prey,pressure's,persuasive,mystical,mysteries,mri,moment's,mixing,matrimony,mary's,mails,lighthouse,liability,kgb,jock,headline,frankie's,factors,explosive,explanations,dispatch,detailed,curly,cupid,condolences,comrade,cassadines,bulb,brittany's,bragging,awaits,assaulted,ambush,adolescent,adjusted,abort,yank,whit,verse,vaguely,undermine,tying,trim,swamped,stitch,stan's,stabbing,slippers,skye's,sincerely,sigh,setback,secondly,rotting,rev,retail,proceedings,preparation,precaution,pox,pcpd,nonetheless,melting,materials,mar,liaison,hots,hooking,headlines,hag,ganz,fury,felicity,fangs,expelled,encouragement,earring,dreidel,draws,dory,donut,dog's,dis,dictate,dependent,decorating,coordinates,cocktails,bumps,blueberry,believable,backfired,backfire,apron,anticipated,adjusting,activated,vous,vouch,vitamins,vista,urn,uncertain,ummm,tourists,tattoos,surrounding,sponsor,slimy,singles,sibling,shhhh,restored,representative,renting,reign,publish,planets,peculiar,parasite,paddington,noo,marries,mailbox,magically,lovebirds,listeners,knocks,kane's,informant,grain,exits,elf,drazen,distractions,disconnected,dinosaurs,designing,dashwood,crooked,conveniently,contents,argued,wink,warped,underestimated,testified,tacky,substantial,steve's,steering,staged,stability,shoving,seizure,reset,repeatedly,radius,pushes,pitching,pairs,opener,mornings,mississippi,matthew's,mash,investigations,invent,indulge,horribly,hallucinating,festive,eyebrows,expand,enjoys,dictionary,dialogue,desperation,dealers,darkest,daph,critic,consulting,cartman's,canal,boragora,belts,bagel,authorization,auditions,associated,ape,amy's,agitated,adventures,withdraw,wishful,wimp,vehicles,vanish,unbearable,tonic,tom's,tackle,suffice,suction,slaying,singapore,safest,rosanna's,rocking,relive,rates,puttin,prettiest,oval,noisy,newlyweds,nauseous,moi,misguided,mildly,midst,maps,liable,kristina's,judgmental,introducing,individuals,hunted,hen,givin,frequent,fisherman,fascinated,elephants,dislike,diploma,deluded,decorate,crummy,contractions,carve,careers,bottled,bonded,bahamas,unavailable,twenties,trustworthy,translation,traditions,surviving,surgeons,stupidity,skies,secured,salvation,remorse,rafe's,princeton,preferably,pies,photography,operational,nuh,northwest,nausea,napkins,mule,mourn,melted,mechanism,mashed,julia's,inherit,holdings,hel,greatness,golly,excused,edges,dumbo,drifting,delirious,damaging,cubicle,compelled,comm,colleges,cole's,chooses,checkup,chad's,certified,candidates,boredom,bob's,bandages,baldwin's,bah,automobile,athletic,alarms,absorbed,absent,windshield,who're,whaddya,vitamin,transparent,surprisingly,sunglasses,starring,slit,sided,schemes,roar,relatively,reade,quarry,prosecutor,prognosis,probe,potentially,pitiful,persistent,perception,percentage,peas,oww,nosy,neighbourhood,nagging,morons,molecular,meters,masterpiece,martinis,limbo,liars,jax's,irritating,inclined,hump,hoynes,haw,gauge,functions,fiasco,educational,eatin,donated,destination,dense,cubans,continent,concentrating,commanding,colorful,clam,cider,brochure,behaviour,barto,bargaining,awe,artistic,welcoming,weighing,villain,vein,vanquished,striking,stains,sooo,smear,sire,simone's,secondary,roughly,rituals,resentment,psychologist,preferred,pint,pension,passive,overhear,origin,orchestra,negotiations,mounted,morality,landingham,labs,kisser,jackson's,icy,hoot,holling,handshake,grilled,functioning,formality,elevators,edward's,depths,confirms,civilians,bypass,briefly,boathouse,binding,acres,accidental,westbridge,wacko,ulterior,transferring,tis,thugs,tangled,stirred,stefano's,sought,snag,smallest,sling,sleaze,seeds,rumour,ripe,remarried,reluctant,regularly,puddle,promote,precise,popularity,pins,perceptive,miraculous,memorable,maternal,lucinda's,longing,lockup,locals,librarian,job's,inspection,impressions,immoral,hypothetically,guarding,gourmet,gabe,fighters,fees,features,faxed,extortion,expressed,essentially,downright,digest,der,crosses,cranberry,city's,chorus,casualties,bygones,buzzing,burying,bikes,attended,allah,all's,weary,viewing,viewers,transmitter,taping,takeout,sweeping,stepmother,stating,stale,seating,seaborn,resigned,rating,prue's,pros,pepperoni,ownership,occurs,nicole's,newborn,merger,mandatory,malcolm's,ludicrous,jan's,injected,holden's,henry's,heating,geeks,forged,faults,expressing,eddie's,drue,dire,dief,desi,deceiving,centre,celebrities,caterer,calmed,businesses,budge,ashley's,applications,ankles,vending,typing,tribbiani,there're,squared,speculation,snowing,shades,sexist,scudder's,scattered,sanctuary,rewrite,regretted,regain,raises,processing,picky,orphan,mural,misjudged,miscarriage,memorize,marshall's,mark's,licensed,lens,leaking,launched,larry's,languages,judge's,jitters,invade,interruption,implied,illegally,handicapped,glitch,gittes,finer,fewer,engineered,distraught,dispose,dishonest,digs,dahlia's,dads,cruelty,conducting,clinical,circling,champions,canceling,butterflies,belongings,barbrady,amusement,allegations,alias,aging,zombies,where've,unborn,tri,swearing,stables,squeezed,spaulding's,slavery,sew,sensational,revolutionary,resisting,removing,radioactive,races,questionable,privileged,portofino,par,owning,overlook,overhead,orson,oddly,nazis,musicians,interrogate,instruments,imperative,impeccable,icu,hurtful,hors,heap,harley's,graduating,graders,glance,endangered,disgust,devious,destruct,demonstration,creates,crazier,countdown,coffee's,chump,cheeseburger,cat's,burglar,brotherhood,berries,ballroom,assumptions,ark,annoyed,allies,allergy,advantages,admirer,admirable,addresses,activate,accompany,wed,victoria's,valve,underpants,twit,triggered,teacher's,tack,strokes,stool,starr's,sham,seasons,sculpture,scrap,sailed,retarded,resourceful,remarkably,refresh,ranks,pressured,precautions,pointy,obligations,nightclub,mustache,month's,minority,mind's,maui,lace,isabella's,improving,iii,hunh,hubby,flare,fierce,farmers,dont,dokey,divided,demise,demanded,dangerously,crushing,considerable,complained,clinging,choked,chem,cheerleading,checkbook,cashmere,calmly,blush,believer,aspect,amazingly,alas,acute,a's,yak,whores,what've,tuition,trey's,tolerance,toilets,tactical,tacos,stairwell,spur,spirited,slower,sewing,separately,rubbed,restricted,punches,protects,partially,ole,nuisance,niagara,motherfuckers,mingle,mia's,kynaston,knack,kinkle,impose,hosting,harry's,gullible,grid,godmother,funniest,friggin,folding,financially,filming,fashions,eater,dysfunctional,drool,distinguished,defence,defeated,cruising,crude,criticize,corruption,contractor,conceive,clone,circulation,cedars,caliber,brighter,blinded,birthdays,bio,bill's,banquet,artificial,anticipate,annoy,achievement,whim,whichever,volatile,veto,vested,uncle's,supports,successfully,shroud,severely,rests,representation,quarantine,premiere,pleases,parent's,painless,pads,orphans,orphanage,offence,obliged,nip,niggers,negotiation,narcotics,nag,mistletoe,meddling,manifest,lookit,loo,lilah,investigated,intrigued,injustice,homicidal,hayward's,gigantic,exposing,elves,disturbance,disastrous,depended,demented,correction,cooped,colby's,cheerful,buyers,brownies,beverage,basics,attorney's,atm,arvin,arcade,weighs,upsets,unethical,tidy,swollen,sweaters,swap,stupidest,sensation,scalpel,rail,prototype,props,prescribed,pompous,poetic,ploy,paws,operates,objections,mushrooms,mulwray,monitoring,manipulation,lured,lays,lasting,kung,keg,jell,internship,insignificant,inmate,incentive,gandhi,fulfilled,flooded,expedition,evolution,discharged,disagreement,dine,dean's,crypt,coroner's,cornered,copied,confrontation,cds,catalogue,brightest,beethoven,banned,attendant,athlete,amaze,airlines,yogurt,wyndemere,wool,vocabulary,vcr,tulsa,tags,tactic,stuffy,slug,sexuality,seniors,segment,revelation,respirator,pulp,prop,producing,processed,pretends,polygraph,perp,pennies,ordinarily,opposition,olives,necks,morally,martyr,martial,lisa's,leftovers,joints,jimmy's,irs,invaded,imported,hopping,homey,hints,helicopters,heed,heated,heartbroken,gulf,greatly,forge,florist,firsthand,fiend,expanding,emma's,defenses,crippled,cousin's,corrected,conniving,conditioner,clears,chemo,bubbly,bladder,beeper,baptism,apb,answer's,anna's,angles,ache,womb,wiring,wench,weaknesses,volunteering,violating,unlocked,unemployment,tummy,tibet,threshold,surrogate,submarine,subid,stray,stated,startle,specifics,snob,slowing,sled,scoot,robbers,rightful,richest,quid,qfxmjrie,puffs,probable,pitched,pierced,pencils,paralysis,nuke,managing,makeover,luncheon,lords,linksynergy,jury's,jacuzzi,ish,interstate,hitched,historic,hangover,gasp,fracture,flock,firemen,drawings,disgusted,darned,coal,clams,chez,cables,broadcasting,brew,borrowing,banged,achieved,wildest,weirder,unauthorized,stunts,sleeves,sixties,shush,shalt,senora,rises,retro,quits,pupils,politicians,pegged,painfully,paging,outlet,omelet,observed,ned's,memorized,lawfully,jackets,interpretation,intercept,ingredient,grownup,glued,gaining,fulfilling,flee,enchanted,dvd,delusion,daring,conservative,conducted,compelling,charitable,carton,bronx,bridesmaids,bribed,boiling,bathrooms,bandage,awareness,awaiting,assign,arrogance,antiques,ainsley,turkeys,travelling,trashing,tic,takeover,sync,supervision,stockings,stalked,stabilized,spacecraft,slob,skates,sirs,sedated,robes,reviews,respecting,rat's,psyche,prominent,prizes,presumptuous,prejudice,platoon,permitted,paragraph,mush,mum's,movements,mist,missions,mints,mating,mantan,lorne,lord's,loads,listener,legendary,itinerary,hugs,hepatitis,heave,guesses,gender,flags,fading,exams,examining,elizabeth's,egyptian,dumbest,dishwasher,dimera's,describing,deceive,cunning,cripple,cove,convictions,congressional,confided,compulsive,compromising,burglary,bun,bumpy,brainwashed,benes,arnie,alvy,affirmative,adrenaline,adamant,watchin,waitresses,uncommon,treaty,transgenic,toughest,toby's,surround,stormed,spree,spilling,spectacle,soaking,significance,shreds,sewers,severed,scarce,scamming,scalp,sami's,salem's,rewind,rehearsing,pretentious,potions,possessions,planner,placing,periods,overrated,obstacle,notices,nerds,meems,medieval,mcmurphy,maturity,maternity,masses,maneuver,lyin,loathe,lawyer's,irv,investigators,hep,grin,gospel,gals,formation,fertility,facilities,exterior,epidemic,eloping,ecstatic,ecstasy,duly,divorcing,distribution,dignan,debut,costing,coaching,clubhouse,clot,clocks,classical,candid,bursting,breather,braces,bennett's,bending,australian,attendance,arsonist,applies,adored,accepts,absorb,vacant,uuh,uphold,unarmed,turd,topolsky,thrilling,thigh,terminate,tempo,sustain,spaceship,snore,sneeze,smuggling,shrine,sera,scott's,salty,salon,ramp,quaint,prostitution,prof,policies,patronize,patio,nasa,morbid,marlo's,mamma,locations,licence,kettle,joyous,invincible,interpret,insecurities,insects,inquiry,infamous,impulses,illusions,holed,glen's,fragments,forrester's,exploit,economics,drivin,des,defy,defenseless,dedicate,cradle,cpr,coupon,countless,conjure,confined,celebrated,cardboard,booking,blur,bleach,ban,backseat,austin's,alternatives,afterward,accomplishment,wordsworth,wisely,wildlife,valet,vaccine,urges,unnatural,unlucky,truths,traumatized,tit,tennessee,tasting,swears,strawberries,steaks,stats,skank,seducing,secretive,screwdriver,schedules,rooting,rightfully,rattled,qualifies,puppets,provides,prospects,pronto,prevented,powered,posse,poorly,polling,pedestal,palms,muddy,morty,miniature,microscope,merci,margin,lecturing,inject,incriminate,hygiene,hospital's,grapefruit,gazebo,funnier,freight,flooding,equivalent,eliminated,elaine's,dios,deacon's,cuter,continental,container,cons,compensation,clap,cbs,cavity,caves,capricorn,canvas,calculations,bossy,booby,bacteria,aides,zende,winthrop,wider,warrants,valentines,undressed,underage,truthfully,tampered,suffers,stored,statute,speechless,sparkling,sod,socially,sidelines,shrek,sank,roy's,raul's,railing,puberty,practices,pesky,parachute,outrage,outdoors,operated,openly,nominated,motions,moods,lunches,litter,kidnappers,itching,intuition,index,imitation,icky,humility,hassling,gallons,firmly,excessive,evolved,employ,eligible,elections,elderly,drugstore,dosage,disrupt,directing,dipping,deranged,debating,cuckoo,cremated,craziness,cooperating,compatible,circumstantial,chimney,bonnie's,blinking,biscuits,belgium,arise,analyzed,admiring,acquire,accounted,willow's,weeping,volumes,views,triad,trashy,transaction,tilt,soothing,slumber,slayers,skirts,siren,ship's,shindig,sentiment,sally's,rosco,riddance,rewarded,quaid,purity,proceeding,pretzels,practiced,politician,polar,panicking,overall,occupation,naming,minimal,mckechnie,massacre,marah's,lovin,leaked,layers,isolation,intruding,impersonating,ignorance,hoop,hamburgers,gwen's,fruits,footprints,fluke,fleas,festivities,fences,feisty,evacuate,emergencies,diabetes,detained,democrat,deceived,creeping,craziest,corpses,conned,coincidences,charleston,bums,brussels,bounced,bodyguards,blasted,bitterness,baloney,ashtray,apocalypse,advances,zillion,watergate,wallpaper,viable,tory's,tenants,telesave,sympathize,sweeter,swam,sup,startin,stages,spencer's,sodas,snowed,sleepover,signor,seein,reviewing,reunited,retainer,restroom,rested,replacing,repercussions,reliving,reef,reconciliation,reconcile,recognise,prevail,preaching,planting,overreact,oof,omen,o'neil,numerous,noose,moustache,morning's,manicure,maids,mah,lorelei's,landlady,hypothetical,hopped,homesick,hives,hesitation,herbs,hectic,heartbreak,haunting,gangs,frown,fingerprint,extract,expired,exhausting,exchanged,exceptional,everytime,encountered,disregard,daytime,cooperative,constitutional,cling,chevron,chaperone,buenos,blinding,bitty,beads,battling,badgering,anticipation,advocate,zander's,waterfront,upstanding,unprofessional,unity,unhealthy,undead,turmoil,truthful,toothpaste,tippin,thoughtless,tagataya,stretching,strategic,spun,shortage,shooters,sheriff's,shady,senseless,sailors,rewarding,refuge,rapid,rah,pun,propane,pronounced,preposterous,pottery,portable,pigeons,pastry,overhearing,ogre,obscene,novels,negotiable,mtv,morgan's,monthly,loner,leisure,leagues,jogging,jaws,itchy,insinuating,insides,induced,immigration,hospitality,hormone,hilda's,hearst,grandpa's,frequently,forthcoming,fists,fifties,etiquette,endings,elevated,editing,dunk,distinction,disabled,dibs,destroys,despises,desired,designers,deprived,dancers,dah,cuddy,crust,conductor,communists,cloak,circumstance,chewed,casserole,bora,bidder,bearer,assessment,artoo,applaud,appalling,amounts,admissions,withdrawal,weights,vowed,virgins,vigilante,vatican,undone,trench,touchdown,throttle,thaw,tha,testosterone,tailor,symptom,swoop,suited,suitcases,stomp,sticker,stakeout,spoiling,snatched,smoochy,smitten,shameless,restraints,researching,renew,relay,regional,refund,reclaim,rapids,raoul,rags,puzzles,purposely,punks,prosecuted,plaid,pineapple,picturing,pickin,pbs,parasites,offspring,nyah,mysteriously,multiply,mineral,masculine,mascara,laps,kramer's,jukebox,interruptions,hoax,gunfire,gays,furnace,exceptions,engraved,elbows,duplicate,drapes,designated,deliberate,deli,decoy,cub,cryptic,crowds,critics,coupla,convert,conventional,condemn,complicate,combine,colossal,clerks,clarity,cassadine's,byes,brushed,bride's,banished,arrests,argon,andy's,alarmed,worships,versa,uncanny,troop,treasury,transformation,terminated,telescope,technicality,sydney's,sundae,stumble,stripping,shuts,separating,schmuck,saliva,robber,retain,remained,relentless,reconnect,recipes,rearrange,ray's,rainy,psychiatrists,producers,policemen,plunge,plugged,patched,overload,ofc,obtained,obsolete,o'malley,numbered,number's,nay,moth,module,mkay,mindless,menus,lullaby,lotte,leavin,layout,knob,killin,karinsky,irregular,invalid,hides,grownups,griff,flaws,flashy,flaming,fettes,evicted,epic,encoded,dread,dil,degrassi,dealings,dangers,cushion,console,concluded,casey's,bowel,beginnings,barged,apes,announcing,amanda's,admits,abroad,abide,abandoning,workshop,wonderfully,woak,warfare,wait'll,wad,violate,turkish,tim's,ter,targeted,susan's,suicidal,stayin,sorted,slamming,sketchy,shoplifting,shapes,selected,sarah's,retiring,raiser,quizmaster,pursued,pupkin,profitable,prefers,politically,phenomenon,palmer's,olympics,needless,nature's,mutt,motherhood,momentarily,migraine,lizzie's,lilo,lifts,leukemia,leftover,law's,keepin,idol,hinks,hellhole,h'mm,gowns,goodies,gallon,futures,friction,finale,farms,extraction,entertained,electronics,eighties,earth's,dmv,darker,daniel's,cum,conspiring,consequence,cheery,caps,calf,cadet,builds,benign,barney's,aspects,artillery,apiece,allison's,aggression,adjustments,abusive,abduction,wiping,whipping,welles,unspeakable,unlimited,unidentified,trivial,transcripts,threatens,textbook,tenant,supervise,superstitious,stricken,stretched,story's,stimulating,steep,statistics,spielberg,sodium,slices,shelves,scratches,saudi,sabotaged,roxy's,retrieval,repressed,relation,rejecting,quickie,promoting,ponies,peeking,paw,paolo,outraged,observer,o'connell,moping,moaning,mausoleum,males,licked,kovich,klutz,iraq,interrogating,interfered,intensive,insulin,infested,incompetence,hyper,horrified,handedly,hacked,guiding,glamour,geoff,gekko,fraid,fractured,formerly,flour,firearms,fend,executives,examiner,evaluate,eloped,duke's,disoriented,delivers,dashing,crystals,crossroads,crashdown,court's,conclude,coffees,cockroach,climate,chipped,camps,brushing,boulevard,bombed,bolts,begs,baths,baptized,astronaut,assurance,anemia,allegiance,aiming,abuela,abiding,workplace,withholding,weave,wearin,weaker,warnings,usa,tours,thesis,terrorism,suffocating,straws,straightforward,stench,steamed,starboard,sideways,shrinks,shortcut,sean's,scram,roasted,roaming,riviera,respectfully,repulsive,recognizes,receiver,psychiatry,provoked,penitentiary,peed,pas,painkillers,oink,norm,ninotchka,muslim,montgomery's,mitzvah,milligrams,mil,midge,marshmallows,markets,macy's,looky,lapse,kubelik,knit,jeb,investments,intellect,improvise,implant,hometown,hanged,handicap,halo,governor's,goa'ulds,giddy,gia's,geniuses,fruitcake,footing,flop,findings,fightin,fib,editorial,drinkin,doork,discovering,detour,danish,cuddle,crashes,coordinate,combo,colonnade,collector,cheats,cetera,canadians,bip,bailiff,auditioning,assed,amused,alienate,algebra,alexi,aiding,aching,woe,wah,unwanted,typically,tug,topless,tongues,tiniest,them's,symbols,superiors,soy,soften,sheldrake,sensors,seller,seas,ruler,rival,rips,renowned,recruiting,reasoning,rawley,raisins,racial,presses,preservation,portfolio,oversight,organizing,obtain,observing,nessa,narrowed,minions,midwest,meth,merciful,manages,magistrate,lawsuits,labour,invention,intimidating,infirmary,indicated,inconvenient,imposter,hugged,honoring,holdin,hades,godforsaken,fumes,forgery,foremost,foolproof,folder,folded,flattery,fingertips,financing,fifteenth,exterminator,explodes,eccentric,drained,dodging,documented,disguised,developments,currency,crafts,constructive,concealed,compartment,chute,chinpokomon,captains,capitol,calculated,buses,bodily,astronauts,alimony,accustomed,accessories,abdominal,zen,zach's,wrinkle,wallow,viv,vicinity,venue,valued,valium,valerie's,upgrade,upcoming,untrue,uncover,twig,twelfth,trembling,treasures,torched,toenails,timed,termites,telly,taunting,taransky,tar,talker,succubus,statues,smarts,sliding,sizes,sighting,semen,seizures,scarred,savvy,sauna,saddest,sacrificing,rubbish,riled,ricky's,rican,revive,recruit,ratted,rationally,provenance,professors,prestigious,pms,phonse,perky,pedal,overdose,organism,nasal,nanites,mushy,movers,moot,missus,midterm,merits,melodramatic,manure,magnetic,knockout,knitting,jig,invading,interpol,incapacitated,idle,hotline,horse's,highlight,hauling,hair's,gunpoint,greenwich,grail,ganza,framing,formally,fleeing,flap,flannel,fin,fibers,faded,existing,email,eavesdrop,dwelling,dwarf,donations,detected,desserts,dar,corporations,constellation,collision,chic,calories,businessmen,buchanan's,breathtaking,bleak,blacked,batter,balanced,ante,aggravated,agencies,abu,yanked,wuh,withdrawn,wigand,whoah,wham,vocal,unwind,undoubtedly,unattractive,twitch,trimester,torrance,timetable,taxpayers,strained,stationed,stared,slapping,sincerity,signatures,siding,siblings,shit's,shenanigans,shacking,seer,satellites,sappy,samaritan,rune,regained,rebellion,proceeds,privy,power's,poorer,politely,paste,oysters,overruled,olaf,nightcap,networks,necessity,mosquito,millimeter,michelle's,merrier,massachusetts,manuscript,manufacture,manhood,lunar,lug,lucked,loaned,kilos,ignition,hurl,hauled,harmed,goodwill,freshmen,forming,fenmore,fasten,farce,failures,exploding,erratic,elm,drunks,ditching,d'artagnan,crops,cramped,contacting,coalition,closets,clientele,chimp,cavalry,casa,cabs,bled,bargained,arranging,archives,anesthesia,amuse,altering,afternoons,accountable,abetting,wrinkles,wolek,waved,unite,uneasy,unaware,ufo,toot,toddy,tens,tattooed,tad's,sway,stained,spauldings,solely,sliced,sirens,schibetta,scatter,rumours,roger's,robbie's,rinse,remo,remedy,redemption,queen's,progressive,pleasures,picture's,philosopher,pacey's,optimism,oblige,natives,muy,measuring,measured,masked,mascot,malicious,mailing,luca,lifelong,kosher,koji,kiddies,judas,isolate,intercepted,insecurity,initially,inferior,incidentally,ifs,hun,heals,headlights,guided,growl,grilling,glazed,gem,gel,gaps,fundamental,flunk,floats,fiery,fairness,exercising,excellency,evenings,ere,enrolled,disclosure,det,department's,damp,curling,cupboard,counterfeit,cooling,condescending,conclusive,clicked,cleans,cholesterol,chap,cashed,brow,broccoli,brats,blueprints,blindfold,biz,billing,barracks,attach,aquarium,appalled,altitude,alrighty,aimed,yawn,xander's,wynant,winslow's,welcomed,violations,upright,unsolved,unreliable,toots,tighten,symbolic,sweatshirt,steinbrenner,steamy,spouse,sox,sonogram,slowed,slots,sleepless,skeleton,shines,roles,retaliate,representatives,rephrase,repeated,renaissance,redeem,rapidly,rambling,quilt,quarrel,prying,proverbial,priced,presiding,presidency,prescribe,prepped,pranks,possessive,plaintiff,philosophical,pest,persuaded,perk,pediatrics,paige's,overlooked,outcast,oop,odor,notorious,nightgown,mythology,mumbo,monitored,mediocre,master's,mademoiselle,lunchtime,lifesaver,legislation,leaned,lambs,lag,killings,interns,intensity,increasing,identities,hounding,hem,hellmouth,goon,goner,ghoul,germ,gardening,frenzy,foyer,food's,extras,extinct,exhibition,exaggerate,everlasting,enlightened,drilling,doubles,digits,dialed,devote,defined,deceitful,d'oeuvres,csi,cosmetic,contaminated,conspired,conning,colonies,cerebral,cavern,cathedral,carving,butting,boiled,blurry,beams,barf,babysit,assistants,ascension,architecture,approaches,albums,albanian,aaaaah,wildly,whoopee,whiny,weiskopf,walkie,vultures,veteran,vacations,upfront,unresolved,tile,tampering,struggled,stockholders,specially,snaps,sleepwalking,shrunk,sermon,seeks,seduction,scenarios,scams,ridden,revolve,repaired,regulation,reasonably,reactor,quotes,preserved,phenomenal,patrolling,paranormal,ounces,omigod,offs,nonstop,nightfall,nat,militia,meeting's,logs,lineup,libby's,lava,lashing,labels,kilometers,kate's,invites,investigative,innocents,infierno,incision,import,implications,humming,highlights,haunts,greeks,gloss,gloating,general's,frannie,flute,fled,fitted,finishes,fiji,fetal,feeny,entrapment,edit,dyin,download,discomfort,dimensions,detonator,dependable,deke,decree,dax,cot,confiscated,concludes,concede,complication,commotion,commence,chulak,caucasian,casually,canary,brainer,bolie,ballpark,arm's,anwar,anatomy,analyzing,accommodations,yukon,youse,wring,wharf,wallowing,uranium,unclear,treason,transgenics,thrive,think's,thermal,territories,tedious,survives,stylish,strippers,sterile,squeezing,squeaky,sprained,solemn,snoring,sic,shifting,shattering,shabby,seams,scrawny,rotation,risen,revoked,residue,reeks,recite,reap,ranting,quoting,primal,pressures,predicament,precision,plugs,pits,pinpoint,petrified,petite,persona,pathological,passports,oughtta,nods,nighter,navigate,nashville,namely,museums,morale,milwaukee,meditation,mathematics,martin's,malta,logan's,latter,kippie,jackie's,intrigue,intentional,insufferable,incomplete,inability,imprisoned,hup,hunky,how've,horrifying,hearty,headmaster,hath,har,hank's,handbook,hamptons,grazie,goof,george's,funerals,fuck's,fraction,forks,finances,fetched,excruciating,enjoyable,enhanced,enhance,endanger,efficiency,dumber,drying,diabolical,destroyer,desirable,defendants,debris,darts,cuisine,cucumber,cube,crossword,contestant,considers,comprehend,club's,clipped,classmates,choppers,certificates,carmen's,canoe,candlelight,building's,brutally,brutality,boarded,bathrobe,backward,authorize,audrey's,atom,assemble,appeals,airports,aerobics,ado,abbott's,wholesome,whiff,vessels,vermin,varsity,trophies,trait,tragically,toying,titles,tissues,testy,team's,tasteful,surge,sun's,studios,strips,stocked,stephen's,staircase,squares,spinach,sow,southwest,southeast,sookie's,slayer's,sipping,singers,sidetracked,seldom,scrubbing,scraping,sanctity,russell's,ruse,robberies,rink,ridin,retribution,reinstated,refrain,rec,realities,readings,radiant,protesting,projector,posed,plutonium,plaque,pilar's,payin,parting,pans,o'reilly,nooooo,motorcycles,motherfucking,mein,measly,marv,manic,line's,lice,liam,lenses,lama,lalita,juggling,jerking,jamie's,intro,inevitably,imprisonment,hypnosis,huddle,horrendous,hobbies,heavier,heartfelt,harlin,hairdresser,grub,gramps,gonorrhea,gardens,fussing,fragment,fleeting,flawless,flashed,fetus,exclusively,eulogy,equality,enforce,distinctly,disrespectful,denies,crossbow,crest,cregg,crabs,cowardly,countess,contrast,contraction,contingency,consulted,connects,confirming,condone,coffins,cleansing,cheesecake,certainty,captain's,cages,c'est,briefed,brewing,bravest,bosom,boils,binoculars,bachelorette,aunt's,atta,assess,appetizer,ambushed,alerted,woozy,withhold,weighed,vulgar,viral,utmost,unusually,unleashed,unholy,unhappiness,underway,uncovered,unconditional,typewriter,typed,twists,sweeps,supervised,supermodel,suburbs,subpoenaed,stringing,snyder's,snot,skeptical,skateboard,shifted,secret's,scottish,schoolgirl,romantically,rocked,revoir,reviewed,respiratory,reopen,regiment,reflects,refined,puncture,pta,prone,produces,preach,pools,polished,pods,planetarium,penicillin,peacefully,partner's,nurturing,nation's,more'n,monastery,mmhmm,midgets,marklar,machinery,lodged,lifeline,joanna's,jer,jellyfish,infiltrate,implies,illegitimate,hutch,horseback,henri,heist,gents,frickin,freezes,forfeit,followers,flakes,flair,fathered,fascist,eternally,eta,epiphany,enlisted,eleventh,elect,effectively,dos,disgruntled,discrimination,discouraged,delinquent,decipher,danvers,dab,cubes,credible,coping,concession,cnn,clash,chills,cherished,catastrophe,caretaker,bulk,bras,branches,bombshell,birthright,billionaire,awol,ample,alumni,affections,admiration,abbotts,zelda's,whatnot,watering,vinegar,vietnamese,unthinkable,unseen,unprepared,unorthodox,underhanded,uncool,transmitted,traits,timeless,thump,thermometer,theoretically,theoretical,testament,tapping,tagged,tac,synthetic,syndicate,swung,surplus,supplier,stares,spiked,soviets,solves,smuggle,scheduling,scarier,saucer,reinforcements,recruited,rant,quitter,prudent,projection,previously,powdered,poked,pointers,placement,peril,penetrate,penance,patriotic,passions,opium,nudge,nostrils,nevermind,neurological,muslims,mow,momentum,mockery,mobster,mining,medically,magnitude,maggie's,loudly,listing,killer's,kar,jim's,insights,indicted,implicate,hypocritical,humanly,holiness,healthier,hammered,haldeman,gunman,graphic,gloom,geography,gary's,freshly,francs,formidable,flunked,flawed,feminist,faux,ewww,escorted,escapes,emptiness,emerge,drugging,dozer,doc's,directorate,diana's,derevko,deprive,deodorant,cryin,crusade,crocodile,creativity,controversial,commands,coloring,colder,cognac,clocked,clippings,christine's,chit,charades,chanting,certifiable,caterers,brute,brochures,briefs,bran,botched,blinders,bitchin,bauer's,banter,babu,appearing,adequate,accompanied,abrupt,abdomen,zones,wooo,woken,winding,vip,venezuela,unanimous,ulcer,tread,thirteenth,thankfully,tame,tabby's,swine,swimsuit,swans,suv,stressing,steaming,stamped,stabilize,squirm,spokesman,snooze,shuffle,shredded,seoul,seized,seafood,scratchy,savor,sadistic,roster,rica,rhetorical,revlon,realist,reactions,prosecuting,prophecies,prisons,precedent,polyester,petals,persuasion,paddles,o'leary,nuthin,neighbour,negroes,naval,mute,muster,muck,minnesota,meningitis,matron,mastered,markers,maris's,manufactured,lot's,lockers,letterman,legged,launching,lanes,journals,indictment,indicating,hypnotized,housekeeping,hopelessly,hmph,hallucinations,grader,goldilocks,girly,furthermore,frames,flask,expansion,envelopes,engaging,downside,doves,doorknob,distinctive,dissolve,discourage,disapprove,diabetic,departed,deliveries,decorator,deaq,crossfire,criminally,containment,comrades,complimentary,commitments,chum,chatter,chapters,catchy,cashier,cartel,caribou,cardiologist,bull's,buffer,brawl,bowls,booted,boat's,billboard,biblical,barbershop,awakening,aryan,angst,administer,acquitted,acquisition,aces,accommodate,zellie,yield,wreak,witch's,william's,whistles,wart,vandalism,vamps,uterus,upstate,unstoppable,unrelated,understudy,tristin,transporting,transcript,tranquilizer,trails,trafficking,toxins,tonsils,timing's,therapeutic,tex,subscription,submitted,stephanie's,stempel,spotting,spectator,spatula,soho,softer,snotty,slinging,showered,sexiest,sensual,scoring,sadder,roam,rimbaud,rim,rewards,restrain,resilient,remission,reinstate,rehash,recollection,rabies,quinn's,presenting,preference,prairie,popsicle,plausible,plantation,pharmaceutical,pediatric,patronizing,patent,participation,outdoor,ostrich,ortolani,oooooh,omelette,neighbor's,neglect,nachos,movie's,mixture,mistrial,mio,mcginty's,marseilles,mare,mandate,malt,luv,loophole,literary,liberation,laughin,lacey's,kevvy,jah,irritated,intends,initiation,initiated,initiate,influenced,infidelity,indigenous,inc,idaho,hypothermia,horrific,hive,heroine,groupie,grinding,graceful,government's,goodspeed,gestures,gah,frantic,extradition,evil's,engineers,echelon,earning,disks,discussions,demolition,definitive,dawnie,dave's,date's,dared,dan's,damsel,curled,courtyard,constitutes,combustion,collective,collateral,collage,col,chant,cassette,carol's,carl's,calculating,bumping,britain,bribes,boardwalk,blinds,blindly,bleeds,blake's,bickering,beasts,battlefield,bankruptcy,backside,avenge,apprehended,annie's,anguish,afghanistan,acknowledged,abusing,youthful,yells,yanking,whomever,when'd,waterfall,vomiting,vine,vengeful,utility,unpacking,unfamiliar,undying,tumble,trolls,treacherous,todo,tipping,tantrum,tanked,summons,strategies,straps,stomped,stinkin,stings,stance,staked,squirrels,sprinkles,speculate,specialists,sorting,skinned,sicko,sicker,shootin,shep,shatter,seeya,schnapps,s'posed,rows,rounded,ronee,rite,revolves,respectful,resource,reply,rendered,regroup,regretting,reeling,reckoned,rebuilding,randy's,ramifications,qualifications,pulitzer,puddy,projections,preschool,pots,potassium,plissken,platonic,peter's,permalash,performer,peasant,outdone,outburst,ogh,obscure,mutants,mugging,molecules,misfortune,miserably,miraculously,medications,medals,margaritas,manpower,lovemaking,long's,logo,logically,leeches,latrine,lamps,lacks,kneel,johnny's,jenny's,inflict,impostor,icon,hypocrisy,hype,hosts,hippies,heterosexual,heightened,hecuba's,hecuba,healer,habitat,gunned,grooming,groo,groin,gras,gory,gooey,gloomy,frying,friendships,fredo,foil,fishermen,firepower,fess,fathom,exhaustion,evils,epi,endeavor,ehh,eggnog,dreaded,drafted,dimensional,detached,deficit,d'arcy,crotch,coughing,coronary,cookin,contributed,consummate,congrats,concerts,companionship,caved,caspar,bulletproof,bris,brilliance,breakin,brash,blasting,beak,arabia,analyst,aluminum,aloud,alligator,airtight,advising,advertise,adultery,administered,aches,abstract,aahh,wronged,wal,voluntary,ventilation,upbeat,uncertainty,trot,trillion,tricia's,trades,tots,tol,tightly,thingies,tending,technician,tarts,surreal,summer's,strengths,specs,specialize,spat,spade,slogan,sloane's,shrew,shaping,seth's,selves,seemingly,schoolwork,roomie,requirements,redundant,redo,recuperating,recommendations,ratio,rabid,quart,pseudo,provocative,proudly,principal's,pretenses,prenatal,pillar,photographers,photographed,pharmaceuticals,patron,pacing,overworked,originals,nicotine,newsletter,neighbours,murderous,miller's,mileage,mechanics,mayonnaise,massages,maroon,lucrative,losin,lil,lending,legislative,kat,juno,iran,interrogated,instruction,injunction,impartial,homing,heartbreaker,harm's,hacks,glands,giver,fraizh,flows,flips,flaunt,excellence,estimated,espionage,englishman,electrocuted,eisenhower,dusting,ducking,drifted,donna's,donating,dom,distribute,diem,daydream,cylon,curves,crutches,crates,cowards,covenant,converted,contributions,composed,comfortably,cod,cockpit,chummy,chitchat,childbirth,charities,businesswoman,brood,brewery,bp's,blatant,bethy,barring,bagged,awakened,assumes,assembled,asbestos,arty,artwork,arc,anthony's,aka,airplanes,accelerated,worshipped,winnings,why're,whilst,wesley's,volleyball,visualize,unprotected,unleash,unexpectedly,twentieth,turnpike,trays,translated,tones,three's,thicker,therapists,takeoff,sums,stub,streisand,storm's,storeroom,stethoscope,stacked,sponsors,spiteful,solutions,sneaks,snapping,slaughtered,slashed,simplest,silverware,shits,secluded,scruples,scrubs,scraps,scholar,ruptured,rubs,roaring,relying,reflected,refers,receptionist,recap,reborn,raisin,rainforest,rae's,raditch,radiator,pushover,pout,plastered,pharmacist,petroleum,perverse,perpetrator,passages,ornament,ointment,occupy,nineties,napping,nannies,mousse,mort,morocco,moors,momentary,modified,mitch's,misunderstandings,marina's,marcy's,marched,manipulator,malfunction,loot,limbs,latitude,lapd,laced,kivar,kickin,interface,infuriating,impressionable,imposing,holdup,hires,hick,hesitated,hebrew,hearings,headphones,hammering,groundwork,grotesque,greenhouse,gradually,graces,genetics,gauze,garter,gangsters,g's,frivolous,freelance,freeing,fours,forwarding,feud,ferrars,faulty,fantasizing,extracurricular,exhaust,empathy,educate,divorces,detonate,depraved,demeaning,declaring,deadlines,dea,daria's,dalai,cursing,cufflink,crows,coupons,countryside,coo,consultation,composer,comply,comforted,clive,claustrophobic,chef's,casinos,caroline's,capsule,camped,cairo,busboy,bred,bravery,bluth,biography,berserk,bennetts,baskets,attacker,aplastic,angrier,affectionate,zit,zapped,yorker,yarn,wormhole,weaken,vat,unrealistic,unravel,unimportant,unforgettable,twain,tv's,tush,turnout,trio,towed,tofu,textbooks,territorial,suspend,supplied,superbowl,sundays,stutter,stewardess,stepson,standin,sshh,specializes,spandex,souvenirs,sociopath,snails,slope,skeletons,shivering,sexier,sequel,sensory,selfishness,scrapbook,romania,riverside,rites,ritalin,rift,ribbons,reunite,remarry,relaxation,reduction,realization,rattling,rapist,quad,pup,psychosis,promotions,presumed,prepping,posture,poses,pleasing,pisses,piling,photographic,pfft,persecuted,pear,part's,pantyhose,padded,outline,organizations,operatives,oohh,obituary,northeast,nina's,neural,negotiator,nba,natty,nathan's,minimize,merl,menopause,mennihan,marty's,martimmys,makers,loyalties,literal,lest,laynie,lando,justifies,josh's,intimately,interact,integrated,inning,inexperienced,impotent,immortality,imminent,ich,horrors,hooky,holders,hinges,heartbreaking,handcuffed,gypsies,guacamole,grovel,graziella,goggles,gestapo,fussy,functional,filmmaker,ferragamo,feeble,eyesight,explosions,experimenting,enzo's,endorsement,enchanting,eee,ed's,duration,doubtful,dizziness,dismantle,disciplinary,disability,detectors,deserving,depot,defective,decor,decline,dangling,dancin,crumble,criteria,creamed,cramping,cooled,conceal,component,competitors,clockwork,clark's,circuits,chrissakes,chrissake,chopping,cabinets,buttercup,brooding,bonfire,blurt,bluestar,bloated,blackmailer,beforehand,bathed,bathe,barcode,banjo,banish,badges,babble,await,attentive,artifacts,aroused,antibodies,animosity,administrator,accomplishments,ya'll,wrinkled,wonderland,willed,whisk,waltzing,waitressing,vis,vin,vila,vigilant,upbringing,unselfish,unpopular,unmarried,uncles,trendy,trajectory,targeting,surroundings,stun,striped,starbucks,stamina,stalled,staking,stag,spoils,snuff,snooty,snide,shrinking,senorita,securities,secretaries,scrutiny,scoundrel,saline,salads,sails,rundown,roz's,roommate's,riddles,responses,resistant,requirement,relapse,refugees,recommending,raspberry,raced,prosperity,programme,presumably,preparations,posts,pom,plight,pleaded,pilot's,peers,pecan,particles,pantry,overturned,overslept,ornaments,opposing,niner,nfl,negligent,negligence,nailing,mutually,mucho,mouthed,monstrous,monarchy,minsk,matt's,mateo's,marking,manufacturing,manager's,malpractice,maintaining,lowly,loitering,logged,lingering,light's,lettin,lattes,kim's,kamal,justification,juror,junction,julie's,joys,johnson's,jillefsky,jacked,irritate,intrusion,inscription,insatiable,infect,inadequate,impromptu,icing,hmmmm,hefty,grammar,generate,gdc,gasket,frightens,flapping,firstborn,fire's,fig,faucet,exaggerated,estranged,envious,eighteenth,edible,downward,dopey,doesn,disposition,disposable,disasters,disappointments,dipped,diminished,dignified,diaries,deported,deficiency,deceit,dealership,deadbeat,curses,coven,counselors,convey,consume,concierge,clutches,christians,cdc,casbah,carefree,callous,cahoots,caf,brotherly,britches,brides,bop,bona,bethie,beige,barrels,ballot,ave,autographed,attendants,attachment,attaboy,astonishing,ashore,appreciative,antibiotic,aneurysm,afterlife,affidavit,zuko,zoning,work's,whats,whaddaya,weakened,watermelon,vasectomy,unsuspecting,trial's,trailing,toula,topanga,tonio,toasted,tiring,thereby,terrorized,tenderness,tch,tailing,syllable,sweats,suffocated,sucky,subconsciously,starvin,staging,sprouts,spineless,sorrows,snowstorm,smirk,slicery,sledding,slander,simmer,signora,sigmund,siege,siberia,seventies,sedate,scented,sampling,sal's,rowdy,rollers,rodent,revenue,retraction,resurrection,resigning,relocate,releases,refusal,referendum,recuperate,receptive,ranking,racketeering,queasy,proximity,provoking,promptly,probability,priors,princes,prerogative,premed,pornography,porcelain,poles,podium,pinched,pig's,pendant,packet,owner's,outsiders,outpost,orbing,opportunist,olanov,observations,nurse's,nobility,neurologist,nate's,nanobot,muscular,mommies,molested,misread,melon,mediterranean,mea,mastermind,mannered,maintained,mackenzie's,liberated,lesions,lee's,laundromat,landscape,lagoon,labeled,jolt,intercom,inspect,insanely,infrared,infatuation,indulgent,indiscretion,inconsiderate,incidents,impaired,hurrah,hungarian,howling,honorary,herpes,hasta,harassed,hanukkah,guides,groveling,groosalug,geographic,gaze,gander,galactica,futile,fridays,flier,fixes,fide,fer,feedback,exploiting,exorcism,exile,evasive,ensemble,endorse,emptied,dreary,dreamy,downloaded,dodged,doctored,displayed,disobeyed,disneyland,disable,diego's,dehydrated,defect,customary,csc,criticizing,contracted,contemplating,consists,concepts,compensate,commonly,colours,coins,coconuts,cockroaches,clogged,cincinnati,churches,chronicle,chilling,chaperon,ceremonies,catalina's,cant,cameraman,bulbs,bucklands,bribing,brava,bracelets,bowels,bobby's,bmw,bluepoint,baton,barred,balm,audit,astronomy,aruba,appetizers,appendix,antics,anointed,analogy,almonds,albuquerque,abruptly,yore,yammering,winch,white's,weston's,weirdness,wangler,vibrations,vendor,unmarked,unannounced,twerp,trespass,tres,travesty,transported,transfusion,trainee,towelie,topics,tock,tiresome,thru,theatrical,terrain,suspect's,straightening,staggering,spaced,sonar,socializing,sitcom,sinus,sinners,shambles,serene,scraped,scones,scepter,sarris,saberhagen,rouge,rigid,ridiculously,ridicule,reveals,rents,reflecting,reconciled,rate's,radios,quota,quixote,publicist,pubes,prune,prude,provider,propaganda,prolonged,projecting,prestige,precrime,postponing,pluck,perpetual,permits,perish,peppermint,peeled,particle,parliament,overdo,oriented,optional,nutshell,notre,notions,nostalgic,nomination,mulan,mouthing,monkey's,mistook,mis,milhouse,mel's,meddle,maybourne,martimmy,loon,lobotomy,livelihood,litigation,lippman,likeness,laurie's,kindest,kare,kaffee,jocks,jerked,jeopardizing,jazzed,investing,insured,inquisition,inhale,ingenious,inflation,incorrect,igby,ideals,holier,highways,hereditary,helmets,heirloom,heinous,haste,harmsway,hardship,hanky,gutters,gruesome,groping,governments,goofing,godson,glare,garment,founding,fortunes,foe,finesse,figuratively,ferrie,fda,external,examples,evacuation,ethnic,est,endangerment,enclosed,emphasis,dyed,dud,dreading,dozed,dorky,dmitri,divert,dissertation,discredit,director's,dialing,describes,decks,cufflinks,crutch,creator,craps,corrupted,coronation,contemporary,consumption,considerably,comprehensive,cocoon,cleavage,chile,carriers,carcass,cannery,bystander,brushes,bruising,bribery,brainstorm,bolted,binge,bart's,barracuda,baroness,ballistics,b's,astute,arroway,arabian,ambitions,alexandra's,afar,adventurous,adoptive,addicts,addictive,accessible,yadda,wilson's,wigs,whitelighters,wematanye,weeds,wedlock,wallets,walker's,vulnerability,vroom,vibrant,vertical,vents,uuuh,urgh,upped,unsettling,unofficial,unharmed,underlying,trippin,trifle,tracing,tox,tormenting,timothy's,threads,theaters,thats,tavern,taiwan,syphilis,susceptible,summary,suites,subtext,stickin,spices,sores,smacked,slumming,sixteenth,sinks,signore,shitting,shameful,shacked,sergei,septic,seedy,security's,searches,righteousness,removal,relish,relevance,rectify,recruits,recipient,ravishing,quickest,pupil,productions,precedence,potent,pooch,pledged,phoebs,perverted,peeing,pedicure,pastrami,passionately,ozone,overlooking,outnumbered,outlook,oregano,offender,nukes,novelty,nosed,nighty,nifty,mugs,mounties,motivate,moons,misinterpreted,miners,mercenary,mentality,mas,marsellus,mapped,malls,lupus,lumbar,lovesick,longitude,lobsters,likelihood,leaky,laundering,latch,japs,jafar,instinctively,inspires,inflicted,inflammation,indoors,incarcerated,imagery,hundredth,hula,hemisphere,handkerchief,hand's,gynecologist,guittierez,groundhog,grinning,graduates,goodbyes,georgetown,geese,fullest,ftl,floral,flashback,eyelashes,eyelash,excluded,evening's,evacuated,enquirer,endlessly,encounters,elusive,disarm,detest,deluding,dangle,crabby,cotillion,corsage,copenhagen,conjugal,confessional,cones,commandment,coded,coals,chuckle,christmastime,christina's,cheeseburgers,chardonnay,ceremonial,cept,cello,celery,carter's,campfire,calming,burritos,burp,buggy,brundle,broflovski,brighten,bows,borderline,blinked,bling,beauties,bauers,battered,athletes,assisting,articulate,alot,alienated,aleksandr,ahhhhh,agreements,agamemnon,accountants,zat,y'see,wrongful,writer's,wrapper,workaholic,wok,winnebago,whispered,warts,vikki's,verified,vacate,updated,unworthy,unprecedented,unanswered,trend,transformed,transform,trademark,tote,tonane,tolerated,throwin,throbbing,thriving,thrills,thorns,thereof,there've,terminator,tendencies,tarot,tailed,swab,sunscreen,stretcher,stereotype,spike's,soggy,sobbing,slopes,skis,skim,sizable,sightings,shucks,shrapnel,sever,senile,sections,seaboard,scripts,scorned,saver,roxanne's,resemble,red's,rebellious,rained,putty,proposals,prenup,positioned,portuguese,pores,pinching,pilgrims,pertinent,peeping,pamphlet,paints,ovulating,outbreak,oppression,opposites,occult,nutcracker,nutcase,nominee,newt,newsstand,newfound,nepal,mocked,midterms,marshmallow,manufacturer,managers,majesty's,maclaren,luscious,lowered,loops,leans,laurence's,krudski,knowingly,keycard,katherine's,junkies,juilliard,judicial,jolinar,jase,irritable,invaluable,inuit,intoxicating,instruct,insolent,inexcusable,induce,incubator,illustrious,hydrogen,hunsecker,hub,houseguest,honk,homosexuals,homeroom,holly's,hindu,hernia,harming,handgun,hallways,hallucination,gunshots,gums,guineas,groupies,groggy,goiter,gingerbread,giggling,geometry,genre,funded,frontal,frigging,fledged,fedex,feat,fairies,eyeball,extending,exchanging,exaggeration,esteemed,ergo,enlist,enlightenment,encyclopedia,drags,disrupted,dispense,disloyal,disconnect,dimitri,desks,dentists,delhi,delacroix,degenerate,deemed,decay,daydreaming,cushions,cuddly,corroborate,contender,congregation,conflicts,confessions,complexion,completion,compensated,cobbler,closeness,chilled,checkmate,channing,carousel,calms,bylaws,bud's,benefactor,belonging,ballgame,baiting,backstabbing,assassins,artifact,armies,appoint,anthropology,anthropologist,alzheimer's,allegedly,alex's,airspace,adversary,adolf,actin,acre,aced,accuses,accelerant,abundantly,abstinence,abc,zsa,zissou,zandt,yom,yapping,wop,witchy,winter's,willows,whee,whadaya,want's,walter's,waah,viruses,vilandra,veiled,unwilling,undress,undivided,underestimating,ultimatums,twirl,truckload,tremble,traditionally,touring,touche,toasting,tingling,tiles,tents,tempered,sussex,sulking,stunk,stretches,sponges,spills,softly,snipers,slid,sedan,screens,scourge,rooftop,rog,rivalry,rifles,riana,revolting,revisit,resisted,rejects,refreshments,redecorating,recurring,recapture,raysy,randomly,purchases,prostitutes,proportions,proceeded,prevents,pretense,prejudiced,precogs,pouting,poppie,poofs,pimple,piles,pediatrician,patrick's,pathology,padre,packets,paces,orvelle,oblivious,objectivity,nikki's,nighttime,nervosa,navigation,moist,moan,minors,mic,mexicans,meurice,melts,mau,mats,matchmaker,markings,maeby,lugosi,lipnik,leprechaun,kissy,kafka,italians,introductions,intestines,intervene,inspirational,insightful,inseparable,injections,informal,influential,inadvertently,illustrated,hussy,huckabees,hmo,hittin,hiss,hemorrhaging,headin,hazy,haystack,hallowed,haiti,haa,grudges,grenades,granilith,grandkids,grading,gracefully,godsend,gobbles,fyi,future's,fun's,fret,frau,fragrance,fliers,firms,finchley,fbi's,farts,eyewitnesses,expendable,existential,endured,embraced,elk,ekg,dude's,dragonfly,dorms,domination,directory,depart,demonstrated,delaying,degrading,deduction,darlings,dante's,danes,cylons,counsellor,cortex,cop's,coordinator,contraire,consensus,consciously,conjuring,congratulating,compares,commentary,commandant,cokes,centimeters,cc's,caucus,casablanca,buffay,buddy's,brooch,bony,boggle,blood's,bitching,bistro,bijou,bewitched,benevolent,bends,bearings,barren,arr,aptitude,antenna,amish,amazes,alcatraz,acquisitions,abomination,worldly,woodstock,withstand,whispers,whadda,wayward,wayne's,wailing,vinyl,variables,vanishing,upscale,untouchable,unspoken,uncontrollable,unavoidable,unattended,tuning,trite,transvestite,toupee,timid,timers,themes,terrorizing,teamed,taipei,t's,swana,surrendered,suppressed,suppress,stumped,strolling,stripe,storybook,storming,stomachs,stoked,stationery,springtime,spontaneity,sponsored,spits,spins,soiree,sociology,soaps,smarty,shootout,shar,settings,sentiments,senator's,scramble,scouting,scone,runners,rooftops,retract,restrictions,residency,replay,remainder,regime,reflexes,recycling,rcmp,rawdon,ragged,quirky,quantico,psychologically,prodigal,primo,pounce,potty,portraits,pleasantries,plane's,pints,phd,petting,perceive,patrons,parameters,outright,outgoing,onstage,officer's,o'connor,notwithstanding,noah's,nibble,newmans,neutralize,mutilated,mortality,monumental,ministers,millionaires,mentions,mcdonald's,mayflower,masquerade,mangy,macreedy,lunatics,luau,lover's,lovable,louie's,locating,lizards,limping,lasagna,largely,kwang,keepers,juvie,jaded,ironing,intuitive,intensely,insure,installation,increases,incantation,identifying,hysteria,hypnotize,humping,heavyweight,happenin,gung,griet,grasping,glorified,glib,ganging,g'night,fueled,focker,flunking,flimsy,flaunting,fixated,fitzwallace,fictional,fearing,fainting,eyebrow,exonerated,ether,ers,electrician,egotistical,earthly,dusted,dues,donors,divisions,distinguish,displays,dismissal,dignify,detonation,deploy,departments,debrief,dazzling,dawn's,dan'l,damnedest,daisies,crushes,crucify,cordelia's,controversy,contraband,contestants,confronting,communion,collapsing,cocked,clock's,clicks,cliche,circular,circled,chord,characteristics,chandelier,casualty,carburetor,callers,bup,broads,breathes,boca,bobbie's,bloodshed,blindsided,blabbing,binary,bialystock,bashing,ballerina,ball's,aviva,avalanche,arteries,appliances,anthem,anomaly,anglo,airstrip,agonizing,adjourn,abandonment,zack's,you's,yearning,yams,wrecker,word's,witnessing,winged,whence,wept,warsaw,warp,warhead,wagons,visibility,usc,unsure,unions,unheard,unfreeze,unfold,unbalanced,ugliest,troublemaker,tolerant,toddler,tiptoe,threesome,thirties,thermostat,tampa,sycamore,switches,swipe,surgically,supervising,subtlety,stung,stumbling,stubs,struggles,stride,strangling,stamp's,spruce,sprayed,socket,snuggle,smuggled,skulls,simplicity,showering,shhhhh,sensor,sci,sac,sabotaging,rumson,rounding,risotto,riots,revival,responds,reserves,reps,reproduction,repairman,rematch,rehearsed,reelection,redi,recognizing,ratty,ragging,radiology,racquetball,racking,quieter,quicksand,pyramids,pulmonary,puh,publication,prowl,provisions,prompt,premeditated,prematurely,prancing,porcupine,plated,pinocchio,perceived,peeked,peddle,pasture,panting,overweight,oversee,overrun,outing,outgrown,obsess,o'donnell,nyu,nursed,northwestern,norma's,nodding,negativity,negatives,musketeers,mugger,mounting,motorcade,monument,merrily,matured,massimo's,masquerading,marvellous,marlena's,margins,maniacs,mag,lumpy,lovey,louse,linger,lilies,libido,lawful,kudos,knuckle,kitchen's,kennedy's,juices,judgments,joshua's,jars,jams,jamal's,jag,itches,intolerable,intermission,interaction,institutions,infectious,inept,incentives,incarceration,improper,implication,imaginative,ight,hussein,humanitarian,huckleberry,horatio,holster,heiress,heartburn,hayley's,hap,gunna,guitarist,groomed,greta's,granting,graciously,glee,gentleman's,fulfillment,fugitives,fronts,founder,forsaking,forgives,foreseeable,flavors,flares,fixation,figment,fickle,featuring,featured,fantasize,famished,faith's,fades,expiration,exclamation,evolve,euro,erasing,emphasize,elevator's,eiffel,eerie,earful,duped,dulles,distributor,distorted,dissing,dissect,dispenser,dilated,digit,differential,diagnostic,detergent,desdemona,debriefing,dazzle,damper,cylinder,curing,crowbar,crispina,crafty,crackpot,courting,corrections,cordial,copying,consuming,conjunction,conflicted,comprehension,commie,collects,cleanup,chiropractor,charmer,chariot,charcoal,chaplain,challenger,census,cd's,cauldron,catatonic,capabilities,calculate,bullied,buckets,brilliantly,breathed,boss's,booths,bombings,boardroom,blowout,blower,blip,blindness,blazing,birthday's,biologically,bibles,biased,beseech,barbaric,band's,balraj,auditorium,audacity,assisted,appropriations,applicants,anticipating,alcoholics,airhead,agendas,aft,admittedly,adapt,absolution,abbot,zing,youre,yippee,wittlesey,withheld,willingness,willful,whammy,webber's,weakest,washes,virtuous,violently,videotapes,vials,vee,unplugged,unpacked,unfairly,und,turbulence,tumbling,troopers,tricking,trenches,tremendously,travelled,travelers,traitors,torches,tommy's,tinga,thyroid,texture,temperatures,teased,tawdry,tat,taker,sympathies,swiped,swallows,sundaes,suave,strut,structural,stone's,stewie,stepdad,spewing,spasm,socialize,slither,sky's,simulator,sighted,shutters,shrewd,shocks,sherry's,sgc,semantics,scout's,schizophrenic,scans,savages,satisfactory,rya'c,runny,ruckus,royally,roadblocks,riff,rewriting,revoke,reversal,repent,renovation,relating,rehearsals,regal,redecorate,recovers,recourse,reconnaissance,receives,ratched,ramali,racquet,quince,quiche,puppeteer,puking,puffed,prospective,projected,problemo,preventing,praises,pouch,posting,postcards,pooped,poised,piled,phoney,phobia,performances,patty's,patching,participating,parenthood,pardner,oppose,oozing,oils,ohm,ohhhhh,nypd,numbing,novelist,nostril,nosey,nominate,noir,neatly,nato,naps,nappa,nameless,muzzle,muh,mortuary,moronic,modesty,mitz,missionary,mimi's,midwife,mercenaries,mcclane,maxie's,matuka,mano,mam,maitre,lush,lumps,lucid,loosened,loosely,loins,lawnmower,lane's,lamotta,kroehner,kristen's,juggle,jude's,joins,jinxy,jessep,jaya,jamming,jailhouse,jacking,ironically,intruders,inhuman,infections,infatuated,indoor,indigestion,improvements,implore,implanted,id's,hormonal,hoboken,hillbilly,heartwarming,headway,headless,haute,hatched,hartmans,harping,hari,grapevine,graffiti,gps,gon,gogh,gnome,ged,forties,foreigners,fool's,flyin,flirted,fingernail,fdr,exploration,expectation,exhilarating,entrusted,enjoyment,embark,earliest,dumper,duel,dubious,drell,dormant,docking,disqualified,disillusioned,dishonor,disbarred,directive,dicey,denny's,deleted,del's,declined,custodial,crunchy,crises,counterproductive,correspondent,corned,cords,cor,coot,contributing,contemplate,containers,concur,conceivable,commissioned,cobblepot,cliffs,clad,chief's,chickened,chewbacca,checkout,carpe,cap'n,campers,calcium,buyin,buttocks,bullies,brown's,brigade,brain's,braid,boxed,bouncy,blueberries,blubbering,bloodstream,bigamy,bel,beeped,bearable,bank's,awarded,autographs,attracts,attracting,asteroid,arbor,arab,apprentice,announces,andie's,ammonia,alarming,aidan's,ahoy,ahm,zan,wretch,wimps,widows,widower,whirlwind,whirl,weather's,warms,war's,wack,villagers,vie,vandelay,unveiling,uno,undoing,unbecoming,ucla,turnaround,tribunal,togetherness,tickles,ticker,tended,teensy,taunt,system's,sweethearts,superintendent,subcommittee,strengthen,stomach's,stitched,standpoint,staffers,spotless,splits,soothe,sonnet,smothered,sickening,showdown,shouted,shepherds,shelters,shawl,seriousness,separates,sen,schooled,schoolboy,scat,sats,sacramento,s'mores,roped,ritchie's,resembles,reminders,regulars,refinery,raggedy,profiles,preemptive,plucked,pheromones,particulars,pardoned,overpriced,overbearing,outrun,outlets,onward,oho,ohmigod,nosing,norwegian,nightly,nicked,neanderthal,mosquitoes,mortified,moisture,moat,mime,milky,messin,mecha,markinson,marivellas,mannequin,manderley,maid's,madder,macready,maciver's,lookie,locusts,lisbon,lifetimes,leg's,lanna,lakhi,kholi,joke's,invasive,impersonate,impending,immigrants,ick,i's,hyperdrive,horrid,hopin,hombre,hogging,hens,hearsay,haze,harpy,harboring,hairdo,hafta,hacking,gun's,guardians,grasshopper,graded,gobble,gatehouse,fourteenth,foosball,floozy,fitzgerald's,fished,firewood,finalize,fever's,fencing,felons,falsely,fad,exploited,euphemism,entourage,enlarged,ell,elitist,elegance,eldest,duo,drought,drokken,drier,dredge,dramas,dossier,doses,diseased,dictator,diarrhea,diagnose,despised,defuse,defendant's,d'amour,crowned,cooper's,continually,contesting,consistently,conserve,conscientious,conjured,completing,commune,commissioner's,collars,coaches,clogs,chenille,chatty,chartered,chamomile,casing,calculus,calculator,brittle,breached,boycott,blurted,birthing,bikinis,bankers,balancing,astounding,assaulting,aroma,arbitration,appliance,antsy,amnio,alienating,aliases,aires,adolescence,administrative,addressing,achieving,xerox,wrongs,workload,willona,whistling,werewolves,wallaby,veterans,usin,updates,unwelcome,unsuccessful,unseemly,unplug,undermining,ugliness,tyranny,tuesdays,trumpets,transference,traction,ticks,tete,tangible,tagging,swallowing,superheroes,sufficiently,studs,strep,stowed,stow,stomping,steffy,stature,stairway,sssh,sprain,spouting,sponsoring,snug,sneezing,smeared,slop,slink,slew,skid,simultaneously,simulation,sheltered,shakin,sewed,sewage,seatbelt,scariest,scammed,scab,sanctimonious,samir,rushes,rugged,routes,romanov,roasting,rightly,retinal,rethinking,resulted,resented,reruns,replica,renewed,remover,raiding,raided,racks,quantity,purest,progressing,primarily,presidente,prehistoric,preeclampsia,postponement,portals,poppa,pop's,pollution,polka,pliers,playful,pinning,pharaoh,perv,pennant,pelvic,paved,patented,paso,parted,paramedic,panels,pampered,painters,padding,overjoyed,orthodox,organizer,one'll,octavius,occupational,oakdale's,nous,nite,nicknames,neurosurgeon,narrows,mitt,misled,mislead,mishap,milltown,milking,microscopic,meticulous,mediocrity,meatballs,measurements,mandy's,malaria,machete,lydecker's,lurch,lorelai's,linda's,layin,lavish,lard,knockin,khruschev,kelso's,jurors,jumpin,jugular,journalists,jour,jeweler,jabba,intersection,intellectually,integral,installment,inquiries,indulging,indestructible,indebted,implicated,imitate,ignores,hyperventilating,hyenas,hurrying,huron,horizontal,hermano,hellish,heheh,header,hazardous,hart's,harshly,harper's,handout,handbag,grunemann,gots,glum,gland,glances,giveaway,getup,gerome,furthest,funhouse,frosting,franchise,frail,fowl,forwarded,forceful,flavored,flank,flammable,flaky,fingered,finalists,fatherly,famine,fags,facilitate,exempt,exceptionally,ethic,essays,equity,entrepreneur,enduring,empowered,employers,embezzlement,eels,dusk,duffel,downfall,dotted,doth,doke,distressed,disobey,disappearances,disadvantage,dinky,diminish,diaphragm,deuces,deployed,delia's,davidson's,curriculum,curator,creme,courteous,correspondence,conquered,comforts,coerced,coached,clots,clarification,cite,chunks,chickie,chick's,chases,chaperoning,ceramic,ceased,cartons,capri,caper,cannons,cameron's,calves,caged,bustin,bungee,bulging,bringin,brie,boomhauer,blowin,blindfolded,blab,biscotti,bird's,beneficial,bastard's,ballplayer,bagging,automated,auster,assurances,aschen,arraigned,anonymity,annex,animation,andi,anchorage,alters,alistair's,albatross,agreeable,advancement,adoring,accurately,abduct,wolfi,width,weirded,watchers,washroom,warheads,voltage,vincennes,villains,victorian,urgency,upward,understandably,uncomplicated,uhuh,uhhhh,twitching,trig,treadmill,transactions,topped,tiffany's,they's,thermos,termination,tenorman,tater,tangle,talkative,swarm,surrendering,summoning,substances,strive,stilts,stickers,stationary,squish,squashed,spraying,spew,sparring,sorrel's,soaring,snout,snort,sneezed,slaps,skanky,singin,sidle,shreck,shortness,shorthand,shepherd's,sharper,shamed,sculptures,scanning,saga,sadist,rydell,rusik,roulette,rodi's,rockefeller,revised,resumes,restoring,respiration,reiber's,reek,recycle,recount,reacts,rabbit's,purge,purgatory,purchasing,providence,prostate,princesses,presentable,poultry,ponytail,plotted,playwright,pinot,pigtails,pianist,phillippe,philippines,peddling,paroled,owww,orchestrated,orbed,opted,offends,o'hara,noticeable,nominations,nancy's,myrtle's,music's,mope,moonlit,moines,minefield,metaphors,memoirs,mecca,maureen's,manning's,malignant,mainframe,magicks,maggots,maclaine,lobe,loathing,linking,leper,leaps,leaping,lashed,larch,larceny,lapses,ladyship,juncture,jiffy,jane's,jakov,invoke,interpreted,internally,intake,infantile,increasingly,inadmissible,implement,immense,howl,horoscope,hoof,homage,histories,hinting,hideaway,hesitating,hellbent,heddy,heckles,hat's,harmony's,hairline,gunpowder,guidelines,guatemala,gripe,gratifying,grants,governess,gorge,goebbels,gigolo,generated,gears,fuzz,frigid,freddo,freddie's,foresee,filters,filmed,fertile,fellowship,feeling's,fascination,extinction,exemplary,executioner,evident,etcetera,estimates,escorts,entity,endearing,encourages,electoral,eaters,earplugs,draped,distributors,disrupting,disagrees,dimes,devastate,detain,deposits,depositions,delicacy,delays,darklighter,dana's,cynicism,cyanide,cutters,cronus,convoy,continuous,continuance,conquering,confiding,concentrated,compartments,companions,commodity,combing,cofell,clingy,cleanse,christmases,cheered,cheekbones,charismatic,cabaret,buttle,burdened,buddhist,bruenell,broomstick,brin,brained,bozos,bontecou,bluntman,blazes,blameless,bizarro,benny's,bellboy,beaucoup,barry's,barkeep,bali,bala,bacterial,axis,awaken,astray,assailant,aslan,arlington,aria,appease,aphrodisiac,announcements,alleys,albania,aitoro's,activation,acme,yesss,wrecks,woodpecker,wondrous,window's,wimpy,willpower,widowed,wheeling,weepy,waxing,waive,vulture,videotaped,veritable,vascular,variations,untouched,unlisted,unfounded,unforeseen,two's,twinge,truffles,triggers,traipsing,toxin,tombstone,titties,tidal,thumping,thor's,thirds,therein,testicles,tenure,tenor,telephones,technicians,tarmac,talby,tackled,systematically,swirling,suicides,suckered,subtitles,sturdy,strangler,stockbroker,stitching,steered,staple,standup,squeal,sprinkler,spontaneously,splendor,spiking,spender,sovereign,snipe,snip,snagged,slum,skimming,significantly,siddown,showroom,showcase,shovels,shotguns,shoelaces,shitload,shifty,shellfish,sharpest,shadowy,sewn,seizing,seekers,scrounge,scapegoat,sayonara,satan's,saddled,rung,rummaging,roomful,romp,retained,residual,requiring,reproductive,renounce,reggie's,reformed,reconsidered,recharge,realistically,radioed,quirks,quadrant,punctual,public's,presently,practising,pours,possesses,poolhouse,poltergeist,pocketbook,plural,plots,pleasure's,plainly,plagued,pity's,pillars,picnics,pesto,pawing,passageway,partied,para,owing,openings,oneself,oats,numero,nostalgia,nocturnal,nitwit,nile,nexus,neuro,negotiated,muss,moths,mono,molecule,mixer,medicines,meanest,mcbeal,matinee,margate,marce,manipulations,manhunt,manger,magicians,maddie's,loafers,litvack,lightheaded,lifeguard,lawns,laughingstock,kodak,kink,jewellery,jessie's,jacko,itty,inhibitor,ingested,informing,indignation,incorporate,inconceivable,imposition,impersonal,imbecile,ichabod,huddled,housewarming,horizons,homicides,hobo,historically,hiccups,helsinki,hehe,hearse,harmful,hardened,gushing,gushie,greased,goddamit,gigs,freelancer,forging,fonzie,fondue,flustered,flung,flinch,flicker,flak,fixin,finalized,fibre,festivus,fertilizer,fenmore's,farted,faggots,expanded,exonerate,exceeded,evict,establishing,enormously,enforced,encrypted,emdash,embracing,embedded,elliot's,elimination,dynamics,duress,dupres,dowser,doormat,dominant,districts,dissatisfied,disfigured,disciplined,discarded,dibbs,diagram,detailing,descend,depository,defining,decorative,decoration,deathbed,death's,dazzled,da's,cuttin,cures,crowding,crepe,crater,crammed,costly,cosmopolitan,cortlandt's,copycat,coordinated,conversion,contradict,containing,constructed,confidant,condemning,conceited,computer's,commute,comatose,coleman's,coherent,clinics,clapping,circumference,chuppah,chore,choksondik,chestnuts,catastrophic,capitalist,campaigning,cabins,briault,bottomless,boop,bonnet,board's,bloomingdale's,blokes,blob,bids,berluti,beret,behavioral,beggars,bar's,bankroll,bania,athos,assassinate,arsenic,apperantly,ancestor,akron,ahhhhhh,afloat,adjacent,actresses,accordingly,accents,abe's,zipped,zeros,zeroes,zamir,yuppie,youngsters,yorkers,writ,wisest,wipes,wield,whyn't,weirdos,wednesdays,villages,vicksburg,variable,upchuck,untraceable,unsupervised,unpleasantness,unpaid,unhook,unconscionable,uncalled,turks,tumors,trappings,translating,tragedies,townie,timely,tiki,thurgood,things'll,thine,tetanus,terrorize,temptations,teamwork,tanning,tampons,tact,swarming,surfaced,supporter,stuart's,stranger's,straitjacket,stint,stimulation,steroid,statistically,startling,starry,squander,speculating,source's,sollozzo,sobriety,soar,sneaked,smithsonian,slugs,slaw,skit,skedaddle,sinker,similarities,silky,shortcomings,shipments,sheila's,severity,sellin,selective,seattle's,seasoned,scrubbed,scrooge,screwup,scrapes,schooling,scarves,saturdays,satchel,sandburg's,sandbox,salesmen,rooming,romances,revolving,revere,resulting,reptiles,reproach,reprieve,recreational,rearranging,realtor,ravine,rationalize,raffle,quoted,punchy,psychobabble,provocation,profoundly,problematic,prescriptions,preferable,praised,polishing,poached,plow,pledges,planetary,plan's,pirelli,perverts,peaked,pastures,pant,oversized,overdressed,outdid,outdated,oriental,ordinance,orbs,opponents,occurrence,nuptials,nominees,nineteenth,nefarious,mutiny,mouthpiece,motels,mopping,moon's,mongrel,monetary,mommie,missin,metaphorically,merv,mertin,memos,memento,melodrama,melancholy,measles,meaner,marches,mantel,maneuvers,maneuvering,mailroom,machine's,luring,listenin,lion's,lifeless,liege,licks,libraries,liberties,levon,legwork,lanka,lacked,kneecaps,kippur,kiddie,kaput,justifiable,jigsaw,issuing,islamic,insistent,insidious,innuendo,innit,inhabitants,individually,indicator,indecent,imaginable,illicit,hymn,hurling,humane,hospitalized,horseshit,hops,hondo,hemorrhoid,hella,healthiest,haywire,hamsters,halibut,hairbrush,hackers,guam,grouchy,grisly,griffin's,gratuitous,glutton,glimmer,gibberish,ghastly,geologist,gentler,generously,generators,geeky,gaga,furs,fuhrer,fronting,forklift,foolin,fluorescent,flats,flan,financed,filmmaking,fight's,faxes,faceless,extinguisher,expressions,expel,etched,entertainer,engagements,endangering,empress,egos,educator,ducked,dual,dramatically,dodgeball,dives,diverted,dissolved,dislocated,discrepancy,discovers,dink,devour,destroyers,derail,deputies,dementia,decisive,daycare,daft,cynic,crumbling,cowardice,cow's,covet,cornwallis,corkscrew,cookbook,conditioned,commendation,commandments,columns,coincidental,cobwebs,clouded,clogging,clicking,clasp,citizenship,chopsticks,chefs,chaps,catherine's,castles,cashing,carat,calmer,burgundy,bulldog's,brightly,brazen,brainwashing,bradys,bowing,booties,bookcase,boned,bloodsucking,blending,bleachers,bleached,belgian,bedpan,bearded,barrenger,bachelors,awwww,atop,assures,assigning,asparagus,arabs,apprehend,anecdote,amoral,alterations,alli,aladdin,aggravation,afoot,acquaintances,accommodating,accelerate,yakking,wreckage,worshipping,wladek,willya,willies,wigged,whoosh,whisked,wavelength,watered,warpath,warehouses,volts,vitro,violates,viewed,vicar,valuables,users,urging,uphill,unwise,untimely,unsavory,unresponsive,unpunished,unexplained,unconventional,tubby,trolling,treasurer,transfers,toxicology,totaled,tortoise,tormented,toothache,tingly,tina's,timmiihh,tibetan,thursdays,thoreau,terrifies,temperature's,temperamental,telegrams,ted's,technologies,teaming,teal'c's,talkie,takers,table's,symbiote,swirl,suffocate,subsequently,stupider,strapping,store's,steckler,standardized,stampede,stainless,springing,spreads,spokesperson,speeds,someway,snowflake,sleepyhead,sledgehammer,slant,slams,situation's,showgirl,shoveling,shmoopy,sharkbait,shan't,seminars,scrambling,schizophrenia,schematics,schedule's,scenic,sanitary,sandeman,saloon,sabbatical,rural,runt,rummy,rotate,reykjavik,revert,retrieved,responsive,rescheduled,requisition,renovations,remake,relinquish,rejoice,rehabilitation,recreation,reckoning,recant,rebuilt,rebadow,reassurance,reassigned,rattlesnake,ramble,racism,quor,prowess,prob,primed,pricey,predictions,prance,pothole,pocus,plains,pitches,pistols,persist,perpetrated,penal,pekar,peeling,patter,pastime,parmesan,paper's,papa's,panty,pail,pacemaker,overdrive,optic,operas,ominous,offa,observant,nothings,noooooo,nonexistent,nodded,nieces,neia,neglecting,nauseating,mutton,mutated,musket,munson's,mumbling,mowing,mouthful,mooseport,monologue,momma's,moly,mistrust,meetin,maximize,masseuse,martha's,marigold,mantini,mailer,madre,lowlifes,locksmith,livid,liven,limos,licenses,liberating,lhasa,lenin,leniency,leering,learnt,laughable,lashes,lasagne,laceration,korben,katan,kalen,jordan's,jittery,jesse's,jammies,irreplaceable,intubate,intolerant,inhaler,inhaled,indifferent,indifference,impound,imposed,impolite,humbly,holocaust,heroics,heigh,gunk,guillotine,guesthouse,grounding,groundbreaking,groom's,grips,grant's,gossiping,goatee,gnomes,gellar,fusion's,fumble,frutt,frobisher,freudian,frenchman,foolishness,flagged,fixture,femme,feeder,favored,favorable,fatso,fatigue,fatherhood,farmer's,fantasized,fairest,faintest,factories,eyelids,extravagant,extraterrestrial,extraordinarily,explicit,escalator,eros,endurance,encryption,enchantment's,eliminating,elevate,editors,dysfunction,drivel,dribble,dominican,dissed,dispatched,dismal,disarray,dinnertime,devastation,dermatologist,delicately,defrost,debutante,debacle,damone,dainty,cuvee,culpa,crucified,creeped,crayons,courtship,counsel's,convene,continents,conspicuous,congresswoman,confinement,conferences,confederate,concocted,compromises,comprende,composition,communism,comma,collectors,coleslaw,clothed,clinically,chug,chickenshit,checkin,chaotic,cesspool,caskets,cancellation,calzone,brothel,boomerang,bodega,bloods,blasphemy,black's,bitsy,bink,biff,bicentennial,berlini,beatin,beards,barbas,barbarians,backpacking,audiences,artist's,arrhythmia,array,arousing,arbitrator,aqui,appropriately,antagonize,angling,anesthetic,altercation,alice's,aggressor,adversity,adopting,acne,accordance,acathla,aaahhh,wreaking,workup,workings,wonderin,wolf's,wither,wielding,whopper,what'm,what'cha,waxed,vibrating,veterinarian,versions,venting,vasey,valor,validate,urged,upholstery,upgraded,untied,unscathed,unsafe,unlawful,uninterrupted,unforgiving,undies,uncut,twinkies,tucking,tuba,truffle,truck's,triplets,treatable,treasured,transmit,tranquility,townspeople,torso,tomei,tipsy,tinsel,timeline,tidings,thirtieth,tensions,teapot,tasks,tantrums,tamper,talky,swayed,swapping,sven,sulk,suitor,subjected,stylist,stroller,storing,stirs,statistical,standoff,staffed,squadron,sprinklers,springsteen,specimens,sparkly,song's,snowy,snobby,snatcher,smoother,smith's,sleepin,shrug,shortest,shoebox,shel,sheesh,shee,shackles,setbacks,sedatives,screeching,scorched,scanned,satyr,sammy's,sahib,rosemary's,rooted,rods,roadblock,riverbank,rivals,ridiculed,resentful,repellent,relates,registry,regarded,refugee,recreate,reconvene,recalled,rebuttal,realmedia,quizzes,questionnaire,quartet,pusher,punctured,pucker,propulsion,promo,prolong,professionalism,prized,premise,predators,portions,pleasantly,planet's,pigsty,physicist,phil's,penniless,pedestrian,paychecks,patiently,paternal,parading,pa's,overactive,ovaries,orderlies,oracles,omaha,oiled,offending,nudie,neonatal,neighborly,nectar,nautical,naught,moops,moonlighting,mobilize,mite,misleading,milkshake,mickey's,metropolitan,menial,meats,mayan,maxed,marketplace,mangled,magua,lunacy,luckier,llanview's,livestock,liters,liter,licorice,libyan,legislature,lasers,lansbury,kremlin,koreans,kooky,knowin,kilt,junkyard,jiggle,jest,jeopardized,jags,intending,inkling,inhalation,influences,inflated,inflammatory,infecting,incense,inbound,impractical,impenetrable,iffy,idealistic,i'mma,hypocrites,hurtin,humbled,hosted,homosexuality,hologram,hokey,hocus,hitchhiking,hemorrhoids,headhunter,hassled,harts,hardworking,haircuts,hacksaw,guerrilla,genitals,gazillion,gatherings,ganza's,gammy,gamesphere,fugue,fuels,forests,footwear,folly,folds,flexibility,flattened,flashlights,fives,filet,field's,famously,extenuating,explored,exceed,estrogen,envisioned,entails,emerged,embezzled,eloquent,egomaniac,dummies,duds,ducts,drowsy,drones,dragon's,drafts,doree,donovon,donny's,docked,dixon's,distributed,disorders,disguises,disclose,diggin,dickie's,detachment,deserting,depriving,demographic,delegation,defying,deductible,decorum,decked,daylights,daybreak,dashboard,darien,damnation,d'angelo's,cuddling,crunching,crickets,crazies,crayon,councilman,coughed,coordination,conundrum,contractors,contend,considerations,compose,complimented,compliance,cohaagen,clutching,cluster,clued,climbs,clader,chuck's,chromosome,cheques,checkpoint,chats,channeling,ceases,catholics,cassius,carver's,carasco,capped,capisce,cantaloupe,cancelling,campsite,camouflage,cambodia,burglars,bureaucracy,breakfasts,branding,bra'tac,book's,blueprint,bleedin,blaze's,blabbed,bisexual,bile,big's,beverages,beneficiary,battery's,basing,avert,avail,autobiography,atone,army's,arlyn,ares,architectural,approves,apothecary,anus,antiseptic,analytical,amnesty,alphabetical,alignment,aligned,aleikuum,advisory,advisors,advisement,adulthood,acquiring,accessed,zombie's,zadir,wrestled,wobbly,withnail,wheeled,whattaya,whacking,wedged,wanders,walkman,visionary,virtues,vincent's,vega's,vaginal,usage,unnamed,uniquely,unimaginable,undeniable,unconditionally,uncharted,unbridled,tweezers,tvmegasite,trumped,triumphant,trimming,tribes,treading,translates,tranquilizers,towing,tout,toontown,thunk,taps,taboo,suture,suppressing,succeeding,submission,strays,stonewall,stogie,stepdaughter,stalls,stace,squint,spouses,splashed,speakin,sounder,sorrier,sorrel,sorcerer,sombrero,solemnly,softened,socialist,snobs,snippy,snare,smoothing,slump,slimeball,slaving,sips,singular,silently,sicily,shiller,shayne's,shareholders,shakedown,sensations,seagulls,scrying,scrumptious,screamin,saucy,santoses,santos's,sanctions,roundup,roughed,rosary,robechaux,roadside,riley's,retrospect,resurrected,restoration,reside,researched,rescind,reproduce,reprehensible,repel,rendering,remodeling,religions,reconsidering,reciprocate,ratchet,rambaldi's,railroaded,raccoon,quasi,psychics,psat,promos,proclamation,problem's,prob'ly,pristine,printout,priestess,prenuptial,prediction,precedes,pouty,potter's,phoning,petersburg,peppy,pariah,parched,parcel,panes,overloaded,overdoing,operators,oldies,obesity,nymphs,nother,notebooks,nook,nikolai,nearing,nearer,mutation,municipal,monstrosity,minister's,milady,mieke,mephesto,memory's,melissa's,medicated,marshals,manilow,mammogram,mainstream,madhouse,m'lady,luxurious,luck's,lucas's,lotsa,loopy,logging,liquids,lifeboat,lesion,lenient,learner,lateral,laszlo,larva,kross,kinks,jinxed,involuntary,inventor,interim,insubordination,inherent,ingrate,inflatable,independently,incarnate,inane,imaging,hypoglycemia,huntin,humorous,humongous,hoodlum,honoured,honking,hitler's,hemorrhage,helpin,hearing's,hathor,hatching,hangar,halftime,guise,guggenheim,grrr,grotto,grandson's,grandmama,gorillas,godless,girlish,ghouls,gershwin,frosted,friday's,forwards,flutter,flourish,flagpole,finely,finder's,fetching,fatter,fated,faithfully,faction,fabrics,exposition,expo,exploits,exert,exclude,eviction,everwood's,evasion,espn,escorting,escalate,enticing,enroll,enhancement,endowed,enchantress,emerging,elopement,drills,drat,downtime,downloading,dorks,doorways,doctorate,divulge,dissociative,diss,disgraceful,disconcerting,dirtbag,deteriorating,deteriorate,destinies,depressive,dented,denim,defeating,decruz,decidedly,deactivate,daydreams,czar,curls,culprit,cues,crybaby,cruelest,critique,crippling,cretin,cranberries,cous,coupled,corvis,copped,convicts,converts,contingent,contests,complement,commend,commemorate,combinations,coastguard,cloning,cirque,churning,chock,chivalry,chemotherapy,charlotte's,chancellor's,catalogues,cartwheels,carpets,carols,canister,camera's,buttered,bureaucratic,bundt,buljanoff,bubbling,brokers,broaden,brimstone,brainless,borneo,bores,boing,bodied,billie's,biceps,beijing,bead,badmouthing,bad's,avec,autopilot,attractions,attire,atoms,atheist,ascertain,artificially,archbishop,aorta,amps,ampata,amok,alloy,allied,allenby,align,albeit,aired,aint,adjoining,accosted,abyss,absolve,aborted,aaagh,aaaaaah,your's,yonder,yellin,yearly,wyndham,wrongdoing,woodsboro,wigging,whup,wasteland,warranty,waltzed,walnuts,wallace's,vividly,vibration,verses,veggie,variation,validation,unnecessarily,unloaded,unicorns,understated,undefeated,unclean,umbrellas,tyke,twirling,turpentine,turnover,tupperware,tugger,triangles,triage,treehouse,tract,toil,tidbit,tickled,thud,threes,thousandth,thingie,terminally,temporal,teething,tassel,talkies,syndication,syllables,swoon,switchboard,swerved,suspiciously,superiority,successor,subsequentlyne,subsequent,subscribe,strudel,stroking,strictest,steven's,stensland,stefan's,starsky,starin,stannart,squirming,squealing,sorely,solidarity,softie,snookums,sniveling,snail,smidge,smallpox,sloth,slab,skulking,singled,simian,silo,sightseeing,siamese,shudder,shoppers,shax,sharpen,shannen,semtex,sellout,secondhand,season's,seance,screenplay,scowl,scorn,scandals,santiago's,safekeeping,sacked,russe,rummage,rosie's,roshman,roomies,roaches,rinds,retrace,retires,resuscitate,restrained,residential,reservoir,rerun,reputations,rekall,rejoin,refreshment,reenactment,recluse,ravioli,raves,ranked,rampant,rama,rallies,raking,purses,punishable,punchline,puked,provincial,prosky,prompted,processor,previews,prepares,poughkeepsie,poppins,polluted,placenta,pissy,petulant,peterson's,perseverance,persecution,pent,peasants,pears,pawns,patrols,pastries,partake,paramount,panky,palate,overzealous,overthrow,overs,oswald's,oskar,originated,orchids,optical,onset,offenses,obstructing,objectively,obituaries,obedient,obedience,novice,nothingness,nitrate,newer,nets,mwah,musty,mung,motherly,mooning,monique's,momentous,moby,mistaking,mistakenly,minutemen,milos,microchip,meself,merciless,menelaus,mazel,mauser,masturbate,marsh's,manufacturers,mahogany,lysistrata,lillienfield,likable,lightweight,liberate,leveled,letdown,leer,leeloo,larynx,lardass,lainey,lagged,lab's,klorel,klan,kidnappings,keyed,karmic,jive,jiggy,jeebies,isabel's,irate,iraqi,iota,iodine,invulnerable,investor,intrusive,intricate,intimidation,interestingly,inserted,insemination,inquire,innate,injecting,inhabited,informative,informants,incorporation,inclination,impure,impasse,imbalance,illiterate,i'ma,i'ii,hurled,hunts,hispanic,hematoma,help's,helen's,headstrong,harmonica,hark,handmade,handiwork,gymnasium,growling,governors,govern,gorky,gook,girdle,getcha,gesundheit,gazing,gazette,garde,galley,funnel,fred's,fossils,foolishly,fondness,flushing,floris,firearm,ferocious,feathered,fateful,fancies,fakes,faker,expressway,expire,exec,ever'body,estates,essentials,eskimos,equations,eons,enlightening,energetic,enchilada,emmi,emissary,embolism,elsinore,ecklie,drenched,drazi,doped,dogging,documentation,doable,diverse,disposed,dislikes,dishonesty,disengage,discouraging,diplomat,diplomacy,deviant,descended,derailed,depleted,demi,deformed,deflect,defines,defer,defcon,deactivated,crips,creditors,counters,corridors,cordy's,conversation's,constellations,congressmen,congo,complimenting,colombian,clubbing,clog,clint's,clawing,chromium,chimes,chicken's,chews,cheatin,chaste,ceremony's,cellblock,ceilings,cece,caving,catered,catacombs,calamari,cabbie,bursts,bullying,bucking,brulee,brits,brisk,breezes,brandon's,bounces,boudoir,blockbuster,binks,better'n,beluga,bellied,behrani,behaves,bedding,battalion,barriers,banderas,balmy,bakersfield,badmouth,backers,avenging,atat,aspiring,aromatherapy,armpit,armoire,anythin,another's,anonymously,anniversaries,alonzo's,aftershave,affordable,affliction,adrift,admissible,adieu,activist,acquittal,yucky,yearn,wrongly,wino,whitter,whirlpool,wendigo,watchdog,wannabes,walkers,wakey,vomited,voicemail,verb,vans,valedictorian,vacancy,uttered,up's,unwed,unrequited,unnoticed,unnerving,unkind,unjust,uniformed,unconfirmed,unadulterated,unaccounted,uglier,tyler's,twix,turnoff,trough,trolley,trampled,tramell,traci's,tort,toads,titled,timbuktu,thwarted,throwback,thon,thinker,thimble,tasteless,tarantula,tammy's,tamale,takeovers,symposium,symmetry,swish,supposing,supporters,suns,sully,streaking,strands,statutory,starlight,stargher,starch,stanzi,stabs,squeamish,spokane,splattered,spiritually,spilt,sped,speciality,spacious,soundtrack,smacking,slain,slag,slacking,skywire,skips,skeet,skaara,simpatico,shredding,showin,shortcuts,shite,shielding,sheep's,shamelessly,serafine,sentimentality,sect,secretary's,seasick,scientifically,scholars,schemer,scandalous,saturday's,salts,saks,sainted,rustic,rugs,riedenschneider,ric's,rhyming,rhetoric,revolt,reversing,revel,retractor,retards,retaliation,resurrect,remiss,reminiscing,remanded,reluctance,relocating,relied,reiben,regions,regains,refuel,refresher,redoing,redheaded,redeemed,recycled,reassured,rearranged,rapport,qumar,prowling,promotional,promoter,preserving,prejudices,precarious,powwow,pondering,plunger,plunged,pleasantville,playpen,playback,pioneers,physicians,phlegm,perfected,pancreas,pakistani,oxide,ovary,output,outbursts,oppressed,opal's,ooohhh,omoroca,offed,o'toole,nurture,nursemaid,nosebleed,nixon's,necktie,muttering,munchies,mucking,mogul,mitosis,misdemeanor,miscarried,minx,millionth,migraines,midler,methane,metabolism,merchants,medicinal,margaret's,manifestation,manicurist,mandelbaum,manageable,mambo,malfunctioned,mais,magnesium,magnanimous,loudmouth,longed,lifestyles,liddy,lickety,leprechauns,lengthy,komako,koji's,klute,kennel,kathy's,justifying,jerusalem,israelis,isle,irreversible,inventing,invariably,intervals,intergalactic,instrumental,instability,insinuate,inquiring,ingenuity,inconclusive,incessant,improv,impersonation,impeachment,immigrant,id'd,hyena,humperdinck,humm,hubba,housework,homeland,holistic,hoffa,hither,hissy,hippy,hijacked,hero's,heparin,hellooo,heat's,hearth,hassles,handcuff,hairstyle,hadda,gymnastics,guys'll,gutted,gulp,gulls,guard's,gritty,grievous,gravitational,graft,gossamer,gooder,glory's,gere,gash,gaming,gambled,galaxies,gadgets,fundamentals,frustrations,frolicking,frock,frilly,fraser's,francais,foreseen,footloose,fondly,fluent,flirtation,flinched,flight's,flatten,fiscal,fiercely,felicia's,fashionable,farting,farthest,farming,facade,extends,exposer,exercised,evading,escrow,errr,enzymes,energies,empathize,embryos,embodiment,ellsberg,electromagnetic,ebola,earnings,dulcinea,dreamin,drawbacks,drains,doyle's,doubling,doting,doose's,doose,doofy,dominated,dividing,diversity,disturbs,disorderly,disliked,disgusts,devoid,detox,descriptions,denominator,demonstrating,demeanor,deliriously,decode,debauchery,dartmouth,d'oh,croissant,cravings,cranked,coworkers,councilor,council's,convergence,conventions,consistency,consist,conquests,conglomerate,confuses,confiscate,confines,confesses,conduit,compress,committee's,commanded,combed,colonel's,coated,clouding,clamps,circulating,circa,cinch,chinnery,celebratory,catalogs,carpenters,carnal,carla's,captures,capitan,capability,canin,canes,caitlin's,cadets,cadaver,cable's,bundys,bulldozer,buggers,bueller,bruno's,breakers,brazilian,branded,brainy,booming,bookstores,bloodbath,blister,bittersweet,biologist,billed,betty's,bellhop,beeping,beaut,beanstalk,beady,baudelaire,bartenders,bargains,ballad,backgrounds,averted,avatar's,atmospheric,assert,assassinated,armadillo,archive,appreciating,appraised,antlers,anterior,alps,aloof,allowances,alleyway,agriculture,agent's,affleck,acknowledging,achievements,accordion,accelerator,abracadabra,abject,zinc,zilch,yule,yemen,xanax,wrenching,wreath,wouldn,witted,widely,wicca,whorehouse,whooo,whips,westchester,websites,weaponry,wasn,walsh's,vouchers,vigorous,viet,victimized,vicodin,untested,unsolicited,unofficially,unfocused,unfettered,unfeeling,unexplainable,uneven,understaffed,underbelly,tutorial,tuberculosis,tryst,trois,trix,transmitting,trampoline,towering,topeka,tirade,thieving,thang,tentacles,teflon,teachings,tablets,swimmin,swiftly,swayzak,suspecting,supplying,suppliers,superstitions,superhuman,subs,stubbornness,structures,streamers,strattman,stonewalling,stimulate,stiffs,station's,stacking,squishy,spout,splice,spec,sonrisa,smarmy,slows,slicing,sisterly,sierra's,sicilian,shrill,shined,shift's,seniority,seine,seeming,sedley,seatbelts,scour,scold,schoolyard,scarring,sash,sark's,salieri,rustling,roxbury,richly,rexy,rex's,rewire,revved,retriever,respective,reputable,repulsed,repeats,rendition,remodel,relocated,reins,reincarnation,regression,reconstruction,readiness,rationale,rance,rafters,radiohead,radio's,rackets,quarterly,quadruple,pumbaa,prosperous,propeller,proclaim,probing,privates,pried,prewedding,premeditation,posturing,posterity,posh,pleasurable,pizzeria,pish,piranha,pimps,penmanship,penchant,penalties,pelvis,patriotism,pasa,papaya,packaging,overturn,overture,overstepped,overcoat,ovens,outsmart,outed,orient,ordained,ooohh,oncologist,omission,olly,offhand,odour,occurring,nyazian,notarized,nobody'll,nightie,nightclubs,newsweek,nesting,navel,nationwide,nabbed,naah,mystique,musk,mover,mortician,morose,moratorium,monster's,moderate,mockingbird,mobsters,misconduct,mingling,mikey's,methinks,metaphysical,messengered,merge,merde,medallion,mathematical,mater,mason's,masochist,martouf,martians,marinara,manray,manned,mammal,majorly,magnifying,mackerel,mabel's,lyme,lurid,lugging,lonnegan,loathsome,llantano,liszt,listings,limiting,liberace,leprosy,latinos,lanterns,lamest,laferette,ladybird,kraut,kook,kits,kipling,joyride,inward,intestine,innocencia,inhibitions,ineffectual,indisposed,incurable,incumbent,incorporated,inconvenienced,inanimate,improbable,implode,idea's,hypothesis,hydrant,hustling,hustled,huevos,how'm,horseshoe,hooey,hoods,honcho,hinge,hijack,heroism,hermit,heimlich,harvesting,hamunaptra,haladki,haiku,haggle,haaa,gutsy,grunting,grueling,grit,grifter,grievances,gribbs,greevy,greeted,green's,grandstanding,godparents,glows,glistening,glider,gimmick,genocide,gaping,fraiser,formalities,foreigner,forecast,footprint,folders,foggy,flaps,fitty,fiends,femmes,fearful,fe'nos,favours,fabio,eyeing,extort,experimentation,expedite,escalating,erect,epinephrine,entitles,entice,enriched,enable,emissions,eminence,eights,ehhh,educating,eden's,earthquakes,earthlings,eagerly,dunville,dugout,draining,doublemeat,doling,disperse,dispensing,dispatches,dispatcher,discoloration,disapproval,diners,dieu,diddly,dictates,diazepam,descendants,derogatory,deposited,delights,defies,decoder,debates,dealio,danson,cutthroat,crumbles,crud,croissants,crematorium,craftsmanship,crafted,could'a,correctional,cordless,cools,contradiction,constitute,conked,confine,concealing,composite,complicates,communique,columbian,cockamamie,coasters,clusters,clobbered,clipping,clipboard,clergy,clemenza,cleanser,circumcision,cindy's,chisel,character's,chanukah,certainaly,centerpiece,cellmate,cartoonist,cancels,cadmium,buzzed,busiest,bumstead,bucko,browsing,broth,broader,break's,braver,boundary,boggling,bobbing,blurred,birkhead,bethesda,benet,belvedere,bellies,begrudge,beckworth,bebe's,banky,baldness,bagpipes,baggy,babysitters,aversion,auxiliary,attributes,attain,astonished,asta,assorted,aspirations,arnold's,area's,appetites,apparel,apocalyptic,apartment's,announcer,angina,amiss,ambulances,allo,alleviate,alibis,algeria,alaskan,airway,affiliated,aerial,advocating,adrenalin,admires,adhesive,actively,accompanying,zeta,yoyou,yoke,yachts,wreaked,wracking,woooo,wooing,wised,winnie's,wind's,wilshire,wedgie,watson's,warden's,waging,violets,vincey,victorious,victories,velcro,vastly,valves,valley's,uplifting,untrustworthy,unmitigated,universities,uneventful,undressing,underprivileged,unburden,umbilical,twigs,tweet,tweaking,turquoise,trustees,truckers,trimmed,triggering,treachery,trapping,tourism,tosses,torching,toothpick,toga,toasty,toasts,tiamat,thickens,ther,tereza,tenacious,temperament,televised,teldar,taxis,taint,swill,sweatin,sustaining,surgery's,surgeries,succeeds,subtly,subterranean,subject's,subdural,streep,stopwatch,stockholder,stillwater,steamer,stang's,stalkers,squished,squeegee,splinters,spliced,splat,spied,specialized,spaz,spackle,sophistication,snapshots,smoky,smite,sluggish,slithered,skin's,skeeters,sidewalks,sickly,shrugs,shrubbery,shrieking,shitless,shithole,settin,servers,serge,sentinels,selfishly,segments,scarcely,sawdust,sanitation,sangria,sanctum,samantha's,sahjhan,sacrament,saber,rustle,rupture,rump,roving,rousing,rosomorf,rosario's,rodents,robust,rigs,riddled,rhythms,revelations,restart,responsibly,repression,reporter's,replied,repairing,renoir,remoray,remedial,relocation,relies,reinforcement,refundable,redirect,recheck,ravenwood,rationalizing,ramus,ramsey's,ramelle,rails,radish,quivering,pyjamas,puny,psychos,prussian,provocations,prouder,protestors,protesters,prohibited,prohibit,progression,prodded,proctologist,proclaimed,primordial,pricks,prickly,predatory,precedents,praising,pragmatic,powerhouse,posterior,postage,porthos,populated,poly,pointe,pivotal,pinata,persistence,performers,pentangeli,pele,pecs,pathetically,parka,parakeet,panicky,pandora's,pamphlets,paired,overthruster,outsmarted,ottoman,orthopedic,oncoming,oily,offing,nutritious,nuthouse,nourishment,nietzsche,nibbling,newlywed,newcomers,need's,nautilus,narcissist,myths,mythical,mutilation,mundane,mummy's,mummies,mumble,mowed,morvern,mortem,mortal's,mopes,mongolian,molasses,modification,misplace,miscommunication,miney,militant,midlife,mens,menacing,memorizing,memorabilia,membrane,massaging,masking,maritime,mapping,manually,magnets,ma's,luxuries,lows,lowering,lowdown,lounging,lothario,longtime,liposuction,lieutenant's,lidocaine,libbets,lewd,levitate,leslie's,leeway,lectured,lauren's,launcher,launcelot,latent,larek,lagos,lackeys,kumbaya,kryptonite,knapsack,keyhole,kensington,katarangura,kann,junior's,juiced,jugs,joyful,jihad,janitor's,jakey,ironclad,invoice,intertwined,interlude,interferes,insurrection,injure,initiating,infernal,india's,indeedy,incur,incorrigible,incantations,imprint,impediment,immersion,immensely,illustrate,ike's,igloo,idly,ideally,hysterectomy,hyah,house's,hour's,hounded,hooch,honeymoon's,hollering,hogs,hindsight,highs,high's,hiatus,helix,heirs,heebie,havesham,hassan's,hasenfuss,hankering,hangers,hakuna,gutless,gusto,grubbing,grrrr,greg's,grazed,gratification,grandeur,gorak,godammit,gnawing,glanced,gladiators,generating,galahad,gaius,furnished,funeral's,fundamentally,frostbite,frees,frazzled,fraulein,fraternizing,fortuneteller,formaldehyde,followup,foggiest,flunky,flickering,flashbacks,fixtures,firecrackers,fines,filly,figger,fetuses,fella's,feasible,fates,eyeliner,extremities,extradited,expires,experimented,exiting,exhibits,exhibited,exes,excursion,exceedingly,evaporate,erupt,equilibrium,epileptic,ephram's,entrails,entities,emporium,egregious,eggshells,easing,duwayne,drone,droll,dreyfuss,drastically,dovey,doubly,doozy,donkeys,donde,dominate,distrust,distributing,distressing,disintegrate,discreetly,disagreements,diff,dick's,devised,determines,descending,deprivation,delegate,dela,degradation,decision's,decapitated,dealin,deader,dashed,darkroom,dares,daddies,dabble,cycles,cushy,currents,cupcakes,cuffed,croupier,croak,criticized,crapped,coursing,cornerstone,copyright,coolers,continuum,contaminate,cont,consummated,construed,construct,condos,concoction,compulsion,committees,commish,columnist,collapses,coercion,coed,coastal,clemency,clairvoyant,circulate,chords,chesterton,checkered,charlatan,chaperones,categorically,cataracts,carano,capsules,capitalize,cache,butcher's,burdon,bullshitting,bulge,buck's,brewed,brethren,bren,breathless,breasted,brainstorming,bossing,borealis,bonsoir,bobka,boast,blimp,bleu,bleep,bleeder,blackouts,bisque,binford's,billboards,bernie's,beecher's,beatings,bayberry,bashed,bartlet's,bapu,bamboozled,ballon,balding,baklava,baffled,backfires,babak,awkwardness,attributed,attest,attachments,assembling,assaults,asphalt,arthur's,arthritis,armenian,arbitrary,apologizes,anyhoo,antiquated,alcante,agency's,advisable,advertisement,adventurer,abundance,aahhh,aaahh,zatarc,yous,york's,yeti,yellowstone,yearbooks,yakuza,wuddya,wringing,woogie,womanhood,witless,winging,whatsa,wetting,wessex,wendy's,way's,waterproof,wastin,washington's,wary,voom,volition,volcanic,vogelman,vocation,visually,violinist,vindicated,vigilance,viewpoint,vicariously,venza,vasily,validity,vacuuming,utensils,uplink,unveil,unloved,unloading,uninhibited,unattached,ukraine,typo,tweaked,twas,turnips,tunisia,tsch,trinkets,tribune,transmitters,translator,train's,toured,toughen,toting,topside,topical,toothed,tippy,tides,theology,terrors,terrify,tentative,technologically,tarnish,target's,tallest,tailored,tagliati,szpilman,swimmers,swanky,susie's,surly,supple,sunken,summation,suds,suckin,substantially,structured,stockholm,stepmom,squeaking,springfield's,spooks,splashmore,spanked,souffle,solitaire,solicitation,solarium,smooch,smokers,smog,slugged,slobbering,skylight,skimpy,situated,sinuses,simplify,silenced,sideburns,sid's,shutdown,shrinkage,shoddy,shhhhhh,shelling,shelled,shareef,shangri,shakey's,seuss,servicing,serenade,securing,scuffle,scrolls,scoff,scholarships,scanners,sauerkraut,satisfies,satanic,sars,sardines,sarcophagus,santino,sandi's,salvy,rusted,russells,ruby's,rowboat,routines,routed,rotating,rolfsky,ringside,rigging,revered,retreated,respectability,resonance,resembling,reparations,reopened,renewal,renegotiate,reminisce,reluctantly,reimburse,regimen,regaining,rectum,recommends,recognizable,realism,reactive,rawhide,rappaport's,raincoat,quibble,puzzled,pursuits,purposefully,puns,pubic,psychotherapy,prosecution's,proofs,proofing,professor's,prevention,prescribing,prelim,positioning,pore,poisons,poaching,pizza's,pertaining,personalized,personable,peroxide,performs,pentonville,penetrated,peggy's,payphone,payoffs,participated,park's,parisian,palp,paleontology,overhaul,overflowing,organised,oompa,ojai,offenders,oddest,objecting,o'hare,o'daniel,notches,noggin,nobody'd,nitrogen,nightstand,niece's,nicky's,neutralized,nervousness,nerdy,needlessly,navigational,narrative,narc,naquadah,nappy,nantucket,nambla,myriad,mussolini,mulberry,mountaineer,mound,motherfuckin,morrie,monopolizing,mohel,mistreated,misreading,misbehave,miramax,minstrel,minivan,milligram,milkshakes,milestone,middleweight,michelangelo,metamorphosis,mesh,medics,mckinnon's,mattresses,mathesar,matchbook,matata,marys,marco's,malucci,majored,magilla,magic's,lymphoma,lowers,lordy,logistics,linens,lineage,lindenmeyer,limelight,libel,leery's,leased,leapt,laxative,lather,lapel,lamppost,laguardia,labyrinth,kindling,key's,kegs,kegger,kawalsky,juries,judo,jokin,jesminder,janine's,izzy,israeli,interning,insulation,institutionalized,inspected,innings,innermost,injun,infallible,industrious,indulgence,indonesia,incinerator,impossibility,imports,impart,illuminate,iguanas,hypnotic,hyped,huns,housed,hostilities,hospitable,hoses,horton's,homemaker,history's,historian,hirschmuller,highlighted,hideout,helpers,headset,guardianship,guapo,guantanamo,grubby,greyhound,grazing,granola,granddaddy,gotham's,goren,goblet,gluttony,glucose,globes,giorno,gillian's,getter,geritol,gassed,gang's,gaggle,freighter,freebie,frederick's,fractures,foxhole,foundations,fouled,foretold,forcibly,folklore,floorboards,floods,floated,flippers,flavour,flaked,firstly,fireflies,feedings,fashionably,fascism,farragut,fallback,factions,facials,exterminate,exited,existent,exiled,exhibiting,excites,everything'll,evenin,evaluated,ethically,entree,entirety,ensue,enema,empath,embryo,eluded,eloquently,elle,eliminates,eject,edited,edema,echoes,earns,dumpling,drumming,droppings,drazen's,drab,dolled,doll's,doctrine,distasteful,disputing,disputes,displeasure,disdain,disciples,diamond's,develops,deterrent,detection,dehydration,defied,defiance,decomposing,debated,dawned,darken,daredevil,dailies,cyst,custodian,crusts,crucifix,crowning,crier,crept,credited,craze,crawls,coveted,couple's,couldn,corresponding,correcting,corkmaster,copperfield,cooties,coopers,cooperated,controller,contraption,consumes,constituents,conspire,consenting,consented,conquers,congeniality,computerized,compute,completes,complains,communicator,communal,commits,commendable,colonels,collide,coladas,colada,clout,clooney,classmate,classifieds,clammy,claire's,civility,cirrhosis,chink,chemically,characterize,censor,catskills,cath,caterpillar,catalyst,carvers,carts,carpool,carelessness,career's,cardio,carbs,captivity,capeside's,capades,butabi,busmalis,bushel,burping,buren,burdens,bunks,buncha,bulldozers,browse,brockovich,bria,breezy,breeds,breakthroughs,bravado,brandy's,bracket,boogety,bolshevik,blossoms,bloomington,blooming,bloodsucker,blockade,blight,blacksmith,betterton,betrayer,bestseller,bennigan's,belittle,beeps,bawling,barts,bartending,barbed,bankbooks,back's,babs,babish,authors,authenticity,atropine,astronomical,assertive,arterial,armbrust,armageddon,aristotle,arches,anyanka,annoyance,anemic,anck,anago,ali's,algiers,airways,airwaves,air's,aimlessly,ails,ahab,afflicted,adverse,adhere,accuracy,aaargh,aaand,zest,yoghurt,yeast,wyndham's,writings,writhing,woven,workable,winking,winded,widen,whooping,whiter,whip's,whatya,whacko,we's,wazoo,wasp,waived,vlad,virile,vino,vic's,veterinary,vests,vestibule,versed,venetian,vaughn's,vanishes,vacancies,urkel,upwards,uproot,unwarranted,unscheduled,unparalleled,undertaking,undergrad,tweedle,turtleneck,turban,trickery,travolta,transylvania,transponder,toyed,townhouse,tonto,toed,tion,tier,thyself,thunderstorm,thnk,thinning,thinkers,theatres,thawed,tether,tempus,telegraph,technicalities,tau'ri,tarp,tarnished,tara's,taggert's,taffeta,tada,tacked,systolic,symbolize,swerve,sweepstakes,swami,swabs,suspenders,surfers,superwoman,sunsets,sumo,summertime,succulent,successes,subpoenas,stumper,stosh,stomachache,stewed,steppin,stepatech,stateside,starvation,staff's,squads,spicoli,spic,sparing,soulless,soul's,sonnets,sockets,snit,sneaker,snatching,smothering,slush,sloman,slashing,sitters,simpson's,simpleton,signify,signal's,sighs,sidra,sideshow,sickens,shunned,shrunken,showbiz,shopped,shootings,shimmering,shakespeare's,shagging,seventeenth,semblance,segue,sedation,scuzzlebutt,scumbags,scribble,screwin,scoundrels,scarsdale,scamp,scabs,saucers,sanctioned,saintly,saddened,runaways,runaround,rumored,rudimentary,rubies,rsvp,rots,roman's,ripley's,rheya,revived,residing,resenting,researcher,repertoire,rehashing,rehabilitated,regrettable,regimental,refreshed,reese's,redial,reconnecting,rebirth,ravenous,raping,ralph's,railroads,rafting,rache,quandary,pylea,putrid,punitive,puffing,psychopathic,prunes,protests,protestant,prosecutors,proportional,progressed,prod,probate,prince's,primate,predicting,prayin,practitioner,possessing,pomegranate,polgara,plummeting,planners,planing,plaintiffs,plagues,pitt's,pithy,photographer's,philharmonic,petrol,perversion,personals,perpetrators,perm,peripheral,periodic,perfecto,perched,pees,peeps,pedigree,peckish,pavarotti,partnered,palette,pajama,packin,pacifier,oyez,overstepping,outpatient,optimum,okama,obstetrician,nutso,nuance,noun,noting,normalcy,normal's,nonnegotiable,nomak,nobleman,ninny,nines,nicey,newsflash,nevermore,neutered,nether,nephew's,negligee,necrosis,nebula,navigating,narcissistic,namesake,mylie,muses,munitions,motivational,momento,moisturizer,moderation,mmph,misinformed,misconception,minnifield,mikkos,methodical,mechanisms,mebbe,meager,maybes,matchmaking,masry,markovic,manifesto,malakai,madagascar,m'am,luzhin,lusting,lumberjack,louvre,loopholes,loaning,lightening,liberals,lesbo,leotard,leafs,leader's,layman's,launder,lamaze,kubla,kneeling,kilo,kibosh,kelp,keith's,jumpsuit,joy's,jovi,joliet,jogger,janover,jakovasaurs,irreparable,intervened,inspectors,innovation,innocently,inigo,infomercial,inexplicable,indispensable,indicative,incognito,impregnated,impossibly,imperfect,immaculate,imitating,illnesses,icarus,hunches,hummus,humidity,housewives,houmfort,hothead,hostiles,hooves,hoopla,hooligans,homos,homie,hisself,himalayas,hidy,hickory,heyyy,hesitant,hangout,handsomest,handouts,haitian,hairless,gwennie,guzzling,guinevere,grungy,grunge,grenada,gout,gordon's,goading,gliders,glaring,geology,gems,gavel,garments,gardino,gannon's,gangrene,gaff,gabrielle's,fundraising,fruitful,friendlier,frequencies,freckle,freakish,forthright,forearm,footnote,footer,foot's,flops,flamenco,fixer,firm's,firecracker,finito,figgered,fezzik,favourites,fastened,farfetched,fanciful,familiarize,faire,failsafe,fahrenheit,fabrication,extravaganza,extracted,expulsion,exploratory,exploitation,explanatory,exclusion,evolutionary,everglades,evenly,eunuch,estas,escapade,erasers,entries,enforcing,endorsements,enabling,emptying,emperor's,emblem,embarassing,ecosystem,ebby,ebay,dweeb,dutiful,dumplings,drilled,drafty,doug's,dolt,dollhouse,displaced,dismissing,disgraced,discrepancies,disbelief,disagreeing,disagreed,digestion,didnt,deviled,deviated,deterioration,departmental,departing,demoted,demerol,delectable,deco,decaying,decadent,dears,daze,dateless,d'algout,cultured,cultivating,cryto,crusades,crumpled,crumbled,cronies,critters,crew's,crease,craves,cozying,cortland,corduroy,cook's,consumers,congratulated,conflicting,confidante,condensed,concessions,compressor,compressions,compression,complicating,complexity,compadre,communicated,coerce,coding,coating,coarse,clown's,clockwise,clerk's,classier,clandestine,chums,chumash,christopher's,choreography,choirs,chivalrous,chinpoko,chilean,chihuahua,cheerio,charred,chafing,celibacy,casts,caste,cashier's,carted,carryin,carpeting,carp,carotid,cannibals,candor,caen,cab's,butterscotch,busts,busier,bullcrap,buggin,budding,brookside,brodski,bristow's,brig,bridesmaid's,brassiere,brainwash,brainiac,botrelle,boatload,blimey,blaring,blackness,bipolar,bipartisan,bins,bimbos,bigamist,biebe,biding,betrayals,bestow,bellerophon,beefy,bedpans,battleship,bathroom's,bassinet,basking,basin,barzini,barnyard,barfed,barbarian,bandit,balances,baker's,backups,avid,augh,audited,attribute,attitudes,at's,astor,asteroids,assortment,associations,asinine,asalaam,arouse,architects,aqua,applejack,apparatus,antiquities,annoys,angela's,anew,anchovies,anchors,analysts,ampule,alphabetically,aloe,allure,alameida,aisles,airfield,ahah,aggressively,aggravate,aftermath,affiliation,aesthetic,advertised,advancing,adept,adage,accomplices,accessing,academics,aagh,zoned,zoey's,zeal,yokel,y'ever,wynant's,wringer,witwer,withdrew,withdrawing,withdrawals,windward,wimbledon,wily,willfully,whorfin,whimsical,whimpering,welding,weddin,weathered,wealthiest,weakening,warmest,wanton,waif,volant,vivo,vive,visceral,vindication,vikram,vigorously,verification,veggies,urinate,uproar,upload,unwritten,unwrap,unsung,unsubstantiated,unspeakably,unscrupulous,unraveling,unquote,unqualified,unfulfilled,undetectable,underlined,unconstitutional,unattainable,unappreciated,ummmm,ulcers,tylenol,tweak,tutu,turnin,turk's,tucker's,tuatha,tropez,trends,trellis,traffic's,torque,toppings,tootin,toodles,toodle,tivo,tinkering,thursday's,thrives,thorne's,thespis,thereafter,theatrics,thatherton,texts,testicle,terr,tempers,teammates,taxpayer,tavington,tampon,tackling,systematic,syndicated,synagogue,swelled,sweeney's,sutures,sustenance,surfaces,superstars,sunflowers,sumatra,sublet,subjective,stubbins,strutting,strewn,streams,stowaway,stoic,sternin,stereotypes,steadily,star's,stalker's,stabilizing,sprang,spotter,spiraling,spinster,spell's,speedometer,specified,speakeasy,sparked,soooo,songwriter,soiled,sneakin,smithereens,smelt,smacks,sloan's,slaughterhouse,slang,slacks,skids,sketching,skateboards,sizzling,sixes,sirree,simplistic,sift,side's,shouts,shorted,shoelace,sheeit,shaw's,shards,shackled,sequestered,selmak,seduces,seclusion,seasonal,seamstress,seabeas,scry,scripted,scotia,scoops,scooped,schillinger's,scavenger,saturation,satch,salaries,safety's,s'more,s'il,rudeness,rostov,romanian,romancing,robo,robert's,rioja,rifkin,rieper,revise,reunions,repugnant,replicating,replacements,repaid,renewing,remembrance,relic,relaxes,rekindle,regulate,regrettably,registering,regenerate,referenced,reels,reducing,reconstruct,reciting,reared,reappear,readin,ratting,rapes,rancho,rancher,rammed,rainstorm,railroading,queers,punxsutawney,punishes,pssst,prudy,proudest,protectors,prohibits,profiling,productivity,procrastinating,procession,proactive,priss,primaries,potomac,postmortem,pompoms,polio,poise,piping,pickups,pickings,physiology,philanthropist,phenomena,pheasant,perfectionist,peretti,people'll,peninsula,pecking,peaks,pave,patrolman,participant,paralegal,paragraphs,paparazzi,pankot,pampering,pain's,overstep,overpower,ovation,outweigh,outlawed,orion's,openness,omnipotent,oleg,okra,okie,odious,nuwanda,nurtured,niles's,newsroom,netherlands,nephews,neeson,needlepoint,necklaces,neato,nationals,muggers,muffler,mousy,mourned,mosey,morn,mormon,mopey,mongolians,moldy,moderately,modelling,misinterpret,minneapolis,minion,minibar,millenium,microfilm,metals,mendola,mended,melissande,me's,mathematician,masturbating,massacred,masbath,marler's,manipulates,manifold,malp,maimed,mailboxes,magnetism,magna,m'lord,m'honey,lymph,lunge,lull,luka,lt's,lovelier,loser's,lonigan's,lode,locally,literacy,liners,linear,lefferts,leezak,ledgers,larraby,lamborghini,laloosh,kundun,kozinski,knockoff,kissin,kiosk,khasinau's,kennedys,kellman,karlo,kaleidoscope,jumble,juggernaut,joseph's,jiminy,jesuits,jeffy,jaywalking,jailbird,itsy,irregularities,inventive,introduces,interpreter,instructing,installing,inquest,inhabit,infraction,informer,infarction,incidence,impulsively,impressing,importing,impersonated,impeach,idiocy,hyperbole,hydra,hurray,hungary,humped,huhuh,hsing,hotspot,horsepower,hordes,hoodlums,honky,hitchhiker,hind,hideously,henchmen,heaving,heathrow,heather's,heathcliff,healthcare,headgear,headboard,hazing,hawking,harem,handprint,halves,hairspray,gutiurrez,greener,grandstand,goosebumps,good's,gondola,gnaw,gnat,glitches,glide,gees,gasping,gases,garrison's,frolic,fresca,freeways,frayed,fortnight,fortitude,forgetful,forefathers,foley's,foiled,focuses,foaming,flossing,flailing,fitzgeralds,firehouse,finders,filmmakers,fiftieth,fiddler,fellah,feats,fawning,farquaad,faraway,fancied,extremists,extremes,expresses,exorcist,exhale,excel,evaluations,ethros,escalated,epilepsy,entrust,enraged,ennui,energized,endowment,encephalitis,empties,embezzling,elster,ellie's,ellen's,elixir,electrolytes,elective,elastic,edged,econ,eclectic,eagle's,duplex,dryers,drexl,dredging,drawback,drafting,don'ts,docs,dobisch,divorcee,ditches,distinguishing,distances,disrespected,disprove,disobeying,disobedience,disinfectant,discs,discoveries,dips,diplomas,dingy,digress,dignitaries,digestive,dieting,dictatorship,dictating,devoured,devise,devane's,detonators,detecting,desist,deserter,derriere,deron,derive,derivative,delegates,defects,defeats,deceptive,debilitating,deathwok,dat's,darryl's,dago,daffodils,curtsy,cursory,cuppa,cumin,cultivate,cujo,cubic,cronkite,cremation,credence,cranking,coverup,courted,countin,counselling,cornball,converting,contentment,contention,contamination,consortium,consequently,consensual,consecutive,compressed,compounds,compost,components,comparative,comparable,commenting,color's,collections,coleridge,coincidentally,cluett,cleverly,cleansed,cleanliness,clea,clare's,citizen's,chopec,chomp,cholera,chins,chime,cheswick,chessler,cheapest,chatted,cauliflower,catharsis,categories,catchin,caress,cardigan,capitalism,canopy,cana,camcorder,calorie,cackling,cabot's,bystanders,buttoned,buttering,butted,buries,burgel,bullpen,buffoon,brogna,brah,bragged,boutros,boosted,bohemian,bogeyman,boar,blurting,blurb,blowup,bloodhound,blissful,birthmark,biotech,bigot,bestest,benefited,belted,belligerent,bell's,beggin,befall,beeswax,beer's,becky's,beatnik,beaming,bazaar,bashful,barricade,banners,bangers,baja,baggoli,badness,awry,awoke,autonomy,automobiles,attica,astoria,assessing,ashram,artsy,artful,aroun,armpits,arming,arithmetic,annihilate,anise,angiogram,andre's,anaesthetic,amorous,ambiguous,ambiance,alligators,afforded,adoration,admittance,administering,adama,aclu,abydos,absorption,zonked,zhivago,zealand,zazu,youngster,yorkin,wrongfully,writin,wrappers,worrywart,woops,wonderfalls,womanly,wickedness,wichita,whoopie,wholesale,wholeheartedly,whimper,which'll,wherein,wheelchairs,what'ya,west's,wellness,welcomes,wavy,warren's,warranted,wankers,waltham,wallop,wading,wade's,wacked,vogue,virginal,vill,vets,vermouth,vermeil,verger,verbs,verbally,ventriss,veneer,vecchio's,vampira,utero,ushers,urgently,untoward,unshakable,unsettled,unruly,unrest,unmanned,unlocks,unified,ungodly,undue,undermined,undergoing,undergo,uncooperative,uncontrollably,unbeatable,twitchy,tunh,tumbler,tubs,truest,troublesome,triumphs,triplicate,tribbey,trent's,transmissions,tortures,torpedoes,torah,tongaree,tommi,tightening,thunderbolt,thunderbird,thorazine,thinly,theta,theres,testifies,terre,teenaged,technological,tearful,taxing,taldor,takashi,tach,symbolizes,symbolism,syllabus,swoops,swingin,swede,sutra,suspending,supplement,sunday's,sunburn,succumbed,subtitled,substituting,subsidiary,subdued,stuttering,stupor,stumps,strummer,strides,strategize,strangulation,stooped,stipulation,stingy,stigma,stewart's,statistic,startup,starlet,stapled,squeaks,squawking,spoilsport,splicing,spiel,spencers,specifications,spawned,spasms,spaniard,sous,softener,sodding,soapbox,snow's,smoldering,smithbauer,slogans,slicker,slasher,skittish,skepticism,simulated,similarity,silvio,signifies,signaling,sifting,sickest,sicilians,shuffling,shrivel,shortstop,sensibility,sender,seminary,selecting,segretti,seeping,securely,scurrying,scrunch,scrote,screwups,schoolteacher,schibetta's,schenkman,sawing,savin,satine,saps,sapiens,salvaging,salmonella,safeguard,sacrilege,rumpus,ruffle,rube,routing,roughing,rotted,roshman's,rondall,road's,ridding,rickshaw,rialto,rhinestone,reversible,revenues,retina,restrooms,resides,reroute,requisite,repress,replicate,repetition,removes,relationship's,regent,regatta,reflective,rednecks,redeeming,rectory,recordings,reasoned,rayed,ravell,raked,rainstorm's,raincheck,raids,raffi,racked,query,quantities,pushin,prototypes,proprietor,promotes,prometheus,promenade,projectile,progeny,profess,prodding,procure,primetime,presuming,preppy,prednisone,predecessor,potted,posttraumatic,poppies,poorhouse,pool's,polaroid,podiatrist,plucky,plowed,pledging,playroom,playhouse,play's,plait,placate,pitchfork,pissant,pinback,picketing,photographing,pharoah,petrak,petal,persecuting,perchance,penny's,pellets,peeved,peerless,payable,pauses,pathways,pathologist,pat's,parchment,papi,pagliacci,owls,overwrought,overwhelmingly,overreaction,overqualified,overheated,outward,outlines,outcasts,otherworldly,originality,organisms,opinionated,oodles,oftentimes,octane,occured,obstinate,observatory,o'er,nutritionist,nutrition,numbness,nubile,notification,notary,nooooooo,nodes,nobodies,nepotism,neighborhoods,neanderthals,musicals,mushu,murphy's,multimedia,mucus,mothering,mothballs,monogrammed,monk's,molesting,misspoke,misspelled,misconstrued,miscellaneous,miscalculated,minimums,mince,mildew,mighta,middleman,metabolic,messengers,mementos,mellowed,meditate,medicare,mayol,maximilian,mauled,massaged,marmalade,mardi,mannie,mandates,mammals,malaysia,makings,major's,maim,lundegaard,lovingly,lout,louisville,loudest,lotto,loosing,loompa,looming,longs,lodging,loathes,littlest,littering,linebacker,lifelike,li'l,legalities,lavery's,laundered,lapdog,lacerations,kopalski,knobs,knitted,kittridge,kidnaps,kerosene,katya,karras,jungles,juke,joes,jockeys,jeremy's,jefe,janeiro,jacqueline's,ithaca,irrigation,iranoff,invoices,invigorating,intestinal,interactive,integration,insolence,insincere,insectopia,inhumane,inhaling,ingrates,infrastructure,infestation,infants,individuality,indianapolis,indeterminate,indefinite,inconsistent,incomprehensible,inaugural,inadequacy,impropriety,importer,imaginations,illuminating,ignited,ignite,iggy,i'da,hysterics,hypodermic,hyperventilate,hypertension,hyperactive,humoring,hotdogs,honeymooning,honed,hoist,hoarding,hitching,hinted,hill's,hiker,hijo,hightail,highlands,hemoglobin,helo,hell'd,heinie,hanoi,hags,gush,guerrillas,growin,grog,grissom's,gregory's,grasped,grandparent,granddaughters,gouged,goblins,gleam,glades,gigantor,get'em,geriatric,geared,gawk,gawd,gatekeeper,gargoyles,gardenias,garcon,garbo,gallows,gabe's,gabby's,gabbing,futon,fulla,frightful,freshener,freedoms,fountains,fortuitous,formulas,forceps,fogged,fodder,foamy,flogging,flaun,flared,fireplaces,firefighters,fins,filtered,feverish,favell,fattest,fattening,fate's,fallow,faculties,fabricated,extraordinaire,expressly,expressive,explorers,evade,evacuating,euclid,ethanol,errant,envied,enchant,enamored,enact,embarking,election's,egocentric,eeny,dussander,dunwitty,dullest,dru's,dropout,dredged,dorsia,dormitory,doot,doornail,dongs,dogged,dodgy,do's,ditty,dishonorable,discriminating,discontinue,dings,dilly,diffuse,diets,dictation,dialysis,deteriorated,delly,delightfully,definitions,decreased,declining,deadliest,daryll,dandruff,cynthia's,cush,cruddy,croquet,crocodiles,cringe,crimp,credo,cranial,crackling,coyotes,courtside,coupling,counteroffer,counterfeiting,corrupting,corrective,copter,copping,conway's,conveyor,contusions,contusion,conspirator,consoling,connoisseur,conjecture,confetti,composure,competitor,compel,commanders,coloured,collector's,colic,coldest,coincide,coddle,cocksuckers,coax,coattails,cloned,cliff's,clerical,claustrophobia,classrooms,clamoring,civics,churn,chugga,chromosomes,christened,chopper's,chirping,chasin,characterized,chapped,chalkboard,centimeter,caymans,catheter,caspian,casings,cartilage,carlton's,card's,caprica,capelli,cannolis,cannoli,canals,campaigns,camogli,camembert,butchers,butchered,busboys,bureaucrats,bungalow,buildup,budweiser,buckled,bubbe,brownstone,bravely,brackley,bouquets,botox,boozing,boosters,bodhi,blunders,blunder,blockage,blended,blackberry,bitch's,birthplace,biocyte,biking,bike's,betrays,bestowed,bested,beryllium,beheading,beginner's,beggar,begbie,beamed,bayou,bastille,bask,barstool,barricades,baron's,barbecues,barbecued,barb's,bandwagon,bandits,ballots,ballads,backfiring,bacarra,avoidance,avenged,autopsies,austrian,aunties,attache,atrium,associating,artichoke,arrowhead,arrivals,arose,armory,appendage,apostrophe,apostles,apathy,antacid,ansel,anon,annul,annihilation,andrew's,anderson's,anastasia's,amuses,amped,amicable,amendments,amberg,alluring,allotted,alfalfa,alcoholism,airs,ailing,affinity,adversaries,admirers,adlai,adjective,acupuncture,acorn,abnormality,aaaahhhh,zooming,zippity,zipping,zeroed,yuletide,yoyodyne,yengeese,yeahhh,xena,wrinkly,wracked,wording,withered,winks,windmills,widow's,whopping,wholly,wendle,weigart,weekend's,waterworks,waterford,waterbed,watchful,wantin,wally's,wail,wagging,waal,waaah,vying,voter,ville,vertebrae,versatile,ventures,ventricle,varnish,vacuumed,uugh,utilities,uptake,updating,unreachable,unprovoked,unmistakable,unky,unfriendly,unfolding,undesirable,undertake,underpaid,uncuff,unchanged,unappealing,unabomber,ufos,tyres,typhoid,tweek's,tuxedos,tushie,turret,turds,tumnus,tude,truman's,troubadour,tropic,trinium,treaters,treads,transpired,transient,transgression,tournaments,tought,touchdowns,totem,tolstoy,thready,thins,thinners,thas,terrible's,television's,techs,teary,tattaglia,tassels,tarzana,tape's,tanking,tallahassee,tablecloths,synonymous,synchronize,symptomatic,symmetrical,sycophant,swimmingly,sweatshop,surrounds,surfboard,superpowers,sunroom,sunflower,sunblock,sugarplum,sudan,subsidies,stupidly,strumpet,streetcar,strategically,strapless,straits,stooping,stools,stifler,stems,stealthy,stalks,stairmaster,staffer,sshhh,squatting,squatters,spores,spelt,spectacularly,spaniel,soulful,sorbet,socked,society's,sociable,snubbed,snub,snorting,sniffles,snazzy,snakebite,smuggler,smorgasbord,smooching,slurping,sludge,slouch,slingshot,slicer,slaved,skimmed,skier,sisterhood,silliest,sideline,sidarthur,shrink's,shipwreck,shimmy,sheraton,shebang,sharpening,shanghaied,shakers,sendoff,scurvy,scoliosis,scaredy,scaled,scagnetti,saxophone,sawchuk,saviour,saugus,saturated,sasquatch,sandbag,saltines,s'pose,royalties,routinely,roundabout,roston,rostle,riveting,ristle,righ,rifling,revulsion,reverently,retrograde,restriction,restful,resolving,resents,rescinded,reptilian,repository,reorganize,rentals,rent's,renovating,renal,remedies,reiterate,reinvent,reinmar,reibers,reechard,recuse,recorders,record's,reconciling,recognizance,recognised,reclaiming,recitation,recieved,rebate,reacquainted,rations,rascals,raptors,railly,quintuplets,quahog,pygmies,puzzling,punctuality,psychoanalysis,psalm,prosthetic,proposes,proms,proliferation,prohibition,probie,printers,preys,pretext,preserver,preppie,prag,practise,postmaster,portrayed,pollen,polled,poachers,plummet,plumbers,pled,plannin,pitying,pitfalls,piqued,pinecrest,pinches,pillage,pigheaded,pied,physique,pessimistic,persecute,perjure,perch,percentile,pentothal,pensky,penises,peking,peini,peacetime,pazzi,pastels,partisan,parlour,parkway,parallels,paperweight,pamper,palsy,palaces,pained,overwhelm,overview,overalls,ovarian,outrank,outpouring,outhouse,outage,ouija,orbital,old's,offset,offer's,occupying,obstructed,obsessions,objectives,obeying,obese,o'riley,o'neal,o'higgins,nylon,notoriously,nosebleeds,norman's,norad,noooooooo,nononono,nonchalant,nominal,nome,nitrous,nippy,neurosis,nekhorvich,necronomicon,nativity,naquada,nano,nani,n'est,mystik,mystified,mums,mumps,multinational,muddle,mothership,moped,monumentally,monogamous,mondesi,molded,mixes,misogynistic,misinterpreting,miranda's,mindlock,mimic,midtown,microphones,mending,megaphone,meeny,medicating,meanings,meanie,masseur,maru,marshal's,markstrom,marklars,mariachi,margueritas,manifesting,maintains,mail's,maharajah,lurk,lulu's,lukewarm,loveliest,loveable,lordship,looting,lizardo,liquored,lipped,lingers,limey,limestone,lieutenants,lemkin,leisurely,laureate,lathe,latched,lars,lapping,ladle,kuala,krevlorneswath,kosygin,khakis,kenaru,keats,kath,kaitlan,justin's,julliard,juliet's,journeys,jollies,jiff,jaundice,jargon,jackals,jabot's,invoked,invisibility,interacting,instituted,insipid,innovative,inflamed,infinitely,inferiority,inexperience,indirectly,indications,incompatible,incinerated,incinerate,incidental,incendiary,incan,inbred,implicitly,implicating,impersonator,impacted,ida's,ichiro,iago,hypo,hurricanes,hunks,host's,hospice,horsing,hooded,honey's,homestead,hippopotamus,hindus,hiked,hetson,hetero,hessian,henslowe,hendler,hellstrom,hecate,headstone,hayloft,hater,hast,harold's,harbucks,handguns,hallucinate,halliwell's,haldol,hailing,haggling,hadj,gynaecologist,gumball,gulag,guilder,guaranteeing,groundskeeper,ground's,grindstone,grimoir,grievance,griddle,gribbit,greystone,graceland,gooders,goeth,glossy,glam,giddyup,gentlemanly,gels,gelatin,gazelle,gawking,gaulle,gate's,ganged,fused,fukes,fromby,frenchmen,franny,foursome,forsley,foreman's,forbids,footwork,foothold,fonz,fois,foie,floater,flinging,flicking,fittest,fistfight,fireballs,filtration,fillings,fiddling,festivals,fertilization,fennyman,felonious,felonies,feces,favoritism,fatten,fanfare,fanatics,faceman,extensions,executions,executing,excusing,excepted,examiner's,ex's,evaluating,eugh,erroneous,enzyme,envoy,entwined,entrances,ensconced,enrollment,england's,enemy's,emit,emerges,embankment,em's,ellison's,electrons,eladio,ehrlichman,easterland,dylan's,dwellers,dueling,dubbed,dribbling,drape,doze,downtrodden,doused,dosed,dorleen,dopamine,domesticated,dokie,doggone,disturbances,distort,displeased,disown,dismount,disinherited,disarmed,disapproves,disabilities,diperna,dioxide,dined,diligent,dicaprio,diameter,dialect,detonated,destitute,designate,depress,demolish,demographics,degraded,deficient,decoded,debatable,dealey,darsh,dapper,damsels,damning,daisy's,dad'll,d'oeuvre,cutter's,curlers,curie,cubed,cryo,critically,crikey,crepes,crackhead,countrymen,count's,correlation,cornfield,coppers,copilot,copier,coordinating,cooing,converge,contributor,conspiracies,consolidated,consigliere,consecrated,configuration,conducts,condoning,condemnation,communities,commoner,commies,commented,comical,combust,comas,colds,clod,clique,clay's,clawed,clamped,cici,christianity,choosy,chomping,chimps,chigorin,chianti,cheval,chet's,cheep,checkups,check's,cheaters,chase's,charted,celibate,cautiously,cautionary,castell,carpentry,caroling,carjacking,caritas,caregiver,cardiology,carb,capturing,canteen,candlesticks,candies,candidacy,canasta,calendars,cain't,caboose,buster's,burro,burnin,buon,bunking,bumming,bullwinkle,budgets,brummel,brooms,broadcasts,britt's,brews,breech,breathin,braslow,bracing,bouts,botulism,bosnia,boorish,bluenote,bloodless,blayne,blatantly,blankie,birdy,bene,beetles,bedbugs,becuase,becks,bearers,bazooka,baywatch,bavarian,baseman,bartender's,barrister,barmaid,barges,bared,baracus,banal,bambino,baltic,baku,bakes,badminton,bacon's,backpacks,authorizing,aurelius,attentions,atrocious,ativan,athame,asunder,astound,assuring,aspirins,asphyxiation,ashtrays,aryans,artistry,arnon,aren,approximate,apprehension,appraisal,applauding,anya's,anvil,antiquing,antidepressants,annoyingly,amputate,altruistic,alotta,allegation,alienation,algerian,algae,alerting,airport's,aided,agricultural,afterthought,affront,affirm,adapted,actuality,acoustics,acoustic,accumulate,accountability,abysmal,absentee,zimm,yves,yoohoo,ymca,yeller,yakushova,wuzzy,wriggle,worrier,workmen,woogyman,womanizer,windpipe,windex,windbag,willy's,willin,widening,whisking,whimsy,wendall,weeny,weensy,weasels,watery,watcha,wasteful,waski,washcloth,wartime,waaay,vowel,vouched,volkswagen,viznick,visuals,visitor's,veteran's,ventriloquist,venomous,vendors,vendettas,veils,vehicular,vayhue,vary,varies,van's,vamanos,vadimus,uuhh,upstage,uppity,upheaval,unsaid,unlocking,universally,unintentionally,undisputed,undetected,undergraduate,undergone,undecided,uncaring,unbearably,twos,tween,tuscan,turkey's,tumor's,tryout,trotting,tropics,trini,trimmings,trickier,tree's,treatin,treadstone,trashcan,transports,transistor,transcendent,tramps,toxicity,townsfolk,torturous,torrid,toothpicks,tombs,tolerable,toenail,tireless,tiptoeing,tins,tinkerbell,tink,timmay,tillinghouse,tidying,tibia,thumbing,thrusters,thrashing,thompson's,these'll,testicular,terminology,teriyaki,tenors,tenacity,tellers,telemetry,teas,tea's,tarragon,taliban,switchblade,swicker,swells,sweatshirts,swatches,swatch,swapped,suzanne's,surging,supremely,suntan,sump'n,suga,succumb,subsidize,subordinate,stumbles,stuffs,stronghold,stoppin,stipulate,stewie's,stenographer,steamroll,stds,stately,stasis,stagger,squandered,splint,splendidly,splatter,splashy,splashing,spectra's,specter,sorry's,sorcerers,soot,somewheres,somber,solvent,soldier's,soir,snuggled,snowmobile,snowball's,sniffed,snake's,snags,smugglers,smudged,smirking,smearing,slings,sleet,sleepovers,sleek,slackers,skirmish,siree,siphoning,singed,sincerest,signifying,sidney's,sickened,shuffled,shriveled,shorthanded,shittin,shish,shipwrecked,shins,shingle,sheetrock,shawshank,shamu,sha're,servitude,sequins,seinfeld's,seat's,seascape,seam,sculptor,scripture,scrapings,scoured,scoreboard,scorching,sciences,sara's,sandpaper,salvaged,saluting,salud,salamander,rugrats,ruffles,ruffled,rudolph's,router,roughnecks,rougher,rosslyn,rosses,rosco's,roost,roomy,romping,romeo's,robs,roadie,ride's,riddler,rianna's,revolutionize,revisions,reuniting,retake,retaining,restitution,restaurant's,resorts,reputed,reprimanded,replies,renovate,remnants,refute,refrigerated,reforms,reeled,reefs,reed's,redundancies,rectangle,rectal,recklessly,receding,reassignment,rearing,reapers,realms,readout,ration,raring,ramblings,racetrack,raccoons,quoi,quell,quarantined,quaker,pursuant,purr,purging,punters,pulpit,publishers,publications,psychologists,psychically,provinces,proust,protocols,prose,prophets,project's,priesthood,prevailed,premarital,pregnancies,predisposed,precautionary,poppin,pollute,pollo,podunk,plums,plaything,plateau,pixilated,pivot,pitting,piranhas,pieced,piddles,pickled,picker,photogenic,phosphorous,phases,pffft,petey's,pests,pestilence,pessimist,pesos,peruvian,perspiration,perps,penticoff,pedals,payload,passageways,pardons,paprika,paperboy,panics,pancamo,pam's,paleontologist,painting's,pacifist,ozzie,overwhelms,overstating,overseeing,overpaid,overlap,overflow,overdid,outspoken,outlive,outlaws,orthodontist,orin,orgies,oreos,ordover,ordinates,ooooooh,oooohhh,omelettes,officiate,obtuse,obits,oakwood,nymph,nutritional,nuremberg,nozzle,novocaine,notable,noooooooooo,node,nipping,nilly,nikko,nightstick,nicaragua,neurology,nelson's,negate,neatness,natured,narrowly,narcotic,narcissism,napoleon's,nana's,namun,nakatomi,murky,muchacho,mouthwash,motzah,motherfucker's,mortar,morsel,morrison's,morph,morlocks,moreover,mooch,monoxide,moloch,molest,molding,mohra,modus,modicum,mockolate,mobility,missionaries,misdemeanors,miscalculation,minorities,middies,metric,mermaids,meringue,mercilessly,merchandising,ment,meditating,me'n,mayakovsky,maximillian,martinique,marlee,markovski,marissa's,marginal,mansions,manitoba,maniacal,maneuvered,mags,magnificence,maddening,lyrical,lutze,lunged,lovelies,lou's,lorry,loosening,lookee,liver's,liva,littered,lilac,lightened,lighted,licensing,lexington,lettering,legality,launches,larvae,laredo,landings,lancelot's,laker,ladyship's,laces,kurzon,kurtzweil,kobo,knowledgeable,kinship,kind've,kimono,kenji,kembu,keanu,kazuo,kayaking,juniors,jonesing,joad,jilted,jiggling,jewelers,jewbilee,jeffrey's,jamey's,jacqnoud,jacksons,jabs,ivories,isnt,irritation,iraqis,intellectuals,insurmountable,instances,installments,innocuous,innkeeper,inna,influencing,infantery,indulged,indescribable,incorrectly,incoherent,inactive,inaccurate,improperly,impervious,impertinent,imperfections,imhotep,ideology,identifies,i'il,hymns,huts,hurdles,hunnert,humpty,huffy,hourly,horsies,horseradish,hooo,honours,honduras,hollowed,hogwash,hockley,hissing,hiromitsu,hierarchy,hidin,hereafter,helpmann,haughty,happenings,hankie,handsomely,halliwells,haklar,haise,gunsights,gunn's,grossly,grossed,grope,grocer,grits,gripping,greenpeace,granddad's,grabby,glorificus,gizzard,gilardi,gibarian,geminon,gasses,garnish,galloping,galactic,gairwyn,gail's,futterman,futility,fumigated,fruitless,friendless,freon,fraternities,franc,fractions,foxes,foregone,forego,foliage,flux,floored,flighty,fleshy,flapjacks,fizzled,fittings,fisherman's,finalist,ficus,festering,ferragamo's,federation,fatalities,farbman,familial,famed,factual,fabricate,eyghon,extricate,exchanges,exalted,evolving,eventful,esophagus,eruption,envision,entre,enterprising,entail,ensuring,enrolling,endor,emphatically,eminent,embarrasses,electroshock,electronically,electrodes,efficiently,edinburgh,ecstacy,ecological,easel,dwarves,duffle,drumsticks,drake's,downstream,downed,dollface,divas,distortion,dissent,dissection,dissected,disruptive,disposing,disparaging,disorientation,disintegrated,discounts,disarming,dictated,devoting,deviation,detective's,dessaline,deprecating,deplorable,delve,deity,degenerative,deficiencies,deduct,decomposed,deceased's,debbie's,deathly,dearie,daunting,dankova,czechoslovakia,cyclotron,cyberspace,cutbacks,cusp,culpable,cuddled,crypto,crumpets,cruises,cruisers,cruelly,crowns,crouching,cristo,crip,criminology,cranium,cramming,cowering,couric,counties,cosy,corky's,cordesh,conversational,conservatory,conklin's,conducive,conclusively,competitions,compatibility,coeur,clung,cloud's,clotting,cleanest,classify,clambake,civilizations,cited,cipher,cinematic,chlorine,chipping,china's,chimpanzee,chests,checkpoints,cheapen,chainsaws,censure,censorship,cemeteries,celebrates,ceej,cavities,catapult,cassettes,cartridge,caravaggio,carats,captivating,cancers,campuses,campbell's,calrissian,calibre,calcutta,calamity,butt's,butlers,busybody,bussing,bureau's,bunion,bundy's,bulimic,bulgaria,budging,brung,browbeat,brokerage,brokenhearted,brecher,breakdowns,braun's,bracebridge,boyhood,botanical,bonuses,boning,blowhard,bloc,blisters,blackboard,blackbird,births,birdies,bigotry,biggy,bibliography,bialy,bhamra,bethlehem,bet's,bended,belgrade,begat,bayonet,bawl,battering,baste,basquiat,barrymore,barrington's,barricaded,barometer,balsom's,balled,ballast,baited,badenweiler,backhand,aztec,axle,auschwitz,astrophysics,ascenscion,argumentative,arguably,arby's,arboretum,aramaic,appendicitis,apparition,aphrodite,anxiously,antagonistic,anomalies,anne's,angora,anecdotes,anand,anacott,amniotic,amenities,ambience,alonna,aleck,albert's,akashic,airing,ageless,afro,affiliates,advertisers,adobe,adjustable,acrobat,accommodation,accelerating,absorbing,abouts,abortions,abnormalities,aawwww,aaaaarrrrrrggghhh,zuko's,zoloft,zendi,zamboni,yuppies,yodel,y'hear,wyck,wrangle,wounding,worshippers,worker's,worf,wombosi,wittle,withstanding,wisecracks,williamsburg,wilder's,wiggly,wiggling,wierd,whittlesley,whipper,whattya,whatsamatter,whatchamacallit,whassup,whad'ya,weighted,weakling,waxy,waverly,wasps,warhol,warfarin,waponis,wampum,walled,wadn't,waco,vorash,vogler's,vizzini,visas,virtucon,viridiana,veve,vetoed,vertically,veracity,ventricular,ventilated,varicose,varcon,vandalized,vampire's,vamos,vamoose,val's,vaccinated,vacationing,usted,urinal,uppers,upkeep,unwittingly,unsigned,unsealed,unplanned,unhinged,unhand,unfathomable,unequivocally,unearthed,unbreakable,unanimously,unadvisedly,udall,tynacorp,twisty,tuxes,tussle,turati,tunic,tubing,tsavo,trussed,troublemakers,trollop,trip's,trinket,trilogy,tremors,trekkie,transsexual,transitional,transfusions,tractors,toothbrushes,toned,toke,toddlers,titan's,tita,tinted,timon,timeslot,tightened,thundering,thorpey,thoracic,this'd,thespian,therapist's,theorem,thaddius,texan,tenuous,tenths,tenement,telethon,teleprompter,technicolor,teaspoon,teammate,teacup,taunted,tattle,tardiness,taraka,tappy,tapioca,tapeworm,tanith,tandem,talons,talcum,tais,tacks,synchronized,swivel,swig,swaying,swann's,suppression,supplements,superpower,summed,summarize,sumbitch,sultry,sulfur,sues,subversive,suburbia,substantive,styrofoam,stylings,struts,strolls,strobe,streaks,strategist,stockpile,stewardesses,sterilized,sterilize,stealin,starred,stakeouts,stad,squawk,squalor,squabble,sprinkled,sportsmanship,spokes,spiritus,spectators,specialties,sparklers,spareribs,sowing,sororities,sorbonne,sonovabitch,solicit,softy,softness,softening,socialite,snuggling,snatchers,snarling,snarky,snacking,smythe's,smears,slumped,slowest,slithering,sleepers,sleazebag,slayed,slaughtering,skynet,skidded,skated,sivapathasundaram,sitter's,sitcoms,sissies,sinai,silliness,silences,sidecar,sicced,siam,shylock,shtick,shrugged,shriek,shredder,shoves,should'a,shorten,shortcake,shockingly,shirking,shelly's,shedding,shaves,shatner,sharpener,shapely,shafted,sexless,sequencing,septum,semitic,selflessness,sega,sectors,seabea,scuff,screwball,screened,scoping,scooch,scolding,scholarly,schnitzel,schemed,scalper,sayings,saws,sashimi,santy,sankara,sanest,sanatorium,sampled,samoan,salzburg,saltwater,salma,salesperson,sakulos,safehouse,sabers,rwanda,ruth's,runes,rumblings,rumbling,ruijven,roxie's,round's,ringers,rigorous,righto,rhinestones,reviving,retrieving,resorted,reneging,remodelling,reliance,relentlessly,relegated,relativity,reinforced,reigning,regurgitate,regulated,refills,referencing,reeking,reduces,recreated,reclusive,recklessness,recanted,ranges,ranchers,rallied,rafer,racy,quintet,quaking,quacks,pulses,provision,prophesied,propensity,pronunciation,programmer,profusely,procedural,problema,principals,prided,prerequisite,preferences,preceded,preached,prays,postmark,popsicles,poodles,pollyanna,policing,policeman's,polecat,polaroids,polarity,pokes,poignant,poconos,pocketful,plunging,plugging,pleeease,pleaser,platters,pitied,pinetti,piercings,phyllis's,phooey,phonies,pestering,periscope,perennial,perceptions,pentagram,pelts,patronized,parliamentary,paramour,paralyze,paraguay,parachutes,pancreatic,pales,paella,paducci,oxymoron,owatta,overpass,overgrown,overdone,overcrowded,overcompensating,overcoming,ostracized,orphaned,organise,organisation,ordinate,orbiting,optometrist,oprah's,operandi,oncology,on's,omoc,omens,okayed,oedipal,occupants,obscured,oboe,nuys,nuttier,nuptial,nunheim,noxious,nourish,notepad,notation,nordic,nitroglycerin,niki's,nightmare's,nightlife,nibblet,neuroses,neighbour's,navy's,nationally,nassau,nanosecond,nabbit,mythic,murdock's,munchkins,multiplied,multimillion,mulroney,mulch,mucous,muchas,moxie,mouth's,mountaintop,mounds,morlin,mongorians,moneymaker,moneybags,monde,mom'll,molto,mixup,mitchell's,misgivings,misery's,minerals,mindset,milo's,michalchuk,mesquite,mesmerized,merman,mensa,megan's,media's,meaty,mbwun,materialize,materialistic,mastery,masterminded,mastercard,mario's,marginally,mapuhe,manuscripts,manny's,malvern,malfunctioning,mahatma,mahal,magnify,macnamara,macinerney,machinations,macarena,macadamia,lysol,luxembourg,lurks,lumpur,luminous,lube,lovelorn,lopsided,locator,lobbying,litback,litany,linea,limousines,limo's,limes,lighters,liechtenstein,liebkind,lids,libya,levity,levelheaded,letterhead,lester's,lesabre,leron,lepers,legions,lefts,leftenant,learner's,laziness,layaway,laughlan,lascivious,laryngitis,laptops,lapsed,laos,landok,landfill,laminated,laden,ladders,labelled,kyoto,kurten,kobol,koala,knucklehead,knowed,knotted,kit's,kinsa,kiln,kickboxing,karnovsky,karat,kacl's,judiciary,judaism,journalistic,jolla,joked,jimson,jettison,jet's,jeric,jeeves,jay's,jawed,jankis,janitors,janice's,jango,jamaican,jalopy,jailbreak,jackers,jackasses,j'ai,ivig,invalidate,intoxicated,interstellar,internationally,intercepting,intercede,integrate,instructors,insinuations,insignia,inn's,inflicting,infiltrated,infertile,ineffective,indies,indie,impetuous,imperialist,impaled,immerse,immaterial,imbeciles,imam,imagines,idyllic,idolized,icebox,i'd've,hypochondriac,hyphen,hydraulic,hurtling,hurried,hunchback,hums,humid,hullo,hugger,hubby's,howard's,hostel,horsting,horned,hoooo,homies,homeboys,hollywood's,hollandaise,hoity,hijinks,heya,hesitates,herrero,herndorff,hemp,helplessly,heeyy,heathen,hearin,headband,harv,harrassment,harpies,harmonious,harcourt,harbors,hannah's,hamstring,halstrom,hahahahaha,hackett's,hacer,gunmen,guff,grumbling,grimlocks,grift,greets,grandmothers,grander,granddaughter's,gran's,grafts,governing,gordievsky,gondorff,godorsky,goddesses,glscripts,gillman's,geyser,gettysburg,geological,gentlemen's,genome,gauntlet,gaudy,gastric,gardeners,gardener's,gandolf,gale's,gainful,fuses,fukienese,fucker's,frizzy,freshness,freshening,freb,fraught,frantically,fran's,foxbooks,fortieth,forked,forfeited,forbidding,footed,foibles,flunkies,fleur,fleece,flatbed,flagship,fisted,firefight,fingerpaint,fined,filibuster,fiancee's,fhloston,ferrets,fenceline,femur,fellow's,fatigues,farmhouse,fanucci,fantastically,familiars,falafel,fabulously,eyesore,extracting,extermination,expedient,expectancy,exiles,executor,excluding,ewwww,eviscerated,eventual,evac,eucalyptus,ethnicity,erogenous,equestrian,equator,epidural,enrich,endeavors,enchante,embroidered,embarassed,embarass,embalming,emails,elude,elspeth,electrocute,electrified,eigth,eheh,eggshell,eeyy,echinacea,eases,earpiece,earlobe,dwarfs,dumpsters,dumbshit,dumbasses,duloc,duisberg,drummed,drinkers,dressy,drainage,dracula's,dorma,dolittle,doily,divvy,diverting,ditz,dissuade,disrespecting,displacement,displace,disorganized,dismantled,disgustingly,discriminate,discord,disapproving,dinero,dimwit,diligence,digitally,didja,diddy,dickless,diced,devouring,devlin's,detach,destructing,desperado,desolate,designation,derek's,deposed,dependency,dentist's,demonstrates,demerits,delirium,degrade,deevak,deemesa,deductions,deduce,debriefed,deadbeats,dazs,dateline,darndest,damnable,dalliance,daiquiri,d'agosta,cuvee's,cussing,curate,cryss,cripes,cretins,creature's,crapper,crackerjack,cower,coveting,couriers,countermission,cotswolds,cornholio,copa,convinces,convertibles,conversationalist,contributes,conspirators,consorting,consoled,conservation,consarn,confronts,conformity,confides,confidentially,confederacy,concise,competence,commited,commissioners,commiserate,commencing,comme,commandos,comforter,comeuppance,combative,comanches,colosseum,colling,collaboration,coli,coexist,coaxing,cliffside,clayton's,clauses,cia's,chuy,chutes,chucked,christian's,chokes,chinaman,childlike,childhoods,chickening,chicano,chenowith,chassis,charmingly,changin,championships,chameleon,ceos,catsup,carvings,carlotta's,captioning,capsize,cappucino,capiche,cannonball,cannibal,candlewell,cams,call's,calculation,cakewalk,cagey,caesar's,caddie,buxley,bumbling,bulky,bulgarian,bugle,buggered,brussel,brunettes,brumby,brotha,bros,bronck,brisket,bridegroom,breathing's,breakout,braveheart,braided,bowled,bowed,bovary,bordering,bookkeeper,bluster,bluh,blue's,blot,bloodline,blissfully,blarney,binds,billionaires,billiard,bide,bicycles,bicker,berrisford,bereft,berating,berate,bendy,benches,bellevue,belive,believers,belated,beikoku,beens,bedspread,bed's,bear's,bawdy,barrett's,barreling,baptize,banya,balthazar,balmoral,bakshi,bails,badgered,backstreet,backdrop,awkwardly,avoids,avocado,auras,attuned,attends,atheists,astaire,assuredly,art's,arrivederci,armaments,arises,argyle,argument's,argentine,appetit,appendectomy,appealed,apologetic,antihistamine,antigua,anesthesiologist,amulets,algonquin,alexander's,ales,albie,alarmist,aiight,agility,aforementioned,adstream,adolescents,admirably,adjectives,addison's,activists,acquaint,acids,abound,abominable,abolish,abode,abfc,aaaaaaah,zorg,zoltan,zoe's,zekes,zatunica,yama,wussy,wrcw,worded,wooed,woodrell,wiretap,windowsill,windjammer,windfall,whitey's,whitaker's,whisker,whims,whatiya,whadya,westerns,welded,weirdly,weenies,webster's,waunt,washout,wanto,waning,vitality,vineyards,victimless,vicki's,verdad,veranda,vegan,veer,vandaley,vancouver,vancomycin,valise,validated,vaguest,usefulness,upshot,uprising,upgrading,unzip,unwashed,untrained,unsuitable,unstuck,unprincipled,unmentionables,unjustly,unit's,unfolds,unemployable,uneducated,unduly,undercut,uncovering,unconsciousness,unconsciously,unbeknownst,unaffected,ubiquitous,tyndareus,tutors,turncoat,turlock,tulle,tuesday's,tryouts,truth's,trouper,triplette,trepkos,tremor,treeger,treatment's,traveller,traveler's,trapeze,traipse,tradeoff,trach,torin,tommorow,tollan,toity,timpani,tilted,thumbprint,throat's,this's,theater's,thankless,terrestrial,tenney's,tell'em,telepathy,telemarketing,telekinesis,teevee,teeming,tc's,tarred,tankers,tambourine,talentless,taki,takagi,swooped,switcheroo,swirly,sweatpants,surpassed,surgeon's,supermarkets,sunstroke,suitors,suggestive,sugarcoat,succession,subways,subterfuge,subservient,submitting,subletting,stunningly,student's,strongbox,striptease,stravanavitch,stradling,stoolie,stodgy,stocky,stimuli,stigmata,stifle,stealer,statewide,stark's,stardom,stalemate,staggered,squeezes,squatter,squarely,sprouted,spool,spirit's,spindly,spellman's,speedos,specify,specializing,spacey,soups,soundly,soulmates,somethin's,somebody'll,soliciting,solenoid,sobering,snowflakes,snowballs,snores,slung,slimming,slender,skyscrapers,skulk,skivvies,skillful,skewered,skewer,skaters,sizing,sistine,sidebar,sickos,shushing,shunt,shugga,shone,shol'va,shiv,shifter,sharply,sharpened,shareholder,shapeshifter,shadowing,shadoe,serviced,selwyn,selectman,sefelt,seared,seamen,scrounging,scribbling,scotty's,scooping,scintillating,schmoozing,schenectady,scene's,scattering,scampi,scallops,sat's,sapphires,sans,sanitarium,sanded,sanction,safes,sacrificial,rudely,roust,rosebush,rosasharn,rondell,roadhouse,riveted,rile,ricochet,rhinoceros,rewrote,reverence,revamp,retaliatory,rescues,reprimand,reportedly,replicators,replaceable,repeal,reopening,renown,remo's,remedied,rembrandt,relinquishing,relieving,rejoicing,reincarnated,reimbursed,refinement,referral,reevaluate,redundancy,redid,redefine,recreating,reconnected,recession,rebelling,reassign,rearview,reappeared,readily,rayne,ravings,ravage,ratso,rambunctious,rallying,radiologist,quiver,quiero,queef,quark,qualms,pyrotechnics,pyro,puritan,punky,pulsating,publisher's,psychosomatic,provisional,proverb,protested,proprietary,promiscuous,profanity,prisoner's,prioritize,preying,predisposition,precocious,precludes,preceding,prattling,prankster,povich,potting,postpartum,portray,porter's,porridge,polluting,pogo,plowing,plating,plankton,pistachio,pissin,pinecone,pickpocket,physicists,physicals,pesticides,peruse,pertains,personified,personalize,permitting,perjured,perished,pericles,perfecting,percentages,pepys,pepperdine,pembry,peering,peels,pedophile,patties,pathogen,passkey,parrots,paratroopers,paratrooper,paraphernalia,paralyzing,panned,pandering,paltry,palpable,painkiller,pagers,pachyderm,paced,overtaken,overstay,overestimated,overbite,outwit,outskirts,outgrow,outbid,origins,ordnance,ooze,ooops,oomph,oohhh,omni,oldie,olas,oddball,observers,obscurity,obliterate,oblique,objectionable,objected,oars,o'keefe,nygma,nyet,nouveau,notting,nothin's,noches,nnno,nitty,nighters,nigger's,niche,newsstands,newfoundland,newborns,neurosurgery,networking,nellie's,nein,neighboring,negligible,necron,nauseated,nastiest,nasedo's,narrowing,narrator,narcolepsy,napa,nala,nairobi,mutilate,muscled,murmur,mulva,multitude,multiplex,mulling,mules,mukada,muffled,mueller's,motorized,motif,mortgages,morgues,moonbeams,monogamy,mondays,mollusk,molester,molestation,molars,modifications,modeled,moans,misuse,misprint,mismatched,mirth,minnow,mindful,mimosas,millander,mikhail,mescaline,mercutio,menstrual,menage,mellowing,medicaid,mediator,medevac,meddlesome,mcgarry's,matey,massively,massacres,marky,many's,manifests,manifested,manicures,malevolent,malaysian,majoring,madmen,mache,macarthur's,macaroons,lydell,lycra,lunchroom,lunching,lozenges,lorenzo's,looped,look's,lolly,lofty,lobbyist,litigious,liquidate,linoleum,lingk,lincoln's,limitless,limitation,limber,lilacs,ligature,liftoff,lifeboats,lemmiwinks,leggo,learnin,lazarre,lawyered,landmarks,lament,lambchop,lactose,kringle,knocker,knelt,kirk's,kins,kiev,keynote,kenyon's,kenosha,kemosabe,kazi,kayak,kaon,kama,jussy,junky,joyce's,journey's,jordy,jo's,jimmies,jetson,jeriko,jean's,janet's,jakovasaur,jailed,jace,issacs,isotopes,isabela,irresponsibility,ironed,intravenous,intoxication,intermittent,insufficient,insinuated,inhibitors,inherits,inherently,ingest,ingenue,informs,influenza,inflexible,inflame,inevitability,inefficient,inedible,inducement,indignant,indictments,indentured,indefensible,inconsistencies,incomparable,incommunicado,in's,improvising,impounded,illogical,ignoramus,igneous,idlewild,hydrochloric,hydrate,hungover,humorless,humiliations,humanoid,huhh,hugest,hudson's,hoverdrone,hovel,honor's,hoagie,hmmph,hitters,hitchhike,hit's,hindenburg,hibernating,hermione,herds,henchman,helloooo,heirlooms,heaviest,heartsick,headshot,headdress,hatches,hastily,hartsfield's,harrison's,harrisburg,harebrained,hardships,hapless,hanen,handsomer,hallows,habitual,habeas,guten,gus's,gummy,guiltier,guidebook,gstaad,grunts,gruff,griss,grieved,grids,grey's,greenville,grata,granny's,gorignak,goosed,goofed,goat's,gnarly,glowed,glitz,glimpses,glancing,gilmores,gilligan's,gianelli,geraniums,georgie's,genitalia,gaydar,gart,garroway,gardenia,gangbusters,gamblers,gamble's,galls,fuddy,frumpy,frowning,frothy,fro'tak,friars,frere,freddy's,fragrances,founders,forgettin,footsie,follicles,foes,flowery,flophouse,floor's,floatin,flirts,flings,flatfoot,firefighter,fingerprinting,fingerprinted,fingering,finald,film's,fillet,file's,fianc,femoral,fellini,federated,federales,faze,fawkes,fatally,fascists,fascinates,farfel,familiarity,fambly,falsified,fait,fabricating,fables,extremist,exterminators,extensively,expectant,excusez,excrement,excercises,excavation,examinations,evian,evah,etins,esther's,esque,esophageal,equivalency,equate,equalizer,environmentally,entrees,enquire,enough's,engine's,endorsed,endearment,emulate,empathetic,embodies,emailed,eggroll,edna's,economist,ecology,eased,earmuffs,eared,dyslexic,duper,dupe,dungeons,duncan's,duesouth,drunker,drummers,druggie,dreadfully,dramatics,dragnet,dragline,dowry,downplay,downers,doritos,dominatrix,doers,docket,docile,diversify,distracts,disruption,disloyalty,disinterested,disciple,discharging,disagreeable,dirtier,diplomats,dinghy,diner's,dimwitted,dimoxinil,dimmy,dietary,didi,diatribe,dialects,diagrams,diagnostics,devonshire,devising,deviate,detriment,desertion,derp,derm,dept,depressants,depravity,dependence,denounced,deniability,demolished,delinquents,defiled,defends,defamation,deepcore,deductive,decrease,declares,declarations,decimated,decimate,deb's,deadbolt,dauthuille,dastardly,darla's,dans,daiquiris,daggers,dachau,d'ah,cymbals,customized,curved,curiouser,curdled,cupid's,cults,cucamonga,cruller,cruces,crow's,crosswalk,crossover,crinkle,crescendo,cremate,creeper,craftsman,cox's,counteract,counseled,couches,coronet,cornea,cornbread,corday,copernicus,conveyed,contrition,contracting,contested,contemptible,consultants,constructing,constipated,conqueror,connor's,conjoined,congenital,confounded,condescend,concubine,concoct,conch,concerto,conceded,compounded,compensating,comparisons,commoners,committment,commencement,commandeered,comely,coined,cognitive,codex,coddled,cockfight,cluttered,clunky,clownfish,cloaked,cliches,clenched,cleft,cleanin,cleaner's,civilised,circumcised,cimmeria,cilantro,chutzpah,chutney,chucking,chucker,chronicles,chiseled,chicka,chicago's,chattering,charting,characteristic,chaise,chair's,cervix,cereals,cayenne,carrey,carpal,carnations,caricature,cappuccinos,candy's,candied,cancer's,cameo,calluses,calisthenics,cadre,buzzsaw,bushy,burners,bundled,bum's,budington,buchanans,brock's,britons,brimming,breeders,breakaway,braids,bradley's,boycotting,bouncers,botticelli,botherin,boosting,bookkeeping,booga,bogyman,bogged,bluepoint's,bloodthirsty,blintzes,blanky,blak,biosphere,binturong,billable,bigboote,bewildered,betas,bernard's,bequeath,beirut,behoove,beheaded,beginners,beginner,befriend,beet,bedpost,bedded,bay's,baudelaires,barty,barreled,barboni,barbeque,bangin,baltus,bailout,bag's,backstabber,baccarat,awning,awaited,avenues,austen,augie,auditioned,auctions,astrology,assistant's,assassinations,aspiration,armenians,aristocrat,arguillo,archway,archaeologist,arcane,arabic,apricots,applicant,apologising,antennas,annyong,angered,andretti,anchorman,anchored,amritsar,amour,amidst,amid,americana,amenable,ambassadors,ambassador's,amazement,allspice,alannis,airliner,airfare,airbags,ahhhhhhhhh,ahhhhhhhh,ahhhhhhh,agitator,afternoon's,afghan,affirmation,affiliate,aegean,adrenal,actor's,acidosis,achy,achoo,accessorizing,accentuate,academically,abuses,abrasions,abilene,abductor,aaaahhh,zuzu,zoot,zeroing,zelner,zeldy,yo's,yevgeny,yeup,yeska,yellows,yeesh,yeahh,yamuri,yaks,wyatt's,wspr,writing's,wrestlers,wouldn't've,workmanship,woodsman,winnin,winked,wildness,widespread,whoring,whitewash,whiney,when're,wheezer,wheelman,wheelbarrow,whaling,westerburg,wegener's,weekdays,weeding,weaving,watermelons,watcher's,washboard,warmly,wards,waltzes,walt's,walkway,waged,wafting,voulez,voluptuous,vitone,vision's,villa's,vigilantes,videotaping,viciously,vices,veruca,vermeer,verifying,ventured,vaya,vaults,vases,vasculitis,varieties,vapor,valets,upriver,upholstered,upholding,unwavering,unused,untold,unsympathetic,unromantic,unrecognizable,unpredictability,unmask,unleashing,unintentional,unilaterally,unglued,unequivocal,underside,underrated,underfoot,unchecked,unbutton,unbind,unbiased,unagi,uhhhhh,turnovers,tugging,trouble's,triads,trespasses,treehorn,traviata,trappers,transplants,transforming,trannie,tramping,trainers,traders,tracheotomy,tourniquet,tooty,toothless,tomarrow,toasters,tine,tilting,thruster,thoughtfulness,thornwood,therapies,thanksgiving's,tha's,terri's,tengo,tenfold,telltale,telephoto,telephoned,telemarketer,teddy's,tearin,tastic,tastefully,tasking,taser,tamed,tallow,taketh,taillight,tadpoles,tachibana,syringes,sweated,swarthy,swagger,surrey,surges,surf's,supermodels,superhighway,sunup,sun'll,summaries,sumerian,sulu,sulphur,sullivan's,sulfa,suis,sugarless,sufficed,substituted,subside,submerged,subdue,styling,strolled,stringy,strengthens,street's,straightest,straightens,storyteller,storefront,stopper,stockpiling,stimulant,stiffed,steyne,sternum,stereotypical,stepladder,stepbrother,steers,steeple,steelheads,steakhouse,statue's,stathis,stankylecartmankennymr,standoffish,stalwart,stallions,stacy's,squirted,squeaker,squad's,spuds,spritz,sprig,sprawl,spousal,sportsman,sphincter,spenders,spearmint,spatter,sparrows,spangled,southey,soured,sonuvabitch,somethng,societies,snuffed,snowfall,snowboarding,sniffs,snafu,smokescreen,smilin,slurred,slurpee,slums,slobs,sleepwalker,sleds,slays,slayage,skydiving,sketched,skateboarding,skanks,sixed,siri,sired,siphoned,siphon,singer's,simpering,silencer,sigfried,siena,sidearm,siddons,sickie,siberian,shuteye,shuk,shuffleboard,shrubberies,shrouded,showmanship,shower's,shouldn't've,shortwave,shoplift,shooter's,shiatsu,sheriffs,shak,shafts,serendipity,serena's,sentries,sentance,sensuality,semesters,seething,sedition,secular,secretions,searing,scuttlebutt,sculpt,scowling,scouring,scorecard,schwarzenegger,schoolers,schmucks,scepters,scaly,scalps,scaling,scaffolding,sauces,sartorius,santen,sampler,salivating,salinger,sainthood,said's,saget,saddens,rygalski,rusting,rumson's,ruination,rueland,rudabaga,rubles,rowr,rottweiler,rotations,roofies,romantics,rollerblading,roldy,rob's,roadshow,rike,rickets,rible,rheza,revisiting,revisited,reverted,retrospective,retentive,resurface,restores,respite,resounding,resorting,resolutions,resists,repulse,repressing,repaying,reneged,relays,relayed,reinforce,regulator,registers,refunds,reflections,rediscover,redecorated,recruitment,reconstructive,reconstructed,recommitted,recollect,recoil,recited,receptor,receptacle,receivers,reassess,reanimation,realtors,razinin,ravaged,ratios,rationalization,ratified,ratatouille,rashum,rasczak,rarer,rapping,rancheros,rampler,rain's,railway,racehorse,quotient,quizzing,quips,question's,quartered,qualification,purring,pummeling,puede,publicized,psychedelic,proximo,proteins,protege,prospectus,pronouncing,pronoun,prolonging,program's,proficient,procreation,proclamations,prio,principled,prides,pricing,presbyterian,preoccupation,prego,preferential,predicts,precog,prattle,pounced,potshots,potpourri,portsmouth,porque,poppie's,poms,pomeranian,pomegranates,polynesian,polymer,polenta,plying,plume,plumber's,pluie,plough,plesac,playoff,playmates,planter,plantains,plaintiff's,pituitary,pisano's,pillowcase,piddle,pickers,phys,photocopied,philistine,pfeiffer's,peyton's,petitioned,persuading,perpetuate,perpetually,periodically,perilous,pensacola,pawned,pausing,pauper,patterned,pats,patronage,passover,partition,parter,parlez,parlay,parkinson's,parades,paperwork's,pally,pairing,ovulation,overtake,overstate,overpowering,overpowered,overconfident,overbooked,ovaltine,ouzo,outweighs,outings,outfit's,out's,ottos,orrin,originate,orifice,orangutan,optimal,optics,opportunistic,ooww,oopsy,ooooooooh,ooohhhh,onyx,onslaught,oldsmobile,ocular,ocean's,obstruct,obscenely,o'dwyer,o'brien's,nutjob,nunur,notifying,nostrand,nonny,nonfat,noblest,nimble,nikes,nicht,newsworthy,network's,nestled,nessie,necessities,nearsighted,ne'er,nazareth,navidad,nastier,nasa's,narco,nakedness,muted,mummified,multiplying,mudda,mtv's,mozzarella,moxica,motorists,motivator,motility,mothafucka,mortmain,mortgaged,mortally,moroccan,mores,moonshine,mongers,moe's,modify,mobster's,mobilization,mobbed,mitigating,mistah,misrepresented,mishke,misfortunes,misdirection,mischievous,mirrored,mineshaft,mimosa,millers,millaney,miho,midday,microwaves,mick's,metzenbaum,metres,merc,mentoring,medicine's,mccovey,maya's,mau's,masterful,masochistic,martie,marliston,market's,marijawana,marie's,marian's,manya,manuals,mantumbi,mannheim,mania,mane,mami's,malarkey,magnifique,magics,magician's,madrona,madox,madison's,machida,m'mm,m'hm,m'hidi,lyric,luxe,luther's,lusty,lullabies,loveliness,lotions,looka,lompoc,loader,litterbug,litigator,lithe,liquorice,lins,linguistics,linds,limericks,lightbulb,lewises,letch,lemec,lecter's,leavenworth,leasing,leases,layover,layered,lavatory,laurels,launchers,laude,latvian,lateness,lasky's,laparotomy,landlord's,laboring,la's,kumquat,kuato,kroff,krispy,kree,krauts,kona,knuckleheads,knighthood,kiva,kitschy,kippers,kip's,kimbrow,kike,keypad,keepsake,kebab,keane's,kazakhstan,karloff,justices,junket,juicer,judy's,judgemental,jsut,jointed,jogs,jezzie,jetting,jekyll,jehovah's,jeff's,jeeze,jeeter,jeesus,jeebs,janeane,jalapeno,jails,jailbait,jagged,jackin,jackhammer,jacket's,ixnay,ivanovich,issue's,isotope,island's,irritates,irritability,irrevocable,irrefutable,irma's,irked,invoking,intricacies,interferon,intents,inte,insubordinate,instructive,instinctive,inspector's,inserting,inscribed,inquisitive,inlay,injuns,inhibited,infringement,information's,infer,inebriated,indignity,indecisive,incisors,incacha,inauguration,inalienable,impresses,impregnate,impregnable,implosion,immersed,ikea,idolizes,ideological,idealism,icepick,hypothyroidism,hypoglycemic,hyde's,hutz,huseni,humvee,hummingbird,hugely,huddling,housekeeper's,honing,hobnobbing,hobnob,histrionics,histamine,hirohito,hippocratic,hindquarters,hinder,himalayan,hikita,hikes,hightailed,hieroglyphics,heyy,heuh,heretofore,herbalist,her's,henryk,henceforth,hehey,hedriks,heartstrings,headmistress,headlight,harvested,hardheaded,happend,handlers,handlebars,hagitha,habla,gyroscope,guys'd,guy'd,guttersnipe,grump,growed,grovelling,grooves,groan,greenbacks,greats,gravedigger,grating,grasshoppers,grappling,graph,granger's,grandiose,grandest,gram's,grains,grafted,gradual,grabthar's,goop,gooood,goood,gooks,godsakes,goaded,gloria's,glamorama,giveth,gingham,ghostbusters,germane,georgy,geisha,gazzo,gazelles,gargle,garbled,galgenstein,galapagos,gaffe,g'day,fyarl,furnish,furies,fulfills,frowns,frowned,frommer's,frighteningly,fresco,freebies,freakshow,freakishly,fraudulent,fragrant,forewarned,foreclose,forearms,fordson,ford's,fonics,follies,foghorn,fly's,flushes,fluffy's,flitting,flintstone,flemmer,flatline,flamboyant,flabby,fishbowl,firsts,finger's,financier,figs,fidgeting,fictitious,fevers,feur,ferns,feminism,fema,feigning,faxing,fatigued,fathoms,fatherless,fares,fancier,fanatical,fairs,factored,eyelid,eyeglasses,eye's,expresso,exponentially,expletive,expectin,excruciatingly,evidentiary,ever'thing,evelyn's,eurotrash,euphoria,eugene's,eubie,ethiopian,ethiopia,estrangement,espanol,erupted,ernie's,erlich,eres,epitome,epitaph,environments,environmentalists,entrap,enthusiastically,entertainers,entangled,enclose,encased,empowering,empires,emphysema,embers,embargo,emasculating,elizabethan,elephant's,eighths,egyptians,effigy,editions,echoing,eardrum,dyslexia,duplicitous,duplicated,dumpty,dumbledore,dufus,dudley's,duddy,duck's,duchamp,drunkenness,drumlin,drowns,droid,drinky,drifts,drawbridge,dramamine,downey's,douggie,douchebag,dostoyevsky,dorian's,doodling,don'tcha,domo,domineering,doings,dogcatcher,documenting,doctoring,doctoral,dockers,divides,ditzy,dissimilar,dissecting,disparage,disliking,disintegrating,dishwalla,dishonored,dishing,disengaged,discretionary,discard,disavowed,directives,dippy,diorama,dimmed,diminishing,dilate,dijon,digitalis,diggory,dicing,diagnosing,devout,devola,developmental,deter,destiny's,desolation,descendant,derived,derevko's,deployment,dennings,denials,deliverance,deliciously,delicacies,degenerates,degas,deflector,defile,deference,defenders,deduced,decrepit,decreed,decoding,deciphered,dazed,dawdle,dauphine,daresay,dangles,dampen,damndest,customer's,curricular,cucumbers,cucaracha,cryogenically,cruella,crowd's,croaks,croaked,criticise,crit,crisper,creepiest,creep's,credit's,creams,crawford's,crackle,crackin,covertly,cover's,county's,counterintelligence,corrosive,corpsman,cordially,cops'll,convulsions,convoluted,convincingly,conversing,contradictions,conga,confucius,confrontational,confab,condolence,conditional,condition's,condiments,composing,complicit,compiled,compile,compiegne,commuter,commodus,commissions,comings,cometh,combining,colossus,collusion,collared,cockeyed,coastline,clobber,clemonds,clashes,clarithromycin,clarified,cinq,cienega,chronological,christmasy,christmassy,chloroform,chippie,childless,chested,chemistry's,cheerios,cheeco,checklist,chaz,chauvinist,char,chang's,chandlers,chamois,chambermaid,chakras,chak,censored,cemented,cellophane,celestial,celebrations,caveat,catholicism,cataloguing,cartmanland,carples,carny,carded,caramels,captors,caption,cappy,caped,canvassing,cannibalism,canada's,camille's,callback,calibrated,calamine,cal's,cabo,bypassed,buzzy,buttermilk,butterfingers,bushed,burlesque,bunsen,bung,bulimia,bukatari,buildin,budged,bronck's,brom,brobich,bringer,brine,brendell,brawling,bratty,brasi,braking,braised,brackett's,braced,boyish,boundless,botch,borough,boosh,bookies,bonbons,bois,bodes,bobunk,bluntly,blossoming,bloopers,bloomers,bloodstains,bloodhounds,blitzen,blinker,blech,blasts,blanca's,bitterly,biter,biometric,bioethics,bilk,bijan,bigoted,bicep,betrothed,bergdorf's,bereaved,bequeathed,belo,bellowing,belching,beholden,befriended,beached,bawk,battled,batmobile,batman's,baseline,baseball's,barcodes,barch,barbie's,barbecuing,bandanna,baldy,bailey's,baghdad,backwater,backtrack,backdraft,ayuh,awgh,augustino,auctioned,attaching,attaches,atrophy,atrocity,atley,athletics,atchoo,asymmetrical,asthmatic,assoc,assists,ascending,ascend,articulated,arrr,armstrong's,armchair,arisen,archeology,archeological,arachnids,aptly,applesauce,appetizing,antisocial,antagonizing,anorexia,anini,angie's,andersons,anarchist,anagram,amputation,amherst,alleluia,algorithms,albemarle,ajar,airlock,airbag,aims,aimless,ailments,agua,agonized,agitate,aggravating,affirming,aerosol,aerosmith,aeroplane,acing,accumulated,accomplishing,accolades,accidently,academia,abuser,abstain,abso,abnormally,aberration,abandons,aaww,aaaaahh,zlotys,zesty,zerzura,zapruder,zany,zantopia,yugoslavia,youo,yoru,yipe,yeow,yello,yelburton,yeess,yaah,y'knowwhati'msayin,wwhat,wussies,wrenched,would'a,worryin,wormser,wooooo,wookiee,wolfe's,wolchek,woes,wishin,wiseguys,winston's,winky,wine's,windbreaker,wiggy,wieners,wiedersehen,whoopin,whittled,whey,whet,wherefore,wharvey,welts,welt,wellstone,weee,wednesday's,wedges,wavered,watchit,wastebasket,ward's,wank,wango,wallet's,wall's,waken,waiver,waitressed,wacquiem,wabbit,vrykolaka,voula,vote's,volt,volga,volcanoes,vocals,vitally,visualizing,viscous,virgo,virg,violet's,viciousness,vewy,vespers,vertes,verily,vegetarians,vater,vaseline,varied,vaporize,vannacutt,vallens,valenti's,vacated,uterine,usta,ussher,urns,urinating,urchin,upping,upheld,unwitting,untreated,untangle,untamed,unsanitary,unraveled,unopened,unisex,uninvolved,uninteresting,unintelligible,unimaginative,undisclosed,undeserving,undermines,undergarments,unconcerned,unbroken,ukrainian,tyrants,typist,tykes,tybalt,twosome,twits,tutti,turndown,tularemia,tuberculoma,tsimshian,truffaut,truer,truant,trove,triumphed,tripe,trigonometry,trifled,trifecta,tricycle,trickle,tribulations,trevor's,tremont,tremoille,treaties,trawler,translators,transcends,trafficker,touchin,tonnage,tomfoolery,tolls,tokens,tinkered,tinfoil,tightrope,ticket's,thth,thousan,thoracotomy,theses,thesaurus,theologian,themed,thawing,thatta,thar,textiles,testimonies,tessio,terminating,temps,taxidermist,tator,tarkin,tangent,tactile,tachycardia,t'akaya,synthesize,symbolically,swelco,sweetbreads,swedes,swatting,swastika,swamps,suze,supernova,supercollider,sunbathing,summarily,suffocation,sueleen,succinct,subtitle,subsided,submissive,subjecting,subbing,subatomic,stupendous,stunted,stubble,stubbed,striving,streetwalker,strategizing,straining,straightaway,storyline,stoli,stock's,stipulated,stimulus,stiffer,stickup,stens,steamroller,steadwell,steadfast,stave,statutes,stateroom,stans,stacey's,sshhhh,squishing,squinting,squealed,sprouting,sprimp,spreadsheets,sprawled,spotlights,spooning,spoiler,spirals,spinner's,speedboat,spectacles,speakerphone,spar,spaniards,spacing,sovereignty,southglen,souse,soundproof,soothsayer,soon's,sommes,somethings,solidify,soars,snorted,snorkeling,snitches,sniping,sniper's,snifter,sniffin,snickering,sneer,snarl,smila,slinking,sleuth,slater's,slated,slanted,slanderous,slammin,skyscraper,skimp,skilosh,skeletal,skag,siteid,sirloin,singe,simulate,signaled,sighing,sidekicks,sicken,shrubs,shrub,showstopper,shot's,shostakovich,shoreline,shoppin,shoplifter,shop's,shoe's,shoal,shitter,shirt's,shimokawa,sherborne,sheds,shawna's,shavadai,sharpshooters,sharking,shane's,shakespearean,shagged,shaddup,sexism,sexes,sesterces,serotonin,sequences,sentient,sensuous,seminal,selections,seismic,seashell,seaplane,sealing,seahaven,seagrave,scuttled,scullery,scow,scots,scorcher,scorch,schotzie,schnoz,schmooze,schlep,schizo,schindler's,scents,scalping,scalped,scallop,scalding,sayeth,saybrooke,sawed,savoring,sardine,sandy's,sandstorm,sandalwood,samoa,samo,salutations,salad's,saki,sailor's,sagman,s'okay,rudy's,rsvp'd,royale,rousted,rootin,roofs,romper,romanovs,rollercoaster,rolfie,rockers,rock's,robinsons,ritzy,ritualistic,ringwald,rhymed,rheingold,rewrites,revolved,revolutionaries,revoking,reviewer,reverts,retrofit,retort,retinas,resurfaced,respirations,respectively,resolute,resin,reprobate,replaying,repayment,repaint,renquist,renege,renders,rename,remarked,relapsing,rekindled,rejuvenating,rejuvenated,reinstating,reinstatement,reigns,referendums,recriminations,recitals,rechecked,reception's,recaptured,rebounds,reassemble,rears,reamed,realty,reader's,reacquaint,rayanne,ravish,rava,rathole,raspail,rarest,rapists,rants,ramone,ragnar,radiating,radial,racketeer,quotation,quittin,quitters,quintessential,quincy's,queremos,quellek,quelle,quasimodo,quarterbacks,quarter's,pyromaniac,puttanesca,puritanical,purged,purer,puree,punishments,pungent,pummel,puedo,pudge,puce,psychotherapist,psycho's,prosecutorial,prosciutto,propositioning,propellers,pronouns,progresses,procured,procrastination,processes,probationary,primping,primates,priest's,preventative,prevails,presided,preserves,preservatives,prefix,predecessors,preachy,prancer,praetorians,practicality,powders,potus,pot's,postop,positives,poser,portolano,portokalos,poolside,poltergeists,pocketed,poach,plunder,plummeted,plucking,plop,plimpton,plethora,playthings,player's,playboys,plastique,plainclothes,pious,pinpointed,pinkus,pinks,pilgrimage,pigskin,piffle,pictionary,piccata,photocopy,phobias,persia,permissible,perils,perignon,perfumes,peon,penned,penalized,peg's,pecks,pecked,paving,patriarch,patents,patently,passable,participants,parasitic,parasailing,paramus,paramilitary,parabolic,parable,papier,paperback,paintbrush,pacer,paaiint,oxen,owen's,overtures,overthink,overstayed,overrule,overlapping,overestimate,overcooked,outlandish,outgrew,outdoorsy,outdo,outbound,ostensibly,originating,orchestrate,orally,oppress,opposable,opponent's,operation's,oooohh,oomupwah,omitted,okeydokey,okaaay,ohashi,offerings,of'em,od'd,occurrences,occupant,observable,obscenities,obligatory,oakie,o'malley's,o'gar,nyah's,nurection,nun's,nougat,nostradamus,norther,norcom,nooch,nonviolent,nonsensical,nominating,nomadic,noel's,nkay,nipped,nimbala,nigeria,nigel's,nicklaus,newscast,nervously,nell's,nehru,neckline,nebbleman,navigator,nasdaq,narwhal,nametag,n'n't,mycenae,myanmar,muzak,muumuu,murderer's,mumbled,mulvehill,multiplication,multiples,muggings,muffet,mozart's,mouthy,motorbike,motivations,motivates,motaba,mortars,mordred,mops,moocher,moniker,mongi,mondo,monday's,moley,molds,moisturize,mohair,mocky,mmkay,mistuh,missis,mission's,misdeeds,minuscule,minty,mined,mincemeat,milton's,milt,millennia,mikes,miggs,miffed,mieke's,midwestern,methadone,metaphysics,messieur,merging,mergers,menopausal,menagerie,meee,mckenna's,mcgillicuddy,mayflowers,maxim's,matrimonial,matisse,matick,masculinity,mascots,masai,marzipan,marika,maplewood,manzelle,manufactures,manticore's,mannequins,manhole,manhandle,manatee,mallory's,malfunctions,mainline,magua's,madwoman,madeline's,machiavelli,lynley,lynching,lynched,lurconis,lujack,lubricant,looove,loons,loom,loofah,longevity,lonelyhearts,lollipops,loca,llama,liquidation,lineswoman,lindsey's,lindbergh,lilith's,lila's,lifers,lichen,liberty's,lias,lexter,levee,letter's,lessen,lepner,leonard's,lemony,leggy,leafy,leaflets,leadeth,lazerus,lazare,lawford,languishing,langford's,landslide,landlords,lagoda,ladman,lad's,kuwait,kundera,krist's,krinkle,krendler,kreigel,kowolski,kosovo,knockdown,knifed,kneed,kneecap,kids'll,kevlar,kennie,keeled,kazootie,kaufman's,katzenmoyer,kasdan,karl's,karak,kapowski,kakistos,jumpers,julyan,juanito,jockstrap,jobless,jiggly,jesuit,jaunt,jarring,jabbering,israelites,irrigate,irrevocably,irrationally,ironies,ions,invitro,inventions,intrigues,intimated,interview's,intervening,interchangeable,intently,intentioned,intelligently,insulated,institutional,instill,instigator,instigated,instep,inopportune,innuendoes,inheriting,inflate,infiltration,infects,infamy,inducing,indiscretions,indiscreet,indio,indignities,indict,indecision,incurred,incubation,inconspicuous,inappropriately,impunity,impudent,improves,impotence,implicates,implausible,imperfection,impatience,immutable,immobilize,illustration,illumination,idiot's,idealized,idealist,icelandic,iambic,hysterically,hyperspace,hygienist,hydraulics,hydrated,huzzah,husks,hurricane's,hunt's,hunched,huffed,hubris,hubbub,hovercraft,houngan,hotel's,hosed,horoscopes,hoppy,hopelessness,hoodwinked,honourable,honorably,honeysuckle,homeowners,homegirl,holiest,hoisted,hoho,ho's,hippity,hildie,hikers,hieroglyphs,hexton,herein,helicopter's,heckle,heats,heartbeat's,heaping,healthilizer,headmaster's,headfirst,hawk's,haviland's,hatsue,harlot,hardwired,hanno's,hams,hamilton's,halothane,hairstyles,hails,hailed,haagen,haaaaa,gyno,gutting,gurl,gumshoe,gummi,gull,guerilla,gttk,grover's,grouping,groundless,groaning,gristle,grills,graynamore,grassy,graham's,grabbin,governmental,goodes,goggle,godlike,glittering,glint,gliding,gleaming,glassy,girth,gimbal,gilmore's,gibson's,giblets,gert,geometric,geographical,genealogy,gellers,geller's,geezers,geeze,garshaw,gargantuan,garfunkel,gardner's,garcia's,garb,gangway,gandarium,gamut,galoshes,gallivanting,galleries,gainfully,gack,gachnar,fusionlips,fusilli,furiously,fulfil,fugu,frugal,fron,friendship's,fricking,frederika,freckling,frauds,fraternal,fountainhead,forthwith,forgo,forgettable,foresight,foresaw,footnotes,fondling,fondled,fondle,folksy,fluttering,flutie,fluffing,floundering,florin,florentine,flirtatious,flexing,flatterer,flaring,fizz,fixating,five's,fishnet,firs,firestorm,finchy,figurehead,fifths,fiendish,fertilize,ferment,fending,fellahs,feeny's,feelers,feeders,fatality,fascinate,fantabulous,falsify,fallopian,faithless,fairy's,fairer,fair's,fainter,failings,facto,facets,facetious,eyepatch,exxon,extraterrestrials,extradite,extracurriculars,extinguish,expunged,exports,expenditure,expelling,exorbitant,exigent,exhilarated,exertion,exerting,exemption,excursions,excludes,excessively,excercise,exceeds,exceeding,everbody,evaporated,euthanasia,euros,europeans,escargot,escapee,erases,epizootics,epithelials,ephrum,enthusiast,entanglements,enslaved,enslave,engrossed,endeavour,enables,enabled,empowerment,employer's,emphatic,emeralds,embroiled,embraces,ember,embellished,emancipated,ello,elisa's,elevates,ejaculate,ego's,effeminate,economically,eccentricities,easygoing,earshot,durp,dunks,dunes,dullness,dulli,dulled,drumstick,dropper,driftwood,dregs,dreck,dreamboat,draggin,downsizing,dost,doofer,donowitz,dominoes,dominance,doe's,diversions,distinctions,distillery,distended,dissolving,dissipate,disraeli,disqualify,disowned,dishwashing,discusses,discontent,disclosed,disciplining,discerning,disappoints,dinged,diluted,digested,dicking,diablos,deux,detonating,destinations,despising,designer's,deserts,derelict,depressor,depose,deport,dents,demonstrations,deliberations,defused,deflection,deflecting,decryption,decoys,decoupage,decompress,decibel,decadence,dealer's,deafening,deadlock,dawning,dater,darkened,darcy's,dappy,dancing's,damon's,dallying,dagon,d'etat,czechoslovakians,cuticles,cuteness,curacao,cupboards,cumulative,culottes,culmination,culminating,csi's,cruisin,crosshairs,cronyn,croc,criminalistics,crimean,creatively,creaming,crapping,cranny,cowed,countermeasures,corsica,corinne's,corey's,cooker,convened,contradicting,continuity,constitutionally,constipation,consort,consolidate,consisted,connection's,confining,confidences,confessor,confederates,condensation,concluding,conceiving,conceivably,concealment,compulsively,complainin,complacent,compiling,compels,communing,commonplace,commode,commission's,commissary,comming,commensurate,columnists,colonoscopy,colonists,collagen,collaborate,colchicine,coddling,clump,clubbed,clowning,closet's,clones,clinton's,clinic's,cliffhanger,classification,clang,citrus,cissy,circuitry,chronology,christophe,choosers,choker,chloride,chippewa,chip's,chiffon,chesty,chesapeake,chernobyl,chants,channeled,champagne's,chalet,chaka,cervical,cellphone,cellmates,caverns,catwalk,cathartic,catcher's,cassandra's,caseload,carpenter's,carolyn's,carnivorous,carjack,carbohydrates,capt,capitalists,canvass,cantonese,canisters,candlestick,candlelit,canaries,camry,camel's,calzones,calitri,caldy,cabin's,byline,butterball,bustier,burmese,burlap,burgeoning,bureaucrat,buffoons,buenas,bryan's,brookline,bronzed,broiled,broda,briss,brioche,briar,breathable,brea,brays,brassieres,braille,brahms,braddock's,boysenberry,bowman's,bowline,boutiques,botticelli's,boooo,boonies,booklets,bookish,boogeyman,boogey,bomb's,boldly,bogs,bogas,boardinghouse,bluuch,blundering,bluffs,bluer,blowed,blotto,blotchy,blossomed,blooms,bloodwork,bloodied,blithering,blinks,blathering,blasphemous,blacking,bison,birdson,bings,bilateral,bfmid,bfast,berserker,berkshires,bequest,benjamins,benevolence,benched,benatar,belthazor's,bellybutton,belabor,bela's,behooves,beddy,beaujolais,beattle,baxworth,batted,baseless,baring,barfing,barbi,bannish,bankrolled,banek,ballsy,ballpoint,balkans,balconies,bakers,bahama,baffling,badder,badda,bada,bactine,backgammon,baako,aztreonam,aztecs,awed,avon,autobiographical,autistic,authoritah,auspicious,august's,auditing,audible,auctioning,attitude's,atrocities,athlete's,astronomer,assessed,ascot,aristocratic,arid,argues,arachtoids,arachnid,aquaman,apropos,aprons,apprised,apprehensive,apex,anythng,antivenin,antichrist,antennae,anorexic,anoint,annum,annihilated,animal's,anguished,angioplasty,angio,amply,ampicillin,amphetamines,amino,american's,ambiguity,ambient,amarillo,alyssa's,alternator,alcove,albacore,alarm's,alabaster,airlifted,ahta,agrabah,affidavits,advocacy,advises,adversely,admonished,admonish,adler's,addled,addendum,acknowledgement,accuser,accompli,acclaim,acceleration,abut,abundant,absurdity,absolved,abrusso,abreast,abrasive,aboot,abductions,abducting,abbots,aback,ababwa,aand,aaahhhh,zorin,zinthar,zinfandel,zimbabwe,zillions,zephyrs,zatarcs,zacks,youuu,youths,yokels,yech,yardstick,yammer,y'understand,wynette,wrung,wrought,wreaths,wowed,wouldn'ta,worshiped,worming,wormed,workday,wops,woolly,wooh,woodsy,woodshed,woodchuck,wojadubakowski,withering,witching,wiseass,wiretaps,winner's,wining,willoby,wiccaning,whupped,whoopi,whoomp,wholesaler,whiteness,whiner,whatchya,wharves,whah,wetlands,westward,wenus,weirdoes,weds,webs,weaver's,wearer,weaning,watusi,wastes,warlock's,warfield's,waponi,waiting's,waistband,waht,wackos,vouching,votre,voight's,voiced,vivica,viveca,vivant,vivacious,visor,visitin,visage,virgil's,violins,vinny,vinci's,villas,vigor,video's,vicrum,vibrator,vetted,versailles,vernon's,venues,ventriloquism,venison,venerable,varnsen,variant,variance,vaporized,vapid,vanstock,vandals,vader's,vaccination,uuuuh,utilize,ushering,usda,usable,urur,urologist,urination,urinary,upstart,uprooted,unsubtitled,unspoiled,unseat,unseasonably,unseal,unsatisfying,unnerve,unlikable,unleaded,university's,universe's,uninsured,uninspired,uniformity,unicycle,unhooked,ungh,unfunny,unfreezing,unflattering,unfairness,unexpressed,unending,unencumbered,unearth,undiscovered,undisciplined,undertaken,understan,undershirt,underlings,underline,undercurrent,uncontrolled,uncivilized,uncharacteristic,umpteenth,uglies,u're,tut's,turner's,turbine,tunnel's,tuney,trustee,trumps,truckasaurus,trubshaw,trouser,trippy,tringle,trifling,trickster,triangular,trespassers,trespasser,traverse,traumas,trattoria,trashes,transgressions,tranquil,trampling,trainees,tracy's,tp'ed,toxoplasmosis,tounge,tortillas,torrent,torpedoed,topsy,topple,topnotch,top's,tonsil,tippin's,tions,timmuh,timithious,tilney,tighty,tightness,tightens,tidbits,ticketed,thyme,thrones,threepio,thoughtfully,thornhart's,thorkel,thommo,thing'll,theological,thel,theh,thefts,that've,thanksgivings,tetherball,testikov,terraforming,terminus,tepid,tendonitis,tenboom,telex,teleport,telepathic,teenybopper,taxicab,taxed,taut,tattered,tattaglias,tapered,tantric,tanneke,takedown,tailspin,tacs,tacit,tablet,tablecloth,systemic,syria,syphon,synthesis,symbiotic,swooping,swizzle,swiping,swindled,swilling,swerving,sweatshops,swayzak's,swaddling,swackhammer,svetkoff,suzie's,surpass,supossed,superdad,super's,sumptuous,sula,suit's,sugary,sugar's,sugai,suey,subvert,suburb,substantiate,subsidy,submersible,sublimating,subjugation,styx,stymied,stuntman,studded,strychnine,strikingly,strenuous,streetlights,strassmans,stranglehold,strangeness,straddling,straddle,stowaways,stotch,stockbrokers,stifling,stepford,stepdad's,steerage,steena,staunch,statuary,starlets,stanza,stanley's,stagnant,staggeringly,ssshhh,squaw,spurt,spungeon,sprightly,sprays,sportswear,spoonful,splittin,splitsville,spirituality,spiny,spider's,speedily,speculative,specialise,spatial,spastic,spas,sparrin,soybean,souvlaki,southie,southampton,sourpuss,soupy,soup's,soundstage,sophie's,soothes,somebody'd,solicited,softest,sociopathic,socialized,socialism,snyders,snowmobiles,snowballed,snatches,smugness,smoothest,smashes,slurp,slur,sloshed,sleight,skyrocket,skied,skewed,sizeable,sixpence,sipowicz,singling,simulations,simulates,similarly,silvery,silverstone,siesta,siempre,sidewinder,shyness,shuvanis,showoff,shortsighted,shopkeeper,shoehorn,shithouse,shirtless,shipshape,shingles,shifu,shes,sherman's,shelve,shelbyville,sheepskin,shat,sharpens,shaquille,shaq,shanshu,shania's,set's,servings,serpico,sequined,sensibilities,seizes,seesaw,seep,seconded,sebastian's,seashells,scrapped,scrambler,scorpions,scopes,schnauzer,schmo,schizoid,scampered,scag,savagely,saudis,satire,santas,sanskrit,sandovals,sanding,sandal,salient,saleswoman,sagging,s'cuse,rutting,ruthlessly,runoff,runneth,rulers,ruffians,rubes,roughriders,rotates,rotated,roswell's,rosalita,rookies,ron's,rollerblades,rohypnol,rogues,robinson's,roasts,roadies,river's,ritten,rippling,ripples,ring's,rigor,rigoletto,richardo,ribbed,revolutions,revlon's,reverend's,retreating,retractable,rethought,retaliated,retailers,reshoot,reserving,reseda,researchers,rescuer,reread,requisitions,repute,reprogram,representations,report's,replenish,repetitive,repetitious,repentance,reorganizing,renton,renee's,remodeled,religiously,relics,reinventing,reinvented,reheat,rehabilitate,registrar,regeneration,refueling,refrigerators,refining,reenter,redress,recruiter,recliner,reciprocal,reappears,razors,rawdy,rashes,rarity,ranging,rajeski,raison,raisers,rainier,ragtime,rages,radar's,quinine,questscape,queller,quartermaine's,pyre,pygmalion,pushers,pusan,purview,purification,pumpin,puller,pubescent,psychiatrist's,prudes,provolone,protestants,prospero,propriety,propped,prom's,procrastinate,processors,processional,princely,preyed,preventive,pretrial,preside,premiums,preface,preachers,pounder,ports,portrays,portrayal,portent,populations,poorest,pooling,poofy,pontoon,pompeii,polymerization,polloi,policia,poacher,pluses,pleasuring,pleads,playgrounds,platitudes,platforms,plateaued,plate's,plantations,plaguing,pittance,pitcher's,pinky's,pinheads,pincushion,pimply,pimped,piggyback,pierce's,piecing,physiological,physician's,phosphate,phillipe,philipse,philby,phased,pharaohs,petyr,petitioner,peshtigo,pesaram,perspectives,persnickety,perpetrate,percolating,pepto,pensions,penne,penell,pemmican,peeks,pedaling,peacemaker,pawnshop,patting,pathologically,patchouli,pasts,pasties,passin,parlors,panda's,panache,paltrow,palamon,padlock,paddy's,paddling,oversleep,overheating,overdosed,overcharge,overcame,overblown,outset,outrageously,outfitted,orsini's,ornery,origami,orgasmic,orga,order's,opportune,ooow,oooooooooh,oohhhh,olympian,olfactory,okum,ohhhhhh,ogres,odysseus,odorless,occupations,occupancy,obscenity,obliterated,nyong,nymphomaniac,nutsack,numa,ntozake,novocain,nough,noth,nosh,norwegians,northstar,nonnie,nonissue,nodules,nightmarish,nightline,nighthawk,niggas,nicu,nicolae,nicknamed,niceties,newsman,neverland,negatively,needra,nedry,necking,navour,nauseam,nauls,narim,nanda,namath,nagged,nads,naboo,n'sync,mythological,mysticism,myslexia,mutator,mustafi,mussels,muskie,musketeer,murtaugh,murderess,murder's,murals,munching,mumsy,muley,mouseville,mosque,mosh,mortifying,morgendorffers,moola,montel,mongoloid,molten,molestered,moldings,mocarbies,mo'ss,mixers,misrell,misnomer,misheard,mishandled,miscreant,misconceptions,miniscule,minimalist,millie's,millgate,migrate,michelangelo's,mettle,metricconverter,methodology,meter's,meteors,mesozoic,menorah,mengele,mendy's,membranes,melding,meanness,mcneil's,mcgruff,mcarnold,matzoh,matted,mathematically,materialized,mated,masterpieces,mastectomy,massager,masons,marveling,marta's,marquee,marooned,marone's,marmaduke,marick,marcie's,manhandled,mangoes,manatees,managerial,man'll,maltin,maliciously,malfeasance,malahide,maketh,makeshift,makeovers,maiming,magazine's,machismo,maarten,lutheran,lumpectomy,lumbering,luigi's,luge,lubrication,lording,lorca,lookouts,loogie,loners,london's,loin,lodgings,locomotive,lobes,loathed,lissen,linus,lighthearted,ligament,lifetime's,lifer,lier,lido,lickin,lewen,levitation,lestercorp,lessee,lentils,lena's,lemur,lein,legislate,legalizing,lederhosen,lawmen,laundry's,lasskopf,lardner,landscapes,landfall,lambeau,lamagra,lagging,ladonn,lactic,lacquer,laborers,labatier,kwan's,krit,krabappel,kpxy,kooks,knobby,knickknacks,klutzy,kleynach,klendathu,kinross,kinko's,kinkaid,kind'a,kimberly's,kilometer,khruschev's,khaki,keyboards,kewl,ketch,kesher,ken's,karikos,karenina,kanamits,junshi,juno's,jumbled,jujitsu,judith's,jt's,joust,journeyed,jotted,jonathan's,jizz,jingling,jigalong,jerseys,jerries,jellybean,jellies,jeeps,jeannie's,javna,jamestown,james's,jamboree,jail's,islanders,irresistable,irene's,ious,investigation's,investigates,invaders,inundated,introductory,interviewer,interrupts,interpreting,interplanetary,internist,intercranial,inspections,inspecting,inseminated,inquisitor,inland,infused,infuriate,influx,inflating,infidelities,inference,inexpensive,industrialist,incessantly,inception,incensed,incase,incapacitate,inca,inasmuch,inaccuracies,imus,improvised,imploding,impeding,impediments,immaturity,ills,illegible,idols,iditarod,identifiable,id'n,icicles,ibuprofen,i'i'm,hymie,hydrolase,hybrids,hunsecker's,hunker,humps,humons,humidor,humdinger,humbling,humankind,huggin,huffing,households,housecleaning,hothouse,hotcakes,hosty,hootenanny,hootchie,hoosegow,honouring,honks,honeymooners,homophobic,homily,homeopathic,hoffman's,hnnn,hitchhikers,hissed,hispanics,hillnigger,hexavalent,hewwo,heston's,hershe,herodotus,hermey,hergott,heresy,henny,hennigans,henhouse,hemolytic,hells,helipad,heifer,hebrews,hebbing,heaved,heartland,heah,headlock,hatchback,harvard's,harrowing,harnessed,harding's,happy's,hannibal's,hangovers,handi,handbasket,handbags,halloween's,hall's,halfrek,halfback,hagrid,hacene,gyges,guys're,gut's,gundersons,gumption,guardia,gruntmaster,grubs,group's,grouch,grossie,grosser,groped,grins,grime,grigio,griff's,greaseball,gravesite,gratuity,graphite,granma,grandfathers,grandbaby,gradski,gracing,got's,gossips,goonie,gooble,goobers,goners,golitsyn,gofer,godsake,goddaughter,gnats,gluing,glub,global's,glares,gizmos,givers,ginza,gimmie,gimmee,georgia's,gennero,gazpacho,gazed,gato,gated,gassy,gargling,gandhiji,galvanized,gallery's,gallbladder,gabriel's,gaaah,furtive,furthering,fungal,fumigation,fudd,fucka,fronkonsteen,fromby's,frills,fresher,freezin,freewald,freeloader,franklin's,framework,frailty,fortified,forger,forestry,foreclosure,forbade,foray,football's,foolhardy,fondest,fomin,followin,follower,follicle,flue,flowering,flotation,flopping,floodgates,flogged,flog,flicked,flenders,fleabag,flanks,fixings,fixable,fistful,firewater,firestarter,firelight,fingerbang,finalizing,fillin,filipov,fido,fiderer,feminists,felling,feldberg,feign,favorably,fave,faunia,faun,fatale,fasting,farkus,fared,fallible,faithfulness,factoring,facilitated,fable,eyeful,extramarital,extracts,extinguished,exterminated,exposes,exporter,exponential,exhumed,exhume,exasperated,eviscerate,evidenced,evanston,estoy,estimating,esmerelda,esme,escapades,erosion,erie,equitable,epsom,epoxy,enticed,enthused,entendre,ensued,enhances,engulfed,engrossing,engraving,endorphins,enamel,emptive,empirical,emmys,emission,eminently,embody,embezzler,embarressed,embarrassingly,embalmed,emancipation,eludes,eling,elevation,electorate,elated,eirie,egotitis,effecting,eerily,eeew,eecom,editorials,edict,eczema,ecumenical,ecklie's,earthy,earlobes,eally,dyeing,dwells,dvds,duvet,duncans,dulcet,duckling,droves,droppin,drools,drey'auc,dreamers,dowser's,downriver,downgraded,doping,doodie,dominicans,dominating,domesticity,dollop,doesnt,doer,dobler,divulged,divisional,diversionary,distancing,dissolves,dissipated,displaying,dispensers,dispensation,disorienting,disneyworld,dismissive,dismantling,disingenuous,disheveled,disfiguring,discourse,discontinued,disallowed,dinning,dimming,diminutive,diligently,dilettante,dilation,diggity,diggers,dickensian,diaphragms,diagnoses,dewy,developer,devastatingly,determining,destabilize,desecrate,derives,deposing,denzel,denouncing,denominations,denominational,deniece,demony,delving,delt,delicates,deigned,degrassi's,degeneration,defraud,deflower,defibrillator,defiantly,deferred,defenceless,defacing,dedicating,deconstruction,decompose,deciphering,decibels,deceptively,deceptions,decapitation,debutantes,debonair,deadlier,dawdling,davic,databases,darwinism,darnit,darks,danke,danieljackson,dangled,daimler,cytoxan,cylinders,cutout,cutlery,cuss,cushing's,curveball,curiously,curfews,cummerbund,cuckoo's,crunches,crucifixion,crouched,croix,criterion,crisps,cripples,crilly,cribs,crewman,cretaceous,creepin,creeds,credenza,creak,crawly,crawlin,crawlers,crated,crasher,crackheads,coworker,counterpart,councillor,coun,couldn't've,cots,costanza's,cosgrove's,corwins,corset,correspondents,coriander,copiously,convenes,contraceptives,continuously,contingencies,contaminating,consul,constantinople,conniption,connie's,conk,conjugate,condiment,concurrently,concocting,conclave,concert's,con's,comprehending,compliant,complacency,compilation,competitiveness,commendatore,comedies,comedians,comebacks,combines,com'on,colonized,colonization,collided,collectively,collarbone,collaborating,collaborated,colitis,coldly,coiffure,coffers,coeds,codependent,cocksucking,cockney,cockles,clutched,cluett's,cloverleaf,closeted,cloistered,clinched,clicker,cleve,clergyman,cleats,clarifying,clapped,citations,cinnabar,cinco,chunnel,chumps,chucks,christof,cholinesterase,choirboy,chocolatey,chlamydia,chili's,chigliak,cheesie,cheeses,chechnya,chauvinistic,chasm,chartreuse,charnier,chapil,chapel's,chalked,chadway,cerveza,cerulean,certifiably,celsius,cellulite,celled,ceiling's,cavalry's,cavalcade,catty,caters,cataloging,casy,castrated,cassio,cashman's,cashews,carwash,cartouche,carnivore,carcinogens,carasco's,carano's,capulet,captives,captivated,capt'n,capsized,canoes,cannes,candidate's,cancellations,camshaft,campin,callate,callar,calendar's,calculators,cair,caffeinated,cadavers,cacophony,cackle,byproduct,bwana,buzzes,buyout,buttoning,busload,burglaries,burbs,bura,buona,bunions,bungalows,bundles,bunches,bullheaded,buffs,bucyk,buckling,bruschetta,browbeating,broomsticks,broody,bromly,brolin,brigadier,briefings,bridgeport,brewskies,breathalyzer,breakups,breadth,bratwurst,brania,branching,braiding,brags,braggin,bradywood,bozo's,bottomed,bottom's,bottling,botany,boston's,bossa,bordello,booo,bookshelf,boogida,bondsman,bolsheviks,bolder,boggles,boarder,boar's,bludgeoned,blowtorch,blotter,blips,blends,blemish,bleaching,blainetologists,blading,blabbermouth,bismarck,bishops,biscayne,birdseed,birdcage,bionic,biographies,biographical,bimmel,biloxi,biggly,bianchinni,bette's,betadine,berg's,berenson,belus,belt's,belly's,belloq,bella's,belfast,behavior's,begets,befitting,beethoven's,beepers,beelzebub,beefed,bedroom's,bedrock,bedridden,bedevere,beckons,beckett's,beauty's,beaded,baubles,bauble,battlestar,battleground,battle's,bathrobes,basketballs,basements,barroom,barnacle,barkin,barked,barium,baretta,bangles,bangler,banality,bambang,baltar,ballplayers,baio,bahrain,bagman,baffles,backstroke,backroom,bachelor's,babysat,babylonian,baboons,aviv,avez,averse,availability,augmentation,auditory,auditor,audiotape,auctioneer,atten,attained,attackers,atcha,astonishment,asshole's,assembler,arugula,arsonist's,arroz,arigato,arif,ardent,archaic,approximation,approving,appointing,apartheid,antihistamines,antarctica,annoyances,annals,annabelle's,angrily,angelou,angelo's,anesthesiology,android,anatomically,anarchists,analyse,anachronism,amiable,amex,ambivalent,amassed,amaretto,alumnus,alternating,alternates,alteration,aloft,alluding,allen's,allahu,alight,alfred's,alfie,airlift,aimin,ailment,aground,agile,ageing,afterglow,africans,affronte,affectionately,aerobic,adviser,advil,adventist,advancements,adrenals,admiral's,administrators,adjutant,adherence,adequately,additives,additions,adapting,adaptable,actualization,activating,acrost,ached,accursed,accoutrements,absconded,aboveboard,abou,abetted,abbot's,abbey's,aargh,aaaahh,zuzu's,zuwicky,zolda,zits,ziploc,zakamatak,yutz,yumm,youve,yolk,yippie,yields,yiddish,yesterdays,yella,yearns,yearnings,yearned,yawning,yalta,yahtzee,yacht's,y'mean,y'are,xand,wuthering,wreaks,woul,worsened,worrisome,workstation,workiiing,worcestershire,woop,wooooooo,wooded,wonky,womanizing,wolodarsky,wnkw,wnat,wiwith,withdraws,wishy,wisht,wipers,wiper,winos,winery,windthorne,windsurfing,windermere,wiggles,wiggled,wiggen,whys,whwhat,whuh,whos,whore's,whodunit,whoaaa,whittling,whitesnake,whirling,whereof,wheezing,wheeze,whatley's,whatd'ya,whataya,whammo,whackin,wets,westbound,wellll,wellesley,welch's,weirdo's,weightless,weevil,wedgies,webbing,weasly,weapon's,wean,wayside,waxes,wavelengths,waturi,washy,washrooms,warton's,wandell,wakeup,waitaminute,waddya,wabash,waaaah,vornac,voir,voicing,vocational,vocalist,vixens,vishnoor,viscount,virulent,virtuoso,vindictiveness,vinceres,vince's,villier,viii,vigeous,viennese,viceroy,vestigial,vernacular,venza's,ventilate,vented,venereal,vell,vegetative,veering,veered,veddy,vaslova,valosky,vailsburg,vaginas,vagas,vacation's,uuml,urethra,upstaged,uploading,upgrades,unwrapping,unwieldy,untenable,untapped,unsatisfied,unsatisfactory,unquenchable,unnerved,unmentionable,unlovable,unknowns,universes,uninformed,unimpressed,unhappily,unguarded,unexplored,underpass,undergarment,underdeveloped,undeniably,uncompromising,unclench,unclaimed,uncharacteristically,unbuttoned,unblemished,unas,umpa,ululd,uhhhm,tweeze,tutsami,tusk,tushy,tuscarora,turkle,turghan,turbulent,turbinium,tuffy,tubers,tsun,trucoat,troxa,trou,tropicana,triquetra,tripled,trimmers,triceps,tribeca,trespassed,traya,travellers,traumatizing,transvestites,transatlantic,tran's,trainors,tradin,trackers,townies,tourelles,toughness,toucha,totals,totalled,tossin,tortious,topshop,topes,tonics,tongs,tomsk,tomorrows,toiling,toddle,tobs,tizzy,tiramisu,tippers,timmi,timbre,thwap,thusly,ththe,thruway,thrusts,throwers,throwed,throughway,thrice,thomas's,thickening,thia,thermonuclear,therapy's,thelwall,thataway,th's,textile,texans,terry's,terrifically,tenets,tendons,tendon,telescopic,teleportation,telepathically,telekinetic,teetering,teaspoons,teamsters,taunts,tatoo,tarantulas,tapas,tanzania,tanned,tank's,tangling,tangerine,tamales,tallied,tailors,tai's,tahitian,tag's,tactful,tackles,tachy,tablespoon,tableau,syrah,syne,synchronicity,synch,synaptic,synapses,swooning,switchman,swimsuits,swimmer's,sweltering,swelling's,sweetly,sweeper,suvolte,suss,suslov,surname,surfed,supremacy,supposition,suppertime,supervillains,superman's,superfluous,superego,sunspots,sunnydale's,sunny's,sunning,sunless,sundress,sump,suki,suffolk,sue's,suckah,succotash,substation,subscriptions,submarines,sublevel,subbasement,styled,studious,studio's,striping,stresses,strenuously,streamlined,strains,straights,stony,stonewalled,stonehenge,stomper,stipulates,stinging,stimulated,stillness,stilettos,stewards,stevesy,steno,sten,stemmed,steenwyck,statesmen,statehood,stargates,standstill,stammering,staedert,squiggly,squiggle,squashing,squaring,spurred,sprints,spreadsheet,spramp,spotters,sporto,spooking,sponsorship,splendido,spittin,spirulina,spiky,speculations,spectral,spate,spartacus,spans,spacerun,sown,southbound,sorr,sorcery,soonest,sono,sondheim,something'll,someth,somepin,someone'll,solicitor,sofas,sodomy,sobs,soberly,sobered,soared,soapy,snowmen,snowbank,snowballing,snorkel,snivelling,sniffling,snakeskin,snagging,smush,smooter,smidgen,smackers,smackdown,slumlord,slugging,slossum,slimmer,slighted,sleepwalk,sleazeball,skokie,skirmishes,skipper's,skeptic,sitka,sitarides,sistah,sipped,sindell,simpletons,simp,simony,simba's,silkwood,silks,silken,silicone,sightless,sideboard,shuttles,shrugging,shrouds,showy,shoveled,shouldn'ta,shoplifters,shitstorm,shipyard,shielded,sheldon's,sheeny,shaven,shapetype,shankar,shaming,shallows,shale,shading,shackle,shabbily,shabbas,severus,settlements,seppuku,senility,semite,semiautomatic,semester's,selznick,secretarial,sebacio,sear,seamless,scuzzy,scummy,scud,scrutinized,scrunchie,scriptures,scribbled,scouted,scotches,scolded,scissor,schooner,schmidt's,schlub,scavenging,scarin,scarfing,scarecrow's,scant,scallions,scald,scabby,say's,savour,savored,sarcoidosis,sandbar,saluted,salted,salish,saith,sailboats,sagittarius,sagan,safeguards,sacre,saccharine,sacamano,sabe,rushdie,rumpled,rumba,rulebook,rubbers,roughage,rotterdam,roto,rotisserie,rosebuds,rootie,roosters,roosevelt's,rooney's,roofy,roofie,romanticize,roma's,rolodex,rolf's,roland's,rodney's,robotic,robin's,rittle,ristorante,rippin,rioting,rinsing,ringin,rincess,rickety,rewritten,revising,reveling,rety,retreats,retest,retaliating,resumed,restructuring,restrict,restorative,reston,restaurateur,residences,reshoots,resetting,resentments,rescuers,rerouted,reprogramming,reprisals,reprisal,repossess,repartee,renzo,renfield,remore,remitting,remeber,reliability,relaxants,rejuvenate,rejections,rehu,regularity,registrar's,regionals,regimes,regenerated,regency,refocus,referrals,reeno,reelected,redevelopment,recycles,recrimination,recombinant,reclining,recanting,recalling,reattach,reassigning,realises,reactors,reactionary,rbis,razor's,razgul,raved,rattlesnakes,rattles,rashly,raquetball,rappers,rapido,ransack,rankings,rajah,raisinettes,raheem,radisson,radishes,radically,radiance,rabbi's,raban,quoth,qumari,quints,quilts,quilting,quien,queue,quarreled,qualifying,pygmy,purty,puritans,purblind,puppy's,punctuation,punchbowl,puget,publically,psychotics,psychopaths,psychoanalyze,pruning,provasik,protruding,protracted,protons,protections,protectin,prospector,prosecutor's,propping,proportioned,prophylactic,propelled,proofed,prompting,prompter,professed,procreate,proclivities,prioritizing,prinze,princess's,pricked,press'll,presets,prescribes,preocupe,prejudicial,prefex,preconceived,precipice,preamble,pram,pralines,pragmatist,powering,powerbar,pottie,pottersville,potsie,potholes,potency,posses,posner's,posies,portkey,porterhouse,pornographers,poring,poppycock,poppet,poppers,poopsie,pomponi,pokin,poitier,poes,podiatry,plush,pleeze,pleadings,playbook,platelets,plane'arium,placebos,place'll,pj's,pixels,pitted,pistachios,pisa,pirated,pirate's,pinochle,pineapples,pinafore,pimples,piggly,piggies,pie's,piddling,picon,pickpockets,picchu,physiologically,physic,photo's,phobic,philosophies,philosophers,philly's,philandering,phenomenally,pheasants,phasing,phantoms,pewter,petticoat,petronis,petitioning,perturbed,perth,persists,persians,perpetuating,permutat,perishable,periphery,perimeters,perfumed,percocet,per'sus,pepperjack,pensioners,penalize,pelting,pellet,peignoir,pedicures,pedestrians,peckers,pecans,payback's,pay's,pawning,paulsson,pattycake,patrolmen,patrolled,patois,pathos,pasted,passer,partnerships,parp,parishioners,parishioner,parcheesi,parachuting,pappa,paperclip,papayas,paolo's,pantheon,pantaloons,panhandle,pampers,palpitations,paler,palantine,paintballing,pago,owow,overtired,overstress,oversensitive,overnights,overexcited,overanxious,overachiever,outwitted,outvoted,outnumber,outlived,outlined,outlast,outlander,outfield,out've,ortolani's,orphey,ornate,ornamental,orienteering,orchestrating,orator,oppressive,operator's,openers,opec,ooky,oliver's,olde,okies,okee,ohhhhhhhhh,ohhhhhhhh,ogling,offline,offbeat,oceanographic,obsessively,obeyed,oaths,o'leary's,o'hana,o'bannon,o'bannion,numpce,nummy,nuked,nuff,nuances,nourishing,noticeably,notably,nosedive,northeastern,norbu,nomlies,nomine,nomads,noge,nixed,niro,nihilist,nightshift,newmeat,nevis,nemo's,neighborhood's,neglectful,neediness,needin,necromancer,neck's,ncic,nathaniel's,nashua,naphthalene,nanotechnology,nanocytes,nanite,naivete,nacho,n'yeah,mystifying,myhnegon,mutating,muskrat,musing,museum's,muppets,mumbles,mulled,muggy,muerto,muckraker,muchachos,mris,move's,mourners,mountainside,moulin,mould,motherless,motherfuck,mosquitos,morphed,mopped,moodoo,montage,monsignor,moncho,monarchs,mollem,moisturiser,moil,mohicans,moderator,mocks,mobs,mizz,mites,mistresses,misspent,misinterpretation,mishka,miscarry,minuses,minotaur,minoan,mindee,mimicking,millisecond,milked,militants,migration,mightn't,mightier,mierzwiak,midwives,micronesia,microchips,microbes,michele's,mhmm,mezzanine,meyerling,meticulously,meteorite,metaphorical,mesmerizing,mershaw,meir,meg's,meecrob,medicate,medea,meddled,mckinnons,mcgewan,mcdunnough,mcats,mbien,maytag,mayors,matzah,matriarch,matic,mathematicians,masturbated,masselin,marxist,martyrs,martini's,martialed,marten's,marlboros,marksmanship,marishka,marion's,marinate,marge's,marchin,manifestations,manicured,mandela,mamma's,mame,malnourished,malk,malign,majorek,maidens,mahoney's,magnon,magnificently,maestro's,macking,machiavellian,macdougal,macchiato,macaws,macanaw,m'self,lynx,lynn's,lyman's,lydells,lusts,lures,luna's,ludwig's,lucite,lubricants,louise's,lopper,lopped,loneliest,lonelier,lomez,lojack,localized,locale,loath,lloyd's,literate,liquidated,liquefy,lippy,linguistic,limps,lillian's,likin,lightness,liesl,liebchen,licious,libris,libation,lhamo,lewis's,leveraged,leticia's,leotards,leopards,leonid,leonardo's,lemmings,leland's,legitimacy,leanin,laxatives,lavished,latka,later's,larval,lanyard,lans,lanky,landscaping,landmines,lameness,lakeshore,laddies,lackluster,lacerated,labored,laboratories,l'amour,kyrgyzstan,kreskin,krazy,kovitch,kournikova,kootchy,konoss,know's,knknow,knickety,knackety,kmart,klicks,kiwanis,kitty's,kitties,kites,kissable,kirby's,kingdoms,kindergartners,kimota,kimble's,kilter,kidnet,kidman,kid'll,kicky,kickbacks,kickback,kickass,khrushchev,kholokov,kewpie,kent's,keno,kendo,keller's,kcdm,katrina's,katra,kareoke,kaia,kafelnikov,kabob,ka's,junjun,jumba,julep,jordie,jondy,jolson,jinnah,jeweler's,jerkin,jenoff,jefferson's,jaye's,jawbone,janitorial,janiro,janie's,iron's,ipecac,invigorated,inverted,intruded,intros,intravenously,interruptus,interrogations,interracial,interpretive,internment,intermediate,intermediary,interject,interfacing,interestin,insuring,instilled,instantaneous,insistence,insensitivity,inscrutable,inroads,innards,inlaid,injector,initiatives,inhe,ingratitude,infuriates,infra,informational,infliction,infighting,induction,indonesian,indochina,indistinguishable,indicators,indian's,indelicate,incubators,incrimination,increments,inconveniencing,inconsolable,incite,incestuous,incas,incarnation,incarcerate,inbreeding,inaccessible,impudence,impressionists,implemented,impeached,impassioned,impacts,imipenem,idling,idiosyncrasies,icicle,icebreaker,icebergs,i'se,hyundai,hypotensive,hydrochloride,huuh,hushed,humus,humph,hummm,hulking,hubcaps,hubald,http,howya,howbout,how'll,houseguests,housebroken,hotwire,hotspots,hotheaded,horticulture,horrace,horde,horace's,hopsfield,honto,honkin,honeymoons,homophobia,homewrecker,hombres,hollow's,hollers,hollerin,hokkaido,hohh,hogwarts,hoedown,hoboes,hobbling,hobble,hoarse,hinky,himmler,hillcrest,hijacking,highlighters,hiccup,hibernation,hexes,heru'ur,hernias,herding,heppleman,henderson's,hell're,heine's,heighten,heheheheheh,heheheh,hedging,heckling,heckled,heavyset,heatshield,heathens,heartthrob,headpiece,headliner,he'p,hazelnut,hazards,hayseed,haveo,hauls,hattie's,hathor's,hasten,harriers,harridan,harpoons,harlin's,hardens,harcesis,harbouring,hangouts,hangman,handheld,halkein,haleh,halberstam,hairpin,hairnet,hairdressers,hacky,haah,haaaa,h'yah,gyms,gusta,gushy,gusher,gurgling,gunnery,guilted,guilt's,gruel,grudging,grrrrrr,grouse,grossing,grosses,groomsmen,griping,gretchen's,gregorian,gray's,gravest,gratified,grated,graphs,grandad,goulash,goopy,goonies,goona,goodman's,goodly,goldwater,godliness,godawful,godamn,gobs,gob's,glycerin,glutes,glowy,glop,globetrotters,glimpsed,glenville,glaucoma,girlscout,giraffes,gimp,gilbey,gil's,gigglepuss,ghora,gestating,geologists,geographically,gelato,gekko's,geishas,geek's,gearshift,gear's,gayness,gasped,gaslighting,garretts,garba,gams,gags,gablyczyck,g'head,fungi,fumigating,fumbling,fulton's,fudged,fuckwad,fuck're,fuchsia,fruition,freud's,fretting,freshest,frenchies,freezers,fredrica,fraziers,francesca's,fraidy,foxholes,fourty,fossilized,forsake,formulate,forfeits,foreword,foreclosed,foreal,foraging,footsies,focussed,focal,florists,flopped,floorshow,floorboard,flinching,flecks,flavours,flaubert,flatware,flatulence,flatlined,flashdance,flail,flagging,fizzle,fiver,fitzy,fishsticks,finster,finetti,finelli,finagle,filko,filipino,figurines,figurative,fifi,fieldstone,fibber,fiance's,feuds,feta,ferrini,female's,feedin,fedora,fect,feasting,favore,fathering,farrouhk,farmin,far's,fanny's,fajita,fairytale,fairservice,fairgrounds,fads,factoid,facet,facedown,fabled,eyeballin,extortionist,exquisitely,exporting,explicitly,expenditures,expedited,expands,exorcise,existentialist,exhaustive,execs,exculpatory,excommunicated,exacerbate,everthing,eventuality,evander,eustace,euphoric,euphemisms,eton,esto,estimation,estamos,establishes,erred,environmentalist,entrepreneurial,entitle,enquiries,enormity,engages,enfants,enen,endive,end's,encyclopedias,emulating,emts,employee's,emphasized,embossed,embittered,embassies,eliot,elicit,electrolyte,ejection,effortless,effectiveness,edvard,educators,edmonton's,ecuador,ectopic,ecirc,easely,earphones,earmarks,earmarked,earl's,dysentery,dwindling,dwight's,dweller,dusky,durslar,durned,dunois,dunking,dunked,dumdum,dullard,dudleys,duce,druthers,druggist,drug's,drossos,drosophila,drooled,driveways,drippy,dreamless,drawstring,drang,drainpipe,dragoons,dozing,down's,dour,dougie's,dotes,dorsal,dorkface,doorknobs,doohickey,donnell's,donnatella,doncha,don's,dominates,domicile,dokos,dobermans,djez,dizzying,divola,dividends,ditsy,distaste,disservice,disregarded,dispensed,dismay,dislodged,dislodge,disinherit,disinformation,discrete,discounting,disciplines,disapproved,dirtball,dinka,dimly,dilute,dilucca's,digesting,diello,diddling,dictatorships,dictators,diagonal,diagnostician,devours,devilishly,detract,detoxing,detours,detente,destructs,desecrated,descends,derris,deplore,deplete,depicts,depiction,depicted,denver's,denounce,demure,demolitions,demean,deluge,dell's,delish,deliberation,delbruck,delaford,deities,degaulle,deftly,deft,deformity,deflate,definatly,defense's,defector,deducted,decrypted,decontamination,decker's,decapitate,decanter,deadline's,dardis,danger's,dampener,damme,daddy'll,dabbling,dabbled,d'etre,d'argent,d'alene,d'agnasti,czechs,czechoslovakian,cyrillic,cymbal,cyberdyne,cutoffs,cuticle,cut's,curvaceous,curiousity,curfew's,culturally,cued,cubby,cruised,crucible,crowing,crowed,croutons,cropped,croaker,cristobel's,criminy,crested,crescentis,cred,cream's,crashers,crapola,cranwell,coverin,cousteau,courtrooms,counterattack,countenance,counselor's,cottages,cosmically,cosign,cosa,corroboration,corresponds,correspond,coroners,coro,cornflakes,corbett's,copy's,copperpot,copperhead,copacetic,coordsize,convulsing,contradicted,contract's,continuation,consults,consultations,constraints,conjures,congenial,confluence,conferring,confederation,condominium,concourse,concealer,compulsory,complexities,comparatively,compactor,commodities,commercialism,colleague's,collaborator,cokey,coiled,cognizant,cofell's,cobweb,co's,cnbc,clyde's,clunkers,clumsily,clucking,cloves,cloven,cloths,clothe,clop,clods,clocking,clings,climbers,clef,clearances,clavicle,claudia's,classless,clashing,clanking,clanging,clamping,civvies,citywide,citing,circulatory,circuited,circ,chung's,chronisters,chromic,choppy,choos,chongo,chloroformed,chilton's,chillun,chil,chicky,cheetos,cheesed,chatterbox,charlies,chaperoned,channukah,chamberlain's,chairman's,chaim,cessation,cerebellum,centred,centerpieces,centerfold,cellars,ceecee,ccedil,cavorting,cavemen,cavaliers,cauterized,caustic,cauldwell,catting,cathy's,caterine,castor's,cassiopeia,cascade's,carves,cartwheel,cartridges,carpeted,carob,carlsbad,caressing,carelessly,careening,carcinoma,capricious,capitalistic,capillaries,capes,candle's,candidly,canaan,camaraderie,calumet,callously,calligraphy,calfskin,cake's,caddies,cabinet's,buzzers,buttholes,butler's,busywork,busses,burps,burgomeister,buoy,bunny's,bunkhouse,bungchow,bulkhead,builders,bugler,buffets,buffed,buckaroo's,brutish,brusque,browser,bronchitis,bromden,brolly,brody's,broached,brewskis,brewski,brewin,brewers,brean,breadwinner,brana,brackets,bozz,bountiful,bounder,bouncin,bosoms,borgnine,bopping,bootlegs,booing,bons,boneyard,bombosity,bolting,bolivia,boilerplate,boba,bluey,blowback,blouses,bloodsuckers,bloodstained,blonde's,bloat,bleeth,blazed,blaine's,blackhawk,blackface,blackest,blackened,blacken,blackballed,blabs,blabbering,birdbrain,bipartisanship,biodegradable,binghamton,biltmore,billiards,bilked,big'uns,bidwell's,bidet,bessie's,besotted,beset,berth,bernheim,benson's,beni,benegas,bendiga,belushi,beltway,bellboys,belittling,belinda's,behinds,behemoth,begone,beeline,beehive,bedsheets,beckoning,beaute,beaudine,beastly,beachfront,be's,bauk,bathes,batak,bastion,baser,baseballs,barker's,barber's,barbella,bans,bankrolling,bangladesh,bandaged,bamba,bally's,bagpipe,bagger,baerly,backlog,backin,babying,azkaban,ayatollah,axes,awwwww,awakens,aviary,avery's,autonomic,authorizes,austero,aunty,augustine's,attics,atreus,astronomers,astounded,astonish,assertion,asserting,assailants,asha's,artemus,arses,arousal,armin,arintero,argon's,arduous,archers,archdiocese,archaeology,arbitrarily,ararat,appropriated,appraiser,applicable,apathetic,anybody'd,anxieties,anwar's,anticlimactic,antar,ankle's,anima,anglos,angleman,anesthetist,androscoggin,andromeda,andover,andolini,andale,anan,amway,amuck,amphibian,amniocentesis,amnesiac,ammonium,americano,amara,alway,alvah,alum,altruism,alternapalooza,alphabetize,alpaca,almanac,ally's,allus,alluded,allocation,alliances,allergist,alleges,alexandros,alec's,alaikum,alabam,akimbo,airy,ahab's,agoraphobia,agides,aggrhh,agatha's,aftertaste,affiliations,aegis,adoptions,adjuster,addictions,adamantium,acumen,activator,activates,acrylic,accomplishes,acclaimed,absorbs,aberrant,abbu,aarp,aaaaargh,aaaaaaaaaaaaa,a'ight,zucchini,zoos,zookeeper,zirconia,zippers,zequiel,zephyr's,zellary,zeitgeist,zanuck,zambia,zagat,ylang,yielded,yes'm,yenta,yegg,yecchh,yecch,yayo,yawp,yawns,yankin,yahdah,yaaah,y'got,xeroxed,wwooww,wristwatch,wrangled,wouldst,worthiness,wort,worshiping,worsen,wormy,wormtail,wormholes,woosh,woodworking,wonka,womens,wolverines,wollsten,wolfing,woefully,wobbling,witter's,wisp,wiry,wire's,wintry,wingding,windstorm,windowtext,wiluna,wilting,wilted,willick,willenholly,wildflowers,wildebeest,wilco,wiggum,wields,widened,whyyy,whoppers,whoaa,whizzing,whizz,whitest,whitefish,whistled,whist,whinny,whereupon,whereby,wheelies,wheaties,whazzup,whatwhatwhaaat,whato,whatdya,what'dya,whar,whacks,wexler's,wewell,wewe,wetsuit,wetland,westport,welluh,weight's,weeps,webpage,waylander,wavin,watercolors,wassail,wasnt,warships,warns,warneford,warbucks,waltons,wallbanger,waiving,waitwait,vowing,voucher,vornoff,vork,vorhees,voldemort,vivre,vittles,vishnu,vips,vindaloo,videogames,victors,vicky's,vichyssoise,vicarious,vet's,vesuvius,verve,verguenza,venturing,ventura's,venezuelan,ven't,velveteen,velour,velociraptor,vegetation,vaudeville,vastness,vasectomies,vapors,vanderhof,valmont,validates,valiantly,valerian,vacuums,vaccines,uzbekistan,usurp,usernum,us'll,urinals,unyielding,unwillingness,unvarnished,unturned,untouchables,untangled,unsecured,unscramble,unreturned,unremarkable,unregistered,unpublished,unpretentious,unopposed,unnerstand,unmade,unlicensed,unites,union's,uninhabited,unimpeachable,unilateral,unicef,unfolded,unfashionable,undisturbed,underwriting,underwrite,underlining,underling,underestimates,underappreciated,undamaged,uncouth,uncork,uncontested,uncommonly,unclog,uncircumcised,unchallenged,uncas,unbuttoning,unapproved,unamerican,unafraid,umpteen,umhmm,uhwhy,uhmm,ughuh,ughh,ufo's,typewriters,twitches,twitched,twirly,twinkling,twink,twinges,twiddling,twiddle,tutored,tutelage,turners,turnabout,ture,tunisian,tumultuous,tumour,tumblin,tryed,truckin,trubshaw's,trowel,trousseau,trivialize,trifles,tribianni,trib,triangulation,trenchcoat,trembled,traumatize,transplanted,translations,transitory,transients,transfuse,transforms,transcribing,transcend,tranq,trampy,traipsed,trainin,trail's,trafalgar,trachea,traceable,touristy,toughie,totality,totaling,toscanini,tortola,tortilla,tories,toreador,tooo,tonka,tommorrow,tollbooth,tollans,toidy,togs,togas,tofurkey,toddling,toddies,tobruk,toasties,toadstool,to've,tive,tingles,timin,timey,timetables,tightest,tide's,tibetans,thunderstorms,thuggee,thrusting,thrombus,throes,throated,thrifty,thoroughbred,thornharts,thinnest,thicket,thetas,thesulac,tethered,testimonial,testaburger,tersenadine,terrif,teresa's,terdlington,tepui,tenured,tentacle,temping,temperance,temp's,teller's,televisions,telefono,tele,teddies,tector,taxidermy,taxi's,taxation,tastebuds,tasker's,tartlets,tartabull,tard,tar'd,tantamount,tans,tangy,tangles,tamer,talmud,taiwan's,tabula,tabletops,tabithia,tabernacle,szechwan,syrian,synthedyne,synopsis,synonyms,swaps,swahili,svenjolly,svengali,suvs,sush,survivalists,surmise,surfboards,surefire,suprise,supremacists,suppositories,supervisors,superstore,supermen,supercop,supercilious,suntac,sunburned,summercliff,sullied,suite's,sugared,sufficiency,suerte,suckle,sucker's,sucka,succumbing,subtleties,substantiated,subsidiaries,subsides,subliminal,subhuman,stst,strowman,stroked,stroganoff,strikers,strengthening,streetlight,straying,strainer,straighter,straightener,storytelling,stoplight,stockade,stirrups,stink's,sting's,stimulates,stifler's,stewing,stetson's,stereotyping,ster,stepmommy,stephano,steeped,statesman,stashing,starshine,stand's,stamping,stamford,stairwells,stabilization,squatsie,squandering,squalid,squabbling,squab,sprinkling,spring's,spreader,spongy,spongebob,spokeswoman,spokesmen,splintered,spittle,spitter,spiced,spews,spendin,spect,speckled,spearchucker,spatulas,sparse,sparking,spares,spaceboy,soybeans,southtown,southside,southport,southland,soused,sotheby's,soshi,sorter,sorrowful,sorceress,sooth,songwriters,some'in,solstice,soliloquy,sods,sodomized,sode,sociologist,sobriki,soaping,snows,snowcone,snowcat,snitching,snitched,sneering,snausages,snaking,smoothed,smoochies,smolensk,smarten,smallish,slushy,slurring,sluman,slobber,slithers,slippin,sleuthing,sleeveless,slade's,skinner's,skinless,skillfully,sketchbook,skagnetti,sista,sioux,sinning,sinjin,singularly,sinewy,sinclair's,simultaneous,silverlake,silva's,siguto,signorina,signature's,signalling,sieve,sids,sidearms,shyster,shying,shunning,shtud,shrooms,shrieks,shorting,shortbread,shopkeepers,shmuck,shmancy,shizzit,shitheads,shitfaced,shitbag,shipmates,shiftless,sherpa,shelving,shelley's,sheik,shedlow,shecky,sheath,shavings,shatters,sharifa,shampoos,shallots,shafter,sha'nauc,sextant,settlers,setter,seti,serviceable,serrated,serbian,sequentially,sepsis,senores,sendin,semis,semanski,seller's,selflessly,selects,selectively,seinfelds,seers,seer's,seeps,see's,seductress,sedimentary,sediment,second's,secaucus,seater,seashore,sealant,seaborn's,scuttling,scusa,sculpting,scrunched,scrimmage,screenwriter,scotsman,scorer,sclerosis,scissorhands,schreber,scholastic,schmancy,schlong,scathing,scandinavia,scamps,scalloped,savoir,savagery,sasha's,sarong,sarnia,santangel,samool,samba,salons,sallow,salino,safecracker,sadism,saddles,sacrilegious,sabrini,sabath,s'aright,ruttheimer,russia's,rudest,rubbery,rousting,rotarian,roslin,rosey,rosa's,roomed,romari,romanticism,romanica,rolltop,rolfski,rod's,rockland,rockettes,roared,riverfront,rinpoche,ringleader,rims,riker's,riffing,ricans,ribcage,riana's,rhythmic,rhah,rewired,retroactive,retrial,reting,reticulum,resuscitated,resuming,restricting,restorations,restock,resilience,reservoirs,resembled,resale,requisitioned,reprogrammed,reproducing,repressive,replicant,repentant,repellant,repays,repainting,reorganization,renounced,renegotiating,rendez,renamed,reminiscent,remem,remade,relived,relinquishes,reliant,relearn,relaxant,rekindling,rehydrate,regulatory,regiments,regan's,refueled,refrigeration,refreshingly,reflector,refine,refilling,reexamine,reeseman,redness,redirected,redeemable,redder,redcoats,rectangles,recoup,reconstituted,reciprocated,recipients,recessed,recalls,rebounded,reassessing,realy,reality's,realisation,realer,reachin,re'kali,rawlston,ravages,rattlers,rasa,raps,rappaports,ramoray,ramming,ramadan,raindrops,rahesh,radioactivity,radials,racists,racin,rabartu,quotas,quintus,quiches,ques,queries,quench,quel,quarrels,quarreling,quaintly,quagmire,quadrants,pylon,putumayo,put'em,purifier,purified,pureed,punitis,pullout,pukin,pudgy,puddings,puckering,puccini,pterodactyl,psychodrama,pseudonym,psats,proximal,providers,protestations,protectee,prospered,prosaic,propositioned,prolific,progressively,proficiency,professions,prodigious,proclivity,probed,probabilities,pro's,prison's,printouts,principally,prig,prevision,prevailing,presumptive,pressers,preset,presentations,preposition,preparatory,preliminaries,preempt,preemie,predetermined,preconceptions,precipitate,prancan,powerpuff,powerfully,potties,potters,potpie,poseur,portraying,portico,porthole,portfolios,poops,pooping,pone,pomp,pomade,polyps,polymerized,politic,politeness,polisher,polack,pokers,pocketknife,poatia,plebeian,playgroup,platonically,plato's,platitude,platelet,plastering,plasmapheresis,plaques,plaids,placemats,place's,pizzazz,piracy,pipelines,pip's,pintauro,pinstripes,pinpoints,pinkner,pincer,pimento,pillaged,pileup,pilates,pigment,pigmen,pieter,pieeee,picturesque,piano's,phrasing,phrased,photojournalist,photocopies,phosphorus,phonograph,phoebes,phoe,philistines,philippine,philanderer,pheromone,phasers,pharaoh's,pfff,pfeffernuesse,petrov,petitions,peterman's,peso,pervs,perspire,personify,perservere,perplexed,perpetrating,perp's,perkiness,perjurer,periodontist,perfunctory,performa,perdido,percodan,penzance,pentameter,pentagon's,pentacle,pensive,pensione,pennybaker,pennbrooke,penhall,pengin,penetti,penetrates,pegs,pegnoir,peeve,peephole,pectorals,peckin,peaky,peaksville,payout,paxcow,paused,pauline's,patted,pasteur,passe,parochial,parkland,parkishoff,parkers,pardoning,paraplegic,paraphrasing,parapet,paperers,papered,panoramic,pangs,paneling,pander,pandemonium,pamela's,palooza,palmed,palmdale,palisades,palestinian,paleolithic,palatable,pakistanis,pageants,packaged,pacify,pacified,oyes,owwwww,overthrown,overt,oversexed,overriding,overrides,overpaying,overdrawn,overcompensate,overcomes,overcharged,outtakes,outmaneuver,outlying,outlining,outfoxed,ousted,oust,ouse,ould,oughtn't,ough,othe,ostentatious,oshun,oscillation,orthopedist,organizational,organization's,orca,orbits,or'derves,opting,ophthalmologist,operatic,operagirl,oozes,oooooooh,only's,onesie,omnis,omelets,oktoberfest,okeydoke,ofthe,ofher,obstetrics,obstetrical,obeys,obeah,o'rourke,o'reily's,o'henry,nyquil,nyanyanyanyah,nuttin,nutsy,nutrients,nutball,nurhachi,numbskull,nullifies,nullification,nucking,nubbin,ntnt,nourished,notoriety,northland,nonspecific,nonfiction,noing,noinch,nohoho,nobler,nitwits,nitric,nips,nibs,nibbles,newton's,newsprint,newspaperman,newspaper's,newscaster,never's,neuter,neuropathy,netherworld,nests,nerf,neee,neediest,neath,navasky,naturalization,nat's,narcissists,napped,nando,nags,nafta,myocardial,mylie's,mykonos,mutilating,mutherfucker,mutha,mutations,mutates,mutate,musn't,muskets,murray's,murchy,mulwray's,multitasking,muldoon's,mujeeb,muerte,mudslinging,muckraking,mrsa,mown,mousie,mousetrap,mourns,mournful,motivating,motherland,motherf,mostro,mosaic,morphing,morphate,mormons,moralistic,moored,moochy,mooching,monotonous,monorail,monopolize,monogram,monocle,molehill,molar,moland,mofet,modestly,mockup,moca,mobilizing,mitzvahs,mitre,mistreating,misstep,misrepresentation,misjudge,misinformation,miserables,misdirected,miscarriages,minute's,miniskirt,minimizing,mindwarped,minced,milquetoast,millimeters,miguelito,migrating,mightily,midsummer,midstream,midriff,mideast,midas,microbe,metropolis,methuselah,mesdames,mescal,mercury's,menudo,menu's,mentors,men'll,memorial's,memma,melvins,melanie's,megaton,megara,megalomaniac,meeee,medulla,medivac,mediate,meaninglessness,mcnuggets,mccarthyism,maypole,may've,mauve,maturing,matter's,mateys,mate's,mastering,masher,marxism,martimmy's,marshack,marseille,markles,marketed,marketable,mansiere,manservant,manse,manhandling,manco's,manana,maman,malnutrition,mallomars,malkovich's,malcontent,malaise,makeup's,majesties,mainsail,mailmen,mahandra,magnolias,magnified,magev,maelstrom,madcap,mack's,machu,macfarlane's,macado,ma'm,m'boy,m'appelle,lying's,lustrous,lureen,lunges,lumped,lumberyard,lulled,luego,lucks,lubricated,loveseat,loused,lounger,loski,lorre,loora,looong,loonies,lonnegan's,lola's,loire,loincloth,logistical,lofts,lodges,lodgers,lobbing,loaner,livered,lithuania,liqueur,linkage,ling's,lillienfield's,ligourin,lighter's,lifesaving,lifeguards,lifeblood,library's,liberte,liaisons,liabilities,let'em,lesbianism,lenny's,lennart,lence,lemonlyman,legz,legitimize,legalized,legalization,leadin,lazars,lazarro,layoffs,lawyering,lawson's,lawndale's,laugher,laudanum,latte's,latrines,lations,laters,lastly,lapels,lansing's,lan's,lakefront,lait,lahit,lafortunata,lachrymose,laborer,l'italien,l'il,kwaini,kuzmich,kuato's,kruczynski,kramerica,krakatoa,kowtow,kovinsky,koufax,korsekov,kopek,knoxville,knowakowski,knievel,knacks,klux,klein's,kiran,kiowas,kinshasa,kinkle's,kincaid's,killington,kidnapper's,kickoff,kickball,khan's,keyworth,keymaster,kevie,keveral,kenyons,keggers,keepsakes,kechner,keaty,kavorka,katmandu,katan's,karajan,kamerev,kamal's,kaggs,juvi,jurisdictional,jujyfruit,judeo,jostled,joni's,jonestown,jokey,joists,joint's,johnnie's,jocko,jimmied,jiggled,jig's,jests,jessy,jenzen,jensen's,jenko,jellyman,jeet,jedediah,jealitosis,jaya's,jaunty,jarmel,jankle,jagoff,jagielski,jacky,jackrabbits,jabbing,jabberjaw,izzat,iuml,isolating,irreverent,irresponsibly,irrepressible,irregularity,irredeemable,investigator's,inuvik,intuitions,intubated,introspective,intrinsically,intra,intimates,interval,intersections,interred,interned,interminable,interloper,intercostal,interchange,integer,intangible,instyle,instrumentation,instigate,instantaneously,innumerable,inns,injustices,ining,inhabits,ings,ingrown,inglewood,ingestion,ingesting,infusion,infusing,infringing,infringe,inflection,infinitum,infact,inexplicably,inequities,ineligible,industry's,induces,indubitably,indisputable,indirect,indescribably,independents,indentation,indefinable,incursion,incontrovertible,inconsequential,incompletes,incoherently,inclement,inciting,incidentals,inarticulate,inadequacies,imprudent,improvisation,improprieties,imprison,imprinted,impressively,impostors,importante,implicit,imperious,impale,immortalized,immodest,immobile,imbued,imbedded,imbecilic,illustrates,illegals,iliad,idn't,idiom,icons,hysteric,hypotenuse,hygienic,hyeah,hushpuppies,hunhh,hungarians,humpback,humored,hummed,humiliates,humidifier,huggy,huggers,huckster,html,hows,howlin,hoth,hotbed,hosing,hosers,horsehair,homegrown,homebody,homebake,holographic,holing,holies,hoisting,hogwallop,hogan's,hocks,hobbits,hoaxes,hmmmmm,hisses,hippos,hippest,hindrance,hindi,him's,hillbillies,hilarity,highball,hibiscus,heyday,heurh,hershey's,herniated,hermaphrodite,hera,hennifer,hemlines,hemline,hemery,helplessness,helmsley,hellhound,heheheheh,heey,heeey,hedda,heck's,heartbeats,heaped,healers,headstart,headsets,headlong,headlining,hawkland,havta,havana's,haulin,hastened,hasn,harvey'll,harpo,hardass,haps,hanta,hansom,hangnail,handstand,handrail,handoff,hander,han's,hamlet's,hallucinogen,hallor,halitosis,halen,hahah,hado,haberdashery,gypped,guy'll,guni,gumbel,gulch,gues,guerillas,guava,guatemalan,guardrail,guadalajara,grunther,grunick,grunemann's,growers,groppi,groomer,grodin,gris,gripes,grinds,grimaldi's,grifters,griffins,gridlock,gretch,greevey,greasing,graveyards,grandkid,grainy,graced,governed,gouging,gordie's,gooney,googly,golfers,goldmuff,goldenrod,goingo,godly,gobbledygook,gobbledegook,goa'uld's,glues,gloriously,glengarry,glassware,glamor,glaciers,ginseng,gimmicks,gimlet,gilded,giggly,gig's,giambetti,ghoulish,ghettos,ghandi,ghali,gether,get's,gestation,geriatrics,gerbils,gerace's,geosynchronous,georgio,geopolitical,genus,gente,genital,geneticist,generation's,generates,gendarme,gelbman,gazillionth,gayest,gauging,gastro,gaslight,gasbag,garters,garish,garas,garages,gantu,gangy,gangly,gangland,gamer,galling,galilee,galactica's,gaiety,gadda,gacy,futuristic,futs,furrowed,funny's,funnies,funkytown,fundraisers,fundamentalist,fulcrum,fugimotto,fuente,fueling,fudging,fuckup,fuckeen,frutt's,frustrates,froufrou,froot,frontiers,fromberge,frog's,frizzies,fritters,fringes,frightfully,frigate,friendliest,freeloading,freelancing,fredonia,freakazoid,fraternization,frankfurter,francine's,franchises,framers,fostered,fortune's,fornication,fornicating,formulating,formations,forman's,forgeries,forethought,forage,footstool,foisting,focussing,focking,foal,flutes,flurries,fluffed,flourished,florida's,floe,flintstones,fleischman's,fledgling,fledermaus,flayed,flay,flawlessly,flatters,flashbang,flapped,flanking,flamer,fission,fishies,firmer,fireproof,fireman's,firebug,firebird,fingerpainting,finessed,findin,financials,finality,fillets,fighter's,fiercest,fiefdom,fibrosis,fiberglass,fibbing,feudal,festus,fervor,fervent,fentanyl,fenelon,fenders,fedorchuk,feckless,feathering,fearsome,fauna,faucets,farmland,farewells,fantasyland,fanaticism,faltered,fallacy,fairway,faggy,faberge,extremism,extorting,extorted,exterminating,exhumation,exhilaration,exhausts,exfoliate,exemptions,excesses,excels,exasperating,exacting,evoked,evocative,everyman,everybody'd,evasions,evangelical,establishments,espressos,esoteric,esmail,errrr,erratically,eroding,erode,ernswiler,episcopalian,ephemeral,epcot,entrenched,entomology,entomologist,enthralled,ensuing,ensenada,enriching,enrage,enlisting,enhancer,enhancements,endorsing,endear,encrusted,encino,enacted,employing,emperors,empathic,embodied,embezzle,embarked,emanates,elton's,eloquence,eloi,elmwood,elliptical,ellenor's,elemental,electricians,electing,elapsed,eking,egomaniacal,eggo,egging,effected,effacing,eeww,edits,editor's,edging,ectoplasm,economical,ecch,eavesdropped,eastbound,earwig,e'er,durable,dunbar's,dummkopf,dugray,duchaisne,duality,drusilla's,drunkard,drudge,drucilla's,droop,droids,drips,dripped,dribbles,drew's,dressings,drazens,downy,downsize,downpour,dowager,dote,dosages,dorothy's,doppler,doppelganger,dopes,doorman's,doohicky,doof,dontcha,donovon's,doneghy,domi,domes,dojo,documentaries,divinity,divining,divest,diuretics,diuretic,distrustful,distortions,dissident,disrupts,disruptions,disproportionate,dispensary,disparity,dismemberment,dismember,disinfect,disillusionment,disheartening,discriminated,discourteous,discotheque,discolored,disassembled,disabling,dirtiest,diphtheria,dinks,dimpled,digg,diffusion,differs,didya,dickweed,dickwad,dickson's,diatribes,diathesis,diabetics,dewars,deviants,detrimental,detonates,detests,detestable,detaining,despondent,desecration,descriptive,derision,derailing,deputized,depressors,depo,depicting,depict,dependant,dentures,denominators,demur,demonstrators,demonology,delts,dellarte,delinquency,delacour,deflated,definitively,defib,defected,defaced,deeded,decorators,debit,deaqon,davola,datin,dasilva's,darwinian,darling's,darklighters,dandelions,dandelion,dancer's,dampened,dame's,damaskinos,dama,dalrimple,dagobah,dack,d'peshu,d'hoffryn,d'astier,cystic,cynics,cybernetic,cutoff,cutesy,cutaway,customarily,curtain's,cursive,curmudgeon,curdle,cuneiform,cultivated,culpability,culo,cuisinart,cuffing,crypts,cryptid,cryogenic,crux,crunched,crumblers,crudely,crosscheck,croon,crissake,crime's,cribbage,crevasse,creswood,creepo,creases,creased,creaky,cranks,cran,craftsmen,crafting,crabgrass,cowboy's,coveralls,couple'a,councilors,coughs,cotton's,cosmology,coslaw,corresponded,corporeal,corollary,cornucopia,cornering,corks,cordoned,coolly,coolin,cooley's,coolant,cookbooks,converging,contrived,contrite,contributors,contradictory,contra,contours,contented,contenders,contemplated,contact's,constrictor,congressman's,congestion,confrontations,confound,conform,confit,confiscating,conferred,condoned,conditioners,concussions,concentric,conceding,coms,comprised,comprise,comprendo,composers,commuted,commercially,commentator,commentaries,commemorating,commander's,comers,comedic,combustible,combusted,columbo,columbia's,colourful,colonials,collingswood,coliseum,coldness,cojones,coitus,cohesive,cohesion,cohen's,coffey's,codicil,cochran's,coasting,clydesdale,cluttering,clunker,clunk,clumsiness,clumps,clotted,clothesline,clinches,clincher,cleverness,clench,clein,cleave,cleanses,claymores,clarisse,clarissa's,clammed,civilisation,ciudad,circumvent,circulated,circuit's,cinnamon's,cind,church's,chugging,chronically,christsakes,chris's,choque,chompers,choco,chiseling,chirpy,chirp,chinks,chingachgook,chigger,chicklet,chickenpox,chickadee,chewin,chessboard,cherub,chemo's,chauffeur's,chaucer,chariots,chargin,characterizing,chanteuse,chandeliers,chamdo,chalupa,chagrined,chaff,certs,certify,certification,certainties,cerreno,cerebrum,cerebro,century's,centennial,censured,cemetary,cellist,celine's,cedar's,cayo,caterwauling,caterpillars,categorized,catchers,cataclysmic,cassidy's,casitas,casino's,cased,carvel,cartographers,carting,cartels,carriages,carrear,carr's,carolling,carolinas,carolers,carnie,carne,cardiovascular,cardiogram,carbuncle,caramba,capulets,capping,canyons,canines,candaules,canape,canadiens,campaigned,cambodian,camberwell,caldecott,calamitous,caff,cadillacs,cachet,cabeza,cabdriver,byzantium,buzzkill,buzzards,buzz's,buyer's,butai,bustling,businesswomen,bunyan,bungled,bumpkins,bummers,bulletins,bullet's,bulldoze,bulbous,bug's,buffybot,budgeted,budda,bubut,bubbies,brunei,brrrrr,brownout,brouhaha,bronzing,bronchial,broiler,broadening,briskly,briefcases,bricked,breezing,breeher,breckinridge,breakwater,breakable,breadstick,bravenet,braved,brass's,brandies,brandeis,branched,brainwaves,brainiest,braggart,bradlee,boys're,boys'll,boys'd,boyd's,boutonniere,bottle's,bossed,bosomy,bosnian,borans,boosts,boombox,bookshelves,bookmark,booklet,bookends,bontecou's,bongos,boneless,bone's,bond's,bombarding,bombarded,bollo,boinked,boink,boilers,bogart's,bobbo,bobbin,bluest,bluebells,blowjobs,bloodshot,blondie's,blockhead,blockbusters,blithely,blim,bleh,blather,blasters,blankly,bladders,blackhawks,blackbeard,bjorn,bitte,bippy,bios,biohazard,biogenetics,biochemistry,biochemist,bilingual,bilge,bigmouth,bighorn,bigglesworth,bicuspids,beususe,betaseron,besmirch,besieged,bernece,bergman's,bereavement,bentonville,benthic,benjie,benji's,benefactors,benchley,benching,bembe,bellyaching,bellhops,belie,beleaguered,being's,behrle,beginnin,begining,beenie,beefs,beechwood,bee's,bedbug,becau,beaverhausen,beakers,beacon's,bazillion,baudouin,bat's,bartlett's,barrytown,barringtons,baroque,baronet,barneys,barbs,barbers,barbatus,baptists,bankrupted,banker's,bamn,bambi's,ballon's,balinese,bakeries,bailiffs,backslide,baby'd,baaad,b'fore,awwwk,aways,awakes,averages,avengers,avatars,autonomous,automotive,automaton,automatics,autism,authoritative,authenticated,authenticate,aught,audition's,aubyn,attired,attagirl,atrophied,atonement,atherton's,asystole,astroturf,assimilated,assimilate,assertiveness,assemblies,assassin's,artiste,article's,artichokes,arsehole,arrears,arquillians,arnie's,aright,archenemy,arched,arcade's,aquatic,apps,appraise,applauded,appendages,appeased,apostle,apollo's,antwerp,antler,antiquity,antin,antidepressant,antibody,anthropologists,anthology,anthea,antagonism,ant's,anspaugh,annually,anka,angola,anesthetics,anda,ancients,anchoring,anaphylactic,anaheim,ana's,amtrak,amscray,amputated,amounted,americas,amended,ambivalence,amalio,amah,altoid,alriiight,alphabetized,alpena,alouette,allowable,allora,alliteration,allenwood,alleging,allegiances,aligning,algerians,alerts,alchemist,alcerro,alastor,airway's,airmen,ahaha,ah'm,agitators,agitation,aforethought,afis,aesthetics,aerospace,aerodynamics,advertises,advert,advantageous,admonition,administration's,adirondacks,adenoids,adebisi's,acupuncturist,acula,actuarial,activators,actionable,acme's,acknowledges,achmed,achingly,acetate,accusers,accumulation,accorded,acclimated,acclimate,absurdly,absorbent,absolvo,absolutes,absences,abraham's,aboriginal,ablaze,abdomenizer,aaaaaaaaah,aaaaaaaaaa,a'right".split(","))),aM("male_names",aK("james,john,robert,michael,william,david,richard,charles,joseph,thomas,christopher,daniel,paul,mark,donald,george,kenneth,steven,edward,brian,ronald,anthony,kevin,jason,matthew,gary,timothy,jose,larry,jeffrey,frank,scott,eric,stephen,andrew,raymond,gregory,joshua,jerry,dennis,walter,patrick,peter,harold,douglas,henry,carl,arthur,ryan,roger,joe,juan,jack,albert,jonathan,justin,terry,gerald,keith,samuel,willie,ralph,lawrence,nicholas,roy,benjamin,bruce,brandon,adam,harry,fred,wayne,billy,steve,louis,jeremy,aaron,randy,eugene,carlos,russell,bobby,victor,ernest,phillip,todd,jesse,craig,alan,shawn,clarence,sean,philip,chris,johnny,earl,jimmy,antonio,danny,bryan,tony,luis,mike,stanley,leonard,nathan,dale,manuel,rodney,curtis,norman,marvin,vincent,glenn,jeffery,travis,jeff,chad,jacob,melvin,alfred,kyle,francis,bradley,jesus,herbert,frederick,ray,joel,edwin,don,eddie,ricky,troy,randall,barry,bernard,mario,leroy,francisco,marcus,micheal,theodore,clifford,miguel,oscar,jay,jim,tom,calvin,alex,jon,ronnie,bill,lloyd,tommy,leon,derek,darrell,jerome,floyd,leo,alvin,tim,wesley,dean,greg,jorge,dustin,pedro,derrick,dan,zachary,corey,herman,maurice,vernon,roberto,clyde,glen,hector,shane,ricardo,sam,rick,lester,brent,ramon,tyler,gilbert,gene,marc,reginald,ruben,brett,angel,nathaniel,rafael,edgar,milton,raul,ben,cecil,duane,andre,elmer,brad,gabriel,ron,roland,jared,adrian,karl,cory,claude,erik,darryl,neil,christian,javier,fernando,clinton,ted,mathew,tyrone,darren,lonnie,lance,cody,julio,kurt,allan,clayton,hugh,max,dwayne,dwight,armando,felix,jimmie,everett,ian,ken,bob,jaime,casey,alfredo,alberto,dave,ivan,johnnie,sidney,byron,julian,isaac,clifton,willard,daryl,virgil,andy,salvador,kirk,sergio,seth,kent,terrance,rene,eduardo,terrence,enrique,freddie,stuart,fredrick,arturo,alejandro,joey,nick,luther,wendell,jeremiah,evan,julius,donnie,otis,trevor,luke,homer,gerard,doug,kenny,hubert,angelo,shaun,lyle,matt,alfonso,orlando,rex,carlton,ernesto,pablo,lorenzo,omar,wilbur,blake,horace,roderick,kerry,abraham,rickey,ira,andres,cesar,johnathan,malcolm,rudolph,damon,kelvin,rudy,preston,alton,archie,marco,wm,pete,randolph,garry,geoffrey,jonathon,felipe,bennie,gerardo,ed,dominic,loren,delbert,colin,guillermo,earnest,benny,noel,rodolfo,myron,edmund,salvatore,cedric,lowell,gregg,sherman,devin,sylvester,roosevelt,israel,jermaine,forrest,wilbert,leland,simon,irving,owen,rufus,woodrow,kristopher,levi,marcos,gustavo,lionel,marty,gilberto,clint,nicolas,laurence,ismael,orville,drew,ervin,dewey,al,wilfred,josh,hugo,ignacio,caleb,tomas,sheldon,erick,frankie,darrel,rogelio,terence,alonzo,elias,bert,elbert,ramiro,conrad,noah,grady,phil,cornelius,lamar,rolando,clay,percy,dexter,bradford,merle,darin,amos,terrell,moses,irvin,saul,roman,darnell,randal,tommie,timmy,darrin,brendan,toby,van,abel,dominick,emilio,elijah,cary,domingo,aubrey,emmett,marlon,emanuel,jerald,edmond,emil,dewayne,otto,teddy,reynaldo,bret,jess,trent,humberto,emmanuel,stephan,louie,vicente,lamont,garland,micah,efrain,heath,rodger,demetrius,ethan,eldon,rocky,pierre,eli,bryce,antoine,robbie,kendall,royce,sterling,grover,elton,cleveland,dylan,chuck,damian,reuben,stan,leonardo,russel,erwin,benito,hans,monte,blaine,ernie,curt,quentin,agustin,jamal,devon,adolfo,tyson,wilfredo,bart,jarrod,vance,denis,damien,joaquin,harlan,desmond,elliot,darwin,gregorio,kermit,roscoe,esteban,anton,solomon,norbert,elvin,nolan,carey,rod,quinton,hal,brain,rob,elwood,kendrick,darius,moises,marlin,fidel,thaddeus,cliff,marcel,ali,raphael,bryon,armand,alvaro,jeffry,dane,joesph,thurman,ned,sammie,rusty,michel,monty,rory,fabian,reggie,kris,isaiah,gus,avery,loyd,diego,adolph,millard,rocco,gonzalo,derick,rodrigo,gerry,rigoberto,alphonso,ty,rickie,noe,vern,elvis,bernardo,mauricio,hiram,donovan,basil,nickolas,scot,vince,quincy,eddy,sebastian,federico,ulysses,heriberto,donnell,denny,gavin,emery,romeo,jayson,dion,dante,clement,coy,odell,jarvis,bruno,issac,dudley,sanford,colby,carmelo,nestor,hollis,stefan,donny,art,linwood,beau,weldon,galen,isidro,truman,delmar,johnathon,silas,frederic,irwin,merrill,charley,marcelino,carlo,trenton,kurtis,aurelio,winfred,vito,collin,denver,leonel,emory,pasquale,mohammad,mariano,danial,landon,dirk,branden,adan,numbers,clair,buford,german,bernie,wilmer,emerson,zachery,jacques,errol,josue,edwardo,wilford,theron,raymundo,daren,tristan,robby,lincoln,jame,genaro,octavio,cornell,hung,arron,antony,herschel,alva,giovanni,garth,cyrus,cyril,ronny,stevie,lon,kennith,carmine,augustine,erich,chadwick,wilburn,russ,myles,jonas,mitchel,mervin,zane,jamel,lazaro,alphonse,randell,major,johnie,jarrett,ariel,abdul,dusty,luciano,seymour,scottie,eugenio,mohammed,valentin,arnulfo,lucien,ferdinand,thad,ezra,aldo,rubin,royal,mitch,earle,abe,marquis,lanny,kareem,jamar,boris,isiah,emile,elmo,aron,leopoldo,everette,josef,eloy,dorian,rodrick,reinaldo,lucio,jerrod,weston,hershel,lemuel,lavern,burt,jules,gil,eliseo,ahmad,nigel,efren,antwan,alden,margarito,refugio,dino,osvaldo,les,deandre,normand,kieth,ivory,trey,norberto,napoleon,jerold,fritz,rosendo,milford,sang,deon,christoper,alfonzo,lyman,josiah,brant,wilton,rico,jamaal,dewitt,brenton,yong,olin,faustino,claudio,judson,gino,edgardo,alec,jarred,donn,trinidad,tad,porfirio,odis,lenard,chauncey,tod,mel,marcelo,kory,augustus,keven,hilario,bud,sal,orval,mauro,dannie,zachariah,olen,anibal,milo,jed,thanh,amado,lenny,tory,richie,horacio,brice,mohamed,delmer,dario,mac,jonah,jerrold,robt,hank,sung,rupert,rolland,kenton,damion,chi,antone,waldo,fredric,bradly,kip,burl,tyree,jefferey,ahmed,willy,stanford,oren,moshe,mikel,enoch,brendon,quintin,jamison,florencio,darrick,tobias,minh,hassan,giuseppe,demarcus,cletus,tyrell,lyndon,keenan,werner,theo,geraldo,columbus,chet,bertram,markus,huey,hilton,dwain,donte,tyron,omer,isaias,hipolito,fermin,chung,adalberto,jamey,teodoro,mckinley,maximo,sol,raleigh,lawerence,abram,rashad,emmitt,daron,chong,samual,otha,miquel,eusebio,dong,domenic,darron,wilber,renato,hoyt,haywood,ezekiel,chas,florentino,elroy,clemente,arden,neville,edison,deshawn,carrol,shayne,nathanial,jordon,danilo,claud,val,sherwood,raymon,rayford,cristobal,ambrose,titus,hyman,felton,ezequiel,erasmo,lonny,len,ike,milan,lino,jarod,herb,andreas,rhett,jude,douglass,cordell,oswaldo,ellsworth,virgilio,toney,nathanael,del,benedict,mose,hong,isreal,garret,fausto,asa,arlen,zack,modesto,francesco,manual,jae,gaylord,gaston,filiberto,deangelo,michale,granville,wes,malik,zackary,tuan,nicky,cristopher,antione,malcom,korey,jospeh,colton,waylon,von,hosea,shad,santo,rudolf,rolf,rey,renaldo,marcellus,lucius,kristofer,harland,arnoldo,rueben,leandro,kraig,jerrell,jeromy,hobert,cedrick,arlie,winford,wally,luigi,keneth,jacinto,graig,franklyn,edmundo,sid,leif,jeramy,willian,vincenzo,shon,michal,lynwood,jere,hai,elden,darell,broderick,alonso".split(","))),aM("female_names",aK("mary,patricia,linda,barbara,elizabeth,jennifer,maria,susan,margaret,dorothy,lisa,nancy,karen,betty,helen,sandra,donna,carol,ruth,sharon,michelle,laura,sarah,kimberly,deborah,jessica,shirley,cynthia,angela,melissa,brenda,amy,anna,rebecca,virginia,kathleen,pamela,martha,debra,amanda,stephanie,carolyn,christine,marie,janet,catherine,frances,ann,joyce,diane,alice,julie,heather,teresa,doris,gloria,evelyn,jean,cheryl,mildred,katherine,joan,ashley,judith,rose,janice,kelly,nicole,judy,christina,kathy,theresa,beverly,denise,tammy,irene,jane,lori,rachel,marilyn,andrea,kathryn,louise,sara,anne,jacqueline,wanda,bonnie,julia,ruby,lois,tina,phyllis,norma,paula,diana,annie,lillian,emily,robin,peggy,crystal,gladys,rita,dawn,connie,florence,tracy,edna,tiffany,carmen,rosa,cindy,grace,wendy,victoria,edith,kim,sherry,sylvia,josephine,thelma,shannon,sheila,ethel,ellen,elaine,marjorie,carrie,charlotte,monica,esther,pauline,emma,juanita,anita,rhonda,hazel,amber,eva,debbie,april,leslie,clara,lucille,jamie,joanne,eleanor,valerie,danielle,megan,alicia,suzanne,michele,gail,bertha,darlene,veronica,jill,erin,geraldine,lauren,cathy,joann,lorraine,lynn,sally,regina,erica,beatrice,dolores,bernice,audrey,yvonne,annette,june,marion,dana,stacy,ana,renee,ida,vivian,roberta,holly,brittany,melanie,loretta,yolanda,jeanette,laurie,katie,kristen,vanessa,alma,sue,elsie,beth,jeanne,vicki,carla,tara,rosemary,eileen,terri,gertrude,lucy,tonya,ella,stacey,wilma,gina,kristin,jessie,natalie,agnes,vera,charlene,bessie,delores,melinda,pearl,arlene,maureen,colleen,allison,tamara,joy,georgia,constance,lillie,claudia,jackie,marcia,tanya,nellie,minnie,marlene,heidi,glenda,lydia,viola,courtney,marian,stella,caroline,dora,jo,vickie,mattie,maxine,irma,mabel,marsha,myrtle,lena,christy,deanna,patsy,hilda,gwendolyn,jennie,nora,margie,nina,cassandra,leah,penny,kay,priscilla,naomi,carole,olga,billie,dianne,tracey,leona,jenny,felicia,sonia,miriam,velma,becky,bobbie,violet,kristina,toni,misty,mae,shelly,daisy,ramona,sherri,erika,katrina,claire,lindsey,lindsay,geneva,guadalupe,belinda,margarita,sheryl,cora,faye,ada,natasha,sabrina,isabel,marguerite,hattie,harriet,molly,cecilia,kristi,brandi,blanche,sandy,rosie,joanna,iris,eunice,angie,inez,lynda,madeline,amelia,alberta,genevieve,monique,jodi,janie,kayla,sonya,jan,kristine,candace,fannie,maryann,opal,alison,yvette,melody,luz,susie,olivia,flora,shelley,kristy,mamie,lula,lola,verna,beulah,antoinette,candice,juana,jeannette,pam,kelli,whitney,bridget,karla,celia,latoya,patty,shelia,gayle,della,vicky,lynne,sheri,marianne,kara,jacquelyn,erma,blanca,myra,leticia,pat,krista,roxanne,angelica,robyn,adrienne,rosalie,alexandra,brooke,bethany,sadie,bernadette,traci,jody,kendra,nichole,rachael,mable,ernestine,muriel,marcella,elena,krystal,angelina,nadine,kari,estelle,dianna,paulette,lora,mona,doreen,rosemarie,desiree,antonia,janis,betsy,christie,freda,meredith,lynette,teri,cristina,eula,leigh,meghan,sophia,eloise,rochelle,gretchen,cecelia,raquel,henrietta,alyssa,jana,gwen,jenna,tricia,laverne,olive,tasha,silvia,elvira,delia,kate,patti,lorena,kellie,sonja,lila,lana,darla,mindy,essie,mandy,lorene,elsa,josefina,jeannie,miranda,dixie,lucia,marta,faith,lela,johanna,shari,camille,tami,shawna,elisa,ebony,melba,ora,nettie,tabitha,ollie,winifred,kristie,marina,alisha,aimee,rena,myrna,marla,tammie,latasha,bonita,patrice,ronda,sherrie,addie,francine,deloris,stacie,adriana,cheri,abigail,celeste,jewel,cara,adele,rebekah,lucinda,dorthy,effie,trina,reba,sallie,aurora,lenora,etta,lottie,kerri,trisha,nikki,estella,francisca,josie,tracie,marissa,karin,brittney,janelle,lourdes,laurel,helene,fern,elva,corinne,kelsey,ina,bettie,elisabeth,aida,caitlin,ingrid,iva,eugenia,christa,goldie,maude,jenifer,therese,dena,lorna,janette,latonya,candy,consuelo,tamika,rosetta,debora,cherie,polly,dina,jewell,fay,jillian,dorothea,nell,trudy,esperanza,patrica,kimberley,shanna,helena,cleo,stefanie,rosario,ola,janine,mollie,lupe,alisa,lou,maribel,susanne,bette,susana,elise,cecile,isabelle,lesley,jocelyn,paige,joni,rachelle,leola,daphne,alta,ester,petra,graciela,imogene,jolene,keisha,lacey,glenna,gabriela,keri,ursula,lizzie,kirsten,shana,adeline,mayra,jayne,jaclyn,gracie,sondra,carmela,marisa,rosalind,charity,tonia,beatriz,marisol,clarice,jeanine,sheena,angeline,frieda,lily,shauna,millie,claudette,cathleen,angelia,gabrielle,autumn,katharine,jodie,staci,lea,christi,justine,elma,luella,margret,dominique,socorro,martina,margo,mavis,callie,bobbi,maritza,lucile,leanne,jeannine,deana,aileen,lorie,ladonna,willa,manuela,gale,selma,dolly,sybil,abby,ivy,dee,winnie,marcy,luisa,jeri,magdalena,ofelia,meagan,audra,matilda,leila,cornelia,bianca,simone,bettye,randi,virgie,latisha,barbra,georgina,eliza,leann,bridgette,rhoda,haley,adela,nola,bernadine,flossie,ila,greta,ruthie,nelda,minerva,lilly,terrie,letha,hilary,estela,valarie,brianna,rosalyn,earline,catalina,ava,mia,clarissa,lidia,corrine,alexandria,concepcion,tia,sharron,rae,dona,ericka,jami,elnora,chandra,lenore,neva,marylou,melisa,tabatha,serena,avis,allie,sofia,jeanie,odessa,nannie,harriett,loraine,penelope,milagros,emilia,benita,allyson,ashlee,tania,esmeralda,karina,eve,pearlie,zelma,malinda,noreen,tameka,saundra,hillary,amie,althea,rosalinda,lilia,alana,clare,alejandra,elinor,lorrie,jerri,darcy,earnestine,carmella,noemi,marcie,liza,annabelle,louisa,earlene,mallory,carlene,nita,selena,tanisha,katy,julianne,lakisha,edwina,maricela,margery,kenya,dollie,roxie,roslyn,kathrine,nanette,charmaine,lavonne,ilene,tammi,suzette,corine,kaye,chrystal,lina,deanne,lilian,juliana,aline,luann,kasey,maryanne,evangeline,colette,melva,lawanda,yesenia,nadia,madge,kathie,ophelia,valeria,nona,mitzi,mari,georgette,claudine,fran,alissa,roseann,lakeisha,susanna,reva,deidre,chasity,sheree,elvia,alyce,deirdre,gena,briana,araceli,katelyn,rosanne,wendi,tessa,berta,marva,imelda,marietta,marci,leonor,arline,sasha,madelyn,janna,juliette,deena,aurelia,josefa,augusta,liliana,lessie,amalia,savannah,anastasia,vilma,natalia,rosella,lynnette,corina,alfreda,leanna,amparo,coleen,tamra,aisha,wilda,karyn,queen,maura,mai,evangelina,rosanna,hallie,erna,enid,mariana,lacy,juliet,jacklyn,freida,madeleine,mara,cathryn,lelia,casandra,bridgett,angelita,jannie,dionne,annmarie,katina,beryl,millicent,katheryn,diann,carissa,maryellen,liz,lauri,helga,gilda,rhea,marquita,hollie,tisha,tamera,angelique,francesca,kaitlin,lolita,florine,rowena,reyna,twila,fanny,janell,ines,concetta,bertie,alba,brigitte,alyson,vonda,pansy,elba,noelle,letitia,deann,brandie,louella,leta,felecia,sharlene,lesa,beverley,isabella,herminia,terra,celina,tori,octavia,jade,denice,germaine,michell,cortney,nelly,doretha,deidra,monika,lashonda,judi,chelsey,antionette,margot,adelaide,nan,leeann,elisha,dessie,libby,kathi,gayla,latanya,mina,mellisa,kimberlee,jasmin,renae,zelda,elda,justina,gussie,emilie,camilla,abbie,rocio,kaitlyn,edythe,ashleigh,selina,lakesha,geri,allene,pamala,michaela,dayna,caryn,rosalia,sun,jacquline,rebeca,marybeth,krystle,iola,dottie,belle,griselda,ernestina,elida,adrianne,demetria,delma,jaqueline,arleen,virgina,retha,fatima,tillie,eleanore,cari,treva,wilhelmina,rosalee,maurine,latrice,jena,taryn,elia,debby,maudie,jeanna,delilah,catrina,shonda,hortencia,theodora,teresita,robbin,danette,delphine,brianne,nilda,danna,cindi,bess,iona,winona,vida,rosita,marianna,racheal,guillermina,eloisa,celestine,caren,malissa,lona,chantel,shellie,marisela,leora,agatha,soledad,migdalia,ivette,christen,janel,veda,pattie,tessie,tera,marilynn,lucretia,karrie,dinah,daniela,alecia,adelina,vernice,shiela,portia,merry,lashawn,dara,tawana,oma,verda,alene,zella,sandi,rafaela,maya,kira,candida,alvina,suzan,shayla,lyn,lettie,samatha,oralia,matilde,larissa,vesta,renita,india,delois,shanda,phillis,lorri,erlinda,cathrine,barb,zoe,isabell,ione,gisela,roxanna,mayme,kisha,ellie,mellissa,dorris,dalia,bella,annetta,zoila,reta,reina,lauretta,kylie,christal,pilar,charla,elissa,tiffani,tana,paulina,leota,breanna,jayme,carmel,vernell,tomasa,mandi,dominga,santa,melodie,lura,alexa,tamela,mirna,kerrie,venus,felicita,cristy,carmelita,berniece,annemarie,tiara,roseanne,missy,cori,roxana,pricilla,kristal,jung,elyse,haydee,aletha,bettina,marge,gillian,filomena,zenaida,harriette,caridad,vada,una,aretha,pearline,marjory,marcela,flor,evette,elouise,alina,damaris,catharine,belva,nakia,marlena,luanne,lorine,karon,dorene,danita,brenna,tatiana,louann,julianna,andria,philomena,lucila,leonora,dovie,romona,mimi,jacquelin,gaye,tonja,misti,chastity,stacia,roxann,micaela,nikita,mei,velda,marlys,johnna,aura,ivonne,hayley,nicki,majorie,herlinda,yadira,perla,gregoria,antonette,shelli,mozelle,mariah,joelle,cordelia,josette,chiquita,trista,laquita,georgiana,candi,shanon,hildegard,valentina,stephany,magda,karol,gabriella,tiana,roma,richelle,oleta,jacque,idella,alaina,suzanna,jovita,tosha,nereida,marlyn,kyla,delfina,tena,stephenie,sabina,nathalie,marcelle,gertie,darleen,thea,sharonda,shantel,belen,venessa,rosalina,ona,genoveva,clementine,rosalba,renate,renata,georgianna,floy,dorcas,ariana,tyra,theda,mariam,juli,jesica,vikki,verla,roselyn,melvina,jannette,ginny,debrah,corrie,asia,violeta,myrtis,latricia,collette,charleen,anissa,viviana,twyla,nedra,latonia,lan,hellen,fabiola,annamarie,adell,sharyn,chantal,niki,maud,lizette,lindy,kia,kesha,jeana,danelle,charline,chanel,valorie,lia,dortha,cristal,leone,leilani,gerri,debi,andra,keshia,ima,eulalia,easter,dulce,natividad,linnie,kami,georgie,catina,brook,alda,winnifred,sharla,ruthann,meaghan,magdalene,lissette,adelaida,venita,trena,shirlene,shameka,elizebeth,dian,shanta,latosha,carlotta,windy,rosina,mariann,leisa,jonnie,dawna,cathie,astrid,laureen,janeen,holli,fawn,vickey,teressa,shante,rubye,marcelina,chanda,terese,scarlett,marnie,lulu,lisette,jeniffer,elenor,dorinda,donita,carman,bernita,altagracia,aleta,adrianna,zoraida,nicola,lyndsey,janina,ami,starla,phylis,phuong,kyra,charisse,blanch,sanjuanita,rona,nanci,marilee,maranda,brigette,sanjuana,marita,kassandra,joycelyn,felipa,chelsie,bonny,mireya,lorenza,kyong,ileana,candelaria,sherie,lucie,leatrice,lakeshia,gerda,edie,bambi,marylin,lavon,hortense,garnet,evie,tressa,shayna,lavina,kyung,jeanetta,sherrill,shara,phyliss,mittie,anabel,alesia,thuy,tawanda,joanie,tiffanie,lashanda,karissa,enriqueta,daria,daniella,corinna,alanna,abbey,roxane,roseanna,magnolia,lida,joellen,era,coral,carleen,tresa,peggie,novella,nila,maybelle,jenelle,carina,nova,melina,marquerite,margarette,josephina,evonne,cinthia,albina,toya,tawnya,sherita,myriam,lizabeth,lise,keely,jenni,giselle,cheryle,ardith,ardis,alesha,adriane,shaina,linnea,karolyn,felisha,dori,darci,artie,armida,zola,xiomara,vergie,shamika,nena,nannette,maxie,lovie,jeane,jaimie,inge,farrah,elaina,caitlyn,felicitas,cherly,caryl,yolonda,yasmin,teena,prudence,pennie,nydia,mackenzie,orpha,marvel,lizbeth,laurette,jerrie,hermelinda,carolee,tierra,mirian,meta,melony,kori,jennette,jamila,ena,anh,yoshiko,susannah,salina,rhiannon,joleen,cristine,ashton,aracely,tomeka,shalonda,marti,lacie,kala,jada,ilse,hailey,brittani,zona,syble,sherryl,nidia,marlo,kandice,kandi,deb,alycia,ronna,norene,mercy,ingeborg,giovanna,gemma,christel,audry,zora,vita,trish,stephaine,shirlee,shanika,melonie,mazie,jazmin,inga,hoa,hettie,geralyn,fonda,estrella,adella,sarita,rina,milissa,maribeth,golda,evon,ethelyn,enedina,cherise,chana,velva,tawanna,sade,mirta,karie,jacinta,elna,davina,cierra,ashlie,albertha,tanesha,nelle,mindi,lorinda,larue,florene,demetra,dedra,ciara,chantelle,ashly,suzy,rosalva,noelia,lyda,leatha,krystyna,kristan,karri,darline,darcie,cinda,cherrie,awilda,almeda,rolanda,lanette,jerilyn,gisele,evalyn,cyndi,cleta,carin,zina,zena,velia,tanika,charissa,talia,margarete,lavonda,kaylee,kathlene,jonna,irena,ilona,idalia,candis,candance,brandee,anitra,alida,sigrid,nicolette,maryjo,linette,hedwig,christiana,alexia,tressie,modesta,lupita,lita,gladis,evelia,davida,cherri,cecily,ashely,annabel,agustina,wanita,shirly,rosaura,hulda,eun,yetta,verona,thomasina,sibyl,shannan,mechelle,lue,leandra,lani,kylee,kandy,jolynn,ferne,eboni,corene,alysia,zula,nada,moira,lyndsay,lorretta,jammie,hortensia,gaynell,adria,vina,vicenta,tangela,stephine,norine,nella,liana,leslee,kimberely,iliana,glory,felica,emogene,elfriede,eden,eartha,carma,bea,ocie,lennie,kiara,jacalyn,carlota,arielle,otilia,kirstin,kacey,johnetta,joetta,jeraldine,jaunita,elana,dorthea,cami,amada,adelia,vernita,tamar,siobhan,renea,rashida,ouida,nilsa,meryl,kristyn,julieta,danica,breanne,aurea,anglea,sherron,odette,malia,lorelei,leesa,kenna,kathlyn,fiona,charlette,suzie,shantell,sabra,racquel,myong,mira,martine,lucienne,lavada,juliann,elvera,delphia,christiane,charolette,carri,asha,angella,paola,ninfa,leda,lai,eda,stefani,shanell,palma,machelle,lissa,kecia,kathryne,karlene,julissa,jettie,jenniffer,hui,corrina,carolann,alena,rosaria,myrtice,marylee,liane,kenyatta,judie,janey,elmira,eldora,denna,cristi,cathi,zaida,vonnie,viva,vernie,rosaline,mariela,luciana,lesli,karan,felice,deneen,adina,wynona,tarsha,sheron,shanita,shani,shandra,randa,pinkie,nelida,marilou,lyla,laurene,laci,joi,janene,dorotha,daniele,dani,carolynn,carlyn,berenice,ayesha,anneliese,alethea,thersa,tamiko,rufina,oliva,mozell,marylyn,kristian,kathyrn,kasandra,kandace,janae,domenica,debbra,dannielle,arcelia,aja,zenobia,sharen,sharee,lavinia,kum,kacie,jackeline,huong,felisa,emelia,eleanora,cythia,cristin,claribel,anastacia,zulma,zandra,yoko,tenisha,susann,sherilyn,shay,shawanda,romana,mathilda,linsey,keiko,joana,isela,gretta,georgetta,eugenie,desirae,delora,corazon,antonina,anika,willene,tracee,tamatha,nichelle,mickie,maegan,luana,lanita,kelsie,edelmira,bree,afton,teodora,tamie,shena,meg,linh,keli,kaci,danyelle,arlette,albertine,adelle,tiffiny,simona,nicolasa,nichol,nia,nakisha,mee,maira,loreen,kizzy,fallon,christene,bobbye,vincenza,tanja,rubie,roni,queenie,margarett,kimberli,irmgard,idell,hilma,evelina,esta,emilee,dennise,dania,carie,wai,risa,rikki,particia,mui,masako,luvenia,loree,loni,lien,gigi,florencia,denita,billye,tomika,sharita,rana,nikole,neoma,margarite,madalyn,lucina,laila,kali,jenette,gabriele,evelyne,elenora,clementina,alejandrina,zulema,violette,vannessa,thresa,retta,pia,patience,noella,nickie,jonell,chaya,camelia,bethel,anya,suzann,shu,mila,lilla,laverna,keesha,kattie,georgene,eveline,estell,elizbeth,vivienne,vallie,trudie,stephane,magaly,madie,kenyetta,karren,janetta,hermine,drucilla,debbi,celestina,candie,britni,beckie,amina,zita,yun,yolande,vivien,vernetta,trudi,sommer,pearle,patrina,ossie,nicolle,loyce,letty,larisa,katharina,joselyn,jonelle,jenell,iesha,heide,florinda,florentina,flo,elodia,dorine,brunilda,brigid,ashli,ardella,twana,thu,tarah,shavon,serina,rayna,ramonita,nga,margurite,lucrecia,kourtney,kati,jesenia,crista,ayana,alica,alia,vinnie,suellen,romelia,rachell,olympia,michiko,kathaleen,jolie,jessi,janessa,hana,elease,carletta,britany,shona,salome,rosamond,regena,raina,ngoc,nelia,louvenia,lesia,latrina,laticia,larhonda,jina,jacki,emmy,deeann,coretta,arnetta,thalia,shanice,neta,mikki,micki,lonna,leana,lashunda,kiley,joye,jacqulyn,ignacia,hyun,hiroko,henriette,elayne,delinda,dahlia,coreen,consuela,conchita,celine,babette,ayanna,anette,albertina,shawnee,shaneka,quiana,pamelia,min,merri,merlene,margit,kiesha,kiera,kaylene,jodee,jenise,erlene,emmie,dalila,daisey,casie,belia,babara,versie,vanesa,shelba,shawnda,nikia,naoma,marna,margeret,madaline,lawana,kindra,jutta,jazmine,janett,hannelore,glendora,gertrud,garnett,freeda,frederica,florance,flavia,carline,beverlee,anjanette,valda,tamala,shonna,sha,sarina,oneida,merilyn,marleen,lurline,lenna,katherin,jin,jeni,hae,gracia,glady,farah,enola,ema,dominque,devona,delana,cecila,caprice,alysha,alethia,vena,theresia,tawny,shakira,samara,sachiko,rachele,pamella,marni,mariel,maren,malisa,ligia,lera,latoria,larae,kimber,kathern,karey,jennefer,janeth,halina,fredia,delisa,debroah,ciera,angelika,andree,altha,yen,vivan,terresa,tanna,suk,sudie,soo,signe,salena,ronni,rebbecca,myrtie,malika,maida,loan,leonarda,kayleigh,ethyl,ellyn,dayle,cammie,brittni,birgit,avelina,asuncion,arianna,akiko,venice,tyesha,tonie,tiesha,takisha,steffanie,sindy,meghann,manda,macie,kellye,kellee,joslyn,inger,indira,glinda,glennis,fernanda,faustina,eneida,elicia,dot,digna,dell,arletta,willia,tammara,tabetha,sherrell,sari,rebbeca,pauletta,natosha,nakita,mammie,kenisha,kazuko,kassie,earlean,daphine,corliss,clotilde,carolyne,bernetta,augustina,audrea,annis,annabell,yan,tennille,tamica,selene,rosana,regenia,qiana,markita,macy,leeanne,laurine,kym,jessenia,janita,georgine,genie,emiko,elvie,deandra,dagmar,corie,collen,cherish,romaine,porsha,pearlene,micheline,merna,margorie,margaretta,lore,jenine,hermina,fredericka,elke,drusilla,dorathy,dione,celena,brigida,angeles,allegra,tamekia,synthia,sook,slyvia,rosann,reatha,raye,marquetta,margart,layla,kymberly,kiana,kayleen,katlyn,karmen,joella,irina,emelda,eleni,detra,clemmie,cheryll,chantell,cathey,arnita,arla,angle,angelic,alyse,zofia,thomasine,tennie,sherly,sherley,sharyl,remedios,petrina,nickole,myung,myrle,mozella,louanne,lisha,latia,krysta,julienne,jeanene,jacqualine,isaura,gwenda,earleen,cleopatra,carlie,audie,antonietta,alise,verdell,tomoko,thao,talisha,shemika,savanna,santina,rosia,raeann,odilia,nana,minna,magan,lynelle,karma,joeann,ivana,inell,ilana,hye,hee,gudrun,dreama,crissy,chante,carmelina,arvilla,annamae,alvera,aleida,yanira,vanda,tianna,tam,stefania,shira,nicol,nancie,monserrate,melynda,melany,lovella,laure,kacy,jacquelynn,hyon,gertha,eliana,christena,christeen,charise,caterina,carley,candyce,arlena,ammie,willette,vanita,tuyet,syreeta,penney,nyla,maryam,marya,magen,ludie,loma,livia,lanell,kimberlie,julee,donetta,diedra,denisha,deane,dawne,clarine,cherryl,bronwyn,alla,valery,tonda,sueann,soraya,shoshana,shela,sharleen,shanelle,nerissa,meridith,mellie,maye,maple,magaret,lili,leonila,leonie,leeanna,lavonia,lavera,kristel,kathey,kathe,jann,ilda,hildred,hildegarde,genia,fumiko,evelin,ermelinda,elly,dung,doloris,dionna,danae,berneice,annice,alix,verena,verdie,shawnna,shawana,shaunna,rozella,randee,ranae,milagro,lynell,luise,loida,lisbeth,karleen,junita,jona,isis,hyacinth,hedy,gwenn,ethelene,erline,donya,domonique,delicia,dannette,cicely,branda,blythe,bethann,ashlyn,annalee,alline,yuko,vella,trang,towanda,tesha,sherlyn,narcisa,miguelina,meri,maybell,marlana,marguerita,madlyn,lory,loriann,leonore,leighann,laurice,latesha,laronda,katrice,kasie,kaley,jadwiga,glennie,gearldine,francina,epifania,dyan,dorie,diedre,denese,demetrice,delena,cristie,cleora,catarina,carisa,barbera,almeta,trula,tereasa,solange,sheilah,shavonne,sanora,rochell,mathilde,margareta,maia,lynsey,lawanna,launa,kena,keena,katia,glynda,gaylene,elvina,elanor,danuta,danika,cristen,cordie,coletta,clarita,carmon,brynn,azucena,aundrea,angele,verlie,verlene,tamesha,silvana,sebrina,samira,reda,raylene,penni,norah,noma,mireille,melissia,maryalice,laraine,kimbery,karyl,karine,kam,jolanda,johana,jesusa,jaleesa,jacquelyne,iluminada,hilaria,hanh,gennie,francie,floretta,exie,edda,drema,delpha,bev,barbar,assunta,ardell,annalisa,alisia,yukiko,yolando,wonda,wei,waltraud,veta,temeka,tameika,shirleen,shenita,piedad,ozella,mirtha,marilu,kimiko,juliane,jenice,janay,jacquiline,hilde,fae,elois,echo,devorah,chau,brinda,betsey,arminda,aracelis,apryl,annett,alishia,veola,usha,toshiko,theola,tashia,talitha,shery,renetta,reiko,rasheeda,obdulia,mika,melaine,meggan,marlen,marget,marceline,mana,magdalen,librada,lezlie,latashia,lasandra,kelle,isidra,isa,inocencia,gwyn,francoise,erminia,erinn,dimple,devora,criselda,armanda,arie,ariane,angelena,aliza,adriene,adaline,xochitl,twanna,tomiko,tamisha,taisha,susy,siu,rutha,rhona,noriko,natashia,merrie,marinda,mariko,margert,loris,lizzette,leisha,kaila,joannie,jerrica,jene,jannet,janee,jacinda,herta,elenore,doretta,delaine,daniell,claudie,britta,apolonia,amberly,alease,yuri,yuk,wen,waneta,ute,tomi,sharri,sandie,roselle,reynalda,raguel,phylicia,patria,olimpia,odelia,mitzie,minda,mignon,mica,mendy,marivel,maile,lynetta,lavette,lauryn,latrisha,lakiesha,kiersten,kary,josphine,jolyn,jetta,janise,jacquie,ivelisse,glynis,gianna,gaynelle,danyell,danille,dacia,coralee,cher,ceola,arianne,aleshia,yung,williemae,trinh,thora,tai,svetlana,sherika,shemeka,shaunda,roseline,ricki,melda,mallie,lavonna,latina,laquanda,lala,lachelle,klara,kandis,johna,jeanmarie,jaye,grayce,gertude,emerita,ebonie,clorinda,ching,chery,carola,breann,blossom,bernardine,becki,arletha,argelia,ara,alita,yulanda,yon,yessenia,tobi,tasia,sylvie,shirl,shirely,shella,shantelle,sacha,rebecka,providencia,paulene,misha,miki,marline,marica,lorita,latoyia,lasonya,kerstin,kenda,keitha,kathrin,jaymie,gricelda,ginette,eryn,elina,elfrieda,danyel,cheree,chanelle,barrie,aurore,annamaria,alleen,ailene,aide,yasmine,vashti,treasa,tiffaney,sheryll,sharie,shanae,sau,raisa,neda,mitsuko,mirella,milda,maryanna,maragret,mabelle,luetta,lorina,letisha,latarsha,lanelle,lajuana,krissy,karly,karena,jessika,jerica,jeanelle,jalisa,jacelyn,izola,euna,etha,domitila,dominica,daina,creola,carli,camie,brittny,ashanti,anisha,aleen,adah,yasuko,valrie,tona,tinisha,thi,terisa,taneka,simonne,shalanda,serita,ressie,refugia,olene,margherita,mandie,maire,lyndia,luci,lorriane,loreta,leonia,lavona,lashawnda,lakia,kyoko,krystina,krysten,kenia,kelsi,jeanice,isobel,georgiann,genny,felicidad,eilene,deloise,conception,clora,cherilyn,calandra,armandina,anisa,ula,tiera,theressa,stephania,sima,shyla,shonta,shera,shaquita,shala,rossana,nohemi,nery,moriah,melita,melida,melani,marylynn,marisha,mariette,malorie,madelene,ludivina,loria,lorette,loralee,lianne,lavenia,laurinda,lashon,kit,kimi,keila,katelynn,kai,jone,joane,jayna,janella,hue,hertha,francene,elinore,despina,delsie,deedra,clemencia,carolin,bulah,brittanie,bok,blondell,bibi,beaulah,beata,annita,agripina,virgen,valene,twanda,tommye,toi,tarra,tari,tammera,shakia,sadye,ruthanne,rochel,rivka,pura,nenita,natisha,merrilee,melodee,marvis,lucilla,leena,laveta,larita,lanie,keren,ileen,georgeann,genna,frida,ewa,eufemia,emely,ela,edyth,deonna,deadra,darlena,chanell,cathern,cassondra,cassaundra,bernarda,berna,arlinda,anamaria,vertie,valeri,torri,tatyana,stasia,sherise,sherill,sanda,ruthe,rosy,robbi,ranee,quyen,pearly,palmira,onita,nisha,niesha,nida,nam,merlyn,mayola,marylouise,marth,margene,madelaine,londa,leontine,leoma,leia,lauralee,lanora,lakita,kiyoko,keturah,katelin,kareen,jonie,johnette,jenee,jeanett,izetta,hiedi,heike,hassie,giuseppina,georgann,fidela,fernande,elwanda,ellamae,eliz,dusti,dotty,cyndy,coralie,celesta,argentina,alverta,xenia,wava,vanetta,torrie,tashina,tandy,tambra,tama,stepanie,shila,shaunta,sharan,shaniqua,shae,setsuko,serafina,sandee,rosamaria,priscila,olinda,nadene,muoi,michelina,mercedez,maryrose,marcene,mao,magali,mafalda,lannie,kayce,karoline,kamilah,kamala,justa,joline,jennine,jacquetta,iraida,georgeanna,franchesca,emeline,elane,ehtel,earlie,dulcie,dalene,classie,chere,charis,caroyln,carmina,carita,bethanie,ayako,arica,alysa,alessandra,akilah,adrien,zetta,youlanda,yelena,yahaira,wendolyn,tijuana,terina,teresia,suzi,sherell,shavonda,shaunte,sharda,shakita,sena,ryann,rubi,riva,reginia,rachal,parthenia,pamula,monnie,monet,michaele,melia,malka,maisha,lisandra,lekisha,lean,lakendra,krystin,kortney,kizzie,kittie,kera,kendal,kemberly,kanisha,julene,jule,johanne,jamee,halley,gidget,galina,fredricka,fleta,fatimah,eusebia,elza,eleonore,dorthey,doria,donella,dinorah,delorse,claretha,christinia,charlyn,bong,belkis,azzie,andera,aiko,adena,yer,yajaira,wan,vania,ulrike,toshia,tifany,stefany,shizue,shenika,shawanna,sharolyn,sharilyn,shaquana,shantay,rozanne,roselee,remona,reanna,raelene,phung,petronila,natacha,nancey,myrl,miyoko,miesha,merideth,marvella,marquitta,marhta,marchelle,lizeth,libbie,lahoma,ladawn,kina,katheleen,katharyn,karisa,kaleigh,junie,julieann,johnsie,janean,jaimee,jackqueline,hisako,herma,helaine,gwyneth,gita,eustolia,emelina,elin,edris,donnette,donnetta,dierdre,denae,darcel,clarisa,cinderella,chia,charlesetta,charita,celsa,cassy,cassi,carlee,bruna,brittaney,brande,billi,bao,antonetta,angla,angelyn,analisa,alane,wenona,wendie,veronique,vannesa,tobie,tempie,sumiko,sulema,sparkle,somer,sheba,sharice,shanel,shalon,rosio,roselia,renay,rema,reena,ozie,oretha,oralee,oda,ngan,nakesha,milly,marybelle,margrett,maragaret,manie,lurlene,lillia,lieselotte,lavelle,lashaunda,lakeesha,kaycee,kalyn,joya,joette,jenae,janiece,illa,grisel,glayds,genevie,gala,fredda,eleonor,debera,deandrea,corrinne,cordia,contessa,colene,cleotilde,chantay,cecille,beatris,azalee,arlean,ardath,anjelica,anja,alfredia,aleisha,zada,yuonne,willodean,vennie,vanna,tyisha,tova,torie,tonisha,tilda,tien,sirena,sherril,shanti,senaida,samella,robbyn,renda,reita,phebe,paulita,nobuko,nguyet,neomi,mikaela,melania,maximina,marg,maisie,lynna,lilli,lashaun,lakenya,lael,kirstie,kathline,kasha,karlyn,karima,jovan,josefine,jennell,jacqui,jackelyn,hyo,hien,grazyna,florrie,floria,eleonora,dwana,dorla,delmy,deja,dede,dann,crysta,clelia,claris,chieko,cherlyn,cherelle,charmain,chara,cammy,bee,arnette,ardelle,annika,amiee,amee,allena,yvone,yuki,yoshie,yevette,yael,willetta,voncile,venetta,tula,tonette,timika,temika,telma,teisha,taren,stacee,shawnta,saturnina,ricarda,pok,pasty,onie,nubia,marielle,mariella,marianela,mardell,luanna,loise,lisabeth,lindsy,lilliana,lilliam,lelah,leigha,leanora,kristeen,khalilah,keeley,kandra,junko,joaquina,jerlene,jani,jamika,hsiu,hermila,genevive,evia,eugena,emmaline,elfreda,elene,donette,delcie,deeanna,darcey,cuc,clarinda,cira,chae,celinda,catheryn,casimira,carmelia,camellia,breana,bobette,bernardina,bebe,basilia,arlyne,amal,alayna,zonia,zenia,yuriko,yaeko,wynell,willena,vernia,tora,terrilyn,terica,tenesha,tawna,tajuana,taina,stephnie,sona,sina,shondra,shizuko,sherlene,sherice,sharika,rossie,rosena,rima,ria,rheba,renna,natalya,nancee,melodi,meda,matha,marketta,maricruz,marcelene,malvina,luba,louetta,leida,lecia,lauran,lashawna,laine,khadijah,katerine,kasi,kallie,julietta,jesusita,jestine,jessia,jeffie,janyce,isadora,georgianne,fidelia,evita,eura,eulah,estefana,elsy,eladia,dodie,dia,denisse,deloras,delila,daysi,crystle,concha,claretta,charlsie,charlena,carylon,bettyann,asley,ashlea,amira,agueda,agnus,yuette,vinita,victorina,tynisha,treena,toccara,tish,thomasena,tegan,soila,shenna,sharmaine,shantae,shandi,september,saran,sarai,sana,rosette,rolande,regine,otelia,olevia,nicholle,necole,naida,myrta,myesha,mitsue,minta,mertie,margy,mahalia,madalene,loura,lorean,lesha,leonida,lenita,lavone,lashell,lashandra,lamonica,kimbra,katherina,karry,kanesha,jong,jeneva,jaquelyn,hwa,gilma,ghislaine,gertrudis,fransisca,fermina,ettie,etsuko,ellan,elidia,edra,dorethea,doreatha,denyse,deetta,daine,cyrstal,corrin,cayla,carlita,camila,burma,bula,buena,barabara,avril,alaine,zana,wilhemina,wanetta,veronika,verline,vasiliki,tonita,tisa,teofila,tayna,taunya,tandra,takako,sunni,suanne,sixta,sharell,seema,rosenda,robena,raymonde,pei,pamila,ozell,neida,mistie,micha,merissa,maurita,maryln,maryetta,marcell,malena,makeda,lovetta,lourie,lorrine,lorilee,laurena,lashay,larraine,laree,lacresha,kristle,krishna,keva,keira,karole,joie,jinny,jeannetta,jama,heidy,gilberte,gema,faviola,evelynn,enda,elli,ellena,divina,dagny,collene,codi,cindie,chassidy,chasidy,catrice,catherina,cassey,caroll,carlena,candra,calista,bryanna,britteny,beula,bari,audrie,audria,ardelia,annelle,angila,alona,allyn".split(","))),aM("surnames",aK("smith,johnson,williams,jones,brown,davis,miller,wilson,moore,taylor,anderson,jackson,white,harris,martin,thompson,garcia,martinez,robinson,clark,rodriguez,lewis,lee,walker,hall,allen,young,hernandez,king,wright,lopez,hill,green,adams,baker,gonzalez,nelson,carter,mitchell,perez,roberts,turner,phillips,campbell,parker,evans,edwards,collins,stewart,sanchez,morris,rogers,reed,cook,morgan,bell,murphy,bailey,rivera,cooper,richardson,cox,howard,ward,torres,peterson,gray,ramirez,watson,brooks,sanders,price,bennett,wood,barnes,ross,henderson,coleman,jenkins,perry,powell,long,patterson,hughes,flores,washington,butler,simmons,foster,gonzales,bryant,alexander,griffin,diaz,hayes,myers,ford,hamilton,graham,sullivan,wallace,woods,cole,west,owens,reynolds,fisher,ellis,harrison,gibson,mcdonald,cruz,marshall,ortiz,gomez,murray,freeman,wells,webb,simpson,stevens,tucker,porter,hicks,crawford,boyd,mason,morales,kennedy,warren,dixon,ramos,reyes,burns,gordon,shaw,holmes,rice,robertson,hunt,daniels,palmer,mills,nichols,grant,ferguson,stone,hawkins,dunn,perkins,hudson,spencer,gardner,stephens,payne,pierce,berry,matthews,arnold,wagner,willis,watkins,olson,carroll,duncan,snyder,hart,cunningham,lane,andrews,ruiz,harper,fox,riley,armstrong,carpenter,weaver,greene,elliott,chavez,sims,peters,kelley,franklin,lawson,fields,gutierrez,schmidt,carr,vasquez,castillo,wheeler,chapman,oliver,montgomery,richards,williamson,johnston,banks,meyer,bishop,mccoy,howell,alvarez,morrison,hansen,fernandez,garza,burton,nguyen,jacobs,reid,fuller,lynch,garrett,romero,welch,larson,frazier,burke,hanson,mendoza,moreno,bowman,medina,fowler,brewer,hoffman,carlson,silva,pearson,holland,fleming,jensen,vargas,byrd,davidson,hopkins,may,herrera,wade,soto,walters,neal,caldwell,lowe,jennings,barnett,graves,jimenez,horton,shelton,barrett,obrien,castro,sutton,mckinney,lucas,miles,rodriquez,chambers,holt,lambert,fletcher,watts,bates,hale,rhodes,pena,beck,newman,haynes,mcdaniel,mendez,bush,vaughn,parks,dawson,santiago,norris,hardy,steele,curry,powers,schultz,barker,guzman,page,munoz,ball,keller,chandler,weber,walsh,lyons,ramsey,wolfe,schneider,mullins,benson,sharp,bowen,barber,cummings,hines,baldwin,griffith,valdez,hubbard,salazar,reeves,warner,stevenson,burgess,santos,tate,cross,garner,mann,mack,moss,thornton,mcgee,farmer,delgado,aguilar,vega,glover,manning,cohen,harmon,rodgers,robbins,newton,blair,higgins,ingram,reese,cannon,strickland,townsend,potter,goodwin,walton,rowe,hampton,ortega,patton,swanson,goodman,maldonado,yates,becker,erickson,hodges,rios,conner,adkins,webster,malone,hammond,flowers,cobb,moody,quinn,pope,osborne,mccarthy,guerrero,estrada,sandoval,gibbs,gross,fitzgerald,stokes,doyle,saunders,wise,colon,gill,alvarado,greer,padilla,waters,nunez,ballard,schwartz,mcbride,houston,christensen,klein,pratt,briggs,parsons,mclaughlin,zimmerman,french,buchanan,moran,copeland,pittman,brady,mccormick,holloway,brock,poole,logan,bass,marsh,drake,wong,jefferson,park,morton,abbott,sparks,norton,huff,massey,figueroa,carson,bowers,roberson,barton,tran,lamb,harrington,boone,cortez,clarke,mathis,singleton,wilkins,cain,underwood,hogan,mckenzie,collier,luna,phelps,mcguire,bridges,wilkerson,nash,summers,atkins,wilcox,pitts,conley,marquez,burnett,cochran,chase,davenport,hood,gates,ayala,sawyer,vazquez,dickerson,hodge,acosta,flynn,espinoza,nicholson,monroe,morrow,whitaker,oconnor,skinner,ware,molina,kirby,huffman,gilmore,dominguez,oneal,lang,combs,kramer,hancock,gallagher,gaines,shaffer,short,wiggins,mathews,mcclain,fischer,wall,small,melton,hensley,bond,dyer,grimes,contreras,wyatt,baxter,snow,mosley,shepherd,larsen,hoover,beasley,petersen,whitehead,meyers,garrison,shields,horn,savage,olsen,schroeder,hartman,woodard,mueller,kemp,deleon,booth,patel,calhoun,wiley,eaton,cline,navarro,harrell,humphrey,parrish,duran,hutchinson,hess,dorsey,bullock,robles,beard,dalton,avila,rich,blackwell,york,johns,blankenship,trevino,salinas,campos,pruitt,callahan,montoya,hardin,guerra,mcdowell,stafford,gallegos,henson,wilkinson,booker,merritt,atkinson,orr,decker,hobbs,tanner,knox,pacheco,stephenson,glass,rojas,serrano,marks,hickman,english,sweeney,strong,mcclure,conway,roth,maynard,farrell,lowery,hurst,nixon,weiss,trujillo,ellison,sloan,juarez,winters,mclean,boyer,villarreal,mccall,gentry,carrillo,ayers,lara,sexton,pace,hull,leblanc,browning,velasquez,leach,chang,sellers,herring,noble,foley,bartlett,mercado,landry,durham,walls,barr,mckee,bauer,rivers,bradshaw,pugh,velez,rush,estes,dodson,morse,sheppard,weeks,camacho,bean,barron,livingston,middleton,spears,branch,blevins,chen,kerr,mcconnell,hatfield,harding,solis,frost,giles,blackburn,pennington,woodward,finley,mcintosh,koch,mccullough,blanchard,rivas,brennan,mejia,kane,benton,buckley,valentine,maddox,russo,mcknight,buck,moon,mcmillan,crosby,berg,dotson,mays,roach,church,chan,richmond,meadows,faulkner,oneill,knapp,kline,ochoa,jacobson,gay,hendricks,horne,shepard,hebert,cardenas,mcintyre,waller,holman,donaldson,cantu,morin,gillespie,fuentes,tillman,bentley,peck,key,salas,rollins,gamble,dickson,battle,santana,cabrera,cervantes,howe,hinton,hurley,spence,zamora,yang,mcneil,suarez,petty,gould,mcfarland,sampson,carver,bray,macdonald,stout,hester,melendez,dillon,farley,hopper,galloway,potts,joyner,stein,aguirre,osborn,mercer,bender,franco,rowland,sykes,pickett,sears,mayo,dunlap,hayden,wilder,mckay,coffey,mccarty,ewing,cooley,vaughan,bonner,cotton,holder,stark,ferrell,cantrell,fulton,lott,calderon,pollard,hooper,burch,mullen,fry,riddle,levy,odonnell,britt,daugherty,berger,dillard,alston,frye,riggs,chaney,odom,duffy,fitzpatrick,valenzuela,mayer,alford,mcpherson,acevedo,barrera,cote,reilly,compton,mooney,mcgowan,craft,clemons,wynn,nielsen,baird,stanton,snider,rosales,bright,witt,hays,holden,rutledge,kinney,clements,castaneda,slater,hahn,burks,delaney,pate,lancaster,sharpe,whitfield,talley,macias,burris,ratliff,mccray,madden,kaufman,goff,cash,bolton,mcfadden,levine,byers,kirkland,kidd,workman,carney,mcleod,holcomb,england,finch,sosa,haney,franks,sargent,nieves,downs,rasmussen,bird,hewitt,foreman,valencia,oneil,delacruz,vinson,dejesus,hyde,forbes,gilliam,guthrie,wooten,huber,barlow,boyle,mcmahon,buckner,rocha,puckett,langley,knowles,cooke,velazquez,whitley,vang,shea,rouse,hartley,mayfield,elder,rankin,hanna,cowan,lucero,arroyo,slaughter,haas,oconnell,minor,boucher,archer,boggs,dougherty,andersen,newell,crowe,wang,friedman,bland,swain,holley,pearce,childs,yarbrough,galvan,proctor,meeks,lozano,mora,rangel,bacon,villanueva,schaefer,rosado,helms,boyce,goss,stinson,lake,ibarra,hutchins,covington,crowley,hatcher,mackey,bunch,womack,polk,dodd,childress,childers,camp,villa,dye,springer,mahoney,dailey,belcher,lockhart,griggs,costa,brandt,walden,moser,tatum,mccann,akers,lutz,pryor,orozco,mcallister,lugo,davies,shoemaker,rutherford,newsome,magee,chamberlain,blanton,simms,godfrey,flanagan,crum,cordova,escobar,downing,sinclair,donahue,krueger,mcginnis,gore,farris,webber,corbett,andrade,starr,lyon,yoder,hastings,mcgrath,spivey,krause,harden,crabtree,kirkpatrick,arrington,ritter,mcghee,bolden,maloney,gagnon,dunbar,ponce,pike,mayes,beatty,mobley,kimball,butts,montes,eldridge,braun,hamm,gibbons,moyer,manley,herron,plummer,elmore,cramer,rucker,pierson,fontenot,field,rubio,goldstein,elkins,wills,novak,hickey,worley,gorman,katz,dickinson,broussard,woodruff,crow,britton,nance,lehman,bingham,zuniga,whaley,shafer,coffman,steward,delarosa,nix,neely,mata,davila,mccabe,kessler,hinkle,welsh,pagan,goldberg,goins,crouch,cuevas,quinones,mcdermott,hendrickson,samuels,denton,bergeron,lam,ivey,locke,haines,snell,hoskins,byrne,arias,roe,corbin,beltran,chappell,downey,dooley,tuttle,couch,payton,mcelroy,crockett,groves,cartwright,dickey,mcgill,dubois,muniz,tolbert,dempsey,cisneros,sewell,latham,vigil,tapia,rainey,norwood,stroud,meade,tipton,kuhn,hilliard,bonilla,teague,gunn,greenwood,correa,reece,poe,pineda,phipps,frey,kaiser,ames,gunter,schmitt,milligan,espinosa,bowden,vickers,lowry,pritchard,costello,piper,mcclellan,lovell,sheehan,hatch,dobson,singh,jeffries,hollingsworth,sorensen,meza,fink,donnelly,burrell,tomlinson,colbert,billings,ritchie,helton,sutherland,peoples,mcqueen,thomason,givens,crocker,vogel,robison,dunham,coker,swartz,keys,ladner,richter,hargrove,edmonds,brantley,albright,murdock,boswell,muller,quintero,padgett,kenney,daly,connolly,inman,quintana,lund,barnard,villegas,simons,land,huggins,tidwell,sanderson,bullard,mcclendon,duarte,draper,marrero,dwyer,abrams,stover,goode,fraser,crews,bernal,godwin,conklin,mcneal,baca,esparza,crowder,bower,brewster,mcneill,rodrigues,leal,coates,raines,mccain,mccord,miner,holbrook,swift,dukes,carlisle,aldridge,ackerman,starks,ricks,holliday,ferris,hairston,sheffield,lange,fountain,doss,betts,kaplan,carmichael,bloom,ruffin,penn,kern,bowles,sizemore,larkin,dupree,seals,metcalf,hutchison,henley,farr,mccauley,hankins,gustafson,curran,ash,waddell,ramey,cates,pollock,cummins,messer,heller,lin,funk,cornett,palacios,galindo,cano,hathaway,singer,pham,enriquez,salgado,pelletier,painter,wiseman,blount,feliciano,temple,houser,doherty,mead,mcgraw,swan,capps,blanco,blackmon,thomson,mcmanus,burkett,post,gleason,ott,dickens,cormier,voss,rushing,rosenberg,hurd,dumas,benitez,arellano,marin,caudill,bragg,jaramillo,huerta,gipson,colvin,biggs,vela,platt,cassidy,tompkins,mccollum,dolan,daley,crump,sneed,kilgore,grove,grimm,davison,brunson,prater,marcum,devine,stratton,rosas,choi,tripp,ledbetter,hightower,feldman,epps,yeager,posey,scruggs,cope,stubbs,richey,overton,trotter,sprague,cordero,butcher,stiles,burgos,woodson,horner,bassett,purcell,haskins,akins,ziegler,spaulding,hadley,grubbs,sumner,murillo,zavala,shook,lockwood,driscoll,dahl,thorpe,redmond,putnam,mcwilliams,mcrae,romano,joiner,sadler,hedrick,hager,hagen,fitch,coulter,thacker,mansfield,langston,guidry,ferreira,corley,conn,rossi,lackey,baez,saenz,mcnamara,mcmullen,mckenna,mcdonough,link,engel,browne,roper,peacock,eubanks,drummond,stringer,pritchett,parham,mims,landers,ham,grayson,schafer,egan,timmons,ohara,keen,hamlin,finn,cortes,mcnair,nadeau,moseley,michaud,rosen,oakes,kurtz,jeffers,calloway,beal,bautista,winn,suggs,stern,stapleton,lyles,laird,montano,dawkins,hagan,goldman,bryson,barajas,lovett,segura,metz,lockett,langford,hinson,eastman,hooks,smallwood,shapiro,crowell,whalen,triplett,chatman,aldrich,cahill,youngblood,ybarra,stallings,sheets,reeder,connelly,bateman,abernathy,winkler,wilkes,masters,hackett,granger,gillis,schmitz,sapp,napier,souza,lanier,gomes,weir,otero,ledford,burroughs,babcock,ventura,siegel,dugan,bledsoe,atwood,wray,varner,spangler,anaya,staley,kraft,fournier,belanger,wolff,thorne,bynum,burnette,boykin,swenson,purvis,pina,khan,duvall,darby,xiong,kauffman,healy,engle,benoit,valle,steiner,spicer,shaver,randle,lundy,dow,chin,calvert,staton,neff,kearney,darden,oakley,medeiros,mccracken,crenshaw,block,perdue,dill,whittaker,tobin,washburn,hogue,goodrich,easley,bravo,dennison,shipley,kerns,jorgensen,crain,villalobos,maurer,longoria,keene,coon,witherspoon,staples,pettit,kincaid,eason,madrid,echols,lusk,stahl,currie,thayer,shultz,mcnally,seay,north,maher,gagne,barrow,nava,moreland,honeycutt,hearn,diggs,caron,whitten,westbrook,stovall,ragland,munson,meier,looney,kimble,jolly,hobson,goddard,culver,burr,presley,negron,connell,tovar,huddleston,ashby,salter,root,pendleton,oleary,nickerson,myrick,judd,jacobsen,bain,adair,starnes,matos,busby,herndon,hanley,bellamy,doty,bartley,yazzie,rowell,parson,gifford,cullen,christiansen,benavides,barnhart,talbot,mock,crandall,connors,bonds,whitt,gage,bergman,arredondo,addison,lujan,dowdy,jernigan,huynh,bouchard,dutton,rhoades,ouellette,kiser,herrington,hare,blackman,babb,allred,rudd,paulson,ogden,koenig,geiger,begay,parra,lassiter,hawk,esposito,cho,waldron,ransom,prather,chacon,vick,sands,roark,parr,mayberry,greenberg,coley,bruner,whitman,skaggs,shipman,leary,hutton,romo,medrano,ladd,kruse,askew,schulz,alfaro,tabor,mohr,gallo,bermudez,pereira,bliss,reaves,flint,comer,woodall,naquin,guevara,delong,carrier,pickens,brand,tilley,schaffer,lim,knutson,fenton,doran,chu,vogt,vann,prescott,mclain,landis,corcoran,zapata,hyatt,hemphill,faulk,dove,boudreaux,aragon,whitlock,trejo,tackett,shearer,saldana,hanks,mckinnon,koehler,bourgeois,keyes,goodson,foote,lunsford,goldsmith,flood,winslow,sams,reagan,mccloud,hough,esquivel,naylor,loomis,coronado,ludwig,braswell,bearden,fagan,ezell,edmondson,cyr,cronin,nunn,lemon,guillory,grier,dubose,traylor,ryder,dobbins,coyle,aponte,whitmore,smalls,rowan,malloy,cardona,braxton,borden,humphries,carrasco,ruff,metzger,huntley,hinojosa,finney,madsen,hills,ernst,dozier,burkhart,bowser,peralta,daigle,whittington,sorenson,saucedo,roche,redding,fugate,avalos,waite,lind,huston,hay,hawthorne,hamby,boyles,boles,regan,faust,crook,beam,barger,hinds,gallardo,willoughby,willingham,eckert,busch,zepeda,worthington,tinsley,hoff,hawley,carmona,varela,rector,newcomb,kinsey,dube,whatley,ragsdale,bernstein,becerra,yost,mattson,felder,cheek,handy,grossman,gauthier,escobedo,braden,beckman,mott,hillman,flaherty,dykes,doe,stockton,stearns,lofton,coats,cavazos,beavers,barrios,parish,mosher,cardwell,coles,burnham,weller,lemons,beebe,aguilera,parnell,harman,couture,alley,schumacher,redd,dobbs,blum,blalock,merchant,ennis,denson,cottrell,brannon,bagley,aviles,watt,sousa,rosenthal,rooney,dietz,blank,paquette,mcclelland,duff,velasco,lentz,grubb,burrows,barbour,ulrich,shockley,rader,beyer,mixon,layton,altman,weathers,stoner,squires,shipp,priest,lipscomb,cutler,caballero,zimmer,willett,thurston,storey,medley,epperson,shah,mcmillian,baggett,torrez,laws,hirsch,dent,poirier,peachey,farrar,creech,barth,trimble,dupre,albrecht,sample,lawler,crisp,conroy,wetzel,nesbitt,murry,jameson,wilhelm,patten,minton,matson,kimbrough,iverson,guinn,croft,toth,pulliam,nugent,newby,littlejohn,dias,canales,bernier,baron,singletary,renteria,pruett,mchugh,mabry,landrum,brower,stoddard,cagle,stjohn,scales,kohler,kellogg,hopson,gant,tharp,gann,zeigler,pringle,hammons,fairchild,deaton,chavis,carnes,rowley,matlock,kearns,irizarry,carrington,starkey,lopes,jarrell,craven,baum,spain,littlefield,linn,humphreys,etheridge,cuellar,chastain,bundy,speer,skelton,quiroz,pyle,portillo,ponder,moulton,machado,liu,killian,hutson,hitchcock,dowling,cloud,burdick,spann,pedersen,levin,leggett,hayward,hacker,dietrich,beaulieu,barksdale,wakefield,snowden,briscoe,bowie,berman,ogle,mcgregor,laughlin,helm,burden,wheatley,schreiber,pressley,parris,alaniz,agee,urban,swann,snodgrass,schuster,radford,monk,mattingly,harp,girard,cheney,yancey,wagoner,ridley,lombardo,lau,hudgins,gaskins,duckworth,coe,coburn,willey,prado,newberry,magana,hammonds,elam,whipple,slade,serna,ojeda,liles,dorman,diehl,upton,reardon,michaels,goetz,eller,bauman,baer,layne,hummel,brenner,amaya,adamson,ornelas,dowell,cloutier,castellanos,wing,wellman,saylor,orourke,moya,montalvo,kilpatrick,durbin,shell,oldham,garvin,foss,branham,bartholomew,templeton,maguire,holton,rider,monahan,mccormack,beaty,anders,streeter,nieto,nielson,moffett,lankford,keating,heck,gatlin,delatorre,callaway,adcock,worrell,unger,robinette,nowak,jeter,brunner,steen,parrott,overstreet,nobles,montanez,clevenger,brinkley,trahan,quarles,pickering,pederson,jansen,grantham,gilchrist,crespo,aiken,schell,schaeffer,lorenz,leyva,harms,dyson,wallis,pease,leavitt,cavanaugh,batts,warden,seaman,rockwell,quezada,paxton,linder,houck,fontaine,durant,caruso,adler,pimentel,mize,lytle,cleary,cason,acker,switzer,isaacs,higginbotham,han,waterman,vandyke,stamper,sisk,shuler,riddick,mcmahan,levesque,hatton,bronson,bollinger,arnett,okeefe,gerber,gannon,farnsworth,baughman,silverman,satterfield,mccrary,kowalski,grigsby,greco,cabral,trout,rinehart,mahon,linton,gooden,curley,baugh,wyman,weiner,schwab,schuler,morrissey,mahan,bunn,thrasher,spear,waggoner,qualls,purdy,mcwhorter,mauldin,gilman,perryman,newsom,menard,martino,graf,billingsley,artis,simpkins,salisbury,quintanilla,gilliland,fraley,foust,crouse,scarborough,ngo,grissom,fultz,marlow,markham,madrigal,lawton,barfield,whiting,varney,schwarz,gooch,arce,wheat,truong,poulin,hurtado,selby,gaither,fortner,culpepper,coughlin,brinson,boudreau,barkley,bales,stepp,holm,tan,schilling,morrell,kahn,heaton,gamez,causey,turpin,shanks,schrader,meek,isom,hardison,carranza,yanez,scroggins,schofield,runyon,ratcliff,murrell,moeller,irby,currier,butterfield,yee,ralston,pullen,pinson,estep,carbone,hawks,ellington,casillas,spurlock,sikes,motley,mccartney,kruger,isbell,houle,burk,tomlin,quigley,neumann,lovelace,fennell,cheatham,bustamante,skidmore,hidalgo,forman,culp,bowens,betancourt,aquino,robb,rea,milner,martel,gresham,wiles,ricketts,dowd,collazo,bostic,blakely,sherrod,kenyon,gandy,ebert,deloach,allard,sauer,robins,olivares,gillette,chestnut,bourque,paine,hite,hauser,devore,crawley,chapa,talbert,poindexter,meador,mcduffie,mattox,kraus,harkins,choate,wren,sledge,sanborn,kinder,geary,cornwell,barclay,abney,seward,rhoads,howland,fortier,benner,vines,tubbs,troutman,rapp,mccurdy,deluca,westmoreland,havens,guajardo,ely,clary,seal,meehan,herzog,guillen,ashcraft,waugh,renner,milam,elrod,churchill,breaux,bolin,asher,windham,tirado,pemberton,nolen,noland,knott,emmons,cornish,christenson,brownlee,barbee,waldrop,pitt,olvera,lombardi,gruber,gaffney,eggleston,banda,archuleta,slone,prewitt,pfeiffer,nettles,mena,mcadams,henning,gardiner,cromwell,chisholm,burleson,vest,oglesby,mccarter,lumpkin,grey,wofford,vanhorn,thorn,teel,swafford,stclair,stanfield,ocampo,herrmann,hannon,arsenault,roush,mcalister,hiatt,gunderson,forsythe,duggan,delvalle,cintron,wilks,weinstein,uribe,rizzo,noyes,mclendon,gurley,bethea,winstead,maples,guyton,giordano,alderman,valdes,polanco,pappas,lively,grogan,griffiths,arevalo,whitson,sowell,rendon,fernandes,farrow,benavidez,ayres,alicea,stump,smalley,seitz,schulte,gilley,gallant,canfield,wolford,omalley,mcnutt,mcnulty,mcgovern,hardman,harbin,cowart,chavarria,brink,beckett,bagwell,armstead,anglin,abreu,reynoso,krebs,jett,hoffmann,greenfield,forte,burney,broome,sisson,trammell,partridge,mace,lomax,lemieux,gossett,frantz,fogle,cooney,broughton,pence,paulsen,muncy,mcarthur,hollins,beauchamp,withers,osorio,mulligan,hoyle,foy,dockery,cockrell,begley,amador,roby,rains,lindquist,gentile,everhart,bohannon,wylie,sommers,purnell,fortin,dunning,breeden,vail,phelan,phan,marx,cosby,colburn,boling,biddle,ledesma,gaddis,denney,chow,bueno,berrios,wicker,tolliver,thibodeaux,nagle,lavoie,fisk,crist,barbosa,reedy,march,locklear,kolb,himes,behrens,beckwith,weems,wahl,shorter,shackelford,rees,muse,cerda,valadez,thibodeau,saavedra,ridgeway,reiter,mchenry,majors,lachance,keaton,ferrara,clemens,blocker,applegate,paz,needham,mojica,kuykendall,hamel,escamilla,doughty,burchett,ainsworth,vidal,upchurch,thigpen,strauss,spruill,sowers,riggins,ricker,mccombs,harlow,buffington,sotelo,olivas,negrete,morey,macon,logsdon,lapointe,bigelow,bello,westfall,stubblefield,peak,lindley,hein,hawes,farrington,breen,birch,wilde,steed,sepulveda,reinhardt,proffitt,minter,messina,mcnabb,maier,keeler,gamboa,donohue,basham,shinn,crooks,cota,borders,bills,bachman,tisdale,tavares,schmid,pickard,gulley,fonseca,delossantos,condon,batista,wicks,wadsworth,martell,littleton,ison,haag,folsom,brumfield,broyles,brito,mireles,mcdonnell,leclair,hamblin,gough,fanning,binder,winfield,whitworth,soriano,palumbo,newkirk,mangum,hutcherson,comstock,carlin,beall,bair,wendt,watters,walling,putman,otoole,morley,mares,lemus,keener,hundley,dial,damico,billups,strother,mcfarlane,lamm,eaves,crutcher,caraballo,canty,atwell,taft,siler,rust,rawls,rawlings,prieto,mcneely,mcafee,hulsey,hackney,galvez,escalante,delagarza,crider,charlton,bandy,wilbanks,stowe,steinberg,renfro,masterson,massie,lanham,haskell,hamrick,fort,dehart,burdette,branson,bourne,babin,aleman,worthy,tibbs,smoot,slack,paradis,mull,luce,houghton,gantt,furman,danner,christianson,burge,ashford,arndt,almeida,stallworth,shade,searcy,sager,noonan,mclemore,mcintire,maxey,lavigne,jobe,ferrer,falk,coffin,byrnes,aranda,apodaca,stamps,rounds,peek,olmstead,lewandowski,kaminski,dunaway,bruns,brackett,amato,reich,mcclung,lacroix,koontz,herrick,hardesty,flanders,cousins,cato,cade,vickery,shank,nagel,dupuis,croteau,cotter,cable,stuckey,stine,porterfield,pauley,nye,moffitt,knudsen,hardwick,goforth,dupont,blunt,barrows,barnhill,shull,rash,loftis,lemay,kitchens,horvath,grenier,fuchs,fairbanks,culbertson,calkins,burnside,beattie,ashworth,albertson,wertz,vaught,vallejo,turk,tuck,tijerina,sage,peterman,marroquin,marr,lantz,hoang,demarco,daily,cone,berube,barnette,wharton,stinnett,slocum,scanlon,sander,pinto,mancuso,lima,headley,epstein,counts,clarkson,carnahan,boren,arteaga,adame,zook,whittle,whitehurst,wenzel,saxton,reddick,puente,handley,haggerty,earley,devlin,chaffin,cady,acuna,solano,sigler,pollack,pendergrass,ostrander,janes,francois,crutchfield,chamberlin,brubaker,baptiste,willson,reis,neeley,mullin,mercier,lira,layman,keeling,higdon,espinal,chapin,warfield,toledo,pulido,peebles,nagy,montague,mello,lear,jaeger,hogg,graff,furr,soliz,poore,mendenhall,mclaurin,maestas,gable,barraza,tillery,snead,pond,neill,mcculloch,mccorkle,lightfoot,hutchings,holloman,harness,dorn,council,bock,zielinski,turley,treadwell,stpierre,starling,somers,oswald,merrick,easterling,bivens,truitt,poston,parry,ontiveros,olivarez,moreau,medlin,lenz,knowlton,fairley,cobbs,chisolm,bannister,woodworth,toler,ocasio,noriega,neuman,moye,milburn,mcclanahan,lilley,hanes,flannery,dellinger,danielson,conti,blodgett,beers,weatherford,strain,karr,hitt,denham,custer,coble,clough,casteel,bolduc,batchelor,ammons,whitlow,tierney,staten,sibley,seifert,schubert,salcedo,mattison,laney,haggard,grooms,dix,dees,cromer,cooks,colson,caswell,zarate,swisher,shin,ragan,pridgen,mcvey,matheny,lafleur,franz,ferraro,dugger,whiteside,rigsby,mcmurray,lehmann,jacoby,hildebrand,hendrick,headrick,goad,fincher,drury,borges,archibald,albers,woodcock,trapp,soares,seaton,monson,luckett,lindberg,kopp,keeton,hsu,healey,garvey,gaddy,fain,burchfield,wentworth,strand,stack,spooner,saucier,sales,ricci,plunkett,pannell,ness,leger,hoy,freitas,fong,elizondo,duval,beaudoin,urbina,rickard,partin,moe,mcgrew,mcclintock,ledoux,forsyth,faison,devries,bertrand,wasson,tilton,scarbrough,leung,irvine,garber,denning,corral,colley,castleberry,bowlin,bogan,beale,baines,trice,rayburn,parkinson,pak,nunes,mcmillen,leahy,kimmel,higgs,fulmer,carden,bedford,taggart,spearman,register,prichard,morrill,koonce,heinz,hedges,guenther,grice,findley,dover,creighton,boothe,bayer,arreola,vitale,valles,raney,osgood,hanlon,burley,bounds,worden,weatherly,vetter,tanaka,stiltner,nevarez,mosby,montero,melancon,harter,hamer,goble,gladden,gist,ginn,akin,zaragoza,towns,tarver,sammons,royster,oreilly,muir,morehead,luster,kingsley,kelso,grisham,glynn,baumann,alves,yount,tamayo,paterson,oates,menendez,longo,hargis,gillen,desantis,breedlove,sumpter,scherer,rupp,reichert,heredia,creel,cohn,clemmons,casas,bickford,belton,bach,williford,whitcomb,tennant,sutter,stull,sessions,mccallum,langlois,keel,keegan,dangelo,dancy,damron,clapp,clanton,bankston,oliveira,mintz,mcinnis,martens,mabe,laster,jolley,hildreth,hefner,glaser,duckett,demers,brockman,blais,alcorn,agnew,toliver,tice,seeley,najera,musser,mcfall,laplante,galvin,fajardo,doan,coyne,copley,clawson,cheung,barone,wynne,woodley,tremblay,stoll,sparrow,sparkman,schweitzer,sasser,samples,roney,legg,heim,farias,colwell,christman,bratcher,winchester,upshaw,southerland,sorrell,sells,mount,mccloskey,martindale,luttrell,loveless,lovejoy,linares,latimer,embry,coombs,bratton,bostick,venable,tuggle,toro,staggs,sandlin,jefferies,heckman,griffis,crayton,clem,browder,thorton,sturgill,sprouse,royer,rousseau,ridenour,pogue,perales,peeples,metzler,mesa,mccutcheon,mcbee,hornsby,heffner,corrigan,armijo,vue,plante,peyton,paredes,macklin,hussey,hodgson,granados,frias,becnel,batten,almanza,turney,teal,sturgeon,meeker,mcdaniels,limon,keeney,kee,hutto,holguin,gorham,fishman,fierro,blanchette,rodrigue,reddy,osburn,oden,lerma,kirkwood,keefer,haugen,hammett,chalmers,brinkman,baumgartner,valerio,tellez,steffen,shumate,sauls,ripley,kemper,jacks,guffey,evers,craddock,carvalho,blaylock,banuelos,balderas,wooden,wheaton,turnbull,shuman,pointer,mosier,mccue,ligon,kozlowski,johansen,ingle,herr,briones,snipes,rickman,pipkin,pantoja,orosco,moniz,lawless,kunkel,hibbard,galarza,enos,bussey,schott,salcido,perreault,mcdougal,mccool,haight,garris,ferry,easton,conyers,atherton,wimberly,utley,spellman,smithson,slagle,ritchey,rand,petit,osullivan,oaks,nutt,mcvay,mccreary,mayhew,knoll,jewett,harwood,cardoza,ashe,arriaga,zeller,wirth,whitmire,stauffer,rountree,redden,mccaffrey,martz,larose,langdon,humes,gaskin,faber,devito,cass,almond,wingfield,wingate,villareal,tyner,smothers,severson,reno,pennell,maupin,leighton,janssen,hassell,hallman,halcomb,folse,fitzsimmons,fahey,cranford,bolen,battles,battaglia,wooldridge,trask,rosser,regalado,mcewen,keefe,fuqua,echevarria,caro,boynton,andrus,viera,vanmeter,taber,spradlin,seibert,provost,prentice,oliphant,laporte,hwang,hatchett,hass,greiner,freedman,covert,chilton,byars,wiese,venegas,swank,shrader,roberge,mullis,mortensen,mccune,marlowe,kirchner,keck,isaacson,hostetler,halverson,gunther,griswold,fenner,durden,blackwood,ahrens,sawyers,savoy,nabors,mcswain,mackay,loy,lavender,lash,labbe,jessup,fullerton,cruse,crittenden,correia,centeno,caudle,canady,callender,alarcon,ahern,winfrey,tribble,styles,salley,roden,musgrove,minnick,fortenberry,carrion,bunting,batiste,whited,underhill,stillwell,rauch,pippin,perrin,messenger,mancini,lister,kinard,hartmann,fleck,broadway,wilt,treadway,thornhill,spalding,rafferty,pitre,patino,ordonez,linkous,kelleher,homan,galbraith,feeney,curtin,coward,camarillo,buss,bunnell,bolt,beeler,autry,alcala,witte,wentz,stidham,shively,nunley,meacham,martins,lemke,lefebvre,hynes,horowitz,hoppe,holcombe,dunne,derr,cochrane,brittain,bedard,beauregard,torrence,strunk,soria,simonson,shumaker,scoggins,oconner,moriarty,kuntz,ives,hutcheson,horan,hales,garmon,fitts,bohn,atchison,wisniewski,vanwinkle,sturm,sallee,prosser,moen,lundberg,kunz,kohl,keane,jorgenson,jaynes,funderburk,freed,durr,creamer,cosgrove,batson,vanhoose,thomsen,teeter,smyth,redmon,orellana,maness,heflin,goulet,frick,forney,bunker,asbury,aguiar,talbott,southard,mowery,mears,lemmon,krieger,hickson,elston,duong,delgadillo,dayton,dasilva,conaway,catron,bruton,bradbury,bordelon,bivins,bittner,bergstrom,beals,abell,whelan,tejada,pulley,pino,norfleet,nealy,maes,loper,gatewood,frierson,freund,finnegan,cupp,covey,catalano,boehm,bader,yoon,walston,tenney,sipes,rawlins,medlock,mccaskill,mccallister,marcotte,maclean,hughey,henke,harwell,gladney,gilson,dew,chism,caskey,brandenburg,baylor,villasenor,veal,thatcher,stegall,shore,petrie,nowlin,navarrete,muhammad,lombard,loftin,lemaster,kroll,kovach,kimbrell,kidwell,hershberger,fulcher,eng,cantwell,bustos,boland,bobbitt,binkley,wester,weis,verdin,tiller,sisco,sharkey,seymore,rosenbaum,rohr,quinonez,pinkston,nation,malley,logue,lessard,lerner,lebron,krauss,klinger,halstead,haller,getz,burrow,alger,shores,pfeifer,perron,nelms,munn,mcmaster,mckenney,manns,knudson,hutchens,huskey,goebel,flagg,cushman,click,castellano,carder,bumgarner,wampler,spinks,robson,neel,mcreynolds,mathias,maas,loera,kasper,jenson,florez,coons,buckingham,brogan,berryman,wilmoth,wilhite,thrash,shephard,seidel,schulze,roldan,pettis,obryan,maki,mackie,hatley,frazer,fiore,chesser,bui,bottoms,bisson,benefield,allman,wilke,trudeau,timm,shifflett,rau,mundy,milliken,mayers,leake,kohn,huntington,horsley,hermann,guerin,fryer,frizzell,foret,flemming,fife,criswell,carbajal,bozeman,boisvert,angulo,wallen,tapp,silvers,ramsay,oshea,orta,moll,mckeever,mcgehee,linville,kiefer,ketchum,howerton,groce,gass,fusco,corbitt,betz,bartels,amaral,aiello,yoo,weddle,sperry,seiler,runyan,raley,overby,osteen,olds,mckeown,matney,lauer,lattimore,hindman,hartwell,fredrickson,fredericks,espino,clegg,carswell,cambell,burkholder,woodbury,welker,totten,thornburg,theriault,stitt,stamm,stackhouse,scholl,saxon,rife,razo,quinlan,pinkerton,olivo,nesmith,nall,mattos,lafferty,justus,giron,geer,fielder,drayton,dortch,conners,conger,boatwright,billiot,barden,armenta,tibbetts,steadman,slattery,rinaldi,raynor,pinckney,pettigrew,milne,matteson,halsey,gonsalves,fellows,durand,desimone,cowley,cowles,brill,barham,barela,barba,ashmore,withrow,valenti,tejeda,spriggs,sayre,salerno,peltier,peel,merriman,matheson,lowman,lindstrom,hyland,giroux,earls,dugas,dabney,collado,briseno,baxley,whyte,wenger,vanover,vanburen,thiel,schindler,schiller,rigby,pomeroy,passmore,marble,manzo,mahaffey,lindgren,laflamme,greathouse,fite,calabrese,bayne,yamamoto,wick,townes,thames,reinhart,peeler,naranjo,montez,mcdade,mast,markley,marchand,leeper,kellum,hudgens,hennessey,hadden,gainey,coppola,borrego,bolling,beane,ault,slaton,poland,pape,null,mulkey,lightner,langer,hillard,glasgow,ethridge,enright,derosa,baskin,weinberg,turman,somerville,pardo,noll,lashley,ingraham,hiller,hendon,glaze,cothran,cooksey,conte,carrico,abner,wooley,swope,summerlin,sturgis,sturdivant,stott,spurgeon,spillman,speight,roussel,popp,nutter,mckeon,mazza,magnuson,lanning,kozak,jankowski,heyward,forster,corwin,callaghan,bays,wortham,usher,theriot,sayers,sabo,poling,loya,lieberman,laroche,labelle,howes,harr,garay,fogarty,everson,durkin,dominquez,chaves,chambliss,witcher,vieira,vandiver,terrill,stoker,schreiner,moorman,liddell,lew,lawhorn,krug,irons,hylton,hollenbeck,herrin,hembree,goolsby,goodin,gilmer,foltz,dinkins,daughtry,caban,brim,briley,bilodeau,wyant,vergara,tallent,swearingen,stroup,scribner,quillen,pitman,monaco,mccants,maxfield,martinson,holtz,flournoy,brookins,brody,baumgardner,straub,sills,roybal,roundtree,oswalt,mcgriff,mcdougall,mccleary,maggard,gragg,gooding,godinez,doolittle,donato,cowell,cassell,bracken,appel,zambrano,reuter,perea,nakamura,monaghan,mickens,mcclinton,mcclary,marler,kish,judkins,gilbreath,freese,flanigan,felts,erdmann,dodds,chew,brownell,boatright,barreto,slayton,sandberg,saldivar,pettway,odum,narvaez,moultrie,montemayor,merrell,lees,keyser,hoke,hardaway,hannan,gilbertson,fogg,dumont,deberry,coggins,buxton,bucher,broadnax,beeson,araujo,appleton,amundson,aguayo,ackley,yocum,worsham,shivers,sanches,sacco,robey,rhoden,pender,ochs,mccurry,madera,luong,knotts,jackman,heinrich,hargrave,gault,comeaux,chitwood,caraway,boettcher,bernhardt,barrientos,zink,wickham,whiteman,thorp,stillman,settles,schoonover,roque,riddell,pilcher,phifer,novotny,macleod,hardee,haase,grider,doucette,clausen,bevins,beamon,badillo,tolley,tindall,soule,snook,seale,pitcher,pinkney,pellegrino,nowell,nemeth,mondragon,mclane,lundgren,ingalls,hudspeth,hixson,gearhart,furlong,downes,dibble,deyoung,cornejo,camara,brookshire,boyette,wolcott,surratt,sellars,segal,salyer,reeve,rausch,labonte,haro,gower,freeland,fawcett,eads,driggers,donley,collett,bromley,boatman,ballinger,baldridge,volz,trombley,stonge,shanahan,rivard,rhyne,pedroza,matias,jamieson,hedgepeth,hartnett,estevez,eskridge,denman,chiu,chinn,catlett,carmack,buie,bechtel,beardsley,bard,ballou,ulmer,skeen,robledo,rincon,reitz,piazza,munger,moten,mcmichael,loftus,ledet,kersey,groff,fowlkes,folk,crumpton,clouse,bettis,villagomez,timmerman,strom,santoro,roddy,penrod,musselman,macpherson,leboeuf,harless,haddad,guido,golding,fulkerson,fannin,dulaney,dowdell,cottle,ceja,cate,bosley,benge,albritton,voigt,trowbridge,soileau,seely,rohde,pearsall,paulk,orth,nason,mota,mcmullin,marquardt,madigan,hoag,gillum,gabbard,fenwick,eck,danforth,cushing,cress,creed,cazares,casanova,bey,bettencourt,barringer,baber,stansberry,schramm,rutter,rivero,oquendo,necaise,mouton,montenegro,miley,mcgough,marra,macmillan,lamontagne,jasso,horst,hetrick,heilman,gaytan,gall,fortney,dingle,desjardins,dabbs,burbank,brigham,breland,beaman,arriola,yarborough,wallin,toscano,stowers,reiss,pichardo,orton,michels,mcnamee,mccrory,leatherman,kell,keister,horning,hargett,guay,ferro,deboer,dagostino,carper,blanks,beaudry,towle,tafoya,stricklin,strader,soper,sonnier,sigmon,schenk,saddler,pedigo,mendes,lunn,lohr,lahr,kingsbury,jarman,hume,holliman,hofmann,haworth,harrelson,hambrick,flick,edmunds,dacosta,crossman,colston,chaplin,carrell,budd,weiler,waits,valentino,trantham,tarr,solorio,roebuck,powe,plank,pettus,palm,pagano,mink,luker,leathers,joslin,hartzell,gambrell,deutsch,cepeda,carty,caputo,brewington,bedell,ballew,applewhite,warnock,walz,urena,tudor,reel,pigg,parton,mickelson,meagher,mclellan,mcculley,mandel,leech,lavallee,kraemer,kling,kipp,kehoe,hochstetler,harriman,gregoire,grabowski,gosselin,gammon,fancher,edens,desai,brannan,armendariz,woolsey,whitehouse,whetstone,ussery,towne,testa,tallman,studer,strait,steinmetz,sorrells,sauceda,rolfe,paddock,mitchem,mcginn,mccrea,lovato,hazen,gilpin,gaynor,fike,devoe,delrio,curiel,burkhardt,bode,backus,zinn,watanabe,wachter,vanpelt,turnage,shaner,schroder,sato,riordan,quimby,portis,natale,mckoy,mccown,kilmer,hotchkiss,hesse,halbert,gwinn,godsey,delisle,chrisman,canter,arbogast,angell,acree,yancy,woolley,wesson,weatherspoon,trainor,stockman,spiller,sipe,rooks,reavis,propst,porras,neilson,mullens,loucks,llewellyn,kumar,koester,klingensmith,kirsch,kester,honaker,hodson,hennessy,helmick,garrity,garibay,fee,drain,casarez,callis,botello,aycock,avant,wingard,wayman,tully,theisen,szymanski,stansbury,segovia,rainwater,preece,pirtle,padron,mincey,mckelvey,mathes,larrabee,kornegay,klug,ingersoll,hecht,germain,eggers,dykstra,deering,decoteau,deason,dearing,cofield,carrigan,bonham,bahr,aucoin,appleby,almonte,yager,womble,wimmer,weimer,vanderpool,stancil,sprinkle,romine,remington,pfaff,peckham,olivera,meraz,maze,lathrop,koehn,hazelton,halvorson,hallock,haddock,ducharme,dehaven,caruthers,brehm,bosworth,bost,bias,beeman,basile,bane,aikens,wold,walther,tabb,suber,strawn,stocker,shirey,schlosser,riedel,rembert,reimer,pyles,peele,merriweather,letourneau,latta,kidder,hixon,hillis,hight,herbst,henriquez,haygood,hamill,gabel,fritts,eubank,dawes,correll,cha,bushey,buchholz,brotherton,botts,barnwell,auger,atchley,westphal,veilleux,ulloa,stutzman,shriver,ryals,prior,pilkington,moyers,marrs,mangrum,maddux,lockard,laing,kuhl,harney,hammock,hamlett,felker,doerr,depriest,carrasquillo,carothers,bogle,bischoff,bergen,albanese,wyckoff,vermillion,vansickle,thibault,tetreault,stickney,shoemake,ruggiero,rawson,racine,philpot,paschal,mcelhaney,mathison,legrand,lapierre,kwan,kremer,jiles,hilbert,geyer,faircloth,ehlers,egbert,desrosiers,dalrymple,cotten,cashman,cadena,breeding,boardman,alcaraz,ahn,wyrick,therrien,tankersley,strickler,puryear,plourde,pattison,pardue,mcginty,mcevoy,landreth,kuhns,koon,hewett,giddens,emerick,eades,deangelis,cosme,ceballos,birdsong,benham,bemis,armour,anguiano,welborn,tsosie,storms,shoup,sessoms,samaniego,rood,rojo,rhinehart,raby,northcutt,myer,munguia,morehouse,mcdevitt,mallett,lozada,lemoine,kuehn,hallett,grim,gillard,gaylor,garman,gallaher,feaster,faris,darrow,dardar,coney,carreon,braithwaite,boylan,boyett,bixler,bigham,benford,barragan,barnum,zuber,wyche,westcott,vining,stoltzfus,simonds,shupe,sabin,ruble,rittenhouse,richman,perrone,mulholland,millan,lomeli,kite,jemison,hulett,holler,hickerson,herold,hazelwood,griffen,gause,forde,eisenberg,dilworth,charron,chaisson,brodie,bristow,breunig,brace,boutwell,bentz,belk,bayless,batchelder,baran,baeza,zimmermann,weathersby,volk,toole,theis,tedesco,searle,schenck,satterwhite,ruelas,rankins,partida,nesbit,morel,menchaca,levasseur,kaylor,johnstone,hulse,hollar,hersey,harrigan,harbison,guyer,gish,giese,gerlach,geller,geisler,falcone,elwell,doucet,deese,darr,corder,chafin,byler,bussell,burdett,brasher,bowe,bellinger,bastian,barner,alleyne,wilborn,weil,wegner,wales,tatro,spitzer,smithers,schoen,resendez,parisi,overman,obrian,mudd,moy,mclaren,maggio,lindner,lalonde,lacasse,laboy,killion,kahl,jessen,jamerson,houk,henshaw,gustin,graber,durst,duenas,davey,cundiff,conlon,colunga,coakley,chiles,capers,buell,bricker,bissonnette,birmingham,bartz,bagby,zayas,volpe,treece,toombs,thom,terrazas,swinney,skiles,silveira,shouse,senn,ramage,nez,moua,langham,kyles,holston,hoagland,herd,feller,denison,carraway,burford,bickel,ambriz,abercrombie,yamada,weidner,waddle,verduzco,thurmond,swindle,schrock,sanabria,rosenberger,probst,peabody,olinger,nazario,mccafferty,mcbroom,mcabee,mazur,matherne,mapes,leverett,killingsworth,heisler,griego,gosnell,frankel,franke,ferrante,fenn,ehrlich,christopherso,chasse,chancellor,caton,brunelle,bly,bloomfield,babbitt,azevedo,abramson,ables,abeyta,youmans,wozniak,wainwright,stowell,smitherman,samuelson,runge,rothman,rosenfeld,peake,owings,olmos,munro,moreira,leatherwood,larkins,krantz,kovacs,kizer,kindred,karnes,jaffe,hubbell,hosey,hauck,goodell,erdman,dvorak,doane,cureton,cofer,buehler,bierman,berndt,banta,abdullah,warwick,waltz,turcotte,torrey,stith,seger,sachs,quesada,pinder,peppers,pascual,paschall,parkhurst,ozuna,oster,nicholls,lheureux,lavalley,kimura,jablonski,haun,gourley,gilligan,derby,croy,cotto,cargill,burwell,burgett,buckman,booher,adorno,wrenn,whittemore,urias,szabo,sayles,saiz,rutland,rael,pharr,pelkey,ogrady,nickell,musick,moats,mather,massa,kirschner,kieffer,kellar,hendershot,gott,godoy,gadson,furtado,fiedler,erskine,dutcher,dever,daggett,chevalier,brake,ballesteros,amerson,wingo,waldon,trott,silvey,showers,schlegel,rue,ritz,pepin,pelayo,parsley,palermo,moorehead,mchale,lett,kocher,kilburn,iglesias,humble,hulbert,huckaby,hix,haven,hartford,hardiman,gurney,grigg,grasso,goings,fillmore,farber,depew,dandrea,dame,cowen,covarrubias,burrus,bracy,ardoin,thompkins,standley,radcliffe,pohl,persaud,parenteau,pabon,newson,newhouse,napolitano,mulcahy,malave,keim,hooten,hernandes,heffernan,hearne,greenleaf,glick,fuhrman,fetter,faria,dishman,dickenson,crites,criss,clapper,chenault,castor,casto,bugg,bove,bonney,ard,anderton,allgood,alderson,woodman,warrick,toomey,tooley,tarrant,summerville,stebbins,sokol,searles,schutz,schumann,scheer,remillard,raper,proulx,palmore,monroy,messier,melo,melanson,mashburn,manzano,lussier,jenks,huneycutt,hartwig,grimsley,fulk,fielding,fidler,engstrom,eldred,dantzler,crandell,calder,brumley,breton,brann,bramlett,boykins,bianco,bancroft,almaraz,alcantar,whitmer,whitener,welton,vineyard,rahn,paquin,mizell,mcmillin,mckean,marston,maciel,lundquist,liggins,lampkin,kranz,koski,kirkham,jiminez,hazzard,harrod,graziano,grammer,gendron,garrido,fordham,englert,dryden,demoss,deluna,crabb,comeau,brummett,blume,benally,wessel,vanbuskirk,thorson,stumpf,stockwell,reams,radtke,rackley,pelton,niemi,newland,nelsen,morrissette,miramontes,mcginley,mccluskey,marchant,luevano,lampe,lail,jeffcoat,infante,hinman,gaona,erb,eady,desmarais,decosta,dansby,choe,breckenridge,bostwick,borg,bianchi,alberts,wilkie,whorton,vargo,tait,soucy,schuman,ousley,mumford,lum,lippert,leath,lavergne,laliberte,kirksey,kenner,johnsen,izzo,hiles,gullett,greenwell,gaspar,galbreath,gaitan,ericson,delapaz,croom,cottingham,clift,bushnell,bice,beason,arrowood,waring,voorhees,truax,shreve,shockey,schatz,sandifer,rubino,rozier,roseberry,pieper,peden,nester,nave,murphey,malinowski,macgregor,lafrance,kunkle,kirkman,hipp,hasty,haddix,gervais,gerdes,gamache,fouts,fitzwater,dillingham,deming,deanda,cedeno,cannady,burson,bouldin,arceneaux,woodhouse,whitford,wescott,welty,weigel,torgerson,toms,surber,sunderland,sterner,setzer,riojas,pumphrey,puga,metts,mcgarry,mccandless,magill,lupo,loveland,llamas,leclerc,koons,kahler,huss,holbert,heintz,haupt,grimmett,gaskill,ellingson,dorr,dingess,deweese,desilva,crossley,cordeiro,converse,conde,caldera,cairns,burmeister,burkhalter,brawner,bott,youngs,vierra,valladares,shrum,shropshire,sevilla,rusk,rodarte,pedraza,nino,merino,mcminn,markle,mapp,lajoie,koerner,kittrell,kato,hyder,hollifield,heiser,hazlett,greenwald,fant,eldredge,dreher,delafuente,cravens,claypool,beecher,aronson,alanis,worthen,wojcik,winger,whitacre,wellington,valverde,valdivia,troupe,thrower,swindell,suttles,suh,stroman,spires,slate,shealy,sarver,sartin,sadowski,rondeau,rolon,rascon,priddy,paulino,nolte,munroe,molloy,mciver,lykins,loggins,lenoir,klotz,kempf,hupp,hollowell,hollander,haynie,harkness,harker,gottlieb,frith,eddins,driskell,doggett,densmore,charette,cassady,byrum,burcham,buggs,benn,whitted,warrington,vandusen,vaillancourt,steger,siebert,scofield,quirk,purser,plumb,orcutt,nordstrom,mosely,michalski,mcphail,mcdavid,mccraw,marchese,mannino,lefevre,largent,lanza,kress,isham,hunsaker,hoch,hildebrandt,guarino,grijalva,graybill,ewell,ewald,cusick,crumley,coston,cathcart,carruthers,bullington,bowes,blain,blackford,barboza,yingling,weiland,varga,silverstein,sievers,shuster,shumway,runnels,rumsey,renfroe,provencher,polley,mohler,middlebrooks,kutz,koster,groth,glidden,fazio,deen,chipman,chenoweth,champlin,cedillo,carrero,carmody,buckles,brien,boutin,bosch,berkowitz,altamirano,wilfong,wiegand,waites,truesdale,toussaint,tobey,tedder,steelman,sirois,schnell,robichaud,richburg,plumley,pizarro,piercy,ortego,oberg,neace,mertz,mcnew,matta,lapp,lair,kibler,howlett,hollister,hofer,hatten,hagler,falgoust,engelhardt,eberle,dombrowski,dinsmore,daye,casares,braud,balch,autrey,wendel,tyndall,strobel,stoltz,spinelli,serrato,rochester,reber,rathbone,palomino,nickels,mayle,mathers,mach,loeffler,littrell,levinson,leong,lemire,lejeune,lazo,lasley,koller,kennard,hoelscher,hintz,hagerman,greaves,fore,eudy,engler,corrales,cordes,brunet,bidwell,bennet,tyrrell,tharpe,swinton,stribling,southworth,sisneros,savoie,samons,ruvalcaba,ries,ramer,omara,mosqueda,millar,mcpeak,macomber,luckey,litton,lehr,lavin,hubbs,hoard,hibbs,hagans,futrell,exum,evenson,culler,carbaugh,callen,brashear,bloomer,blakeney,bigler,addington,woodford,unruh,tolentino,sumrall,stgermain,smock,sherer,rayner,pooler,oquinn,nero,mcglothlin,linden,kowal,kerrigan,ibrahim,harvell,hanrahan,goodall,geist,fussell,fung,ferebee,eley,eggert,dorsett,dingman,destefano,colucci,clemmer,burnell,brumbaugh,boddie,berryhill,avelar,alcantara,winder,winchell,vandenberg,trotman,thurber,thibeault,stlouis,stilwell,sperling,shattuck,sarmiento,ruppert,rumph,renaud,randazzo,rademacher,quiles,pearman,palomo,mercurio,lowrey,lindeman,lawlor,larosa,lander,labrecque,hovis,holifield,henninger,hawkes,hartfield,hann,hague,genovese,garrick,fudge,frink,eddings,dinh,cribbs,calvillo,bunton,brodeur,bolding,blanding,agosto,zahn,wiener,trussell,tew,tello,teixeira,speck,sharma,shanklin,sealy,scanlan,santamaria,roundy,robichaux,ringer,rigney,prevost,polson,nord,moxley,medford,mccaslin,mcardle,macarthur,lewin,lasher,ketcham,keiser,heine,hackworth,grose,grizzle,gillman,gartner,frazee,fleury,edson,edmonson,derry,cronk,conant,burress,burgin,broom,brockington,bolick,boger,birchfield,billington,baily,bahena,armbruster,anson,yoho,wilcher,tinney,timberlake,thoma,thielen,sutphin,stultz,sikora,serra,schulman,scheffler,santillan,rego,preciado,pinkham,mickle,luu,lomas,lizotte,lent,kellerman,keil,johanson,hernadez,hartsfield,haber,gorski,farkas,eberhardt,duquette,delano,cropper,cozart,cockerham,chamblee,cartagena,cahoon,buzzell,brister,brewton,blackshear,benfield,aston,ashburn,arruda,wetmore,weise,vaccaro,tucci,sudduth,stromberg,stoops,showalter,shears,runion,rowden,rosenblum,riffle,renfrow,peres,obryant,leftwich,lark,landeros,kistler,killough,kerley,kastner,hoggard,hartung,guertin,govan,gatling,gailey,fullmer,fulford,flatt,esquibel,endicott,edmiston,edelstein,dufresne,dressler,dickman,chee,busse,bonnett,berard,arena,yoshida,velarde,veach,vanhouten,vachon,tolson,tolman,tennyson,stites,soler,shutt,ruggles,rhone,pegues,ong,neese,muro,moncrief,mefford,mcphee,mcmorris,mceachern,mcclurg,mansour,mader,leija,lecompte,lafountain,labrie,jaquez,heald,hash,hartle,gainer,frisby,farina,eidson,edgerton,dyke,durrett,duhon,cuomo,cobos,cervantez,bybee,brockway,borowski,binion,beery,arguello,amaro,acton,yuen,winton,wigfall,weekley,vidrine,vannoy,tardiff,shoop,shilling,schick,safford,prendergast,pellerin,osuna,nissen,nalley,moller,messner,messick,merrifield,mcguinness,matherly,marcano,mahone,lemos,lebrun,jara,hoffer,herren,hecker,haws,haug,gwin,gober,gilliard,fredette,favela,echeverria,downer,donofrio,desrochers,crozier,corson,bechtold,argueta,aparicio,zamudio,westover,westerman,utter,troyer,thies,tapley,slavin,shirk,sandler,roop,raymer,radcliff,otten,moorer,millet,mckibben,mccutchen,mcavoy,mcadoo,mayorga,mastin,martineau,marek,madore,leflore,kroeger,kennon,jimerson,hostetter,hornback,hendley,hance,guardado,granado,gowen,goodale,flinn,fleetwood,fitz,durkee,duprey,dipietro,dilley,clyburn,brawley,beckley,arana,weatherby,vollmer,vestal,tunnell,trigg,tingle,takahashi,sweatt,storer,snapp,shiver,rooker,rathbun,poisson,perrine,perri,pastor,parmer,parke,pare,palmieri,nottingham,midkiff,mecham,mccomas,mcalpine,lovelady,lillard,lally,knopp,kile,kiger,haile,gupta,goldsberry,gilreath,fulks,friesen,franzen,flack,findlay,ferland,dreyer,dore,dennard,deckard,debose,crim,coulombe,cork,chancey,cantor,branton,bissell,barns,woolard,witham,wasserman,spiegel,shoffner,scholz,ruch,rossman,petry,palacio,paez,neary,mortenson,millsap,miele,menke,mckim,mcanally,martines,manor,lemley,larochelle,klaus,klatt,kaufmann,kapp,helmer,hedge,halloran,glisson,frechette,fontana,eagan,distefano,danley,creekmore,chartier,chaffee,carillo,burg,bolinger,berkley,benz,basso,bash,barrier,zelaya,woodring,witkowski,wilmot,wilkens,wieland,verdugo,urquhart,tsai,timms,swiger,swaim,sussman,pires,molnar,mcatee,lowder,loos,linker,landes,kingery,hufford,higa,hendren,hammack,hamann,gillam,gerhardt,edelman,eby,delk,deans,curl,constantine,cleaver,claar,casiano,carruth,carlyle,brophy,bolanos,bibbs,bessette,beggs,baugher,bartel,averill,andresen,amin,adames,via,valente,turnbow,tse,swink,sublett,stroh,stringfellow,ridgway,pugliese,poteat,ohare,neubauer,murchison,mingo,lemmons,kwon,kellam,kean,jarmon,hyden,hudak,hollinger,henkel,hemingway,hasson,hansel,halter,haire,ginsberg,gillispie,fogel,flory,etter,elledge,eckman,deas,currin,crafton,coomer,colter,claxton,bulter,braddock,bowyer,binns,bellows,baskerville,barros,ansley,woolf,wight,waldman,wadley,tull,trull,tesch,stouffer,stadler,slay,shubert,sedillo,santacruz,reinke,poynter,neri,neale,mowry,moralez,monger,mitchum,merryman,manion,macdougall,lux,litchfield,ley,levitt,lepage,lasalle,khoury,kavanagh,karns,ivie,huebner,hodgkins,halpin,garica,eversole,dutra,dunagan,duffey,dillman,dillion,deville,dearborn,damato,courson,coulson,burdine,bousquet,bonin,bish,atencio,westbrooks,wages,vaca,tye,toner,tillis,swett,struble,stanfill,solorzano,slusher,sipple,sim,silvas,shults,schexnayder,saez,rodas,rager,pulver,plaza,penton,paniagua,meneses,mcfarlin,mcauley,matz,maloy,magruder,lohman,landa,lacombe,jaimes,hom,holzer,holst,heil,hackler,grundy,gilkey,farnham,durfee,dunton,dunston,duda,dews,craver,corriveau,conwell,colella,chambless,bremer,boutte,bourassa,blaisdell,backman,babineaux,audette,alleman,towner,taveras,tarango,sullins,suiter,stallard,solberg,schlueter,poulos,pimental,owsley,okelley,nations,moffatt,metcalfe,meekins,medellin,mcglynn,mccowan,marriott,marable,lennox,lamoureux,koss,kerby,karp,isenberg,howze,hockenberry,highsmith,harbour,hallmark,gusman,greeley,giddings,gaudet,gallup,fleenor,eicher,edington,dimaggio,dement,demello,decastro,bushman,brundage,brooker,bourg,blackstock,bergmann,beaton,banister,argo,appling,wortman,watterson,villalpando,tillotson,tighe,sundberg,sternberg,stamey,shipe,seeger,scarberry,sattler,sain,rothstein,poteet,plowman,pettiford,penland,partain,pankey,oyler,ogletree,ogburn,moton,merkel,lucier,lakey,kratz,kinser,kershaw,josephson,imhoff,hendry,hammon,frisbie,friedrich,frawley,fraga,forester,eskew,emmert,drennan,doyon,dandridge,cawley,carvajal,bracey,belisle,batey,ahner,wysocki,weiser,veliz,tincher,sansone,sankey,sandstrom,rohrer,risner,pridemore,pfeffer,persinger,peery,oubre,nowicki,musgrave,murdoch,mullinax,mccary,mathieu,livengood,kyser,klink,kimes,kellner,kavanaugh,kasten,imes,hoey,hinshaw,hake,gurule,grube,grillo,geter,gatto,garver,garretson,farwell,eiland,dunford,decarlo,corso,colman,collard,cleghorn,chasteen,cavender,carlile,calvo,byerly,brogdon,broadwater,breault,bono,bergin,behr,ballenger,amick,tamez,stiffler,steinke,simmon,shankle,schaller,salmons,sackett,saad,rideout,ratcliffe,rao,ranson,plascencia,petterson,olszewski,olney,olguin,nilsson,nevels,morelli,montiel,monge,michaelson,mertens,mcchesney,mcalpin,mathewson,loudermilk,lineberry,liggett,kinlaw,kight,jost,hereford,hardeman,halpern,halliday,hafer,gaul,friel,freitag,forsberg,evangelista,doering,dicarlo,dendy,delp,deguzman,dameron,curtiss,cosper,cauthen,cao,bradberry,bouton,bonnell,bixby,bieber,beveridge,bedwell,barhorst,bannon,baltazar,baier,ayotte,attaway,arenas,abrego,turgeon,tunstall,thaxton,thai,tenorio,stotts,sthilaire,shedd,seabolt,scalf,salyers,ruhl,rowlett,robinett,pfister,perlman,parkman,nunnally,norvell,napper,modlin,mckellar,mcclean,mascarenas,leibowitz,ledezma,kuhlman,kobayashi,hunley,holmquist,hinkley,hartsell,gribble,gravely,fifield,eliason,doak,crossland,carleton,bridgeman,bojorquez,boggess,auten,woosley,whiteley,wexler,twomey,tullis,townley,standridge,santoyo,rueda,riendeau,revell,pless,ottinger,nigro,nickles,mulvey,menefee,mcshane,mcloughlin,mckinzie,markey,lockridge,lipsey,knisley,knepper,kitts,kiel,jinks,hathcock,godin,gallego,fikes,fecteau,estabrook,ellinger,dunlop,dudek,countryman,chauvin,chatham,bullins,brownfield,boughton,bloodworth,bibb,baucom,barbieri,aubin,armitage,alessi,absher,abbate,zito,woolery,wiggs,wacker,tynes,tolle,telles,tarter,swarey,strode,stockdale,stalnaker,spina,schiff,saari,risley,rameriz,rakes,pettaway,penner,paulus,palladino,omeara,montelongo,melnick,mehta,mcgary,mccourt,mccollough,marchetti,manzanares,lowther,leiva,lauderdale,lafontaine,kowalczyk,knighton,joubert,jaworski,ide,huth,hurdle,housley,hackman,gulick,gordy,gilstrap,gehrke,gebhart,gaudette,foxworth,essex,endres,dunkle,cimino,caddell,brauer,braley,bodine,blackmore,belden,backer,ayer,andress,wisner,vuong,valliere,twigg,tso,tavarez,strahan,steib,staub,sowder,seiber,schutt,scharf,schade,rodriques,risinger,renshaw,rahman,presnell,piatt,nieman,nevins,mcilwain,mcgaha,mccully,mccomb,massengale,macedo,lesher,kearse,jauregui,husted,hudnall,holmberg,hertel,hardie,glidewell,frausto,fassett,dalessandro,dahlgren,corum,constantino,conlin,colquitt,colombo,claycomb,cardin,buller,boney,bocanegra,biggers,benedetto,araiza,andino,albin,zorn,werth,weisman,walley,vanegas,ulibarri,towe,tedford,teasley,suttle,steffens,stcyr,squire,singley,sifuentes,shuck,schram,sass,rieger,ridenhour,rickert,richerson,rayborn,rabe,raab,pendley,pastore,ordway,moynihan,mellott,mckissick,mcgann,mccready,mauney,marrufo,lenhart,lazar,lafave,keele,kautz,jardine,jahnke,jacobo,hord,hardcastle,hageman,giglio,gehring,fortson,duque,duplessis,dicken,derosier,deitz,dalessio,cram,castleman,candelario,callison,caceres,bozarth,biles,bejarano,bashaw,avina,armentrout,alverez,acord,waterhouse,vereen,vanlandingham,uhl,strawser,shotwell,severance,seltzer,schoonmaker,schock,schaub,schaffner,roeder,rodrigez,riffe,rhine,rasberry,rancourt,railey,quade,pursley,prouty,perdomo,oxley,osterman,nickens,murphree,mounts,merida,maus,mattern,masse,martinelli,mangan,lutes,ludwick,loney,laureano,lasater,knighten,kissinger,kimsey,kessinger,honea,hollingshead,hockett,heyer,heron,gurrola,gove,glasscock,gillett,galan,featherstone,eckhardt,duron,dunson,dasher,culbreth,cowden,cowans,claypoole,churchwell,chabot,caviness,cater,caston,callan,byington,burkey,boden,beckford,atwater,archambault,alvey,alsup,whisenant,weese,voyles,verret,tsang,tessier,sweitzer,sherwin,shaughnessy,revis,remy,prine,philpott,peavy,paynter,parmenter,ovalle,offutt,nightingale,newlin,nakano,myatt,muth,mohan,mcmillon,mccarley,mccaleb,maxson,marinelli,maley,liston,letendre,kain,huntsman,hirst,hagerty,gulledge,greenway,grajeda,gorton,goines,gittens,frederickson,fanelli,embree,eichelberger,dunkin,dixson,dillow,defelice,chumley,burleigh,borkowski,binette,biggerstaff,berglund,beller,audet,arbuckle,allain,alfano,youngman,wittman,weintraub,vanzant,vaden,twitty,stollings,standifer,sines,shope,scalise,saville,posada,pisano,otte,nolasco,napoli,mier,merkle,mendiola,melcher,mejias,mcmurry,mccalla,markowitz,manis,mallette,macfarlane,lough,looper,landin,kittle,kinsella,kinnard,hobart,herald,helman,hellman,hartsock,halford,hage,gordan,glasser,gayton,gattis,gastelum,gaspard,frisch,fitzhugh,eckstein,eberly,dowden,despain,crumpler,crotty,cornelison,chouinard,chamness,catlin,cann,bumgardner,budde,branum,bradfield,braddy,borst,birdwell,bazan,banas,bade,arango,ahearn,addis,zumwalt,wurth,wilk,widener,wagstaff,urrutia,terwilliger,tart,steinman,staats,sloat,rives,riggle,revels,reichard,prickett,poff,pitzer,petro,pell,northrup,nicks,moline,mielke,maynor,mallon,magness,lingle,lindell,lieb,lesko,lebeau,lammers,lafond,kiernan,ketron,jurado,holmgren,hilburn,hayashi,hashimoto,harbaugh,guillot,gard,froehlich,feinberg,falco,dufour,drees,doney,diep,delao,daves,dail,crowson,coss,congdon,carner,camarena,butterworth,burlingame,bouffard,bloch,bilyeu,barta,bakke,baillargeon,avent,aquilar,ake,aho,zeringue,yarber,wolfson,vogler,voelker,truss,troxell,thrift,strouse,spielman,sistrunk,sevigny,schuller,schaaf,ruffner,routh,roseman,ricciardi,peraza,pegram,overturf,olander,odaniel,neu,millner,melchor,maroney,machuca,macaluso,livesay,layfield,laskowski,kwiatkowski,kilby,hovey,heywood,hayman,havard,harville,haigh,hagood,grieco,glassman,gebhardt,fleischer,fann,elson,eccles,cunha,crumb,blakley,bardwell,abshire,woodham,wines,welter,wargo,varnado,tutt,traynor,swaney,svoboda,stricker,stoffel,stambaugh,sickler,shackleford,selman,seaver,sansom,sanmiguel,royston,rourke,rockett,rioux,puleo,pitchford,nardi,mulvaney,middaugh,malek,leos,lathan,kujawa,kimbro,killebrew,houlihan,hinckley,herod,hepler,hamner,hammel,hallowell,gonsalez,gingerich,gambill,funkhouser,fricke,fewell,falkner,endsley,dulin,drennen,deaver,dambrosio,chadwell,castanon,burkes,brune,brisco,brinker,bowker,boldt,berner,beaumont,beaird,bazemore,barrick,albano,younts,wunderlich,weidman,vanness,toland,theobald,stickler,steiger,stanger,spies,spector,sollars,smedley,seibel,scoville,saito,rye,rummel,rowles,rouleau,roos,rogan,roemer,ream,raya,purkey,priester,perreira,penick,paulin,parkins,overcash,oleson,neves,muldrow,minard,midgett,michalak,melgar,mcentire,mcauliffe,marte,lydon,lindholm,leyba,langevin,lagasse,lafayette,kesler,kelton,kao,kaminsky,jaggers,humbert,huck,howarth,hinrichs,higley,gupton,guimond,gravois,giguere,fretwell,fontes,feeley,faucher,eichhorn,ecker,earp,dole,dinger,derryberry,demars,deel,copenhaver,collinsworth,colangelo,cloyd,claiborne,caulfield,carlsen,calzada,caffey,broadus,brenneman,bouie,bodnar,blaney,blanc,beltz,behling,barahona,yockey,winkle,windom,wimer,villatoro,trexler,teran,taliaferro,sydnor,swinson,snelling,smtih,simonton,simoneaux,simoneau,sherrer,seavey,scheel,rushton,rupe,ruano,rippy,reiner,reiff,rabinowitz,quach,penley,odle,nock,minnich,mckown,mccarver,mcandrew,longley,laux,lamothe,lafreniere,kropp,krick,kates,jepson,huie,howse,howie,henriques,haydon,haught,hartzog,harkey,grimaldo,goshorn,gormley,gluck,gilroy,gillenwater,giffin,fluker,feder,eyre,eshelman,eakins,detwiler,delrosario,davisson,catalan,canning,calton,brammer,botelho,blakney,bartell,averett,askins,aker,zak,worcester,witmer,wiser,winkelman,widmer,whittier,weitzel,wardell,wagers,ullman,tupper,tingley,tilghman,talton,simard,seda,scheller,sala,rundell,rost,roa,ribeiro,rabideau,primm,pinon,peart,ostrom,ober,nystrom,nussbaum,naughton,murr,moorhead,monti,monteiro,melson,meissner,mclin,mcgruder,marotta,makowski,majewski,madewell,lunt,lukens,leininger,lebel,lakin,kepler,jaques,hunnicutt,hungerford,hoopes,hertz,heins,halliburton,grosso,gravitt,glasper,gallman,gallaway,funke,fulbright,falgout,eakin,dostie,dorado,dewberry,derose,cutshall,crampton,costanzo,colletti,cloninger,claytor,chiang,canterbury,campagna,burd,brokaw,broaddus,bretz,brainard,binford,bilbrey,alpert,aitken,ahlers,zajac,woolfolk,witten,windle,wayland,tramel,tittle,talavera,suter,straley,specht,sommerville,soloman,skeens,sigman,sibert,shavers,schuck,schmit,sartain,sabol,rosenblatt,rollo,rashid,rabb,province,polston,nyberg,northrop,navarra,muldoon,mikesell,mcdougald,mcburney,mariscal,lui,lozier,lingerfelt,legere,latour,lagunas,lacour,kurth,killen,kiely,kayser,kahle,isley,huertas,hower,hinz,haugh,gumm,galicia,fortunato,flake,dunleavy,duggins,doby,digiovanni,devaney,deltoro,cribb,corpuz,coronel,coen,charbonneau,caine,burchette,blakey,blakemore,bergquist,beene,beaudette,bayles,ballance,bakker,bailes,asberry,arwood,zucker,willman,whitesell,wald,walcott,vancleave,trump,strasser,simas,shick,schleicher,schaal,saleh,rotz,resnick,rainer,partee,ollis,oller,oday,munday,mong,millican,merwin,mazzola,mansell,magallanes,llanes,lewellen,lepore,kisner,keesee,jeanlouis,ingham,hornbeck,hawn,hartz,harber,haffner,gutshall,guth,grays,gowan,finlay,finkelstein,eyler,enloe,dungan,diez,dearman,cull,crosson,chronister,cassity,campion,callihan,butz,breazeale,blumenthal,berkey,batty,batton,arvizu,alderete,aldana,albaugh,abernethy,wolter,wille,tweed,tollefson,thomasson,teter,testerman,sproul,spates,southwick,soukup,skelly,senter,sealey,sawicki,sargeant,rossiter,rosemond,repp,pifer,ormsby,nickelson,naumann,morabito,monzon,millsaps,millen,mcelrath,marcoux,mantooth,madson,macneil,mackinnon,louque,leister,lampley,kushner,krouse,kirwan,jessee,janson,jahn,jacquez,islas,hutt,holladay,hillyer,hepburn,hensel,harrold,gingrich,geis,gales,fults,finnell,ferri,featherston,epley,ebersole,eames,dunigan,drye,dismuke,devaughn,delorenzo,damiano,confer,collum,clower,clow,claussen,clack,caylor,cawthon,casias,carreno,bluhm,bingaman,bewley,belew,beckner,auld,amey,wolfenbarger,wilkey,wicklund,waltman,villalba,valero,valdovinos,ung,ullrich,tyus,twyman,trost,tardif,tanguay,stripling,steinbach,shumpert,sasaki,sappington,sandusky,reinhold,reinert,quijano,pye,placencia,pinkard,phinney,perrotta,pernell,parrett,oxendine,owensby,orman,nuno,mori,mcroberts,mcneese,mckamey,mccullum,markel,mardis,maines,lueck,lubin,lefler,leffler,larios,labarbera,kershner,josey,jeanbaptiste,izaguirre,hermosillo,haviland,hartshorn,hafner,ginter,getty,franck,fiske,dufrene,doody,davie,dangerfield,dahlberg,cuthbertson,crone,coffelt,chidester,chesson,cauley,caudell,cantara,campo,caines,bullis,bucci,brochu,bogard,bickerstaff,benning,arzola,antonelli,adkinson,zellers,wulf,worsley,woolridge,whitton,westerfield,walczak,vassar,truett,trueblood,trawick,townsley,topping,tobar,telford,steverson,stagg,sitton,sill,sergent,schoenfeld,sarabia,rutkowski,rubenstein,rigdon,prentiss,pomerleau,plumlee,philbrick,peer,patnode,oloughlin,obregon,nuss,morell,mikell,mele,mcinerney,mcguigan,mcbrayer,lor,lollar,lakes,kuehl,kinzer,kamp,joplin,jacobi,howells,holstein,hedden,hassler,harty,halle,greig,gouge,goodrum,gerhart,geier,geddes,gast,forehand,ferree,fendley,feltner,esqueda,encarnacion,eichler,egger,edmundson,eatmon,doud,donohoe,donelson,dilorenzo,digiacomo,diggins,delozier,dejong,danford,crippen,coppage,cogswell,clardy,cioffi,cabe,brunette,bresnahan,bramble,blomquist,blackstone,biller,bevis,bevan,bethune,benbow,baty,basinger,balcom,andes,aman,aguero,adkisson,yandell,wilds,whisenhunt,weigand,weeden,voight,villar,trottier,tillett,suazo,setser,scurry,schuh,schreck,schauer,samora,roane,rinker,reimers,ratchford,popovich,parkin,natal,melville,mcbryde,magdaleno,loehr,lockman,lingo,leduc,larocca,lao,lamere,laclair,krall,korte,koger,jalbert,hughs,higbee,henton,heaney,haith,gump,greeson,goodloe,gholston,gasper,gagliardi,fregoso,farthing,fabrizio,ensor,elswick,elgin,eklund,eaddy,drouin,dorton,dizon,derouen,deherrera,davy,dampier,cullum,culley,cowgill,cardoso,cardinale,brodsky,broadbent,brimmer,briceno,branscum,bolyard,boley,bennington,beadle,baur,ballentine,azure,aultman,arciniega,aguila,aceves,yepez,yap,woodrum,wethington,weissman,veloz,trusty,troup,trammel,tarpley,stivers,steck,sprayberry,spraggins,spitler,spiers,sohn,seagraves,schiffman,rudnick,rizo,riccio,rennie,quackenbush,puma,plott,pearcy,parada,paiz,munford,moskowitz,mease,mcnary,mccusker,lozoya,longmire,loesch,lasky,kuhlmann,krieg,koziol,kowalewski,konrad,kindle,jowers,jolin,jaco,hua,horgan,hine,hileman,hepner,heise,heady,hawkinson,hannigan,haberman,guilford,grimaldi,garton,gagliano,fruge,follett,fiscus,ferretti,ebner,easterday,eanes,dirks,dimarco,depalma,deforest,cruce,craighead,christner,candler,cadwell,burchell,buettner,brinton,brazier,brannen,brame,bova,bomar,blakeslee,belknap,bangs,balzer,athey,armes,alvis,alverson,alvardo,yeung,wheelock,westlund,wessels,volkman,threadgill,thelen,tague,symons,swinford,sturtevant,straka,stier,stagner,segarra,seawright,rutan,roux,ringler,riker,ramsdell,quattlebaum,purifoy,poulson,permenter,peloquin,pasley,pagel,osman,obannon,nygaard,newcomer,munos,motta,meadors,mcquiston,mcniel,mcmann,mccrae,mayne,matte,legault,lechner,kucera,krohn,kratzer,koopman,jeske,horrocks,hock,hibbler,hesson,hersh,harvin,halvorsen,griner,grindle,gladstone,garofalo,frampton,forbis,eddington,diorio,dingus,dewar,desalvo,curcio,creasy,cortese,cordoba,connally,cluff,cascio,capuano,canaday,calabro,bussard,brayton,borja,bigley,arnone,arguelles,acuff,zamarripa,wooton,widner,wideman,threatt,thiele,templin,teeters,synder,swint,swick,sturges,stogner,stedman,spratt,siegfried,shetler,scull,savino,sather,rothwell,rook,rone,rhee,quevedo,privett,pouliot,poche,pickel,petrillo,pellegrini,peaslee,partlow,otey,nunnery,morelock,morello,meunier,messinger,mckie,mccubbin,mccarron,lerch,lavine,laverty,lariviere,lamkin,kugler,krol,kissel,keeter,hubble,hickox,hetzel,hayner,hagy,hadlock,groh,gottschalk,goodsell,gassaway,garrard,galligan,fye,firth,fenderson,feinstein,etienne,engleman,emrick,ellender,drews,doiron,degraw,deegan,dart,crissman,corr,cookson,coil,cleaves,charest,chapple,chaparro,castano,carpio,byer,bufford,bridgewater,bridgers,brandes,borrero,bonanno,aube,ancheta,abarca,abad,yim,wooster,wimbush,willhite,willams,wigley,weisberg,wardlaw,vigue,vanhook,unknow,torre,tasker,tarbox,strachan,slover,shamblin,semple,schuyler,schrimsher,sayer,salzman,rubalcava,riles,reneau,reichel,rayfield,rabon,pyatt,prindle,poss,polito,plemmons,pesce,perrault,pereyra,ostrowski,nilsen,niemeyer,munsey,mundell,moncada,miceli,meader,mcmasters,mckeehan,matsumoto,marron,marden,lizarraga,lingenfelter,lewallen,langan,lamanna,kovac,kinsler,kephart,keown,kass,kammerer,jeffreys,hysell,householder,hosmer,hardnett,hanner,guyette,greening,glazer,ginder,fromm,fluellen,finkle,fey,fessler,essary,eisele,duren,dittmer,crochet,cosentino,cogan,coelho,cavin,carrizales,campuzano,brough,bopp,bookman,blouin,beesley,battista,bascom,bakken,badgett,arneson,anselmo,ahumada,woodyard,wolters,wireman,willison,warman,waldrup,vowell,vantassel,vale,twombly,toomer,tennison,teets,tedeschi,swanner,stutz,stelly,sheehy,schermerhorn,scala,sandidge,salters,salo,saechao,roseboro,rolle,ressler,renz,renn,redford,raposa,rainbolt,pelfrey,orndorff,oney,nolin,nimmons,ney,nardone,myhre,morman,menjivar,mcglone,mccammon,maxon,marciano,manus,lowrance,lorenzen,lonergan,lollis,littles,lindahl,lamas,lach,kuster,krawczyk,knuth,knecht,kirkendall,keitt,keever,kantor,jarboe,hoye,houchens,holter,holsinger,hickok,helwig,helgeson,hassett,harner,hamman,hames,hadfield,goree,goldfarb,gaughan,gaudreau,gantz,gallion,frady,foti,flesher,ferrin,faught,engram,donegan,desouza,degroot,cutright,crowl,criner,coan,clinkscales,chewning,chavira,catchings,carlock,bulger,buenrostro,bramblett,brack,boulware,bookout,bitner,birt,baranowski,baisden,augustin,allmon,acklin,yoakum,wilbourn,whisler,weinberger,washer,vasques,vanzandt,vanatta,troxler,tomes,tindle,tims,throckmorton,thach,stpeter,stlaurent,stenson,spry,spitz,songer,snavely,sly,shroyer,shortridge,shenk,sevier,seabrook,scrivner,saltzman,rosenberry,rockwood,robeson,roan,reiser,ramires,raber,posner,popham,piotrowski,pinard,peterkin,pelham,peiffer,peay,nadler,musso,millett,mestas,mcgowen,marques,marasco,manriquez,manos,mair,lipps,leiker,krumm,knorr,kinslow,kessel,kendricks,kelm,ito,irick,ickes,hurlburt,horta,hoekstra,heuer,helmuth,heatherly,hampson,hagar,haga,greenlaw,grau,godbey,gingras,gillies,gibb,gayden,gauvin,garrow,fontanez,florio,finke,fasano,ezzell,ewers,eveland,eckenrode,duclos,drumm,dimmick,delancey,defazio,dashiell,cusack,crowther,crigger,cray,coolidge,coldiron,cleland,chalfant,cassel,camire,cabrales,broomfield,brittingham,brisson,brickey,braziel,brazell,bragdon,boulanger,bos,boman,bohannan,beem,barre,baptist,azar,ashbaugh,armistead,almazan,adamski,zendejas,winburn,willaims,wilhoit,westberry,wentzel,wendling,visser,vanscoy,vankirk,vallee,tweedy,thornberry,sweeny,spradling,spano,smelser,shim,sechrist,schall,scaife,rugg,rothrock,roesler,riehl,ridings,render,ransdell,radke,pinero,petree,pendergast,peluso,pecoraro,pascoe,panek,oshiro,navarrette,murguia,moores,moberg,michaelis,mcwhirter,mcsweeney,mcquade,mccay,mauk,mariani,marceau,mandeville,maeda,lunde,ludlow,loeb,lindo,linderman,leveille,leith,larock,lambrecht,kulp,kinsley,kimberlin,kesterson,hoyos,helfrich,hanke,grisby,goyette,gouveia,glazier,gile,gerena,gelinas,gasaway,funches,fujimoto,flynt,fenske,fellers,fehr,eslinger,escalera,enciso,duley,dittman,dineen,diller,devault,dao,collings,clymer,clowers,chavers,charland,castorena,castello,camargo,bunce,bullen,boyes,borchers,borchardt,birnbaum,birdsall,billman,benites,bankhead,ange,ammerman,adkison,winegar,wickman,warr,warnke,villeneuve,veasey,vassallo,vannatta,vadnais,twilley,towery,tomblin,tippett,theiss,talkington,talamantes,swart,swanger,streit,stines,stabler,spurling,sobel,sine,simmers,shippy,shiflett,shearin,sauter,sanderlin,rusch,runkle,ruckman,rorie,roesch,richert,rehm,randel,ragin,quesenberry,puentes,plyler,plotkin,paugh,oshaughnessy,ohalloran,norsworthy,niemann,nader,moorefield,mooneyham,modica,miyamoto,mickel,mebane,mckinnie,mazurek,mancilla,lukas,lovins,loughlin,lotz,lindsley,liddle,levan,lederman,leclaire,lasseter,lapoint,lamoreaux,lafollette,kubiak,kirtley,keffer,kaczmarek,housman,hiers,hibbert,herrod,hegarty,hathorn,greenhaw,grafton,govea,futch,furst,franko,forcier,foran,flickinger,fairfield,eure,emrich,embrey,edgington,ecklund,eckard,durante,deyo,delvecchio,dade,currey,creswell,cottrill,casavant,cartier,cargile,capel,cammack,calfee,burse,burruss,brust,brousseau,bridwell,braaten,borkholder,bloomquist,bjork,bartelt,arp,amburgey,yeary,yao,whitefield,vinyard,vanvalkenburg,twitchell,timmins,tapper,stringham,starcher,spotts,slaugh,simonsen,sheffer,sequeira,rosati,rhymes,reza,quint,pollak,peirce,patillo,parkerson,paiva,nilson,nevin,narcisse,nair,mitton,merriam,merced,meiners,mckain,mcelveen,mcbeth,marsden,marez,manke,mahurin,mabrey,luper,krull,kees,iles,hunsicker,hornbuckle,holtzclaw,hirt,hinnant,heston,hering,hemenway,hegwood,hearns,halterman,guiterrez,grote,granillo,grainger,glasco,gilder,garren,garlock,garey,fryar,fredricks,fraizer,foxx,foshee,ferrel,felty,everitt,evens,esser,elkin,eberhart,durso,duguay,driskill,doster,dewall,deveau,demps,demaio,delreal,deleo,deem,darrah,cumberbatch,culberson,cranmer,cordle,colgan,chesley,cavallo,castellon,castelli,carreras,carnell,carlucci,bontrager,blumberg,blasingame,becton,ayon,artrip,andujar,alkire,alder,agan,zukowski,zuckerman,zehr,wroblewski,wrigley,woodside,wigginton,westman,westgate,werts,washam,wardlow,walser,waiters,tadlock,stringfield,stimpson,stickley,standish,spurlin,spindler,speller,spaeth,sotomayor,sok,sluder,shryock,shepardson,shatley,scannell,santistevan,rosner,rhode,resto,reinhard,rathburn,prisco,poulsen,pinney,phares,pennock,pastrana,oviedo,ostler,noto,nauman,mulford,moise,moberly,mirabal,metoyer,metheny,mentzer,meldrum,mcinturff,mcelyea,mcdougle,massaro,lumpkins,loveday,lofgren,loe,lirette,lesperance,lefkowitz,ledger,lauzon,lain,lachapelle,kurz,klassen,keough,kempton,kaelin,jeffords,huot,hsieh,hoyer,horwitz,hopp,hoeft,hennig,haskin,gourdine,golightly,girouard,fulgham,fritsch,freer,frasher,foulk,firestone,fiorentino,fedor,ensley,englehart,eells,ebel,dunphy,donahoe,dileo,dibenedetto,dabrowski,crick,coonrod,conder,coddington,chunn,choy,chaput,cerna,carreiro,calahan,braggs,bourdon,bollman,bittle,behm,bauder,batt,barreras,aubuchon,anzalone,adamo,zerbe,wirt,willcox,westberg,weikel,waymire,vroman,vinci,vallejos,truesdell,troutt,trotta,tollison,toles,tichenor,symonds,surles,strayer,stgeorge,sroka,sorrentino,solares,snelson,silvestri,sikorski,shawver,schumaker,schorr,schooley,scates,satterlee,satchell,sacks,rymer,roselli,robitaille,riegel,regis,reames,provenzano,priestley,plaisance,pettey,palomares,oman,nowakowski,nace,monette,minyard,mclamb,mchone,mccarroll,masson,magoon,maddy,lundin,loza,licata,leonhardt,lema,landwehr,kircher,kinch,karpinski,johannsen,hussain,houghtaling,hoskinson,hollaway,holeman,hobgood,hilt,hiebert,gros,goggin,geissler,gadbois,gabaldon,fleshman,flannigan,fairman,epp,eilers,dycus,dunmire,duffield,dowler,deloatch,dehaan,deemer,clayborn,christofferso,chilson,chesney,chatfield,carron,canale,brigman,branstetter,bosse,borton,bonar,blau,biron,barroso,arispe,zacharias,zabel,yaeger,woolford,whetzel,weakley,veatch,vandeusen,tufts,troxel,troche,traver,townsel,tosh,talarico,swilley,sterrett,stenger,speakman,sowards,sours,souders,souder,soles,sobers,snoddy,smither,sias,shute,shoaf,shahan,schuetz,scaggs,santini,rosson,rolen,robidoux,rentas,recio,pixley,pawlowski,pawlak,paull,overbey,orear,oliveri,oldenburg,nutting,naugle,mote,mossman,moor,misner,milazzo,michelson,mcentee,mccullar,mccree,mcaleer,mazzone,mandell,manahan,malott,maisonet,mailloux,lumley,lowrie,louviere,lipinski,lindemann,leppert,leopold,leasure,labarge,kubik,knisely,knepp,kenworthy,kennelly,kelch,karg,kanter,hyer,houchin,hosley,hosler,hollon,holleman,heitman,hebb,haggins,gwaltney,guin,goulding,gorden,geraci,georges,gathers,frison,feagin,falconer,espada,erving,erikson,eisenhauer,eder,ebeling,durgin,dowdle,dinwiddie,delcastillo,dedrick,crimmins,covell,cournoyer,coria,cohan,cataldo,carpentier,canas,campa,brode,brashears,blaser,bicknell,berk,bednar,barwick,ascencio,althoff,almodovar,alamo,zirkle,zabala,wolverton,winebrenner,wetherell,westlake,wegener,weddington,vong,tuten,trosclair,tressler,theroux,teske,swinehart,swensen,sundquist,southall,socha,sizer,silverberg,shortt,shimizu,sherrard,shaeffer,scheid,scheetz,saravia,sanner,rubinstein,rozell,romer,rheaume,reisinger,randles,pullum,petrella,payan,papp,nordin,norcross,nicoletti,nicholes,newbold,nakagawa,mraz,monteith,milstead,milliner,mellen,mccardle,luft,liptak,lipp,leitch,latimore,larrison,landau,laborde,koval,izquierdo,hymel,hoskin,holte,hoefer,hayworth,hausman,harrill,harrel,hardt,gully,groover,grinnell,greenspan,graver,grandberry,gorrell,goldenberg,goguen,gilleland,garr,fuson,foye,feldmann,everly,dyess,dyal,dunnigan,downie,dolby,deatherage,cosey,cheever,celaya,caver,cashion,caplinger,cansler,byrge,bruder,breuer,breslin,brazelton,botkin,bonneau,bondurant,bohanan,bogue,boes,bodner,boatner,blatt,bickley,belliveau,beiler,beier,beckstead,bachmann,atkin,altizer,alloway,allaire,albro,abron,zellmer,yetter,yelverton,wiltshire,wiens,whidden,viramontes,vanwormer,tarantino,tanksley,sumlin,strauch,strang,stice,spahn,sosebee,sigala,shrout,seamon,schrum,schneck,schantz,ruddy,romig,roehl,renninger,reding,pyne,polak,pohlman,pasillas,oldfield,oldaker,ohanlon,ogilvie,norberg,nolette,nies,neufeld,nellis,mummert,mulvihill,mullaney,monteleone,mendonca,meisner,mcmullan,mccluney,mattis,massengill,manfredi,luedtke,lounsbury,liberatore,leek,lamphere,laforge,kuo,koo,jourdan,ismail,iorio,iniguez,ikeda,hubler,hodgdon,hocking,heacock,haslam,haralson,hanshaw,hannum,hallam,haden,garnes,garces,gammage,gambino,finkel,faucett,fahy,ehrhardt,eggen,dusek,durrant,dubay,dones,dey,depasquale,delucia,degraff,decamp,davalos,cullins,conard,clouser,clontz,cifuentes,chappel,chaffins,celis,carwile,byram,bruggeman,bressler,brathwaite,brasfield,bradburn,boose,boon,bodie,blosser,blas,bise,bertsch,bernardi,bernabe,bengtson,barrette,astorga,alday,albee,abrahamson,yarnell,wiltse,wile,wiebe,waguespack,vasser,upham,tyre,turek,traxler,torain,tomaszewski,tinnin,tiner,tindell,teed,styron,stahlman,staab,skiba,shih,sheperd,seidl,secor,schutte,sanfilippo,ruder,rondon,rearick,procter,prochaska,pettengill,pauly,neilsen,nally,mutter,mullenax,morano,meads,mcnaughton,mcmurtry,mcmath,mckinsey,matthes,massenburg,marlar,margolis,malin,magallon,mackin,lovette,loughran,loring,longstreet,loiselle,lenihan,laub,kunze,kull,koepke,kerwin,kalinowski,kagan,innis,innes,holtzman,heinemann,harshman,haider,haack,guss,grondin,grissett,greenawalt,gravel,goudy,goodlett,goldston,gokey,gardea,galaviz,gafford,gabrielson,furlow,fritch,fordyce,folger,elizalde,ehlert,eckhoff,eccleston,ealey,dubin,diemer,deschamps,delapena,decicco,debolt,daum,cullinan,crittendon,crase,cossey,coppock,coots,colyer,cluck,chamberland,burkhead,bumpus,buchan,borman,bork,boe,birkholz,berardi,benda,behnke,barter,auer,amezquita,wotring,wirtz,wingert,wiesner,whitesides,weyant,wainscott,venezia,varnell,tussey,thurlow,tabares,stiver,stell,starke,stanhope,stanek,sisler,sinnott,siciliano,shehan,selph,seager,scurlock,scranton,santucci,santangelo,saltsman,ruel,ropp,rogge,rettig,renwick,reidy,reider,redfield,quam,premo,peet,parente,paolucci,palmquist,orme,ohler,ogg,netherton,mutchler,morita,mistretta,minnis,middendorf,menzel,mendosa,mendelson,meaux,mcspadden,mcquaid,mcnatt,manigault,maney,mager,lukes,lopresti,liriano,lipton,letson,lechuga,lazenby,lauria,larimore,kwok,kwak,krupp,krupa,krum,kopec,kinchen,kifer,kerney,kerner,kennison,kegley,kays,karcher,justis,johson,jellison,janke,huskins,holzman,hinojos,hefley,hatmaker,harte,halloway,hallenbeck,goodwyn,glaspie,geise,fullwood,fryman,frew,frakes,fraire,farrer,enlow,engen,ellzey,eckles,earles,ealy,dunkley,drinkard,dreiling,draeger,dinardo,dills,desroches,desantiago,curlee,crumbley,critchlow,coury,courtright,coffield,cleek,charpentier,cardone,caples,cantin,buntin,bugbee,brinkerhoff,brackin,bourland,bohl,bogdan,blassingame,beacham,banning,auguste,andreasen,amann,almon,alejo,adelman,abston,zeno,yerger,wymer,woodberry,windley,whiteaker,westfield,weibel,wanner,waldrep,villani,vanarsdale,utterback,updike,triggs,topete,tolar,tigner,thoms,tauber,tarvin,tally,swiney,sweatman,studebaker,stennett,starrett,stannard,stalvey,sonnenberg,smithey,sieber,sickles,shinault,segars,sanger,salmeron,rothe,rizzi,rine,ricard,restrepo,ralls,ragusa,quiroga,pero,pegg,pavlik,papenfuss,oropeza,okane,neer,nee,mudge,mozingo,molinaro,mcvicker,mcgarvey,mcfalls,mccraney,matus,magers,llanos,livermore,liss,linehan,leto,leitner,laymon,lawing,lacourse,kwong,kollar,kneeland,keo,kennett,kellett,kangas,janzen,hutter,huse,huling,hoss,hohn,hofmeister,hewes,hern,harjo,habib,gust,guice,grullon,greggs,grayer,granier,grable,gowdy,giannini,getchell,gartman,garnica,ganey,gallimore,fray,fetters,fergerson,farlow,fagundes,exley,esteves,enders,edenfield,easterwood,drakeford,dipasquale,desousa,deshields,deeter,dedmon,debord,daughtery,cutts,courtemanche,coursey,copple,coomes,collis,coll,cogburn,clopton,choquette,chaidez,castrejon,calhoon,burbach,bulloch,buchman,bruhn,bohon,blough,bien,baynes,barstow,zeman,zackery,yardley,yamashita,wulff,wilken,wiliams,wickersham,wible,whipkey,wedgeworth,walmsley,walkup,vreeland,verrill,valera,umana,traub,swingle,summey,stroupe,stockstill,steffey,stefanski,statler,stapp,speights,solari,soderberg,shunk,shorey,shewmaker,sheilds,schiffer,schank,schaff,sagers,rochon,riser,rickett,reale,raglin,polen,plata,pitcock,percival,palen,pahl,orona,oberle,nocera,navas,nault,mullings,moos,montejano,monreal,minick,middlebrook,meece,mcmillion,mccullen,mauck,marshburn,maillet,mahaney,magner,maclin,lucey,litteral,lippincott,leite,leis,leaks,lamarre,kost,jurgens,jerkins,jager,hurwitz,hughley,hotaling,horstman,hohman,hocker,hively,hipps,hile,hessler,hermanson,hepworth,henn,helland,hedlund,harkless,haigler,gutierez,grindstaff,glantz,giardina,gerken,gadsden,finnerty,feld,farnum,encinas,drakes,dennie,cutlip,curtsinger,couto,cortinas,corby,chiasson,carle,carballo,brindle,borum,bober,blagg,birk,berthiaume,beahm,batres,basnight,backes,axtell,aust,atterberry,alvares,alt,alegria,yow,yip,woodell,wojciechowski,winfree,winbush,wiest,wesner,wamsley,wakeman,verner,truex,trafton,toman,thorsen,theus,tellier,tallant,szeto,strope,stills,sorg,simkins,shuey,shaul,servin,serio,serafin,salguero,saba,ryerson,rudder,ruark,rother,rohrbaugh,rohrbach,rohan,rogerson,risher,rigg,reeser,pryce,prokop,prins,priebe,prejean,pinheiro,petrone,petri,penson,pearlman,parikh,natoli,murakami,mullikin,mullane,motes,morningstar,monks,mcveigh,mcgrady,mcgaughey,mccurley,masi,marchan,manske,maez,lusby,linde,lile,likens,licon,leroux,lemaire,legette,lax,laskey,laprade,laplant,kolar,kittredge,kinley,kerber,kanagy,jetton,janik,ippolito,inouye,hunsinger,howley,howery,horrell,holthaus,hiner,hilson,hilderbrand,hasan,hartzler,harnish,harada,hansford,halligan,hagedorn,gwynn,gudino,greenstein,greear,gracey,goudeau,gose,goodner,ginsburg,gerth,gerner,fyfe,fujii,frier,frenette,folmar,fleisher,fleischmann,fetzer,eisenman,earhart,dupuy,dunkelberger,drexler,dillinger,dilbeck,dewald,demby,deford,dake,craine,como,chesnut,casady,carstens,carrick,carino,carignan,canchola,cale,bushong,burman,buono,brownlow,broach,britten,brickhouse,boyden,boulton,borne,borland,bohrer,blubaugh,bever,berggren,benevides,arocho,arends,amezcua,almendarez,zalewski,witzel,winkfield,wilhoite,vara,vangundy,vanfleet,vanetten,vandergriff,urbanski,troiano,thibodaux,straus,stoneking,stjean,stillings,stange,speicher,speegle,sowa,smeltzer,slawson,simmonds,shuttleworth,serpa,senger,seidman,schweiger,schloss,schimmel,schechter,sayler,sabb,sabatini,ronan,rodiguez,riggleman,richins,reep,reamer,prunty,porath,plunk,piland,philbrook,pettitt,perna,peralez,pascale,padula,oboyle,nivens,nickols,murph,mundt,munden,montijo,mcmanis,mcgrane,mccrimmon,manzi,mangold,malick,mahar,maddock,losey,litten,liner,leff,leedy,leavell,ladue,krahn,kluge,junker,iversen,imler,hurtt,huizar,hubbert,howington,hollomon,holdren,hoisington,hise,heiden,hauge,hartigan,gutirrez,griffie,greenhill,gratton,granata,gottfried,gertz,gautreaux,furry,furey,funderburg,flippen,fitzgibbon,dyar,drucker,donoghue,dildy,devers,detweiler,despres,denby,degeorge,cueto,cranston,courville,clukey,cirillo,chon,chivers,caudillo,catt,butera,bulluck,buckmaster,braunstein,bracamonte,bourdeau,bonnette,bobadilla,boaz,blackledge,beshears,bernhard,bergeson,baver,barthel,balsamo,bak,aziz,awad,authement,altom,altieri,abels,zigler,zhu,younker,yeomans,yearwood,wurster,winget,whitsett,wechsler,weatherwax,wathen,warriner,wanamaker,walraven,viens,vandemark,vancamp,uchida,triana,tinoco,terpstra,tellis,tarin,taranto,takacs,studdard,struthers,strout,stiller,spataro,soderquist,sliger,silberman,shurtleff,sheetz,ritch,reif,raybon,ratzlaff,radley,putt,putney,pinette,piner,petrin,parise,osbourne,nyman,northington,noblitt,nishimura,neher,nalls,naccarato,mucha,mounce,miron,millis,meaney,mcnichols,mckinnis,mcjunkin,mcduffy,manrique,mannion,mangual,malveaux,mains,lumsden,lohmann,lipe,lightsey,lemasters,leist,laxton,laverriere,latorre,lamons,kral,kopf,knauer,kitt,kaul,karas,kamps,jusino,islam,hullinger,huges,hornung,hiser,hempel,helsel,hassinger,hargraves,hammes,hallberg,gutman,gumbs,gruver,graddy,gonsales,goncalves,glennon,gilford,geno,freshour,flippo,fifer,fason,farrish,fallin,ewert,estepp,escudero,ensminger,emberton,elms,ellerbe,eide,dysart,dougan,dierking,dicus,detrick,deroche,depue,demartino,delosreyes,dalke,culbreath,crownover,crisler,crass,corsi,chagnon,centers,cavanagh,casson,carollo,cadwallader,burnley,burciaga,burchard,broadhead,bolte,berens,bellman,bellard,baril,antonucci,wolfgram,winsor,wimbish,wier,wallach,viveros,vento,varley,vanslyke,vangorder,touchstone,tomko,tiemann,throop,tamura,talmadge,swayze,sturdevant,strauser,stolz,stenberg,stayton,spohn,spillers,spillane,sluss,slavens,simonetti,shofner,shead,senecal,seales,schueler,schley,schacht,sauve,sarno,salsbury,rothschild,rosier,rines,reveles,rein,redus,redfern,reck,ranney,raggs,prout,prill,preble,prager,plemons,pilon,piccirillo,pewitt,pesina,pecora,otani,orsini,oestreich,odea,ocallaghan,northup,niehaus,newberg,nasser,narron,monarrez,mishler,mcsherry,mcelfresh,mayon,mauer,mattice,marrone,marmolejo,marini,malm,machen,lunceford,loewen,liverman,litwin,linscott,levins,lenox,legaspi,leeman,leavy,lannon,lamson,lambdin,labarre,knouse,klemm,kleinschmidt,kirklin,keels,juliano,howser,hosier,hopwood,holyfield,hodnett,hirsh,heimann,heckel,harger,hamil,hajek,gurganus,gunning,grange,gonzalas,goggins,gerow,gaydos,garduno,ganley,galey,farner,engles,emond,emert,ellenburg,edick,duell,dorazio,dimond,diederich,depuy,dempster,demaria,dehoyos,dearth,dealba,czech,crose,crespin,cogdill,clinard,cipriano,chretien,cerny,ceniceros,celestin,caple,cacho,burrill,buhr,buckland,branam,boysen,bovee,boos,boler,blom,blasko,beyers,belz,belmonte,bednarz,beckmann,beaudin,bazile,barbeau,balentine,abrahams,zielke,yunker,yeates,wrobel,wike,whisnant,wherry,wagnon,vogan,vansant,vannest,vallo,ullery,towles,towell,thill,taormina,tannehill,taing,storrs,stickles,stetler,sparling,solt,silcox,sheard,shadle,seman,selleck,schlemmer,scher,sapien,sainz,roye,romain,rizzuto,resch,rentz,rasch,ranieri,purtell,primmer,portwood,pontius,pons,pletcher,pledger,pirkle,pillsbury,pentecost,paxson,ortez,oles,mullett,muirhead,mouzon,mork,mollett,mohn,mitcham,melillo,medders,mcmiller,mccleery,mccaughey,mak,maciejewski,macaulay,lute,lipman,lewter,larocque,langton,kriner,knipp,killeen,karn,kalish,kaczor,jonson,jerez,jarrard,janda,hymes,hollman,hollandsworth,holl,hobdy,hennen,hemmer,hagins,haddox,guitierrez,guernsey,gorsuch,gholson,genova,gazaway,gauna,gammons,freels,fonville,fetterman,fava,farquhar,farish,fabela,escoto,eisen,dossett,dority,dorfman,demmer,dehn,dawley,darbonne,damore,damm,crosley,cron,crompton,crichton,cotner,cordon,conerly,colvard,clauson,cheeseman,cavallaro,castille,cabello,burgan,buffum,bruss,brassfield,bowerman,bothwell,borgen,bonaparte,bombard,boivin,boissonneault,bogner,bodden,boan,bittinger,bickham,bedolla,bale,bainbridge,aybar,avendano,ashlock,amidon,almanzar,akridge,ackermann,zager,worrall,winans,wilsey,wightman,westrick,wenner,warne,warford,verville,utecht,upson,tuma,tseng,troncoso,trollinger,torbert,taulbee,sutterfield,stough,storch,stonebraker,stolle,stilson,stiefel,steptoe,stepney,stender,stemple,staggers,spurrier,spinney,spengler,smartt,skoog,silvis,sieg,shuford,selfridge,seguin,sedgwick,sease,scotti,schroer,schlenker,schill,savarese,sapienza,sanson,sandefur,salamone,rusnak,rudisill,rothermel,roca,resendiz,reliford,rasco,raiford,quisenberry,quijada,pullins,puccio,postell,poppe,pinter,piche,petrucci,pellegrin,pelaez,paton,pasco,parkes,paden,pabst,olmsted,newlon,mynatt,mower,morrone,moree,moffat,mixson,minner,millette,mederos,mcgahan,mcconville,maughan,massingill,marano,macri,lovern,lichtenstein,leonetti,lehner,lawley,laramie,lappin,lahti,lago,lacayo,kuester,kincade,juhl,jiron,jessop,jarosz,jain,hults,hoge,hodgins,hoban,hinkson,hillyard,herzig,hervey,henriksen,hawker,hause,hankerson,gregson,golliday,gilcrease,gessner,gerace,garwood,garst,gaillard,flinchum,fishel,fishback,filkins,fentress,fabre,ethier,eisner,ehrhart,efird,drennon,dominy,domingue,dipaolo,dinan,dimartino,deskins,dengler,defreitas,defranco,dahlin,cutshaw,cuthbert,croyle,crothers,critchfield,cowie,costner,coppedge,copes,ciccone,caufield,capo,cambron,cambridge,buser,burnes,buhl,buendia,brindley,brecht,bourgoin,blackshire,birge,benninger,bembry,beil,begaye,barrentine,banton,balmer,baity,auerbach,ambler,alexandre,ackerson,zurcher,zell,wynkoop,wallick,waid,vos,vizcaino,vester,veale,vandermark,vanderford,tuthill,trivette,thiessen,tewksbury,tao,tabron,swasey,swanigan,stoughton,stoudt,stimson,stecker,stead,spady,souther,smoak,sklar,simcox,sidwell,seybert,sesco,seeman,schwenk,schmeling,rossignol,robillard,robicheaux,riveria,rippeon,ridgley,remaley,rehkop,reddish,rauscher,quirion,pusey,pruden,pressler,potvin,pospisil,paradiso,pangburn,palmateer,ownby,otwell,osterberg,osmond,olsson,oberlander,nusbaum,novack,nokes,nicastro,nehls,naber,mulhern,motter,moretz,milian,mckeel,mcclay,mccart,matsuda,martucci,marple,marko,marciniak,manes,mancia,macrae,lybarger,lint,lineberger,levingston,lecroy,lattimer,laseter,kulick,krier,knutsen,klem,kinne,kinkade,ketterman,kerstetter,kersten,karam,joshi,jent,jefcoat,hillier,hillhouse,hettinger,henthorn,henline,helzer,heitzman,heineman,heenan,haughton,haris,harbert,haman,grinstead,gremillion,gorby,giraldo,gioia,gerardi,geraghty,gaunt,gatson,gardin,gans,gammill,friedlander,frahm,fossett,fosdick,forbush,fondren,fleckenstein,fitchett,filer,feliz,feist,ewart,esters,elsner,edgin,easterly,dussault,durazo,devereaux,deshotel,deckert,dargan,cornman,conkle,condit,claunch,clabaugh,cheesman,chea,charney,casella,carone,carbonell,canipe,campana,calles,cabezas,cabell,buttram,bustillos,buskirk,boyland,bourke,blakeley,berumen,berrier,belli,behrendt,baumbach,bartsch,baney,arambula,alldredge,allbritton,ziemba,zanders,youngquist,yoshioka,yohe,wunder,woodfin,wojtowicz,winkel,wilmore,willbanks,wesolowski,wendland,walko,votaw,vanek,uriarte,urbano,turnipseed,triche,trautman,towler,tokarz,temples,tefft,teegarden,syed,swigart,stoller,stapler,stansfield,smit,smelley,sicard,shulman,shew,shear,sheahan,sharpton,selvidge,schlesinger,savell,sandford,sabatino,rosenbloom,roepke,rish,rhames,renken,reger,quarterman,puig,prasad,poplar,pizano,pigott,phair,petrick,patt,pascua,paramore,papineau,olivieri,ogren,norden,noga,nisbet,munk,morvant,moro,moloney,merz,meltzer,mellinger,mehl,mcnealy,mckernan,mchaney,mccleskey,mcandrews,mayton,markert,maresca,maner,mandujano,malpass,macintyre,lytton,lyall,lummus,longshore,longfellow,lokey,locher,leverette,lepe,lefever,leeson,lederer,lampert,lagrone,kreider,korth,knopf,kleist,keltner,kelling,kaspar,kappler,josephs,huckins,holub,hofstetter,hoehn,higginson,hennings,heid,havel,hauer,harnden,hargreaves,hanger,guild,guidi,grate,grandy,grandstaff,goza,goodridge,goodfellow,goggans,godley,giusti,gilyard,geoghegan,galyon,gaeta,funes,font,flanary,fales,erlandson,ellett,edinger,dziedzic,duerr,draughn,donoho,dimatteo,devos,dematteo,degnan,darlington,danis,dahlstrom,dahlke,czajkowski,cumbie,culbert,crosier,croley,corry,clinger,chalker,cephas,caywood,capehart,cales,cadiz,bussiere,burriss,burkart,brundidge,bronstein,bradt,boydston,bostrom,borel,bolles,blay,blackwelder,bissett,bevers,bester,bernardino,benefiel,belote,beedle,beckles,baysinger,bassler,bartee,barlett,bargas,barefield,baptista,arterburn,armas,apperson,amoroso,amedee,zullo,zellner,yelton,willems,wilkin,wiggin,widman,welk,weingarten,walla,viers,vess,verdi,veazey,vannote,tullos,trudell,trower,trosper,trimm,trew,tousignant,topp,tocco,thoreson,terhune,tatom,suniga,sumter,steeves,stansell,soltis,sloss,slaven,shisler,shanley,servantes,selders,segrest,seese,seeber,schaible,savala,sartor,rutt,rumbaugh,ruis,roten,roessler,ritenour,riney,restivo,renard,rakestraw,rake,quiros,pullin,prudhomme,primeaux,prestridge,presswood,ponte,polzin,poarch,pittenger,piggott,pickell,phaneuf,parvin,parmley,palmeri,ozment,ormond,ordaz,ono,olea,obanion,oakman,novick,nicklas,nemec,nappi,mund,morfin,mera,melgoza,melby,mcgoldrick,mcelwain,mcchristian,mccaw,marquart,marlatt,markovich,mahr,lupton,lucus,lorusso,lerman,leddy,leaman,leachman,lavalle,laduke,kummer,koury,konopka,koh,koepp,kloss,klock,khalil,kernan,kappel,jakes,inoue,hutsell,howle,honore,hockman,hockaday,hiltz,hetherington,hesser,hershman,heffron,headen,haskett,hartline,harned,guillemette,guglielmo,guercio,greenbaum,goris,glines,gilmour,gardella,gadd,gabler,gabbert,fuselier,freudenburg,fragoso,follis,flemings,feltman,febus,farren,fallis,evert,ekstrom,eastridge,dyck,dufault,dubreuil,drapeau,domingues,dolezal,dinkel,didonato,devitt,demott,daughtrey,daubert,das,creason,crary,costilla,chipps,cheatwood,carmean,canton,caffrey,burgher,buker,brunk,brodbeck,brantner,bolivar,boerner,bodkin,biel,bencomo,bellino,beliveau,beauvais,beaupre,baylis,baskett,barcus,baltz,asay,arney,arcuri,ankney,agostini,addy,zwilling,zubia,zollinger,zeitz,yanes,winship,winningham,wickline,webre,waddington,vosburgh,verrett,varnum,vandeventer,vacca,usry,towry,touchet,tookes,tonkin,timko,tibbitts,thedford,tarleton,talty,talamantez,tafolla,sugg,strecker,steffan,spiva,slape,shatzer,seyler,seamans,schmaltz,schipper,sasso,ruppe,roudebush,riemer,richarson,revilla,reichenbach,ratley,railsback,quayle,poplin,poorman,ponton,pollitt,poitras,piscitelli,piedra,pew,perera,penwell,pelt,parkhill,paladino,ore,oram,olmo,oliveras,olivarria,ogorman,naron,muncie,mowbray,morones,moretti,monn,mitts,minks,minarik,mimms,milliron,millington,millhouse,messersmith,mcnett,mckinstry,mcgeorge,mcdill,mcateer,mazzeo,matchett,mahood,mabery,lundell,louden,losoya,lisk,lezama,leib,lebo,lanoue,lanford,lafortune,kump,krone,kreps,kott,kopecky,kolodziej,kinman,kimmons,kelty,kaster,karlson,kania,joyal,jenner,jasinski,jandreau,isenhour,hunziker,huhn,houde,houchins,holtman,hodo,heyman,hentges,hedberg,hayne,haycraft,harshbarger,harshaw,harriss,haring,hansell,hanford,handler,hamblen,gunnell,groat,gorecki,gochenour,gleeson,genest,geiser,fulghum,friese,fridley,freeborn,frailey,flaugher,fiala,ettinger,etheredge,espitia,eriksen,engelbrecht,engebretson,elie,eickhoff,edney,edelen,eberhard,eastin,eakes,driggs,doner,donaghy,disalvo,deshong,dahms,dahlquist,curren,cripe,cree,creager,corle,conatser,commons,coggin,coder,coaxum,closson,clodfelter,classen,chittenden,castilleja,casale,cartee,carriere,canup,canizales,burgoon,bunger,bugarin,buchanon,bruning,bruck,brookes,broadwell,brier,brekke,breese,bracero,bowley,bowersox,bose,bogar,blauser,blacker,bjorklund,baumer,basler,baize,baden,auman,amundsen,amore,alvarenga,adamczyk,yerkes,yerby,yamaguchi,worthey,wolk,wixom,wiersma,wieczorek,whiddon,weyer,wetherington,wein,watchman,warf,wansley,vesely,velazco,vannorman,valasquez,utz,urso,turco,turbeville,trivett,toothaker,toohey,tondreau,thaler,sylvain,swindler,swigert,swider,stiner,stever,steffes,stampley,stair,smidt,skeete,silvestre,shutts,shealey,seigler,schweizer,schuldt,schlichting,scherr,saulsberry,saner,rosin,rosato,roling,rohn,rix,rister,remley,remick,recinos,ramm,raabe,pursell,poythress,poli,pokorny,pettry,petrey,petitt,penman,payson,paquet,pappalardo,outland,orenstein,nuttall,nuckols,nott,nimmo,murtagh,mousseau,moulder,mooneyhan,moak,minch,miera,mercuri,meighan,mcnelly,mcguffin,mccreery,mcclaskey,mainor,luongo,lundstrom,loughman,lobb,linhart,lever,leu,leiter,lehoux,lehn,lares,lapan,langhorne,lamon,ladwig,ladson,kuzma,kreitzer,knop,keech,kea,kadlec,jhonson,jantz,inglis,husk,hulme,housel,hofman,hillery,heidenreich,heaps,haslett,harting,hartig,hamler,halton,hallum,gutierres,guida,guerrier,grossi,gress,greenhalgh,gravelle,gow,goslin,gonyea,gipe,gerstner,gasser,garceau,gannaway,gama,gallop,gaiser,fullilove,foutz,fossum,flannagan,farrior,faller,ericksen,entrekin,enochs,englund,ellenberger,eastland,earwood,dudash,drozd,desoto,delph,dekker,dejohn,degarmo,defeo,defalco,deblois,dacus,cudd,crossen,crooms,cronan,costin,cordray,comerford,colegrove,coldwell,claassen,chartrand,castiglione,carte,cardella,carberry,capp,capobianco,cangelosi,buch,brunell,brucker,brockett,brizendine,brinegar,brimer,brase,bosque,bonk,bolger,bohanon,bohan,blazek,berning,bergan,bennette,beauchemin,battiste,barra,balogh,avallone,aubry,ashcroft,asencio,arledge,anchondo,alvord,acheson,zaleski,yonker,wyss,wycoff,woodburn,wininger,winders,willmon,wiechmann,westley,weatherholt,warnick,wardle,warburton,volkert,villanveva,veit,vass,vanallen,tung,toribio,toothman,tiggs,thornsberry,thome,tepper,teeple,tebo,tassone,tann,stucker,stotler,stoneman,stehle,stanback,stallcup,spurr,speers,spada,solum,smolen,sinn,silvernail,sholes,shives,shain,secrest,seagle,schuette,schoch,schnieders,schild,schiavone,schiavo,scharff,santee,sandell,salvo,rollings,rivenburg,ritzman,rist,reynosa,retana,regnier,rarick,ransome,rall,propes,prall,poyner,ponds,poitra,pippins,pinion,phu,perillo,penrose,pendergraft,pelchat,patenaude,palko,odoms,oddo,novoa,noone,newburn,negri,nantz,mosser,moshier,molter,molinari,moler,millman,meurer,mendel,mcray,mcnicholas,mcnerney,mckillip,mcilvain,mcadory,marmol,marinez,manzer,mankin,makris,majeski,maffei,luoma,luman,luebke,luby,lomonaco,loar,litchford,lintz,licht,levenson,legge,lanigan,krom,kreger,koop,kober,klima,kitterman,kinkead,kimbell,kilian,kibbe,kendig,kemmer,kash,jenkin,inniss,hurlbut,hunsucker,huckabee,hoxie,hoglund,hockensmith,hoadley,hinkel,higuera,herrman,heiner,hausmann,haubrich,hassen,hanlin,hallinan,haglund,hagberg,gullo,gullion,groner,greenwalt,gobert,glowacki,glessner,gines,gildersleeve,gildea,gerke,gebhard,gatton,gately,galasso,fralick,fouse,fluharty,faucette,fairfax,evanoff,elser,ellard,egerton,ector,ebling,dunkel,duhart,drysdale,dostal,dorey,dolph,doles,dismukes,digregorio,digby,dewees,deramus,denniston,dennett,deloney,delaughter,cuneo,cumberland,crotts,crosswhite,cremeans,creasey,cottman,cothern,costales,cosner,corpus,colligan,cobble,clutter,chupp,chevez,chatmon,chaires,caplan,caffee,cabana,burrough,burditt,buckler,brunswick,brouillard,broady,bowlby,bouley,borgman,boltz,boddy,blackston,birdsell,bedgood,bate,bartos,barriga,barna,barcenas,banach,baccus,auclair,ashman,arter,arendt,ansell,allums,allender,alber,albarran,adelson,zoll,wysong,wimbley,wildes,whitis,whitehill,whicker,weymouth,weldy,wark,wareham,waddy,viveiros,vath,vandoren,vanderhoof,unrein,uecker,tsan,trepanier,tregre,torkelson,tobler,tineo,timmer,swopes,swofford,sweeten,swarts,summerfield,sumler,stucky,strozier,stigall,stickel,stennis,stelzer,steely,slayden,skillern,shurtz,shelor,shellenbarger,shand,shabazz,seo,scroggs,schwandt,schrecengost,schoenrock,schirmer,sandridge,ruzicka,rozek,rowlands,roser,rosendahl,romanowski,rolston,riggio,reichman,redondo,reay,rawlinson,raskin,raine,quandt,purpura,pruneda,prevatte,prettyman,pinedo,pierro,pidgeon,phillippi,pfeil,penix,peasley,paro,ospina,ortegon,ogata,ogara,normandin,nordman,nims,nassar,motz,morlan,mooring,moles,moir,mizrahi,mire,minaya,millwood,mikula,messmer,meikle,mctaggart,mcgonagle,mcewan,mccasland,mccane,mccaffery,mcalexander,mattocks,matranga,martone,markland,maravilla,manno,mancha,mallery,magno,lorentz,locklin,livingstone,lipford,lininger,lepley,leming,lemelin,leadbetter,lawhon,lattin,langworthy,lampman,lambeth,lamarr,lahey,krajewski,klopp,kinnison,kestner,kennell,karim,jozwiak,jakubowski,ivery,iliff,iddings,hudkins,houseman,holz,holderman,hoehne,highfill,hiett,heskett,heldt,hedman,hayslett,hatchell,hasse,hamon,hamada,hakala,haislip,haffey,hackbarth,guo,gullickson,guerrette,greenblatt,goudreau,gongora,godbout,glaude,gills,gillison,gigliotti,gargano,gallucci,galli,galante,frasure,fodor,fizer,fishburn,finkbeiner,finck,fager,estey,espiritu,eppinger,epperly,emig,eckley,dray,dorsch,dille,devita,deslauriers,demery,delorme,delbosque,dauphin,dantonio,curd,crume,cozad,cossette,comacho,climer,chadbourne,cespedes,cayton,castaldo,carpino,carls,capozzi,canela,buzard,busick,burlison,brinkmann,bridgeforth,bourbeau,bornstein,bonfiglio,boice,boese,biondi,bilski,betton,berwick,berlanga,behan,becraft,barrientez,banh,balke,balderrama,bahe,bachand,armer,arceo,aliff,alatorre,zermeno,younce,yeoman,yamasaki,wroten,woodby,winer,willits,wilcoxon,wehmeyer,waterbury,wass,wann,wachtel,vizcarra,veitch,vanderbilt,vallone,vallery,ureno,tyer,tipps,tiedeman,theberge,texeira,taub,tapscott,stutts,stults,stukes,spink,sottile,smithwick,slane,simeone,silvester,siegrist,shiffer,sheedy,sheaffer,severin,sellman,scotto,schupp,schueller,schreier,schoolcraft,schoenberger,schnabel,sangster,samford,saliba,ryles,ryans,rossetti,rodriguz,risch,riel,rezendes,rester,rencher,recker,rathjen,profitt,poteete,polizzi,perrigo,patridge,osby,orvis,opperman,oppenheim,onorato,olaughlin,ohagan,ogles,oehler,obyrne,nuzzo,nickle,nease,neagle,navarette,nagata,musto,morison,montz,mogensen,mizer,miraglia,migliore,menges,mellor,mcnear,mcnab,mcloud,mcelligott,mccollom,maynes,marquette,markowski,marcantonio,maldanado,macey,lundeen,longino,lisle,linthicum,limones,lesure,lesage,lauver,laubach,latshaw,lary,lapham,lacoste,lacher,kutcher,knickerbocker,klos,klingler,kleiman,kittleson,kimbrel,kemmerer,kelson,keese,kallas,jurgensen,junkins,juergens,jolliff,jelks,janicki,jang,ingles,huguley,huggard,howton,hone,holford,hogle,hipple,heimbach,heider,heidel,havener,hattaway,harrah,hanscom,hankinson,hamdan,gridley,goulette,goulart,goodrow,girardi,gent,gautreau,gandara,gamblin,galipeau,fyffe,furrow,fulp,fricks,frase,frandsen,fout,foulks,fouche,foskey,forgey,foor,fobbs,finklea,fincham,figueiredo,festa,ferrier,fellman,eslick,eilerman,eckart,eaglin,dunfee,dumond,drewry,douse,dimick,diener,dickert,deines,declue,daw,dattilo,danko,custodio,cuccia,crunk,crispin,corp,corea,coppin,considine,coniglio,conboy,cockrum,clute,clewis,christiano,channell,cerrato,cecere,catoe,castillon,castile,carstarphen,carmouche,caperton,buteau,bumpers,brey,brazeal,brassard,braga,bradham,bourget,borrelli,borba,boothby,bohr,bohm,boehme,bodin,bloss,blocher,bizzell,bieker,berthelot,bernardini,berends,benard,belser,baze,bartling,barrientes,barras,barcia,banfield,aurand,artman,arnott,arend,amon,almaguer,allee,albarado,alameda,abdo,zuehlke,zoeller,yokoyama,yocom,wyllie,woolum,wint,winland,wilner,wilmes,whitlatch,westervelt,walthall,walkowiak,walburn,viviano,vanderhoff,valez,ugalde,trumbull,todaro,tilford,tidd,tibbits,terranova,templeman,tannenbaum,talmage,tabarez,swearengin,swartwood,svendsen,strum,strack,storie,stockard,steinbeck,starns,stanko,stankiewicz,stacks,stach,sproles,spenser,smotherman,slusser,sinha,silber,siefert,siddiqui,shuff,sherburne,seldon,seddon,schweigert,schroeter,schmucker,saffold,rutz,rundle,rosinski,rosenow,rogalski,ridout,rhymer,replogle,raygoza,ratner,rascoe,rahm,quast,pressnell,predmore,pou,porto,pleasants,pigford,pavone,patnaude,parramore,papadopoulos,palmatier,ouzts,oshields,ortis,olmeda,olden,okamoto,norby,nitz,niebuhr,nevius,neiman,neidig,neece,murawski,mroz,moylan,moultry,mosteller,moring,morganti,mook,moffet,mettler,merlo,mengel,mendelsohn,meli,melchior,mcmeans,mcfaddin,mccullers,mccollister,mccloy,mcclaine,maury,maser,martelli,manthey,malkin,maio,magwood,maginnis,mabon,luton,lusher,lucht,lobato,levis,letellier,legendre,latson,larmon,largo,landreneau,landgraf,lamberson,kurland,kresge,korman,korando,klapper,kitson,kinyon,kincheloe,kawamoto,kawakami,jenney,jeanpierre,ivers,issa,ince,hollier,hollars,hoerner,hodgkinson,hiott,hibbitts,herlihy,henricks,heavner,hayhurst,harvill,harewood,hanselman,hanning,gustavson,grizzard,graybeal,gravley,gorney,goll,goehring,godines,gobeil,glickman,giuliano,gimbel,geib,gayhart,gatti,gains,gadberry,frei,fraise,fouch,forst,forsman,folden,fogleman,fetty,feely,fabry,eury,estill,epling,elamin,echavarria,dutil,duryea,dumais,drago,downard,douthit,doolin,dobos,dison,dinges,diebold,desilets,deshazo,depaz,degennaro,dall,cyphers,cryer,croce,crisman,credle,coriell,copp,compos,colmenero,cogar,carnevale,campanella,caley,calderone,burtch,brouwer,brehmer,brassell,brafford,bourquin,bourn,bohnert,blewett,blass,blakes,bhakta,besser,berge,bellis,balfour,avera,applin,ammon,alsop,aleshire,akbar,zoller,zapien,wymore,wyble,wolken,wix,wickstrom,whobrey,whigham,westerlund,welsch,weisser,weisner,weinstock,wehner,watlington,wakeland,wafer,victorino,veltri,veith,urich,uresti,umberger,twedt,tuohy,tschida,trumble,troia,trimmer,topps,tonn,tiernan,threet,thrall,thetford,teneyck,tartaglia,strohl,streater,strausbaugh,stradley,stonecipher,steadham,stansel,stalcup,stabile,sprenger,spradley,speier,southwood,sorrels,slezak,skow,sirmans,simental,sifford,sievert,shover,sheley,selzer,scriven,schwindt,schwan,schroth,saylors,saragosa,sant,salaam,saephan,routt,rousey,ros,rolfes,rieke,rieder,richeson,redinger,rasnick,rapoza,rambert,quist,pyron,pullman,przybylski,pridmore,pooley,pines,perkinson,perine,perham,pecor,peavler,partington,panton,oliverio,olague,ohman,ohearn,noyola,nicolai,nebel,murtha,mowrey,moroney,morgenstern,morant,monsour,moffit,mijares,meriwether,mendieta,melendrez,mejorado,mckittrick,mckey,mckenny,mckelvy,mcelvain,mccoin,mazzarella,mazon,maurin,matthies,maston,maske,marzano,marmon,marburger,mangus,mangino,mallet,luo,losada,londono,lobdell,lipson,lesniak,leighty,lei,lavallie,lareau,laperle,lape,laforce,laffey,kuehner,kravitz,kowalsky,kohr,kinsman,keppler,kennemer,keiper,kaler,jun,jelinek,jarnagin,isakson,hypes,hutzler,huls,horak,hitz,hice,herrell,henslee,heitz,heiss,heiman,hasting,hartwick,harmer,hammontree,hakes,guse,guillotte,groleau,greve,greenough,golub,golson,goldschmidt,golder,godbolt,gilmartin,gies,gibby,geren,genthner,gendreau,gemmill,gaymon,galyean,galeano,friar,folkerts,fleeman,fitzgibbons,ferranti,felan,farrand,eoff,enger,engels,ducksworth,duby,drumheller,douthitt,donis,dixion,dittrich,dials,descoteaux,depaul,denker,demuth,demelo,delacerda,deforge,danos,dalley,daigneault,cybulski,cothren,corns,corkery,copas,clubb,clore,chitty,chichester,chace,catanzaro,castonguay,cassella,carlberg,cammarata,calle,cajigas,byas,buzbee,busey,burling,bufkin,brzezinski,brun,brickner,brabham,boller,bockman,bleich,blakeman,bisbee,bier,bezanson,bevilacqua,besaw,berrian,bequette,beauford,baumgarten,baudoin,batie,basaldua,bardin,bangert,banes,backlund,avitia,artz,archey,apel,amico,alam,aden,zebrowski,yokota,wormley,wootton,womac,wiltz,wigington,whitehorn,whisman,weisgerber,weigle,weedman,watkin,wasilewski,wadlington,wadkins,viverette,vidaurri,vidales,vezina,vanleer,vanhoy,vanguilder,vanbrunt,updegraff,tylor,trinkle,touchette,tilson,tilman,tengan,tarkington,surrett,summy,streetman,straughter,steere,spruell,spadaro,solley,smathers,silvera,siems,shreffler,sholar,selden,schaper,samayoa,ruggeri,rowen,rosso,rosenbalm,roose,ronquillo,rogowski,rexford,repass,renzi,renick,rehberg,ranck,raffa,rackers,raap,puglisi,prinz,pounders,pon,pompa,plasencia,pipkins,petrosky,pelley,pauls,pauli,parkison,parisien,pangle,pancoast,palazzolo,owenby,overbay,orris,orlowski,nipp,newbern,nedd,nealon,najar,mysliwiec,myres,musson,murrieta,munsell,mumma,muldowney,moyle,mowen,morejon,moodie,monier,mikkelsen,miers,metzinger,melin,mcquay,mcpeek,mcneeley,mcglothin,mcghie,mcdonell,mccumber,mccranie,mcbean,mayhugh,marts,marenco,manges,lynam,lupien,luff,luebbert,loh,loflin,lococo,loch,lis,linke,lightle,lewellyn,leishman,lebow,lebouef,leanos,lanz,landy,landaverde,lacefield,kyler,kuebler,kropf,kroeker,kluesner,klass,kimberling,kilkenny,kiker,ketter,kelemen,keasler,kawamura,karst,kardos,igo,huseman,huseby,hurlbert,huard,hottinger,hornberger,hopps,holdsworth,hensen,heilig,heeter,harpole,haak,gutowski,gunnels,grimmer,gravatt,granderson,gotcher,gleaves,genao,garfinkel,frerichs,foushee,flanery,finnie,feldt,fagin,ewalt,ellefson,eiler,eckhart,eastep,digirolamo,didomenico,devera,delavega,defilippo,debusk,daub,damiani,cupples,crofoot,courter,coto,costigan,corning,corman,corlett,cooperman,collison,coghlan,cobbins,coady,coachman,clothier,cipolla,chmielewski,chiodo,chatterton,chappelle,chairez,ceron,casperson,casler,casados,carrow,carlino,carico,cardillo,caouette,canto,canavan,cambra,byard,buterbaugh,buse,bucy,buckwalter,bubb,bryd,brissette,brault,bradwell,boshears,borchert,blansett,biondo,biehl,bessey,belles,beeks,beekman,beaufort,bayliss,bardsley,avilla,astudillo,ardito,antunez,aderholt,abate,yowell,yin,yearby,wurst,woolverton,woolbright,wildermuth,whittenburg,whitely,wetherbee,wenz,welliver,welling,wason,warlick,voorhies,vivier,villines,verde,veiga,varghese,vanwyk,vanwingerden,vanhorne,umstead,twiggs,tusing,trego,tompson,tinkle,thoman,thole,tatman,tartt,suda,studley,strock,strawbridge,stokely,stec,stalter,speidel,spafford,sontag,sokolowski,skillman,skelley,skalski,sison,sippel,sinquefield,siegle,sher,sharrow,setliff,sellner,selig,seibold,seery,scriber,schull,schrupp,schippers,saulsbury,sao,santillo,sanor,rubalcaba,roosa,ronk,robbs,roache,riebe,reinoso,quin,preuss,pottorff,pontiff,plouffe,picou,picklesimer,pettyjohn,petti,penaloza,parmelee,pardee,palazzo,overholt,ogawa,ofarrell,nolting,noda,nickson,nevitt,neveu,navarre,murrow,munz,mulloy,monzo,milliman,metivier,merlino,mcpeters,mckissack,mckeen,mcgurk,mcfee,mcfarren,mcelwee,mceachin,mcdonagh,mccarville,mayhall,mattoon,martello,marconi,marbury,manzella,maly,malec,maitland,maheu,maclennan,lyke,luera,lowenstein,losh,lopiccolo,longacre,loman,loden,loaiza,lieber,libbey,lenhardt,lefebre,lauterbach,lauritsen,lass,larocco,larimer,lansford,lanclos,lamay,lal,kulikowski,kriebel,kosinski,kleinman,kleiner,kleckner,kistner,kissner,kissell,keisler,keeble,keaney,kale,joly,jimison,ikner,hursey,hruska,hove,hou,hosking,hoose,holle,hoeppner,hittle,hitchens,hirth,hinerman,higby,hertzog,hentz,hensler,heier,hegg,hassel,harpe,hara,hain,hagopian,grimshaw,grado,gowin,gowans,googe,goodlow,goering,gleaton,gidley,giannone,gascon,garneau,gambrel,galaz,fuentez,frisina,fresquez,fraher,feuerstein,felten,everman,ertel,erazo,ensign,endo,ellerman,eichorn,edgell,ebron,eaker,dundas,duncanson,duchene,ducan,dombroski,doman,dickison,dewoody,deloera,delahoussaye,dejean,degroat,decaro,dearmond,dashner,dales,crossett,cressey,cowger,cornette,corbo,coplin,coover,condie,cokley,ceaser,cannaday,callanan,cadle,buscher,bullion,bucklin,bruening,bruckner,brose,branan,bradway,botsford,bortz,borelli,bonetti,bolan,boerger,bloomberg,bingman,bilger,berns,beringer,beres,beets,beede,beaudet,beachum,baughn,bator,bastien,basquez,barreiro,barga,baratta,balser,baillie,axford,attebery,arakaki,annunziata,andrzejewski,ament,amendola,adcox,abril,zenon,zeitler,zambrana,ybanez,yagi,wolak,wilcoxson,whitesel,whitehair,weyand,westendorf,welke,weinmann,weesner,weekes,wedel,weatherall,warthen,vose,villalta,viator,vaz,valtierra,urbanek,tulley,trojanowski,trapani,toups,torpey,tomita,tindal,tieman,tevis,tedrow,taul,tash,tammaro,sylva,swiderski,sweeting,sund,stutler,stich,sterns,stegner,stalder,splawn,speirs,southwell,soltys,smead,slye,skipworth,sipos,simmerman,sidhu,shuffler,shingleton,shadwick,sermons,seefeldt,scipio,schwanke,schreffler,schiro,scheiber,sandoz,samsel,ruddell,royse,rouillard,rotella,rosalez,romriell,rizer,riner,rickards,rhoton,rhem,reppert,rayl,raulston,raposo,rainville,radel,quinney,purdie,pizzo,pincus,petrus,pendelton,pendarvis,peltz,peguero,peete,patricio,patchett,parrino,papke,palafox,ottley,ostby,oritz,ogan,odegaard,oatman,noell,nicoll,newhall,newbill,netzer,nettleton,neblett,murley,mungo,mulhall,mosca,morissette,morford,monsen,mitzel,miskell,minder,mehaffey,mcquillen,mclennan,mcgrail,mccreight,mayville,maysonet,maust,mathieson,mastrangelo,maskell,manz,malmberg,makela,madruga,lotts,longnecker,logston,littell,liska,lindauer,lillibridge,levron,letchworth,lesh,leffel,leday,leamon,kulas,kula,kucharski,kromer,kraatz,konieczny,konen,komar,kivett,kirts,kinnear,kersh,keithley,keifer,judah,jimenes,jeppesen,jansson,huntsberry,hund,huitt,huffine,hosford,holmstrom,hollen,hodgin,hirschman,hiltner,hilliker,hibner,hennis,helt,heidelberg,heger,heer,hartness,hardrick,halladay,gula,guillaume,guerriero,grunewald,grosse,griffeth,grenz,grassi,grandison,ginther,gimenez,gillingham,gillham,gess,gelman,gearheart,gaskell,gariepy,gamino,gallien,galentine,fuquay,froman,froelich,friedel,foos,fomby,focht,flythe,fiqueroa,filson,filip,fierros,fett,fedele,fasching,farney,fargo,everts,etzel,elzey,eichner,eger,eatman,ducker,duchesne,donati,domenech,dollard,dodrill,dinapoli,denn,delfino,delcid,delaune,delatte,deems,daluz,cusson,cullison,cuadrado,crumrine,cruickshank,crosland,croll,criddle,crepeau,coutu,couey,cort,coppinger,collman,cockburn,coca,clayborne,claflin,cissell,chowdhury,chicoine,chenier,causby,caulder,cassano,casner,cardiel,brunton,bruch,broxton,brosius,brooking,branco,bracco,bourgault,bosserman,bonet,bolds,bolander,bohman,boelter,blohm,blea,blaise,bischof,beus,bellew,bastarache,bast,bartolome,barcomb,barco,balk,balas,bakos,avey,atnip,ashbrook,arno,arbour,aquirre,appell,aldaco,alban,ahlstrom,abadie,zylstra,zick,yother,wyse,wunsch,whitty,weist,vrooman,villalon,vidrio,vavra,vasbinder,vanmatre,vandorn,ugarte,turberville,tuel,trogdon,toupin,toone,tolleson,tinkham,tinch,tiano,teston,teer,tawney,taplin,tant,tansey,swayne,sutcliffe,sunderman,strothers,stromain,stork,stoneburner,stolte,stolp,stoehr,stingley,stegman,stangl,spinella,spier,soules,sommerfield,sipp,simek,siders,shufelt,shue,shor,shires,shellenberger,sheely,sepe,seaberg,schwing,scherrer,scalzo,sasse,sarvis,santora,sansbury,salls,saleem,ryland,rybicki,ruggieri,rothenberg,rosenstein,roquemore,rollison,rodden,rivet,ridlon,riche,riccardi,reiley,regner,rech,rayo,raff,radabaugh,quon,quill,privette,prange,pickrell,perino,penning,pankratz,orlandi,nyquist,norrell,noren,naples,nale,nakashima,musselwhite,murrin,murch,mullinix,mullican,mullan,morneau,mondor,molinar,minjares,minix,minchew,milewski,mikkelson,mifflin,merkley,meis,meas,mcroy,mcphearson,mcneel,mcmunn,mcmorrow,mcdorman,mccroskey,mccoll,mcclusky,mcclaran,mccampbell,mazzariello,mauzy,mauch,mastro,martinek,marsala,marcantel,mahle,luciani,lubbers,lobel,linch,liller,legros,layden,lapine,lansberry,lage,laforest,labriola,koga,knupp,klimek,kittinger,kirchoff,kinzel,killinger,kilbourne,ketner,kepley,kemble,kells,kear,kaya,karsten,kaneshiro,kamm,joines,joachim,jacobus,iler,holgate,hoar,hisey,hird,hilyard,heslin,herzberg,hennigan,hegland,hartl,haner,handel,gualtieri,greenly,grasser,goetsch,godbold,gilland,gidney,gibney,giancola,gettinger,garzon,galle,galgano,gaier,gaertner,fuston,freel,fortes,fiorillo,figgs,fenstermacher,fedler,facer,fabiano,evins,euler,esquer,enyeart,elem,eich,edgerly,durocher,durgan,duffin,drolet,drewes,dotts,dossantos,dockins,dirksen,difiore,dierks,dickerman,dery,denault,demaree,delmonte,delcambre,daulton,darst,dahle,curnutt,cully,culligan,cueva,crosslin,croskey,cromartie,crofts,covin,coutee,coppa,coogan,condrey,concannon,coger,cloer,clatterbuck,cieslak,chumbley,choudhury,chiaramonte,charboneau,carneal,cappello,campisi,callicoat,burgoyne,bucholz,brumback,brosnan,brogden,broder,brendle,breece,bown,bou,boser,bondy,bolster,boll,bluford,blandon,biscoe,bevill,bence,battin,basel,bartram,barnaby,barmore,balbuena,badgley,backstrom,auyeung,ater,arrellano,arant,ansari,alling,alejandre,alcock,alaimo,aguinaldo,aarons,zurita,zeiger,zawacki,yutzy,yarger,wygant,wurm,wuest,witherell,wisneski,whitby,whelchel,weisz,weisinger,weishaar,wehr,waxman,waldschmidt,walck,waggener,vosburg,villela,vercher,venters,vanscyoc,vandyne,valenza,utt,urick,ungar,ulm,tumlin,tsao,tryon,trudel,treiber,tober,tipler,tillson,tiedemann,thornley,tetrault,temme,tarrance,tackitt,sykora,sweetman,swatzell,sutliff,suhr,sturtz,strub,strayhorn,stormer,steveson,stengel,steinfeldt,spiro,spieker,speth,spero,soza,souliere,soucie,snedeker,slifer,skillings,situ,siniard,simeon,signorelli,siggers,shultis,shrewsbury,shippee,shimp,shepler,sharpless,shadrick,severt,severs,semon,semmes,seiter,segers,sclafani,sciortino,schroyer,schrack,schoenberg,schober,scheidt,scheele,satter,sartori,sarratt,salvaggio,saladino,sakamoto,saine,ryman,rumley,ruggerio,rucks,roughton,robards,ricca,rexroad,resler,reny,rentschler,redrick,redick,reagle,raymo,raker,racette,pyburn,pritt,presson,pressman,pough,pisani,perz,perras,pelzer,pedrosa,palos,palmisano,paille,orem,orbison,oliveros,nourse,nordquist,newbury,nelligan,nawrocki,myler,mumaw,morphis,moldenhauer,miyashiro,mignone,mickelsen,michalec,mesta,mcree,mcqueary,mcninch,mcneilly,mclelland,mclawhorn,mcgreevy,mcconkey,mattes,maselli,marten,marcucci,manseau,manjarrez,malbrough,machin,mabie,lynde,lykes,lueras,lokken,loken,linzy,lillis,lilienthal,levey,legler,leedom,lebowitz,lazzaro,larabee,lapinski,langner,langenfeld,lampkins,lamotte,lambright,lagarde,ladouceur,labounty,lablanc,laberge,kyte,kroon,kron,kraker,kouba,kirwin,kincer,kimbler,kegler,keach,katzman,katzer,kalman,jimmerson,jenning,janus,iacovelli,hust,huson,husby,humphery,hufnagel,honig,holsey,holoman,hohl,hogge,hinderliter,hildebrant,hemby,helle,heintzelman,heidrick,hearon,hazelip,hauk,hasbrouck,harton,hartin,harpster,hansley,hanchett,haar,guthridge,gulbranson,guill,guerrera,grund,grosvenor,grist,grell,grear,granberry,gonser,giunta,giuliani,gillon,gillmore,gillan,gibbon,gettys,gelb,gano,galliher,fullen,frese,frates,foxwell,fleishman,fleener,fielden,ferrera,fells,feemster,fauntleroy,evatt,espy,eno,emmerich,edler,eastham,dunavant,duca,drinnon,dowe,dorgan,dollinger,dipalma,difranco,dietrick,denzer,demarest,delee,delariva,delany,decesare,debellis,deavers,deardorff,dawe,darosa,darley,dalzell,dahlen,curto,cupps,cunniff,cude,crivello,cripps,cresswell,cousar,cotta,compo,clyne,clayson,cearley,catania,carini,cantero,buttrey,buttler,burpee,bulkley,buitron,buda,bublitz,bryer,bryden,brouillette,brott,brookman,bronk,breshears,brennen,brannum,brandl,braman,bracewell,boyter,bomberger,bogen,boeding,blauvelt,blandford,biermann,bielecki,bibby,berthold,berkman,belvin,bellomy,beland,behne,beecham,becher,bax,bassham,barret,baley,auxier,atkison,ary,arocha,arechiga,anspach,algarin,alcott,alberty,ager,ackman,abdallah,zwick,ziemer,zastrow,zajicek,yokum,yokley,wittrock,winebarger,wilker,wilham,whitham,wetzler,westling,westbury,wendler,wellborn,weitzman,weitz,wallner,waldroup,vrabel,vowels,volker,vitiello,visconti,villicana,vibbert,vesey,vannatter,vangilder,vandervort,vandegrift,vanalstyne,vallecillo,usrey,tynan,turpen,tuller,trisler,townson,tillmon,threlkeld,thornell,terrio,taunton,tarry,tardy,swoboda,swihart,sustaita,suitt,stuber,strine,stookey,stmartin,stiger,stainbrook,solem,smail,sligh,siple,sieben,shumake,shriner,showman,sheen,sheckler,seim,secrist,scoggin,schultheis,schmalz,schendel,schacher,savard,saulter,santillanes,sandiford,sande,salzer,salvato,saltz,sakai,ryckman,ryant,ruck,rittenberry,ristau,richart,rhynes,reyer,reulet,reser,redington,reddington,rebello,reasor,raftery,rabago,raasch,quintanar,pylant,purington,provencal,prioleau,prestwood,pothier,popa,polster,politte,poffenberger,pinner,pietrzak,pettie,penaflor,pellot,pellham,paylor,payeur,papas,paik,oyola,osbourn,orzechowski,oppenheimer,olesen,oja,ohl,nuckolls,nordberg,noonkester,nold,nitta,niblett,neuhaus,nesler,nanney,myrie,mutch,mosquera,morena,montalto,montagna,mizelle,mincy,millikan,millay,miler,milbourn,mikels,migues,miesner,mershon,merrow,meigs,mealey,mcraney,mcmartin,mclachlan,mcgeehan,mcferren,mcdole,mccaulley,mcanulty,maziarz,maul,mateer,martinsen,marson,mariotti,manna,mance,malbon,magnusson,maclachlan,macek,lurie,luc,lown,loranger,lonon,lisenby,linsley,lenk,leavens,lauritzen,lathem,lashbrook,landman,lamarche,lamantia,laguerre,lagrange,kogan,klingbeil,kist,kimpel,kime,kier,kerfoot,kennamer,kellems,kammer,kamen,jepsen,jarnigan,isler,ishee,hux,hungate,hummell,hultgren,huffaker,hruby,hornick,hooser,hooley,hoggan,hirano,hilley,higham,heuser,henrickson,henegar,hellwig,hedley,hasegawa,hartt,hambright,halfacre,hafley,guion,guinan,grunwald,grothe,gries,greaney,granda,grabill,gothard,gossman,gosser,gossard,gosha,goldner,gobin,ginyard,gilkes,gilden,gerson,gephart,gengler,gautier,gassett,garon,galusha,gallager,galdamez,fulmore,fritsche,fowles,foutch,footman,fludd,ferriera,ferrero,ferreri,fenimore,fegley,fegan,fearn,farrier,fansler,fane,falzone,fairweather,etherton,elsberry,dykema,duppstadt,dunnam,dunklin,duet,dudgeon,dubuc,doxey,donmoyer,dodgen,disanto,dingler,dimattia,dilday,digennaro,diedrich,derossett,depp,demasi,degraffenreid,deakins,deady,davin,daigre,daddario,czerwinski,cullens,cubbage,cracraft,combest,coletti,coghill,claybrooks,christofferse,chiesa,chason,chamorro,celentano,cayer,carolan,carnegie,capetillo,callier,cadogan,caba,byrom,byrns,burrowes,burket,burdge,burbage,buchholtz,brunt,brungardt,brunetti,brumbelow,brugger,broadhurst,brigance,brandow,bouknight,bottorff,bottomley,bosarge,borger,bombardier,boggan,blumer,blecha,birney,birkland,betances,beran,belin,belgrave,bealer,bauch,bashir,bartow,baro,barnhouse,barile,ballweg,baisley,bains,baehr,badilla,bachus,bacher,bachelder,auzenne,aten,astle,allis,agarwal,adger,adamek,ziolkowski,zinke,zazueta,zamorano,younkin,wittig,witman,winsett,winkles,wiedman,whitner,whitcher,wetherby,westra,westhoff,wehrle,wagaman,voris,vicknair,veasley,vaugh,vanderburg,valletta,tunney,trumbo,truluck,trueman,truby,trombly,tourville,tostado,titcomb,timpson,tignor,thrush,thresher,thiede,tews,tamplin,taff,tacker,syverson,sylvestre,summerall,stumbaugh,strouth,straker,stradford,stokley,steinhoff,steinberger,spigner,soltero,snively,sletten,sinkler,sinegal,simoes,siller,sigel,shire,shinkle,shellman,sheller,sheats,sharer,selvage,sedlak,schriver,schimke,scheuerman,schanz,savory,saulters,sauers,sais,rusin,rumfelt,ruhland,rozar,rosborough,ronning,rolph,roloff,robie,rimer,riehle,ricco,rhein,retzlaff,reisman,reimann,rayes,raub,raminez,quesinberry,pua,procopio,priolo,printz,prewett,preas,prahl,poovey,ploof,platz,plaisted,pinzon,pineiro,pickney,petrovich,perl,pehrson,peets,pavon,pautz,pascarella,paras,paolini,pafford,oyer,ovellette,outten,outen,orduna,odriscoll,oberlin,nosal,niven,nisbett,nevers,nathanson,mukai,mozee,mowers,motyka,morency,montford,mollica,molden,mitten,miser,millender,midgette,messerly,melendy,meisel,meidinger,meany,mcnitt,mcnemar,mcmakin,mcgaugh,mccaa,mauriello,maudlin,matzke,mattia,matsumura,masuda,mangels,maloof,malizia,mahmoud,maglione,maddix,lucchesi,lochner,linquist,lietz,leventhal,lemanski,leiser,laury,lauber,lamberth,kuss,kulik,kuiper,krout,kotter,kort,kohlmeier,koffler,koeller,knipe,knauss,kleiber,kissee,kirst,kirch,kilgo,kerlin,kellison,kehl,kalb,jorden,jantzen,inabinet,ikard,husman,hunsberger,hundt,hucks,houtz,houseknecht,hoots,hogsett,hogans,hintze,hession,henault,hemming,helsley,heinen,heffington,heberling,heasley,hazley,hazeltine,hayton,hayse,hawke,haston,harward,harrow,hanneman,hafford,hadnot,guerro,grahm,gowins,gordillo,goosby,glatt,gibbens,ghent,gerrard,germann,gebo,gean,garling,gardenhire,garbutt,gagner,furguson,funchess,fujiwara,fujita,friley,frigo,forshee,folkes,filler,fernald,ferber,feingold,faul,farrelly,fairbank,failla,espey,eshleman,ertl,erhart,erhardt,erbe,elsea,ells,ellman,eisenhart,ehmann,earnhardt,duplantis,dulac,ducote,draves,dosch,dolce,divito,dimauro,derringer,demeo,demartini,delima,dehner,degen,defrancisco,defoor,dedeaux,debnam,cypert,cutrer,cusumano,custis,croker,courtois,costantino,cormack,corbeil,copher,conlan,conkling,cogdell,cilley,chapdelaine,cendejas,castiglia,cashin,carstensen,caprio,calcote,calaway,byfield,butner,bushway,burritt,browner,brobst,briner,bridger,brickley,brendel,bratten,bratt,brainerd,brackman,bowne,bouck,borunda,bordner,bonenfant,boer,boehmer,bodiford,bleau,blankinship,blane,blaha,bitting,bissonette,bigby,bibeau,bermudes,berke,bergevin,bergerson,bendel,belville,bechard,bearce,beadles,batz,bartlow,ayoub,avans,aumiller,arviso,arpin,arnwine,armwood,arent,arehart,arcand,antle,ambrosino,alongi,alm,allshouse,ahart,aguon,ziebarth,zeledon,zakrzewski,yuhas,yingst,yedinak,wommack,winnett,wingler,wilcoxen,whitmarsh,wayt,watley,warkentin,voll,vogelsang,voegele,vivanco,vinton,villafane,viles,ver,venne,vanwagoner,vanwagenen,vanleuven,vanauken,uselton,uren,trumbauer,tritt,treadaway,tozier,tope,tomczak,tomberlin,tomasini,tollett,toller,titsworth,tirrell,tilly,tavera,tarnowski,tanouye,swarthout,sutera,surette,styers,styer,stipe,stickland,stembridge,stearn,starkes,stanberry,stahr,spino,spicher,sperber,speece,sonntag,sneller,smalling,slowik,slocumb,sliva,slemp,slama,sitz,sisto,sisemore,sindelar,shipton,shillings,sheeley,sharber,shaddix,severns,severino,sensabaugh,seder,seawell,seamons,schrantz,schooler,scheffer,scheerer,scalia,saum,santibanez,sano,sanjuan,sampley,sailer,sabella,sabbagh,royall,rottman,rivenbark,rikard,ricketson,rickel,rethman,reily,reddin,reasoner,rast,ranallo,quintal,pung,pucci,proto,prosperie,prim,preusser,preslar,powley,postma,pinnix,pilla,pietsch,pickerel,pica,pharris,petway,petillo,perin,pereda,pennypacker,pennebaker,pedrick,patin,patchell,parodi,parman,pantano,padua,padro,osterhout,orner,olivar,ohlson,odonoghue,oceguera,oberry,novello,noguera,newquist,newcombe,neihoff,nehring,nees,nebeker,mundo,mullenix,morrisey,moronta,morillo,morefield,mongillo,molino,minto,midgley,michie,menzies,medved,mechling,mealy,mcshan,mcquaig,mcnees,mcglade,mcgarity,mcgahey,mcduff,mayweather,mastropietro,masten,maranto,maniscalco,maize,mahmood,maddocks,maday,macha,maag,luken,lopp,lolley,llanas,litz,litherland,lindenberg,lieu,letcher,lentini,lemelle,leet,lecuyer,leber,laursen,larrick,lantigua,langlinais,lalli,lafever,labat,labadie,krogman,kohut,knarr,klimas,klar,kittelson,kirschbaum,kintzel,kincannon,kimmell,killgore,kettner,kelsch,karle,kapoor,johansson,jenkinson,janney,iraheta,insley,hyslop,huckstep,holleran,hoerr,hinze,hinnenkamp,hilger,higgin,hicklin,heroux,henkle,helfer,heikkinen,heckstall,heckler,heavener,haydel,haveman,haubert,harrop,harnois,hansard,hanover,hammitt,haliburton,haefner,hadsell,haakenson,guynn,guizar,grout,grosz,gomer,golla,godby,glanz,glancy,givan,giesen,gerst,gayman,garraway,gabor,furness,frisk,fremont,frary,forand,fessenden,ferrigno,fearon,favreau,faulks,falbo,ewen,eurich,etchison,esterly,entwistle,ellingsworth,eisenbarth,edelson,eckel,earnshaw,dunneback,doyal,donnellan,dolin,dibiase,deschenes,dermody,degregorio,darnall,dant,dansereau,danaher,dammann,dames,czarnecki,cuyler,custard,cummingham,cuffie,cuffee,cudney,cuadra,crigler,creger,coughlan,corvin,cortright,corchado,connery,conforti,condron,colosimo,colclough,cohee,ciotti,chien,chacko,cevallos,cavitt,cavins,castagna,cashwell,carrozza,carrara,capra,campas,callas,caison,caggiano,bynoe,buswell,burpo,burnam,burges,buerger,buelow,bueche,bruni,brummitt,brodersen,briese,breit,brakebill,braatz,boyers,boughner,borror,borquez,bonelli,bohner,blaker,blackmer,bissette,bibbins,bhatt,bhatia,bessler,bergh,beresford,bensen,benningfield,bellantoni,behler,beehler,beazley,beauchesne,bargo,bannerman,baltes,balog,ballantyne,axelson,apgar,aoki,anstett,alejos,alcocer,albury,aichele,ackles,zerangue,zehner,zank,zacarias,youngberg,yorke,yarbro,wydra,worthley,wolbert,wittmer,witherington,wishart,winkleman,willilams,willer,wiedeman,whittingham,whitbeck,whetsel,wheless,westerberg,welcher,wegman,waterfield,wasinger,warfel,wannamaker,walborn,wada,vogl,vizcarrondo,vitela,villeda,veras,venuti,veney,ulrey,uhlig,turcios,tremper,torian,torbett,thrailkill,terrones,teitelbaum,teems,swoope,sunseri,stutes,stthomas,strohm,stroble,striegel,streicher,stodola,stinchcomb,steves,steppe,steller,staudt,starner,stamant,stam,stackpole,sprankle,speciale,spahr,sowders,sova,soluri,soderlund,slinkard,sjogren,sirianni,siewert,sickels,sica,shugart,shoults,shive,shimer,shier,shepley,sheeran,sevin,seto,segundo,sedlacek,scuderi,schurman,schuelke,scholten,schlater,schisler,schiefelbein,schalk,sanon,sabala,ruyle,ruybal,rueb,rowsey,rosol,rocheleau,rishel,rippey,ringgold,rieves,ridinger,retherford,rempe,reith,rafter,raffaele,quinto,putz,purdom,puls,pulaski,propp,principato,preiss,prada,polansky,poch,plath,pittard,pinnock,pfarr,pfannenstiel,penniman,pauling,patchen,paschke,parkey,pando,ouimet,ottman,ostlund,ormiston,occhipinti,nowacki,norred,noack,nishida,nilles,nicodemus,neth,nealey,myricks,murff,mungia,motsinger,moscato,morado,monnier,molyneux,modzelewski,miura,minich,militello,milbrandt,michalik,meserve,mendivil,melara,mcnish,mcelhannon,mccroy,mccrady,mazzella,maule,mattera,mathena,matas,mascorro,marinello,marguez,manwaring,manhart,mangano,maggi,lymon,luter,luse,lukasik,luiz,ludlum,luczak,lowenthal,lossett,lorentzen,loredo,longworth,lomanto,lisi,lish,lipsky,linck,liedtke,levering,lessman,lemond,lembo,ledonne,leatham,laufer,lanphear,langlais,lamphear,lamberton,lafon,lade,lacross,kyzer,krok,kring,krell,krehbiel,kratochvil,krach,kovar,kostka,knudtson,knaack,kliebert,klahn,kirkley,kimzey,kerrick,kennerson,keesler,karlin,janousek,imel,icenhour,hyler,hudock,houpt,holquin,holiman,holahan,hodapp,hillen,hickmon,hersom,henrich,helvey,heidt,heideman,hedstrom,hedin,hebron,hayter,harn,hardage,halsted,hahne,hagemann,guzik,guel,groesbeck,gritton,grego,graziani,grasty,graney,gouin,gossage,golston,goheen,godina,glade,giorgi,giambrone,gerrity,gerrish,gero,gerling,gaulke,garlick,galiano,gaiter,gahagan,gagnier,friddle,fredericksen,franqui,follansbee,foerster,flury,fitzmaurice,fiorini,finlayson,fiecke,fickes,fichter,ferron,farrel,fackler,eyman,escarcega,errico,erler,erby,engman,engelmann,elsass,elliston,eddleman,eadie,dummer,drost,dorrough,dorrance,doolan,donalson,domenico,ditullio,dittmar,dishon,dionisio,dike,devinney,desir,deschamp,derrickson,delamora,deitch,dechant,danek,dahmen,curci,cudjoe,croxton,creasman,craney,crader,cowling,coulston,cortina,corlew,corl,copland,convery,cohrs,clune,clausing,cipriani,cianciolo,chubb,chittum,chenard,charlesworth,charlebois,champine,chamlee,chagoya,casselman,cardello,capasso,cannella,calderwood,byford,buttars,bushee,burrage,buentello,brzozowski,bryner,brumit,brookover,bronner,bromberg,brixey,brinn,briganti,bremner,brawn,branscome,brannigan,bradsher,bozek,boulay,bormann,bongiorno,bollin,bohler,bogert,bodenhamer,blose,bivona,billips,bibler,benfer,benedetti,belue,bellanger,belford,behn,barnhardt,baltzell,balling,balducci,bainter,babineau,babich,baade,attwood,asmus,asaro,artiaga,applebaum,anding,amar,amaker,allsup,alligood,alers,agin,agar,achenbach,abramowitz,abbas,aasen,zehnder,yopp,yelle,yeldell,wynter,woodmansee,wooding,woll,winborne,willsey,willeford,widger,whiten,whitchurch,whang,weissinger,weinman,weingartner,weidler,waltrip,wagar,wafford,vitagliano,villalvazo,villacorta,vigna,vickrey,vicini,ventimiglia,vandenbosch,valvo,valazquez,utsey,urbaniak,unzueta,trombetta,trevizo,trembley,tremaine,traverso,tores,tolan,tillison,tietjen,teachout,taube,tatham,tarwater,tarbell,sydow,swims,swader,striplin,stoltenberg,steinhauer,steil,steigerwald,starkweather,stallman,squier,sparacino,spadafora,shiflet,shibata,shevlin,sherrick,sessums,servais,senters,seevers,seelye,searfoss,seabrooks,scoles,schwager,schrom,schmeltzer,scheffel,sawin,saterfiel,sardina,sanroman,sandin,salamanca,saladin,sabia,rustin,rushin,ruley,rueter,rotter,rosenzweig,rohe,roder,riter,rieth,ried,ridder,rennick,remmers,remer,relyea,reilley,reder,rasheed,rakowski,rabin,queener,pursel,prowell,pritts,presler,pouncy,porche,porcaro,pollman,pleas,planas,pinkley,pinegar,pilger,philson,petties,perrodin,pendergrast,patao,pasternak,passarelli,pasko,parshall,panos,panella,palombo,padillo,oyama,overlock,overbeck,otterson,orrell,ornellas,opitz,okelly,obando,noggle,nicosia,netto,negrin,natali,nakayama,nagao,nadel,musial,murrill,murrah,munsch,mucci,mrozek,moyes,mowrer,moris,morais,moorhouse,monico,mondy,moncayo,miltenberger,milsap,milone,millikin,milardo,micheals,micco,meyerson,mericle,mendell,meinhardt,meachum,mcleroy,mcgray,mcgonigal,maultsby,matis,matheney,matamoros,marro,marcil,marcial,mantz,mannings,maltby,malchow,maiorano,mahn,mahlum,maglio,maberry,lustig,luellen,longwell,longenecker,lofland,locascio,linney,linneman,lighty,levell,levay,lenahan,lemen,lehto,lebaron,lanctot,lamy,lainez,laffoon,labombard,kujawski,kroger,kreutzer,korhonen,kondo,kollman,kohan,kogut,knaus,kivi,kittel,kinner,kindig,kindel,kiesel,kibby,khang,kettler,ketterer,kepner,kelliher,keenum,kanode,kail,juhasz,jowett,jolicoeur,jeon,iser,ingrassia,imai,hutchcraft,humiston,hulings,hukill,huizenga,hugley,hornyak,hodder,hisle,hillenbrand,hille,higuchi,hertzler,herdon,heppner,hepp,heitmann,heckart,hazlewood,hayles,hayek,hawkin,haugland,hasler,harbuck,happel,hambly,hambleton,hagaman,guzzi,gullette,guinyard,grogg,grise,griffing,goto,gosney,goley,goldblatt,gledhill,girton,giltner,gillock,gilham,gilfillan,giblin,gentner,gehlert,gehl,garten,garney,garlow,garett,galles,galeana,futral,fuhr,friedland,franson,fransen,foulds,follmer,foland,flax,flavin,firkins,fillion,figueredo,ferrill,fenster,fenley,fauver,farfan,eustice,eppler,engelman,engelke,emmer,elzy,ellwood,ellerbee,elks,ehret,ebbert,durrah,dupras,dubuque,dragoo,donlon,dolloff,dibella,derrico,demko,demar,darrington,czapla,crooker,creagh,cranor,craner,crabill,coyer,cowman,cowherd,cottone,costillo,coster,costas,cosenza,corker,collinson,coello,clingman,clingerman,claborn,chmura,chausse,chaudhry,chapell,chancy,cerrone,caverly,caulkins,carn,campfield,campanelli,callaham,cadorette,butkovich,buske,burrier,burkley,bunyard,buckelew,buchheit,broman,brescia,brasel,boyster,booe,bonomo,bondi,bohnsack,blomberg,blanford,bilderback,biggins,bently,behrends,beegle,bedoya,bechtol,beaubien,bayerl,baumgart,baumeister,barratt,barlowe,barkman,barbagallo,baldree,baine,baggs,bacote,aylward,ashurst,arvidson,arthurs,arrieta,arrey,arreguin,arrant,arner,arizmendi,anker,amis,amend,alphin,allbright,aikin,zupan,zuchowski,zeolla,zanchez,zahradnik,zahler,younan,yeater,yearta,yarrington,yantis,woomer,wollard,wolfinger,woerner,witek,wishon,wisener,wingerter,willet,wilding,wiedemann,weisel,wedeking,waybright,wardwell,walkins,waldorf,voth,voit,virden,viloria,villagran,vasta,vashon,vaquera,vantassell,vanderlinden,vandergrift,vancuren,valenta,underdahl,tygart,twining,twiford,turlington,tullius,tubman,trowell,trieu,transue,tousant,torgersen,tooker,tome,toma,tocci,tippins,tinner,timlin,tillinghast,tidmore,teti,tedrick,tacey,swanberg,sunde,summitt,summerford,summa,stratman,strandberg,storck,stober,steitz,stayer,stauber,staiger,sponaugle,spofford,sparano,spagnola,sokoloski,snay,slough,skowronski,sieck,shimkus,sheth,sherk,shankles,shahid,sevy,senegal,seiden,seidell,searls,searight,schwalm,schug,schilke,schier,scheck,sawtelle,santore,sanks,sandquist,sanden,saling,saathoff,ryberg,rustad,ruffing,rudnicki,ruane,rozzi,rowse,rosenau,rodes,risser,riggin,riess,riese,rhoten,reinecke,reigle,reichling,redner,rebelo,raynes,raimondi,rahe,rada,querry,quellette,pulsifer,prochnow,prato,poulton,poudrier,policastro,polhemus,polasek,poissant,pohlmann,plotner,pitkin,pita,pinkett,piekarski,pichon,pfau,petroff,petermann,peplinski,peller,pecinovsky,pearse,pattillo,patague,parlier,parenti,parchman,pane,paff,ortner,oros,nolley,noakes,nigh,nicolosi,nicolay,newnam,netter,nass,napoles,nakata,nakamoto,morlock,moraga,montilla,mongeau,molitor,mohney,mitchener,meyerhoff,medel,mcniff,mcmonagle,mcglown,mcglinchey,mcgarrity,mccright,mccorvey,mcconnel,mccargo,mazzei,matula,mastroianni,massingale,maring,maricle,mans,mannon,mannix,manney,manalo,malo,malan,mahony,madril,mackowiak,macko,macintosh,lurry,luczynski,lucke,lucarelli,losee,lorence,loiacono,lohse,loder,lipari,linebarger,lindamood,limbaugh,letts,leleux,leep,leeder,leard,laxson,lawry,laverdiere,laughton,lastra,kurek,kriss,krishnan,kretschmer,krebsbach,kontos,knobel,knauf,klick,kleven,klawitter,kitchin,kirkendoll,kinkel,kingrey,kilbourn,kensinger,kennerly,kamin,justiniano,jurek,junkin,judon,jordahl,jeanes,jarrells,iwamoto,ishida,immel,iman,ihle,hyre,hurn,hunn,hultman,huffstetler,huffer,hubner,howey,hooton,holts,holscher,holen,hoggatt,hilaire,herz,henne,helstrom,hellickson,heinlein,heckathorn,heckard,headlee,hauptman,haughey,hatt,harring,harford,hammill,hamed,halperin,haig,hagwood,hagstrom,gunnells,gundlach,guardiola,greeno,greenland,gonce,goldsby,gobel,gisi,gillins,gillie,germano,geibel,gauger,garriott,garbarino,gajewski,funari,fullbright,fuell,fritzler,freshwater,freas,fortino,forbus,flohr,flemister,fisch,finks,fenstermaker,feldstein,farhat,fankhauser,fagg,fader,exline,emigh,eguia,edman,eckler,eastburn,dunmore,dubuisson,dubinsky,drayer,doverspike,doubleday,doten,dorner,dolson,dohrmann,disla,direnzo,dipaola,dines,diblasi,dewolf,desanti,dennehy,demming,delker,decola,davilla,daughtridge,darville,darland,danzy,dagenais,culotta,cruzado,crudup,croswell,coverdale,covelli,couts,corbell,coplan,coolbaugh,conyer,conlee,conigliaro,comiskey,coberly,clendening,clairmont,cienfuegos,chojnacki,chilcote,champney,cassara,casazza,casado,carew,carbin,carabajal,calcagni,cail,busbee,burts,burbridge,bunge,bundick,buhler,bucholtz,bruen,broce,brite,brignac,brierly,bridgman,braham,bradish,boyington,borjas,bonn,bonhomme,bohlen,bogardus,bockelman,blick,blackerby,bizier,biro,binney,bertolini,bertin,berti,bento,beno,belgarde,belding,beckel,becerril,bazaldua,bayes,bayard,barrus,barris,baros,bara,ballow,bakewell,baginski,badalamenti,backhaus,avilez,auvil,atteberry,ardon,anzaldua,anello,amsler,ambrosio,althouse,alles,alberti,alberson,aitchison,aguinaga,ziemann,zickefoose,zerr,zeck,zartman,zahm,zabriskie,yohn,yellowhair,yeaton,yarnall,yaple,wolski,wixon,willner,willms,whitsitt,wheelwright,weyandt,wess,wengerd,weatherholtz,wattenbarger,walrath,walpole,waldrip,voges,vinzant,viars,veres,veneziano,veillon,vawter,vaughns,vanwart,vanostrand,valiente,valderas,uhrig,tunison,tulloch,trostle,treaster,traywick,toye,tomson,tomasello,tomasek,tippit,tinajero,tift,tienda,thorington,thieme,thibeau,thakkar,tewell,telfer,sweetser,stratford,stracener,stoke,stiverson,stelling,spatz,spagnoli,sorge,slevin,slabaugh,simson,shupp,shoultz,shotts,shiroma,shetley,sherrow,sheffey,shawgo,shamburger,sester,segraves,seelig,scioneaux,schwartzkopf,schwabe,scholes,schluter,schlecht,schillaci,schildgen,schieber,schewe,schecter,scarpelli,scaglione,sautter,santelli,salmi,sabado,ryer,rydberg,ryba,rushford,runk,ruddick,rotondo,rote,rosenfield,roesner,rocchio,ritzer,rippel,rimes,riffel,richison,ribble,reynold,resh,rehn,ratti,rasor,rasnake,rappold,rando,radosevich,pulice,prichett,pribble,poynor,plowden,pitzen,pittsley,pitter,philyaw,philipps,pestana,perro,perone,pera,peil,pedone,pawlowicz,pattee,parten,parlin,pariseau,paredez,paek,pacifico,otts,ostrow,osornio,oslund,orso,ooten,onken,oniel,onan,ollison,ohlsen,ohlinger,odowd,niemiec,neubert,nembhard,neaves,neathery,nakasone,myerson,muto,muntz,munez,mumme,mumm,mujica,muise,muench,morriss,molock,mishoe,minier,metzgar,mero,meiser,meese,mcsween,mcquire,mcquinn,mcpheeters,mckeller,mcilrath,mcgown,mcdavis,mccuen,mcclenton,maxham,matsui,marriner,marlette,mansur,mancino,maland,majka,maisch,maheux,madry,madriz,mackley,macke,lydick,lutterman,luppino,lundahl,lovingood,loudon,longmore,liefer,leveque,lescarbeau,lemmer,ledgerwood,lawver,lawrie,lattea,lasko,lahman,kulpa,kukowski,kukla,kubota,kubala,krizan,kriz,krikorian,kravetz,kramp,kowaleski,knobloch,klosterman,kloster,klepper,kirven,kinnaman,kinnaird,killam,kiesling,kesner,keebler,keagle,karls,kapinos,kantner,kaba,junious,jefferys,jacquet,izzi,ishii,irion,ifill,hotard,horman,hoppes,hopkin,hokanson,hoda,hocutt,hoaglin,hites,hirai,hindle,hinch,hilty,hild,hier,hickle,hibler,henrichs,hempstead,helmers,hellard,heims,heidler,hawbaker,harkleroad,harari,hanney,hannaford,hamid,haltom,hallford,guilliams,guerette,gryder,groseclose,groen,grimley,greenidge,graffam,goucher,goodenough,goldsborough,gloster,glanton,gladson,gladding,ghee,gethers,gerstein,geesey,geddie,gayer,gaver,gauntt,gartland,garriga,garoutte,fronk,fritze,frenzel,forgione,fluitt,flinchbaugh,flach,fiorito,finan,finamore,fimbres,fillman,figeroa,ficklin,feher,feddersen,fambro,fairbairn,eves,escalona,elsey,eisenstein,ehrenberg,eargle,drane,dogan,dively,dewolfe,dettman,desiderio,desch,dennen,denk,demaris,delsignore,dejarnette,deere,dedman,daws,dauphinais,danz,dantin,dannenberg,dalby,currence,culwell,cuesta,croston,crossno,cromley,crisci,craw,coryell,condra,colpitts,colas,clink,clevinger,clermont,cistrunk,cirilo,chirico,chiarello,cephus,cecena,cavaliere,caughey,casimir,carwell,carlon,carbonaro,caraveo,cantley,callejas,cagney,cadieux,cabaniss,bushard,burlew,buras,budzinski,bucklew,bruneau,brummer,brueggemann,brotzman,bross,brittian,brimage,briles,brickman,breneman,breitenstein,brandel,brackins,boydstun,botta,bosket,boros,borgmann,bordeau,bonifacio,bolten,boehman,blundell,bloodsaw,bjerke,biffle,bickett,bickers,beville,bergren,bergey,benzing,belfiore,beirne,beckert,bebout,baumert,battey,barrs,barriere,barcelo,barbe,balliet,baham,babst,auton,asper,asbell,arzate,argento,arel,araki,arai,antley,amodeo,ammann,allensworth,aldape,akey,abeita,zweifel,zeiler,zamor,zalenski,yzaguirre,yousef,yetman,wyer,woolwine,wohlgemuth,wohlers,wittenberg,wingrove,wimsatt,willimas,wilkenson,wildey,wilderman,wilczynski,wigton,whorley,wellons,welle,weirich,weideman,weide,weast,wasmund,warshaw,walson,waldner,walch,walberg,wagener,wageman,vrieze,vossen,vorce,voorhis,vonderheide,viruet,vicari,verne,velasques,vautour,vartanian,varona,vankeuren,vandine,vandermeer,ursery,underdown,uhrich,uhlman,tworek,twine,twellman,tweedie,tutino,turmelle,tubb,trivedi,triano,trevathan,treese,treanor,treacy,traina,topham,toenjes,tippetts,tieu,thomure,thatch,tetzlaff,tetterton,teamer,tappan,talcott,tagg,szczepanski,syring,surace,sulzer,sugrue,sugarman,suess,styons,stwart,stupka,strey,straube,strate,stoddart,stockbridge,stjames,steimle,steenberg,stamand,staller,stahly,stager,spurgin,sprow,sponsler,speas,spainhour,sones,smits,smelcer,slovak,slaten,singleterry,simien,sidebottom,sibrian,shellhammer,shelburne,shambo,sepeda,seigel,scogin,scianna,schmoll,schmelzer,scheu,schachter,savant,sauseda,satcher,sandor,sampsell,rugh,rufener,rotenberry,rossow,rossbach,rollman,rodrique,rodreguez,rodkey,roda,rini,riggan,rients,riedl,rhines,ress,reinbold,raschke,rardin,racicot,quillin,pushard,primrose,pries,pressey,precourt,pratts,postel,poppell,plumer,pingree,pieroni,pflug,petre,petrarca,peterka,perkin,pergande,peranio,penna,paulhus,pasquariello,parras,parmentier,pamplin,oviatt,osterhoudt,ostendorf,osmun,ortman,orloff,orban,onofrio,olveda,oltman,okeeffe,ocana,nunemaker,novy,noffsinger,nish,niday,nethery,nemitz,neidert,nadal,nack,muszynski,munsterman,mulherin,mortimore,morter,montesino,montalvan,montalbano,momon,moman,mogan,minns,millward,milling,michelsen,mewborn,metayer,mensch,meloy,meggs,meaders,mcsorley,mcmenamin,mclead,mclauchlin,mcguffey,mcguckin,mcglaughlin,mcferron,mcentyre,mccrum,mccawley,mcbain,mayhue,matzen,matton,marsee,marrin,marland,markum,mantilla,manfre,makuch,madlock,macauley,luzier,luthy,lufkin,lucena,loudin,lothrop,lorch,loll,loadholt,lippold,lichtman,liberto,liakos,lewicki,levett,lentine,leja,legree,lawhead,lauro,lauder,lanman,lank,laning,lalor,krob,kriger,kriegel,krejci,kreisel,kozel,konkel,kolstad,koenen,kocsis,knoblock,knebel,klopfer,klee,kilday,kesten,kerbs,kempker,keathley,kazee,kaur,kamer,kamaka,kallenbach,jehle,jaycox,jardin,jahns,ivester,hyppolite,hyche,huppert,hulin,hubley,horsey,hornak,holzwarth,holmon,hollabaugh,holaway,hodes,hoak,hinesley,hillwig,hillebrand,highfield,heslop,herrada,hendryx,hellums,heit,heishman,heindel,hayslip,hayford,hastie,hartgrove,hanus,hakim,hains,hadnott,gundersen,gulino,guidroz,guebert,gressett,graydon,gramling,grahn,goupil,gorelick,goodreau,goodnough,golay,goers,glatz,gillikin,gieseke,giammarino,getman,gensler,gazda,garibaldi,gahan,funderburke,fukuda,fugitt,fuerst,fortman,forsgren,formica,flink,fitton,feltz,fekete,feit,fehrenbach,farone,farinas,faries,fagen,ewin,esquilin,esch,enderle,ellery,ellers,ekberg,egli,effinger,dymond,dulle,dula,duhe,dudney,dowless,dower,dorminey,dopp,dooling,domer,disher,dillenbeck,difilippo,dibernardo,deyoe,devillier,denley,deland,defibaugh,deeb,debow,dauer,datta,darcangelo,daoust,damelio,dahm,dahlman,curlin,cupit,culton,cuenca,cropp,croke,cremer,crace,cosio,corzine,coombe,coman,colone,coloma,collingwood,coderre,cocke,cobler,claybrook,cincotta,cimmino,christoff,chisum,chillemi,chevere,chachere,cervone,cermak,cefalu,cauble,cather,caso,carns,carcamo,carbo,capoccia,capello,capell,canino,cambareri,calvi,cabiness,bushell,burtt,burstein,burkle,bunner,bundren,buechler,bryand,bruso,brownstein,brouse,brodt,brisbin,brightman,brenes,breitenbach,brazzell,brazee,bramwell,bramhall,bradstreet,boyton,bowland,boulter,bossert,bonura,bonebrake,bonacci,boeck,blystone,birchard,bilal,biddy,bibee,bevans,bethke,bertelsen,berney,bergfeld,benware,bellon,bellah,batterton,barberio,bamber,bagdon,badeaux,averitt,augsburger,ates,arvie,aronowitz,arens,araya,angelos,andrada,amell,amante,almy,almquist,alls,aispuro,aguillon,agudelo,aceto,abalos,zdenek,zaremba,zaccaria,youssef,wrona,wrede,wotton,woolston,wolpert,wollman,wince,wimberley,willmore,willetts,wikoff,wieder,wickert,whitenack,wernick,welte,welden,weisenberger,weich,wallington,walder,vossler,vore,vigo,vierling,victorine,verdun,vencill,vazguez,vassel,vanzile,vanvliet,vantrease,vannostrand,vanderveer,vanderveen,vancil,uyeda,umphrey,uhler,uber,tutson,turrentine,tullier,tugwell,trundy,tripodi,tomer,tomasi,tomaselli,tokarski,tisher,tibbets,thweatt,tharrington,tesar,telesco,teasdale,tatem,taniguchi,suriel,sudler,stutsman,sturman,strite,strelow,streight,strawder,stransky,strahl,stours,stong,stinebaugh,stillson,steyer,stelle,steffensmeier,statham,squillante,spiess,spargo,southward,soller,soden,snuggs,snellgrove,smyers,smiddy,slonaker,skyles,skowron,sivils,siqueiros,siers,siddall,shontz,shingler,shiley,shibley,sherard,shelnutt,shedrick,shasteen,sereno,selke,scovil,scola,schuett,schuessler,schreckengost,schranz,schoepp,schneiderman,schlanger,schiele,scheuermann,schertz,scheidler,scheff,schaner,schamber,scardina,savedra,saulnier,sater,sarro,sambrano,salomone,sabourin,ruud,rutten,ruffino,ruddock,rowser,roussell,rosengarten,rominger,rollinson,rohman,roeser,rodenberg,roberds,ridgell,rhodus,reynaga,rexrode,revelle,rempel,remigio,reising,reiling,reetz,rayos,ravenscroft,ravenell,raulerson,rasmusson,rask,rase,ragon,quesnel,quashie,puzo,puterbaugh,ptak,prost,prisbrey,principe,pricer,pratte,pouncey,portman,pontious,pomerantz,planck,pilkenton,pilarski,phegley,pertuit,penta,pelc,peffer,pech,peagler,pavelka,pavao,patman,paskett,parrilla,pardini,papazian,panter,palin,paley,paetzold,packett,pacheo,ostrem,orsborn,olmedo,okamura,oiler,oglesbee,oatis,nuckles,notter,nordyke,nogueira,niswander,nibert,nesby,neloms,nading,naab,munns,mullarkey,moudy,moret,monnin,molder,modisette,moczygemba,moctezuma,mischke,miro,mings,milot,milledge,milhorn,milera,mieles,mickley,micek,metellus,mersch,merola,mercure,mencer,mellin,mell,meinke,mcquillan,mcmurtrie,mckillop,mckiernan,mckendrick,mckamie,mcilvaine,mcguffie,mcgonigle,mcgarrah,mcfetridge,mcenaney,mcdow,mccutchan,mccallie,mcadam,maycock,maybee,mattei,massi,masser,masiello,marshell,marmo,marksberry,markell,marchal,manross,manganaro,mally,mallow,mailhot,magyar,madero,madding,maddalena,macfarland,lynes,lugar,luckie,lucca,lovitt,loveridge,loux,loth,loso,lorenzana,lorance,lockley,lockamy,littler,litman,litke,liebel,lichtenberger,licea,leverich,letarte,lesesne,leno,legleiter,leffew,laurin,launius,laswell,lassen,lasala,laraway,laramore,landrith,lancon,lanahan,laiche,laford,lachermeier,kunst,kugel,kuck,kuchta,kube,korus,koppes,kolbe,koerber,kochan,knittel,kluck,kleve,kleine,kitch,kirton,kirker,kintz,kinghorn,kindell,kimrey,kilduff,kilcrease,kicklighter,kibble,kervin,keplinger,keogh,kellog,keeth,kealey,kazmierczak,karner,kamel,kalina,kaczynski,juel,jerman,jeppson,jawad,jasik,jaqua,janusz,janco,inskeep,inks,ingold,hyndman,hymer,hunte,hunkins,humber,huffstutler,huffines,hudon,hudec,hovland,houze,hout,hougland,hopf,holsapple,holness,hollenbach,hoffmeister,hitchings,hirata,hieber,hickel,hewey,herriman,hermansen,herandez,henze,heffelfinger,hedgecock,hazlitt,hazelrigg,haycock,harren,harnage,harling,harcrow,hannold,hanline,hanel,hanberry,hammersley,hamernik,hajduk,haithcock,haff,hadaway,haan,gullatt,guilbault,guidotti,gruner,grisson,grieves,granato,grabert,gover,gorka,glueck,girardin,giesler,gersten,gering,geers,gaut,gaulin,gaskamp,garbett,gallivan,galland,gaeth,fullenkamp,fullam,friedrichs,freire,freeney,fredenburg,frappier,fowkes,foree,fleurant,fleig,fleagle,fitzsimons,fischetti,fiorenza,finneran,filippi,figueras,fesler,fertig,fennel,feltmann,felps,felmlee,fannon,familia,fairall,fadden,esslinger,enfinger,elsasser,elmendorf,ellisor,einhorn,ehrman,egner,edmisten,edlund,ebinger,dyment,dykeman,durling,dunstan,dunsmore,dugal,duer,drescher,doyel,dossey,donelan,dockstader,dobyns,divis,dilks,didier,desrosier,desanto,deppe,delosh,delange,defrank,debo,dauber,dartez,daquila,dankert,dahn,cygan,cusic,curfman,croghan,croff,criger,creviston,crays,cravey,crandle,crail,crago,craghead,cousineau,couchman,cothron,corella,conine,coller,colberg,cogley,coatney,coale,clendenin,claywell,clagon,cifaldi,choiniere,chickering,chica,chennault,chavarin,chattin,chaloux,challis,cesario,cazarez,caughman,catledge,casebolt,carrel,carra,carlow,capote,canez,camillo,caliendo,calbert,bylsma,buskey,buschman,burkhard,burghardt,burgard,buonocore,bunkley,bungard,bundrick,bumbrey,buice,buffkin,brundige,brockwell,brion,briant,bredeson,bransford,brannock,brakefield,brackens,brabant,bowdoin,bouyer,bothe,boor,bonavita,bollig,blurton,blunk,blanke,blanck,birden,bierbaum,bevington,beutler,betters,bettcher,bera,benway,bengston,benesh,behar,bedsole,becenti,beachy,battersby,basta,bartmess,bartle,bartkowiak,barsky,barrio,barletta,barfoot,banegas,baldonado,azcona,avants,austell,aungst,aune,aumann,audia,atterbury,asselin,asmussen,ashline,asbill,arvizo,arnot,ariola,ardrey,angstadt,anastasio,amsden,amerman,alred,allington,alewine,alcina,alberico,ahlgren,aguas,agrawal,agosta,adolphsen,acey,aburto,abler,zwiebel,zepp,zentz,ybarbo,yarberry,yamauchi,yamashiro,wurtz,wronski,worster,wootten,wongus,woltz,wolanski,witzke,withey,wisecarver,wingham,wineinger,winegarden,windholz,wilgus,wiesen,wieck,widrick,wickliffe,whittenberg,westby,werley,wengert,wendorf,weimar,weick,weckerly,watrous,wasden,walford,wainright,wahlstrom,wadlow,vrba,voisin,vives,vivas,vitello,villescas,villavicencio,villanova,vialpando,vetrano,vensel,vassell,varano,vanriper,vankleeck,vanduyne,vanderpol,vanantwerp,valenzula,udell,turnquist,tuff,trickett,tramble,tingey,timbers,tietz,thiem,tercero,tenner,tenaglia,teaster,tarlton,taitt,tabon,sward,swaby,suydam,surita,suman,suddeth,stumbo,studivant,strobl,streich,stoodley,stoecker,stillwagon,stickle,stellmacher,stefanik,steedley,starbird,stainback,stacker,speir,spath,sommerfeld,soltani,solie,sojka,sobota,sobieski,sobczak,smullen,sleeth,slaymaker,skolnick,skoglund,sires,singler,silliman,shrock,shott,shirah,shimek,shepperd,sheffler,sheeler,sharrock,sharman,shalash,seyfried,seybold,selander,seip,seifried,sedor,sedlock,sebesta,seago,scutt,scrivens,sciacca,schultze,schoemaker,schleifer,schlagel,schlachter,schempp,scheider,scarboro,santi,sandhu,salim,saia,rylander,ryburn,rutigliano,ruocco,ruland,rudloff,rott,rosenburg,rosenbeck,romberger,romanelli,rohloff,rohlfing,rodda,rodd,ritacco,rielly,rieck,rickles,rickenbacker,respass,reisner,reineck,reighard,rehbein,rega,reddix,rawles,raver,rattler,ratledge,rathman,ramsburg,raisor,radovich,radigan,quail,puskar,purtee,priestly,prestidge,presti,pressly,pozo,pottinger,portier,porta,porcelli,poplawski,polin,poeppelman,pocock,plump,plantz,placek,piro,pinnell,pinkowski,pietz,picone,philbeck,pflum,peveto,perret,pentz,payer,patlan,paterno,papageorge,overmyer,overland,osier,orwig,orum,orosz,oquin,opie,ochsner,oathout,nygard,norville,northway,niver,nicolson,newhart,neitzel,nath,nanez,murnane,mortellaro,morreale,morino,moriarity,morgado,moorehouse,mongiello,molton,mirza,minnix,millspaugh,milby,miland,miguez,mickles,michaux,mento,melugin,melito,meinecke,mehr,meares,mcneece,mckane,mcglasson,mcgirt,mcgilvery,mcculler,mccowen,mccook,mcclintic,mccallon,mazzotta,maza,mayse,mayeda,matousek,matley,martyn,marney,marnell,marling,manuelito,maltos,malson,mahi,maffucci,macken,maass,lyttle,lynd,lyden,lukasiewicz,luebbers,lovering,loveall,longtin,lobue,loberg,lipka,lightbody,lichty,levert,lettieri,letsinger,lepak,lemmond,lembke,leitz,lasso,lasiter,lango,landsman,lamirande,lamey,laber,kuta,kulesza,krenz,kreiner,krein,kreiger,kraushaar,kottke,koser,kornreich,kopczynski,konecny,koff,koehl,kocian,knaub,kmetz,kluender,klenke,kleeman,kitzmiller,kirsh,kilman,kildow,kielbasa,ketelsen,kesinger,kehr,keef,kauzlarich,karter,kahre,jobin,jinkins,jines,jeffress,jaquith,jaillet,jablonowski,ishikawa,irey,ingerson,indelicato,huntzinger,huisman,huett,howson,houge,hosack,hora,hoobler,holtzen,holtsclaw,hollingworth,hollin,hoberg,hobaugh,hilker,hilgefort,higgenbotham,heyen,hetzler,hessel,hennessee,hendrie,hellmann,heft,heesch,haymond,haymon,haye,havlik,havis,haverland,haus,harstad,harriston,harju,hardegree,hammell,hamaker,halbrook,halberg,guptill,guntrum,gunderman,gunder,gularte,guarnieri,groll,grippo,greely,gramlich,goewey,goetzinger,goding,giraud,giefer,giberson,gennaro,gemmell,gearing,gayles,gaudin,gatz,gatts,gasca,garn,gandee,gammel,galindez,galati,gagliardo,fulop,fukushima,friedt,fretz,frenz,freeberg,fravel,fountaine,forry,forck,fonner,flippin,flewelling,flansburg,filippone,fettig,fenlon,felter,felkins,fein,favero,faulcon,farver,farless,fahnestock,facemire,faas,eyer,evett,esses,escareno,ensey,ennals,engelking,empey,ellithorpe,effler,edling,edgley,durrell,dunkerson,draheim,domina,dombrosky,doescher,dobbin,divens,dinatale,dieguez,diede,devivo,devilbiss,devaul,determan,desjardin,deshaies,delpozo,delorey,delman,delapp,delamater,deibert,degroff,debelak,dapolito,dano,dacruz,dacanay,cushenberry,cruze,crosbie,cregan,cousino,corrao,corney,cookingham,conry,collingsworth,coldren,cobian,coate,clauss,christenberry,chmiel,chauez,charters,chait,cesare,cella,caya,castenada,cashen,cantrelle,canova,campione,calixte,caicedo,byerley,buttery,burda,burchill,bulmer,bulman,buesing,buczek,buckholz,buchner,buchler,buban,bryne,brunkhorst,brumsey,brumer,brownson,brodnax,brezinski,brazile,braverman,branning,boye,boulden,bough,bossard,bosak,borth,borgmeyer,borge,blowers,blaschke,blann,blankenbaker,bisceglia,billingslea,bialek,beverlin,besecker,berquist,benigno,benavente,belizaire,beisner,behrman,beausoleil,baylon,bayley,bassi,basnett,basilio,basden,basco,banerjee,balli,bagnell,bady,averette,arzu,archambeault,arboleda,arbaugh,arata,antrim,amrhein,amerine,alpers,alfrey,alcon,albus,albertini,aguiniga,aday,acquaviva,accardi,zygmont,zych,zollner,zobel,zinck,zertuche,zaragosa,zale,zaldivar,yeadon,wykoff,woullard,wolfrum,wohlford,wison,wiseley,wisecup,winchenbach,wiltsie,whittlesey,whitelow,whiteford,wever,westrich,wertman,wensel,wenrich,weisbrod,weglarz,wedderburn,weatherhead,wease,warring,wadleigh,voltz,vise,villano,vicario,vermeulen,vazques,vasko,varughese,vangieson,vanfossen,vanepps,vanderploeg,vancleve,valerius,uyehara,unsworth,twersky,turrell,tuner,tsui,trunzo,trousdale,trentham,traughber,torgrimson,toppin,tokar,tobia,tippens,tigue,thiry,thackston,terhaar,tenny,tassin,tadeo,sweigart,sutherlin,sumrell,suen,stuhr,strzelecki,strosnider,streiff,stottlemyer,storment,storlie,stonesifer,stogsdill,stenzel,stemen,stellhorn,steidl,stecklein,statton,stangle,spratling,spoor,spight,spelman,spece,spanos,spadoni,southers,sola,sobol,smyre,slaybaugh,sizelove,sirmons,simington,silversmith,siguenza,sieren,shelman,sharples,sharif,sessler,serrata,serino,serafini,semien,selvey,seedorf,seckman,seawood,scoby,scicchitano,schorn,schommer,schnitzer,schleusner,schlabach,schiel,schepers,schaber,scally,sautner,sartwell,santerre,sandage,salvia,salvetti,salsman,sallis,salais,saeger,sabat,saar,ruther,russom,ruoff,rumery,rubottom,rozelle,rowton,routon,rotolo,rostad,roseborough,rorick,ronco,roher,roberie,robare,ritts,rison,rippe,rinke,ringwood,righter,rieser,rideaux,rickerson,renfrew,releford,reinsch,reiman,reifsteck,reidhead,redfearn,reddout,reaux,rado,radebaugh,quinby,quigg,provo,provenza,provence,pridgeon,praylow,powel,poulter,portner,pontbriand,poirrier,poirer,platero,pixler,pintor,pigman,piersall,piel,pichette,phou,pharis,phalen,petsche,perrier,penfield,pelosi,pebley,peat,pawloski,pawlik,pavlick,pavel,patz,patout,pascucci,pasch,parrinello,parekh,pantaleo,pannone,pankow,pangborn,pagani,pacelli,orsi,oriley,orduno,oommen,olivero,okada,ocon,ocheltree,oberman,nyland,noss,norling,nolton,nobile,nitti,nishimoto,nghiem,neuner,neuberger,neifert,negus,nagler,mullally,moulden,morra,morquecho,moots,mizzell,mirsky,mirabito,minardi,milholland,mikus,mijangos,michener,michalek,methvin,merrit,menter,meneely,meiers,mehring,mees,mcwhirt,mcwain,mcphatter,mcnichol,mcnaught,mclarty,mcivor,mcginness,mcgaughy,mcferrin,mcfate,mcclenny,mcclard,mccaskey,mccallion,mcamis,mathisen,marton,marsico,marchi,mani,mangione,macaraeg,lupi,lunday,lukowski,lucious,locicero,loach,littlewood,litt,lipham,linley,lindon,lightford,lieser,leyendecker,lewey,lesane,lenzi,lenart,leisinger,lehrman,lefebure,lazard,laycock,laver,launer,lastrapes,lastinger,lasker,larkey,lanser,lanphere,landey,lampton,lamark,kumm,kullman,krzeminski,krasner,koran,koning,kohls,kohen,kobel,kniffen,knick,kneip,knappenberger,klumpp,klausner,kitamura,kisling,kirshner,kinloch,kingman,kimery,kestler,kellen,keleher,keehn,kearley,kasprzak,kampf,kamerer,kalis,kahan,kaestner,kadel,kabel,junge,juckett,joynt,jorstad,jetter,jelley,jefferis,jeansonne,janecek,jaffee,izzard,istre,isherwood,ipock,iannuzzi,hypolite,humfeld,hotz,hosein,honahni,holzworth,holdridge,holdaway,holaday,hodak,hitchman,hippler,hinchey,hillin,hiler,hibdon,hevey,heth,hepfer,henneman,hemsley,hemmings,hemminger,helbert,helberg,heinze,heeren,heber,haver,hauff,haswell,harvison,hartson,harshberger,harryman,harries,hane,hamsher,haggett,hagemeier,haecker,haddon,haberkorn,guttman,guttierrez,guthmiller,guillet,guilbert,gugino,grumbles,griffy,gregerson,grana,goya,goranson,gonsoulin,goettl,goertz,godlewski,glandon,gilsdorf,gillogly,gilkison,giard,giampaolo,gheen,gettings,gesell,gershon,gaumer,gartrell,garside,garrigan,garmany,garlitz,garlington,gamet,furlough,funston,funaro,frix,frasca,francoeur,forshey,foose,flatley,flagler,fils,fillers,fickett,feth,fennelly,fencl,felch,fedrick,febres,fazekas,farnan,fairless,ewan,etsitty,enterline,elsworth,elliff,eleby,eldreth,eidem,edgecomb,edds,ebarb,dworkin,dusenberry,durrance,duropan,durfey,dungy,dundon,dumbleton,dubon,dubberly,droz,drinkwater,dressel,doughtie,doshier,dorrell,dople,doonan,donadio,dollison,doig,ditzler,dishner,discher,dimaio,digman,difalco,devino,devens,derosia,deppen,depaola,deniz,denardo,demos,demay,delgiudice,davi,danielsen,dally,dais,dahmer,cutsforth,cusimano,curington,cumbee,cryan,crusoe,crowden,crete,cressman,crapo,cowens,coupe,councill,coty,cotnoir,correira,copen,consiglio,combes,coffer,cockrill,coad,clogston,clasen,chesnutt,charrier,chadburn,cerniglia,cebula,castruita,castilla,castaldi,casebeer,casagrande,carta,carrales,carnley,cardon,capshaw,capron,cappiello,capito,canney,candela,caminiti,califano,calabria,caiazzo,cahall,buscemi,burtner,burgdorf,burdo,buffaloe,buchwald,brwon,brunke,brummond,brumm,broe,brocious,brocato,briski,brisker,brightwell,bresett,breiner,brazeau,braz,brayman,brandis,bramer,bradeen,boyko,bossi,boshart,bortle,boniello,bomgardner,bolz,bolenbaugh,bohling,bohland,bochenek,blust,bloxham,blowe,blish,blackwater,bjelland,biros,biederman,bickle,bialaszewski,bevil,beumer,bettinger,besse,bernett,bermejo,bement,belfield,beckler,baxendale,batdorf,bastin,bashore,bascombe,bartlebaugh,barsh,ballantine,bahl,badon,autin,astin,askey,ascher,arrigo,arbeiter,antes,angers,amburn,amarante,alvidrez,althaus,allmond,alfieri,aldinger,akerley,akana,aikins,ader,acebedo,accardo,abila,aberle,abele,abboud,zollars,zimmerer,zieman,zerby,zelman,zellars,yoshimura,yonts,yeats,yant,yamanaka,wyland,wuensche,worman,wordlaw,wohl,winslett,winberg,wilmeth,willcutt,wiers,wiemer,wickwire,wichman,whitting,whidbee,westergard,wemmer,wellner,weishaupt,weinert,weedon,waynick,wasielewski,waren,walworth,wallingford,walke,waechter,viviani,vitti,villagrana,vien,vicks,venema,varnes,varnadoe,varden,vanpatten,vanorden,vanderzee,vandenburg,vandehey,valls,vallarta,valderrama,valade,urman,ulery,tusa,tuft,tripoli,trimpe,trickey,tortora,torrens,torchia,toft,tjaden,tison,tindel,thurmon,thode,tardugno,tancredi,taketa,taillon,tagle,sytsma,symes,swindall,swicegood,swartout,sundstrom,sumners,sulton,studstill,stroop,stonerock,stmarie,stlawrence,stemm,steinhauser,steinert,steffensen,stefaniak,starck,stalzer,spidle,spake,sowinski,sosnowski,sorber,somma,soliday,soldner,soja,soderstrom,soder,sockwell,sobus,sloop,sinkfield,simerly,silguero,sigg,siemers,siegmund,shum,sholtis,shkreli,sheikh,shattles,sharlow,shambaugh,shaikh,serrao,serafino,selley,selle,seel,sedberry,secord,schunk,schuch,schor,scholze,schnee,schmieder,schleich,schimpf,scherf,satterthwaite,sasson,sarkisian,sarinana,sanzone,salvas,salone,salido,saiki,sahr,rusher,rusek,ruppel,rubel,rothfuss,rothenberger,rossell,rosenquist,rosebrook,romito,romines,rolan,roker,roehrig,rockhold,rocca,robuck,riss,rinaldo,riggenbach,rezentes,reuther,renolds,rench,remus,remsen,reller,relf,reitzel,reiher,rehder,redeker,ramero,rahaim,radice,quijas,qualey,purgason,prum,proudfoot,prock,probert,printup,primer,primavera,prenatt,pratico,polich,podkowka,podesta,plattner,plasse,plamondon,pittmon,pippenger,pineo,pierpont,petzold,petz,pettiway,petters,petroski,petrik,pesola,pershall,perlmutter,penepent,peevy,pechacek,peaden,pazos,pavia,pascarelli,parm,parillo,parfait,paoletti,palomba,palencia,pagaduan,oxner,overfield,overcast,oullette,ostroff,osei,omarah,olenick,olah,odem,nygren,notaro,northcott,nodine,nilges,neyman,neve,neuendorf,neisler,neault,narciso,naff,muscarella,morrisette,morphew,morein,montville,montufar,montesinos,monterroso,mongold,mojarro,moitoso,mirarchi,mirando,minogue,milici,miga,midyett,michna,meuser,messana,menzie,menz,mendicino,melone,mellish,meller,melle,meints,mechem,mealer,mcwilliam,mcwhite,mcquiggan,mcphillips,mcpartland,mcnellis,mcmackin,mclaughin,mckinny,mckeithan,mcguirk,mcgillivray,mcgarr,mcgahee,mcfaul,mcfadin,mceuen,mccullah,mcconico,mcclaren,mccaul,mccalley,mccalister,mazer,mayson,mayhan,maugeri,mauger,mattix,mattews,maslowski,masek,martir,marsch,marquess,maron,markwell,markow,marinaro,marcinek,mannella,mallen,majeed,mahnke,mahabir,magby,magallan,madere,machnik,lybrand,luque,lundholm,lueders,lucian,lubinski,lowy,loew,lippard,linson,lindblad,lightcap,levitsky,levens,leonardi,lenton,lengyel,leitzel,leicht,leaver,laubscher,lashua,larusso,larrimore,lanterman,lanni,lanasa,lamoureaux,lambros,lamborn,lamberti,lall,lafuente,laferriere,laconte,kyger,kupiec,kunzman,kuehne,kuder,kubat,krogh,kreidler,krawiec,krauth,kratky,kottwitz,korb,kono,kolman,kolesar,koeppel,knapper,klingenberg,kjos,keppel,kennan,keltz,kealoha,kasel,karney,kanne,kamrowski,kagawa,johnosn,jilek,jarvie,jarret,jansky,jacquemin,jacox,jacome,iriarte,ingwersen,imboden,iglesia,huyser,hurston,hursh,huntoon,hudman,hoying,horsman,horrigan,hornbaker,horiuchi,hopewell,hommel,homeyer,holzinger,holmer,hipsher,hinchman,hilts,higginbottom,hieb,heyne,hessling,hesler,hertlein,herford,heras,henricksen,hennemann,henery,hendershott,hemstreet,heiney,heckert,heatley,hazell,hazan,hayashida,hausler,hartsoe,harth,harriott,harriger,harpin,hardisty,hardge,hannaman,hannahs,hamp,hammersmith,hamiton,halsell,halderman,hagge,habel,gusler,gushiken,gurr,gummer,gullick,grunden,grosch,greenburg,greb,greaver,gratz,grajales,gourlay,gotto,gorley,goodpasture,godard,glorioso,gloor,glascock,gizzi,giroir,gibeault,gauldin,gauer,gartin,garrels,gamber,gallogly,gade,fusaro,fripp,freyer,freiberg,franzoni,fragale,foston,forti,forness,folts,followell,foard,flom,flett,fleitas,flamm,fino,finnen,finchum,filippelli,fickel,feucht,feiler,feenstra,feagins,faver,faulkenberry,farabaugh,fandel,faler,faivre,fairey,facey,exner,evensen,erion,erben,epting,epping,ephraim,engberg,elsen,ellingwood,eisenmann,eichman,ehle,edsall,durall,dupler,dunker,dumlao,duford,duffie,dudding,dries,doung,dorantes,donahoo,domenick,dollins,dobles,dipiazza,dimeo,diehm,dicicco,devenport,desormeaux,derrow,depaolo,demas,delpriore,delosantos,degreenia,degenhardt,defrancesco,defenbaugh,deets,debonis,deary,dazey,dargie,dambrosia,dalal,dagen,cuen,crupi,crossan,crichlow,creque,coutts,counce,coram,constante,connon,collelo,coit,cocklin,coblentz,cobey,coard,clutts,clingan,clampitt,claeys,ciulla,cimini,ciampa,christon,choat,chiou,chenail,chavous,catto,catalfamo,casterline,cassinelli,caspers,carroway,carlen,carithers,cappel,calo,callow,cagley,cafferty,byun,byam,buttner,buth,burtenshaw,burget,burfield,buresh,bunt,bultman,bulow,buchta,buchmann,brunett,bruemmer,brueggeman,britto,briney,brimhall,bribiesca,bresler,brazan,brashier,brar,brandstetter,boze,boonstra,bluitt,blomgren,blattner,blasi,bladen,bitterman,bilby,bierce,biello,bettes,bertone,berrey,bernat,berberich,benshoof,bendickson,bellefeuille,bednarski,beddingfield,beckerman,beaston,bavaro,batalla,basye,baskins,bartolotta,bartkowski,barranco,barkett,banaszak,bame,bamberger,balsley,ballas,balicki,badura,aymond,aylor,aylesworth,axley,axelrod,aubert,armond,ariza,apicella,anstine,ankrom,angevine,andreotti,alto,alspaugh,alpaugh,almada,allinder,alequin,aguillard,agron,agena,afanador,ackerley,abrev,abdalla,aaronson,zynda,zucco,zipp,zetina,zenz,zelinski,youngren,yochum,yearsley,yankey,woodfork,wohlwend,woelfel,wiste,wismer,winzer,winker,wilkison,wigger,wierenga,whipps,westray,wesch,weld,weible,wedell,weddell,wawrzyniak,wasko,washinton,wantz,walts,wallander,wain,wahlen,wachowiak,voshell,viteri,vire,villafuerte,vieyra,viau,vescio,verrier,verhey,vause,vandermolen,vanderhorst,valois,valla,valcourt,vacek,uzzle,umland,ulman,ulland,turvey,tuley,trembath,trabert,towsend,totman,toews,tisch,tisby,tierce,thivierge,tenenbaum,teagle,tacy,tabler,szewczyk,swearngin,suire,sturrock,stubbe,stronach,stoute,stoudemire,stoneberg,sterba,stejskal,steier,stehr,steckel,stearman,steakley,stanforth,stancill,srour,sprowl,spevak,sokoloff,soderman,snover,sleeman,slaubaugh,sitzman,simes,siegal,sidoti,sidler,sider,sidener,siddiqi,shireman,shima,sheroan,shadduck,seyal,sentell,sennett,senko,seligman,seipel,seekins,seabaugh,scouten,schweinsberg,schwartzberg,schurr,schult,schrick,schoening,schmitmeyer,schlicher,schlager,schack,schaar,scavuzzo,scarpa,sassano,santigo,sandavol,sampsel,samms,samet,salzano,salyards,salva,saidi,sabir,saam,runions,rundquist,rousselle,rotunno,rosch,romney,rohner,roff,rockhill,rocamora,ringle,riggie,ricklefs,rexroat,reves,reuss,repka,rentfro,reineke,recore,recalde,rease,rawling,ravencraft,ravelo,rappa,randol,ramsier,ramerez,rahimi,rahim,radney,racey,raborn,rabalais,quebedeaux,pujol,puchalski,prothro,proffit,prigge,prideaux,prevo,portales,porco,popovic,popek,popejoy,pompei,plude,platner,pizzuto,pizer,pistone,piller,pierri,piehl,pickert,piasecki,phong,philipp,peugh,pesqueira,perrett,perfetti,percell,penhollow,pelto,pellett,pavlak,paulo,pastorius,parsell,parrales,pareja,parcell,pappan,pajak,owusu,ovitt,orrick,oniell,olliff,olberding,oesterling,odwyer,ocegueda,obermiller,nylander,nulph,nottage,northam,norgard,nodal,niel,nicols,newhard,nellum,neira,nazzaro,nassif,narducci,nalbandian,musil,murga,muraoka,mumper,mulroy,mountjoy,mossey,moreton,morea,montoro,montesdeoca,montealegre,montanye,montandon,moisan,mohl,modeste,mitra,minson,minjarez,milbourne,michaelsen,metheney,mestre,mescher,mervis,mennenga,melgarejo,meisinger,meininger,mcwaters,mckern,mckendree,mchargue,mcglothlen,mcgibbon,mcgavock,mcduffee,mcclurkin,mccausland,mccardell,mccambridge,mazzoni,mayen,maxton,mawson,mauffray,mattinson,mattila,matsunaga,mascia,marse,marotz,marois,markin,markee,marcinko,marcin,manville,mantyla,manser,manry,manderscheid,mallari,malecha,malcomb,majerus,macinnis,mabey,lyford,luth,lupercio,luhman,luedke,lovick,lossing,lookabaugh,longway,loisel,logiudice,loffredo,lobaugh,lizaola,livers,littlepage,linnen,limmer,liebsch,liebman,leyden,levitan,levison,levier,leven,levalley,lettinga,lessley,lessig,lepine,leight,leick,leggio,leffingwell,leffert,lefevers,ledlow,leaton,leander,leaming,lazos,laviolette,lauffer,latz,lasorsa,lasch,larin,laporta,lanter,langstaff,landi,lamica,lambson,lambe,lamarca,laman,lamagna,lajeunesse,lafontant,lafler,labrum,laakso,kush,kuether,kuchar,kruk,kroner,kroh,kridler,kreuzer,kovats,koprowski,kohout,knicely,knell,klutts,kindrick,kiddy,khanna,ketcher,kerschner,kerfien,kensey,kenley,kenan,kemplin,kellerhouse,keesling,keas,kaplin,kanady,kampen,jutras,jungers,jeschke,janowski,janas,iskra,imperato,ikerd,igoe,hyneman,hynek,husain,hurrell,hultquist,hullett,hulen,huberty,hoyte,hossain,hornstein,hori,hopton,holms,hollmann,holdman,holdeman,holben,hoffert,himel,hillsman,herdt,hellyer,heister,heimer,heidecker,hedgpeth,hedgepath,hebel,heatwole,hayer,hausner,haskew,haselden,hartranft,harsch,harres,harps,hardimon,halm,hallee,hallahan,hackley,hackenberg,hachey,haapala,guynes,gunnerson,gunby,gulotta,gudger,groman,grignon,griebel,gregori,greenan,grauer,gourd,gorin,gorgone,gooslin,goold,goltz,goldberger,glotfelty,glassford,gladwin,giuffre,gilpatrick,gerdts,geisel,gayler,gaunce,gaulding,gateley,gassman,garson,garron,garand,gangestad,gallow,galbo,gabrielli,fullington,fucci,frum,frieden,friberg,frasco,francese,fowle,foucher,fothergill,foraker,fonder,foisy,fogal,flurry,flenniken,fitzhenry,fishbein,finton,filmore,filice,feola,felberbaum,fausnaught,fasciano,farquharson,faires,estridge,essman,enriques,emmick,ekker,ekdahl,eisman,eggleton,eddinger,eakle,eagar,durio,dunwoody,duhaime,duenes,duden,dudas,dresher,dresel,doutt,donlan,donathan,domke,dobrowolski,dingee,dimmitt,dimery,dilullo,deveaux,devalle,desper,desnoyers,desautels,derouin,derbyshire,denmon,demski,delucca,delpino,delmont,deller,dejulio,deibler,dehne,deharo,degner,defore,deerman,decuir,deckman,deasy,dease,deaner,dawdy,daughdrill,darrigo,darity,dalbey,dagenhart,daffron,curro,curnutte,curatolo,cruikshank,crosswell,croslin,croney,crofton,criado,crecelius,coscia,conniff,commodore,coltharp,colonna,collyer,collington,cobbley,coache,clonts,cloe,cliett,clemans,chrisp,chiarini,cheatam,cheadle,chand,chadd,cervera,cerulli,cerezo,cedano,cayetano,cawthorne,cavalieri,cattaneo,cartlidge,carrithers,carreira,carranco,cargle,candanoza,camburn,calender,calderin,calcagno,cahn,cadden,byham,buttry,burry,burruel,burkitt,burgio,burgener,buescher,buckalew,brymer,brumett,brugnoli,brugman,brosnahan,bronder,broeckel,broderson,brisbon,brinsfield,brinks,bresee,bregman,branner,brambila,brailsford,bouska,boster,borucki,bortner,boroughs,borgeson,bonier,bomba,bolender,boesch,boeke,bloyd,bley,binger,bilbro,biery,bichrest,bezio,bevel,berrett,bermeo,bergdoll,bercier,benzel,bentler,belnap,bellini,beitz,behrend,bednarczyk,bearse,bartolini,bartol,barretta,barbero,barbaro,banvelos,bankes,ballengee,baldon,ausmus,atilano,atienza,aschenbrenner,arora,armstong,aquilino,appleberry,applebee,apolinar,antos,andrepont,ancona,amesquita,alvino,altschuler,allin,alire,ainslie,agular,aeschliman,accetta,abdulla,abbe,zwart,zufelt,zirbel,zingaro,zilnicki,zenteno,zent,zemke,zayac,zarrella,yoshimoto,yearout,womer,woltman,wolin,wolery,woldt,witts,wittner,witherow,winward,winrow,wiemann,wichmann,whitwell,whitelaw,wheeless,whalley,wessner,wenzl,wene,weatherbee,waye,wattles,wanke,walkes,waldeck,vonruden,voisine,vogus,vittetoe,villalva,villacis,venturini,venturi,venson,vanloan,vanhooser,vanduzer,vandever,vanderwal,vanderheyden,vanbeek,vanbebber,vallance,vales,vahle,urbain,upshur,umfleet,tsuji,trybus,triolo,trimarchi,trezza,trenholm,tovey,tourigny,torry,torrain,torgeson,tomey,tischler,tinkler,tinder,ticknor,tibbles,tibbals,throneberry,thormahlen,thibert,thibeaux,theurer,templet,tegeler,tavernier,taubman,tamashiro,tallon,tallarico,taboada,sypher,sybert,swyers,switalski,swedberg,suther,surprenant,sullen,sulik,sugden,suder,suchan,strube,stroope,strittmatter,streett,straughn,strasburg,stjacques,stimage,stimac,stifter,stgelais,steinhart,stehlik,steffenson,steenbergen,stanbery,stallone,spraggs,spoto,spilman,speno,spanbauer,spalla,spagnolo,soliman,solan,sobolik,snelgrove,snedden,smale,sliter,slankard,sircy,shutter,shurtliff,shur,shirkey,shewmake,shams,shadley,shaddox,sgro,serfass,seppala,segawa,segalla,seaberry,scruton,scism,schwein,schwartzman,schwantes,schomer,schoenborn,schlottmann,schissler,scheurer,schepis,scheidegger,saunier,sauders,sassman,sannicolas,sanderfur,salser,sagar,saffer,saeed,sadberry,saban,ryce,rybak,rumore,rummell,rudasill,rozman,rota,rossin,rosell,rosel,romberg,rojero,rochin,robideau,robarge,roath,risko,ringel,ringdahl,riera,riemann,ribas,revard,renegar,reinwald,rehman,redel,raysor,rathke,rapozo,rampton,ramaker,rakow,raia,radin,raco,rackham,racca,racanelli,rabun,quaranta,purves,pundt,protsman,prezioso,presutti,presgraves,poydras,portnoy,portalatin,pontes,poehler,poblete,poat,plumadore,pleiman,pizana,piscopo,piraino,pinelli,pillai,picken,picha,piccoli,philen,petteway,petros,peskin,perugini,perrella,pernice,peper,pensinger,pembleton,passman,parrent,panetta,pallas,palka,pais,paglia,padmore,ottesen,oser,ortmann,ormand,oriol,orick,oler,okafor,ohair,obert,oberholtzer,nowland,nosek,nordeen,nolf,nogle,nobriga,nicley,niccum,newingham,neumeister,neugebauer,netherland,nerney,neiss,neis,neider,neeld,nailor,mustain,mussman,musante,murton,murden,munyon,muldrew,motton,moscoso,moschella,moroz,morelos,morace,moone,montesano,montemurro,montas,montalbo,molander,mleczko,miyake,mitschke,minger,minelli,minear,millener,mihelich,miedema,miah,metzer,mery,merrigan,merck,mennella,membreno,melecio,melder,mehling,mehler,medcalf,meche,mealing,mcqueeney,mcphaul,mcmickle,mcmeen,mcmains,mclees,mcgowin,mcfarlain,mcdivitt,mccotter,mcconn,mccaster,mcbay,mcbath,mayoral,mayeux,matsuo,masur,massman,marzette,martensen,marlett,markgraf,marcinkowski,marchbanks,mansir,mandez,mancil,malagon,magnani,madonia,madill,madia,mackiewicz,macgillivray,macdowell,mabee,lundblad,lovvorn,lovings,loreto,linz,linnell,linebaugh,lindstedt,lindbloom,limberg,liebig,lickteig,lichtenberg,licari,lewison,levario,levar,lepper,lenzen,lenderman,lemarr,leinen,leider,legrande,lefort,lebleu,leask,leacock,lazano,lawalin,laven,laplaca,lant,langsam,langone,landress,landen,lande,lamorte,lairsey,laidlaw,laffin,lackner,lacaze,labuda,labree,labella,labar,kyer,kuyper,kulinski,kulig,kuhnert,kuchera,kubicek,kruckeberg,kruchten,krider,kotch,kornfeld,koren,koogler,koll,kole,kohnke,kohli,kofoed,koelling,kluth,klump,klopfenstein,klippel,klinge,klett,klemp,kleis,klann,kitzman,kinnan,kingsberry,kilmon,killpack,kilbane,kijowski,kies,kierstead,kettering,kesselman,kennington,keniston,kehrer,kearl,keala,kassa,kasahara,kantz,kalin,kaina,jupin,juntunen,juares,joynes,jovel,joos,jiggetts,jervis,jerabek,jennison,jaso,janz,izatt,ishibashi,iannotti,hymas,huneke,hulet,hougen,horvat,horstmann,hopple,holtkamp,holsten,hohenstein,hoefle,hoback,hiney,hiemstra,herwig,herter,herriott,hermsen,herdman,herder,herbig,helling,helbig,heitkamp,heinrichs,heinecke,heileman,heffley,heavrin,heaston,haymaker,hauenstein,hartlage,harig,hardenbrook,hankin,hamiter,hagens,hagel,grizzell,griest,griese,grennan,graden,gosse,gorder,goldin,goatley,gillespi,gilbride,giel,ghoston,gershman,geisinger,gehringer,gedeon,gebert,gaxiola,gawronski,gathright,gatchell,gargiulo,garg,galang,gadison,fyock,furniss,furby,funnell,frizell,frenkel,freeburg,frankhouser,franchi,foulger,formby,forkey,fonte,folson,follette,flavell,finegan,filippini,ferencz,ference,fennessey,feggins,feehan,fazzino,fazenbaker,faunce,farraj,farnell,farler,farabee,falkowski,facio,etzler,ethington,esterline,esper,esker,erxleben,engh,emling,elridge,ellenwood,elfrink,ekhoff,eisert,eifert,eichenlaub,egnor,eggebrecht,edlin,edberg,eble,eber,easler,duwe,dutta,dutremble,dusseault,durney,dunworth,dumire,dukeman,dufner,duey,duble,dreese,dozal,douville,ditmore,distin,dimuzio,dildine,dieterich,dieckman,didonna,dhillon,dezern,devereux,devall,detty,detamore,derksen,deremer,deras,denslow,deno,denicola,denbow,demma,demille,delira,delawder,delara,delahanty,dejonge,deininger,dedios,dederick,decelles,debus,debruyn,deborde,deak,dauenhauer,darsey,dansie,dalman,dakin,dagley,czaja,cybart,cutchin,currington,curbelo,croucher,crinklaw,cremin,cratty,cranfield,crafford,cowher,couvillion,couturier,corter,coombes,contos,consolini,connaughton,conely,collom,cockett,clepper,cleavenger,claro,clarkin,ciriaco,ciesla,cichon,ciancio,cianci,chynoweth,chrzanowski,christion,cholewa,chipley,chilcott,cheyne,cheslock,chenevert,charlot,chagolla,chabolla,cesena,cerutti,cava,caul,cassone,cassin,cassese,casaus,casali,cartledge,cardamone,carcia,carbonneau,carboni,carabello,capozzoli,capella,cannata,campoverde,campeau,cambre,camberos,calvery,calnan,calmes,calley,callery,calise,cacciotti,cacciatore,butterbaugh,burgo,burgamy,burell,bunde,bumbalough,buel,buechner,buchannon,brunn,brost,broadfoot,brittan,brevard,breda,brazel,brayboy,brasier,boyea,boxx,boso,bosio,boruff,borda,bongiovanni,bolerjack,boedeker,blye,blumstein,blumenfeld,blinn,bleakley,blatter,blan,bjornson,bisignano,billick,bieniek,bhatti,bevacqua,berra,berenbaum,bensinger,bennefield,belvins,belson,bellin,beighley,beecroft,beaudreau,baynard,bautch,bausch,basch,bartleson,barthelemy,barak,balzano,balistreri,bailer,bagnall,bagg,auston,augustyn,aslinger,ashalintubbi,arjona,arebalo,appelbaum,angert,angelucci,andry,andersson,amorim,amavisca,alward,alvelo,alvear,alumbaugh,alsobrook,allgeier,allende,aldrete,akiyama,ahlquist,adolphson,addario,acoff,abelson,abasta,zulauf,zirkind,zeoli,zemlicka,zawislak,zappia,zanella,yelvington,yeatman,yanni,wragg,wissing,wischmeier,wirta,wiren,wilmouth,williard,willert,willaert,wildt,whelpley,weingart,weidenbach,weidemann,weatherman,weakland,watwood,wattley,waterson,wambach,walzer,waldow,waag,vorpahl,volkmann,vitolo,visitacion,vincelette,viggiano,vieth,vidana,vert,verges,verdejo,venzon,velardi,varian,vargus,vandermeulen,vandam,vanasse,vanaman,utzinger,uriostegui,uplinger,twiss,tumlinson,tschanz,trunnell,troung,troublefield,trojacek,treloar,tranmer,touchton,torsiello,torina,tootle,toki,toepfer,tippie,thronson,thomes,tezeno,texada,testani,tessmer,terrel,terlizzi,tempel,temblador,tayler,tawil,tasch,tames,talor,talerico,swinderman,sweetland,swager,sulser,sullens,subia,sturgell,stumpff,stufflebeam,stucki,strohmeyer,strebel,straughan,strackbein,stobaugh,stetz,stelter,steinmann,steinfeld,stecher,stanwood,stanislawski,stander,speziale,soppe,soni,sobotka,smuin,slee,skerrett,sjoberg,sittig,simonelli,simo,silverio,silveria,silsby,sillman,sienkiewicz,shomo,shoff,shoener,shiba,sherfey,shehane,sexson,setton,sergi,selvy,seiders,seegmiller,sebree,seabury,scroggin,sconyers,schwalb,schurg,schulenberg,schuld,schrage,schow,schon,schnur,schneller,schmidtke,schlatter,schieffer,schenkel,scheeler,schauwecker,schartz,schacherer,scafe,sayegh,savidge,saur,sarles,sarkissian,sarkis,sarcone,sagucio,saffell,saenger,sacher,rylee,ruvolo,ruston,ruple,rulison,ruge,ruffo,ruehl,rueckert,rudman,rudie,rubert,rozeboom,roysden,roylance,rothchild,rosse,rosecrans,rodi,rockmore,robnett,roberti,rivett,ritzel,rierson,ricotta,ricken,rezac,rendell,reitman,reindl,reeb,reddic,reddell,rebuck,reali,raso,ramthun,ramsden,rameau,ralphs,rago,racz,quinteros,quinter,quinley,quiggle,purvines,purinton,purdum,pummill,puglia,puett,ptacek,przybyla,prowse,prestwich,pracht,poutre,poucher,portera,polinsky,poage,platts,pineau,pinckard,pilson,pilling,pilkins,pili,pikes,pigram,pietila,pickron,philippi,philhower,pflueger,pfalzgraf,pettibone,pett,petrosino,persing,perrino,perotti,periera,peri,peredo,peralto,pennywell,pennel,pellegren,pella,pedroso,paulos,paulding,pates,pasek,paramo,paolino,panganiban,paneto,paluch,ozaki,ownbey,overfelt,outman,opper,onstad,oland,okuda,oertel,oelke,normandeau,nordby,nordahl,noecker,noblin,niswonger,nishioka,nett,negley,nedeau,natera,nachman,naas,musich,mungin,mourer,mounsey,mottola,mothershed,moskal,mosbey,morini,moreles,montaluo,moneypenny,monda,moench,moates,moad,missildine,misiewicz,mirabella,minott,mincks,milum,milani,mikelson,mestayer,mertes,merrihew,merlos,meritt,melnyk,medlen,meder,mcvea,mcquarrie,mcquain,mclucas,mclester,mckitrick,mckennon,mcinnes,mcgrory,mcgranahan,mcglamery,mcgivney,mcgilvray,mccuiston,mccuin,mccrystal,mccolley,mcclerkin,mcclenon,mccamey,mcaninch,mazariegos,maynez,mattioli,mastronardi,masone,marzett,marsland,margulies,margolin,malatesta,mainer,maietta,magrath,maese,madkins,madeiros,madamba,mackson,maben,lytch,lundgreen,lumb,lukach,luick,luetkemeyer,luechtefeld,ludy,ludden,luckow,lubinsky,lowes,lorenson,loran,lopinto,looby,lones,livsey,liskey,lisby,lintner,lindow,lindblom,liming,liechty,leth,lesniewski,lenig,lemonds,leisy,lehrer,lehnen,lehmkuhl,leeth,leeks,lechler,lebsock,lavere,lautenschlage,laughridge,lauderback,laudenslager,lassonde,laroque,laramee,laracuente,lapeyrouse,lampron,lamers,laino,lague,lafromboise,lafata,lacount,lachowicz,kysar,kwiecien,kuffel,kueter,kronenberg,kristensen,kristek,krings,kriesel,krey,krebbs,kreamer,krabbe,kossman,kosakowski,kosak,kopacz,konkol,koepsell,koening,koen,knerr,knapik,kluttz,klocke,klenk,klemme,klapp,kitchell,kita,kissane,kirkbride,kirchhoff,kinter,kinsel,kingsland,kimmer,kimler,killoran,kieser,khalsa,khalaf,kettel,kerekes,keplin,kentner,kennebrew,kenison,kellough,keatts,keasey,kauppi,katon,kanner,kampa,kall,kaczorowski,kaczmarski,juarbe,jordison,jobst,jezierski,jeanbart,jarquin,jagodzinski,ishak,isett,infantino,imburgia,illingworth,hysmith,hynson,hydrick,hurla,hunton,hunnell,humbertson,housand,hottle,hosch,hoos,honn,hohlt,hodel,hochmuth,hixenbaugh,hislop,hisaw,hintzen,hilgendorf,hilchey,higgens,hersman,herrara,hendrixson,hendriks,hemond,hemmingway,heminger,helgren,heisey,heilmann,hehn,hegna,heffern,hawrylak,haverty,hauger,haslem,harnett,harb,happ,hanzlik,hanway,hanby,hanan,hamric,hammaker,halas,hagenbuch,habeck,gwozdz,gunia,guadarrama,grubaugh,grivas,griffieth,grieb,grewell,gregorich,grazier,graeber,graciano,gowens,goodpaster,gondek,gohr,goffney,godbee,gitlin,gisler,gillyard,gillooly,gilchrest,gilbo,gierlach,giebler,giang,geske,gervasio,gertner,gehling,geeter,gaus,gattison,gatica,gathings,gath,gassner,gassert,garabedian,gamon,gameros,galban,gabourel,gaal,fuoco,fullenwider,fudala,friscia,franceschini,foronda,fontanilla,florey,flore,flegle,flecha,fisler,fischbach,fiorita,figura,figgins,fichera,ferra,fawley,fawbush,fausett,farnes,farago,fairclough,fahie,fabiani,evanson,eutsey,eshbaugh,ertle,eppley,englehardt,engelhard,emswiler,elling,elderkin,eland,efaw,edstrom,edgemon,ecton,echeverri,ebright,earheart,dynes,dygert,dyches,dulmage,duhn,duhamel,dubrey,dubray,dubbs,drey,drewery,dreier,dorval,dorough,dorais,donlin,donatelli,dohm,doetsch,dobek,disbrow,dinardi,dillahunty,dillahunt,diers,dier,diekmann,diangelo,deskin,deschaine,depaoli,denner,demyan,demont,demaray,delillo,deleeuw,deibel,decato,deblasio,debartolo,daubenspeck,darner,dardon,danziger,danials,damewood,dalpiaz,dallman,dallaire,cunniffe,cumpston,cumbo,cubero,cruzan,cronkhite,critelli,crimi,creegan,crean,craycraft,cranfill,coyt,courchesne,coufal,corradino,corprew,colville,cocco,coby,clinch,clickner,clavette,claggett,cirigliano,ciesielski,christain,chesbro,chavera,chard,casteneda,castanedo,casseus,caruana,carnero,cappelli,capellan,canedy,cancro,camilleri,calero,cada,burghart,burbidge,bulfer,buis,budniewski,bruney,brugh,brossard,brodmerkel,brockmann,brigmond,briere,bremmer,breck,breau,brautigam,brasch,brandenberger,bragan,bozell,bowsher,bosh,borgia,borey,boomhower,bonneville,bonam,bolland,boise,boeve,boettger,boersma,boateng,bliven,blazier,blahnik,bjornstad,bitton,biss,birkett,billingsly,biagioni,bettle,bertucci,bertolino,bermea,bergner,berber,bensley,bendixen,beltrami,bellone,belland,behringer,begum,bayona,batiz,bassin,baskette,bartolomeo,bartolo,bartholow,barkan,barish,barett,bardo,bamburg,ballerini,balla,balis,bakley,bailon,bachicha,babiarz,ayars,axton,axel,awong,awalt,auslander,ausherman,aumick,atha,atchinson,aslett,askren,arrowsmith,arras,arnhold,armagost,arey,arcos,archibeque,antunes,antilla,andras,amyx,amison,amero,alzate,alper,aller,alioto,aigner,agtarap,agbayani,adami,achorn,aceuedo,acedo,abundis,aber,abee,zuccaro,ziglar,zier,ziebell,zieba,zamzow,zahl,yurko,yurick,yonkers,yerian,yeaman,yarman,yann,yahn,yadon,yadao,woodbridge,wolske,wollenberg,wojtczak,wnuk,witherite,winther,winick,widell,wickens,whichard,wheelis,wesely,wentzell,wenthold,wemple,weisenburger,wehling,weger,weaks,wassink,walquist,wadman,wacaster,waage,voliva,vlcek,villafana,vigliotti,viger,viernes,viands,veselka,versteeg,vero,verhoeven,vendetti,velardo,vatter,vasconcellos,varn,vanwagner,vanvoorhis,vanhecke,vanduyn,vandervoort,vanderslice,valone,vallier,vails,uvalle,ursua,urenda,uphoff,tustin,turton,turnbough,turck,tullio,tuch,truehart,tropea,troester,trippe,tricarico,trevarthen,trembly,trabue,traber,tosi,toal,tinley,tingler,timoteo,tiffin,ticer,thorman,therriault,theel,tessman,tekulve,tejera,tebbs,tavernia,tarpey,tallmadge,takemoto,szot,sylvest,swindoll,swearinger,swantek,swaner,swainston,susi,surrette,sullenger,sudderth,suddarth,suckow,strege,strassburg,stoval,stotz,stoneham,stilley,stille,stierwalt,stfleur,steuck,stermer,stclaire,stano,staker,stahler,stablein,srinivasan,squillace,sprvill,sproull,sprau,sporer,spore,spittler,speelman,sparr,sparkes,spang,spagnuolo,sosinski,sorto,sorkin,sondag,sollers,socia,snarr,smrekar,smolka,slyter,slovinsky,sliwa,slavik,slatter,skiver,skeem,skala,sitzes,sitsler,sitler,sinko,simser,siegler,sideris,shrewsberry,shoopman,shoaff,shindler,shimmin,shill,shenkel,shemwell,shehorn,severa,semones,selsor,sekulski,segui,sechrest,schwer,schwebach,schur,schmiesing,schlick,schlender,schebler,schear,schapiro,sauro,saunder,sauage,satterly,saraiva,saracino,saperstein,sanmartin,sanluis,sandt,sandrock,sammet,sama,salk,sakata,saini,sackrider,russum,russi,russaw,rozzell,roza,rowlette,rothberg,rossano,rosebrock,romanski,romanik,romani,roiger,roig,roehr,rodenberger,rodela,rochford,ristow,rispoli,rigo,riesgo,riebel,ribera,ribaudo,reys,resendes,repine,reisdorf,reisch,rebman,rasmus,raske,ranum,rames,rambin,raman,rajewski,raffield,rady,radich,raatz,quinnie,pyper,puthoff,prow,proehl,pribyl,pretti,prete,presby,poyer,powelson,porteous,poquette,pooser,pollan,ploss,plewa,placide,pion,pinnick,pinales,pillot,pille,pilato,piggee,pietrowski,piermarini,pickford,piccard,phenix,pevey,petrowski,petrillose,pesek,perrotti,peppler,peppard,penfold,pellitier,pelland,pehowic,pedretti,paules,passero,pasha,panza,pallante,palau,pakele,pacetti,paavola,overy,overson,outler,osegueda,oplinger,oldenkamp,ohern,oetting,odums,nowlen,nowack,nordlund,noblett,nobbe,nierman,nichelson,niblock,newbrough,nemetz,needleman,navin,nastasi,naslund,naramore,nakken,nakanishi,najarro,mushrush,muma,mulero,morganfield,moreman,morain,moquin,monterrosa,monsivais,monroig,monje,monfort,moffa,moeckel,mobbs,misiak,mires,mirelez,mineo,mineau,milnes,mikeska,michelin,michalowski,meszaros,messineo,meshell,merten,meola,menton,mends,mende,memmott,melius,mehan,mcnickle,mcmorran,mclennon,mcleish,mclaine,mckendry,mckell,mckeighan,mcisaac,mcie,mcguinn,mcgillis,mcfatridge,mcfarling,mcelravy,mcdonalds,mcculla,mcconnaughy,mcconnaughey,mcchriston,mcbeath,mayr,matyas,matthiesen,matsuura,matinez,mathys,matarazzo,masker,masden,mascio,martis,marrinan,marinucci,margerum,marengo,manthe,mansker,manoogian,mankey,manigo,manier,mangini,maltese,malsam,mallo,maliszewski,mainolfi,maharaj,maggart,magar,maffett,macmaster,macky,macdonnell,lyvers,luzzi,lutman,lovan,lonzo,longerbeam,lofthouse,loethen,lodi,llorens,lizama,litscher,lisowski,lipski,lipsett,lipkin,linzey,lineman,limerick,limas,lige,lierman,liebold,liberti,leverton,levene,lesueur,lenser,lenker,legnon,lefrancois,ledwell,lavecchia,laurich,lauricella,lannigan,landor,lamprecht,lamountain,lamore,lammert,lamboy,lamarque,lamacchia,lalley,lagace,lacorte,lacomb,kyllonen,kyker,kuschel,kupfer,kunde,kucinski,kubacki,kroenke,krech,koziel,kovacich,kothari,koth,kotek,kostelnik,kosloski,knoles,knabe,kmiecik,klingman,kliethermes,kleffman,klees,klaiber,kittell,kissling,kisinger,kintner,kinoshita,kiener,khouri,kerman,kelii,keirn,keezer,kaup,kathan,kaser,karlsen,kapur,kandoll,kammel,kahele,justesen,jonason,johnsrud,joerling,jochim,jespersen,jeong,jenness,jedlicka,jakob,isaman,inghram,ingenito,iadarola,hynd,huxtable,huwe,hurless,humpal,hughston,hughart,huggett,hugar,huether,howdyshell,houtchens,houseworth,hoskie,holshouser,holmen,holloran,hohler,hoefler,hodsdon,hochman,hjort,hippert,hippe,hinzman,hillock,hilden,heyn,heyden,heyd,hergert,henrikson,henningsen,hendel,helget,helf,helbing,heintzman,heggie,hege,hecox,heatherington,heare,haxton,haverstock,haverly,hatler,haselton,hase,hartzfeld,harten,harken,hargrow,haran,hanton,hammar,hamamoto,halper,halko,hackathorn,haberle,haake,gunnoe,gunkel,gulyas,guiney,guilbeau,guider,guerrant,gudgel,guarisco,grossen,grossberg,gropp,groome,grobe,gremminger,greenley,grauberger,grabenstein,gowers,gostomski,gosier,goodenow,gonzoles,goliday,goettle,goens,goates,glymph,glavin,glassco,gladfelter,glackin,githens,girgis,gimpel,gilbreth,gilbeau,giffen,giannotti,gholar,gervasi,gertsch,gernatt,gephardt,genco,gehr,geddis,gase,garrott,garrette,gapinski,ganter,ganser,gangi,gangemi,gallina,galdi,gailes,gaetano,gadomski,gaccione,fuschetto,furtick,furfaro,fullman,frutos,fruchter,frogge,freytag,freudenthal,fregoe,franzone,frankum,francia,franceschi,forys,forero,folkers,flug,flitter,flemons,fitzer,firpo,finizio,filiault,figg,fichtner,fetterolf,ferringer,feil,fayne,farro,faddis,ezzo,ezelle,eynon,evitt,eutsler,euell,escovedo,erne,eriksson,enriguez,empson,elkington,eisenmenger,eidt,eichenberger,ehrmann,ediger,earlywine,eacret,duzan,dunnington,ducasse,dubiel,drovin,drager,drage,donham,donat,dolinger,dokken,doepke,dodwell,docherty,distasio,disandro,diniz,digangi,didion,dezzutti,detmer,deshon,derrigo,dentler,demoura,demeter,demeritt,demayo,demark,demario,delzell,delnero,delgrosso,dejarnett,debernardi,dearmas,dashnaw,daris,danks,danker,dangler,daignault,dafoe,dace,curet,cumberledge,culkin,crowner,crocket,crawshaw,craun,cranshaw,cragle,courser,costella,cornforth,corkill,coopersmith,conzemius,connett,connely,condict,condello,comley,cohoon,coday,clugston,clowney,clippard,clinkenbeard,clines,clelland,clapham,clancey,clabough,cichy,cicalese,chua,chittick,chisom,chisley,chinchilla,cheramie,cerritos,cercone,cena,cawood,cavness,catanzarite,casada,carvell,carmicheal,carll,cardozo,caplin,candia,canby,cammon,callister,calligan,calkin,caillouet,buzzelli,bute,bustillo,bursey,burgeson,bupp,bulson,buist,buffey,buczkowski,buckbee,bucio,brueckner,broz,brookhart,brong,brockmeyer,broberg,brittenham,brisbois,bridgmon,breyer,brede,breakfield,breakey,brauner,branigan,brandewie,branche,brager,brader,bovell,bouthot,bostock,bosma,boseman,boschee,borthwick,borneman,borer,borek,boomershine,boni,bommarito,bolman,boleware,boisse,boehlke,bodle,blash,blasco,blakesley,blacklock,blackley,bittick,birks,birdin,bircher,bilbao,bick,biby,bertoni,bertino,bertini,berson,bern,berkebile,bergstresser,benne,benevento,belzer,beltre,bellomo,bellerose,beilke,begeman,bebee,beazer,beaven,beamish,baymon,baston,bastidas,basom,basey,bartles,baroni,barocio,barnet,barclift,banville,balthazor,balleza,balkcom,baires,bailie,baik,baggott,bagen,bachner,babington,babel,asmar,arvelo,artega,arrendondo,arreaga,arrambide,arquette,aronoff,arico,argentieri,arevalos,archbold,apuzzo,antczak,ankeny,angelle,angelini,anfinson,amer,amarillas,altier,altenburg,alspach,alosa,allsbrook,alexopoulos,aleem,aldred,albertsen,akerson,agler,adley,addams,acoba,achille,abplanalp,abella,abare,zwolinski,zollicoffer,zins,ziff,zenner,zender,zelnick,zelenka,zeches,zaucha,zauala,zangari,zagorski,youtsey,yasso,yarde,yarbough,woolever,woodsmall,woodfolk,wobig,wixson,wittwer,wirtanen,winson,wingerd,wilkening,wilhelms,wierzbicki,wiechman,weyrick,wessell,wenrick,wenning,weltz,weinrich,weiand,wehunt,wareing,walth,waibel,wahlquist,vona,voelkel,vitek,vinsant,vincente,vilar,viel,vicars,vermette,verma,venner,veazie,vayda,vashaw,varon,vardeman,vandevelde,vanbrocklin,vaccarezza,urquidez,urie,urbach,uram,ungaro,umali,ulsh,tutwiler,turnbaugh,tumminello,tuite,tueller,trulove,troha,trivino,trisdale,trippett,tribbett,treptow,tremain,travelstead,trautwein,trautmann,tram,traeger,tonelli,tomsic,tomich,tomasulo,tomasino,tole,todhunter,toborg,tischer,tirpak,tircuit,tinnon,tinnel,tines,timbs,tilden,tiede,thumm,throgmorton,thorndike,thornburgh,thoren,thomann,therrell,thau,thammavong,tetrick,tessitore,tesreau,teicher,teaford,tauscher,tauer,tanabe,talamo,takeuchi,taite,tadych,sweeton,swecker,swartzentrube,swarner,surrell,surbaugh,suppa,sumbry,suchy,stuteville,studt,stromer,strome,streng,stonestreet,stockley,stmichel,stfort,sternisha,stensrud,steinhardt,steinback,steichen,stauble,stasiak,starzyk,stango,standerfer,stachowiak,springston,spratlin,spracklen,sponseller,spilker,spiegelman,spellacy,speiser,spaziani,spader,spackman,sorum,sopha,sollis,sollenberger,solivan,solheim,sokolsky,sogge,smyser,smitley,sloas,slinker,skora,skiff,skare,siverd,sivels,siska,siordia,simmering,simko,sime,silmon,silano,sieger,siebold,shukla,shreves,shoun,shortle,shonkwiler,shoals,shimmel,shiel,shieh,sherbondy,shenkman,shein,shearon,shean,shatz,shanholtz,shafran,shaff,shackett,sgroi,sewall,severy,sethi,sessa,sequra,sepulvado,seper,senteno,sendejo,semmens,seipp,segler,seegers,sedwick,sedore,sechler,sebastiano,scovel,scotton,scopel,schwend,schwarting,schutter,schrier,schons,scholtes,schnetzer,schnelle,schmutz,schlichter,schelling,schams,schamp,scarber,scallan,scalisi,scaffidi,saxby,sawrey,sauvageau,sauder,sarrett,sanzo,santizo,santella,santander,sandez,sandel,sammon,salsedo,salge,sagun,safi,sader,sacchetti,sablan,saade,runnion,runkel,rumbo,ruesch,ruegg,ruckle,ruchti,rubens,rubano,rozycki,roupe,roufs,rossel,rosmarin,rosero,rosenwald,ronca,romos,rolla,rohling,rohleder,roell,roehm,rochefort,roch,robotham,rivenburgh,riopel,riederer,ridlen,rias,rhudy,reynard,retter,respess,reppond,repko,rengifo,reinking,reichelt,reeh,redenius,rebolledo,rauh,ratajczak,rapley,ranalli,ramie,raitt,radloff,radle,rabbitt,quay,quant,pusateri,puffinberger,puerta,provencio,proano,privitera,prenger,prellwitz,pousson,potier,portz,portlock,porth,portela,portee,porchia,pollick,polinski,polfer,polanski,polachek,pluta,plourd,plauche,pitner,piontkowski,pileggi,pierotti,pico,piacente,phinisee,phaup,pfost,pettinger,pettet,petrich,peto,persley,persad,perlstein,perko,pere,penders,peifer,peco,pawley,pash,parrack,parady,papen,pangilinan,pandolfo,palone,palmertree,padin,ottey,ottem,ostroski,ornstein,ormonde,onstott,oncale,oltremari,olcott,olan,oishi,oien,odonell,odonald,obeso,obeirne,oatley,nusser,novo,novicki,nitschke,nistler,nikkel,niese,nierenberg,nield,niedzwiecki,niebla,niebel,nicklin,neyhart,newsum,nevares,nageotte,nagai,mutz,murata,muralles,munnerlyn,mumpower,muegge,muckle,muchmore,moulthrop,motl,moskos,mortland,morring,mormile,morimoto,morikawa,morgon,mordecai,montour,mont,mongan,monell,miyasato,mish,minshew,mimbs,millin,milliard,mihm,middlemiss,miano,mesick,merlan,mendonsa,mench,melonson,melling,meachem,mctighe,mcnelis,mcmurtrey,mckesson,mckenrick,mckelvie,mcjunkins,mcgory,mcgirr,mcgeever,mcfield,mcelhinney,mccrossen,mccommon,mccannon,mazyck,mawyer,maull,matute,mathies,maschino,marzan,martinie,marrotte,marmion,markarian,marinacci,margolies,margeson,marak,maraia,maracle,manygoats,manker,mank,mandich,manderson,maltz,malmquist,malacara,majette,magnan,magliocca,madina,madara,macwilliams,macqueen,maccallum,lyde,lyday,lutrick,lurz,lurvey,lumbreras,luhrs,luhr,lowrimore,lowndes,lourenco,lougee,lorona,longstreth,loht,lofquist,loewenstein,lobos,lizardi,lionberger,limoli,liljenquist,liguori,liebl,liburd,leukhardt,letizia,lesinski,lepisto,lenzini,leisenring,leipold,leier,leggitt,legare,leaphart,lazor,lazaga,lavey,laue,laudermilk,lauck,lassalle,larsson,larison,lanzo,lantzy,lanners,langtry,landford,lancour,lamour,lambertson,lalone,lairson,lainhart,lagreca,lacina,labranche,labate,kurtenbach,kuipers,kuechle,kubo,krinsky,krauser,kraeger,kracht,kozeliski,kozar,kowalik,kotler,kotecki,koslosky,kosel,koob,kolasinski,koizumi,kohlman,koffman,knutt,knore,knaff,kmiec,klamm,kittler,kitner,kirkeby,kiper,kindler,kilmartin,kilbride,kerchner,kendell,keddy,keaveney,kearsley,karlsson,karalis,kappes,kapadia,kallman,kallio,kalil,kader,jurkiewicz,jitchaku,jillson,jeune,jarratt,jarchow,janak,ivins,ivans,isenhart,inocencio,inoa,imhof,iacono,hynds,hutching,hutchin,hulsman,hulsizer,hueston,huddleson,hrbek,howry,housey,hounshell,hosick,hortman,horky,horine,hootman,honeywell,honeyestewa,holste,holien,holbrooks,hoffmeyer,hoese,hoenig,hirschfeld,hildenbrand,higson,higney,hibert,hibbetts,hewlin,hesley,herrold,hermon,hepker,henwood,helbling,heinzman,heidtbrink,hedger,havey,hatheway,hartshorne,harpel,haning,handelman,hamalainen,hamad,halasz,haigwood,haggans,hackshaw,guzzo,gundrum,guilbeault,gugliuzza,guglielmi,guderian,gruwell,grunow,grundman,gruen,grotzke,grossnickle,groomes,grode,grochowski,grob,grein,greif,greenwall,greenup,grassl,grannis,grandfield,grames,grabski,grabe,gouldsberry,gosch,goodling,goodermote,gonzale,golebiowski,goldson,godlove,glanville,gillin,gilkerson,giessler,giambalvo,giacomini,giacobbe,ghio,gergen,gentz,genrich,gelormino,gelber,geitner,geimer,gauthreaux,gaultney,garvie,gareau,garbacz,ganoe,gangwer,gandarilla,galyen,galt,galluzzo,galardo,gager,gaddie,gaber,gabehart,gaarder,fusilier,furnari,furbee,fugua,fruth,frohman,friske,frilot,fridman,frescas,freier,frayer,franzese,frankenberry,frain,fosse,foresman,forbess,flook,fletes,fleer,fleek,fleegle,fishburne,fiscalini,finnigan,fini,filipiak,figueira,fiero,ficek,fiaschetti,ferren,ferrando,ferman,fergusson,fenech,feiner,feig,faulds,fariss,falor,falke,ewings,eversley,everding,etling,essen,erskin,enstrom,engebretsen,eitel,eichberger,ehler,eekhoff,edrington,edmonston,edgmon,edes,eberlein,dwinell,dupee,dunklee,dungey,dunagin,dumoulin,duggar,duenez,dudzic,dudenhoeffer,ducey,drouillard,dreibelbis,dreger,dreesman,draughon,downen,dorminy,dombeck,dolman,doebler,dittberner,dishaw,disanti,dinicola,dinham,dimino,dilling,difrancesco,dicello,dibert,deshazer,deserio,descoteau,deruyter,dering,depinto,dente,demus,demattos,demarsico,delude,dekok,debrito,debois,deakin,dayley,dawsey,dauria,datson,darty,darsow,darragh,darensbourg,dalleva,dalbec,dadd,cutcher,cung,cuello,cuadros,crute,crutchley,crispino,crislip,crisco,crevier,creekmur,crance,cragg,crager,cozby,coyan,coxon,covalt,couillard,costley,costilow,cossairt,corvino,corigliano,cordaro,corbridge,corban,coor,conkel,conary,coltrain,collopy,colgin,colen,colbath,coiro,coffie,cochrum,cobbett,clopper,cliburn,clendenon,clemon,clementi,clausi,cirino,cina,churchman,chilcutt,cherney,cheetham,cheatom,chatelain,chalifour,cesa,cervenka,cerullo,cerreta,cerbone,cecchini,ceccarelli,cawthorn,cavalero,castner,castlen,castine,casimiro,casdorph,cartmill,cartmell,carro,carriger,carias,caravella,cappas,capen,cantey,canedo,camuso,campanaro,cambria,calzado,callejo,caligiuri,cafaro,cadotte,cacace,byrant,busbey,burtle,burres,burnworth,burggraf,burback,bunte,bunke,bulle,bugos,budlong,buckhalter,buccellato,brummet,bruff,brubeck,brouk,broten,brosky,broner,brislin,brimm,brillhart,bridgham,brideau,brennecke,breer,breeland,bredesen,brackney,brackeen,boza,boyum,bowdry,bowdish,bouwens,bouvier,bougie,bouche,bottenfield,bostian,bossie,bosler,boschert,boroff,borello,bonser,bonfield,bole,boldue,bogacz,boemer,bloxom,blickenstaff,blessinger,bleazard,blatz,blanchet,blacksher,birchler,binning,binkowski,biltz,bilotta,bilagody,bigbee,bieri,biehle,bidlack,betker,bethers,bethell,bero,bernacchi,bermingham,berkshire,benvenuto,bensman,benoff,bencivenga,beman,bellow,bellany,belflower,belch,bekker,bejar,beisel,beichner,beedy,beas,beanblossom,bawek,baus,baugus,battie,battershell,bateson,basque,basford,bartone,barritt,barko,bann,bamford,baltrip,balon,balliew,ballam,baldus,ayling,avelino,ashwell,ashland,arseneau,arroyos,armendarez,arita,argust,archuletta,arcement,antonacci,anthis,antal,annan,anderman,amster,amiri,amadon,alveraz,altomari,altmann,altenhofen,allers,allbee,allaway,aleo,alcoser,alcorta,akhtar,ahuna,agramonte,agard,adkerson,achord,abdi,abair,zurn,zoellner,zirk,zion,zarro,zarco,zambo,zaiser,zaino,zachry,youd,yonan,yniguez,yepes,yellock,yellen,yeatts,yearling,yatsko,yannone,wyler,woodridge,wolfrom,wolaver,wolanin,wojnar,wojciak,wittmann,wittich,wiswell,wisser,wintersteen,wineland,willford,wiginton,wigfield,wierman,wice,wiater,whitsel,whitbread,wheller,wettstein,werling,wente,wenig,wempe,welz,weinhold,weigelt,weichman,wedemeyer,weddel,wayment,waycaster,wauneka,watzka,watton,warnell,warnecke,warmack,warder,wands,waldvogel,waldridge,wahs,wagganer,waddill,vyas,vought,votta,voiles,virga,viner,villella,villaverde,villaneda,viele,vickroy,vicencio,vetere,vermilyea,verley,verburg,ventresca,veno,venard,venancio,velaquez,veenstra,vasil,vanzee,vanwie,vantine,vant,vanschoyck,vannice,vankampen,vanicek,vandersloot,vanderpoel,vanderlinde,vallieres,uzzell,uzelac,uranga,uptain,updyke,uong,untiedt,umbrell,umbaugh,umbarger,ulysse,ullmann,ullah,tutko,turturro,turnmire,turnley,turcott,turbyfill,turano,tuminello,tumbleson,tsou,truscott,trulson,troutner,trone,trinklein,tremmel,tredway,trease,traynham,traw,totty,torti,torregrossa,torok,tomkins,tomaino,tkach,tirey,tinsman,timpe,tiefenauer,tiedt,tidball,thwaites,thulin,throneburg,thorell,thorburn,thiemann,thieman,thesing,tham,terrien,telfair,taybron,tasson,tasso,tarro,tanenbaum,taddeo,taborn,tabios,szekely,szatkowski,sylve,swineford,swartzfager,swanton,swagerty,surrency,sunderlin,sumerlin,suero,suddith,sublette,stumpe,stueve,stuckert,strycker,struve,struss,strubbe,strough,strothmann,strahle,stoutner,stooksbury,stonebarger,stokey,stoffer,stimmel,stief,stephans,stemper,steltenpohl,stellato,steinle,stegeman,steffler,steege,steckman,stapel,stansbery,stanaland,stahley,stagnaro,stachowski,squibb,sprunger,sproule,sprehe,spreen,sprecher,sposato,spivery,souter,sopher,sommerfeldt,soffer,snowberger,snape,smylie,smyer,slaydon,slatton,slaght,skovira,skeans,sjolund,sjodin,siragusa,singelton,silis,siebenaler,shuffield,shobe,shiring,shimabukuro,shilts,sherbert,shelden,sheil,shedlock,shearn,shaub,sharbono,shapley,shands,shaheen,shaffner,servantez,sentz,seney,selin,seitzinger,seider,sehr,sego,segall,sebastien,scimeca,schwenck,schweiss,schwark,schwalbe,schucker,schronce,schrag,schouten,schoppe,schomaker,schnarr,schmied,schmader,schlicht,schlag,schield,schiano,scheve,scherbarth,schaumburg,schauman,scarpino,savinon,sassaman,saporito,sanville,santilli,santaana,salzmann,salman,sagraves,safran,saccone,rutty,russett,rupard,rumbley,ruffins,ruacho,rozema,roxas,routson,rourk,rought,rotunda,rotermund,rosman,rork,rooke,rolin,rohm,rohlman,rohl,roeske,roecker,rober,robenson,riso,rinne,riina,rigsbee,riggles,riester,rials,rhinehardt,reynaud,reyburn,rewis,revermann,reutzel,retz,rende,rendall,reistad,reinders,reichardt,rehrig,rehrer,recendez,reamy,rauls,ratz,rattray,rasband,rapone,ragle,ragins,radican,raczka,rachels,raburn,rabren,raboin,quesnell,quaintance,puccinelli,pruner,prouse,prosise,proffer,prochazka,probasco,previte,portell,porcher,popoca,pomroy,poma,polsky,polsgrove,polidore,podraza,plymale,plescia,pleau,platte,pizzi,pinchon,picot,piccione,picazo,philibert,phebus,pfohl,petell,pesso,pesante,pervis,perrins,perley,perkey,pereida,penate,peloso,pellerito,peffley,peddicord,pecina,peale,payette,paxman,pawlikowski,pavy,patry,patmon,patil,pater,patak,pasqua,pasche,partyka,parody,parmeter,pares,pardi,paonessa,panozzo,panameno,paletta,pait,oyervides,ossman,oshima,ortlieb,orsak,onley,oldroyd,okano,ohora,offley,oestreicher,odonovan,odham,odegard,obst,obriant,obrecht,nuccio,nowling,nowden,novelli,nost,norstrom,nordgren,nopper,noller,nisonger,niskanen,nienhuis,nienaber,neuwirth,neumeyer,neice,naugher,naiman,nagamine,mustin,murrietta,murdaugh,munar,muhlbauer,mroczkowski,mowdy,mouw,mousel,mountcastle,moscowitz,mosco,morro,moresi,morago,moomaw,montroy,montpas,montieth,montanaro,mongelli,mollison,mollette,moldovan,mohar,mitchelle,mishra,misenheimer,minshall,minozzi,minniefield,milhous,migliaccio,migdal,mickell,meyering,methot,mester,mesler,meriweather,mensing,mensah,menge,mendibles,meloche,melnik,mellas,meinert,mehrhoff,medas,meckler,mctague,mcspirit,mcshea,mcquown,mcquiller,mclarney,mckiney,mckearney,mcguyer,mcfarlan,mcfadyen,mcdanial,mcdanel,mccurtis,mccrohan,mccorry,mcclune,mccant,mccanna,mccandlish,mcaloon,mayall,maver,maune,matza,matsuzaki,matott,mathey,mateos,masoner,masino,marzullo,marz,marsolek,marquard,marchetta,marberry,manzione,manthei,manka,mangram,mangle,mangel,mandato,mancillas,mammen,malina,maletta,malecki,majkut,mages,maestre,macphail,maco,macneill,macadam,lysiak,lyne,luxton,luptak,lundmark,luginbill,lovallo,louthan,lousteau,loupe,lotti,lopresto,lonsdale,longsworth,lohnes,loghry,logemann,lofaro,loeber,locastro,livings,litzinger,litts,liotta,lingard,lineback,lindhorst,lill,lide,lickliter,liberman,lewinski,levandowski,leimbach,leifer,leidholt,leiby,leibel,leibee,lehrke,lehnherr,lego,leese,leen,ledo,lech,leblond,leahey,lazzari,lawrance,lawlis,lawhorne,lawes,lavigna,lavell,lauzier,lauter,laumann,latsha,latourette,latona,latney,laska,larner,larmore,larke,larence,lapier,lanzarin,lammey,lamke,laminack,lamastus,lamaster,lacewell,labarr,laabs,kutch,kuper,kuna,kubis,krzemien,krupinski,krepps,kreeger,kraner,krammer,kountz,kothe,korpela,komara,kolenda,kolek,kohnen,koelzer,koelsch,kocurek,knoke,knauff,knaggs,knab,kluver,klose,klien,klahr,kitagawa,kissler,kirstein,kinnon,kinnebrew,kinnamon,kimmins,kilgour,kilcoyne,kiester,kiehm,kesselring,kerestes,kenniston,kennamore,kenebrew,kelderman,keitel,kefauver,katzenberger,katt,kast,kassel,kamara,kalmbach,kaizer,kaiwi,kainz,jurczyk,jumonville,juliar,jourdain,johndrow,johanning,johannesen,joffrion,jobes,jerde,jentzsch,jenkens,jendro,jellerson,jefferds,jaure,jaquish,janeway,jago,iwasaki,ishman,isaza,inmon,inlow,inclan,ildefonso,iezzi,ianni,iacovetto,hyldahl,huxhold,huser,humpherys,humburg,hult,hullender,hulburt,huckabay,howeth,hovermale,hoven,houtman,hourigan,hosek,hopgood,homrich,holstine,holsclaw,hokama,hoffpauir,hoffner,hochstein,hochstatter,hochberg,hjelm,hiscox,hinsley,hineman,hineline,hinck,hilbun,hewins,herzing,hertzberg,hertenstein,herrea,herington,henrie,henman,hengst,hemmen,helmke,helgerson,heinsohn,heigl,hegstad,heggen,hegge,hefti,heathcock,haylett,haupert,haufler,hatala,haslip,hartless,hartje,hartis,harpold,harmsen,harbach,hanten,hanington,hammen,hameister,hallstrom,habersham,habegger,gussman,gundy,guitterez,guisinger,guilfoyle,groulx,grismer,griesbach,grawe,grall,graben,goulden,gornick,gori,gookin,gonzalaz,gonyer,gonder,golphin,goller,goergen,glosson,glor,gladin,girdler,gillim,gillians,gillaspie,gilhooly,gildon,gignac,gibler,gibbins,giardino,giampietro,gettman,gerringer,gerrald,gerlich,georgiou,georgi,geiselman,gehman,gangl,gamage,gallian,gallen,gallatin,galea,gainor,gahr,furbush,fulfer,fuhrmann,fritter,friis,friedly,freudenberger,freemon,fratus,frans,foulke,fosler,forquer,fontan,folwell,foeller,fodge,fobes,florek,fliss,flesner,flegel,fitzloff,fiser,firmin,firestine,finfrock,fineberg,fiegel,fickling,fesperman,fernadez,felber,feimster,feazel,favre,faughn,fatula,fasone,farron,faron,farino,falvey,falkenberg,faley,faletti,faeth,fackrell,espe,eskola,escott,esaw,erps,erker,erath,enfield,emfinger,embury,embleton,emanuele,elvers,ellwanger,ellegood,eichinger,egge,egeland,edgett,echard,eblen,eastmond,duteau,durland,dure,dunlavy,dungee,dukette,dugay,duboise,dubey,dsouza,druck,dralle,doubek,dorta,dorch,dorce,dopson,dolney,dockter,distler,dippel,dichiara,dicerbo,dewindt,dewan,deveney,devargas,deutscher,deuel,detter,dess,derrington,deroberts,dern,deponte,denogean,denardi,denard,demary,demarais,delucas,deloe,delmonico,delisi,delio,delduca,deihl,dehmer,decoste,dechick,decatur,debruce,debold,debell,deats,daunt,daquilante,dambrosi,damas,dalin,dahman,dahlem,daffin,dacquel,cutrell,cusano,curtner,currens,curnow,cuppett,cummiskey,cullers,culhane,crull,crossin,cropsey,cromie,crofford,criscuolo,crisafulli,crego,creeden,covello,covel,corse,correra,cordner,cordier,coplen,copeman,contini,conteras,consalvo,conduff,compher,colliver,colan,cohill,cohenour,cogliano,codd,cockayne,clum,clowdus,clarida,clance,clairday,clagg,citron,citino,ciriello,cicciarelli,chrostowski,christley,chrisco,chrest,chisler,chieffo,cherne,cherico,cherian,cheirs,chauhan,chamblin,cerra,cepero,cellini,celedon,cejka,cavagnaro,cauffman,catanese,castrillo,castrellon,casserly,caseres,carthen,carse,carragher,carpentieri,carmony,carmer,carlozzi,caradine,cappola,capece,capaldi,cantres,cantos,canevari,canete,calcaterra,cadigan,cabbell,byrn,bykowski,butchko,busler,bushaw,buschmann,burow,buri,burgman,bunselmeyer,bunning,buhrman,budnick,buckson,buckhannon,brunjes,brumleve,bruckman,brouhard,brougham,brostrom,broerman,brocks,brison,brining,brindisi,brereton,breon,breitling,breedon,brasseaux,branaman,bramon,brackenridge,boyan,boxley,bouman,bouillion,botting,botti,bosshart,borup,borner,bordonaro,bonsignore,bonsall,bolter,bojko,bohne,bohlmann,bogdon,boen,bodenschatz,bockoven,bobrow,blondin,blissett,bligen,blasini,blankenburg,bjorkman,bistline,bisset,birdow,biondolillo,bielski,biele,biddix,biddinger,bianchini,bevens,bevard,betancur,bernskoetter,bernet,bernardez,berliner,berland,berkheimer,berent,bensch,benesch,belleau,bedingfield,beckstrom,beckim,bechler,beachler,bazzell,basa,bartoszek,barsch,barrell,barnas,barnaba,barillas,barbier,baltodano,baltierra,balle,balint,baldi,balderson,balderama,baldauf,balcazar,balay,baiz,bairos,azim,aversa,avellaneda,ausburn,auila,augusto,atwill,artiles,arterberry,arnow,arnaud,arnall,arenz,arduini,archila,arakawa,appleman,aplin,antonini,anstey,anglen,andros,amweg,amstutz,amari,amadeo,alteri,aloi,allebach,aley,alamillo,airhart,ahrendt,aegerter,adragna,admas,adderly,adderley,addair,abelar,abbamonte,abadi,zurek,zundel,zuidema,zuelke,zuck,zogg,zody,zets,zech,zecca,zavaleta,zarr,yousif,yoes,yoast,yeagley,yaney,yanda,yackel,wyles,wyke,woolman,woollard,woodis,woodin,wonderly,wombles,woloszyn,wollam,wnek,wittie,withee,wissman,wisham,wintle,winokur,wilmarth,willhoite,wildner,wikel,wieser,wien,wicke,wiatrek,whitehall,whetstine,wheelus,weyrauch,weyers,westerling,wendelken,welner,weinreb,weinheimer,weilbacher,weihe,weider,wecker,wead,watler,watkinson,wasmer,waskiewicz,wasik,warneke,wares,wangerin,wamble,walken,waker,wakeley,wahlgren,wahlberg,wagler,wachob,vorhies,vonseggern,vittitow,vink,villarruel,villamil,villamar,villalovos,vidmar,victorero,vespa,vertrees,verissimo,veltman,vecchione,veals,varrone,varma,vanveen,vanterpool,vaneck,vandyck,vancise,vanausdal,vanalphen,valdiviezo,urton,urey,updegrove,unrue,ulbrich,tysinger,twiddy,tunson,trueheart,troyan,trier,traweek,trafford,tozzi,toulouse,tosto,toste,torez,tooke,tonini,tonge,tomerlin,tolmie,tobe,tippen,tierno,tichy,thuss,thran,thornbury,thone,theunissen,thelmon,theall,textor,teters,tesh,tench,tekautz,tehrani,teat,teare,tavenner,tartaglione,tanski,tanis,tanguma,tangeman,taney,tammen,tamburri,tamburello,talsma,tallie,takeda,taira,taheri,tademy,taddei,taaffe,szymczak,szczepaniak,szafranski,swygert,swem,swartzlander,sutley,supernaw,sundell,sullivant,suderman,sudbury,suares,stueber,stromme,streeper,streck,strebe,stonehouse,stoia,stohr,stodghill,stirewalt,sterry,stenstrom,stene,steinbrecher,stear,stdenis,stanphill,staniszewski,stanard,stahlhut,stachowicz,srivastava,spong,spomer,spinosa,spindel,spera,soward,sopp,sooter,sonnek,soland,sojourner,soeder,sobolewski,snellings,smola,smetana,smeal,smarr,sloma,sligar,skenandore,skalsky,sissom,sirko,simkin,silverthorn,silman,sikkink,signorile,siddens,shumsky,shrider,shoulta,shonk,shomaker,shippey,shimada,shillingburg,shifflet,shiels,shepheard,sheerin,shedden,sheckles,sharrieff,sharpley,shappell,shaneyfelt,shampine,shaefer,shaddock,shadd,sforza,severtson,setzler,sepich,senne,senatore,sementilli,selway,selover,sellick,seigworth,sefton,seegars,sebourn,seaquist,sealock,seabreeze,scriver,scinto,schumer,schulke,schryver,schriner,schramek,schoon,schoolfield,schonberger,schnieder,schnider,schlitz,schlather,schirtzinger,scherman,schenker,scheiner,scheible,schaus,schakel,schaad,saxe,savely,savary,sardinas,santarelli,sanschagrin,sanpedro,sandine,sandigo,sandgren,sanderford,sandahl,salzwedel,salzar,salvino,salvatierra,salminen,salierno,salberg,sahagun,saelee,sabel,rynearson,ryker,rupprecht,runquist,rumrill,ruhnke,rovira,rottenberg,rosoff,rosete,rosebrough,roppolo,roope,romas,roley,rohrback,rohlfs,rogriguez,roel,rodriguiz,rodewald,roback,rizor,ritt,rippee,riolo,rinkenberger,riggsby,rigel,rieman,riedesel,rideau,ricke,rhinebolt,rheault,revak,relford,reinsmith,reichmann,regula,redlinger,rayno,raycroft,raus,raupp,rathmann,rastorfer,rasey,raponi,rantz,ranno,ranes,ramnauth,rahal,raddatz,quattrocchi,quang,pullis,pulanco,pryde,prohaska,primiano,prez,prevatt,prechtl,pottle,potenza,portes,porowski,poppleton,pontillo,politz,politi,poggi,plonka,plaskett,placzek,pizzuti,pizzaro,pisciotta,pippens,pinkins,pinilla,pini,pingitore,piercey,piccola,piccioni,picciano,philps,philp,philo,philmon,philbin,pflieger,pezzullo,petruso,petrea,petitti,peth,peshlakai,peschel,persico,persichetti,persechino,perris,perlow,perico,pergola,penniston,pembroke,pellman,pekarek,peirson,pearcey,pealer,pavlicek,passino,pasquarello,pasion,parzych,parziale,parga,papalia,papadakis,paino,pacini,oyen,ownes,owczarzak,outley,ouelette,ottosen,otting,ostwinkle,osment,oshita,osario,orlow,oriordan,orefice,orantes,oran,orahood,opel,olpin,oliveria,okon,okerlund,okazaki,ohta,offerman,nyce,nutall,northey,norcia,noor,niehoff,niederhauser,nickolson,nguy,neylon,newstrom,nevill,netz,nesselrodt,nemes,neally,nauyen,nascimento,nardella,nanni,myren,murchinson,munter,mundschenk,mujalli,muckleroy,moussa,mouret,moulds,mottram,motte,morre,montreuil,monton,montellano,monninger,monhollen,mongeon,monestime,monegro,mondesir,monceaux,mola,moga,moening,moccia,misko,miske,mishaw,minturn,mingione,milstein,milla,milks,michl,micheletti,michals,mesia,merson,meras,menifee,meluso,mella,melick,mehlman,meffert,medoza,mecum,meaker,meahl,mczeal,mcwatters,mcomber,mcmonigle,mckiddy,mcgranor,mcgeary,mcgaw,mcenery,mcelderry,mcduffey,mccuistion,mccrudden,mccrossin,mccosh,mccolgan,mcclish,mcclenahan,mcclam,mccartt,mccarrell,mcbane,maybury,mayben,maulden,mauceri,matko,mathie,matheis,mathai,masucci,massiah,martorano,martnez,martindelcamp,marschke,marovich,markiewicz,marinaccio,marhefka,marcrum,manton,mannarino,manlove,mangham,manasco,malpica,mallernee,malinsky,malhotra,maish,maisel,mainville,maharrey,magid,maertz,mada,maclaughlin,macina,macdermott,macallister,macadangdang,maack,lynk,lydic,luyando,lutke,lupinacci,lunz,lundsten,lujano,luhn,luecke,luebbe,ludolph,luckman,lucker,luckenbill,luckenbach,lucido,lowney,lowitz,lovaglio,louro,louk,loudy,louderback,lorick,lorenzini,lorensen,lorenc,lomuscio,loguidice,lockner,lockart,lochridge,litaker,lisowe,liptrap,linnane,linhares,lindfors,lindenmuth,lincourt,liew,liebowitz,levengood,leskovec,lesch,leoni,lennard,legner,leaser,leas,leadingham,lazarski,layland,laurito,laulu,laughner,laughman,laughery,laube,latiolais,lasserre,lasser,larrow,larrea,lapsley,lantrip,lanthier,langwell,langelier,landaker,lampi,lamond,lamblin,lambie,lakins,laipple,lagrimas,lafrancois,laffitte,laday,lacko,lacava,labianca,kutsch,kuske,kunert,kubly,kuamoo,krummel,krise,krenek,kreiser,krausz,kraska,krakowski,kradel,kozik,koza,kotowski,koslow,korber,kojima,kochel,knabjian,klunder,klugh,klinkhammer,kliewer,klever,kleber,klages,klaas,kizziar,kitchel,kishimoto,kirschenman,kirschenbaum,kinnick,kinn,kiner,kindla,kindall,kincaide,kilson,killins,kightlinger,kienzle,kiah,khim,ketcherside,kerl,kelsoe,kelker,keizer,keir,kawano,kawa,kaveney,kasparek,kaplowitz,kantrowitz,kant,kanoff,kano,kamalii,kalt,kaleta,kalbach,kalauli,kalata,kalas,kaigler,kachel,juran,jubb,jonker,jonke,jolivette,joles,joas,jividen,jeffus,jeanty,jarvi,jardon,janvier,janosko,janoski,janiszewski,janish,janek,iwanski,iuliano,irle,ingmire,imber,ijames,iiams,ihrig,ichikawa,hynum,hutzel,hutts,huskin,husak,hurndon,huntsinger,hulette,huitron,huguenin,hugg,hugee,huelskamp,huch,howen,hovanec,hoston,hostettler,horsfall,horodyski,holzhauer,hollimon,hollender,hogarth,hoffelmeyer,histand,hissem,hisel,hirayama,hinegardner,hinde,hinchcliffe,hiltbrand,hilsinger,hillstrom,hiley,hickenbottom,hickam,hibley,heying,hewson,hetland,hersch,herlong,herda,henzel,henshall,helson,helfen,heinbach,heikkila,heggs,hefferon,hebard,heathcote,hearl,heaberlin,hauth,hauschild,haughney,hauch,hattori,hasley,hartpence,harroun,harelson,hardgrove,hardel,hansbrough,handshoe,handly,haluska,hally,halling,halfhill,halferty,hakanson,haist,hairgrove,hahner,hagg,hafele,haaland,guttierez,gutknecht,gunnarson,gunlock,gummersheimer,gullatte,guity,guilmette,guhl,guenette,guardino,groshong,grober,gripp,grillot,grilli,greulich,gretzinger,greenwaldt,graven,grassman,granberg,graeser,graeff,graef,grabow,grabau,gotchy,goswick,gosa,gordineer,gorczyca,goodchild,golz,gollihue,goldwire,goldbach,goffredo,glassburn,glaeser,gillilan,gigante,giere,gieger,gidcumb,giarrusso,giannelli,gettle,gesualdi,geschke,gerwig,gervase,geoffrion,gentilcore,genther,gemes,gemberling,gelles,geitz,geeslin,gedney,gebauer,gawron,gavia,gautney,gaustad,gasmen,gargus,ganske,ganger,galvis,gallinger,gallichio,galletta,gaede,gadlin,gaby,gabrielsen,gaboriault,furlan,furgerson,fujioka,fugett,fuehrer,frint,frigon,frevert,frautschi,fraker,fradette,foulkes,forslund,forni,fontenette,fones,folz,folmer,follman,folkman,flourney,flickner,flemmings,fleischacker,flander,flament,fithian,fiorello,fiorelli,fioravanti,fieck,ficke,fiallos,fiacco,feuer,ferrington,fernholz,feria,fergurson,feick,febles,favila,faulkingham,fath,farnam,falter,fakhouri,fairhurst,fahs,estrello,essick,espree,esmond,eskelson,escue,escatel,erebia,epperley,epler,enyart,engelbert,enderson,emch,elisondo,elford,ekman,eick,eichmann,ehrich,ehlen,edwardson,edley,edghill,edel,eastes,easterbrooks,eagleson,eagen,eade,dyle,dutkiewicz,dunnagan,duncil,duling,drumgoole,droney,dreyfus,dragan,dowty,doscher,dornan,doremus,doogan,donaho,donahey,dombkowski,dolton,dolen,dobratz,diveley,dittemore,ditsch,disque,dishmon,disch,dirickson,dippolito,dimuccio,dilger,diefenderfer,dicola,diblasio,dibello,devan,dettmer,deschner,desbiens,derusha,denkins,demonbreun,demchak,delucchi,delprete,deloy,deliz,deline,delap,deiter,deignan,degiacomo,degaetano,defusco,deboard,debiase,deaville,deadwyler,davanzo,daughton,darter,danser,dandrade,dando,dampeer,dalziel,dalen,dain,dague,czekanski,cutwright,cutliff,curle,cuozzo,cunnington,cunnigham,cumings,crowston,crittle,crispell,crisostomo,crear,creach,craigue,crabbs,cozzi,cozza,coxe,cowsert,coviello,couse,coull,cottier,costagliola,corra,corpening,cormany,corless,corkern,conteh,conkey,conditt,conaty,colomb,collura,colledge,colins,colgate,coleson,colemon,coffland,coccia,clougherty,clewell,cleckley,cleaveland,clarno,civils,cillo,cifelli,ciesluk,christison,chowning,chouteau,choung,childres,cherrington,chenette,cheeves,cheairs,chaddock,cernoch,cerino,cazier,castel,casselberry,caserta,carvey,carris,carmant,cariello,cardarelli,caras,caracciolo,capitano,cantoni,cantave,cancio,campillo,callens,caldero,calamia,cahee,cahan,cahalan,cabanilla,cabal,bywater,bynes,byassee,busker,bushby,busack,burtis,burrola,buroker,burnias,burlock,burham,burak,bulla,buffin,buening,budney,buchannan,buchalter,brule,brugler,broxson,broun,brosh,brissey,brisby,brinlee,brinkmeyer,brimley,brickell,breth,breger,brees,brank,braker,bozak,bowlds,bowersock,bousman,boushie,botz,bordwell,bonkowski,bonine,bonifay,bonesteel,boldin,bohringer,bohlander,boecker,bocook,bocock,boblett,bobbett,boas,boarman,bleser,blazejewski,blaustein,blausey,blancarte,blaize,blackson,blacketer,blackard,bisch,birchett,billa,bilder,bierner,bienvenu,bielinski,bialas,biagini,beynon,beyl,bettini,betcher,bessent,beshara,besch,bernd,bergemann,bergeaux,berdan,bens,benedicto,bendall,beltron,beltram,bellville,beisch,behney,beechler,beckum,batzer,batte,bastida,bassette,basley,bartosh,bartolone,barraclough,barnick,barket,barkdoll,baringer,barella,barbian,barbati,bannan,balles,baldo,balasubramani,baig,bahn,bachmeier,babyak,baas,baars,ayuso,avinger,avella,ausbrooks,aull,augello,atkeson,atkerson,atherley,athan,assad,asebedo,arrison,armon,armfield,arkin,archambeau,antonellis,angotti,amorose,amini,amborn,amano,aluarez,allgaier,allegood,alen,aldama,aird,ahsing,ahmann,aguado,agostino,agostinelli,adwell,adsit,adelstein,actis,acierno,achee,abbs,abbitt,zwagerman,zuercher,zinno,zettler,zeff,zavalza,zaugg,zarzycki,zappulla,zanotti,zachman,zacher,yundt,yslas,younes,yontz,yglesias,yeske,yeargin,yauger,yamane,xang,wylam,wrobleski,wratchford,woodlee,wolsey,wolfinbarger,wohlenhaus,wittler,wittenmyer,witkop,wishman,wintz,winkelmann,windus,winborn,wims,wiltrout,willmott,williston,wilemon,wilbourne,wiedyk,widmann,wickland,wickes,wichert,whitsell,whisenand,whidby,wetz,westmeyer,wertheim,wernert,werle,werkheiser,weldin,weissenborn,weingard,weinfeld,weihl,weightman,weichel,wehrheim,wegrzyn,wegmann,waszak,wankum,walthour,waltermire,walstad,waldren,walbert,walawender,wahlund,wahlert,wahlers,wach,vuncannon,vredenburgh,vonk,vollmar,voisinet,vlahos,viscardi,vires,vipperman,violante,vidro,vessey,vesper,veron,vergari,verbeck,venturino,velastegui,vegter,varas,vanwey,vanvranken,vanvalkenbur,vanorsdale,vanoli,vanochten,vanier,vanevery,vane,vanduser,vandersteen,vandell,vandall,vallot,vallon,vallez,vallely,vadenais,uthe,usery,unga,ultsch,ullom,tyminski,twogood,tursi,turay,tungate,truxillo,trulock,trovato,troise,tripi,trinks,trimboli,trickel,trezise,trefry,treen,trebilcock,travieso,trachtenberg,touhey,tougas,tortorella,tormey,torelli,torborg,toran,tomek,tomassi,tollerson,tolden,toda,tobon,tjelmeland,titmus,tilbury,tietje,thurner,thum,thrope,thornbrough,thibaudeau,thackeray,tesoro,territo,ternes,teich,tecson,teater,teagarden,tatsch,tarallo,tapanes,tanberg,tamm,sylvis,swenor,swedlund,sutfin,sura,sundt,sundin,summerson,sumatzkuku,sultemeier,sulivan,suggitt,suermann,sturkie,sturgess,stumph,stuemke,struckhoff,strose,stroder,stricklen,strick,streib,strei,strawther,stratis,strahm,stortz,storrer,storino,stohler,stohl,stockel,stinnette,stile,stieber,steffenhagen,stefanowicz,steever,steagall,statum,stapley,stanish,standiford,standen,stamos,stahlecker,stadtler,spratley,spraker,sposito,spickard,spehar,spees,spearing,spangle,spallone,soulard,sora,sopko,sood,sonnen,solly,solesbee,soldano,sobey,sobczyk,snedegar,sneddon,smolinski,smolik,slota,slavick,skorupski,skolnik,skirvin,skeels,skains,skahan,skaar,siwiec,siverly,siver,sivak,sirk,sinton,sinor,sincell,silberstein,sieminski,sidelinger,shurman,shunnarah,shirer,shidler,sherlin,shepperson,shemanski,sharum,shartrand,shapard,shanafelt,shamp,shader,shackelton,seyer,seroka,sernas,seright,serano,sengupta,selinger,seith,seidler,seehusen,seefried,scovell,scorzelli,sconiers,schwind,schwichtenber,schwerin,schwenke,schwaderer,schussler,schuneman,schumpert,schultheiss,schroll,schroepfer,schroeden,schrimpf,schook,schoof,schomburg,schoenfeldt,schoener,schnoor,schmick,schlereth,schindele,schildt,schildknecht,schemmel,scharfenberg,schanno,schane,schaer,schad,scearce,scardino,sawka,sawinski,savoca,savery,saults,sarpy,saris,sardinha,sarafin,sankar,sanjurjo,sanderfer,sanagustin,samudio,sammartino,samas,salz,salmen,salkeld,salamon,sakurai,sakoda,safley,sada,sachse,ryden,ryback,russow,russey,ruprecht,rumple,ruffini,rudzinski,rudel,rudden,rovero,routledge,roussin,rousse,rouser,rougeau,rosica,romey,romaniello,rolfs,rogoff,rogne,rodriquz,rodrequez,rodin,rocray,rocke,riviere,rivette,riske,risenhoover,rindfleisch,rinaudo,rimbey,riha,righi,ridner,ridling,riden,rhue,reyome,reynoldson,reusch,rensing,rensch,rennels,renderos,reininger,reiners,reigel,rehmer,regier,reff,redlin,recchia,reaume,reagor,rawe,rattigan,raska,rashed,ranta,ranft,randlett,ramiez,ramella,rallis,rajan,raisbeck,raimondo,raible,ragone,rackliffe,quirino,quiring,quero,quaife,pyke,purugganan,pursifull,purkett,purdon,pulos,puccia,provance,propper,preis,prehn,prata,prasek,pranger,pradier,portor,portley,porte,popiel,popescu,pomales,polowy,pollett,politis,polit,poley,pohler,poggio,podolak,poag,plymel,ploeger,planty,piskura,pirrone,pirro,piroso,pinsky,pilant,pickerill,piccolomini,picart,piascik,phann,petruzzelli,petosa,persson,perretta,perkowski,perilli,percifield,perault,peppel,pember,pelotte,pelcher,peixoto,pehl,peatross,pearlstein,peacher,payden,paya,pawelek,pavey,pauda,pathak,parrillo,parness,parlee,paoli,pannebaker,palomar,palo,palmberg,paganelli,paffrath,padovano,padden,pachucki,ovando,othman,osowski,osler,osika,orsburn,orlowsky,oregel,oppelt,opfer,opdyke,onell,olivos,okumura,okoro,ogas,oelschlaeger,oder,ocanas,obrion,obarr,oare,nyhus,nyenhuis,nunnelley,nunamaker,nuckels,noyd,nowlan,novakovich,noteboom,norviel,nortz,norment,norland,nolt,nolie,nixson,nitka,nissley,nishiyama,niland,niewiadomski,niemeier,nieland,nickey,nicholsen,neugent,neto,nerren,neikirk,neigh,nedrow,neave,nazaire,navaro,navalta,nasworthy,nasif,nalepa,nakao,nakai,nadolny,myklebust,mussel,murthy,muratore,murat,mundie,mulverhill,muilenburg,muetzel,mudra,mudgett,mrozinski,moura,mottinger,morson,moretto,morentin,mordan,mooreland,mooers,monts,montone,montondo,montiero,monie,monat,monares,mollo,mollet,molacek,mokry,mohrmann,mohabir,mogavero,moes,moceri,miyoshi,mitzner,misra,mirr,minish,minge,minckler,milroy,mille,mileski,milanesi,miko,mihok,mihalik,mieczkowski,messerli,meskill,mesenbrink,merton,merryweather,merkl,menser,menner,menk,menden,menapace,melbourne,mekus,meinzer,meers,mctigue,mcquitty,mcpheron,mcmurdie,mcleary,mclafferty,mckinzy,mckibbin,mckethan,mcintee,mcgurl,mceachran,mcdowall,mcdermitt,mccuaig,mccreedy,mccoskey,mcclosky,mcclintick,mccleese,mccanless,mazzucco,mazzocco,mazurkiewicz,mazariego,mayhorn,maxcy,mavity,mauzey,maulding,matuszewski,mattsson,mattke,matsushita,matsuno,matsko,matkin,mathur,masterman,massett,massart,massari,mashni,martella,marren,margotta,marder,marczak,maran,maradiaga,manwarren,manter,mantelli,manso,mangone,manfredonia,malden,malboeuf,malanga,makara,maison,maisano,mairs,mailhiot,magri,madron,madole,mackall,macduff,macartney,lynds,lusane,luffman,louth,loughmiller,lougheed,lotspeich,lorenzi,loosli,longe,longanecker,lonero,lohmeyer,loeza,lobstein,lobner,lober,littman,litalien,lippe,lints,lijewski,ligas,liebert,liebermann,liberati,lezcano,levinthal,lessor,lesieur,lenning,lengel,lempke,lemp,lemar,leitzke,leinweber,legrone,lege,leder,lawnicki,lauth,laun,laughary,lassley,lashway,larrivee,largen,lare,lanouette,lanno,langille,langen,lamonte,lalin,laible,lafratta,laforte,lacuesta,lacer,labore,laboe,labeau,kwasniewski,kunselman,kuhr,kuchler,krugman,kruckenberg,krotzer,kroemer,krist,krigbaum,kreke,kreisman,kreisler,kreft,krasnow,kras,krag,kouyate,kough,kotz,kostura,korner,kornblum,korczynski,koppa,kopczyk,konz,komorowski,kollen,kolander,koepnick,koehne,kochis,knoch,knippers,knaebel,klipp,klinedinst,klimczyk,klier,klement,klaphake,kisler,kinzie,kines,kindley,kimple,kimm,kimbel,kilker,kilborn,kibbey,khong,ketchie,kerbow,kennemore,kennebeck,kenneally,kenndy,kenmore,kemnitz,kemler,kemery,kelnhofer,kellstrom,kellis,kellams,keiter,keirstead,keeny,keelin,keefauver,keams,kautzman,kaus,katayama,kasson,kassim,kasparian,kase,karwoski,kapuscinski,kaneko,kamerling,kamada,kalka,kalar,kakacek,kaczmarczyk,jurica,junes,journell,jolliffe,johnsey,jindra,jimenz,jette,jesperson,jerido,jenrette,jencks,jech,jayroe,jayo,javens,jaskot,jaros,jaquet,janowiak,jaegers,jackel,izumi,irelan,inzunza,imoto,imme,iglehart,iannone,iannacone,huyler,hussaini,hurlock,hurlbutt,huprich,humphry,hulslander,huelsman,hudelson,hudecek,hsia,hreha,hoyland,howk,housholder,housden,houff,horkey,honan,homme,holtzberg,hollyfield,hollings,hollenbaugh,hokenson,hogrefe,hogland,hoel,hodgkin,hochhalter,hjelle,hittson,hinderman,hinchliffe,hime,hilyer,hilby,hibshman,heydt,hewell,heward,hetu,hestand,heslep,herridge,herner,hernande,hermandez,hermance,herbold,heon,henthorne,henion,henao,heming,helmkamp,hellberg,heidgerken,heichel,hehl,hegedus,heckathorne,hearron,haymer,haycook,havlicek,hausladen,haseman,hartsook,hartog,harns,harne,harmann,haren,hanserd,hanners,hanekamp,hamra,hamley,hamelin,hamblet,hakimi,hagle,hagin,haehn,haeck,hackleman,haacke,gulan,guirand,guiles,guggemos,guerrieri,guerreiro,guereca,gudiel,guccione,gubler,gruenwald,gritz,grieser,grewe,grenon,gregersen,grefe,grech,grecco,gravette,grassia,granholm,graner,grandi,grahan,gradowski,gradney,graczyk,gouthier,gottschall,goracke,gootee,goodknight,goodine,gonzalea,gonterman,gonalez,gomm,goleman,goldtooth,goldstone,goldey,golan,goen,goeller,goel,goecke,godek,goan,glunz,gloyd,glodowski,glinski,glawe,girod,girdley,gindi,gillings,gildner,giger,giesbrecht,gierke,gier,giboney,giaquinto,giannakopoulo,giaimo,giaccio,giacalone,gessel,gerould,gerlt,gerhold,geralds,genson,genereux,gellatly,geigel,gehrig,gehle,geerdes,geagan,gawel,gavina,gauss,gatwood,gathman,gaster,garske,garratt,garms,garis,gansburg,gammell,gambale,gamba,galimore,gadway,gadoury,furrer,furino,fullard,fukui,fryou,friesner,friedli,friedl,friedberg,freyermuth,fremin,fredell,fraze,franken,foth,fote,fortini,fornea,formanek,forker,forgette,folan,foister,foglesong,flinck,flewellen,flaten,flaig,fitgerald,fischels,firman,finstad,finkelman,finister,fina,fetterhoff,ferriter,ferch,fennessy,feltus,feltes,feinman,farve,farry,farrall,farag,falzarano,falck,falanga,fakhoury,fairbrother,fagley,faggins,facteau,ewer,ewbank,evola,evener,eustis,estwick,estel,essa,espinola,escutia,eschmann,erpelding,ernsberger,erling,entz,engelhart,enbody,emick,elsinger,ellinwood,ellingsen,ellicott,elkind,eisinger,eisenbeisz,eischen,eimer,eigner,eichhorst,ehmke,egleston,eggett,efurd,edgeworth,eckels,ebey,eberling,eagleton,dwiggins,dweck,dunnings,dunnavant,dumler,duman,dugue,duerksen,dudeck,dreisbach,drawdy,drawbaugh,draine,draggoo,dowse,dovel,doughton,douds,doubrava,dort,dorshorst,dornier,doolen,donavan,dominik,domingez,dolder,dold,dobies,diskin,disano,dirden,diponio,dipirro,dimock,diltz,dillabough,diley,dikes,digges,digerolamo,diel,dicharry,dicecco,dibartolomeo,diamant,dewire,devone,dessecker,dertinger,derousselle,derk,depauw,depalo,denherder,demeyer,demetro,demastus,delvillar,deloye,delosrios,delgreco,delarge,delangel,dejongh,deitsch,degiorgio,degidio,defreese,defoe,decambra,debenedetto,deaderick,daza,dauzat,daughenbaugh,dato,dass,darwish,dantuono,danton,dammeyer,daloia,daleo,dagg,dacey,curts,cuny,cunneen,culverhouse,cucinella,cubit,crumm,crudo,crowford,crout,crotteau,crossfield,crooke,crom,critz,cristaldi,crickmore,cribbin,cremeens,crayne,cradduck,couvertier,cottam,cossio,correy,cordrey,coplon,copass,coone,coody,contois,consla,connelley,connard,congleton,condry,coltey,colindres,colgrove,colfer,colasurdo,cochell,cobbin,clouthier,closs,cloonan,clizbe,clennon,clayburn,claybourn,clausell,clasby,clagett,ciskowski,cirrincione,cinque,cinelli,cimaglia,ciaburri,christiani,christeson,chladek,chizmar,chinnici,chiarella,chevrier,cheves,chernow,cheong,chelton,chanin,cham,chaligoj,celestino,cayce,cavey,cavaretta,caughron,catmull,catapano,cashaw,carullo,carualho,carthon,cartelli,carruba,carrere,carolus,carlstrom,carfora,carello,carbary,caplette,cannell,cancilla,campell,cammarota,camilo,camejo,camarata,caisse,cacioppo,cabbagestalk,cabatu,cabanas,byles,buxbaum,butland,burrington,burnsed,burningham,burlingham,burgy,buitrago,bueti,buehring,buday,bucknell,buchbinder,bucey,bruster,brunston,brouillet,brosious,broomes,brodin,broddy,brochard,britsch,britcher,brierley,brezina,bressi,bressette,breslow,brenden,breier,brei,braymer,brasuell,branscomb,branin,brandley,brahler,bracht,bracamontes,brabson,boyne,boxell,bowery,bovard,boutelle,boulette,bottini,botkins,bosen,boscia,boscarino,borich,boreman,bordoy,bordley,bordenet,boquet,boocks,bolner,boissy,boilard,bohnen,bohall,boening,boccia,boccella,bobe,blyth,biviano,bitto,bisel,binstock,bines,billiter,bigsby,bighorse,bielawski,bickmore,bettin,bettenhausen,besson,beseau,berton,berroa,berntson,bernas,berisford,berhow,bergsma,benyo,benyard,bente,bennion,benko,belsky,bellavance,belasco,belardo,beidler,behring,begnaud,bega,befort,beek,bedore,beddard,becknell,beardslee,beardall,beagan,bayly,bauza,bautz,bausman,baumler,batterson,battenfield,bassford,basse,basemore,baruch,bartholf,barman,baray,barabas,banghart,banez,balsam,ballester,ballagh,baldock,bagnoli,bagheri,bacus,bacho,baccam,axson,averhart,aver,austill,auberry,athans,atcitty,atay,astarita,ascolese,artzer,arrasmith,argenbright,aresco,aranjo,appleyard,appenzeller,apilado,antonetti,antis,annas,angwin,andris,andries,andreozzi,ando,andis,anderegg,amyot,aminov,amelung,amelio,amason,alviar,allendorf,aldredge,alcivar,alaya,alapai,airington,aina,ailor,ahrns,ahmadi,agresta,affolter,aeschlimann,adney,aderhold,adachi,ackiss,aben,abdelhamid,abar,aase,zorilla,zordan,zollman,zoch,zipfel,zimmerle,zike,ziel,zens,zelada,zaman,zahner,zadora,zachar,zaborowski,zabinski,yzquierdo,yoshizawa,yori,yielding,yerton,yehl,yeargain,yeakley,yamaoka,yagle,yablonski,wynia,wyne,wyers,wrzesinski,wrye,wriston,woolums,woolen,woodlock,woodle,wonser,wombacher,wollschlager,wollen,wolfley,wolfer,wisse,wisell,wirsing,winstanley,winsley,winiecki,winiarski,winge,winesett,windell,winberry,willyard,willemsen,wilkosz,wilensky,wikle,wiford,wienke,wieneke,wiederhold,wiebold,widick,wickenhauser,whitrock,whisner,whinery,wherley,whedbee,wheadon,whary,wessling,wessells,wenninger,wendroth,wende,wellard,weirick,weinkauf,wehrman,weech,weathersbee,warncke,wardrip,walstrom,walkowski,walcutt,waight,wagman,waggett,wadford,vowles,vormwald,vondran,vohs,vitt,vitalo,viser,vinas,villena,villaneuva,villafranca,villaflor,vilain,vicory,viana,vian,verucchi,verra,venzke,venske,veley,veile,veeder,vaske,vasconez,vargason,varble,vanwert,vantol,vanscooter,vanmetre,vanmaanen,vanhise,vaneaton,vandyk,vandriel,vandorp,vandewater,vandervelden,vanderstelt,vanderhoef,vanderbeck,vanbibber,vanalstine,vanacore,valdespino,vaill,vailes,vagliardo,ursini,urrea,urive,uriegas,umphress,ucci,uballe,tynon,twiner,tutton,tudela,tuazon,troisi,tripplett,trias,trescott,treichel,tredo,tranter,tozer,toxey,tortorici,tornow,topolski,topia,topel,topalian,tonne,tondre,tola,toepke,tisdell,tiscareno,thornborrow,thomison,thilges,theuret,therien,thagard,thacher,texter,terzo,tenpenny,tempesta,teetz,teaff,tavella,taussig,tatton,tasler,tarrence,tardie,tarazon,tantillo,tanney,tankson,tangen,tamburo,tabone,szilagyi,syphers,swistak,swiatkowski,sweigert,swayzer,swapp,svehla,sutphen,sutch,susa,surma,surls,sundermeyer,sundeen,sulek,sughrue,sudol,sturms,stupar,stum,stuckman,strole,strohman,streed,strebeck,strausser,strassel,stpaul,storts,storr,stommes,stmary,stjulien,stika,stiggers,sthill,stevick,sterman,stepanek,stemler,stelman,stelmack,steinkamp,steinbock,stcroix,stcharles,staudinger,stanly,stallsworth,stalley,srock,spritzer,spracklin,spinuzzi,spidell,speyrer,sperbeck,spendlove,speckman,spargur,spangenberg,spaid,sowle,soulier,sotolongo,sostre,sorey,sonier,somogyi,somera,soldo,soderholm,snoots,snooks,snoke,snodderly,snee,smithhart,smillie,smay,smallman,sliwinski,slentz,sledd,slager,skogen,skog,skarda,skalicky,siwek,sitterson,sisti,sissel,sinopoli,similton,simila,simenson,silvertooth,silos,siggins,sieler,siburt,sianez,shurley,shular,shuecraft,shreeves,shollenberger,shoen,shishido,shipps,shipes,shinall,sherfield,shawe,sharrett,sharrard,shankman,sessum,serviss,servello,serice,serda,semler,semenza,selmon,sellen,seley,seidner,seib,sehgal,seelbach,sedivy,sebren,sebo,seanez,seagroves,seagren,seabron,schwertner,schwegel,schwarzer,schrunk,schriefer,schreder,schrank,schopp,schonfeld,schoenwetter,schnall,schnackenberg,schnack,schmutzler,schmierer,schmidgall,schlup,schloemer,schlitt,schermann,scherff,schellenberg,schain,schaedler,schabel,scaccia,saye,saurez,sasseen,sasnett,sarti,sarra,sarber,santoy,santeramo,sansoucy,sando,sandles,sandau,samra,samaha,salizar,salam,saindon,sagaser,saeteun,sadusky,sackman,sabater,saas,ruthven,ruszkowski,rusche,rumpf,ruhter,ruhenkamp,rufo,rudge,ruddle,rowlee,rowand,routhier,rougeot,rotramel,rotan,rosten,rosillo,rookard,roode,rongstad,rollie,roider,roffe,roettger,rodick,rochez,rochat,rivkin,rivadeneira,riston,risso,rinderknecht,riis,riggsbee,rieker,riegle,riedy,richwine,richmon,ricciuti,riccardo,ricardson,rhew,revier,remsberg,remiszewski,rembold,rella,reinken,reiland,reidel,reichart,rehak,redway,rednour,redifer,redgate,redenbaugh,redburn,readus,raybuck,rauhuff,rauda,ratte,rathje,rappley,rands,ramseyer,ramseur,ramsdale,ramo,ramariz,raitz,raisch,rainone,rahr,ragasa,rafalski,radunz,quenzer,queja,queenan,pyun,putzier,puskas,purrington,puri,punt,pullar,pruse,pring,primeau,prevette,preuett,prestage,pownell,pownall,potthoff,potratz,poth,poter,posthuma,posen,porritt,popkin,poormon,polidoro,polcyn,pokora,poer,pluviose,plock,pleva,placke,pioli,pingleton,pinchback,pieretti,piccone,piatkowski,philley,phibbs,phay,phagan,pfund,peyer,pettersen,petter,petrucelli,petropoulos,petras,petix,pester,pepperman,pennick,penado,pelot,pelis,peeden,pechon,peal,pazmino,patchin,pasierb,parran,parilla,pardy,parcells,paragas,paradee,papin,panko,pangrazio,pangelinan,pandya,pancheri,panas,palmiter,pallares,palinkas,palek,pagliaro,packham,pacitti,ozier,overbaugh,oursler,ouimette,otteson,otsuka,othon,osmundson,oroz,orgill,ordeneaux,orama,oppy,opheim,onkst,oltmanns,olstad,olofson,ollivier,olejniczak,okura,okuna,ohrt,oharra,oguendo,ogier,offermann,oetzel,oechsle,odoherty,oddi,ockerman,occhiogrosso,obryon,obremski,nyreen,nylund,nylen,nyholm,nuon,nuanes,norrick,noris,nordell,norbury,nooner,nomura,nole,nolden,nofsinger,nocito,niedbala,niebergall,nicolini,nevils,neuburger,nemerofsky,nemecek,nazareno,nastri,nast,nagorski,myre,muzzey,mutschler,muther,musumeci,muranaka,muramoto,murad,murach,muns,munno,muncrief,mugrage,muecke,mozer,moyet,mowles,mottern,mosman,mosconi,morine,morge,moravec,morad,mones,moncur,monarez,molzahn,moglia,moesch,mody,modisett,mitnick,mithcell,mitchiner,mistry,misercola,mirabile,minvielle,mino,minkler,minifield,minichiello,mindell,minasian,milteer,millwee,millstein,millien,mikrut,mihaly,miggins,michard,mezo,metzner,mesquita,merriwether,merk,merfeld,mercik,mercadante,menna,mendizabal,mender,melusky,melquist,mellado,meler,melendes,mekeel,meiggs,megginson,meck,mcwherter,mcwayne,mcsparren,mcrea,mcneff,mcnease,mcmurrin,mckeag,mchughes,mcguiness,mcgilton,mcelreath,mcelhone,mcelhenney,mceldowney,mccurtain,mccure,mccosker,mccory,mccormic,mccline,mccleave,mcclatchey,mccarney,mccanse,mcallen,mazzie,mazin,mazanec,mayette,mautz,maun,mattas,mathurin,mathiesen,massmann,masri,masias,mascolo,mascetti,mascagni,marzolf,maruska,martain,marszalek,marolf,marmas,marlor,markwood,marinero,marier,marich,marcom,marciante,marchman,marchio,marbach,manzone,mantey,mannina,manhardt,manaois,malmgren,mallonee,mallin,mallary,malette,makinson,makins,makarewicz,mainwaring,maiava,magro,magouyrk,magett,maeder,madyun,maduena,maden,madeira,mackins,mackel,macinnes,macia,macgowan,lyssy,lyerly,lyalls,lutter,lunney,luksa,ludeman,lucidi,lucci,lowden,lovier,loughridge,losch,lorson,lorenzano,lorden,lorber,lopardo,loosier,loomer,longsdorf,longchamps,loncar,loker,logwood,loeffelholz,lockmiller,livoti,linford,linenberger,lindloff,lindenbaum,limoges,liley,lighthill,lightbourne,lieske,leza,levandoski,leuck,lepere,leonhart,lenon,lemma,lemler,leising,leinonen,lehtinen,lehan,leetch,leeming,ledyard,ledwith,ledingham,leclere,leck,lebert,leandry,lazzell,layo,laye,laxen,lawther,lawerance,lavoy,lavertu,laverde,latouche,latner,lathen,laskin,lashbaugh,lascala,larroque,larick,laraia,laplume,lanzilotta,lannom,landrigan,landolt,landess,lamkins,lalla,lalk,lakeman,lakatos,laib,lahay,lagrave,lagerquist,lafoy,lafleche,lader,labrada,kwiecinski,kutner,kunshier,kulakowski,kujak,kuehnle,kubisiak,krzyminski,krugh,krois,kritikos,krill,kriener,krewson,kretzschmar,kretz,kresse,kreiter,kreischer,krebel,krans,kraling,krahenbuhl,kouns,kotson,kossow,kopriva,konkle,kolter,kolk,kolich,kohner,koeppen,koenigs,kock,kochanski,kobus,knowling,knouff,knoerzer,knippel,kloberdanz,kleinert,klarich,klaassen,kisamore,kirn,kiraly,kipps,kinson,kinneman,kington,kine,kimbriel,kille,kibodeaux,khamvongsa,keylon,kever,keser,kertz,kercheval,kendrix,kendle,kempt,kemple,keesey,keatley,kazmierski,kazda,kazarian,kawashima,katsch,kasun,kassner,kassem,kasperski,kasinger,kaschak,karels,kantola,kana,kamai,kalthoff,kalla,kalani,kahrs,kahanek,kacher,jurasek,jungels,jukes,juelfs,judice,juda,josselyn,jonsson,jonak,joens,jobson,jegede,jeanjacques,jaworowski,jaspers,jannsen,janner,jankowiak,jank,janiak,jackowski,jacklin,jabbour,iyer,iveson,isner,iniquez,ingwerson,ingber,imbrogno,ille,ikehara,iannelli,hyson,huxford,huseth,hurns,hurney,hurles,hunnings,humbarger,hulan,huisinga,hughett,hughen,hudler,hubiak,hricko,hoversten,hottel,hosaka,horsch,hormann,hordge,honzell,homburg,holten,holme,hollopeter,hollinsworth,hollibaugh,holberg,hohmann,hoenstine,hodell,hodde,hiter,hirko,hinzmann,hinrichsen,hinger,hincks,hilz,hilborn,highley,higashi,hieatt,hicken,heverly,hesch,hervert,hershkowitz,herreras,hermanns,herget,henriguez,hennon,hengel,helmlinger,helmig,heldman,heizer,heinitz,heifner,heidorn,heglin,heffler,hebner,heathman,heaslip,hazlip,haymes,hayase,hawver,havermale,havas,hauber,hashim,hasenauer,harvel,hartney,hartel,harsha,harpine,harkrider,harkin,harer,harclerode,hanzely,hanni,hannagan,hampel,hammerschmidt,hamar,hallums,hallin,hainline,haid,haggart,hafen,haer,hadiaris,hadad,hackford,habeeb,guymon,guttery,gunnett,guillette,guiliano,guilbeaux,guiher,guignard,guerry,gude,gucman,guadian,grzybowski,grzelak,grussendorf,grumet,gruenhagen,grudzinski,grossmann,grof,grisso,grisanti,griffitts,griesbaum,grella,gregston,graveline,grandusky,grandinetti,gramm,goynes,gowing,goudie,gosman,gort,gorsline,goralski,goodstein,goodroe,goodlin,goodheart,goodhart,gonzelez,gonthier,goldsworthy,goldade,goettel,goerlitz,goepfert,goehner,goben,gobeille,gliem,gleich,glasson,glascoe,gladwell,giusto,girdner,gipple,giller,giesing,giammona,ghormley,germon,geringer,gergely,gerberich,gepner,gens,genier,gemme,gelsinger,geigle,gebbia,gayner,gavitt,gatrell,gastineau,gasiewski,gascoigne,garro,garin,ganong,ganga,galpin,gallus,galizia,gajda,gahm,gagen,gaffigan,furno,furnia,furgason,fronczak,frishman,friess,frierdich,freestone,franta,frankovich,fors,forres,forrer,florido,flis,flicek,flens,flegal,finkler,finkenbinder,finefrock,filpo,filion,fierman,fieldman,ferreyra,fernendez,fergeson,fera,fencil,feith,feight,federici,federer,fechtner,feagan,fausnaugh,faubert,fata,farman,farinella,fantauzzi,fanara,falso,falardeau,fagnani,fabro,excell,ewton,evey,everetts,evarts,etherington,estremera,estis,estabrooks,essig,esplin,espenschied,ernzen,eppes,eppard,entwisle,emison,elison,elguezabal,eledge,elbaz,eisler,eiden,eichorst,eichert,egle,eggler,eggimann,edey,eckerman,echelberger,ebbs,ebanks,dziak,dyche,dyce,dusch,duross,durley,durate,dunsworth,dumke,dulek,duhl,duggin,dufford,dudziak,ducrepin,dubree,dubre,dubie,dubas,droste,drisko,drewniak,doxtator,dowtin,downum,doubet,dottle,dosier,doshi,dorst,dorset,dornbusch,donze,donica,domanski,domagala,dohse,doerner,doerfler,doble,dobkins,dilts,digiulio,digaetano,dietzel,diddle,dickel,dezarn,devoy,devoss,devilla,devere,deters,desvergnes,deshay,desena,deross,depedro,densley,demorest,demore,demora,demirjian,demerchant,dematteis,demateo,delgardo,delfavero,delaurentis,delamar,delacy,deitrich,deisher,degracia,degraaf,defries,defilippis,decoursey,debruin,debiasi,debar,dearden,dealy,dayhoff,davino,darvin,darrisaw,darbyshire,daquino,daprile,danh,danahy,dalsanto,dallavalle,dagel,dadamo,dacy,dacunha,dabadie,czyz,cutsinger,curney,cuppernell,cunliffe,cumby,cullop,cullinane,cugini,cudmore,cuda,cucuzza,cuch,crumby,crouser,critton,critchley,cremona,cremar,crehan,creary,crasco,crall,crabbe,cozzolino,cozier,coyner,couvillier,counterman,coulthard,coudriet,cottom,corzo,cornutt,corkran,corda,copelin,coonan,consolo,conrow,conran,connerton,conkwright,condren,comly,comisky,colli,collet,colello,colbeck,colarusso,coiner,cohron,codere,cobia,clure,clowser,clingenpeel,clenney,clendaniel,clemenson,cleere,cleckler,claybaugh,clason,cirullo,ciraulo,ciolek,ciampi,christopherse,chovanec,chopra,chol,chiem,chestnutt,chesterman,chernoff,chermak,chelette,checketts,charpia,charo,chargois,champman,challender,chafins,cerruto,celi,cazenave,cavaluzzi,cauthon,caudy,catino,catano,cassaro,cassarino,carrano,carozza,carow,carmickle,carlyon,carlew,cardena,caputi,capley,capalbo,canseco,candella,campton,camposano,calleros,calleja,callegari,calica,calarco,calais,caillier,cahue,cadenhead,cadenas,cabera,buzzo,busto,bussmann,busenbark,burzynski,bursley,bursell,burle,burkleo,burkette,burczyk,bullett,buikema,buenaventura,buege,buechel,budreau,budhram,bucknam,brye,brushwood,brumbalow,brulotte,bruington,bruderer,brougher,bromfield,broege,brodhead,brocklesby,broadie,brizuela,britz,brisendine,brilla,briggeman,brierton,bridgeford,breyfogle,brevig,breuninger,bresse,bresette,brelsford,breitbach,brayley,braund,branscom,brandner,brahm,braboy,brabble,bozman,boyte,boynes,boyken,bowell,bowan,boutet,bouse,boulet,boule,bottcher,bosquez,borrell,boria,bordes,borchard,bonson,bonino,bonas,bonamico,bolstad,bolser,bollis,bolich,bolf,boker,boileau,bohac,bogucki,bogren,boeger,bodziony,bodo,bodley,boback,blyther,blenker,blazina,blase,blamer,blacknall,blackmond,bitz,biser,biscardi,binz,bilton,billotte,billafuerte,bigford,biegler,bibber,bhandari,beyersdorf,bevelle,bettendorf,bessard,bertsche,berne,berlinger,berish,beranek,bentson,bentsen,benskin,benoy,benoist,benitz,belongia,belmore,belka,beitzel,beiter,beitel,behrns,becka,beaudion,beary,beare,beames,beabout,beaber,bazzano,bazinet,baucum,batrez,baswell,bastos,bascomb,bartha,barstad,barrilleaux,barretto,barresi,barona,barkhurst,barke,bardales,barczak,barca,barash,banfill,balonek,balmes,balko,balestrieri,baldino,baldelli,baken,baiza,bahner,baek,badour,badley,badia,backmon,bacich,bacca,ayscue,aynes,ausiello,auringer,auiles,aspinwall,askwith,artiga,arroliga,arns,arman,arellanes,aracena,antwine,antuna,anselmi,annen,angelino,angeli,angarola,andrae,amodio,ameen,alwine,alverio,altro,altobello,altemus,alquicira,allphin,allemand,allam,alessio,akpan,akerman,aiona,agyeman,agredano,adamik,adamczak,acrey,acevado,abreo,abrahamsen,abild,zwicker,zweig,zuvich,zumpano,zuluaga,zubek,zornes,zoglmann,ziminski,zimbelman,zhanel,zenor,zechman,zauner,zamarron,zaffino,yusuf,ytuarte,yett,yerkovich,yelder,yasuda,yapp,yaden,yackley,yaccarino,wytch,wyre,wussow,worthing,wormwood,wormack,wordell,woodroof,woodington,woodhams,wooddell,wollner,wojtkowski,wojcicki,wogan,wlodarczyk,wixted,withington,withem,wisler,wirick,winterhalter,winski,winne,winemiller,wimett,wiltfong,willibrand,willes,wilkos,wilbon,wiktor,wiggers,wigg,wiegmann,wickliff,wiberg,whittler,whittenton,whitling,whitledge,whitherspoon,whiters,whitecotton,whitebird,wheary,wetherill,westmark,westaby,wertenberger,wentland,wenstrom,wenker,wellen,weier,wegleitner,wedekind,wawers,wassel,warehime,wandersee,waltmon,waltersheid,walbridge,wakely,wakeham,wajda,waithe,waidelich,wahler,wahington,wagster,wadel,vuyovich,vuolo,vulich,vukovich,volmer,vollrath,vollbrecht,vogelgesang,voeller,vlach,vivar,vitullo,vitanza,visker,visalli,viray,vinning,viniard,villapando,villaman,vier,viar,viall,verstraete,vermilya,verdon,venn,velten,velis,vanoven,vanorder,vanlue,vanheel,vanderwoude,vanderheide,vandenheuvel,vandenbos,vandeberg,vandal,vanblarcom,vanaken,vanacker,vallian,valine,valent,vaine,vaile,vadner,uttech,urioste,urbanik,unrath,unnasch,underkofler,uehara,tyrer,tyburski,twaddle,turntine,tunis,tullock,tropp,troilo,tritsch,triola,trigo,tribou,tribley,trethewey,tress,trela,treharne,trefethen,trayler,trax,traut,tranel,trager,traczyk,towsley,torrecillas,tornatore,tork,torivio,toriello,tooles,tomme,tolosa,tolen,toca,titterington,tipsword,tinklenberg,tigney,tigert,thygerson,thurn,thur,thorstad,thornberg,thoresen,thomaston,tholen,thicke,theiler,thebeau,theaux,thaker,tewani,teufel,tetley,terrebonne,terrano,terpening,tela,teig,teichert,tegethoff,teele,tatar,tashjian,tarte,tanton,tanimoto,tamimi,tamas,talman,taal,szydlowski,szostak,swoyer,swerdlow,sweeden,sweda,swanke,swander,suyama,suriano,suri,surdam,suprenant,sundet,summerton,sult,suleiman,suffridge,suby,stych,studeny,strupp,struckman,strief,strictland,stremcha,strehl,stramel,stoy,stoutamire,storozuk,stordahl,stopher,stolley,stolfi,stoeger,stockhausen,stjulian,stivanson,stinton,stinchfield,stigler,stieglitz,stgermaine,steuer,steuber,steuart,stepter,stepnowski,stepanian,steimer,stefanelli,stebner,stears,steans,stayner,staubin,statz,stasik,starn,starmer,stargel,stanzione,stankovich,stamour,staib,stadelman,stadel,stachura,squadrito,springstead,spragg,spigelmyer,spieler,spaur,sovocool,soundara,soulia,souffrant,sorce,sonkin,sodhi,soble,sniffen,smouse,smittle,smithee,smedick,slowinski,slovacek,slominski,skowronek,skokan,skanes,sivertson,sinyard,sinka,sinard,simonin,simonian,simmions,silcott,silberg,siefken,siddon,shuttlesworth,shubin,shubeck,shiro,shiraki,shipper,shina,shilt,shikles,shideler,shenton,shelvey,shellito,shelhorse,shawcroft,shatto,shanholtzer,shamonsky,shadden,seymer,seyfarth,setlock,serratos,serr,sepulueda,senay,semmel,semans,selvig,selkirk,selk,seligson,seldin,seiple,seiersen,seidling,seidensticker,secker,searson,scordo,scollard,scoggan,scobee,sciandra,scialdone,schwimmer,schwieger,schweer,schwanz,schutzenhofer,schuetze,schrodt,schriever,schriber,schremp,schrecongost,schraeder,schonberg,scholtz,scholle,schoettle,schoenemann,schoene,schnitker,schmuhl,schmith,schlotterbeck,schleppenbach,schlee,schickel,schibi,schein,scheide,scheibe,scheib,schaumberg,schardein,schaalma,scantlin,scantlebury,sayle,sausedo,saurer,sassone,sarracino,saric,sanz,santarpia,santano,santaniello,sangha,sandvik,sandoral,sandobal,sandercock,sanantonio,salviejo,salsberry,salois,salazer,sagon,saglibene,sagel,sagal,saetern,saefong,sadiq,sabori,saballos,rygiel,rushlow,runco,rulli,ruller,ruffcorn,ruess,ruebush,rudlong,rudin,rudgers,rudesill,ruderman,rucki,rucinski,rubner,rubinson,rubiano,roznowski,rozanski,rowson,rower,rounsaville,roudabush,rotundo,rothell,rotchford,rosiles,roshak,rosetti,rosenkranz,rorer,rollyson,rokosz,rojek,roitman,rohrs,rogel,roewe,rodriges,rodocker,rodgerson,rodan,rodak,rocque,rochholz,robicheau,robbinson,roady,ritchotte,ripplinger,rippetoe,ringstaff,ringenberg,rinard,rigler,rightmire,riesen,riek,ridges,richner,richberg,riback,rial,rhyner,rhees,resse,renno,rendleman,reisz,reisenauer,reinschmidt,reinholt,reinard,reifsnyder,rehfeld,reha,regester,reffitt,redler,rediske,reckner,reckart,rebolloso,rebollar,reasonover,reasner,reaser,reano,reagh,raval,ratterman,ratigan,rater,rasp,raneses,randolf,ramil,ramdas,ramberg,rajaniemi,raggio,ragel,ragain,rade,radaker,racioppi,rabinovich,quickle,quertermous,queal,quartucci,quander,quain,pynes,putzel,purl,pulizzi,pugliares,prusak,prueter,protano,propps,primack,prieur,presta,preister,prawl,pratley,pozzo,powless,povey,pottorf,pote,postley,porzio,portney,ponzi,pontoriero,ponto,pont,poncedeleon,polimeni,polhamus,polan,poetker,poellnitz,podgurski,plotts,pliego,plaugher,plantenberg,plair,plagmann,pizzitola,pittinger,pitcavage,pischke,piontek,pintar,pinnow,pinneo,pinley,pingel,pinello,pimenta,pillard,piker,pietras,piere,phillps,pfleger,pfahl,pezzuti,petruccelli,petrello,peteet,pescatore,peruzzi,perusse,perotta,perona,perini,perelman,perciful,peppin,pennix,pennino,penalosa,pemble,pelz,peltzer,pelphrey,pelote,pellum,pellecchia,pelikan,peitz,pebworth,peary,pawlicki,pavelich,paster,pasquarella,paskey,paseur,paschel,parslow,parrow,parlow,parlett,parler,pargo,parco,paprocki,panepinto,panebianco,pandy,pandey,pamphile,pamintuan,pamer,paluso,paleo,paker,pagett,paczkowski,ozburn,ovington,overmeyer,ouellet,osterlund,oslin,oseguera,osaki,orrock,ormsbee,orlikowski,organista,oregan,orebaugh,orabuena,openshaw,ontiveroz,ondo,omohundro,ollom,ollivierre,olivencia,oley,olazabal,okino,offenberger,oestmann,ocker,obar,oakeson,nuzum,nurre,nowinski,novosel,norquist,nordlie,noorani,nonnemacher,nolder,njoku,niznik,niwa,niss,ninneman,nimtz,niemczyk,nieder,nicolo,nichlos,niblack,newtown,newill,newcom,neverson,neuhart,neuenschwande,nestler,nenno,nejman,neiffer,neidlinger,neglia,nazarian,navor,nary,narayan,nangle,nakama,naish,naik,nadolski,muscato,murphrey,murdick,murchie,muratalla,munnis,mundwiller,muncey,munce,mullenbach,mulhearn,mulcahey,muhammed,muchow,mountford,moudry,mosko,morvay,morrical,morr,moros,mormann,morgen,moredock,morden,mordarski,moravek,morandi,mooradian,montejo,montegut,montan,monsanto,monford,moncus,molinas,molek,mohd,moehrle,moehring,modzeleski,modafferi,moala,moake,miyahira,mitani,mischel,minges,minella,mimes,milles,milbrett,milanes,mikolajczyk,mikami,meucci,metler,methven,metge,messmore,messerschmidt,mesrobian,meservey,merseal,menor,menon,menear,melott,melley,melfi,meinhart,megivern,megeath,meester,meeler,meegan,medoff,medler,meckley,meath,mearns,mcquigg,mcpadden,mclure,mckellips,mckeithen,mcglathery,mcginnes,mcghan,mcdonel,mccullom,mccraken,mccrackin,mcconathy,mccloe,mcclaughry,mcclaflin,mccarren,mccaig,mcaulay,mcaffee,mazzuca,maytubby,mayner,maymi,mattiello,matthis,matthees,matthai,mathiason,mastrogiovann,masteller,mashack,marucci,martorana,martiniz,marter,martellaro,marsteller,marris,marrara,maroni,marolda,marocco,maritn,maresh,maready,marchione,marbut,maranan,maragno,mapps,manrriquez,mannis,manni,mangina,manganelli,mancera,mamon,maloch,mallozzi,maller,majchrzak,majano,mainella,mahanna,maertens,madon,macumber,macioce,machuga,machlin,machala,mabra,lybbert,luvert,lutts,luttrull,lupez,lukehart,ludewig,luchsinger,lovecchio,louissaint,loughney,lostroh,lorton,lopeman,loparo,londo,lombera,lokietek,loiko,lohrenz,lohan,lofties,locklar,lockaby,lobianco,llano,livesey,litster,liske,linsky,linne,lindbeck,licudine,leyua,levie,leonelli,lenzo,lenze,lents,leitao,leidecker,leibold,lehne,legan,lefave,leehy,ledue,lecount,lecea,leadley,lazzara,lazcano,lazalde,lavi,lavancha,lavan,latu,latty,lato,larranaga,lapidus,lapenta,langridge,langeveld,langel,landowski,landgren,landfried,lamattina,lallier,lairmore,lahaie,lagazo,lagan,lafoe,lafluer,laflame,lafevers,lada,lacoss,lachney,labreck,labreche,labay,kwasnik,kuzyk,kutzner,kushnir,kusek,kurtzman,kurian,kulhanek,kuklinski,kueny,kuczynski,kubitz,kruschke,krous,krompel,kritz,krimple,kriese,krenzer,kreis,kratzke,krane,krage,kraebel,kozub,kozma,kouri,koudelka,kotcher,kotas,kostic,kosh,kosar,kopko,kopka,kooy,konigsberg,konarski,kolmer,kohlmeyer,kobbe,knoop,knoedler,knocke,knipple,knippenberg,knickrehm,kneisel,kluss,klossner,klipfel,klawiter,klasen,kittles,kissack,kirtland,kirschenmann,kirckof,kiphart,kinstler,kinion,kilton,killman,kiehl,kief,kett,kesling,keske,kerstein,kepple,keneipp,kempson,kempel,kehm,kehler,keeran,keedy,kebert,keast,kearbey,kawaguchi,kaupu,kauble,katzenbach,katcher,kartes,karpowicz,karpf,karban,kanzler,kanarek,kamper,kaman,kalsow,kalafut,kaeser,kaercher,kaeo,kaeding,jurewicz,julson,jozwick,jollie,johnigan,johll,jochum,jewkes,jestes,jeska,jereb,jaurez,jarecki,jansma,janosik,jandris,jamin,jahr,jacot,ivens,itson,isenhower,iovino,ionescu,ingrum,ingels,imrie,imlay,ihlenfeld,ihde,igou,ibach,huyett,huppe,hultberg,hullihen,hugi,hueso,huesman,hsiao,hronek,hovde,housewright,houlahan,hougham,houchen,hostler,hoster,hosang,hornik,hornes,horio,honyumptewa,honeyman,honer,hommerding,holsworth,hollobaugh,hollinshead,hollands,hollan,holecek,holdorf,hokes,hogston,hoesly,hodkinson,hodgman,hodgens,hochstedler,hochhauser,hobbie,hoare,hnat,hiskey,hirschy,hinostroza,hink,hing,hillmer,hillian,hillerman,hietala,hierro,hickling,hickingbottom,heye,heubusch,hesselschward,herriot,hernon,hermida,hermans,hentschel,henningson,henneke,henk,heninger,heltsley,helmle,helminiak,helmes,hellner,hellmuth,helke,heitmeyer,heird,heinle,heinicke,heinandez,heimsoth,heibel,hegyi,heggan,hefel,heeralall,hedrington,heacox,hazlegrove,hazelett,haymore,havenhill,hautala,hascall,harvie,hartrick,hartling,harrer,harles,hargenrader,hanshew,hanly,hankla,hanisch,hancox,hammann,hambelton,halseth,hallisey,halleck,hallas,haisley,hairr,hainey,hainer,hailstock,haertel,guzek,guyett,guster,gussler,gurwitz,gurka,gunsolus,guinane,guiden,gugliotti,guevin,guevarra,guerard,gudaitis,guadeloupe,gschwind,grupe,grumbach,gruenes,gruenberg,grom,grodski,groden,grizzel,gritten,griswald,grishaber,grinage,grimwood,grims,griffon,griffies,gribben,gressley,gren,greenstreet,grealish,gravett,grantz,granfield,granade,gowell,gossom,gorsky,goring,goodnow,goodfriend,goodemote,golob,gollnick,golladay,goldwyn,goldsboro,golds,goldrick,gohring,gohn,goettsch,goertzen,goelz,godinho,goans,glumac,gleisner,gleen,glassner,glanzer,gladue,gjelaj,givhan,girty,girone,girgenti,giorgianni,gilpatric,gillihan,gillet,gilbar,gierut,gierhart,gibert,gianotti,giannetto,giambanco,gharing,geurts,gettis,gettel,gest,germani,gerdis,gerbitz,geppert,gennings,gemmer,gelvin,gellert,gehler,geddings,gearon,geach,gazaille,gayheart,gauld,gaukel,gaudio,gathing,gasque,garstka,garsee,garringer,garofano,garo,garnsey,garigen,garcias,garbe,ganoung,ganfield,ganaway,gamero,galuska,galster,gallacher,galinski,galimi,galik,galeazzi,galdo,galdames,galas,galanis,gaglio,gaeddert,gadapee,fussner,furukawa,fuhs,fuerte,fuerstenberg,fryrear,froese,fringer,frieson,friesenhahn,frieler,friede,freymuth,freyman,freudenberg,freman,fredricksen,frech,frasch,frantum,frankin,franca,frago,fragnoli,fouquet,fossen,foskett,forner,formosa,formisano,fooks,fons,folino,flott,flesch,flener,flemmons,flanagin,flamino,flamand,fitzerald,findling,filsinger,fillyaw,fillinger,fiechter,ferre,ferdon,feldkamp,fazzio,favia,faulconer,faughnan,faubel,fassler,faso,farrey,farrare,farnworth,farland,fairrow,faille,faherty,fagnant,fabula,fabbri,eylicio,esteve,estala,espericueta,escajeda,equia,enrriquez,enomoto,enmon,engemann,emmerson,emmel,emler,elstad,ellwein,ellerson,eliott,eliassen,elchert,eisenbeis,eisel,eikenberry,eichholz,ehmer,edgerson,echenique,eberley,eans,dziuk,dykhouse,dworak,dutt,dupas,duntz,dunshee,dunovant,dunnaway,dummermuth,duerson,ducotey,duchon,duchesneau,ducci,dubord,duberry,dubach,drummonds,droege,drish,drexel,dresch,dresbach,drenner,drechsler,dowen,dotter,dosreis,doser,dorward,dorin,dorf,domeier,doler,doleman,dolbow,dolbin,dobrunz,dobransky,dobberstein,dlouhy,diosdado,dingmann,dimmer,dimarino,dimaria,dillenburg,dilaura,dieken,dickhaus,dibbles,dibben,diamante,dewilde,dewaard,devich,devenney,devaux,dettinger,desroberts,dershem,dersch,derita,derickson,depina,deorio,deoliveira,denzler,dentremont,denoble,demshar,demond,demint,demichele,demel,delzer,delval,delorbe,delli,delbridge,delanoy,delancy,delahoya,dekle,deitrick,deis,dehnert,degrate,defrance,deetz,deeg,decoster,decena,dearment,daughety,datt,darrough,danzer,danielovich,dandurand,dancause,dalo,dalgleish,daisley,dadlani,daddona,daddio,dacpano,cyprian,cutillo,curz,curvin,cuna,cumber,cullom,cudworth,cubas,crysler,cryderman,crummey,crumbly,crookshanks,croes,criscione,crespi,cresci,creaser,craton,cowin,cowdrey,coutcher,cotterman,cosselman,cosgriff,cortner,corsini,corporan,corniel,cornick,cordts,copening,connick,conlisk,conelli,comito,colten,colletta,coldivar,colclasure,colantuono,colaizzi,coggeshall,cockman,cockfield,cobourn,cobo,cobarrubias,clyatt,cloney,clonch,climes,cleckner,clearo,claybourne,clavin,claridge,claffey,ciufo,cisnero,cipollone,cieslik,ciejka,cichocki,cicchetti,cianflone,chrusciel,christesen,chmielowiec,chirino,chillis,chhoun,chevas,chehab,chaviano,chavaria,chasten,charbonnet,chanley,champoux,champa,chalifoux,cerio,cedotal,cech,cavett,cavendish,catoire,castronovo,castellucci,castellow,castaner,casso,cassels,cassatt,cassar,cashon,cartright,carros,carrisalez,carrig,carrejo,carnicelli,carnett,carlise,carhart,cardova,cardell,carchi,caram,caquias,capper,capizzi,capano,cannedy,campese,calvello,callon,callins,callies,callicutt,calix,calin,califf,calderaro,caldeira,cadriel,cadmus,cadman,caccamise,buttermore,butay,bustamente,busa,burmester,burkard,burhans,burgert,bure,burdin,bullman,bulin,buelna,buehner,budin,buco,buckhanon,bryars,brutger,brus,brumitt,brum,bruer,brucato,broyhill,broy,brownrigg,brossart,brookings,broden,brocklehurst,brockert,bristo,briskey,bringle,bries,bressman,branyan,brands,bramson,brammell,brallier,bozich,boysel,bowthorpe,bowron,bowin,boutilier,boulos,boullion,boughter,bottiglieri,borruso,borreggine,borns,borkoski,borghese,borenstein,boran,booton,bonvillain,bonini,bonello,bolls,boitnott,boike,bohnet,bohnenkamp,bohmer,boeson,boeneke,bodey,bocchino,bobrowski,bobic,bluestein,bloomingdale,blogg,blewitt,blenman,bleck,blaszak,blankenbeckle,blando,blanchfield,blancato,blalack,blakenship,blackett,bisping,birkner,birckhead,bingle,bineau,billiel,bigness,bies,bierer,bhalla,beyerlein,betesh,besler,berzins,bertalan,berntsen,bergo,berganza,bennis,benney,benkert,benjamen,benincasa,bengochia,bendle,bendana,benchoff,benbrook,belsito,belshaw,belinsky,belak,beigert,beidleman,behen,befus,beel,bedonie,beckstrand,beckerle,beato,bauguess,baughan,bauerle,battis,batis,bastone,bassetti,bashor,bary,bartunek,bartoletti,barro,barno,barnicle,barlage,barkus,barkdull,barcellos,barbarino,baranski,baranick,bankert,banchero,bambrick,bamberg,bambenek,balthrop,balmaceda,ballman,balistrieri,balcomb,balboni,balbi,bagner,bagent,badasci,bacot,bache,babione,babic,babers,babbs,avitabile,avers,avena,avance,ausley,auker,audas,aubut,athearn,atcheson,astorino,asplund,aslanian,askari,ashmead,asby,asai,arterbury,artalejo,arqueta,arquero,arostegui,arnell,armeli,arista,arender,arca,arballo,aprea,applen,applegarth,apfel,antonello,antolin,antkowiak,angis,angione,angerman,angelilli,andujo,andrick,anderberg,amigon,amalfitano,alviso,alvez,altice,altes,almarez,allton,allston,allgeyer,allegretti,aliaga,algood,alberg,albarez,albaladejo,akre,aitkin,ahles,ahlberg,agnello,adinolfi,adamis,abramek,abolt,abitong,zurawski,zufall,zubke,zizzo,zipperer,zinner,zinda,ziller,zill,zevallos,zesati,zenzen,zentner,zellmann,zelinsky,zboral,zarcone,zapalac,zaldana,zakes,zaker,zahniser,zacherl,zabawa,zabaneh,youree,younis,yorty,yonce,yero,yerkey,yeck,yeargan,yauch,yashinski,yambo,wrinn,wrightsman,worton,wortley,worland,woolworth,woolfrey,woodhead,woltjer,wolfenden,wolden,wolchesky,wojick,woessner,witters,witchard,wissler,wisnieski,wisinski,winnike,winkowski,winkels,wingenter,wineman,winegardner,wilridge,wilmont,willians,williamsen,wilhide,wilhelmsen,wilhelmi,wildrick,wilden,wiland,wiker,wigglesworth,wiebusch,widdowson,wiant,wiacek,whittet,whitelock,whiteis,whiley,westrope,westpfahl,westin,wessman,wessinger,wesemann,wesby,wertheimer,weppler,wenke,wengler,wender,welp,weitzner,weissberg,weisenborn,weipert,weiman,weidmann,wehrsig,wehrenberg,weemes,weeman,wayner,waston,wasicek,wascom,wasco,warmath,warbritton,waltner,wallenstein,waldoch,waldal,wala,waide,wadlinger,wadhams,vullo,voorheis,vonbargen,volner,vollstedt,vollman,vold,voge,vittorio,violett,viney,vinciguerra,vinal,villata,villarrvel,vilanova,vigneault,vielma,veyna,vessella,versteegh,verderber,venier,venditti,velotta,vejarano,vecchia,vecchi,vastine,vasguez,varella,vanry,vannah,vanhyning,vanhuss,vanhoff,vanhoesen,vandivort,vandevender,vanderlip,vanderkooi,vandebrink,vancott,vallien,vallas,vallandingham,valiquette,valasek,vahey,vagott,uyematsu,urbani,uran,umbach,tyon,tyma,twyford,twombley,twohig,tutterrow,turnes,turkington,turchi,tunks,tumey,tumbaga,tuinstra,tsukamoto,tschetter,trussel,trubey,trovillion,troth,trostel,tron,trinka,trine,triarsi,treto,trautz,tragesser,tooman,toolson,tonozzi,tomkiewicz,tomasso,tolin,tolfree,toelle,tisor,tiry,tinstman,timmermann,tickner,tiburcio,thunberg,thronton,thompsom,theil,thayne,thaggard,teschner,tensley,tenery,tellman,tellado,telep,teigen,teator,teall,tayag,tavis,tattersall,tassoni,tarshis,tappin,tappe,tansley,talone,talford,tainter,taha,taguchi,tacheny,tabak,szymczyk,szwaja,szopinski,syvertsen,swogger,switcher,swist,swierczek,swiech,swickard,swiatek,swezey,swepson,sweezy,swaringen,swanagan,swailes,swade,sveum,svenningsen,svec,suttie,supry,sunga,summerhill,summars,sulit,stys,stutesman,stupak,stumpo,stuller,stuekerjuerge,stuckett,stuckel,stuchlik,stuard,strutton,strop,stromski,stroebel,strehlow,strause,strano,straney,stoyle,stormo,stopyra,stoots,stonis,stoltenburg,stoiber,stoessel,stitzer,stien,stichter,stezzi,stewert,stepler,steinkraus,stegemann,steeples,steenburg,steeley,staszak,stasko,starkson,stanwick,stanke,stanifer,stangel,stai,squiers,spraglin,spragins,spraberry,spoelstra,spisak,spirko,spille,spidel,speyer,speroni,spenst,spartz,sparlin,sparacio,spaman,spainhower,souers,souchet,sosbee,sorn,sorice,sorbo,soqui,solon,soehl,sodergren,sobie,smucker,smsith,smoley,smolensky,smolenski,smolder,smethers,slusar,slowey,slonski,slemmons,slatkin,slates,slaney,slagter,slacum,skutnik,skrzypek,skibbe,sjostrom,sjoquist,sivret,sitko,sisca,sinnett,sineath,simoni,simar,simao,silvestro,silleman,silha,silfies,silberhorn,silacci,sigrist,sieczkowski,sieczka,shure,shulz,shugrue,shrode,shovlin,shortell,shonka,shiyou,shiraishi,shiplett,sheu,shermer,sherick,sheeks,shantz,shakir,shaheed,shadoan,shadid,shackford,shabot,seung,seufert,setty,setters,servis,serres,serrell,serpas,sensenig,senft,semenec,semas,semaan,selvera,sellmeyer,segar,seever,seeney,seeliger,seehafer,seebach,sebben,seaward,seary,searl,searby,scordino,scolieri,scolaro,schwiebert,schwartze,schwaner,schuur,schupbach,schumacker,schum,schudel,schubbe,schroader,schramel,schollmeyer,schoenherr,schoeffler,schoeder,schnurr,schnorr,schneeman,schnake,schnaible,schmaus,schlotter,schinke,schimming,schimek,schikora,scheulen,scherping,schermer,scherb,schember,schellhase,schedler,schanck,schaffhauser,schaffert,schadler,scarola,scarfo,scarff,scantling,scaff,sayward,sayas,saxbury,savel,savastano,sault,satre,sarkar,santellan,sandmeier,sampica,salvesen,saltis,salloum,salling,salce,salatino,salata,salamy,sadowsky,sadlier,sabbatini,sabatelli,sabal,sabados,rydzewski,rybka,rybczyk,rusconi,rupright,rufino,ruffalo,rudiger,rudig,ruda,rubyor,royea,roxberry,rouzer,roumeliotis,rossmann,rosko,rosene,rosenbluth,roseland,rosasco,rosano,rosal,rorabaugh,romie,romaro,rolstad,rollow,rohrich,roghair,rogala,roets,roen,roemmich,roelfs,roeker,roedl,roedel,rodeheaver,roddenberry,rockstad,rocchi,robirds,robben,robasciotti,robaina,rizzotto,rizzio,ritcher,rissman,riseden,ripa,rion,rintharamy,rinehimer,rinck,riling,rietschlin,riesenberg,riemenschneid,rieland,rickenbaugh,rickenbach,rhody,revells,reutter,respress,resnik,remmel,reitmeyer,reitan,reister,reinstein,reino,reinkemeyer,reifschneider,reierson,reichle,rehmeier,rehl,reeds,rede,recar,rebeiro,raybourn,rawl,rautio,raugust,raudenbush,raudales,rattan,rapuano,rapoport,rantanen,ransbottom,raner,ramkissoon,rambousek,raio,rainford,radakovich,rabenhorst,quivers,quispe,quinoes,quilici,quattrone,quates,quance,quale,purswell,purpora,pulera,pulcher,puckhaber,pryer,pruyne,pruit,prudencio,prows,protzman,prothero,prosperi,prospal,privott,pritchet,priem,prest,prell,preer,pree,preddy,preda,pravata,pradhan,potocki,postier,postema,posadas,poremba,popichak,ponti,pomrenke,pomarico,pollok,polkinghorn,polino,pock,plater,plagman,pipher,pinzone,pinkleton,pillette,pillers,pilapil,pignone,pignatelli,piersol,piepho,picton,pickrel,pichard,picchi,piatek,pharo,phanthanouvon,pettingill,pettinato,petrovits,pethtel,petersheim,pershing,perrez,perra,pergram,peretz,perego,perches,pennello,pennella,pendry,penaz,pellish,pecanty,peare,paysour,pavlovich,pavick,pavelko,paustian,patzer,patete,patadia,paszkiewicz,pase,pasculli,pascascio,parrotte,parajon,paparo,papandrea,paone,pantaleon,panning,paniccia,panarello,palmeter,pallan,palardy,pahmeier,padget,padel,oxborrow,oveson,outwater,ottaway,otake,ostermeyer,osmer,osinski,osiecki,oroak,orndoff,orms,orkin,ordiway,opatz,onsurez,onishi,oliger,okubo,okoye,ohlmann,offord,offner,offerdahl,oesterle,oesch,odonnel,odeh,odebralski,obie,obermeier,oberhausen,obenshain,obenchain,nute,nulty,norrington,norlin,nore,nordling,nordhoff,norder,nordan,norals,nogales,noboa,nitsche,niermann,nienhaus,niedringhaus,niedbalski,nicolella,nicolais,nickleberry,nicewander,newfield,neurohr,neumeier,netterville,nersesian,nern,nerio,nerby,nerbonne,neitz,neidecker,neason,nead,navratil,naves,nastase,nasir,nasca,narine,narimatsu,nard,narayanan,nappo,namm,nalbone,nakonechny,nabarro,myott,muthler,muscatello,murriel,murin,muoio,mundel,munafo,mukherjee,muffoletto,muessig,muckey,mucher,mruk,moyd,mowell,mowatt,moutray,motzer,moster,morgenroth,morga,morataya,montross,montezuma,monterroza,montemarano,montello,montbriand,montavon,montaque,monigold,monforte,molgard,moleski,mohsin,mohead,mofield,moerbe,moeder,mochizuki,miyazaki,miyasaki,mital,miskin,mischler,minniear,minero,milosevic,mildenhall,mielsch,midden,michonski,michniak,michitsch,michelotti,micheli,michelfelder,michand,metelus,merkt,merando,meranda,mentz,meneley,menaker,melino,mehaffy,meehl,meech,meczywor,mcweeney,mcumber,mcredmond,mcneer,mcnay,mcmikle,mcmaken,mclaurine,mclauglin,mclaney,mckune,mckinnies,mckague,mchattie,mcgrapth,mcglothen,mcgath,mcfolley,mcdannell,mccurty,mccort,mcclymonds,mcclimon,mcclamy,mccaughan,mccartan,mccan,mccadden,mcburnie,mcburnett,mcbryar,mcannally,mcalevy,mcaleese,maytorena,mayrant,mayland,mayeaux,mauter,matthewson,mathiew,matern,matera,maslow,mashore,masaki,maruco,martorell,martenez,marrujo,marrison,maroun,markway,markos,markoff,markman,marello,marbry,marban,maphis,manuele,mansel,manganello,mandrell,mandoza,manard,manago,maltba,mallick,mallak,maline,malikowski,majure,majcher,maise,mahl,maffit,maffeo,madueno,madlem,madariaga,macvane,mackler,macconnell,macchi,maccarone,lyng,lynchard,lunning,luneau,lunden,lumbra,lumbert,lueth,ludington,luckado,lucchini,lucatero,luallen,lozeau,lowen,lovera,lovelock,louck,lothian,lorio,lorimer,lorge,loretto,longhenry,lonas,loiseau,lohrman,logel,lockie,llerena,livington,liuzzi,liscomb,lippeatt,liou,linhardt,lindelof,lindbo,limehouse,limage,lillo,lilburn,liggons,lidster,liddick,lich,liberato,leysath,lewelling,lesney,leser,lescano,leonette,lentsch,lenius,lemmo,lemming,lemcke,leggette,legerski,legard,leever,leete,ledin,lecomte,lecocq,leakes,leab,lazarz,layous,lawrey,lawery,lauze,lautz,laughinghouse,latulippe,lattus,lattanzio,lascano,larmer,laris,larcher,laprise,lapin,lapage,lano,langseth,langman,langland,landstrom,landsberg,landsaw,landram,lamphier,lamendola,lamberty,lakhani,lajara,lagrow,lagman,ladewig,laderman,ladden,lacrue,laclaire,lachut,lachner,kwit,kvamme,kvam,kutscher,kushi,kurgan,kunsch,kundert,kulju,kukene,kudo,kubin,kubes,kuberski,krystofiak,kruppa,krul,krukowski,kruegel,kronemeyer,krock,kriston,kretzer,krenn,kralik,krafft,krabill,kozisek,koverman,kovatch,kovarik,kotlowski,kosmala,kosky,kosir,kosa,korpi,kornbluth,koppen,kooistra,kohlhepp,kofahl,koeneman,koebel,koczur,kobrin,kobashigawa,koba,knuteson,knoff,knoble,knipper,knierim,kneisley,klusman,kloc,klitzing,klinko,klinefelter,klemetson,kleinpeter,klauser,klatte,klaren,klare,kissam,kirkhart,kirchmeier,kinzinger,kindt,kincy,kincey,kimoto,killingworth,kilcullen,kilbury,kietzman,kienle,kiedrowski,kidane,khamo,khalili,ketterling,ketchem,kessenich,kessell,kepp,kenon,kenning,kennady,kendzior,kemppainen,kellermann,keirns,keilen,keiffer,kehew,keelan,keawe,keator,kealy,keady,kathman,kastler,kastanes,kassab,karpin,karau,karathanasis,kaps,kaplun,kapaun,kannenberg,kanipe,kander,kandel,kanas,kanan,kamke,kaltenbach,kallenberger,kallam,kafton,kafer,kabler,kaaihue,jundt,jovanovich,jojola,johnstad,jodon,joachin,jinright,jessick,jeronimo,jenne,jelsma,jeannotte,jeangilles,jaworsky,jaubert,jarry,jarrette,jarreau,jarett,janos,janecka,janczak,jalomo,jagoda,jagla,jacquier,jaber,iwata,ivanoff,isola,iserman,isais,isaacks,inverso,infinger,ibsen,hyser,hylan,hybarger,hwee,hutchenson,hutchcroft,husar,hurlebaus,hunsley,humberson,hulst,hulon,huhtala,hugill,hugghins,huffmaster,huckeba,hrabovsky,howden,hoverson,houts,houskeeper,housh,hosten,horras,horchler,hopke,hooke,honie,holtsoi,holsomback,holoway,holmstead,hoistion,hohnstein,hoheisel,hoguet,hoggle,hogenson,hoffstetter,hoffler,hofe,hoefling,hoague,hizer,hirschfield,hironaka,hiraldo,hinote,hingston,hinaman,hillie,hillesheim,hilderman,hiestand,heyser,heys,hews,hertler,herrandez,heppe,henle,henkensiefken,henigan,henandez,henagan,hemberger,heman,helser,helmich,hellinger,helfrick,heldenbrand,heinonen,heineck,heikes,heidkamp,heglar,heffren,heelan,hedgebeth,heckmann,heckaman,hechmer,hazelhurst,hawken,haverkamp,havatone,hausauer,hasch,harwick,hartse,harrower,harle,hargroder,hardway,hardinger,hardemon,harbeck,hant,hamre,hamberg,hallback,haisten,hailstone,hahl,hagner,hagman,hagemeyer,haeussler,hackwell,haby,haataja,gverrero,gustovich,gustave,guske,gushee,gurski,gurnett,gura,gunto,gunselman,gugler,gudmundson,gudinas,guarneri,grumbine,gruis,grotz,grosskopf,grosman,grosbier,grinter,grilley,grieger,grewal,gressler,greaser,graus,grasman,graser,grannan,granath,gramer,graboski,goyne,gowler,gottwald,gottesman,goshay,gorr,gorovitz,gores,goossens,goodier,goodhue,gonzeles,gonzalos,gonnella,golomb,golick,golembiewski,goeke,godzik,goar,glosser,glendenning,glendening,glatter,glas,gittings,gitter,gisin,giscombe,gimlin,gillitzer,gillick,gilliand,gilb,gigler,gidden,gibeau,gibble,gianunzio,giannattasio,gertelman,gerosa,gerold,gerland,gerig,gerecke,gerbino,genz,genovesi,genet,gelrud,geitgey,geiszler,gehrlein,gawrys,gavilanes,gaulden,garthwaite,garmoe,gargis,gara,gannett,galligher,galler,galleher,gallahan,galford,gahn,gacek,gabert,fuster,furuya,furse,fujihara,fuhriman,frueh,fromme,froemming,friskney,frietas,freiler,freelove,freber,frear,frankl,frankenfield,franey,francke,foxworthy,formella,foringer,forgue,fonnesbeck,fonceca,folland,fodera,fode,floresca,fleurent,fleshner,flentge,fleischhacker,fleeger,flecher,flam,flaim,fivecoat,firebaugh,fioretti,finucane,filley,figuroa,figuerda,fiddelke,feurtado,fetterly,fessel,femia,feild,fehling,fegett,fedde,fechter,fawver,faulhaber,fatchett,fassnacht,fashaw,fasel,farrugia,farran,farness,farhart,fama,falwell,falvo,falkenstein,falin,failor,faigin,fagundo,fague,fagnan,fagerstrom,faden,eytchison,eyles,everage,evangelist,estrin,estorga,esponda,espindola,escher,esche,escarsega,escandon,erven,erding,eplin,enix,englade,engdahl,enck,emmette,embery,emberson,eltzroth,elsayed,ellerby,ellens,elhard,elfers,elazegui,eisermann,eilertson,eiben,ehrhard,ehresman,egolf,egnew,eggins,efron,effland,edminster,edgeston,eckstrom,eckhard,eckford,echoles,ebsen,eatherly,eastlick,earnheart,dykhuizen,dyas,duttweiler,dutka,dusenbury,dusenbery,durre,durnil,durnell,durie,durhan,durando,dupriest,dunsmoor,dunseith,dunnum,dunman,dunlevy,duma,dulude,dulong,duignan,dugar,dufek,ducos,duchaine,duch,dubow,drowne,dross,drollinger,droke,driggars,drawhorn,drach,drabek,doyne,doukas,dorvil,dorow,doroski,dornak,dormer,donnelson,donivan,dondero,dompe,dolle,doakes,diza,divirgilio,ditore,distel,disimone,disbro,dipiero,dingson,diluzio,dillehay,digiorgio,diflorio,dietzler,dietsch,dieterle,dierolf,dierker,dicostanzo,dicesare,dexheimer,dewitte,dewing,devoti,devincentis,devary,deutschman,dettloff,detienne,destasio,dest,despard,desmet,deslatte,desfosses,derise,derenzo,deppner,depolo,denoyer,denoon,denno,denne,deniston,denike,denes,demoya,demick,demicco,demetriou,demange,delva,delorge,delley,delisio,delhoyo,delgrande,delgatto,delcour,delair,deinert,degruy,degrave,degeyter,defino,deffenbaugh,deener,decook,decant,deboe,deblanc,deatley,dearmitt,deale,deaguiar,dayan,daus,dauberman,datz,dase,dary,dartt,darocha,dari,danowski,dancel,dami,dallmann,dalere,dalba,dakan,daise,dailing,dahan,dagnan,daggs,dagan,czarkowski,czaplinski,cutten,curtice,curenton,curboy,cura,culliton,culberth,cucchiara,cubbison,csaszar,crytser,crotzer,crossgrove,crosser,croshaw,crocco,critzer,creveling,cressy,creps,creese,cratic,craigo,craigen,craib,cracchiolo,crable,coykendall,cowick,coville,couzens,coutch,cousens,cousain,counselman,coult,cotterell,cott,cotham,corsaut,corriere,corredor,cornet,corkum,coreas,cordoza,corbet,corathers,conwill,contreas,consuegra,constanza,conolly,conedy,comins,combee,colosi,colom,colmenares,collymore,colleran,colina,colaw,colatruglio,colantro,colantonio,cohea,cogill,codner,codding,cockram,cocanougher,cobine,cluckey,clucas,cloward,cloke,clisham,clinebell,cliffe,clendenen,cisowski,cirelli,ciraolo,ciocca,cintora,ciesco,cibrian,chupka,chugg,christmann,choma,chiverton,chirinos,chinen,chimenti,chima,cheuvront,chesla,chesher,chesebro,chern,chehebar,cheatum,chastine,chapnick,chapelle,chambley,cercy,celius,celano,cayea,cavicchi,cattell,catanach,catacutan,castelluccio,castellani,cassmeyer,cassetta,cassada,caspi,cashmore,casebier,casanas,carrothers,carrizal,carriveau,carretero,carradine,carosella,carnine,carloni,carkhuff,cardosi,cardo,carchidi,caravello,caranza,carandang,cantrall,canpos,canoy,cannizzaro,canion,canida,canham,cangemi,cange,cancelliere,canard,camarda,calverley,calogero,callendar,calame,cadrette,cachero,caccavale,cabreros,cabrero,cabrara,cabler,butzer,butte,butrick,butala,bustios,busser,busic,bushorn,busher,burmaster,burkland,burkins,burkert,burgueno,burgraff,burel,burck,burby,bumford,bulock,bujnowski,buggie,budine,bucciero,bubier,brzoska,brydges,brumlow,brosseau,brooksher,brokke,broeker,brittin,bristle,briano,briand,brettschneide,bresnan,brentson,brenneis,brender,brazle,brassil,brasington,branstrom,branon,branker,brandwein,brandau,bralley,brailey,brague,brade,bozzi,bownds,bowmer,bournes,bour,bouchey,botto,boteler,borroel,borra,boroski,boothroyd,boord,bonga,bonato,bonadonna,bolejack,boldman,boiser,boggio,bogacki,boerboom,boehnlein,boehle,bodah,bobst,boak,bluemel,blockmon,blitch,blincoe,bleier,blaydes,blasius,bittel,binsfeld,bindel,bilotti,billiott,bilbrew,bihm,biersner,bielat,bidrowski,bickler,biasi,bhola,bhat,bewick,betzen,bettridge,betti,betsch,besley,beshero,besa,bertoli,berstein,berrien,berrie,berrell,bermel,berenguer,benzer,bensing,benedix,bemo,belile,beilman,behunin,behrmann,bedient,becht,beaule,beaudreault,bealle,beagley,bayuk,bayot,bayliff,baugess,battistoni,batrum,basinski,basgall,bartolomei,bartnik,bartl,bartko,bartholomay,barthlow,bartgis,barsness,barski,barlette,barickman,bargen,bardon,barcliff,barbu,barakat,baracani,baraban,banos,banko,bambach,balok,balogun,bally,baldini,balck,balcer,balash,baim,bailor,bahm,bahar,bagshaw,baggerly,badie,badal,backues,babino,aydelott,awbrey,aversano,avansino,auyon,aukamp,aujla,augenstein,astacio,asplin,asato,asano,aruizu,artale,arrick,arneecher,armelin,armbrester,armacost,arkell,argrave,areizaga,apolo,anzures,anzualda,antwi,antillon,antenor,annand,anhalt,angove,anglemyer,anglada,angiano,angeloni,andaya,ancrum,anagnos,ammirati,amescua,ambrosius,amacker,amacher,amabile,alvizo,alvernaz,alvara,altobelli,altobell,althauser,alterman,altavilla,alsip,almeyda,almeter,alman,allscheid,allaman,aliotta,aliberti,alghamdi,albiston,alberding,alarie,alano,ailes,ahsan,ahrenstorff,ahler,aerni,ackland,achor,acero,acebo,abshier,abruzzo,abrom,abood,abnet,abend,abegg,abbruzzese,aaberg,zysk,zutell,zumstein,zummo,zuhlke,zuehlsdorff,zuch,zucconi,zortman,zohn,zingone,zingg,zingale,zima,zientek,zieg,zervas,zerger,zenk,zeldin,zeiss,zeiders,zediker,zavodny,zarazua,zappone,zappala,zapanta,zaniboni,zanchi,zampedri,zaller,zakrajsek,zagar,zadrozny,zablocki,zable,yust,yunk,youngkin,yosten,yockers,yochim,yerke,yerena,yanos,wysinger,wyner,wrisley,woznicki,wortz,worsell,wooters,woon,woolcock,woodke,wonnacott,wolnik,wittstock,witting,witry,witfield,witcraft,wissmann,wissink,wisehart,wiscount,wironen,wipf,winterrowd,wingett,windon,windish,windisch,windes,wiltbank,willmarth,wiler,wieseler,wiedmaier,wiederstein,wiedenheft,wieberg,wickware,wickkiser,wickell,whittmore,whitker,whitegoat,whitcraft,whisonant,whisby,whetsell,whedon,westry,westcoat,wernimont,wentling,wendlandt,wencl,weisgarber,weininger,weikle,weigold,weigl,weichbrodt,wehrli,wehe,weege,weare,watland,wassmann,warzecha,warrix,warrell,warnack,waples,wantland,wanger,wandrei,wanat,wampole,waltjen,walterscheid,waligora,walding,waldie,walczyk,wakins,waitman,wair,wainio,wahpekeche,wahlman,wagley,wagenknecht,wadle,waddoups,wadding,vuono,vuillemot,vugteveen,vosmus,vorkink,vories,vondra,voelz,vlashi,vitelli,vitali,viscarra,vinet,vimont,villega,villard,vignola,viereck,videtto,vicoy,vessell,vescovi,verros,vernier,vernaglia,vergin,verdone,verdier,verastequi,vejar,vasile,vasi,varnadore,vardaro,vanzanten,vansumeren,vanschuyver,vanleeuwen,vanhowe,vanhoozer,vaness,vandewalker,vandevoorde,vandeveer,vanderzwaag,vanderweide,vanderhyde,vandellen,vanamburg,vanalst,vallin,valk,valentini,valcarcel,valasco,valadao,vacher,urquijo,unterreiner,unsicker,unser,unrau,undercoffler,uffelman,uemura,ueda,tyszko,tyska,tymon,tyce,tyacke,twinam,tutas,tussing,turmel,turkowski,turkel,turchetta,tupick,tukes,tufte,tufo,tuey,tuell,tuckerman,tsutsumi,tsuchiya,trossbach,trivitt,trippi,trippensee,trimbach,trillo,triller,trible,tribby,trevisan,tresch,tramonte,traff,trad,tousey,totaro,torregrosa,torralba,tolly,tofil,tofani,tobiassen,tiogangco,tino,tinnes,tingstrom,tingen,tindol,tifft,tiffee,tiet,thuesen,thruston,throndson,thornsbury,thornes,thiery,thielman,thie,theilen,thede,thate,thane,thalacker,thaden,teuscher,terracina,terell,terada,tepfer,tenneson,temores,temkin,telleria,teaque,tealer,teachey,tavakoli,tauras,taucher,tartaglino,tarpy,tannery,tani,tams,tamlin,tambe,tallis,talamante,takayama,takaki,taibl,taffe,tadesse,tade,tabeling,tabag,szoke,szoc,szala,szady,sysak,sylver,syler,swonger,swiggett,swensson,sweis,sweers,sweene,sweany,sweaney,swartwout,swamy,swales,susman,surman,sundblad,summerset,summerhays,sumerall,sule,sugimoto,subramanian,sturch,stupp,stunkard,stumpp,struiksma,stropes,stromyer,stromquist,strede,strazza,strauf,storniolo,storjohann,stonum,stonier,stonecypher,stoneberger,stollar,stokke,stokan,stoetzel,stoeckel,stockner,stockinger,stockert,stockdill,stobbe,stitzel,stitely,stirgus,stigers,stettner,stettler,sterlin,sterbenz,stemp,stelluti,steinmeyer,steininger,steinauer,steigerwalt,steider,stavrou,staufenberger,stassi,stankus,stanaway,stammer,stakem,staino,stahlnecker,stagnitta,staelens,staal,srsen,sprott,sprigg,sprenkle,sprenkel,spreitzer,spraque,sprandel,sporn,spivak,spira,spiewak,spieth,spiering,sperow,speh,specking,spease,spead,sparger,spanier,spall,sower,southcott,sosna,soran,sookram,sonders,solak,sohr,sohl,sofranko,soderling,sochor,sobon,smutz,smudrick,smithj,smid,slosser,sliker,slenker,sleger,slaby,skousen,skilling,skibinski,skees,skane,skafidas,sivic,sivertsen,sivers,sitra,sito,siracusa,sinicki,simpers,simley,simbeck,silberberg,siever,siegwarth,sidman,siddle,sibbett,shumard,shubrooks,shough,shorb,shoptaw,sholty,shoffstall,shiverdecker,shininger,shimasaki,shifrin,shiffler,sheston,sherr,shere,shepeard,shelquist,sheler,shauf,sharrar,sharpnack,shamsiddeen,shambley,shallenberger,shadler,shaban,sferra,seys,sexauer,sevey,severo,setlak,seta,sesko,sersen,serratore,serdula,senechal,seldomridge,seilhamer,seifer,seidlitz,sehnert,sedam,sebron,seber,sebek,seavers,scullark,scroger,scovill,sciascia,sciarra,schweers,schwarze,schummer,schultes,schuchardt,schuchard,schrieber,schrenk,schreifels,schowalter,schoultz,scholer,schofill,schoff,schnuerer,schnettler,schmitke,schmiege,schloop,schlinger,schlessman,schlesser,schlageter,schiess,schiefer,schiavoni,scherzer,scherich,schechtman,schebel,scharpman,schaich,schaap,scappaticci,scadlock,savocchia,savini,savers,savageau,sauvage,sause,sauerwein,sary,sarwary,sarnicola,santone,santoli,santalucia,santacruce,sansoucie,sankoff,sanes,sandri,sanderman,sammartano,salmonson,salmela,salmans,sallaz,salis,sakuma,sakowski,sajdak,sahm,sagredo,safrit,sackey,sabio,sabino,rybolt,ruzzo,ruthstrom,ruta,russin,russak,rusko,ruskin,rusiecki,ruscher,rupar,rumberger,rullan,ruliffson,ruhlman,rufenacht,ruelle,rudisell,rudi,rucci,rublee,ruberto,rubeck,rowett,rottinghaus,roton,rothgeb,rothgaber,rothermich,rostek,rossini,roskelley,rosing,rosi,rosewell,rosberg,roon,ronin,romesburg,romelus,rolley,rollerson,rollefson,rolins,rolens,rois,rohrig,rohrbacher,rohland,rohen,rogness,roes,roering,roehrick,roebke,rodregez,rodabaugh,rockingham,roblee,robel,roadcap,rizzolo,riviezzo,rivest,riveron,risto,rissler,rippentrop,ripka,rinn,ringuette,ringering,rindone,rindels,rieffer,riedman,riede,riecke,riebow,riddlebarger,rhome,rhodd,rhatigan,rhame,reyers,rewitzer,revalee,retzer,rettinger,reschke,requa,reper,reopell,renzelman,renne,renker,renk,renicker,rendina,rendel,remund,remmele,remiasz,remaklus,remak,reitsma,reitmeier,reiswig,reishus,reining,reim,reidinger,reick,reiche,regans,reffett,reesor,reekie,redpath,redditt,rechtzigel,recht,rearden,raynoso,raxter,ratkowski,rasulo,rassmussen,rassel,raser,rappleye,rappe,randrup,randleman,ramson,rampey,radziewicz,quirarte,quintyne,quickel,quattrini,quakenbush,quaile,pytel,pushaw,pusch,purslow,punzo,pullam,pugmire,puello,przekop,pruss,pruiett,provow,prophete,procaccini,pritz,prillaman,priess,pretlow,prestia,presha,prescod,preast,praytor,prashad,praino,pozzi,pottenger,potash,porada,popplewell,ponzo,ponter,pommier,polland,polidori,polasky,pola,poisso,poire,pofahl,podolsky,podell,plueger,plowe,plotz,plotnik,ploch,pliska,plessner,plaut,platzer,plake,pizzino,pirog,piquette,pipho,pioche,pintos,pinkert,pinet,pilkerton,pilch,pilarz,pignataro,piermatteo,picozzi,pickler,pickette,pichler,philogene,phare,phang,pfrogner,pfisterer,pettinelli,petruzzi,petrovic,petretti,petermeier,pestone,pesterfield,pessin,pesch,persky,perruzza,perrott,perritt,perretti,perrera,peroutka,peroni,peron,peret,perdew,perazzo,peppe,peno,penberthy,penagos,peles,pelech,peiper,peight,pefferman,peddie,peckenpaugh,pean,payen,pavloski,pavlica,paullin,patteson,passon,passey,passalacqua,pasquini,paskel,partch,parriott,parrella,parraz,parmely,parizo,papelian,papasergi,pantojz,panto,panich,panchal,palys,pallone,palinski,pali,palevic,pagels,paciorek,pacho,pacella,paar,ozbun,overweg,overholser,ovalles,outcalt,otterbein,otta,ostergren,osher,osbon,orzech,orwick,orrico,oropesa,ormes,orillion,onorati,onnen,omary,olding,okonski,okimoto,ohlrich,ohayon,oguin,ogley,oftedahl,offen,ofallon,oeltjen,odam,ockmond,ockimey,obermeyer,oberdorf,obanner,oballe,oard,oakden,nyhan,nydam,numan,noyer,notte,nothstein,notestine,noser,nork,nolde,nishihara,nishi,nikolic,nihart,nietupski,niesen,niehus,nidiffer,nicoulin,nicolaysen,nicklow,nickl,nickeson,nichter,nicholl,ngyun,newsham,newmann,neveux,neuzil,neumayer,netland,nessen,nesheim,nelli,nelke,necochea,nazari,navorro,navarez,navan,natter,natt,nater,nasta,narvaiz,nardelli,napp,nakahara,nairn,nagg,nager,nagano,nafziger,naffziger,nadelson,muzzillo,murri,murrey,murgia,murcia,muno,munier,mulqueen,mulliniks,mulkins,mulik,muhs,muffley,moynahan,mounger,mottley,motil,moseman,moseby,mosakowski,mortell,morrisroe,morrero,mormino,morland,morger,morgenthaler,moren,morelle,morawski,morasca,morang,morand,moog,montney,montera,montee,montane,montagne,mons,monohan,monnett,monkhouse,moncure,momphard,molyneaux,molles,mollenkopf,molette,mohs,mohmand,mohlke,moessner,moers,mockus,moccio,mlinar,mizzelle,mittler,mitri,mitchusson,mitchen,mistrot,mistler,misch,miriello,minkin,mininger,minerich,minehart,minderman,minden,minahan,milonas,millon,millholland,milleson,millerbernd,millage,militante,milionis,milhoan,mildenberger,milbury,mikolajczak,miklos,mikkola,migneault,mifsud,mietus,mieszala,mielnicki,midy,michon,michioka,micheau,michaeli,micali,methe,metallo,messler,mesch,merow,meroney,mergenthaler,meres,menuey,menousek,menning,menn,menghini,mendia,memmer,melot,mellenthin,melland,meland,meixner,meisenheimer,meineke,meinders,mehrens,mehlig,meglio,medsker,medero,mederios,meabon,mcwright,mcright,mcreath,mcrary,mcquirter,mcquerry,mcquary,mcphie,mcnurlen,mcnelley,mcnee,mcnairy,mcmanamy,mcmahen,mckowen,mckiver,mckinlay,mckearin,mcirvin,mcintrye,mchorse,mchaffie,mcgroarty,mcgoff,mcgivern,mceniry,mcelhiney,mcdiarmid,mccullars,mccubbins,mccrimon,mccovery,mccommons,mcclour,mccarrick,mccarey,mccallen,mcbrien,mcarthy,mayone,maybin,maxam,maurais,maughn,matzek,matts,matin,mathre,mathia,mateen,matava,masso,massar,massanet,masingale,mascaro,marthaler,martes,marso,marshman,marsalis,marrano,marolt,marold,markins,margulis,mardirosian,marchiano,marchak,marandola,marana,manues,mante,mansukhani,mansi,mannan,maniccia,mangine,manery,mandigo,mancell,mamo,malstrom,malouf,malenfant,maldenado,malandruccolo,malak,malabanan,makino,maisonave,mainord,maino,mainard,maillard,mahmud,mahdi,mahapatra,mahaley,mahaffy,magouirk,maglaras,magat,maga,maffia,madrazo,madrano,maditz,mackert,mackellar,mackell,macht,macchia,maccarthy,maahs,lytal,luzar,luzader,lutjen,lunger,lunan,luma,lukins,luhmann,luers,ludvigsen,ludlam,ludemann,luchini,lucente,lubrano,lubow,luber,lubeck,lowing,loven,loup,louge,losco,lorts,lormand,lorenzetti,longford,longden,longbrake,lokhmatov,loge,loeven,loeser,locey,locatelli,litka,lista,lisonbee,lisenbee,liscano,liranzo,liquori,liptrot,lionetti,linscomb,linkovich,linington,lingefelt,lindler,lindig,lindall,lincks,linander,linan,limburg,limbrick,limbach,likos,lighthall,liford,lietzke,liebe,liddicoat,lickley,lichter,liapis,lezo,lewan,levitz,levesgue,leverson,levander,leuthauser,letbetter,lesuer,lesmeister,lesly,lerer,leppanen,lepinski,lenherr,lembrick,lelonek,leisten,leiss,leins,leingang,leinberger,leinbach,leikam,leidig,lehtonen,lehnert,lehew,legier,lefchik,lecy,leconte,lecher,lebrecht,leaper,lawter,lawrenz,lavy,laur,lauderbaugh,lauden,laudato,latting,latsko,latini,lassere,lasseigne,laspina,laso,laslie,laskowitz,laske,lasenby,lascola,lariosa,larcade,lapete,laperouse,lanuza,lanting,lantagne,lansdale,lanphier,langmaid,langella,lanese,landrus,lampros,lamens,laizure,laitinen,laigle,lahm,lagueux,lagorio,lagomarsino,lagasca,lagana,lafont,laflen,lafavor,lafarge,laducer,ladnier,ladesma,lacognata,lackland,lacerte,labuff,laborin,labine,labauve,kuzio,kusterer,kussman,kusel,kusch,kurutz,kurdyla,kupka,kunzler,kunsman,kuni,kuney,kunc,kulish,kuliga,kulaga,kuilan,kuhre,kuhnke,kuemmerle,kueker,kudla,kudelka,kubinski,kubicki,kubal,krzyzanowski,krupicka,krumwiede,krumme,kropidlowski,krokos,kroell,kritzer,kribs,kreitlow,kreisher,kraynak,krass,kranzler,kramb,kozyra,kozicki,kovalik,kovalchik,kovacevic,kotula,kotrba,koteles,kosowski,koskela,kosiba,koscinski,kosch,korab,kopple,kopper,koppelman,koppel,konwinski,kolosky,koloski,kolinsky,kolinski,kolbeck,kolasa,koepf,koda,kochevar,kochert,kobs,knust,knueppel,knoy,knieriem,knier,kneller,knappert,klitz,klintworth,klinkenberg,klinck,kleindienst,kleeb,klecker,kjellberg,kitsmiller,kisor,kisiel,kise,kirbo,kinzle,kingsford,kingry,kimpton,kimel,killmon,killick,kilgallon,kilcher,kihn,kiggins,kiecker,kher,khaleel,keziah,kettell,ketchen,keshishian,kersting,kersch,kerins,kercher,kenefick,kemph,kempa,kelsheimer,kelln,kellenberger,kekahuna,keisling,keirnan,keimig,kehn,keal,kaupp,kaufhold,kauffmann,katzenberg,katona,kaszynski,kaszuba,kassebaum,kasa,kartye,kartchner,karstens,karpinsky,karmely,karel,karasek,kapral,kaper,kanelos,kanahele,kampmann,kampe,kalp,kallus,kallevig,kallen,kaliszewski,kaleohano,kalchthaler,kalama,kalahiki,kaili,kahawai,kagey,justiss,jurkowski,jurgensmeyer,juilfs,jopling,jondahl,jomes,joice,johannessen,joeckel,jezewski,jezek,jeswald,jervey,jeppsen,jenniges,jennett,jemmott,jeffs,jaurequi,janisch,janick,jacek,jacaruso,iwanicki,ishihara,isenberger,isbister,iruegas,inzer,inyart,inscore,innocenti,inglish,infantolino,indovina,inaba,imondi,imdieke,imbert,illes,iarocci,iannucci,huver,hutley,husser,husmann,hupf,huntsberger,hunnewell,hullum,huit,huish,hughson,huft,hufstetler,hueser,hudnell,hovden,housen,houghtling,hossack,hoshaw,horsford,horry,hornbacher,hoppenstedt,hopkinson,honza,homann,holzmeister,holycross,holverson,holtzlander,holroyd,holmlund,holderness,holderfield,holck,hojnacki,hohlfeld,hohenberger,hoganson,hogancamp,hoffses,hoerauf,hoell,hoefert,hodum,hoder,hockenbury,hoage,hisserich,hislip,hirons,hippensteel,hippen,hinkston,hindes,hinchcliff,himmel,hillberry,hildring,hiester,hiefnar,hibberd,hibben,heyliger,heyl,heyes,hevia,hettrick,hert,hersha,hernandz,herkel,herber,henscheid,hennesy,henly,henegan,henebry,hench,hemsath,hemm,hemken,hemann,heltzel,hellriegel,hejny,heinl,heinke,heidinger,hegeman,hefferan,hedglin,hebdon,hearnen,heape,heagy,headings,headd,hazelbaker,havlick,hauschildt,haury,hassenfritz,hasenbeck,haseltine,hartstein,hartry,hartnell,harston,harpool,harmen,hardister,hardey,harders,harbolt,harbinson,haraway,haque,hansmann,hanser,hansch,hansberry,hankel,hanigan,haneline,hampe,hamons,hammerstone,hammerle,hamme,hammargren,hamelton,hamberger,hamasaki,halprin,halman,hallihan,haldane,haifley,hages,hagadorn,hadwin,habicht,habermehl,gyles,gutzman,gutekunst,gustason,gusewelle,gurnsey,gurnee,gunterman,gumina,gulliver,gulbrandson,guiterez,guerino,guedry,gucwa,guardarrama,guagliano,guadagno,grulke,groote,groody,groft,groeneweg,grochow,grippe,grimstead,griepentrog,greenfeld,greenaway,grebe,graziosi,graw,gravina,grassie,granzow,grandjean,granby,gramacy,gozalez,goyer,gotch,gosden,gorny,gormont,goodgion,gonya,gonnerman,gompert,golish,goligoski,goldmann,goike,goetze,godeaux,glaza,glassel,glaspy,glander,giumarro,gitelman,gisondi,gismondi,girvan,girten,gironda,giovinco,ginkel,gilster,giesy,gierman,giddins,giardini,gianino,ghea,geurin,gett,getson,gerrero,germond,gentsy,genta,gennette,genito,genis,gendler,geltz,geiss,gehret,gegenheimer,geffert,geeting,gebel,gavette,gavenda,gaumond,gaudioso,gatzke,gatza,gattshall,gaton,gatchel,gasperi,gaska,gasiorowski,garritson,garrigus,garnier,garnick,gardinier,gardenas,garcy,garate,gandolfi,gamm,gamel,gambel,gallmon,gallemore,gallati,gainous,gainforth,gahring,gaffey,gaebler,gadzinski,gadbury,gabri,gaba,fyke,furtaw,furnas,furcron,funn,funck,fulwood,fulvio,fullmore,fukumoto,fuest,fuery,frymire,frush,frohlich,froedge,frodge,fritzinger,fricker,frericks,frein,freid,freggiaro,fratto,franzi,franciscus,fralix,fowble,fotheringham,foslien,foshie,fortmann,forsey,forkner,foppiano,fontanetta,fonohema,fogler,fockler,fluty,flusche,flud,flori,flenory,fleharty,fleeks,flaxman,fiumara,fitzmorris,finnicum,finkley,fineran,fillhart,filipi,fijal,fieldson,ficarra,festerman,ferryman,ferner,fergason,ferell,fennern,femmer,feldmeier,feeser,feenan,federick,fedak,febbo,feazell,fazzone,fauth,fauset,faurote,faulker,faubion,fatzinger,fasick,fanguy,fambrough,falks,fahl,faaita,exler,ewens,estrado,esten,esteen,esquivez,espejo,esmiol,esguerra,esco,ertz,erspamer,ernstes,erisman,erhard,ereaux,ercanbrack,erbes,epple,entsminger,entriken,enslow,ennett,engquist,englebert,englander,engesser,engert,engeman,enge,enerson,emhoff,emge,elting,ellner,ellenberg,ellenbecker,elio,elfert,elawar,ekstrand,eison,eismont,eisenbrandt,eiseman,eischens,ehrgott,egley,egert,eddlemon,eckerson,eckersley,eckberg,echeverry,eberts,earthman,earnhart,eapen,eachus,dykas,dusi,durning,durdan,dunomes,duncombe,dume,dullen,dullea,dulay,duffett,dubs,dubard,drook,drenth,drahos,dragone,downin,downham,dowis,dowhower,doward,dovalina,dopazo,donson,donnan,dominski,dollarhide,dolinar,dolecki,dolbee,doege,dockus,dobkin,dobias,divoll,diviney,ditter,ditman,dissinger,dismang,dirlam,dinneen,dini,dingwall,diloreto,dilmore,dillaman,dikeman,diiorio,dighton,diffley,dieudonne,dietel,dieringer,diercks,dienhart,diekrager,diefendorf,dicke,dicamillo,dibrito,dibona,dezeeuw,dewhurst,devins,deviney,deupree,detherage,despino,desmith,desjarlais,deshner,desha,desanctis,derring,derousse,derobertis,deridder,derego,derden,deprospero,deprofio,depping,deperro,denty,denoncourt,dencklau,demler,demirchyan,demichiel,demesa,demere,demaggio,delung,deluise,delmoral,delmastro,delmas,delligatti,delle,delasbour,delarme,delargy,delagrange,delafontaine,deist,deiss,deighan,dehoff,degrazia,degman,defosses,deforrest,deeks,decoux,decarolis,debuhr,deberg,debarr,debari,dearmon,deare,deardurff,daywalt,dayer,davoren,davignon,daviau,dauteuil,dauterive,daul,darnley,darakjy,dapice,dannunzio,danison,daniello,damario,dalonzo,dallis,daleske,dalenberg,daiz,dains,daines,dagnese,dady,dadey,czyzewski,czapor,czaplewski,czajka,cyganiewicz,cuttino,cutrona,cussins,cusanelli,cuperus,cundy,cumiskey,cumins,cuizon,cuffia,cuffe,cuffari,cuccaro,cubie,cryder,cruson,crounse,cromedy,cring,creer,credeur,crea,cozort,cozine,cowee,cowdery,couser,courtway,courington,cotman,costlow,costell,corton,corsaro,corrieri,corrick,corradini,coron,coren,corbi,corado,copus,coppenger,cooperwood,coontz,coonce,contrera,connealy,conell,comtois,compere,commins,commings,comegys,colyar,colo,collister,collick,collella,coler,colborn,cohran,cogbill,coffen,cocuzzo,clynes,closter,clipp,clingingsmith,clemence,clayman,classon,clas,clarey,clague,ciubal,citrino,citarella,cirone,cipponeri,cindrich,cimo,ciliberto,cichowski,ciccarello,cicala,chura,chubbuck,chronis,christlieb,chizek,chittester,chiquito,chimento,childree,chianese,chevrette,checo,chastang,chargualaf,chapmon,chantry,chahal,chafetz,cezar,ceruantes,cerrillo,cerrano,cerecedes,cerami,cegielski,cavallero,catinella,cassata,caslin,casano,casacchia,caruth,cartrette,carten,carodine,carnrike,carnall,carmicle,carlan,carlacci,caris,cariaga,cardine,cardimino,cardani,carbonara,capua,capponi,cappellano,caporale,canupp,cantrel,cantone,canterberry,cannizzo,cannan,canelo,caneer,candill,candee,campbel,caminero,camble,caluya,callicott,calk,caito,caffie,caden,cadavid,cacy,cachu,cachola,cabreja,cabiles,cabada,caamano,byran,byon,buyck,bussman,bussie,bushner,burston,burnison,burkman,burkhammer,bures,burdeshaw,bumpass,bullinger,bullers,bulgrin,bugay,budak,buczynski,buckendorf,buccieri,bubrig,brynteson,brunz,brunmeier,brunkow,brunetto,brunelli,brumwell,bruggman,brucki,brucculeri,brozovich,browing,brotman,brocker,broadstreet,brix,britson,brinck,brimmage,brierre,bridenstine,brezenski,brezee,brevik,brentlinger,brentley,breidenbach,breckel,brech,brazzle,braughton,brauch,brattin,brattain,branhan,branford,braner,brander,braly,braegelmann,brabec,boyt,boyack,bowren,bovian,boughan,botton,botner,bosques,borzea,borre,boron,bornhorst,borgstrom,borella,bontempo,bonniwell,bonnes,bonillo,bonano,bolek,bohol,bohaty,boffa,boetcher,boesen,boepple,boehler,boedecker,boeckx,bodi,boal,bloodsworth,bloodgood,blome,blockett,blixt,blanchett,blackhurst,blackaby,bjornberg,bitzer,bittenbender,bitler,birchall,binnicker,binggeli,billett,bilberry,biglow,bierly,bielby,biegel,berzas,berte,bertagnolli,berreth,bernhart,bergum,berentson,berdy,bercegeay,bentle,bentivegna,bentham,benscoter,benns,bennick,benjamine,beneze,benett,beneke,bendure,bendix,bendick,benauides,belman,bellus,bellott,bellefleur,bellas,beljan,belgard,beith,beinlich,beierle,behme,beevers,beermann,beeching,bedward,bedrosian,bedner,bedeker,bechel,becera,beaubrun,beardmore,bealmear,bazin,bazer,baumhoer,baumgarner,bauknecht,battson,battiest,basulto,baster,basques,basista,basiliere,bashi,barzey,barz,bartus,bartucca,bartek,barrero,barreca,barnoski,barndt,barklow,baribeau,barette,bares,barentine,bareilles,barbre,barberi,barbagelata,baraw,baratto,baranoski,baptise,bankson,bankey,bankard,banik,baltzley,ballen,balkey,balius,balderston,bakula,bakalar,baffuto,baerga,badoni,backous,bachtel,bachrach,baccari,babine,babilonia,baar,azbill,azad,aycox,ayalla,avolio,austerberry,aughtry,aufderheide,auch,attanasio,athayde,atcher,asselta,aslin,aslam,ashwood,ashraf,ashbacher,asbridge,asakura,arzaga,arriaza,arrez,arrequin,arrants,armiger,armenteros,armbrister,arko,argumedo,arguijo,ardolino,arcia,arbizo,aravjo,aper,anzaldo,antu,antrikin,antonetty,antinoro,anthon,antenucci,anstead,annese,ankrum,andreason,andrado,andaverde,anastos,anable,amspoker,amrine,amrein,amorin,amel,ambrosini,alsbrook,alnutt,almasi,allessio,allateef,aldous,alderink,aldaz,akmal,akard,aiton,aites,ainscough,aikey,ahrends,ahlm,aguada,agans,adelmann,addesso,adaway,adamaitis,ackison,abud,abendroth,abdur,abdool,aamodt,zywiec,zwiefelhofer,zwahlen,zunino,zuehl,zmuda,zmolek,zizza,ziska,zinser,zinkievich,zinger,zingarelli,ziesmer,ziegenfuss,ziebol,zettlemoyer,zettel,zervos,zenke,zembower,zelechowski,zelasko,zeise,zeek,zeeb,zarlenga,zarek,zaidi,zahnow,zahnke,zaharis,zacate,zabrocki,zaborac,yurchak,yuengling,younie,youngers,youell,yott,yoshino,yorks,yordy,yochem,yerico,yerdon,yeiser,yearous,yearick,yeaney,ybarro,yasutake,yasin,yanke,yanish,yanik,yamazaki,yamat,yaggi,ximenez,wyzard,wynder,wyly,wykle,wutzke,wuori,wuertz,wuebker,wrightsel,worobel,worlie,worford,worek,woolson,woodrome,woodly,woodling,wontor,wondra,woltemath,wollmer,wolinski,wolfert,wojtanik,wojtak,wohlfarth,woeste,wobbleton,witz,wittmeyer,witchey,wisotzkey,wisnewski,wisman,wirch,wippert,wineberg,wimpee,wilusz,wiltsey,willig,williar,willers,willadsen,wildhaber,wilday,wigham,wiewel,wieting,wietbrock,wiesel,wiesehan,wiersema,wiegert,widney,widmark,wickson,wickings,wichern,whtie,whittie,whitlinger,whitfill,whitebread,whispell,whetten,wheeley,wheeles,wheelen,whatcott,weyland,weter,westrup,westphalen,westly,westland,wessler,wesolick,wesler,wesche,werry,wero,wernecke,werkhoven,wellspeak,wellings,welford,welander,weissgerber,weisheit,weins,weill,weigner,wehrmann,wehrley,wehmeier,wege,weers,weavers,watring,wassum,wassman,wassil,washabaugh,wascher,warth,warbington,wanca,wammack,wamboldt,walterman,walkington,walkenhorst,walinski,wakley,wagg,wadell,vuckovich,voogd,voller,vokes,vogle,vogelsberg,vodicka,vissering,vipond,vincik,villalona,vickerman,vettel,veteto,vesperman,vesco,vertucci,versaw,verba,ventris,venecia,vendela,venanzi,veldhuizen,vehrs,vaughen,vasilopoulos,vascocu,varvel,varno,varlas,varland,vario,vareschi,vanwyhe,vanweelden,vansciver,vannaman,vanluven,vanloo,vanlaningham,vankomen,vanhout,vanhampler,vangorp,vangorden,vanella,vandresar,vandis,vandeyacht,vandewerker,vandevsen,vanderwall,vandercook,vanderberg,vanbergen,valko,valesquez,valeriano,valen,vachula,vacha,uzee,uselman,urizar,urion,urben,upthegrove,unzicker,unsell,unick,umscheid,umin,umanzor,ullo,ulicki,uhlir,uddin,tytler,tymeson,tyger,twisdale,twedell,tweddle,turrey,tures,turell,tupa,tuitt,tuberville,tryner,trumpower,trumbore,troglen,troff,troesch,trivisonno,tritto,tritten,tritle,trippany,tringali,tretheway,treon,trejos,tregoning,treffert,traycheff,travali,trauth,trauernicht,transou,trane,trana,toves,tosta,torp,tornquist,tornes,torchio,toor,tooks,tonks,tomblinson,tomala,tollinchi,tolles,tokich,tofte,todman,titze,timpone,tillema,tienken,tiblier,thyberg,thursby,thurrell,thurm,thruman,thorsted,thorley,thomer,thoen,thissen,theimer,thayn,thanpaeng,thammavongsa,thalman,texiera,texidor,teverbaugh,teska,ternullo,teplica,tepe,teno,tenholder,tenbusch,tenbrink,temby,tejedor,teitsworth,teichmann,tehan,tegtmeyer,tees,teem,tays,taubert,tauares,taschler,tartamella,tarquinio,tarbutton,tappendorf,tapija,tansil,tannahill,tamondong,talahytewa,takashima,taecker,tabora,tabin,tabbert,szymkowski,szymanowski,syversen,syrett,synnott,sydnes,swimm,sweney,swearegene,swartzel,swanstrom,svedin,suryan,supplice,supnet,suoboda,sundby,sumaya,sumabat,sulzen,sukovaty,sukhu,sugerman,sugalski,sudweeks,sudbeck,sucharski,stutheit,stumfoll,stuffle,struyk,strutz,strumpf,strowbridge,strothman,strojny,strohschein,stroffolino,stribble,strevel,strenke,stremming,strehle,stranak,stram,stracke,stoudamire,storks,stopp,stonebreaker,stolt,stoica,stofer,stockham,stockfisch,stjuste,stiteler,stiman,stillions,stillabower,stierle,sterlace,sterk,stepps,stenquist,stenner,stellman,steines,steinbaugh,steinbacher,steiling,steidel,steffee,stavinoha,staver,stastny,stasiuk,starrick,starliper,starlin,staniford,staner,standre,standefer,standafer,stanczyk,stallsmith,stagliano,staehle,staebler,stady,stadtmiller,squyres,spurbeck,sprunk,spranger,spoonamore,spoden,spilde,spezio,speros,sperandio,specchio,spearin,spayer,spallina,spadafino,sovie,sotello,sortor,sortino,soros,sorola,sorbello,sonner,sonday,somes,soloway,soens,soellner,soderblom,sobin,sniezek,sneary,smyly,smutnick,smoots,smoldt,smitz,smitreski,smallen,smades,slunaker,sluka,slown,slovick,slocomb,slinger,slife,sleeter,slanker,skufca,skubis,skrocki,skov,skjei,skilton,skarke,skalka,skalak,skaff,sixkiller,sitze,siter,sisko,sirman,sirls,sinotte,sinon,sincock,sincebaugh,simmoms,similien,silvius,silton,silloway,sikkema,sieracki,sienko,siemon,siemer,siefker,sieberg,siebens,siebe,sicurella,sicola,sickle,shumock,shumiloff,shuffstall,shuemaker,shuart,shroff,shreeve,shostak,shortes,shorr,shivley,shintaku,shindo,shimomura,shiigi,sherow,sherburn,shepps,shenefield,shelvin,shelstad,shelp,sheild,sheaman,shaulis,sharrer,sharps,sharpes,shappy,shapero,shanor,shandy,seyller,severn,sessom,sesley,servidio,serrin,sero,septon,septer,sennott,sengstock,senff,senese,semprini,semone,sembrat,selva,sella,selbig,seiner,seif,seidt,sehrt,seemann,seelbinder,sedlay,sebert,seaholm,seacord,seaburg,scungio,scroggie,scritchfield,scrimpsher,scrabeck,scorca,scobey,scivally,schwulst,schwinn,schwieson,schwery,schweppe,schwartzenbur,schurz,schumm,schulenburg,schuff,schuerholz,schryer,schrager,schorsch,schonhardt,schoenfelder,schoeck,schoeb,schnitzler,schnick,schnautz,schmig,schmelter,schmeichel,schluneger,schlosberg,schlobohm,schlenz,schlembach,schleisman,schleining,schleiff,schleider,schink,schilz,schiffler,schiavi,scheuer,schemonia,scheman,schelb,schaul,schaufelberge,scharer,schardt,scharbach,schabacker,scee,scavone,scarth,scarfone,scalese,sayne,sayed,savitz,satterlund,sattazahn,satow,sastre,sarr,sarjeant,sarff,sardella,santoya,santoni,santai,sankowski,sanft,sandow,sandoe,sandhaus,sandefer,sampey,samperi,sammarco,samia,samek,samay,samaan,salvadore,saltness,salsgiver,saller,salaz,salano,sakal,saka,saintlouis,saile,sahota,saggese,sagastume,sadri,sadak,sachez,saalfrank,saal,saadeh,rynn,ryley,ryle,rygg,rybarczyk,ruzich,ruyter,ruvo,rupel,ruopp,rundlett,runde,rundall,runck,rukavina,ruggiano,rufi,ruef,rubright,rubbo,rowbottom,rotner,rotman,rothweiler,rothlisberger,rosseau,rossean,rossa,roso,rosiek,roshia,rosenkrans,rosener,rosencrantz,rosencrans,rosello,roques,rookstool,rondo,romasanta,romack,rokus,rohweder,roethler,roediger,rodwell,rodrigus,rodenbeck,rodefer,rodarmel,rockman,rockholt,rochow,roches,roblin,roblez,roble,robers,roat,rizza,rizvi,rizk,rixie,riveiro,rius,ritschard,ritrovato,risi,rishe,rippon,rinks,ringley,ringgenberg,ringeisen,rimando,rilley,rijos,rieks,rieken,riechman,riddley,ricord,rickabaugh,richmeier,richesin,reyolds,rexach,requena,reppucci,reposa,renzulli,renter,remondini,reither,reisig,reifsnider,reifer,reibsome,reibert,rehor,rehmann,reedus,redshaw,reczek,recupero,recor,reckard,recher,realbuto,razer,rayman,raycraft,rayas,rawle,raviscioni,ravetto,ravenelle,rauth,raup,rattliff,rattley,rathfon,rataj,rasnic,rappleyea,rapaport,ransford,rann,rampersad,ramis,ramcharan,rainha,rainforth,ragans,ragains,rafidi,raffety,raducha,radsky,radler,radatz,raczkowski,rabenold,quraishi,quinerly,quercia,quarnstrom,pusser,puppo,pullan,pulis,pugel,puca,pruna,prowant,provines,pronk,prinkleton,prindall,primas,priesmeyer,pridgett,prevento,preti,presser,presnall,preseren,presas,presa,prchal,prattis,pratillo,praska,prak,powis,powderly,postlewait,postle,posch,porteus,porraz,popwell,popoff,poplaski,poniatoski,pollina,polle,polhill,poletti,polaski,pokorney,pointdexter,poinsette,ploszaj,plitt,pletz,pletsch,plemel,pleitez,playford,plaxco,platek,plambeck,plagens,placido,pisarski,pinuelas,pinnette,pinick,pinell,pinciaro,pinal,pilz,piltz,pillion,pilkinton,pikul,piepenburg,piening,piehler,piedrahita,piechocki,picknell,pickelsimer,pich,picariello,phoeuk,phillipson,philbert,pherigo,phelka,peverini,petrash,petramale,petraglia,pery,personius,perrington,perrill,perpall,perot,perman,peragine,pentland,pennycuff,penninger,pennachio,pendexter,penalver,pelzel,pelter,pelow,pelo,peli,peinado,pedley,pecue,pecore,pechar,peairs,paynes,payano,pawelk,pavlock,pavlich,pavich,pavek,pautler,paulik,patmore,patella,patee,patalano,passini,passeri,paskell,parrigan,parmar,parayno,paparelli,pantuso,pante,panico,panduro,panagos,pama,palmo,pallotta,paling,palamino,pake,pajtas,pailthorpe,pahler,pagon,paglinawan,pagley,paget,paetz,paet,padley,pacleb,pachelo,paccione,pabey,ozley,ozimek,ozawa,owney,outram,ouillette,oudekerk,ostrosky,ostermiller,ostermann,osterloh,osterfeld,ossenfort,osoria,oshell,orsino,orscheln,orrison,ororke,orellano,orejuela,ordoyne,opsahl,opland,onofre,onaga,omahony,olszowka,olshan,ollig,oliff,olien,olexy,oldridge,oldfather,olalde,okun,okumoto,oktavec,okin,ohme,ohlemacher,ohanesian,odneal,odgers,oderkirk,odden,ocain,obradovich,oakey,nussey,nunziato,nunoz,nunnenkamp,nuncio,noviello,novacek,nothstine,northum,norsen,norlander,norkus,norgaard,norena,nored,nobrega,niziolek,ninnemann,nievas,nieratko,nieng,niedermeyer,niedermaier,nicolls,newham,newcome,newberger,nevills,nevens,nevel,neumiller,netti,nessler,neria,nemet,nelon,nellon,neller,neisen,neilly,neifer,neid,neering,neehouse,neef,needler,nebergall,nealis,naumoff,naufzinger,narum,narro,narramore,naraine,napps,nansteel,namisnak,namanny,nallie,nakhle,naito,naccari,nabb,myracle,myhand,mwakitwile,muzzy,muscolino,musco,muscente,muscat,muscara,musacchia,musa,murrish,murfin,muray,munnelly,munley,munivez,mundine,mundahl,munari,mullennex,mullendore,mulkhey,mulinix,mulders,muhl,muenchow,muellner,mudget,mudger,muckenfuss,muchler,mozena,movius,mouldin,motola,mosseri,mossa,moselle,mory,morsell,morrish,morles,morie,morguson,moresco,morck,moppin,moosman,montuori,montono,montogomery,montis,monterio,monter,monsalve,mongomery,mongar,mondello,moncivais,monard,monagan,molt,mollenhauer,moldrem,moldonado,molano,mokler,moisant,moilanen,mohrman,mohamad,moger,mogel,modine,modin,modic,modha,mlynek,miya,mittiga,mittan,mitcheltree,misfeldt,misener,mirchandani,miralles,miotke,miosky,mintey,mins,minassian,minar,mimis,milon,milloy,millison,milito,milfort,milbradt,mikulich,mikos,miklas,mihelcic,migliorisi,migliori,miesch,midura,miclette,michela,micale,mezey,mews,mewes,mettert,mesker,mesich,mesecher,merthie,mersman,mersereau,merrithew,merriott,merring,merenda,merchen,mercardo,merati,mentzel,mentis,mentel,menotti,meno,mengle,mendolia,mellick,mellett,melichar,melhorn,melendres,melchiorre,meitzler,mehtani,mehrtens,meditz,medeiras,meckes,mcteer,mctee,mcparland,mcniell,mcnealey,mcmanaway,mcleon,mclay,mclavrin,mcklveen,mckinzey,mcken,mckeand,mckale,mcilwraith,mcilroy,mcgreal,mcgougan,mcgettigan,mcgarey,mcfeeters,mcelhany,mcdaris,mccomis,mccomber,mccolm,mccollins,mccollin,mccollam,mccoach,mcclory,mcclennon,mccathern,mccarthey,mccarson,mccarrel,mccargar,mccandles,mccamish,mccally,mccage,mcbrearty,mcaneny,mcanallen,mcalarney,mcaferty,mazzo,mazy,mazurowski,mazique,mayoras,mayden,maxberry,mauller,matusiak,mattsen,matthey,matkins,mathiasen,mathe,mateus,matalka,masullo,massay,mashak,mascroft,martinex,martenson,marsiglia,marsella,maroudas,marotte,marner,markes,maret,mareno,marean,marcinkiewicz,marchel,marasigan,manzueta,manzanilla,manternach,manring,manquero,manoni,manne,mankowski,manjarres,mangen,mangat,mandonado,mandia,mancias,manbeck,mamros,maltez,mallia,mallar,malla,malen,malaspina,malahan,malagisi,malachowski,makowsky,makinen,makepeace,majkowski,majid,majercin,maisey,mainguy,mailliard,maignan,mahlman,maha,magsamen,magpusao,magnano,magley,magedanz,magarelli,magaddino,maenner,madnick,maddrey,madaffari,macnaughton,macmullen,macksey,macknight,macki,macisaac,maciejczyk,maciag,machenry,machamer,macguire,macdaniel,maccormack,maccabe,mabbott,mabb,lynott,lycan,lutwin,luscombe,lusco,lusardi,luria,lunetta,lundsford,lumas,luisi,luevanos,lueckenhoff,ludgate,ludd,lucherini,lubbs,lozado,lourens,lounsberry,loughrey,loughary,lotton,losser,loshbaugh,loseke,loscalzo,lortz,loperena,loots,loosle,looman,longstaff,longobardi,longbottom,lomay,lomasney,lohrmann,lohmiller,logalbo,loetz,loeffel,lodwick,lodrigue,lockrem,llera,llarena,littrel,littmann,lisser,lippa,lipner,linnemann,lingg,lindemuth,lindeen,lillig,likins,lieurance,liesmann,liesman,liendo,lickert,lichliter,leyvas,leyrer,lewy,leubner,lesslie,lesnick,lesmerises,lerno,lequire,lepera,lepard,lenske,leneau,lempka,lemmen,lemm,lemere,leinhart,leichner,leicher,leibman,lehmberg,leggins,lebeda,leavengood,leanard,lazaroff,laventure,lavant,lauster,laumea,latigo,lasota,lashure,lasecki,lascurain,lartigue,larouche,lappe,laplaunt,laplace,lanum,lansdell,lanpher,lanoie,lankard,laniado,langowski,langhorn,langfield,langfeldt,landt,landerman,landavazo,lampo,lampke,lamper,lamery,lambey,lamadrid,lallemand,laisure,laigo,laguer,lagerman,lageman,lagares,lacosse,lachappelle,laborn,labonne,kuzia,kutt,kutil,kurylo,kurowski,kuriger,kupcho,kulzer,kulesa,kules,kuhs,kuhne,krutz,krus,krupka,kronberg,kromka,kroese,krizek,krivanek,kringel,kreiss,kratofil,krapp,krakowsky,kracke,kozlow,kowald,kover,kovaleski,kothakota,kosten,koskinen,kositzke,korff,korbar,kopplin,koplin,koos,konyn,konczak,komp,komo,kolber,kolash,kolakowski,kohm,kogen,koestner,koegler,kodama,kocik,kochheiser,kobler,kobara,knezevich,kneifl,knapchuck,knabb,klugman,klosner,klingel,klimesh,klice,kley,kleppe,klemke,kleinmann,kleinhans,kleinberg,kleffner,kleckley,klase,kisto,kissick,kisselburg,kirschman,kirks,kirkner,kirkey,kirchman,kinville,kinnunen,kimmey,kimmerle,kimbley,kilty,kilts,killmeyer,killilea,killay,kiest,kierce,kiepert,kielman,khalid,kewal,keszler,kesson,kesich,kerwood,kerksiek,kerkhoff,kerbo,keranen,keomuangtai,kenter,kennelley,keniry,kendzierski,kempner,kemmis,kemerling,kelsay,kelchner,kela,keithly,keipe,kegg,keer,keahey,kaywood,kayes,kawahara,kasuboski,kastendieck,kassin,kasprzyk,karraker,karnofski,karman,karger,karge,karella,karbowski,kapphahn,kannel,kamrath,kaminer,kamansky,kalua,kaltz,kalpakoff,kalkbrenner,kaku,kaib,kaehler,kackley,kaber,justo,juris,jurich,jurgenson,jurez,junor,juniel,juncker,jugo,jubert,jowell,jovanovic,joosten,joncas,joma,johnso,johanns,jodoin,jockers,joans,jinwright,jinenez,jimeson,jerrett,jergens,jerden,jerdee,jepperson,jendras,jeanfrancois,jazwa,jaussi,jaster,jarzombek,jarencio,janocha,jakab,jadlowiec,jacobsma,jach,izaquirre,iwaoka,ivaska,iturbe,israelson,isles,isachsen,isaak,irland,inzerillo,insogna,ingegneri,ingalsbe,inciong,inagaki,icenogle,hyett,hyers,huyck,hutti,hutten,hutnak,hussar,hurrle,hurford,hurde,hupper,hunkin,hunkele,hunke,humann,huhtasaari,hugel,hufft,huegel,hrobsky,hren,hoyles,hovsepian,hovenga,hovatter,houdek,hotze,hossler,hossfeld,hosseini,horten,hort,horr,horgen,horen,hoopii,hoon,hoogland,hontz,honnold,homewood,holway,holtgrewe,holtan,holstrom,holstege,hollway,hollingshed,hollenback,hollard,holberton,hoines,hogeland,hofstad,hoetger,hoen,hoaglund,hirota,hintermeister,hinnen,hinders,hinderer,hinchee,himelfarb,himber,hilzer,hilling,hillers,hillegas,hildinger,hignight,highman,hierholzer,heyde,hettich,hesketh,herzfeld,herzer,hershenson,hershberg,hernando,hermenegildo,hereth,hererra,hereda,herbin,heraty,herard,hepa,henschel,henrichsen,hennes,henneberger,heningburg,henig,hendron,hendericks,hemple,hempe,hemmingsen,hemler,helvie,helmly,helmbrecht,heling,helin,helfrey,helble,helaire,heizman,heisser,heiny,heinbaugh,heidemann,heidema,heiberger,hegel,heerdt,heeg,heefner,heckerman,heckendorf,heavin,headman,haynesworth,haylock,hayakawa,hawksley,haverstick,haut,hausen,hauke,haubold,hattan,hattabaugh,hasstedt,hashem,haselhorst,harrist,harpst,haroldsen,harmison,harkema,harison,hariri,harcus,harcum,harcharik,hanzel,hanvey,hantz,hansche,hansberger,hannig,hanken,hanhardt,hanf,hanauer,hamberlin,halward,halsall,hals,hallquist,hallmon,halk,halbach,halat,hajdas,hainsworth,haik,hahm,hagger,haggar,hader,hadel,haddick,hackmann,haasch,haaf,guzzetta,guzy,gutterman,gutmann,gutkowski,gustine,gursky,gurner,gunsolley,gumpert,gulla,guilmain,guiliani,guier,guers,guerero,guerena,guebara,guadiana,grunder,grothoff,grosland,grosh,groos,grohs,grohmann,groepper,grodi,grizzaffi,grissinger,grippi,grinde,griffee,grether,greninger,greigo,gregorski,greger,grega,greenberger,graza,grattan,grasse,grano,gramby,gradilla,govin,goutremout,goulas,gotay,gosling,gorey,gordner,goossen,goodwater,gonzaga,gonyo,gonska,gongalves,gomillion,gombos,golonka,gollman,goldtrap,goldammer,golas,golab,gola,gogan,goffman,goeppinger,godkin,godette,glore,glomb,glauner,glassey,glasner,gividen,giuffrida,gishal,giovanelli,ginoza,ginns,gindlesperger,gindhart,gillem,gilger,giggey,giebner,gibbson,giacomo,giacolone,giaccone,giacchino,ghere,gherardini,gherardi,gfeller,getts,gerwitz,gervin,gerstle,gerfin,geremia,gercak,gener,gencarelli,gehron,gehrmann,geffers,geery,geater,gawlik,gaudino,garsia,garrahan,garrabrant,garofolo,garigliano,garfinkle,garelick,gardocki,garafola,gappa,gantner,ganther,gangelhoff,gamarra,galstad,gally,gallik,gallier,galimba,gali,galassi,gaige,gadsby,gabbin,gabak,fyall,furney,funez,fulwider,fulson,fukunaga,fujikawa,fugere,fuertes,fuda,fryson,frump,frothingham,froning,froncillo,frohling,froberg,froats,fritchman,frische,friedrichsen,friedmann,friddell,frid,fresch,frentzel,freno,frelow,freimuth,freidel,freehan,freeby,freeburn,fredieu,frederiksen,fredeen,frazell,frayser,fratzke,frattini,franze,franich,francescon,framer,fragman,frack,foxe,fowlston,fosberg,fortna,fornataro,forden,foots,foody,fogt,foglia,fogerty,fogelson,flygare,flowe,flinner,flem,flath,flater,flahaven,flad,fjeld,fitanides,fistler,fishbaugh,firsching,finzel,finical,fingar,filosa,filicetti,filby,fierst,fierra,ficklen,ficher,fersner,ferrufino,ferrucci,fero,ferlenda,ferko,fergerstrom,ferge,fenty,fent,fennimore,fendt,femat,felux,felman,feldhaus,feisthamel,feijoo,feiertag,fehrman,fehl,feezell,feeback,fedigan,fedder,fechner,feary,fayson,faylor,fauteux,faustini,faure,fauci,fauber,fattig,farruggio,farrens,faraci,fantini,fantin,fanno,fannings,faniel,fallaw,falker,falkenhagen,fajen,fahrner,fabel,fabacher,eytcheson,eyster,exford,exel,evetts,evenstad,evanko,euresti,euber,etcitty,estler,essner,essinger,esplain,espenshade,espaillat,escribano,escorcia,errington,errett,errera,erlanger,erenrich,erekson,erber,entinger,ensworth,ensell,enno,ennen,englin,engblom,engberson,encinias,enama,emel,elzie,elsbree,elman,ellebracht,elkan,elfstrom,elerson,eleazer,eleam,eldrige,elcock,einspahr,eike,eidschun,eickman,eichele,eiche,ehlke,eguchi,eggink,edouard,edgehill,eckes,eblin,ebberts,eavenson,earvin,eardley,eagon,eader,dzubak,dylla,dyckman,dwire,dutrow,dutile,dusza,dustman,dusing,duryee,durupan,durtschi,durtsche,durell,dunny,dunnegan,dunken,dumm,dulak,duker,dukelow,dufort,dufilho,duffee,duett,dueck,dudzinski,dudasik,duckwall,duchemin,dubrow,dubis,dubicki,duba,drust,druckman,drinnen,drewett,drewel,dreitzler,dreckman,drappo,draffen,drabant,doyen,dowding,doub,dorson,dorschner,dorrington,dorney,dormaier,dorff,dorcy,donges,donelly,donel,domangue,dols,dollahite,dolese,doldo,doiley,dohrman,dohn,doheny,doceti,dobry,dobrinski,dobey,divincenzo,dischinger,dirusso,dirocco,dipiano,diop,dinitto,dinehart,dimsdale,diminich,dimalanta,dillavou,dilello,difusco,diffey,diffenderfer,diffee,difelice,difabio,dietzman,dieteman,diepenbrock,dieckmann,dicampli,dibari,diazdeleon,diallo,dewitz,dewiel,devoll,devol,devincent,devier,devendorf,devalk,detten,detraglia,dethomas,detemple,desler,desharnais,desanty,derocco,dermer,derks,derito,derhammer,deraney,dequattro,depass,depadua,denyes,denyer,dentino,denlinger,deneal,demory,demopoulos,demontigny,demonte,demeza,delsol,delrosso,delpit,delpapa,delouise,delone,delo,delmundo,delmore,dellapaolera,delfin,delfierro,deleonardis,delenick,delcarlo,delcampo,delcamp,delawyer,delaroca,delaluz,delahunt,delaguardia,dekeyser,dekay,dejaeger,dejackome,dehay,dehass,degraffenried,degenhart,degan,deever,deedrick,deckelbaum,dechico,dececco,decasas,debrock,debona,debeaumont,debarros,debaca,dearmore,deangelus,dealmeida,dawood,davney,daudt,datri,dasgupta,darring,darracott,darcus,daoud,dansbury,dannels,danielski,danehy,dancey,damour,dambra,dalcour,dahlheimer,dadisman,dacunto,dacamara,dabe,cyrulik,cyphert,cwik,cussen,curles,curit,curby,curbo,cunas,cunard,cunanan,cumpton,culcasi,cucinotta,cucco,csubak,cruthird,crumwell,crummitt,crumedy,crouthamel,cronce,cromack,crisafi,crimin,cresto,crescenzo,cremonese,creedon,crankshaw,cozzens,coval,courtwright,courcelle,coupland,counihan,coullard,cotrell,cosgrave,cornelio,corish,cordoua,corbit,coppersmith,coonfield,conville,contrell,contento,conser,conrod,connole,congrove,conery,condray,colver,coltman,colflesh,colcord,colavito,colar,coile,coggan,coenen,codling,coda,cockroft,cockrel,cockerill,cocca,coberley,clouden,clos,clish,clinkscale,clester,clammer,cittadino,citrano,ciresi,cillis,ciccarelli,ciborowski,ciarlo,ciardullo,chritton,chopp,chirco,chilcoat,chevarie,cheslak,chernak,chay,chatterjee,chatten,chatagnier,chastin,chappuis,channey,champlain,chalupsky,chalfin,chaffer,chadek,chadderton,cestone,cestero,cestari,cerros,cermeno,centola,cedrone,cayouette,cavan,cavaliero,casuse,castricone,castoreno,casten,castanada,castagnola,casstevens,cassanova,caspari,casher,cashatt,casco,casassa,casad,carville,cartland,cartegena,carsey,carsen,carrino,carrilo,carpinteyro,carmley,carlston,carlsson,cariddi,caricofe,carel,cardy,carducci,carby,carangelo,capriotti,capria,caprario,capelo,canul,cantua,cantlow,canny,cangialosi,canepa,candland,campolo,campi,camors,camino,camfield,camelo,camarero,camaeho,calvano,calliste,caldarella,calcutt,calcano,caissie,cager,caccamo,cabotage,cabble,byman,buzby,butkowski,bussler,busico,bushovisky,busbin,busard,busalacchi,burtman,burrous,burridge,burrer,burno,burin,burgette,burdock,burdier,burckhard,bunten,bungay,bundage,bumby,bultema,bulinski,bulan,bukhari,buganski,buerkle,buen,buehl,budzynski,buckham,bryk,brydon,bruyere,brunsvold,brunnett,brunker,brunfield,brumble,brue,brozina,brossman,brosey,brookens,broersma,brodrick,brockmeier,brockhouse,brisky,brinkly,brincefield,brighenti,brigante,brieno,briede,bridenbaugh,brickett,breske,brener,brenchley,breitkreutz,breitbart,breister,breining,breighner,breidel,brehon,breheny,breard,breakell,brazill,braymiller,braum,brau,brashaw,bransom,brandolino,brancato,branagan,braff,brading,bracker,brackenbury,bracher,braasch,boylen,boyda,boyanton,bowlus,bowditch,boutot,bouthillette,boursiquot,bourjolly,bouret,boulerice,bouer,bouchillon,bouchie,bottin,boteilho,bosko,bosack,borys,bors,borla,borjon,borghi,borah,booten,boore,bonuz,bonne,bongers,boneta,bonawitz,bonanni,bomer,bollen,bollard,bolla,bolio,boisseau,boies,boiani,bohorquez,boghossian,boespflug,boeser,boehl,boegel,bodrick,bodkins,bodenstein,bodell,bockover,bocci,bobbs,boals,boahn,boadway,bluma,bluett,bloor,blomker,blevens,blethen,bleecker,blayney,blaske,blasetti,blancas,blackner,bjorkquist,bjerk,bizub,bisono,bisges,bisaillon,birr,birnie,bires,birdtail,birdine,bina,billock,billinger,billig,billet,bigwood,bigalk,bielicki,biddick,biccum,biafore,bhagat,beza,beyah,bevier,bevell,beute,betzer,betthauser,bethay,bethard,beshaw,bertholf,bertels,berridge,bernot,bernath,bernabei,berkson,berkovitz,berkich,bergsten,berget,berezny,berdin,beougher,benthin,benhaim,benenati,benejan,bemiss,beloate,bellucci,bellotti,belling,bellido,bellaire,bellafiore,bekins,bekele,beish,behnken,beerly,beddo,becket,becke,bebeau,beauchaine,beaucage,beadling,beacher,bazar,baysmore".split(",")))];aJ=aF.concat([function(J){var K,I,G,F,H,E,D,B,C,A,z,y,x,w,v,s;A=[];y=t(o(J));G=0;for(F=y.length;G<F;G++){w=y[G];if(ab(w)){break}D=0;for(H=aF.length;D<H;D++){E=aF[D];B=k(J,w);x=E(B);z=0;for(E=x.length;z<E;z++){if(B=x[z],s=J.slice(B.i,+B.j+1||9000000000),s.toLowerCase()!==B.matched_word){C={};for(v in w){K=w[v],-1!==s.indexOf(v)&&(C[v]=K)}B.l33t=!0;B.token=s;B.sub=C;s=B;var u=void 0,u=[];for(I in C){K=C[I],u.push(I+" -> "+K)}s.sub_display=u.join(", ");A.push(B)}}}}return A},function(n){var p,w,u,s,v,q;v=aL(n,ac);q=[];u=0;for(s=v.length;u<s;u++){p=v[u],w=[p.i,p.j],p=w[0],w=w[1],q.push({pattern:"digits",i:p,j:w,token:n.slice(p,+w+1||9000000000)})}return q},function(n){var p,w,u,s,v,q;v=aL(n,i);q=[];u=0;for(s=v.length;u<s;u++){p=v[u],w=[p.i,p.j],p=w[0],w=w[1],q.push({pattern:"year",i:p,j:w,token:n.slice(p,+w+1||9000000000)})}return q},function(n){return ae(n).concat(af(n))},function(n){var p,s,q;q=[];for(p=0;p<n.length;){for(s=p+1;;){if(n.slice(s-1,+s+1||9000000000),n.charAt(s-1)===n.charAt(s)){s+=1}else{2<s-p&&q.push({pattern:"repeat",i:p,j:s-1,token:n.slice(p,s),repeated_char:n.charAt(p)});break}}p=s}return q},function(D){var E,C,A,z,B,y,x,v,w,u,s,q,p;v=[];for(B=0;B<D.length;){y=B+1;q=p=w=null;for(s in aC){if(u=aC[s],A=function(){var H,G,F,n;F=[D.charAt(B),D.charAt(y)];n=[];H=0;for(G=F.length;H<G;H++){E=F[H],n.push(u.indexOf(E))}return n}(),z=A[0],A=A[1],-1<z&&-1<A&&(z=A-z,1===z||-1===z)){w=u;p=s;q=z;break}}if(w){for(;;){if(z=D.slice(y-1,+y+1||9000000000),x=z[0],C=z[1],A=function(){var n,H,G,F;G=[x,C];F=[];n=0;for(H=G.length;n<H;n++){E=G[n],F.push(u.indexOf(E))}return F}(),z=A[0],A=A[1],A-z===q){y+=1}else{2<y-B&&v.push({pattern:"sequence",i:B,j:y-1,token:D.slice(B,y),sequence_name:p,sequence_space:w.length,ascending:1===q});break}}}B=y}return v},function(n){var p,s,q;q=[];for(s in aj){p=aj[s],ap(q,l(n,p,s))}return q}]);aj={qwerty:al,dvorak:{"!":["`~",null,null,"2@","'\"",null],'"':[null,"1!","2@",",<","aA",null],"#":["2@",null,null,"4$",".>",",<"],$:["3#",null,null,"5%","pP",".>"],"%":["4$",null,null,"6^","yY","pP"],"&":["6^",null,null,"8*","gG","fF"],"'":[null,"1!","2@",",<","aA",null],"(":["8*",null,null,"0)","rR","cC"],")":["9(",null,null,"[{","lL","rR"],"*":["7&",null,null,"9(","cC","gG"],"+":["/?","]}",null,"\\|",null,"-_"],",":"'\",2@,3#,.>,oO,aA".split(","),"-":["sS","/?","=+",null,null,"zZ"],".":",< 3# 4$ pP eE oO".split(" "),"/":"lL,[{,]},=+,-_,sS".split(","),"0":["9(",null,null,"[{","lL","rR"],1:["`~",null,null,"2@","'\"",null],2:["1!",null,null,"3#",",<","'\""],3:["2@",null,null,"4$",".>",",<"],4:["3#",null,null,"5%","pP",".>"],5:["4$",null,null,"6^","yY","pP"],6:["5%",null,null,"7&","fF","yY"],7:["6^",null,null,"8*","gG","fF"],8:["7&",null,null,"9(","cC","gG"],9:["8*",null,null,"0)","rR","cC"],":":[null,"aA","oO","qQ",null,null],";":[null,"aA","oO","qQ",null,null],"<":"'\",2@,3#,.>,oO,aA".split(","),"=":["/?","]}",null,"\\|",null,"-_"],">":",< 3# 4$ pP eE oO".split(" "),"?":"lL,[{,]},=+,-_,sS".split(","),"@":["1!",null,null,"3#",",<","'\""],A:[null,"'\"",",<","oO",";:",null],B:["xX","dD","hH","mM",null,null],C:"gG,8*,9(,rR,tT,hH".split(","),D:"iI,fF,gG,hH,bB,xX".split(","),E:"oO,.>,pP,uU,jJ,qQ".split(","),F:"yY,6^,7&,gG,dD,iI".split(","),G:"fF,7&,8*,cC,hH,dD".split(","),H:"dD,gG,cC,tT,mM,bB".split(","),I:"uU,yY,fF,dD,xX,kK".split(","),J:["qQ","eE","uU","kK",null,null],K:["jJ","uU","iI","xX",null,null],L:"rR,0),[{,/?,sS,nN".split(","),M:["bB","hH","tT","wW",null,null],N:"tT,rR,lL,sS,vV,wW".split(","),O:"aA ,< .> eE qQ ;:".split(" "),P:".>,4$,5%,yY,uU,eE".split(","),Q:[";:","oO","eE","jJ",null,null],R:"cC,9(,0),lL,nN,tT".split(","),S:"nN,lL,/?,-_,zZ,vV".split(","),T:"hH,cC,rR,nN,wW,mM".split(","),U:"eE,pP,yY,iI,kK,jJ".split(","),V:["wW","nN","sS","zZ",null,null],W:["mM","tT","nN","vV",null,null],X:["kK","iI","dD","bB",null,null],Y:"pP,5%,6^,fF,iI,uU".split(","),Z:["vV","sS","-_",null,null,null],"[":["0)",null,null,"]}","/?","lL"],"\\":["=+",null,null,null,null,null],"]":["[{",null,null,null,"=+","/?"],"^":["5%",null,null,"7&","fF","yY"],_:["sS","/?","=+",null,null,"zZ"],"`":[null,null,null,"1!",null,null],a:[null,"'\"",",<","oO",";:",null],b:["xX","dD","hH","mM",null,null],c:"gG,8*,9(,rR,tT,hH".split(","),d:"iI,fF,gG,hH,bB,xX".split(","),e:"oO,.>,pP,uU,jJ,qQ".split(","),f:"yY,6^,7&,gG,dD,iI".split(","),g:"fF,7&,8*,cC,hH,dD".split(","),h:"dD,gG,cC,tT,mM,bB".split(","),i:"uU,yY,fF,dD,xX,kK".split(","),j:["qQ","eE","uU","kK",null,null],k:["jJ","uU","iI","xX",null,null],l:"rR,0),[{,/?,sS,nN".split(","),m:["bB","hH","tT","wW",null,null],n:"tT,rR,lL,sS,vV,wW".split(","),o:"aA ,< .> eE qQ ;:".split(" "),p:".>,4$,5%,yY,uU,eE".split(","),q:[";:","oO","eE","jJ",null,null],r:"cC,9(,0),lL,nN,tT".split(","),s:"nN,lL,/?,-_,zZ,vV".split(","),t:"hH,cC,rR,nN,wW,mM".split(","),u:"eE,pP,yY,iI,kK,jJ".split(","),v:["wW","nN","sS","zZ",null,null],w:["mM","tT","nN","vV",null,null],x:["kK","iI","dD","bB",null,null],y:"pP,5%,6^,fF,iI,uU".split(","),z:["vV","sS","-_",null,null,null],"{":["0)",null,null,"]}","/?","lL"],"|":["=+",null,null,null,null,null],"}":["[{",null,null,null,"=+","/?"],"~":[null,null,null,"1!",null,null]},keypad:ak,mac_keypad:{"*":["/",null,null,null,null,null,"-","9"],"+":["6","9","-",null,null,null,null,"3"],"-":["9","/","*",null,null,null,"+","6"],".":["0","2","3",null,null,null,null,null],"/":["=",null,null,null,"*","-","9","8"],"0":[null,"1","2","3",".",null,null,null],1:[null,null,"4","5","2","0",null,null],2:["1","4","5","6","3",".","0",null],3:["2","5","6","+",null,null,".","0"],4:[null,null,"7","8","5","2","1",null],5:"4,7,8,9,6,3,2,1".split(","),6:["5","8","9","-","+",null,"3","2"],7:[null,null,null,"=","8","5","4",null],8:["7",null,"=","/","9","6","5","4"],9:"8,=,/,*,-,+,6,5".split(","),"=":[null,null,null,null,"/","9","8","7"]}};aI=function(n){var p,v,s,q,u;p=0;for(s in n){u=n[s],p+=function(){var x,w,y;y=[];x=0;for(w=u.length;x<w;x++){(q=u[x])&&y.push(q)}return y}().length}return p/=function(){var w;w=[];for(v in n){w.push(v)}return w}().length};aG=aI(al);j=aI(ak);g=function(){var n;n=[];for(aD in al){n.push(aD)}return n}().length;aw=function(){var n;n=[];for(aD in ak){n.push(aD)}return n}().length;ai=function(){return(new Date).getTime()};aI=function(n,p){var s,q;null==p&&(p=[]);q=ai();s=r(n,aJ.concat([aM("user_inputs",aK(p.map(function(u){return u.toLowerCase()})))]));s=aA(n,s);s.calc_time=ai()-q;return s};"undefined"!==typeof window&&null!==window?(window.zxcvbn=aI,"function"===typeof window.zxcvbn_load_hook&&window.zxcvbn_load_hook()):"undefined"!==typeof exports&&null!==exports&&(exports.zxcvbn=aI)})();
src/components/SettingsDictionaries.js
rsimmons/voracious
import React, { Component } from 'react'; import Button from './Button'; import './SettingsDictionaries.css'; export default class SettingsDictionaries extends Component { handleMove = (idx, direction) => { const names = [...this.props.dictionaries.keys()]; if (direction === -1) { if (idx === 0) { throw new Error('Can\'t move first one up'); } [names[idx], names[idx-1]] = [names[idx-1], names[idx]]; } else if (direction === 1) { if (idx === (names.length-1)) { throw new Error('Can\'t move last one down'); } [names[idx], names[idx+1]] = [names[idx+1], names[idx]]; } else { throw new Error('Bad direction'); } this.props.onSetDictionaryOrder(names); }; handleDelete = (name) => { if (window.confirm('Are you sure you want to delete "' + name + '"?')) { this.props.onDeleteDictionary(name); } }; render() { const {history, dictionaries, disabledDictionaries} = this.props; return ( <div> <ul className="SettingsDictionaries-dict-list">{[...dictionaries.entries()].map(([name, info], idx) => ( <li key={name}>&middot; <span className={disabledDictionaries.has(name) ? 'SettingsDictionaries-name-disabled' : ''}>{name}</span> {disabledDictionaries.has(name) ? ( <button onClick={() => { this.props.onEnableDictionary(name); }}>Enable</button> ) : ( <button onClick={() => { this.props.onDisableDictionary(name); }}>Disable</button> )} {dictionaries.size > 1 ? ( <span><button onClick={() => { this.handleMove(idx, -1); }} disabled={idx === 0}>Move Up</button> <button onClick={() => { this.handleMove(idx, 1); }} disabled={idx === (dictionaries.size-1)}>Move Down</button></span> ) : null } {info.builtin ? ( <span className="SettingsDictionaries-builtin-tag">(built-in)</span> ) : ( <button onClick={() => { this.handleDelete(name); }}>Delete</button> )}</li> ))}</ul> <Button onClick={() => {history.push('/import_epwing'); }}>Import EPWING Dictionary</Button> </div> ); } }
ajax/libs/angular.js/1.0.0rc6/angular-scenario.js
nolsherry/cdnjs
/*! * jQuery JavaScript Library v1.7.2 * http://jquery.com/ * * Copyright 2011, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * Includes Sizzle.js * http://sizzlejs.com/ * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * * Date: Wed Mar 21 12:46:34 2012 -0700 */ (function( window, undefined ) { 'use strict'; // Use the correct document accordingly with window argument (sandbox) var document = window.document, navigator = window.navigator, location = window.location; var jQuery = (function() { // Define a local copy of jQuery var jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context, rootjQuery ); }, // Map over jQuery in case of overwrite _jQuery = window.jQuery, // Map over the $ in case of overwrite _$ = window.$, // A central reference to the root jQuery(document) rootjQuery, // A simple way to check for HTML strings or ID strings // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, // Check if a string has a non-whitespace character in it rnotwhite = /\S/, // Used for trimming whitespace trimLeft = /^\s+/, trimRight = /\s+$/, // Match a standalone tag rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, // JSON RegExp rvalidchars = /^[\],:{}\s]*$/, rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, // Useragent RegExp rwebkit = /(webkit)[ \/]([\w.]+)/, ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, rmsie = /(msie) ([\w.]+)/, rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, // Matches dashed string for camelizing rdashAlpha = /-([a-z]|[0-9])/ig, rmsPrefix = /^-ms-/, // Used by jQuery.camelCase as callback to replace() fcamelCase = function( all, letter ) { return ( letter + "" ).toUpperCase(); }, // Keep a UserAgent string for use with jQuery.browser userAgent = navigator.userAgent, // For matching the engine and version of the browser browserMatch, // The deferred used on DOM ready readyList, // The ready event handler DOMContentLoaded, // Save a reference to some core methods toString = Object.prototype.toString, hasOwn = Object.prototype.hasOwnProperty, push = Array.prototype.push, slice = Array.prototype.slice, trim = String.prototype.trim, indexOf = Array.prototype.indexOf, // [[Class]] -> type pairs class2type = {}; jQuery.fn = jQuery.prototype = { constructor: jQuery, init: function( selector, context, rootjQuery ) { var match, elem, ret, doc; // Handle $(""), $(null), or $(undefined) if ( !selector ) { return this; } // Handle $(DOMElement) if ( selector.nodeType ) { this.context = this[0] = selector; this.length = 1; return this; } // The body element only exists once, optimize finding it if ( selector === "body" && !context && document.body ) { this.context = document; this[0] = document.body; this.selector = selector; this.length = 1; return this; } // Handle HTML strings if ( typeof selector === "string" ) { // Are we dealing with HTML string or an ID? if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { // Assume that strings that start and end with <> are HTML and skip the regex check match = [ null, selector, null ]; } else { match = quickExpr.exec( selector ); } // Verify a match, and that no context was specified for #id if ( match && (match[1] || !context) ) { // HANDLE: $(html) -> $(array) if ( match[1] ) { context = context instanceof jQuery ? context[0] : context; doc = ( context ? context.ownerDocument || context : document ); // If a single string is passed in and it's a single tag // just do a createElement and skip the rest ret = rsingleTag.exec( selector ); if ( ret ) { if ( jQuery.isPlainObject( context ) ) { selector = [ document.createElement( ret[1] ) ]; jQuery.fn.attr.call( selector, context, true ); } else { selector = [ doc.createElement( ret[1] ) ]; } } else { ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes; } return jQuery.merge( this, selector ); // HANDLE: $("#id") } else { elem = document.getElementById( match[2] ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 if ( elem && elem.parentNode ) { // Handle the case where IE and Opera return items // by name instead of ID if ( elem.id !== match[2] ) { return rootjQuery.find( selector ); } // Otherwise, we inject the element directly into the jQuery object this.length = 1; this[0] = elem; } this.context = document; this.selector = selector; return this; } // HANDLE: $(expr, $(...)) } else if ( !context || context.jquery ) { return ( context || rootjQuery ).find( selector ); // HANDLE: $(expr, context) // (which is just equivalent to: $(context).find(expr) } else { return this.constructor( context ).find( selector ); } // HANDLE: $(function) // Shortcut for document ready } else if ( jQuery.isFunction( selector ) ) { return rootjQuery.ready( selector ); } if ( selector.selector !== undefined ) { this.selector = selector.selector; this.context = selector.context; } return jQuery.makeArray( selector, this ); }, // Start with an empty selector selector: "", // The current version of jQuery being used jquery: "1.7.2", // The default length of a jQuery object is 0 length: 0, // The number of elements contained in the matched element set size: function() { return this.length; }, toArray: function() { return slice.call( this, 0 ); }, // Get the Nth element in the matched element set OR // Get the whole matched element set as a clean array get: function( num ) { return num == null ? // Return a 'clean' array this.toArray() : // Return just the object ( num < 0 ? this[ this.length + num ] : this[ num ] ); }, // Take an array of elements and push it onto the stack // (returning the new matched element set) pushStack: function( elems, name, selector ) { // Build a new jQuery matched element set var ret = this.constructor(); if ( jQuery.isArray( elems ) ) { push.apply( ret, elems ); } else { jQuery.merge( ret, elems ); } // Add the old object onto the stack (as a reference) ret.prevObject = this; ret.context = this.context; if ( name === "find" ) { ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; } else if ( name ) { ret.selector = this.selector + "." + name + "(" + selector + ")"; } // Return the newly-formed element set return ret; }, // Execute a callback for every element in the matched set. // (You can seed the arguments with an array of args, but this is // only used internally.) each: function( callback, args ) { return jQuery.each( this, callback, args ); }, ready: function( fn ) { // Attach the listeners jQuery.bindReady(); // Add the callback readyList.add( fn ); return this; }, eq: function( i ) { i = +i; return i === -1 ? this.slice( i ) : this.slice( i, i + 1 ); }, first: function() { return this.eq( 0 ); }, last: function() { return this.eq( -1 ); }, slice: function() { return this.pushStack( slice.apply( this, arguments ), "slice", slice.call(arguments).join(",") ); }, map: function( callback ) { return this.pushStack( jQuery.map(this, function( elem, i ) { return callback.call( elem, i, elem ); })); }, end: function() { return this.prevObject || this.constructor(null); }, // For internal use only. // Behaves like an Array's method, not like a jQuery method. push: push, sort: [].sort, splice: [].splice }; // Give the init function the jQuery prototype for later instantiation jQuery.fn.init.prototype = jQuery.fn; jQuery.extend = jQuery.fn.extend = function() { var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false; // Handle a deep copy situation if ( typeof target === "boolean" ) { deep = target; target = arguments[1] || {}; // skip the boolean and the target i = 2; } // Handle case when target is a string or something (possible in deep copy) if ( typeof target !== "object" && !jQuery.isFunction(target) ) { target = {}; } // extend jQuery itself if only one argument is passed if ( length === i ) { target = this; --i; } for ( ; i < length; i++ ) { // Only deal with non-null/undefined values if ( (options = arguments[ i ]) != null ) { // Extend the base object for ( name in options ) { src = target[ name ]; copy = options[ name ]; // Prevent never-ending loop if ( target === copy ) { continue; } // Recurse if we're merging plain objects or arrays if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { if ( copyIsArray ) { copyIsArray = false; clone = src && jQuery.isArray(src) ? src : []; } else { clone = src && jQuery.isPlainObject(src) ? src : {}; } // Never move original objects, clone them target[ name ] = jQuery.extend( deep, clone, copy ); // Don't bring in undefined values } else if ( copy !== undefined ) { target[ name ] = copy; } } } } // Return the modified object return target; }; jQuery.extend({ noConflict: function( deep ) { if ( window.$ === jQuery ) { window.$ = _$; } if ( deep && window.jQuery === jQuery ) { window.jQuery = _jQuery; } return jQuery; }, // Is the DOM ready to be used? Set to true once it occurs. isReady: false, // A counter to track how many items to wait for before // the ready event fires. See #6781 readyWait: 1, // Hold (or release) the ready event holdReady: function( hold ) { if ( hold ) { jQuery.readyWait++; } else { jQuery.ready( true ); } }, // Handle when the DOM is ready ready: function( wait ) { // Either a released hold or an DOMready/load event and not yet ready if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) { // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). if ( !document.body ) { return setTimeout( jQuery.ready, 1 ); } // Remember that the DOM is ready jQuery.isReady = true; // If a normal DOM Ready event fired, decrement, and wait if need be if ( wait !== true && --jQuery.readyWait > 0 ) { return; } // If there are functions bound, to execute readyList.fireWith( document, [ jQuery ] ); // Trigger any bound ready events if ( jQuery.fn.trigger ) { jQuery( document ).trigger( "ready" ).off( "ready" ); } } }, bindReady: function() { if ( readyList ) { return; } readyList = jQuery.Callbacks( "once memory" ); // Catch cases where $(document).ready() is called after the // browser event has already occurred. if ( document.readyState === "complete" ) { // Handle it asynchronously to allow scripts the opportunity to delay ready return setTimeout( jQuery.ready, 1 ); } // Mozilla, Opera and webkit nightlies currently support this event if ( document.addEventListener ) { // Use the handy event callback document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); // A fallback to window.onload, that will always work window.addEventListener( "load", jQuery.ready, false ); // If IE event model is used } else if ( document.attachEvent ) { // ensure firing before onload, // maybe late but safe also for iframes document.attachEvent( "onreadystatechange", DOMContentLoaded ); // A fallback to window.onload, that will always work window.attachEvent( "onload", jQuery.ready ); // If IE and not a frame // continually check to see if the document is ready var toplevel = false; try { toplevel = window.frameElement == null; } catch(e) {} if ( document.documentElement.doScroll && toplevel ) { doScrollCheck(); } } }, // See test/unit/core.js for details concerning isFunction. // Since version 1.3, DOM methods and functions like alert // aren't supported. They return false on IE (#2968). isFunction: function( obj ) { return jQuery.type(obj) === "function"; }, isArray: Array.isArray || function( obj ) { return jQuery.type(obj) === "array"; }, isWindow: function( obj ) { return obj != null && obj == obj.window; }, isNumeric: function( obj ) { return !isNaN( parseFloat(obj) ) && isFinite( obj ); }, type: function( obj ) { return obj == null ? String( obj ) : class2type[ toString.call(obj) ] || "object"; }, isPlainObject: function( obj ) { // Must be an Object. // Because of IE, we also have to check the presence of the constructor property. // Make sure that DOM nodes and window objects don't pass through, as well if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { return false; } try { // Not own constructor property must be Object if ( obj.constructor && !hasOwn.call(obj, "constructor") && !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { return false; } } catch ( e ) { // IE8,9 Will throw exceptions on certain host objects #9897 return false; } // Own properties are enumerated firstly, so to speed up, // if last one is own, then all properties are own. var key; for ( key in obj ) {} return key === undefined || hasOwn.call( obj, key ); }, isEmptyObject: function( obj ) { for ( var name in obj ) { return false; } return true; }, error: function( msg ) { throw new Error( msg ); }, parseJSON: function( data ) { if ( typeof data !== "string" || !data ) { return null; } // Make sure leading/trailing whitespace is removed (IE can't handle it) data = jQuery.trim( data ); // Attempt to parse using the native JSON parser first if ( window.JSON && window.JSON.parse ) { return window.JSON.parse( data ); } // Make sure the incoming data is actual JSON // Logic borrowed from http://json.org/json2.js if ( rvalidchars.test( data.replace( rvalidescape, "@" ) .replace( rvalidtokens, "]" ) .replace( rvalidbraces, "")) ) { return ( new Function( "return " + data ) )(); } jQuery.error( "Invalid JSON: " + data ); }, // Cross-browser xml parsing parseXML: function( data ) { if ( typeof data !== "string" || !data ) { return null; } var xml, tmp; try { if ( window.DOMParser ) { // Standard tmp = new DOMParser(); xml = tmp.parseFromString( data , "text/xml" ); } else { // IE xml = new ActiveXObject( "Microsoft.XMLDOM" ); xml.async = "false"; xml.loadXML( data ); } } catch( e ) { xml = undefined; } if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { jQuery.error( "Invalid XML: " + data ); } return xml; }, noop: function() {}, // Evaluates a script in a global context // Workarounds based on findings by Jim Driscoll // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context globalEval: function( data ) { if ( data && rnotwhite.test( data ) ) { // We use execScript on Internet Explorer // We use an anonymous function so that context is window // rather than jQuery in Firefox ( window.execScript || function( data ) { window[ "eval" ].call( window, data ); } )( data ); } }, // Convert dashed to camelCase; used by the css and data modules // Microsoft forgot to hump their vendor prefix (#9572) camelCase: function( string ) { return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); }, nodeName: function( elem, name ) { return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); }, // args is for internal usage only each: function( object, callback, args ) { var name, i = 0, length = object.length, isObj = length === undefined || jQuery.isFunction( object ); if ( args ) { if ( isObj ) { for ( name in object ) { if ( callback.apply( object[ name ], args ) === false ) { break; } } } else { for ( ; i < length; ) { if ( callback.apply( object[ i++ ], args ) === false ) { break; } } } // A special, fast, case for the most common use of each } else { if ( isObj ) { for ( name in object ) { if ( callback.call( object[ name ], name, object[ name ] ) === false ) { break; } } } else { for ( ; i < length; ) { if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) { break; } } } } return object; }, // Use native String.trim function wherever possible trim: trim ? function( text ) { return text == null ? "" : trim.call( text ); } : // Otherwise use our own trimming functionality function( text ) { return text == null ? "" : text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); }, // results is for internal usage only makeArray: function( array, results ) { var ret = results || []; if ( array != null ) { // The window, strings (and functions) also have 'length' // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 var type = jQuery.type( array ); if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { push.call( ret, array ); } else { jQuery.merge( ret, array ); } } return ret; }, inArray: function( elem, array, i ) { var len; if ( array ) { if ( indexOf ) { return indexOf.call( array, elem, i ); } len = array.length; i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; for ( ; i < len; i++ ) { // Skip accessing in sparse arrays if ( i in array && array[ i ] === elem ) { return i; } } } return -1; }, merge: function( first, second ) { var i = first.length, j = 0; if ( typeof second.length === "number" ) { for ( var l = second.length; j < l; j++ ) { first[ i++ ] = second[ j ]; } } else { while ( second[j] !== undefined ) { first[ i++ ] = second[ j++ ]; } } first.length = i; return first; }, grep: function( elems, callback, inv ) { var ret = [], retVal; inv = !!inv; // Go through the array, only saving the items // that pass the validator function for ( var i = 0, length = elems.length; i < length; i++ ) { retVal = !!callback( elems[ i ], i ); if ( inv !== retVal ) { ret.push( elems[ i ] ); } } return ret; }, // arg is for internal usage only map: function( elems, callback, arg ) { var value, key, ret = [], i = 0, length = elems.length, // jquery objects are treated as arrays isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; // Go through the array, translating each of the items to their if ( isArray ) { for ( ; i < length; i++ ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret[ ret.length ] = value; } } // Go through every key on the object, } else { for ( key in elems ) { value = callback( elems[ key ], key, arg ); if ( value != null ) { ret[ ret.length ] = value; } } } // Flatten any nested arrays return ret.concat.apply( [], ret ); }, // A global GUID counter for objects guid: 1, // Bind a function to a context, optionally partially applying any // arguments. proxy: function( fn, context ) { if ( typeof context === "string" ) { var tmp = fn[ context ]; context = fn; fn = tmp; } // Quick check to determine if target is callable, in the spec // this throws a TypeError, but we will just return undefined. if ( !jQuery.isFunction( fn ) ) { return undefined; } // Simulated bind var args = slice.call( arguments, 2 ), proxy = function() { return fn.apply( context, args.concat( slice.call( arguments ) ) ); }; // Set the guid of unique handler to the same of original handler, so it can be removed proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; return proxy; }, // Mutifunctional method to get and set values to a collection // The value/s can optionally be executed if it's a function access: function( elems, fn, key, value, chainable, emptyGet, pass ) { var exec, bulk = key == null, i = 0, length = elems.length; // Sets many values if ( key && typeof key === "object" ) { for ( i in key ) { jQuery.access( elems, fn, i, key[i], 1, emptyGet, value ); } chainable = 1; // Sets one value } else if ( value !== undefined ) { // Optionally, function values get executed if exec is true exec = pass === undefined && jQuery.isFunction( value ); if ( bulk ) { // Bulk operations only iterate when executing function values if ( exec ) { exec = fn; fn = function( elem, key, value ) { return exec.call( jQuery( elem ), value ); }; // Otherwise they run against the entire set } else { fn.call( elems, value ); fn = null; } } if ( fn ) { for (; i < length; i++ ) { fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); } } chainable = 1; } return chainable ? elems : // Gets bulk ? fn.call( elems ) : length ? fn( elems[0], key ) : emptyGet; }, now: function() { return ( new Date() ).getTime(); }, // Use of jQuery.browser is frowned upon. // More details: http://docs.jquery.com/Utilities/jQuery.browser uaMatch: function( ua ) { ua = ua.toLowerCase(); var match = rwebkit.exec( ua ) || ropera.exec( ua ) || rmsie.exec( ua ) || ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || []; return { browser: match[1] || "", version: match[2] || "0" }; }, sub: function() { function jQuerySub( selector, context ) { return new jQuerySub.fn.init( selector, context ); } jQuery.extend( true, jQuerySub, this ); jQuerySub.superclass = this; jQuerySub.fn = jQuerySub.prototype = this(); jQuerySub.fn.constructor = jQuerySub; jQuerySub.sub = this.sub; jQuerySub.fn.init = function init( selector, context ) { if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { context = jQuerySub( context ); } return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); }; jQuerySub.fn.init.prototype = jQuerySub.fn; var rootjQuerySub = jQuerySub(document); return jQuerySub; }, browser: {} }); // Populate the class2type map jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { class2type[ "[object " + name + "]" ] = name.toLowerCase(); }); browserMatch = jQuery.uaMatch( userAgent ); if ( browserMatch.browser ) { jQuery.browser[ browserMatch.browser ] = true; jQuery.browser.version = browserMatch.version; } // Deprecated, use jQuery.browser.webkit instead if ( jQuery.browser.webkit ) { jQuery.browser.safari = true; } // IE doesn't match non-breaking spaces with \s if ( rnotwhite.test( "\xA0" ) ) { trimLeft = /^[\s\xA0]+/; trimRight = /[\s\xA0]+$/; } // All jQuery objects should point back to these rootjQuery = jQuery(document); // Cleanup functions for the document ready method if ( document.addEventListener ) { DOMContentLoaded = function() { document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); jQuery.ready(); }; } else if ( document.attachEvent ) { DOMContentLoaded = function() { // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). if ( document.readyState === "complete" ) { document.detachEvent( "onreadystatechange", DOMContentLoaded ); jQuery.ready(); } }; } // The DOM ready check for Internet Explorer function doScrollCheck() { if ( jQuery.isReady ) { return; } try { // If IE is used, use the trick by Diego Perini // http://javascript.nwbox.com/IEContentLoaded/ document.documentElement.doScroll("left"); } catch(e) { setTimeout( doScrollCheck, 1 ); return; } // and execute any waiting functions jQuery.ready(); } return jQuery; })(); // String to Object flags format cache var flagsCache = {}; // Convert String-formatted flags into Object-formatted ones and store in cache function createFlags( flags ) { var object = flagsCache[ flags ] = {}, i, length; flags = flags.split( /\s+/ ); for ( i = 0, length = flags.length; i < length; i++ ) { object[ flags[i] ] = true; } return object; } /* * Create a callback list using the following parameters: * * flags: an optional list of space-separated flags that will change how * the callback list behaves * * By default a callback list will act like an event callback list and can be * "fired" multiple times. * * Possible flags: * * once: will ensure the callback list can only be fired once (like a Deferred) * * memory: will keep track of previous values and will call any callback added * after the list has been fired right away with the latest "memorized" * values (like a Deferred) * * unique: will ensure a callback can only be added once (no duplicate in the list) * * stopOnFalse: interrupt callings when a callback returns false * */ jQuery.Callbacks = function( flags ) { // Convert flags from String-formatted to Object-formatted // (we check in cache first) flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {}; var // Actual callback list list = [], // Stack of fire calls for repeatable lists stack = [], // Last fire value (for non-forgettable lists) memory, // Flag to know if list was already fired fired, // Flag to know if list is currently firing firing, // First callback to fire (used internally by add and fireWith) firingStart, // End of the loop when firing firingLength, // Index of currently firing callback (modified by remove if needed) firingIndex, // Add one or several callbacks to the list add = function( args ) { var i, length, elem, type, actual; for ( i = 0, length = args.length; i < length; i++ ) { elem = args[ i ]; type = jQuery.type( elem ); if ( type === "array" ) { // Inspect recursively add( elem ); } else if ( type === "function" ) { // Add if not in unique mode and callback is not in if ( !flags.unique || !self.has( elem ) ) { list.push( elem ); } } } }, // Fire callbacks fire = function( context, args ) { args = args || []; memory = !flags.memory || [ context, args ]; fired = true; firing = true; firingIndex = firingStart || 0; firingStart = 0; firingLength = list.length; for ( ; list && firingIndex < firingLength; firingIndex++ ) { if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) { memory = true; // Mark as halted break; } } firing = false; if ( list ) { if ( !flags.once ) { if ( stack && stack.length ) { memory = stack.shift(); self.fireWith( memory[ 0 ], memory[ 1 ] ); } } else if ( memory === true ) { self.disable(); } else { list = []; } } }, // Actual Callbacks object self = { // Add a callback or a collection of callbacks to the list add: function() { if ( list ) { var length = list.length; add( arguments ); // Do we need to add the callbacks to the // current firing batch? if ( firing ) { firingLength = list.length; // With memory, if we're not firing then // we should call right away, unless previous // firing was halted (stopOnFalse) } else if ( memory && memory !== true ) { firingStart = length; fire( memory[ 0 ], memory[ 1 ] ); } } return this; }, // Remove a callback from the list remove: function() { if ( list ) { var args = arguments, argIndex = 0, argLength = args.length; for ( ; argIndex < argLength ; argIndex++ ) { for ( var i = 0; i < list.length; i++ ) { if ( args[ argIndex ] === list[ i ] ) { // Handle firingIndex and firingLength if ( firing ) { if ( i <= firingLength ) { firingLength--; if ( i <= firingIndex ) { firingIndex--; } } } // Remove the element list.splice( i--, 1 ); // If we have some unicity property then // we only need to do this once if ( flags.unique ) { break; } } } } } return this; }, // Control if a given callback is in the list has: function( fn ) { if ( list ) { var i = 0, length = list.length; for ( ; i < length; i++ ) { if ( fn === list[ i ] ) { return true; } } } return false; }, // Remove all callbacks from the list empty: function() { list = []; return this; }, // Have the list do nothing anymore disable: function() { list = stack = memory = undefined; return this; }, // Is it disabled? disabled: function() { return !list; }, // Lock the list in its current state lock: function() { stack = undefined; if ( !memory || memory === true ) { self.disable(); } return this; }, // Is it locked? locked: function() { return !stack; }, // Call all callbacks with the given context and arguments fireWith: function( context, args ) { if ( stack ) { if ( firing ) { if ( !flags.once ) { stack.push( [ context, args ] ); } } else if ( !( flags.once && memory ) ) { fire( context, args ); } } return this; }, // Call all the callbacks with the given arguments fire: function() { self.fireWith( this, arguments ); return this; }, // To know if the callbacks have already been called at least once fired: function() { return !!fired; } }; return self; }; var // Static reference to slice sliceDeferred = [].slice; jQuery.extend({ Deferred: function( func ) { var doneList = jQuery.Callbacks( "once memory" ), failList = jQuery.Callbacks( "once memory" ), progressList = jQuery.Callbacks( "memory" ), state = "pending", lists = { resolve: doneList, reject: failList, notify: progressList }, promise = { done: doneList.add, fail: failList.add, progress: progressList.add, state: function() { return state; }, // Deprecated isResolved: doneList.fired, isRejected: failList.fired, then: function( doneCallbacks, failCallbacks, progressCallbacks ) { deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks ); return this; }, always: function() { deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments ); return this; }, pipe: function( fnDone, fnFail, fnProgress ) { return jQuery.Deferred(function( newDefer ) { jQuery.each( { done: [ fnDone, "resolve" ], fail: [ fnFail, "reject" ], progress: [ fnProgress, "notify" ] }, function( handler, data ) { var fn = data[ 0 ], action = data[ 1 ], returned; if ( jQuery.isFunction( fn ) ) { deferred[ handler ](function() { returned = fn.apply( this, arguments ); if ( returned && jQuery.isFunction( returned.promise ) ) { returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify ); } else { newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); } }); } else { deferred[ handler ]( newDefer[ action ] ); } }); }).promise(); }, // Get a promise for this deferred // If obj is provided, the promise aspect is added to the object promise: function( obj ) { if ( obj == null ) { obj = promise; } else { for ( var key in promise ) { obj[ key ] = promise[ key ]; } } return obj; } }, deferred = promise.promise({}), key; for ( key in lists ) { deferred[ key ] = lists[ key ].fire; deferred[ key + "With" ] = lists[ key ].fireWith; } // Handle state deferred.done( function() { state = "resolved"; }, failList.disable, progressList.lock ).fail( function() { state = "rejected"; }, doneList.disable, progressList.lock ); // Call given func if any if ( func ) { func.call( deferred, deferred ); } // All done! return deferred; }, // Deferred helper when: function( firstParam ) { var args = sliceDeferred.call( arguments, 0 ), i = 0, length = args.length, pValues = new Array( length ), count = length, pCount = length, deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ? firstParam : jQuery.Deferred(), promise = deferred.promise(); function resolveFunc( i ) { return function( value ) { args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; if ( !( --count ) ) { deferred.resolveWith( deferred, args ); } }; } function progressFunc( i ) { return function( value ) { pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; deferred.notifyWith( promise, pValues ); }; } if ( length > 1 ) { for ( ; i < length; i++ ) { if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) { args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) ); } else { --count; } } if ( !count ) { deferred.resolveWith( deferred, args ); } } else if ( deferred !== firstParam ) { deferred.resolveWith( deferred, length ? [ firstParam ] : [] ); } return promise; } }); jQuery.support = (function() { var support, all, a, select, opt, input, fragment, tds, events, eventName, i, isSupported, div = document.createElement( "div" ), documentElement = document.documentElement; // Preliminary tests div.setAttribute("className", "t"); div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>"; all = div.getElementsByTagName( "*" ); a = div.getElementsByTagName( "a" )[ 0 ]; // Can't get basic test support if ( !all || !all.length || !a ) { return {}; } // First batch of supports tests select = document.createElement( "select" ); opt = select.appendChild( document.createElement("option") ); input = div.getElementsByTagName( "input" )[ 0 ]; support = { // IE strips leading whitespace when .innerHTML is used leadingWhitespace: ( div.firstChild.nodeType === 3 ), // Make sure that tbody elements aren't automatically inserted // IE will insert them into empty tables tbody: !div.getElementsByTagName("tbody").length, // Make sure that link elements get serialized correctly by innerHTML // This requires a wrapper element in IE htmlSerialize: !!div.getElementsByTagName("link").length, // Get the style information from getAttribute // (IE uses .cssText instead) style: /top/.test( a.getAttribute("style") ), // Make sure that URLs aren't manipulated // (IE normalizes it by default) hrefNormalized: ( a.getAttribute("href") === "/a" ), // Make sure that element opacity exists // (IE uses filter instead) // Use a regex to work around a WebKit issue. See #5145 opacity: /^0.55/.test( a.style.opacity ), // Verify style float existence // (IE uses styleFloat instead of cssFloat) cssFloat: !!a.style.cssFloat, // Make sure that if no value is specified for a checkbox // that it defaults to "on". // (WebKit defaults to "" instead) checkOn: ( input.value === "on" ), // Make sure that a selected-by-default option has a working selected property. // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) optSelected: opt.selected, // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) getSetAttribute: div.className !== "t", // Tests for enctype support on a form(#6743) enctype: !!document.createElement("form").enctype, // Makes sure cloning an html5 element does not cause problems // Where outerHTML is undefined, this still works html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>", // Will be defined later submitBubbles: true, changeBubbles: true, focusinBubbles: false, deleteExpando: true, noCloneEvent: true, inlineBlockNeedsLayout: false, shrinkWrapBlocks: false, reliableMarginRight: true, pixelMargin: true }; // jQuery.boxModel DEPRECATED in 1.3, use jQuery.support.boxModel instead jQuery.boxModel = support.boxModel = (document.compatMode === "CSS1Compat"); // Make sure checked status is properly cloned input.checked = true; support.noCloneChecked = input.cloneNode( true ).checked; // Make sure that the options inside disabled selects aren't marked as disabled // (WebKit marks them as disabled) select.disabled = true; support.optDisabled = !opt.disabled; // Test to see if it's possible to delete an expando from an element // Fails in Internet Explorer try { delete div.test; } catch( e ) { support.deleteExpando = false; } if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { div.attachEvent( "onclick", function() { // Cloning a node shouldn't copy over any // bound event handlers (IE does this) support.noCloneEvent = false; }); div.cloneNode( true ).fireEvent( "onclick" ); } // Check if a radio maintains its value // after being appended to the DOM input = document.createElement("input"); input.value = "t"; input.setAttribute("type", "radio"); support.radioValue = input.value === "t"; input.setAttribute("checked", "checked"); // #11217 - WebKit loses check when the name is after the checked attribute input.setAttribute( "name", "t" ); div.appendChild( input ); fragment = document.createDocumentFragment(); fragment.appendChild( div.lastChild ); // WebKit doesn't clone checked state correctly in fragments support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; // Check if a disconnected checkbox will retain its checked // value of true after appended to the DOM (IE6/7) support.appendChecked = input.checked; fragment.removeChild( input ); fragment.appendChild( div ); // Technique from Juriy Zaytsev // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ // We only care about the case where non-standard event systems // are used, namely in IE. Short-circuiting here helps us to // avoid an eval call (in setAttribute) which can cause CSP // to go haywire. See: https://developer.mozilla.org/en/Security/CSP if ( div.attachEvent ) { for ( i in { submit: 1, change: 1, focusin: 1 }) { eventName = "on" + i; isSupported = ( eventName in div ); if ( !isSupported ) { div.setAttribute( eventName, "return;" ); isSupported = ( typeof div[ eventName ] === "function" ); } support[ i + "Bubbles" ] = isSupported; } } fragment.removeChild( div ); // Null elements to avoid leaks in IE fragment = select = opt = div = input = null; // Run tests that need a body at doc ready jQuery(function() { var container, outer, inner, table, td, offsetSupport, marginDiv, conMarginTop, style, html, positionTopLeftWidthHeight, paddingMarginBorderVisibility, paddingMarginBorder, body = document.getElementsByTagName("body")[0]; if ( !body ) { // Return for frameset docs that don't have a body return; } conMarginTop = 1; paddingMarginBorder = "padding:0;margin:0;border:"; positionTopLeftWidthHeight = "position:absolute;top:0;left:0;width:1px;height:1px;"; paddingMarginBorderVisibility = paddingMarginBorder + "0;visibility:hidden;"; style = "style='" + positionTopLeftWidthHeight + paddingMarginBorder + "5px solid #000;"; html = "<div " + style + "display:block;'><div style='" + paddingMarginBorder + "0;display:block;overflow:hidden;'></div></div>" + "<table " + style + "' cellpadding='0' cellspacing='0'>" + "<tr><td></td></tr></table>"; container = document.createElement("div"); container.style.cssText = paddingMarginBorderVisibility + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px"; body.insertBefore( container, body.firstChild ); // Construct the test element div = document.createElement("div"); container.appendChild( div ); // Check if table cells still have offsetWidth/Height when they are set // to display:none and there are still other visible table cells in a // table row; if so, offsetWidth/Height are not reliable for use when // determining if an element has been hidden directly using // display:none (it is still safe to use offsets if a parent element is // hidden; don safety goggles and see bug #4512 for more information). // (only IE 8 fails this test) div.innerHTML = "<table><tr><td style='" + paddingMarginBorder + "0;display:none'></td><td>t</td></tr></table>"; tds = div.getElementsByTagName( "td" ); isSupported = ( tds[ 0 ].offsetHeight === 0 ); tds[ 0 ].style.display = ""; tds[ 1 ].style.display = "none"; // Check if empty table cells still have offsetWidth/Height // (IE <= 8 fail this test) support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); // Check if div with explicit width and no margin-right incorrectly // gets computed margin-right based on width of container. For more // info see bug #3333 // Fails in WebKit before Feb 2011 nightlies // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right if ( window.getComputedStyle ) { div.innerHTML = ""; marginDiv = document.createElement( "div" ); marginDiv.style.width = "0"; marginDiv.style.marginRight = "0"; div.style.width = "2px"; div.appendChild( marginDiv ); support.reliableMarginRight = ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0; } if ( typeof div.style.zoom !== "undefined" ) { // Check if natively block-level elements act like inline-block // elements when setting their display to 'inline' and giving // them layout // (IE < 8 does this) div.innerHTML = ""; div.style.width = div.style.padding = "1px"; div.style.border = 0; div.style.overflow = "hidden"; div.style.display = "inline"; div.style.zoom = 1; support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); // Check if elements with layout shrink-wrap their children // (IE 6 does this) div.style.display = "block"; div.style.overflow = "visible"; div.innerHTML = "<div style='width:5px;'></div>"; support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); } div.style.cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility; div.innerHTML = html; outer = div.firstChild; inner = outer.firstChild; td = outer.nextSibling.firstChild.firstChild; offsetSupport = { doesNotAddBorder: ( inner.offsetTop !== 5 ), doesAddBorderForTableAndCells: ( td.offsetTop === 5 ) }; inner.style.position = "fixed"; inner.style.top = "20px"; // safari subtracts parent border width here which is 5px offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 ); inner.style.position = inner.style.top = ""; outer.style.overflow = "hidden"; outer.style.position = "relative"; offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 ); offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop ); if ( window.getComputedStyle ) { div.style.marginTop = "1%"; support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== "1%"; } if ( typeof container.style.zoom !== "undefined" ) { container.style.zoom = 1; } body.removeChild( container ); marginDiv = div = container = null; jQuery.extend( support, offsetSupport ); }); return support; })(); var rbrace = /^(?:\{.*\}|\[.*\])$/, rmultiDash = /([A-Z])/g; jQuery.extend({ cache: {}, // Please use with caution uuid: 0, // Unique for each copy of jQuery on the page // Non-digits removed to match rinlinejQuery expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), // The following elements throw uncatchable exceptions if you // attempt to add expando properties to them. noData: { "embed": true, // Ban all objects except for Flash (which handle expandos) "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", "applet": true }, hasData: function( elem ) { elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; return !!elem && !isEmptyDataObject( elem ); }, data: function( elem, name, data, pvt /* Internal Use Only */ ) { if ( !jQuery.acceptData( elem ) ) { return; } var privateCache, thisCache, ret, internalKey = jQuery.expando, getByName = typeof name === "string", // We have to handle DOM nodes and JS objects differently because IE6-7 // can't GC object references properly across the DOM-JS boundary isNode = elem.nodeType, // Only DOM nodes need the global jQuery cache; JS object data is // attached directly to the object so GC can occur automatically cache = isNode ? jQuery.cache : elem, // Only defining an ID for JS objects if its cache already exists allows // the code to shortcut on the same path as a DOM node with no cache id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey, isEvents = name === "events"; // Avoid doing any more work than we need to when trying to get data on an // object that has no data at all if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) { return; } if ( !id ) { // Only DOM nodes need a new unique ID for each element since their data // ends up in the global cache if ( isNode ) { elem[ internalKey ] = id = ++jQuery.uuid; } else { id = internalKey; } } if ( !cache[ id ] ) { cache[ id ] = {}; // Avoids exposing jQuery metadata on plain JS objects when the object // is serialized using JSON.stringify if ( !isNode ) { cache[ id ].toJSON = jQuery.noop; } } // An object can be passed to jQuery.data instead of a key/value pair; this gets // shallow copied over onto the existing cache if ( typeof name === "object" || typeof name === "function" ) { if ( pvt ) { cache[ id ] = jQuery.extend( cache[ id ], name ); } else { cache[ id ].data = jQuery.extend( cache[ id ].data, name ); } } privateCache = thisCache = cache[ id ]; // jQuery data() is stored in a separate object inside the object's internal data // cache in order to avoid key collisions between internal data and user-defined // data. if ( !pvt ) { if ( !thisCache.data ) { thisCache.data = {}; } thisCache = thisCache.data; } if ( data !== undefined ) { thisCache[ jQuery.camelCase( name ) ] = data; } // Users should not attempt to inspect the internal events object using jQuery.data, // it is undocumented and subject to change. But does anyone listen? No. if ( isEvents && !thisCache[ name ] ) { return privateCache.events; } // Check for both converted-to-camel and non-converted data property names // If a data property was specified if ( getByName ) { // First Try to find as-is property data ret = thisCache[ name ]; // Test for null|undefined property data if ( ret == null ) { // Try to find the camelCased property ret = thisCache[ jQuery.camelCase( name ) ]; } } else { ret = thisCache; } return ret; }, removeData: function( elem, name, pvt /* Internal Use Only */ ) { if ( !jQuery.acceptData( elem ) ) { return; } var thisCache, i, l, // Reference to internal data cache key internalKey = jQuery.expando, isNode = elem.nodeType, // See jQuery.data for more information cache = isNode ? jQuery.cache : elem, // See jQuery.data for more information id = isNode ? elem[ internalKey ] : internalKey; // If there is already no cache entry for this object, there is no // purpose in continuing if ( !cache[ id ] ) { return; } if ( name ) { thisCache = pvt ? cache[ id ] : cache[ id ].data; if ( thisCache ) { // Support array or space separated string names for data keys if ( !jQuery.isArray( name ) ) { // try the string as a key before any manipulation if ( name in thisCache ) { name = [ name ]; } else { // split the camel cased version by spaces unless a key with the spaces exists name = jQuery.camelCase( name ); if ( name in thisCache ) { name = [ name ]; } else { name = name.split( " " ); } } } for ( i = 0, l = name.length; i < l; i++ ) { delete thisCache[ name[i] ]; } // If there is no data left in the cache, we want to continue // and let the cache object itself get destroyed if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { return; } } } // See jQuery.data for more information if ( !pvt ) { delete cache[ id ].data; // Don't destroy the parent cache unless the internal data object // had been the only thing left in it if ( !isEmptyDataObject(cache[ id ]) ) { return; } } // Browsers that fail expando deletion also refuse to delete expandos on // the window, but it will allow it on all other JS objects; other browsers // don't care // Ensure that `cache` is not a window object #10080 if ( jQuery.support.deleteExpando || !cache.setInterval ) { delete cache[ id ]; } else { cache[ id ] = null; } // We destroyed the cache and need to eliminate the expando on the node to avoid // false lookups in the cache for entries that no longer exist if ( isNode ) { // IE does not allow us to delete expando properties from nodes, // nor does it have a removeAttribute function on Document nodes; // we must handle all of these cases if ( jQuery.support.deleteExpando ) { delete elem[ internalKey ]; } else if ( elem.removeAttribute ) { elem.removeAttribute( internalKey ); } else { elem[ internalKey ] = null; } } }, // For internal use only. _data: function( elem, name, data ) { return jQuery.data( elem, name, data, true ); }, // A method for determining if a DOM node can handle the data expando acceptData: function( elem ) { if ( elem.nodeName ) { var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; if ( match ) { return !(match === true || elem.getAttribute("classid") !== match); } } return true; } }); jQuery.fn.extend({ data: function( key, value ) { var parts, part, attr, name, l, elem = this[0], i = 0, data = null; // Gets all values if ( key === undefined ) { if ( this.length ) { data = jQuery.data( elem ); if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { attr = elem.attributes; for ( l = attr.length; i < l; i++ ) { name = attr[i].name; if ( name.indexOf( "data-" ) === 0 ) { name = jQuery.camelCase( name.substring(5) ); dataAttr( elem, name, data[ name ] ); } } jQuery._data( elem, "parsedAttrs", true ); } } return data; } // Sets multiple values if ( typeof key === "object" ) { return this.each(function() { jQuery.data( this, key ); }); } parts = key.split( ".", 2 ); parts[1] = parts[1] ? "." + parts[1] : ""; part = parts[1] + "!"; return jQuery.access( this, function( value ) { if ( value === undefined ) { data = this.triggerHandler( "getData" + part, [ parts[0] ] ); // Try to fetch any internally stored data first if ( data === undefined && elem ) { data = jQuery.data( elem, key ); data = dataAttr( elem, key, data ); } return data === undefined && parts[1] ? this.data( parts[0] ) : data; } parts[1] = value; this.each(function() { var self = jQuery( this ); self.triggerHandler( "setData" + part, parts ); jQuery.data( this, key, value ); self.triggerHandler( "changeData" + part, parts ); }); }, null, value, arguments.length > 1, null, false ); }, removeData: function( key ) { return this.each(function() { jQuery.removeData( this, key ); }); } }); function dataAttr( elem, key, data ) { // If nothing was found internally, try to fetch any // data from the HTML5 data-* attribute if ( data === undefined && elem.nodeType === 1 ) { var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); data = elem.getAttribute( name ); if ( typeof data === "string" ) { try { data = data === "true" ? true : data === "false" ? false : data === "null" ? null : jQuery.isNumeric( data ) ? +data : rbrace.test( data ) ? jQuery.parseJSON( data ) : data; } catch( e ) {} // Make sure we set the data so it isn't changed later jQuery.data( elem, key, data ); } else { data = undefined; } } return data; } // checks a cache object for emptiness function isEmptyDataObject( obj ) { for ( var name in obj ) { // if the public data object is empty, the private is still empty if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { continue; } if ( name !== "toJSON" ) { return false; } } return true; } function handleQueueMarkDefer( elem, type, src ) { var deferDataKey = type + "defer", queueDataKey = type + "queue", markDataKey = type + "mark", defer = jQuery._data( elem, deferDataKey ); if ( defer && ( src === "queue" || !jQuery._data(elem, queueDataKey) ) && ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) { // Give room for hard-coded callbacks to fire first // and eventually mark/queue something else on the element setTimeout( function() { if ( !jQuery._data( elem, queueDataKey ) && !jQuery._data( elem, markDataKey ) ) { jQuery.removeData( elem, deferDataKey, true ); defer.fire(); } }, 0 ); } } jQuery.extend({ _mark: function( elem, type ) { if ( elem ) { type = ( type || "fx" ) + "mark"; jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 ); } }, _unmark: function( force, elem, type ) { if ( force !== true ) { type = elem; elem = force; force = false; } if ( elem ) { type = type || "fx"; var key = type + "mark", count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 ); if ( count ) { jQuery._data( elem, key, count ); } else { jQuery.removeData( elem, key, true ); handleQueueMarkDefer( elem, type, "mark" ); } } }, queue: function( elem, type, data ) { var q; if ( elem ) { type = ( type || "fx" ) + "queue"; q = jQuery._data( elem, type ); // Speed up dequeue by getting out quickly if this is just a lookup if ( data ) { if ( !q || jQuery.isArray(data) ) { q = jQuery._data( elem, type, jQuery.makeArray(data) ); } else { q.push( data ); } } return q || []; } }, dequeue: function( elem, type ) { type = type || "fx"; var queue = jQuery.queue( elem, type ), fn = queue.shift(), hooks = {}; // If the fx queue is dequeued, always remove the progress sentinel if ( fn === "inprogress" ) { fn = queue.shift(); } if ( fn ) { // Add a progress sentinel to prevent the fx queue from being // automatically dequeued if ( type === "fx" ) { queue.unshift( "inprogress" ); } jQuery._data( elem, type + ".run", hooks ); fn.call( elem, function() { jQuery.dequeue( elem, type ); }, hooks ); } if ( !queue.length ) { jQuery.removeData( elem, type + "queue " + type + ".run", true ); handleQueueMarkDefer( elem, type, "queue" ); } } }); jQuery.fn.extend({ queue: function( type, data ) { var setter = 2; if ( typeof type !== "string" ) { data = type; type = "fx"; setter--; } if ( arguments.length < setter ) { return jQuery.queue( this[0], type ); } return data === undefined ? this : this.each(function() { var queue = jQuery.queue( this, type, data ); if ( type === "fx" && queue[0] !== "inprogress" ) { jQuery.dequeue( this, type ); } }); }, dequeue: function( type ) { return this.each(function() { jQuery.dequeue( this, type ); }); }, // Based off of the plugin by Clint Helfers, with permission. // http://blindsignals.com/index.php/2009/07/jquery-delay/ delay: function( time, type ) { time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; type = type || "fx"; return this.queue( type, function( next, hooks ) { var timeout = setTimeout( next, time ); hooks.stop = function() { clearTimeout( timeout ); }; }); }, clearQueue: function( type ) { return this.queue( type || "fx", [] ); }, // Get a promise resolved when queues of a certain type // are emptied (fx is the type by default) promise: function( type, object ) { if ( typeof type !== "string" ) { object = type; type = undefined; } type = type || "fx"; var defer = jQuery.Deferred(), elements = this, i = elements.length, count = 1, deferDataKey = type + "defer", queueDataKey = type + "queue", markDataKey = type + "mark", tmp; function resolve() { if ( !( --count ) ) { defer.resolveWith( elements, [ elements ] ); } } while( i-- ) { if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) || ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) || jQuery.data( elements[ i ], markDataKey, undefined, true ) ) && jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) { count++; tmp.add( resolve ); } } resolve(); return defer.promise( object ); } }); var rclass = /[\n\t\r]/g, rspace = /\s+/, rreturn = /\r/g, rtype = /^(?:button|input)$/i, rfocusable = /^(?:button|input|object|select|textarea)$/i, rclickable = /^a(?:rea)?$/i, rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, getSetAttribute = jQuery.support.getSetAttribute, nodeHook, boolHook, fixSpecified; jQuery.fn.extend({ attr: function( name, value ) { return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); }, removeAttr: function( name ) { return this.each(function() { jQuery.removeAttr( this, name ); }); }, prop: function( name, value ) { return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); }, removeProp: function( name ) { name = jQuery.propFix[ name ] || name; return this.each(function() { // try/catch handles cases where IE balks (such as removing a property on window) try { this[ name ] = undefined; delete this[ name ]; } catch( e ) {} }); }, addClass: function( value ) { var classNames, i, l, elem, setClass, c, cl; if ( jQuery.isFunction( value ) ) { return this.each(function( j ) { jQuery( this ).addClass( value.call(this, j, this.className) ); }); } if ( value && typeof value === "string" ) { classNames = value.split( rspace ); for ( i = 0, l = this.length; i < l; i++ ) { elem = this[ i ]; if ( elem.nodeType === 1 ) { if ( !elem.className && classNames.length === 1 ) { elem.className = value; } else { setClass = " " + elem.className + " "; for ( c = 0, cl = classNames.length; c < cl; c++ ) { if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { setClass += classNames[ c ] + " "; } } elem.className = jQuery.trim( setClass ); } } } } return this; }, removeClass: function( value ) { var classNames, i, l, elem, className, c, cl; if ( jQuery.isFunction( value ) ) { return this.each(function( j ) { jQuery( this ).removeClass( value.call(this, j, this.className) ); }); } if ( (value && typeof value === "string") || value === undefined ) { classNames = ( value || "" ).split( rspace ); for ( i = 0, l = this.length; i < l; i++ ) { elem = this[ i ]; if ( elem.nodeType === 1 && elem.className ) { if ( value ) { className = (" " + elem.className + " ").replace( rclass, " " ); for ( c = 0, cl = classNames.length; c < cl; c++ ) { className = className.replace(" " + classNames[ c ] + " ", " "); } elem.className = jQuery.trim( className ); } else { elem.className = ""; } } } } return this; }, toggleClass: function( value, stateVal ) { var type = typeof value, isBool = typeof stateVal === "boolean"; if ( jQuery.isFunction( value ) ) { return this.each(function( i ) { jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); }); } return this.each(function() { if ( type === "string" ) { // toggle individual class names var className, i = 0, self = jQuery( this ), state = stateVal, classNames = value.split( rspace ); while ( (className = classNames[ i++ ]) ) { // check each className given, space seperated list state = isBool ? state : !self.hasClass( className ); self[ state ? "addClass" : "removeClass" ]( className ); } } else if ( type === "undefined" || type === "boolean" ) { if ( this.className ) { // store className if set jQuery._data( this, "__className__", this.className ); } // toggle whole className this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; } }); }, hasClass: function( selector ) { var className = " " + selector + " ", i = 0, l = this.length; for ( ; i < l; i++ ) { if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { return true; } } return false; }, val: function( value ) { var hooks, ret, isFunction, elem = this[0]; if ( !arguments.length ) { if ( elem ) { hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { return ret; } ret = elem.value; return typeof ret === "string" ? // handle most common string cases ret.replace(rreturn, "") : // handle cases where value is null/undef or number ret == null ? "" : ret; } return; } isFunction = jQuery.isFunction( value ); return this.each(function( i ) { var self = jQuery(this), val; if ( this.nodeType !== 1 ) { return; } if ( isFunction ) { val = value.call( this, i, self.val() ); } else { val = value; } // Treat null/undefined as ""; convert numbers to string if ( val == null ) { val = ""; } else if ( typeof val === "number" ) { val += ""; } else if ( jQuery.isArray( val ) ) { val = jQuery.map(val, function ( value ) { return value == null ? "" : value + ""; }); } hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; // If set returns undefined, fall back to normal setting if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { this.value = val; } }); } }); jQuery.extend({ valHooks: { option: { get: function( elem ) { // attributes.value is undefined in Blackberry 4.7 but // uses .value. See #6932 var val = elem.attributes.value; return !val || val.specified ? elem.value : elem.text; } }, select: { get: function( elem ) { var value, i, max, option, index = elem.selectedIndex, values = [], options = elem.options, one = elem.type === "select-one"; // Nothing was selected if ( index < 0 ) { return null; } // Loop through all the selected options i = one ? index : 0; max = one ? index + 1 : options.length; for ( ; i < max; i++ ) { option = options[ i ]; // Don't return options that are disabled or in a disabled optgroup if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { // Get the specific value for the option value = jQuery( option ).val(); // We don't need an array for one selects if ( one ) { return value; } // Multi-Selects return an array values.push( value ); } } // Fixes Bug #2551 -- select.val() broken in IE after form.reset() if ( one && !values.length && options.length ) { return jQuery( options[ index ] ).val(); } return values; }, set: function( elem, value ) { var values = jQuery.makeArray( value ); jQuery(elem).find("option").each(function() { this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; }); if ( !values.length ) { elem.selectedIndex = -1; } return values; } } }, attrFn: { val: true, css: true, html: true, text: true, data: true, width: true, height: true, offset: true }, attr: function( elem, name, value, pass ) { var ret, hooks, notxml, nType = elem.nodeType; // don't get/set attributes on text, comment and attribute nodes if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { return; } if ( pass && name in jQuery.attrFn ) { return jQuery( elem )[ name ]( value ); } // Fallback to prop when attributes are not supported if ( typeof elem.getAttribute === "undefined" ) { return jQuery.prop( elem, name, value ); } notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); // All attributes are lowercase // Grab necessary hook if one is defined if ( notxml ) { name = name.toLowerCase(); hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); } if ( value !== undefined ) { if ( value === null ) { jQuery.removeAttr( elem, name ); return; } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { return ret; } else { elem.setAttribute( name, "" + value ); return value; } } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { return ret; } else { ret = elem.getAttribute( name ); // Non-existent attributes return null, we normalize to undefined return ret === null ? undefined : ret; } }, removeAttr: function( elem, value ) { var propName, attrNames, name, l, isBool, i = 0; if ( value && elem.nodeType === 1 ) { attrNames = value.toLowerCase().split( rspace ); l = attrNames.length; for ( ; i < l; i++ ) { name = attrNames[ i ]; if ( name ) { propName = jQuery.propFix[ name ] || name; isBool = rboolean.test( name ); // See #9699 for explanation of this approach (setting first, then removal) // Do not do this for boolean attributes (see #10870) if ( !isBool ) { jQuery.attr( elem, name, "" ); } elem.removeAttribute( getSetAttribute ? name : propName ); // Set corresponding property to false for boolean attributes if ( isBool && propName in elem ) { elem[ propName ] = false; } } } } }, attrHooks: { type: { set: function( elem, value ) { // We can't allow the type property to be changed (since it causes problems in IE) if ( rtype.test( elem.nodeName ) && elem.parentNode ) { jQuery.error( "type property can't be changed" ); } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { // Setting the type on a radio button after the value resets the value in IE6-9 // Reset value to it's default in case type is set after value // This is for element creation var val = elem.value; elem.setAttribute( "type", value ); if ( val ) { elem.value = val; } return value; } } }, // Use the value property for back compat // Use the nodeHook for button elements in IE6/7 (#1954) value: { get: function( elem, name ) { if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { return nodeHook.get( elem, name ); } return name in elem ? elem.value : null; }, set: function( elem, value, name ) { if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { return nodeHook.set( elem, value, name ); } // Does not return so that setAttribute is also used elem.value = value; } } }, propFix: { tabindex: "tabIndex", readonly: "readOnly", "for": "htmlFor", "class": "className", maxlength: "maxLength", cellspacing: "cellSpacing", cellpadding: "cellPadding", rowspan: "rowSpan", colspan: "colSpan", usemap: "useMap", frameborder: "frameBorder", contenteditable: "contentEditable" }, prop: function( elem, name, value ) { var ret, hooks, notxml, nType = elem.nodeType; // don't get/set properties on text, comment and attribute nodes if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { return; } notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); if ( notxml ) { // Fix name and attach hooks name = jQuery.propFix[ name ] || name; hooks = jQuery.propHooks[ name ]; } if ( value !== undefined ) { if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { return ret; } else { return ( elem[ name ] = value ); } } else { if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { return ret; } else { return elem[ name ]; } } }, propHooks: { tabIndex: { get: function( elem ) { // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ var attributeNode = elem.getAttributeNode("tabindex"); return attributeNode && attributeNode.specified ? parseInt( attributeNode.value, 10 ) : rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? 0 : undefined; } } } }); // Add the tabIndex propHook to attrHooks for back-compat (different case is intentional) jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex; // Hook for boolean attributes boolHook = { get: function( elem, name ) { // Align boolean attributes with corresponding properties // Fall back to attribute presence where some booleans are not supported var attrNode, property = jQuery.prop( elem, name ); return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? name.toLowerCase() : undefined; }, set: function( elem, value, name ) { var propName; if ( value === false ) { // Remove boolean attributes when set to false jQuery.removeAttr( elem, name ); } else { // value is true since we know at this point it's type boolean and not false // Set boolean attributes to the same name and set the DOM property propName = jQuery.propFix[ name ] || name; if ( propName in elem ) { // Only set the IDL specifically if it already exists on the element elem[ propName ] = true; } elem.setAttribute( name, name.toLowerCase() ); } return name; } }; // IE6/7 do not support getting/setting some attributes with get/setAttribute if ( !getSetAttribute ) { fixSpecified = { name: true, id: true, coords: true }; // Use this for any attribute in IE6/7 // This fixes almost every IE6/7 issue nodeHook = jQuery.valHooks.button = { get: function( elem, name ) { var ret; ret = elem.getAttributeNode( name ); return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ? ret.nodeValue : undefined; }, set: function( elem, value, name ) { // Set the existing or create a new attribute node var ret = elem.getAttributeNode( name ); if ( !ret ) { ret = document.createAttribute( name ); elem.setAttributeNode( ret ); } return ( ret.nodeValue = value + "" ); } }; // Apply the nodeHook to tabindex jQuery.attrHooks.tabindex.set = nodeHook.set; // Set width and height to auto instead of 0 on empty string( Bug #8150 ) // This is for removals jQuery.each([ "width", "height" ], function( i, name ) { jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { set: function( elem, value ) { if ( value === "" ) { elem.setAttribute( name, "auto" ); return value; } } }); }); // Set contenteditable to false on removals(#10429) // Setting to empty string throws an error as an invalid value jQuery.attrHooks.contenteditable = { get: nodeHook.get, set: function( elem, value, name ) { if ( value === "" ) { value = "false"; } nodeHook.set( elem, value, name ); } }; } // Some attributes require a special call on IE if ( !jQuery.support.hrefNormalized ) { jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { get: function( elem ) { var ret = elem.getAttribute( name, 2 ); return ret === null ? undefined : ret; } }); }); } if ( !jQuery.support.style ) { jQuery.attrHooks.style = { get: function( elem ) { // Return undefined in the case of empty string // Normalize to lowercase since IE uppercases css property names return elem.style.cssText.toLowerCase() || undefined; }, set: function( elem, value ) { return ( elem.style.cssText = "" + value ); } }; } // Safari mis-reports the default selected property of an option // Accessing the parent's selectedIndex property fixes it if ( !jQuery.support.optSelected ) { jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { get: function( elem ) { var parent = elem.parentNode; if ( parent ) { parent.selectedIndex; // Make sure that it also works with optgroups, see #5701 if ( parent.parentNode ) { parent.parentNode.selectedIndex; } } return null; } }); } // IE6/7 call enctype encoding if ( !jQuery.support.enctype ) { jQuery.propFix.enctype = "encoding"; } // Radios and checkboxes getter/setter if ( !jQuery.support.checkOn ) { jQuery.each([ "radio", "checkbox" ], function() { jQuery.valHooks[ this ] = { get: function( elem ) { // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified return elem.getAttribute("value") === null ? "on" : elem.value; } }; }); } jQuery.each([ "radio", "checkbox" ], function() { jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { set: function( elem, value ) { if ( jQuery.isArray( value ) ) { return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); } } }); }); var rformElems = /^(?:textarea|input|select)$/i, rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/, rhoverHack = /(?:^|\s)hover(\.\S+)?\b/, rkeyEvent = /^key/, rmouseEvent = /^(?:mouse|contextmenu)|click/, rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/, quickParse = function( selector ) { var quick = rquickIs.exec( selector ); if ( quick ) { // 0 1 2 3 // [ _, tag, id, class ] quick[1] = ( quick[1] || "" ).toLowerCase(); quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" ); } return quick; }, quickIs = function( elem, m ) { var attrs = elem.attributes || {}; return ( (!m[1] || elem.nodeName.toLowerCase() === m[1]) && (!m[2] || (attrs.id || {}).value === m[2]) && (!m[3] || m[3].test( (attrs[ "class" ] || {}).value )) ); }, hoverHack = function( events ) { return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); }; /* * Helper functions for managing events -- not part of the public interface. * Props to Dean Edwards' addEvent library for many of the ideas. */ jQuery.event = { add: function( elem, types, handler, data, selector ) { var elemData, eventHandle, events, t, tns, type, namespaces, handleObj, handleObjIn, quick, handlers, special; // Don't attach events to noData or text/comment nodes (allow plain objects tho) if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { return; } // Caller can pass in an object of custom data in lieu of the handler if ( handler.handler ) { handleObjIn = handler; handler = handleObjIn.handler; selector = handleObjIn.selector; } // Make sure that the handler has a unique ID, used to find/remove it later if ( !handler.guid ) { handler.guid = jQuery.guid++; } // Init the element's event structure and main handler, if this is the first events = elemData.events; if ( !events ) { elemData.events = events = {}; } eventHandle = elemData.handle; if ( !eventHandle ) { elemData.handle = eventHandle = function( e ) { // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : undefined; }; // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events eventHandle.elem = elem; } // Handle multiple events separated by a space // jQuery(...).bind("mouseover mouseout", fn); types = jQuery.trim( hoverHack(types) ).split( " " ); for ( t = 0; t < types.length; t++ ) { tns = rtypenamespace.exec( types[t] ) || []; type = tns[1]; namespaces = ( tns[2] || "" ).split( "." ).sort(); // If event changes its type, use the special event handlers for the changed type special = jQuery.event.special[ type ] || {}; // If selector defined, determine special event api type, otherwise given type type = ( selector ? special.delegateType : special.bindType ) || type; // Update special based on newly reset type special = jQuery.event.special[ type ] || {}; // handleObj is passed to all event handlers handleObj = jQuery.extend({ type: type, origType: tns[1], data: data, handler: handler, guid: handler.guid, selector: selector, quick: selector && quickParse( selector ), namespace: namespaces.join(".") }, handleObjIn ); // Init the event handler queue if we're the first handlers = events[ type ]; if ( !handlers ) { handlers = events[ type ] = []; handlers.delegateCount = 0; // Only use addEventListener/attachEvent if the special events handler returns false if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { // Bind the global event handler to the element if ( elem.addEventListener ) { elem.addEventListener( type, eventHandle, false ); } else if ( elem.attachEvent ) { elem.attachEvent( "on" + type, eventHandle ); } } } if ( special.add ) { special.add.call( elem, handleObj ); if ( !handleObj.handler.guid ) { handleObj.handler.guid = handler.guid; } } // Add to the element's handler list, delegates in front if ( selector ) { handlers.splice( handlers.delegateCount++, 0, handleObj ); } else { handlers.push( handleObj ); } // Keep track of which events have ever been used, for event optimization jQuery.event.global[ type ] = true; } // Nullify elem to prevent memory leaks in IE elem = null; }, global: {}, // Detach an event or set of events from an element remove: function( elem, types, handler, selector, mappedTypes ) { var elemData = jQuery.hasData( elem ) && jQuery._data( elem ), t, tns, type, origType, namespaces, origCount, j, events, special, handle, eventType, handleObj; if ( !elemData || !(events = elemData.events) ) { return; } // Once for each type.namespace in types; type may be omitted types = jQuery.trim( hoverHack( types || "" ) ).split(" "); for ( t = 0; t < types.length; t++ ) { tns = rtypenamespace.exec( types[t] ) || []; type = origType = tns[1]; namespaces = tns[2]; // Unbind all events (on this namespace, if provided) for the element if ( !type ) { for ( type in events ) { jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); } continue; } special = jQuery.event.special[ type ] || {}; type = ( selector? special.delegateType : special.bindType ) || type; eventType = events[ type ] || []; origCount = eventType.length; namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null; // Remove matching events for ( j = 0; j < eventType.length; j++ ) { handleObj = eventType[ j ]; if ( ( mappedTypes || origType === handleObj.origType ) && ( !handler || handler.guid === handleObj.guid ) && ( !namespaces || namespaces.test( handleObj.namespace ) ) && ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { eventType.splice( j--, 1 ); if ( handleObj.selector ) { eventType.delegateCount--; } if ( special.remove ) { special.remove.call( elem, handleObj ); } } } // Remove generic event handler if we removed something and no more handlers exist // (avoids potential for endless recursion during removal of special event handlers) if ( eventType.length === 0 && origCount !== eventType.length ) { if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { jQuery.removeEvent( elem, type, elemData.handle ); } delete events[ type ]; } } // Remove the expando if it's no longer used if ( jQuery.isEmptyObject( events ) ) { handle = elemData.handle; if ( handle ) { handle.elem = null; } // removeData also checks for emptiness and clears the expando if empty // so use it instead of delete jQuery.removeData( elem, [ "events", "handle" ], true ); } }, // Events that are safe to short-circuit if no handlers are attached. // Native DOM events should not be added, they may have inline handlers. customEvent: { "getData": true, "setData": true, "changeData": true }, trigger: function( event, data, elem, onlyHandlers ) { // Don't do events on text and comment nodes if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { return; } // Event object or event type var type = event.type || event, namespaces = [], cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType; // focus/blur morphs to focusin/out; ensure we're not firing them right now if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { return; } if ( type.indexOf( "!" ) >= 0 ) { // Exclusive events trigger only for the exact event (no namespaces) type = type.slice(0, -1); exclusive = true; } if ( type.indexOf( "." ) >= 0 ) { // Namespaced trigger; create a regexp to match event type in handle() namespaces = type.split("."); type = namespaces.shift(); namespaces.sort(); } if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { // No jQuery handlers for this event type, and it can't have inline handlers return; } // Caller can pass in an Event, Object, or just an event type string event = typeof event === "object" ? // jQuery.Event object event[ jQuery.expando ] ? event : // Object literal new jQuery.Event( type, event ) : // Just the event type (string) new jQuery.Event( type ); event.type = type; event.isTrigger = true; event.exclusive = exclusive; event.namespace = namespaces.join( "." ); event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null; ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; // Handle a global trigger if ( !elem ) { // TODO: Stop taunting the data cache; remove global events and always attach to document cache = jQuery.cache; for ( i in cache ) { if ( cache[ i ].events && cache[ i ].events[ type ] ) { jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); } } return; } // Clean up the event in case it is being reused event.result = undefined; if ( !event.target ) { event.target = elem; } // Clone any incoming data and prepend the event, creating the handler arg list data = data != null ? jQuery.makeArray( data ) : []; data.unshift( event ); // Allow special events to draw outside the lines special = jQuery.event.special[ type ] || {}; if ( special.trigger && special.trigger.apply( elem, data ) === false ) { return; } // Determine event propagation path in advance, per W3C events spec (#9951) // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) eventPath = [[ elem, special.bindType || type ]]; if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { bubbleType = special.delegateType || type; cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode; old = null; for ( ; cur; cur = cur.parentNode ) { eventPath.push([ cur, bubbleType ]); old = cur; } // Only add window if we got to document (e.g., not plain obj or detached DOM) if ( old && old === elem.ownerDocument ) { eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); } } // Fire handlers on the event path for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) { cur = eventPath[i][0]; event.type = eventPath[i][1]; handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); if ( handle ) { handle.apply( cur, data ); } // Note that this is a bare JS function and not a jQuery handler handle = ontype && cur[ ontype ]; if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) { event.preventDefault(); } } event.type = type; // If nobody prevented the default action, do it now if ( !onlyHandlers && !event.isDefaultPrevented() ) { if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { // Call a native DOM method on the target with the same name name as the event. // Can't use an .isFunction() check here because IE6/7 fails that test. // Don't do default actions on window, that's where global variables be (#6170) // IE<9 dies on focus/blur to hidden element (#1486) if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { // Don't re-trigger an onFOO event when we call its FOO() method old = elem[ ontype ]; if ( old ) { elem[ ontype ] = null; } // Prevent re-triggering of the same event, since we already bubbled it above jQuery.event.triggered = type; elem[ type ](); jQuery.event.triggered = undefined; if ( old ) { elem[ ontype ] = old; } } } } return event.result; }, dispatch: function( event ) { // Make a writable jQuery.Event from the native event object event = jQuery.event.fix( event || window.event ); var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), delegateCount = handlers.delegateCount, args = [].slice.call( arguments, 0 ), run_all = !event.exclusive && !event.namespace, special = jQuery.event.special[ event.type ] || {}, handlerQueue = [], i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related; // Use the fix-ed jQuery.Event rather than the (read-only) native event args[0] = event; event.delegateTarget = this; // Call the preDispatch hook for the mapped type, and let it bail if desired if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { return; } // Determine handlers that should run if there are delegated events // Avoid non-left-click bubbling in Firefox (#3861) if ( delegateCount && !(event.button && event.type === "click") ) { // Pregenerate a single jQuery object for reuse with .is() jqcur = jQuery(this); jqcur.context = this.ownerDocument || this; for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { // Don't process events on disabled elements (#6911, #8165) if ( cur.disabled !== true ) { selMatch = {}; matches = []; jqcur[0] = cur; for ( i = 0; i < delegateCount; i++ ) { handleObj = handlers[ i ]; sel = handleObj.selector; if ( selMatch[ sel ] === undefined ) { selMatch[ sel ] = ( handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel ) ); } if ( selMatch[ sel ] ) { matches.push( handleObj ); } } if ( matches.length ) { handlerQueue.push({ elem: cur, matches: matches }); } } } } // Add the remaining (directly-bound) handlers if ( handlers.length > delegateCount ) { handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); } // Run delegates first; they may want to stop propagation beneath us for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { matched = handlerQueue[ i ]; event.currentTarget = matched.elem; for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { handleObj = matched.matches[ j ]; // Triggered event must either 1) be non-exclusive and have no namespace, or // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { event.data = handleObj.data; event.handleObj = handleObj; ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) .apply( matched.elem, args ); if ( ret !== undefined ) { event.result = ret; if ( ret === false ) { event.preventDefault(); event.stopPropagation(); } } } } } // Call the postDispatch hook for the mapped type if ( special.postDispatch ) { special.postDispatch.call( this, event ); } return event.result; }, // Includes some event props shared by KeyEvent and MouseEvent // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), fixHooks: {}, keyHooks: { props: "char charCode key keyCode".split(" "), filter: function( event, original ) { // Add which for key events if ( event.which == null ) { event.which = original.charCode != null ? original.charCode : original.keyCode; } return event; } }, mouseHooks: { props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), filter: function( event, original ) { var eventDoc, doc, body, button = original.button, fromElement = original.fromElement; // Calculate pageX/Y if missing and clientX/Y available if ( event.pageX == null && original.clientX != null ) { eventDoc = event.target.ownerDocument || document; doc = eventDoc.documentElement; body = eventDoc.body; event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); } // Add relatedTarget, if necessary if ( !event.relatedTarget && fromElement ) { event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; } // Add which for click: 1 === left; 2 === middle; 3 === right // Note: button is not normalized, so don't use it if ( !event.which && button !== undefined ) { event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); } return event; } }, fix: function( event ) { if ( event[ jQuery.expando ] ) { return event; } // Create a writable copy of the event object and normalize some properties var i, prop, originalEvent = event, fixHook = jQuery.event.fixHooks[ event.type ] || {}, copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; event = jQuery.Event( originalEvent ); for ( i = copy.length; i; ) { prop = copy[ --i ]; event[ prop ] = originalEvent[ prop ]; } // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) if ( !event.target ) { event.target = originalEvent.srcElement || document; } // Target should not be a text node (#504, Safari) if ( event.target.nodeType === 3 ) { event.target = event.target.parentNode; } // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8) if ( event.metaKey === undefined ) { event.metaKey = event.ctrlKey; } return fixHook.filter? fixHook.filter( event, originalEvent ) : event; }, special: { ready: { // Make sure the ready event is setup setup: jQuery.bindReady }, load: { // Prevent triggered image.load events from bubbling to window.load noBubble: true }, focus: { delegateType: "focusin" }, blur: { delegateType: "focusout" }, beforeunload: { setup: function( data, namespaces, eventHandle ) { // We only want to do this special case on windows if ( jQuery.isWindow( this ) ) { this.onbeforeunload = eventHandle; } }, teardown: function( namespaces, eventHandle ) { if ( this.onbeforeunload === eventHandle ) { this.onbeforeunload = null; } } } }, simulate: function( type, elem, event, bubble ) { // Piggyback on a donor event to simulate a different one. // Fake originalEvent to avoid donor's stopPropagation, but if the // simulated event prevents default then we do the same on the donor. var e = jQuery.extend( new jQuery.Event(), event, { type: type, isSimulated: true, originalEvent: {} } ); if ( bubble ) { jQuery.event.trigger( e, null, elem ); } else { jQuery.event.dispatch.call( elem, e ); } if ( e.isDefaultPrevented() ) { event.preventDefault(); } } }; // Some plugins are using, but it's undocumented/deprecated and will be removed. // The 1.7 special event interface should provide all the hooks needed now. jQuery.event.handle = jQuery.event.dispatch; jQuery.removeEvent = document.removeEventListener ? function( elem, type, handle ) { if ( elem.removeEventListener ) { elem.removeEventListener( type, handle, false ); } } : function( elem, type, handle ) { if ( elem.detachEvent ) { elem.detachEvent( "on" + type, handle ); } }; jQuery.Event = function( src, props ) { // Allow instantiation without the 'new' keyword if ( !(this instanceof jQuery.Event) ) { return new jQuery.Event( src, props ); } // Event object if ( src && src.type ) { this.originalEvent = src; this.type = src.type; // Events bubbling up the document may have been marked as prevented // by a handler lower down the tree; reflect the correct value. this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; // Event type } else { this.type = src; } // Put explicitly provided properties onto the event object if ( props ) { jQuery.extend( this, props ); } // Create a timestamp if incoming event doesn't have one this.timeStamp = src && src.timeStamp || jQuery.now(); // Mark it as fixed this[ jQuery.expando ] = true; }; function returnFalse() { return false; } function returnTrue() { return true; } // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html jQuery.Event.prototype = { preventDefault: function() { this.isDefaultPrevented = returnTrue; var e = this.originalEvent; if ( !e ) { return; } // if preventDefault exists run it on the original event if ( e.preventDefault ) { e.preventDefault(); // otherwise set the returnValue property of the original event to false (IE) } else { e.returnValue = false; } }, stopPropagation: function() { this.isPropagationStopped = returnTrue; var e = this.originalEvent; if ( !e ) { return; } // if stopPropagation exists run it on the original event if ( e.stopPropagation ) { e.stopPropagation(); } // otherwise set the cancelBubble property of the original event to true (IE) e.cancelBubble = true; }, stopImmediatePropagation: function() { this.isImmediatePropagationStopped = returnTrue; this.stopPropagation(); }, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse }; // Create mouseenter/leave events using mouseover/out and event-time checks jQuery.each({ mouseenter: "mouseover", mouseleave: "mouseout" }, function( orig, fix ) { jQuery.event.special[ orig ] = { delegateType: fix, bindType: fix, handle: function( event ) { var target = this, related = event.relatedTarget, handleObj = event.handleObj, selector = handleObj.selector, ret; // For mousenter/leave call the handler if related is outside the target. // NB: No relatedTarget if the mouse left/entered the browser window if ( !related || (related !== target && !jQuery.contains( target, related )) ) { event.type = handleObj.origType; ret = handleObj.handler.apply( this, arguments ); event.type = fix; } return ret; } }; }); // IE submit delegation if ( !jQuery.support.submitBubbles ) { jQuery.event.special.submit = { setup: function() { // Only need this for delegated form submit events if ( jQuery.nodeName( this, "form" ) ) { return false; } // Lazy-add a submit handler when a descendant form may potentially be submitted jQuery.event.add( this, "click._submit keypress._submit", function( e ) { // Node name check avoids a VML-related crash in IE (#9807) var elem = e.target, form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; if ( form && !form._submit_attached ) { jQuery.event.add( form, "submit._submit", function( event ) { event._submit_bubble = true; }); form._submit_attached = true; } }); // return undefined since we don't need an event listener }, postDispatch: function( event ) { // If form was submitted by the user, bubble the event up the tree if ( event._submit_bubble ) { delete event._submit_bubble; if ( this.parentNode && !event.isTrigger ) { jQuery.event.simulate( "submit", this.parentNode, event, true ); } } }, teardown: function() { // Only need this for delegated form submit events if ( jQuery.nodeName( this, "form" ) ) { return false; } // Remove delegated handlers; cleanData eventually reaps submit handlers attached above jQuery.event.remove( this, "._submit" ); } }; } // IE change delegation and checkbox/radio fix if ( !jQuery.support.changeBubbles ) { jQuery.event.special.change = { setup: function() { if ( rformElems.test( this.nodeName ) ) { // IE doesn't fire change on a check/radio until blur; trigger it on click // after a propertychange. Eat the blur-change in special.change.handle. // This still fires onchange a second time for check/radio after blur. if ( this.type === "checkbox" || this.type === "radio" ) { jQuery.event.add( this, "propertychange._change", function( event ) { if ( event.originalEvent.propertyName === "checked" ) { this._just_changed = true; } }); jQuery.event.add( this, "click._change", function( event ) { if ( this._just_changed && !event.isTrigger ) { this._just_changed = false; jQuery.event.simulate( "change", this, event, true ); } }); } return false; } // Delegated event; lazy-add a change handler on descendant inputs jQuery.event.add( this, "beforeactivate._change", function( e ) { var elem = e.target; if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) { jQuery.event.add( elem, "change._change", function( event ) { if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { jQuery.event.simulate( "change", this.parentNode, event, true ); } }); elem._change_attached = true; } }); }, handle: function( event ) { var elem = event.target; // Swallow native change events from checkbox/radio, we already triggered them above if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { return event.handleObj.handler.apply( this, arguments ); } }, teardown: function() { jQuery.event.remove( this, "._change" ); return rformElems.test( this.nodeName ); } }; } // Create "bubbling" focus and blur events if ( !jQuery.support.focusinBubbles ) { jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { // Attach a single capturing handler while someone wants focusin/focusout var attaches = 0, handler = function( event ) { jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); }; jQuery.event.special[ fix ] = { setup: function() { if ( attaches++ === 0 ) { document.addEventListener( orig, handler, true ); } }, teardown: function() { if ( --attaches === 0 ) { document.removeEventListener( orig, handler, true ); } } }; }); } jQuery.fn.extend({ on: function( types, selector, data, fn, /*INTERNAL*/ one ) { var origFn, type; // Types can be a map of types/handlers if ( typeof types === "object" ) { // ( types-Object, selector, data ) if ( typeof selector !== "string" ) { // && selector != null // ( types-Object, data ) data = data || selector; selector = undefined; } for ( type in types ) { this.on( type, selector, data, types[ type ], one ); } return this; } if ( data == null && fn == null ) { // ( types, fn ) fn = selector; data = selector = undefined; } else if ( fn == null ) { if ( typeof selector === "string" ) { // ( types, selector, fn ) fn = data; data = undefined; } else { // ( types, data, fn ) fn = data; data = selector; selector = undefined; } } if ( fn === false ) { fn = returnFalse; } else if ( !fn ) { return this; } if ( one === 1 ) { origFn = fn; fn = function( event ) { // Can use an empty set, since event contains the info jQuery().off( event ); return origFn.apply( this, arguments ); }; // Use same guid so caller can remove using origFn fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); } return this.each( function() { jQuery.event.add( this, types, fn, data, selector ); }); }, one: function( types, selector, data, fn ) { return this.on( types, selector, data, fn, 1 ); }, off: function( types, selector, fn ) { if ( types && types.preventDefault && types.handleObj ) { // ( event ) dispatched jQuery.Event var handleObj = types.handleObj; jQuery( types.delegateTarget ).off( handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler ); return this; } if ( typeof types === "object" ) { // ( types-object [, selector] ) for ( var type in types ) { this.off( type, selector, types[ type ] ); } return this; } if ( selector === false || typeof selector === "function" ) { // ( types [, fn] ) fn = selector; selector = undefined; } if ( fn === false ) { fn = returnFalse; } return this.each(function() { jQuery.event.remove( this, types, fn, selector ); }); }, bind: function( types, data, fn ) { return this.on( types, null, data, fn ); }, unbind: function( types, fn ) { return this.off( types, null, fn ); }, live: function( types, data, fn ) { jQuery( this.context ).on( types, this.selector, data, fn ); return this; }, die: function( types, fn ) { jQuery( this.context ).off( types, this.selector || "**", fn ); return this; }, delegate: function( selector, types, data, fn ) { return this.on( types, selector, data, fn ); }, undelegate: function( selector, types, fn ) { // ( namespace ) or ( selector, types [, fn] ) return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn ); }, trigger: function( type, data ) { return this.each(function() { jQuery.event.trigger( type, data, this ); }); }, triggerHandler: function( type, data ) { if ( this[0] ) { return jQuery.event.trigger( type, data, this[0], true ); } }, toggle: function( fn ) { // Save reference to arguments for access in closure var args = arguments, guid = fn.guid || jQuery.guid++, i = 0, toggler = function( event ) { // Figure out which function to execute var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); // Make sure that clicks stop event.preventDefault(); // and execute the function return args[ lastToggle ].apply( this, arguments ) || false; }; // link all the functions, so any of them can unbind this click handler toggler.guid = guid; while ( i < args.length ) { args[ i++ ].guid = guid; } return this.click( toggler ); }, hover: function( fnOver, fnOut ) { return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); } }); jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { // Handle event binding jQuery.fn[ name ] = function( data, fn ) { if ( fn == null ) { fn = data; data = null; } return arguments.length > 0 ? this.on( name, null, data, fn ) : this.trigger( name ); }; if ( jQuery.attrFn ) { jQuery.attrFn[ name ] = true; } if ( rkeyEvent.test( name ) ) { jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; } if ( rmouseEvent.test( name ) ) { jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; } }); /*! * Sizzle CSS Selector Engine * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ (function(){ var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, expando = "sizcache" + (Math.random() + '').replace('.', ''), done = 0, toString = Object.prototype.toString, hasDuplicate = false, baseHasDuplicate = true, rBackslash = /\\/g, rReturn = /\r\n/g, rNonWord = /\W/; // Here we check if the JavaScript engine is using some sort of // optimization where it does not always call our comparision // function. If that is the case, discard the hasDuplicate value. // Thus far that includes Google Chrome. [0, 0].sort(function() { baseHasDuplicate = false; return 0; }); var Sizzle = function( selector, context, results, seed ) { results = results || []; context = context || document; var origContext = context; if ( context.nodeType !== 1 && context.nodeType !== 9 ) { return []; } if ( !selector || typeof selector !== "string" ) { return results; } var m, set, checkSet, extra, ret, cur, pop, i, prune = true, contextXML = Sizzle.isXML( context ), parts = [], soFar = selector; // Reset the position of the chunker regexp (start from head) do { chunker.exec( "" ); m = chunker.exec( soFar ); if ( m ) { soFar = m[3]; parts.push( m[1] ); if ( m[2] ) { extra = m[3]; break; } } } while ( m ); if ( parts.length > 1 && origPOS.exec( selector ) ) { if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { set = posProcess( parts[0] + parts[1], context, seed ); } else { set = Expr.relative[ parts[0] ] ? [ context ] : Sizzle( parts.shift(), context ); while ( parts.length ) { selector = parts.shift(); if ( Expr.relative[ selector ] ) { selector += parts.shift(); } set = posProcess( selector, set, seed ); } } } else { // Take a shortcut and set the context if the root selector is an ID // (but not if it'll be faster if the inner selector is an ID) if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { ret = Sizzle.find( parts.shift(), context, contextXML ); context = ret.expr ? Sizzle.filter( ret.expr, ret.set )[0] : ret.set[0]; } if ( context ) { ret = seed ? { expr: parts.pop(), set: makeArray(seed) } : Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); set = ret.expr ? Sizzle.filter( ret.expr, ret.set ) : ret.set; if ( parts.length > 0 ) { checkSet = makeArray( set ); } else { prune = false; } while ( parts.length ) { cur = parts.pop(); pop = cur; if ( !Expr.relative[ cur ] ) { cur = ""; } else { pop = parts.pop(); } if ( pop == null ) { pop = context; } Expr.relative[ cur ]( checkSet, pop, contextXML ); } } else { checkSet = parts = []; } } if ( !checkSet ) { checkSet = set; } if ( !checkSet ) { Sizzle.error( cur || selector ); } if ( toString.call(checkSet) === "[object Array]" ) { if ( !prune ) { results.push.apply( results, checkSet ); } else if ( context && context.nodeType === 1 ) { for ( i = 0; checkSet[i] != null; i++ ) { if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { results.push( set[i] ); } } } else { for ( i = 0; checkSet[i] != null; i++ ) { if ( checkSet[i] && checkSet[i].nodeType === 1 ) { results.push( set[i] ); } } } } else { makeArray( checkSet, results ); } if ( extra ) { Sizzle( extra, origContext, results, seed ); Sizzle.uniqueSort( results ); } return results; }; Sizzle.uniqueSort = function( results ) { if ( sortOrder ) { hasDuplicate = baseHasDuplicate; results.sort( sortOrder ); if ( hasDuplicate ) { for ( var i = 1; i < results.length; i++ ) { if ( results[i] === results[ i - 1 ] ) { results.splice( i--, 1 ); } } } } return results; }; Sizzle.matches = function( expr, set ) { return Sizzle( expr, null, null, set ); }; Sizzle.matchesSelector = function( node, expr ) { return Sizzle( expr, null, null, [node] ).length > 0; }; Sizzle.find = function( expr, context, isXML ) { var set, i, len, match, type, left; if ( !expr ) { return []; } for ( i = 0, len = Expr.order.length; i < len; i++ ) { type = Expr.order[i]; if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { left = match[1]; match.splice( 1, 1 ); if ( left.substr( left.length - 1 ) !== "\\" ) { match[1] = (match[1] || "").replace( rBackslash, "" ); set = Expr.find[ type ]( match, context, isXML ); if ( set != null ) { expr = expr.replace( Expr.match[ type ], "" ); break; } } } } if ( !set ) { set = typeof context.getElementsByTagName !== "undefined" ? context.getElementsByTagName( "*" ) : []; } return { set: set, expr: expr }; }; Sizzle.filter = function( expr, set, inplace, not ) { var match, anyFound, type, found, item, filter, left, i, pass, old = expr, result = [], curLoop = set, isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); while ( expr && set.length ) { for ( type in Expr.filter ) { if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { filter = Expr.filter[ type ]; left = match[1]; anyFound = false; match.splice(1,1); if ( left.substr( left.length - 1 ) === "\\" ) { continue; } if ( curLoop === result ) { result = []; } if ( Expr.preFilter[ type ] ) { match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); if ( !match ) { anyFound = found = true; } else if ( match === true ) { continue; } } if ( match ) { for ( i = 0; (item = curLoop[i]) != null; i++ ) { if ( item ) { found = filter( item, match, i, curLoop ); pass = not ^ found; if ( inplace && found != null ) { if ( pass ) { anyFound = true; } else { curLoop[i] = false; } } else if ( pass ) { result.push( item ); anyFound = true; } } } } if ( found !== undefined ) { if ( !inplace ) { curLoop = result; } expr = expr.replace( Expr.match[ type ], "" ); if ( !anyFound ) { return []; } break; } } } // Improper expression if ( expr === old ) { if ( anyFound == null ) { Sizzle.error( expr ); } else { break; } } old = expr; } return curLoop; }; Sizzle.error = function( msg ) { throw new Error( "Syntax error, unrecognized expression: " + msg ); }; /** * Utility function for retreiving the text value of an array of DOM nodes * @param {Array|Element} elem */ var getText = Sizzle.getText = function( elem ) { var i, node, nodeType = elem.nodeType, ret = ""; if ( nodeType ) { if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { // Use textContent || innerText for elements if ( typeof elem.textContent === 'string' ) { return elem.textContent; } else if ( typeof elem.innerText === 'string' ) { // Replace IE's carriage returns return elem.innerText.replace( rReturn, '' ); } else { // Traverse it's children for ( elem = elem.firstChild; elem; elem = elem.nextSibling) { ret += getText( elem ); } } } else if ( nodeType === 3 || nodeType === 4 ) { return elem.nodeValue; } } else { // If no nodeType, this is expected to be an array for ( i = 0; (node = elem[i]); i++ ) { // Do not traverse comment nodes if ( node.nodeType !== 8 ) { ret += getText( node ); } } } return ret; }; var Expr = Sizzle.selectors = { order: [ "ID", "NAME", "TAG" ], match: { ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ }, leftMatch: {}, attrMap: { "class": "className", "for": "htmlFor" }, attrHandle: { href: function( elem ) { return elem.getAttribute( "href" ); }, type: function( elem ) { return elem.getAttribute( "type" ); } }, relative: { "+": function(checkSet, part){ var isPartStr = typeof part === "string", isTag = isPartStr && !rNonWord.test( part ), isPartStrNotTag = isPartStr && !isTag; if ( isTag ) { part = part.toLowerCase(); } for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { if ( (elem = checkSet[i]) ) { while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? elem || false : elem === part; } } if ( isPartStrNotTag ) { Sizzle.filter( part, checkSet, true ); } }, ">": function( checkSet, part ) { var elem, isPartStr = typeof part === "string", i = 0, l = checkSet.length; if ( isPartStr && !rNonWord.test( part ) ) { part = part.toLowerCase(); for ( ; i < l; i++ ) { elem = checkSet[i]; if ( elem ) { var parent = elem.parentNode; checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; } } } else { for ( ; i < l; i++ ) { elem = checkSet[i]; if ( elem ) { checkSet[i] = isPartStr ? elem.parentNode : elem.parentNode === part; } } if ( isPartStr ) { Sizzle.filter( part, checkSet, true ); } } }, "": function(checkSet, part, isXML){ var nodeCheck, doneName = done++, checkFn = dirCheck; if ( typeof part === "string" && !rNonWord.test( part ) ) { part = part.toLowerCase(); nodeCheck = part; checkFn = dirNodeCheck; } checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); }, "~": function( checkSet, part, isXML ) { var nodeCheck, doneName = done++, checkFn = dirCheck; if ( typeof part === "string" && !rNonWord.test( part ) ) { part = part.toLowerCase(); nodeCheck = part; checkFn = dirNodeCheck; } checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); } }, find: { ID: function( match, context, isXML ) { if ( typeof context.getElementById !== "undefined" && !isXML ) { var m = context.getElementById(match[1]); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 return m && m.parentNode ? [m] : []; } }, NAME: function( match, context ) { if ( typeof context.getElementsByName !== "undefined" ) { var ret = [], results = context.getElementsByName( match[1] ); for ( var i = 0, l = results.length; i < l; i++ ) { if ( results[i].getAttribute("name") === match[1] ) { ret.push( results[i] ); } } return ret.length === 0 ? null : ret; } }, TAG: function( match, context ) { if ( typeof context.getElementsByTagName !== "undefined" ) { return context.getElementsByTagName( match[1] ); } } }, preFilter: { CLASS: function( match, curLoop, inplace, result, not, isXML ) { match = " " + match[1].replace( rBackslash, "" ) + " "; if ( isXML ) { return match; } for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { if ( elem ) { if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { if ( !inplace ) { result.push( elem ); } } else if ( inplace ) { curLoop[i] = false; } } } return false; }, ID: function( match ) { return match[1].replace( rBackslash, "" ); }, TAG: function( match, curLoop ) { return match[1].replace( rBackslash, "" ).toLowerCase(); }, CHILD: function( match ) { if ( match[1] === "nth" ) { if ( !match[2] ) { Sizzle.error( match[0] ); } match[2] = match[2].replace(/^\+|\s*/g, ''); // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); // calculate the numbers (first)n+(last) including if they are negative match[2] = (test[1] + (test[2] || 1)) - 0; match[3] = test[3] - 0; } else if ( match[2] ) { Sizzle.error( match[0] ); } // TODO: Move to normal caching system match[0] = done++; return match; }, ATTR: function( match, curLoop, inplace, result, not, isXML ) { var name = match[1] = match[1].replace( rBackslash, "" ); if ( !isXML && Expr.attrMap[name] ) { match[1] = Expr.attrMap[name]; } // Handle if an un-quoted value was used match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); if ( match[2] === "~=" ) { match[4] = " " + match[4] + " "; } return match; }, PSEUDO: function( match, curLoop, inplace, result, not ) { if ( match[1] === "not" ) { // If we're dealing with a complex expression, or a simple one if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { match[3] = Sizzle(match[3], null, null, curLoop); } else { var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); if ( !inplace ) { result.push.apply( result, ret ); } return false; } } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { return true; } return match; }, POS: function( match ) { match.unshift( true ); return match; } }, filters: { enabled: function( elem ) { return elem.disabled === false && elem.type !== "hidden"; }, disabled: function( elem ) { return elem.disabled === true; }, checked: function( elem ) { return elem.checked === true; }, selected: function( elem ) { // Accessing this property makes selected-by-default // options in Safari work properly if ( elem.parentNode ) { elem.parentNode.selectedIndex; } return elem.selected === true; }, parent: function( elem ) { return !!elem.firstChild; }, empty: function( elem ) { return !elem.firstChild; }, has: function( elem, i, match ) { return !!Sizzle( match[3], elem ).length; }, header: function( elem ) { return (/h\d/i).test( elem.nodeName ); }, text: function( elem ) { var attr = elem.getAttribute( "type" ), type = elem.type; // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) // use getAttribute instead to test this case return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); }, radio: function( elem ) { return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; }, checkbox: function( elem ) { return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; }, file: function( elem ) { return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; }, password: function( elem ) { return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; }, submit: function( elem ) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && "submit" === elem.type; }, image: function( elem ) { return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; }, reset: function( elem ) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && "reset" === elem.type; }, button: function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && "button" === elem.type || name === "button"; }, input: function( elem ) { return (/input|select|textarea|button/i).test( elem.nodeName ); }, focus: function( elem ) { return elem === elem.ownerDocument.activeElement; } }, setFilters: { first: function( elem, i ) { return i === 0; }, last: function( elem, i, match, array ) { return i === array.length - 1; }, even: function( elem, i ) { return i % 2 === 0; }, odd: function( elem, i ) { return i % 2 === 1; }, lt: function( elem, i, match ) { return i < match[3] - 0; }, gt: function( elem, i, match ) { return i > match[3] - 0; }, nth: function( elem, i, match ) { return match[3] - 0 === i; }, eq: function( elem, i, match ) { return match[3] - 0 === i; } }, filter: { PSEUDO: function( elem, match, i, array ) { var name = match[1], filter = Expr.filters[ name ]; if ( filter ) { return filter( elem, i, match, array ); } else if ( name === "contains" ) { return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0; } else if ( name === "not" ) { var not = match[3]; for ( var j = 0, l = not.length; j < l; j++ ) { if ( not[j] === elem ) { return false; } } return true; } else { Sizzle.error( name ); } }, CHILD: function( elem, match ) { var first, last, doneName, parent, cache, count, diff, type = match[1], node = elem; switch ( type ) { case "only": case "first": while ( (node = node.previousSibling) ) { if ( node.nodeType === 1 ) { return false; } } if ( type === "first" ) { return true; } node = elem; /* falls through */ case "last": while ( (node = node.nextSibling) ) { if ( node.nodeType === 1 ) { return false; } } return true; case "nth": first = match[2]; last = match[3]; if ( first === 1 && last === 0 ) { return true; } doneName = match[0]; parent = elem.parentNode; if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) { count = 0; for ( node = parent.firstChild; node; node = node.nextSibling ) { if ( node.nodeType === 1 ) { node.nodeIndex = ++count; } } parent[ expando ] = doneName; } diff = elem.nodeIndex - last; if ( first === 0 ) { return diff === 0; } else { return ( diff % first === 0 && diff / first >= 0 ); } } }, ID: function( elem, match ) { return elem.nodeType === 1 && elem.getAttribute("id") === match; }, TAG: function( elem, match ) { return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match; }, CLASS: function( elem, match ) { return (" " + (elem.className || elem.getAttribute("class")) + " ") .indexOf( match ) > -1; }, ATTR: function( elem, match ) { var name = match[1], result = Sizzle.attr ? Sizzle.attr( elem, name ) : Expr.attrHandle[ name ] ? Expr.attrHandle[ name ]( elem ) : elem[ name ] != null ? elem[ name ] : elem.getAttribute( name ), value = result + "", type = match[2], check = match[4]; return result == null ? type === "!=" : !type && Sizzle.attr ? result != null : type === "=" ? value === check : type === "*=" ? value.indexOf(check) >= 0 : type === "~=" ? (" " + value + " ").indexOf(check) >= 0 : !check ? value && result !== false : type === "!=" ? value !== check : type === "^=" ? value.indexOf(check) === 0 : type === "$=" ? value.substr(value.length - check.length) === check : type === "|=" ? value === check || value.substr(0, check.length + 1) === check + "-" : false; }, POS: function( elem, match, i, array ) { var name = match[2], filter = Expr.setFilters[ name ]; if ( filter ) { return filter( elem, i, match, array ); } } } }; var origPOS = Expr.match.POS, fescape = function(all, num){ return "\\" + (num - 0 + 1); }; for ( var type in Expr.match ) { Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); } // Expose origPOS // "global" as in regardless of relation to brackets/parens Expr.match.globalPOS = origPOS; var makeArray = function( array, results ) { array = Array.prototype.slice.call( array, 0 ); if ( results ) { results.push.apply( results, array ); return results; } return array; }; // Perform a simple check to determine if the browser is capable of // converting a NodeList to an array using builtin methods. // Also verifies that the returned array holds DOM nodes // (which is not the case in the Blackberry browser) try { Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; // Provide a fallback method if it does not work } catch( e ) { makeArray = function( array, results ) { var i = 0, ret = results || []; if ( toString.call(array) === "[object Array]" ) { Array.prototype.push.apply( ret, array ); } else { if ( typeof array.length === "number" ) { for ( var l = array.length; i < l; i++ ) { ret.push( array[i] ); } } else { for ( ; array[i]; i++ ) { ret.push( array[i] ); } } } return ret; }; } var sortOrder, siblingCheck; if ( document.documentElement.compareDocumentPosition ) { sortOrder = function( a, b ) { if ( a === b ) { hasDuplicate = true; return 0; } if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { return a.compareDocumentPosition ? -1 : 1; } return a.compareDocumentPosition(b) & 4 ? -1 : 1; }; } else { sortOrder = function( a, b ) { // The nodes are identical, we can exit early if ( a === b ) { hasDuplicate = true; return 0; // Fallback to using sourceIndex (in IE) if it's available on both nodes } else if ( a.sourceIndex && b.sourceIndex ) { return a.sourceIndex - b.sourceIndex; } var al, bl, ap = [], bp = [], aup = a.parentNode, bup = b.parentNode, cur = aup; // If the nodes are siblings (or identical) we can do a quick check if ( aup === bup ) { return siblingCheck( a, b ); // If no parents were found then the nodes are disconnected } else if ( !aup ) { return -1; } else if ( !bup ) { return 1; } // Otherwise they're somewhere else in the tree so we need // to build up a full list of the parentNodes for comparison while ( cur ) { ap.unshift( cur ); cur = cur.parentNode; } cur = bup; while ( cur ) { bp.unshift( cur ); cur = cur.parentNode; } al = ap.length; bl = bp.length; // Start walking down the tree looking for a discrepancy for ( var i = 0; i < al && i < bl; i++ ) { if ( ap[i] !== bp[i] ) { return siblingCheck( ap[i], bp[i] ); } } // We ended someplace up the tree so do a sibling check return i === al ? siblingCheck( a, bp[i], -1 ) : siblingCheck( ap[i], b, 1 ); }; siblingCheck = function( a, b, ret ) { if ( a === b ) { return ret; } var cur = a.nextSibling; while ( cur ) { if ( cur === b ) { return -1; } cur = cur.nextSibling; } return 1; }; } // Check to see if the browser returns elements by name when // querying by getElementById (and provide a workaround) (function(){ // We're going to inject a fake input element with a specified name var form = document.createElement("div"), id = "script" + (new Date()).getTime(), root = document.documentElement; form.innerHTML = "<a name='" + id + "'/>"; // Inject it into the root element, check its status, and remove it quickly root.insertBefore( form, root.firstChild ); // The workaround has to do additional checks after a getElementById // Which slows things down for other browsers (hence the branching) if ( document.getElementById( id ) ) { Expr.find.ID = function( match, context, isXML ) { if ( typeof context.getElementById !== "undefined" && !isXML ) { var m = context.getElementById(match[1]); return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : []; } }; Expr.filter.ID = function( elem, match ) { var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); return elem.nodeType === 1 && node && node.nodeValue === match; }; } root.removeChild( form ); // release memory in IE root = form = null; })(); (function(){ // Check to see if the browser returns only elements // when doing getElementsByTagName("*") // Create a fake element var div = document.createElement("div"); div.appendChild( document.createComment("") ); // Make sure no comments are found if ( div.getElementsByTagName("*").length > 0 ) { Expr.find.TAG = function( match, context ) { var results = context.getElementsByTagName( match[1] ); // Filter out possible comments if ( match[1] === "*" ) { var tmp = []; for ( var i = 0; results[i]; i++ ) { if ( results[i].nodeType === 1 ) { tmp.push( results[i] ); } } results = tmp; } return results; }; } // Check to see if an attribute returns normalized href attributes div.innerHTML = "<a href='#'></a>"; if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && div.firstChild.getAttribute("href") !== "#" ) { Expr.attrHandle.href = function( elem ) { return elem.getAttribute( "href", 2 ); }; } // release memory in IE div = null; })(); if ( document.querySelectorAll ) { (function(){ var oldSizzle = Sizzle, div = document.createElement("div"), id = "__sizzle__"; div.innerHTML = "<p class='TEST'></p>"; // Safari can't handle uppercase or unicode characters when // in quirks mode. if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { return; } Sizzle = function( query, context, extra, seed ) { context = context || document; // Only use querySelectorAll on non-XML documents // (ID selectors don't work in non-HTML documents) if ( !seed && !Sizzle.isXML(context) ) { // See if we find a selector to speed up var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { // Speed-up: Sizzle("TAG") if ( match[1] ) { return makeArray( context.getElementsByTagName( query ), extra ); // Speed-up: Sizzle(".CLASS") } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { return makeArray( context.getElementsByClassName( match[2] ), extra ); } } if ( context.nodeType === 9 ) { // Speed-up: Sizzle("body") // The body element only exists once, optimize finding it if ( query === "body" && context.body ) { return makeArray( [ context.body ], extra ); // Speed-up: Sizzle("#ID") } else if ( match && match[3] ) { var elem = context.getElementById( match[3] ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 if ( elem && elem.parentNode ) { // Handle the case where IE and Opera return items // by name instead of ID if ( elem.id === match[3] ) { return makeArray( [ elem ], extra ); } } else { return makeArray( [], extra ); } } try { return makeArray( context.querySelectorAll(query), extra ); } catch(qsaError) {} // qSA works strangely on Element-rooted queries // We can work around this by specifying an extra ID on the root // and working up from there (Thanks to Andrew Dupont for the technique) // IE 8 doesn't work on object elements } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { var oldContext = context, old = context.getAttribute( "id" ), nid = old || id, hasParent = context.parentNode, relativeHierarchySelector = /^\s*[+~]/.test( query ); if ( !old ) { context.setAttribute( "id", nid ); } else { nid = nid.replace( /'/g, "\\$&" ); } if ( relativeHierarchySelector && hasParent ) { context = context.parentNode; } try { if ( !relativeHierarchySelector || hasParent ) { return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); } } catch(pseudoError) { } finally { if ( !old ) { oldContext.removeAttribute( "id" ); } } } } return oldSizzle(query, context, extra, seed); }; for ( var prop in oldSizzle ) { Sizzle[ prop ] = oldSizzle[ prop ]; } // release memory in IE div = null; })(); } (function(){ var html = document.documentElement, matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; if ( matches ) { // Check to see if it's possible to do matchesSelector // on a disconnected node (IE 9 fails this) var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), pseudoWorks = false; try { // This should fail with an exception // Gecko does not error, returns false instead matches.call( document.documentElement, "[test!='']:sizzle" ); } catch( pseudoError ) { pseudoWorks = true; } Sizzle.matchesSelector = function( node, expr ) { // Make sure that attribute selectors are quoted expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); if ( !Sizzle.isXML( node ) ) { try { if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { var ret = matches.call( node, expr ); // IE 9's matchesSelector returns false on disconnected nodes if ( ret || !disconnectedMatch || // As well, disconnected nodes are said to be in a document // fragment in IE 9, so check for that node.document && node.document.nodeType !== 11 ) { return ret; } } } catch(e) {} } return Sizzle(expr, null, null, [node]).length > 0; }; } })(); (function(){ var div = document.createElement("div"); div.innerHTML = "<div class='test e'></div><div class='test'></div>"; // Opera can't find a second classname (in 9.6) // Also, make sure that getElementsByClassName actually exists if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { return; } // Safari caches class attributes, doesn't catch changes (in 3.2) div.lastChild.className = "e"; if ( div.getElementsByClassName("e").length === 1 ) { return; } Expr.order.splice(1, 0, "CLASS"); Expr.find.CLASS = function( match, context, isXML ) { if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { return context.getElementsByClassName(match[1]); } }; // release memory in IE div = null; })(); function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { for ( var i = 0, l = checkSet.length; i < l; i++ ) { var elem = checkSet[i]; if ( elem ) { var match = false; elem = elem[dir]; while ( elem ) { if ( elem[ expando ] === doneName ) { match = checkSet[elem.sizset]; break; } if ( elem.nodeType === 1 && !isXML ){ elem[ expando ] = doneName; elem.sizset = i; } if ( elem.nodeName.toLowerCase() === cur ) { match = elem; break; } elem = elem[dir]; } checkSet[i] = match; } } } function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { for ( var i = 0, l = checkSet.length; i < l; i++ ) { var elem = checkSet[i]; if ( elem ) { var match = false; elem = elem[dir]; while ( elem ) { if ( elem[ expando ] === doneName ) { match = checkSet[elem.sizset]; break; } if ( elem.nodeType === 1 ) { if ( !isXML ) { elem[ expando ] = doneName; elem.sizset = i; } if ( typeof cur !== "string" ) { if ( elem === cur ) { match = true; break; } } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { match = elem; break; } } elem = elem[dir]; } checkSet[i] = match; } } } if ( document.documentElement.contains ) { Sizzle.contains = function( a, b ) { return a !== b && (a.contains ? a.contains(b) : true); }; } else if ( document.documentElement.compareDocumentPosition ) { Sizzle.contains = function( a, b ) { return !!(a.compareDocumentPosition(b) & 16); }; } else { Sizzle.contains = function() { return false; }; } Sizzle.isXML = function( elem ) { // documentElement is verified for cases where it doesn't yet exist // (such as loading iframes in IE - #4833) var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; return documentElement ? documentElement.nodeName !== "HTML" : false; }; var posProcess = function( selector, context, seed ) { var match, tmpSet = [], later = "", root = context.nodeType ? [context] : context; // Position selectors must be done after the filter // And so must :not(positional) so we move all PSEUDOs to the end while ( (match = Expr.match.PSEUDO.exec( selector )) ) { later += match[0]; selector = selector.replace( Expr.match.PSEUDO, "" ); } selector = Expr.relative[selector] ? selector + "*" : selector; for ( var i = 0, l = root.length; i < l; i++ ) { Sizzle( selector, root[i], tmpSet, seed ); } return Sizzle.filter( later, tmpSet ); }; // EXPOSE // Override sizzle attribute retrieval Sizzle.attr = jQuery.attr; Sizzle.selectors.attrMap = {}; jQuery.find = Sizzle; jQuery.expr = Sizzle.selectors; jQuery.expr[":"] = jQuery.expr.filters; jQuery.unique = Sizzle.uniqueSort; jQuery.text = Sizzle.getText; jQuery.isXMLDoc = Sizzle.isXML; jQuery.contains = Sizzle.contains; })(); var runtil = /Until$/, rparentsprev = /^(?:parents|prevUntil|prevAll)/, // Note: This RegExp should be improved, or likely pulled from Sizzle rmultiselector = /,/, isSimple = /^.[^:#\[\.,]*$/, slice = Array.prototype.slice, POS = jQuery.expr.match.globalPOS, // methods guaranteed to produce a unique set when starting from a unique set guaranteedUnique = { children: true, contents: true, next: true, prev: true }; jQuery.fn.extend({ find: function( selector ) { var self = this, i, l; if ( typeof selector !== "string" ) { return jQuery( selector ).filter(function() { for ( i = 0, l = self.length; i < l; i++ ) { if ( jQuery.contains( self[ i ], this ) ) { return true; } } }); } var ret = this.pushStack( "", "find", selector ), length, n, r; for ( i = 0, l = this.length; i < l; i++ ) { length = ret.length; jQuery.find( selector, this[i], ret ); if ( i > 0 ) { // Make sure that the results are unique for ( n = length; n < ret.length; n++ ) { for ( r = 0; r < length; r++ ) { if ( ret[r] === ret[n] ) { ret.splice(n--, 1); break; } } } } } return ret; }, has: function( target ) { var targets = jQuery( target ); return this.filter(function() { for ( var i = 0, l = targets.length; i < l; i++ ) { if ( jQuery.contains( this, targets[i] ) ) { return true; } } }); }, not: function( selector ) { return this.pushStack( winnow(this, selector, false), "not", selector); }, filter: function( selector ) { return this.pushStack( winnow(this, selector, true), "filter", selector ); }, is: function( selector ) { return !!selector && ( typeof selector === "string" ? // If this is a positional selector, check membership in the returned set // so $("p:first").is("p:last") won't return true for a doc with two "p". POS.test( selector ) ? jQuery( selector, this.context ).index( this[0] ) >= 0 : jQuery.filter( selector, this ).length > 0 : this.filter( selector ).length > 0 ); }, closest: function( selectors, context ) { var ret = [], i, l, cur = this[0]; // Array (deprecated as of jQuery 1.7) if ( jQuery.isArray( selectors ) ) { var level = 1; while ( cur && cur.ownerDocument && cur !== context ) { for ( i = 0; i < selectors.length; i++ ) { if ( jQuery( cur ).is( selectors[ i ] ) ) { ret.push({ selector: selectors[ i ], elem: cur, level: level }); } } cur = cur.parentNode; level++; } return ret; } // String var pos = POS.test( selectors ) || typeof selectors !== "string" ? jQuery( selectors, context || this.context ) : 0; for ( i = 0, l = this.length; i < l; i++ ) { cur = this[i]; while ( cur ) { if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { ret.push( cur ); break; } else { cur = cur.parentNode; if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) { break; } } } } ret = ret.length > 1 ? jQuery.unique( ret ) : ret; return this.pushStack( ret, "closest", selectors ); }, // Determine the position of an element within // the matched set of elements index: function( elem ) { // No argument, return index in parent if ( !elem ) { return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; } // index in selector if ( typeof elem === "string" ) { return jQuery.inArray( this[0], jQuery( elem ) ); } // Locate the position of the desired element return jQuery.inArray( // If it receives a jQuery object, the first element is used elem.jquery ? elem[0] : elem, this ); }, add: function( selector, context ) { var set = typeof selector === "string" ? jQuery( selector, context ) : jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), all = jQuery.merge( this.get(), set ); return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? all : jQuery.unique( all ) ); }, andSelf: function() { return this.add( this.prevObject ); } }); // A painfully simple check to see if an element is disconnected // from a document (should be improved, where feasible). function isDisconnected( node ) { return !node || !node.parentNode || node.parentNode.nodeType === 11; } jQuery.each({ parent: function( elem ) { var parent = elem.parentNode; return parent && parent.nodeType !== 11 ? parent : null; }, parents: function( elem ) { return jQuery.dir( elem, "parentNode" ); }, parentsUntil: function( elem, i, until ) { return jQuery.dir( elem, "parentNode", until ); }, next: function( elem ) { return jQuery.nth( elem, 2, "nextSibling" ); }, prev: function( elem ) { return jQuery.nth( elem, 2, "previousSibling" ); }, nextAll: function( elem ) { return jQuery.dir( elem, "nextSibling" ); }, prevAll: function( elem ) { return jQuery.dir( elem, "previousSibling" ); }, nextUntil: function( elem, i, until ) { return jQuery.dir( elem, "nextSibling", until ); }, prevUntil: function( elem, i, until ) { return jQuery.dir( elem, "previousSibling", until ); }, siblings: function( elem ) { return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); }, children: function( elem ) { return jQuery.sibling( elem.firstChild ); }, contents: function( elem ) { return jQuery.nodeName( elem, "iframe" ) ? elem.contentDocument || elem.contentWindow.document : jQuery.makeArray( elem.childNodes ); } }, function( name, fn ) { jQuery.fn[ name ] = function( until, selector ) { var ret = jQuery.map( this, fn, until ); if ( !runtil.test( name ) ) { selector = until; } if ( selector && typeof selector === "string" ) { ret = jQuery.filter( selector, ret ); } ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { ret = ret.reverse(); } return this.pushStack( ret, name, slice.call( arguments ).join(",") ); }; }); jQuery.extend({ filter: function( expr, elems, not ) { if ( not ) { expr = ":not(" + expr + ")"; } return elems.length === 1 ? jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : jQuery.find.matches(expr, elems); }, dir: function( elem, dir, until ) { var matched = [], cur = elem[ dir ]; while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { if ( cur.nodeType === 1 ) { matched.push( cur ); } cur = cur[dir]; } return matched; }, nth: function( cur, result, dir, elem ) { result = result || 1; var num = 0; for ( ; cur; cur = cur[dir] ) { if ( cur.nodeType === 1 && ++num === result ) { break; } } return cur; }, sibling: function( n, elem ) { var r = []; for ( ; n; n = n.nextSibling ) { if ( n.nodeType === 1 && n !== elem ) { r.push( n ); } } return r; } }); // Implement the identical functionality for filter and not function winnow( elements, qualifier, keep ) { // Can't pass null or undefined to indexOf in Firefox 4 // Set to 0 to skip string check qualifier = qualifier || 0; if ( jQuery.isFunction( qualifier ) ) { return jQuery.grep(elements, function( elem, i ) { var retVal = !!qualifier.call( elem, i, elem ); return retVal === keep; }); } else if ( qualifier.nodeType ) { return jQuery.grep(elements, function( elem, i ) { return ( elem === qualifier ) === keep; }); } else if ( typeof qualifier === "string" ) { var filtered = jQuery.grep(elements, function( elem ) { return elem.nodeType === 1; }); if ( isSimple.test( qualifier ) ) { return jQuery.filter(qualifier, filtered, !keep); } else { qualifier = jQuery.filter( qualifier, filtered ); } } return jQuery.grep(elements, function( elem, i ) { return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; }); } function createSafeFragment( document ) { var list = nodeNames.split( "|" ), safeFrag = document.createDocumentFragment(); if ( safeFrag.createElement ) { while ( list.length ) { safeFrag.createElement( list.pop() ); } } return safeFrag; } var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, rleadingWhitespace = /^\s+/, rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, rtagName = /<([\w:]+)/, rtbody = /<tbody/i, rhtml = /<|&#?\w+;/, rnoInnerhtml = /<(?:script|style)/i, rnocache = /<(?:script|object|embed|option|style)/i, rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), // checked="checked" or checked rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, rscriptType = /\/(java|ecma)script/i, rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/, wrapMap = { option: [ 1, "<select multiple='multiple'>", "</select>" ], legend: [ 1, "<fieldset>", "</fieldset>" ], thead: [ 1, "<table>", "</table>" ], tr: [ 2, "<table><tbody>", "</tbody></table>" ], td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], area: [ 1, "<map>", "</map>" ], _default: [ 0, "", "" ] }, safeFragment = createSafeFragment( document ); wrapMap.optgroup = wrapMap.option; wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; // IE can't serialize <link> and <script> tags normally if ( !jQuery.support.htmlSerialize ) { wrapMap._default = [ 1, "div<div>", "</div>" ]; } jQuery.fn.extend({ text: function( value ) { return jQuery.access( this, function( value ) { return value === undefined ? jQuery.text( this ) : this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); }, null, value, arguments.length ); }, wrapAll: function( html ) { if ( jQuery.isFunction( html ) ) { return this.each(function(i) { jQuery(this).wrapAll( html.call(this, i) ); }); } if ( this[0] ) { // The elements to wrap the target around var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); if ( this[0].parentNode ) { wrap.insertBefore( this[0] ); } wrap.map(function() { var elem = this; while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { elem = elem.firstChild; } return elem; }).append( this ); } return this; }, wrapInner: function( html ) { if ( jQuery.isFunction( html ) ) { return this.each(function(i) { jQuery(this).wrapInner( html.call(this, i) ); }); } return this.each(function() { var self = jQuery( this ), contents = self.contents(); if ( contents.length ) { contents.wrapAll( html ); } else { self.append( html ); } }); }, wrap: function( html ) { var isFunction = jQuery.isFunction( html ); return this.each(function(i) { jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); }); }, unwrap: function() { return this.parent().each(function() { if ( !jQuery.nodeName( this, "body" ) ) { jQuery( this ).replaceWith( this.childNodes ); } }).end(); }, append: function() { return this.domManip(arguments, true, function( elem ) { if ( this.nodeType === 1 ) { this.appendChild( elem ); } }); }, prepend: function() { return this.domManip(arguments, true, function( elem ) { if ( this.nodeType === 1 ) { this.insertBefore( elem, this.firstChild ); } }); }, before: function() { if ( this[0] && this[0].parentNode ) { return this.domManip(arguments, false, function( elem ) { this.parentNode.insertBefore( elem, this ); }); } else if ( arguments.length ) { var set = jQuery.clean( arguments ); set.push.apply( set, this.toArray() ); return this.pushStack( set, "before", arguments ); } }, after: function() { if ( this[0] && this[0].parentNode ) { return this.domManip(arguments, false, function( elem ) { this.parentNode.insertBefore( elem, this.nextSibling ); }); } else if ( arguments.length ) { var set = this.pushStack( this, "after", arguments ); set.push.apply( set, jQuery.clean(arguments) ); return set; } }, // keepData is for internal use only--do not document remove: function( selector, keepData ) { for ( var i = 0, elem; (elem = this[i]) != null; i++ ) { if ( !selector || jQuery.filter( selector, [ elem ] ).length ) { if ( !keepData && elem.nodeType === 1 ) { jQuery.cleanData( elem.getElementsByTagName("*") ); jQuery.cleanData( [ elem ] ); } if ( elem.parentNode ) { elem.parentNode.removeChild( elem ); } } } return this; }, empty: function() { for ( var i = 0, elem; (elem = this[i]) != null; i++ ) { // Remove element nodes and prevent memory leaks if ( elem.nodeType === 1 ) { jQuery.cleanData( elem.getElementsByTagName("*") ); } // Remove any remaining nodes while ( elem.firstChild ) { elem.removeChild( elem.firstChild ); } } return this; }, clone: function( dataAndEvents, deepDataAndEvents ) { dataAndEvents = dataAndEvents == null ? false : dataAndEvents; deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; return this.map( function () { return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); }); }, html: function( value ) { return jQuery.access( this, function( value ) { var elem = this[0] || {}, i = 0, l = this.length; if ( value === undefined ) { return elem.nodeType === 1 ? elem.innerHTML.replace( rinlinejQuery, "" ) : null; } if ( typeof value === "string" && !rnoInnerhtml.test( value ) && ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { value = value.replace( rxhtmlTag, "<$1></$2>" ); try { for (; i < l; i++ ) { // Remove element nodes and prevent memory leaks elem = this[i] || {}; if ( elem.nodeType === 1 ) { jQuery.cleanData( elem.getElementsByTagName( "*" ) ); elem.innerHTML = value; } } elem = 0; // If using innerHTML throws an exception, use the fallback method } catch(e) {} } if ( elem ) { this.empty().append( value ); } }, null, value, arguments.length ); }, replaceWith: function( value ) { if ( this[0] && this[0].parentNode ) { // Make sure that the elements are removed from the DOM before they are inserted // this can help fix replacing a parent with child elements if ( jQuery.isFunction( value ) ) { return this.each(function(i) { var self = jQuery(this), old = self.html(); self.replaceWith( value.call( this, i, old ) ); }); } if ( typeof value !== "string" ) { value = jQuery( value ).detach(); } return this.each(function() { var next = this.nextSibling, parent = this.parentNode; jQuery( this ).remove(); if ( next ) { jQuery(next).before( value ); } else { jQuery(parent).append( value ); } }); } else { return this.length ? this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) : this; } }, detach: function( selector ) { return this.remove( selector, true ); }, domManip: function( args, table, callback ) { var results, first, fragment, parent, value = args[0], scripts = []; // We can't cloneNode fragments that contain checked, in WebKit if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) { return this.each(function() { jQuery(this).domManip( args, table, callback, true ); }); } if ( jQuery.isFunction(value) ) { return this.each(function(i) { var self = jQuery(this); args[0] = value.call(this, i, table ? self.html() : undefined); self.domManip( args, table, callback ); }); } if ( this[0] ) { parent = value && value.parentNode; // If we're in a fragment, just use that instead of building a new one if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) { results = { fragment: parent }; } else { results = jQuery.buildFragment( args, this, scripts ); } fragment = results.fragment; if ( fragment.childNodes.length === 1 ) { first = fragment = fragment.firstChild; } else { first = fragment.firstChild; } if ( first ) { table = table && jQuery.nodeName( first, "tr" ); for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) { callback.call( table ? root(this[i], first) : this[i], // Make sure that we do not leak memory by inadvertently discarding // the original fragment (which might have attached data) instead of // using it; in addition, use the original fragment object for the last // item instead of first because it can end up being emptied incorrectly // in certain situations (Bug #8070). // Fragments from the fragment cache must always be cloned and never used // in place. results.cacheable || ( l > 1 && i < lastIndex ) ? jQuery.clone( fragment, true, true ) : fragment ); } } if ( scripts.length ) { jQuery.each( scripts, function( i, elem ) { if ( elem.src ) { jQuery.ajax({ type: "GET", global: false, url: elem.src, async: false, dataType: "script" }); } else { jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) ); } if ( elem.parentNode ) { elem.parentNode.removeChild( elem ); } }); } } return this; } }); function root( elem, cur ) { return jQuery.nodeName(elem, "table") ? (elem.getElementsByTagName("tbody")[0] || elem.appendChild(elem.ownerDocument.createElement("tbody"))) : elem; } function cloneCopyEvent( src, dest ) { if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { return; } var type, i, l, oldData = jQuery._data( src ), curData = jQuery._data( dest, oldData ), events = oldData.events; if ( events ) { delete curData.handle; curData.events = {}; for ( type in events ) { for ( i = 0, l = events[ type ].length; i < l; i++ ) { jQuery.event.add( dest, type, events[ type ][ i ] ); } } } // make the cloned public data object a copy from the original if ( curData.data ) { curData.data = jQuery.extend( {}, curData.data ); } } function cloneFixAttributes( src, dest ) { var nodeName; // We do not need to do anything for non-Elements if ( dest.nodeType !== 1 ) { return; } // clearAttributes removes the attributes, which we don't want, // but also removes the attachEvent events, which we *do* want if ( dest.clearAttributes ) { dest.clearAttributes(); } // mergeAttributes, in contrast, only merges back on the // original attributes, not the events if ( dest.mergeAttributes ) { dest.mergeAttributes( src ); } nodeName = dest.nodeName.toLowerCase(); // IE6-8 fail to clone children inside object elements that use // the proprietary classid attribute value (rather than the type // attribute) to identify the type of content to display if ( nodeName === "object" ) { dest.outerHTML = src.outerHTML; } else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) { // IE6-8 fails to persist the checked state of a cloned checkbox // or radio button. Worse, IE6-7 fail to give the cloned element // a checked appearance if the defaultChecked value isn't also set if ( src.checked ) { dest.defaultChecked = dest.checked = src.checked; } // IE6-7 get confused and end up setting the value of a cloned // checkbox/radio button to an empty string instead of "on" if ( dest.value !== src.value ) { dest.value = src.value; } // IE6-8 fails to return the selected option to the default selected // state when cloning options } else if ( nodeName === "option" ) { dest.selected = src.defaultSelected; // IE6-8 fails to set the defaultValue to the correct value when // cloning other types of input fields } else if ( nodeName === "input" || nodeName === "textarea" ) { dest.defaultValue = src.defaultValue; // IE blanks contents when cloning scripts } else if ( nodeName === "script" && dest.text !== src.text ) { dest.text = src.text; } // Event data gets referenced instead of copied if the expando // gets copied too dest.removeAttribute( jQuery.expando ); // Clear flags for bubbling special change/submit events, they must // be reattached when the newly cloned events are first activated dest.removeAttribute( "_submit_attached" ); dest.removeAttribute( "_change_attached" ); } jQuery.buildFragment = function( args, nodes, scripts ) { var fragment, cacheable, cacheresults, doc, first = args[ 0 ]; // nodes may contain either an explicit document object, // a jQuery collection or context object. // If nodes[0] contains a valid object to assign to doc if ( nodes && nodes[0] ) { doc = nodes[0].ownerDocument || nodes[0]; } // Ensure that an attr object doesn't incorrectly stand in as a document object // Chrome and Firefox seem to allow this to occur and will throw exception // Fixes #8950 if ( !doc.createDocumentFragment ) { doc = document; } // Only cache "small" (1/2 KB) HTML strings that are associated with the main document // Cloning options loses the selected state, so don't cache them // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501 if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document && first.charAt(0) === "<" && !rnocache.test( first ) && (jQuery.support.checkClone || !rchecked.test( first )) && (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) { cacheable = true; cacheresults = jQuery.fragments[ first ]; if ( cacheresults && cacheresults !== 1 ) { fragment = cacheresults; } } if ( !fragment ) { fragment = doc.createDocumentFragment(); jQuery.clean( args, doc, fragment, scripts ); } if ( cacheable ) { jQuery.fragments[ first ] = cacheresults ? fragment : 1; } return { fragment: fragment, cacheable: cacheable }; }; jQuery.fragments = {}; jQuery.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function( name, original ) { jQuery.fn[ name ] = function( selector ) { var ret = [], insert = jQuery( selector ), parent = this.length === 1 && this[0].parentNode; if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) { insert[ original ]( this[0] ); return this; } else { for ( var i = 0, l = insert.length; i < l; i++ ) { var elems = ( i > 0 ? this.clone(true) : this ).get(); jQuery( insert[i] )[ original ]( elems ); ret = ret.concat( elems ); } return this.pushStack( ret, name, insert.selector ); } }; }); function getAll( elem ) { if ( typeof elem.getElementsByTagName !== "undefined" ) { return elem.getElementsByTagName( "*" ); } else if ( typeof elem.querySelectorAll !== "undefined" ) { return elem.querySelectorAll( "*" ); } else { return []; } } // Used in clean, fixes the defaultChecked property function fixDefaultChecked( elem ) { if ( elem.type === "checkbox" || elem.type === "radio" ) { elem.defaultChecked = elem.checked; } } // Finds all inputs and passes them to fixDefaultChecked function findInputs( elem ) { var nodeName = ( elem.nodeName || "" ).toLowerCase(); if ( nodeName === "input" ) { fixDefaultChecked( elem ); // Skip scripts, get other children } else if ( nodeName !== "script" && typeof elem.getElementsByTagName !== "undefined" ) { jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked ); } } // Derived From: http://www.iecss.com/shimprove/javascript/shimprove.1-0-1.js function shimCloneNode( elem ) { var div = document.createElement( "div" ); safeFragment.appendChild( div ); div.innerHTML = elem.outerHTML; return div.firstChild; } jQuery.extend({ clone: function( elem, dataAndEvents, deepDataAndEvents ) { var srcElements, destElements, i, // IE<=8 does not properly clone detached, unknown element nodes clone = jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ? elem.cloneNode( true ) : shimCloneNode( elem ); if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { // IE copies events bound via attachEvent when using cloneNode. // Calling detachEvent on the clone will also remove the events // from the original. In order to get around this, we use some // proprietary methods to clear the events. Thanks to MooTools // guys for this hotness. cloneFixAttributes( elem, clone ); // Using Sizzle here is crazy slow, so we use getElementsByTagName instead srcElements = getAll( elem ); destElements = getAll( clone ); // Weird iteration because IE will replace the length property // with an element if you are cloning the body and one of the // elements on the page has a name or id of "length" for ( i = 0; srcElements[i]; ++i ) { // Ensure that the destination node is not null; Fixes #9587 if ( destElements[i] ) { cloneFixAttributes( srcElements[i], destElements[i] ); } } } // Copy the events from the original to the clone if ( dataAndEvents ) { cloneCopyEvent( elem, clone ); if ( deepDataAndEvents ) { srcElements = getAll( elem ); destElements = getAll( clone ); for ( i = 0; srcElements[i]; ++i ) { cloneCopyEvent( srcElements[i], destElements[i] ); } } } srcElements = destElements = null; // Return the cloned set return clone; }, clean: function( elems, context, fragment, scripts ) { var checkScriptType, script, j, ret = []; context = context || document; // !context.createElement fails in IE with an error but returns typeof 'object' if ( typeof context.createElement === "undefined" ) { context = context.ownerDocument || context[0] && context[0].ownerDocument || document; } for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { if ( typeof elem === "number" ) { elem += ""; } if ( !elem ) { continue; } // Convert html string into DOM nodes if ( typeof elem === "string" ) { if ( !rhtml.test( elem ) ) { elem = context.createTextNode( elem ); } else { // Fix "XHTML"-style tags in all browsers elem = elem.replace(rxhtmlTag, "<$1></$2>"); // Trim whitespace, otherwise indexOf won't work as expected var tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(), wrap = wrapMap[ tag ] || wrapMap._default, depth = wrap[0], div = context.createElement("div"), safeChildNodes = safeFragment.childNodes, remove; // Append wrapper element to unknown element safe doc fragment if ( context === document ) { // Use the fragment we've already created for this document safeFragment.appendChild( div ); } else { // Use a fragment created with the owner document createSafeFragment( context ).appendChild( div ); } // Go to html and back, then peel off extra wrappers div.innerHTML = wrap[1] + elem + wrap[2]; // Move to the right depth while ( depth-- ) { div = div.lastChild; } // Remove IE's autoinserted <tbody> from table fragments if ( !jQuery.support.tbody ) { // String was a <table>, *may* have spurious <tbody> var hasBody = rtbody.test(elem), tbody = tag === "table" && !hasBody ? div.firstChild && div.firstChild.childNodes : // String was a bare <thead> or <tfoot> wrap[1] === "<table>" && !hasBody ? div.childNodes : []; for ( j = tbody.length - 1; j >= 0 ; --j ) { if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) { tbody[ j ].parentNode.removeChild( tbody[ j ] ); } } } // IE completely kills leading whitespace when innerHTML is used if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild ); } elem = div.childNodes; // Clear elements from DocumentFragment (safeFragment or otherwise) // to avoid hoarding elements. Fixes #11356 if ( div ) { div.parentNode.removeChild( div ); // Guard against -1 index exceptions in FF3.6 if ( safeChildNodes.length > 0 ) { remove = safeChildNodes[ safeChildNodes.length - 1 ]; if ( remove && remove.parentNode ) { remove.parentNode.removeChild( remove ); } } } } } // Resets defaultChecked for any radios and checkboxes // about to be appended to the DOM in IE 6/7 (#8060) var len; if ( !jQuery.support.appendChecked ) { if ( elem[0] && typeof (len = elem.length) === "number" ) { for ( j = 0; j < len; j++ ) { findInputs( elem[j] ); } } else { findInputs( elem ); } } if ( elem.nodeType ) { ret.push( elem ); } else { ret = jQuery.merge( ret, elem ); } } if ( fragment ) { checkScriptType = function( elem ) { return !elem.type || rscriptType.test( elem.type ); }; for ( i = 0; ret[i]; i++ ) { script = ret[i]; if ( scripts && jQuery.nodeName( script, "script" ) && (!script.type || rscriptType.test( script.type )) ) { scripts.push( script.parentNode ? script.parentNode.removeChild( script ) : script ); } else { if ( script.nodeType === 1 ) { var jsTags = jQuery.grep( script.getElementsByTagName( "script" ), checkScriptType ); ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) ); } fragment.appendChild( script ); } } } return ret; }, cleanData: function( elems ) { var data, id, cache = jQuery.cache, special = jQuery.event.special, deleteExpando = jQuery.support.deleteExpando; for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) { continue; } id = elem[ jQuery.expando ]; if ( id ) { data = cache[ id ]; if ( data && data.events ) { for ( var type in data.events ) { if ( special[ type ] ) { jQuery.event.remove( elem, type ); // This is a shortcut to avoid jQuery.event.remove's overhead } else { jQuery.removeEvent( elem, type, data.handle ); } } // Null the DOM reference to avoid IE6/7/8 leak (#7054) if ( data.handle ) { data.handle.elem = null; } } if ( deleteExpando ) { delete elem[ jQuery.expando ]; } else if ( elem.removeAttribute ) { elem.removeAttribute( jQuery.expando ); } delete cache[ id ]; } } } }); var ralpha = /alpha\([^)]*\)/i, ropacity = /opacity=([^)]*)/, // fixed for IE9, see #8346 rupper = /([A-Z]|^ms)/g, rnum = /^[\-+]?(?:\d*\.)?\d+$/i, rnumnonpx = /^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i, rrelNum = /^([\-+])=([\-+.\de]+)/, rmargin = /^margin/, cssShow = { position: "absolute", visibility: "hidden", display: "block" }, // order is important! cssExpand = [ "Top", "Right", "Bottom", "Left" ], curCSS, getComputedStyle, currentStyle; jQuery.fn.css = function( name, value ) { return jQuery.access( this, function( elem, name, value ) { return value !== undefined ? jQuery.style( elem, name, value ) : jQuery.css( elem, name ); }, name, value, arguments.length > 1 ); }; jQuery.extend({ // Add in style property hooks for overriding the default // behavior of getting and setting a style property cssHooks: { opacity: { get: function( elem, computed ) { if ( computed ) { // We should always get a number back from opacity var ret = curCSS( elem, "opacity" ); return ret === "" ? "1" : ret; } else { return elem.style.opacity; } } } }, // Exclude the following css properties to add px cssNumber: { "fillOpacity": true, "fontWeight": true, "lineHeight": true, "opacity": true, "orphans": true, "widows": true, "zIndex": true, "zoom": true }, // Add in properties whose names you wish to fix before // setting or getting the value cssProps: { // normalize float css property "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" }, // Get and set the style property on a DOM Node style: function( elem, name, value, extra ) { // Don't set styles on text and comment nodes if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { return; } // Make sure that we're working with the right name var ret, type, origName = jQuery.camelCase( name ), style = elem.style, hooks = jQuery.cssHooks[ origName ]; name = jQuery.cssProps[ origName ] || origName; // Check if we're setting a value if ( value !== undefined ) { type = typeof value; // convert relative number strings (+= or -=) to relative numbers. #7345 if ( type === "string" && (ret = rrelNum.exec( value )) ) { value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) ); // Fixes bug #9237 type = "number"; } // Make sure that NaN and null values aren't set. See: #7116 if ( value == null || type === "number" && isNaN( value ) ) { return; } // If a number was passed in, add 'px' to the (except for certain CSS properties) if ( type === "number" && !jQuery.cssNumber[ origName ] ) { value += "px"; } // If a hook was provided, use that value, otherwise just set the specified value if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) { // Wrapped to prevent IE from throwing errors when 'invalid' values are provided // Fixes bug #5509 try { style[ name ] = value; } catch(e) {} } } else { // If a hook was provided get the non-computed value from there if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { return ret; } // Otherwise just get the value from the style object return style[ name ]; } }, css: function( elem, name, extra ) { var ret, hooks; // Make sure that we're working with the right name name = jQuery.camelCase( name ); hooks = jQuery.cssHooks[ name ]; name = jQuery.cssProps[ name ] || name; // cssFloat needs a special treatment if ( name === "cssFloat" ) { name = "float"; } // If a hook was provided get the computed value from there if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) { return ret; // Otherwise, if a way to get the computed value exists, use that } else if ( curCSS ) { return curCSS( elem, name ); } }, // A method for quickly swapping in/out CSS properties to get correct calculations swap: function( elem, options, callback ) { var old = {}, ret, name; // Remember the old values, and insert the new ones for ( name in options ) { old[ name ] = elem.style[ name ]; elem.style[ name ] = options[ name ]; } ret = callback.call( elem ); // Revert the old values for ( name in options ) { elem.style[ name ] = old[ name ]; } return ret; } }); // DEPRECATED in 1.3, Use jQuery.css() instead jQuery.curCSS = jQuery.css; if ( document.defaultView && document.defaultView.getComputedStyle ) { getComputedStyle = function( elem, name ) { var ret, defaultView, computedStyle, width, style = elem.style; name = name.replace( rupper, "-$1" ).toLowerCase(); if ( (defaultView = elem.ownerDocument.defaultView) && (computedStyle = defaultView.getComputedStyle( elem, null )) ) { ret = computedStyle.getPropertyValue( name ); if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) { ret = jQuery.style( elem, name ); } } // A tribute to the "awesome hack by Dean Edwards" // WebKit uses "computed value (percentage if specified)" instead of "used value" for margins // which is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values if ( !jQuery.support.pixelMargin && computedStyle && rmargin.test( name ) && rnumnonpx.test( ret ) ) { width = style.width; style.width = ret; ret = computedStyle.width; style.width = width; } return ret; }; } if ( document.documentElement.currentStyle ) { currentStyle = function( elem, name ) { var left, rsLeft, uncomputed, ret = elem.currentStyle && elem.currentStyle[ name ], style = elem.style; // Avoid setting ret to empty string here // so we don't default to auto if ( ret == null && style && (uncomputed = style[ name ]) ) { ret = uncomputed; } // From the awesome hack by Dean Edwards // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // If we're not dealing with a regular pixel number // but a number that has a weird ending, we need to convert it to pixels if ( rnumnonpx.test( ret ) ) { // Remember the original values left = style.left; rsLeft = elem.runtimeStyle && elem.runtimeStyle.left; // Put in the new values to get a computed value out if ( rsLeft ) { elem.runtimeStyle.left = elem.currentStyle.left; } style.left = name === "fontSize" ? "1em" : ret; ret = style.pixelLeft + "px"; // Revert the changed values style.left = left; if ( rsLeft ) { elem.runtimeStyle.left = rsLeft; } } return ret === "" ? "auto" : ret; }; } curCSS = getComputedStyle || currentStyle; function getWidthOrHeight( elem, name, extra ) { // Start with offset property var val = name === "width" ? elem.offsetWidth : elem.offsetHeight, i = name === "width" ? 1 : 0, len = 4; if ( val > 0 ) { if ( extra !== "border" ) { for ( ; i < len; i += 2 ) { if ( !extra ) { val -= parseFloat( jQuery.css( elem, "padding" + cssExpand[ i ] ) ) || 0; } if ( extra === "margin" ) { val += parseFloat( jQuery.css( elem, extra + cssExpand[ i ] ) ) || 0; } else { val -= parseFloat( jQuery.css( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; } } } return val + "px"; } // Fall back to computed then uncomputed css if necessary val = curCSS( elem, name ); if ( val < 0 || val == null ) { val = elem.style[ name ]; } // Computed unit is not pixels. Stop here and return. if ( rnumnonpx.test(val) ) { return val; } // Normalize "", auto, and prepare for extra val = parseFloat( val ) || 0; // Add padding, border, margin if ( extra ) { for ( ; i < len; i += 2 ) { val += parseFloat( jQuery.css( elem, "padding" + cssExpand[ i ] ) ) || 0; if ( extra !== "padding" ) { val += parseFloat( jQuery.css( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0; } if ( extra === "margin" ) { val += parseFloat( jQuery.css( elem, extra + cssExpand[ i ]) ) || 0; } } } return val + "px"; } jQuery.each([ "height", "width" ], function( i, name ) { jQuery.cssHooks[ name ] = { get: function( elem, computed, extra ) { if ( computed ) { if ( elem.offsetWidth !== 0 ) { return getWidthOrHeight( elem, name, extra ); } else { return jQuery.swap( elem, cssShow, function() { return getWidthOrHeight( elem, name, extra ); }); } } }, set: function( elem, value ) { return rnum.test( value ) ? value + "px" : value; } }; }); if ( !jQuery.support.opacity ) { jQuery.cssHooks.opacity = { get: function( elem, computed ) { // IE uses filters for opacity return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? ( parseFloat( RegExp.$1 ) / 100 ) + "" : computed ? "1" : ""; }, set: function( elem, value ) { var style = elem.style, currentStyle = elem.currentStyle, opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", filter = currentStyle && currentStyle.filter || style.filter || ""; // IE has trouble with opacity if it does not have layout // Force it by setting the zoom level style.zoom = 1; // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) { // Setting style.filter to null, "" & " " still leave "filter:" in the cssText // if "filter:" is present at all, clearType is disabled, we want to avoid this // style.removeAttribute is IE Only, but so apparently is this code path... style.removeAttribute( "filter" ); // if there there is no filter style applied in a css rule, we are done if ( currentStyle && !currentStyle.filter ) { return; } } // otherwise, set new filter values style.filter = ralpha.test( filter ) ? filter.replace( ralpha, opacity ) : filter + " " + opacity; } }; } jQuery(function() { // This hook cannot be added until DOM ready because the support test // for it is not run until after DOM ready if ( !jQuery.support.reliableMarginRight ) { jQuery.cssHooks.marginRight = { get: function( elem, computed ) { // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right // Work around by temporarily setting element display to inline-block return jQuery.swap( elem, { "display": "inline-block" }, function() { if ( computed ) { return curCSS( elem, "margin-right" ); } else { return elem.style.marginRight; } }); } }; } }); if ( jQuery.expr && jQuery.expr.filters ) { jQuery.expr.filters.hidden = function( elem ) { var width = elem.offsetWidth, height = elem.offsetHeight; return ( width === 0 && height === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none"); }; jQuery.expr.filters.visible = function( elem ) { return !jQuery.expr.filters.hidden( elem ); }; } // These hooks are used by animate to expand properties jQuery.each({ margin: "", padding: "", border: "Width" }, function( prefix, suffix ) { jQuery.cssHooks[ prefix + suffix ] = { expand: function( value ) { var i, // assumes a single number if not a string parts = typeof value === "string" ? value.split(" ") : [ value ], expanded = {}; for ( i = 0; i < 4; i++ ) { expanded[ prefix + cssExpand[ i ] + suffix ] = parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; } return expanded; } }; }); var r20 = /%20/g, rbracket = /\[\]$/, rCRLF = /\r?\n/g, rhash = /#.*$/, rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, // #7653, #8125, #8152: local protocol detection rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, rquery = /\?/, rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, rselectTextarea = /^(?:select|textarea)/i, rspacesAjax = /\s+/, rts = /([?&])_=[^&]*/, rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/, // Keep a copy of the old load method _load = jQuery.fn.load, /* Prefilters * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) * 2) These are called: * - BEFORE asking for a transport * - AFTER param serialization (s.data is a string if s.processData is true) * 3) key is the dataType * 4) the catchall symbol "*" can be used * 5) execution will start with transport dataType and THEN continue down to "*" if needed */ prefilters = {}, /* Transports bindings * 1) key is the dataType * 2) the catchall symbol "*" can be used * 3) selection will start with transport dataType and THEN go to "*" if needed */ transports = {}, // Document location ajaxLocation, // Document location segments ajaxLocParts, // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression allTypes = ["*/"] + ["*"]; // #8138, IE may throw an exception when accessing // a field from window.location if document.domain has been set try { ajaxLocation = location.href; } catch( e ) { // Use the href attribute of an A element // since IE will modify it given document.location ajaxLocation = document.createElement( "a" ); ajaxLocation.href = ""; ajaxLocation = ajaxLocation.href; } // Segment location into parts ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport function addToPrefiltersOrTransports( structure ) { // dataTypeExpression is optional and defaults to "*" return function( dataTypeExpression, func ) { if ( typeof dataTypeExpression !== "string" ) { func = dataTypeExpression; dataTypeExpression = "*"; } if ( jQuery.isFunction( func ) ) { var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ), i = 0, length = dataTypes.length, dataType, list, placeBefore; // For each dataType in the dataTypeExpression for ( ; i < length; i++ ) { dataType = dataTypes[ i ]; // We control if we're asked to add before // any existing element placeBefore = /^\+/.test( dataType ); if ( placeBefore ) { dataType = dataType.substr( 1 ) || "*"; } list = structure[ dataType ] = structure[ dataType ] || []; // then we add to the structure accordingly list[ placeBefore ? "unshift" : "push" ]( func ); } } }; } // Base inspection function for prefilters and transports function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, dataType /* internal */, inspected /* internal */ ) { dataType = dataType || options.dataTypes[ 0 ]; inspected = inspected || {}; inspected[ dataType ] = true; var list = structure[ dataType ], i = 0, length = list ? list.length : 0, executeOnly = ( structure === prefilters ), selection; for ( ; i < length && ( executeOnly || !selection ); i++ ) { selection = list[ i ]( options, originalOptions, jqXHR ); // If we got redirected to another dataType // we try there if executing only and not done already if ( typeof selection === "string" ) { if ( !executeOnly || inspected[ selection ] ) { selection = undefined; } else { options.dataTypes.unshift( selection ); selection = inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, selection, inspected ); } } } // If we're only executing or nothing was selected // we try the catchall dataType if not done already if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { selection = inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, "*", inspected ); } // unnecessary when only executing (prefilters) // but it'll be ignored by the caller in that case return selection; } // A special extend for ajax options // that takes "flat" options (not to be deep extended) // Fixes #9887 function ajaxExtend( target, src ) { var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {}; for ( key in src ) { if ( src[ key ] !== undefined ) { ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; } } if ( deep ) { jQuery.extend( true, target, deep ); } } jQuery.fn.extend({ load: function( url, params, callback ) { if ( typeof url !== "string" && _load ) { return _load.apply( this, arguments ); // Don't do a request if no elements are being requested } else if ( !this.length ) { return this; } var off = url.indexOf( " " ); if ( off >= 0 ) { var selector = url.slice( off, url.length ); url = url.slice( 0, off ); } // Default to a GET request var type = "GET"; // If the second parameter was provided if ( params ) { // If it's a function if ( jQuery.isFunction( params ) ) { // We assume that it's the callback callback = params; params = undefined; // Otherwise, build a param string } else if ( typeof params === "object" ) { params = jQuery.param( params, jQuery.ajaxSettings.traditional ); type = "POST"; } } var self = this; // Request the remote document jQuery.ajax({ url: url, type: type, dataType: "html", data: params, // Complete callback (responseText is used internally) complete: function( jqXHR, status, responseText ) { // Store the response as specified by the jqXHR object responseText = jqXHR.responseText; // If successful, inject the HTML into all the matched elements if ( jqXHR.isResolved() ) { // #4825: Get the actual response in case // a dataFilter is present in ajaxSettings jqXHR.done(function( r ) { responseText = r; }); // See if a selector was specified self.html( selector ? // Create a dummy div to hold the results jQuery("<div>") // inject the contents of the document in, removing the scripts // to avoid any 'Permission Denied' errors in IE .append(responseText.replace(rscript, "")) // Locate the specified elements .find(selector) : // If not, just inject the full result responseText ); } if ( callback ) { self.each( callback, [ responseText, status, jqXHR ] ); } } }); return this; }, serialize: function() { return jQuery.param( this.serializeArray() ); }, serializeArray: function() { return this.map(function(){ return this.elements ? jQuery.makeArray( this.elements ) : this; }) .filter(function(){ return this.name && !this.disabled && ( this.checked || rselectTextarea.test( this.nodeName ) || rinput.test( this.type ) ); }) .map(function( i, elem ){ var val = jQuery( this ).val(); return val == null ? null : jQuery.isArray( val ) ? jQuery.map( val, function( val, i ){ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; }) : { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; }).get(); } }); // Attach a bunch of functions for handling common AJAX events jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){ jQuery.fn[ o ] = function( f ){ return this.on( o, f ); }; }); jQuery.each( [ "get", "post" ], function( i, method ) { jQuery[ method ] = function( url, data, callback, type ) { // shift arguments if data argument was omitted if ( jQuery.isFunction( data ) ) { type = type || callback; callback = data; data = undefined; } return jQuery.ajax({ type: method, url: url, data: data, success: callback, dataType: type }); }; }); jQuery.extend({ getScript: function( url, callback ) { return jQuery.get( url, undefined, callback, "script" ); }, getJSON: function( url, data, callback ) { return jQuery.get( url, data, callback, "json" ); }, // Creates a full fledged settings object into target // with both ajaxSettings and settings fields. // If target is omitted, writes into ajaxSettings. ajaxSetup: function( target, settings ) { if ( settings ) { // Building a settings object ajaxExtend( target, jQuery.ajaxSettings ); } else { // Extending ajaxSettings settings = target; target = jQuery.ajaxSettings; } ajaxExtend( target, settings ); return target; }, ajaxSettings: { url: ajaxLocation, isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), global: true, type: "GET", contentType: "application/x-www-form-urlencoded; charset=UTF-8", processData: true, async: true, /* timeout: 0, data: null, dataType: null, username: null, password: null, cache: null, traditional: false, headers: {}, */ accepts: { xml: "application/xml, text/xml", html: "text/html", text: "text/plain", json: "application/json, text/javascript", "*": allTypes }, contents: { xml: /xml/, html: /html/, json: /json/ }, responseFields: { xml: "responseXML", text: "responseText" }, // List of data converters // 1) key format is "source_type destination_type" (a single space in-between) // 2) the catchall symbol "*" can be used for source_type converters: { // Convert anything to text "* text": window.String, // Text to html (true = no transformation) "text html": true, // Evaluate text as a json expression "text json": jQuery.parseJSON, // Parse text as xml "text xml": jQuery.parseXML }, // For options that shouldn't be deep extended: // you can add your own custom options here if // and when you create one that shouldn't be // deep extended (see ajaxExtend) flatOptions: { context: true, url: true } }, ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), ajaxTransport: addToPrefiltersOrTransports( transports ), // Main method ajax: function( url, options ) { // If url is an object, simulate pre-1.5 signature if ( typeof url === "object" ) { options = url; url = undefined; } // Force options to be an object options = options || {}; var // Create the final options object s = jQuery.ajaxSetup( {}, options ), // Callbacks context callbackContext = s.context || s, // Context for global events // It's the callbackContext if one was provided in the options // and if it's a DOM node or a jQuery collection globalEventContext = callbackContext !== s && ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? jQuery( callbackContext ) : jQuery.event, // Deferreds deferred = jQuery.Deferred(), completeDeferred = jQuery.Callbacks( "once memory" ), // Status-dependent callbacks statusCode = s.statusCode || {}, // ifModified key ifModifiedKey, // Headers (they are sent all at once) requestHeaders = {}, requestHeadersNames = {}, // Response headers responseHeadersString, responseHeaders, // transport transport, // timeout handle timeoutTimer, // Cross-domain detection vars parts, // The jqXHR state state = 0, // To know if global events are to be dispatched fireGlobals, // Loop variable i, // Fake xhr jqXHR = { readyState: 0, // Caches the header setRequestHeader: function( name, value ) { if ( !state ) { var lname = name.toLowerCase(); name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; requestHeaders[ name ] = value; } return this; }, // Raw string getAllResponseHeaders: function() { return state === 2 ? responseHeadersString : null; }, // Builds headers hashtable if needed getResponseHeader: function( key ) { var match; if ( state === 2 ) { if ( !responseHeaders ) { responseHeaders = {}; while( ( match = rheaders.exec( responseHeadersString ) ) ) { responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; } } match = responseHeaders[ key.toLowerCase() ]; } return match === undefined ? null : match; }, // Overrides response content-type header overrideMimeType: function( type ) { if ( !state ) { s.mimeType = type; } return this; }, // Cancel the request abort: function( statusText ) { statusText = statusText || "abort"; if ( transport ) { transport.abort( statusText ); } done( 0, statusText ); return this; } }; // Callback for when everything is done // It is defined here because jslint complains if it is declared // at the end of the function (which would be more logical and readable) function done( status, nativeStatusText, responses, headers ) { // Called once if ( state === 2 ) { return; } // State is "done" now state = 2; // Clear timeout if it exists if ( timeoutTimer ) { clearTimeout( timeoutTimer ); } // Dereference transport for early garbage collection // (no matter how long the jqXHR object will be used) transport = undefined; // Cache response headers responseHeadersString = headers || ""; // Set readyState jqXHR.readyState = status > 0 ? 4 : 0; var isSuccess, success, error, statusText = nativeStatusText, response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined, lastModified, etag; // If successful, handle type chaining if ( status >= 200 && status < 300 || status === 304 ) { // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) { jQuery.lastModified[ ifModifiedKey ] = lastModified; } if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) { jQuery.etag[ ifModifiedKey ] = etag; } } // If not modified if ( status === 304 ) { statusText = "notmodified"; isSuccess = true; // If we have data } else { try { success = ajaxConvert( s, response ); statusText = "success"; isSuccess = true; } catch(e) { // We have a parsererror statusText = "parsererror"; error = e; } } } else { // We extract error from statusText // then normalize statusText and status for non-aborts error = statusText; if ( !statusText || status ) { statusText = "error"; if ( status < 0 ) { status = 0; } } } // Set data for the fake xhr object jqXHR.status = status; jqXHR.statusText = "" + ( nativeStatusText || statusText ); // Success/Error if ( isSuccess ) { deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); } else { deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); } // Status-dependent callbacks jqXHR.statusCode( statusCode ); statusCode = undefined; if ( fireGlobals ) { globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ), [ jqXHR, s, isSuccess ? success : error ] ); } // Complete completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); if ( fireGlobals ) { globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); // Handle the global AJAX counter if ( !( --jQuery.active ) ) { jQuery.event.trigger( "ajaxStop" ); } } } // Attach deferreds deferred.promise( jqXHR ); jqXHR.success = jqXHR.done; jqXHR.error = jqXHR.fail; jqXHR.complete = completeDeferred.add; // Status-dependent callbacks jqXHR.statusCode = function( map ) { if ( map ) { var tmp; if ( state < 2 ) { for ( tmp in map ) { statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; } } else { tmp = map[ jqXHR.status ]; jqXHR.then( tmp, tmp ); } } return this; }; // Remove hash character (#7531: and string promotion) // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) // We also use the url parameter if available s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); // Extract dataTypes list s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax ); // Determine if a cross-domain request is in order if ( s.crossDomain == null ) { parts = rurl.exec( s.url.toLowerCase() ); s.crossDomain = !!( parts && ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] || ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) ); } // Convert data if not already a string if ( s.data && s.processData && typeof s.data !== "string" ) { s.data = jQuery.param( s.data, s.traditional ); } // Apply prefilters inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); // If request was aborted inside a prefilter, stop there if ( state === 2 ) { return false; } // We can fire global events as of now if asked to fireGlobals = s.global; // Uppercase the type s.type = s.type.toUpperCase(); // Determine if request has content s.hasContent = !rnoContent.test( s.type ); // Watch for a new set of requests if ( fireGlobals && jQuery.active++ === 0 ) { jQuery.event.trigger( "ajaxStart" ); } // More options handling for requests with no content if ( !s.hasContent ) { // If data is available, append data to url if ( s.data ) { s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; // #9682: remove data so that it's not used in an eventual retry delete s.data; } // Get ifModifiedKey before adding the anti-cache parameter ifModifiedKey = s.url; // Add anti-cache in url if needed if ( s.cache === false ) { var ts = jQuery.now(), // try replacing _= if it is there ret = s.url.replace( rts, "$1_=" + ts ); // if nothing was replaced, add timestamp to the end s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); } } // Set the correct header, if data is being sent if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { jqXHR.setRequestHeader( "Content-Type", s.contentType ); } // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { ifModifiedKey = ifModifiedKey || s.url; if ( jQuery.lastModified[ ifModifiedKey ] ) { jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] ); } if ( jQuery.etag[ ifModifiedKey ] ) { jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] ); } } // Set the Accepts header for the server, depending on the dataType jqXHR.setRequestHeader( "Accept", s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : s.accepts[ "*" ] ); // Check for headers option for ( i in s.headers ) { jqXHR.setRequestHeader( i, s.headers[ i ] ); } // Allow custom headers/mimetypes and early abort if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { // Abort if not done already jqXHR.abort(); return false; } // Install callbacks on deferreds for ( i in { success: 1, error: 1, complete: 1 } ) { jqXHR[ i ]( s[ i ] ); } // Get transport transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); // If no transport, we auto-abort if ( !transport ) { done( -1, "No Transport" ); } else { jqXHR.readyState = 1; // Send global event if ( fireGlobals ) { globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); } // Timeout if ( s.async && s.timeout > 0 ) { timeoutTimer = setTimeout( function(){ jqXHR.abort( "timeout" ); }, s.timeout ); } try { state = 1; transport.send( requestHeaders, done ); } catch (e) { // Propagate exception as error if not done if ( state < 2 ) { done( -1, e ); // Simply rethrow otherwise } else { throw e; } } } return jqXHR; }, // Serialize an array of form elements or a set of // key/values into a query string param: function( a, traditional ) { var s = [], add = function( key, value ) { // If value is a function, invoke it and return its value value = jQuery.isFunction( value ) ? value() : value; s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); }; // Set traditional to true for jQuery <= 1.3.2 behavior. if ( traditional === undefined ) { traditional = jQuery.ajaxSettings.traditional; } // If an array was passed in, assume that it is an array of form elements. if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { // Serialize the form elements jQuery.each( a, function() { add( this.name, this.value ); }); } else { // If traditional, encode the "old" way (the way 1.3.2 or older // did it), otherwise encode params recursively. for ( var prefix in a ) { buildParams( prefix, a[ prefix ], traditional, add ); } } // Return the resulting serialization return s.join( "&" ).replace( r20, "+" ); } }); function buildParams( prefix, obj, traditional, add ) { if ( jQuery.isArray( obj ) ) { // Serialize array item. jQuery.each( obj, function( i, v ) { if ( traditional || rbracket.test( prefix ) ) { // Treat each array item as a scalar. add( prefix, v ); } else { // If array item is non-scalar (array or object), encode its // numeric index to resolve deserialization ambiguity issues. // Note that rack (as of 1.0.0) can't currently deserialize // nested arrays properly, and attempting to do so may cause // a server error. Possible fixes are to modify rack's // deserialization algorithm or to provide an option or flag // to force array serialization to be shallow. buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); } }); } else if ( !traditional && jQuery.type( obj ) === "object" ) { // Serialize object item. for ( var name in obj ) { buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); } } else { // Serialize scalar item. add( prefix, obj ); } } // This is still on the jQuery object... for now // Want to move this to jQuery.ajax some day jQuery.extend({ // Counter for holding the number of active queries active: 0, // Last-Modified header cache for next request lastModified: {}, etag: {} }); /* Handles responses to an ajax request: * - sets all responseXXX fields accordingly * - finds the right dataType (mediates between content-type and expected dataType) * - returns the corresponding response */ function ajaxHandleResponses( s, jqXHR, responses ) { var contents = s.contents, dataTypes = s.dataTypes, responseFields = s.responseFields, ct, type, finalDataType, firstDataType; // Fill responseXXX fields for ( type in responseFields ) { if ( type in responses ) { jqXHR[ responseFields[type] ] = responses[ type ]; } } // Remove auto dataType and get content-type in the process while( dataTypes[ 0 ] === "*" ) { dataTypes.shift(); if ( ct === undefined ) { ct = s.mimeType || jqXHR.getResponseHeader( "content-type" ); } } // Check if we're dealing with a known content-type if ( ct ) { for ( type in contents ) { if ( contents[ type ] && contents[ type ].test( ct ) ) { dataTypes.unshift( type ); break; } } } // Check to see if we have a response for the expected dataType if ( dataTypes[ 0 ] in responses ) { finalDataType = dataTypes[ 0 ]; } else { // Try convertible dataTypes for ( type in responses ) { if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { finalDataType = type; break; } if ( !firstDataType ) { firstDataType = type; } } // Or just use first one finalDataType = finalDataType || firstDataType; } // If we found a dataType // We add the dataType to the list if needed // and return the corresponding response if ( finalDataType ) { if ( finalDataType !== dataTypes[ 0 ] ) { dataTypes.unshift( finalDataType ); } return responses[ finalDataType ]; } } // Chain conversions given the request and the original response function ajaxConvert( s, response ) { // Apply the dataFilter if provided if ( s.dataFilter ) { response = s.dataFilter( response, s.dataType ); } var dataTypes = s.dataTypes, converters = {}, i, key, length = dataTypes.length, tmp, // Current and previous dataTypes current = dataTypes[ 0 ], prev, // Conversion expression conversion, // Conversion function conv, // Conversion functions (transitive conversion) conv1, conv2; // For each dataType in the chain for ( i = 1; i < length; i++ ) { // Create converters map // with lowercased keys if ( i === 1 ) { for ( key in s.converters ) { if ( typeof key === "string" ) { converters[ key.toLowerCase() ] = s.converters[ key ]; } } } // Get the dataTypes prev = current; current = dataTypes[ i ]; // If current is auto dataType, update it to prev if ( current === "*" ) { current = prev; // If no auto and dataTypes are actually different } else if ( prev !== "*" && prev !== current ) { // Get the converter conversion = prev + " " + current; conv = converters[ conversion ] || converters[ "* " + current ]; // If there is no direct converter, search transitively if ( !conv ) { conv2 = undefined; for ( conv1 in converters ) { tmp = conv1.split( " " ); if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) { conv2 = converters[ tmp[1] + " " + current ]; if ( conv2 ) { conv1 = converters[ conv1 ]; if ( conv1 === true ) { conv = conv2; } else if ( conv2 === true ) { conv = conv1; } break; } } } } // If we found no converter, dispatch an error if ( !( conv || conv2 ) ) { jQuery.error( "No conversion from " + conversion.replace(" "," to ") ); } // If found converter is not an equivalence if ( conv !== true ) { // Convert with 1 or 2 converters accordingly response = conv ? conv( response ) : conv2( conv1(response) ); } } } return response; } var jsc = jQuery.now(), jsre = /(\=)\?(&|$)|\?\?/i; // Default jsonp settings jQuery.ajaxSetup({ jsonp: "callback", jsonpCallback: function() { return jQuery.expando + "_" + ( jsc++ ); } }); // Detect, normalize options and install callbacks for jsonp requests jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { var inspectData = ( typeof s.data === "string" ) && /^application\/x\-www\-form\-urlencoded/.test( s.contentType ); if ( s.dataTypes[ 0 ] === "jsonp" || s.jsonp !== false && ( jsre.test( s.url ) || inspectData && jsre.test( s.data ) ) ) { var responseContainer, jsonpCallback = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback, previous = window[ jsonpCallback ], url = s.url, data = s.data, replace = "$1" + jsonpCallback + "$2"; if ( s.jsonp !== false ) { url = url.replace( jsre, replace ); if ( s.url === url ) { if ( inspectData ) { data = data.replace( jsre, replace ); } if ( s.data === data ) { // Add callback manually url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback; } } } s.url = url; s.data = data; // Install callback window[ jsonpCallback ] = function( response ) { responseContainer = [ response ]; }; // Clean-up function jqXHR.always(function() { // Set callback back to previous value window[ jsonpCallback ] = previous; // Call if it was a function and we have a response if ( responseContainer && jQuery.isFunction( previous ) ) { window[ jsonpCallback ]( responseContainer[ 0 ] ); } }); // Use data converter to retrieve json after script execution s.converters["script json"] = function() { if ( !responseContainer ) { jQuery.error( jsonpCallback + " was not called" ); } return responseContainer[ 0 ]; }; // force json dataType s.dataTypes[ 0 ] = "json"; // Delegate to script return "script"; } }); // Install script dataType jQuery.ajaxSetup({ accepts: { script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" }, contents: { script: /javascript|ecmascript/ }, converters: { "text script": function( text ) { jQuery.globalEval( text ); return text; } } }); // Handle cache's special case and global jQuery.ajaxPrefilter( "script", function( s ) { if ( s.cache === undefined ) { s.cache = false; } if ( s.crossDomain ) { s.type = "GET"; s.global = false; } }); // Bind script tag hack transport jQuery.ajaxTransport( "script", function(s) { // This transport only deals with cross domain requests if ( s.crossDomain ) { var script, head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; return { send: function( _, callback ) { script = document.createElement( "script" ); script.async = "async"; if ( s.scriptCharset ) { script.charset = s.scriptCharset; } script.src = s.url; // Attach handlers for all browsers script.onload = script.onreadystatechange = function( _, isAbort ) { if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { // Handle memory leak in IE script.onload = script.onreadystatechange = null; // Remove the script if ( head && script.parentNode ) { head.removeChild( script ); } // Dereference the script script = undefined; // Callback if not abort if ( !isAbort ) { callback( 200, "success" ); } } }; // Use insertBefore instead of appendChild to circumvent an IE6 bug. // This arises when a base node is used (#2709 and #4378). head.insertBefore( script, head.firstChild ); }, abort: function() { if ( script ) { script.onload( 0, 1 ); } } }; } }); var // #5280: Internet Explorer will keep connections alive if we don't abort on unload xhrOnUnloadAbort = window.ActiveXObject ? function() { // Abort all pending requests for ( var key in xhrCallbacks ) { xhrCallbacks[ key ]( 0, 1 ); } } : false, xhrId = 0, xhrCallbacks; // Functions to create xhrs function createStandardXHR() { try { return new window.XMLHttpRequest(); } catch( e ) {} } function createActiveXHR() { try { return new window.ActiveXObject( "Microsoft.XMLHTTP" ); } catch( e ) {} } // Create the request object // (This is still attached to ajaxSettings for backward compatibility) jQuery.ajaxSettings.xhr = window.ActiveXObject ? /* Microsoft failed to properly * implement the XMLHttpRequest in IE7 (can't request local files), * so we use the ActiveXObject when it is available * Additionally XMLHttpRequest can be disabled in IE7/IE8 so * we need a fallback. */ function() { return !this.isLocal && createStandardXHR() || createActiveXHR(); } : // For all other browsers, use the standard XMLHttpRequest object createStandardXHR; // Determine support properties (function( xhr ) { jQuery.extend( jQuery.support, { ajax: !!xhr, cors: !!xhr && ( "withCredentials" in xhr ) }); })( jQuery.ajaxSettings.xhr() ); // Create transport if the browser can provide an xhr if ( jQuery.support.ajax ) { jQuery.ajaxTransport(function( s ) { // Cross domain only allowed if supported through XMLHttpRequest if ( !s.crossDomain || jQuery.support.cors ) { var callback; return { send: function( headers, complete ) { // Get a new xhr var xhr = s.xhr(), handle, i; // Open the socket // Passing null username, generates a login popup on Opera (#2865) if ( s.username ) { xhr.open( s.type, s.url, s.async, s.username, s.password ); } else { xhr.open( s.type, s.url, s.async ); } // Apply custom fields if provided if ( s.xhrFields ) { for ( i in s.xhrFields ) { xhr[ i ] = s.xhrFields[ i ]; } } // Override mime type if needed if ( s.mimeType && xhr.overrideMimeType ) { xhr.overrideMimeType( s.mimeType ); } // X-Requested-With header // For cross-domain requests, seeing as conditions for a preflight are // akin to a jigsaw puzzle, we simply never set it to be sure. // (it can always be set on a per-request basis or even using ajaxSetup) // For same-domain requests, won't change header if already provided. if ( !s.crossDomain && !headers["X-Requested-With"] ) { headers[ "X-Requested-With" ] = "XMLHttpRequest"; } // Need an extra try/catch for cross domain requests in Firefox 3 try { for ( i in headers ) { xhr.setRequestHeader( i, headers[ i ] ); } } catch( _ ) {} // Do send the request // This may raise an exception which is actually // handled in jQuery.ajax (so no try/catch here) xhr.send( ( s.hasContent && s.data ) || null ); // Listener callback = function( _, isAbort ) { var status, statusText, responseHeaders, responses, xml; // Firefox throws exceptions when accessing properties // of an xhr when a network error occured // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) try { // Was never called and is aborted or complete if ( callback && ( isAbort || xhr.readyState === 4 ) ) { // Only called once callback = undefined; // Do not keep as active anymore if ( handle ) { xhr.onreadystatechange = jQuery.noop; if ( xhrOnUnloadAbort ) { delete xhrCallbacks[ handle ]; } } // If it's an abort if ( isAbort ) { // Abort it manually if needed if ( xhr.readyState !== 4 ) { xhr.abort(); } } else { status = xhr.status; responseHeaders = xhr.getAllResponseHeaders(); responses = {}; xml = xhr.responseXML; // Construct response list if ( xml && xml.documentElement /* #4958 */ ) { responses.xml = xml; } // When requesting binary data, IE6-9 will throw an exception // on any attempt to access responseText (#11426) try { responses.text = xhr.responseText; } catch( _ ) { } // Firefox throws an exception when accessing // statusText for faulty cross-domain requests try { statusText = xhr.statusText; } catch( e ) { // We normalize with Webkit giving an empty statusText statusText = ""; } // Filter status for non standard behaviors // If the request is local and we have data: assume a success // (success with no data won't get notified, that's the best we // can do given current implementations) if ( !status && s.isLocal && !s.crossDomain ) { status = responses.text ? 200 : 404; // IE - #1450: sometimes returns 1223 when it should be 204 } else if ( status === 1223 ) { status = 204; } } } } catch( firefoxAccessException ) { if ( !isAbort ) { complete( -1, firefoxAccessException ); } } // Call complete if needed if ( responses ) { complete( status, statusText, responses, responseHeaders ); } }; // if we're in sync mode or it's in cache // and has been retrieved directly (IE6 & IE7) // we need to manually fire the callback if ( !s.async || xhr.readyState === 4 ) { callback(); } else { handle = ++xhrId; if ( xhrOnUnloadAbort ) { // Create the active xhrs callbacks list if needed // and attach the unload handler if ( !xhrCallbacks ) { xhrCallbacks = {}; jQuery( window ).unload( xhrOnUnloadAbort ); } // Add to list of active xhrs callbacks xhrCallbacks[ handle ] = callback; } xhr.onreadystatechange = callback; } }, abort: function() { if ( callback ) { callback(0,1); } } }; } }); } var elemdisplay = {}, iframe, iframeDoc, rfxtypes = /^(?:toggle|show|hide)$/, rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i, timerId, fxAttrs = [ // height animations [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ], // width animations [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ], // opacity animations [ "opacity" ] ], fxNow; jQuery.fn.extend({ show: function( speed, easing, callback ) { var elem, display; if ( speed || speed === 0 ) { return this.animate( genFx("show", 3), speed, easing, callback ); } else { for ( var i = 0, j = this.length; i < j; i++ ) { elem = this[ i ]; if ( elem.style ) { display = elem.style.display; // Reset the inline display of this element to learn if it is // being hidden by cascaded rules or not if ( !jQuery._data(elem, "olddisplay") && display === "none" ) { display = elem.style.display = ""; } // Set elements which have been overridden with display: none // in a stylesheet to whatever the default browser style is // for such an element if ( (display === "" && jQuery.css(elem, "display") === "none") || !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) { jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) ); } } } // Set the display of most of the elements in a second loop // to avoid the constant reflow for ( i = 0; i < j; i++ ) { elem = this[ i ]; if ( elem.style ) { display = elem.style.display; if ( display === "" || display === "none" ) { elem.style.display = jQuery._data( elem, "olddisplay" ) || ""; } } } return this; } }, hide: function( speed, easing, callback ) { if ( speed || speed === 0 ) { return this.animate( genFx("hide", 3), speed, easing, callback); } else { var elem, display, i = 0, j = this.length; for ( ; i < j; i++ ) { elem = this[i]; if ( elem.style ) { display = jQuery.css( elem, "display" ); if ( display !== "none" && !jQuery._data( elem, "olddisplay" ) ) { jQuery._data( elem, "olddisplay", display ); } } } // Set the display of the elements in a second loop // to avoid the constant reflow for ( i = 0; i < j; i++ ) { if ( this[i].style ) { this[i].style.display = "none"; } } return this; } }, // Save the old toggle function _toggle: jQuery.fn.toggle, toggle: function( fn, fn2, callback ) { var bool = typeof fn === "boolean"; if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) { this._toggle.apply( this, arguments ); } else if ( fn == null || bool ) { this.each(function() { var state = bool ? fn : jQuery(this).is(":hidden"); jQuery(this)[ state ? "show" : "hide" ](); }); } else { this.animate(genFx("toggle", 3), fn, fn2, callback); } return this; }, fadeTo: function( speed, to, easing, callback ) { return this.filter(":hidden").css("opacity", 0).show().end() .animate({opacity: to}, speed, easing, callback); }, animate: function( prop, speed, easing, callback ) { var optall = jQuery.speed( speed, easing, callback ); if ( jQuery.isEmptyObject( prop ) ) { return this.each( optall.complete, [ false ] ); } // Do not change referenced properties as per-property easing will be lost prop = jQuery.extend( {}, prop ); function doAnimation() { // XXX 'this' does not always have a nodeName when running the // test suite if ( optall.queue === false ) { jQuery._mark( this ); } var opt = jQuery.extend( {}, optall ), isElement = this.nodeType === 1, hidden = isElement && jQuery(this).is(":hidden"), name, val, p, e, hooks, replace, parts, start, end, unit, method; // will store per property easing and be used to determine when an animation is complete opt.animatedProperties = {}; // first pass over propertys to expand / normalize for ( p in prop ) { name = jQuery.camelCase( p ); if ( p !== name ) { prop[ name ] = prop[ p ]; delete prop[ p ]; } if ( ( hooks = jQuery.cssHooks[ name ] ) && "expand" in hooks ) { replace = hooks.expand( prop[ name ] ); delete prop[ name ]; // not quite $.extend, this wont overwrite keys already present. // also - reusing 'p' from above because we have the correct "name" for ( p in replace ) { if ( ! ( p in prop ) ) { prop[ p ] = replace[ p ]; } } } } for ( name in prop ) { val = prop[ name ]; // easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default) if ( jQuery.isArray( val ) ) { opt.animatedProperties[ name ] = val[ 1 ]; val = prop[ name ] = val[ 0 ]; } else { opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing'; } if ( val === "hide" && hidden || val === "show" && !hidden ) { return opt.complete.call( this ); } if ( isElement && ( name === "height" || name === "width" ) ) { // Make sure that nothing sneaks out // Record all 3 overflow attributes because IE does not // change the overflow attribute when overflowX and // overflowY are set to the same value opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ]; // Set display property to inline-block for height/width // animations on inline elements that are having width/height animated if ( jQuery.css( this, "display" ) === "inline" && jQuery.css( this, "float" ) === "none" ) { // inline-level elements accept inline-block; // block-level elements need to be inline with layout if ( !jQuery.support.inlineBlockNeedsLayout || defaultDisplay( this.nodeName ) === "inline" ) { this.style.display = "inline-block"; } else { this.style.zoom = 1; } } } } if ( opt.overflow != null ) { this.style.overflow = "hidden"; } for ( p in prop ) { e = new jQuery.fx( this, opt, p ); val = prop[ p ]; if ( rfxtypes.test( val ) ) { // Tracks whether to show or hide based on private // data attached to the element method = jQuery._data( this, "toggle" + p ) || ( val === "toggle" ? hidden ? "show" : "hide" : 0 ); if ( method ) { jQuery._data( this, "toggle" + p, method === "show" ? "hide" : "show" ); e[ method ](); } else { e[ val ](); } } else { parts = rfxnum.exec( val ); start = e.cur(); if ( parts ) { end = parseFloat( parts[2] ); unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" ); // We need to compute starting value if ( unit !== "px" ) { jQuery.style( this, p, (end || 1) + unit); start = ( (end || 1) / e.cur() ) * start; jQuery.style( this, p, start + unit); } // If a +=/-= token was provided, we're doing a relative animation if ( parts[1] ) { end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start; } e.custom( start, end, unit ); } else { e.custom( start, val, "" ); } } } // For JS strict compliance return true; } return optall.queue === false ? this.each( doAnimation ) : this.queue( optall.queue, doAnimation ); }, stop: function( type, clearQueue, gotoEnd ) { if ( typeof type !== "string" ) { gotoEnd = clearQueue; clearQueue = type; type = undefined; } if ( clearQueue && type !== false ) { this.queue( type || "fx", [] ); } return this.each(function() { var index, hadTimers = false, timers = jQuery.timers, data = jQuery._data( this ); // clear marker counters if we know they won't be if ( !gotoEnd ) { jQuery._unmark( true, this ); } function stopQueue( elem, data, index ) { var hooks = data[ index ]; jQuery.removeData( elem, index, true ); hooks.stop( gotoEnd ); } if ( type == null ) { for ( index in data ) { if ( data[ index ] && data[ index ].stop && index.indexOf(".run") === index.length - 4 ) { stopQueue( this, data, index ); } } } else if ( data[ index = type + ".run" ] && data[ index ].stop ){ stopQueue( this, data, index ); } for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { if ( gotoEnd ) { // force the next step to be the last timers[ index ]( true ); } else { timers[ index ].saveState(); } hadTimers = true; timers.splice( index, 1 ); } } // start the next in the queue if the last step wasn't forced // timers currently will call their complete callbacks, which will dequeue // but only if they were gotoEnd if ( !( gotoEnd && hadTimers ) ) { jQuery.dequeue( this, type ); } }); } }); // Animations created synchronously will run synchronously function createFxNow() { setTimeout( clearFxNow, 0 ); return ( fxNow = jQuery.now() ); } function clearFxNow() { fxNow = undefined; } // Generate parameters to create a standard animation function genFx( type, num ) { var obj = {}; jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice( 0, num )), function() { obj[ this ] = type; }); return obj; } // Generate shortcuts for custom animations jQuery.each({ slideDown: genFx( "show", 1 ), slideUp: genFx( "hide", 1 ), slideToggle: genFx( "toggle", 1 ), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function( name, props ) { jQuery.fn[ name ] = function( speed, easing, callback ) { return this.animate( props, speed, easing, callback ); }; }); jQuery.extend({ speed: function( speed, easing, fn ) { var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { complete: fn || !fn && easing || jQuery.isFunction( speed ) && speed, duration: speed, easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing }; opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; // normalize opt.queue - true/undefined/null -> "fx" if ( opt.queue == null || opt.queue === true ) { opt.queue = "fx"; } // Queueing opt.old = opt.complete; opt.complete = function( noUnmark ) { if ( jQuery.isFunction( opt.old ) ) { opt.old.call( this ); } if ( opt.queue ) { jQuery.dequeue( this, opt.queue ); } else if ( noUnmark !== false ) { jQuery._unmark( this ); } }; return opt; }, easing: { linear: function( p ) { return p; }, swing: function( p ) { return ( -Math.cos( p*Math.PI ) / 2 ) + 0.5; } }, timers: [], fx: function( elem, options, prop ) { this.options = options; this.elem = elem; this.prop = prop; options.orig = options.orig || {}; } }); jQuery.fx.prototype = { // Simple function for setting a style value update: function() { if ( this.options.step ) { this.options.step.call( this.elem, this.now, this ); } ( jQuery.fx.step[ this.prop ] || jQuery.fx.step._default )( this ); }, // Get the current size cur: function() { if ( this.elem[ this.prop ] != null && (!this.elem.style || this.elem.style[ this.prop ] == null) ) { return this.elem[ this.prop ]; } var parsed, r = jQuery.css( this.elem, this.prop ); // Empty strings, null, undefined and "auto" are converted to 0, // complex values such as "rotate(1rad)" are returned as is, // simple values such as "10px" are parsed to Float. return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed; }, // Start an animation from one number to another custom: function( from, to, unit ) { var self = this, fx = jQuery.fx; this.startTime = fxNow || createFxNow(); this.end = to; this.now = this.start = from; this.pos = this.state = 0; this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" ); function t( gotoEnd ) { return self.step( gotoEnd ); } t.queue = this.options.queue; t.elem = this.elem; t.saveState = function() { if ( jQuery._data( self.elem, "fxshow" + self.prop ) === undefined ) { if ( self.options.hide ) { jQuery._data( self.elem, "fxshow" + self.prop, self.start ); } else if ( self.options.show ) { jQuery._data( self.elem, "fxshow" + self.prop, self.end ); } } }; if ( t() && jQuery.timers.push(t) && !timerId ) { timerId = setInterval( fx.tick, fx.interval ); } }, // Simple 'show' function show: function() { var dataShow = jQuery._data( this.elem, "fxshow" + this.prop ); // Remember where we started, so that we can go back to it later this.options.orig[ this.prop ] = dataShow || jQuery.style( this.elem, this.prop ); this.options.show = true; // Begin the animation // Make sure that we start at a small width/height to avoid any flash of content if ( dataShow !== undefined ) { // This show is picking up where a previous hide or show left off this.custom( this.cur(), dataShow ); } else { this.custom( this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur() ); } // Start by showing the element jQuery( this.elem ).show(); }, // Simple 'hide' function hide: function() { // Remember where we started, so that we can go back to it later this.options.orig[ this.prop ] = jQuery._data( this.elem, "fxshow" + this.prop ) || jQuery.style( this.elem, this.prop ); this.options.hide = true; // Begin the animation this.custom( this.cur(), 0 ); }, // Each step of an animation step: function( gotoEnd ) { var p, n, complete, t = fxNow || createFxNow(), done = true, elem = this.elem, options = this.options; if ( gotoEnd || t >= options.duration + this.startTime ) { this.now = this.end; this.pos = this.state = 1; this.update(); options.animatedProperties[ this.prop ] = true; for ( p in options.animatedProperties ) { if ( options.animatedProperties[ p ] !== true ) { done = false; } } if ( done ) { // Reset the overflow if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) { jQuery.each( [ "", "X", "Y" ], function( index, value ) { elem.style[ "overflow" + value ] = options.overflow[ index ]; }); } // Hide the element if the "hide" operation was done if ( options.hide ) { jQuery( elem ).hide(); } // Reset the properties, if the item has been hidden or shown if ( options.hide || options.show ) { for ( p in options.animatedProperties ) { jQuery.style( elem, p, options.orig[ p ] ); jQuery.removeData( elem, "fxshow" + p, true ); // Toggle data is no longer needed jQuery.removeData( elem, "toggle" + p, true ); } } // Execute the complete function // in the event that the complete function throws an exception // we must ensure it won't be called twice. #5684 complete = options.complete; if ( complete ) { options.complete = false; complete.call( elem ); } } return false; } else { // classical easing cannot be used with an Infinity duration if ( options.duration == Infinity ) { this.now = t; } else { n = t - this.startTime; this.state = n / options.duration; // Perform the easing function, defaults to swing this.pos = jQuery.easing[ options.animatedProperties[this.prop] ]( this.state, n, 0, 1, options.duration ); this.now = this.start + ( (this.end - this.start) * this.pos ); } // Perform the next step of the animation this.update(); } return true; } }; jQuery.extend( jQuery.fx, { tick: function() { var timer, timers = jQuery.timers, i = 0; for ( ; i < timers.length; i++ ) { timer = timers[ i ]; // Checks the timer has not already been removed if ( !timer() && timers[ i ] === timer ) { timers.splice( i--, 1 ); } } if ( !timers.length ) { jQuery.fx.stop(); } }, interval: 13, stop: function() { clearInterval( timerId ); timerId = null; }, speeds: { slow: 600, fast: 200, // Default speed _default: 400 }, step: { opacity: function( fx ) { jQuery.style( fx.elem, "opacity", fx.now ); }, _default: function( fx ) { if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) { fx.elem.style[ fx.prop ] = fx.now + fx.unit; } else { fx.elem[ fx.prop ] = fx.now; } } } }); // Ensure props that can't be negative don't go there on undershoot easing jQuery.each( fxAttrs.concat.apply( [], fxAttrs ), function( i, prop ) { // exclude marginTop, marginLeft, marginBottom and marginRight from this list if ( prop.indexOf( "margin" ) ) { jQuery.fx.step[ prop ] = function( fx ) { jQuery.style( fx.elem, prop, Math.max(0, fx.now) + fx.unit ); }; } }); if ( jQuery.expr && jQuery.expr.filters ) { jQuery.expr.filters.animated = function( elem ) { return jQuery.grep(jQuery.timers, function( fn ) { return elem === fn.elem; }).length; }; } // Try to restore the default display value of an element function defaultDisplay( nodeName ) { if ( !elemdisplay[ nodeName ] ) { var body = document.body, elem = jQuery( "<" + nodeName + ">" ).appendTo( body ), display = elem.css( "display" ); elem.remove(); // If the simple way fails, // get element's real default display by attaching it to a temp iframe if ( display === "none" || display === "" ) { // No iframe to use yet, so create it if ( !iframe ) { iframe = document.createElement( "iframe" ); iframe.frameBorder = iframe.width = iframe.height = 0; } body.appendChild( iframe ); // Create a cacheable copy of the iframe document on first call. // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML // document to it; WebKit & Firefox won't allow reusing the iframe document. if ( !iframeDoc || !iframe.createElement ) { iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document; iframeDoc.write( ( jQuery.support.boxModel ? "<!doctype html>" : "" ) + "<html><body>" ); iframeDoc.close(); } elem = iframeDoc.createElement( nodeName ); iframeDoc.body.appendChild( elem ); display = jQuery.css( elem, "display" ); body.removeChild( iframe ); } // Store the correct default display elemdisplay[ nodeName ] = display; } return elemdisplay[ nodeName ]; } var getOffset, rtable = /^t(?:able|d|h)$/i, rroot = /^(?:body|html)$/i; if ( "getBoundingClientRect" in document.documentElement ) { getOffset = function( elem, doc, docElem, box ) { try { box = elem.getBoundingClientRect(); } catch(e) {} // Make sure we're not dealing with a disconnected DOM node if ( !box || !jQuery.contains( docElem, elem ) ) { return box ? { top: box.top, left: box.left } : { top: 0, left: 0 }; } var body = doc.body, win = getWindow( doc ), clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0, scrollTop = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop, scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft, top = box.top + scrollTop - clientTop, left = box.left + scrollLeft - clientLeft; return { top: top, left: left }; }; } else { getOffset = function( elem, doc, docElem ) { var computedStyle, offsetParent = elem.offsetParent, prevOffsetParent = elem, body = doc.body, defaultView = doc.defaultView, prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle, top = elem.offsetTop, left = elem.offsetLeft; while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) { if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) { break; } computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle; top -= elem.scrollTop; left -= elem.scrollLeft; if ( elem === offsetParent ) { top += elem.offsetTop; left += elem.offsetLeft; if ( jQuery.support.doesNotAddBorder && !(jQuery.support.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) { top += parseFloat( computedStyle.borderTopWidth ) || 0; left += parseFloat( computedStyle.borderLeftWidth ) || 0; } prevOffsetParent = offsetParent; offsetParent = elem.offsetParent; } if ( jQuery.support.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) { top += parseFloat( computedStyle.borderTopWidth ) || 0; left += parseFloat( computedStyle.borderLeftWidth ) || 0; } prevComputedStyle = computedStyle; } if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) { top += body.offsetTop; left += body.offsetLeft; } if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) { top += Math.max( docElem.scrollTop, body.scrollTop ); left += Math.max( docElem.scrollLeft, body.scrollLeft ); } return { top: top, left: left }; }; } jQuery.fn.offset = function( options ) { if ( arguments.length ) { return options === undefined ? this : this.each(function( i ) { jQuery.offset.setOffset( this, options, i ); }); } var elem = this[0], doc = elem && elem.ownerDocument; if ( !doc ) { return null; } if ( elem === doc.body ) { return jQuery.offset.bodyOffset( elem ); } return getOffset( elem, doc, doc.documentElement ); }; jQuery.offset = { bodyOffset: function( body ) { var top = body.offsetTop, left = body.offsetLeft; if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) { top += parseFloat( jQuery.css(body, "marginTop") ) || 0; left += parseFloat( jQuery.css(body, "marginLeft") ) || 0; } return { top: top, left: left }; }, setOffset: function( elem, options, i ) { var position = jQuery.css( elem, "position" ); // set position first, in-case top/left are set even on static elem if ( position === "static" ) { elem.style.position = "relative"; } var curElem = jQuery( elem ), curOffset = curElem.offset(), curCSSTop = jQuery.css( elem, "top" ), curCSSLeft = jQuery.css( elem, "left" ), calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, props = {}, curPosition = {}, curTop, curLeft; // need to be able to calculate position if either top or left is auto and position is either absolute or fixed if ( calculatePosition ) { curPosition = curElem.position(); curTop = curPosition.top; curLeft = curPosition.left; } else { curTop = parseFloat( curCSSTop ) || 0; curLeft = parseFloat( curCSSLeft ) || 0; } if ( jQuery.isFunction( options ) ) { options = options.call( elem, i, curOffset ); } if ( options.top != null ) { props.top = ( options.top - curOffset.top ) + curTop; } if ( options.left != null ) { props.left = ( options.left - curOffset.left ) + curLeft; } if ( "using" in options ) { options.using.call( elem, props ); } else { curElem.css( props ); } } }; jQuery.fn.extend({ position: function() { if ( !this[0] ) { return null; } var elem = this[0], // Get *real* offsetParent offsetParent = this.offsetParent(), // Get correct offsets offset = this.offset(), parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); // Subtract element margins // note: when an element has margin: auto the offsetLeft and marginLeft // are the same in Safari causing offset.left to incorrectly be 0 offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0; offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0; // Add offsetParent borders parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0; parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0; // Subtract the two offsets return { top: offset.top - parentOffset.top, left: offset.left - parentOffset.left }; }, offsetParent: function() { return this.map(function() { var offsetParent = this.offsetParent || document.body; while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { offsetParent = offsetParent.offsetParent; } return offsetParent; }); } }); // Create scrollLeft and scrollTop methods jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { var top = /Y/.test( prop ); jQuery.fn[ method ] = function( val ) { return jQuery.access( this, function( elem, method, val ) { var win = getWindow( elem ); if ( val === undefined ) { return win ? (prop in win) ? win[ prop ] : jQuery.support.boxModel && win.document.documentElement[ method ] || win.document.body[ method ] : elem[ method ]; } if ( win ) { win.scrollTo( !top ? val : jQuery( win ).scrollLeft(), top ? val : jQuery( win ).scrollTop() ); } else { elem[ method ] = val; } }, method, val, arguments.length, null ); }; }); function getWindow( elem ) { return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 ? elem.defaultView || elem.parentWindow : false; } // Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { var clientProp = "client" + name, scrollProp = "scroll" + name, offsetProp = "offset" + name; // innerHeight and innerWidth jQuery.fn[ "inner" + name ] = function() { var elem = this[0]; return elem ? elem.style ? parseFloat( jQuery.css( elem, type, "padding" ) ) : this[ type ]() : null; }; // outerHeight and outerWidth jQuery.fn[ "outer" + name ] = function( margin ) { var elem = this[0]; return elem ? elem.style ? parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) : this[ type ]() : null; }; jQuery.fn[ type ] = function( value ) { return jQuery.access( this, function( elem, type, value ) { var doc, docElemProp, orig, ret; if ( jQuery.isWindow( elem ) ) { // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat doc = elem.document; docElemProp = doc.documentElement[ clientProp ]; return jQuery.support.boxModel && docElemProp || doc.body && doc.body[ clientProp ] || docElemProp; } // Get document width or height if ( elem.nodeType === 9 ) { // Either scroll[Width/Height] or offset[Width/Height], whichever is greater doc = elem.documentElement; // when a window > document, IE6 reports a offset[Width/Height] > client[Width/Height] // so we can't use max, as it'll choose the incorrect offset[Width/Height] // instead we use the correct client[Width/Height] // support:IE6 if ( doc[ clientProp ] >= doc[ scrollProp ] ) { return doc[ clientProp ]; } return Math.max( elem.body[ scrollProp ], doc[ scrollProp ], elem.body[ offsetProp ], doc[ offsetProp ] ); } // Get width or height on the element if ( value === undefined ) { orig = jQuery.css( elem, type ); ret = parseFloat( orig ); return jQuery.isNumeric( ret ) ? ret : orig; } // Set the width or height on the element jQuery( elem ).css( type, value ); }, type, value, arguments.length, null ); }; }); // Expose jQuery to the global object window.jQuery = window.$ = jQuery; // Expose jQuery as an AMD module, but only for AMD loaders that // understand the issues with loading multiple versions of jQuery // in a page that all might call define(). The loader will indicate // they have special allowances for multiple jQuery versions by // specifying define.amd.jQuery = true. Register as a named module, // since jQuery can be concatenated with other files that may use define, // but not use a proper concatenation script that understands anonymous // AMD modules. A named AMD is safest and most robust way to register. // Lowercase jquery is used because AMD module names are derived from // file names, and jQuery is normally delivered in a lowercase file name. // Do this after creating the global so that if an AMD module wants to call // noConflict to hide this version of jQuery, it will work. if ( typeof define === "function" && define.amd && define.amd.jQuery ) { define( "jquery", [], function () { return jQuery; } ); } })( window ); /** * @license AngularJS v1.0.0rc6 * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ (function(window, document){ var _jQuery = window.jQuery.noConflict(true); //////////////////////////////////// /** * @ngdoc function * @name angular.lowercase * @function * * @description Converts the specified string to lowercase. * @param {string} string String to be converted to lowercase. * @returns {string} Lowercased string. */ var lowercase = function(string){return isString(string) ? string.toLowerCase() : string;}; /** * @ngdoc function * @name angular.uppercase * @function * * @description Converts the specified string to uppercase. * @param {string} string String to be converted to uppercase. * @returns {string} Uppercased string. */ var uppercase = function(string){return isString(string) ? string.toUpperCase() : string;}; var manualLowercase = function(s) { return isString(s) ? s.replace(/[A-Z]/g, function(ch) {return fromCharCode(ch.charCodeAt(0) | 32);}) : s; }; var manualUppercase = function(s) { return isString(s) ? s.replace(/[a-z]/g, function(ch) {return fromCharCode(ch.charCodeAt(0) & ~32);}) : s; }; // String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish // locale, for this reason we need to detect this case and redefine lowercase/uppercase methods // with correct but slower alternatives. if ('i' !== 'I'.toLowerCase()) { lowercase = manualLowercase; uppercase = manualUppercase; } function fromCharCode(code) {return String.fromCharCode(code);} var Error = window.Error, /** holds major version number for IE or NaN for real browsers */ msie = int((/msie (\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]), jqLite, // delay binding since jQuery could be loaded after us. jQuery, // delay binding slice = [].slice, push = [].push, toString = Object.prototype.toString, /** @name angular */ angular = window.angular || (window.angular = {}), angularModule, /** @name angular.module.ng */ nodeName_, uid = ['0', '0', '0']; /** * @ngdoc function * @name angular.forEach * @function * * @description * Invokes the `iterator` function once for each item in `obj` collection, which can be either an * object or an array. The `iterator` function is invoked with `iterator(value, key)`, where `value` * is the value of an object property or an array element and `key` is the object property key or * array element index. Specifying a `context` for the function is optional. * * Note: this function was previously known as `angular.foreach`. * <pre> var values = {name: 'misko', gender: 'male'}; var log = []; angular.forEach(values, function(value, key){ this.push(key + ': ' + value); }, log); expect(log).toEqual(['name: misko', 'gender:male']); </pre> * * @param {Object|Array} obj Object to iterate over. * @param {Function} iterator Iterator function. * @param {Object=} context Object to become context (`this`) for the iterator function. * @returns {Object|Array} Reference to `obj`. */ function forEach(obj, iterator, context) { var key; if (obj) { if (isFunction(obj)){ for (key in obj) { if (key != 'prototype' && key != 'length' && key != 'name' && obj.hasOwnProperty(key)) { iterator.call(context, obj[key], key); } } } else if (obj.forEach && obj.forEach !== forEach) { obj.forEach(iterator, context); } else if (isObject(obj) && isNumber(obj.length)) { for (key = 0; key < obj.length; key++) iterator.call(context, obj[key], key); } else { for (key in obj) { if (obj.hasOwnProperty(key)) { iterator.call(context, obj[key], key); } } } } return obj; } function sortedKeys(obj) { var keys = []; for (var key in obj) { if (obj.hasOwnProperty(key)) { keys.push(key); } } return keys.sort(); } function forEachSorted(obj, iterator, context) { var keys = sortedKeys(obj); for ( var i = 0; i < keys.length; i++) { iterator.call(context, obj[keys[i]], keys[i]); } return keys; } /** * when using forEach the params are value, key, but it is often useful to have key, value. * @param {function(string, *)} iteratorFn * @returns {function(*, string)} */ function reverseParams(iteratorFn) { return function(value, key) { iteratorFn(key, value) }; } /** * A consistent way of creating unique IDs in angular. The ID is a sequence of alpha numeric * characters such as '012ABC'. The reason why we are not using simply a number counter is that * the number string gets longer over time, and it can also overflow, where as the the nextId * will grow much slower, it is a string, and it will never overflow. * * @returns an unique alpha-numeric string */ function nextUid() { var index = uid.length; var digit; while(index) { index--; digit = uid[index].charCodeAt(0); if (digit == 57 /*'9'*/) { uid[index] = 'A'; return uid.join(''); } if (digit == 90 /*'Z'*/) { uid[index] = '0'; } else { uid[index] = String.fromCharCode(digit + 1); return uid.join(''); } } uid.unshift('0'); return uid.join(''); } /** * @ngdoc function * @name angular.extend * @function * * @description * Extends the destination object `dst` by copying all of the properties from the `src` object(s) * to `dst`. You can specify multiple `src` objects. * * @param {Object} dst Destination object. * @param {...Object} src Source object(s). */ function extend(dst) { forEach(arguments, function(obj){ if (obj !== dst) { forEach(obj, function(value, key){ dst[key] = value; }); } }); return dst; } function int(str) { return parseInt(str, 10); } function inherit(parent, extra) { return extend(new (extend(function() {}, {prototype:parent}))(), extra); } /** * @ngdoc function * @name angular.noop * @function * * @description * A function that performs no operations. This function can be useful when writing code in the * functional style. <pre> function foo(callback) { var result = calculateResult(); (callback || angular.noop)(result); } </pre> */ function noop() {} noop.$inject = []; /** * @ngdoc function * @name angular.identity * @function * * @description * A function that returns its first argument. This function is useful when writing code in the * functional style. * <pre> function transformer(transformationFn, value) { return (transformationFn || identity)(value); }; </pre> */ function identity($) {return $;} identity.$inject = []; function valueFn(value) {return function() {return value;};} /** * @ngdoc function * @name angular.isUndefined * @function * * @description * Determines if a reference is undefined. * * @param {*} value Reference to check. * @returns {boolean} True if `value` is undefined. */ function isUndefined(value){return typeof value == 'undefined';} /** * @ngdoc function * @name angular.isDefined * @function * * @description * Determines if a reference is defined. * * @param {*} value Reference to check. * @returns {boolean} True if `value` is defined. */ function isDefined(value){return typeof value != 'undefined';} /** * @ngdoc function * @name angular.isObject * @function * * @description * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not * considered to be objects. * * @param {*} value Reference to check. * @returns {boolean} True if `value` is an `Object` but not `null`. */ function isObject(value){return value != null && typeof value == 'object';} /** * @ngdoc function * @name angular.isString * @function * * @description * Determines if a reference is a `String`. * * @param {*} value Reference to check. * @returns {boolean} True if `value` is a `String`. */ function isString(value){return typeof value == 'string';} /** * @ngdoc function * @name angular.isNumber * @function * * @description * Determines if a reference is a `Number`. * * @param {*} value Reference to check. * @returns {boolean} True if `value` is a `Number`. */ function isNumber(value){return typeof value == 'number';} /** * @ngdoc function * @name angular.isDate * @function * * @description * Determines if a value is a date. * * @param {*} value Reference to check. * @returns {boolean} True if `value` is a `Date`. */ function isDate(value){ return toString.apply(value) == '[object Date]'; } /** * @ngdoc function * @name angular.isArray * @function * * @description * Determines if a reference is an `Array`. * * @param {*} value Reference to check. * @returns {boolean} True if `value` is an `Array`. */ function isArray(value) { return toString.apply(value) == '[object Array]'; } /** * @ngdoc function * @name angular.isFunction * @function * * @description * Determines if a reference is a `Function`. * * @param {*} value Reference to check. * @returns {boolean} True if `value` is a `Function`. */ function isFunction(value){return typeof value == 'function';} /** * Checks if `obj` is a window object. * * @private * @param {*} obj Object to check * @returns {boolean} True if `obj` is a window obj. */ function isWindow(obj) { return obj && obj.document && obj.location && obj.alert && obj.setInterval; } function isScope(obj) { return obj && obj.$evalAsync && obj.$watch; } function isFile(obj) { return toString.apply(obj) === '[object File]'; } function isBoolean(value) { return typeof value == 'boolean'; } function trim(value) { return isString(value) ? value.replace(/^\s*/, '').replace(/\s*$/, '') : value; } /** * @ngdoc function * @name angular.isElement * @function * * @description * Determines if a reference is a DOM element (or wrapped jQuery element). * * @param {*} value Reference to check. * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element). */ function isElement(node) { return node && (node.nodeName // we are a direct element || (node.bind && node.find)); // we have a bind and find method part of jQuery API } /** * @param str 'key1,key2,...' * @returns {object} in the form of {key1:true, key2:true, ...} */ function makeMap(str){ var obj = {}, items = str.split(","), i; for ( i = 0; i < items.length; i++ ) obj[ items[i] ] = true; return obj; } if (msie < 9) { nodeName_ = function(element) { element = element.nodeName ? element : element[0]; return (element.scopeName && element.scopeName != 'HTML') ? uppercase(element.scopeName + ':' + element.nodeName) : element.nodeName; }; } else { nodeName_ = function(element) { return element.nodeName ? element.nodeName : element[0].nodeName; }; } function map(obj, iterator, context) { var results = []; forEach(obj, function(value, index, list) { results.push(iterator.call(context, value, index, list)); }); return results; } /** * @description * Determines the number of elements in an array, the number of properties an object has, or * the length of a string. * * Note: This function is used to augment the Object type in Angular expressions. See * {@link angular.Object} for more information about Angular arrays. * * @param {Object|Array|string} obj Object, array, or string to inspect. * @param {boolean} [ownPropsOnly=false] Count only "own" properties in an object * @returns {number} The size of `obj` or `0` if `obj` is neither an object nor an array. */ function size(obj, ownPropsOnly) { var size = 0, key; if (isArray(obj) || isString(obj)) { return obj.length; } else if (isObject(obj)){ for (key in obj) if (!ownPropsOnly || obj.hasOwnProperty(key)) size++; } return size; } function includes(array, obj) { return indexOf(array, obj) != -1; } function indexOf(array, obj) { if (array.indexOf) return array.indexOf(obj); for ( var i = 0; i < array.length; i++) { if (obj === array[i]) return i; } return -1; } function arrayRemove(array, value) { var index = indexOf(array, value); if (index >=0) array.splice(index, 1); return value; } function isLeafNode (node) { if (node) { switch (node.nodeName) { case "OPTION": case "PRE": case "TITLE": return true; } } return false; } /** * @ngdoc function * @name angular.copy * @function * * @description * Creates a deep copy of `source`, which should be an object or an array. * * * If no destination is supplied, a copy of the object or array is created. * * If a destination is provided, all of its elements (for array) or properties (for objects) * are deleted and then all elements/properties from the source are copied to it. * * If `source` is not an object or array, `source` is returned. * * Note: this function is used to augment the Object type in Angular expressions. See * {@link angular.module.ng.$filter} for more information about Angular arrays. * * @param {*} source The source that will be used to make a copy. * Can be any type, including primitives, `null`, and `undefined`. * @param {(Object|Array)=} destination Destination into which the source is copied. If * provided, must be of the same type as `source`. * @returns {*} The copy or updated `destination`, if `destination` was specified. */ function copy(source, destination){ if (isWindow(source) || isScope(source)) throw Error("Can't copy Window or Scope"); if (!destination) { destination = source; if (source) { if (isArray(source)) { destination = copy(source, []); } else if (isDate(source)) { destination = new Date(source.getTime()); } else if (isObject(source)) { destination = copy(source, {}); } } } else { if (source === destination) throw Error("Can't copy equivalent objects or arrays"); if (isArray(source)) { while(destination.length) { destination.pop(); } for ( var i = 0; i < source.length; i++) { destination.push(copy(source[i])); } } else { forEach(destination, function(value, key){ delete destination[key]; }); for ( var key in source) { destination[key] = copy(source[key]); } } } return destination; } /** * Create a shallow copy of an object */ function shallowCopy(src, dst) { dst = dst || {}; for(var key in src) { if (src.hasOwnProperty(key) && key.substr(0, 2) !== '$$') { dst[key] = src[key]; } } return dst; } /** * @ngdoc function * @name angular.equals * @function * * @description * Determines if two objects or two values are equivalent. Supports value types, arrays and * objects. * * Two objects or values are considered equivalent if at least one of the following is true: * * * Both objects or values pass `===` comparison. * * Both objects or values are of the same type and all of their properties pass `===` comparison. * * Both values are NaN. (In JavasScript, NaN == NaN => false. But we consider two NaN as equal) * * During a property comparision, properties of `function` type and properties with names * that begin with `$` are ignored. * * Scope and DOMWindow objects are being compared only be identify (`===`). * * @param {*} o1 Object or value to compare. * @param {*} o2 Object or value to compare. * @returns {boolean} True if arguments are equal. */ function equals(o1, o2) { if (o1 === o2) return true; if (o1 === null || o2 === null) return false; if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN var t1 = typeof o1, t2 = typeof o2, length, key, keySet; if (t1 == t2) { if (t1 == 'object') { if (isArray(o1)) { if ((length = o1.length) == o2.length) { for(key=0; key<length; key++) { if (!equals(o1[key], o2[key])) return false; } return true; } } else if (isDate(o1)) { return isDate(o2) && o1.getTime() == o2.getTime(); } else { if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2)) return false; keySet = {}; for(key in o1) { if (key.charAt(0) !== '$' && !isFunction(o1[key]) && !equals(o1[key], o2[key])) { return false; } keySet[key] = true; } for(key in o2) { if (!keySet[key] && key.charAt(0) !== '$' && !isFunction(o2[key])) return false; } return true; } } } return false; } function concat(array1, array2, index) { return array1.concat(slice.call(array2, index)); } function sliceArgs(args, startIndex) { return slice.call(args, startIndex || 0); } /** * @ngdoc function * @name angular.bind * @function * * @description * Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for * `fn`). You can supply optional `args` that are are prebound to the function. This feature is also * known as [function currying](http://en.wikipedia.org/wiki/Currying). * * @param {Object} self Context which `fn` should be evaluated in. * @param {function()} fn Function to be bound. * @param {...*} args Optional arguments to be prebound to the `fn` function call. * @returns {function()} Function that wraps the `fn` with all the specified bindings. */ function bind(self, fn) { var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : []; if (isFunction(fn) && !(fn instanceof RegExp)) { return curryArgs.length ? function() { return arguments.length ? fn.apply(self, curryArgs.concat(slice.call(arguments, 0))) : fn.apply(self, curryArgs); } : function() { return arguments.length ? fn.apply(self, arguments) : fn.call(self); }; } else { // in IE, native methods are not functions so they cannot be bound (note: they don't need to be) return fn; } } function toJsonReplacer(key, value) { var val = value; if (/^\$+/.test(key)) { val = undefined; } else if (isWindow(value)) { val = '$WINDOW'; } else if (value && document === value) { val = '$DOCUMENT'; } else if (isScope(value)) { val = '$SCOPE'; } return val; } /** * @ngdoc function * @name angular.toJson * @function * * @description * Serializes input into a JSON-formatted string. * * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON. * @param {boolean=} pretty If set to true, the JSON output will contain newlines and whitespace. * @returns {string} Jsonified string representing `obj`. */ function toJson(obj, pretty) { return JSON.stringify(obj, toJsonReplacer, pretty ? ' ' : null); } /** * @ngdoc function * @name angular.fromJson * @function * * @description * Deserializes a JSON string. * * @param {string} json JSON string to deserialize. * @returns {Object|Array|Date|string|number} Deserialized thingy. */ function fromJson(json) { return isString(json) ? JSON.parse(json) : json; } function toBoolean(value) { if (value && value.length !== 0) { var v = lowercase("" + value); value = !(v == 'f' || v == '0' || v == 'false' || v == 'no' || v == 'n' || v == '[]'); } else { value = false; } return value; } /** * @returns {string} Returns the string representation of the element. */ function startingTag(element) { element = jqLite(element).clone(); try { // turns out IE does not let you set .html() on elements which // are not allowed to have children. So we just ignore it. element.html(''); } catch(e) {} return jqLite('<div>').append(element).html().match(/^(<[^>]+>)/)[1]; } ///////////////////////////////////////////////// /** * Parses an escaped url query string into key-value pairs. * @returns Object.<(string|boolean)> */ function parseKeyValue(/**string*/keyValue) { var obj = {}, key_value, key; forEach((keyValue || "").split('&'), function(keyValue){ if (keyValue) { key_value = keyValue.split('='); key = decodeURIComponent(key_value[0]); obj[key] = isDefined(key_value[1]) ? decodeURIComponent(key_value[1]) : true; } }); return obj; } function toKeyValue(obj) { var parts = []; forEach(obj, function(value, key) { parts.push(encodeUriQuery(key, true) + (value === true ? '' : '=' + encodeUriQuery(value, true))); }); return parts.length ? parts.join('&') : ''; } /** * We need our custom mehtod because encodeURIComponent is too agressive and doesn't follow * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path * segments: * segment = *pchar * pchar = unreserved / pct-encoded / sub-delims / ":" / "@" * pct-encoded = "%" HEXDIG HEXDIG * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" * sub-delims = "!" / "$" / "&" / "'" / "(" / ")" * / "*" / "+" / "," / ";" / "=" */ function encodeUriSegment(val) { return encodeUriQuery(val, true). replace(/%26/gi, '&'). replace(/%3D/gi, '='). replace(/%2B/gi, '+'); } /** * This method is intended for encoding *key* or *value* parts of query component. We need a custom * method becuase encodeURIComponent is too agressive and encodes stuff that doesn't have to be * encoded per http://tools.ietf.org/html/rfc3986: * query = *( pchar / "/" / "?" ) * pchar = unreserved / pct-encoded / sub-delims / ":" / "@" * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" * pct-encoded = "%" HEXDIG HEXDIG * sub-delims = "!" / "$" / "&" / "'" / "(" / ")" * / "*" / "+" / "," / ";" / "=" */ function encodeUriQuery(val, pctEncodeSpaces) { return encodeURIComponent(val). replace(/%40/gi, '@'). replace(/%3A/gi, ':'). replace(/%24/g, '$'). replace(/%2C/gi, ','). replace((pctEncodeSpaces ? null : /%20/g), '+'); } /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngApp * * @element ANY * @param {angular.Module} ngApp on optional application * {@link angular.module module} name to load. * * @description * * Use this directive to auto-bootstrap on application. Only * one directive can be used per HTML document. The directive * designates the root of the application and is typically placed * ot the root of the page. * * In the example below if the `ngApp` directive would not be placed * on the `html` element then the document would not be compiled * and the `{{ 1+2 }}` would not be resolved to `3`. * * `ngApp` is the easiest way to bootstrap an application. * <doc:example> <doc:source> I can add: 1 + 2 = {{ 1+2 }} </doc:source> </doc:example> * */ function angularInit(element, bootstrap) { var elements = [element], appElement, module, names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'], NG_APP_CLASS_REGEXP = /\sng[:\-]app(:\s*([\w\d_]+);?)?\s/; function append(element) { element && elements.push(element); } forEach(names, function(name) { names[name] = true; append(document.getElementById(name)); name = name.replace(':', '\\:'); if (element.querySelectorAll) { forEach(element.querySelectorAll('.' + name), append); forEach(element.querySelectorAll('.' + name + '\\:'), append); forEach(element.querySelectorAll('[' + name + ']'), append); } }); forEach(elements, function(element) { if (!appElement) { var className = ' ' + element.className + ' '; var match = NG_APP_CLASS_REGEXP.exec(className); if (match) { appElement = element; module = (match[2] || '').replace(/\s+/g, ','); } else { forEach(element.attributes, function(attr) { if (!appElement && names[attr.name]) { appElement = element; module = attr.value; } }); } } }); if (appElement) { bootstrap(appElement, module ? [module] : []); } } /** * @ngdoc function * @name angular.bootstrap * @description * Use this function to manually start up angular application. * * See: {@link guide/dev_guide.bootstrap.manual_bootstrap Bootstrap} * * @param {Element} element DOM element which is the root of angular application. * @param {Array<String|Function>=} modules an array of module declarations. See: {@link angular.module modules} * @returns {angular.module.auto.$injector} Returns the newly created injector for this app. */ function bootstrap(element, modules) { element = jqLite(element); modules = modules || []; modules.unshift('ng'); var injector = createInjector(modules); injector.invoke( ['$rootScope', '$compile', '$injector', function(scope, compile, injector){ scope.$apply(function() { element.data('$injector', injector); compile(element)(scope); }); }] ); return injector; } var SNAKE_CASE_REGEXP = /[A-Z]/g; function snake_case(name, separator){ separator = separator || '_'; return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) { return (pos ? separator : '') + letter.toLowerCase(); }); } function bindJQuery() { // bind to jQuery if present; jQuery = window.jQuery; // reset to jQuery or default to us. if (jQuery) { jqLite = jQuery; extend(jQuery.fn, { scope: JQLitePrototype.scope, controller: JQLitePrototype.controller, injector: JQLitePrototype.injector, inheritedData: JQLitePrototype.inheritedData }); JQLitePatchJQueryRemove('remove', true); JQLitePatchJQueryRemove('empty'); JQLitePatchJQueryRemove('html'); } else { jqLite = JQLite; } angular.element = jqLite; } /** * throw error of the argument is falsy. */ function assertArg(arg, name, reason) { if (!arg) { throw new Error("Argument '" + (name || '?') + "' is " + (reason || "required")); } return arg; } function assertArgFn(arg, name, acceptArrayAnnotation) { if (acceptArrayAnnotation && isArray(arg)) { arg = arg[arg.length - 1]; } assertArg(isFunction(arg), name, 'not a function, got ' + (arg && typeof arg == 'object' ? arg.constructor.name || 'Object' : typeof arg)); return arg; } /** * @ngdoc interface * @name angular.Module * @description * * Interface for configuring angular {@link angular.module modules}. */ function setupModuleLoader(window) { function ensure(obj, name, factory) { return obj[name] || (obj[name] = factory()); } return ensure(ensure(window, 'angular', Object), 'module', function() { /** @type {Object.<string, angular.Module>} */ var modules = {}; /** * @ngdoc function * @name angular.module * @description * * The `angular.module` is a global place for creating and registering Angular modules. All * modules (angular core or 3rd party) that should be available to an application must be * registered using this mechanism. * * * # Module * * A module is a collocation of services, directives, filters, and configure information. Module * is used to configure the {@link angular.module.AUTO.$injector $injector}. * * <pre> * // Create a new module * var myModule = angular.module('myModule', []); * * // register a new service * myModule.value('appName', 'MyCoolApp'); * * // configure existing services inside initialization blocks. * myModule.config(function($locationProvider) { * // Configure existing providers * $locationProvider.hashPrefix('!'); * }); * </pre> * * Then you can create an injector and load your modules like this: * * <pre> * var injector = angular.injector(['ng', 'MyModule']) * </pre> * * However it's more likely that you'll just use * {@link angular.module.ng.$compileProvider.directive.ngApp ngApp} or * {@link angular.bootstrap} to simplify this process for you. * * @param {!string} name The name of the module to create or retrieve. * @param {Array.<string>=} requires If specified then new module is being created. If unspecified then the * the module is being retrieved for further configuration. * @param {Function} configFn Option configuration function for the module. Same as * {@link angular.Module#config Module#config()}. * @returns {module} new module with the {@link angular.Module} api. */ return function module(name, requires, configFn) { if (requires && modules.hasOwnProperty(name)) { modules[name] = null; } return ensure(modules, name, function() { if (!requires) { throw Error('No module: ' + name); } /** @type {!Array.<Array.<*>>} */ var invokeQueue = []; /** @type {!Array.<Function>} */ var runBlocks = []; var config = invokeLater('$injector', 'invoke'); /** @type {angular.Module} */ var moduleInstance = { // Private state _invokeQueue: invokeQueue, _runBlocks: runBlocks, /** * @ngdoc property * @name angular.Module#requires * @propertyOf angular.Module * @returns {Array.<string>} List of module names which must be loaded before this module. * @description * Holds the list of modules which the injector will load before the current module is loaded. */ requires: requires, /** * @ngdoc property * @name angular.Module#name * @propertyOf angular.Module * @returns {string} Name of the module. * @description */ name: name, /** * @ngdoc method * @name angular.Module#provider * @methodOf angular.Module * @param {string} name service name * @param {Function} providerType Construction function for creating new instance of the service. * @description * See {@link angular.module.AUTO.$provide#provider $provide.provider()}. */ provider: invokeLater('$provide', 'provider'), /** * @ngdoc method * @name angular.Module#factory * @methodOf angular.Module * @param {string} name service name * @param {Function} providerFunction Function for creating new instance of the service. * @description * See {@link angular.module.AUTO.$provide#factory $provide.factory()}. */ factory: invokeLater('$provide', 'factory'), /** * @ngdoc method * @name angular.Module#service * @methodOf angular.Module * @param {string} name service name * @param {Function} constructor A constructor function that will be instantiated. * @description * See {@link angular.module.AUTO.$provide#service $provide.service()}. */ service: invokeLater('$provide', 'service'), /** * @ngdoc method * @name angular.Module#value * @methodOf angular.Module * @param {string} name service name * @param {*} object Service instance object. * @description * See {@link angular.module.AUTO.$provide#value $provide.value()}. */ value: invokeLater('$provide', 'value'), /** * @ngdoc method * @name angular.Module#constant * @methodOf angular.Module * @param {string} name constant name * @param {*} object Constant value. * @description * Because the constant are fixed, they get applied before other provide methods. * See {@link angular.module.AUTO.$provide#constant $provide.constant()}. */ constant: invokeLater('$provide', 'constant', 'unshift'), /** * @ngdoc method * @name angular.Module#filter * @methodOf angular.Module * @param {string} name Filter name. * @param {Function} filterFactory Factory function for creating new instance of filter. * @description * See {@link angular.module.ng.$filterProvider#register $filterProvider.register()}. */ filter: invokeLater('$filterProvider', 'register'), /** * @ngdoc method * @name angular.Module#controller * @methodOf angular.Module * @param {string} name Controller name. * @param {Function} constructor Controller constructor function. * @description * See {@link angular.module.ng.$controllerProvider#register $controllerProvider.register()}. */ controller: invokeLater('$controllerProvider', 'register'), /** * @ngdoc method * @name angular.Module#directive * @methodOf angular.Module * @param {string} name directive name * @param {Function} directiveFactory Factory function for creating new instance of * directives. * @description * See {@link angular.module.ng.$compileProvider.directive $compileProvider.directive()}. */ directive: invokeLater('$compileProvider', 'directive'), /** * @ngdoc method * @name angular.Module#config * @methodOf angular.Module * @param {Function} configFn Execute this function on module load. Useful for service * configuration. * @description * Use this method to register work which needs to be performed on module loading. */ config: config, /** * @ngdoc method * @name angular.Module#run * @methodOf angular.Module * @param {Function} initializationFn Execute this function after injector creation. * Useful for application initialization. * @description * Use this method to register work which needs to be performed when the injector with * with the current module is finished loading. */ run: function(block) { runBlocks.push(block); return this; } }; if (configFn) { config(configFn); } return moduleInstance; /** * @param {string} provider * @param {string} method * @param {String=} insertMethod * @returns {angular.Module} */ function invokeLater(provider, method, insertMethod) { return function() { invokeQueue[insertMethod || 'push']([provider, method, arguments]); return moduleInstance; } } }); }; }); } /** * @ngdoc property * @name angular.version * @description * An object that contains information about the current AngularJS version. This object has the * following properties: * * - `full` – `{string}` – Full version string, such as "0.9.18". * - `major` – `{number}` – Major version number, such as "0". * - `minor` – `{number}` – Minor version number, such as "9". * - `dot` – `{number}` – Dot version number, such as "18". * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat". */ var version = { full: '1.0.0rc6', // all of these placeholder strings will be replaced by rake's major: 1, // compile task minor: 0, dot: 0, codeName: 'runny-nose' }; function publishExternalAPI(angular){ extend(angular, { 'bootstrap': bootstrap, 'copy': copy, 'extend': extend, 'equals': equals, 'element': jqLite, 'forEach': forEach, 'injector': createInjector, 'noop':noop, 'bind':bind, 'toJson': toJson, 'fromJson': fromJson, 'identity':identity, 'isUndefined': isUndefined, 'isDefined': isDefined, 'isString': isString, 'isFunction': isFunction, 'isObject': isObject, 'isNumber': isNumber, 'isElement': isElement, 'isArray': isArray, 'version': version, 'isDate': isDate, 'lowercase': lowercase, 'uppercase': uppercase, 'callbacks': {counter: 0} }); angularModule = setupModuleLoader(window); try { angularModule('ngLocale'); } catch (e) { angularModule('ngLocale', []).provider('$locale', $LocaleProvider); } angularModule('ng', ['ngLocale'], ['$provide', function ngModule($provide) { $provide.provider('$compile', $CompileProvider). directive({ a: htmlAnchorDirective, input: inputDirective, textarea: inputDirective, form: formDirective, script: scriptDirective, select: selectDirective, style: styleDirective, option: optionDirective, ngBind: ngBindDirective, ngBindHtmlUnsafe: ngBindHtmlUnsafeDirective, ngBindTemplate: ngBindTemplateDirective, ngClass: ngClassDirective, ngClassEven: ngClassEvenDirective, ngClassOdd: ngClassOddDirective, ngCloak: ngCloakDirective, ngController: ngControllerDirective, ngForm: ngFormDirective, ngHide: ngHideDirective, ngInclude: ngIncludeDirective, ngInit: ngInitDirective, ngNonBindable: ngNonBindableDirective, ngPluralize: ngPluralizeDirective, ngRepeat: ngRepeatDirective, ngShow: ngShowDirective, ngSubmit: ngSubmitDirective, ngStyle: ngStyleDirective, ngSwitch: ngSwitchDirective, ngSwitchWhen: ngSwitchWhenDirective, ngSwitchDefault: ngSwitchDefaultDirective, ngOptions: ngOptionsDirective, ngView: ngViewDirective, ngTransclude: ngTranscludeDirective, ngModel: ngModelDirective, ngList: ngListDirective, ngChange: ngChangeDirective, required: requiredDirective, ngRequired: requiredDirective, ngValue: ngValueDirective }). directive(ngAttributeAliasDirectives). directive(ngEventDirectives); $provide.provider({ $anchorScroll: $AnchorScrollProvider, $browser: $BrowserProvider, $cacheFactory: $CacheFactoryProvider, $controller: $ControllerProvider, $defer: $DeferProvider, $document: $DocumentProvider, $exceptionHandler: $ExceptionHandlerProvider, $filter: $FilterProvider, $interpolate: $InterpolateProvider, $http: $HttpProvider, $httpBackend: $HttpBackendProvider, $location: $LocationProvider, $log: $LogProvider, $parse: $ParseProvider, $route: $RouteProvider, $routeParams: $RouteParamsProvider, $rootScope: $RootScopeProvider, $q: $QProvider, $sniffer: $SnifferProvider, $templateCache: $TemplateCacheProvider, $window: $WindowProvider }); } ]); } ////////////////////////////////// //JQLite ////////////////////////////////// /** * @ngdoc function * @name angular.element * @function * * @description * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element. * `angular.element` can be either an alias for [jQuery](http://api.jquery.com/jQuery/) function, if * jQuery is available, or a function that wraps the element or string in Angular's jQuery lite * implementation (commonly referred to as jqLite). * * Real jQuery always takes precedence over jqLite, provided it was loaded before `DOMContentLoaded` * event fired. * * jqLite is a tiny, API-compatible subset of jQuery that allows * Angular to manipulate the DOM. jqLite implements only the most commonly needed functionality * within a very small footprint, so only a subset of the jQuery API - methods, arguments and * invocation styles - are supported. * * Note: All element references in Angular are always wrapped with jQuery or jqLite; they are never * raw DOM references. * * ## Angular's jQuery lite provides the following methods: * * - [addClass()](http://api.jquery.com/addClass/) * - [after()](http://api.jquery.com/after/) * - [append()](http://api.jquery.com/append/) * - [attr()](http://api.jquery.com/attr/) * - [bind()](http://api.jquery.com/bind/) * - [children()](http://api.jquery.com/children/) * - [clone()](http://api.jquery.com/clone/) * - [contents()](http://api.jquery.com/contents/) * - [css()](http://api.jquery.com/css/) * - [data()](http://api.jquery.com/data/) * - [eq()](http://api.jquery.com/eq/) * - [find()](http://api.jquery.com/find/) - Limited to lookups by tag name. * - [hasClass()](http://api.jquery.com/hasClass/) * - [html()](http://api.jquery.com/html/) * - [next()](http://api.jquery.com/next/) * - [parent()](http://api.jquery.com/parent/) * - [prepend()](http://api.jquery.com/prepend/) * - [prop()](http://api.jquery.com/prop/) * - [ready()](http://api.jquery.com/ready/) * - [remove()](http://api.jquery.com/remove/) * - [removeAttr()](http://api.jquery.com/removeAttr/) * - [removeClass()](http://api.jquery.com/removeClass/) * - [removeData()](http://api.jquery.com/removeData/) * - [replaceWith()](http://api.jquery.com/replaceWith/) * - [text()](http://api.jquery.com/text/) * - [toggleClass()](http://api.jquery.com/toggleClass/) * - [unbind()](http://api.jquery.com/unbind/) * - [val()](http://api.jquery.com/val/) * - [wrap()](http://api.jquery.com/wrap/) * * ## In addtion to the above, Angular privides an additional method to both jQuery and jQuery lite: * * - `controller(name)` - retrieves the controller of the current element or its parent. By default * retrieves controller associated with the `ngController` directive. If `name` is provided as * camelCase directive name, then the controller for this directive will be retrieved (e.g. * `'ngModel'`). * - `injector()` - retrieves the injector of the current element or its parent. * - `scope()` - retrieves the {@link api/angular.module.ng.$rootScope.Scope scope} of the current * element or its parent. * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top * parent element is reached. * * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery. * @returns {Object} jQuery object. */ var jqCache = {}, jqName = 'ng-' + new Date().getTime(), jqId = 1, addEventListenerFn = (window.document.addEventListener ? function(element, type, fn) {element.addEventListener(type, fn, false);} : function(element, type, fn) {element.attachEvent('on' + type, fn);}), removeEventListenerFn = (window.document.removeEventListener ? function(element, type, fn) {element.removeEventListener(type, fn, false); } : function(element, type, fn) {element.detachEvent('on' + type, fn); }); function jqNextId() { return (jqId++); } var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g; var MOZ_HACK_REGEXP = /^moz([A-Z])/; /** * Converts snake_case to camelCase. * Also there is special case for Moz prefix starting with upper case letter. * @param name Name to normalize */ function camelCase(name) { return name. replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) { return offset ? letter.toUpperCase() : letter; }). replace(MOZ_HACK_REGEXP, 'Moz$1'); } ///////////////////////////////////////////// // jQuery mutation patch // // In conjunction with bindJQuery intercepts all jQuery's DOM destruction apis and fires a // $destroy event on all DOM nodes being removed. // ///////////////////////////////////////////// function JQLitePatchJQueryRemove(name, dispatchThis) { var originalJqFn = jQuery.fn[name]; originalJqFn = originalJqFn.$original || originalJqFn; removePatch.$original = originalJqFn; jQuery.fn[name] = removePatch; function removePatch() { var list = [this], fireEvent = dispatchThis, set, setIndex, setLength, element, childIndex, childLength, children, fns, data; while(list.length) { set = list.shift(); for(setIndex = 0, setLength = set.length; setIndex < setLength; setIndex++) { element = jqLite(set[setIndex]); if (fireEvent) { data = element.data('events'); if ( (fns = data && data.$destroy) ) { forEach(fns, function(fn){ fn.handler(); }); } } else { fireEvent = !fireEvent; } for(childIndex = 0, childLength = (children = element.children()).length; childIndex < childLength; childIndex++) { list.push(jQuery(children[childIndex])); } } } return originalJqFn.apply(this, arguments); } } ///////////////////////////////////////////// function JQLite(element) { if (element instanceof JQLite) { return element; } if (!(this instanceof JQLite)) { if (isString(element) && element.charAt(0) != '<') { throw Error('selectors not implemented'); } return new JQLite(element); } if (isString(element)) { var div = document.createElement('div'); // Read about the NoScope elements here: // http://msdn.microsoft.com/en-us/library/ms533897(VS.85).aspx div.innerHTML = '<div>&nbsp;</div>' + element; // IE insanity to make NoScope elements work! div.removeChild(div.firstChild); // remove the superfluous div JQLiteAddNodes(this, div.childNodes); this.remove(); // detach the elements from the temporary DOM div. } else { JQLiteAddNodes(this, element); } } function JQLiteClone(element) { return element.cloneNode(true); } function JQLiteDealoc(element){ JQLiteRemoveData(element); for ( var i = 0, children = element.childNodes || []; i < children.length; i++) { JQLiteDealoc(children[i]); } } function JQLiteRemoveData(element) { var cacheId = element[jqName], cache = jqCache[cacheId]; if (cache) { if (cache.bind) { forEach(cache.bind, function(fn, type){ if (type == '$destroy') { fn({}); } else { removeEventListenerFn(element, type, fn); } }); } delete jqCache[cacheId]; element[jqName] = undefined; // ie does not allow deletion of attributes on elements. } } function JQLiteData(element, key, value) { var cacheId = element[jqName], cache = jqCache[cacheId || -1]; if (isDefined(value)) { if (!cache) { element[jqName] = cacheId = jqNextId(); cache = jqCache[cacheId] = {}; } cache[key] = value; } else { return cache ? cache[key] : null; } } function JQLiteHasClass(element, selector) { return ((" " + element.className + " ").replace(/[\n\t]/g, " "). indexOf( " " + selector + " " ) > -1); } function JQLiteRemoveClass(element, selector) { if (selector) { forEach(selector.split(' '), function(cssClass) { element.className = trim( (" " + element.className + " ") .replace(/[\n\t]/g, " ") .replace(" " + trim(cssClass) + " ", " ") ); }); } } function JQLiteAddClass(element, selector) { if (selector) { forEach(selector.split(' '), function(cssClass) { if (!JQLiteHasClass(element, cssClass)) { element.className = trim(element.className + ' ' + trim(cssClass)); } }); } } function JQLiteAddNodes(root, elements) { if (elements) { elements = (!elements.nodeName && isDefined(elements.length) && !isWindow(elements)) ? elements : [ elements ]; for(var i=0; i < elements.length; i++) { root.push(elements[i]); } } } function JQLiteController(element, name) { return JQLiteInheritedData(element, '$' + (name || 'ngController' ) + 'Controller'); } function JQLiteInheritedData(element, name, value) { element = jqLite(element); // if element is the document object work with the html element instead // this makes $(document).scope() possible if(element[0].nodeType == 9) { element = element.find('html'); } while (element.length) { if (value = element.data(name)) return value; element = element.parent(); } } ////////////////////////////////////////// // Functions which are declared directly. ////////////////////////////////////////// var JQLitePrototype = JQLite.prototype = { ready: function(fn) { var fired = false; function trigger() { if (fired) return; fired = true; fn(); } this.bind('DOMContentLoaded', trigger); // works for modern browsers and IE9 // we can not use jqLite since we are not done loading and jQuery could be loaded later. JQLite(window).bind('load', trigger); // fallback to window.onload for others }, toString: function() { var value = []; forEach(this, function(e){ value.push('' + e);}); return '[' + value.join(', ') + ']'; }, eq: function(index) { return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]); }, length: 0, push: push, sort: [].sort, splice: [].splice }; ////////////////////////////////////////// // Functions iterating getter/setters. // these functions return self on setter and // value on get. ////////////////////////////////////////// var BOOLEAN_ATTR = {}; forEach('multiple,selected,checked,disabled,readOnly,required'.split(','), function(value) { BOOLEAN_ATTR[lowercase(value)] = value; }); var BOOLEAN_ELEMENTS = {}; forEach('input,select,option,textarea,button,form'.split(','), function(value) { BOOLEAN_ELEMENTS[uppercase(value)] = true; }); function isBooleanAttr(element, name) { return BOOLEAN_ELEMENTS[element.nodeName] && BOOLEAN_ATTR[name.toLowerCase()]; } forEach({ data: JQLiteData, inheritedData: JQLiteInheritedData, scope: function(element) { return JQLiteInheritedData(element, '$scope'); }, controller: JQLiteController , injector: function(element) { return JQLiteInheritedData(element, '$injector'); }, removeAttr: function(element,name) { element.removeAttribute(name); }, hasClass: JQLiteHasClass, css: function(element, name, value) { name = camelCase(name); if (isDefined(value)) { element.style[name] = value; } else { var val; if (msie <= 8) { // this is some IE specific weirdness that jQuery 1.6.4 does not sure why val = element.currentStyle && element.currentStyle[name]; if (val === '') val = 'auto'; } val = val || element.style[name]; if (msie <= 8) { // jquery weirdness :-/ val = (val === '') ? undefined : val; } return val; } }, attr: function(element, name, value){ var lowercasedName = lowercase(name); if (BOOLEAN_ATTR[lowercasedName]) { if (isDefined(value)) { if (!!value) { element[name] = true; element.setAttribute(name, lowercasedName); } else { element[name] = false; element.removeAttribute(lowercasedName); } } else { return (element[name] || (element.attributes.getNamedItem(name)|| noop).specified) ? lowercasedName : undefined; } } else if (isDefined(value)) { element.setAttribute(name, value); } else if (element.getAttribute) { // the extra argument "2" is to get the right thing for a.href in IE, see jQuery code // some elements (e.g. Document) don't have get attribute, so return undefined var ret = element.getAttribute(name, 2); // normalize non-existing attributes to undefined (as jQuery) return ret === null ? undefined : ret; } }, prop: function(element, name, value) { if (isDefined(value)) { element[name] = value; } else { return element[name]; } }, text: extend((msie < 9) ? function(element, value) { if (element.nodeType == 1 /** Element */) { if (isUndefined(value)) return element.innerText; element.innerText = value; } else { if (isUndefined(value)) return element.nodeValue; element.nodeValue = value; } } : function(element, value) { if (isUndefined(value)) { return element.textContent; } element.textContent = value; }, {$dv:''}), val: function(element, value) { if (isUndefined(value)) { return element.value; } element.value = value; }, html: function(element, value) { if (isUndefined(value)) { return element.innerHTML; } for (var i = 0, childNodes = element.childNodes; i < childNodes.length; i++) { JQLiteDealoc(childNodes[i]); } element.innerHTML = value; } }, function(fn, name){ /** * Properties: writes return selection, reads return first value */ JQLite.prototype[name] = function(arg1, arg2) { var i, key; // JQLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it // in a way that survives minification. if (((fn.length == 2 && (fn !== JQLiteHasClass && fn !== JQLiteController)) ? arg1 : arg2) === undefined) { if (isObject(arg1)) { // we are a write, but the object properties are the key/values for(i=0; i < this.length; i++) { for (key in arg1) { fn(this[i], key, arg1[key]); } } // return self for chaining return this; } else { // we are a read, so read the first child. if (this.length) return fn(this[0], arg1, arg2); } } else { // we are a write, so apply to all children for(i=0; i < this.length; i++) { fn(this[i], arg1, arg2); } // return self for chaining return this; } return fn.$dv; }; }); function createEventHandler(element) { var eventHandler = function (event) { if (!event.preventDefault) { event.preventDefault = function() { event.returnValue = false; //ie }; } if (!event.stopPropagation) { event.stopPropagation = function() { event.cancelBubble = true; //ie }; } if (!event.target) { event.target = event.srcElement || document; } if (isUndefined(event.defaultPrevented)) { var prevent = event.preventDefault; event.preventDefault = function() { event.defaultPrevented = true; prevent.call(event); }; event.defaultPrevented = false; } event.isDefaultPrevented = function() { return event.defaultPrevented; }; forEach(eventHandler.fns, function(fn){ fn.call(element, event); }); // Remove monkey-patched methods (IE), // as they would cause memory leaks in IE8. if (msie < 8) { // IE7 does not allow to delete property on native object event.preventDefault = null; event.stopPropagation = null; event.isDefaultPrevented = null; } else { // It shouldn't affect normal browsers (native methods are defined on prototype). delete event.preventDefault; delete event.stopPropagation; delete event.isDefaultPrevented; } }; eventHandler.fns = []; return eventHandler; } ////////////////////////////////////////// // Functions iterating traversal. // These functions chain results into a single // selector. ////////////////////////////////////////// forEach({ removeData: JQLiteRemoveData, dealoc: JQLiteDealoc, bind: function bindFn(element, type, fn){ var bind = JQLiteData(element, 'bind'); if (!bind) JQLiteData(element, 'bind', bind = {}); forEach(type.split(' '), function(type){ var eventHandler = bind[type]; if (!eventHandler) { if (type == 'mouseenter' || type == 'mouseleave') { var mouseenter = bind.mouseenter = createEventHandler(element); var mouseleave = bind.mouseleave = createEventHandler(element); var counter = 0; bindFn(element, 'mouseover', function(event) { counter++; if (counter == 1) { event.type = 'mouseenter'; mouseenter(event); } }); bindFn(element, 'mouseout', function(event) { counter --; if (counter == 0) { event.type = 'mouseleave'; mouseleave(event); } }); eventHandler = bind[type]; } else { eventHandler = bind[type] = createEventHandler(element); addEventListenerFn(element, type, eventHandler); } } eventHandler.fns.push(fn); }); }, unbind: function(element, type, fn) { var bind = JQLiteData(element, 'bind'); if (!bind) return; //no listeners registered if (isUndefined(type)) { forEach(bind, function(eventHandler, type) { removeEventListenerFn(element, type, eventHandler); delete bind[type]; }); } else { if (isUndefined(fn)) { removeEventListenerFn(element, type, bind[type]); delete bind[type]; } else { arrayRemove(bind[type].fns, fn); } } }, replaceWith: function(element, replaceNode) { var index, parent = element.parentNode; JQLiteDealoc(element); forEach(new JQLite(replaceNode), function(node){ if (index) { parent.insertBefore(node, index.nextSibling); } else { parent.replaceChild(node, element); } index = node; }); }, children: function(element) { var children = []; forEach(element.childNodes, function(element){ if (element.nodeName != '#text') children.push(element); }); return children; }, contents: function(element) { return element.childNodes; }, append: function(element, node) { forEach(new JQLite(node), function(child){ if (element.nodeType === 1) element.appendChild(child); }); }, prepend: function(element, node) { if (element.nodeType === 1) { var index = element.firstChild; forEach(new JQLite(node), function(child){ if (index) { element.insertBefore(child, index); } else { element.appendChild(child); index = child; } }); } }, wrap: function(element, wrapNode) { wrapNode = jqLite(wrapNode)[0]; var parent = element.parentNode; if (parent) { parent.replaceChild(wrapNode, element); } wrapNode.appendChild(element); }, remove: function(element) { JQLiteDealoc(element); var parent = element.parentNode; if (parent) parent.removeChild(element); }, after: function(element, newElement) { var index = element, parent = element.parentNode; forEach(new JQLite(newElement), function(node){ parent.insertBefore(node, index.nextSibling); index = node; }); }, addClass: JQLiteAddClass, removeClass: JQLiteRemoveClass, toggleClass: function(element, selector, condition) { if (isUndefined(condition)) { condition = !JQLiteHasClass(element, selector); } (condition ? JQLiteAddClass : JQLiteRemoveClass)(element, selector); }, parent: function(element) { var parent = element.parentNode; return parent && parent.nodeType !== 11 ? parent : null; }, next: function(element) { return element.nextSibling; }, find: function(element, selector) { return element.getElementsByTagName(selector); }, clone: JQLiteClone }, function(fn, name){ /** * chaining functions */ JQLite.prototype[name] = function(arg1, arg2) { var value; for(var i=0; i < this.length; i++) { if (value == undefined) { value = fn(this[i], arg1, arg2); if (value !== undefined) { // any function which returns a value needs to be wrapped value = jqLite(value); } } else { JQLiteAddNodes(value, fn(this[i], arg1, arg2)); } } return value == undefined ? this : value; }; }); /** * Computes a hash of an 'obj'. * Hash of a: * string is string * number is number as string * object is either result of calling $$hashKey function on the object or uniquely generated id, * that is also assigned to the $$hashKey property of the object. * * @param obj * @returns {string} hash string such that the same input will have the same hash string. * The resulting string key is in 'type:hashKey' format. */ function hashKey(obj) { var objType = typeof obj, key; if (objType == 'object' && obj !== null) { if (typeof (key = obj.$$hashKey) == 'function') { // must invoke on object to keep the right this key = obj.$$hashKey(); } else if (key === undefined) { key = obj.$$hashKey = nextUid(); } } else { key = obj; } return objType + ':' + key; } /** * HashMap which can use objects as keys */ function HashMap(array){ forEach(array, this.put, this); } HashMap.prototype = { /** * Store key value pair * @param key key to store can be any type * @param value value to store can be any type */ put: function(key, value) { this[hashKey(key)] = value; }, /** * @param key * @returns the value for the key */ get: function(key) { return this[hashKey(key)]; }, /** * Remove the key/value pair * @param key */ remove: function(key) { var value = this[key = hashKey(key)]; delete this[key]; return value; } }; /** * A map where multiple values can be added to the same key such that they form a queue. * @returns {HashQueueMap} */ function HashQueueMap() {} HashQueueMap.prototype = { /** * Same as array push, but using an array as the value for the hash */ push: function(key, value) { var array = this[key = hashKey(key)]; if (!array) { this[key] = [value]; } else { array.push(value); } }, /** * Same as array shift, but using an array as the value for the hash */ shift: function(key) { var array = this[key = hashKey(key)]; if (array) { if (array.length == 1) { delete this[key]; return array[0]; } else { return array.shift(); } } } }; /** * @ngdoc function * @name angular.injector * @function * * @description * Creates an injector function that can be used for retrieving services as well as for * dependency injection (see {@link guide/dev_guide.di dependency injection}). * * @param {Array.<string|Function>} modules A list of module functions or their aliases. See * {@link angular.module}. The `ng` module must be explicitly added. * @returns {function()} Injector function. See {@link angular.module.AUTO.$injector $injector}. * * @example * Typical usage * <pre> * // create an injector * var $injector = angular.injector(['ng']); * * // use the injector to kick of your application * // use the type inference to auto inject arguments, or use implicit injection * $injector.invoke(function($rootScope, $compile, $document){ * $compile($document)($rootScope); * $rootScope.$digest(); * }); * </pre> */ /** * @ngdoc overview * @name angular.module.AUTO * @description * * Implicit module which gets automatically added to each {@link angular.module.AUTO.$injector $injector}. */ var FN_ARGS = /^function\s*[^\(]*\(\s*([^\)]*)\)/m; var FN_ARG_SPLIT = /,/; var FN_ARG = /^\s*(_?)(.+?)\1\s*$/; var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg; function inferInjectionArgs(fn) { assertArgFn(fn); if (!fn.$inject) { var args = fn.$inject = []; var fnText = fn.toString().replace(STRIP_COMMENTS, ''); var argDecl = fnText.match(FN_ARGS); forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg){ arg.replace(FN_ARG, function(all, underscore, name){ args.push(name); }); }); } return fn.$inject; } /////////////////////////////////////// /** * @ngdoc object * @name angular.module.AUTO.$injector * @function * * @description * * `$injector` is used to retrieve object instances as defined by * {@link angular.module.AUTO.$provide provider}, instantiate types, invoke methods, * and load modules. * * The following always holds true: * * <pre> * var $injector = angular.injector(); * expect($injector.get('$injector')).toBe($injector); * expect($injector.invoke(function($injector){ * return $injector; * }).toBe($injector); * </pre> * * # Injection Function Annotation * * JavaScript does not have annotations, and annotations are needed for dependency injection. The * following ways are all valid way of annotating function with injection arguments and are equivalent. * * <pre> * // inferred (only works if code not minified/obfuscated) * $inject.invoke(function(serviceA){}); * * // annotated * function explicit(serviceA) {}; * explicit.$inject = ['serviceA']; * $inject.invoke(explicit); * * // inline * $inject.invoke(['serviceA', function(serviceA){}]); * </pre> * * ## Inference * * In JavaScript calling `toString()` on a function returns the function definition. The definition can then be * parsed and the function arguments can be extracted. *NOTE:* This does not work with minfication, and obfuscation * tools since these tools change the argument names. * * ## `$inject` Annotation * By adding a `$inject` property onto a function the injection parameters can be specified. * * ## Inline * As an array of injection names, where the last item in the array is the function to call. */ /** * @ngdoc method * @name angular.module.AUTO.$injector#get * @methodOf angular.module.AUTO.$injector * * @description * Return an instance of the service. * * @param {string} name The name of the instance to retrieve. * @return {*} The instance. */ /** * @ngdoc method * @name angular.module.AUTO.$injector#invoke * @methodOf angular.module.AUTO.$injector * * @description * Invoke the method and supply the method arguments from the `$injector`. * * @param {!function} fn The function to invoke. The function arguments come form the function annotation. * @param {Object=} self The `this` for the invoked method. * @param {Object=} locals Optional object. If preset then any argument names are read from this object first, before * the `$injector` is consulted. * @return the value returned by the invoked `fn` function. */ /** * @ngdoc method * @name angular.module.AUTO.$injector#instantiate * @methodOf angular.module.AUTO.$injector * @description * Create a new instance of JS type. The method takes a constructor function invokes the new operator and supplies * all of the arguments to the constructor function as specified by the constructor annotation. * * @param {function} Type Annotated constructor function. * @param {Object=} locals Optional object. If preset then any argument names are read from this object first, before * the `$injector` is consulted. * @return new instance of `Type`. */ /** * @ngdoc object * @name angular.module.AUTO.$provide * * @description * * Use `$provide` to register new providers with the `$injector`. The providers are the factories for the instance. * The providers share the same name as the instance they create with the `Provider` suffixed to them. * * A provider is an object with a `$get()` method. The injector calls the `$get` method to create a new instance of * a service. The Provider can have additional methods which would allow for configuration of the provider. * * <pre> * function GreetProvider() { * var salutation = 'Hello'; * * this.salutation = function(text) { * salutation = text; * }; * * this.$get = function() { * return function (name) { * return salutation + ' ' + name + '!'; * }; * }; * } * * describe('Greeter', function(){ * * beforeEach(module(function($provide) { * $provide.provider('greet', GreetProvider); * }); * * it('should greet', inject(function(greet) { * expect(greet('angular')).toEqual('Hello angular!'); * })); * * it('should allow configuration of salutation', function() { * module(function(greetProvider) { * greetProvider.salutation('Ahoj'); * }); * inject(function(greet) { * expect(greet('angular')).toEqual('Ahoj angular!'); * }); * )}; * * }); * </pre> */ /** * @ngdoc method * @name angular.module.AUTO.$provide#provider * @methodOf angular.module.AUTO.$provide * @description * * Register a provider for a service. The providers can be retrieved and can have additional configuration methods. * * @param {string} name The name of the instance. NOTE: the provider will be available under `name + 'Provider'` key. * @param {(Object|function())} provider If the provider is: * * - `Object`: then it should have a `$get` method. The `$get` method will be invoked using * {@link angular.module.AUTO.$injector#invoke $injector.invoke()} when an instance needs to be created. * - `Constructor`: a new instance of the provider will be created using * {@link angular.module.AUTO.$injector#instantiate $injector.instantiate()}, then treated as `object`. * * @returns {Object} registered provider instance */ /** * @ngdoc method * @name angular.module.AUTO.$provide#factory * @methodOf angular.module.AUTO.$provide * @description * * A short hand for configuring services if only `$get` method is required. * * @param {string} name The name of the instance. * @param {function()} $getFn The $getFn for the instance creation. Internally this is a short hand for * `$provide.provider(name, {$get: $getFn})`. * @returns {Object} registered provider instance */ /** * @ngdoc method * @name angular.module.AUTO.$provide#service * @methodOf angular.module.AUTO.$provide * @description * * A short hand for registering service of given class. * * @param {string} name The name of the instance. * @param {Function} constructor A class (constructor function) that will be instantiated. * @returns {Object} registered provider instance */ /** * @ngdoc method * @name angular.module.AUTO.$provide#value * @methodOf angular.module.AUTO.$provide * @description * * A short hand for configuring services if the `$get` method is a constant. * * @param {string} name The name of the instance. * @param {*} value The value. * @returns {Object} registered provider instance */ /** * @ngdoc method * @name angular.module.AUTO.$provide#constant * @methodOf angular.module.AUTO.$provide * @description * * A constant value, but unlike {@link angular.module.AUTO.$provide#value value} it can be injected * into configuration function (other modules) and it is not interceptable by * {@link angular.module.AUTO.$provide#decorator decorator}. * * @param {string} name The name of the constant. * @param {*} value The constant value. * @returns {Object} registered instance */ /** * @ngdoc method * @name angular.module.AUTO.$provide#decorator * @methodOf angular.module.AUTO.$provide * @description * * Decoration of service, allows the decorator to intercept the service instance creation. The * returned instance may be the original instance, or a new instance which delegates to the * original instance. * * @param {string} name The name of the service to decorate. * @param {function()} decorator This function will be invoked when the service needs to be * instanciated. The function is called using the {@link angular.module.AUTO.$injector#invoke * injector.invoke} method and is therefore fully injectable. Local injection arguments: * * * `$delegate` - The original service instance, which can be monkey patched, configured, * decorated or delegated to. */ function createInjector(modulesToLoad) { var INSTANTIATING = {}, providerSuffix = 'Provider', path = [], loadedModules = new HashMap(), providerCache = { $provide: { provider: supportObject(provider), factory: supportObject(factory), service: supportObject(service), value: supportObject(value), constant: supportObject(constant), decorator: decorator } }, providerInjector = createInternalInjector(providerCache, function() { throw Error("Unknown provider: " + path.join(' <- ')); }), instanceCache = {}, instanceInjector = (instanceCache.$injector = createInternalInjector(instanceCache, function(servicename) { var provider = providerInjector.get(servicename + providerSuffix); return instanceInjector.invoke(provider.$get, provider); })); forEach(loadModules(modulesToLoad), function(fn) { instanceInjector.invoke(fn || noop); }); return instanceInjector; //////////////////////////////////// // $provider //////////////////////////////////// function supportObject(delegate) { return function(key, value) { if (isObject(key)) { forEach(key, reverseParams(delegate)); } else { return delegate(key, value); } } } function provider(name, provider_) { if (isFunction(provider_)) { provider_ = providerInjector.instantiate(provider_); } if (!provider_.$get) { throw Error('Provider ' + name + ' must define $get factory method.'); } return providerCache[name + providerSuffix] = provider_; } function factory(name, factoryFn) { return provider(name, { $get: factoryFn }); } function service(name, constructor) { return factory(name, ['$injector', function($injector) { return $injector.instantiate(constructor); }]); } function value(name, value) { return factory(name, valueFn(value)); } function constant(name, value) { providerCache[name] = value; instanceCache[name] = value; } function decorator(serviceName, decorFn) { var origProvider = providerInjector.get(serviceName + providerSuffix), orig$get = origProvider.$get; origProvider.$get = function() { var origInstance = instanceInjector.invoke(orig$get, origProvider); return instanceInjector.invoke(decorFn, null, {$delegate: origInstance}); }; } //////////////////////////////////// // Module Loading //////////////////////////////////// function loadModules(modulesToLoad){ var runBlocks = []; forEach(modulesToLoad, function(module) { if (loadedModules.get(module)) return; loadedModules.put(module, true); if (isString(module)) { var moduleFn = angularModule(module); runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks); try { for(var invokeQueue = moduleFn._invokeQueue, i = 0, ii = invokeQueue.length; i < ii; i++) { var invokeArgs = invokeQueue[i], provider = invokeArgs[0] == '$injector' ? providerInjector : providerInjector.get(invokeArgs[0]); provider[invokeArgs[1]].apply(provider, invokeArgs[2]); } } catch (e) { if (e.message) e.message += ' from ' + module; throw e; } } else if (isFunction(module)) { try { runBlocks.push(providerInjector.invoke(module)); } catch (e) { if (e.message) e.message += ' from ' + module; throw e; } } else if (isArray(module)) { try { runBlocks.push(providerInjector.invoke(module)); } catch (e) { if (e.message) e.message += ' from ' + String(module[module.length - 1]); throw e; } } else { assertArgFn(module, 'module'); } }); return runBlocks; } //////////////////////////////////// // internal Injector //////////////////////////////////// function createInternalInjector(cache, factory) { function getService(serviceName) { if (typeof serviceName !== 'string') { throw Error('Service name expected'); } if (cache.hasOwnProperty(serviceName)) { if (cache[serviceName] === INSTANTIATING) { throw Error('Circular dependency: ' + path.join(' <- ')); } return cache[serviceName]; } else { try { path.unshift(serviceName); cache[serviceName] = INSTANTIATING; return cache[serviceName] = factory(serviceName); } finally { path.shift(); } } } function invoke(fn, self, locals){ var args = [], $inject, length, key; if (typeof fn == 'function') { $inject = inferInjectionArgs(fn); length = $inject.length; } else { if (isArray(fn)) { $inject = fn; length = $inject.length - 1; fn = $inject[length]; } assertArgFn(fn, 'fn'); } for(var i = 0; i < length; i++) { key = $inject[i]; args.push( locals && locals.hasOwnProperty(key) ? locals[key] : getService(key, path) ); } // Performance optimization: http://jsperf.com/apply-vs-call-vs-invoke switch (self ? -1 : args.length) { case 0: return fn(); case 1: return fn(args[0]); case 2: return fn(args[0], args[1]); case 3: return fn(args[0], args[1], args[2]); case 4: return fn(args[0], args[1], args[2], args[3]); case 5: return fn(args[0], args[1], args[2], args[3], args[4]); case 6: return fn(args[0], args[1], args[2], args[3], args[4], args[5]); case 7: return fn(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); case 8: return fn(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7]); case 9: return fn(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8]); case 10: return fn(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8], args[9]); default: return fn.apply(self, args); } } function instantiate(Type, locals) { var Constructor = function() {}, instance, returnedValue; Constructor.prototype = (isArray(Type) ? Type[Type.length - 1] : Type).prototype; instance = new Constructor(); returnedValue = invoke(Type, instance, locals); return isObject(returnedValue) ? returnedValue : instance; } return { invoke: invoke, instantiate: instantiate, get: getService }; } } /** * @ngdoc function * @name angular.module.ng.$anchorScroll * @requires $window * @requires $location * @requires $rootScope * * @description * When called, it checks current value of `$location.hash()` and scroll to related element, * according to rules specified in * {@link http://dev.w3.org/html5/spec/Overview.html#the-indicated-part-of-the-document Html5 spec}. * * It also watches the `$location.hash()` and scroll whenever it changes to match any anchor. * This can be disabled by calling `$anchorScrollProvider.disableAutoScrolling()`. */ function $AnchorScrollProvider() { var autoScrollingEnabled = true; this.disableAutoScrolling = function() { autoScrollingEnabled = false; }; this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) { var document = $window.document; // helper function to get first anchor from a NodeList // can't use filter.filter, as it accepts only instances of Array // and IE can't convert NodeList to an array using [].slice // TODO(vojta): use filter if we change it to accept lists as well function getFirstAnchor(list) { var result = null; forEach(list, function(element) { if (!result && lowercase(element.nodeName) === 'a') result = element; }); return result; } function scroll() { var hash = $location.hash(), elm; // empty hash, scroll to the top of the page if (!hash) $window.scrollTo(0, 0); // element with given id else if ((elm = document.getElementById(hash))) elm.scrollIntoView(); // first anchor with given name :-D else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) elm.scrollIntoView(); // no element and hash == 'top', scroll to the top of the page else if (hash === 'top') $window.scrollTo(0, 0); } // does not scroll when user clicks on anchor link that is currently on // (no url change, no $locaiton.hash() change), browser native does scroll if (autoScrollingEnabled) { $rootScope.$watch(function() {return $location.hash();}, function() { $rootScope.$evalAsync(scroll); }); } return scroll; }]; } /** * @ngdoc object * @name angular.module.ng.$browser * @requires $log * @description * This object has two goals: * * - hide all the global state in the browser caused by the window object * - abstract away all the browser specific features and inconsistencies * * For tests we provide {@link angular.module.ngMock.$browser mock implementation} of the `$browser` * service, which can be used for convenient testing of the application without the interaction with * the real browser apis. */ /** * @param {object} window The global window object. * @param {object} document jQuery wrapped document. * @param {object} body jQuery wrapped document.body. * @param {function()} XHR XMLHttpRequest constructor. * @param {object} $log console.log or an object with the same interface. * @param {object} $sniffer $sniffer service */ function Browser(window, document, body, $log, $sniffer) { var self = this, rawDocument = document[0], location = window.location, history = window.history, setTimeout = window.setTimeout, clearTimeout = window.clearTimeout, pendingDeferIds = {}; self.isMock = false; var outstandingRequestCount = 0; var outstandingRequestCallbacks = []; // TODO(vojta): remove this temporary api self.$$completeOutstandingRequest = completeOutstandingRequest; self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; }; /** * Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks` * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed. */ function completeOutstandingRequest(fn) { try { fn.apply(null, sliceArgs(arguments, 1)); } finally { outstandingRequestCount--; if (outstandingRequestCount === 0) { while(outstandingRequestCallbacks.length) { try { outstandingRequestCallbacks.pop()(); } catch (e) { $log.error(e); } } } } } /** * @private * Note: this method is used only by scenario runner * TODO(vojta): prefix this method with $$ ? * @param {function()} callback Function that will be called when no outstanding request */ self.notifyWhenNoOutstandingRequests = function(callback) { // force browser to execute all pollFns - this is needed so that cookies and other pollers fire // at some deterministic time in respect to the test runner's actions. Leaving things up to the // regular poller would result in flaky tests. forEach(pollFns, function(pollFn){ pollFn(); }); if (outstandingRequestCount === 0) { callback(); } else { outstandingRequestCallbacks.push(callback); } }; ////////////////////////////////////////////////////////////// // Poll Watcher API ////////////////////////////////////////////////////////////// var pollFns = [], pollTimeout; /** * @ngdoc method * @name angular.module.ng.$browser#addPollFn * @methodOf angular.module.ng.$browser * * @param {function()} fn Poll function to add * * @description * Adds a function to the list of functions that poller periodically executes, * and starts polling if not started yet. * * @returns {function()} the added function */ self.addPollFn = function(fn) { if (isUndefined(pollTimeout)) startPoller(100, setTimeout); pollFns.push(fn); return fn; }; /** * @param {number} interval How often should browser call poll functions (ms) * @param {function()} setTimeout Reference to a real or fake `setTimeout` function. * * @description * Configures the poller to run in the specified intervals, using the specified * setTimeout fn and kicks it off. */ function startPoller(interval, setTimeout) { (function check() { forEach(pollFns, function(pollFn){ pollFn(); }); pollTimeout = setTimeout(check, interval); })(); } ////////////////////////////////////////////////////////////// // URL API ////////////////////////////////////////////////////////////// var lastBrowserUrl = location.href; /** * @ngdoc method * @name angular.module.ng.$browser#url * @methodOf angular.module.ng.$browser * * @description * GETTER: * Without any argument, this method just returns current value of location.href. * * SETTER: * With at least one argument, this method sets url to new value. * If html5 history api supported, pushState/replaceState is used, otherwise * location.href/location.replace is used. * Returns its own instance to allow chaining * * NOTE: this api is intended for use only by the $location service. Please use the * {@link angular.module.ng.$location $location service} to change url. * * @param {string} url New url (when used as setter) * @param {boolean=} replace Should new url replace current history record ? */ self.url = function(url, replace) { // setter if (url) { lastBrowserUrl = url; if ($sniffer.history) { if (replace) history.replaceState(null, '', url); else history.pushState(null, '', url); } else { if (replace) location.replace(url); else location.href = url; } return self; // getter } else { return location.href; } }; var urlChangeListeners = [], urlChangeInit = false; function fireUrlChange() { if (lastBrowserUrl == self.url()) return; lastBrowserUrl = self.url(); forEach(urlChangeListeners, function(listener) { listener(self.url()); }); } /** * @ngdoc method * @name angular.module.ng.$browser#onUrlChange * @methodOf angular.module.ng.$browser * @TODO(vojta): refactor to use node's syntax for events * * @description * Register callback function that will be called, when url changes. * * It's only called when the url is changed by outside of angular: * - user types different url into address bar * - user clicks on history (forward/back) button * - user clicks on a link * * It's not called when url is changed by $browser.url() method * * The listener gets called with new url as parameter. * * NOTE: this api is intended for use only by the $location service. Please use the * {@link angular.module.ng.$location $location service} to monitor url changes in angular apps. * * @param {function(string)} listener Listener function to be called when url changes. * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous. */ self.onUrlChange = function(callback) { if (!urlChangeInit) { // We listen on both (hashchange/popstate) when available, as some browsers (e.g. Opera) // don't fire popstate when user change the address bar and don't fire hashchange when url // changed by push/replaceState // html5 history api - popstate event if ($sniffer.history) jqLite(window).bind('popstate', fireUrlChange); // hashchange event if ($sniffer.hashchange) jqLite(window).bind('hashchange', fireUrlChange); // polling else self.addPollFn(fireUrlChange); urlChangeInit = true; } urlChangeListeners.push(callback); return callback; }; ////////////////////////////////////////////////////////////// // Cookies API ////////////////////////////////////////////////////////////// var lastCookies = {}; var lastCookieString = ''; /** * @ngdoc method * @name angular.module.ng.$browser#cookies * @methodOf angular.module.ng.$browser * * @param {string=} name Cookie name * @param {string=} value Cokkie value * * @description * The cookies method provides a 'private' low level access to browser cookies. * It is not meant to be used directly, use the $cookie service instead. * * The return values vary depending on the arguments that the method was called with as follows: * <ul> * <li>cookies() -> hash of all cookies, this is NOT a copy of the internal state, so do not modify it</li> * <li>cookies(name, value) -> set name to value, if value is undefined delete the cookie</li> * <li>cookies(name) -> the same as (name, undefined) == DELETES (no one calls it right now that way)</li> * </ul> * * @returns {Object} Hash of all cookies (if called without any parameter) */ self.cookies = function(name, value) { var cookieLength, cookieArray, cookie, i, index; if (name) { if (value === undefined) { rawDocument.cookie = escape(name) + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT"; } else { if (isString(value)) { rawDocument.cookie = escape(name) + '=' + escape(value); cookieLength = name.length + value.length + 1; if (cookieLength > 4096) { $log.warn("Cookie '"+ name +"' possibly not set or overflowed because it was too large ("+ cookieLength + " > 4096 bytes)!"); } if (lastCookies.length > 20) { $log.warn("Cookie '"+ name +"' possibly not set or overflowed because too many cookies " + "were already set (" + lastCookies.length + " > 20 )"); } } } } else { if (rawDocument.cookie !== lastCookieString) { lastCookieString = rawDocument.cookie; cookieArray = lastCookieString.split("; "); lastCookies = {}; for (i = 0; i < cookieArray.length; i++) { cookie = cookieArray[i]; index = cookie.indexOf('='); if (index > 0) { //ignore nameless cookies lastCookies[unescape(cookie.substring(0, index))] = unescape(cookie.substring(index + 1)); } } } return lastCookies; } }; /** * @ngdoc method * @name angular.module.ng.$browser#defer * @methodOf angular.module.ng.$browser * @param {function()} fn A function, who's execution should be defered. * @param {number=} [delay=0] of milliseconds to defer the function execution. * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`. * * @description * Executes a fn asynchroniously via `setTimeout(fn, delay)`. * * Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using * `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed * via `$browser.defer.flush()`. * */ self.defer = function(fn, delay) { var timeoutId; outstandingRequestCount++; timeoutId = setTimeout(function() { delete pendingDeferIds[timeoutId]; completeOutstandingRequest(fn); }, delay || 0); pendingDeferIds[timeoutId] = true; return timeoutId; }; /** * THIS DOC IS NOT VISIBLE because ngdocs can't process docs for foo#method.method * * @name angular.module.ng.$browser#defer.cancel * @methodOf angular.module.ng.$browser.defer * * @description * Cancels a defered task identified with `deferId`. * * @param {*} deferId Token returned by the `$browser.defer` function. * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfuly canceled. */ self.defer.cancel = function(deferId) { if (pendingDeferIds[deferId]) { delete pendingDeferIds[deferId]; clearTimeout(deferId); completeOutstandingRequest(noop); return true; } return false; }; ////////////////////////////////////////////////////////////// // Misc API ////////////////////////////////////////////////////////////// /** * Returns current <base href> * (always relative - without domain) * * @returns {string=} */ self.baseHref = function() { var href = document.find('base').attr('href'); return href ? href.replace(/^https?\:\/\/[^\/]*/, '') : href; }; } function $BrowserProvider(){ this.$get = ['$window', '$log', '$sniffer', '$document', function( $window, $log, $sniffer, $document){ return new Browser($window, $document, $document.find('body'), $log, $sniffer); }]; } /** * @ngdoc object * @name angular.module.ng.$cacheFactory * * @description * Factory that constructs cache objects. * * * @param {string} cacheId Name or id of the newly created cache. * @param {object=} options Options object that specifies the cache behavior. Properties: * * - `{number=}` `capacity` — turns the cache into LRU cache. * * @returns {object} Newly created cache object with the following set of methods: * * - `{object}` `info()` — Returns id, size, and options of cache. * - `{void}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache. * - `{{*}} `get({string} key) — Returns cached value for `key` or undefined for cache miss. * - `{void}` `remove({string} key) — Removes a key-value pair from the cache. * - `{void}` `removeAll() — Removes all cached values. * - `{void}` `destroy() — Removes references to this cache from $cacheFactory. * */ function $CacheFactoryProvider() { this.$get = function() { var caches = {}; function cacheFactory(cacheId, options) { if (cacheId in caches) { throw Error('cacheId ' + cacheId + ' taken'); } var size = 0, stats = extend({}, options, {id: cacheId}), data = {}, capacity = (options && options.capacity) || Number.MAX_VALUE, lruHash = {}, freshEnd = null, staleEnd = null; return caches[cacheId] = { put: function(key, value) { var lruEntry = lruHash[key] || (lruHash[key] = {key: key}); refresh(lruEntry); if (isUndefined(value)) return; if (!(key in data)) size++; data[key] = value; if (size > capacity) { this.remove(staleEnd.key); } }, get: function(key) { var lruEntry = lruHash[key]; if (!lruEntry) return; refresh(lruEntry); return data[key]; }, remove: function(key) { var lruEntry = lruHash[key]; if (lruEntry == freshEnd) freshEnd = lruEntry.p; if (lruEntry == staleEnd) staleEnd = lruEntry.n; link(lruEntry.n,lruEntry.p); delete lruHash[key]; delete data[key]; size--; }, removeAll: function() { data = {}; size = 0; lruHash = {}; freshEnd = staleEnd = null; }, destroy: function() { data = null; stats = null; lruHash = null; delete caches[cacheId]; }, info: function() { return extend({}, stats, {size: size}); } }; /** * makes the `entry` the freshEnd of the LRU linked list */ function refresh(entry) { if (entry != freshEnd) { if (!staleEnd) { staleEnd = entry; } else if (staleEnd == entry) { staleEnd = entry.n; } link(entry.n, entry.p); link(entry, freshEnd); freshEnd = entry; freshEnd.n = null; } } /** * bidirectionally links two entries of the LRU linked list */ function link(nextEntry, prevEntry) { if (nextEntry != prevEntry) { if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify } } } cacheFactory.info = function() { var info = {}; forEach(caches, function(cache, cacheId) { info[cacheId] = cache.info(); }); return info; }; cacheFactory.get = function(cacheId) { return caches[cacheId]; }; return cacheFactory; }; } function $TemplateCacheProvider() { this.$get = ['$cacheFactory', function($cacheFactory) { return $cacheFactory('templates'); }]; } /** * @ngdoc function * @name angular.module.ng.$compile * @function * * @description * Compiles a piece of HTML string or DOM into a template and produces a template function, which * can then be used to link {@link angular.module.ng.$rootScope.Scope scope} and the template together. * * The compilation is a process of walking the DOM tree and trying to match DOM elements to * {@link angular.module.ng.$compileProvider.directive directives}. For each match it * executes corresponding template function and collects the * instance functions into a single template function which is then returned. * * The template function can then be used once to produce the view or as it is the case with * {@link angular.module.ng.$compileProvider.directive.ngRepeat repeater} many-times, in which * case each call results in a view that is a DOM clone of the original template. * <doc:example module="compile"> <doc:source> <script> // declare a new module, and inject the $compileProvider angular.module('compile', [], function($compileProvider) { // configure new 'compile' directive by passing a directive // factory function. The factory function injects the '$compile' $compileProvider.directive('compile', function($compile) { // directive factory creates a link function return function(scope, element, attrs) { scope.$watch( function(scope) { // watch the 'compile' expression for changes return scope.$eval(attrs.compile); }, function(value) { // when the 'compile' expression changes // assign it into the current DOM element.html(value); // compile the new DOM and link it to the current // scope. // NOTE: we only compile .childNodes so that // we don't get into infinite loop compiling ourselves $compile(element.contents())(scope); } ); }; }) }); function Ctrl($scope) { $scope.name = 'Angular'; $scope.html = 'Hello {{name}}'; } </script> <div ng-controller="Ctrl"> <input ng-model="name"> <br> <textarea ng-model="html"></textarea> <br> <div compile="html"></div> </div> </doc:source> <doc:scenario> it('should auto compile', function() { expect(element('div[compile]').text()).toBe('Hello Angular'); input('html').enter('{{name}}!'); expect(element('div[compile]').text()).toBe('Angular!'); }); </doc:scenario> </doc:example> * * * @param {string|DOMElement} element Element or HTML string to compile into a template function. * @param {function(angular.Scope[, cloneAttachFn]} transclude function available to directives. * @param {number} maxPriority only apply directives lower then given priority (Only effects the * root element(s), not their children) * @returns {function(scope[, cloneAttachFn])} a link function which is used to bind template * (a DOM element/tree) to a scope. Where: * * * `scope` - A {@link angular.module.ng.$rootScope.Scope Scope} to bind to. * * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the * `template` and call the `cloneAttachFn` function allowing the caller to attach the * cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is * called as: <br> `cloneAttachFn(clonedElement, scope)` where: * * * `clonedElement` - is a clone of the original `element` passed into the compiler. * * `scope` - is the current scope with which the linking function is working with. * * Calling the linking function returns the element of the template. It is either the original element * passed in, or the clone of the element if the `cloneAttachFn` is provided. * * After linking the view is not updated until after a call to $digest which typically is done by * Angular automatically. * * If you need access to the bound view, there are two ways to do it: * * - If you are not asking the linking function to clone the template, create the DOM element(s) * before you send them to the compiler and keep this reference around. * <pre> * var element = $compile('<p>{{total}}</p>')(scope); * </pre> * * - if on the other hand, you need the element to be cloned, the view reference from the original * example would not point to the clone, but rather to the original template that was cloned. In * this case, you can access the clone via the cloneAttachFn: * <pre> * var templateHTML = angular.element('<p>{{total}}</p>'), * scope = ....; * * var clonedElement = $compile(templateHTML)(scope, function(clonedElement, scope) { * //attach the clone to DOM document at the right place * }); * * //now we have reference to the cloned DOM via `clone` * </pre> * * * For information on how the compiler works, see the * {@link guide/dev_guide.compiler Angular HTML Compiler} section of the Developer Guide. */ $CompileProvider.$inject = ['$provide']; function $CompileProvider($provide) { var hasDirectives = {}, Suffix = 'Directive', COMMENT_DIRECTIVE_REGEXP = /^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/, CLASS_DIRECTIVE_REGEXP = /(([\d\w\-_]+)(?:\:([^;]+))?;?)/, CONTENT_REGEXP = /\<\<content\>\>/i, HAS_ROOT_ELEMENT = /^\<[\s\S]*\>$/; this.directive = function registerDirective(name, directiveFactory) { if (isString(name)) { assertArg(directiveFactory, 'directive'); if (!hasDirectives.hasOwnProperty(name)) { hasDirectives[name] = []; $provide.factory(name + Suffix, ['$injector', '$exceptionHandler', function($injector, $exceptionHandler) { var directives = []; forEach(hasDirectives[name], function(directiveFactory) { try { var directive = $injector.invoke(directiveFactory); if (isFunction(directive)) { directive = { compile: valueFn(directive) }; } else if (!directive.compile && directive.link) { directive.compile = valueFn(directive.link); } directive.priority = directive.priority || 0; directive.name = directive.name || name; directive.require = directive.require || (directive.controller && directive.name); directive.restrict = directive.restrict || 'A'; directives.push(directive); } catch (e) { $exceptionHandler(e); } }); return directives; }]); } hasDirectives[name].push(directiveFactory); } else { forEach(name, reverseParams(registerDirective)); } return this; }; this.$get = [ '$injector', '$interpolate', '$exceptionHandler', '$http', '$templateCache', '$parse', '$controller', function($injector, $interpolate, $exceptionHandler, $http, $templateCache, $parse, $controller) { var LOCAL_MODE = { attribute: function(localName, mode, parentScope, scope, attr) { scope[localName] = attr[localName]; }, evaluate: function(localName, mode, parentScope, scope, attr) { scope[localName] = parentScope.$eval(attr[localName]); }, bind: function(localName, mode, parentScope, scope, attr) { var getter = $interpolate(attr[localName]); scope.$watch( function() { return getter(parentScope); }, function(v) { scope[localName] = v; } ); }, accessor: function(localName, mode, parentScope, scope, attr) { var getter = noop, setter = noop, exp = attr[localName]; if (exp) { getter = $parse(exp); setter = getter.assign || function() { throw Error("Expression '" + exp + "' not assignable."); }; } scope[localName] = function(value) { return arguments.length ? setter(parentScope, value) : getter(parentScope); }; }, expression: function(localName, mode, parentScope, scope, attr) { scope[localName] = function(locals) { $parse(attr[localName])(parentScope, locals); }; } }; var Attributes = function(element, attr) { this.$$element = element; this.$$observers = {}; this.$attr = attr || {}; }; Attributes.prototype = { $normalize: directiveNormalize, /** * Set a normalized attribute on the element in a way such that all directives * can share the attribute. This function properly handles boolean attributes. * @param {string} key Normalized key. (ie ngAttribute) * @param {string|boolean} value The value to set. If `null` attribute will be deleted. * @param {boolean=} writeAttr If false, does not write the value to DOM element attribute. * Defaults to true. * @param {string=} attrName Optional none normalized name. Defaults to key. */ $set: function(key, value, writeAttr, attrName) { var booleanKey = isBooleanAttr(this.$$element[0], key.toLowerCase()); if (booleanKey) { this.$$element.prop(key, value); attrName = booleanKey; } this[key] = value; // translate normalized key to actual key if (attrName) { this.$attr[key] = attrName; } else { attrName = this.$attr[key]; if (!attrName) { this.$attr[key] = attrName = snake_case(key, '-'); } } if (writeAttr !== false) { if (value === null || value === undefined) { this.$$element.removeAttr(attrName); } else { this.$$element.attr(attrName, value); } } // fire observers forEach(this.$$observers[key], function(fn) { try { fn(value); } catch (e) { $exceptionHandler(e); } }); }, /** * Observe an interpolated attribute. * The observer will never be called, if given attribute is not interpolated. * * @param {string} key Normalized key. (ie ngAttribute) . * @param {function(*)} fn Function that will be called whenever the attribute value changes. */ $observe: function(key, fn) { // keep only observers for interpolated attrs if (this.$$observers[key]) { this.$$observers[key].push(fn); } } }; return compile; //================================ function compile(templateElement, transcludeFn, maxPriority) { if (!(templateElement instanceof jqLite)) { // jquery always rewraps, where as we need to preserve the original selector so that we can modify it. templateElement = jqLite(templateElement); } // We can not compile top level text elements since text nodes can be merged and we will // not be able to attach scope data to them, so we will wrap them in <span> forEach(templateElement, function(node, index){ if (node.nodeType == 3 /* text node */) { templateElement[index] = jqLite(node).wrap('<span>').parent()[0]; } }); var linkingFn = compileNodes(templateElement, transcludeFn, templateElement, maxPriority); return function(scope, cloneConnectFn){ assertArg(scope, 'scope'); // important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart // and sometimes changes the structure of the DOM. var element = cloneConnectFn ? JQLitePrototype.clone.call(templateElement) // IMPORTANT!!! : templateElement; safeAddClass(element.data('$scope', scope), 'ng-scope'); if (cloneConnectFn) cloneConnectFn(element, scope); if (linkingFn) linkingFn(scope, element, element); return element; }; } function wrongMode(localName, mode) { throw Error("Unsupported '" + mode + "' for '" + localName + "'."); } function safeAddClass(element, className) { try { element.addClass(className); } catch(e) { // ignore, since it means that we are trying to set class on // SVG element, where class name is read-only. } } /** * Compile function matches each node in nodeList against the directives. Once all directives * for a particular node are collected their compile functions are executed. The compile * functions return values - the linking functions - are combined into a composite linking * function, which is the a linking function for the node. * * @param {NodeList} nodeList an array of nodes to compile * @param {function(angular.Scope[, cloneAttachFn]} transcludeFn A linking function, where the * scope argument is auto-generated to the new child of the transcluded parent scope. * @param {DOMElement=} rootElement If the nodeList is the root of the compilation tree then the * rootElement must be set the jqLite collection of the compile root. This is * needed so that the jqLite collection items can be replaced with widgets. * @param {number=} max directive priority * @returns {?function} A composite linking function of all of the matched directives or null. */ function compileNodes(nodeList, transcludeFn, rootElement, maxPriority) { var linkingFns = [], directiveLinkingFn, childLinkingFn, directives, attrs, linkingFnFound; for(var i = 0; i < nodeList.length; i++) { attrs = new Attributes(); // we must always refer to nodeList[i] since the nodes can be replaced underneath us. directives = collectDirectives(nodeList[i], [], attrs, maxPriority); directiveLinkingFn = (directives.length) ? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, rootElement) : null; childLinkingFn = (directiveLinkingFn && directiveLinkingFn.terminal) ? null : compileNodes(nodeList[i].childNodes, directiveLinkingFn ? directiveLinkingFn.transclude : transcludeFn); linkingFns.push(directiveLinkingFn); linkingFns.push(childLinkingFn); linkingFnFound = (linkingFnFound || directiveLinkingFn || childLinkingFn); } // return a linking function if we have found anything, null otherwise return linkingFnFound ? linkingFn : null; /* nodesetLinkingFn */ function linkingFn(scope, nodeList, rootElement, boundTranscludeFn) { var childLinkingFn, directiveLinkingFn, node, childScope, childTransclusionFn; for(var i=0, n=0, ii=linkingFns.length; i<ii; n++) { node = nodeList[n]; directiveLinkingFn = /* directiveLinkingFn */ linkingFns[i++]; childLinkingFn = /* nodesetLinkingFn */ linkingFns[i++]; if (directiveLinkingFn) { if (directiveLinkingFn.scope) { childScope = scope.$new(isObject(directiveLinkingFn.scope)); jqLite(node).data('$scope', childScope); } else { childScope = scope; } childTransclusionFn = directiveLinkingFn.transclude; if (childTransclusionFn || (!boundTranscludeFn && transcludeFn)) { directiveLinkingFn(childLinkingFn, childScope, node, rootElement, (function(transcludeFn) { return function(cloneFn) { var transcludeScope = scope.$new(); return transcludeFn(transcludeScope, cloneFn). bind('$destroy', bind(transcludeScope, transcludeScope.$destroy)); }; })(childTransclusionFn || transcludeFn) ); } else { directiveLinkingFn(childLinkingFn, childScope, node, undefined, boundTranscludeFn); } } else if (childLinkingFn) { childLinkingFn(scope, node.childNodes, undefined, boundTranscludeFn); } } } } /** * Looks for directives on the given node ands them to the directive collection which is sorted. * * @param node node to search * @param directives an array to which the directives are added to. This array is sorted before * the function returns. * @param attrs the shared attrs object which is used to populate the normalized attributes. * @param {number=} max directive priority */ function collectDirectives(node, directives, attrs, maxPriority) { var nodeType = node.nodeType, attrsMap = attrs.$attr, match, className; switch(nodeType) { case 1: /* Element */ // use the node name: <directive> addDirective(directives, directiveNormalize(nodeName_(node).toLowerCase()), 'E', maxPriority); // iterate over the attributes for (var attr, name, nName, value, nAttrs = node.attributes, j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) { attr = nAttrs[j]; if (attr.specified) { name = attr.name; nName = directiveNormalize(name.toLowerCase()); attrsMap[nName] = name; attrs[nName] = value = trim((msie && name == 'href') ? decodeURIComponent(node.getAttribute(name, 2)) : attr.value); if (isBooleanAttr(node, nName)) { attrs[nName] = true; // presence means true } addAttrInterpolateDirective(node, directives, value, nName); addDirective(directives, nName, 'A', maxPriority); } } // use class as directive className = node.className; if (isString(className)) { while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) { nName = directiveNormalize(match[2]); if (addDirective(directives, nName, 'C', maxPriority)) { attrs[nName] = trim(match[3]); } className = className.substr(match.index + match[0].length); } } break; case 3: /* Text Node */ addTextInterpolateDirective(directives, node.nodeValue); break; case 8: /* Comment */ try { match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue); if (match) { nName = directiveNormalize(match[1]); if (addDirective(directives, nName, 'M', maxPriority)) { attrs[nName] = trim(match[2]); } } } catch (e) { // turns out that under some circumstances IE9 throws errors when one attempts to read comment's node value. // Just ignore it and continue. (Can't seem to reproduce in test case.) } break; } directives.sort(byPriority); return directives; } /** * Once the directives have been collected their compile functions is executed. This method * is responsible for inlining directive templates as well as terminating the application * of the directives if the terminal directive has been reached.. * * @param {Array} directives Array of collected directives to execute their compile function. * this needs to be pre-sorted by priority order. * @param {Node} templateNode The raw DOM node to apply the compile functions to * @param {Object} templateAttrs The shared attribute function * @param {function(angular.Scope[, cloneAttachFn]} transcludeFn A linking function, where the * scope argument is auto-generated to the new child of the transcluded parent scope. * @param {DOMElement} rootElement If we are working on the root of the compile tree then this * argument has the root jqLite array so that we can replace widgets on it. * @returns linkingFn */ function applyDirectivesToNode(directives, templateNode, templateAttrs, transcludeFn, rootElement) { var terminalPriority = -Number.MAX_VALUE, preLinkingFns = [], postLinkingFns = [], newScopeDirective = null, newIsolatedScopeDirective = null, templateDirective = null, delayedLinkingFn = null, element = templateAttrs.$$element = jqLite(templateNode), directive, directiveName, template, transcludeDirective, childTranscludeFn = transcludeFn, controllerDirectives, linkingFn, directiveValue; // executes all directives on the current element for(var i = 0, ii = directives.length; i < ii; i++) { directive = directives[i]; template = undefined; if (terminalPriority > directive.priority) { break; // prevent further processing of directives } if (directiveValue = directive.scope) { assertNoDuplicate('isolated scope', newIsolatedScopeDirective, directive, element); if (isObject(directiveValue)) { safeAddClass(element, 'ng-isolate-scope'); newIsolatedScopeDirective = directive; } safeAddClass(element, 'ng-scope'); newScopeDirective = newScopeDirective || directive; } directiveName = directive.name; if (directiveValue = directive.controller) { controllerDirectives = controllerDirectives || {}; assertNoDuplicate("'" + directiveName + "' controller", controllerDirectives[directiveName], directive, element); controllerDirectives[directiveName] = directive; } if (directiveValue = directive.transclude) { assertNoDuplicate('transclusion', transcludeDirective, directive, element); transcludeDirective = directive; terminalPriority = directive.priority; if (directiveValue == 'element') { template = jqLite(templateNode); templateNode = (element = templateAttrs.$$element = jqLite( '<!-- ' + directiveName + ': ' + templateAttrs[directiveName] + ' -->'))[0]; replaceWith(rootElement, jqLite(template[0]), templateNode); childTranscludeFn = compile(template, transcludeFn, terminalPriority); } else { template = jqLite(JQLiteClone(templateNode)); element.html(''); // clear contents childTranscludeFn = compile(template.contents(), transcludeFn); } } if (directiveValue = directive.template) { assertNoDuplicate('template', templateDirective, directive, element); templateDirective = directive; // include the contents of the original element into the template and replace the element var content = directiveValue.replace(CONTENT_REGEXP, element.html()); templateNode = jqLite(content)[0]; if (directive.replace) { replaceWith(rootElement, element, templateNode); var newTemplateAttrs = {$attr: {}}; // combine directives from the original node and from the template: // - take the array of directives for this element // - split it into two parts, those that were already applied and those that weren't // - collect directives from the template, add them to the second group and sort them // - append the second group with new directives to the first group directives = directives.concat( collectDirectives( templateNode, directives.splice(i + 1, directives.length - (i + 1)), newTemplateAttrs ) ); mergeTemplateAttributes(templateAttrs, newTemplateAttrs); ii = directives.length; } else { element.html(content); } } if (directive.templateUrl) { assertNoDuplicate('template', templateDirective, directive, element); templateDirective = directive; delayedLinkingFn = compileTemplateUrl(directives.splice(i, directives.length - i), /* directiveLinkingFn */ compositeLinkFn, element, templateAttrs, rootElement, directive.replace, childTranscludeFn); ii = directives.length; } else if (directive.compile) { try { linkingFn = directive.compile(element, templateAttrs, childTranscludeFn); if (isFunction(linkingFn)) { addLinkingFns(null, linkingFn); } else if (linkingFn) { addLinkingFns(linkingFn.pre, linkingFn.post); } } catch (e) { $exceptionHandler(e, startingTag(element)); } } if (directive.terminal) { compositeLinkFn.terminal = true; terminalPriority = Math.max(terminalPriority, directive.priority); } } linkingFn = delayedLinkingFn || compositeLinkFn; linkingFn.scope = newScopeDirective && newScopeDirective.scope; linkingFn.transclude = transcludeDirective && childTranscludeFn; // if we have templateUrl, then we have to delay linking return linkingFn; //////////////////// function addLinkingFns(pre, post) { if (pre) { pre.require = directive.require; preLinkingFns.push(pre); } if (post) { post.require = directive.require; postLinkingFns.push(post); } } function getControllers(require, element) { var value, retrievalMethod = 'data', optional = false; if (isString(require)) { while((value = require.charAt(0)) == '^' || value == '?') { require = require.substr(1); if (value == '^') { retrievalMethod = 'inheritedData'; } optional = optional || value == '?'; } value = element[retrievalMethod]('$' + require + 'Controller'); if (!value && !optional) { throw Error("No controller: " + require); } return value; } else if (isArray(require)) { value = []; forEach(require, function(require) { value.push(getControllers(require, element)); }); } return value; } /* directiveLinkingFn */ function compositeLinkFn(/* nodesetLinkingFn */ childLinkingFn, scope, linkNode, rootElement, boundTranscludeFn) { var attrs, element, i, ii, linkingFn, controller; if (templateNode === linkNode) { attrs = templateAttrs; } else { attrs = shallowCopy(templateAttrs, new Attributes(jqLite(linkNode), templateAttrs.$attr)); } element = attrs.$$element; if (newScopeDirective && isObject(newScopeDirective.scope)) { forEach(newScopeDirective.scope, function(mode, name) { (LOCAL_MODE[mode] || wrongMode)(name, mode, scope.$parent || scope, scope, attrs); }); } if (controllerDirectives) { forEach(controllerDirectives, function(directive) { var locals = { $scope: scope, $element: element, $attrs: attrs, $transclude: boundTranscludeFn }; forEach(directive.inject || {}, function(mode, name) { (LOCAL_MODE[mode] || wrongMode)(name, mode, newScopeDirective ? scope.$parent || scope : scope, locals, attrs); }); controller = directive.controller; if (controller == '@') { controller = attrs[directive.name]; } element.data( '$' + directive.name + 'Controller', $controller(controller, locals)); }); } // PRELINKING for(i = 0, ii = preLinkingFns.length; i < ii; i++) { try { linkingFn = preLinkingFns[i]; linkingFn(scope, element, attrs, linkingFn.require && getControllers(linkingFn.require, element)); } catch (e) { $exceptionHandler(e, startingTag(element)); } } // RECURSION childLinkingFn && childLinkingFn(scope, linkNode.childNodes, undefined, boundTranscludeFn); // POSTLINKING for(i = 0, ii = postLinkingFns.length; i < ii; i++) { try { linkingFn = postLinkingFns[i]; linkingFn(scope, element, attrs, linkingFn.require && getControllers(linkingFn.require, element)); } catch (e) { $exceptionHandler(e, startingTag(element)); } } } } /** * looks up the directive and decorates it with exception handling and proper parameters. We * call this the boundDirective. * * @param {string} name name of the directive to look up. * @param {string} location The directive must be found in specific format. * String containing any of theses characters: * * * `E`: element name * * `A': attribute * * `C`: class * * `M`: comment * @returns true if directive was added. */ function addDirective(tDirectives, name, location, maxPriority) { var match = false; if (hasDirectives.hasOwnProperty(name)) { for(var directive, directives = $injector.get(name + Suffix), i=0, ii = directives.length; i<ii; i++) { try { directive = directives[i]; if ( (maxPriority === undefined || maxPriority > directive.priority) && directive.restrict.indexOf(location) != -1) { tDirectives.push(directive); match = true; } } catch(e) { $exceptionHandler(e); } } } return match; } /** * When the element is replaced with HTML template then the new attributes * on the template need to be merged with the existing attributes in the DOM. * The desired effect is to have both of the attributes present. * * @param {object} dst destination attributes (original DOM) * @param {object} src source attributes (from the directive template) */ function mergeTemplateAttributes(dst, src) { var srcAttr = src.$attr, dstAttr = dst.$attr, element = dst.$$element; // reapply the old attributes to the new element forEach(dst, function(value, key) { if (key.charAt(0) != '$') { if (src[key]) { value += (key === 'style' ? ';' : ' ') + src[key]; } dst.$set(key, value, true, srcAttr[key]); } }); // copy the new attributes on the old attrs object forEach(src, function(value, key) { if (key == 'class') { safeAddClass(element, value); } else if (key == 'style') { element.attr('style', element.attr('style') + ';' + value); } else if (key.charAt(0) != '$' && !dst.hasOwnProperty(key)) { dst[key] = value; dstAttr[key] = srcAttr[key]; } }); } function compileTemplateUrl(directives, /* directiveLinkingFn */ beforeWidgetLinkFn, tElement, tAttrs, rootElement, replace, transcludeFn) { var linkQueue = [], afterWidgetLinkFn, afterWidgetChildrenLinkFn, originalWidgetNode = tElement[0], asyncWidgetDirective = directives.shift(), // The fact that we have to copy and patch the directive seems wrong! syncWidgetDirective = extend({}, asyncWidgetDirective, {templateUrl:null, transclude:null}), html = tElement.html(); tElement.html(''); $http.get(asyncWidgetDirective.templateUrl, {cache: $templateCache}). success(function(content) { content = trim(content).replace(CONTENT_REGEXP, html); if (replace && !content.match(HAS_ROOT_ELEMENT)) { throw Error('Template must have exactly one root element: ' + content); } var templateNode, tempTemplateAttrs; if (replace) { tempTemplateAttrs = {$attr: {}}; templateNode = jqLite(content)[0]; replaceWith(rootElement, tElement, templateNode); collectDirectives(tElement[0], directives, tempTemplateAttrs); mergeTemplateAttributes(tAttrs, tempTemplateAttrs); } else { templateNode = tElement[0]; tElement.html(content); } directives.unshift(syncWidgetDirective); afterWidgetLinkFn = /* directiveLinkingFn */ applyDirectivesToNode(directives, tElement, tAttrs, transcludeFn); afterWidgetChildrenLinkFn = /* nodesetLinkingFn */ compileNodes(tElement.contents(), transcludeFn); while(linkQueue.length) { var controller = linkQueue.pop(), linkRootElement = linkQueue.pop(), cLinkNode = linkQueue.pop(), scope = linkQueue.pop(), node = templateNode; if (cLinkNode !== originalWidgetNode) { // it was cloned therefore we have to clone as well. node = JQLiteClone(templateNode); replaceWith(linkRootElement, jqLite(cLinkNode), node); } afterWidgetLinkFn(function() { beforeWidgetLinkFn(afterWidgetChildrenLinkFn, scope, node, rootElement, controller); }, scope, node, rootElement, controller); } linkQueue = null; }). error(function(response, code, headers, config) { throw Error('Failed to load template: ' + config.url); }); return /* directiveLinkingFn */ function(ignoreChildLinkingFn, scope, node, rootElement, controller) { if (linkQueue) { linkQueue.push(scope); linkQueue.push(node); linkQueue.push(rootElement); linkQueue.push(controller); } else { afterWidgetLinkFn(function() { beforeWidgetLinkFn(afterWidgetChildrenLinkFn, scope, node, rootElement, controller); }, scope, node, rootElement, controller); } }; } /** * Sorting function for bound directives. */ function byPriority(a, b) { return b.priority - a.priority; } function assertNoDuplicate(what, previousDirective, directive, element) { if (previousDirective) { throw Error('Multiple directives [' + previousDirective.name + ', ' + directive.name + '] asking for ' + what + ' on: ' + startingTag(element)); } } function addTextInterpolateDirective(directives, text) { var interpolateFn = $interpolate(text, true); if (interpolateFn) { directives.push({ priority: 0, compile: valueFn(function(scope, node) { var parent = node.parent(), bindings = parent.data('$binding') || []; bindings.push(interpolateFn); safeAddClass(parent.data('$binding', bindings), 'ng-binding'); scope.$watch(interpolateFn, function(value) { node[0].nodeValue = value; }); }) }); } } function addAttrInterpolateDirective(node, directives, value, name) { var interpolateFn = $interpolate(value, true); // no interpolation found -> ignore if (!interpolateFn) return; directives.push({ priority: 100, compile: valueFn(function(scope, element, attr) { if (name === 'class') { // we need to interpolate classes again, in the case the element was replaced // and therefore the two class attrs got merged - we want to interpolate the result interpolateFn = $interpolate(attr[name], true); } // we define observers array only for interpolated attrs // and ignore observers for non interpolated attrs to save some memory attr.$$observers[name] = []; attr[name] = undefined; scope.$watch(interpolateFn, function(value) { attr.$set(name, value); }); }) }); } /** * This is a special jqLite.replaceWith, which can replace items which * have no parents, provided that the containing jqLite collection is provided. * * @param {JqLite=} rootElement The root of the compile tree. Used so that we can replace nodes * in the root of the tree. * @param {JqLite} element The jqLite element which we are going to replace. We keep the shell, * but replace its DOM node reference. * @param {Node} newNode The new DOM node. */ function replaceWith(rootElement, element, newNode) { var oldNode = element[0], parent = oldNode.parentNode, i, ii; if (rootElement) { for(i = 0, ii = rootElement.length; i<ii; i++) { if (rootElement[i] == oldNode) { rootElement[i] = newNode; } } } if (parent) { parent.replaceChild(newNode, oldNode); } element[0] = newNode; } }]; } var PREFIX_REGEXP = /^(x[\:\-_]|data[\:\-_])/i; /** * Converts all accepted directives format into proper directive name. * All of these will become 'myDirective': * my:DiRective * my-directive * x-my-directive * data-my:directive * * Also there is special case for Moz prefix starting with upper case letter. * @param name Name to normalize */ function directiveNormalize(name) { return camelCase(name.replace(PREFIX_REGEXP, '')); } /** * Closure compiler type information */ function nodesetLinkingFn( /* angular.Scope */ scope, /* NodeList */ nodeList, /* Element */ rootElement, /* function(Function) */ boundTranscludeFn ){} function directiveLinkingFn( /* nodesetLinkingFn */ nodesetLinkingFn, /* angular.Scope */ scope, /* Node */ node, /* Element */ rootElement, /* function(Function) */ boundTranscludeFn ){} /** * @ngdoc object * @name angular.module.ng.$controllerProvider * @description * The {@link angular.module.ng.$controller $controller service} is used by Angular to create new * controllers. * * This provider allows controller registration via the * {@link angular.module.ng.$controllerProvider#register register} method. */ function $ControllerProvider() { var controllers = {}; /** * @ngdoc function * @name angular.module.ng.$controllerProvider#register * @methodOf angular.module.ng.$controllerProvider * @param {string} name Controller name * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI * annotations in the array notation). */ this.register = function(name, constructor) { controllers[name] = constructor; }; this.$get = ['$injector', '$window', function($injector, $window) { /** * @ngdoc function * @name angular.module.ng.$controller * @requires $injector * * @param {Function|string} constructor If called with a function then it's considered to be the * controller constructor function. Otherwise it's considered to be a string which is used * to retrieve the controller constructor using the following steps: * * * check if a controller with given name is registered via `$controllerProvider` * * check if evaluating the string on the current scope returns a constructor * * check `window[constructor]` on the global `window` object * * @param {Object} locals Injection locals for Controller. * @return {Object} Instance of given controller. * * @description * `$controller` service is responsible for instantiating controllers. * * It's just simple call to {@link angular.module.AUTO.$injector $injector}, but extracted into * a service, so that one can override this service with {@link https://gist.github.com/1649788 * BC version}. */ return function(constructor, locals) { if(isString(constructor)) { var name = constructor; constructor = controllers.hasOwnProperty(name) ? controllers[name] : getter(locals.$scope, name, true) || getter($window, name, true); assertArgFn(constructor, name, true); } return $injector.instantiate(constructor, locals); }; }]; } /** * @ngdoc function * @name angular.module.ng.$defer * @requires $browser * * @description * Delegates to {@link angular.module.ng.$browser#defer $browser.defer}, but wraps the `fn` function * into a try/catch block and delegates any exceptions to * {@link angular.module.ng.$exceptionHandler $exceptionHandler} service. * * In tests you can use `$browser.defer.flush()` to flush the queue of deferred functions. * * @param {function()} fn A function, who's execution should be deferred. * @param {number=} [delay=0] of milliseconds to defer the function execution. * @returns {*} DeferId that can be used to cancel the task via `$defer.cancel()`. */ /** * @ngdoc function * @name angular.module.ng.$defer#cancel * @methodOf angular.module.ng.$defer * * @description * Cancels a defered task identified with `deferId`. * * @param {*} deferId Token returned by the `$defer` function. * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfuly canceled. */ function $DeferProvider(){ this.$get = ['$rootScope', '$browser', function($rootScope, $browser) { function defer(fn, delay) { return $browser.defer(function() { $rootScope.$apply(fn); }, delay); } defer.cancel = function(deferId) { return $browser.defer.cancel(deferId); }; return defer; }]; } /** * @ngdoc object * @name angular.module.ng.$document * @requires $window * * @description * A {@link angular.element jQuery (lite)}-wrapped reference to the browser's `window.document` * element. */ function $DocumentProvider(){ this.$get = ['$window', function(window){ return jqLite(window.document); }]; } /** * @ngdoc function * @name angular.module.ng.$exceptionHandler * @requires $log * * @description * Any uncaught exception in angular expressions is delegated to this service. * The default implementation simply delegates to `$log.error` which logs it into * the browser console. * * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by * {@link angular.module.ngMock.$exceptionHandler mock $exceptionHandler} * * @param {Error} exception Exception associated with the error. * @param {string=} cause optional information about the context in which * the error was thrown. */ function $ExceptionHandlerProvider() { this.$get = ['$log', function($log){ return function(exception, cause) { $log.error.apply($log, arguments); }; }]; } /** * @ngdoc function * @name angular.module.ng.$interpolateProvider * @function * * @description * * Used for configuring the interpolation markup. Deafults to `{{` and `}}`. */ function $InterpolateProvider() { var startSymbol = '{{'; var endSymbol = '}}'; /** * @ngdoc method * @name angular.module.ng.$interpolateProvider#startSymbol * @methodOf angular.module.ng.$interpolateProvider * @description * Symbol to denote start of expression in the interpolated string. Defaults to `{{`. * * @prop {string=} value new value to set the starting symbol to. */ this.startSymbol = function(value){ if (value) { startSymbol = value; return this; } else { return startSymbol; } }; /** * @ngdoc method * @name angular.module.ng.$interpolateProvider#endSymbol * @methodOf angular.module.ng.$interpolateProvider * @description * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`. * * @prop {string=} value new value to set the ending symbol to. */ this.endSymbol = function(value){ if (value) { endSymbol = value; return this; } else { return startSymbol; } }; this.$get = ['$parse', function($parse) { var startSymbolLength = startSymbol.length, endSymbolLength = endSymbol.length; /** * @ngdoc function * @name angular.module.ng.$interpolate * @function * * @requires $parse * * @description * * Compiles a string with markup into an interpolation function. This service is used by the * HTML {@link angular.module.ng.$compile $compile} service for data binding. See * {@link angular.module.ng.$interpolateProvider $interpolateProvider} for configuring the * interpolation markup. * * <pre> var $interpolate = ...; // injected var exp = $interpolate('Hello {{name}}!'); expect(exp({name:'Angular'}).toEqual('Hello Angular!'); </pre> * * * @param {string} text The text with markup to interpolate. * @param {boolean=} mustHaveExpression if set to true then the interpolation string must have * embedded expression in order to return an interpolation function. Strings with no * embedded expression will return null for the interpolation function. * @returns {function(context)} an interpolation function which is used to compute the interpolated * string. The function has these parameters: * * * `context`: an object against which any expressions embedded in the strings are evaluated * against. * */ return function(text, mustHaveExpression) { var startIndex, endIndex, index = 0, parts = [], length = text.length, hasInterpolation = false, fn, exp, concat = []; while(index < length) { if ( ((startIndex = text.indexOf(startSymbol, index)) != -1) && ((endIndex = text.indexOf(endSymbol, startIndex + startSymbolLength)) != -1) ) { (index != startIndex) && parts.push(text.substring(index, startIndex)); parts.push(fn = $parse(exp = text.substring(startIndex + startSymbolLength, endIndex))); fn.exp = exp; index = endIndex + endSymbolLength; hasInterpolation = true; } else { // we did not find anything, so we have to add the remainder to the parts array (index != length) && parts.push(text.substring(index)); index = length; } } if (!(length = parts.length)) { // we added, nothing, must have been an empty string. parts.push(''); length = 1; } if (!mustHaveExpression || hasInterpolation) { concat.length = length; fn = function(context) { for(var i = 0, ii = length, part; i<ii; i++) { if (typeof (part = parts[i]) == 'function') { part = part(context); if (part == null || part == undefined) { part = ''; } else if (typeof part != 'string') { part = toJson(part); } } concat[i] = part; } return concat.join(''); }; fn.exp = text; fn.parts = parts; return fn; } }; }]; } var URL_MATCH = /^(file|ftp|http|https):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/, PATH_MATCH = /^([^\?#]*)?(\?([^#]*))?(#(.*))?$/, HASH_MATCH = PATH_MATCH, DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21}; /** * Encode path using encodeUriSegment, ignoring forward slashes * * @param {string} path Path to encode * @returns {string} */ function encodePath(path) { var segments = path.split('/'), i = segments.length; while (i--) { segments[i] = encodeUriSegment(segments[i]); } return segments.join('/'); } function matchUrl(url, obj) { var match = URL_MATCH.exec(url); match = { protocol: match[1], host: match[3], port: int(match[5]) || DEFAULT_PORTS[match[1]] || null, path: match[6] || '/', search: match[8], hash: match[10] }; if (obj) { obj.$$protocol = match.protocol; obj.$$host = match.host; obj.$$port = match.port; } return match; } function composeProtocolHostPort(protocol, host, port) { return protocol + '://' + host + (port == DEFAULT_PORTS[protocol] ? '' : ':' + port); } function pathPrefixFromBase(basePath) { return basePath.substr(0, basePath.lastIndexOf('/')); } function convertToHtml5Url(url, basePath, hashPrefix) { var match = matchUrl(url); // already html5 url if (decodeURIComponent(match.path) != basePath || isUndefined(match.hash) || match.hash.indexOf(hashPrefix) !== 0) { return url; // convert hashbang url -> html5 url } else { return composeProtocolHostPort(match.protocol, match.host, match.port) + pathPrefixFromBase(basePath) + match.hash.substr(hashPrefix.length); } } function convertToHashbangUrl(url, basePath, hashPrefix) { var match = matchUrl(url); // already hashbang url if (decodeURIComponent(match.path) == basePath) { return url; // convert html5 url -> hashbang url } else { var search = match.search && '?' + match.search || '', hash = match.hash && '#' + match.hash || '', pathPrefix = pathPrefixFromBase(basePath), path = match.path.substr(pathPrefix.length); if (match.path.indexOf(pathPrefix) !== 0) { throw 'Invalid url "' + url + '", missing path prefix "' + pathPrefix + '" !'; } return composeProtocolHostPort(match.protocol, match.host, match.port) + basePath + '#' + hashPrefix + path + search + hash; } } /** * LocationUrl represents an url * This object is exposed as $location service when HTML5 mode is enabled and supported * * @constructor * @param {string} url HTML5 url * @param {string} pathPrefix */ function LocationUrl(url, pathPrefix) { pathPrefix = pathPrefix || ''; /** * Parse given html5 (regular) url string into properties * @param {string} url HTML5 url * @private */ this.$$parse = function(url) { var match = matchUrl(url, this); if (match.path.indexOf(pathPrefix) !== 0) { throw 'Invalid url "' + url + '", missing path prefix "' + pathPrefix + '" !'; } this.$$path = decodeURIComponent(match.path.substr(pathPrefix.length)); this.$$search = parseKeyValue(match.search); this.$$hash = match.hash && decodeURIComponent(match.hash) || ''; this.$$compose(); }; /** * Compose url and update `absUrl` property * @private */ this.$$compose = function() { var search = toKeyValue(this.$$search), hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : ''; this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash; this.$$absUrl = composeProtocolHostPort(this.$$protocol, this.$$host, this.$$port) + pathPrefix + this.$$url; }; this.$$parse(url); } /** * LocationHashbangUrl represents url * This object is exposed as $location service when html5 history api is disabled or not supported * * @constructor * @param {string} url Legacy url * @param {string} hashPrefix Prefix for hash part (containing path and search) */ function LocationHashbangUrl(url, hashPrefix) { var basePath; /** * Parse given hashbang url into properties * @param {string} url Hashbang url * @private */ this.$$parse = function(url) { var match = matchUrl(url, this); if (match.hash && match.hash.indexOf(hashPrefix) !== 0) { throw 'Invalid url "' + url + '", missing hash prefix "' + hashPrefix + '" !'; } basePath = match.path + (match.search ? '?' + match.search : ''); match = HASH_MATCH.exec((match.hash || '').substr(hashPrefix.length)); if (match[1]) { this.$$path = (match[1].charAt(0) == '/' ? '' : '/') + decodeURIComponent(match[1]); } else { this.$$path = ''; } this.$$search = parseKeyValue(match[3]); this.$$hash = match[5] && decodeURIComponent(match[5]) || ''; this.$$compose(); }; /** * Compose hashbang url and update `absUrl` property * @private */ this.$$compose = function() { var search = toKeyValue(this.$$search), hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : ''; this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash; this.$$absUrl = composeProtocolHostPort(this.$$protocol, this.$$host, this.$$port) + basePath + (this.$$url ? '#' + hashPrefix + this.$$url : ''); }; this.$$parse(url); } LocationUrl.prototype = { /** * Has any change been replacing ? * @private */ $$replace: false, /** * @ngdoc method * @name angular.module.ng.$location#absUrl * @methodOf angular.module.ng.$location * * @description * This method is getter only. * * Return full url representation with all segments encoded according to rules specified in * {@link http://www.ietf.org/rfc/rfc3986.txt RFC 3986}. * * @return {string} */ absUrl: locationGetter('$$absUrl'), /** * @ngdoc method * @name angular.module.ng.$location#url * @methodOf angular.module.ng.$location * * @description * This method is getter / setter. * * Return url (e.g. `/path?a=b#hash`) when called without any parameter. * * Change path, search and hash, when called with parameter and return `$location`. * * @param {string=} url New url without base prefix (e.g. `/path?a=b#hash`) * @return {string} */ url: function(url, replace) { if (isUndefined(url)) return this.$$url; var match = PATH_MATCH.exec(url); if (match[1]) this.path(decodeURIComponent(match[1])); if (match[2] || match[1]) this.search(match[3] || ''); this.hash(match[5] || '', replace); return this; }, /** * @ngdoc method * @name angular.module.ng.$location#protocol * @methodOf angular.module.ng.$location * * @description * This method is getter only. * * Return protocol of current url. * * @return {string} */ protocol: locationGetter('$$protocol'), /** * @ngdoc method * @name angular.module.ng.$location#host * @methodOf angular.module.ng.$location * * @description * This method is getter only. * * Return host of current url. * * @return {string} */ host: locationGetter('$$host'), /** * @ngdoc method * @name angular.module.ng.$location#port * @methodOf angular.module.ng.$location * * @description * This method is getter only. * * Return port of current url. * * @return {Number} */ port: locationGetter('$$port'), /** * @ngdoc method * @name angular.module.ng.$location#path * @methodOf angular.module.ng.$location * * @description * This method is getter / setter. * * Return path of current url when called without any parameter. * * Change path when called with parameter and return `$location`. * * Note: Path should always begin with forward slash (/), this method will add the forward slash * if it is missing. * * @param {string=} path New path * @return {string} */ path: locationGetterSetter('$$path', function(path) { return path.charAt(0) == '/' ? path : '/' + path; }), /** * @ngdoc method * @name angular.module.ng.$location#search * @methodOf angular.module.ng.$location * * @description * This method is getter / setter. * * Return search part (as object) of current url when called without any parameter. * * Change search part when called with parameter and return `$location`. * * @param {string|object<string,string>=} search New search params - string or hash object * @param {string=} paramValue If `search` is a string, then `paramValue` will override only a * single search parameter. If the value is `null`, the parameter will be deleted. * * @return {string} */ search: function(search, paramValue) { if (isUndefined(search)) return this.$$search; if (isDefined(paramValue)) { if (paramValue === null) { delete this.$$search[search]; } else { this.$$search[search] = paramValue; } } else { this.$$search = isString(search) ? parseKeyValue(search) : search; } this.$$compose(); return this; }, /** * @ngdoc method * @name angular.module.ng.$location#hash * @methodOf angular.module.ng.$location * * @description * This method is getter / setter. * * Return hash fragment when called without any parameter. * * Change hash fragment when called with parameter and return `$location`. * * @param {string=} hash New hash fragment * @return {string} */ hash: locationGetterSetter('$$hash', identity), /** * @ngdoc method * @name angular.module.ng.$location#replace * @methodOf angular.module.ng.$location * * @description * If called, all changes to $location during current `$digest` will be replacing current history * record, instead of adding new one. */ replace: function() { this.$$replace = true; return this; } }; LocationHashbangUrl.prototype = inherit(LocationUrl.prototype); function locationGetter(property) { return function() { return this[property]; }; } function locationGetterSetter(property, preprocess) { return function(value) { if (isUndefined(value)) return this[property]; this[property] = preprocess(value); this.$$compose(); return this; }; } /** * @ngdoc object * @name angular.module.ng.$location * * @requires $browser * @requires $sniffer * @requires $document * * @description * The $location service parses the URL in the browser address bar (based on the {@link https://developer.mozilla.org/en/window.location window.location}) and makes the URL available to your application. Changes to the URL in the address bar are reflected into $location service and changes to $location are reflected into the browser address bar. * * **The $location service:** * * - Exposes the current URL in the browser address bar, so you can * - Watch and observe the URL. * - Change the URL. * - Synchronizes the URL with the browser when the user * - Changes the address bar. * - Clicks the back or forward button (or clicks a History link). * - Clicks on a link. * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash). * * For more information see {@link guide/dev_guide.services.$location Developer Guide: Angular Services: Using $location} */ /** * @ngdoc object * @name angular.module.ng.$locationProvider * @description * Use the `$locationProvider` to configure how the application deep linking paths are stored. */ function $LocationProvider(){ var hashPrefix = '', html5Mode = false; /** * @ngdoc property * @name angular.module.ng.$locationProvider#hashPrefix * @methodOf angular.module.ng.$locationProvider * @description * @param {string=} prefix Prefix for hash part (containing path and search) * @returns {*} current value if used as getter or itself (chaining) if used as setter */ this.hashPrefix = function(prefix) { if (isDefined(prefix)) { hashPrefix = prefix; return this; } else { return hashPrefix; } }; /** * @ngdoc property * @name angular.module.ng.$locationProvider#html5Mode * @methodOf angular.module.ng.$locationProvider * @description * @param {string=} mode Use HTML5 strategy if available. * @returns {*} current value if used as getter or itself (chaining) if used as setter */ this.html5Mode = function(mode) { if (isDefined(mode)) { html5Mode = mode; return this; } else { return html5Mode; } }; this.$get = ['$rootScope', '$browser', '$sniffer', '$document', function( $rootScope, $browser, $sniffer, $document) { var currentUrl, basePath = $browser.baseHref() || '/', pathPrefix = pathPrefixFromBase(basePath), initUrl = $browser.url(); if (html5Mode) { if ($sniffer.history) { currentUrl = new LocationUrl(convertToHtml5Url(initUrl, basePath, hashPrefix), pathPrefix); } else { currentUrl = new LocationHashbangUrl(convertToHashbangUrl(initUrl, basePath, hashPrefix), hashPrefix); } // link rewriting var u = currentUrl, absUrlPrefix = composeProtocolHostPort(u.protocol(), u.host(), u.port()) + pathPrefix; $document.bind('click', function(event) { // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser) // currently we open nice url link and redirect then if (event.ctrlKey || event.metaKey || event.which == 2) return; var elm = jqLite(event.target); // traverse the DOM up to find first A tag while (elm.length && lowercase(elm[0].nodeName) !== 'a') { elm = elm.parent(); } var absHref = elm.prop('href'); if (!absHref || elm.attr('target') || absHref.indexOf(absUrlPrefix) !== 0) { // link to different domain or base path return; } // update location with href without the prefix currentUrl.url(absHref.substr(absUrlPrefix.length)); $rootScope.$apply(); event.preventDefault(); // hack to work around FF6 bug 684208 when scenario runner clicks on links window.angular['ff-684208-preventDefault'] = true; }); } else { currentUrl = new LocationHashbangUrl(initUrl, hashPrefix); } // rewrite hashbang url <> html5 url if (currentUrl.absUrl() != initUrl) { $browser.url(currentUrl.absUrl(), true); } // update $location when $browser url changes $browser.onUrlChange(function(newUrl) { if (currentUrl.absUrl() != newUrl) { $rootScope.$evalAsync(function() { currentUrl.$$parse(newUrl); }); if (!$rootScope.$$phase) $rootScope.$digest(); } }); // update browser var changeCounter = 0; $rootScope.$watch(function $locationWatch() { if ($browser.url() != currentUrl.absUrl()) { changeCounter++; $rootScope.$evalAsync(function() { $browser.url(currentUrl.absUrl(), currentUrl.$$replace); currentUrl.$$replace = false; }); } return changeCounter; }); return currentUrl; }]; } /** * @ngdoc object * @name angular.module.ng.$log * @requires $window * * @description * Simple service for logging. Default implementation writes the message * into the browser's console (if present). * * The main purpose of this service is to simplify debugging and troubleshooting. * * @example <doc:example> <doc:source> <script> function LogCtrl($log) { this.$log = $log; this.message = 'Hello World!'; } </script> <div ng-controller="LogCtrl"> <p>Reload this page with open console, enter text and hit the log button...</p> Message: <input type="text" ng-model="message"/> <button ng-click="$log.log(message)">log</button> <button ng-click="$log.warn(message)">warn</button> <button ng-click="$log.info(message)">info</button> <button ng-click="$log.error(message)">error</button> </div> </doc:source> <doc:scenario> </doc:scenario> </doc:example> */ function $LogProvider(){ this.$get = ['$window', function($window){ return { /** * @ngdoc method * @name angular.module.ng.$log#log * @methodOf angular.module.ng.$log * * @description * Write a log message */ log: consoleLog('log'), /** * @ngdoc method * @name angular.module.ng.$log#warn * @methodOf angular.module.ng.$log * * @description * Write a warning message */ warn: consoleLog('warn'), /** * @ngdoc method * @name angular.module.ng.$log#info * @methodOf angular.module.ng.$log * * @description * Write an information message */ info: consoleLog('info'), /** * @ngdoc method * @name angular.module.ng.$log#error * @methodOf angular.module.ng.$log * * @description * Write an error message */ error: consoleLog('error') }; function formatError(arg) { if (arg instanceof Error) { if (arg.stack) { arg = (arg.message && arg.stack.indexOf(arg.message) === -1) ? 'Error: ' + arg.message + '\n' + arg.stack : arg.stack; } else if (arg.sourceURL) { arg = arg.message + '\n' + arg.sourceURL + ':' + arg.line; } } return arg; } function consoleLog(type) { var console = $window.console || {}, logFn = console[type] || console.log || noop; if (logFn.apply) { return function() { var args = []; forEach(arguments, function(arg) { args.push(formatError(arg)); }); return logFn.apply(console, args); }; } // we are IE which either doesn't have window.console => this is noop and we do nothing, // or we are IE where console.log doesn't have apply so we log at least first 2 args return function(arg1, arg2) { logFn(arg1, arg2); } } }]; } var OPERATORS = { 'null':function(){return null;}, 'true':function(){return true;}, 'false':function(){return false;}, undefined:noop, '+':function(self, locals, a,b){a=a(self, locals); b=b(self, locals); return (isDefined(a)?a:0)+(isDefined(b)?b:0);}, '-':function(self, locals, a,b){a=a(self, locals); b=b(self, locals); return (isDefined(a)?a:0)-(isDefined(b)?b:0);}, '*':function(self, locals, a,b){return a(self, locals)*b(self, locals);}, '/':function(self, locals, a,b){return a(self, locals)/b(self, locals);}, '%':function(self, locals, a,b){return a(self, locals)%b(self, locals);}, '^':function(self, locals, a,b){return a(self, locals)^b(self, locals);}, '=':noop, '==':function(self, locals, a,b){return a(self, locals)==b(self, locals);}, '!=':function(self, locals, a,b){return a(self, locals)!=b(self, locals);}, '<':function(self, locals, a,b){return a(self, locals)<b(self, locals);}, '>':function(self, locals, a,b){return a(self, locals)>b(self, locals);}, '<=':function(self, locals, a,b){return a(self, locals)<=b(self, locals);}, '>=':function(self, locals, a,b){return a(self, locals)>=b(self, locals);}, '&&':function(self, locals, a,b){return a(self, locals)&&b(self, locals);}, '||':function(self, locals, a,b){return a(self, locals)||b(self, locals);}, '&':function(self, locals, a,b){return a(self, locals)&b(self, locals);}, // '|':function(self, locals, a,b){return a|b;}, '|':function(self, locals, a,b){return b(self, locals)(self, locals, a(self, locals));}, '!':function(self, locals, a){return !a(self, locals);} }; var ESCAPE = {"n":"\n", "f":"\f", "r":"\r", "t":"\t", "v":"\v", "'":"'", '"':'"'}; function lex(text){ var tokens = [], token, index = 0, json = [], ch, lastCh = ':'; // can start regexp while (index < text.length) { ch = text.charAt(index); if (is('"\'')) { readString(ch); } else if (isNumber(ch) || is('.') && isNumber(peek())) { readNumber(); } else if (isIdent(ch)) { readIdent(); // identifiers can only be if the preceding char was a { or , if (was('{,') && json[0]=='{' && (token=tokens[tokens.length-1])) { token.json = token.text.indexOf('.') == -1; } } else if (is('(){}[].,;:')) { tokens.push({ index:index, text:ch, json:(was(':[,') && is('{[')) || is('}]:,') }); if (is('{[')) json.unshift(ch); if (is('}]')) json.shift(); index++; } else if (isWhitespace(ch)) { index++; continue; } else { var ch2 = ch + peek(), fn = OPERATORS[ch], fn2 = OPERATORS[ch2]; if (fn2) { tokens.push({index:index, text:ch2, fn:fn2}); index += 2; } else if (fn) { tokens.push({index:index, text:ch, fn:fn, json: was('[,:') && is('+-')}); index += 1; } else { throwError("Unexpected next character ", index, index+1); } } lastCh = ch; } return tokens; function is(chars) { return chars.indexOf(ch) != -1; } function was(chars) { return chars.indexOf(lastCh) != -1; } function peek() { return index + 1 < text.length ? text.charAt(index + 1) : false; } function isNumber(ch) { return '0' <= ch && ch <= '9'; } function isWhitespace(ch) { return ch == ' ' || ch == '\r' || ch == '\t' || ch == '\n' || ch == '\v' || ch == '\u00A0'; // IE treats non-breaking space as \u00A0 } function isIdent(ch) { return 'a' <= ch && ch <= 'z' || 'A' <= ch && ch <= 'Z' || '_' == ch || ch == '$'; } function isExpOperator(ch) { return ch == '-' || ch == '+' || isNumber(ch); } function throwError(error, start, end) { end = end || index; throw Error("Lexer Error: " + error + " at column" + (isDefined(start) ? "s " + start + "-" + index + " [" + text.substring(start, end) + "]" : " " + end) + " in expression [" + text + "]."); } function readNumber() { var number = ""; var start = index; while (index < text.length) { var ch = lowercase(text.charAt(index)); if (ch == '.' || isNumber(ch)) { number += ch; } else { var peekCh = peek(); if (ch == 'e' && isExpOperator(peekCh)) { number += ch; } else if (isExpOperator(ch) && peekCh && isNumber(peekCh) && number.charAt(number.length - 1) == 'e') { number += ch; } else if (isExpOperator(ch) && (!peekCh || !isNumber(peekCh)) && number.charAt(number.length - 1) == 'e') { throwError('Invalid exponent'); } else { break; } } index++; } number = 1 * number; tokens.push({index:start, text:number, json:true, fn:function() {return number;}}); } function readIdent() { var ident = "", start = index, lastDot, peekIndex, methodName; while (index < text.length) { var ch = text.charAt(index); if (ch == '.' || isIdent(ch) || isNumber(ch)) { if (ch == '.') lastDot = index; ident += ch; } else { break; } index++; } //check if this is not a method invocation and if it is back out to last dot if (lastDot) { peekIndex = index; while(peekIndex < text.length) { var ch = text.charAt(peekIndex); if (ch == '(') { methodName = ident.substr(lastDot - start + 1); ident = ident.substr(0, lastDot - start); index = peekIndex; break; } if(isWhitespace(ch)) { peekIndex++; } else { break; } } } var token = { index:start, text:ident }; if (OPERATORS.hasOwnProperty(ident)) { token.fn = token.json = OPERATORS[ident]; } else { var getter = getterFn(ident); token.fn = extend(function(self, locals) { return (getter(self, locals)); }, { assign: function(self, value) { return setter(self, ident, value); } }); } tokens.push(token); if (methodName) { tokens.push({ index:lastDot, text: '.', json: false }); tokens.push({ index: lastDot + 1, text: methodName, json: false }); } } function readString(quote) { var start = index; index++; var string = ""; var rawString = quote; var escape = false; while (index < text.length) { var ch = text.charAt(index); rawString += ch; if (escape) { if (ch == 'u') { var hex = text.substring(index + 1, index + 5); if (!hex.match(/[\da-f]{4}/i)) throwError( "Invalid unicode escape [\\u" + hex + "]"); index += 4; string += String.fromCharCode(parseInt(hex, 16)); } else { var rep = ESCAPE[ch]; if (rep) { string += rep; } else { string += ch; } } escape = false; } else if (ch == '\\') { escape = true; } else if (ch == quote) { index++; tokens.push({ index:start, text:rawString, string:string, json:true, fn:function() { return string; } }); return; } else { string += ch; } index++; } throwError("Unterminated quote", start); } } ///////////////////////////////////////// function parser(text, json, $filter){ var ZERO = valueFn(0), value, tokens = lex(text), assignment = _assignment, functionCall = _functionCall, fieldAccess = _fieldAccess, objectIndex = _objectIndex, filterChain = _filterChain; if(json){ // The extra level of aliasing is here, just in case the lexer misses something, so that // we prevent any accidental execution in JSON. assignment = logicalOR; functionCall = fieldAccess = objectIndex = filterChain = function() { throwError("is not valid json", {text:text, index:0}); }; value = primary(); } else { value = statements(); } if (tokens.length !== 0) { throwError("is an unexpected token", tokens[0]); } return value; /////////////////////////////////// function throwError(msg, token) { throw Error("Syntax Error: Token '" + token.text + "' " + msg + " at column " + (token.index + 1) + " of the expression [" + text + "] starting at [" + text.substring(token.index) + "]."); } function peekToken() { if (tokens.length === 0) throw Error("Unexpected end of expression: " + text); return tokens[0]; } function peek(e1, e2, e3, e4) { if (tokens.length > 0) { var token = tokens[0]; var t = token.text; if (t==e1 || t==e2 || t==e3 || t==e4 || (!e1 && !e2 && !e3 && !e4)) { return token; } } return false; } function expect(e1, e2, e3, e4){ var token = peek(e1, e2, e3, e4); if (token) { if (json && !token.json) { throwError("is not valid json", token); } tokens.shift(); return token; } return false; } function consume(e1){ if (!expect(e1)) { throwError("is unexpected, expecting [" + e1 + "]", peek()); } } function unaryFn(fn, right) { return function(self, locals) { return fn(self, locals, right); }; } function binaryFn(left, fn, right) { return function(self, locals) { return fn(self, locals, left, right); }; } function statements() { var statements = []; while(true) { if (tokens.length > 0 && !peek('}', ')', ';', ']')) statements.push(filterChain()); if (!expect(';')) { // optimize for the common case where there is only one statement. // TODO(size): maybe we should not support multiple statements? return statements.length == 1 ? statements[0] : function(self, locals){ var value; for ( var i = 0; i < statements.length; i++) { var statement = statements[i]; if (statement) value = statement(self, locals); } return value; }; } } } function _filterChain() { var left = expression(); var token; while(true) { if ((token = expect('|'))) { left = binaryFn(left, token.fn, filter()); } else { return left; } } } function filter() { var token = expect(); var fn = $filter(token.text); var argsFn = []; while(true) { if ((token = expect(':'))) { argsFn.push(expression()); } else { var fnInvoke = function(self, locals, input){ var args = [input]; for ( var i = 0; i < argsFn.length; i++) { args.push(argsFn[i](self, locals)); } return fn.apply(self, args); }; return function() { return fnInvoke; }; } } } function expression() { return assignment(); } function _assignment() { var left = logicalOR(); var right; var token; if ((token = expect('='))) { if (!left.assign) { throwError("implies assignment but [" + text.substring(0, token.index) + "] can not be assigned to", token); } right = logicalOR(); return function(self, locals){ return left.assign(self, right(self, locals), locals); }; } else { return left; } } function logicalOR() { var left = logicalAND(); var token; while(true) { if ((token = expect('||'))) { left = binaryFn(left, token.fn, logicalAND()); } else { return left; } } } function logicalAND() { var left = equality(); var token; if ((token = expect('&&'))) { left = binaryFn(left, token.fn, logicalAND()); } return left; } function equality() { var left = relational(); var token; if ((token = expect('==','!='))) { left = binaryFn(left, token.fn, equality()); } return left; } function relational() { var left = additive(); var token; if ((token = expect('<', '>', '<=', '>='))) { left = binaryFn(left, token.fn, relational()); } return left; } function additive() { var left = multiplicative(); var token; while ((token = expect('+','-'))) { left = binaryFn(left, token.fn, multiplicative()); } return left; } function multiplicative() { var left = unary(); var token; while ((token = expect('*','/','%'))) { left = binaryFn(left, token.fn, unary()); } return left; } function unary() { var token; if (expect('+')) { return primary(); } else if ((token = expect('-'))) { return binaryFn(ZERO, token.fn, unary()); } else if ((token = expect('!'))) { return unaryFn(token.fn, unary()); } else { return primary(); } } function primary() { var primary; if (expect('(')) { primary = filterChain(); consume(')'); } else if (expect('[')) { primary = arrayDeclaration(); } else if (expect('{')) { primary = object(); } else { var token = expect(); primary = token.fn; if (!primary) { throwError("not a primary expression", token); } } var next, context; while ((next = expect('(', '[', '.'))) { if (next.text === '(') { primary = functionCall(primary, context); context = null; } else if (next.text === '[') { context = primary; primary = objectIndex(primary); } else if (next.text === '.') { context = primary; primary = fieldAccess(primary); } else { throwError("IMPOSSIBLE"); } } return primary; } function _fieldAccess(object) { var field = expect().text; var getter = getterFn(field); return extend( function(self, locals) { return getter(object(self, locals), locals); }, { assign:function(self, value, locals) { return setter(object(self, locals), field, value); } } ); } function _objectIndex(obj) { var indexFn = expression(); consume(']'); return extend( function(self, locals){ var o = obj(self, locals), i = indexFn(self, locals), v, p; if (!o) return undefined; v = o[i]; if (v && v.then) { p = v; if (!('$$v' in v)) { p.$$v = undefined; p.then(function(val) { p.$$v = val; }); } v = v.$$v; } return v; }, { assign:function(self, value, locals){ return obj(self, locals)[indexFn(self, locals)] = value; } }); } function _functionCall(fn, contextGetter) { var argsFn = []; if (peekToken().text != ')') { do { argsFn.push(expression()); } while (expect(',')); } consume(')'); return function(self, locals){ var args = [], context = contextGetter ? contextGetter(self, locals) : self; for ( var i = 0; i < argsFn.length; i++) { args.push(argsFn[i](self, locals)); } var fnPtr = fn(self, locals) || noop; // IE stupidity! return fnPtr.apply ? fnPtr.apply(context, args) : fnPtr(args[0], args[1], args[2], args[3], args[4]); }; } // This is used with json array declaration function arrayDeclaration () { var elementFns = []; if (peekToken().text != ']') { do { elementFns.push(expression()); } while (expect(',')); } consume(']'); return function(self, locals){ var array = []; for ( var i = 0; i < elementFns.length; i++) { array.push(elementFns[i](self, locals)); } return array; }; } function object () { var keyValues = []; if (peekToken().text != '}') { do { var token = expect(), key = token.string || token.text; consume(":"); var value = expression(); keyValues.push({key:key, value:value}); } while (expect(',')); } consume('}'); return function(self, locals){ var object = {}; for ( var i = 0; i < keyValues.length; i++) { var keyValue = keyValues[i]; var value = keyValue.value(self, locals); object[keyValue.key] = value; } return object; }; } } ////////////////////////////////////////////////// // Parser helper functions ////////////////////////////////////////////////// function setter(obj, path, setValue) { var element = path.split('.'); for (var i = 0; element.length > 1; i++) { var key = element.shift(); var propertyObj = obj[key]; if (!propertyObj) { propertyObj = {}; obj[key] = propertyObj; } obj = propertyObj; } obj[element.shift()] = setValue; return setValue; } /** * Return the value accesible from the object by path. Any undefined traversals are ignored * @param {Object} obj starting object * @param {string} path path to traverse * @param {boolean=true} bindFnToScope * @returns value as accesbile by path */ //TODO(misko): this function needs to be removed function getter(obj, path, bindFnToScope) { if (!path) return obj; var keys = path.split('.'); var key; var lastInstance = obj; var len = keys.length; for (var i = 0; i < len; i++) { key = keys[i]; if (obj) { obj = (lastInstance = obj)[key]; } } if (!bindFnToScope && isFunction(obj)) { return bind(lastInstance, obj); } return obj; } var getterFnCache = {}; function getterFn(path) { if (getterFnCache.hasOwnProperty(path)) { return getterFnCache[path]; } var fn, code = 'var l, fn, p;\n'; forEach(path.split('.'), function(key, index) { code += 'if(!s) return s;\n' + 'l=s;\n' + 's='+ (index // we simply direference 's' on any .dot notation ? 's' // but if we are first then we check locals firs, and if so read it first : '((k&&k.hasOwnProperty("' + key + '"))?k:s)') + '["' + key + '"]' + ';\n' + 'if (s && s.then) {\n' + ' if (!("$$v" in s)) {\n' + ' p=s;\n' + ' p.$$v = undefined;\n' + ' p.then(function(v) {p.$$v=v;});\n' + '}\n' + ' s=s.$$v\n' + '}\n'; }); code += 'return s;'; fn = Function('s', 'k', code); fn.toString = function() { return code; }; return getterFnCache[path] = fn; } /////////////////////////////////// function $ParseProvider() { var cache = {}; this.$get = ['$filter', function($filter) { return function(exp) { switch(typeof exp) { case 'string': return cache.hasOwnProperty(exp) ? cache[exp] : cache[exp] = parser(exp, false, $filter); case 'function': return exp; default: return noop; } }; }]; } /** * @ngdoc service * @name angular.module.ng.$q * @requires $rootScope * * @description * A promise/deferred implementation inspired by [Kris Kowal's Q](https://github.com/kriskowal/q). * * [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an * interface for interacting with an object that represents the result of an action that is * performed asynchronously, and may or may not be finished at any given point in time. * * From the perspective of dealing with error handling, deferred and promise apis are to * asynchronous programing what `try`, `catch` and `throw` keywords are to synchronous programing. * * <pre> * // for the purpose of this example let's assume that variables `$q` and `scope` are * // available in the current lexical scope (they could have been injected or passed in). * * function asyncGreet(name) { * var deferred = $q.defer(); * * setTimeout(function() { * // since this fn executes async in a future turn of the event loop, we need to wrap * // our code into an $apply call so that the model changes are properly observed. * scope.$apply(function() { * if (okToGreet(name)) { * deferred.resolve('Hello, ' + name + '!'); * } else { * deferred.reject('Greeting ' + name + ' is not allowed.'); * } * }); * }, 1000); * * return deferred.promise; * } * * var promise = asyncGreet('Robin Hood'); * promise.then(function(greeting) { * alert('Success: ' + greeting); * }, function(reason) { * alert('Failed: ' + reason); * ); * </pre> * * At first it might not be obvious why this extra complexity is worth the trouble. The payoff * comes in the way of * [guarantees that promise and deferred apis make](https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md). * * Additionally the promise api allows for composition that is very hard to do with the * traditional callback ([CPS](http://en.wikipedia.org/wiki/Continuation-passing_style)) approach. * For more on this please see the [Q documentation](https://github.com/kriskowal/q) especially the * section on serial or parallel joining of promises. * * * # The Deferred API * * A new instance of deferred is constructed by calling `$q.defer()`. * * The purpose of the deferred object is to expose the associated Promise instance as well as apis * that can be used for signaling the successful or unsuccessful completion of the task. * * **Methods** * * - `resolve(value)` – resolves the derived promise with the `value`. If the value is a rejection * constructed via `$q.reject`, the promise will be rejected instead. * - `reject(reason)` – rejects the derived promise with the `reason`. This is equivalent to * resolving it with a rejection constructed via `$q.reject`. * * **Properties** * * - promise – `{Promise}` – promise object associated with this deferred. * * * # The Promise API * * A new promise instance is created when a deferred instance is created and can be retrieved by * calling `deferred.promise`. * * The purpose of the promise object is to allow for interested parties to get access to the result * of the deferred task when it completes. * * **Methods** * * - `then(successCallback, errorCallback)` – regardless of when the promise was or will be resolved * or rejected calls one of the success or error callbacks asynchronously as soon as the result * is available. The callbacks are called with a single argument the result or rejection reason. * * This method *returns a new promise* which is resolved or rejected via the return value of the * `successCallback` or `errorCallback`. * * * # Chaining promises * * Because calling `then` api of a promise returns a new derived promise, it is easily possible * to create a chain of promises: * * <pre> * promiseB = promiseA.then(function(result) { * return result + 1; * }); * * // promiseB will be resolved immediately after promiseA is resolved and it's value will be * // the result of promiseA incremented by 1 * </pre> * * It is possible to create chains of any length and since a promise can be resolved with another * promise (which will defer its resolution further), it is possible to pause/defer resolution of * the promises at any point in the chain. This makes it possible to implement powerful apis like * $http's response interceptors. * * * # Differences between Kris Kowal's Q and $q * * There are three main differences: * * - $q is integrated with the {@link angular.module.ng.$rootScope.Scope} Scope model observation * mechanism in angular, which means faster propagation of resolution or rejection into your * models and avoiding unnecessary browser repaints, which would result in flickering UI. * - $q promises are recognized by the templating engine in angular, which means that in templates * you can treat promises attached to a scope as if they were the resulting values. * - Q has many more features that $q, but that comes at a cost of bytes. $q is tiny, but contains * all the important functionality needed for common async tasks. */ function $QProvider() { this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) { return qFactory(function(callback) { $rootScope.$evalAsync(callback); }, $exceptionHandler); }]; } /** * Constructs a promise manager. * * @param {function(function)} nextTick Function for executing functions in the next turn. * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for * debugging purposes. * @returns {object} Promise manager. */ function qFactory(nextTick, exceptionHandler) { /** * @ngdoc * @name angular.module.ng.$q#defer * @methodOf angular.module.ng.$q * @description * Creates a `Deferred` object which represents a task which will finish in the future. * * @returns {Deferred} Returns a new instance of deferred. */ var defer = function() { var pending = [], value, deferred; deferred = { resolve: function(val) { if (pending) { var callbacks = pending; pending = undefined; value = ref(val); if (callbacks.length) { nextTick(function() { var callback; for (var i = 0, ii = callbacks.length; i < ii; i++) { callback = callbacks[i]; value.then(callback[0], callback[1]); } }); } } }, reject: function(reason) { deferred.resolve(reject(reason)); }, promise: { then: function(callback, errback) { var result = defer(); var wrappedCallback = function(value) { try { result.resolve((callback || defaultCallback)(value)); } catch(e) { exceptionHandler(e); result.reject(e); } }; var wrappedErrback = function(reason) { try { result.resolve((errback || defaultErrback)(reason)); } catch(e) { exceptionHandler(e); result.reject(e); } }; if (pending) { pending.push([wrappedCallback, wrappedErrback]); } else { value.then(wrappedCallback, wrappedErrback); } return result.promise; } } }; return deferred; }; var ref = function(value) { if (value && value.then) return value; return { then: function(callback) { var result = defer(); nextTick(function() { result.resolve(callback(value)); }); return result.promise; } }; }; /** * @ngdoc * @name angular.module.ng.$q#reject * @methodOf angular.module.ng.$q * @description * Creates a promise that is resolved as rejected with the specified `reason`. This api should be * used to forward rejection in a chain of promises. If you are dealing with the last promise in * a promise chain, you don't need to worry about it. * * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of * `reject` as the `throw` keyword in JavaScript. This also means that if you "catch" an error via * a promise error callback and you want to forward the error to the promise derived from the * current promise, you have to "rethrow" the error by returning a rejection constructed via * `reject`. * * <pre> * promiseB = promiseA.then(function(result) { * // success: do something and resolve promiseB * // with the old or a new result * return result; * }, function(reason) { * // error: handle the error if possible and * // resolve promiseB with newPromiseOrValue, * // otherwise forward the rejection to promiseB * if (canHandle(reason)) { * // handle the error and recover * return newPromiseOrValue; * } * return $q.reject(reason); * }); * </pre> * * @param {*} reason Constant, message, exception or an object representing the rejection reason. * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`. */ var reject = function(reason) { return { then: function(callback, errback) { var result = defer(); nextTick(function() { result.resolve((errback || defaultErrback)(reason)); }); return result.promise; } }; }; /** * @ngdoc * @name angular.module.ng.$q#when * @methodOf angular.module.ng.$q * @description * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. * This is useful when you are dealing with on object that might or might not be a promise, or if * the promise comes from a source that can't be trusted. * * @param {*} value Value or a promise * @returns {Promise} Returns a single promise that will be resolved with an array of values, * each value coresponding to the promise at the same index in the `promises` array. If any of * the promises is resolved with a rejection, this resulting promise will be resolved with the * same rejection. */ var when = function(value, callback, errback) { var result = defer(), done; var wrappedCallback = function(value) { try { return (callback || defaultCallback)(value); } catch (e) { exceptionHandler(e); return reject(e); } }; var wrappedErrback = function(reason) { try { return (errback || defaultErrback)(reason); } catch (e) { exceptionHandler(e); return reject(e); } }; nextTick(function() { ref(value).then(function(value) { if (done) return; done = true; result.resolve(ref(value).then(wrappedCallback, wrappedErrback)); }, function(reason) { if (done) return; done = true; result.resolve(wrappedErrback(reason)); }); }); return result.promise; }; function defaultCallback(value) { return value; } function defaultErrback(reason) { return reject(reason); } /** * @ngdoc * @name angular.module.ng.$q#all * @methodOf angular.module.ng.$q * @description * Combines multiple promises into a single promise that is resolved when all of the input * promises are resolved. * * @param {Array.<Promise>} promises An array of promises. * @returns {Promise} Returns a single promise that will be resolved with an array of values, * each value coresponding to the promise at the same index in the `promises` array. If any of * the promises is resolved with a rejection, this resulting promise will be resolved with the * same rejection. */ function all(promises) { var deferred = defer(), counter = promises.length, results = []; if (counter) { forEach(promises, function(promise, index) { ref(promise).then(function(value) { if (index in results) return; results[index] = value; if (!(--counter)) deferred.resolve(results); }, function(reason) { if (index in results) return; deferred.reject(reason); }); }); } else { deferred.resolve(results); } return deferred.promise; } return { defer: defer, reject: reject, when: when, all: all }; } /** * @ngdoc object * @name angular.module.ng.$routeProvider * @function * * @description * * Used for configuring routes. See {@link angular.module.ng.$route $route} for an example. */ function $RouteProvider(){ var routes = {}; /** * @ngdoc method * @name angular.module.ng.$routeProvider#when * @methodOf angular.module.ng.$routeProvider * * @param {string} path Route path (matched against `$location.path`). If `$location.path` * contains redudant trailing slash or is missing one, the route will still match and the * `$location.path` will be updated to add or drop the trailing slash to exacly match the * route definition. * @param {Object} route Mapping information to be assigned to `$route.current` on route * match. * * Object properties: * * - `controller` – `{function()=}` – Controller fn that should be associated with newly * created scope. * - `template` – `{string=}` – path to an html template that should be used by * {@link angular.module.ng.$compileProvider.directive.ngView ngView} or * {@link angular.module.ng.$compileProvider.directive.ngInclude ngInclude} directives. * - `redirectTo` – {(string|function())=} – value to update * {@link angular.module.ng.$location $location} path with and trigger route redirection. * * If `redirectTo` is a function, it will be called with the following parameters: * * - `{Object.<string>}` - route parameters extracted from the current * `$location.path()` by applying the current route template. * - `{string}` - current `$location.path()` * - `{Object}` - current `$location.search()` * * The custom `redirectTo` function is expected to return a string which will be used * to update `$location.path()` and `$location.search()`. * * - `[reloadOnSearch=true]` - {boolean=} - reload route when only $location.search() * changes. * * If the option is set to `false` and url in the browser changes, then * `$routeUpdate` event is broadcasted on the root scope. * * @returns {Object} self * * @description * Adds a new route definition to the `$route` service. */ this.when = function(path, route) { routes[path] = extend({reloadOnSearch: true}, route); // create redirection for trailing slashes if (path) { var redirectPath = (path[path.length-1] == '/') ? path.substr(0, path.length-1) : path +'/'; routes[redirectPath] = {redirectTo: path}; } return this; }; /** * @ngdoc method * @name angular.module.ng.$routeProvider#otherwise * @methodOf angular.module.ng.$routeProvider * * @description * Sets route definition that will be used on route change when no other route definition * is matched. * * @param {Object} params Mapping information to be assigned to `$route.current`. * @returns {Object} self */ this.otherwise = function(params) { this.when(null, params); return this; }; this.$get = ['$rootScope', '$location', '$routeParams', function( $rootScope, $location, $routeParams) { /** * @ngdoc object * @name angular.module.ng.$route * @requires $location * @requires $routeParams * * @property {Object} current Reference to the current route definition. * @property {Array.<Object>} routes Array of all configured routes. * * @description * Is used for deep-linking URLs to controllers and views (HTML partials). * It watches `$location.url()` and tries to map the path to an existing route definition. * * You can define routes through {@link angular.module.ng.$routeProvider $routeProvider}'s API. * * The `$route` service is typically used in conjunction with {@link angular.module.ng.$compileProvider.directive.ngView ngView} * directive and the {@link angular.module.ng.$routeParams $routeParams} service. * * @example This example shows how changing the URL hash causes the `$route` to match a route against the URL, and the `ngView` pulls in the partial. Note that this example is using {@link angular.module.ng.$compileProvider.directive.script inlined templates} to get it working on jsfiddle as well. <doc:example module="route"> <doc:source> <script type="text/ng-template" id="examples/book.html"> controller: {{name}}<br /> Book Id: {{params.bookId}}<br /> </script> <script type="text/ng-template" id="examples/chapter.html"> controller: {{name}}<br /> Book Id: {{params.bookId}}<br /> Chapter Id: {{params.chapterId}} </script> <script> angular.module('route', [], function($routeProvider, $locationProvider) { $routeProvider.when('/Book/:bookId', {template: 'examples/book.html', controller: BookCntl}); $routeProvider.when('/Book/:bookId/ch/:chapterId', {template: 'examples/chapter.html', controller: ChapterCntl}); // configure html5 to get links working on jsfiddle $locationProvider.html5Mode(true); }); function MainCntl($scope, $route, $routeParams, $location) { $scope.$route = $route; $scope.$location = $location; $scope.$routeParams = $routeParams; } function BookCntl($scope, $routeParams) { $scope.name = "BookCntl"; $scope.params = $routeParams; } function ChapterCntl($scope, $routeParams) { $scope.name = "ChapterCntl"; $scope.params = $routeParams; } </script> <div ng-controller="MainCntl"> Choose: <a href="Book/Moby">Moby</a> | <a href="Book/Moby/ch/1">Moby: Ch1</a> | <a href="Book/Gatsby">Gatsby</a> | <a href="Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> | <a href="Book/Scarlet">Scarlet Letter</a><br/> <div ng-view></div> <hr /> <pre>$location.path() = {{$location.path()}}</pre> <pre>$route.current.template = {{$route.current.template}}</pre> <pre>$route.current.params = {{$route.current.params}}</pre> <pre>$route.current.scope.name = {{$route.current.scope.name}}</pre> <pre>$routeParams = {{$routeParams}}</pre> </div> </doc:source> <doc:scenario> it('should load and compile correct template', function() { element('a:contains("Moby: Ch1")').click(); var content = element('.doc-example-live [ng-view]').text(); expect(content).toMatch(/controller\: ChapterCntl/); expect(content).toMatch(/Book Id\: Moby/); expect(content).toMatch(/Chapter Id\: 1/); element('a:contains("Scarlet")').click(); content = element('.doc-example-live [ng-view]').text(); expect(content).toMatch(/controller\: BookCntl/); expect(content).toMatch(/Book Id\: Scarlet/); }); </doc:scenario> </doc:example> */ /** * @ngdoc event * @name angular.module.ng.$route#$beforeRouteChange * @eventOf angular.module.ng.$route * @eventType broadcast on root scope * @description * Broadcasted before a route change. * * @param {Route} next Future route information. * @param {Route} current Current route information. */ /** * @ngdoc event * @name angular.module.ng.$route#$afterRouteChange * @eventOf angular.module.ng.$route * @eventType broadcast on root scope * @description * Broadcasted after a route change. * * @param {Route} current Current route information. * @param {Route} previous Previous route information. */ /** * @ngdoc event * @name angular.module.ng.$route#$routeUpdate * @eventOf angular.module.ng.$route * @eventType broadcast on root scope * @description * * The `reloadOnSearch` property has been set to false, and we are reusing the same * instance of the Controller. */ var matcher = switchRouteMatcher, dirty = 0, forceReload = false, $route = { routes: routes, /** * @ngdoc method * @name angular.module.ng.$route#reload * @methodOf angular.module.ng.$route * * @description * Causes `$route` service to reload the current route even if * {@link angular.module.ng.$location $location} hasn't changed. * * As a result of that, {@link angular.module.ng.$compileProvider.directive.ngView ngView} * creates new scope, reinstantiates the controller. */ reload: function() { dirty++; forceReload = true; } }; $rootScope.$watch(function() { return dirty + $location.url(); }, updateRoute); return $route; ///////////////////////////////////////////////////// function switchRouteMatcher(on, when) { // TODO(i): this code is convoluted and inefficient, we should construct the route matching // regex only once and then reuse it var regex = '^' + when.replace(/([\.\\\(\)\^\$])/g, "\\$1") + '$', params = [], dst = {}; forEach(when.split(/\W/), function(param) { if (param) { var paramRegExp = new RegExp(":" + param + "([\\W])"); if (regex.match(paramRegExp)) { regex = regex.replace(paramRegExp, "([^\\/]*)$1"); params.push(param); } } }); var match = on.match(new RegExp(regex)); if (match) { forEach(params, function(name, index) { dst[name] = match[index + 1]; }); } return match ? dst : null; } function updateRoute() { var next = parseRoute(), last = $route.current; if (next && last && next.$route === last.$route && equals(next.pathParams, last.pathParams) && !next.reloadOnSearch && !forceReload) { last.params = next.params; copy(last.params, $routeParams); $rootScope.$broadcast('$routeUpdate', last); } else if (next || last) { forceReload = false; $rootScope.$broadcast('$beforeRouteChange', next, last); $route.current = next; if (next) { if (next.redirectTo) { if (isString(next.redirectTo)) { $location.path(interpolate(next.redirectTo, next.params)).search(next.params) .replace(); } else { $location.url(next.redirectTo(next.pathParams, $location.path(), $location.search())) .replace(); } } else { copy(next.params, $routeParams); } } $rootScope.$broadcast('$afterRouteChange', next, last); } } /** * @returns the current active route, by matching it against the URL */ function parseRoute() { // Match a route var params, match; forEach(routes, function(route, path) { if (!match && (params = matcher($location.path(), path))) { match = inherit(route, { params: extend({}, $location.search(), params), pathParams: params}); match.$route = route; } }); // No route matched; fallback to "otherwise" route return match || routes[null] && inherit(routes[null], {params: {}, pathParams:{}}); } /** * @returns interpolation of the redirect path with the parametrs */ function interpolate(string, params) { var result = []; forEach((string||'').split(':'), function(segment, i) { if (i == 0) { result.push(segment); } else { var segmentMatch = segment.match(/(\w+)(.*)/); var key = segmentMatch[1]; result.push(params[key]); result.push(segmentMatch[2] || ''); delete params[key]; } }); return result.join(''); } }]; } /** * @ngdoc object * @name angular.module.ng.$routeParams * @requires $route * * @description * Current set of route parameters. The route parameters are a combination of the * {@link angular.module.ng.$location $location} `search()`, and `path()`. The `path` parameters * are extracted when the {@link angular.module.ng.$route $route} path is matched. * * In case of parameter name collision, `path` params take precedence over `search` params. * * The service guarantees that the identity of the `$routeParams` object will remain unchanged * (but its properties will likely change) even when a route change occurs. * * @example * <pre> * // Given: * // URL: http://server.com/index.html#/Chapter/1/Section/2?search=moby * // Route: /Chapter/:chapterId/Section/:sectionId * // * // Then * $routeParams ==> {chapterId:1, sectionId:2, search:'moby'} * </pre> */ function $RouteParamsProvider() { this.$get = valueFn({}); } /** * DESIGN NOTES * * The design decisions behind the scope ware heavily favored for speed and memory consumption. * * The typical use of scope is to watch the expressions, which most of the time return the same * value as last time so we optimize the operation. * * Closures construction is expensive from speed as well as memory: * - no closures, instead ups prototypical inheritance for API * - Internal state needs to be stored on scope directly, which means that private state is * exposed as $$____ properties * * Loop operations are optimized by using while(count--) { ... } * - this means that in order to keep the same order of execution as addition we have to add * items to the array at the begging (shift) instead of at the end (push) * * Child scopes are created and removed often * - Using array would be slow since inserts in meddle are expensive so we use linked list * * There are few watches then a lot of observers. This is why you don't want the observer to be * implemented in the same way as watch. Watch requires return of initialization function which * are expensive to construct. */ /** * @ngdoc object * @name angular.module.ng.$rootScopeProvider * @description * * Provider for the $rootScope service. */ /** * @ngdoc function * @name angular.module.ng.$rootScopeProvider#digestTtl * @methodOf angular.module.ng.$rootScopeProvider * @description * * Sets the number of digest iteration the scope should attempt to execute before giving up and * assuming that the model is unstable. * * The current default is 10 iterations. * * @param {number} limit The number of digest iterations. */ /** * @ngdoc object * @name angular.module.ng.$rootScope * @description * * Every application has a single root {@link angular.module.ng.$rootScope.Scope scope}. * All other scopes are child scopes of the root scope. Scopes provide mechanism for watching the model and provide * event processing life-cycle. See {@link guide/dev_guide.scopes developer guide on scopes}. */ function $RootScopeProvider(){ var TTL = 10; this.digestTtl = function(value) { if (arguments.length) { TTL = value; } return TTL; }; this.$get = ['$injector', '$exceptionHandler', '$parse', function( $injector, $exceptionHandler, $parse) { /** * @ngdoc function * @name angular.module.ng.$rootScope.Scope * * @description * A root scope can be retrieved using the {@link angular.module.ng.$rootScope $rootScope} key from the * {@link angular.module.AUTO.$injector $injector}. Child scopes are created using the * {@link angular.module.ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when * compiled HTML template is executed.) * * Here is a simple scope snippet to show how you can interact with the scope. * <pre> angular.injector(['ng']).invoke(function($rootScope) { var scope = $rootScope.$new(); scope.salutation = 'Hello'; scope.name = 'World'; expect(scope.greeting).toEqual(undefined); scope.$watch('name', function() { this.greeting = this.salutation + ' ' + this.name + '!'; }); // initialize the watch expect(scope.greeting).toEqual(undefined); scope.name = 'Misko'; // still old value, since watches have not been called yet expect(scope.greeting).toEqual(undefined); scope.$digest(); // fire all the watches expect(scope.greeting).toEqual('Hello Misko!'); }); * </pre> * * # Inheritance * A scope can inherit from a parent scope, as in this example: * <pre> var parent = $rootScope; var child = parent.$new(); parent.salutation = "Hello"; child.name = "World"; expect(child.salutation).toEqual('Hello'); child.salutation = "Welcome"; expect(child.salutation).toEqual('Welcome'); expect(parent.salutation).toEqual('Hello'); * </pre> * * # Dependency Injection * See {@link guide/dev_guide.di dependency injection}. * * * @param {Object.<string, function()>=} providers Map of service factory which need to be provided * for the current scope. Defaults to {@link angular.module.ng}. * @param {Object.<string, *>=} instanceCache Provides pre-instantiated services which should * append/override services provided by `providers`. This is handy when unit-testing and having * the need to override a default service. * @returns {Object} Newly created scope. * */ function Scope() { this.$id = nextUid(); this.$$phase = this.$parent = this.$$watchers = this.$$nextSibling = this.$$prevSibling = this.$$childHead = this.$$childTail = null; this['this'] = this.$root = this; this.$$asyncQueue = []; this.$$listeners = {}; } /** * @ngdoc property * @name angular.module.ng.$rootScope.Scope#$id * @propertyOf angular.module.ng.$rootScope.Scope * @returns {number} Unique scope ID (monotonically increasing alphanumeric sequence) useful for * debugging. */ Scope.prototype = { /** * @ngdoc function * @name angular.module.ng.$rootScope.Scope#$new * @methodOf angular.module.ng.$rootScope.Scope * @function * * @description * Creates a new child {@link angular.module.ng.$rootScope.Scope scope}. * * The parent scope will propagate the {@link angular.module.ng.$rootScope.Scope#$digest $digest()} and * {@link angular.module.ng.$rootScope.Scope#$digest $digest()} events. The scope can be removed from the scope * hierarchy using {@link angular.module.ng.$rootScope.Scope#$destroy $destroy()}. * * {@link angular.module.ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is desired for * the scope and its child scopes to be permanently detached from the parent and thus stop * participating in model change detection and listener notification by invoking. * * @params {boolean} isolate if true then the scoped does not prototypically inherit from the * parent scope. The scope is isolated, as it can not se parent scope properties. * When creating widgets it is useful for the widget to not accidently read parent * state. * * @returns {Object} The newly created child scope. * */ $new: function(isolate) { var Child, child; if (isFunction(isolate)) { // TODO: remove at some point throw Error('API-CHANGE: Use $controller to instantiate controllers.'); } if (isolate) { child = new Scope(); child.$root = this.$root; } else { Child = function() {}; // should be anonymous; This is so that when the minifier munges // the name it does not become random set of chars. These will then show up as class // name in the debugger. Child.prototype = this; child = new Child(); child.$id = nextUid(); } child['this'] = child; child.$$listeners = {}; child.$parent = this; child.$$asyncQueue = []; child.$$watchers = child.$$nextSibling = child.$$childHead = child.$$childTail = null; child.$$prevSibling = this.$$childTail; if (this.$$childHead) { this.$$childTail.$$nextSibling = child; this.$$childTail = child; } else { this.$$childHead = this.$$childTail = child; } return child; }, /** * @ngdoc function * @name angular.module.ng.$rootScope.Scope#$watch * @methodOf angular.module.ng.$rootScope.Scope * @function * * @description * Registers a `listener` callback to be executed whenever the `watchExpression` changes. * * - The `watchExpression` is called on every call to {@link angular.module.ng.$rootScope.Scope#$digest $digest()} and * should return the value which will be watched. (Since {@link angular.module.ng.$rootScope.Scope#$digest $digest()} * reruns when it detects changes the `watchExpression` can execute multiple times per * {@link angular.module.ng.$rootScope.Scope#$digest $digest()} and should be idempotent.) * - The `listener` is called only when the value from the current `watchExpression` and the * previous call to `watchExpression' are not equal (with the exception of the initial run * see below). The inequality is determined according to * {@link angular.equals} function. To save the value of the object for later comparison * {@link angular.copy} function is used. It also means that watching complex options will * have adverse memory and performance implications. * - The watch `listener` may change the model, which may trigger other `listener`s to fire. This * is achieved by rerunning the watchers until no changes are detected. The rerun iteration * limit is 100 to prevent infinity loop deadlock. * * * If you want to be notified whenever {@link angular.module.ng.$rootScope.Scope#$digest $digest} is called, * you can register an `watchExpression` function with no `listener`. (Since `watchExpression`, * can execute multiple times per {@link angular.module.ng.$rootScope.Scope#$digest $digest} cycle when a change is * detected, be prepared for multiple calls to your listener.) * * After a watcher is registered with the scope, the `listener` fn is called asynchronously * (via {@link angular.module.ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the * watcher. In rare cases, this is undesirable because the listener is called when the result * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the * listener was called due to initialization. * * * # Example <pre> // let's assume that scope was dependency injected as the $rootScope var scope = $rootScope; scope.name = 'misko'; scope.counter = 0; expect(scope.counter).toEqual(0); scope.$watch('name', function(newValue, oldValue) { counter = counter + 1; }); expect(scope.counter).toEqual(0); scope.$digest(); // no variable change expect(scope.counter).toEqual(0); scope.name = 'adam'; scope.$digest(); expect(scope.counter).toEqual(1); </pre> * * * * @param {(function()|string)} watchExpression Expression that is evaluated on each * {@link angular.module.ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers a * call to the `listener`. * * - `string`: Evaluated as {@link guide/dev_guide.expressions expression} * - `function(scope)`: called with current `scope` as a parameter. * @param {(function()|string)=} listener Callback called whenever the return value of * the `watchExpression` changes. * * - `string`: Evaluated as {@link guide/dev_guide.expressions expression} * - `function(newValue, oldValue, scope)`: called with current and previous values as parameters. * * @param {boolean=} objectEquality Compare object for equality rather then for refference. * @returns {function()} Returns a deregistration function for this listener. */ $watch: function(watchExp, listener, objectEquality) { var scope = this, get = compileToFn(watchExp, 'watch'), array = scope.$$watchers, watcher = { fn: listener, last: initWatchVal, get: get, exp: watchExp, eq: !!objectEquality }; // in the case user pass string, we need to compile it, do we really need this ? if (!isFunction(listener)) { var listenFn = compileToFn(listener || noop, 'listener'); watcher.fn = function(newVal, oldVal, scope) {listenFn(scope);}; } if (!array) { array = scope.$$watchers = []; } // we use unshift since we use a while loop in $digest for speed. // the while loop reads in reverse order. array.unshift(watcher); return function() { arrayRemove(array, watcher); }; }, /** * @ngdoc function * @name angular.module.ng.$rootScope.Scope#$digest * @methodOf angular.module.ng.$rootScope.Scope * @function * * @description * Process all of the {@link angular.module.ng.$rootScope.Scope#$watch watchers} of the current scope and its children. * Because a {@link angular.module.ng.$rootScope.Scope#$watch watcher}'s listener can change the model, the * `$digest()` keeps calling the {@link angular.module.ng.$rootScope.Scope#$watch watchers} until no more listeners are * firing. This means that it is possible to get into an infinite loop. This function will throw * `'Maximum iteration limit exceeded.'` if the number of iterations exceeds 100. * * Usually you don't call `$digest()` directly in * {@link angular.module.ng.$compileProvider.directive.ngController controllers} or in * {@link angular.module.ng.$compileProvider.directive directives}. * Instead a call to {@link angular.module.ng.$rootScope.Scope#$apply $apply()} (typically from within a * {@link angular.module.ng.$compileProvider.directive directives}) will force a `$digest()`. * * If you want to be notified whenever `$digest()` is called, * you can register a `watchExpression` function with {@link angular.module.ng.$rootScope.Scope#$watch $watch()} * with no `listener`. * * You may have a need to call `$digest()` from within unit-tests, to simulate the scope * life-cycle. * * # Example <pre> var scope = ...; scope.name = 'misko'; scope.counter = 0; expect(scope.counter).toEqual(0); scope.$watch('name', function(scope, newValue, oldValue) { counter = counter + 1; }); expect(scope.counter).toEqual(0); scope.$digest(); // no variable change expect(scope.counter).toEqual(0); scope.name = 'adam'; scope.$digest(); expect(scope.counter).toEqual(1); </pre> * */ $digest: function() { var watch, value, last, watchers, asyncQueue, length, dirty, ttl = TTL, next, current, target = this, watchLog = [], logIdx, logMsg; flagPhase(target, '$digest'); do { dirty = false; current = target; do { asyncQueue = current.$$asyncQueue; while(asyncQueue.length) { try { current.$eval(asyncQueue.shift()); } catch (e) { $exceptionHandler(e); } } if ((watchers = current.$$watchers)) { // process our watches length = watchers.length; while (length--) { try { watch = watchers[length]; // Most common watches are on primitives, in which case we can short // circuit it with === operator, only when === fails do we use .equals if ((value = watch.get(current)) !== (last = watch.last) && !(watch.eq ? equals(value, last) : (typeof value == 'number' && typeof last == 'number' && isNaN(value) && isNaN(last)))) { dirty = true; watch.last = watch.eq ? copy(value) : value; watch.fn(value, ((last === initWatchVal) ? value : last), current); if (ttl < 5) { logIdx = 4 - ttl; if (!watchLog[logIdx]) watchLog[logIdx] = []; logMsg = (isFunction(watch.exp)) ? 'fn: ' + (watch.exp.name || watch.exp.toString()) : watch.exp; logMsg += '; newVal: ' + toJson(value) + '; oldVal: ' + toJson(last); watchLog[logIdx].push(logMsg); } } } catch (e) { $exceptionHandler(e); } } } // Insanity Warning: scope depth-first traversal // yes, this code is a bit crazy, but it works and we have tests to prove it! // this piece should be kept in sync with the traversal in $broadcast if (!(next = (current.$$childHead || (current !== target && current.$$nextSibling)))) { while(current !== target && !(next = current.$$nextSibling)) { current = current.$parent; } } } while ((current = next)); if(dirty && !(ttl--)) { throw Error(TTL + ' $digest() iterations reached. Aborting!\n' + 'Watchers fired in the last 5 iterations: ' + toJson(watchLog)); } } while (dirty || asyncQueue.length); this.$root.$$phase = null; }, /** * @ngdoc event * @name angular.module.$rootScope.Scope#$destroy * @eventOf angular.module.ng.$rootScope.Scope * @eventType broadcast on scope being destroyed * * @description * Broadcasted when a scope and its children are being destroyed. */ /** * @ngdoc function * @name angular.module.ng.$rootScope.Scope#$destroy * @methodOf angular.module.ng.$rootScope.Scope * @function * * @description * Remove the current scope (and all of its children) from the parent scope. Removal implies * that calls to {@link angular.module.ng.$rootScope.Scope#$digest $digest()} will no longer * propagate to the current scope and its children. Removal also implies that the current * scope is eligible for garbage collection. * * The `$destroy()` is usually used by directives such as * {@link angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} for managing the * unrolling of the loop. * * Just before a scope is destroyed a `$destroy` event is broadcasted on this scope. * Application code can register a `$destroy` event handler that will give it chance to * perform any necessary cleanup. */ $destroy: function() { if (this.$root == this) return; // we can't remove the root node; var parent = this.$parent; this.$broadcast('$destroy'); if (parent.$$childHead == this) parent.$$childHead = this.$$nextSibling; if (parent.$$childTail == this) parent.$$childTail = this.$$prevSibling; if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling; if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling; }, /** * @ngdoc function * @name angular.module.ng.$rootScope.Scope#$eval * @methodOf angular.module.ng.$rootScope.Scope * @function * * @description * Executes the `expression` on the current scope returning the result. Any exceptions in the * expression are propagated (uncaught). This is useful when evaluating engular expressions. * * # Example <pre> var scope = angular.module.ng.$rootScope.Scope(); scope.a = 1; scope.b = 2; expect(scope.$eval('a+b')).toEqual(3); expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3); </pre> * * @param {(string|function())=} expression An angular expression to be executed. * * - `string`: execute using the rules as defined in {@link guide/dev_guide.expressions expression}. * - `function(scope, locals)`: execute the function with the current `scope` parameter. * @param {Object=} locals Hash object of local variables for the expression. * * @returns {*} The result of evaluating the expression. */ $eval: function(expr, locals) { return $parse(expr)(this, locals); }, /** * @ngdoc function * @name angular.module.ng.$rootScope.Scope#$evalAsync * @methodOf angular.module.ng.$rootScope.Scope * @function * * @description * Executes the expression on the current scope at a later point in time. * * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only that: * * - it will execute in the current script execution context (before any DOM rendering). * - at least one {@link angular.module.ng.$rootScope.Scope#$digest $digest cycle} will be performed after * `expression` execution. * * Any exceptions from the execution of the expression are forwarded to the * {@link angular.module.ng.$exceptionHandler $exceptionHandler} service. * * @param {(string|function())=} expression An angular expression to be executed. * * - `string`: execute using the rules as defined in {@link guide/dev_guide.expressions expression}. * - `function(scope)`: execute the function with the current `scope` parameter. * */ $evalAsync: function(expr) { this.$$asyncQueue.push(expr); }, /** * @ngdoc function * @name angular.module.ng.$rootScope.Scope#$apply * @methodOf angular.module.ng.$rootScope.Scope * @function * * @description * `$apply()` is used to execute an expression in angular from outside of the angular framework. * (For example from browser DOM events, setTimeout, XHR or third party libraries). * Because we are calling into the angular framework we need to perform proper scope life-cycle * of {@link angular.module.ng.$exceptionHandler exception handling}, * {@link angular.module.ng.$rootScope.Scope#$digest executing watches}. * * ## Life cycle * * # Pseudo-Code of `$apply()` function $apply(expr) { try { return $eval(expr); } catch (e) { $exceptionHandler(e); } finally { $root.$digest(); } } * * * Scope's `$apply()` method transitions through the following stages: * * 1. The {@link guide/dev_guide.expressions expression} is executed using the * {@link angular.module.ng.$rootScope.Scope#$eval $eval()} method. * 2. Any exceptions from the execution of the expression are forwarded to the * {@link angular.module.ng.$exceptionHandler $exceptionHandler} service. * 3. The {@link angular.module.ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the expression * was executed using the {@link angular.module.ng.$rootScope.Scope#$digest $digest()} method. * * * @param {(string|function())=} exp An angular expression to be executed. * * - `string`: execute using the rules as defined in {@link guide/dev_guide.expressions expression}. * - `function(scope)`: execute the function with current `scope` parameter. * * @returns {*} The result of evaluating the expression. */ $apply: function(expr) { try { flagPhase(this, '$apply'); return this.$eval(expr); } catch (e) { $exceptionHandler(e); } finally { this.$root.$$phase = null; this.$root.$digest(); } }, /** * @ngdoc function * @name angular.module.ng.$rootScope.Scope#$on * @methodOf angular.module.ng.$rootScope.Scope * @function * * @description * Listen on events of a given type. See {@link angular.module.ng.$rootScope.Scope#$emit $emit} for discussion of * event life cycle. * * @param {string} name Event name to listen on. * @param {function(event)} listener Function to call when the event is emitted. * @returns {function()} Returns a deregistration function for this listener. * * The event listener function format is: `function(event)`. The `event` object passed into the * listener has the following attributes * * - `targetScope` - {Scope}: the scope on which the event was `$emit`-ed or `$broadcast`-ed. * - `currentScope` - {Scope}: the current scope which is handling the event. * - `name` - {string}: Name of the event. * - `cancel` - {function=}: calling `cancel` function will cancel further event propagation * (available only for events that were `$emit`-ed). * - `cancelled` - {boolean}: Whether the event was cancelled. */ $on: function(name, listener) { var namedListeners = this.$$listeners[name]; if (!namedListeners) { this.$$listeners[name] = namedListeners = []; } namedListeners.push(listener); return function() { arrayRemove(namedListeners, listener); }; }, /** * @ngdoc function * @name angular.module.ng.$rootScope.Scope#$emit * @methodOf angular.module.ng.$rootScope.Scope * @function * * @description * Dispatches an event `name` upwards through the scope hierarchy notifying the * registered {@link angular.module.ng.$rootScope.Scope#$on} listeners. * * The event life cycle starts at the scope on which `$emit` was called. All * {@link angular.module.ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get notified. * Afterwards, the event traverses upwards toward the root scope and calls all registered * listeners along the way. The event will stop propagating if one of the listeners cancels it. * * Any exception emmited from the {@link angular.module.ng.$rootScope.Scope#$on listeners} will be passed * onto the {@link angular.module.ng.$exceptionHandler $exceptionHandler} service. * * @param {string} name Event name to emit. * @param {...*} args Optional set of arguments which will be passed onto the event listeners. * @return {Object} Event object, see {@link angular.module.ng.$rootScope.Scope#$on} */ $emit: function(name, args) { var empty = [], namedListeners, scope = this, event = { name: name, targetScope: scope, cancel: function() {event.cancelled = true;}, cancelled: false }, listenerArgs = concat([event], arguments, 1), i, length; do { namedListeners = scope.$$listeners[name] || empty; event.currentScope = scope; for (i=0, length=namedListeners.length; i<length; i++) { try { namedListeners[i].apply(null, listenerArgs); if (event.cancelled) return event; } catch (e) { $exceptionHandler(e); } } //traverse upwards scope = scope.$parent; } while (scope); return event; }, /** * @ngdoc function * @name angular.module.ng.$rootScope.Scope#$broadcast * @methodOf angular.module.ng.$rootScope.Scope * @function * * @description * Dispatches an event `name` downwards to all child scopes (and their children) notifying the * registered {@link angular.module.ng.$rootScope.Scope#$on} listeners. * * The event life cycle starts at the scope on which `$broadcast` was called. All * {@link angular.module.ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get notified. * Afterwards, the event propagates to all direct and indirect scopes of the current scope and * calls all registered listeners along the way. The event cannot be canceled. * * Any exception emmited from the {@link angular.module.ng.$rootScope.Scope#$on listeners} will be passed * onto the {@link angular.module.ng.$exceptionHandler $exceptionHandler} service. * * @param {string} name Event name to emit. * @param {...*} args Optional set of arguments which will be passed onto the event listeners. * @return {Object} Event object, see {@link angular.module.ng.$rootScope.Scope#$on} */ $broadcast: function(name, args) { var target = this, current = target, next = target, event = { name: name, targetScope: target }, listenerArgs = concat([event], arguments, 1); //down while you can, then up and next sibling or up and next sibling until back at root do { current = next; event.currentScope = current; forEach(current.$$listeners[name], function(listener) { try { listener.apply(null, listenerArgs); } catch(e) { $exceptionHandler(e); } }); // Insanity Warning: scope depth-first traversal // yes, this code is a bit crazy, but it works and we have tests to prove it! // this piece should be kept in sync with the traversal in $digest if (!(next = (current.$$childHead || (current !== target && current.$$nextSibling)))) { while(current !== target && !(next = current.$$nextSibling)) { current = current.$parent; } } } while ((current = next)); return event; } }; function flagPhase(scope, phase) { var root = scope.$root; if (root.$$phase) { throw Error(root.$$phase + ' already in progress'); } root.$$phase = phase; } return new Scope(); function compileToFn(exp, name) { var fn = $parse(exp); assertArgFn(fn, name); return fn; } /** * function used as an initial value for watchers. * because it's uniqueue we can easily tell it apart from other values */ function initWatchVal() {} }]; } /** * !!! This is an undocumented "private" service !!! * * @name angular.module.ng.$sniffer * @requires $window * * @property {boolean} history Does the browser support html5 history api ? * @property {boolean} hashchange Does the browser support hashchange event ? * * @description * This is very simple implementation of testing browser's features. */ function $SnifferProvider() { this.$get = ['$window', function($window) { var eventSupport = {}; return { history: !!($window.history && $window.history.pushState), hashchange: 'onhashchange' in $window && // IE8 compatible mode lies (!$window.document.documentMode || $window.document.documentMode > 7), hasEvent: function(event) { if (isUndefined(eventSupport[event])) { var divElm = $window.document.createElement('div'); eventSupport[event] = 'on' + event in divElm; } return eventSupport[event]; } }; }]; } /** * @ngdoc object * @name angular.module.ng.$window * * @description * A reference to the browser's `window` object. While `window` * is globally available in JavaScript, it causes testability problems, because * it is a global variable. In angular we always refer to it through the * `$window` service, so it may be overriden, removed or mocked for testing. * * All expressions are evaluated with respect to current scope so they don't * suffer from window globality. * * @example <doc:example> <doc:source> <input ng-init="$window = $service('$window'); greeting='Hello World!'" type="text" ng-model="greeting" /> <button ng-click="$window.alert(greeting)">ALERT</button> </doc:source> <doc:scenario> </doc:scenario> </doc:example> */ function $WindowProvider(){ this.$get = valueFn(window); } /** * Parse headers into key value object * * @param {string} headers Raw headers as a string * @returns {Object} Parsed headers as key value object */ function parseHeaders(headers) { var parsed = {}, key, val, i; if (!headers) return parsed; forEach(headers.split('\n'), function(line) { i = line.indexOf(':'); key = lowercase(trim(line.substr(0, i))); val = trim(line.substr(i + 1)); if (key) { if (parsed[key]) { parsed[key] += ', ' + val; } else { parsed[key] = val; } } }); return parsed; } /** * Returns a function that provides access to parsed headers. * * Headers are lazy parsed when first requested. * @see parseHeaders * * @param {(string|Object)} headers Headers to provide access to. * @returns {function(string=)} Returns a getter function which if called with: * * - if called with single an argument returns a single header value or null * - if called with no arguments returns an object containing all headers. */ function headersGetter(headers) { var headersObj = isObject(headers) ? headers : undefined; return function(name) { if (!headersObj) headersObj = parseHeaders(headers); if (name) { return headersObj[lowercase(name)] || null; } return headersObj; }; } /** * Chain all given functions * * This function is used for both request and response transforming * * @param {*} data Data to transform. * @param {function(string=)} headers Http headers getter fn. * @param {(function|Array.<function>)} fns Function or an array of functions. * @returns {*} Transformed data. */ function transformData(data, headers, fns) { if (isFunction(fns)) return fns(data, headers); forEach(fns, function(fn) { data = fn(data, headers); }); return data; } function isSuccess(status) { return 200 <= status && status < 300; } function $HttpProvider() { var JSON_START = /^\s*(\[|\{[^\{])/, JSON_END = /[\}\]]\s*$/, PROTECTION_PREFIX = /^\)\]\}',?\n/; var $config = this.defaults = { // transform incoming response data transformResponse: [function(data) { if (isString(data)) { // strip json vulnerability protection prefix data = data.replace(PROTECTION_PREFIX, ''); if (JSON_START.test(data) && JSON_END.test(data)) data = fromJson(data, true); } return data; }], // transform outgoing request data transformRequest: [function(d) { return isObject(d) && !isFile(d) ? toJson(d) : d; }], // default headers headers: { common: { 'Accept': 'application/json, text/plain, */*', 'X-Requested-With': 'XMLHttpRequest' }, post: {'Content-Type': 'application/json'}, put: {'Content-Type': 'application/json'} } }; var providerResponseInterceptors = this.responseInterceptors = []; this.$get = ['$httpBackend', '$browser', '$cacheFactory', '$rootScope', '$q', '$injector', function($httpBackend, $browser, $cacheFactory, $rootScope, $q, $injector) { var defaultCache = $cacheFactory('$http'), responseInterceptors = []; forEach(providerResponseInterceptors, function(interceptor) { responseInterceptors.push( isString(interceptor) ? $injector.get(interceptor) : $injector.invoke(interceptor) ); }); /** * @ngdoc function * @name angular.module.ng.$http * @requires $httpBacked * @requires $browser * @requires $cacheFactory * @requires $rootScope * @requires $q * @requires $injector * * @description * The `$http` service is a core Angular service that facilitates communication with the remote * HTTP servers via browser's {@link https://developer.mozilla.org/en/xmlhttprequest * XMLHttpRequest} object or via {@link http://en.wikipedia.org/wiki/JSONP JSONP}. * * For unit testing applications that use `$http` service, see * {@link angular.module.ngMock.$httpBackend $httpBackend mock}. * * For a higher level of abstraction, please check out the {@link angular.module.ngResource.$resource * $resource} service. * * The $http API is based on the {@link angular.module.ng.$q deferred/promise APIs} exposed by * the $q service. While for simple usage patters this doesn't matter much, for advanced usage, * it is important to familiarize yourself with these apis and guarantees they provide. * * * # General usage * The `$http` service is a function which takes a single argument — a configuration object — * that is used to generate an http request and returns a {@link angular.module.ng.$q promise} * with two $http specific methods: `success` and `error`. * * <pre> * $http({method: 'GET', url: '/someUrl'}). * success(function(data, status, headers, config) { * // this callback will be called asynchronously * // when the response is available * }). * error(function(data, status, headers, config) { * // called asynchronously if an error occurs * // or server returns response with status * // code outside of the <200, 400) range * }); * </pre> * * Since the returned value of calling the $http function is a Promise object, you can also use * the `then` method to register callbacks, and these callbacks will receive a single argument – * an object representing the response. See the api signature and type info below for more * details. * * * # Shortcut methods * * Since all invocation of the $http service require definition of the http method and url and * POST and PUT requests require response body/data to be provided as well, shortcut methods * were created to simplify using the api: * * <pre> * $http.get('/someUrl').success(successCallback); * $http.post('/someUrl', data).success(successCallback); * </pre> * * Complete list of shortcut methods: * * - {@link angular.module.ng.$http#get $http.get} * - {@link angular.module.ng.$http#head $http.head} * - {@link angular.module.ng.$http#post $http.post} * - {@link angular.module.ng.$http#put $http.put} * - {@link angular.module.ng.$http#delete $http.delete} * - {@link angular.module.ng.$http#jsonp $http.jsonp} * * * # Setting HTTP Headers * * The $http service will automatically add certain http headers to all requests. These defaults * can be fully configured by accessing the `$httpProvider.defaults.headers` configuration * object, which currently contains this default configuration: * * - `$httpProvider.defaults.headers.common` (headers that are common for all requests): * - `Accept: application/json, text/plain, * / *` * - `X-Requested-With: XMLHttpRequest` * - `$httpProvider.defaults.headers.post`: (header defaults for HTTP POST requests) * - `Content-Type: application/json` * - `$httpProvider.defaults.headers.put` (header defaults for HTTP PUT requests) * - `Content-Type: application/json` * * To add or overwrite these defaults, simply add or remove a property from this configuration * objects. To add headers for an HTTP method other than POST or PUT, simply add a new object * with name equal to the lower-cased http method name, e.g. * `$httpProvider.defaults.headers.get['My-Header']='value'`. * * Additionally, the defaults can be set at runtime via the `$http.defaults` object in a similar * fassion as described above. * * * # Transforming Requests and Responses * * Both requests and responses can be transformed using transform functions. By default, Angular * applies these transformations: * * Request transformations: * * - if the `data` property of the request config object contains an object, serialize it into * JSON format. * * Response transformations: * * - if XSRF prefix is detected, strip it (see Security Considerations section below) * - if json response is detected, deserialize it using a JSON parser * * To override these transformation locally, specify transform functions as `transformRequest` * and/or `transformResponse` properties of the config object. To globally override the default * transforms, override the `$httpProvider.defaults.transformRequest` and * `$httpProvider.defaults.transformResponse` properties of the `$httpProvider`. * * * # Caching * * To enable caching set the configuration property `cache` to `true`. When the cache is * enabled, `$http` stores the response from the server in local cache. Next time the * response is served from the cache without sending a request to the server. * * Note that even if the response is served from cache, delivery of the data is asynchronous in * the same way that real requests are. * * If there are multiple GET requests for the same url that should be cached using the same * cache, but the cache is not populated yet, only one request to the server will be made and * the remaining requests will be fulfilled using the response for the first request. * * * # Response interceptors * * Before you start creating interceptors, be sure to understand the * {@link angular.module.ng.$q $q and deferred/promise APIs}. * * For purposes of global error handling, authentication or any kind of synchronous or * asynchronous preprocessing of received responses, it is desirable to be able to intercept * responses for http requests before they are handed over to the application code that * initiated these requests. The response interceptors leverage the {@link angular.module.ng.$q * promise apis} to fulfil this need for both synchronous and asynchronous preprocessing. * * The interceptors are service factories that are registered with the $httpProvider by * adding them to the `$httpProvider.responseInterceptors` array. The factory is called and * injected with dependencies (if specified) and returns the interceptor — a function that * takes a {@link angular.module.ng.$q promise} and returns the original or a new promise. * * <pre> * // register the interceptor as a service * $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) { * return function(promise) { * return promise.then(function(response) { * // do something on success * }, function(response) { * // do something on error * if (canRecover(response)) { * return responseOrNewPromise * } * return $q.reject(response); * }); * } * }); * * $httpProvider.responseInterceptors.push('myHttpInterceptor'); * * * // register the interceptor via an anonymous factory * $httpProvider.responseInterceptors.push(function($q, dependency1, dependency2) { * return function(promise) { * // same as above * } * }); * </pre> * * * # Security Considerations * * When designing web applications, consider security threats from: * * - {@link http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx * JSON Vulnerability} * - {@link http://en.wikipedia.org/wiki/Cross-site_request_forgery XSRF} * * Both server and the client must cooperate in order to eliminate these threats. Angular comes * pre-configured with strategies that address these issues, but for this to work backend server * cooperation is required. * * ## JSON Vulnerability Protection * * A {@link http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx * JSON Vulnerability} allows third party web-site to turn your JSON resource URL into * {@link http://en.wikipedia.org/wiki/JSON#JSONP JSONP} request under some conditions. To * counter this your server can prefix all JSON requests with following string `")]}',\n"`. * Angular will automatically strip the prefix before processing it as JSON. * * For example if your server needs to return: * <pre> * ['one','two'] * </pre> * * which is vulnerable to attack, your server can return: * <pre> * )]}', * ['one','two'] * </pre> * * Angular will strip the prefix, before processing the JSON. * * * ## Cross Site Request Forgery (XSRF) Protection * * {@link http://en.wikipedia.org/wiki/Cross-site_request_forgery XSRF} is a technique by which * an unauthorized site can gain your user's private data. Angular provides following mechanism * to counter XSRF. When performing XHR requests, the $http service reads a token from a cookie * called `XSRF-TOKEN` and sets it as the HTTP header `X-XSRF-TOKEN`. Since only JavaScript that * runs on your domain could read the cookie, your server can be assured that the XHR came from * JavaScript running on your domain. * * To take advantage of this, your server needs to set a token in a JavaScript readable session * cookie called `XSRF-TOKEN` on first HTTP GET request. On subsequent non-GET requests the * server can verify that the cookie matches `X-XSRF-TOKEN` HTTP header, and therefore be sure * that only JavaScript running on your domain could have read the token. The token must be * unique for each user and must be verifiable by the server (to prevent the JavaScript making * up its own tokens). We recommend that the token is a digest of your site's authentication * cookie with {@link http://en.wikipedia.org/wiki/Rainbow_table salt for added security}. * * * @param {object} config Object describing the request to be made and how it should be * processed. The object has following properties: * * - **method** – `{string}` – HTTP method (e.g. 'GET', 'POST', etc) * - **url** – `{string}` – Absolute or relative URL of the resource that is being requested. * - **params** – `{Object.<string|Object>}` – Map of strings or objects which will be turned to * `?key1=value1&key2=value2` after the url. If the value is not a string, it will be JSONified. * - **data** – `{string|Object}` – Data to be sent as the request message data. * - **headers** – `{Object}` – Map of strings representing HTTP headers to send to the server. * - **transformRequest** – `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` – * transform function or an array of such functions. The transform function takes the http * request body and headers and returns its transformed (typically serialized) version. * - **transformResponse** – `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` – * transform function or an array of such functions. The transform function takes the http * response body and headers and returns its transformed (typically deserialized) version. * - **cache** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the * GET request, otherwise if a cache instance built with * {@link angular.module.ng.$cacheFactory $cacheFactory}, this cache will be used for * caching. * - **timeout** – `{number}` – timeout in milliseconds. * - **withCredentials** - `{boolean}` - whether to to set the `withCredentials` flag on the * XHR object. See {@link https://developer.mozilla.org/en/http_access_control#section_5 * requests with credentials} for more information. * * @returns {HttpPromise} Returns a {@link angular.module.ng.$q promise} object with the * standard `then` method and two http specific methods: `success` and `error`. The `then` * method takes two arguments a success and an error callback which will be called with a * response object. The `success` and `error` methods take a single argument - a function that * will be called when the request succeeds or fails respectively. The arguments passed into * these functions are destructured representation of the response object passed into the * `then` method. The response object has these properties: * * - **data** – `{string|Object}` – The response body transformed with the transform functions. * - **status** – `{number}` – HTTP status code of the response. * - **headers** – `{function([headerName])}` – Header getter function. * - **config** – `{Object}` – The configuration object that was used to generate the request. * * @property {Array.<Object>} pendingRequests Array of config objects for currently pending * requests. This is primarily meant to be used for debugging purposes. * * * @example <doc:example> <doc:source jsfiddle="false"> <script> function FetchCtrl($scope, $http) { $scope.method = 'GET'; $scope.url = 'examples/http-hello.html'; $scope.fetch = function() { $scope.code = null; $scope.response = null; $http({method: $scope.method, url: $scope.url}). success(function(data, status) { $scope.status = status; $scope.data = data; }). error(function(data, status) { $scope.data = data || "Request failed"; $scope.status = status; }); }; $scope.updateModel = function(method, url) { $scope.method = method; $scope.url = url; }; } </script> <div ng-controller="FetchCtrl"> <select ng-model="method"> <option>GET</option> <option>JSONP</option> </select> <input type="text" ng-model="url" size="80"/> <button ng-click="fetch()">fetch</button><br> <button ng-click="updateModel('GET', 'examples/http-hello.html')">Sample GET</button> <button ng-click="updateModel('JSONP', 'http://angularjs.org/greet.php?callback=JSON_CALLBACK&name=Super%20Hero')">Sample JSONP</button> <button ng-click="updateModel('JSONP', 'http://angularjs.org/doesntexist&callback=JSON_CALLBACK')">Invalid JSONP</button> <pre>http status code: {{status}}</pre> <pre>http response data: {{data}}</pre> </div> </doc:source> <doc:scenario> it('should make an xhr GET request', function() { element(':button:contains("Sample GET")').click(); element(':button:contains("fetch")').click(); expect(binding('status')).toBe('200'); expect(binding('data')).toBe('Hello, $http!\n'); }); it('should make a JSONP request to angularjs.org', function() { element(':button:contains("Sample JSONP")').click(); element(':button:contains("fetch")').click(); expect(binding('status')).toBe('200'); expect(binding('data')).toMatch(/Super Hero!/); }); it('should make JSONP request to invalid URL and invoke the error handler', function() { element(':button:contains("Invalid JSONP")').click(); element(':button:contains("fetch")').click(); expect(binding('status')).toBe('0'); expect(binding('data')).toBe('Request failed'); }); </doc:scenario> </doc:example> */ function $http(config) { config.method = uppercase(config.method); var reqTransformFn = config.transformRequest || $config.transformRequest, respTransformFn = config.transformResponse || $config.transformResponse, defHeaders = $config.headers, reqHeaders = extend({'X-XSRF-TOKEN': $browser.cookies()['XSRF-TOKEN']}, defHeaders.common, defHeaders[lowercase(config.method)], config.headers), reqData = transformData(config.data, headersGetter(reqHeaders), reqTransformFn), promise; // strip content-type if data is undefined if (isUndefined(config.data)) { delete reqHeaders['Content-Type']; } // send request promise = sendReq(config, reqData, reqHeaders); // transform future response promise = promise.then(transformResponse, transformResponse); // apply interceptors forEach(responseInterceptors, function(interceptor) { promise = interceptor(promise); }); promise.success = function(fn) { promise.then(function(response) { fn(response.data, response.status, response.headers, config); }); return promise; }; promise.error = function(fn) { promise.then(null, function(response) { fn(response.data, response.status, response.headers, config); }); return promise; }; return promise; function transformResponse(response) { // make a copy since the response must be cacheable var resp = extend({}, response, { data: transformData(response.data, response.headers, respTransformFn) }); return (isSuccess(response.status)) ? resp : $q.reject(resp); } } $http.pendingRequests = []; /** * @ngdoc method * @name angular.module.ng.$http#get * @methodOf angular.module.ng.$http * * @description * Shortcut method to perform `GET` request * * @param {string} url Relative or absolute URL specifying the destination of the request * @param {Object=} config Optional configuration object * @returns {HttpPromise} Future object */ /** * @ngdoc method * @name angular.module.ng.$http#delete * @methodOf angular.module.ng.$http * * @description * Shortcut method to perform `DELETE` request * * @param {string} url Relative or absolute URL specifying the destination of the request * @param {Object=} config Optional configuration object * @returns {HttpPromise} Future object */ /** * @ngdoc method * @name angular.module.ng.$http#head * @methodOf angular.module.ng.$http * * @description * Shortcut method to perform `HEAD` request * * @param {string} url Relative or absolute URL specifying the destination of the request * @param {Object=} config Optional configuration object * @returns {HttpPromise} Future object */ /** * @ngdoc method * @name angular.module.ng.$http#jsonp * @methodOf angular.module.ng.$http * * @description * Shortcut method to perform `JSONP` request * * @param {string} url Relative or absolute URL specifying the destination of the request. * Should contain `JSON_CALLBACK` string. * @param {Object=} config Optional configuration object * @returns {HttpPromise} Future object */ createShortMethods('get', 'delete', 'head', 'jsonp'); /** * @ngdoc method * @name angular.module.ng.$http#post * @methodOf angular.module.ng.$http * * @description * Shortcut method to perform `POST` request * * @param {string} url Relative or absolute URL specifying the destination of the request * @param {*} data Request content * @param {Object=} config Optional configuration object * @returns {HttpPromise} Future object */ /** * @ngdoc method * @name angular.module.ng.$http#put * @methodOf angular.module.ng.$http * * @description * Shortcut method to perform `PUT` request * * @param {string} url Relative or absolute URL specifying the destination of the request * @param {*} data Request content * @param {Object=} config Optional configuration object * @returns {HttpPromise} Future object */ createShortMethodsWithData('post', 'put'); /** * @ngdoc property * @name angular.module.ng.$http#defaults * @propertyOf angular.module.ng.$http * * @description * Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of * default headers as well as request and response transformations. * * See "Setting HTTP Headers" and "Transforming Requests and Responses" sections above. */ $http.defaults = $config; return $http; function createShortMethods(names) { forEach(arguments, function(name) { $http[name] = function(url, config) { return $http(extend(config || {}, { method: name, url: url })); }; }); } function createShortMethodsWithData(name) { forEach(arguments, function(name) { $http[name] = function(url, data, config) { return $http(extend(config || {}, { method: name, url: url, data: data })); }; }); } /** * Makes the request * * !!! ACCESSES CLOSURE VARS: * $httpBackend, $config, $log, $rootScope, defaultCache, $http.pendingRequests */ function sendReq(config, reqData, reqHeaders) { var deferred = $q.defer(), promise = deferred.promise, cache, cachedResp, url = buildUrl(config.url, config.params); $http.pendingRequests.push(config); promise.then(removePendingReq, removePendingReq); if (config.cache && config.method == 'GET') { cache = isObject(config.cache) ? config.cache : defaultCache; } if (cache) { cachedResp = cache.get(url); if (cachedResp) { if (cachedResp.then) { // cached request has already been sent, but there is no response yet cachedResp.then(removePendingReq, removePendingReq); return cachedResp; } else { // serving from cache if (isArray(cachedResp)) { resolvePromise(cachedResp[1], cachedResp[0], copy(cachedResp[2])); } else { resolvePromise(cachedResp, 200, {}); } } } else { // put the promise for the non-transformed response into cache as a placeholder cache.put(url, promise); } } // if we won't have the response in cache, send the request to the backend if (!cachedResp) { $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout, config.withCredentials); } return promise; /** * Callback registered to $httpBackend(): * - caches the response if desired * - resolves the raw $http promise * - calls $apply */ function done(status, response, headersString) { if (cache) { if (isSuccess(status)) { cache.put(url, [status, response, parseHeaders(headersString)]); } else { // remove promise from the cache cache.remove(url); } } resolvePromise(response, status, headersString); $rootScope.$apply(); } /** * Resolves the raw $http promise. */ function resolvePromise(response, status, headers) { // normalize internal statuses to 0 status = Math.max(status, 0); (isSuccess(status) ? deferred.resolve : deferred.reject)({ data: response, status: status, headers: headersGetter(headers), config: config }); } function removePendingReq() { var idx = indexOf($http.pendingRequests, config); if (idx !== -1) $http.pendingRequests.splice(idx, 1); } } function buildUrl(url, params) { if (!params) return url; var parts = []; forEachSorted(params, function(value, key) { if (value == null || value == undefined) return; if (isObject(value)) { value = toJson(value); } parts.push(encodeURIComponent(key) + '=' + encodeURIComponent(value)); }); return url + ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&'); } }]; } var XHR = window.XMLHttpRequest || function() { try { return new ActiveXObject("Msxml2.XMLHTTP.6.0"); } catch (e1) {} try { return new ActiveXObject("Msxml2.XMLHTTP.3.0"); } catch (e2) {} try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e3) {} throw new Error("This browser does not support XMLHttpRequest."); }; /** * @ngdoc object * @name angular.module.ng.$httpBackend * @requires $browser * @requires $window * @requires $document * * @description * HTTP backend used by the {@link angular.module.ng.$http service} that delegates to * XMLHttpRequest object or JSONP and deals with browser incompatibilities. * * You should never need to use this service directly, instead use the higher-level abstractions: * {@link angular.module.ng.$http $http} or {@link angular.module.ngResource.$resource $resource}. * * During testing this implementation is swapped with {@link angular.module.ngMock.$httpBackend mock * $httpBackend} which can be trained with responses. */ function $HttpBackendProvider() { this.$get = ['$browser', '$window', '$document', function($browser, $window, $document) { return createHttpBackend($browser, XHR, $browser.defer, $window.angular.callbacks, $document[0], $window.location.protocol.replace(':', '')); }]; } function createHttpBackend($browser, XHR, $browserDefer, callbacks, rawDocument, locationProtocol) { // TODO(vojta): fix the signature return function(method, url, post, callback, headers, timeout, withCredentials) { $browser.$$incOutstandingRequestCount(); url = url || $browser.url(); if (lowercase(method) == 'jsonp') { var callbackId = '_' + (callbacks.counter++).toString(36); callbacks[callbackId] = function(data) { callbacks[callbackId].data = data; }; jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId), function() { if (callbacks[callbackId].data) { completeRequest(callback, 200, callbacks[callbackId].data); } else { completeRequest(callback, -2); } delete callbacks[callbackId]; }); } else { var xhr = new XHR(); xhr.open(method, url, true); forEach(headers, function(value, key) { if (value) xhr.setRequestHeader(key, value); }); var status; // In IE6 and 7, this might be called synchronously when xhr.send below is called and the // response is in the cache. the promise api will ensure that to the app code the api is // always async xhr.onreadystatechange = function() { if (xhr.readyState == 4) { completeRequest( callback, status || xhr.status, xhr.responseText, xhr.getAllResponseHeaders()); } }; if (withCredentials) { xhr.withCredentials = true; } xhr.send(post || ''); if (timeout > 0) { $browserDefer(function() { status = -1; xhr.abort(); }, timeout); } } function completeRequest(callback, status, response, headersString) { // URL_MATCH is defined in src/service/location.js var protocol = (url.match(URL_MATCH) || ['', locationProtocol])[1]; // fix status code for file protocol (it's always 0) status = (protocol == 'file') ? (response ? 200 : 404) : status; // normalize IE bug (http://bugs.jquery.com/ticket/1450) status = status == 1223 ? 204 : status; callback(status, response, headersString); $browser.$$completeOutstandingRequest(noop); } }; function jsonpReq(url, done) { // we can't use jQuery/jqLite here because jQuery does crazy shit with script elements, e.g.: // - fetches local scripts via XHR and evals them // - adds and immediately removes script elements from the document var script = rawDocument.createElement('script'), doneWrapper = function() { rawDocument.body.removeChild(script); if (done) done(); }; script.type = 'text/javascript'; script.src = url; if (msie) { script.onreadystatechange = function() { if (/loaded|complete/.test(script.readyState)) doneWrapper(); }; } else { script.onload = script.onerror = doneWrapper; } rawDocument.body.appendChild(script); } } /** * @ngdoc object * @name angular.module.ng.$locale * * @description * $locale service provides localization rules for various Angular components. As of right now the * only public api is: * * * `id` – `{string}` – locale id formatted as `languageId-countryId` (e.g. `en-us`) */ function $LocaleProvider(){ this.$get = function() { return { id: 'en-us', NUMBER_FORMATS: { DECIMAL_SEP: '.', GROUP_SEP: ',', PATTERNS: [ { // Decimal Pattern minInt: 1, minFrac: 0, maxFrac: 3, posPre: '', posSuf: '', negPre: '-', negSuf: '', gSize: 3, lgSize: 3 },{ //Currency Pattern minInt: 1, minFrac: 2, maxFrac: 2, posPre: '\u00A4', posSuf: '', negPre: '(\u00A4', negSuf: ')', gSize: 3, lgSize: 3 } ], CURRENCY_SYM: '$' }, DATETIME_FORMATS: { MONTH: 'January,February,March,April,May,June,July,August,September,October,November,December' .split(','), SHORTMONTH: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','), DAY: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','), SHORTDAY: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(','), AMPMS: ['AM','PM'], medium: 'MMM d, y h:mm:ss a', short: 'M/d/yy h:mm a', fullDate: 'EEEE, MMMM d, y', longDate: 'MMMM d, y', mediumDate: 'MMM d, y', shortDate: 'M/d/yy', mediumTime: 'h:mm:ss a', shortTime: 'h:mm a' }, pluralCat: function(num) { if (num === 1) { return 'one'; } return 'other'; } }; }; } /** * @ngdoc object * @name angular.module.ng.$filterProvider * @description * * Filters are just functions which transform input to an output. However filters need to be Dependency Injected. To * achieve this a filter definition consists of a factory function which is annotated with dependencies and is * responsible for creating a the filter function. * * <pre> * // Filter registration * function MyModule($provide, $filterProvider) { * // create a service to demonstrate injection (not always needed) * $provide.value('greet', function(name){ * return 'Hello ' + name + '!': * }); * * // register a filter factory which uses the * // greet service to demonstrate DI. * $filterProvider.register('greet', function(greet){ * // return the filter function which uses the greet service * // to generate salutation * return function(text) { * // filters need to be forgiving so check input validity * return text && greet(text) || text; * }; * }; * } * </pre> * * The filter function is registered with the `$injector` under the filter name suffixe with `Filter`. * <pre> * it('should be the same instance', inject( * function($filterProvider) { * $filterProvider.register('reverse', function(){ * return ...; * }); * }, * function($filter, reverseFilter) { * expect($filter('reverse')).toBe(reverseFilter); * }); * </pre> * * * For more information about how angular filters work, and how to create your own filters, see * {@link guide/dev_guide.templates.filters Understanding Angular Filters} in the angular Developer * Guide. */ /** * @ngdoc method * @name angular.module.ng.$filterProvider#register * @methodOf angular.module.ng.$filterProvider * @description * Register filter factory function. * * @param {String} name Name of the filter. * @param {function} fn The filter factory function which is injectable. */ /** * @ngdoc function * @name angular.module.ng.$filter * @function * @description * Filters are used for formatting data displayed to the user. * * The general syntax in templates is as follows: * * {{ expression | [ filter_name ] }} * * @param {String} name Name of the filter function to retrieve * @return {Function} the filter function */ $FilterProvider.$inject = ['$provide']; function $FilterProvider($provide) { var suffix = 'Filter'; function register(name, factory) { return $provide.factory(name + suffix, factory); } this.register = register; this.$get = ['$injector', function($injector) { return function(name) { return $injector.get(name + suffix); } }]; //////////////////////////////////////// register('currency', currencyFilter); register('date', dateFilter); register('filter', filterFilter); register('json', jsonFilter); register('limitTo', limitToFilter); register('lowercase', lowercaseFilter); register('number', numberFilter); register('orderBy', orderByFilter); register('uppercase', uppercaseFilter); } /** * @ngdoc filter * @name angular.module.ng.$filter.filter * @function * * @description * Selects a subset of items from `array` and returns it as a new array. * * Note: This function is used to augment the `Array` type in Angular expressions. See * {@link angular.module.ng.$filter} for more information about Angular arrays. * * @param {Array} array The source array. * @param {string|Object|function()} expression The predicate to be used for selecting items from * `array`. * * Can be one of: * * - `string`: Predicate that results in a substring match using the value of `expression` * string. All strings or objects with string properties in `array` that contain this string * will be returned. The predicate can be negated by prefixing the string with `!`. * * - `Object`: A pattern object can be used to filter specific properties on objects contained * by `array`. For example `{name:"M", phone:"1"}` predicate will return an array of items * which have property `name` containing "M" and property `phone` containing "1". A special * property name `$` can be used (as in `{$:"text"}`) to accept a match against any * property of the object. That's equivalent to the simple substring match with a `string` * as described above. * * - `function`: A predicate function can be used to write arbitrary filters. The function is * called for each element of `array`. The final result is an array of those elements that * the predicate returned true for. * * @example <doc:example> <doc:source> <div ng-init="friends = [{name:'John', phone:'555-1276'}, {name:'Mary', phone:'800-BIG-MARY'}, {name:'Mike', phone:'555-4321'}, {name:'Adam', phone:'555-5678'}, {name:'Julie', phone:'555-8765'}]"></div> Search: <input ng-model="searchText"> <table id="searchTextResults"> <tr><th>Name</th><th>Phone</th><tr> <tr ng-repeat="friend in friends | filter:searchText"> <td>{{friend.name}}</td> <td>{{friend.phone}}</td> <tr> </table> <hr> Any: <input ng-model="search.$"> <br> Name only <input ng-model="search.name"><br> Phone only <input ng-model="search.phone"å><br> <table id="searchObjResults"> <tr><th>Name</th><th>Phone</th><tr> <tr ng-repeat="friend in friends | filter:search"> <td>{{friend.name}}</td> <td>{{friend.phone}}</td> <tr> </table> </doc:source> <doc:scenario> it('should search across all fields when filtering with a string', function() { input('searchText').enter('m'); expect(repeater('#searchTextResults tr', 'friend in friends').column('friend.name')). toEqual(['Mary', 'Mike', 'Adam']); input('searchText').enter('76'); expect(repeater('#searchTextResults tr', 'friend in friends').column('friend.name')). toEqual(['John', 'Julie']); }); it('should search in specific fields when filtering with a predicate object', function() { input('search.$').enter('i'); expect(repeater('#searchObjResults tr', 'friend in friends').column('friend.name')). toEqual(['Mary', 'Mike', 'Julie']); }); </doc:scenario> </doc:example> */ function filterFilter() { return function(array, expression) { if (!(array instanceof Array)) return array; var predicates = []; predicates.check = function(value) { for (var j = 0; j < predicates.length; j++) { if(!predicates[j](value)) { return false; } } return true; }; var search = function(obj, text){ if (text.charAt(0) === '!') { return !search(obj, text.substr(1)); } switch (typeof obj) { case "boolean": case "number": case "string": return ('' + obj).toLowerCase().indexOf(text) > -1; case "object": for ( var objKey in obj) { if (objKey.charAt(0) !== '$' && search(obj[objKey], text)) { return true; } } return false; case "array": for ( var i = 0; i < obj.length; i++) { if (search(obj[i], text)) { return true; } } return false; default: return false; } }; switch (typeof expression) { case "boolean": case "number": case "string": expression = {$:expression}; case "object": for (var key in expression) { if (key == '$') { (function() { var text = (''+expression[key]).toLowerCase(); if (!text) return; predicates.push(function(value) { return search(value, text); }); })(); } else { (function() { var path = key; var text = (''+expression[key]).toLowerCase(); if (!text) return; predicates.push(function(value) { return search(getter(value, path), text); }); })(); } } break; case 'function': predicates.push(expression); break; default: return array; } var filtered = []; for ( var j = 0; j < array.length; j++) { var value = array[j]; if (predicates.check(value)) { filtered.push(value); } } return filtered; } } /** * @ngdoc filter * @name angular.module.ng.$filter.currency * @function * * @description * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default * symbol for current locale is used. * * @param {number} amount Input to filter. * @param {string=} symbol Currency symbol or identifier to be displayed. * @returns {string} Formatted number. * * * @example <doc:example> <doc:source> <script> function Ctrl($scope) { $scope.amount = 1234.56; } </script> <div ng-controller="Ctrl"> <input type="number" ng-model="amount"> <br> default currency symbol ($): {{amount | currency}}<br> custom currency identifier (USD$): {{amount | currency:"USD$"}} </div> </doc:source> <doc:scenario> it('should init with 1234.56', function() { expect(binding('amount | currency')).toBe('$1,234.56'); expect(binding('amount | currency:"USD$"')).toBe('USD$1,234.56'); }); it('should update', function() { input('amount').enter('-1234'); expect(binding('amount | currency')).toBe('($1,234.00)'); expect(binding('amount | currency:"USD$"')).toBe('(USD$1,234.00)'); }); </doc:scenario> </doc:example> */ currencyFilter.$inject = ['$locale']; function currencyFilter($locale) { var formats = $locale.NUMBER_FORMATS; return function(amount, currencySymbol){ if (isUndefined(currencySymbol)) currencySymbol = formats.CURRENCY_SYM; return formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, 2). replace(/\u00A4/g, currencySymbol); }; } /** * @ngdoc filter * @name angular.module.ng.$filter.number * @function * * @description * Formats a number as text. * * If the input is not a number an empty string is returned. * * @param {number|string} number Number to format. * @param {(number|string)=} [fractionSize=2] Number of decimal places to round the number to. * @returns {string} Number rounded to decimalPlaces and places a “,” after each third digit. * * @example <doc:example> <doc:source> <script> function Ctrl($scope) { $scope.val = 1234.56789; } </script> <div ng-controller="Ctrl"> Enter number: <input ng-model='val'><br> Default formatting: {{val | number}}<br> No fractions: {{val | number:0}}<br> Negative number: {{-val | number:4}} </div> </doc:source> <doc:scenario> it('should format numbers', function() { expect(binding('val | number')).toBe('1,234.568'); expect(binding('val | number:0')).toBe('1,235'); expect(binding('-val | number:4')).toBe('-1,234.5679'); }); it('should update', function() { input('val').enter('3374.333'); expect(binding('val | number')).toBe('3,374.333'); expect(binding('val | number:0')).toBe('3,374'); expect(binding('-val | number:4')).toBe('-3,374.3330'); }); </doc:scenario> </doc:example> */ numberFilter.$inject = ['$locale']; function numberFilter($locale) { var formats = $locale.NUMBER_FORMATS; return function(number, fractionSize) { return formatNumber(number, formats.PATTERNS[0], formats.GROUP_SEP, formats.DECIMAL_SEP, fractionSize); }; } var DECIMAL_SEP = '.'; function formatNumber(number, pattern, groupSep, decimalSep, fractionSize) { if (isNaN(number) || !isFinite(number)) return ''; var isNegative = number < 0; number = Math.abs(number); var numStr = number + '', formatedText = '', parts = []; if (numStr.indexOf('e') !== -1) { formatedText = numStr; } else { var fractionLen = (numStr.split(DECIMAL_SEP)[1] || '').length; // determine fractionSize if it is not specified if (isUndefined(fractionSize)) { fractionSize = Math.min(Math.max(pattern.minFrac, fractionLen), pattern.maxFrac); } var pow = Math.pow(10, fractionSize); number = Math.round(number * pow) / pow; var fraction = ('' + number).split(DECIMAL_SEP); var whole = fraction[0]; fraction = fraction[1] || ''; var pos = 0, lgroup = pattern.lgSize, group = pattern.gSize; if (whole.length >= (lgroup + group)) { pos = whole.length - lgroup; for (var i = 0; i < pos; i++) { if ((pos - i)%group === 0 && i !== 0) { formatedText += groupSep; } formatedText += whole.charAt(i); } } for (i = pos; i < whole.length; i++) { if ((whole.length - i)%lgroup === 0 && i !== 0) { formatedText += groupSep; } formatedText += whole.charAt(i); } // format fraction part. while(fraction.length < fractionSize) { fraction += '0'; } if (fractionSize) formatedText += decimalSep + fraction.substr(0, fractionSize); } parts.push(isNegative ? pattern.negPre : pattern.posPre); parts.push(formatedText); parts.push(isNegative ? pattern.negSuf : pattern.posSuf); return parts.join(''); } function padNumber(num, digits, trim) { var neg = ''; if (num < 0) { neg = '-'; num = -num; } num = '' + num; while(num.length < digits) num = '0' + num; if (trim) num = num.substr(num.length - digits); return neg + num; } function dateGetter(name, size, offset, trim) { return function(date) { var value = date['get' + name](); if (offset > 0 || value > -offset) value += offset; if (value === 0 && offset == -12 ) value = 12; return padNumber(value, size, trim); }; } function dateStrGetter(name, shortForm) { return function(date, formats) { var value = date['get' + name](); var get = uppercase(shortForm ? ('SHORT' + name) : name); return formats[get][value]; }; } function timeZoneGetter(date) { var offset = date.getTimezoneOffset(); return padNumber(offset / 60, 2) + padNumber(Math.abs(offset % 60), 2); } function ampmGetter(date, formats) { return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1]; } var DATE_FORMATS = { yyyy: dateGetter('FullYear', 4), yy: dateGetter('FullYear', 2, 0, true), y: dateGetter('FullYear', 1), MMMM: dateStrGetter('Month'), MMM: dateStrGetter('Month', true), MM: dateGetter('Month', 2, 1), M: dateGetter('Month', 1, 1), dd: dateGetter('Date', 2), d: dateGetter('Date', 1), HH: dateGetter('Hours', 2), H: dateGetter('Hours', 1), hh: dateGetter('Hours', 2, -12), h: dateGetter('Hours', 1, -12), mm: dateGetter('Minutes', 2), m: dateGetter('Minutes', 1), ss: dateGetter('Seconds', 2), s: dateGetter('Seconds', 1), EEEE: dateStrGetter('Day'), EEE: dateStrGetter('Day', true), a: ampmGetter, Z: timeZoneGetter }; var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/, NUMBER_STRING = /^\d+$/; /** * @ngdoc filter * @name angular.module.ng.$filter.date * @function * * @description * Formats `date` to a string based on the requested `format`. * * `format` string can be composed of the following elements: * * * `'yyyy'`: 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010) * * `'yy'`: 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10) * * `'y'`: 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199) * * `'MMMM'`: Month in year (January-December) * * `'MMM'`: Month in year (Jan-Dec) * * `'MM'`: Month in year, padded (01-12) * * `'M'`: Month in year (1-12) * * `'dd'`: Day in month, padded (01-31) * * `'d'`: Day in month (1-31) * * `'EEEE'`: Day in Week,(Sunday-Saturday) * * `'EEE'`: Day in Week, (Sun-Sat) * * `'HH'`: Hour in day, padded (00-23) * * `'H'`: Hour in day (0-23) * * `'hh'`: Hour in am/pm, padded (01-12) * * `'h'`: Hour in am/pm, (1-12) * * `'mm'`: Minute in hour, padded (00-59) * * `'m'`: Minute in hour (0-59) * * `'ss'`: Second in minute, padded (00-59) * * `'s'`: Second in minute (0-59) * * `'a'`: am/pm marker * * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-1200) * * `format` string can also be one of the following predefined * {@link guide/dev_guide.i18n localizable formats}: * * * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale * (e.g. Sep 3, 2010 12:05:08 pm) * * `'short'`: equivalent to `'M/d/yy h:mm a'` for en_US locale (e.g. 9/3/10 12:05 pm) * * `'fullDate'`: equivalent to `'EEEE, MMMM d,y'` for en_US locale * (e.g. Friday, September 3, 2010) * * `'longDate'`: equivalent to `'MMMM d, y'` for en_US locale (e.g. September 3, 2010 * * `'mediumDate'`: equivalent to `'MMM d, y'` for en_US locale (e.g. Sep 3, 2010) * * `'shortDate'`: equivalent to `'M/d/yy'` for en_US locale (e.g. 9/3/10) * * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 pm) * * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 pm) * * `format` string can contain literal values. These need to be quoted with single quotes (e.g. * `"h 'in the morning'"`). In order to output single quote, use two single quotes in a sequence * (e.g. `"h o''clock"`). * * @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or * number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.SSSZ and it's * shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). * @param {string=} format Formatting rules (see Description). If not specified, * `mediumDate` is used. * @returns {string} Formatted string or the input if input is not recognized as date/millis. * * @example <doc:example> <doc:source> <span ng-non-bindable>{{1288323623006 | date:'medium'}}</span>: {{1288323623006 | date:'medium'}}<br> <span ng-non-bindable>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span>: {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}<br> <span ng-non-bindable>{{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}</span>: {{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}<br> </doc:source> <doc:scenario> it('should format date', function() { expect(binding("1288323623006 | date:'medium'")). toMatch(/Oct 2\d, 2010 \d{1,2}:\d{2}:\d{2} (AM|PM)/); expect(binding("1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'")). toMatch(/2010\-10\-2\d \d{2}:\d{2}:\d{2} \-?\d{4}/); expect(binding("'1288323623006' | date:'MM/dd/yyyy @ h:mma'")). toMatch(/10\/2\d\/2010 @ \d{1,2}:\d{2}(AM|PM)/); }); </doc:scenario> </doc:example> */ dateFilter.$inject = ['$locale']; function dateFilter($locale) { var R_ISO8601_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/; function jsonStringToDate(string){ var match; if (match = string.match(R_ISO8601_STR)) { var date = new Date(0), tzHour = 0, tzMin = 0; if (match[9]) { tzHour = int(match[9] + match[10]); tzMin = int(match[9] + match[11]); } date.setUTCFullYear(int(match[1]), int(match[2]) - 1, int(match[3])); date.setUTCHours(int(match[4]||0) - tzHour, int(match[5]||0) - tzMin, int(match[6]||0), int(match[7]||0)); return date; } return string; } return function(date, format) { var text = '', parts = [], fn, match; format = format || 'mediumDate'; format = $locale.DATETIME_FORMATS[format] || format; if (isString(date)) { if (NUMBER_STRING.test(date)) { date = int(date); } else { date = jsonStringToDate(date); } } if (isNumber(date)) { date = new Date(date); } if (!isDate(date)) { return date; } while(format) { match = DATE_FORMATS_SPLIT.exec(format); if (match) { parts = concat(parts, match, 1); format = parts.pop(); } else { parts.push(format); format = null; } } forEach(parts, function(value){ fn = DATE_FORMATS[value]; text += fn ? fn(date, $locale.DATETIME_FORMATS) : value.replace(/(^'|'$)/g, '').replace(/''/g, "'"); }); return text; }; } /** * @ngdoc filter * @name angular.module.ng.$filter.json * @function * * @description * Allows you to convert a JavaScript object into JSON string. * * This filter is mostly useful for debugging. When using the double curly {{value}} notation * the binding is automatically converted to JSON. * * @param {*} object Any JavaScript object (including arrays and primitive types) to filter. * @returns {string} JSON string. * * * @example: <doc:example> <doc:source> <pre>{{ {'name':'value'} | json }}</pre> </doc:source> <doc:scenario> it('should jsonify filtered objects', function() { expect(binding("{'name':'value'}")).toMatch(/\{\n "name": ?"value"\n}/); }); </doc:scenario> </doc:example> * */ function jsonFilter() { return function(object) { return toJson(object, true); }; } /** * @ngdoc filter * @name angular.module.ng.$filter.lowercase * @function * @description * Converts string to lowercase. * @see angular.lowercase */ var lowercaseFilter = valueFn(lowercase); /** * @ngdoc filter * @name angular.module.ng.$filter.uppercase * @function * @description * Converts string to uppercase. * @see angular.uppercase */ var uppercaseFilter = valueFn(uppercase); /** * @ngdoc function * @name angular.module.ng.$filter.limitTo * @function * * @description * Creates a new array containing only a specified number of elements in an array. The elements * are taken from either the beginning or the end of the source array, as specified by the * value and sign (positive or negative) of `limit`. * * Note: This function is used to augment the `Array` type in Angular expressions. See * {@link angular.module.ng.$filter} for more information about Angular arrays. * * @param {Array} array Source array to be limited. * @param {string|Number} limit The length of the returned array. If the `limit` number is * positive, `limit` number of items from the beginning of the source array are copied. * If the number is negative, `limit` number of items from the end of the source array are * copied. The `limit` will be trimmed if it exceeds `array.length` * @returns {Array} A new sub-array of length `limit` or less if input array had less than `limit` * elements. * * @example <doc:example> <doc:source> <script> function Ctrl($scope) { $scope.numbers = [1,2,3,4,5,6,7,8,9]; $scope.limit = 3; } </script> <div ng-controller="Ctrl"> Limit {{numbers}} to: <input type="integer" ng-model="limit"> <p>Output: {{ numbers | limitTo:limit }}</p> </div> </doc:source> <doc:scenario> it('should limit the numer array to first three items', function() { expect(element('.doc-example-live input[ng-model=limit]').val()).toBe('3'); expect(binding('numbers | limitTo:limit')).toEqual('[1,2,3]'); }); it('should update the output when -3 is entered', function() { input('limit').enter(-3); expect(binding('numbers | limitTo:limit')).toEqual('[7,8,9]'); }); it('should not exceed the maximum size of input array', function() { input('limit').enter(100); expect(binding('numbers | limitTo:limit')).toEqual('[1,2,3,4,5,6,7,8,9]'); }); </doc:scenario> </doc:example> */ function limitToFilter(){ return function(array, limit) { if (!(array instanceof Array)) return array; limit = int(limit); var out = [], i, n; // check that array is iterable if (!array || !(array instanceof Array)) return out; // if abs(limit) exceeds maximum length, trim it if (limit > array.length) limit = array.length; else if (limit < -array.length) limit = -array.length; if (limit > 0) { i = 0; n = limit; } else { i = array.length + limit; n = array.length; } for (; i<n; i++) { out.push(array[i]); } return out; } } /** * @ngdoc function * @name angular.module.ng.$filter.orderBy * @function * * @description * Orders a specified `array` by the `expression` predicate. * * Note: this function is used to augment the `Array` type in Angular expressions. See * {@link angular.module.ng.$filter} for more informaton about Angular arrays. * * @param {Array} array The array to sort. * @param {function(*)|string|Array.<(function(*)|string)>} expression A predicate to be * used by the comparator to determine the order of elements. * * Can be one of: * * - `function`: Getter function. The result of this function will be sorted using the * `<`, `=`, `>` operator. * - `string`: An Angular expression which evaluates to an object to order by, such as 'name' * to sort by a property called 'name'. Optionally prefixed with `+` or `-` to control * ascending or descending sort order (for example, +name or -name). * - `Array`: An array of function or string predicates. The first predicate in the array * is used for sorting, but when two items are equivalent, the next predicate is used. * * @param {boolean=} reverse Reverse the order the array. * @returns {Array} Sorted copy of the source array. * * @example <doc:example> <doc:source> <script> function Ctrl($scope) { $scope.friends = [{name:'John', phone:'555-1212', age:10}, {name:'Mary', phone:'555-9876', age:19}, {name:'Mike', phone:'555-4321', age:21}, {name:'Adam', phone:'555-5678', age:35}, {name:'Julie', phone:'555-8765', age:29}] $scope.predicate = '-age'; } </script> <div ng-controller="Ctrl"> <pre>Sorting predicate = {{predicate}}; reverse = {{reverse}}</pre> <hr/> [ <a href="" ng-click="predicate=''">unsorted</a> ] <table class="friend"> <tr> <th><a href="" ng-click="predicate = 'name'; reverse=false">Name</a> (<a href ng-click="predicate = '-name'; reverse=false">^</a>)</th> <th><a href="" ng-click="predicate = 'phone'; reverse=!reverse">Phone Number</a></th> <th><a href="" ng-click="predicate = 'age'; reverse=!reverse">Age</a></th> <tr> <tr ng-repeat="friend in friends | orderBy:predicate:reverse"> <td>{{friend.name}}</td> <td>{{friend.phone}}</td> <td>{{friend.age}}</td> <tr> </table> </div> </doc:source> <doc:scenario> it('should be reverse ordered by aged', function() { expect(binding('predicate')).toBe('-age'); expect(repeater('table.friend', 'friend in friends').column('friend.age')). toEqual(['35', '29', '21', '19', '10']); expect(repeater('table.friend', 'friend in friends').column('friend.name')). toEqual(['Adam', 'Julie', 'Mike', 'Mary', 'John']); }); it('should reorder the table when user selects different predicate', function() { element('.doc-example-live a:contains("Name")').click(); expect(repeater('table.friend', 'friend in friends').column('friend.name')). toEqual(['Adam', 'John', 'Julie', 'Mary', 'Mike']); expect(repeater('table.friend', 'friend in friends').column('friend.age')). toEqual(['35', '10', '29', '19', '21']); element('.doc-example-live a:contains("Phone")').click(); expect(repeater('table.friend', 'friend in friends').column('friend.phone')). toEqual(['555-9876', '555-8765', '555-5678', '555-4321', '555-1212']); expect(repeater('table.friend', 'friend in friends').column('friend.name')). toEqual(['Mary', 'Julie', 'Adam', 'Mike', 'John']); }); </doc:scenario> </doc:example> */ orderByFilter.$inject = ['$parse']; function orderByFilter($parse){ return function(array, sortPredicate, reverseOrder) { if (!(array instanceof Array)) return array; if (!sortPredicate) return array; sortPredicate = isArray(sortPredicate) ? sortPredicate: [sortPredicate]; sortPredicate = map(sortPredicate, function(predicate){ var descending = false, get = predicate || identity; if (isString(predicate)) { if ((predicate.charAt(0) == '+' || predicate.charAt(0) == '-')) { descending = predicate.charAt(0) == '-'; predicate = predicate.substring(1); } get = $parse(predicate); } return reverseComparator(function(a,b){ return compare(get(a),get(b)); }, descending); }); var arrayCopy = []; for ( var i = 0; i < array.length; i++) { arrayCopy.push(array[i]); } return arrayCopy.sort(reverseComparator(comparator, reverseOrder)); function comparator(o1, o2){ for ( var i = 0; i < sortPredicate.length; i++) { var comp = sortPredicate[i](o1, o2); if (comp !== 0) return comp; } return 0; } function reverseComparator(comp, descending) { return toBoolean(descending) ? function(a,b){return comp(b,a);} : comp; } function compare(v1, v2){ var t1 = typeof v1; var t2 = typeof v2; if (t1 == t2) { if (t1 == "string") v1 = v1.toLowerCase(); if (t1 == "string") v2 = v2.toLowerCase(); if (v1 === v2) return 0; return v1 < v2 ? -1 : 1; } else { return t1 < t2 ? -1 : 1; } } } } function ngDirective(directive) { if (isFunction(directive)) { directive = { link: directive } } directive.restrict = directive.restrict || 'AC'; return valueFn(directive); } /* * Modifies the default behavior of html A tag, so that the default action is prevented when href * attribute is empty. * * The reasoning for this change is to allow easy creation of action links with `ngClick` directive * without changing the location or causing page reloads, e.g.: * <a href="" ng-click="model.$save()">Save</a> */ var htmlAnchorDirective = valueFn({ restrict: 'E', compile: function(element, attr) { // turn <a href ng-click="..">link</a> into a link in IE // but only if it doesn't have name attribute, in which case it's an anchor if (!attr.href) { attr.$set('href', ''); } return function(scope, element) { element.bind('click', function(event){ // if we have no href url, then don't navigate anywhere. if (!element.attr('href')) { event.preventDefault(); } }); } } }); /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngHref * @restrict A * * @description * Using Angular markup like {{hash}} in an href attribute makes * the page open to a wrong URL, if the user clicks that link before * angular has a chance to replace the {{hash}} with actual URL, the * link will be broken and will most likely return a 404 error. * The `ngHref` directive solves this problem. * * The buggy way to write it: * <pre> * <a href="http://www.gravatar.com/avatar/{{hash}}"/> * </pre> * * The correct way to write it: * <pre> * <a ng-href="http://www.gravatar.com/avatar/{{hash}}"/> * </pre> * * @element A * @param {template} ngHref any string which can contain `{{}}` markup. * * @example * This example uses `link` variable inside `href` attribute: <doc:example> <doc:source> <input ng-model="value" /><br /> <a id="link-1" href ng-click="value = 1">link 1</a> (link, don't reload)<br /> <a id="link-2" href="" ng-click="value = 2">link 2</a> (link, don't reload)<br /> <a id="link-3" ng-href="/{{'123'}}">link 3</a> (link, reload!)<br /> <a id="link-4" href="" name="xx" ng-click="value = 4">anchor</a> (link, don't reload)<br /> <a id="link-5" name="xxx" ng-click="value = 5">anchor</a> (no link)<br /> <a id="link-6" ng-href="{{value}}">link</a> (link, change location) </doc:source> <doc:scenario> it('should execute ng-click but not reload when href without value', function() { element('#link-1').click(); expect(input('value').val()).toEqual('1'); expect(element('#link-1').attr('href')).toBe(""); }); it('should execute ng-click but not reload when href empty string', function() { element('#link-2').click(); expect(input('value').val()).toEqual('2'); expect(element('#link-2').attr('href')).toBe(""); }); it('should execute ng-click and change url when ng-href specified', function() { expect(element('#link-3').attr('href')).toBe("/123"); element('#link-3').click(); expect(browser().window().path()).toEqual('/123'); }); it('should execute ng-click but not reload when href empty string and name specified', function() { element('#link-4').click(); expect(input('value').val()).toEqual('4'); expect(element('#link-4').attr('href')).toBe(''); }); it('should execute ng-click but not reload when no href but name specified', function() { element('#link-5').click(); expect(input('value').val()).toEqual('5'); expect(element('#link-5').attr('href')).toBe(''); }); it('should only change url when only ng-href', function() { input('value').enter('6'); expect(element('#link-6').attr('href')).toBe('6'); element('#link-6').click(); expect(browser().location().url()).toEqual('/6'); }); </doc:scenario> </doc:example> */ /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngSrc * @restrict A * * @description * Using Angular markup like `{{hash}}` in a `src` attribute doesn't * work right: The browser will fetch from the URL with the literal * text `{{hash}}` until Angular replaces the expression inside * `{{hash}}`. The `ngSrc` directive solves this problem. * * The buggy way to write it: * <pre> * <img src="http://www.gravatar.com/avatar/{{hash}}"/> * </pre> * * The correct way to write it: * <pre> * <img ng-src="http://www.gravatar.com/avatar/{{hash}}"/> * </pre> * * @element IMG * @param {template} ngSrc any string which can contain `{{}}` markup. */ /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngDisabled * @restrict A * * @description * * The following markup will make the button enabled on Chrome/Firefox but not on IE8 and older IEs: * <pre> * <div ng-init="scope = { isDisabled: false }"> * <button disabled="{{scope.isDisabled}}">Disabled</button> * </div> * </pre> * * The HTML specs do not require browsers to preserve the special attributes such as disabled. * (The presence of them means true and absence means false) * This prevents the angular compiler from correctly retrieving the binding expression. * To solve this problem, we introduce the `ngDisabled` directive. * * @example <doc:example> <doc:source> Click me to toggle: <input type="checkbox" ng-model="checked"><br/> <button ng-model="button" ng-disabled="checked">Button</button> </doc:source> <doc:scenario> it('should toggle button', function() { expect(element('.doc-example-live :button').prop('disabled')).toBeFalsy(); input('checked').check(); expect(element('.doc-example-live :button').prop('disabled')).toBeTruthy(); }); </doc:scenario> </doc:example> * * @element INPUT * @param {expression} ngDisabled Angular expression that will be evaluated. */ /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngChecked * @restrict A * * @description * The HTML specs do not require browsers to preserve the special attributes such as checked. * (The presence of them means true and absence means false) * This prevents the angular compiler from correctly retrieving the binding expression. * To solve this problem, we introduce the `ngChecked` directive. * @example <doc:example> <doc:source> Check me to check both: <input type="checkbox" ng-model="master"><br/> <input id="checkSlave" type="checkbox" ng-checked="master"> </doc:source> <doc:scenario> it('should check both checkBoxes', function() { expect(element('.doc-example-live #checkSlave').prop('checked')).toBeFalsy(); input('master').check(); expect(element('.doc-example-live #checkSlave').prop('checked')).toBeTruthy(); }); </doc:scenario> </doc:example> * * @element INPUT * @param {expression} ngChecked Angular expression that will be evaluated. */ /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngMultiple * @restrict A * * @description * The HTML specs do not require browsers to preserve the special attributes such as multiple. * (The presence of them means true and absence means false) * This prevents the angular compiler from correctly retrieving the binding expression. * To solve this problem, we introduce the `ngMultiple` directive. * * @example <doc:example> <doc:source> Check me check multiple: <input type="checkbox" ng-model="checked"><br/> <select id="select" ng-multiple="checked"> <option>Misko</option> <option>Igor</option> <option>Vojta</option> <option>Di</option> </select> </doc:source> <doc:scenario> it('should toggle multiple', function() { expect(element('.doc-example-live #select').prop('multiple')).toBeFalsy(); input('checked').check(); expect(element('.doc-example-live #select').prop('multiple')).toBeTruthy(); }); </doc:scenario> </doc:example> * * @element SELECT * @param {expression} ngMultiple Angular expression that will be evaluated. */ /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngReadonly * @restrict A * * @description * The HTML specs do not require browsers to preserve the special attributes such as readonly. * (The presence of them means true and absence means false) * This prevents the angular compiler from correctly retrieving the binding expression. * To solve this problem, we introduce the `ngReadonly` directive. * @example <doc:example> <doc:source> Check me to make text readonly: <input type="checkbox" ng-model="checked"><br/> <input type="text" ng-readonly="checked" value="I'm Angular"/> </doc:source> <doc:scenario> it('should toggle readonly attr', function() { expect(element('.doc-example-live :text').prop('readonly')).toBeFalsy(); input('checked').check(); expect(element('.doc-example-live :text').prop('readonly')).toBeTruthy(); }); </doc:scenario> </doc:example> * * @element INPUT * @param {string} expression Angular expression that will be evaluated. */ /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngSelected * @restrict A * * @description * The HTML specs do not require browsers to preserve the special attributes such as selected. * (The presence of them means true and absence means false) * This prevents the angular compiler from correctly retrieving the binding expression. * To solve this problem, we introduced the `ngSelected` directive. * @example <doc:example> <doc:source> Check me to select: <input type="checkbox" ng-model="selected"><br/> <select> <option>Hello!</option> <option id="greet" ng-selected="selected">Greetings!</option> </select> </doc:source> <doc:scenario> it('should select Greetings!', function() { expect(element('.doc-example-live #greet').prop('selected')).toBeFalsy(); input('selected').check(); expect(element('.doc-example-live #greet').prop('selected')).toBeTruthy(); }); </doc:scenario> </doc:example> * * @element OPTION * @param {string} expression Angular expression that will be evaluated. */ var ngAttributeAliasDirectives = {}; // boolean attrs are evaluated forEach(BOOLEAN_ATTR, function(propName, attrName) { var normalized = directiveNormalize('ng-' + attrName); ngAttributeAliasDirectives[normalized] = function() { return { priority: 100, compile: function() { return function(scope, element, attr) { attr.$$observers[attrName] = []; scope.$watch(attr[normalized], function(value) { attr.$set(attrName, !!value); }); }; } }; }; }); // ng-src, ng-href are interpolated forEach(['src', 'href'], function(attrName) { var normalized = directiveNormalize('ng-' + attrName); ngAttributeAliasDirectives[normalized] = function() { return { priority: 99, // it needs to run after the attributes are interpolated compile: function() { return function(scope, element, attr) { var value = attr[normalized]; if (value == undefined) { // undefined value means that the directive is being interpolated // so just register observer attr.$$observers[attrName] = []; attr.$observe(normalized, function(value) { attr.$set(attrName, value); }); } else { // value present means that no interpolation, so copy to native attribute. attr.$set(attrName, value); } }; } }; }; }); var nullFormCtrl = { $addControl: noop, $removeControl: noop, $setValidity: noop, $setDirty: noop }; /** * @ngdoc object * @name angular.module.ng.$compileProvider.directive.form.FormController * * @property {boolean} $pristine True if user has not interacted with the form yet. * @property {boolean} $dirty True if user has already interacted with the form. * @property {boolean} $valid True if all of the containg forms and controls are valid. * @property {boolean} $invalid True if at least one containing control or form is invalid. * * @property {Object} $error Is an object hash, containing references to all invalid controls or * forms, where: * * - keys are validation tokens (error names) — such as `REQUIRED`, `URL` or `EMAIL`), * - values are arrays of controls or forms that are invalid with given error. * * @description * `FormController` keeps track of all its controls and nested forms as well as state of them, * such as being valid/invalid or dirty/pristine. * * Each {@link angular.module.ng.$compileProvider.directive.form form} directive creates an instance * of `FormController`. * */ //asks for $scope to fool the BC controller module FormController.$inject = ['$element', '$attrs', '$scope']; function FormController(element, attrs) { var form = this, parentForm = element.parent().controller('form') || nullFormCtrl, invalidCount = 0, // used to easily determine if we are valid errors = form.$error = {}; // init state form.$name = attrs.name; form.$dirty = false; form.$pristine = true; form.$valid = true; form.$invalid = false; parentForm.$addControl(form); // Setup initial state of the control element.addClass(PRISTINE_CLASS); toggleValidCss(true); // convenience method for easy toggling of classes function toggleValidCss(isValid, validationErrorKey) { validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : ''; element. removeClass((isValid ? INVALID_CLASS : VALID_CLASS) + validationErrorKey). addClass((isValid ? VALID_CLASS : INVALID_CLASS) + validationErrorKey); } form.$addControl = function(control) { if (control.$name && !form.hasOwnProperty(control.$name)) { form[control.$name] = control; } }; form.$removeControl = function(control) { if (control.$name && form[control.$name] === control) { delete form[control.$name]; } forEach(errors, function(queue, validationToken) { form.$setValidity(validationToken, true, control); }); }; form.$setValidity = function(validationToken, isValid, control) { var queue = errors[validationToken]; if (isValid) { if (queue) { arrayRemove(queue, control); if (!queue.length) { invalidCount--; if (!invalidCount) { toggleValidCss(isValid); form.$valid = true; form.$invalid = false; } errors[validationToken] = false; toggleValidCss(true, validationToken); parentForm.$setValidity(validationToken, true, form); } } } else { if (!invalidCount) { toggleValidCss(isValid); } if (queue) { if (includes(queue, control)) return; } else { errors[validationToken] = queue = []; invalidCount++; toggleValidCss(false, validationToken); parentForm.$setValidity(validationToken, false, form); } queue.push(control); form.$valid = false; form.$invalid = true; } }; form.$setDirty = function() { element.removeClass(PRISTINE_CLASS).addClass(DIRTY_CLASS); form.$dirty = true; form.$pristine = false; }; } /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngForm * @restrict EAC * * @description * Nestable alias of {@link angular.module.ng.$compileProvider.directive.form `form`} directive. HTML * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a * sub-group of controls needs to be determined. * * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into * related scope, under this name. * */ /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.form * @restrict E * * @description * Directive that instantiates * {@link angular.module.ng.$compileProvider.directive.form.FormController FormController}. * * If `name` attribute is specified, the form controller is published onto the current scope under * this name. * * # Alias: {@link angular.module.ng.$compileProvider.directive.ngForm `ngForm`} * * In angular forms can be nested. This means that the outer form is valid when all of the child * forms are valid as well. However browsers do not allow nesting of `<form>` elements, for this * reason angular provides {@link angular.module.ng.$compileProvider.directive.ngForm `ngForm`} alias * which behaves identical to `<form>` but allows form nesting. * * * # CSS classes * - `ng-valid` Is set if the form is valid. * - `ng-invalid` Is set if the form is invalid. * - `ng-pristine` Is set if the form is pristine. * - `ng-dirty` Is set if the form is dirty. * * * # Submitting a form and preventing default action * * Since the role of forms in client-side Angular applications is different than in classical * roundtrip apps, it is desirable for the browser not to translate the form submission into a full * page reload that sends the data to the server. Instead some javascript logic should be triggered * to handle the form submission in application specific way. * * For this reason, Angular prevents the default action (form submission to the server) unless the * `<form>` element has an `action` attribute specified. * * You can use one of the following two ways to specify what javascript method should be called when * a form is submitted: * * - {@link angular.module.ng.$compileProvider.directive.ngSubmit ngSubmit} directive on the form element * - {@link angular.module.ng.$compileProvider.directive.ngClick ngClick} directive on the first * button or input field of type submit (input[type=submit]) * * To prevent double execution of the handler, use only one of ngSubmit or ngClick directives. This * is because of the following form submission rules coming from the html spec: * * - If a form has only one input field then hitting enter in this field triggers form submit * (`ngSubmit`) * - if a form has has 2+ input fields and no buttons or input[type=submit] then hitting enter * doesn't trigger submit * - if a form has one or more input fields and one or more buttons or input[type=submit] then * hitting enter in any of the input fields will trigger the click handler on the *first* button or * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`) * * @param {string=} name Name of the form. If specified, the form controller will be published into * related scope, under this name. * * @example <doc:example> <doc:source> <script> function Ctrl($scope) { $scope.userType = 'guest'; } </script> <form name="myForm" ng-controller="Ctrl"> userType: <input name="input" ng-model="userType" required> <span class="error" ng-show="myForm.input.$error.REQUIRED">Required!</span><br> <tt>userType = {{userType}}</tt><br> <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br> <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br> <tt>myForm.$valid = {{myForm.$valid}}</tt><br> <tt>myForm.$error.REQUIRED = {{!!myForm.$error.REQUIRED}}</tt><br> </form> </doc:source> <doc:scenario> it('should initialize to model', function() { expect(binding('userType')).toEqual('guest'); expect(binding('myForm.input.$valid')).toEqual('true'); }); it('should be invalid if empty', function() { input('userType').enter(''); expect(binding('userType')).toEqual(''); expect(binding('myForm.input.$valid')).toEqual('false'); }); </doc:scenario> </doc:example> */ var formDirectiveDir = { name: 'form', restrict: 'E', controller: FormController, compile: function() { return { pre: function(scope, formElement, attr, controller) { if (!attr.action) { formElement.bind('submit', function(event) { event.preventDefault(); }); } var parentFormCtrl = formElement.parent().controller('form'), alias = attr.name || attr.ngForm; if (alias) { scope[alias] = controller; } if (parentFormCtrl) { formElement.bind('$destroy', function() { parentFormCtrl.$removeControl(controller); if (alias) { scope[alias] = undefined; } extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards }); } } }; } }; var formDirective = valueFn(formDirectiveDir); var ngFormDirective = valueFn(extend(copy(formDirectiveDir), {restrict: 'EAC'})); var URL_REGEXP = /^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/; var EMAIL_REGEXP = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/; var NUMBER_REGEXP = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/; var inputType = { /** * @ngdoc inputType * @name angular.module.ng.$compileProvider.directive.input.text * * @description * Standard HTML text input with angular data binding. * * @param {string} ngModel Assignable angular expression to data-bind to. * @param {string=} name Property name of the form under which the control is published. * @param {string=} required Sets `required` validation error key if the value is not entered. * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than * minlength. * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than * maxlength. * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for * patterns defined as scope expressions. * @param {string=} ngChange Angular expression to be executed when input changes due to user * interaction with the input element. * * @example <doc:example> <doc:source> <script> function Ctrl($scope) { $scope.text = 'guest'; $scope.word = /^\w*$/; } </script> <form name="myForm" ng-controller="Ctrl"> Single word: <input type="text" name="input" ng-model="text" ng-pattern="word" required> <span class="error" ng-show="myForm.input.$error.required"> Required!</span> <span class="error" ng-show="myForm.input.$error.pattern"> Single word only!</span> <tt>text = {{text}}</tt><br/> <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/> <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/> <tt>myForm.$valid = {{myForm.$valid}}</tt><br/> <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/> </form> </doc:source> <doc:scenario> it('should initialize to model', function() { expect(binding('text')).toEqual('guest'); expect(binding('myForm.input.$valid')).toEqual('true'); }); it('should be invalid if empty', function() { input('text').enter(''); expect(binding('text')).toEqual(''); expect(binding('myForm.input.$valid')).toEqual('false'); }); it('should be invalid if multi word', function() { input('text').enter('hello world'); expect(binding('myForm.input.$valid')).toEqual('false'); }); </doc:scenario> </doc:example> */ 'text': textInputType, /** * @ngdoc inputType * @name angular.module.ng.$compileProvider.directive.input.number * * @description * Text input with number validation and transformation. Sets the `number` validation * error if not a valid number. * * @param {string} ngModel Assignable angular expression to data-bind to. * @param {string=} name Property name of the form under which the control is published. * @param {string=} min Sets the `min` validation error key if the value entered is less then `min`. * @param {string=} max Sets the `max` validation error key if the value entered is greater then `min`. * @param {string=} required Sets `required` validation error key if the value is not entered. * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than * minlength. * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than * maxlength. * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for * patterns defined as scope expressions. * @param {string=} ngChange Angular expression to be executed when input changes due to user * interaction with the input element. * * @example <doc:example> <doc:source> <script> function Ctrl($scope) { $scope.value = 12; } </script> <form name="myForm" ng-controller="Ctrl"> Number: <input type="number" name="input" ng-model="value" min="0" max="99" required> <span class="error" ng-show="myForm.list.$error.required"> Required!</span> <span class="error" ng-show="myForm.list.$error.number"> Not valid number!</span> <tt>value = {{value}}</tt><br/> <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/> <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/> <tt>myForm.$valid = {{myForm.$valid}}</tt><br/> <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/> </form> </doc:source> <doc:scenario> it('should initialize to model', function() { expect(binding('value')).toEqual('12'); expect(binding('myForm.input.$valid')).toEqual('true'); }); it('should be invalid if empty', function() { input('value').enter(''); expect(binding('value')).toEqual(''); expect(binding('myForm.input.$valid')).toEqual('false'); }); it('should be invalid if over max', function() { input('value').enter('123'); expect(binding('value')).toEqual(''); expect(binding('myForm.input.$valid')).toEqual('false'); }); </doc:scenario> </doc:example> */ 'number': numberInputType, /** * @ngdoc inputType * @name angular.module.ng.$compileProvider.directive.input.url * * @description * Text input with URL validation. Sets the `url` validation error key if the content is not a * valid URL. * * @param {string} ngModel Assignable angular expression to data-bind to. * @param {string=} name Property name of the form under which the control is published. * @param {string=} required Sets `required` validation error key if the value is not entered. * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than * minlength. * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than * maxlength. * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for * patterns defined as scope expressions. * @param {string=} ngChange Angular expression to be executed when input changes due to user * interaction with the input element. * * @example <doc:example> <doc:source> <script> function Ctrl($scope) { $scope.text = 'http://google.com'; } </script> <form name="myForm" ng-controller="Ctrl"> URL: <input type="url" name="input" ng-model="text" required> <span class="error" ng-show="myForm.input.$error.required"> Required!</span> <span class="error" ng-show="myForm.input.$error.url"> Not valid url!</span> <tt>text = {{text}}</tt><br/> <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/> <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/> <tt>myForm.$valid = {{myForm.$valid}}</tt><br/> <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/> <tt>myForm.$error.url = {{!!myForm.$error.url}}</tt><br/> </form> </doc:source> <doc:scenario> it('should initialize to model', function() { expect(binding('text')).toEqual('http://google.com'); expect(binding('myForm.input.$valid')).toEqual('true'); }); it('should be invalid if empty', function() { input('text').enter(''); expect(binding('text')).toEqual(''); expect(binding('myForm.input.$valid')).toEqual('false'); }); it('should be invalid if not url', function() { input('text').enter('xxx'); expect(binding('myForm.input.$valid')).toEqual('false'); }); </doc:scenario> </doc:example> */ 'url': urlInputType, /** * @ngdoc inputType * @name angular.module.ng.$compileProvider.directive.input.email * * @description * Text input with email validation. Sets the `email` validation error key if not a valid email * address. * * @param {string} ngModel Assignable angular expression to data-bind to. * @param {string=} name Property name of the form under which the control is published. * @param {string=} required Sets `required` validation error key if the value is not entered. * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than * minlength. * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than * maxlength. * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for * patterns defined as scope expressions. * * @example <doc:example> <doc:source> <script> function Ctrl($scope) { $scope.text = '[email protected]'; } </script> <form name="myForm" ng-controller="Ctrl"> Email: <input type="email" name="input" ng-model="text" required> <span class="error" ng-show="myForm.input.$error.required"> Required!</span> <span class="error" ng-show="myForm.input.$error.email"> Not valid email!</span> <tt>text = {{text}}</tt><br/> <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/> <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/> <tt>myForm.$valid = {{myForm.$valid}}</tt><br/> <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/> <tt>myForm.$error.email = {{!!myForm.$error.email}}</tt><br/> </form> </doc:source> <doc:scenario> it('should initialize to model', function() { expect(binding('text')).toEqual('[email protected]'); expect(binding('myForm.input.$valid')).toEqual('true'); }); it('should be invalid if empty', function() { input('text').enter(''); expect(binding('text')).toEqual(''); expect(binding('myForm.input.$valid')).toEqual('false'); }); it('should be invalid if not email', function() { input('text').enter('xxx'); expect(binding('myForm.input.$valid')).toEqual('false'); }); </doc:scenario> </doc:example> */ 'email': emailInputType, /** * @ngdoc inputType * @name angular.module.ng.$compileProvider.directive.input.radio * * @description * HTML radio button. * * @param {string} ngModel Assignable angular expression to data-bind to. * @param {string} value The value to which the expression should be set when selected. * @param {string=} name Property name of the form under which the control is published. * @param {string=} ngChange Angular expression to be executed when input changes due to user * interaction with the input element. * * @example <doc:example> <doc:source> <script> function Ctrl($scope) { $scope.color = 'blue'; } </script> <form name="myForm" ng-controller="Ctrl"> <input type="radio" ng-model="color" value="red"> Red <br/> <input type="radio" ng-model="color" value="green"> Green <br/> <input type="radio" ng-model="color" value="blue"> Blue <br/> <tt>color = {{color}}</tt><br/> </form> </doc:source> <doc:scenario> it('should change state', function() { expect(binding('color')).toEqual('blue'); input('color').select('red'); expect(binding('color')).toEqual('red'); }); </doc:scenario> </doc:example> */ 'radio': radioInputType, /** * @ngdoc inputType * @name angular.module.ng.$compileProvider.directive.input.checkbox * * @description * HTML checkbox. * * @param {string} ngModel Assignable angular expression to data-bind to. * @param {string=} name Property name of the form under which the control is published. * @param {string=} ngTrueValue The value to which the expression should be set when selected. * @param {string=} ngFalseValue The value to which the expression should be set when not selected. * @param {string=} ngChange Angular expression to be executed when input changes due to user * interaction with the input element. * * @example <doc:example> <doc:source> <script> function Ctrl($scope) { $scope.value1 = true; $scope.value2 = 'YES' } </script> <form name="myForm" ng-controller="Ctrl"> Value1: <input type="checkbox" ng-model="value1"> <br/> Value2: <input type="checkbox" ng-model="value2" ng-true-value="YES" ng-false-value="NO"> <br/> <tt>value1 = {{value1}}</tt><br/> <tt>value2 = {{value2}}</tt><br/> </form> </doc:source> <doc:scenario> it('should change state', function() { expect(binding('value1')).toEqual('true'); expect(binding('value2')).toEqual('YES'); input('value1').check(); input('value2').check(); expect(binding('value1')).toEqual('false'); expect(binding('value2')).toEqual('NO'); }); </doc:scenario> </doc:example> */ 'checkbox': checkboxInputType, 'hidden': noop, 'button': noop, 'submit': noop, 'reset': noop }; function isEmpty(value) { return isUndefined(value) || value === '' || value === null || value !== value; } function textInputType(scope, element, attr, ctrl, $sniffer, $browser) { var listener = function() { var value = trim(element.val()); if (ctrl.$viewValue !== value) { scope.$apply(function() { ctrl.$setViewValue(value); }); } }; // if the browser does support "input" event, we are fine if ($sniffer.hasEvent('input')) { element.bind('input', listener); } else { var timeout; element.bind('keydown', function(event) { var key = event.keyCode; // ignore // command modifiers arrows if (key === 91 || (15 < key && key < 19) || (37 <= key && key <= 40)) return; if (!timeout) { timeout = $browser.defer(function() { listener(); timeout = null; }); } }); // if user paste into input using mouse, we need "change" event to catch it element.bind('change', listener); } ctrl.$render = function() { element.val(isEmpty(ctrl.$viewValue) ? '' : ctrl.$viewValue); }; // pattern validator var pattern = attr.ngPattern, patternValidator; var validate = function(regexp, value) { if (isEmpty(value) || regexp.test(value)) { ctrl.$setValidity('pattern', true); return value; } else { ctrl.$setValidity('pattern', false); return undefined; } }; if (pattern) { if (pattern.match(/^\/(.*)\/$/)) { pattern = new RegExp(pattern.substr(1, pattern.length - 2)); patternValidator = function(value) { return validate(pattern, value) }; } else { patternValidator = function(value) { var patternObj = scope.$eval(pattern); if (!patternObj || !patternObj.test) { throw new Error('Expected ' + pattern + ' to be a RegExp but was ' + patternObj); } return validate(patternObj, value); }; } ctrl.$formatters.push(patternValidator); ctrl.$parsers.push(patternValidator); } // min length validator if (attr.ngMinlength) { var minlength = int(attr.ngMinlength); var minLengthValidator = function(value) { if (!isEmpty(value) && value.length < minlength) { ctrl.$setValidity('minlength', false); return undefined; } else { ctrl.$setValidity('minlength', true); return value; } }; ctrl.$parsers.push(minLengthValidator); ctrl.$formatters.push(minLengthValidator); } // max length validator if (attr.ngMaxlength) { var maxlength = int(attr.ngMaxlength); var maxLengthValidator = function(value) { if (!isEmpty(value) && value.length > maxlength) { ctrl.$setValidity('maxlength', false); return undefined; } else { ctrl.$setValidity('maxlength', true); return value; } }; ctrl.$parsers.push(maxLengthValidator); ctrl.$formatters.push(maxLengthValidator); } } function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) { textInputType(scope, element, attr, ctrl, $sniffer, $browser); ctrl.$parsers.push(function(value) { var empty = isEmpty(value); if (empty || NUMBER_REGEXP.test(value)) { ctrl.$setValidity('number', true); return value === '' ? null : (empty ? value : parseFloat(value)); } else { ctrl.$setValidity('number', false); return undefined; } }); ctrl.$formatters.push(function(value) { return isEmpty(value) ? '' : '' + value; }); if (attr.min) { var min = parseFloat(attr.min); var minValidator = function(value) { if (!isEmpty(value) && value < min) { ctrl.$setValidity('min', false); return undefined; } else { ctrl.$setValidity('min', true); return value; } }; ctrl.$parsers.push(minValidator); ctrl.$formatters.push(minValidator); } if (attr.max) { var max = parseFloat(attr.max); var maxValidator = function(value) { if (!isEmpty(value) && value > max) { ctrl.$setValidity('max', false); return undefined; } else { ctrl.$setValidity('max', true); return value; } }; ctrl.$parsers.push(maxValidator); ctrl.$formatters.push(maxValidator); } ctrl.$formatters.push(function(value) { if (isEmpty(value) || isNumber(value)) { ctrl.$setValidity('number', true); return value; } else { ctrl.$setValidity('number', false); return undefined; } }); } function urlInputType(scope, element, attr, ctrl, $sniffer, $browser) { textInputType(scope, element, attr, ctrl, $sniffer, $browser); var urlValidator = function(value) { if (isEmpty(value) || URL_REGEXP.test(value)) { ctrl.$setValidity('url', true); return value; } else { ctrl.$setValidity('url', false); return undefined; } }; ctrl.$formatters.push(urlValidator); ctrl.$parsers.push(urlValidator); } function emailInputType(scope, element, attr, ctrl, $sniffer, $browser) { textInputType(scope, element, attr, ctrl, $sniffer, $browser); var emailValidator = function(value) { if (isEmpty(value) || EMAIL_REGEXP.test(value)) { ctrl.$setValidity('email', true); return value; } else { ctrl.$setValidity('email', false); return undefined; } }; ctrl.$formatters.push(emailValidator); ctrl.$parsers.push(emailValidator); } function radioInputType(scope, element, attr, ctrl) { // make the name unique, if not defined if (isUndefined(attr.name)) { element.attr('name', nextUid()); } element.bind('click', function() { if (element[0].checked) { scope.$apply(function() { ctrl.$setViewValue(attr.value); }); } }); ctrl.$render = function() { var value = attr.value; element[0].checked = (value == ctrl.$viewValue); }; attr.$observe('value', ctrl.$render); } function checkboxInputType(scope, element, attr, ctrl) { var trueValue = attr.ngTrueValue, falseValue = attr.ngFalseValue; if (!isString(trueValue)) trueValue = true; if (!isString(falseValue)) falseValue = false; element.bind('click', function() { scope.$apply(function() { ctrl.$setViewValue(element[0].checked); }); }); ctrl.$render = function() { element[0].checked = ctrl.$viewValue; }; ctrl.$formatters.push(function(value) { return value === trueValue; }); ctrl.$parsers.push(function(value) { return value ? trueValue : falseValue; }); } /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.textarea * * @description * HTML textarea element control with angular data-binding. The data-binding and validation * properties of this element are exactly the same as those of the * {@link angular.module.ng.$compileProvider.directive.input input element}. * * @param {string} ngModel Assignable angular expression to data-bind to. * @param {string=} name Property name of the form under which the control is published. * @param {string=} required Sets `required` validation error key if the value is not entered. * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than * minlength. * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than * maxlength. * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for * patterns defined as scope expressions. * @param {string=} ngChange Angular expression to be executed when input changes due to user * interaction with the input element. */ /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.input * @restrict E * * @description * HTML input element control with angular data-binding. Input control follows HTML5 input types * and polyfills the HTML5 validation behavior for older browsers. * * @param {string} ngModel Assignable angular expression to data-bind to. * @param {string=} name Property name of the form under which the control is published. * @param {string=} required Sets `required` validation error key if the value is not entered. * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than * minlength. * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than * maxlength. * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for * patterns defined as scope expressions. * @param {string=} ngChange Angular expression to be executed when input changes due to user * interaction with the input element. * * @example <doc:example> <doc:source> <script> function Ctrl($scope) { $scope.user = {name: 'guest', last: 'visitor'}; } </script> <div ng-controller="Ctrl"> <form name="myForm"> User name: <input type="text" name="userName" ng-model="user.name" required> <span class="error" ng-show="myForm.userName.$error.required"> Required!</span><br> Last name: <input type="text" name="lastName" ng-model="user.last" ng-minlength="3" ng-maxlength="10"> <span class="error" ng-show="myForm.lastName.$error.minlength"> Too short!</span> <span class="error" ng-show="myForm.lastName.$error.maxlength"> Too long!</span><br> </form> <hr> <tt>user = {{user}}</tt><br/> <tt>myForm.userName.$valid = {{myForm.userName.$valid}}</tt><br> <tt>myForm.userName.$error = {{myForm.userName.$error}}</tt><br> <tt>myForm.lastName.$valid = {{myForm.lastName.$valid}}</tt><br> <tt>myForm.userName.$error = {{myForm.lastName.$error}}</tt><br> <tt>myForm.$valid = {{myForm.$valid}}</tt><br> <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br> <tt>myForm.$error.minlength = {{!!myForm.$error.minlength}}</tt><br> <tt>myForm.$error.maxlength = {{!!myForm.$error.maxlength}}</tt><br> </div> </doc:source> <doc:scenario> it('should initialize to model', function() { expect(binding('user')).toEqual('{"name":"guest","last":"visitor"}'); expect(binding('myForm.userName.$valid')).toEqual('true'); expect(binding('myForm.$valid')).toEqual('true'); }); it('should be invalid if empty when required', function() { input('user.name').enter(''); expect(binding('user')).toEqual('{"last":"visitor"}'); expect(binding('myForm.userName.$valid')).toEqual('false'); expect(binding('myForm.$valid')).toEqual('false'); }); it('should be valid if empty when min length is set', function() { input('user.last').enter(''); expect(binding('user')).toEqual('{"name":"guest","last":""}'); expect(binding('myForm.lastName.$valid')).toEqual('true'); expect(binding('myForm.$valid')).toEqual('true'); }); it('should be invalid if less than required min length', function() { input('user.last').enter('xx'); expect(binding('user')).toEqual('{"name":"guest"}'); expect(binding('myForm.lastName.$valid')).toEqual('false'); expect(binding('myForm.lastName.$error')).toMatch(/minlength/); expect(binding('myForm.$valid')).toEqual('false'); }); it('should be invalid if longer than max length', function() { input('user.last').enter('some ridiculously long name'); expect(binding('user')) .toEqual('{"name":"guest"}'); expect(binding('myForm.lastName.$valid')).toEqual('false'); expect(binding('myForm.lastName.$error')).toMatch(/maxlength/); expect(binding('myForm.$valid')).toEqual('false'); }); </doc:scenario> </doc:example> */ var inputDirective = ['$browser', '$sniffer', function($browser, $sniffer) { return { restrict: 'E', require: '?ngModel', link: function(scope, element, attr, ctrl) { if (ctrl) { (inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrl, $sniffer, $browser); } } }; }]; var VALID_CLASS = 'ng-valid', INVALID_CLASS = 'ng-invalid', PRISTINE_CLASS = 'ng-pristine', DIRTY_CLASS = 'ng-dirty'; /** * @ngdoc object * @name angular.module.ng.$compileProvider.directive.ngModel.NgModelController * * @property {string} $viewValue Actual string value in the view. * @property {*} $modelValue The value in the model, that the control is bound to. * @property {Array.<Function>} $parsers Whenever the control reads value from the DOM, it executes * all of these functions to sanitize / convert the value as well as validate. * * @property {Array.<Function>} $formatters Whenever the model value changes, it executes all of * these functions to convert the value as well as validate. * * @property {Object} $error An bject hash with all errors as keys. * * @property {boolean} $pristine True if user has not interacted with the control yet. * @property {boolean} $dirty True if user has already interacted with the control. * @property {boolean} $valid True if there is no error. * @property {boolean} $invalid True if at least one error on the control. * * @description * */ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', 'ngModel', '$element', function($scope, $exceptionHandler, $attr, ngModel, $element) { this.$viewValue = Number.NaN; this.$modelValue = Number.NaN; this.$parsers = []; this.$formatters = []; this.$viewChangeListeners = []; this.$pristine = true; this.$dirty = false; this.$valid = true; this.$invalid = false; this.$render = noop; this.$name = $attr.name; var parentForm = $element.inheritedData('$formController') || nullFormCtrl, invalidCount = 0, // used to easily determine if we are valid $error = this.$error = {}; // keep invalid keys here // Setup initial state of the control $element.addClass(PRISTINE_CLASS); toggleValidCss(true); // convenience method for easy toggling of classes function toggleValidCss(isValid, validationErrorKey) { validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : ''; $element. removeClass((isValid ? INVALID_CLASS : VALID_CLASS) + validationErrorKey). addClass((isValid ? VALID_CLASS : INVALID_CLASS) + validationErrorKey); } /** * @ngdoc function * @name angular.module.ng.$compileProvider.directive.ngModel.NgModelController#$setValidity * @methodOf angular.module.ng.$compileProvider.directive.ngModel.NgModelController * * @description * Change the validity state, and notifies the form when the control changes validity. (i.e. it * does not notify form if given validator is already marked as invalid). * * This method should be called by validators - i.e. the parser or formatter functions. * * @param {string} validationErrorKey Name of the validator. the `validationErrorKey` will assign * to `$error[validationErrorKey]=isValid` so that it is available for data-binding. * The `validationErrorKey` should be in camelCase and will get converted into dash-case * for class name. Example: `myError` will result in `ng-valid-my-error` and `ng-invalid-my-error` * class and can be bound to as `{{someForm.someControl.$error.myError}}` . * @param {boolean} isValid Whether the current state is valid (true) or invalid (false). */ this.$setValidity = function(validationErrorKey, isValid) { if ($error[validationErrorKey] === !isValid) return; if (isValid) { if ($error[validationErrorKey]) invalidCount--; if (!invalidCount) { toggleValidCss(true); this.$valid = true; this.$invalid = false; } } else { toggleValidCss(false); this.$invalid = true; this.$valid = false; invalidCount++; } $error[validationErrorKey] = !isValid; toggleValidCss(isValid, validationErrorKey); parentForm.$setValidity(validationErrorKey, isValid, this); }; /** * @ngdoc function * @name angular.module.ng.$compileProvider.directive.ngModel.NgModelController#$setViewValue * @methodOf angular.module.ng.$compileProvider.directive.ngModel.NgModelController * * @description * Read a value from view. * * This method should be called from within a DOM event handler. * For example {@link angular.module.ng.$compileProvider.directive.input input} or * {@link angular.module.ng.$compileProvider.directive.select select} directives call it. * * It internally calls all `formatters` and if resulted value is valid, updates the model and * calls all registered change listeners. * * @param {string} value Value from the view. */ this.$setViewValue = function(value) { this.$viewValue = value; // change to dirty if (this.$pristine) { this.$dirty = true; this.$pristine = false; $element.removeClass(PRISTINE_CLASS).addClass(DIRTY_CLASS); parentForm.$setDirty(); } forEach(this.$parsers, function(fn) { value = fn(value); }); if (this.$modelValue !== value) { this.$modelValue = value; ngModel(value); forEach(this.$viewChangeListeners, function(listener) { try { listener(); } catch(e) { $exceptionHandler(e); } }) } }; // model -> value var ctrl = this; $scope.$watch(function() { return ngModel(); }, function(value) { // ignore change from view if (ctrl.$modelValue === value) return; var formatters = ctrl.$formatters, idx = formatters.length; ctrl.$modelValue = value; while(idx--) { value = formatters[idx](value); } if (ctrl.$viewValue !== value) { ctrl.$viewValue = value; ctrl.$render(); } }); }]; /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngModel * * @element input * * @description * Is directive that tells Angular to do two-way data binding. It works together with `input`, * `select`, `textarea`. You can easily write your own directives to use `ngModel` as well. * * `ngModel` is responsible for: * * - binding the view into the model, which other directives such as `input`, `textarea` or `select` * require, * - providing validation behavior (i.e. required, number, email, url), * - keeping state of the control (valid/invalid, dirty/pristine, validation errors), * - setting related css class onto the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`), * - register the control with parent {@link angular.module.ng.$compileProvider.directive.form form}. * * For basic examples, how to use `ngModel`, see: * * - {@link angular.module.ng.$compileProvider.directive.input input} * - {@link angular.module.ng.$compileProvider.directive.input.text text} * - {@link angular.module.ng.$compileProvider.directive.input.checkbox checkbox} * - {@link angular.module.ng.$compileProvider.directive.input.radio radio} * - {@link angular.module.ng.$compileProvider.directive.input.number number} * - {@link angular.module.ng.$compileProvider.directive.input.email email} * - {@link angular.module.ng.$compileProvider.directive.input.url url} * - {@link angular.module.ng.$compileProvider.directive.select select} * - {@link angular.module.ng.$compileProvider.directive.textarea textarea} * */ var ngModelDirective = [function() { return { inject: { ngModel: 'accessor' }, require: ['ngModel', '^?form'], controller: NgModelController, link: function(scope, element, attr, ctrls) { // notify others, especially parent forms var modelCtrl = ctrls[0], formCtrl = ctrls[1] || nullFormCtrl; formCtrl.$addControl(modelCtrl); element.bind('$destroy', function() { formCtrl.$removeControl(modelCtrl); }); } }; }]; /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngChange * @restrict E * * @description * Evaluate given expression when user changes the input. * The expression is not evaluated when the value change is coming from the model. * * Note, this directive requires `ngModel` to be present. * * @element input * * @example * <doc:example> * <doc:source> * <script> * function Controller($scope) { * $scope.counter = 0; * $scope.change = function() { * $scope.counter++; * }; * } * </script> * <div ng-controller="Controller"> * <input type="checkbox" ng-model="confirmed" ng-change="change()" id="ng-change-example1" /> * <input type="checkbox" ng-model="confirmed" id="ng-change-example2" /> * <label for="ng-change-example2">Confirmed</label><br /> * debug = {{confirmed}}<br /> * counter = {{counter}} * </div> * </doc:source> * <doc:scenario> * it('should evaluate the expression if changing from view', function() { * expect(binding('counter')).toEqual('0'); * element('#ng-change-example1').click(); * expect(binding('counter')).toEqual('1'); * expect(binding('confirmed')).toEqual('true'); * }); * * it('should not evaluate the expression if changing from model', function() { * element('#ng-change-example2').click(); * expect(binding('counter')).toEqual('0'); * expect(binding('confirmed')).toEqual('true'); * }); * </doc:scenario> * </doc:example> */ var ngChangeDirective = valueFn({ require: 'ngModel', link: function(scope, element, attr, ctrl) { ctrl.$viewChangeListeners.push(function() { scope.$eval(attr.ngChange); }); } }); var requiredDirective = [function() { return { require: '?ngModel', link: function(scope, elm, attr, ctrl) { if (!ctrl) return; var validator = function(value) { if (attr.required && (isEmpty(value) || value === false)) { ctrl.$setValidity('required', false); return; } else { ctrl.$setValidity('required', true); return value; } }; ctrl.$formatters.push(validator); ctrl.$parsers.unshift(validator); attr.$observe('required', function() { validator(ctrl.$viewValue); }); } }; }]; /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngList * * @description * Text input that converts between comma-seperated string into an array of strings. * * @element input * @param {string=} ngList optional delimiter that should be used to split the value. If * specified in form `/something/` then the value will be converted into a regular expression. * * @example <doc:example> <doc:source> <script> function Ctrl($scope) { $scope.names = ['igor', 'misko', 'vojta']; } </script> <form name="myForm" ng-controller="Ctrl"> List: <input name="namesInput" ng-model="names" ng-list required> <span class="error" ng-show="myForm.list.$error.required"> Required!</span> <tt>names = {{names}}</tt><br/> <tt>myForm.namesInput.$valid = {{myForm.namesInput.$valid}}</tt><br/> <tt>myForm.namesInput.$error = {{myForm.namesInput.$error}}</tt><br/> <tt>myForm.$valid = {{myForm.$valid}}</tt><br/> <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/> </form> </doc:source> <doc:scenario> it('should initialize to model', function() { expect(binding('names')).toEqual('["igor","misko","vojta"]'); expect(binding('myForm.namesInput.$valid')).toEqual('true'); }); it('should be invalid if empty', function() { input('names').enter(''); expect(binding('names')).toEqual('[]'); expect(binding('myForm.namesInput.$valid')).toEqual('false'); }); </doc:scenario> </doc:example> */ var ngListDirective = function() { return { require: 'ngModel', link: function(scope, element, attr, ctrl) { var match = /\/(.*)\//.exec(attr.ngList), separator = match && new RegExp(match[1]) || attr.ngList || ','; var parse = function(viewValue) { var list = []; if (viewValue) { forEach(viewValue.split(separator), function(value) { if (value) list.push(trim(value)); }); } return list; }; ctrl.$parsers.push(parse); ctrl.$formatters.push(function(value) { if (isArray(value) && !equals(parse(ctrl.$viewValue), value)) { return value.join(', '); } return undefined; }); } }; }; var CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/; var ngValueDirective = [function() { return { priority: 100, compile: function(tpl, tplAttr) { if (CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)) { return function(scope, elm, attr) { attr.$set('value', scope.$eval(attr.ngValue)); }; } else { return function(scope, elm, attr) { attr.$$observers.value = []; scope.$watch(attr.ngValue, function(value) { attr.$set('value', value, false); }); }; } } }; }]; /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngBind * * @description * The `ngBind` attribute tells Angular to replace the text content of the specified HTML element * with the value of a given expression, and to update the text content when the value of that * expression changes. * * Typically, you don't use `ngBind` directly, but instead you use the double curly markup like * `{{ expression }}` which is similar but less verbose. * * Once scenario in which the use of `ngBind` is prefered over `{{ expression }}` binding is when * it's desirable to put bindings into template that is momentarily displayed by the browser in its * raw state before Angular compiles it. Since `ngBind` is an element attribute, it makes the * bindings invisible to the user while the page is loading. * * An alternative solution to this problem would be using the * {@link angular.module.ng.$compileProvider.directive.ngCloak ngCloak} directive. * * * @element ANY * @param {expression} ngBind {@link guide/dev_guide.expressions Expression} to evaluate. * * @example * Enter a name in the Live Preview text box; the greeting below the text box changes instantly. <doc:example> <doc:source> <script> function Ctrl($scope) { $scope.name = 'Whirled'; } </script> <div ng-controller="Ctrl"> Enter name: <input type="text" ng-model="name"><br> Hello <span ng-bind="name"></span>! </div> </doc:source> <doc:scenario> it('should check ng-bind', function() { expect(using('.doc-example-live').binding('name')).toBe('Whirled'); using('.doc-example-live').input('name').enter('world'); expect(using('.doc-example-live').binding('name')).toBe('world'); }); </doc:scenario> </doc:example> */ var ngBindDirective = ngDirective(function(scope, element, attr) { element.addClass('ng-binding').data('$binding', attr.ngBind); scope.$watch(attr.ngBind, function(value) { element.text(value == undefined ? '' : value); }); }); /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngBindTemplate * * @description * The `ngBindTemplate` directive specifies that the element * text should be replaced with the template in ngBindTemplate. * Unlike ngBind the ngBindTemplate can contain multiple `{{` `}}` * expressions. (This is required since some HTML elements * can not have SPAN elements such as TITLE, or OPTION to name a few.) * * @element ANY * @param {string} ngBindTemplate template of form * <tt>{{</tt> <tt>expression</tt> <tt>}}</tt> to eval. * * @example * Try it here: enter text in text box and watch the greeting change. <doc:example> <doc:source> <script> function Ctrl($scope) { $scope.salutation = 'Hello'; $scope.name = 'World'; } </script> <div ng-controller="Ctrl"> Salutation: <input type="text" ng-model="salutation"><br> Name: <input type="text" ng-model="name"><br> <pre ng-bind-template="{{salutation}} {{name}}!"></pre> </div> </doc:source> <doc:scenario> it('should check ng-bind', function() { expect(using('.doc-example-live').binding('salutation')). toBe('Hello'); expect(using('.doc-example-live').binding('name')). toBe('World'); using('.doc-example-live').input('salutation').enter('Greetings'); using('.doc-example-live').input('name').enter('user'); expect(using('.doc-example-live').binding('salutation')). toBe('Greetings'); expect(using('.doc-example-live').binding('name')). toBe('user'); }); </doc:scenario> </doc:example> */ var ngBindTemplateDirective = ['$interpolate', function($interpolate) { return function(scope, element, attr) { // TODO: move this to scenario runner var interpolateFn = $interpolate(element.attr(attr.$attr.ngBindTemplate)); element.addClass('ng-binding').data('$binding', interpolateFn); attr.$observe('ngBindTemplate', function(value) { element.text(value); }); } }]; /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngBindHtmlUnsafe * * @description * Creates a binding that will innerHTML the result of evaluating the `expression` into the current * element. *The innerHTML-ed content will not be sanitized!* You should use this directive only if * {@link angular.module.ng.$compileProvider.directive.ngBindHtml ngBindHtml} directive is too * restrictive and when you absolutely trust the source of the content you are binding to. * * See {@link angular.module.ngSanitize.$sanitize $sanitize} docs for examples. * * @element ANY * @param {expression} ngBindHtmlUnsafe {@link guide/dev_guide.expressions Expression} to evaluate. */ var ngBindHtmlUnsafeDirective = [function() { return function(scope, element, attr) { element.addClass('ng-binding').data('$binding', attr.ngBindHtmlUnsafe); scope.$watch(attr.ngBindHtmlUnsafe, function(value) { element.html(value || ''); }); }; }]; function classDirective(name, selector) { name = 'ngClass' + name; return ngDirective(function(scope, element, attr) { scope.$watch(attr[name], function(newVal, oldVal) { if (selector === true || scope.$index % 2 === selector) { if (oldVal && (newVal !== oldVal)) { if (isObject(oldVal) && !isArray(oldVal)) oldVal = map(oldVal, function(v, k) { if (v) return k }); element.removeClass(isArray(oldVal) ? oldVal.join(' ') : oldVal); } if (isObject(newVal) && !isArray(newVal)) newVal = map(newVal, function(v, k) { if (v) return k }); if (newVal) element.addClass(isArray(newVal) ? newVal.join(' ') : newVal); } }, true); }); } /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngClass * * @description * The `ngClass` allows you to set CSS class on HTML element dynamically by databinding an * expression that represents all classes to be added. * * The directive won't add duplicate classes if a particular class was already set. * * When the expression changes, the previously added classes are removed and only then the classes * new classes are added. * * @element ANY * @param {expression} ngClass {@link guide/dev_guide.expressions Expression} to eval. The result * of the evaluation can be a string representing space delimited class * names, an array, or a map of class names to boolean values. * * @example <doc:example> <doc:source> <input type="button" value="set" ng-click="myVar='ng-invalid'"> <input type="button" value="clear" ng-click="myVar=''"> <br> <span ng-class="myVar">Sample Text &nbsp;&nbsp;&nbsp;&nbsp;</span> </doc:source> <doc:scenario> it('should check ng-class', function() { expect(element('.doc-example-live span').prop('className')).not(). toMatch(/ng-invalid/); using('.doc-example-live').element(':button:first').click(); expect(element('.doc-example-live span').prop('className')). toMatch(/ng-invalid/); using('.doc-example-live').element(':button:last').click(); expect(element('.doc-example-live span').prop('className')).not(). toMatch(/ng-invalid/); }); </doc:scenario> </doc:example> */ var ngClassDirective = classDirective('', true); /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngClassOdd * * @description * The `ngClassOdd` and `ngClassEven` directives work exactly as * {@link angular.module.ng.$compileProvider.directive.ngClass ngClass}, except it works in * conjunction with `ngRepeat` and takes affect only on odd (even) rows. * * This directive can be applied only within a scope of an * {@link angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat}. * * @element ANY * @param {expression} ngClassOdd {@link guide/dev_guide.expressions Expression} to eval. The result * of the evaluation can be a string representing space delimited class names or an array. * * @example <doc:example> <doc:source> <ol ng-init="names=['John', 'Mary', 'Cate', 'Suz']"> <li ng-repeat="name in names"> <span ng-class-odd="'ng-format-negative'" ng-class-even="'ng-invalid'"> {{name}} &nbsp; &nbsp; &nbsp; </span> </li> </ol> </doc:source> <doc:scenario> it('should check ng-class-odd and ng-class-even', function() { expect(element('.doc-example-live li:first span').prop('className')). toMatch(/ng-format-negative/); expect(element('.doc-example-live li:last span').prop('className')). toMatch(/ng-invalid/); }); </doc:scenario> </doc:example> */ var ngClassOddDirective = classDirective('Odd', 0); /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngClassEven * * @description * The `ngClassOdd` and `ngClassEven` works exactly as * {@link angular.module.ng.$compileProvider.directive.ngClass ngClass}, except it works in * conjunction with `ngRepeat` and takes affect only on odd (even) rows. * * This directive can be applied only within a scope of an * {@link angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat}. * * @element ANY * @param {expression} ngClassEven {@link guide/dev_guide.expressions Expression} to eval. The * result of the evaluation can be a string representing space delimited class names or an array. * * @example <doc:example> <doc:source> <ol ng-init="names=['John', 'Mary', 'Cate', 'Suz']"> <li ng-repeat="name in names"> <span ng-class-odd="'odd'" ng-class-even="'even'"> {{name}} &nbsp; &nbsp; &nbsp; </span> </li> </ol> </doc:source> <doc:scenario> it('should check ng-class-odd and ng-class-even', function() { expect(element('.doc-example-live li:first span').prop('className')). toMatch(/odd/); expect(element('.doc-example-live li:last span').prop('className')). toMatch(/even/); }); </doc:scenario> </doc:example> */ var ngClassEvenDirective = classDirective('Even', 1); /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngCloak * * @description * The `ngCloak` directive is used to prevent the Angular html template from being briefly * displayed by the browser in its raw (uncompiled) form while your application is loading. Use this * directive to avoid the undesirable flicker effect caused by the html template display. * * The directive can be applied to the `<body>` element, but typically a fine-grained application is * prefered in order to benefit from progressive rendering of the browser view. * * `ngCloak` works in cooperation with a css rule that is embedded within `angular.js` and * `angular.min.js` files. Following is the css rule: * * <pre> * [ng\:cloak], [ng-cloak], .ng-cloak { * display: none; * } * </pre> * * When this css rule is loaded by the browser, all html elements (including their children) that * are tagged with the `ng-cloak` directive are hidden. When Angular comes across this directive * during the compilation of the template it deletes the `ngCloak` element attribute, which * makes the compiled element visible. * * For the best result, `angular.js` script must be loaded in the head section of the html file; * alternatively, the css rule (above) must be included in the external stylesheet of the * application. * * Legacy browsers, like IE7, do not provide attribute selector support (added in CSS 2.1) so they * cannot match the `[ng\:cloak]` selector. To work around this limitation, you must add the css * class `ngCloak` in addition to `ngCloak` directive as shown in the example below. * * @element ANY * * @example <doc:example> <doc:source> <div id="template1" ng-cloak>{{ 'hello' }}</div> <div id="template2" ng-cloak class="ng-cloak">{{ 'hello IE7' }}</div> </doc:source> <doc:scenario> it('should remove the template directive and css class', function() { expect(element('.doc-example-live #template1').attr('ng-cloak')). not().toBeDefined(); expect(element('.doc-example-live #template2').attr('ng-cloak')). not().toBeDefined(); }); </doc:scenario> </doc:example> * */ var ngCloakDirective = ngDirective({ compile: function(element, attr) { attr.$set('ngCloak', undefined); element.removeClass('ng-cloak'); } }); /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngController * * @description * The `ngController` directive assigns behavior to a scope. This is a key aspect of how angular * supports the principles behind the Model-View-Controller design pattern. * * MVC components in angular: * * * Model — The Model is data in scope properties; scopes are attached to the DOM. * * View — The template (HTML with data bindings) is rendered into the View. * * Controller — The `ngController` directive specifies a Controller class; the class has * methods that typically express the business logic behind the application. * * Note that an alternative way to define controllers is via the `{@link angular.module.ng.$route}` * service. * * @element ANY * @scope * @param {expression} ngController Name of a globally accessible constructor function or an * {@link guide/dev_guide.expressions expression} that on the current scope evaluates to a * constructor function. * * @example * Here is a simple form for editing user contact information. Adding, removing, clearing, and * greeting are methods declared on the controller (see source tab). These methods can * easily be called from the angular markup. Notice that the scope becomes the `this` for the * controller's instance. This allows for easy access to the view data from the controller. Also * notice that any changes to the data are automatically reflected in the View without the need * for a manual update. <doc:example> <doc:source> <script type="text/javascript"> function SettingsController($scope) { $scope.name = "John Smith"; $scope.contacts = [ {type:'phone', value:'408 555 1212'}, {type:'email', value:'[email protected]'} ]; $scope.greet = function() { alert(this.name); }; $scope.addContact = function() { this.contacts.push({type:'email', value:'[email protected]'}); }; $scope.removeContact = function(contactToRemove) { var index = this.contacts.indexOf(contactToRemove); this.contacts.splice(index, 1); }; $scope.clearContact = function(contact) { contact.type = 'phone'; contact.value = ''; }; } </script> <div ng-controller="SettingsController"> Name: <input type="text" ng-model="name"/> [ <a href="" ng-click="greet()">greet</a> ]<br/> Contact: <ul> <li ng-repeat="contact in contacts"> <select ng-model="contact.type"> <option>phone</option> <option>email</option> </select> <input type="text" ng-model="contact.value"/> [ <a href="" ng-click="clearContact(contact)">clear</a> | <a href="" ng-click="removeContact(contact)">X</a> ] </li> <li>[ <a href="" ng-click="addContact()">add</a> ]</li> </ul> </div> </doc:source> <doc:scenario> it('should check controller', function() { expect(element('.doc-example-live div>:input').val()).toBe('John Smith'); expect(element('.doc-example-live li:nth-child(1) input').val()) .toBe('408 555 1212'); expect(element('.doc-example-live li:nth-child(2) input').val()) .toBe('[email protected]'); element('.doc-example-live li:first a:contains("clear")').click(); expect(element('.doc-example-live li:first input').val()).toBe(''); element('.doc-example-live li:last a:contains("add")').click(); expect(element('.doc-example-live li:nth-child(3) input').val()) .toBe('[email protected]'); }); </doc:scenario> </doc:example> */ var ngControllerDirective = [function() { return { scope: true, controller: '@' }; }]; /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngClick * * @description * The ngClick allows you to specify custom behavior when * element is clicked. * * @element ANY * @param {expression} ngClick {@link guide/dev_guide.expressions Expression} to evaluate upon * click. (Event object is available as `$event`) * * @example <doc:example> <doc:source> <button ng-click="count = count + 1" ng-init="count=0"> Increment </button> count: {{count}} </doc:source> <doc:scenario> it('should check ng-click', function() { expect(binding('count')).toBe('0'); element('.doc-example-live :button').click(); expect(binding('count')).toBe('1'); }); </doc:scenario> </doc:example> */ /* * A directive that allows creation of custom onclick handlers that are defined as angular * expressions and are compiled and executed within the current scope. * * Events that are handled via these handler are always configured not to propagate further. */ var ngEventDirectives = {}; forEach( 'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave'.split(' '), function(name) { var directiveName = directiveNormalize('ng-' + name); ngEventDirectives[directiveName] = ['$parse', function($parse) { return function(scope, element, attr) { var fn = $parse(attr[directiveName]); element.bind(lowercase(name), function(event) { scope.$apply(function() { fn(scope, {$event:event}); }); }); }; }]; } ); /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngDblclick * * @description * The `ngDblclick` directive allows you to specify custom behavior on dblclick event. * * @element ANY * @param {expression} ngDblclick {@link guide/dev_guide.expressions Expression} to evaluate upon * dblclick. (Event object is available as `$event`) * * @example * See {@link angular.module.ng.$compileProvider.directive.ngClick ngClick} */ /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngMousedown * * @description * The ngMousedown directive allows you to specify custom behavior on mousedown event. * * @element ANY * @param {expression} ngMousedown {@link guide/dev_guide.expressions Expression} to evaluate upon * mousedown. (Event object is available as `$event`) * * @example * See {@link angular.module.ng.$compileProvider.directive.ngClick ngClick} */ /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngMouseup * * @description * Specify custom behavior on mouseup event. * * @element ANY * @param {expression} ngMouseup {@link guide/dev_guide.expressions Expression} to evaluate upon * mouseup. (Event object is available as `$event`) * * @example * See {@link angular.module.ng.$compileProvider.directive.ngClick ngClick} */ /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngMouseover * * @description * Specify custom behavior on mouseover event. * * @element ANY * @param {expression} ngMouseover {@link guide/dev_guide.expressions Expression} to evaluate upon * mouseover. (Event object is available as `$event`) * * @example * See {@link angular.module.ng.$compileProvider.directive.ngClick ngClick} */ /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngMouseenter * * @description * Specify custom behavior on mouseenter event. * * @element ANY * @param {expression} ngMouseenter {@link guide/dev_guide.expressions Expression} to evaluate upon * mouseenter. (Event object is available as `$event`) * * @example * See {@link angular.module.ng.$compileProvider.directive.ngClick ngClick} */ /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngMouseleave * * @description * Specify custom behavior on mouseleave event. * * @element ANY * @param {expression} ngMouseleave {@link guide/dev_guide.expressions Expression} to evaluate upon * mouseleave. (Event object is available as `$event`) * * @example * See {@link angular.module.ng.$compileProvider.directive.ngClick ngClick} */ /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngMousemove * * @description * Specify custom behavior on mousemove event. * * @element ANY * @param {expression} ngMousemove {@link guide/dev_guide.expressions Expression} to evaluate upon * mousemove. (Event object is available as `$event`) * * @example * See {@link angular.module.ng.$compileProvider.directive.ngClick ngClick} */ /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngSubmit * * @description * Enables binding angular expressions to onsubmit events. * * Additionally it prevents the default action (which for form means sending the request to the * server and reloading the current page). * * @element form * @param {expression} ngSubmit {@link guide/dev_guide.expressions Expression} to eval. * * @example <doc:example> <doc:source> <script> function Ctrl($scope) { $scope.list = []; $scope.text = 'hello'; $scope.submit = function() { if (this.text) { this.list.push(this.text); this.text = ''; } }; } </script> <form ng-submit="submit()" ng-controller="Ctrl"> Enter text and hit enter: <input type="text" ng-model="text" name="text" /> <input type="submit" id="submit" value="Submit" /> <pre>list={{list}}</pre> </form> </doc:source> <doc:scenario> it('should check ng-submit', function() { expect(binding('list')).toBe('[]'); element('.doc-example-live #submit').click(); expect(binding('list')).toBe('["hello"]'); expect(input('text').val()).toBe(''); }); it('should ignore empty strings', function() { expect(binding('list')).toBe('[]'); element('.doc-example-live #submit').click(); element('.doc-example-live #submit').click(); expect(binding('list')).toBe('["hello"]'); }); </doc:scenario> </doc:example> */ var ngSubmitDirective = ngDirective(function(scope, element, attrs) { element.bind('submit', function() { scope.$apply(attrs.ngSubmit); }); }); /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngInclude * @restrict ECA * * @description * Fetches, compiles and includes an external HTML fragment. * * Keep in mind that Same Origin Policy applies to included resources * (e.g. ngInclude won't work for cross-domain requests on all browsers and for * file:// access on some browsers). * * @scope * * @param {string} ngInclude|src angular expression evaluating to URL. If the source is a string constant, * make sure you wrap it in quotes, e.g. `src="'myPartialTemplate.html'"`. * @param {string=} onload Expression to evaluate when a new partial is loaded. * * @param {string=} autoscroll Whether `ngInclude` should call {@link angular.module.ng.$anchorScroll * $anchorScroll} to scroll the viewport after the content is loaded. * * - If the attribute is not set, disable scrolling. * - If the attribute is set without value, enable scrolling. * - Otherwise enable scrolling only if the expression evaluates to truthy value. * * @example <doc:example> <doc:source jsfiddle="false"> <script> function Ctrl($scope) { $scope.templates = [ { name: 'template1.html', url: 'examples/ng-include/template1.html'} , { name: 'template2.html', url: 'examples/ng-include/template2.html'} ]; $scope.template = $scope.templates[0]; } </script> <div ng-controller="Ctrl"> <select ng-model="template" ng-options="t.name for t in templates"> <option value="">(blank)</option> </select> url of the template: <tt><a href="{{template.url}}">{{template.url}}</a></tt> <hr/> <div ng-include src="template.url"></div> </div> </doc:source> <doc:scenario> it('should load template1.html', function() { expect(element('.doc-example-live [ng-include]').text()). toBe('Content of template1.html\n'); }); it('should load template2.html', function() { select('template').option('1'); expect(element('.doc-example-live [ng-include]').text()). toBe('Content of template2.html\n'); }); it('should change to blank', function() { select('template').option(''); expect(element('.doc-example-live [ng-include]').text()).toEqual(''); }); </doc:scenario> </doc:example> */ /** * @ngdoc event * @name angular.module.ng.$compileProvider.directive.ngInclude#$includeContentLoaded * @eventOf angular.module.ng.$compileProvider.directive.ngInclude * @eventType emit on the current ngInclude scope * @description * Emitted every time the ngInclude content is reloaded. */ var ngIncludeDirective = ['$http', '$templateCache', '$anchorScroll', '$compile', function($http, $templateCache, $anchorScroll, $compile) { return { restrict: 'ECA', terminal: true, compile: function(element, attr) { var srcExp = attr.ngInclude || attr.src, onloadExp = attr.onload || '', autoScrollExp = attr.autoscroll; return function(scope, element) { var changeCounter = 0, childScope; var clearContent = function() { if (childScope) { childScope.$destroy(); childScope = null; } element.html(''); }; scope.$watch(srcExp, function(src) { var thisChangeId = ++changeCounter; if (src) { $http.get(src, {cache: $templateCache}).success(function(response) { if (thisChangeId !== changeCounter) return; if (childScope) childScope.$destroy(); childScope = scope.$new(); element.html(response); $compile(element.contents())(childScope); if (isDefined(autoScrollExp) && (!autoScrollExp || scope.$eval(autoScrollExp))) { $anchorScroll(); } childScope.$emit('$includeContentLoaded'); scope.$eval(onloadExp); }).error(function() { if (thisChangeId === changeCounter) clearContent(); }); } else clearContent(); }); }; } }; }]; /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngInit * * @description * The `ngInit` directive specifies initialization tasks to be executed * before the template enters execution mode during bootstrap. * * @element ANY * @param {expression} ngInit {@link guide/dev_guide.expressions Expression} to eval. * * @example <doc:example> <doc:source> <div ng-init="greeting='Hello'; person='World'"> {{greeting}} {{person}}! </div> </doc:source> <doc:scenario> it('should check greeting', function() { expect(binding('greeting')).toBe('Hello'); expect(binding('person')).toBe('World'); }); </doc:scenario> </doc:example> */ var ngInitDirective = ngDirective({ compile: function() { return { pre: function(scope, element, attrs) { scope.$eval(attrs.ngInit); } } } }); /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngNonBindable * @priority 1000 * * @description * Sometimes it is necessary to write code which looks like bindings but which should be left alone * by angular. Use `ngNonBindable` to make angular ignore a chunk of HTML. * * @element ANY * * @example * In this example there are two location where a simple binding (`{{}}`) is present, but the one * wrapped in `ngNonBindable` is left alone. * * @example <doc:example> <doc:source> <div>Normal: {{1 + 2}}</div> <div ng-non-bindable>Ignored: {{1 + 2}}</div> </doc:source> <doc:scenario> it('should check ng-non-bindable', function() { expect(using('.doc-example-live').binding('1 + 2')).toBe('3'); expect(using('.doc-example-live').element('div:last').text()). toMatch(/1 \+ 2/); }); </doc:scenario> </doc:example> */ var ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 }); /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngPluralize * @restrict EA * * @description * # Overview * `ngPluralize` is a directive that displays messages according to en-US localization rules. * These rules are bundled with angular.js and the rules can be overridden * (see {@link guide/dev_guide.i18n Angular i18n} dev guide). You configure ngPluralize directive * by specifying the mappings between * {@link http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html * plural categories} and the strings to be displayed. * * # Plural categories and explicit number rules * There are two * {@link http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html * plural categories} in Angular's default en-US locale: "one" and "other". * * While a pural category may match many numbers (for example, in en-US locale, "other" can match * any number that is not 1), an explicit number rule can only match one number. For example, the * explicit number rule for "3" matches the number 3. You will see the use of plural categories * and explicit number rules throughout later parts of this documentation. * * # Configuring ngPluralize * You configure ngPluralize by providing 2 attributes: `count` and `when`. * You can also provide an optional attribute, `offset`. * * The value of the `count` attribute can be either a string or an {@link guide/dev_guide.expressions * Angular expression}; these are evaluated on the current scope for its binded value. * * The `when` attribute specifies the mappings between plural categories and the actual * string to be displayed. The value of the attribute should be a JSON object so that Angular * can interpret it correctly. * * The following example shows how to configure ngPluralize: * * <pre> * <ng-pluralize count="personCount" when="{'0': 'Nobody is viewing.', * 'one': '1 person is viewing.', * 'other': '{} people are viewing.'}"> * </ng-pluralize> *</pre> * * In the example, `"0: Nobody is viewing."` is an explicit number rule. If you did not * specify this rule, 0 would be matched to the "other" category and "0 people are viewing" * would be shown instead of "Nobody is viewing". You can specify an explicit number rule for * other numbers, for example 12, so that instead of showing "12 people are viewing", you can * show "a dozen people are viewing". * * You can use a set of closed braces(`{}`) as a placeholder for the number that you want substituted * into pluralized strings. In the previous example, Angular will replace `{}` with * <span ng-non-bindable>`{{personCount}}`</span>. The closed braces `{}` is a placeholder * for <span ng-non-bindable>{{numberExpression}}</span>. * * # Configuring ngPluralize with offset * The `offset` attribute allows further customization of pluralized text, which can result in * a better user experience. For example, instead of the message "4 people are viewing this document", * you might display "John, Kate and 2 others are viewing this document". * The offset attribute allows you to offset a number by any desired value. * Let's take a look at an example: * * <pre> * <ng-pluralize count="personCount" offset=2 * when="{'0': 'Nobody is viewing.', * '1': '{{person1}} is viewing.', * '2': '{{person1}} and {{person2}} are viewing.', * 'one': '{{person1}}, {{person2}} and one other person are viewing.', * 'other': '{{person1}}, {{person2}} and {} other people are viewing.'}"> * </ng-pluralize> * </pre> * * Notice that we are still using two plural categories(one, other), but we added * three explicit number rules 0, 1 and 2. * When one person, perhaps John, views the document, "John is viewing" will be shown. * When three people view the document, no explicit number rule is found, so * an offset of 2 is taken off 3, and Angular uses 1 to decide the plural category. * In this case, plural category 'one' is matched and "John, Marry and one other person are viewing" * is shown. * * Note that when you specify offsets, you must provide explicit number rules for * numbers from 0 up to and including the offset. If you use an offset of 3, for example, * you must provide explicit number rules for 0, 1, 2 and 3. You must also provide plural strings for * plural categories "one" and "other". * * @param {string|expression} count The variable to be bounded to. * @param {string} when The mapping between plural category to its correspoding strings. * @param {number=} offset Offset to deduct from the total number. * * @example <doc:example> <doc:source> <script> function Ctrl($scope) { $scope.person1 = 'Igor'; $scope.person2 = 'Misko'; $scope.personCount = 1; } </script> <div ng-controller="Ctrl"> Person 1:<input type="text" ng-model="person1" value="Igor" /><br/> Person 2:<input type="text" ng-model="person2" value="Misko" /><br/> Number of People:<input type="text" ng-model="personCount" value="1" /><br/> <!--- Example with simple pluralization rules for en locale ---> Without Offset: <ng-pluralize count="personCount" when="{'0': 'Nobody is viewing.', 'one': '1 person is viewing.', 'other': '{} people are viewing.'}"> </ng-pluralize><br> <!--- Example with offset ---> With Offset(2): <ng-pluralize count="personCount" offset=2 when="{'0': 'Nobody is viewing.', '1': '{{person1}} is viewing.', '2': '{{person1}} and {{person2}} are viewing.', 'one': '{{person1}}, {{person2}} and one other person are viewing.', 'other': '{{person1}}, {{person2}} and {} other people are viewing.'}"> </ng-pluralize> </div> </doc:source> <doc:scenario> it('should show correct pluralized string', function() { expect(element('.doc-example-live ng-pluralize:first').text()). toBe('1 person is viewing.'); expect(element('.doc-example-live ng-pluralize:last').text()). toBe('Igor is viewing.'); using('.doc-example-live').input('personCount').enter('0'); expect(element('.doc-example-live ng-pluralize:first').text()). toBe('Nobody is viewing.'); expect(element('.doc-example-live ng-pluralize:last').text()). toBe('Nobody is viewing.'); using('.doc-example-live').input('personCount').enter('2'); expect(element('.doc-example-live ng-pluralize:first').text()). toBe('2 people are viewing.'); expect(element('.doc-example-live ng-pluralize:last').text()). toBe('Igor and Misko are viewing.'); using('.doc-example-live').input('personCount').enter('3'); expect(element('.doc-example-live ng-pluralize:first').text()). toBe('3 people are viewing.'); expect(element('.doc-example-live ng-pluralize:last').text()). toBe('Igor, Misko and one other person are viewing.'); using('.doc-example-live').input('personCount').enter('4'); expect(element('.doc-example-live ng-pluralize:first').text()). toBe('4 people are viewing.'); expect(element('.doc-example-live ng-pluralize:last').text()). toBe('Igor, Misko and 2 other people are viewing.'); }); it('should show data-binded names', function() { using('.doc-example-live').input('personCount').enter('4'); expect(element('.doc-example-live ng-pluralize:last').text()). toBe('Igor, Misko and 2 other people are viewing.'); using('.doc-example-live').input('person1').enter('Di'); using('.doc-example-live').input('person2').enter('Vojta'); expect(element('.doc-example-live ng-pluralize:last').text()). toBe('Di, Vojta and 2 other people are viewing.'); }); </doc:scenario> </doc:example> */ var ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interpolate) { var BRACE = /{}/g; return { restrict: 'EA', link: function(scope, element, attr) { var numberExp = attr.count, whenExp = element.attr(attr.$attr.when), // this is because we have {{}} in attrs offset = attr.offset || 0, whens = scope.$eval(whenExp), whensExpFns = {}; forEach(whens, function(expression, key) { whensExpFns[key] = $interpolate(expression.replace(BRACE, '{{' + numberExp + '-' + offset + '}}')); }); scope.$watch(function() { var value = parseFloat(scope.$eval(numberExp)); if (!isNaN(value)) { //if explicit number rule such as 1, 2, 3... is defined, just use it. Otherwise, //check it against pluralization rules in $locale service if (!whens[value]) value = $locale.pluralCat(value - offset); return whensExpFns[value](scope, element, true); } else { return ''; } }, function(newVal) { element.text(newVal); }); } }; }]; /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngRepeat * * @description * The `ngRepeat` directive instantiates a template once per item from a collection. Each template * instance gets its own scope, where the given loop variable is set to the current collection item, * and `$index` is set to the item index or key. * * Special properties are exposed on the local scope of each template instance, including: * * * `$index` – `{number}` – iterator offset of the repeated element (0..length-1) * * `$position` – `{string}` – position of the repeated element in the iterator. One of: * * `'first'`, * * `'middle'` * * `'last'` * * * @element ANY * @scope * @priority 1000 * @param {repeat_expression} ngRepeat The expression indicating how to enumerate a collection. Two * formats are currently supported: * * * `variable in expression` – where variable is the user defined loop variable and `expression` * is a scope expression giving the collection to enumerate. * * For example: `track in cd.tracks`. * * * `(key, value) in expression` – where `key` and `value` can be any user defined identifiers, * and `expression` is the scope expression giving the collection to enumerate. * * For example: `(name, age) in {'adam':10, 'amalie':12}`. * * @example * This example initializes the scope to a list of names and * then uses `ngRepeat` to display every person: <doc:example> <doc:source> <div ng-init="friends = [{name:'John', age:25}, {name:'Mary', age:28}]"> I have {{friends.length}} friends. They are: <ul> <li ng-repeat="friend in friends"> [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old. </li> </ul> </div> </doc:source> <doc:scenario> it('should check ng-repeat', function() { var r = using('.doc-example-live').repeater('ul li'); expect(r.count()).toBe(2); expect(r.row(0)).toEqual(["1","John","25"]); expect(r.row(1)).toEqual(["2","Mary","28"]); }); </doc:scenario> </doc:example> */ var ngRepeatDirective = ngDirective({ transclude: 'element', priority: 1000, terminal: true, compile: function(element, attr, linker) { return function(scope, iterStartElement, attr){ var expression = attr.ngRepeat; var match = expression.match(/^\s*(.+)\s+in\s+(.*)\s*$/), lhs, rhs, valueIdent, keyIdent; if (! match) { throw Error("Expected ngRepeat in form of '_item_ in _collection_' but got '" + expression + "'."); } lhs = match[1]; rhs = match[2]; match = lhs.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/); if (!match) { throw Error("'item' in 'item in collection' should be identifier or (key, value) but got '" + lhs + "'."); } valueIdent = match[3] || match[1]; keyIdent = match[2]; // Store a list of elements from previous run. This is a hash where key is the item from the // iterator, and the value is an array of objects with following properties. // - scope: bound scope // - element: previous element. // - index: position // We need an array of these objects since the same object can be returned from the iterator. // We expect this to be a rare case. var lastOrder = new HashQueueMap(); scope.$watch(function(scope){ var index, length, collection = scope.$eval(rhs), collectionLength = size(collection, true), childScope, // Same as lastOrder but it has the current state. It will become the // lastOrder on the next iteration. nextOrder = new HashQueueMap(), key, value, // key/value of iteration array, last, // last object information {scope, element, index} cursor = iterStartElement; // current position of the node if (!isArray(collection)) { // if object, extract keys, sort them and use to determine order of iteration over obj props array = []; for(key in collection) { if (collection.hasOwnProperty(key) && key.charAt(0) != '$') { array.push(key); } } array.sort(); } else { array = collection || []; } // we are not using forEach for perf reasons (trying to avoid #call) for (index = 0, length = array.length; index < length; index++) { key = (collection === array) ? index : array[index]; value = collection[key]; last = lastOrder.shift(value); if (last) { // if we have already seen this object, then we need to reuse the // associated scope/element childScope = last.scope; nextOrder.push(value, last); if (index === last.index) { // do nothing cursor = last.element; } else { // existing item which got moved last.index = index; // This may be a noop, if the element is next, but I don't know of a good way to // figure this out, since it would require extra DOM access, so let's just hope that // the browsers realizes that it is noop, and treats it as such. cursor.after(last.element); cursor = last.element; } } else { // new item which we don't know about childScope = scope.$new(); } childScope[valueIdent] = value; if (keyIdent) childScope[keyIdent] = key; childScope.$index = index; childScope.$position = index === 0 ? 'first' : (index == collectionLength - 1 ? 'last' : 'middle'); if (!last) { linker(childScope, function(clone){ cursor.after(clone); last = { scope: childScope, element: (cursor = clone), index: index }; nextOrder.push(value, last); }); } } //shrink children for (key in lastOrder) { if (lastOrder.hasOwnProperty(key)) { array = lastOrder[key]; while(array.length) { value = array.pop(); value.element.remove(); value.scope.$destroy(); } } } lastOrder = nextOrder; }); }; } }); /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngShow * * @description * The `ngShow` and `ngHide` directives show or hide a portion of the DOM tree (HTML) * conditionally. * * @element ANY * @param {expression} ngShow If the {@link guide/dev_guide.expressions expression} is truthy * then the element is shown or hidden respectively. * * @example <doc:example> <doc:source> Click me: <input type="checkbox" ng-model="checked"><br/> Show: <span ng-show="checked">I show up when your checkbox is checked.</span> <br/> Hide: <span ng-hide="checked">I hide when your checkbox is checked.</span> </doc:source> <doc:scenario> it('should check ng-show / ng-hide', function() { expect(element('.doc-example-live span:first:hidden').count()).toEqual(1); expect(element('.doc-example-live span:last:visible').count()).toEqual(1); input('checked').check(); expect(element('.doc-example-live span:first:visible').count()).toEqual(1); expect(element('.doc-example-live span:last:hidden').count()).toEqual(1); }); </doc:scenario> </doc:example> */ //TODO(misko): refactor to remove element from the DOM var ngShowDirective = ngDirective(function(scope, element, attr){ scope.$watch(attr.ngShow, function(value){ element.css('display', toBoolean(value) ? '' : 'none'); }); }); /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngHide * * @description * The `ngHide` and `ngShow` directives hide or show a portion * of the HTML conditionally. * * @element ANY * @param {expression} ngHide If the {@link guide/dev_guide.expressions expression} truthy then * the element is shown or hidden respectively. * * @example <doc:example> <doc:source> Click me: <input type="checkbox" ng-model="checked"><br/> Show: <span ng-show="checked">I show up when you checkbox is checked?</span> <br/> Hide: <span ng-hide="checked">I hide when you checkbox is checked?</span> </doc:source> <doc:scenario> it('should check ng-show / ng-hide', function() { expect(element('.doc-example-live span:first:hidden').count()).toEqual(1); expect(element('.doc-example-live span:last:visible').count()).toEqual(1); input('checked').check(); expect(element('.doc-example-live span:first:visible').count()).toEqual(1); expect(element('.doc-example-live span:last:hidden').count()).toEqual(1); }); </doc:scenario> </doc:example> */ //TODO(misko): refactor to remove element from the DOM var ngHideDirective = ngDirective(function(scope, element, attr){ scope.$watch(attr.ngHide, function(value){ element.css('display', toBoolean(value) ? 'none' : ''); }); }); /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngStyle * * @description * The `ngStyle` directive allows you to set CSS style on an HTML element conditionally. * * @element ANY * @param {expression} ngStyle {@link guide/dev_guide.expressions Expression} which evals to an * object whose keys are CSS style names and values are corresponding values for those CSS * keys. * * @example <doc:example> <doc:source> <input type="button" value="set" ng-click="myStyle={color:'red'}"> <input type="button" value="clear" ng-click="myStyle={}"> <br/> <span ng-style="myStyle">Sample Text</span> <pre>myStyle={{myStyle}}</pre> </doc:source> <doc:scenario> it('should check ng-style', function() { expect(element('.doc-example-live span').css('color')).toBe('rgb(0, 0, 0)'); element('.doc-example-live :button[value=set]').click(); expect(element('.doc-example-live span').css('color')).toBe('rgb(255, 0, 0)'); element('.doc-example-live :button[value=clear]').click(); expect(element('.doc-example-live span').css('color')).toBe('rgb(0, 0, 0)'); }); </doc:scenario> </doc:example> */ var ngStyleDirective = ngDirective(function(scope, element, attr) { scope.$watch(attr.ngStyle, function(newStyles, oldStyles) { if (oldStyles && (newStyles !== oldStyles)) { forEach(oldStyles, function(val, style) { element.css(style, '');}); } if (newStyles) element.css(newStyles); }, true); }); /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngSwitch * @restrict EA * * @description * Conditionally change the DOM structure. * * @usageContent * <ANY ng-switch-when="matchValue1">...</ANY> * <ANY ng-switch-when="matchValue2">...</ANY> * ... * <ANY ng-switch-default>...</ANY> * * @scope * @param {*} ngSwitch|on expression to match against <tt>ng-switch-when</tt>. * @paramDescription * On child elments add: * * * `ngSwitchWhen`: the case statement to match against. If match then this * case will be displayed. * * `ngSwitchDefault`: the default case when no other casses match. * * @example <doc:example> <doc:source> <script> function Ctrl($scope) { $scope.items = ['settings', 'home', 'other']; $scope.selection = $scope.items[0]; } </script> <div ng-controller="Ctrl"> <select ng-model="selection" ng-options="item for item in items"> </select> <tt>selection={{selection}}</tt> <hr/> <div ng-switch on="selection" > <div ng-switch-when="settings">Settings Div</div> <span ng-switch-when="home">Home Span</span> <span ng-switch-default>default</span> </div> </div> </doc:source> <doc:scenario> it('should start in settings', function() { expect(element('.doc-example-live [ng-switch]').text()).toMatch(/Settings Div/); }); it('should change to home', function() { select('selection').option('home'); expect(element('.doc-example-live [ng-switch]').text()).toMatch(/Home Span/); }); it('should select deafault', function() { select('selection').option('other'); expect(element('.doc-example-live [ng-switch]').text()).toMatch(/default/); }); </doc:scenario> </doc:example> */ var NG_SWITCH = 'ng-switch'; var ngSwitchDirective = valueFn({ restrict: 'EA', compile: function(element, attr) { var watchExpr = attr.ngSwitch || attr.on, cases = {}; element.data(NG_SWITCH, cases); return function(scope, element){ var selectedTransclude, selectedElement, selectedScope; scope.$watch(watchExpr, function(value) { if (selectedElement) { selectedScope.$destroy(); selectedElement.remove(); selectedElement = selectedScope = null; } if ((selectedTransclude = cases['!' + value] || cases['?'])) { scope.$eval(attr.change); selectedScope = scope.$new(); selectedTransclude(selectedScope, function(caseElement) { selectedElement = caseElement; element.append(caseElement); }); } }); }; } }); var ngSwitchWhenDirective = ngDirective({ transclude: 'element', priority: 500, compile: function(element, attrs, transclude) { var cases = element.inheritedData(NG_SWITCH); assertArg(cases); cases['!' + attrs.ngSwitchWhen] = transclude; } }); var ngSwitchDefaultDirective = ngDirective({ transclude: 'element', priority: 500, compile: function(element, attrs, transclude) { var cases = element.inheritedData(NG_SWITCH); assertArg(cases); cases['?'] = transclude; } }); /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngTransclude * * @description * Insert the transcluded DOM here. * * @element ANY * * @example <doc:example module="transclude"> <doc:source> <script> function Ctrl($scope) { $scope.title = 'Lorem Ipsum'; $scope.text = 'Neque porro quisquam est qui dolorem ipsum quia dolor...'; } angular.module('transclude', []) .directive('pane', function(){ return { restrict: 'E', transclude: true, scope: 'isolate', locals: { title:'bind' }, template: '<div style="border: 1px solid black;">' + '<div style="background-color: gray">{{title}}</div>' + '<div ng-transclude></div>' + '</div>' }; }); </script> <div ng-controller="Ctrl"> <input ng-model="title"><br> <textarea ng-model="text"></textarea> <br/> <pane title="{{title}}">{{text}}</pane> </div> </doc:source> <doc:scenario> it('should have transcluded', function() { input('title').enter('TITLE'); input('text').enter('TEXT'); expect(binding('title')).toEqual('TITLE'); expect(binding('text')).toEqual('TEXT'); }); </doc:scenario> </doc:example> * */ var ngTranscludeDirective = ngDirective({ controller: ['$transclude', '$element', function($transclude, $element) { $transclude(function(clone) { $element.append(clone); }); }] }); /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.ngView * @restrict ECA * * @description * # Overview * `ngView` is a directive that complements the {@link angular.module.ng.$route $route} service by * including the rendered template of the current route into the main layout (`index.html`) file. * Every time the current route changes, the included view changes with it according to the * configuration of the `$route` service. * * @scope * @example <doc:example module="ngView"> <doc:source> <script type="text/ng-template" id="examples/book.html"> controller: {{name}}<br /> Book Id: {{params.bookId}}<br /> </script> <script type="text/ng-template" id="examples/chapter.html"> controller: {{name}}<br /> Book Id: {{params.bookId}}<br /> Chapter Id: {{params.chapterId}} </script> <script> angular.module('ngView', [], function($routeProvider, $locationProvider) { $routeProvider.when('/Book/:bookId', { template: 'examples/book.html', controller: BookCntl }); $routeProvider.when('/Book/:bookId/ch/:chapterId', { template: 'examples/chapter.html', controller: ChapterCntl }); // configure html5 to get links working on jsfiddle $locationProvider.html5Mode(true); }); function MainCntl($scope, $route, $routeParams, $location) { $scope.$route = $route; $scope.$location = $location; $scope.$routeParams = $routeParams; } function BookCntl($scope, $routeParams) { $scope.name = "BookCntl"; $scope.params = $routeParams; } function ChapterCntl($scope, $routeParams) { $scope.name = "ChapterCntl"; $scope.params = $routeParams; } </script> <div ng-controller="MainCntl"> Choose: <a href="Book/Moby">Moby</a> | <a href="Book/Moby/ch/1">Moby: Ch1</a> | <a href="Book/Gatsby">Gatsby</a> | <a href="Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> | <a href="Book/Scarlet">Scarlet Letter</a><br/> <div ng-view></div> <hr /> <pre>$location.path() = {{$location.path()}}</pre> <pre>$route.current.template = {{$route.current.template}}</pre> <pre>$route.current.params = {{$route.current.params}}</pre> <pre>$route.current.scope.name = {{$route.current.scope.name}}</pre> <pre>$routeParams = {{$routeParams}}</pre> </div> </doc:source> <doc:scenario> it('should load and compile correct template', function() { element('a:contains("Moby: Ch1")').click(); var content = element('.doc-example-live [ng-view]').text(); expect(content).toMatch(/controller\: ChapterCntl/); expect(content).toMatch(/Book Id\: Moby/); expect(content).toMatch(/Chapter Id\: 1/); element('a:contains("Scarlet")').click(); content = element('.doc-example-live [ng-view]').text(); expect(content).toMatch(/controller\: BookCntl/); expect(content).toMatch(/Book Id\: Scarlet/); }); </doc:scenario> </doc:example> */ /** * @ngdoc event * @name angular.module.ng.$compileProvider.directive.ngView#$viewContentLoaded * @eventOf angular.module.ng.$compileProvider.directive.ngView * @eventType emit on the current ngView scope * @description * Emitted every time the ngView content is reloaded. */ var ngViewDirective = ['$http', '$templateCache', '$route', '$anchorScroll', '$compile', '$controller', function($http, $templateCache, $route, $anchorScroll, $compile, $controller) { return { restrict: 'ECA', terminal: true, link: function(scope, element, attr) { var changeCounter = 0, lastScope, onloadExp = attr.onload || ''; scope.$on('$afterRouteChange', update); update(); function destroyLastScope() { if (lastScope) { lastScope.$destroy(); lastScope = null; } } function update() { var template = $route.current && $route.current.template, thisChangeId = ++changeCounter; function clearContent() { // ignore callback if another route change occured since if (thisChangeId === changeCounter) { element.html(''); destroyLastScope(); } } if (template) { $http.get(template, {cache: $templateCache}).success(function(response) { // ignore callback if another route change occured since if (thisChangeId === changeCounter) { element.html(response); destroyLastScope(); var link = $compile(element.contents()), current = $route.current, controller; lastScope = current.scope = scope.$new(); if (current.controller) { controller = $controller(current.controller, {$scope: lastScope}); element.contents().data('$ngControllerController', controller); } link(lastScope); lastScope.$emit('$viewContentLoaded'); lastScope.$eval(onloadExp); // $anchorScroll might listen on event... $anchorScroll(); } }).error(clearContent); } else { clearContent(); } } } }; }]; /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.script * * @description * Load content of a script tag, with type `text/ng-template`, into `$templateCache`, so that the * template can be used by `ngInclude`, `ngView` or directive templates. * * @restrict E * @param {'text/ng-template'} type must be set to `'text/ng-template'` * * @example <doc:example> <doc:source> <script type="text/ng-template" id="/tpl.html"> Content of the template. </script> <a ng-click="currentTpl='/tpl.html'" id="tpl-link">Load inlined template</a> <div id="tpl-content" ng-include src="currentTpl"></div> </doc:source> <doc:scenario> it('should load template defined inside script tag', function() { element('#tpl-link').click(); expect(element('#tpl-content').text()).toMatch(/Content of the template/); }); </doc:scenario> </doc:example> */ var scriptDirective = ['$templateCache', function($templateCache) { return { restrict: 'E', terminal: true, compile: function(element, attr) { if (attr.type == 'text/ng-template') { var templateUrl = attr.id, // IE is not consistent, in scripts we have to read .text but in other nodes we have to read .textContent text = element[0].text; $templateCache.put(templateUrl, text); } } }; }]; /** * @ngdoc directive * @name angular.module.ng.$compileProvider.directive.select * @restrict E * * @description * HTML `SELECT` element with angular data-binding. * * # `ngOptions` * * Optionally `ngOptions` attribute can be used to dynamically generate a list of `<option>` * elements for a `<select>` element using an array or an object obtained by evaluating the * `ngOptions` expression. *˝˝ * When an item in the select menu is select, the value of array element or object property * represented by the selected option will be bound to the model identified by the `ngModel` * directive of the parent select element. * * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can * be nested into the `<select>` element. This element will then represent `null` or "not selected" * option. See example below for demonstration. * * Note: `ngOptions` provides iterator facility for `<option>` element which should be used instead * of {@link angular.module.ng.$compileProvider.directive.ngRepeat ngRepeat} when you want the * `select` model to be bound to a non-string value. This is because an option element can currently * be bound to string values only. * * @param {string} name assignable expression to data-bind to. * @param {string=} required The control is considered valid only if value is entered. * @param {comprehension_expression=} ngOptions in one of the following forms: * * * for array data sources: * * `label` **`for`** `value` **`in`** `array` * * `select` **`as`** `label` **`for`** `value` **`in`** `array` * * `label` **`group by`** `group` **`for`** `value` **`in`** `array` * * `select` **`as`** `label` **`group by`** `group` **`for`** `value` **`in`** `array` * * for object data sources: * * `label` **`for (`**`key` **`,`** `value`**`) in`** `object` * * `select` **`as`** `label` **`for (`**`key` **`,`** `value`**`) in`** `object` * * `label` **`group by`** `group` **`for (`**`key`**`,`** `value`**`) in`** `object` * * `select` **`as`** `label` **`group by`** `group` * **`for` `(`**`key`**`,`** `value`**`) in`** `object` * * Where: * * * `array` / `object`: an expression which evaluates to an array / object to iterate over. * * `value`: local variable which will refer to each item in the `array` or each property value * of `object` during iteration. * * `key`: local variable which will refer to a property name in `object` during iteration. * * `label`: The result of this expression will be the label for `<option>` element. The * `expression` will most likely refer to the `value` variable (e.g. `value.propertyName`). * * `select`: The result of this expression will be bound to the model of the parent `<select>` * element. If not specified, `select` expression will default to `value`. * * `group`: The result of this expression will be used to group options using the `<optgroup>` * DOM element. * * @example <doc:example> <doc:source> <script> function MyCntrl($scope) { $scope.colors = [ {name:'black', shade:'dark'}, {name:'white', shade:'light'}, {name:'red', shade:'dark'}, {name:'blue', shade:'dark'}, {name:'yellow', shade:'light'} ]; $scope.color = $scope.colors[2]; // red } </script> <div ng-controller="MyCntrl"> <ul> <li ng-repeat="color in colors"> Name: <input ng-model="color.name"> [<a href ng-click="colors.$remove(color)">X</a>] </li> <li> [<a href ng-click="colors.push({})">add</a>] </li> </ul> <hr/> Color (null not allowed): <select ng-model="color" ng-options="c.name for c in colors"></select><br> Color (null allowed): <span class="nullable"> <select ng-model="color" ng-options="c.name for c in colors"> <option value="">-- chose color --</option> </select> </span><br/> Color grouped by shade: <select ng-model="color" ng-options="c.name group by c.shade for c in colors"> </select><br/> Select <a href ng-click="color={name:'not in list'}">bogus</a>.<br> <hr/> Currently selected: {{ {selected_color:color} }} <div style="border:solid 1px black; height:20px" ng-style="{'background-color':color.name}"> </div> </div> </doc:source> <doc:scenario> it('should check ng-options', function() { expect(binding('{selected_color:color}')).toMatch('red'); select('color').option('0'); expect(binding('{selected_color:color}')).toMatch('black'); using('.nullable').select('color').option(''); expect(binding('{selected_color:color}')).toMatch('null'); }); </doc:scenario> </doc:example> */ var ngOptionsDirective = valueFn({ terminal: true }); var selectDirective = ['$compile', '$parse', function($compile, $parse) { //00001111100000000000222200000000000000000000003333000000000000044444444444444444000000000555555555555555550000000666666666666666660000000000000007777 var NG_OPTIONS_REGEXP = /^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/, nullModelCtrl = {$setViewValue: noop}; return { restrict: 'E', require: ['select', '?ngModel'], controller: ['$element', '$scope', function($element, $scope) { var self = this, optionsMap = {}, ngModelCtrl = nullModelCtrl, nullOption, unknownOption; self.init = function(ngModelCtrl_, nullOption_, unknownOption_) { ngModelCtrl = ngModelCtrl_; nullOption = nullOption_; unknownOption = unknownOption_; } self.addOption = function(value) { optionsMap[value] = true; if (ngModelCtrl.$viewValue == value) { $element.val(value); if (unknownOption.parent()) unknownOption.remove(); } }; self.removeOption = function(value) { if (this.hasOption(value)) { delete optionsMap[value]; if (ngModelCtrl.$viewValue == value) { this.renderUnknownOption(value); } } }; self.renderUnknownOption = function(val) { var unknownVal = '? ' + hashKey(val) + ' ?'; unknownOption.val(unknownVal); $element.prepend(unknownOption); $element.val(unknownVal); unknownOption.prop('selected', true); // needed for IE } self.hasOption = function(value) { return optionsMap.hasOwnProperty(value); } $scope.$on('$destroy', function() { // disable unknown option so that we don't do work when the whole select is being destroyed self.renderUnknownOption = noop; }); }], link: function(scope, element, attr, ctrls) { // if ngModel is not defined, we don't need to do anything if (!ctrls[1]) return; var selectCtrl = ctrls[0], ngModelCtrl = ctrls[1], multiple = attr.multiple, optionsExp = attr.ngOptions, nullOption = false, // if false, user will not be able to select it (used by ngOptions) emptyOption, // we can't just jqLite('<option>') since jqLite is not smart enough // to create it in <select> and IE barfs otherwise. optionTemplate = jqLite(document.createElement('option')), optGroupTemplate =jqLite(document.createElement('optgroup')), unknownOption = optionTemplate.clone(); // find "null" option for(var i = 0, children = element.children(), ii = children.length; i < ii; i++) { if (children[i].value == '') { emptyOption = nullOption = children.eq(i); break; } } selectCtrl.init(ngModelCtrl, nullOption, unknownOption); // required validator if (multiple && (attr.required || attr.ngRequired)) { var requiredValidator = function(value) { ngModelCtrl.$setValidity('required', !attr.required || (value && value.length)); return value; }; ngModelCtrl.$parsers.push(requiredValidator); ngModelCtrl.$formatters.unshift(requiredValidator); attr.$observe('required', function() { requiredValidator(ngModelCtrl.$viewValue); }); } if (optionsExp) Options(scope, element, ngModelCtrl); else if (multiple) Multiple(scope, element, ngModelCtrl); else Single(scope, element, ngModelCtrl, selectCtrl); //////////////////////////// function Single(scope, selectElement, ngModelCtrl, selectCtrl) { ngModelCtrl.$render = function() { var viewValue = ngModelCtrl.$viewValue; if (selectCtrl.hasOption(viewValue)) { if (unknownOption.parent()) unknownOption.remove(); selectElement.val(viewValue); if (viewValue === '') emptyOption.prop('selected', true); // to make IE9 happy } else { if (isUndefined(viewValue) && emptyOption) { selectElement.val(''); } else { selectCtrl.renderUnknownOption(viewValue); } } }; selectElement.bind('change', function() { scope.$apply(function() { if (unknownOption.parent()) unknownOption.remove(); ngModelCtrl.$setViewValue(selectElement.val()); }); }); } function Multiple(scope, selectElement, ctrl) { var lastView; ctrl.$render = function() { var items = new HashMap(ctrl.$viewValue); forEach(selectElement.children(), function(option) { option.selected = isDefined(items.get(option.value)); }); }; // we have to do it on each watch since ngModel watches reference, but // we need to work of an array, so we need to see if anything was inserted/removed scope.$watch(function() { if (!equals(lastView, ctrl.$viewValue)) { lastView = copy(ctrl.$viewValue); ctrl.$render(); } }); selectElement.bind('change', function() { scope.$apply(function() { var array = []; forEach(selectElement.children(), function(option) { if (option.selected) { array.push(option.value); } }); ctrl.$setViewValue(array); }); }); } function Options(scope, selectElement, ctrl) { var match; if (! (match = optionsExp.match(NG_OPTIONS_REGEXP))) { throw Error( "Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_'" + " but got '" + optionsExp + "'."); } var displayFn = $parse(match[2] || match[1]), valueName = match[4] || match[6], keyName = match[5], groupByFn = $parse(match[3] || ''), valueFn = $parse(match[2] ? match[1] : valueName), valuesFn = $parse(match[7]), // This is an array of array of existing option groups in DOM. We try to reuse these if possible // optionGroupsCache[0] is the options with no option group // optionGroupsCache[?][0] is the parent: either the SELECT or OPTGROUP element optionGroupsCache = [[{element: selectElement, label:''}]]; if (nullOption) { // compile the element since there might be bindings in it $compile(nullOption)(scope); // remove the class, which is added automatically because we recompile the element and it // becomes the compilation root nullOption.removeClass('ng-scope'); // we need to remove it before calling selectElement.html('') because otherwise IE will // remove the label from the element. wtf? nullOption.remove(); } // clear contents, we'll add what's needed based on the model selectElement.html(''); selectElement.bind('change', function() { scope.$apply(function() { var optionGroup, collection = valuesFn(scope) || [], locals = {}, key, value, optionElement, index, groupIndex, length, groupLength; if (multiple) { value = []; for (groupIndex = 0, groupLength = optionGroupsCache.length; groupIndex < groupLength; groupIndex++) { // list of options for that group. (first item has the parent) optionGroup = optionGroupsCache[groupIndex]; for(index = 1, length = optionGroup.length; index < length; index++) { if ((optionElement = optionGroup[index].element)[0].selected) { key = optionElement.val(); if (keyName) locals[keyName] = key; locals[valueName] = collection[key]; value.push(valueFn(scope, locals)); } } } } else { key = selectElement.val(); if (key == '?') { value = undefined; } else if (key == ''){ value = null; } else { locals[valueName] = collection[key]; if (keyName) locals[keyName] = key; value = valueFn(scope, locals); } } ctrl.$setViewValue(value); }); }); ctrl.$render = render; // TODO(vojta): can't we optimize this ? scope.$watch(render); function render() { var optionGroups = {'':[]}, // Temporary location for the option groups before we render them optionGroupNames = [''], optionGroupName, optionGroup, option, existingParent, existingOptions, existingOption, modelValue = ctrl.$modelValue, values = valuesFn(scope) || [], keys = keyName ? sortedKeys(values) : values, groupLength, length, groupIndex, index, locals = {}, selected, selectedSet = false, // nothing is selected yet lastElement, element; if (multiple) { selectedSet = new HashMap(modelValue); } else if (modelValue === null || nullOption) { // if we are not multiselect, and we are null then we have to add the nullOption optionGroups[''].push({selected:modelValue === null, id:'', label:''}); selectedSet = true; } // We now build up the list of options we need (we merge later) for (index = 0; length = keys.length, index < length; index++) { locals[valueName] = values[keyName ? locals[keyName]=keys[index]:index]; optionGroupName = groupByFn(scope, locals) || ''; if (!(optionGroup = optionGroups[optionGroupName])) { optionGroup = optionGroups[optionGroupName] = []; optionGroupNames.push(optionGroupName); } if (multiple) { selected = selectedSet.remove(valueFn(scope, locals)) != undefined; } else { selected = modelValue === valueFn(scope, locals); selectedSet = selectedSet || selected; // see if at least one item is selected } optionGroup.push({ id: keyName ? keys[index] : index, // either the index into array or key from object label: displayFn(scope, locals) || '', // what will be seen by the user selected: selected // determine if we should be selected }); } if (!multiple && !selectedSet) { // nothing was selected, we have to insert the undefined item optionGroups[''].unshift({id:'?', label:'', selected:true}); } // Now we need to update the list of DOM nodes to match the optionGroups we computed above for (groupIndex = 0, groupLength = optionGroupNames.length; groupIndex < groupLength; groupIndex++) { // current option group name or '' if no group optionGroupName = optionGroupNames[groupIndex]; // list of options for that group. (first item has the parent) optionGroup = optionGroups[optionGroupName]; if (optionGroupsCache.length <= groupIndex) { // we need to grow the optionGroups existingParent = { element: optGroupTemplate.clone().attr('label', optionGroupName), label: optionGroup.label }; existingOptions = [existingParent]; optionGroupsCache.push(existingOptions); selectElement.append(existingParent.element); } else { existingOptions = optionGroupsCache[groupIndex]; existingParent = existingOptions[0]; // either SELECT (no group) or OPTGROUP element // update the OPTGROUP label if not the same. if (existingParent.label != optionGroupName) { existingParent.element.attr('label', existingParent.label = optionGroupName); } } lastElement = null; // start at the beginning for(index = 0, length = optionGroup.length; index < length; index++) { option = optionGroup[index]; if ((existingOption = existingOptions[index+1])) { // reuse elements lastElement = existingOption.element; if (existingOption.label !== option.label) { lastElement.text(existingOption.label = option.label); } if (existingOption.id !== option.id) { lastElement.val(existingOption.id = option.id); } if (existingOption.element.selected !== option.selected) { lastElement.prop('selected', (existingOption.selected = option.selected)); } } else { // grow elements // if it's a null option if (option.id === '' && nullOption) { // put back the pre-compiled element element = nullOption; } else { // jQuery(v1.4.2) Bug: We should be able to chain the method calls, but // in this version of jQuery on some browser the .text() returns a string // rather then the element. (element = optionTemplate.clone()) .val(option.id) .attr('selected', option.selected) .text(option.label); } existingOptions.push(existingOption = { element: element, label: option.label, id: option.id, selected: option.selected }); if (lastElement) { lastElement.after(element); } else { existingParent.element.append(element); } lastElement = element; } } // remove any excessive OPTIONs in a group index++; // increment since the existingOptions[0] is parent element not OPTION while(existingOptions.length > index) { existingOptions.pop().element.remove(); } } // remove any excessive OPTGROUPs from select while(optionGroupsCache.length > groupIndex) { optionGroupsCache.pop()[0].element.remove(); } } } } } }]; var optionDirective = ['$interpolate', function($interpolate) { return { restrict: 'E', priority: 100, require: '^select', compile: function(element, attr) { if (isUndefined(attr.value)) { var interpolateFn = $interpolate(element.text(), true); if (!interpolateFn) { attr.$set('value', element.text()); } } // For some reason Opera defaults to true and if not overridden this messes up the repeater. // We don't want the view to drive the initialization of the model anyway. element.prop('selected', false); return function (scope, element, attr, selectCtrl) { if (interpolateFn) { scope.$watch(interpolateFn, function(newVal, oldVal) { attr.$set('value', newVal); if (newVal !== oldVal) selectCtrl.removeOption(oldVal); selectCtrl.addOption(newVal); }); } else { selectCtrl.addOption(attr.value); } element.bind('$destroy', function() { selectCtrl.removeOption(attr.value); }); }; } } }]; var styleDirective = valueFn({ restrict: 'E', terminal: true }); /** * Setup file for the Scenario. * Must be first in the compilation/bootstrap list. */ // Public namespace angular.scenario = angular.scenario || {}; /** * Defines a new output format. * * @param {string} name the name of the new output format * @param {function()} fn function(context, runner) that generates the output */ angular.scenario.output = angular.scenario.output || function(name, fn) { angular.scenario.output[name] = fn; }; /** * Defines a new DSL statement. If your factory function returns a Future * it's returned, otherwise the result is assumed to be a map of functions * for chaining. Chained functions are subject to the same rules. * * Note: All functions on the chain are bound to the chain scope so values * set on "this" in your statement function are available in the chained * functions. * * @param {string} name The name of the statement * @param {function()} fn Factory function(), return a function for * the statement. */ angular.scenario.dsl = angular.scenario.dsl || function(name, fn) { angular.scenario.dsl[name] = function() { function executeStatement(statement, args) { var result = statement.apply(this, args); if (angular.isFunction(result) || result instanceof angular.scenario.Future) return result; var self = this; var chain = angular.extend({}, result); angular.forEach(chain, function(value, name) { if (angular.isFunction(value)) { chain[name] = function() { return executeStatement.call(self, value, arguments); }; } else { chain[name] = value; } }); return chain; } var statement = fn.apply(this, arguments); return function() { return executeStatement.call(this, statement, arguments); }; }; }; /** * Defines a new matcher for use with the expects() statement. The value * this.actual (like in Jasmine) is available in your matcher to compare * against. Your function should return a boolean. The future is automatically * created for you. * * @param {string} name The name of the matcher * @param {function()} fn The matching function(expected). */ angular.scenario.matcher = angular.scenario.matcher || function(name, fn) { angular.scenario.matcher[name] = function(expected) { var prefix = 'expect ' + this.future.name + ' '; if (this.inverse) { prefix += 'not '; } var self = this; this.addFuture(prefix + name + ' ' + angular.toJson(expected), function(done) { var error; self.actual = self.future.value; if ((self.inverse && fn.call(self, expected)) || (!self.inverse && !fn.call(self, expected))) { error = 'expected ' + angular.toJson(expected) + ' but was ' + angular.toJson(self.actual); } done(error); }); }; }; /** * Initialize the scenario runner and run ! * * Access global window and document object * Access $runner through closure * * @param {Object=} config Config options */ angular.scenario.setUpAndRun = function(config) { var href = window.location.href; var body = _jQuery(document.body); var output = []; var objModel = new angular.scenario.ObjectModel($runner); if (config && config.scenario_output) { output = config.scenario_output.split(','); } angular.forEach(angular.scenario.output, function(fn, name) { if (!output.length || indexOf(output,name) != -1) { var context = body.append('<div></div>').find('div:last'); context.attr('id', name); fn.call({}, context, $runner, objModel); } }); if (!/^http/.test(href) && !/^https/.test(href)) { body.append('<p id="system-error"></p>'); body.find('#system-error').text( 'Scenario runner must be run using http or https. The protocol ' + href.split(':')[0] + ':// is not supported.' ); return; } var appFrame = body.append('<div id="application"></div>').find('#application'); var application = new angular.scenario.Application(appFrame); $runner.on('RunnerEnd', function() { appFrame.css('display', 'none'); appFrame.find('iframe').attr('src', 'about:blank'); }); $runner.on('RunnerError', function(error) { if (window.console) { console.log(formatException(error)); } else { // Do something for IE alert(error); } }); $runner.run(application); }; /** * Iterates through list with iterator function that must call the * continueFunction to continute iterating. * * @param {Array} list list to iterate over * @param {function()} iterator Callback function(value, continueFunction) * @param {function()} done Callback function(error, result) called when * iteration finishes or an error occurs. */ function asyncForEach(list, iterator, done) { var i = 0; function loop(error, index) { if (index && index > i) { i = index; } if (error || i >= list.length) { done(error); } else { try { iterator(list[i++], loop); } catch (e) { done(e); } } } loop(); } /** * Formats an exception into a string with the stack trace, but limits * to a specific line length. * * @param {Object} error The exception to format, can be anything throwable * @param {Number=} [maxStackLines=5] max lines of the stack trace to include * default is 5. */ function formatException(error, maxStackLines) { maxStackLines = maxStackLines || 5; var message = error.toString(); if (error.stack) { var stack = error.stack.split('\n'); if (stack[0].indexOf(message) === -1) { maxStackLines++; stack.unshift(error.message); } message = stack.slice(0, maxStackLines).join('\n'); } return message; } /** * Returns a function that gets the file name and line number from a * location in the stack if available based on the call site. * * Note: this returns another function because accessing .stack is very * expensive in Chrome. * * @param {Number} offset Number of stack lines to skip */ function callerFile(offset) { var error = new Error(); return function() { var line = (error.stack || '').split('\n')[offset]; // Clean up the stack trace line if (line) { if (line.indexOf('@') !== -1) { // Firefox line = line.substring(line.indexOf('@')+1); } else { // Chrome line = line.substring(line.indexOf('(')+1).replace(')', ''); } } return line || ''; }; } /** * Triggers a browser event. Attempts to choose the right event if one is * not specified. * * @param {Object} element Either a wrapped jQuery/jqLite node or a DOMElement * @param {string} type Optional event type. * @param {Array.<string>=} keys Optional list of pressed keys * (valid values: 'alt', 'meta', 'shift', 'ctrl') */ function browserTrigger(element, type, keys) { if (element && !element.nodeName) element = element[0]; if (!element) return; if (!type) { type = { 'text': 'change', 'textarea': 'change', 'hidden': 'change', 'password': 'change', 'button': 'click', 'submit': 'click', 'reset': 'click', 'image': 'click', 'checkbox': 'click', 'radio': 'click', 'select-one': 'change', 'select-multiple': 'change' }[lowercase(element.type)] || 'click'; } if (lowercase(nodeName_(element)) == 'option') { element.parentNode.value = element.value; element = element.parentNode; type = 'change'; } keys = keys || []; function pressed(key) { return indexOf(keys, key) !== -1; } if (msie < 9) { switch(element.type) { case 'radio': case 'checkbox': element.checked = !element.checked; break; } // WTF!!! Error: Unspecified error. // Don't know why, but some elements when detached seem to be in inconsistent state and // calling .fireEvent() on them will result in very unhelpful error (Error: Unspecified error) // forcing the browser to compute the element position (by reading its CSS) // puts the element in consistent state. element.style.posLeft; // TODO(vojta): create event objects with pressed keys to get it working on IE<9 var ret = element.fireEvent('on' + type); if (lowercase(element.type) == 'submit') { while(element) { if (lowercase(element.nodeName) == 'form') { element.fireEvent('onsubmit'); break; } element = element.parentNode; } } return ret; } else { var evnt = document.createEvent('MouseEvents'), originalPreventDefault = evnt.preventDefault, iframe = _jQuery('#application iframe')[0], appWindow = iframe ? iframe.contentWindow : window, fakeProcessDefault = true, finalProcessDefault; // igor: temporary fix for https://bugzilla.mozilla.org/show_bug.cgi?id=684208 appWindow.angular['ff-684208-preventDefault'] = false; evnt.preventDefault = function() { fakeProcessDefault = false; return originalPreventDefault.apply(evnt, arguments); }; evnt.initMouseEvent(type, true, true, window, 0, 0, 0, 0, 0, pressed('ctrl'), pressed('alt'), pressed('shift'), pressed('meta'), 0, element); element.dispatchEvent(evnt); finalProcessDefault = !(appWindow.angular['ff-684208-preventDefault'] || !fakeProcessDefault); delete appWindow.angular['ff-684208-preventDefault']; return finalProcessDefault; } } /** * Don't use the jQuery trigger method since it works incorrectly. * * jQuery notifies listeners and then changes the state of a checkbox and * does not create a real browser event. A real click changes the state of * the checkbox and then notifies listeners. * * To work around this we instead use our own handler that fires a real event. */ (function(fn){ var parentTrigger = fn.trigger; fn.trigger = function(type) { if (/(click|change|keydown|blur|input)/.test(type)) { var processDefaults = []; this.each(function(index, node) { processDefaults.push(browserTrigger(node, type)); }); // this is not compatible with jQuery - we return an array of returned values, // so that scenario runner know whether JS code has preventDefault() of the event or not... return processDefaults; } return parentTrigger.apply(this, arguments); }; })(_jQuery.fn); /** * Finds all bindings with the substring match of name and returns an * array of their values. * * @param {string} bindExp The name to match * @return {Array.<string>} String of binding values */ _jQuery.fn.bindings = function(windowJquery, bindExp) { var result = [], match, bindSelector = '.ng-binding:visible'; if (angular.isString(bindExp)) { bindExp = bindExp.replace(/\s/g, ''); match = function (actualExp) { if (actualExp) { actualExp = actualExp.replace(/\s/g, ''); if (actualExp == bindExp) return true; if (actualExp.indexOf(bindExp) == 0) { return actualExp.charAt(bindExp.length) == '|'; } } } } else if (bindExp) { match = function(actualExp) { return actualExp && bindExp.exec(actualExp); } } else { match = function(actualExp) { return !!actualExp; }; } var selection = this.find(bindSelector); if (this.is(bindSelector)) { selection = selection.add(this); } function push(value) { if (value == undefined) { value = ''; } else if (typeof value != 'string') { value = angular.toJson(value); } result.push('' + value); } selection.each(function() { var element = windowJquery(this), binding; if (binding = element.data('$binding')) { if (typeof binding == 'string') { if (match(binding)) { push(element.scope().$eval(binding)); } } else { if (!angular.isArray(binding)) { binding = [binding]; } for(var fns, j=0, jj=binding.length; j<jj; j++) { fns = binding[j]; if (fns.parts) { fns = fns.parts; } else { fns = [fns]; } for (var scope, fn, i = 0, ii = fns.length; i < ii; i++) { if(match((fn = fns[i]).exp)) { push(fn(scope = scope || element.scope())); } } } } } }); return result; }; /** * Represents the application currently being tested and abstracts usage * of iframes or separate windows. * * @param {Object} context jQuery wrapper around HTML context. */ angular.scenario.Application = function(context) { this.context = context; context.append( '<h2>Current URL: <a href="about:blank">None</a></h2>' + '<div id="test-frames"></div>' ); }; /** * Gets the jQuery collection of frames. Don't use this directly because * frames may go stale. * * @private * @return {Object} jQuery collection */ angular.scenario.Application.prototype.getFrame_ = function() { return this.context.find('#test-frames iframe:last'); }; /** * Gets the window of the test runner frame. Always favor executeAction() * instead of this method since it prevents you from getting a stale window. * * @private * @return {Object} the window of the frame */ angular.scenario.Application.prototype.getWindow_ = function() { var contentWindow = this.getFrame_().prop('contentWindow'); if (!contentWindow) throw 'Frame window is not accessible.'; return contentWindow; }; /** * Changes the location of the frame. * * @param {string} url The URL. If it begins with a # then only the * hash of the page is changed. * @param {function()} loadFn function($window, $document) Called when frame loads. * @param {function()} errorFn function(error) Called if any error when loading. */ angular.scenario.Application.prototype.navigateTo = function(url, loadFn, errorFn) { var self = this; var frame = this.getFrame_(); //TODO(esprehn): Refactor to use rethrow() errorFn = errorFn || function(e) { throw e; }; if (url === 'about:blank') { errorFn('Sandbox Error: Navigating to about:blank is not allowed.'); } else if (url.charAt(0) === '#') { url = frame.attr('src').split('#')[0] + url; frame.attr('src', url); this.executeAction(loadFn); } else { frame.remove(); this.context.find('#test-frames').append('<iframe>'); frame = this.getFrame_(); frame.load(function() { frame.unbind(); try { self.executeAction(loadFn); } catch (e) { errorFn(e); } }).attr('src', url); } this.context.find('> h2 a').attr('href', url).text(url); }; /** * Executes a function in the context of the tested application. Will wait * for all pending angular xhr requests before executing. * * @param {function()} action The callback to execute. function($window, $document) * $document is a jQuery wrapped document. */ angular.scenario.Application.prototype.executeAction = function(action) { var self = this; var $window = this.getWindow_(); if (!$window.document) { throw 'Sandbox Error: Application document not accessible.'; } if (!$window.angular) { return action.call(this, $window, _jQuery($window.document)); } angularInit($window.document, function(element) { var $injector = $window.angular.element(element).injector(); $injector.invoke(function($browser){ $browser.notifyWhenNoOutstandingRequests(function() { action.call(self, $window, _jQuery($window.document)); }); }); }); }; /** * The representation of define blocks. Don't used directly, instead use * define() in your tests. * * @param {string} descName Name of the block * @param {Object} parent describe or undefined if the root. */ angular.scenario.Describe = function(descName, parent) { this.only = parent && parent.only; this.beforeEachFns = []; this.afterEachFns = []; this.its = []; this.children = []; this.name = descName; this.parent = parent; this.id = angular.scenario.Describe.id++; /** * Calls all before functions. */ var beforeEachFns = this.beforeEachFns; this.setupBefore = function() { if (parent) parent.setupBefore.call(this); angular.forEach(beforeEachFns, function(fn) { fn.call(this); }, this); }; /** * Calls all after functions. */ var afterEachFns = this.afterEachFns; this.setupAfter = function() { angular.forEach(afterEachFns, function(fn) { fn.call(this); }, this); if (parent) parent.setupAfter.call(this); }; }; // Shared Unique ID generator for every describe block angular.scenario.Describe.id = 0; // Shared Unique ID generator for every it (spec) angular.scenario.Describe.specId = 0; /** * Defines a block to execute before each it or nested describe. * * @param {function()} body Body of the block. */ angular.scenario.Describe.prototype.beforeEach = function(body) { this.beforeEachFns.push(body); }; /** * Defines a block to execute after each it or nested describe. * * @param {function()} body Body of the block. */ angular.scenario.Describe.prototype.afterEach = function(body) { this.afterEachFns.push(body); }; /** * Creates a new describe block that's a child of this one. * * @param {string} name Name of the block. Appended to the parent block's name. * @param {function()} body Body of the block. */ angular.scenario.Describe.prototype.describe = function(name, body) { var child = new angular.scenario.Describe(name, this); this.children.push(child); body.call(child); }; /** * Same as describe() but makes ddescribe blocks the only to run. * * @param {string} name Name of the test. * @param {function()} body Body of the block. */ angular.scenario.Describe.prototype.ddescribe = function(name, body) { var child = new angular.scenario.Describe(name, this); child.only = true; this.children.push(child); body.call(child); }; /** * Use to disable a describe block. */ angular.scenario.Describe.prototype.xdescribe = angular.noop; /** * Defines a test. * * @param {string} name Name of the test. * @param {function()} vody Body of the block. */ angular.scenario.Describe.prototype.it = function(name, body) { this.its.push({ id: angular.scenario.Describe.specId++, definition: this, only: this.only, name: name, before: this.setupBefore, body: body, after: this.setupAfter }); }; /** * Same as it() but makes iit tests the only test to run. * * @param {string} name Name of the test. * @param {function()} body Body of the block. */ angular.scenario.Describe.prototype.iit = function(name, body) { this.it.apply(this, arguments); this.its[this.its.length-1].only = true; }; /** * Use to disable a test block. */ angular.scenario.Describe.prototype.xit = angular.noop; /** * Gets an array of functions representing all the tests (recursively). * that can be executed with SpecRunner's. * * @return {Array<Object>} Array of it blocks { * definition : Object // parent Describe * only: boolean * name: string * before: Function * body: Function * after: Function * } */ angular.scenario.Describe.prototype.getSpecs = function() { var specs = arguments[0] || []; angular.forEach(this.children, function(child) { child.getSpecs(specs); }); angular.forEach(this.its, function(it) { specs.push(it); }); var only = []; angular.forEach(specs, function(it) { if (it.only) { only.push(it); } }); return (only.length && only) || specs; }; /** * A future action in a spec. * * @param {string} name of the future action * @param {function()} future callback(error, result) * @param {function()} Optional. function that returns the file/line number. */ angular.scenario.Future = function(name, behavior, line) { this.name = name; this.behavior = behavior; this.fulfilled = false; this.value = undefined; this.parser = angular.identity; this.line = line || function() { return ''; }; }; /** * Executes the behavior of the closure. * * @param {function()} doneFn Callback function(error, result) */ angular.scenario.Future.prototype.execute = function(doneFn) { var self = this; this.behavior(function(error, result) { self.fulfilled = true; if (result) { try { result = self.parser(result); } catch(e) { error = e; } } self.value = error || result; doneFn(error, result); }); }; /** * Configures the future to convert it's final with a function fn(value) * * @param {function()} fn function(value) that returns the parsed value */ angular.scenario.Future.prototype.parsedWith = function(fn) { this.parser = fn; return this; }; /** * Configures the future to parse it's final value from JSON * into objects. */ angular.scenario.Future.prototype.fromJson = function() { return this.parsedWith(angular.fromJson); }; /** * Configures the future to convert it's final value from objects * into JSON. */ angular.scenario.Future.prototype.toJson = function() { return this.parsedWith(angular.toJson); }; /** * Maintains an object tree from the runner events. * * @param {Object} runner The scenario Runner instance to connect to. * * TODO(esprehn): Every output type creates one of these, but we probably * want one global shared instance. Need to handle events better too * so the HTML output doesn't need to do spec model.getSpec(spec.id) * silliness. * * TODO(vojta) refactor on, emit methods (from all objects) - use inheritance */ angular.scenario.ObjectModel = function(runner) { var self = this; this.specMap = {}; this.listeners = []; this.value = { name: '', children: {} }; runner.on('SpecBegin', function(spec) { var block = self.value, definitions = []; angular.forEach(self.getDefinitionPath(spec), function(def) { if (!block.children[def.name]) { block.children[def.name] = { id: def.id, name: def.name, children: {}, specs: {} }; } block = block.children[def.name]; definitions.push(def.name); }); var it = self.specMap[spec.id] = block.specs[spec.name] = new angular.scenario.ObjectModel.Spec(spec.id, spec.name, definitions); // forward the event self.emit('SpecBegin', it); }); runner.on('SpecError', function(spec, error) { var it = self.getSpec(spec.id); it.status = 'error'; it.error = error; // forward the event self.emit('SpecError', it, error); }); runner.on('SpecEnd', function(spec) { var it = self.getSpec(spec.id); complete(it); // forward the event self.emit('SpecEnd', it); }); runner.on('StepBegin', function(spec, step) { var it = self.getSpec(spec.id); var step = new angular.scenario.ObjectModel.Step(step.name); it.steps.push(step); // forward the event self.emit('StepBegin', it, step); }); runner.on('StepEnd', function(spec) { var it = self.getSpec(spec.id); var step = it.getLastStep(); if (step.name !== step.name) throw 'Events fired in the wrong order. Step names don\'t match.'; complete(step); // forward the event self.emit('StepEnd', it, step); }); runner.on('StepFailure', function(spec, step, error) { var it = self.getSpec(spec.id), modelStep = it.getLastStep(); modelStep.setErrorStatus('failure', error, step.line()); it.setStatusFromStep(modelStep); // forward the event self.emit('StepFailure', it, modelStep, error); }); runner.on('StepError', function(spec, step, error) { var it = self.getSpec(spec.id), modelStep = it.getLastStep(); modelStep.setErrorStatus('error', error, step.line()); it.setStatusFromStep(modelStep); // forward the event self.emit('StepError', it, modelStep, error); }); runner.on('RunnerEnd', function() { self.emit('RunnerEnd'); }); function complete(item) { item.endTime = new Date().getTime(); item.duration = item.endTime - item.startTime; item.status = item.status || 'success'; } }; /** * Adds a listener for an event. * * @param {string} eventName Name of the event to add a handler for * @param {function()} listener Function that will be called when event is fired */ angular.scenario.ObjectModel.prototype.on = function(eventName, listener) { eventName = eventName.toLowerCase(); this.listeners[eventName] = this.listeners[eventName] || []; this.listeners[eventName].push(listener); }; /** * Emits an event which notifies listeners and passes extra * arguments. * * @param {string} eventName Name of the event to fire. */ angular.scenario.ObjectModel.prototype.emit = function(eventName) { var self = this, args = Array.prototype.slice.call(arguments, 1), eventName = eventName.toLowerCase(); if (this.listeners[eventName]) { angular.forEach(this.listeners[eventName], function(listener) { listener.apply(self, args); }); } }; /** * Computes the path of definition describe blocks that wrap around * this spec. * * @param spec Spec to compute the path for. * @return {Array<Describe>} The describe block path */ angular.scenario.ObjectModel.prototype.getDefinitionPath = function(spec) { var path = []; var currentDefinition = spec.definition; while (currentDefinition && currentDefinition.name) { path.unshift(currentDefinition); currentDefinition = currentDefinition.parent; } return path; }; /** * Gets a spec by id. * * @param {string} The id of the spec to get the object for. * @return {Object} the Spec instance */ angular.scenario.ObjectModel.prototype.getSpec = function(id) { return this.specMap[id]; }; /** * A single it block. * * @param {string} id Id of the spec * @param {string} name Name of the spec * @param {Array<string>=} definitionNames List of all describe block names that wrap this spec */ angular.scenario.ObjectModel.Spec = function(id, name, definitionNames) { this.id = id; this.name = name; this.startTime = new Date().getTime(); this.steps = []; this.fullDefinitionName = (definitionNames || []).join(' '); }; /** * Adds a new step to the Spec. * * @param {string} step Name of the step (really name of the future) * @return {Object} the added step */ angular.scenario.ObjectModel.Spec.prototype.addStep = function(name) { var step = new angular.scenario.ObjectModel.Step(name); this.steps.push(step); return step; }; /** * Gets the most recent step. * * @return {Object} the step */ angular.scenario.ObjectModel.Spec.prototype.getLastStep = function() { return this.steps[this.steps.length-1]; }; /** * Set status of the Spec from given Step * * @param {angular.scenario.ObjectModel.Step} step */ angular.scenario.ObjectModel.Spec.prototype.setStatusFromStep = function(step) { if (!this.status || step.status == 'error') { this.status = step.status; this.error = step.error; this.line = step.line; } }; /** * A single step inside a Spec. * * @param {string} step Name of the step */ angular.scenario.ObjectModel.Step = function(name) { this.name = name; this.startTime = new Date().getTime(); }; /** * Helper method for setting all error status related properties * * @param {string} status * @param {string} error * @param {string} line */ angular.scenario.ObjectModel.Step.prototype.setErrorStatus = function(status, error, line) { this.status = status; this.error = error; this.line = line; }; /** * The representation of define blocks. Don't used directly, instead use * define() in your tests. * * @param {string} descName Name of the block * @param {Object} parent describe or undefined if the root. */ angular.scenario.Describe = function(descName, parent) { this.only = parent && parent.only; this.beforeEachFns = []; this.afterEachFns = []; this.its = []; this.children = []; this.name = descName; this.parent = parent; this.id = angular.scenario.Describe.id++; /** * Calls all before functions. */ var beforeEachFns = this.beforeEachFns; this.setupBefore = function() { if (parent) parent.setupBefore.call(this); angular.forEach(beforeEachFns, function(fn) { fn.call(this); }, this); }; /** * Calls all after functions. */ var afterEachFns = this.afterEachFns; this.setupAfter = function() { angular.forEach(afterEachFns, function(fn) { fn.call(this); }, this); if (parent) parent.setupAfter.call(this); }; }; // Shared Unique ID generator for every describe block angular.scenario.Describe.id = 0; // Shared Unique ID generator for every it (spec) angular.scenario.Describe.specId = 0; /** * Defines a block to execute before each it or nested describe. * * @param {function()} body Body of the block. */ angular.scenario.Describe.prototype.beforeEach = function(body) { this.beforeEachFns.push(body); }; /** * Defines a block to execute after each it or nested describe. * * @param {function()} body Body of the block. */ angular.scenario.Describe.prototype.afterEach = function(body) { this.afterEachFns.push(body); }; /** * Creates a new describe block that's a child of this one. * * @param {string} name Name of the block. Appended to the parent block's name. * @param {function()} body Body of the block. */ angular.scenario.Describe.prototype.describe = function(name, body) { var child = new angular.scenario.Describe(name, this); this.children.push(child); body.call(child); }; /** * Same as describe() but makes ddescribe blocks the only to run. * * @param {string} name Name of the test. * @param {function()} body Body of the block. */ angular.scenario.Describe.prototype.ddescribe = function(name, body) { var child = new angular.scenario.Describe(name, this); child.only = true; this.children.push(child); body.call(child); }; /** * Use to disable a describe block. */ angular.scenario.Describe.prototype.xdescribe = angular.noop; /** * Defines a test. * * @param {string} name Name of the test. * @param {function()} vody Body of the block. */ angular.scenario.Describe.prototype.it = function(name, body) { this.its.push({ id: angular.scenario.Describe.specId++, definition: this, only: this.only, name: name, before: this.setupBefore, body: body, after: this.setupAfter }); }; /** * Same as it() but makes iit tests the only test to run. * * @param {string} name Name of the test. * @param {function()} body Body of the block. */ angular.scenario.Describe.prototype.iit = function(name, body) { this.it.apply(this, arguments); this.its[this.its.length-1].only = true; }; /** * Use to disable a test block. */ angular.scenario.Describe.prototype.xit = angular.noop; /** * Gets an array of functions representing all the tests (recursively). * that can be executed with SpecRunner's. * * @return {Array<Object>} Array of it blocks { * definition : Object // parent Describe * only: boolean * name: string * before: Function * body: Function * after: Function * } */ angular.scenario.Describe.prototype.getSpecs = function() { var specs = arguments[0] || []; angular.forEach(this.children, function(child) { child.getSpecs(specs); }); angular.forEach(this.its, function(it) { specs.push(it); }); var only = []; angular.forEach(specs, function(it) { if (it.only) { only.push(it); } }); return (only.length && only) || specs; }; /** * Runner for scenarios * * Has to be initialized before any test is loaded, * because it publishes the API into window (global space). */ angular.scenario.Runner = function($window) { this.listeners = []; this.$window = $window; this.rootDescribe = new angular.scenario.Describe(); this.currentDescribe = this.rootDescribe; this.api = { it: this.it, iit: this.iit, xit: angular.noop, describe: this.describe, ddescribe: this.ddescribe, xdescribe: angular.noop, beforeEach: this.beforeEach, afterEach: this.afterEach }; angular.forEach(this.api, angular.bind(this, function(fn, key) { this.$window[key] = angular.bind(this, fn); })); }; /** * Emits an event which notifies listeners and passes extra * arguments. * * @param {string} eventName Name of the event to fire. */ angular.scenario.Runner.prototype.emit = function(eventName) { var self = this; var args = Array.prototype.slice.call(arguments, 1); eventName = eventName.toLowerCase(); if (!this.listeners[eventName]) return; angular.forEach(this.listeners[eventName], function(listener) { listener.apply(self, args); }); }; /** * Adds a listener for an event. * * @param {string} eventName The name of the event to add a handler for * @param {string} listener The fn(...) that takes the extra arguments from emit() */ angular.scenario.Runner.prototype.on = function(eventName, listener) { eventName = eventName.toLowerCase(); this.listeners[eventName] = this.listeners[eventName] || []; this.listeners[eventName].push(listener); }; /** * Defines a describe block of a spec. * * @see Describe.js * * @param {string} name Name of the block * @param {function()} body Body of the block */ angular.scenario.Runner.prototype.describe = function(name, body) { var self = this; this.currentDescribe.describe(name, function() { var parentDescribe = self.currentDescribe; self.currentDescribe = this; try { body.call(this); } finally { self.currentDescribe = parentDescribe; } }); }; /** * Same as describe, but makes ddescribe the only blocks to run. * * @see Describe.js * * @param {string} name Name of the block * @param {function()} body Body of the block */ angular.scenario.Runner.prototype.ddescribe = function(name, body) { var self = this; this.currentDescribe.ddescribe(name, function() { var parentDescribe = self.currentDescribe; self.currentDescribe = this; try { body.call(this); } finally { self.currentDescribe = parentDescribe; } }); }; /** * Defines a test in a describe block of a spec. * * @see Describe.js * * @param {string} name Name of the block * @param {function()} body Body of the block */ angular.scenario.Runner.prototype.it = function(name, body) { this.currentDescribe.it(name, body); }; /** * Same as it, but makes iit tests the only tests to run. * * @see Describe.js * * @param {string} name Name of the block * @param {function()} body Body of the block */ angular.scenario.Runner.prototype.iit = function(name, body) { this.currentDescribe.iit(name, body); }; /** * Defines a function to be called before each it block in the describe * (and before all nested describes). * * @see Describe.js * * @param {function()} Callback to execute */ angular.scenario.Runner.prototype.beforeEach = function(body) { this.currentDescribe.beforeEach(body); }; /** * Defines a function to be called after each it block in the describe * (and before all nested describes). * * @see Describe.js * * @param {function()} Callback to execute */ angular.scenario.Runner.prototype.afterEach = function(body) { this.currentDescribe.afterEach(body); }; /** * Creates a new spec runner. * * @private * @param {Object} scope parent scope */ angular.scenario.Runner.prototype.createSpecRunner_ = function(scope) { var child = scope.$new(); var Cls = angular.scenario.SpecRunner; // Export all the methods to child scope manually as now we don't mess controllers with scopes // TODO(vojta): refactor scenario runner so that these objects are not tightly coupled as current for (var name in Cls.prototype) child[name] = angular.bind(child, Cls.prototype[name]); Cls.call(child); return child; }; /** * Runs all the loaded tests with the specified runner class on the * provided application. * * @param {angular.scenario.Application} application App to remote control. */ angular.scenario.Runner.prototype.run = function(application) { var self = this; var $root = angular.injector(['ng']).get('$rootScope'); angular.extend($root, this); angular.forEach(angular.scenario.Runner.prototype, function(fn, name) { $root[name] = angular.bind(self, fn); }); $root.application = application; $root.emit('RunnerBegin'); asyncForEach(this.rootDescribe.getSpecs(), function(spec, specDone) { var dslCache = {}; var runner = self.createSpecRunner_($root); angular.forEach(angular.scenario.dsl, function(fn, key) { dslCache[key] = fn.call($root); }); angular.forEach(angular.scenario.dsl, function(fn, key) { self.$window[key] = function() { var line = callerFile(3); var scope = runner.$new(); // Make the dsl accessible on the current chain scope.dsl = {}; angular.forEach(dslCache, function(fn, key) { scope.dsl[key] = function() { return dslCache[key].apply(scope, arguments); }; }); // Make these methods work on the current chain scope.addFuture = function() { Array.prototype.push.call(arguments, line); return angular.scenario.SpecRunner. prototype.addFuture.apply(scope, arguments); }; scope.addFutureAction = function() { Array.prototype.push.call(arguments, line); return angular.scenario.SpecRunner. prototype.addFutureAction.apply(scope, arguments); }; return scope.dsl[key].apply(scope, arguments); }; }); runner.run(spec, function() { runner.$destroy(); specDone.apply(this, arguments); }); }, function(error) { if (error) { self.emit('RunnerError', error); } self.emit('RunnerEnd'); }); }; /** * This class is the "this" of the it/beforeEach/afterEach method. * Responsibilities: * - "this" for it/beforeEach/afterEach * - keep state for single it/beforeEach/afterEach execution * - keep track of all of the futures to execute * - run single spec (execute each future) */ angular.scenario.SpecRunner = function() { this.futures = []; this.afterIndex = 0; }; /** * Executes a spec which is an it block with associated before/after functions * based on the describe nesting. * * @param {Object} spec A spec object * @param {function()} specDone function that is called when the spec finshes. Function(error, index) */ angular.scenario.SpecRunner.prototype.run = function(spec, specDone) { var self = this; this.spec = spec; this.emit('SpecBegin', spec); try { spec.before.call(this); spec.body.call(this); this.afterIndex = this.futures.length; spec.after.call(this); } catch (e) { this.emit('SpecError', spec, e); this.emit('SpecEnd', spec); specDone(); return; } var handleError = function(error, done) { if (self.error) { return done(); } self.error = true; done(null, self.afterIndex); }; asyncForEach( this.futures, function(future, futureDone) { self.step = future; self.emit('StepBegin', spec, future); try { future.execute(function(error) { if (error) { self.emit('StepFailure', spec, future, error); self.emit('StepEnd', spec, future); return handleError(error, futureDone); } self.emit('StepEnd', spec, future); self.$window.setTimeout(function() { futureDone(); }, 0); }); } catch (e) { self.emit('StepError', spec, future, e); self.emit('StepEnd', spec, future); handleError(e, futureDone); } }, function(e) { if (e) { self.emit('SpecError', spec, e); } self.emit('SpecEnd', spec); // Call done in a timeout so exceptions don't recursively // call this function self.$window.setTimeout(function() { specDone(); }, 0); } ); }; /** * Adds a new future action. * * Note: Do not pass line manually. It happens automatically. * * @param {string} name Name of the future * @param {function()} behavior Behavior of the future * @param {function()} line fn() that returns file/line number */ angular.scenario.SpecRunner.prototype.addFuture = function(name, behavior, line) { var future = new angular.scenario.Future(name, angular.bind(this, behavior), line); this.futures.push(future); return future; }; /** * Adds a new future action to be executed on the application window. * * Note: Do not pass line manually. It happens automatically. * * @param {string} name Name of the future * @param {function()} behavior Behavior of the future * @param {function()} line fn() that returns file/line number */ angular.scenario.SpecRunner.prototype.addFutureAction = function(name, behavior, line) { var self = this; var NG = /\[ng\\\:/; return this.addFuture(name, function(done) { this.application.executeAction(function($window, $document) { //TODO(esprehn): Refactor this so it doesn't need to be in here. $document.elements = function(selector) { var args = Array.prototype.slice.call(arguments, 1); selector = (self.selector || '') + ' ' + (selector || ''); selector = _jQuery.trim(selector) || '*'; angular.forEach(args, function(value, index) { selector = selector.replace('$' + (index + 1), value); }); var result = $document.find(selector); if (selector.match(NG)) { result = result.add(selector.replace(NG, '[ng-'), $document); } if (!result.length) { throw { type: 'selector', message: 'Selector ' + selector + ' did not match any elements.' }; } return result; }; try { behavior.call(self, $window, $document, done); } catch(e) { if (e.type && e.type === 'selector') { done(e.message); } else { throw e; } } }); }, line); }; /** * Shared DSL statements that are useful to all scenarios. */ /** * Usage: * pause() pauses until you call resume() in the console */ angular.scenario.dsl('pause', function() { return function() { return this.addFuture('pausing for you to resume', function(done) { this.emit('InteractivePause', this.spec, this.step); this.$window.resume = function() { done(); }; }); }; }); /** * Usage: * sleep(seconds) pauses the test for specified number of seconds */ angular.scenario.dsl('sleep', function() { return function(time) { return this.addFuture('sleep for ' + time + ' seconds', function(done) { this.$window.setTimeout(function() { done(null, time * 1000); }, time * 1000); }); }; }); /** * Usage: * browser().navigateTo(url) Loads the url into the frame * browser().navigateTo(url, fn) where fn(url) is called and returns the URL to navigate to * browser().reload() refresh the page (reload the same URL) * browser().window.href() window.location.href * browser().window.path() window.location.pathname * browser().window.search() window.location.search * browser().window.hash() window.location.hash without # prefix * browser().location().url() see angular.module.ng.$location#url * browser().location().path() see angular.module.ng.$location#path * browser().location().search() see angular.module.ng.$location#search * browser().location().hash() see angular.module.ng.$location#hash */ angular.scenario.dsl('browser', function() { var chain = {}; chain.navigateTo = function(url, delegate) { var application = this.application; return this.addFuture("browser navigate to '" + url + "'", function(done) { if (delegate) { url = delegate.call(this, url); } application.navigateTo(url, function() { done(null, url); }, done); }); }; chain.reload = function() { var application = this.application; return this.addFutureAction('browser reload', function($window, $document, done) { var href = $window.location.href; application.navigateTo(href, function() { done(null, href); }, done); }); }; chain.window = function() { var api = {}; api.href = function() { return this.addFutureAction('window.location.href', function($window, $document, done) { done(null, $window.location.href); }); }; api.path = function() { return this.addFutureAction('window.location.path', function($window, $document, done) { done(null, $window.location.pathname); }); }; api.search = function() { return this.addFutureAction('window.location.search', function($window, $document, done) { done(null, $window.location.search); }); }; api.hash = function() { return this.addFutureAction('window.location.hash', function($window, $document, done) { done(null, $window.location.hash.replace('#', '')); }); }; return api; }; chain.location = function() { var api = {}; api.url = function() { return this.addFutureAction('$location.url()', function($window, $document, done) { done(null, $window.angular.element($window.document).injector().get('$location').url()); }); }; api.path = function() { return this.addFutureAction('$location.path()', function($window, $document, done) { done(null, $window.angular.element($window.document).injector().get('$location').path()); }); }; api.search = function() { return this.addFutureAction('$location.search()', function($window, $document, done) { done(null, $window.angular.element($window.document).injector().get('$location').search()); }); }; api.hash = function() { return this.addFutureAction('$location.hash()', function($window, $document, done) { done(null, $window.angular.element($window.document).injector().get('$location').hash()); }); }; return api; }; return function() { return chain; }; }); /** * Usage: * expect(future).{matcher} where matcher is one of the matchers defined * with angular.scenario.matcher * * ex. expect(binding("name")).toEqual("Elliott") */ angular.scenario.dsl('expect', function() { var chain = angular.extend({}, angular.scenario.matcher); chain.not = function() { this.inverse = true; return chain; }; return function(future) { this.future = future; return chain; }; }); /** * Usage: * using(selector, label) scopes the next DSL element selection * * ex. * using('#foo', "'Foo' text field").input('bar') */ angular.scenario.dsl('using', function() { return function(selector, label) { this.selector = _jQuery.trim((this.selector||'') + ' ' + selector); if (angular.isString(label) && label.length) { this.label = label + ' ( ' + this.selector + ' )'; } else { this.label = this.selector; } return this.dsl; }; }); /** * Usage: * binding(name) returns the value of the first matching binding */ angular.scenario.dsl('binding', function() { return function(name) { return this.addFutureAction("select binding '" + name + "'", function($window, $document, done) { var values = $document.elements().bindings($window.angular.element, name); if (!values.length) { return done("Binding selector '" + name + "' did not match."); } done(null, values[0]); }); }; }); /** * Usage: * input(name).enter(value) enters value in input with specified name * input(name).check() checks checkbox * input(name).select(value) selects the radio button with specified name/value * input(name).val() returns the value of the input. */ angular.scenario.dsl('input', function() { var chain = {}; var supportInputEvent = 'oninput' in document.createElement('div'); chain.enter = function(value, event) { return this.addFutureAction("input '" + this.name + "' enter '" + value + "'", function($window, $document, done) { var input = $document.elements('[ng\\:model="$1"]', this.name).filter(':input'); input.val(value); input.trigger(event || supportInputEvent && 'input' || 'change'); done(); }); }; chain.check = function() { return this.addFutureAction("checkbox '" + this.name + "' toggle", function($window, $document, done) { var input = $document.elements('[ng\\:model="$1"]', this.name).filter(':checkbox'); input.trigger('click'); done(); }); }; chain.select = function(value) { return this.addFutureAction("radio button '" + this.name + "' toggle '" + value + "'", function($window, $document, done) { var input = $document. elements('[ng\\:model="$1"][value="$2"]', this.name, value).filter(':radio'); input.trigger('click'); done(); }); }; chain.val = function() { return this.addFutureAction("return input val", function($window, $document, done) { var input = $document.elements('[ng\\:model="$1"]', this.name).filter(':input'); done(null,input.val()); }); }; return function(name) { this.name = name; return chain; }; }); /** * Usage: * repeater('#products table', 'Product List').count() number of rows * repeater('#products table', 'Product List').row(1) all bindings in row as an array * repeater('#products table', 'Product List').column('product.name') all values across all rows in an array */ angular.scenario.dsl('repeater', function() { var chain = {}; chain.count = function() { return this.addFutureAction("repeater '" + this.label + "' count", function($window, $document, done) { try { done(null, $document.elements().length); } catch (e) { done(null, 0); } }); }; chain.column = function(binding) { return this.addFutureAction("repeater '" + this.label + "' column '" + binding + "'", function($window, $document, done) { done(null, $document.elements().bindings($window.angular.element, binding)); }); }; chain.row = function(index) { return this.addFutureAction("repeater '" + this.label + "' row '" + index + "'", function($window, $document, done) { var matches = $document.elements().slice(index, index + 1); if (!matches.length) return done('row ' + index + ' out of bounds'); done(null, matches.bindings($window.angular.element)); }); }; return function(selector, label) { this.dsl.using(selector, label); return chain; }; }); /** * Usage: * select(name).option('value') select one option * select(name).options('value1', 'value2', ...) select options from a multi select */ angular.scenario.dsl('select', function() { var chain = {}; chain.option = function(value) { return this.addFutureAction("select '" + this.name + "' option '" + value + "'", function($window, $document, done) { var select = $document.elements('select[ng\\:model="$1"]', this.name); var option = select.find('option[value="' + value + '"]'); if (option.length) { select.val(value); } else { option = select.find('option:contains("' + value + '")'); if (option.length) { select.val(option.val()); } } select.trigger('change'); done(); }); }; chain.options = function() { var values = arguments; return this.addFutureAction("select '" + this.name + "' options '" + values + "'", function($window, $document, done) { var select = $document.elements('select[multiple][ng\\:model="$1"]', this.name); select.val(values); select.trigger('change'); done(); }); }; return function(name) { this.name = name; return chain; }; }); /** * Usage: * element(selector, label).count() get the number of elements that match selector * element(selector, label).click() clicks an element * element(selector, label).query(fn) executes fn(selectedElements, done) * element(selector, label).{method}() gets the value (as defined by jQuery, ex. val) * element(selector, label).{method}(value) sets the value (as defined by jQuery, ex. val) * element(selector, label).{method}(key) gets the value (as defined by jQuery, ex. attr) * element(selector, label).{method}(key, value) sets the value (as defined by jQuery, ex. attr) */ angular.scenario.dsl('element', function() { var KEY_VALUE_METHODS = ['attr', 'css', 'prop']; var VALUE_METHODS = [ 'val', 'text', 'html', 'height', 'innerHeight', 'outerHeight', 'width', 'innerWidth', 'outerWidth', 'position', 'scrollLeft', 'scrollTop', 'offset' ]; var chain = {}; chain.count = function() { return this.addFutureAction("element '" + this.label + "' count", function($window, $document, done) { try { done(null, $document.elements().length); } catch (e) { done(null, 0); } }); }; chain.click = function() { return this.addFutureAction("element '" + this.label + "' click", function($window, $document, done) { var elements = $document.elements(); var href = elements.attr('href'); var eventProcessDefault = elements.trigger('click')[0]; if (href && elements[0].nodeName.toUpperCase() === 'A' && eventProcessDefault) { this.application.navigateTo(href, function() { done(); }, done); } else { done(); } }); }; chain.query = function(fn) { return this.addFutureAction('element ' + this.label + ' custom query', function($window, $document, done) { fn.call(this, $document.elements(), done); }); }; angular.forEach(KEY_VALUE_METHODS, function(methodName) { chain[methodName] = function(name, value) { var args = arguments, futureName = (args.length == 1) ? "element '" + this.label + "' get " + methodName + " '" + name + "'" : "element '" + this.label + "' set " + methodName + " '" + name + "' to " + "'" + value + "'"; return this.addFutureAction(futureName, function($window, $document, done) { var element = $document.elements(); done(null, element[methodName].apply(element, args)); }); }; }); angular.forEach(VALUE_METHODS, function(methodName) { chain[methodName] = function(value) { var args = arguments, futureName = (args.length == 0) ? "element '" + this.label + "' " + methodName : futureName = "element '" + this.label + "' set " + methodName + " to '" + value + "'"; return this.addFutureAction(futureName, function($window, $document, done) { var element = $document.elements(); done(null, element[methodName].apply(element, args)); }); }; }); return function(selector, label) { this.dsl.using(selector, label); return chain; }; }); /** * Matchers for implementing specs. Follows the Jasmine spec conventions. */ angular.scenario.matcher('toEqual', function(expected) { return angular.equals(this.actual, expected); }); angular.scenario.matcher('toBe', function(expected) { return this.actual === expected; }); angular.scenario.matcher('toBeDefined', function() { return angular.isDefined(this.actual); }); angular.scenario.matcher('toBeTruthy', function() { return this.actual; }); angular.scenario.matcher('toBeFalsy', function() { return !this.actual; }); angular.scenario.matcher('toMatch', function(expected) { return new RegExp(expected).test(this.actual); }); angular.scenario.matcher('toBeNull', function() { return this.actual === null; }); angular.scenario.matcher('toContain', function(expected) { return includes(this.actual, expected); }); angular.scenario.matcher('toBeLessThan', function(expected) { return this.actual < expected; }); angular.scenario.matcher('toBeGreaterThan', function(expected) { return this.actual > expected; }); /** * User Interface for the Scenario Runner. * * TODO(esprehn): This should be refactored now that ObjectModel exists * to use angular bindings for the UI. */ angular.scenario.output('html', function(context, runner, model) { var specUiMap = {}, lastStepUiMap = {}; context.append( '<div id="header">' + ' <h1><span class="angular">AngularJS</span>: Scenario Test Runner</h1>' + ' <ul id="status-legend" class="status-display">' + ' <li class="status-error">0 Errors</li>' + ' <li class="status-failure">0 Failures</li>' + ' <li class="status-success">0 Passed</li>' + ' </ul>' + '</div>' + '<div id="specs">' + ' <div class="test-children"></div>' + '</div>' ); runner.on('InteractivePause', function(spec) { var ui = lastStepUiMap[spec.id]; ui.find('.test-title'). html('paused... <a href="javascript:resume()">resume</a> when ready.'); }); runner.on('SpecBegin', function(spec) { var ui = findContext(spec); ui.find('> .tests').append( '<li class="status-pending test-it"></li>' ); ui = ui.find('> .tests li:last'); ui.append( '<div class="test-info">' + ' <p class="test-title">' + ' <span class="timer-result"></span>' + ' <span class="test-name"></span>' + ' </p>' + '</div>' + '<div class="scrollpane">' + ' <ol class="test-actions"></ol>' + '</div>' ); ui.find('> .test-info .test-name').text(spec.name); ui.find('> .test-info').click(function() { var scrollpane = ui.find('> .scrollpane'); var actions = scrollpane.find('> .test-actions'); var name = context.find('> .test-info .test-name'); if (actions.find(':visible').length) { actions.hide(); name.removeClass('open').addClass('closed'); } else { actions.show(); scrollpane.attr('scrollTop', scrollpane.attr('scrollHeight')); name.removeClass('closed').addClass('open'); } }); specUiMap[spec.id] = ui; }); runner.on('SpecError', function(spec, error) { var ui = specUiMap[spec.id]; ui.append('<pre></pre>'); ui.find('> pre').text(formatException(error)); }); runner.on('SpecEnd', function(spec) { var ui = specUiMap[spec.id]; spec = model.getSpec(spec.id); ui.removeClass('status-pending'); ui.addClass('status-' + spec.status); ui.find("> .test-info .timer-result").text(spec.duration + "ms"); if (spec.status === 'success') { ui.find('> .test-info .test-name').addClass('closed'); ui.find('> .scrollpane .test-actions').hide(); } updateTotals(spec.status); }); runner.on('StepBegin', function(spec, step) { var ui = specUiMap[spec.id]; spec = model.getSpec(spec.id); step = spec.getLastStep(); ui.find('> .scrollpane .test-actions').append('<li class="status-pending"></li>'); var stepUi = lastStepUiMap[spec.id] = ui.find('> .scrollpane .test-actions li:last'); stepUi.append( '<div class="timer-result"></div>' + '<div class="test-title"></div>' ); stepUi.find('> .test-title').text(step.name); var scrollpane = stepUi.parents('.scrollpane'); scrollpane.attr('scrollTop', scrollpane.attr('scrollHeight')); }); runner.on('StepFailure', function(spec, step, error) { var ui = lastStepUiMap[spec.id]; addError(ui, step.line, error); }); runner.on('StepError', function(spec, step, error) { var ui = lastStepUiMap[spec.id]; addError(ui, step.line, error); }); runner.on('StepEnd', function(spec, step) { var stepUi = lastStepUiMap[spec.id]; spec = model.getSpec(spec.id); step = spec.getLastStep(); stepUi.find('.timer-result').text(step.duration + 'ms'); stepUi.removeClass('status-pending'); stepUi.addClass('status-' + step.status); var scrollpane = specUiMap[spec.id].find('> .scrollpane'); scrollpane.attr('scrollTop', scrollpane.attr('scrollHeight')); }); /** * Finds the context of a spec block defined by the passed definition. * * @param {Object} The definition created by the Describe object. */ function findContext(spec) { var currentContext = context.find('#specs'); angular.forEach(model.getDefinitionPath(spec), function(defn) { var id = 'describe-' + defn.id; if (!context.find('#' + id).length) { currentContext.find('> .test-children').append( '<div class="test-describe" id="' + id + '">' + ' <h2></h2>' + ' <div class="test-children"></div>' + ' <ul class="tests"></ul>' + '</div>' ); context.find('#' + id).find('> h2').text('describe: ' + defn.name); } currentContext = context.find('#' + id); }); return context.find('#describe-' + spec.definition.id); } /** * Updates the test counter for the status. * * @param {string} the status. */ function updateTotals(status) { var legend = context.find('#status-legend .status-' + status); var parts = legend.text().split(' '); var value = (parts[0] * 1) + 1; legend.text(value + ' ' + parts[1]); } /** * Add an error to a step. * * @param {Object} The JQuery wrapped context * @param {function()} fn() that should return the file/line number of the error * @param {Object} the error. */ function addError(context, line, error) { context.find('.test-title').append('<pre></pre>'); var message = _jQuery.trim(line() + '\n\n' + formatException(error)); context.find('.test-title pre:last').text(message); } }); /** * Generates JSON output into a context. */ angular.scenario.output('json', function(context, runner, model) { model.on('RunnerEnd', function() { context.text(angular.toJson(model.value)); }); }); /** * Generates XML output into a context. */ angular.scenario.output('xml', function(context, runner, model) { var $ = function(args) {return new context.init(args);}; model.on('RunnerEnd', function() { var scenario = $('<scenario></scenario>'); context.append(scenario); serializeXml(scenario, model.value); }); /** * Convert the tree into XML. * * @param {Object} context jQuery context to add the XML to. * @param {Object} tree node to serialize */ function serializeXml(context, tree) { angular.forEach(tree.children, function(child) { var describeContext = $('<describe></describe>'); describeContext.attr('id', child.id); describeContext.attr('name', child.name); context.append(describeContext); serializeXml(describeContext, child); }); var its = $('<its></its>'); context.append(its); angular.forEach(tree.specs, function(spec) { var it = $('<it></it>'); it.attr('id', spec.id); it.attr('name', spec.name); it.attr('duration', spec.duration); it.attr('status', spec.status); its.append(it); angular.forEach(spec.steps, function(step) { var stepContext = $('<step></step>'); stepContext.attr('name', step.name); stepContext.attr('duration', step.duration); stepContext.attr('status', step.status); it.append(stepContext); if (step.error) { var error = $('<error></error>'); stepContext.append(error); error.text(formatException(stepContext.error)); } }); }); } }); /** * Creates a global value $result with the result of the runner. */ angular.scenario.output('object', function(context, runner, model) { runner.$window.$result = model.value; }); bindJQuery(); publishExternalAPI(angular); var $runner = new angular.scenario.Runner(window), scripts = document.getElementsByTagName('script'), script = scripts[scripts.length - 1], config = {}; angular.forEach(script.attributes, function(attr) { var match = attr.name.match(/ng[:\-](.*)/); if (match) { config[match[1]] = attr.value || true; } }); if (config.autotest) { JQLite(document).ready(function() { angular.scenario.setUpAndRun(config); }); } })(window, document); angular.element(document).find('head').append('<style type="text/css">@charset "UTF-8";\n\n[ng\\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak],\n.ng-cloak, .x-ng-cloak {\n display: none;\n}\n\nng\\:form {\n display: block;\n}\n</style>'); angular.element(document).find('head').append('<style type="text/css">@charset "UTF-8";\n/* CSS Document */\n\n/** Structure */\nbody {\n font-family: Arial, sans-serif;\n margin: 0;\n font-size: 14px;\n}\n\n#system-error {\n font-size: 1.5em;\n text-align: center;\n}\n\n#json, #xml {\n display: none;\n}\n\n#header {\n position: fixed;\n width: 100%;\n}\n\n#specs {\n padding-top: 50px;\n}\n\n#header .angular {\n font-family: Courier New, monospace;\n font-weight: bold;\n}\n\n#header h1 {\n font-weight: normal;\n float: left;\n font-size: 30px;\n line-height: 30px;\n margin: 0;\n padding: 10px 10px;\n height: 30px;\n}\n\n#application h2,\n#specs h2 {\n margin: 0;\n padding: 0.5em;\n font-size: 1.1em;\n}\n\n#status-legend {\n margin-top: 10px;\n margin-right: 10px;\n}\n\n#header,\n#application,\n.test-info,\n.test-actions li {\n overflow: hidden;\n}\n\n#application {\n margin: 10px;\n}\n\n#application iframe {\n width: 100%;\n height: 758px;\n}\n\n#application .popout {\n float: right;\n}\n\n#application iframe {\n border: none;\n}\n\n.tests li,\n.test-actions li,\n.test-it li,\n.test-it ol,\n.status-display {\n list-style-type: none;\n}\n\n.tests,\n.test-it ol,\n.status-display {\n margin: 0;\n padding: 0;\n}\n\n.test-info {\n margin-left: 1em;\n margin-top: 0.5em;\n border-radius: 8px 0 0 8px;\n -webkit-border-radius: 8px 0 0 8px;\n -moz-border-radius: 8px 0 0 8px;\n cursor: pointer;\n}\n\n.test-info:hover .test-name {\n text-decoration: underline;\n}\n\n.test-info .closed:before {\n content: \'\\25b8\\00A0\';\n}\n\n.test-info .open:before {\n content: \'\\25be\\00A0\';\n font-weight: bold;\n}\n\n.test-it ol {\n margin-left: 2.5em;\n}\n\n.status-display,\n.status-display li {\n float: right;\n}\n\n.status-display li {\n padding: 5px 10px;\n}\n\n.timer-result,\n.test-title {\n display: inline-block;\n margin: 0;\n padding: 4px;\n}\n\n.test-actions .test-title,\n.test-actions .test-result {\n display: table-cell;\n padding-left: 0.5em;\n padding-right: 0.5em;\n}\n\n.test-actions {\n display: table;\n}\n\n.test-actions li {\n display: table-row;\n}\n\n.timer-result {\n width: 4em;\n padding: 0 10px;\n text-align: right;\n font-family: monospace;\n}\n\n.test-it pre,\n.test-actions pre {\n clear: left;\n color: black;\n margin-left: 6em;\n}\n\n.test-describe {\n padding-bottom: 0.5em;\n}\n\n.test-describe .test-describe {\n margin: 5px 5px 10px 2em;\n}\n\n.test-actions .status-pending .test-title:before {\n content: \'\\00bb\\00A0\';\n}\n\n.scrollpane {\n max-height: 20em;\n overflow: auto;\n}\n\n/** Colors */\n\n#header {\n background-color: #F2C200;\n}\n\n#specs h2 {\n border-top: 2px solid #BABAD1;\n}\n\n#specs h2,\n#application h2 {\n background-color: #efefef;\n}\n\n#application {\n border: 1px solid #BABAD1;\n}\n\n.test-describe .test-describe {\n border-left: 1px solid #BABAD1;\n border-right: 1px solid #BABAD1;\n border-bottom: 1px solid #BABAD1;\n}\n\n.status-display {\n border: 1px solid #777;\n}\n\n.status-display .status-pending,\n.status-pending .test-info {\n background-color: #F9EEBC;\n}\n\n.status-display .status-success,\n.status-success .test-info {\n background-color: #B1D7A1;\n}\n\n.status-display .status-failure,\n.status-failure .test-info {\n background-color: #FF8286;\n}\n\n.status-display .status-error,\n.status-error .test-info {\n background-color: black;\n color: white;\n}\n\n.test-actions .status-success .test-title {\n color: #30B30A;\n}\n\n.test-actions .status-failure .test-title {\n color: #DF0000;\n}\n\n.test-actions .status-error .test-title {\n color: black;\n}\n\n.test-actions .timer-result {\n color: #888;\n}\n</style>');
ajax/libs/glamor/2.4.1/index.js
sashberd/cdnjs
(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.Glamor = 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(require,module,exports){ (function (global){ "use strict"; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; (function (f) { if ((typeof exports === "undefined" ? "undefined" : _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.CSSOps = 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) { "use strict"; module.exports = _dereq_("react/lib/CSSPropertyOperations"); }, { "react/lib/CSSPropertyOperations": 15 }], 2: [function (_dereq_, module, exports) { /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ 'use strict'; var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); /** * Simple, lightweight module assisting with the detection and context of * Worker. Helps avoid circular dependencies and allows code to reason about * whether or not they are in a Worker, even if they never include the main * `ReactWorker` dependency. */ var ExecutionEnvironment = { canUseDOM: canUseDOM, canUseWorkers: typeof Worker !== 'undefined', canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), canUseViewport: canUseDOM && !!window.screen, isInWorker: !canUseDOM // For now, this is true - might change in the future. }; module.exports = ExecutionEnvironment; }, {}], 3: [function (_dereq_, module, exports) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @typechecks */ var _hyphenPattern = /-(.)/g; /** * Camelcases a hyphenated string, for example: * * > camelize('background-color') * < "backgroundColor" * * @param {string} string * @return {string} */ function camelize(string) { return string.replace(_hyphenPattern, function (_, character) { return character.toUpperCase(); }); } module.exports = camelize; }, {}], 4: [function (_dereq_, module, exports) { /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @typechecks */ 'use strict'; var camelize = _dereq_('./camelize'); var msPattern = /^-ms-/; /** * Camelcases a hyphenated CSS property name, for example: * * > camelizeStyleName('background-color') * < "backgroundColor" * > camelizeStyleName('-moz-transition') * < "MozTransition" * > camelizeStyleName('-ms-transition') * < "msTransition" * * As Andi Smith suggests * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix * is converted to lowercase `ms`. * * @param {string} string * @return {string} */ function camelizeStyleName(string) { return camelize(string.replace(msPattern, 'ms-')); } module.exports = camelizeStyleName; }, { "./camelize": 3 }], 5: [function (_dereq_, module, exports) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * */ function makeEmptyFunction(arg) { return function () { return arg; }; } /** * This function accepts and discards inputs; it has no side effects. This is * primarily useful idiomatically for overridable function endpoints which * always need to be callable, since JS lacks a null-call idiom ala Cocoa. */ var emptyFunction = function emptyFunction() {}; emptyFunction.thatReturns = makeEmptyFunction; emptyFunction.thatReturnsFalse = makeEmptyFunction(false); emptyFunction.thatReturnsTrue = makeEmptyFunction(true); emptyFunction.thatReturnsNull = makeEmptyFunction(null); emptyFunction.thatReturnsThis = function () { return this; }; emptyFunction.thatReturnsArgument = function (arg) { return arg; }; module.exports = emptyFunction; }, {}], 6: [function (_dereq_, module, exports) { 'use strict'; /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @typechecks */ var _uppercasePattern = /([A-Z])/g; /** * Hyphenates a camelcased string, for example: * * > hyphenate('backgroundColor') * < "background-color" * * For CSS style names, use `hyphenateStyleName` instead which works properly * with all vendor prefixes, including `ms`. * * @param {string} string * @return {string} */ function hyphenate(string) { return string.replace(_uppercasePattern, '-$1').toLowerCase(); } module.exports = hyphenate; }, {}], 7: [function (_dereq_, module, exports) { /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @typechecks */ 'use strict'; var hyphenate = _dereq_('./hyphenate'); var msPattern = /^ms-/; /** * Hyphenates a camelcased CSS property name, for example: * * > hyphenateStyleName('backgroundColor') * < "background-color" * > hyphenateStyleName('MozTransition') * < "-moz-transition" * > hyphenateStyleName('msTransition') * < "-ms-transition" * * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix * is converted to `-ms-`. * * @param {string} string * @return {string} */ function hyphenateStyleName(string) { return hyphenate(string).replace(msPattern, '-ms-'); } module.exports = hyphenateStyleName; }, { "./hyphenate": 6 }], 8: [function (_dereq_, module, exports) { (function (process) { /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ 'use 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. */ function invariant(condition, format, a, b, c, d, e, f) { if ("production" !== '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(format.replace(/%s/g, function () { return args[argIndex++]; })); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } } module.exports = invariant; }).call(this, _dereq_('_process')); }, { "_process": 13 }], 9: [function (_dereq_, module, exports) { /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * * @typechecks static-only */ 'use strict'; /** * Memoizes the return value of a function that accepts one string argument. */ function memoizeStringOnly(callback) { var cache = {}; return function (string) { if (!cache.hasOwnProperty(string)) { cache[string] = callback.call(this, string); } return cache[string]; }; } module.exports = memoizeStringOnly; }, {}], 10: [function (_dereq_, module, exports) { /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @typechecks */ 'use strict'; var ExecutionEnvironment = _dereq_('./ExecutionEnvironment'); var performance; if (ExecutionEnvironment.canUseDOM) { performance = window.performance || window.msPerformance || window.webkitPerformance; } module.exports = performance || {}; }, { "./ExecutionEnvironment": 2 }], 11: [function (_dereq_, module, exports) { 'use strict'; /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @typechecks */ var performance = _dereq_('./performance'); var performanceNow; /** * Detect if we can use `window.performance.now()` and gracefully fallback to * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now * because of Facebook's testing infrastructure. */ if (performance.now) { performanceNow = function performanceNow() { return performance.now(); }; } else { performanceNow = function performanceNow() { return Date.now(); }; } module.exports = performanceNow; }, { "./performance": 10 }], 12: [function (_dereq_, module, exports) { (function (process) { /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ 'use strict'; var emptyFunction = _dereq_('./emptyFunction'); /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var warning = emptyFunction; if ("production" !== 'production') { warning = function warning(condition, format) { for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { args[_key - 2] = arguments[_key]; } if (format === undefined) { throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); } if (format.indexOf('Failed Composite propType: ') === 0) { return; // Ignore CompositeComponent proptype check. } if (!condition) { var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function () { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} } }; } module.exports = warning; }).call(this, _dereq_('_process')); }, { "./emptyFunction": 5, "_process": 13 }], 13: [function (_dereq_, module, exports) { // shim for using process in browser var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it // don't break things. But we need to wrap it in a try catch in case it is // wrapped in strict mode code which doesn't define any globals. It's inside a // function because try/catches deoptimize in certain engines. var cachedSetTimeout; var cachedClearTimeout; (function () { try { cachedSetTimeout = setTimeout; } catch (e) { cachedSetTimeout = function cachedSetTimeout() { throw new Error('setTimeout is not defined'); }; } try { cachedClearTimeout = clearTimeout; } catch (e) { cachedClearTimeout = function cachedClearTimeout() { throw new Error('clearTimeout is not defined'); }; } })(); function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { return setTimeout(fun, 0); } else { return cachedSetTimeout.call(null, fun, 0); } } function runClearTimeout(marker) { if (cachedClearTimeout === clearTimeout) { clearTimeout(marker); } else { cachedClearTimeout.call(null, marker); } } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { if (!draining || !currentQueue) { return; } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = runTimeout(cleanUpNextTick); draining = true; var len = queue.length; while (len) { currentQueue = queue; queue = []; while (++queueIndex < len) { if (currentQueue) { currentQueue[queueIndex].run(); } } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; runClearTimeout(timeout); } process.nextTick = function (fun) { var args = new Array(arguments.length - 1); if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { runTimeout(drainQueue); } }; // v8 likes predictible objects function Item(fun, array) { this.fun = fun; this.array = array; } Item.prototype.run = function () { this.fun.apply(null, this.array); }; process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; process.version = ''; // empty string to avoid regexp issues process.versions = {}; function noop() {} process.on = noop; process.addListener = noop; process.once = noop; process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; process.binding = function (name) { throw new Error('process.binding is not supported'); }; process.cwd = function () { return '/'; }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; process.umask = function () { return 0; }; }, {}], 14: [function (_dereq_, module, exports) { /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule CSSProperty */ 'use strict'; /** * CSS properties which accept numbers but are not in units of "px". */ var isUnitlessNumber = { animationIterationCount: true, borderImageOutset: true, borderImageSlice: true, borderImageWidth: true, boxFlex: true, boxFlexGroup: true, boxOrdinalGroup: true, columnCount: true, flex: true, flexGrow: true, flexPositive: true, flexShrink: true, flexNegative: true, flexOrder: true, gridRow: true, gridColumn: true, fontWeight: true, lineClamp: true, lineHeight: true, opacity: true, order: true, orphans: true, tabSize: true, widows: true, zIndex: true, zoom: true, // SVG-related properties fillOpacity: true, floodOpacity: true, stopOpacity: true, strokeDasharray: true, strokeDashoffset: true, strokeMiterlimit: true, strokeOpacity: true, strokeWidth: true }; /** * @param {string} prefix vendor-specific prefix, eg: Webkit * @param {string} key style name, eg: transitionDuration * @return {string} style name prefixed with `prefix`, properly camelCased, eg: * WebkitTransitionDuration */ function prefixKey(prefix, key) { return prefix + key.charAt(0).toUpperCase() + key.substring(1); } /** * Support style names that may come passed in prefixed by adding permutations * of vendor prefixes. */ var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an // infinite loop, because it iterates over the newly added props too. Object.keys(isUnitlessNumber).forEach(function (prop) { prefixes.forEach(function (prefix) { isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; }); }); /** * Most style properties can be unset by doing .style[prop] = '' but IE8 * doesn't like doing that with shorthand properties so for the properties that * IE8 breaks on, which are listed here, we instead unset each of the * individual properties. See http://bugs.jquery.com/ticket/12385. * The 4-value 'clock' properties like margin, padding, border-width seem to * behave without any problems. Curiously, list-style works too without any * special prodding. */ var shorthandPropertyExpansions = { background: { backgroundAttachment: true, backgroundColor: true, backgroundImage: true, backgroundPositionX: true, backgroundPositionY: true, backgroundRepeat: true }, backgroundPosition: { backgroundPositionX: true, backgroundPositionY: true }, border: { borderWidth: true, borderStyle: true, borderColor: true }, borderBottom: { borderBottomWidth: true, borderBottomStyle: true, borderBottomColor: true }, borderLeft: { borderLeftWidth: true, borderLeftStyle: true, borderLeftColor: true }, borderRight: { borderRightWidth: true, borderRightStyle: true, borderRightColor: true }, borderTop: { borderTopWidth: true, borderTopStyle: true, borderTopColor: true }, font: { fontStyle: true, fontVariant: true, fontWeight: true, fontSize: true, lineHeight: true, fontFamily: true }, outline: { outlineWidth: true, outlineStyle: true, outlineColor: true } }; var CSSProperty = { isUnitlessNumber: isUnitlessNumber, shorthandPropertyExpansions: shorthandPropertyExpansions }; module.exports = CSSProperty; }, {}], 15: [function (_dereq_, module, exports) { (function (process) { /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule CSSPropertyOperations */ 'use strict'; var CSSProperty = _dereq_('./CSSProperty'); var ExecutionEnvironment = _dereq_('fbjs/lib/ExecutionEnvironment'); var ReactInstrumentation = _dereq_('./ReactInstrumentation'); var camelizeStyleName = _dereq_('fbjs/lib/camelizeStyleName'); var dangerousStyleValue = _dereq_('./dangerousStyleValue'); var hyphenateStyleName = _dereq_('fbjs/lib/hyphenateStyleName'); var memoizeStringOnly = _dereq_('fbjs/lib/memoizeStringOnly'); var warning = _dereq_('fbjs/lib/warning'); var processStyleName = memoizeStringOnly(function (styleName) { return hyphenateStyleName(styleName); }); var hasShorthandPropertyBug = false; var styleFloatAccessor = 'cssFloat'; if (ExecutionEnvironment.canUseDOM) { var tempStyle = document.createElement('div').style; try { // IE8 throws "Invalid argument." if resetting shorthand style properties. tempStyle.font = ''; } catch (e) { hasShorthandPropertyBug = true; } // IE8 only supports accessing cssFloat (standard) as styleFloat if (document.documentElement.style.cssFloat === undefined) { styleFloatAccessor = 'styleFloat'; } } if ("production" !== 'production') { // 'msTransform' is correct, but the other prefixes should be capitalized var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; // style values shouldn't contain a semicolon var badStyleValueWithSemicolonPattern = /;\s*$/; var warnedStyleNames = {}; var warnedStyleValues = {}; var warnedForNaNValue = false; var warnHyphenatedStyleName = function warnHyphenatedStyleName(name, owner) { if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { return; } warnedStyleNames[name] = true; "production" !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0; }; var warnBadVendoredStyleName = function warnBadVendoredStyleName(name, owner) { if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { return; } warnedStyleNames[name] = true; "production" !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0; }; var warnStyleValueWithSemicolon = function warnStyleValueWithSemicolon(name, value, owner) { if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { return; } warnedStyleValues[value] = true; "production" !== 'production' ? warning(false, 'Style property values shouldn\'t contain a semicolon.%s ' + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0; }; var warnStyleValueIsNaN = function warnStyleValueIsNaN(name, value, owner) { if (warnedForNaNValue) { return; } warnedForNaNValue = true; "production" !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0; }; var checkRenderMessage = function checkRenderMessage(owner) { if (owner) { var name = owner.getName(); if (name) { return ' Check the render method of `' + name + '`.'; } } return ''; }; /** * @param {string} name * @param {*} value * @param {ReactDOMComponent} component */ var warnValidStyle = function warnValidStyle(name, value, component) { var owner; if (component) { owner = component._currentElement._owner; } if (name.indexOf('-') > -1) { warnHyphenatedStyleName(name, owner); } else if (badVendoredStyleNamePattern.test(name)) { warnBadVendoredStyleName(name, owner); } else if (badStyleValueWithSemicolonPattern.test(value)) { warnStyleValueWithSemicolon(name, value, owner); } if (typeof value === 'number' && isNaN(value)) { warnStyleValueIsNaN(name, value, owner); } }; } /** * Operations for dealing with CSS properties. */ var CSSPropertyOperations = { /** * Serializes a mapping of style properties for use as inline styles: * * > createMarkupForStyles({width: '200px', height: 0}) * "width:200px;height:0;" * * Undefined values are ignored so that declarative programming is easier. * The result should be HTML-escaped before insertion into the DOM. * * @param {object} styles * @param {ReactDOMComponent} component * @return {?string} */ createMarkupForStyles: function createMarkupForStyles(styles, component) { var serialized = ''; for (var styleName in styles) { if (!styles.hasOwnProperty(styleName)) { continue; } var styleValue = styles[styleName]; if ("production" !== 'production') { warnValidStyle(styleName, styleValue, component); } if (styleValue != null) { serialized += processStyleName(styleName) + ':'; serialized += dangerousStyleValue(styleName, styleValue, component) + ';'; } } return serialized || null; }, /** * Sets the value for multiple styles on a node. If a value is specified as * '' (empty string), the corresponding style property will be unset. * * @param {DOMElement} node * @param {object} styles * @param {ReactDOMComponent} component */ setValueForStyles: function setValueForStyles(node, styles, component) { if ("production" !== 'production') { ReactInstrumentation.debugTool.onHostOperation(component._debugID, 'update styles', styles); } var style = node.style; for (var styleName in styles) { if (!styles.hasOwnProperty(styleName)) { continue; } if ("production" !== 'production') { warnValidStyle(styleName, styles[styleName], component); } var styleValue = dangerousStyleValue(styleName, styles[styleName], component); if (styleName === 'float' || styleName === 'cssFloat') { styleName = styleFloatAccessor; } if (styleValue) { style[styleName] = styleValue; } else { var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName]; if (expansion) { // Shorthand property that IE8 won't like unsetting, so unset each // component to placate it for (var individualStyleName in expansion) { style[individualStyleName] = ''; } } else { style[styleName] = ''; } } } } }; module.exports = CSSPropertyOperations; }).call(this, _dereq_('_process')); }, { "./CSSProperty": 14, "./ReactInstrumentation": 21, "./dangerousStyleValue": 23, "_process": 13, "fbjs/lib/ExecutionEnvironment": 2, "fbjs/lib/camelizeStyleName": 4, "fbjs/lib/hyphenateStyleName": 7, "fbjs/lib/memoizeStringOnly": 9, "fbjs/lib/warning": 12 }], 16: [function (_dereq_, module, exports) { (function (process) { /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule ReactChildrenMutationWarningDevtool */ 'use strict'; var ReactComponentTreeDevtool = _dereq_('./ReactComponentTreeDevtool'); var warning = _dereq_('fbjs/lib/warning'); var elements = {}; function handleElement(debugID, element) { if (element == null) { return; } if (element._shadowChildren === undefined) { return; } if (element._shadowChildren === element.props.children) { return; } var isMutated = false; if (Array.isArray(element._shadowChildren)) { if (element._shadowChildren.length === element.props.children.length) { for (var i = 0; i < element._shadowChildren.length; i++) { if (element._shadowChildren[i] !== element.props.children[i]) { isMutated = true; } } } else { isMutated = true; } } "production" !== 'production' ? warning(Array.isArray(element._shadowChildren) && !isMutated, 'Component\'s children should not be mutated.%s', ReactComponentTreeDevtool.getStackAddendumByID(debugID)) : void 0; } var ReactDOMUnknownPropertyDevtool = { onBeforeMountComponent: function onBeforeMountComponent(debugID, element) { elements[debugID] = element; }, onBeforeUpdateComponent: function onBeforeUpdateComponent(debugID, element) { elements[debugID] = element; }, onComponentHasMounted: function onComponentHasMounted(debugID) { handleElement(debugID, elements[debugID]); delete elements[debugID]; }, onComponentHasUpdated: function onComponentHasUpdated(debugID) { handleElement(debugID, elements[debugID]); delete elements[debugID]; } }; module.exports = ReactDOMUnknownPropertyDevtool; }).call(this, _dereq_('_process')); }, { "./ReactComponentTreeDevtool": 17, "_process": 13, "fbjs/lib/warning": 12 }], 17: [function (_dereq_, module, exports) { (function (process) { /** * Copyright 2016-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 ReactComponentTreeDevtool */ 'use strict'; var _prodInvariant = _dereq_('./reactProdInvariant'); var ReactCurrentOwner = _dereq_('./ReactCurrentOwner'); var invariant = _dereq_('fbjs/lib/invariant'); var warning = _dereq_('fbjs/lib/warning'); var tree = {}; var unmountedIDs = {}; var rootIDs = {}; function updateTree(id, update) { if (!tree[id]) { tree[id] = { element: null, parentID: null, ownerID: null, text: null, childIDs: [], displayName: 'Unknown', isMounted: false, updateCount: 0 }; } update(tree[id]); } function purgeDeep(id) { var item = tree[id]; if (item) { var childIDs = item.childIDs; delete tree[id]; childIDs.forEach(purgeDeep); } } function describeComponentFrame(name, source, ownerName) { return '\n in ' + name + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : ''); } function describeID(id) { var name = ReactComponentTreeDevtool.getDisplayName(id); var element = ReactComponentTreeDevtool.getElement(id); var ownerID = ReactComponentTreeDevtool.getOwnerID(id); var ownerName; if (ownerID) { ownerName = ReactComponentTreeDevtool.getDisplayName(ownerID); } "production" !== 'production' ? warning(element, 'ReactComponentTreeDevtool: Missing React element for debugID %s when ' + 'building stack', id) : void 0; return describeComponentFrame(name, element && element._source, ownerName); } var ReactComponentTreeDevtool = { onSetDisplayName: function onSetDisplayName(id, displayName) { updateTree(id, function (item) { return item.displayName = displayName; }); }, onSetChildren: function onSetChildren(id, nextChildIDs) { updateTree(id, function (item) { item.childIDs = nextChildIDs; nextChildIDs.forEach(function (nextChildID) { var nextChild = tree[nextChildID]; !nextChild ? "production" !== 'production' ? invariant(false, 'Expected devtool events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('68') : void 0; !(nextChild.displayName != null) ? "production" !== 'production' ? invariant(false, 'Expected onSetDisplayName() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('69') : void 0; !(nextChild.childIDs != null || nextChild.text != null) ? "production" !== 'production' ? invariant(false, 'Expected onSetChildren() or onSetText() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('70') : void 0; !nextChild.isMounted ? "production" !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0; if (nextChild.parentID == null) { nextChild.parentID = id; // TODO: This shouldn't be necessary but mounting a new root during in // componentWillMount currently causes not-yet-mounted components to // be purged from our tree data so their parent ID is missing. } !(nextChild.parentID === id) ? "production" !== 'production' ? invariant(false, 'Expected onSetParent() and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('72', nextChildID, nextChild.parentID, id) : void 0; }); }); }, onSetOwner: function onSetOwner(id, ownerID) { updateTree(id, function (item) { return item.ownerID = ownerID; }); }, onSetParent: function onSetParent(id, parentID) { updateTree(id, function (item) { return item.parentID = parentID; }); }, onSetText: function onSetText(id, text) { updateTree(id, function (item) { return item.text = text; }); }, onBeforeMountComponent: function onBeforeMountComponent(id, element) { updateTree(id, function (item) { return item.element = element; }); }, onBeforeUpdateComponent: function onBeforeUpdateComponent(id, element) { updateTree(id, function (item) { return item.element = element; }); }, onMountComponent: function onMountComponent(id) { updateTree(id, function (item) { return item.isMounted = true; }); }, onMountRootComponent: function onMountRootComponent(id) { rootIDs[id] = true; }, onUpdateComponent: function onUpdateComponent(id) { updateTree(id, function (item) { return item.updateCount++; }); }, onUnmountComponent: function onUnmountComponent(id) { updateTree(id, function (item) { return item.isMounted = false; }); unmountedIDs[id] = true; delete rootIDs[id]; }, purgeUnmountedComponents: function purgeUnmountedComponents() { if (ReactComponentTreeDevtool._preventPurging) { // Should only be used for testing. return; } for (var id in unmountedIDs) { purgeDeep(id); } unmountedIDs = {}; }, isMounted: function isMounted(id) { var item = tree[id]; return item ? item.isMounted : false; }, getCurrentStackAddendum: function getCurrentStackAddendum(topElement) { var info = ''; if (topElement) { var type = topElement.type; var name = typeof type === 'function' ? type.displayName || type.name : type; var owner = topElement._owner; info += describeComponentFrame(name || 'Unknown', topElement._source, owner && owner.getName()); } var currentOwner = ReactCurrentOwner.current; var id = currentOwner && currentOwner._debugID; info += ReactComponentTreeDevtool.getStackAddendumByID(id); return info; }, getStackAddendumByID: function getStackAddendumByID(id) { var info = ''; while (id) { info += describeID(id); id = ReactComponentTreeDevtool.getParentID(id); } return info; }, getChildIDs: function getChildIDs(id) { var item = tree[id]; return item ? item.childIDs : []; }, getDisplayName: function getDisplayName(id) { var item = tree[id]; return item ? item.displayName : 'Unknown'; }, getElement: function getElement(id) { var item = tree[id]; return item ? item.element : null; }, getOwnerID: function getOwnerID(id) { var item = tree[id]; return item ? item.ownerID : null; }, getParentID: function getParentID(id) { var item = tree[id]; return item ? item.parentID : null; }, getSource: function getSource(id) { var item = tree[id]; var element = item ? item.element : null; var source = element != null ? element._source : null; return source; }, getText: function getText(id) { var item = tree[id]; return item ? item.text : null; }, getUpdateCount: function getUpdateCount(id) { var item = tree[id]; return item ? item.updateCount : 0; }, getRootIDs: function getRootIDs() { return Object.keys(rootIDs); }, getRegisteredIDs: function getRegisteredIDs() { return Object.keys(tree); } }; module.exports = ReactComponentTreeDevtool; }).call(this, _dereq_('_process')); }, { "./ReactCurrentOwner": 18, "./reactProdInvariant": 24, "_process": 13, "fbjs/lib/invariant": 8, "fbjs/lib/warning": 12 }], 18: [function (_dereq_, module, exports) { /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule ReactCurrentOwner */ 'use strict'; /** * Keeps track of the current owner. * * The current owner is the component who should own any components that are * currently being constructed. */ var ReactCurrentOwner = { /** * @internal * @type {ReactComponent} */ current: null }; module.exports = ReactCurrentOwner; }, {}], 19: [function (_dereq_, module, exports) { (function (process) { /** * Copyright 2016-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 ReactDebugTool */ 'use strict'; var ReactInvalidSetStateWarningDevTool = _dereq_('./ReactInvalidSetStateWarningDevTool'); var ReactHostOperationHistoryDevtool = _dereq_('./ReactHostOperationHistoryDevtool'); var ReactComponentTreeDevtool = _dereq_('./ReactComponentTreeDevtool'); var ReactChildrenMutationWarningDevtool = _dereq_('./ReactChildrenMutationWarningDevtool'); var ExecutionEnvironment = _dereq_('fbjs/lib/ExecutionEnvironment'); var performanceNow = _dereq_('fbjs/lib/performanceNow'); var warning = _dereq_('fbjs/lib/warning'); var eventHandlers = []; var handlerDoesThrowForEvent = {}; function emitEvent(handlerFunctionName, arg1, arg2, arg3, arg4, arg5) { eventHandlers.forEach(function (handler) { try { if (handler[handlerFunctionName]) { handler[handlerFunctionName](arg1, arg2, arg3, arg4, arg5); } } catch (e) { "production" !== 'production' ? warning(handlerDoesThrowForEvent[handlerFunctionName], 'exception thrown by devtool while handling %s: %s', handlerFunctionName, e + '\n' + e.stack) : void 0; handlerDoesThrowForEvent[handlerFunctionName] = true; } }); } var _isProfiling = false; var flushHistory = []; var lifeCycleTimerStack = []; var currentFlushNesting = 0; var currentFlushMeasurements = null; var currentFlushStartTime = null; var currentTimerDebugID = null; var currentTimerStartTime = null; var currentTimerNestedFlushDuration = null; var currentTimerType = null; var lifeCycleTimerHasWarned = false; function clearHistory() { ReactComponentTreeDevtool.purgeUnmountedComponents(); ReactHostOperationHistoryDevtool.clearHistory(); } function getTreeSnapshot(registeredIDs) { return registeredIDs.reduce(function (tree, id) { var ownerID = ReactComponentTreeDevtool.getOwnerID(id); var parentID = ReactComponentTreeDevtool.getParentID(id); tree[id] = { displayName: ReactComponentTreeDevtool.getDisplayName(id), text: ReactComponentTreeDevtool.getText(id), updateCount: ReactComponentTreeDevtool.getUpdateCount(id), childIDs: ReactComponentTreeDevtool.getChildIDs(id), // Text nodes don't have owners but this is close enough. ownerID: ownerID || ReactComponentTreeDevtool.getOwnerID(parentID), parentID: parentID }; return tree; }, {}); } function resetMeasurements() { var previousStartTime = currentFlushStartTime; var previousMeasurements = currentFlushMeasurements || []; var previousOperations = ReactHostOperationHistoryDevtool.getHistory(); if (currentFlushNesting === 0) { currentFlushStartTime = null; currentFlushMeasurements = null; clearHistory(); return; } if (previousMeasurements.length || previousOperations.length) { var registeredIDs = ReactComponentTreeDevtool.getRegisteredIDs(); flushHistory.push({ duration: performanceNow() - previousStartTime, measurements: previousMeasurements || [], operations: previousOperations || [], treeSnapshot: getTreeSnapshot(registeredIDs) }); } clearHistory(); currentFlushStartTime = performanceNow(); currentFlushMeasurements = []; } function checkDebugID(debugID) { "production" !== 'production' ? warning(debugID, 'ReactDebugTool: debugID may not be empty.') : void 0; } function beginLifeCycleTimer(debugID, timerType) { if (currentFlushNesting === 0) { return; } if (currentTimerType && !lifeCycleTimerHasWarned) { "production" !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'Did not expect %s timer to start while %s timer is still in ' + 'progress for %s instance.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0; lifeCycleTimerHasWarned = true; } currentTimerStartTime = performanceNow(); currentTimerNestedFlushDuration = 0; currentTimerDebugID = debugID; currentTimerType = timerType; } function endLifeCycleTimer(debugID, timerType) { if (currentFlushNesting === 0) { return; } if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) { "production" !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'We did not expect %s timer to stop while %s timer is still in ' + 'progress for %s instance. Please report this as a bug in React.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0; lifeCycleTimerHasWarned = true; } if (_isProfiling) { currentFlushMeasurements.push({ timerType: timerType, instanceID: debugID, duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration }); } currentTimerStartTime = null; currentTimerNestedFlushDuration = null; currentTimerDebugID = null; currentTimerType = null; } function pauseCurrentLifeCycleTimer() { var currentTimer = { startTime: currentTimerStartTime, nestedFlushStartTime: performanceNow(), debugID: currentTimerDebugID, timerType: currentTimerType }; lifeCycleTimerStack.push(currentTimer); currentTimerStartTime = null; currentTimerNestedFlushDuration = null; currentTimerDebugID = null; currentTimerType = null; } function resumeCurrentLifeCycleTimer() { var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(); var startTime = _lifeCycleTimerStack$.startTime; var nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime; var debugID = _lifeCycleTimerStack$.debugID; var timerType = _lifeCycleTimerStack$.timerType; var nestedFlushDuration = performanceNow() - nestedFlushStartTime; currentTimerStartTime = startTime; currentTimerNestedFlushDuration += nestedFlushDuration; currentTimerDebugID = debugID; currentTimerType = timerType; } var ReactDebugTool = { addDevtool: function addDevtool(devtool) { eventHandlers.push(devtool); }, removeDevtool: function removeDevtool(devtool) { for (var i = 0; i < eventHandlers.length; i++) { if (eventHandlers[i] === devtool) { eventHandlers.splice(i, 1); i--; } } }, isProfiling: function isProfiling() { return _isProfiling; }, beginProfiling: function beginProfiling() { if (_isProfiling) { return; } _isProfiling = true; flushHistory.length = 0; resetMeasurements(); ReactDebugTool.addDevtool(ReactHostOperationHistoryDevtool); }, endProfiling: function endProfiling() { if (!_isProfiling) { return; } _isProfiling = false; resetMeasurements(); ReactDebugTool.removeDevtool(ReactHostOperationHistoryDevtool); }, getFlushHistory: function getFlushHistory() { return flushHistory; }, onBeginFlush: function onBeginFlush() { currentFlushNesting++; resetMeasurements(); pauseCurrentLifeCycleTimer(); emitEvent('onBeginFlush'); }, onEndFlush: function onEndFlush() { resetMeasurements(); currentFlushNesting--; resumeCurrentLifeCycleTimer(); emitEvent('onEndFlush'); }, onBeginLifeCycleTimer: function onBeginLifeCycleTimer(debugID, timerType) { checkDebugID(debugID); emitEvent('onBeginLifeCycleTimer', debugID, timerType); beginLifeCycleTimer(debugID, timerType); }, onEndLifeCycleTimer: function onEndLifeCycleTimer(debugID, timerType) { checkDebugID(debugID); endLifeCycleTimer(debugID, timerType); emitEvent('onEndLifeCycleTimer', debugID, timerType); }, onBeginReconcilerTimer: function onBeginReconcilerTimer(debugID, timerType) { checkDebugID(debugID); emitEvent('onBeginReconcilerTimer', debugID, timerType); }, onEndReconcilerTimer: function onEndReconcilerTimer(debugID, timerType) { checkDebugID(debugID); emitEvent('onEndReconcilerTimer', debugID, timerType); }, onError: function onError(debugID) { if (currentTimerDebugID != null) { endLifeCycleTimer(currentTimerDebugID, currentTimerType); } emitEvent('onError', debugID); }, onBeginProcessingChildContext: function onBeginProcessingChildContext() { emitEvent('onBeginProcessingChildContext'); }, onEndProcessingChildContext: function onEndProcessingChildContext() { emitEvent('onEndProcessingChildContext'); }, onHostOperation: function onHostOperation(debugID, type, payload) { checkDebugID(debugID); emitEvent('onHostOperation', debugID, type, payload); }, onComponentHasMounted: function onComponentHasMounted(debugID) { checkDebugID(debugID); emitEvent('onComponentHasMounted', debugID); }, onComponentHasUpdated: function onComponentHasUpdated(debugID) { checkDebugID(debugID); emitEvent('onComponentHasUpdated', debugID); }, onSetState: function onSetState() { emitEvent('onSetState'); }, onSetDisplayName: function onSetDisplayName(debugID, displayName) { checkDebugID(debugID); emitEvent('onSetDisplayName', debugID, displayName); }, onSetChildren: function onSetChildren(debugID, childDebugIDs) { checkDebugID(debugID); childDebugIDs.forEach(checkDebugID); emitEvent('onSetChildren', debugID, childDebugIDs); }, onSetOwner: function onSetOwner(debugID, ownerDebugID) { checkDebugID(debugID); emitEvent('onSetOwner', debugID, ownerDebugID); }, onSetParent: function onSetParent(debugID, parentDebugID) { checkDebugID(debugID); emitEvent('onSetParent', debugID, parentDebugID); }, onSetText: function onSetText(debugID, text) { checkDebugID(debugID); emitEvent('onSetText', debugID, text); }, onMountRootComponent: function onMountRootComponent(debugID) { checkDebugID(debugID); emitEvent('onMountRootComponent', debugID); }, onBeforeMountComponent: function onBeforeMountComponent(debugID, element) { checkDebugID(debugID); emitEvent('onBeforeMountComponent', debugID, element); }, onMountComponent: function onMountComponent(debugID) { checkDebugID(debugID); emitEvent('onMountComponent', debugID); }, onBeforeUpdateComponent: function onBeforeUpdateComponent(debugID, element) { checkDebugID(debugID); emitEvent('onBeforeUpdateComponent', debugID, element); }, onUpdateComponent: function onUpdateComponent(debugID) { checkDebugID(debugID); emitEvent('onUpdateComponent', debugID); }, onUnmountComponent: function onUnmountComponent(debugID) { checkDebugID(debugID); emitEvent('onUnmountComponent', debugID); }, onTestEvent: function onTestEvent() { emitEvent('onTestEvent'); } }; ReactDebugTool.addDevtool(ReactInvalidSetStateWarningDevTool); ReactDebugTool.addDevtool(ReactComponentTreeDevtool); ReactDebugTool.addDevtool(ReactChildrenMutationWarningDevtool); var url = ExecutionEnvironment.canUseDOM && window.location.href || ''; if (/[?&]react_perf\b/.test(url)) { ReactDebugTool.beginProfiling(); } module.exports = ReactDebugTool; }).call(this, _dereq_('_process')); }, { "./ReactChildrenMutationWarningDevtool": 16, "./ReactComponentTreeDevtool": 17, "./ReactHostOperationHistoryDevtool": 20, "./ReactInvalidSetStateWarningDevTool": 22, "_process": 13, "fbjs/lib/ExecutionEnvironment": 2, "fbjs/lib/performanceNow": 11, "fbjs/lib/warning": 12 }], 20: [function (_dereq_, module, exports) { /** * Copyright 2016-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 ReactHostOperationHistoryDevtool */ 'use strict'; var history = []; var ReactHostOperationHistoryDevtool = { onHostOperation: function onHostOperation(debugID, type, payload) { history.push({ instanceID: debugID, type: type, payload: payload }); }, clearHistory: function clearHistory() { if (ReactHostOperationHistoryDevtool._preventClearing) { // Should only be used for tests. return; } history = []; }, getHistory: function getHistory() { return history; } }; module.exports = ReactHostOperationHistoryDevtool; }, {}], 21: [function (_dereq_, module, exports) { (function (process) { /** * Copyright 2016-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 ReactInstrumentation */ 'use strict'; var debugTool = null; if ("production" !== 'production') { var ReactDebugTool = _dereq_('./ReactDebugTool'); debugTool = ReactDebugTool; } module.exports = { debugTool: debugTool }; }).call(this, _dereq_('_process')); }, { "./ReactDebugTool": 19, "_process": 13 }], 22: [function (_dereq_, module, exports) { (function (process) { /** * Copyright 2016-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 ReactInvalidSetStateWarningDevTool */ 'use strict'; var warning = _dereq_('fbjs/lib/warning'); if ("production" !== 'production') { var processingChildContext = false; var warnInvalidSetState = function warnInvalidSetState() { "production" !== 'production' ? warning(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()') : void 0; }; } var ReactInvalidSetStateWarningDevTool = { onBeginProcessingChildContext: function onBeginProcessingChildContext() { processingChildContext = true; }, onEndProcessingChildContext: function onEndProcessingChildContext() { processingChildContext = false; }, onSetState: function onSetState() { warnInvalidSetState(); } }; module.exports = ReactInvalidSetStateWarningDevTool; }).call(this, _dereq_('_process')); }, { "_process": 13, "fbjs/lib/warning": 12 }], 23: [function (_dereq_, module, exports) { (function (process) { /** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule dangerousStyleValue */ 'use strict'; var CSSProperty = _dereq_('./CSSProperty'); var warning = _dereq_('fbjs/lib/warning'); var isUnitlessNumber = CSSProperty.isUnitlessNumber; var styleWarnings = {}; /** * Convert a value into the proper css writable value. The style name `name` * should be logical (no hyphens), as specified * in `CSSProperty.isUnitlessNumber`. * * @param {string} name CSS property name such as `topMargin`. * @param {*} value CSS property value such as `10px`. * @param {ReactDOMComponent} component * @return {string} Normalized style value with dimensions applied. */ function dangerousStyleValue(name, value, component) { // Note that we've removed escapeTextForBrowser() calls here since the // whole string will be escaped when the attribute is injected into // the markup. If you provide unsafe user data here they can inject // arbitrary CSS which may be problematic (I couldn't repro this): // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ // This is not an XSS hole but instead a potential CSS injection issue // which has lead to a greater discussion about how we're going to // trust URLs moving forward. See #2115901 var isEmpty = value == null || typeof value === 'boolean' || value === ''; if (isEmpty) { return ''; } var isNonNumeric = isNaN(value); if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) { return '' + value; // cast to string } if (typeof value === 'string') { if ("production" !== 'production') { // Allow '0' to pass through without warning. 0 is already special and // doesn't require units, so we don't need to warn about it. if (component && value !== '0') { var owner = component._currentElement._owner; var ownerName = owner ? owner.getName() : null; if (ownerName && !styleWarnings[ownerName]) { styleWarnings[ownerName] = {}; } var warned = false; if (ownerName) { var warnings = styleWarnings[ownerName]; warned = warnings[name]; if (!warned) { warnings[name] = true; } } if (!warned) { "production" !== 'production' ? warning(false, 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + 'for CSS property `%s` (value: `%s`) which will be treated ' + 'as a unitless number in a future version of React.', component._currentElement.type, ownerName || 'unknown', name, value) : void 0; } } } value = value.trim(); } return value + 'px'; } module.exports = dangerousStyleValue; }).call(this, _dereq_('_process')); }, { "./CSSProperty": 14, "_process": 13, "fbjs/lib/warning": 12 }], 24: [function (_dereq_, module, exports) { /** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule reactProdInvariant * */ 'use strict'; /** * WARNING: DO NOT manually require this module. * This is a replacement for `invariant(...)` used by the error code system * and will _only_ be required by the corresponding babel pass. * It always throws. */ function reactProdInvariant(code) { var argCount = arguments.length - 1; var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; for (var argIdx = 0; argIdx < argCount; argIdx++) { message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); } message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; var error = new Error(message); error.name = 'Invariant Violation'; error.framesToPop = 1; // we don't care about reactProdInvariant's own frame throw error; } module.exports = reactProdInvariant; }, {}] }, {}, [1])(1); }); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{}],2:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = autoprefix; // from https://github.com/petehunt/jsxstyle/blob/master/lib/autoprefix.js var assign = Object.assign; function autoprefix(style) { // const style = {} if (style.hasOwnProperty('animation')) { assign(style, { WebkitAnimation: style.animation }); } if (style.hasOwnProperty('transform')) { assign(style, { WebkitTransform: style.transform }); } if (style.hasOwnProperty('userSelect')) { assign(style, { WebkitUserSelect: style.userSelect, MozUserSelect: style.userSelect, msUserSelect: style.userSelect }); } if (style.hasOwnProperty('transition')) { assign(style, { WebkitTransition: style.transition, MozTransition: style.transition, msTransition: style.transition }); } if (style.hasOwnProperty('boxShadow')) { assign(style, { WebkitBoxShadow: style.boxShadow, MozBoxShadow: style.boxShadow, msBoxSelect: style.boxShadow }); } if (style.hasOwnProperty('fontSmoothing')) { assign(style, { WebkitFontSmoothing: style.fontSmoothing, MozOsxFontSmoothing: style.fontSmoothing === 'antialiased' ? 'grayscale' : undefined }); } if (style.hasOwnProperty('flexDirection')) { assign(style, { WebkitFlexDirection: style.flexDirection }); } if (style.hasOwnProperty('flexWrap')) { assign(style, { WebkitFlexWrap: style.flexWrap }); } if (style.hasOwnProperty('alignItems')) { assign(style, { WebkitAlignItems: style.alignItems }); } if (style.hasOwnProperty('flexGrow')) { assign(style, { WebkitFlexGrow: style.flexGrow }); } if (style.hasOwnProperty('flexShrink')) { assign(style, { WebkitFlexShrink: style.flexShrink }); } if (style.hasOwnProperty('order')) { assign(style, { WebkitOrder: style.order }); } if (style.hasOwnProperty('justifyContent')) { assign(style, { WebkitJustifyContent: style.justifyContent }); } if (style.hasOwnProperty('flex')) { assign(style, { WebkitFlex: style.flex }); } if (style.display === 'flex') { style.display = style.display + ';display:-webkit-flex;display:-ms-flexbox'; } return style; } },{}],3:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = doHash; // murmurhash2 via https://gist.github.com/raycmorgan/588423 function doHash(str, seed) { var m = 0x5bd1e995; var r = 24; var h = seed ^ str.length; var length = str.length; var currentIndex = 0; while (length >= 4) { var k = UInt32(str, currentIndex); k = Umul32(k, m); k ^= k >>> r; k = Umul32(k, m); h = Umul32(h, m); h ^= k; currentIndex += 4; length -= 4; } switch (length) { case 3: h ^= UInt16(str, currentIndex); h ^= str.charCodeAt(currentIndex + 2) << 16; h = Umul32(h, m); break; case 2: h ^= UInt16(str, currentIndex); h = Umul32(h, m); break; case 1: h ^= str.charCodeAt(currentIndex); h = Umul32(h, m); break; } h ^= h >>> 13; h = Umul32(h, m); h ^= h >>> 15; return h >>> 0; } function UInt32(str, pos) { return str.charCodeAt(pos++) + (str.charCodeAt(pos++) << 8) + (str.charCodeAt(pos++) << 16) + (str.charCodeAt(pos) << 24); } function UInt16(str, pos) { return str.charCodeAt(pos++) + (str.charCodeAt(pos++) << 8); } function Umul32(n, m) { n = n | 0; m = m | 0; var nlo = n & 0xffff; var nhi = n >>> 16; var res = nlo * m + ((nhi * m & 0xffff) << 16) | 0; return res; } },{}],4:[function(require,module,exports){ 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.multi = exports.placeholder = exports.backdrop = exports.selection = exports.firstLine = exports.firstLetter = exports.before = exports.after = exports.nthOfType = exports.nthLastOfType = exports.nthLastChild = exports.nthChild = exports.not = exports.lang = exports.dir = exports.visited = exports.valid = exports.target = exports.scope = exports.root = exports.right = exports.required = exports.readWrite = exports.readOnly = exports.outOfRange = exports.optional = exports.onlyOfType = exports.onlyChild = exports.link = exports.left = exports.lastOfType = exports.lastChild = exports.invalid = exports.inRange = exports.indeterminate = exports.hover = exports.focus = exports.fullscreen = exports.firstOfType = exports.firstChild = exports.first = exports._default = exports.enabled = exports.empty = exports.disabled = exports.checked = exports.any = exports.active = undefined; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; exports.simulations = simulations; exports.simulate = simulate; exports.cssLabels = cssLabels; exports.speedy = speedy; exports.appendSheetRule = appendSheetRule; exports.flush = flush; exports.remove = remove; exports.idFor = idFor; exports.add = add; exports.style = style; exports.select = select; exports.keyed = keyed; exports.merge = merge; exports.media = media; exports.trackMediaQueryLabels = trackMediaQueryLabels; exports.fontFace = fontFace; exports.keyframes = keyframes; exports.cssFor = cssFor; exports.attribsFor = attribsFor; exports.renderStatic = renderStatic; exports.renderStaticOptimized = renderStaticOptimized; exports.rehydrate = rehydrate; var _hash = require('./hash'); var _hash2 = _interopRequireDefault(_hash); var _autoprefix = require('./autoprefix'); var _autoprefix2 = _interopRequireDefault(_autoprefix); var _CSSPropertyOperations = require('./CSSPropertyOperations'); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } // first we import some helpers // hashes a string to something 'unique' // yurgh must get back to this // import prefixAll from 'inline-style-prefixer/static' // adds vendor prefixes to styles // import Prefix from 'inline-style-prefixer' // let prefixer = new Prefix({ userAgent: navigator.userAgent }) // we've used browserify to extract react's CSSPropertyOperations module and it's deps into ./CSSPropertyOperations // converts a js style object to css markup // todo - rewrite this yourself, save a kb or two // define some constants var isBrowser = typeof document !== 'undefined'; var isDev = function (x) { return x === 'development' || !x; }("production"); var isTest = "production" === 'test'; // a useful utility for quickly tapping objects. use with the :: operator // {x: 1}::log() // [5, 12, 90]::log().filter(x => x%5)::log() function log(msg) { //eslint-disable-line no-unused-vars console.log(msg || this); //eslint-disable-line no-console return this; } // takes a string, converts to lowercase, strips out nonalphanumeric. function simple(str) { return str.toLowerCase().replace(/[^a-z0-9]/g, ''); } /**** simulations ****/ // a flag to enable simulation meta tags on dom nodes // defaults to true in dev mode. recommend *not* to // toggle often. var canSimulate = isDev; // we use these flags for issuing warnings when simulate is called // in prod / in incorrect order var warned1 = false, warned2 = false; // toggles simulation activity. shouldn't be needed in most cases function simulations() { var bool = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0]; canSimulate = !!bool; } // use this on dom nodes to 'simulate' pseudoclasses // <div {...hover({ color: 'red' })} {...simulate('hover', 'visited')}>...</div> // you can even send in some weird ones, as long as it's in simple format // and matches an existing rule on the element // eg simulate('nthChild2', ':hover:active') etc function simulate() { if (!canSimulate) { if (!warned1) { console.warn('can\'t simulate without once calling simulations(true)'); //eslint-disable-line no-console warned1 = true; } if (!isDev && !isTest && !warned2) { console.warn('don\'t use simulation outside dev'); //eslint-disable-line no-console warned2 = true; } return {}; } for (var _len = arguments.length, pseudos = Array(_len), _key = 0; _key < _len; _key++) { pseudos[_key] = arguments[_key]; } return pseudos.reduce(function (o, p) { return o['data-simulate-' + simple(p)] = '', o; }, {}); } /**** labels ****/ // toggle for debug labels. // shouldn't *have* to mess with this manually var hasLabels = false; // isDev function cssLabels(bool) { hasLabels = !!bool; } /**** stylesheet ****/ // these here are our main 'mutable' references var cache = {}, // stores all the registered styles. most important, for such a small name. styleTag = void 0, // reference to the <style> tag, if in browser styleSheet = void 0, // reference to the styleSheet object, either native on browser / polyfilled on server keyIndices = {}; // avoid scanning when inserting rules function injectStyleSheet() { if (isBrowser) { // this section is just weird alchemy I found online off many sources // it checks to see if the tag exists; creates an empty one if not styleTag = document.getElementById('_css_'); if (!styleTag) { styleTag = document.createElement('style'); styleTag.id = styleTag.id || '_css_'; styleTag.appendChild(document.createTextNode('')); (document.head || document.getElementsByTagName('head')[0]).appendChild(styleTag); } // this weirdness brought to you by firefox styleSheet = [].concat(_toConsumableArray(document.styleSheets)).filter(function (x) { return x.ownerNode === styleTag; })[0]; } else { // server side 'polyfill'. just enough behavior to be useful. styleSheet = { cssRules: [], deleteRule: function deleteRule(index) { styleSheet.cssRules = [].concat(_toConsumableArray(styleSheet.cssRules.slice(0, index)), _toConsumableArray(styleSheet.cssRules.slice(index + 1))); }, insertRule: function insertRule(rule, index) { // enough 'spec compliance' to be able to extract the rules later // in other words, just the cssText field styleSheet.cssRules = [].concat(_toConsumableArray(styleSheet.cssRules.slice(0, index)), [{ cssText: rule }], _toConsumableArray(styleSheet.cssRules.slice(index))); } }; } } /**************** LIFTOFF IN 3... 2... 1... ****************/ injectStyleSheet(); /**************** TO THE MOOOOOOON ****************/ // a flag to use stylesheet.insertrule // the big drawback here is that the css won't be editable in devtools var isSpeedy = !isDev && !isTest; // only in prod mode does it make 'sense' function speedy() { var bool = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0]; // we don't let you change isSpeedy if you've already made a modification to the stylesheet if (bool !== isSpeedy && Object.keys(cache).length !== 0) { console.error('cannot change speedy setting after appending styles in a different mode'); //eslint-disable-line no-console return; } isSpeedy = !!bool; } function inlineInsertRule(rule) { var index = arguments.length <= 1 || arguments[1] === undefined ? styleSheet.cssRules.length : arguments[1]; // this weirdness for perf, and chrome's weird bug // https://stackoverflow.com/questions/20007992/chrome-suddenly-stopped-accepting-insertrule try { styleSheet.insertRule(rule, index); } catch (e) { if (isDev) { // might need beter dx for this console.warn('whoops, illegal rule inserted', rule); //eslint-disable-line no-console } } } // adds a css rule to the sheet. only used 'internally'. function appendSheetRule(rule, index) { // todo - tests // more browser weirdness. I don't even know if (styleTag && styleTag.styleSheet) { styleTag.styleSheet.cssText += rule; } else { if (isBrowser) { if (isSpeedy && styleSheet.insertRule) { inlineInsertRule(rule, index); } else { styleTag.appendChild(document.createTextNode(rule)); // todo - more efficent here please if (!isSpeedy) { // sighhh styleSheet = [].concat(_toConsumableArray(document.styleSheets)).filter(function (x) { return x.ownerNode === styleTag; })[0]; } } } else { // server side is pretty simple styleSheet.insertRule(rule, styleSheet.cssRules.length); } } } // clears out the cache and empties the stylesheet // best for tests, though there might be some value for SSR. function flush() { // todo - tests cache = {}; // todo backward compat (styleTag.styleSheet.cssText?) if (isBrowser) { styleTag && styleTag.parentNode.removeChild(styleTag); styleTag = null; // todo - look for remnants in document.styleSheets injectStyleSheet(); } else { // simpler on server styleSheet.cssRules = []; } } function remove() { // todo // remove rule throw new Error('this is not tested or anything yet! beware!'); //eslint-disable-line no-console // let id = o[Object.keys(o)[0]] // let i = sheet.rules.indexOf(x => x.selectorText === selector(id, cache[id].type)) // sheet.deleteRule(i) // delete cache[id] } // now, some functions to help deal with styles / rules // generates a hash for (type, style) function styleHash(type, style) { // todo - default type = '_'. this changes all the hashes and will break tests, so do later // make sure type exists // make sure obj is style-like? return (0, _hash2.default)(type + Object.keys(style).reduce(function (str, k) { return str + k + style[k]; }, '')).toString(36); } // helper to hack around isp's array format function prefixes(style) { return (0, _autoprefix2.default)(style); } // generates a css selector for (id, type) function selector(id, type) { // id should exist var isFullSelector = type && type[0] === '$'; var cssType = type === '_' ? '' : type[0] === '$' ? type.slice(1) : ':' + type; var suffix = void 0; if (isFullSelector) { suffix = cssType.split(',').map(function (x) { return '[data-css-' + id + ']' + x; }).join(','); } else { suffix = '[data-css-' + id + ']' + cssType; } if (canSimulate && type !== '_' && !isFullSelector && cssType[0] === ':') { // todo - work with pseudo selector on full selector at least suffix += ', [data-css-' + id + '][data-simulate-' + simple(type) + ']'; } return suffix; } // ... which is them used to generate css rules function cssrule(id, type, style) { return selector(id, type) + '{ ' + (0, _CSSPropertyOperations.createMarkupForStyles)(prefixes(style)) + ' } '; } // given a rule {data-css-id: ''}, checks if it's a valid, registered id // returns the id function idFor(rule) { // todo - weak map hash for this? if (Object.keys(rule).length !== 1) throw new Error('not a rule'); var regex = /data\-css\-([a-zA-Z0-9]+)/; var match = regex.exec(Object.keys(rule)[0]); if (!match) throw new Error('not a rule'); return match[1]; } // checks if a rule is registered function isRule(rule) { try { var id = idFor(rule); return id && cache[id]; } catch (e) { return false; } } // a generic rule creator/insertor function add() { var type = arguments.length <= 0 || arguments[0] === undefined ? '_' : arguments[0]; var style = arguments[1]; var key = arguments[2]; var id = key || styleHash(type, style), // generate a hash based on type/style, use this to 'id' the rule everywhere label = '', keyIndex = -1; if (!cache[id] || key) { if (key) { // if the key already exists, delete it keyIndex = keyIndices[key]; if (keyIndex >= 0) { //remove rule if (isSpeedy || !isBrowser) { styleSheet.deleteRule(keyIndex); } else { styleTag.removeChild(styleTag.childNodes[keyIndex + 1]); // the +1 to account for the blank node we added // reassign stylesheet, because firefox is weird styleSheet = [].concat(_toConsumableArray(document.styleSheets)).filter(function (x) { return x.ownerNode === styleTag; })[0]; } } } // add rule to sheet, update cache. easy! if (key) { appendSheetRule(cssrule(id, type, style), keyIndex); keyIndices[key] = keyIndex || styleSheet.cssRules.length - 1; } else { appendSheetRule(cssrule(id, type, style)); } cache[id] = { type: type, style: style, id: id }; } if (hasLabels) { // adds a debug label label = style.label || (type !== '_' ? ':' + type : ''); } return _defineProperty({}, 'data-css-' + id, label); } // with those in place, we can now define user-friendly functions for // defining styles on nodes // first up, what will probably be most commonly used. // defines some css 'directly' on the node it's applied on function style(obj) { return add(undefined, obj); } // alllllll the pseudoclasses // todo - autogenerate this by scraping MDN var active = exports.active = function active(x) { return add('active', x); }; var any = exports.any = function any(x) { return add('any', x); }; var checked = exports.checked = function checked(x) { return add('checked', x); }; var disabled = exports.disabled = function disabled(x) { return add('disabled', x); }; var empty = exports.empty = function empty(x) { return add('empty', x); }; var enabled = exports.enabled = function enabled(x) { return add('enabled', x); }; var _default = exports._default = function _default(x) { return add('default', x); }; // note '_default' name var first = exports.first = function first(x) { return add('first', x); }; var firstChild = exports.firstChild = function firstChild(x) { return add('first-child', x); }; var firstOfType = exports.firstOfType = function firstOfType(x) { return add('first-of-type', x); }; var fullscreen = exports.fullscreen = function fullscreen(x) { return add('fullscreen', x); }; var focus = exports.focus = function focus(x) { return add('focus', x); }; var hover = exports.hover = function hover(x) { return add('hover', x); }; var indeterminate = exports.indeterminate = function indeterminate(x) { return add('indeterminate', x); }; var inRange = exports.inRange = function inRange(x) { return add('in-range', x); }; var invalid = exports.invalid = function invalid(x) { return add('invalid', x); }; var lastChild = exports.lastChild = function lastChild(x) { return add('last-child', x); }; var lastOfType = exports.lastOfType = function lastOfType(x) { return add('last-of-type', x); }; var left = exports.left = function left(x) { return add('left', x); }; var link = exports.link = function link(x) { return add('link', x); }; var onlyChild = exports.onlyChild = function onlyChild(x) { return add('only-child', x); }; var onlyOfType = exports.onlyOfType = function onlyOfType(x) { return add('only-of-type', x); }; var optional = exports.optional = function optional(x) { return add('optional', x); }; var outOfRange = exports.outOfRange = function outOfRange(x) { return add('out-of-range', x); }; var readOnly = exports.readOnly = function readOnly(x) { return add('read-only', x); }; var readWrite = exports.readWrite = function readWrite(x) { return add('read-write', x); }; var required = exports.required = function required(x) { return add('required', x); }; var right = exports.right = function right(x) { return add('right', x); }; var root = exports.root = function root(x) { return add('root', x); }; var scope = exports.scope = function scope(x) { return add('scope', x); }; var target = exports.target = function target(x) { return add('target', x); }; var valid = exports.valid = function valid(x) { return add('valid', x); }; var visited = exports.visited = function visited(x) { return add('visited', x); }; // parameterized pseudoclasses var dir = exports.dir = function dir(p, x) { return add('dir(' + p + ')', x); }; var lang = exports.lang = function lang(p, x) { return add('lang(' + p + ')', x); }; var not = exports.not = function not(p, x) { return add('not(' + p + ')', x); }; var nthChild = exports.nthChild = function nthChild(p, x) { return add('nth-child(' + p + ')', x); }; var nthLastChild = exports.nthLastChild = function nthLastChild(p, x) { return add('nth-last-child(' + p + ')', x); }; var nthLastOfType = exports.nthLastOfType = function nthLastOfType(p, x) { return add('nth-last-of-type(' + p + ')', x); }; var nthOfType = exports.nthOfType = function nthOfType(p, x) { return add('nth-of-type(' + p + ')', x); }; // pseudoelements var after = exports.after = function after(x) { return add(':after', x); }; var before = exports.before = function before(x) { return add(':before', x); }; var firstLetter = exports.firstLetter = function firstLetter(x) { return add(':first-letter', x); }; var firstLine = exports.firstLine = function firstLine(x) { return add(':first-line', x); }; var selection = exports.selection = function selection(x) { return add(':selection', x); }; var backdrop = exports.backdrop = function backdrop(x) { return add(':backdrop', x); }; var placeholder = exports.placeholder = function placeholder(x) { return add(':placeholder', x); }; // when you need multiple pseudoclasses in a single selector // eg x:hover:visited for when hovering over visited elements var multi = exports.multi = add; // unique feature // when you need to define 'real' css (whatever that may be) // https://twitter.com/threepointone/status/756585907877273600 // https://twitter.com/threepointone/status/756986938033254400 function select(selector, style) { return add('$' + selector, style); // signalling ahead that this is a plain selector } // unique feature // use for advanced perf/animations/whatnot // instead of overwriting, it replaces the rule in the stylesheet function keyed(key, type, style) { // todo - accept a style/rule? unlcear. if (typeof key !== 'string') { throw new Error('whoops, did you forget a key?'); } if (!style && (typeof type === 'undefined' ? 'undefined' : _typeof(type)) === 'object') { style = type; type = undefined; } // should be able to pass a merged rule etc too // maybe ...styles as well? return add(type, style, key); } // we define a function to 'merge' styles together. // backstory - because of a browser quirk, multiple styles are applied in the order they're // defined the stylesheet, not in the order of application // in most cases, thsi won't case an issue UNTIL IT DOES // instead, use merge() to merge styles, // with latter styles gaining precedence over former ones function merge() { var labels = [], mergeLabel = void 0, styleBag = {}, mediaBag = {}; for (var _len2 = arguments.length, rules = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { rules[_key2] = arguments[_key2]; } rules.forEach(function (rule, i) { // optionally send a string as first argumnet to 'label' this merged rule if (i === 0 && typeof rule === 'string') { mergeLabel = rule; // bail early return; } if (isRule(rule)) { // it's a rule! var _id = idFor(rule); if (cache[_id].bag) { var _ret = function () { // merged rule var _cache$_id = cache[_id]; var bag = _cache$_id.bag; var label = _cache$_id.label; var media = _cache$_id.media; Object.keys(bag).forEach(function (type) { styleBag[type] = _extends({}, styleBag[type] || {}, bag[type]); }); // if there's a media bag, merge those in if (media) { Object.keys(media).forEach(function (expr) { mediaBag[expr] = mediaBag[expr] || {}; Object.keys(media[expr]).forEach(function (type) { // mediaBag[expr][type] = mediaBag[expr][type] || {} mediaBag[expr][type] = _extends({}, mediaBag[expr][type] || {}, media[expr][type]); }); }); } hasLabels && labels.push('[' + label + ']'); return { v: void 0 }; // that was fairly straightforward }(); if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; } if (cache[_id].expr) { var _ret2 = function () { // media rule var _cache$_id2 = cache[_id]; var expr = _cache$_id2.expr; var label = _cache$_id2.label; var rule = _cache$_id2.rule; var style = _cache$_id2.style; mediaBag[expr] = mediaBag[expr] || {}; if (rule) { var iid = idFor(rule); if (cache[iid].bag) { (function () { // if merged rule, merge it's bag into stylebag // we won't expect a mediabag in this merged rule, because it would have thrown in media (phew) var bag = cache[iid].bag; Object.keys(bag).forEach(function (type) { mediaBag[expr][type] = _extends({}, mediaBag[expr][type] || {}, bag[type]); }); })(); } else { var _cache$iid = cache[iid]; var type = _cache$iid.type; var _style = _cache$iid.style; mediaBag[expr][type] = _extends({}, mediaBag[expr][type] || {}, _style); } } else { mediaBag[expr]._ = _extends({}, mediaBag[expr]._ || {}, style); } // mediaBag[expr].push(rule) hasLabels && labels.push(label); return { v: void 0 }; // throw new Error('cannot merge a media rule') }(); if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === "object") return _ret2.v; } else { // simple rule var _cache$_id3 = cache[_id]; var type = _cache$_id3.type; var _style2 = _cache$_id3.style; styleBag[type] = _extends({}, styleBag[type] || {}, _style2); hasLabels && labels.push((_style2.label || '`' + _id) + ('' + (type !== '_' ? ':' + type : ''))); // todo - match 'add()'s original label return; // not too bad } } else { // plain style styleBag._ = _extends({}, styleBag._ || {}, rule); hasLabels && labels.push('{…}'); } }); // todo - remove label from merged styles? unclear. var id = (0, _hash2.default)(mergeLabel + JSON.stringify(mediaBag) + JSON.stringify(styleBag)).toString(36); // todo - predictable order // make a merged label var label = hasLabels ? '' + (mergeLabel ? mergeLabel + '= ' : '') + (labels.length ? labels.join(' + ') : '') : ''; // yuck if (!cache[id]) { cache[id] = _extends({ bag: styleBag, id: id, label: label }, Object.keys(mediaBag).length > 0 ? { media: mediaBag } : {}); Object.keys(styleBag).forEach(function (type) { appendSheetRule(cssrule(id, type, styleBag[type])); }); Object.keys(mediaBag).forEach(function (expr) { var css = Object.keys(mediaBag[expr]).map(function (type) { return cssrule(id, type, mediaBag[expr][type]); }).join('\n'); appendSheetRule('@media ' + expr + ' { ' + css + ' }'); }); } return _defineProperty({}, 'data-css-' + id, label); } // this one's for media queries // they cannot be merged with other queries // todo - we should test whether the query is valid and give dev feedback function media(expr) { for (var _len3 = arguments.length, rules = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { rules[_key3 - 1] = arguments[_key3]; } if (rules.length > 1) { return media(expr, merge.apply(undefined, rules)); } // todo - iterate yourself instead var rule = rules[0]; // test if valid media query if (isRule(rule)) { var id = idFor(rule); if (cache[id].bag) { var _ret4 = function () { // merged rule // todo - test if any media rules in this merged rule, throw if so if (cache[id].media) { throw new Error('cannot apply a media rule onto another'); } var bag = cache[id].bag; var newId = (0, _hash2.default)(expr + id).toString(36); var label = hasLabels ? '*mq [' + cache[id].label + ']' : ''; if (!cache[newId]) { var cssRules = Object.keys(bag).map(function (type) { return cssrule(newId, type, bag[type]); }); appendSheetRule('@media ' + expr + ' { ' + cssRules.join('\n') + ' }'); cache[newId] = { expr: expr, rule: rule, id: newId, label: label }; } return { v: _defineProperty({}, 'data-css-' + newId, label) }; // easy }(); if ((typeof _ret4 === 'undefined' ? 'undefined' : _typeof(_ret4)) === "object") return _ret4.v; } else if (cache[id].expr) { // media rule throw new Error('cannot apply a media rule onto another'); } else { // simple rule var _newId = (0, _hash2.default)(expr + id).toString(36); var _label = hasLabels ? '*mq ' + (cache[id].style.label || '`' + id) : ''; if (!cache[_newId]) { appendSheetRule('@media ' + expr + ' { ' + cssrule(_newId, cache[id].type, cache[id].style) + ' }'); cache[_newId] = { expr: expr, rule: rule, id: _newId, label: _label }; } return _defineProperty({}, 'data-css-' + _newId, _label); // easier } } else { // a plain style var _style3 = rule; var _newId2 = styleHash(expr, _style3); var _label2 = hasLabels ? '*mq ' + (_style3.label || '') : ''; if (!cache[_newId2]) { appendSheetRule('@media ' + expr + ' { ' + cssrule(_newId2, '_', _style3) + ' }'); cache[_newId2] = { expr: expr, style: _style3, id: _newId2, label: _label2 }; } return _defineProperty({}, 'data-css-' + _newId2, _label2); } } /**** live media query labels ****/ // simplest implementation - // cycle through the cache, and for every media query // find matching elements and update the label function updateMediaQueryLabels() { Object.keys(cache).forEach(function (id) { var expr = cache[id].expr; if (expr && hasLabels && window.matchMedia) { (function () { var els = document.querySelectorAll('[data-css-' + id + ']'); var match = window.matchMedia(expr).matches ? '✓' : '✕'; var regex = /^(✓|✕|\*)mq/; [].concat(_toConsumableArray(els)).forEach(function (el) { return el.setAttribute('data-css-' + id, el.getAttribute('data-css-' + id).replace(regex, match + 'mq')); }); })(); } }); } // saves a reference to the loop we trigger var interval = void 0; function trackMediaQueryLabels() { var bool = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0]; var period = arguments.length <= 1 || arguments[1] === undefined ? 2000 : arguments[1]; if (bool) { if (interval) { console.warn('already tracking labels, call trackMediaQueryLabels(false) to stop'); // eslint-disable-line no-console return; } interval = setInterval(function () { return updateMediaQueryLabels(); }, period); } else { clearInterval(interval); interval = null; } } // in dev mode, start this up immediately if (isDev && isBrowser) { trackMediaQueryLabels(true); // todo - make sure hot loading isn't broken // todo - clearInterval on browser close } // we don't go all out for fonts as much, giving a simple font loading strategy // use a fancier lib if you need moar power function fontFace(font) { var id = (0, _hash2.default)(JSON.stringify(font)).toString(36); if (!cache[id]) { cache[id] = { id: id, family: font.fontFamily, font: font }; // todo - crossbrowser appendSheetRule('@font-face { ' + (0, _CSSPropertyOperations.createMarkupForStyles)(font) + '}'); } return font.fontFamily; } // we can add keyframes in a similar manner, but still generating a unique name // for including in styles. this gives us modularity, but still a natural api function keyframes(name, kfs) { if (typeof name !== 'string') { kfs = name; name = 'animate'; } var id = (0, _hash2.default)(name + JSON.stringify(kfs)).toString(36); if (!cache[id]) { (function () { cache[id] = { id: id, name: name, kfs: kfs }; var inner = Object.keys(kfs).map(function (kf) { return kf + ' { ' + (0, _CSSPropertyOperations.createMarkupForStyles)(prefixes(kfs[kf])) + '}'; }).join('\n'); ['-webkit-', '-moz-', '-o-', ''].forEach(function (prefix) { return appendSheetRule('@' + prefix + 'keyframes ' + (name + '_' + id) + ' { ' + inner + '}'); }); })(); } return name + '_' + id; } /*** helpers for web components ***/ // https://github.com/threepointone/glamor/issues/16 function cssFor() { for (var _len4 = arguments.length, rules = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { rules[_key4] = arguments[_key4]; } var ids = rules.reduce(function (o, r) { return o[idFor(r)] = true, o; }, {}); var css = [].concat(_toConsumableArray(styleSheet.cssRules)).map(function (_ref5) { var cssText = _ref5.cssText; var regex = /\[data\-css\-([a-zA-Z0-9]+)\]/gm; var match = regex.exec(cssText); if (match && ids[match[1]]) { return cssText; } }).join('\n'); return css; } function attribsFor() { for (var _len5 = arguments.length, rules = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { rules[_key5] = arguments[_key5]; } var htmlAttributes = rules.map(function (rule) { idFor(rule); // throwaway check for rule var key = Object.keys(rule)[0], value = rule[key]; return key + '="' + (value || '') + '"'; }).join(' '); return htmlAttributes; } /**** serverside stuff ****/ // the api's copied from aphrodite, with 1 key difference // we include *all* the css generated by the app // to optimize to only include generated styles on the pages // use renderStaticOptimized function renderStatic(fn) { var optimized = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; var html = fn(); if (html === undefined) { throw new Error('did you forget to return from renderToString?'); } var rules = [].concat(_toConsumableArray(styleSheet.cssRules)), css = rules.map(function (r) { return r.cssText; }).join('\n'); if (optimized) { var _ret7 = function () { // parse out ids from html // reconstruct css/rules/cache to pass var o = { html: html, cache: {}, css: '' }; var regex = /data\-css\-([a-zA-Z0-9]+)=/gm; var match = void 0, ids = []; while ((match = regex.exec(html)) !== null) { ids.push(match[1]); } ids.forEach(function (id) { o.cache[id] = cache[id]; // todo - add fonts / animations o.css += rules.map(function (x) { return x.cssText; }).filter(function (r) { return new RegExp('\\[data-css-' + id + '\\]').test(r); }).join('\n') + '\n'; }); return { v: o }; }(); if ((typeof _ret7 === 'undefined' ? 'undefined' : _typeof(_ret7)) === "object") return _ret7.v; } return { html: html, cache: cache, css: css }; } function renderStaticOptimized(fn) { return renderStatic(fn, true); } function rehydrate(c) { // load up cache cache = _extends({}, cache, c); // assume css loaded separately } },{"./CSSPropertyOperations":1,"./autoprefix":2,"./hash":3}]},{},[4])(4) });
examples/with-loading/pages/about.js
BlancheXu/test
import React from 'react' const AboutPage = () => <p>This is about Next.js!</p> AboutPage.getInitialProps = async () => { await new Promise(resolve => { setTimeout(resolve, 500) }) return {} } export default AboutPage
packages/starter-scripts/fixtures/kitchensink/src/features/webpack/SvgInCss.js
chungchiehlun/create-starter-app
import React from 'react'; import './assets/svg.css'; export default () => <div id="feature-svg-in-css" />;
docs/src/app/pages/components/Toggle/ExampleToggleLoading.js
GetAmbassador/react-ions
import React from 'react' import Toggle from 'react-ions/lib/components/Toggle' class ExampleToggleLoading extends React.Component { constructor(props) { super(props) } state = { loading: false } handleChange = event => { this.setState({loading: true}) setTimeout(() => { this.setState({loading: false}) }, 2000) } render() { return ( <div> <Toggle label='Click to view the loading state' value={false} loading={this.state.loading} changeCallback={this.handleChange} name='toggle_name' /> </div> ) } } export default ExampleToggleLoading
ajax/libs/x-editable/1.5.0/bootstrap-editable/js/bootstrap-editable.js
steakknife/cdnjs
/*! X-editable - v1.5.0 * In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery * http://github.com/vitalets/x-editable * Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */ /** Form with single input element, two buttons and two states: normal/loading. Applied as jQuery method to DIV tag (not to form tag!). This is because form can be in loading state when spinner shown. Editableform is linked with one of input types, e.g. 'text', 'select' etc. @class editableform @uses text @uses textarea **/ (function ($) { "use strict"; var EditableForm = function (div, options) { this.options = $.extend({}, $.fn.editableform.defaults, options); this.$div = $(div); //div, containing form. Not form tag. Not editable-element. if(!this.options.scope) { this.options.scope = this; } //nothing shown after init }; EditableForm.prototype = { constructor: EditableForm, initInput: function() { //called once //take input from options (as it is created in editable-element) this.input = this.options.input; //set initial value //todo: may be add check: typeof str === 'string' ? this.value = this.input.str2value(this.options.value); //prerender: get input.$input this.input.prerender(); }, initTemplate: function() { this.$form = $($.fn.editableform.template); }, initButtons: function() { var $btn = this.$form.find('.editable-buttons'); $btn.append($.fn.editableform.buttons); if(this.options.showbuttons === 'bottom') { $btn.addClass('editable-buttons-bottom'); } }, /** Renders editableform @method render **/ render: function() { //init loader this.$loading = $($.fn.editableform.loading); this.$div.empty().append(this.$loading); //init form template and buttons this.initTemplate(); if(this.options.showbuttons) { this.initButtons(); } else { this.$form.find('.editable-buttons').remove(); } //show loading state this.showLoading(); //flag showing is form now saving value to server. //It is needed to wait when closing form. this.isSaving = false; /** Fired when rendering starts @event rendering @param {Object} event event object **/ this.$div.triggerHandler('rendering'); //init input this.initInput(); //append input to form this.$form.find('div.editable-input').append(this.input.$tpl); //append form to container this.$div.append(this.$form); //render input $.when(this.input.render()) .then($.proxy(function () { //setup input to submit automatically when no buttons shown if(!this.options.showbuttons) { this.input.autosubmit(); } //attach 'cancel' handler this.$form.find('.editable-cancel').click($.proxy(this.cancel, this)); if(this.input.error) { this.error(this.input.error); this.$form.find('.editable-submit').attr('disabled', true); this.input.$input.attr('disabled', true); //prevent form from submitting this.$form.submit(function(e){ e.preventDefault(); }); } else { this.error(false); this.input.$input.removeAttr('disabled'); this.$form.find('.editable-submit').removeAttr('disabled'); var value = (this.value === null || this.value === undefined || this.value === '') ? this.options.defaultValue : this.value; this.input.value2input(value); //attach submit handler this.$form.submit($.proxy(this.submit, this)); } /** Fired when form is rendered @event rendered @param {Object} event event object **/ this.$div.triggerHandler('rendered'); this.showForm(); //call postrender method to perform actions required visibility of form if(this.input.postrender) { this.input.postrender(); } }, this)); }, cancel: function() { /** Fired when form was cancelled by user @event cancel @param {Object} event event object **/ this.$div.triggerHandler('cancel'); }, showLoading: function() { var w, h; if(this.$form) { //set loading size equal to form w = this.$form.outerWidth(); h = this.$form.outerHeight(); if(w) { this.$loading.width(w); } if(h) { this.$loading.height(h); } this.$form.hide(); } else { //stretch loading to fill container width w = this.$loading.parent().width(); if(w) { this.$loading.width(w); } } this.$loading.show(); }, showForm: function(activate) { this.$loading.hide(); this.$form.show(); if(activate !== false) { this.input.activate(); } /** Fired when form is shown @event show @param {Object} event event object **/ this.$div.triggerHandler('show'); }, error: function(msg) { var $group = this.$form.find('.control-group'), $block = this.$form.find('.editable-error-block'), lines; if(msg === false) { $group.removeClass($.fn.editableform.errorGroupClass); $block.removeClass($.fn.editableform.errorBlockClass).empty().hide(); } else { //convert newline to <br> for more pretty error display if(msg) { lines = msg.split("\n"); for (var i = 0; i < lines.length; i++) { lines[i] = $('<div>').text(lines[i]).html(); } msg = lines.join('<br>'); } $group.addClass($.fn.editableform.errorGroupClass); $block.addClass($.fn.editableform.errorBlockClass).html(msg).show(); } }, submit: function(e) { e.stopPropagation(); e.preventDefault(); var error, newValue = this.input.input2value(); //get new value from input //validation if (error = this.validate(newValue)) { this.error(error); this.showForm(); return; } //if value not changed --> trigger 'nochange' event and return /*jslint eqeq: true*/ if (!this.options.savenochange && this.input.value2str(newValue) == this.input.value2str(this.value)) { /*jslint eqeq: false*/ /** Fired when value not changed but form is submitted. Requires savenochange = false. @event nochange @param {Object} event event object **/ this.$div.triggerHandler('nochange'); return; } //convert value for submitting to server var submitValue = this.input.value2submit(newValue); this.isSaving = true; //sending data to server $.when(this.save(submitValue)) .done($.proxy(function(response) { this.isSaving = false; //run success callback var res = typeof this.options.success === 'function' ? this.options.success.call(this.options.scope, response, newValue) : null; //if success callback returns false --> keep form open and do not activate input if(res === false) { this.error(false); this.showForm(false); return; } //if success callback returns string --> keep form open, show error and activate input if(typeof res === 'string') { this.error(res); this.showForm(); return; } //if success callback returns object like {newValue: <something>} --> use that value instead of submitted //it is usefull if you want to chnage value in url-function if(res && typeof res === 'object' && res.hasOwnProperty('newValue')) { newValue = res.newValue; } //clear error message this.error(false); this.value = newValue; /** Fired when form is submitted @event save @param {Object} event event object @param {Object} params additional params @param {mixed} params.newValue raw new value @param {mixed} params.submitValue submitted value as string @param {Object} params.response ajax response @example $('#form-div').on('save'), function(e, params){ if(params.newValue === 'username') {...} }); **/ this.$div.triggerHandler('save', {newValue: newValue, submitValue: submitValue, response: response}); }, this)) .fail($.proxy(function(xhr) { this.isSaving = false; var msg; if(typeof this.options.error === 'function') { msg = this.options.error.call(this.options.scope, xhr, newValue); } else { msg = typeof xhr === 'string' ? xhr : xhr.responseText || xhr.statusText || 'Unknown error!'; } this.error(msg); this.showForm(); }, this)); }, save: function(submitValue) { //try parse composite pk defined as json string in data-pk this.options.pk = $.fn.editableutils.tryParseJson(this.options.pk, true); var pk = (typeof this.options.pk === 'function') ? this.options.pk.call(this.options.scope) : this.options.pk, /* send on server in following cases: 1. url is function 2. url is string AND (pk defined OR send option = always) */ send = !!(typeof this.options.url === 'function' || (this.options.url && ((this.options.send === 'always') || (this.options.send === 'auto' && pk !== null && pk !== undefined)))), params; if (send) { //send to server this.showLoading(); //standard params params = { name: this.options.name || '', value: submitValue, pk: pk }; //additional params if(typeof this.options.params === 'function') { params = this.options.params.call(this.options.scope, params); } else { //try parse json in single quotes (from data-params attribute) this.options.params = $.fn.editableutils.tryParseJson(this.options.params, true); $.extend(params, this.options.params); } if(typeof this.options.url === 'function') { //user's function return this.options.url.call(this.options.scope, params); } else { //send ajax to server and return deferred object return $.ajax($.extend({ url : this.options.url, data : params, type : 'POST' }, this.options.ajaxOptions)); } } }, validate: function (value) { if (value === undefined) { value = this.value; } if (typeof this.options.validate === 'function') { return this.options.validate.call(this.options.scope, value); } }, option: function(key, value) { if(key in this.options) { this.options[key] = value; } if(key === 'value') { this.setValue(value); } //do not pass option to input as it is passed in editable-element }, setValue: function(value, convertStr) { if(convertStr) { this.value = this.input.str2value(value); } else { this.value = value; } //if form is visible, update input if(this.$form && this.$form.is(':visible')) { this.input.value2input(this.value); } } }; /* Initialize editableform. Applied to jQuery object. @method $().editableform(options) @params {Object} options @example var $form = $('&lt;div&gt;').editableform({ type: 'text', name: 'username', url: '/post', value: 'vitaliy' }); //to display form you should call 'render' method $form.editableform('render'); */ $.fn.editableform = function (option) { var args = arguments; return this.each(function () { var $this = $(this), data = $this.data('editableform'), options = typeof option === 'object' && option; if (!data) { $this.data('editableform', (data = new EditableForm(this, options))); } if (typeof option === 'string') { //call method data[option].apply(data, Array.prototype.slice.call(args, 1)); } }); }; //keep link to constructor to allow inheritance $.fn.editableform.Constructor = EditableForm; //defaults $.fn.editableform.defaults = { /* see also defaults for input */ /** Type of input. Can be <code>text|textarea|select|date|checklist</code> @property type @type string @default 'text' **/ type: 'text', /** Url for submit, e.g. <code>'/post'</code> If function - it will be called instead of ajax. Function should return deferred object to run fail/done callbacks. @property url @type string|function @default null @example url: function(params) { var d = new $.Deferred; if(params.value === 'abc') { return d.reject('error message'); //returning error via deferred object } else { //async saving data in js model someModel.asyncSaveMethod({ ..., success: function(){ d.resolve(); } }); return d.promise(); } } **/ url:null, /** Additional params for submit. If defined as <code>object</code> - it is **appended** to original ajax data (pk, name and value). If defined as <code>function</code> - returned object **overwrites** original ajax data. @example params: function(params) { //originally params contain pk, name and value params.a = 1; return params; } @property params @type object|function @default null **/ params:null, /** Name of field. Will be submitted on server. Can be taken from <code>id</code> attribute @property name @type string @default null **/ name: null, /** Primary key of editable object (e.g. record id in database). For composite keys use object, e.g. <code>{id: 1, lang: 'en'}</code>. Can be calculated dynamically via function. @property pk @type string|object|function @default null **/ pk: null, /** Initial value. If not defined - will be taken from element's content. For __select__ type should be defined (as it is ID of shown text). @property value @type string|object @default null **/ value: null, /** Value that will be displayed in input if original field value is empty (`null|undefined|''`). @property defaultValue @type string|object @default null @since 1.4.6 **/ defaultValue: null, /** Strategy for sending data on server. Can be `auto|always|never`. When 'auto' data will be sent on server **only if pk and url defined**, otherwise new value will be stored locally. @property send @type string @default 'auto' **/ send: 'auto', /** Function for client-side validation. If returns string - means validation not passed and string showed as error. @property validate @type function @default null @example validate: function(value) { if($.trim(value) == '') { return 'This field is required'; } } **/ validate: null, /** Success callback. Called when value successfully sent on server and **response status = 200**. Usefull to work with json response. For example, if your backend response can be <code>{success: true}</code> or <code>{success: false, msg: "server error"}</code> you can check it inside this callback. If it returns **string** - means error occured and string is shown as error message. If it returns **object like** <code>{newValue: &lt;something&gt;}</code> - it overwrites value, submitted by user. Otherwise newValue simply rendered into element. @property success @type function @default null @example success: function(response, newValue) { if(!response.success) return response.msg; } **/ success: null, /** Error callback. Called when request failed (response status != 200). Usefull when you want to parse error response and display a custom message. Must return **string** - the message to be displayed in the error block. @property error @type function @default null @since 1.4.4 @example error: function(response, newValue) { if(response.status === 500) { return 'Service unavailable. Please try later.'; } else { return response.responseText; } } **/ error: null, /** Additional options for submit ajax request. List of values: http://api.jquery.com/jQuery.ajax @property ajaxOptions @type object @default null @since 1.1.1 @example ajaxOptions: { type: 'put', dataType: 'json' } **/ ajaxOptions: null, /** Where to show buttons: left(true)|bottom|false Form without buttons is auto-submitted. @property showbuttons @type boolean|string @default true @since 1.1.1 **/ showbuttons: true, /** Scope for callback methods (success, validate). If <code>null</code> means editableform instance itself. @property scope @type DOMElement|object @default null @since 1.2.0 @private **/ scope: null, /** Whether to save or cancel value when it was not changed but form was submitted @property savenochange @type boolean @default false @since 1.2.0 **/ savenochange: false }; /* Note: following params could redefined in engine: bootstrap or jqueryui: Classes 'control-group' and 'editable-error-block' must always present! */ $.fn.editableform.template = '<form class="form-inline editableform">'+ '<div class="control-group">' + '<div><div class="editable-input"></div><div class="editable-buttons"></div></div>'+ '<div class="editable-error-block"></div>' + '</div>' + '</form>'; //loading div $.fn.editableform.loading = '<div class="editableform-loading"></div>'; //buttons $.fn.editableform.buttons = '<button type="submit" class="editable-submit">ok</button>'+ '<button type="button" class="editable-cancel">cancel</button>'; //error class attached to control-group $.fn.editableform.errorGroupClass = null; //error class attached to editable-error-block $.fn.editableform.errorBlockClass = 'editable-error'; //engine $.fn.editableform.engine = 'jquery'; }(window.jQuery)); /** * EditableForm utilites */ (function ($) { "use strict"; //utils $.fn.editableutils = { /** * classic JS inheritance function */ inherit: function (Child, Parent) { var F = function() { }; F.prototype = Parent.prototype; Child.prototype = new F(); Child.prototype.constructor = Child; Child.superclass = Parent.prototype; }, /** * set caret position in input * see http://stackoverflow.com/questions/499126/jquery-set-cursor-position-in-text-area */ setCursorPosition: function(elem, pos) { if (elem.setSelectionRange) { elem.setSelectionRange(pos, pos); } else if (elem.createTextRange) { var range = elem.createTextRange(); range.collapse(true); range.moveEnd('character', pos); range.moveStart('character', pos); range.select(); } }, /** * function to parse JSON in *single* quotes. (jquery automatically parse only double quotes) * That allows such code as: <a data-source="{'a': 'b', 'c': 'd'}"> * safe = true --> means no exception will be thrown * for details see http://stackoverflow.com/questions/7410348/how-to-set-json-format-to-html5-data-attributes-in-the-jquery */ tryParseJson: function(s, safe) { if (typeof s === 'string' && s.length && s.match(/^[\{\[].*[\}\]]$/)) { if (safe) { try { /*jslint evil: true*/ s = (new Function('return ' + s))(); /*jslint evil: false*/ } catch (e) {} finally { return s; } } else { /*jslint evil: true*/ s = (new Function('return ' + s))(); /*jslint evil: false*/ } } return s; }, /** * slice object by specified keys */ sliceObj: function(obj, keys, caseSensitive /* default: false */) { var key, keyLower, newObj = {}; if (!$.isArray(keys) || !keys.length) { return newObj; } for (var i = 0; i < keys.length; i++) { key = keys[i]; if (obj.hasOwnProperty(key)) { newObj[key] = obj[key]; } if(caseSensitive === true) { continue; } //when getting data-* attributes via $.data() it's converted to lowercase. //details: http://stackoverflow.com/questions/7602565/using-data-attributes-with-jquery //workaround is code below. keyLower = key.toLowerCase(); if (obj.hasOwnProperty(keyLower)) { newObj[key] = obj[keyLower]; } } return newObj; }, /* exclude complex objects from $.data() before pass to config */ getConfigData: function($element) { var data = {}; $.each($element.data(), function(k, v) { if(typeof v !== 'object' || (v && typeof v === 'object' && (v.constructor === Object || v.constructor === Array))) { data[k] = v; } }); return data; }, /* returns keys of object */ objectKeys: function(o) { if (Object.keys) { return Object.keys(o); } else { if (o !== Object(o)) { throw new TypeError('Object.keys called on a non-object'); } var k=[], p; for (p in o) { if (Object.prototype.hasOwnProperty.call(o,p)) { k.push(p); } } return k; } }, /** method to escape html. **/ escape: function(str) { return $('<div>').text(str).html(); }, /* returns array items from sourceData having value property equal or inArray of 'value' */ itemsByValue: function(value, sourceData, valueProp) { if(!sourceData || value === null) { return []; } if (typeof(valueProp) !== "function") { var idKey = valueProp || 'value'; valueProp = function (e) { return e[idKey]; }; } var isValArray = $.isArray(value), result = [], that = this; $.each(sourceData, function(i, o) { if(o.children) { result = result.concat(that.itemsByValue(value, o.children, valueProp)); } else { /*jslint eqeq: true*/ if(isValArray) { if($.grep(value, function(v){ return v == (o && typeof o === 'object' ? valueProp(o) : o); }).length) { result.push(o); } } else { var itemValue = (o && (typeof o === 'object')) ? valueProp(o) : o; if(value == itemValue) { result.push(o); } } /*jslint eqeq: false*/ } }); return result; }, /* Returns input by options: type, mode. */ createInput: function(options) { var TypeConstructor, typeOptions, input, type = options.type; //`date` is some kind of virtual type that is transformed to one of exact types //depending on mode and core lib if(type === 'date') { //inline if(options.mode === 'inline') { if($.fn.editabletypes.datefield) { type = 'datefield'; } else if($.fn.editabletypes.dateuifield) { type = 'dateuifield'; } //popup } else { if($.fn.editabletypes.date) { type = 'date'; } else if($.fn.editabletypes.dateui) { type = 'dateui'; } } //if type still `date` and not exist in types, replace with `combodate` that is base input if(type === 'date' && !$.fn.editabletypes.date) { type = 'combodate'; } } //`datetime` should be datetimefield in 'inline' mode if(type === 'datetime' && options.mode === 'inline') { type = 'datetimefield'; } //change wysihtml5 to textarea for jquery UI and plain versions if(type === 'wysihtml5' && !$.fn.editabletypes[type]) { type = 'textarea'; } //create input of specified type. Input will be used for converting value, not in form if(typeof $.fn.editabletypes[type] === 'function') { TypeConstructor = $.fn.editabletypes[type]; typeOptions = this.sliceObj(options, this.objectKeys(TypeConstructor.defaults)); input = new TypeConstructor(typeOptions); return input; } else { $.error('Unknown type: '+ type); return false; } }, //see http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr supportsTransitions: function () { var b = document.body || document.documentElement, s = b.style, p = 'transition', v = ['Moz', 'Webkit', 'Khtml', 'O', 'ms']; if(typeof s[p] === 'string') { return true; } // Tests for vendor specific prop p = p.charAt(0).toUpperCase() + p.substr(1); for(var i=0; i<v.length; i++) { if(typeof s[v[i] + p] === 'string') { return true; } } return false; } }; }(window.jQuery)); /** Attaches stand-alone container with editable-form to HTML element. Element is used only for positioning, value is not stored anywhere.<br> This method applied internally in <code>$().editable()</code>. You should subscribe on it's events (save / cancel) to get profit of it.<br> Final realization can be different: bootstrap-popover, jqueryui-tooltip, poshytip, inline-div. It depends on which js file you include.<br> Applied as jQuery method. @class editableContainer @uses editableform **/ (function ($) { "use strict"; var Popup = function (element, options) { this.init(element, options); }; var Inline = function (element, options) { this.init(element, options); }; //methods Popup.prototype = { containerName: null, //method to call container on element containerDataName: null, //object name in element's .data() innerCss: null, //tbd in child class containerClass: 'editable-container editable-popup', //css class applied to container element defaults: {}, //container itself defaults init: function(element, options) { this.$element = $(element); //since 1.4.1 container do not use data-* directly as they already merged into options. this.options = $.extend({}, $.fn.editableContainer.defaults, options); this.splitOptions(); //set scope of form callbacks to element this.formOptions.scope = this.$element[0]; this.initContainer(); //flag to hide container, when saving value will finish this.delayedHide = false; //bind 'destroyed' listener to destroy container when element is removed from dom this.$element.on('destroyed', $.proxy(function(){ this.destroy(); }, this)); //attach document handler to close containers on click / escape if(!$(document).data('editable-handlers-attached')) { //close all on escape $(document).on('keyup.editable', function (e) { if (e.which === 27) { $('.editable-open').editableContainer('hide'); //todo: return focus on element } }); //close containers when click outside //(mousedown could be better than click, it closes everything also on drag drop) $(document).on('click.editable', function(e) { var $target = $(e.target), i, exclude_classes = ['.editable-container', '.ui-datepicker-header', '.datepicker', //in inline mode datepicker is rendered into body '.modal-backdrop', '.bootstrap-wysihtml5-insert-image-modal', '.bootstrap-wysihtml5-insert-link-modal' ]; //check if element is detached. It occurs when clicking in bootstrap datepicker if (!$.contains(document.documentElement, e.target)) { return; } //for some reason FF 20 generates extra event (click) in select2 widget with e.target = document //we need to filter it via construction below. See https://github.com/vitalets/x-editable/issues/199 //Possibly related to http://stackoverflow.com/questions/10119793/why-does-firefox-react-differently-from-webkit-and-ie-to-click-event-on-selec if($target.is(document)) { return; } //if click inside one of exclude classes --> no nothing for(i=0; i<exclude_classes.length; i++) { if($target.is(exclude_classes[i]) || $target.parents(exclude_classes[i]).length) { return; } } //close all open containers (except one - target) Popup.prototype.closeOthers(e.target); }); $(document).data('editable-handlers-attached', true); } }, //split options on containerOptions and formOptions splitOptions: function() { this.containerOptions = {}; this.formOptions = {}; if(!$.fn[this.containerName]) { throw new Error(this.containerName + ' not found. Have you included corresponding js file?'); } //keys defined in container defaults go to container, others go to form for(var k in this.options) { if(k in this.defaults) { this.containerOptions[k] = this.options[k]; } else { this.formOptions[k] = this.options[k]; } } }, /* Returns jquery object of container @method tip() */ tip: function() { return this.container() ? this.container().$tip : null; }, /* returns container object */ container: function() { var container; //first, try get it by `containerDataName` if(this.containerDataName) { if(container = this.$element.data(this.containerDataName)) { return container; } } //second, try `containerName` container = this.$element.data(this.containerName); return container; }, /* call native method of underlying container, e.g. this.$element.popover('method') */ call: function() { this.$element[this.containerName].apply(this.$element, arguments); }, initContainer: function(){ this.call(this.containerOptions); }, renderForm: function() { this.$form .editableform(this.formOptions) .on({ save: $.proxy(this.save, this), //click on submit button (value changed) nochange: $.proxy(function(){ this.hide('nochange'); }, this), //click on submit button (value NOT changed) cancel: $.proxy(function(){ this.hide('cancel'); }, this), //click on calcel button show: $.proxy(function() { if(this.delayedHide) { this.hide(this.delayedHide.reason); this.delayedHide = false; } else { this.setPosition(); } }, this), //re-position container every time form is shown (occurs each time after loading state) rendering: $.proxy(this.setPosition, this), //this allows to place container correctly when loading shown resize: $.proxy(this.setPosition, this), //this allows to re-position container when form size is changed rendered: $.proxy(function(){ /** Fired when container is shown and form is rendered (for select will wait for loading dropdown options). **Note:** Bootstrap popover has own `shown` event that now cannot be separated from x-editable's one. The workaround is to check `arguments.length` that is always `2` for x-editable. @event shown @param {Object} event event object @example $('#username').on('shown', function(e, editable) { editable.input.$input.val('overwriting value of input..'); }); **/ /* TODO: added second param mainly to distinguish from bootstrap's shown event. It's a hotfix that will be solved in future versions via namespaced events. */ this.$element.triggerHandler('shown', $(this.options.scope).data('editable')); }, this) }) .editableform('render'); }, /** Shows container with form @method show() @param {boolean} closeAll Whether to close all other editable containers when showing this one. Default true. **/ /* Note: poshytip owerwrites this method totally! */ show: function (closeAll) { this.$element.addClass('editable-open'); if(closeAll !== false) { //close all open containers (except this) this.closeOthers(this.$element[0]); } //show container itself this.innerShow(); this.tip().addClass(this.containerClass); /* Currently, form is re-rendered on every show. The main reason is that we dont know, what will container do with content when closed: remove(), detach() or just hide() - it depends on container. Detaching form itself before hide and re-insert before show is good solution, but visually it looks ugly --> container changes size before hide. */ //if form already exist - delete previous data if(this.$form) { //todo: destroy prev data! //this.$form.destroy(); } this.$form = $('<div>'); //insert form into container body if(this.tip().is(this.innerCss)) { //for inline container this.tip().append(this.$form); } else { this.tip().find(this.innerCss).append(this.$form); } //render form this.renderForm(); }, /** Hides container with form @method hide() @param {string} reason Reason caused hiding. Can be <code>save|cancel|onblur|nochange|undefined (=manual)</code> **/ hide: function(reason) { if(!this.tip() || !this.tip().is(':visible') || !this.$element.hasClass('editable-open')) { return; } //if form is saving value, schedule hide if(this.$form.data('editableform').isSaving) { this.delayedHide = {reason: reason}; return; } else { this.delayedHide = false; } this.$element.removeClass('editable-open'); this.innerHide(); /** Fired when container was hidden. It occurs on both save or cancel. **Note:** Bootstrap popover has own `hidden` event that now cannot be separated from x-editable's one. The workaround is to check `arguments.length` that is always `2` for x-editable. @event hidden @param {object} event event object @param {string} reason Reason caused hiding. Can be <code>save|cancel|onblur|nochange|manual</code> @example $('#username').on('hidden', function(e, reason) { if(reason === 'save' || reason === 'cancel') { //auto-open next editable $(this).closest('tr').next().find('.editable').editable('show'); } }); **/ this.$element.triggerHandler('hidden', reason || 'manual'); }, /* internal show method. To be overwritten in child classes */ innerShow: function () { }, /* internal hide method. To be overwritten in child classes */ innerHide: function () { }, /** Toggles container visibility (show / hide) @method toggle() @param {boolean} closeAll Whether to close all other editable containers when showing this one. Default true. **/ toggle: function(closeAll) { if(this.container() && this.tip() && this.tip().is(':visible')) { this.hide(); } else { this.show(closeAll); } }, /* Updates the position of container when content changed. @method setPosition() */ setPosition: function() { //tbd in child class }, save: function(e, params) { /** Fired when new value was submitted. You can use <code>$(this).data('editableContainer')</code> inside handler to access to editableContainer instance @event save @param {Object} event event object @param {Object} params additional params @param {mixed} params.newValue submitted value @param {Object} params.response ajax response @example $('#username').on('save', function(e, params) { //assuming server response: '{success: true}' var pk = $(this).data('editableContainer').options.pk; if(params.response && params.response.success) { alert('value: ' + params.newValue + ' with pk: ' + pk + ' saved!'); } else { alert('error!'); } }); **/ this.$element.triggerHandler('save', params); //hide must be after trigger, as saving value may require methods of plugin, applied to input this.hide('save'); }, /** Sets new option @method option(key, value) @param {string} key @param {mixed} value **/ option: function(key, value) { this.options[key] = value; if(key in this.containerOptions) { this.containerOptions[key] = value; this.setContainerOption(key, value); } else { this.formOptions[key] = value; if(this.$form) { this.$form.editableform('option', key, value); } } }, setContainerOption: function(key, value) { this.call('option', key, value); }, /** Destroys the container instance @method destroy() **/ destroy: function() { this.hide(); this.innerDestroy(); this.$element.off('destroyed'); this.$element.removeData('editableContainer'); }, /* to be overwritten in child classes */ innerDestroy: function() { }, /* Closes other containers except one related to passed element. Other containers can be cancelled or submitted (depends on onblur option) */ closeOthers: function(element) { $('.editable-open').each(function(i, el){ //do nothing with passed element and it's children if(el === element || $(el).find(element).length) { return; } //otherwise cancel or submit all open containers var $el = $(el), ec = $el.data('editableContainer'); if(!ec) { return; } if(ec.options.onblur === 'cancel') { $el.data('editableContainer').hide('onblur'); } else if(ec.options.onblur === 'submit') { $el.data('editableContainer').tip().find('form').submit(); } }); }, /** Activates input of visible container (e.g. set focus) @method activate() **/ activate: function() { if(this.tip && this.tip().is(':visible') && this.$form) { this.$form.data('editableform').input.activate(); } } }; /** jQuery method to initialize editableContainer. @method $().editableContainer(options) @params {Object} options @example $('#edit').editableContainer({ type: 'text', url: '/post', pk: 1, value: 'hello' }); **/ $.fn.editableContainer = function (option) { var args = arguments; return this.each(function () { var $this = $(this), dataKey = 'editableContainer', data = $this.data(dataKey), options = typeof option === 'object' && option, Constructor = (options.mode === 'inline') ? Inline : Popup; if (!data) { $this.data(dataKey, (data = new Constructor(this, options))); } if (typeof option === 'string') { //call method data[option].apply(data, Array.prototype.slice.call(args, 1)); } }); }; //store constructors $.fn.editableContainer.Popup = Popup; $.fn.editableContainer.Inline = Inline; //defaults $.fn.editableContainer.defaults = { /** Initial value of form input @property value @type mixed @default null @private **/ value: null, /** Placement of container relative to element. Can be <code>top|right|bottom|left</code>. Not used for inline container. @property placement @type string @default 'top' **/ placement: 'top', /** Whether to hide container on save/cancel. @property autohide @type boolean @default true @private **/ autohide: true, /** Action when user clicks outside the container. Can be <code>cancel|submit|ignore</code>. Setting <code>ignore</code> allows to have several containers open. @property onblur @type string @default 'cancel' @since 1.1.1 **/ onblur: 'cancel', /** Animation speed (inline mode only) @property anim @type string @default false **/ anim: false, /** Mode of editable, can be `popup` or `inline` @property mode @type string @default 'popup' @since 1.4.0 **/ mode: 'popup' }; /* * workaround to have 'destroyed' event to destroy popover when element is destroyed * see http://stackoverflow.com/questions/2200494/jquery-trigger-event-when-an-element-is-removed-from-the-dom */ jQuery.event.special.destroyed = { remove: function(o) { if (o.handler) { o.handler(); } } }; }(window.jQuery)); /** * Editable Inline * --------------------- */ (function ($) { "use strict"; //copy prototype from EditableContainer //extend methods $.extend($.fn.editableContainer.Inline.prototype, $.fn.editableContainer.Popup.prototype, { containerName: 'editableform', innerCss: '.editable-inline', containerClass: 'editable-container editable-inline', //css class applied to container element initContainer: function(){ //container is <span> element this.$tip = $('<span></span>'); //convert anim to miliseconds (int) if(!this.options.anim) { this.options.anim = 0; } }, splitOptions: function() { //all options are passed to form this.containerOptions = {}; this.formOptions = this.options; }, tip: function() { return this.$tip; }, innerShow: function () { this.$element.hide(); this.tip().insertAfter(this.$element).show(); }, innerHide: function () { this.$tip.hide(this.options.anim, $.proxy(function() { this.$element.show(); this.innerDestroy(); }, this)); }, innerDestroy: function() { if(this.tip()) { this.tip().empty().remove(); } } }); }(window.jQuery)); /** Makes editable any HTML element on the page. Applied as jQuery method. @class editable @uses editableContainer **/ (function ($) { "use strict"; var Editable = function (element, options) { this.$element = $(element); //data-* has more priority over js options: because dynamically created elements may change data-* this.options = $.extend({}, $.fn.editable.defaults, options, $.fn.editableutils.getConfigData(this.$element)); if(this.options.selector) { this.initLive(); } else { this.init(); } //check for transition support if(this.options.highlight && !$.fn.editableutils.supportsTransitions()) { this.options.highlight = false; } }; Editable.prototype = { constructor: Editable, init: function () { var isValueByText = false, doAutotext, finalize; //name this.options.name = this.options.name || this.$element.attr('id'); //create input of specified type. Input needed already here to convert value for initial display (e.g. show text by id for select) //also we set scope option to have access to element inside input specific callbacks (e. g. source as function) this.options.scope = this.$element[0]; this.input = $.fn.editableutils.createInput(this.options); if(!this.input) { return; } //set value from settings or by element's text if (this.options.value === undefined || this.options.value === null) { this.value = this.input.html2value($.trim(this.$element.html())); isValueByText = true; } else { /* value can be string when received from 'data-value' attribute for complext objects value can be set as json string in data-value attribute, e.g. data-value="{city: 'Moscow', street: 'Lenina'}" */ this.options.value = $.fn.editableutils.tryParseJson(this.options.value, true); if(typeof this.options.value === 'string') { this.value = this.input.str2value(this.options.value); } else { this.value = this.options.value; } } //add 'editable' class to every editable element this.$element.addClass('editable'); //specifically for "textarea" add class .editable-pre-wrapped to keep linebreaks if(this.input.type === 'textarea') { this.$element.addClass('editable-pre-wrapped'); } //attach handler activating editable. In disabled mode it just prevent default action (useful for links) if(this.options.toggle !== 'manual') { this.$element.addClass('editable-click'); this.$element.on(this.options.toggle + '.editable', $.proxy(function(e){ //prevent following link if editable enabled if(!this.options.disabled) { e.preventDefault(); } //stop propagation not required because in document click handler it checks event target //e.stopPropagation(); if(this.options.toggle === 'mouseenter') { //for hover only show container this.show(); } else { //when toggle='click' we should not close all other containers as they will be closed automatically in document click listener var closeAll = (this.options.toggle !== 'click'); this.toggle(closeAll); } }, this)); } else { this.$element.attr('tabindex', -1); //do not stop focus on element when toggled manually } //if display is function it's far more convinient to have autotext = always to render correctly on init //see https://github.com/vitalets/x-editable-yii/issues/34 if(typeof this.options.display === 'function') { this.options.autotext = 'always'; } //check conditions for autotext: switch(this.options.autotext) { case 'always': doAutotext = true; break; case 'auto': //if element text is empty and value is defined and value not generated by text --> run autotext doAutotext = !$.trim(this.$element.text()).length && this.value !== null && this.value !== undefined && !isValueByText; break; default: doAutotext = false; } //depending on autotext run render() or just finilize init $.when(doAutotext ? this.render() : true).then($.proxy(function() { if(this.options.disabled) { this.disable(); } else { this.enable(); } /** Fired when element was initialized by `$().editable()` method. Please note that you should setup `init` handler **before** applying `editable`. @event init @param {Object} event event object @param {Object} editable editable instance (as here it cannot accessed via data('editable')) @since 1.2.0 @example $('#username').on('init', function(e, editable) { alert('initialized ' + editable.options.name); }); $('#username').editable(); **/ this.$element.triggerHandler('init', this); }, this)); }, /* Initializes parent element for live editables */ initLive: function() { //store selector var selector = this.options.selector; //modify options for child elements this.options.selector = false; this.options.autotext = 'never'; //listen toggle events this.$element.on(this.options.toggle + '.editable', selector, $.proxy(function(e){ var $target = $(e.target); if(!$target.data('editable')) { //if delegated element initially empty, we need to clear it's text (that was manually set to `empty` by user) //see https://github.com/vitalets/x-editable/issues/137 if($target.hasClass(this.options.emptyclass)) { $target.empty(); } $target.editable(this.options).trigger(e); } }, this)); }, /* Renders value into element's text. Can call custom display method from options. Can return deferred object. @method render() @param {mixed} response server response (if exist) to pass into display function */ render: function(response) { //do not display anything if(this.options.display === false) { return; } //if input has `value2htmlFinal` method, we pass callback in third param to be called when source is loaded if(this.input.value2htmlFinal) { return this.input.value2html(this.value, this.$element[0], this.options.display, response); //if display method defined --> use it } else if(typeof this.options.display === 'function') { return this.options.display.call(this.$element[0], this.value, response); //else use input's original value2html() method } else { return this.input.value2html(this.value, this.$element[0]); } }, /** Enables editable @method enable() **/ enable: function() { this.options.disabled = false; this.$element.removeClass('editable-disabled'); this.handleEmpty(this.isEmpty); if(this.options.toggle !== 'manual') { if(this.$element.attr('tabindex') === '-1') { this.$element.removeAttr('tabindex'); } } }, /** Disables editable @method disable() **/ disable: function() { this.options.disabled = true; this.hide(); this.$element.addClass('editable-disabled'); this.handleEmpty(this.isEmpty); //do not stop focus on this element this.$element.attr('tabindex', -1); }, /** Toggles enabled / disabled state of editable element @method toggleDisabled() **/ toggleDisabled: function() { if(this.options.disabled) { this.enable(); } else { this.disable(); } }, /** Sets new option @method option(key, value) @param {string|object} key option name or object with several options @param {mixed} value option new value @example $('.editable').editable('option', 'pk', 2); **/ option: function(key, value) { //set option(s) by object if(key && typeof key === 'object') { $.each(key, $.proxy(function(k, v){ this.option($.trim(k), v); }, this)); return; } //set option by string this.options[key] = value; //disabled if(key === 'disabled') { return value ? this.disable() : this.enable(); } //value if(key === 'value') { this.setValue(value); } //transfer new option to container! if(this.container) { this.container.option(key, value); } //pass option to input directly (as it points to the same in form) if(this.input.option) { this.input.option(key, value); } }, /* * set emptytext if element is empty */ handleEmpty: function (isEmpty) { //do not handle empty if we do not display anything if(this.options.display === false) { return; } /* isEmpty may be set directly as param of method. It is required when we enable/disable field and can't rely on content as node content is text: "Empty" that is not empty %) */ if(isEmpty !== undefined) { this.isEmpty = isEmpty; } else { //detect empty //for some inputs we need more smart check //e.g. wysihtml5 may have <br>, <p></p>, <img> if(typeof(this.input.isEmpty) === 'function') { this.isEmpty = this.input.isEmpty(this.$element); } else { this.isEmpty = $.trim(this.$element.html()) === ''; } } //emptytext shown only for enabled if(!this.options.disabled) { if (this.isEmpty) { this.$element.html(this.options.emptytext); if(this.options.emptyclass) { this.$element.addClass(this.options.emptyclass); } } else if(this.options.emptyclass) { this.$element.removeClass(this.options.emptyclass); } } else { //below required if element disable property was changed if(this.isEmpty) { this.$element.empty(); if(this.options.emptyclass) { this.$element.removeClass(this.options.emptyclass); } } } }, /** Shows container with form @method show() @param {boolean} closeAll Whether to close all other editable containers when showing this one. Default true. **/ show: function (closeAll) { if(this.options.disabled) { return; } //init editableContainer: popover, tooltip, inline, etc.. if(!this.container) { var containerOptions = $.extend({}, this.options, { value: this.value, input: this.input //pass input to form (as it is already created) }); this.$element.editableContainer(containerOptions); //listen `save` event this.$element.on("save.internal", $.proxy(this.save, this)); this.container = this.$element.data('editableContainer'); } else if(this.container.tip().is(':visible')) { return; } //show container this.container.show(closeAll); }, /** Hides container with form @method hide() **/ hide: function () { if(this.container) { this.container.hide(); } }, /** Toggles container visibility (show / hide) @method toggle() @param {boolean} closeAll Whether to close all other editable containers when showing this one. Default true. **/ toggle: function(closeAll) { if(this.container && this.container.tip().is(':visible')) { this.hide(); } else { this.show(closeAll); } }, /* * called when form was submitted */ save: function(e, params) { //mark element with unsaved class if needed if(this.options.unsavedclass) { /* Add unsaved css to element if: - url is not user's function - value was not sent to server - params.response === undefined, that means data was not sent - value changed */ var sent = false; sent = sent || typeof this.options.url === 'function'; sent = sent || this.options.display === false; sent = sent || params.response !== undefined; sent = sent || (this.options.savenochange && this.input.value2str(this.value) !== this.input.value2str(params.newValue)); if(sent) { this.$element.removeClass(this.options.unsavedclass); } else { this.$element.addClass(this.options.unsavedclass); } } //highlight when saving if(this.options.highlight) { var $e = this.$element, bgColor = $e.css('background-color'); $e.css('background-color', this.options.highlight); setTimeout(function(){ if(bgColor === 'transparent') { bgColor = ''; } $e.css('background-color', bgColor); $e.addClass('editable-bg-transition'); setTimeout(function(){ $e.removeClass('editable-bg-transition'); }, 1700); }, 10); } //set new value this.setValue(params.newValue, false, params.response); /** Fired when new value was submitted. You can use <code>$(this).data('editable')</code> to access to editable instance @event save @param {Object} event event object @param {Object} params additional params @param {mixed} params.newValue submitted value @param {Object} params.response ajax response @example $('#username').on('save', function(e, params) { alert('Saved value: ' + params.newValue); }); **/ //event itself is triggered by editableContainer. Description here is only for documentation }, validate: function () { if (typeof this.options.validate === 'function') { return this.options.validate.call(this, this.value); } }, /** Sets new value of editable @method setValue(value, convertStr) @param {mixed} value new value @param {boolean} convertStr whether to convert value from string to internal format **/ setValue: function(value, convertStr, response) { if(convertStr) { this.value = this.input.str2value(value); } else { this.value = value; } if(this.container) { this.container.option('value', this.value); } $.when(this.render(response)) .then($.proxy(function() { this.handleEmpty(); }, this)); }, /** Activates input of visible container (e.g. set focus) @method activate() **/ activate: function() { if(this.container) { this.container.activate(); } }, /** Removes editable feature from element @method destroy() **/ destroy: function() { this.disable(); if(this.container) { this.container.destroy(); } this.input.destroy(); if(this.options.toggle !== 'manual') { this.$element.removeClass('editable-click'); this.$element.off(this.options.toggle + '.editable'); } this.$element.off("save.internal"); this.$element.removeClass('editable editable-open editable-disabled'); this.$element.removeData('editable'); } }; /* EDITABLE PLUGIN DEFINITION * ======================= */ /** jQuery method to initialize editable element. @method $().editable(options) @params {Object} options @example $('#username').editable({ type: 'text', url: '/post', pk: 1 }); **/ $.fn.editable = function (option) { //special API methods returning non-jquery object var result = {}, args = arguments, datakey = 'editable'; switch (option) { /** Runs client-side validation for all matched editables @method validate() @returns {Object} validation errors map @example $('#username, #fullname').editable('validate'); // possible result: { username: "username is required", fullname: "fullname should be minimum 3 letters length" } **/ case 'validate': this.each(function () { var $this = $(this), data = $this.data(datakey), error; if (data && (error = data.validate())) { result[data.options.name] = error; } }); return result; /** Returns current values of editable elements. Note that it returns an **object** with name-value pairs, not a value itself. It allows to get data from several elements. If value of some editable is `null` or `undefined` it is excluded from result object. When param `isSingle` is set to **true** - it is supposed you have single element and will return value of editable instead of object. @method getValue() @param {bool} isSingle whether to return just value of single element @returns {Object} object of element names and values @example $('#username, #fullname').editable('getValue'); //result: { username: "superuser", fullname: "John" } //isSingle = true $('#username').editable('getValue', true); //result "superuser" **/ case 'getValue': if(arguments.length === 2 && arguments[1] === true) { //isSingle = true result = this.eq(0).data(datakey).value; } else { this.each(function () { var $this = $(this), data = $this.data(datakey); if (data && data.value !== undefined && data.value !== null) { result[data.options.name] = data.input.value2submit(data.value); } }); } return result; /** This method collects values from several editable elements and submit them all to server. Internally it runs client-side validation for all fields and submits only in case of success. See <a href="#newrecord">creating new records</a> for details. @method submit(options) @param {object} options @param {object} options.url url to submit data @param {object} options.data additional data to submit @param {object} options.ajaxOptions additional ajax options @param {function} options.error(obj) error handler @param {function} options.success(obj,config) success handler @returns {Object} jQuery object **/ case 'submit': //collects value, validate and submit to server for creating new record var config = arguments[1] || {}, $elems = this, errors = this.editable('validate'), values; if($.isEmptyObject(errors)) { values = this.editable('getValue'); if(config.data) { $.extend(values, config.data); } $.ajax($.extend({ url: config.url, data: values, type: 'POST' }, config.ajaxOptions)) .success(function(response) { //successful response 200 OK if(typeof config.success === 'function') { config.success.call($elems, response, config); } }) .error(function(){ //ajax error if(typeof config.error === 'function') { config.error.apply($elems, arguments); } }); } else { //client-side validation error if(typeof config.error === 'function') { config.error.call($elems, errors); } } return this; } //return jquery object return this.each(function () { var $this = $(this), data = $this.data(datakey), options = typeof option === 'object' && option; //for delegated targets do not store `editable` object for element //it's allows several different selectors. //see: https://github.com/vitalets/x-editable/issues/312 if(options && options.selector) { data = new Editable(this, options); return; } if (!data) { $this.data(datakey, (data = new Editable(this, options))); } if (typeof option === 'string') { //call method data[option].apply(data, Array.prototype.slice.call(args, 1)); } }); }; $.fn.editable.defaults = { /** Type of input. Can be <code>text|textarea|select|date|checklist</code> and more @property type @type string @default 'text' **/ type: 'text', /** Sets disabled state of editable @property disabled @type boolean @default false **/ disabled: false, /** How to toggle editable. Can be <code>click|dblclick|mouseenter|manual</code>. When set to <code>manual</code> you should manually call <code>show/hide</code> methods of editable. **Note**: if you call <code>show</code> or <code>toggle</code> inside **click** handler of some DOM element, you need to apply <code>e.stopPropagation()</code> because containers are being closed on any click on document. @example $('#edit-button').click(function(e) { e.stopPropagation(); $('#username').editable('toggle'); }); @property toggle @type string @default 'click' **/ toggle: 'click', /** Text shown when element is empty. @property emptytext @type string @default 'Empty' **/ emptytext: 'Empty', /** Allows to automatically set element's text based on it's value. Can be <code>auto|always|never</code>. Useful for select and date. For example, if dropdown list is <code>{1: 'a', 2: 'b'}</code> and element's value set to <code>1</code>, it's html will be automatically set to <code>'a'</code>. <code>auto</code> - text will be automatically set only if element is empty. <code>always|never</code> - always(never) try to set element's text. @property autotext @type string @default 'auto' **/ autotext: 'auto', /** Initial value of input. If not set, taken from element's text. Note, that if element's text is empty - text is automatically generated from value and can be customized (see `autotext` option). For example, to display currency sign: @example <a id="price" data-type="text" data-value="100"></a> <script> $('#price').editable({ ... display: function(value) { $(this).text(value + '$'); } }) </script> @property value @type mixed @default element's text **/ value: null, /** Callback to perform custom displaying of value in element's text. If `null`, default input's display used. If `false`, no displaying methods will be called, element's text will never change. Runs under element's scope. _**Parameters:**_ * `value` current value to be displayed * `response` server response (if display called after ajax submit), since 1.4.0 For _inputs with source_ (select, checklist) parameters are different: * `value` current value to be displayed * `sourceData` array of items for current input (e.g. dropdown items) * `response` server response (if display called after ajax submit), since 1.4.0 To get currently selected items use `$.fn.editableutils.itemsByValue(value, sourceData)`. @property display @type function|boolean @default null @since 1.2.0 @example display: function(value, sourceData) { //display checklist as comma-separated values var html = [], checked = $.fn.editableutils.itemsByValue(value, sourceData); if(checked.length) { $.each(checked, function(i, v) { html.push($.fn.editableutils.escape(v.text)); }); $(this).html(html.join(', ')); } else { $(this).empty(); } } **/ display: null, /** Css class applied when editable text is empty. @property emptyclass @type string @since 1.4.1 @default editable-empty **/ emptyclass: 'editable-empty', /** Css class applied when value was stored but not sent to server (`pk` is empty or `send = 'never'`). You may set it to `null` if you work with editables locally and submit them together. @property unsavedclass @type string @since 1.4.1 @default editable-unsaved **/ unsavedclass: 'editable-unsaved', /** If selector is provided, editable will be delegated to the specified targets. Usefull for dynamically generated DOM elements. **Please note**, that delegated targets can't be initialized with `emptytext` and `autotext` options, as they actually become editable only after first click. You should manually set class `editable-click` to these elements. Also, if element originally empty you should add class `editable-empty`, set `data-value=""` and write emptytext into element: @property selector @type string @since 1.4.1 @default null @example <div id="user"> <!-- empty --> <a href="#" data-name="username" data-type="text" class="editable-click editable-empty" data-value="" title="Username">Empty</a> <!-- non-empty --> <a href="#" data-name="group" data-type="select" data-source="/groups" data-value="1" class="editable-click" title="Group">Operator</a> </div> <script> $('#user').editable({ selector: 'a', url: '/post', pk: 1 }); </script> **/ selector: null, /** Color used to highlight element after update. Implemented via CSS3 transition, works in modern browsers. @property highlight @type string|boolean @since 1.4.5 @default #FFFF80 **/ highlight: '#FFFF80' }; }(window.jQuery)); /** AbstractInput - base class for all editable inputs. It defines interface to be implemented by any input type. To create your own input you can inherit from this class. @class abstractinput **/ (function ($) { "use strict"; //types $.fn.editabletypes = {}; var AbstractInput = function () { }; AbstractInput.prototype = { /** Initializes input @method init() **/ init: function(type, options, defaults) { this.type = type; this.options = $.extend({}, defaults, options); }, /* this method called before render to init $tpl that is inserted in DOM */ prerender: function() { this.$tpl = $(this.options.tpl); //whole tpl as jquery object this.$input = this.$tpl; //control itself, can be changed in render method this.$clear = null; //clear button this.error = null; //error message, if input cannot be rendered }, /** Renders input from tpl. Can return jQuery deferred object. Can be overwritten in child objects @method render() **/ render: function() { }, /** Sets element's html by value. @method value2html(value, element) @param {mixed} value @param {DOMElement} element **/ value2html: function(value, element) { $(element)[this.options.escape ? 'text' : 'html']($.trim(value)); }, /** Converts element's html to value @method html2value(html) @param {string} html @returns {mixed} **/ html2value: function(html) { return $('<div>').html(html).text(); }, /** Converts value to string (for internal compare). For submitting to server used value2submit(). @method value2str(value) @param {mixed} value @returns {string} **/ value2str: function(value) { return value; }, /** Converts string received from server into value. Usually from `data-value` attribute. @method str2value(str) @param {string} str @returns {mixed} **/ str2value: function(str) { return str; }, /** Converts value for submitting to server. Result can be string or object. @method value2submit(value) @param {mixed} value @returns {mixed} **/ value2submit: function(value) { return value; }, /** Sets value of input. @method value2input(value) @param {mixed} value **/ value2input: function(value) { this.$input.val(value); }, /** Returns value of input. Value can be object (e.g. datepicker) @method input2value() **/ input2value: function() { return this.$input.val(); }, /** Activates input. For text it sets focus. @method activate() **/ activate: function() { if(this.$input.is(':visible')) { this.$input.focus(); } }, /** Creates input. @method clear() **/ clear: function() { this.$input.val(null); }, /** method to escape html. **/ escape: function(str) { return $('<div>').text(str).html(); }, /** attach handler to automatically submit form when value changed (useful when buttons not shown) **/ autosubmit: function() { }, /** Additional actions when destroying element **/ destroy: function() { }, // -------- helper functions -------- setClass: function() { if(this.options.inputclass) { this.$input.addClass(this.options.inputclass); } }, setAttr: function(attr) { if (this.options[attr] !== undefined && this.options[attr] !== null) { this.$input.attr(attr, this.options[attr]); } }, option: function(key, value) { this.options[key] = value; } }; AbstractInput.defaults = { /** HTML template of input. Normally you should not change it. @property tpl @type string @default '' **/ tpl: '', /** CSS class automatically applied to input @property inputclass @type string @default null **/ inputclass: null, /** If `true` - html will be escaped in content of element via $.text() method. If `false` - html will not be escaped, $.html() used. When you use own `display` function, this option obviosly has no effect. @property escape @type boolean @since 1.5.0 @default true **/ escape: true, //scope for external methods (e.g. source defined as function) //for internal use only scope: null, //need to re-declare showbuttons here to get it's value from common config (passed only options existing in defaults) showbuttons: true }; $.extend($.fn.editabletypes, {abstractinput: AbstractInput}); }(window.jQuery)); /** List - abstract class for inputs that have source option loaded from js array or via ajax @class list @extends abstractinput **/ (function ($) { "use strict"; var List = function (options) { }; $.fn.editableutils.inherit(List, $.fn.editabletypes.abstractinput); $.extend(List.prototype, { render: function () { var deferred = $.Deferred(); this.error = null; this.onSourceReady(function () { this.renderList(); deferred.resolve(); }, function () { this.error = this.options.sourceError; deferred.resolve(); }); return deferred.promise(); }, html2value: function (html) { return null; //can't set value by text }, value2html: function (value, element, display, response) { var deferred = $.Deferred(), success = function () { if(typeof display === 'function') { //custom display method display.call(element, value, this.sourceData, response); } else { this.value2htmlFinal(value, element); } deferred.resolve(); }; //for null value just call success without loading source if(value === null) { success.call(this); } else { this.onSourceReady(success, function () { deferred.resolve(); }); } return deferred.promise(); }, // ------------- additional functions ------------ onSourceReady: function (success, error) { //run source if it function var source; if ($.isFunction(this.options.source)) { source = this.options.source.call(this.options.scope); this.sourceData = null; //note: if function returns the same source as URL - sourceData will be taken from cahce and no extra request performed } else { source = this.options.source; } //if allready loaded just call success if(this.options.sourceCache && $.isArray(this.sourceData)) { success.call(this); return; } //try parse json in single quotes (for double quotes jquery does automatically) try { source = $.fn.editableutils.tryParseJson(source, false); } catch (e) { error.call(this); return; } //loading from url if (typeof source === 'string') { //try to get sourceData from cache if(this.options.sourceCache) { var cacheID = source, cache; if (!$(document).data(cacheID)) { $(document).data(cacheID, {}); } cache = $(document).data(cacheID); //check for cached data if (cache.loading === false && cache.sourceData) { //take source from cache this.sourceData = cache.sourceData; this.doPrepend(); success.call(this); return; } else if (cache.loading === true) { //cache is loading, put callback in stack to be called later cache.callbacks.push($.proxy(function () { this.sourceData = cache.sourceData; this.doPrepend(); success.call(this); }, this)); //also collecting error callbacks cache.err_callbacks.push($.proxy(error, this)); return; } else { //no cache yet, activate it cache.loading = true; cache.callbacks = []; cache.err_callbacks = []; } } //ajaxOptions for source. Can be overwritten bt options.sourceOptions var ajaxOptions = $.extend({ url: source, type: 'get', cache: false, dataType: 'json', success: $.proxy(function (data) { if(cache) { cache.loading = false; } this.sourceData = this.makeArray(data); if($.isArray(this.sourceData)) { if(cache) { //store result in cache cache.sourceData = this.sourceData; //run success callbacks for other fields waiting for this source $.each(cache.callbacks, function () { this.call(); }); } this.doPrepend(); success.call(this); } else { error.call(this); if(cache) { //run error callbacks for other fields waiting for this source $.each(cache.err_callbacks, function () { this.call(); }); } } }, this), error: $.proxy(function () { error.call(this); if(cache) { cache.loading = false; //run error callbacks for other fields $.each(cache.err_callbacks, function () { this.call(); }); } }, this) }, this.options.sourceOptions); //loading sourceData from server $.ajax(ajaxOptions); } else { //options as json/array this.sourceData = this.makeArray(source); if($.isArray(this.sourceData)) { this.doPrepend(); success.call(this); } else { error.call(this); } } }, doPrepend: function () { if(this.options.prepend === null || this.options.prepend === undefined) { return; } if(!$.isArray(this.prependData)) { //run prepend if it is function (once) if ($.isFunction(this.options.prepend)) { this.options.prepend = this.options.prepend.call(this.options.scope); } //try parse json in single quotes this.options.prepend = $.fn.editableutils.tryParseJson(this.options.prepend, true); //convert prepend from string to object if (typeof this.options.prepend === 'string') { this.options.prepend = {'': this.options.prepend}; } this.prependData = this.makeArray(this.options.prepend); } if($.isArray(this.prependData) && $.isArray(this.sourceData)) { this.sourceData = this.prependData.concat(this.sourceData); } }, /* renders input list */ renderList: function() { // this method should be overwritten in child class }, /* set element's html by value */ value2htmlFinal: function(value, element) { // this method should be overwritten in child class }, /** * convert data to array suitable for sourceData, e.g. [{value: 1, text: 'abc'}, {...}] */ makeArray: function(data) { var count, obj, result = [], item, iterateItem; if(!data || typeof data === 'string') { return null; } if($.isArray(data)) { //array /* function to iterate inside item of array if item is object. Caclulates count of keys in item and store in obj. */ iterateItem = function (k, v) { obj = {value: k, text: v}; if(count++ >= 2) { return false;// exit from `each` if item has more than one key. } }; for(var i = 0; i < data.length; i++) { item = data[i]; if(typeof item === 'object') { count = 0; //count of keys inside item $.each(item, iterateItem); //case: [{val1: 'text1'}, {val2: 'text2} ...] if(count === 1) { result.push(obj); //case: [{value: 1, text: 'text1'}, {value: 2, text: 'text2'}, ...] } else if(count > 1) { //removed check of existance: item.hasOwnProperty('value') && item.hasOwnProperty('text') if(item.children) { item.children = this.makeArray(item.children); } result.push(item); } } else { //case: ['text1', 'text2' ...] result.push({value: item, text: item}); } } } else { //case: {val1: 'text1', val2: 'text2, ...} $.each(data, function (k, v) { result.push({value: k, text: v}); }); } return result; }, option: function(key, value) { this.options[key] = value; if(key === 'source') { this.sourceData = null; } if(key === 'prepend') { this.prependData = null; } } }); List.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** Source data for list. If **array** - it should be in format: `[{value: 1, text: "text1"}, {value: 2, text: "text2"}, ...]` For compability, object format is also supported: `{"1": "text1", "2": "text2" ...}` but it does not guarantee elements order. If **string** - considered ajax url to load items. In that case results will be cached for fields with the same source and name. See also `sourceCache` option. If **function**, it should return data in format above (since 1.4.0). Since 1.4.1 key `children` supported to render OPTGROUP (for **select** input only). `[{text: "group1", children: [{value: 1, text: "text1"}, {value: 2, text: "text2"}]}, ...]` @property source @type string | array | object | function @default null **/ source: null, /** Data automatically prepended to the beginning of dropdown list. @property prepend @type string | array | object | function @default false **/ prepend: false, /** Error message when list cannot be loaded (e.g. ajax error) @property sourceError @type string @default Error when loading list **/ sourceError: 'Error when loading list', /** if <code>true</code> and source is **string url** - results will be cached for fields with the same source. Usefull for editable column in grid to prevent extra requests. @property sourceCache @type boolean @default true @since 1.2.0 **/ sourceCache: true, /** Additional ajax options to be used in $.ajax() when loading list from server. Useful to send extra parameters (`data` key) or change request method (`type` key). @property sourceOptions @type object|function @default null @since 1.5.0 **/ sourceOptions: null }); $.fn.editabletypes.list = List; }(window.jQuery)); /** Text input @class text @extends abstractinput @final @example <a href="#" id="username" data-type="text" data-pk="1">awesome</a> <script> $(function(){ $('#username').editable({ url: '/post', title: 'Enter username' }); }); </script> **/ (function ($) { "use strict"; var Text = function (options) { this.init('text', options, Text.defaults); }; $.fn.editableutils.inherit(Text, $.fn.editabletypes.abstractinput); $.extend(Text.prototype, { render: function() { this.renderClear(); this.setClass(); this.setAttr('placeholder'); }, activate: function() { if(this.$input.is(':visible')) { this.$input.focus(); $.fn.editableutils.setCursorPosition(this.$input.get(0), this.$input.val().length); if(this.toggleClear) { this.toggleClear(); } } }, //render clear button renderClear: function() { if (this.options.clear) { this.$clear = $('<span class="editable-clear-x"></span>'); this.$input.after(this.$clear) .css('padding-right', 24) .keyup($.proxy(function(e) { //arrows, enter, tab, etc if(~$.inArray(e.keyCode, [40,38,9,13,27])) { return; } clearTimeout(this.t); var that = this; this.t = setTimeout(function() { that.toggleClear(e); }, 100); }, this)) .parent().css('position', 'relative'); this.$clear.click($.proxy(this.clear, this)); } }, postrender: function() { /* //now `clear` is positioned via css if(this.$clear) { //can position clear button only here, when form is shown and height can be calculated // var h = this.$input.outerHeight(true) || 20, var h = this.$clear.parent().height(), delta = (h - this.$clear.height()) / 2; //this.$clear.css({bottom: delta, right: delta}); } */ }, //show / hide clear button toggleClear: function(e) { if(!this.$clear) { return; } var len = this.$input.val().length, visible = this.$clear.is(':visible'); if(len && !visible) { this.$clear.show(); } if(!len && visible) { this.$clear.hide(); } }, clear: function() { this.$clear.hide(); this.$input.val('').focus(); } }); Text.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** @property tpl @default <input type="text"> **/ tpl: '<input type="text">', /** Placeholder attribute of input. Shown when input is empty. @property placeholder @type string @default null **/ placeholder: null, /** Whether to show `clear` button @property clear @type boolean @default true **/ clear: true }); $.fn.editabletypes.text = Text; }(window.jQuery)); /** Textarea input @class textarea @extends abstractinput @final @example <a href="#" id="comments" data-type="textarea" data-pk="1">awesome comment!</a> <script> $(function(){ $('#comments').editable({ url: '/post', title: 'Enter comments', rows: 10 }); }); </script> **/ (function ($) { "use strict"; var Textarea = function (options) { this.init('textarea', options, Textarea.defaults); }; $.fn.editableutils.inherit(Textarea, $.fn.editabletypes.abstractinput); $.extend(Textarea.prototype, { render: function () { this.setClass(); this.setAttr('placeholder'); this.setAttr('rows'); //ctrl + enter this.$input.keydown(function (e) { if (e.ctrlKey && e.which === 13) { $(this).closest('form').submit(); } }); }, //using `white-space: pre-wrap` solves \n <--> BR conversion very elegant! /* value2html: function(value, element) { var html = '', lines; if(value) { lines = value.split("\n"); for (var i = 0; i < lines.length; i++) { lines[i] = $('<div>').text(lines[i]).html(); } html = lines.join('<br>'); } $(element).html(html); }, html2value: function(html) { if(!html) { return ''; } var regex = new RegExp(String.fromCharCode(10), 'g'); var lines = html.split(/<br\s*\/?>/i); for (var i = 0; i < lines.length; i++) { var text = $('<div>').html(lines[i]).text(); // Remove newline characters (\n) to avoid them being converted by value2html() method // thus adding extra <br> tags text = text.replace(regex, ''); lines[i] = text; } return lines.join("\n"); }, */ activate: function() { $.fn.editabletypes.text.prototype.activate.call(this); } }); Textarea.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** @property tpl @default <textarea></textarea> **/ tpl:'<textarea></textarea>', /** @property inputclass @default input-large **/ inputclass: 'input-large', /** Placeholder attribute of input. Shown when input is empty. @property placeholder @type string @default null **/ placeholder: null, /** Number of rows in textarea @property rows @type integer @default 7 **/ rows: 7 }); $.fn.editabletypes.textarea = Textarea; }(window.jQuery)); /** Select (dropdown) @class select @extends list @final @example <a href="#" id="status" data-type="select" data-pk="1" data-url="/post" data-title="Select status"></a> <script> $(function(){ $('#status').editable({ value: 2, source: [ {value: 1, text: 'Active'}, {value: 2, text: 'Blocked'}, {value: 3, text: 'Deleted'} ] }); }); </script> **/ (function ($) { "use strict"; var Select = function (options) { this.init('select', options, Select.defaults); }; $.fn.editableutils.inherit(Select, $.fn.editabletypes.list); $.extend(Select.prototype, { renderList: function() { this.$input.empty(); var fillItems = function($el, data) { var attr; if($.isArray(data)) { for(var i=0; i<data.length; i++) { attr = {}; if(data[i].children) { attr.label = data[i].text; $el.append(fillItems($('<optgroup>', attr), data[i].children)); } else { attr.value = data[i].value; if(data[i].disabled) { attr.disabled = true; } $el.append($('<option>', attr).text(data[i].text)); } } } return $el; }; fillItems(this.$input, this.sourceData); this.setClass(); //enter submit this.$input.on('keydown.editable', function (e) { if (e.which === 13) { $(this).closest('form').submit(); } }); }, value2htmlFinal: function(value, element) { var text = '', items = $.fn.editableutils.itemsByValue(value, this.sourceData); if(items.length) { text = items[0].text; } //$(element).text(text); $.fn.editabletypes.abstractinput.prototype.value2html.call(this, text, element); }, autosubmit: function() { this.$input.off('keydown.editable').on('change.editable', function(){ $(this).closest('form').submit(); }); } }); Select.defaults = $.extend({}, $.fn.editabletypes.list.defaults, { /** @property tpl @default <select></select> **/ tpl:'<select></select>' }); $.fn.editabletypes.select = Select; }(window.jQuery)); /** List of checkboxes. Internally value stored as javascript array of values. @class checklist @extends list @final @example <a href="#" id="options" data-type="checklist" data-pk="1" data-url="/post" data-title="Select options"></a> <script> $(function(){ $('#options').editable({ value: [2, 3], source: [ {value: 1, text: 'option1'}, {value: 2, text: 'option2'}, {value: 3, text: 'option3'} ] }); }); </script> **/ (function ($) { "use strict"; var Checklist = function (options) { this.init('checklist', options, Checklist.defaults); }; $.fn.editableutils.inherit(Checklist, $.fn.editabletypes.list); $.extend(Checklist.prototype, { renderList: function() { var $label, $div; this.$tpl.empty(); if(!$.isArray(this.sourceData)) { return; } for(var i=0; i<this.sourceData.length; i++) { $label = $('<label>').append($('<input>', { type: 'checkbox', value: this.sourceData[i].value })) .append($('<span>').text(' '+this.sourceData[i].text)); $('<div>').append($label).appendTo(this.$tpl); } this.$input = this.$tpl.find('input[type="checkbox"]'); this.setClass(); }, value2str: function(value) { return $.isArray(value) ? value.sort().join($.trim(this.options.separator)) : ''; }, //parse separated string str2value: function(str) { var reg, value = null; if(typeof str === 'string' && str.length) { reg = new RegExp('\\s*'+$.trim(this.options.separator)+'\\s*'); value = str.split(reg); } else if($.isArray(str)) { value = str; } else { value = [str]; } return value; }, //set checked on required checkboxes value2input: function(value) { this.$input.prop('checked', false); if($.isArray(value) && value.length) { this.$input.each(function(i, el) { var $el = $(el); // cannot use $.inArray as it performs strict comparison $.each(value, function(j, val){ /*jslint eqeq: true*/ if($el.val() == val) { /*jslint eqeq: false*/ $el.prop('checked', true); } }); }); } }, input2value: function() { var checked = []; this.$input.filter(':checked').each(function(i, el) { checked.push($(el).val()); }); return checked; }, //collect text of checked boxes value2htmlFinal: function(value, element) { var html = [], checked = $.fn.editableutils.itemsByValue(value, this.sourceData), escape = this.options.escape; if(checked.length) { $.each(checked, function(i, v) { var text = escape ? $.fn.editableutils.escape(v.text) : v.text; html.push(text); }); $(element).html(html.join('<br>')); } else { $(element).empty(); } }, activate: function() { this.$input.first().focus(); }, autosubmit: function() { this.$input.on('keydown', function(e){ if (e.which === 13) { $(this).closest('form').submit(); } }); } }); Checklist.defaults = $.extend({}, $.fn.editabletypes.list.defaults, { /** @property tpl @default <div></div> **/ tpl:'<div class="editable-checklist"></div>', /** @property inputclass @type string @default null **/ inputclass: null, /** Separator of values when reading from `data-value` attribute @property separator @type string @default ',' **/ separator: ',' }); $.fn.editabletypes.checklist = Checklist; }(window.jQuery)); /** HTML5 input types. Following types are supported: * password * email * url * tel * number * range * time Learn more about html5 inputs: http://www.w3.org/wiki/HTML5_form_additions To check browser compatibility please see: https://developer.mozilla.org/en-US/docs/HTML/Element/Input @class html5types @extends text @final @since 1.3.0 @example <a href="#" id="email" data-type="email" data-pk="1">[email protected]</a> <script> $(function(){ $('#email').editable({ url: '/post', title: 'Enter email' }); }); </script> **/ /** @property tpl @default depends on type **/ /* Password */ (function ($) { "use strict"; var Password = function (options) { this.init('password', options, Password.defaults); }; $.fn.editableutils.inherit(Password, $.fn.editabletypes.text); $.extend(Password.prototype, { //do not display password, show '[hidden]' instead value2html: function(value, element) { if(value) { $(element).text('[hidden]'); } else { $(element).empty(); } }, //as password not displayed, should not set value by html html2value: function(html) { return null; } }); Password.defaults = $.extend({}, $.fn.editabletypes.text.defaults, { tpl: '<input type="password">' }); $.fn.editabletypes.password = Password; }(window.jQuery)); /* Email */ (function ($) { "use strict"; var Email = function (options) { this.init('email', options, Email.defaults); }; $.fn.editableutils.inherit(Email, $.fn.editabletypes.text); Email.defaults = $.extend({}, $.fn.editabletypes.text.defaults, { tpl: '<input type="email">' }); $.fn.editabletypes.email = Email; }(window.jQuery)); /* Url */ (function ($) { "use strict"; var Url = function (options) { this.init('url', options, Url.defaults); }; $.fn.editableutils.inherit(Url, $.fn.editabletypes.text); Url.defaults = $.extend({}, $.fn.editabletypes.text.defaults, { tpl: '<input type="url">' }); $.fn.editabletypes.url = Url; }(window.jQuery)); /* Tel */ (function ($) { "use strict"; var Tel = function (options) { this.init('tel', options, Tel.defaults); }; $.fn.editableutils.inherit(Tel, $.fn.editabletypes.text); Tel.defaults = $.extend({}, $.fn.editabletypes.text.defaults, { tpl: '<input type="tel">' }); $.fn.editabletypes.tel = Tel; }(window.jQuery)); /* Number */ (function ($) { "use strict"; var NumberInput = function (options) { this.init('number', options, NumberInput.defaults); }; $.fn.editableutils.inherit(NumberInput, $.fn.editabletypes.text); $.extend(NumberInput.prototype, { render: function () { NumberInput.superclass.render.call(this); this.setAttr('min'); this.setAttr('max'); this.setAttr('step'); }, postrender: function() { if(this.$clear) { //increase right ffset for up/down arrows this.$clear.css({right: 24}); /* //can position clear button only here, when form is shown and height can be calculated var h = this.$input.outerHeight(true) || 20, delta = (h - this.$clear.height()) / 2; //add 12px to offset right for up/down arrows this.$clear.css({top: delta, right: delta + 16}); */ } } }); NumberInput.defaults = $.extend({}, $.fn.editabletypes.text.defaults, { tpl: '<input type="number">', inputclass: 'input-mini', min: null, max: null, step: null }); $.fn.editabletypes.number = NumberInput; }(window.jQuery)); /* Range (inherit from number) */ (function ($) { "use strict"; var Range = function (options) { this.init('range', options, Range.defaults); }; $.fn.editableutils.inherit(Range, $.fn.editabletypes.number); $.extend(Range.prototype, { render: function () { this.$input = this.$tpl.filter('input'); this.setClass(); this.setAttr('min'); this.setAttr('max'); this.setAttr('step'); this.$input.on('input', function(){ $(this).siblings('output').text($(this).val()); }); }, activate: function() { this.$input.focus(); } }); Range.defaults = $.extend({}, $.fn.editabletypes.number.defaults, { tpl: '<input type="range"><output style="width: 30px; display: inline-block"></output>', inputclass: 'input-medium' }); $.fn.editabletypes.range = Range; }(window.jQuery)); /* Time */ (function ($) { "use strict"; var Time = function (options) { this.init('time', options, Time.defaults); }; //inherit from abstract, as inheritance from text gives selection error. $.fn.editableutils.inherit(Time, $.fn.editabletypes.abstractinput); $.extend(Time.prototype, { render: function() { this.setClass(); } }); Time.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { tpl: '<input type="time">' }); $.fn.editabletypes.time = Time; }(window.jQuery)); /** Select2 input. Based on amazing work of Igor Vaynberg https://github.com/ivaynberg/select2. Please see [original select2 docs](http://ivaynberg.github.com/select2) for detailed description and options. You should manually download and include select2 distributive: <link href="select2/select2.css" rel="stylesheet" type="text/css"></link> <script src="select2/select2.js"></script> To make it **bootstrap-styled** you can use css from [here](https://github.com/t0m/select2-bootstrap-css): <link href="select2-bootstrap.css" rel="stylesheet" type="text/css"></link> **Note:** currently `autotext` feature does not work for select2 with `ajax` remote source. You need initially put both `data-value` and element's text youself: <a href="#" data-type="select2" data-value="1">Text1</a> @class select2 @extends abstractinput @since 1.4.1 @final @example <a href="#" id="country" data-type="select2" data-pk="1" data-value="ru" data-url="/post" data-title="Select country"></a> <script> $(function(){ //local source $('#country').editable({ source: [ {id: 'gb', text: 'Great Britain'}, {id: 'us', text: 'United States'}, {id: 'ru', text: 'Russia'} ], select2: { multiple: true } }); //remote source (simple) $('#country').editable({ source: '/getCountries' }); //remote source (advanced) $('#country').editable({ select2: { placeholder: 'Select Country', allowClear: true, minimumInputLength: 3, id: function (item) { return item.CountryId; }, ajax: { url: '/getCountries', dataType: 'json', data: function (term, page) { return { query: term }; }, results: function (data, page) { return { results: data }; } }, formatResult: function (item) { return item.CountryName; }, formatSelection: function (item) { return item.CountryName; }, initSelection: function (element, callback) { return $.get('/getCountryById', { query: element.val() }, function (data) { callback(data); }); } } }); }); </script> **/ (function ($) { "use strict"; var Constructor = function (options) { this.init('select2', options, Constructor.defaults); options.select2 = options.select2 || {}; this.sourceData = null; //placeholder if(options.placeholder) { options.select2.placeholder = options.placeholder; } //if not `tags` mode, use source if(!options.select2.tags && options.source) { var source = options.source; //if source is function, call it (once!) if ($.isFunction(options.source)) { source = options.source.call(options.scope); } if (typeof source === 'string') { options.select2.ajax = options.select2.ajax || {}; //some default ajax params if(!options.select2.ajax.data) { options.select2.ajax.data = function(term) {return { query:term };}; } if(!options.select2.ajax.results) { options.select2.ajax.results = function(data) { return {results:data };}; } options.select2.ajax.url = source; } else { //check format and convert x-editable format to select2 format (if needed) this.sourceData = this.convertSource(source); options.select2.data = this.sourceData; } } //overriding objects in config (as by default jQuery extend() is not recursive) this.options.select2 = $.extend({}, Constructor.defaults.select2, options.select2); //detect whether it is multi-valued this.isMultiple = this.options.select2.tags || this.options.select2.multiple; this.isRemote = ('ajax' in this.options.select2); //store function returning ID of item //should be here as used inautotext for local source this.idFunc = this.options.select2.id; if (typeof(this.idFunc) !== "function") { var idKey = this.idFunc || 'id'; this.idFunc = function (e) { return e[idKey]; }; } //store function that renders text in select2 this.formatSelection = this.options.select2.formatSelection; if (typeof(this.formatSelection) !== "function") { this.formatSelection = function (e) { return e.text; }; } }; $.fn.editableutils.inherit(Constructor, $.fn.editabletypes.abstractinput); $.extend(Constructor.prototype, { render: function() { this.setClass(); //can not apply select2 here as it calls initSelection //over input that does not have correct value yet. //apply select2 only in value2input //this.$input.select2(this.options.select2); //when data is loaded via ajax, we need to know when it's done to populate listData if(this.isRemote) { //listen to loaded event to populate data this.$input.on('select2-loaded', $.proxy(function(e) { this.sourceData = e.items.results; }, this)); } //trigger resize of editableform to re-position container in multi-valued mode if(this.isMultiple) { this.$input.on('change', function() { $(this).closest('form').parent().triggerHandler('resize'); }); } }, value2html: function(value, element) { var text = '', data, that = this; if(this.options.select2.tags) { //in tags mode just assign value data = value; //data = $.fn.editableutils.itemsByValue(value, this.options.select2.tags, this.idFunc); } else if(this.sourceData) { data = $.fn.editableutils.itemsByValue(value, this.sourceData, this.idFunc); } else { //can not get list of possible values //(e.g. autotext for select2 with ajax source) } //data may be array (when multiple values allowed) if($.isArray(data)) { //collect selected data and show with separator text = []; $.each(data, function(k, v){ text.push(v && typeof v === 'object' ? that.formatSelection(v) : v); }); } else if(data) { text = that.formatSelection(data); } text = $.isArray(text) ? text.join(this.options.viewseparator) : text; //$(element).text(text); Constructor.superclass.value2html.call(this, text, element); }, html2value: function(html) { return this.options.select2.tags ? this.str2value(html, this.options.viewseparator) : null; }, value2input: function(value) { //for local source use data directly from source (to allow autotext) /* if(!this.isRemote && !this.isMultiple) { var items = $.fn.editableutils.itemsByValue(value, this.sourceData, this.idFunc); if(items.length) { this.$input.select2('data', items[0]); return; } } */ //for remote source just set value, text is updated by initSelection if(!this.$input.data('select2')) { this.$input.val(value); this.$input.select2(this.options.select2); } else { //second argument needed to separate initial change from user's click (for autosubmit) this.$input.val(value).trigger('change', true); } //if remote source AND no user's initSelection provided --> try to use element's text if(this.isRemote && !this.isMultiple && !this.options.select2.initSelection) { var customId = this.options.select2.id, customText = this.options.select2.formatSelection; if(!customId && !customText) { var data = {id: value, text: $(this.options.scope).text()}; this.$input.select2('data', data); } } }, input2value: function() { return this.$input.select2('val'); }, str2value: function(str, separator) { if(typeof str !== 'string' || !this.isMultiple) { return str; } separator = separator || this.options.select2.separator || $.fn.select2.defaults.separator; var val, i, l; if (str === null || str.length < 1) { return null; } val = str.split(separator); for (i = 0, l = val.length; i < l; i = i + 1) { val[i] = $.trim(val[i]); } return val; }, autosubmit: function() { this.$input.on('change', function(e, isInitial){ if(!isInitial) { $(this).closest('form').submit(); } }); }, /* Converts source from x-editable format: {value: 1, text: "1"} to select2 format: {id: 1, text: "1"} */ convertSource: function(source) { if($.isArray(source) && source.length && source[0].value !== undefined) { for(var i = 0; i<source.length; i++) { if(source[i].value !== undefined) { source[i].id = source[i].value; delete source[i].value; } } } return source; }, destroy: function() { if(this.$input.data('select2')) { this.$input.select2('destroy'); } } }); Constructor.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** @property tpl @default <input type="hidden"> **/ tpl:'<input type="hidden">', /** Configuration of select2. [Full list of options](http://ivaynberg.github.com/select2). @property select2 @type object @default null **/ select2: null, /** Placeholder attribute of select @property placeholder @type string @default null **/ placeholder: null, /** Source data for select. It will be assigned to select2 `data` property and kept here just for convenience. Please note, that format is different from simple `select` input: use 'id' instead of 'value'. E.g. `[{id: 1, text: "text1"}, {id: 2, text: "text2"}, ...]`. @property source @type array|string|function @default null **/ source: null, /** Separator used to display tags. @property viewseparator @type string @default ', ' **/ viewseparator: ', ' }); $.fn.editabletypes.select2 = Constructor; }(window.jQuery)); /** * Combodate - 1.0.4 * Dropdown date and time picker. * Converts text input into dropdowns to pick day, month, year, hour, minute and second. * Uses momentjs as datetime library http://momentjs.com. * For internalization include corresponding file from https://github.com/timrwood/moment/tree/master/lang * * Confusion at noon and midnight - see http://en.wikipedia.org/wiki/12-hour_clock#Confusion_at_noon_and_midnight * In combodate: * 12:00 pm --> 12:00 (24-h format, midday) * 12:00 am --> 00:00 (24-h format, midnight, start of day) * * Differs from momentjs parse rules: * 00:00 pm, 12:00 pm --> 12:00 (24-h format, day not change) * 00:00 am, 12:00 am --> 00:00 (24-h format, day not change) * * * Author: Vitaliy Potapov * Project page: http://github.com/vitalets/combodate * Copyright (c) 2012 Vitaliy Potapov. Released under MIT License. **/ (function ($) { var Combodate = function (element, options) { this.$element = $(element); if(!this.$element.is('input')) { $.error('Combodate should be applied to INPUT element'); return; } this.options = $.extend({}, $.fn.combodate.defaults, options, this.$element.data()); this.init(); }; Combodate.prototype = { constructor: Combodate, init: function () { this.map = { //key regexp moment.method day: ['D', 'date'], month: ['M', 'month'], year: ['Y', 'year'], hour: ['[Hh]', 'hours'], minute: ['m', 'minutes'], second: ['s', 'seconds'], ampm: ['[Aa]', ''] }; this.$widget = $('<span class="combodate"></span>').html(this.getTemplate()); this.initCombos(); //update original input on change this.$widget.on('change', 'select', $.proxy(function(){ this.$element.val(this.getValue()); }, this)); this.$widget.find('select').css('width', 'auto'); //hide original input and insert widget this.$element.hide().after(this.$widget); //set initial value this.setValue(this.$element.val() || this.options.value); }, /* Replace tokens in template with <select> elements */ getTemplate: function() { var tpl = this.options.template; //first pass $.each(this.map, function(k, v) { v = v[0]; var r = new RegExp(v+'+'), token = v.length > 1 ? v.substring(1, 2) : v; tpl = tpl.replace(r, '{'+token+'}'); }); //replace spaces with &nbsp; tpl = tpl.replace(/ /g, '&nbsp;'); //second pass $.each(this.map, function(k, v) { v = v[0]; var token = v.length > 1 ? v.substring(1, 2) : v; tpl = tpl.replace('{'+token+'}', '<select class="'+k+'"></select>'); }); return tpl; }, /* Initialize combos that presents in template */ initCombos: function() { var that = this; $.each(this.map, function(k, v) { var $c = that.$widget.find('.'+k), f, items; if($c.length) { that['$'+k] = $c; //set properties like this.$day, this.$month etc. f = 'fill' + k.charAt(0).toUpperCase() + k.slice(1); //define method name to fill items, e.g `fillDays` items = that[f](); that['$'+k].html(that.renderItems(items)); } }); }, /* Initialize items of combos. Handles `firstItem` option */ initItems: function(key) { var values = [], relTime; if(this.options.firstItem === 'name') { //need both to support moment ver < 2 and >= 2 relTime = moment.relativeTime || moment.langData()._relativeTime; var header = typeof relTime[key] === 'function' ? relTime[key](1, true, key, false) : relTime[key]; //take last entry (see momentjs lang files structure) header = header.split(' ').reverse()[0]; values.push(['', header]); } else if(this.options.firstItem === 'empty') { values.push(['', '']); } return values; }, /* render items to string of <option> tags */ renderItems: function(items) { var str = []; for(var i=0; i<items.length; i++) { str.push('<option value="'+items[i][0]+'">'+items[i][1]+'</option>'); } return str.join("\n"); }, /* fill day */ fillDay: function() { var items = this.initItems('d'), name, i, twoDigit = this.options.template.indexOf('DD') !== -1; for(i=1; i<=31; i++) { name = twoDigit ? this.leadZero(i) : i; items.push([i, name]); } return items; }, /* fill month */ fillMonth: function() { var items = this.initItems('M'), name, i, longNames = this.options.template.indexOf('MMMM') !== -1, shortNames = this.options.template.indexOf('MMM') !== -1, twoDigit = this.options.template.indexOf('MM') !== -1; for(i=0; i<=11; i++) { if(longNames) { //see https://github.com/timrwood/momentjs.com/pull/36 name = moment().date(1).month(i).format('MMMM'); } else if(shortNames) { name = moment().date(1).month(i).format('MMM'); } else if(twoDigit) { name = this.leadZero(i+1); } else { name = i+1; } items.push([i, name]); } return items; }, /* fill year */ fillYear: function() { var items = [], name, i, longNames = this.options.template.indexOf('YYYY') !== -1; for(i=this.options.maxYear; i>=this.options.minYear; i--) { name = longNames ? i : (i+'').substring(2); items[this.options.yearDescending ? 'push' : 'unshift']([i, name]); } items = this.initItems('y').concat(items); return items; }, /* fill hour */ fillHour: function() { var items = this.initItems('h'), name, i, h12 = this.options.template.indexOf('h') !== -1, h24 = this.options.template.indexOf('H') !== -1, twoDigit = this.options.template.toLowerCase().indexOf('hh') !== -1, min = h12 ? 1 : 0, max = h12 ? 12 : 23; for(i=min; i<=max; i++) { name = twoDigit ? this.leadZero(i) : i; items.push([i, name]); } return items; }, /* fill minute */ fillMinute: function() { var items = this.initItems('m'), name, i, twoDigit = this.options.template.indexOf('mm') !== -1; for(i=0; i<=59; i+= this.options.minuteStep) { name = twoDigit ? this.leadZero(i) : i; items.push([i, name]); } return items; }, /* fill second */ fillSecond: function() { var items = this.initItems('s'), name, i, twoDigit = this.options.template.indexOf('ss') !== -1; for(i=0; i<=59; i+= this.options.secondStep) { name = twoDigit ? this.leadZero(i) : i; items.push([i, name]); } return items; }, /* fill ampm */ fillAmpm: function() { var ampmL = this.options.template.indexOf('a') !== -1, ampmU = this.options.template.indexOf('A') !== -1, items = [ ['am', ampmL ? 'am' : 'AM'], ['pm', ampmL ? 'pm' : 'PM'] ]; return items; }, /* Returns current date value from combos. If format not specified - `options.format` used. If format = `null` - Moment object returned. */ getValue: function(format) { var dt, values = {}, that = this, notSelected = false; //getting selected values $.each(this.map, function(k, v) { if(k === 'ampm') { return; } var def = k === 'day' ? 1 : 0; values[k] = that['$'+k] ? parseInt(that['$'+k].val(), 10) : def; if(isNaN(values[k])) { notSelected = true; return false; } }); //if at least one visible combo not selected - return empty string if(notSelected) { return ''; } //convert hours 12h --> 24h if(this.$ampm) { //12:00 pm --> 12:00 (24-h format, midday), 12:00 am --> 00:00 (24-h format, midnight, start of day) if(values.hour === 12) { values.hour = this.$ampm.val() === 'am' ? 0 : 12; } else { values.hour = this.$ampm.val() === 'am' ? values.hour : values.hour+12; } } dt = moment([values.year, values.month, values.day, values.hour, values.minute, values.second]); //highlight invalid date this.highlight(dt); format = format === undefined ? this.options.format : format; if(format === null) { return dt.isValid() ? dt : null; } else { return dt.isValid() ? dt.format(format) : ''; } }, setValue: function(value) { if(!value) { return; } var dt = typeof value === 'string' ? moment(value, this.options.format) : moment(value), that = this, values = {}; //function to find nearest value in select options function getNearest($select, value) { var delta = {}; $select.children('option').each(function(i, opt){ var optValue = $(opt).attr('value'), distance; if(optValue === '') return; distance = Math.abs(optValue - value); if(typeof delta.distance === 'undefined' || distance < delta.distance) { delta = {value: optValue, distance: distance}; } }); return delta.value; } if(dt.isValid()) { //read values from date object $.each(this.map, function(k, v) { if(k === 'ampm') { return; } values[k] = dt[v[1]](); }); if(this.$ampm) { //12:00 pm --> 12:00 (24-h format, midday), 12:00 am --> 00:00 (24-h format, midnight, start of day) if(values.hour >= 12) { values.ampm = 'pm'; if(values.hour > 12) { values.hour -= 12; } } else { values.ampm = 'am'; if(values.hour === 0) { values.hour = 12; } } } $.each(values, function(k, v) { //call val() for each existing combo, e.g. this.$hour.val() if(that['$'+k]) { if(k === 'minute' && that.options.minuteStep > 1 && that.options.roundTime) { v = getNearest(that['$'+k], v); } if(k === 'second' && that.options.secondStep > 1 && that.options.roundTime) { v = getNearest(that['$'+k], v); } that['$'+k].val(v); } }); this.$element.val(dt.format(this.options.format)); } }, /* highlight combos if date is invalid */ highlight: function(dt) { if(!dt.isValid()) { if(this.options.errorClass) { this.$widget.addClass(this.options.errorClass); } else { //store original border color if(!this.borderColor) { this.borderColor = this.$widget.find('select').css('border-color'); } this.$widget.find('select').css('border-color', 'red'); } } else { if(this.options.errorClass) { this.$widget.removeClass(this.options.errorClass); } else { this.$widget.find('select').css('border-color', this.borderColor); } } }, leadZero: function(v) { return v <= 9 ? '0' + v : v; }, destroy: function() { this.$widget.remove(); this.$element.removeData('combodate').show(); } //todo: clear method }; $.fn.combodate = function ( option ) { var d, args = Array.apply(null, arguments); args.shift(); //getValue returns date as string / object (not jQuery object) if(option === 'getValue' && this.length && (d = this.eq(0).data('combodate'))) { return d.getValue.apply(d, args); } return this.each(function () { var $this = $(this), data = $this.data('combodate'), options = typeof option == 'object' && option; if (!data) { $this.data('combodate', (data = new Combodate(this, options))); } if (typeof option == 'string' && typeof data[option] == 'function') { data[option].apply(data, args); } }); }; $.fn.combodate.defaults = { //in this format value stored in original input format: 'DD-MM-YYYY HH:mm', //in this format items in dropdowns are displayed template: 'D / MMM / YYYY H : mm', //initial value, can be `new Date()` value: null, minYear: 1970, maxYear: 2015, yearDescending: true, minuteStep: 5, secondStep: 1, firstItem: 'empty', //'name', 'empty', 'none' errorClass: null, roundTime: true //whether to round minutes and seconds if step > 1 }; }(window.jQuery)); /** Combodate input - dropdown date and time picker. Based on [combodate](http://vitalets.github.com/combodate) plugin (included). To use it you should manually include [momentjs](http://momentjs.com). <script src="js/moment.min.js"></script> Allows to input: * only date * only time * both date and time Please note, that format is taken from momentjs and **not compatible** with bootstrap-datepicker / jquery UI datepicker. Internally value stored as `momentjs` object. @class combodate @extends abstractinput @final @since 1.4.0 @example <a href="#" id="dob" data-type="combodate" data-pk="1" data-url="/post" data-value="1984-05-15" data-title="Select date"></a> <script> $(function(){ $('#dob').editable({ format: 'YYYY-MM-DD', viewformat: 'DD.MM.YYYY', template: 'D / MMMM / YYYY', combodate: { minYear: 2000, maxYear: 2015, minuteStep: 1 } } }); }); </script> **/ /*global moment*/ (function ($) { "use strict"; var Constructor = function (options) { this.init('combodate', options, Constructor.defaults); //by default viewformat equals to format if(!this.options.viewformat) { this.options.viewformat = this.options.format; } //try parse combodate config defined as json string in data-combodate options.combodate = $.fn.editableutils.tryParseJson(options.combodate, true); //overriding combodate config (as by default jQuery extend() is not recursive) this.options.combodate = $.extend({}, Constructor.defaults.combodate, options.combodate, { format: this.options.format, template: this.options.template }); }; $.fn.editableutils.inherit(Constructor, $.fn.editabletypes.abstractinput); $.extend(Constructor.prototype, { render: function () { this.$input.combodate(this.options.combodate); if($.fn.editableform.engine === 'bs3') { this.$input.siblings().find('select').addClass('form-control'); } if(this.options.inputclass) { this.$input.siblings().find('select').addClass(this.options.inputclass); } //"clear" link /* if(this.options.clear) { this.$clear = $('<a href="#"></a>').html(this.options.clear).click($.proxy(function(e){ e.preventDefault(); e.stopPropagation(); this.clear(); }, this)); this.$tpl.parent().append($('<div class="editable-clear">').append(this.$clear)); } */ }, value2html: function(value, element) { var text = value ? value.format(this.options.viewformat) : ''; //$(element).text(text); Constructor.superclass.value2html.call(this, text, element); }, html2value: function(html) { return html ? moment(html, this.options.viewformat) : null; }, value2str: function(value) { return value ? value.format(this.options.format) : ''; }, str2value: function(str) { return str ? moment(str, this.options.format) : null; }, value2submit: function(value) { return this.value2str(value); }, value2input: function(value) { this.$input.combodate('setValue', value); }, input2value: function() { return this.$input.combodate('getValue', null); }, activate: function() { this.$input.siblings('.combodate').find('select').eq(0).focus(); }, /* clear: function() { this.$input.data('datepicker').date = null; this.$input.find('.active').removeClass('active'); }, */ autosubmit: function() { } }); Constructor.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** @property tpl @default <input type="text"> **/ tpl:'<input type="text">', /** @property inputclass @default null **/ inputclass: null, /** Format used for sending value to server. Also applied when converting date from <code>data-value</code> attribute.<br> See list of tokens in [momentjs docs](http://momentjs.com/docs/#/parsing/string-format) @property format @type string @default YYYY-MM-DD **/ format:'YYYY-MM-DD', /** Format used for displaying date. Also applied when converting date from element's text on init. If not specified equals to `format`. @property viewformat @type string @default null **/ viewformat: null, /** Template used for displaying dropdowns. @property template @type string @default D / MMM / YYYY **/ template: 'D / MMM / YYYY', /** Configuration of combodate. Full list of options: http://vitalets.github.com/combodate/#docs @property combodate @type object @default null **/ combodate: null /* (not implemented yet) Text shown as clear date button. If <code>false</code> clear button will not be rendered. @property clear @type boolean|string @default 'x clear' */ //clear: '&times; clear' }); $.fn.editabletypes.combodate = Constructor; }(window.jQuery)); /* Editableform based on Twitter Bootstrap 2 */ (function ($) { "use strict"; //store parent methods var pInitInput = $.fn.editableform.Constructor.prototype.initInput; $.extend($.fn.editableform.Constructor.prototype, { initTemplate: function() { this.$form = $($.fn.editableform.template); this.$form.find('.editable-error-block').addClass('help-block'); }, initInput: function() { pInitInput.apply(this); //for bs2 set default class `input-medium` to standard inputs var emptyInputClass = this.input.options.inputclass === null || this.input.options.inputclass === false; var defaultClass = 'input-medium'; //add bs2 default class to standard inputs //if(this.input.$input.is('input,select,textarea')) { var stdtypes = 'text,select,textarea,password,email,url,tel,number,range,time'.split(','); if(~$.inArray(this.input.type, stdtypes) && emptyInputClass) { this.input.options.inputclass = defaultClass; this.input.$input.addClass(defaultClass); } } }); //buttons $.fn.editableform.buttons = '<button type="submit" class="btn btn-primary editable-submit"><i class="icon-ok icon-white"></i></button>'+ '<button type="button" class="btn editable-cancel"><i class="icon-remove"></i></button>'; //error classes $.fn.editableform.errorGroupClass = 'error'; $.fn.editableform.errorBlockClass = null; //engine $.fn.editableform.engine = 'bs2'; }(window.jQuery)); /** * Editable Popover * --------------------- * requires bootstrap-popover.js */ (function ($) { "use strict"; //extend methods $.extend($.fn.editableContainer.Popup.prototype, { containerName: 'popover', //for compatibility with bootstrap <= 2.2.1 (content inserted into <p> instead of directly .popover-content) innerCss: $.fn.popover && $($.fn.popover.defaults.template).find('p').length ? '.popover-content p' : '.popover-content', defaults: $.fn.popover.defaults, initContainer: function(){ $.extend(this.containerOptions, { trigger: 'manual', selector: false, content: ' ', template: this.defaults.template }); //as template property is used in inputs, hide it from popover var t; if(this.$element.data('template')) { t = this.$element.data('template'); this.$element.removeData('template'); } this.call(this.containerOptions); if(t) { //restore data('template') this.$element.data('template', t); } }, /* show */ innerShow: function () { this.call('show'); }, /* hide */ innerHide: function () { this.call('hide'); }, /* destroy */ innerDestroy: function() { this.call('destroy'); }, setContainerOption: function(key, value) { this.container().options[key] = value; }, /** * move popover to new position. This function mainly copied from bootstrap-popover. */ /*jshint laxcomma: true*/ setPosition: function () { (function() { var $tip = this.tip() , inside , pos , actualWidth , actualHeight , placement , tp , tpt , tpb , tpl , tpr; placement = typeof this.options.placement === 'function' ? this.options.placement.call(this, $tip[0], this.$element[0]) : this.options.placement; inside = /in/.test(placement); $tip // .detach() //vitalets: remove any placement class because otherwise they dont influence on re-positioning of visible popover .removeClass('top right bottom left') .css({ top: 0, left: 0, display: 'block' }); // .insertAfter(this.$element); pos = this.getPosition(inside); actualWidth = $tip[0].offsetWidth; actualHeight = $tip[0].offsetHeight; placement = inside ? placement.split(' ')[1] : placement; tpb = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}; tpt = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}; tpl = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}; tpr = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}; switch (placement) { case 'bottom': if ((tpb.top + actualHeight) > ($(window).scrollTop() + $(window).height())) { if (tpt.top > $(window).scrollTop()) { placement = 'top'; } else if ((tpr.left + actualWidth) < ($(window).scrollLeft() + $(window).width())) { placement = 'right'; } else if (tpl.left > $(window).scrollLeft()) { placement = 'left'; } else { placement = 'right'; } } break; case 'top': if (tpt.top < $(window).scrollTop()) { if ((tpb.top + actualHeight) < ($(window).scrollTop() + $(window).height())) { placement = 'bottom'; } else if ((tpr.left + actualWidth) < ($(window).scrollLeft() + $(window).width())) { placement = 'right'; } else if (tpl.left > $(window).scrollLeft()) { placement = 'left'; } else { placement = 'right'; } } break; case 'left': if (tpl.left < $(window).scrollLeft()) { if ((tpr.left + actualWidth) < ($(window).scrollLeft() + $(window).width())) { placement = 'right'; } else if (tpt.top > $(window).scrollTop()) { placement = 'top'; } else if (tpt.top > $(window).scrollTop()) { placement = 'bottom'; } else { placement = 'right'; } } break; case 'right': if ((tpr.left + actualWidth) > ($(window).scrollLeft() + $(window).width())) { if (tpl.left > $(window).scrollLeft()) { placement = 'left'; } else if (tpt.top > $(window).scrollTop()) { placement = 'top'; } else if (tpt.top > $(window).scrollTop()) { placement = 'bottom'; } } break; } switch (placement) { case 'bottom': tp = tpb; break; case 'top': tp = tpt; break; case 'left': tp = tpl; break; case 'right': tp = tpr; break; } $tip .offset(tp) .addClass(placement) .addClass('in'); }).call(this.container()); /*jshint laxcomma: false*/ } }); }(window.jQuery)); /* ========================================================= * bootstrap-datepicker.js * http://www.eyecon.ro/bootstrap-datepicker * ========================================================= * Copyright 2012 Stefan Petre * Improvements by Andrew Rowls * * 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( $ ) { function UTCDate(){ return new Date(Date.UTC.apply(Date, arguments)); } function UTCToday(){ var today = new Date(); return UTCDate(today.getUTCFullYear(), today.getUTCMonth(), today.getUTCDate()); } // Picker object var Datepicker = function(element, options) { var that = this; this._process_options(options); this.element = $(element); this.isInline = false; this.isInput = this.element.is('input'); this.component = this.element.is('.date') ? this.element.find('.add-on, .btn') : false; this.hasInput = this.component && this.element.find('input').length; if(this.component && this.component.length === 0) this.component = false; this.picker = $(DPGlobal.template); this._buildEvents(); this._attachEvents(); if(this.isInline) { this.picker.addClass('datepicker-inline').appendTo(this.element); } else { this.picker.addClass('datepicker-dropdown dropdown-menu'); } if (this.o.rtl){ this.picker.addClass('datepicker-rtl'); this.picker.find('.prev i, .next i') .toggleClass('icon-arrow-left icon-arrow-right'); } this.viewMode = this.o.startView; if (this.o.calendarWeeks) this.picker.find('tfoot th.today') .attr('colspan', function(i, val){ return parseInt(val) + 1; }); this._allow_update = false; this.setStartDate(this.o.startDate); this.setEndDate(this.o.endDate); this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled); this.fillDow(); this.fillMonths(); this._allow_update = true; this.update(); this.showMode(); if(this.isInline) { this.show(); } }; Datepicker.prototype = { constructor: Datepicker, _process_options: function(opts){ // Store raw options for reference this._o = $.extend({}, this._o, opts); // Processed options var o = this.o = $.extend({}, this._o); // Check if "de-DE" style date is available, if not language should // fallback to 2 letter code eg "de" var lang = o.language; if (!dates[lang]) { lang = lang.split('-')[0]; if (!dates[lang]) lang = defaults.language; } o.language = lang; switch(o.startView){ case 2: case 'decade': o.startView = 2; break; case 1: case 'year': o.startView = 1; break; default: o.startView = 0; } switch (o.minViewMode) { case 1: case 'months': o.minViewMode = 1; break; case 2: case 'years': o.minViewMode = 2; break; default: o.minViewMode = 0; } o.startView = Math.max(o.startView, o.minViewMode); o.weekStart %= 7; o.weekEnd = ((o.weekStart + 6) % 7); var format = DPGlobal.parseFormat(o.format) if (o.startDate !== -Infinity) { o.startDate = DPGlobal.parseDate(o.startDate, format, o.language); } if (o.endDate !== Infinity) { o.endDate = DPGlobal.parseDate(o.endDate, format, o.language); } o.daysOfWeekDisabled = o.daysOfWeekDisabled||[]; if (!$.isArray(o.daysOfWeekDisabled)) o.daysOfWeekDisabled = o.daysOfWeekDisabled.split(/[,\s]*/); o.daysOfWeekDisabled = $.map(o.daysOfWeekDisabled, function (d) { return parseInt(d, 10); }); }, _events: [], _secondaryEvents: [], _applyEvents: function(evs){ for (var i=0, el, ev; i<evs.length; i++){ el = evs[i][0]; ev = evs[i][1]; el.on(ev); } }, _unapplyEvents: function(evs){ for (var i=0, el, ev; i<evs.length; i++){ el = evs[i][0]; ev = evs[i][1]; el.off(ev); } }, _buildEvents: function(){ if (this.isInput) { // single input this._events = [ [this.element, { focus: $.proxy(this.show, this), keyup: $.proxy(this.update, this), keydown: $.proxy(this.keydown, this) }] ]; } else if (this.component && this.hasInput){ // component: input + button this._events = [ // For components that are not readonly, allow keyboard nav [this.element.find('input'), { focus: $.proxy(this.show, this), keyup: $.proxy(this.update, this), keydown: $.proxy(this.keydown, this) }], [this.component, { click: $.proxy(this.show, this) }] ]; } else if (this.element.is('div')) { // inline datepicker this.isInline = true; } else { this._events = [ [this.element, { click: $.proxy(this.show, this) }] ]; } this._secondaryEvents = [ [this.picker, { click: $.proxy(this.click, this) }], [$(window), { resize: $.proxy(this.place, this) }], [$(document), { mousedown: $.proxy(function (e) { // Clicked outside the datepicker, hide it if (!( this.element.is(e.target) || this.element.find(e.target).size() || this.picker.is(e.target) || this.picker.find(e.target).size() )) { this.hide(); } }, this) }] ]; }, _attachEvents: function(){ this._detachEvents(); this._applyEvents(this._events); }, _detachEvents: function(){ this._unapplyEvents(this._events); }, _attachSecondaryEvents: function(){ this._detachSecondaryEvents(); this._applyEvents(this._secondaryEvents); }, _detachSecondaryEvents: function(){ this._unapplyEvents(this._secondaryEvents); }, _trigger: function(event, altdate){ var date = altdate || this.date, local_date = new Date(date.getTime() + (date.getTimezoneOffset()*60000)); this.element.trigger({ type: event, date: local_date, format: $.proxy(function(altformat){ var format = altformat || this.o.format; return DPGlobal.formatDate(date, format, this.o.language); }, this) }); }, show: function(e) { if (!this.isInline) this.picker.appendTo('body'); this.picker.show(); this.height = this.component ? this.component.outerHeight() : this.element.outerHeight(); this.place(); this._attachSecondaryEvents(); if (e) { e.preventDefault(); } this._trigger('show'); }, hide: function(e){ if(this.isInline) return; if (!this.picker.is(':visible')) return; this.picker.hide().detach(); this._detachSecondaryEvents(); this.viewMode = this.o.startView; this.showMode(); if ( this.o.forceParse && ( this.isInput && this.element.val() || this.hasInput && this.element.find('input').val() ) ) this.setValue(); this._trigger('hide'); }, remove: function() { this.hide(); this._detachEvents(); this._detachSecondaryEvents(); this.picker.remove(); delete this.element.data().datepicker; if (!this.isInput) { delete this.element.data().date; } }, getDate: function() { var d = this.getUTCDate(); return new Date(d.getTime() + (d.getTimezoneOffset()*60000)); }, getUTCDate: function() { return this.date; }, setDate: function(d) { this.setUTCDate(new Date(d.getTime() - (d.getTimezoneOffset()*60000))); }, setUTCDate: function(d) { this.date = d; this.setValue(); }, setValue: function() { var formatted = this.getFormattedDate(); if (!this.isInput) { if (this.component){ this.element.find('input').val(formatted); } } else { this.element.val(formatted); } }, getFormattedDate: function(format) { if (format === undefined) format = this.o.format; return DPGlobal.formatDate(this.date, format, this.o.language); }, setStartDate: function(startDate){ this._process_options({startDate: startDate}); this.update(); this.updateNavArrows(); }, setEndDate: function(endDate){ this._process_options({endDate: endDate}); this.update(); this.updateNavArrows(); }, setDaysOfWeekDisabled: function(daysOfWeekDisabled){ this._process_options({daysOfWeekDisabled: daysOfWeekDisabled}); this.update(); this.updateNavArrows(); }, place: function(){ if(this.isInline) return; var zIndex = parseInt(this.element.parents().filter(function() { return $(this).css('z-index') != 'auto'; }).first().css('z-index'))+10; var offset = this.component ? this.component.parent().offset() : this.element.offset(); var height = this.component ? this.component.outerHeight(true) : this.element.outerHeight(true); this.picker.css({ top: offset.top + height, left: offset.left, zIndex: zIndex }); }, _allow_update: true, update: function(){ if (!this._allow_update) return; var date, fromArgs = false; if(arguments && arguments.length && (typeof arguments[0] === 'string' || arguments[0] instanceof Date)) { date = arguments[0]; fromArgs = true; } else { date = this.isInput ? this.element.val() : this.element.data('date') || this.element.find('input').val(); delete this.element.data().date; } this.date = DPGlobal.parseDate(date, this.o.format, this.o.language); if(fromArgs) this.setValue(); if (this.date < this.o.startDate) { this.viewDate = new Date(this.o.startDate); } else if (this.date > this.o.endDate) { this.viewDate = new Date(this.o.endDate); } else { this.viewDate = new Date(this.date); } this.fill(); }, fillDow: function(){ var dowCnt = this.o.weekStart, html = '<tr>'; if(this.o.calendarWeeks){ var cell = '<th class="cw">&nbsp;</th>'; html += cell; this.picker.find('.datepicker-days thead tr:first-child').prepend(cell); } while (dowCnt < this.o.weekStart + 7) { html += '<th class="dow">'+dates[this.o.language].daysMin[(dowCnt++)%7]+'</th>'; } html += '</tr>'; this.picker.find('.datepicker-days thead').append(html); }, fillMonths: function(){ var html = '', i = 0; while (i < 12) { html += '<span class="month">'+dates[this.o.language].monthsShort[i++]+'</span>'; } this.picker.find('.datepicker-months td').html(html); }, setRange: function(range){ if (!range || !range.length) delete this.range; else this.range = $.map(range, function(d){ return d.valueOf(); }); this.fill(); }, getClassNames: function(date){ var cls = [], year = this.viewDate.getUTCFullYear(), month = this.viewDate.getUTCMonth(), currentDate = this.date.valueOf(), today = new Date(); if (date.getUTCFullYear() < year || (date.getUTCFullYear() == year && date.getUTCMonth() < month)) { cls.push('old'); } else if (date.getUTCFullYear() > year || (date.getUTCFullYear() == year && date.getUTCMonth() > month)) { cls.push('new'); } // Compare internal UTC date with local today, not UTC today if (this.o.todayHighlight && date.getUTCFullYear() == today.getFullYear() && date.getUTCMonth() == today.getMonth() && date.getUTCDate() == today.getDate()) { cls.push('today'); } if (currentDate && date.valueOf() == currentDate) { cls.push('active'); } if (date.valueOf() < this.o.startDate || date.valueOf() > this.o.endDate || $.inArray(date.getUTCDay(), this.o.daysOfWeekDisabled) !== -1) { cls.push('disabled'); } if (this.range){ if (date > this.range[0] && date < this.range[this.range.length-1]){ cls.push('range'); } if ($.inArray(date.valueOf(), this.range) != -1){ cls.push('selected'); } } return cls; }, fill: function() { var d = new Date(this.viewDate), year = d.getUTCFullYear(), month = d.getUTCMonth(), startYear = this.o.startDate !== -Infinity ? this.o.startDate.getUTCFullYear() : -Infinity, startMonth = this.o.startDate !== -Infinity ? this.o.startDate.getUTCMonth() : -Infinity, endYear = this.o.endDate !== Infinity ? this.o.endDate.getUTCFullYear() : Infinity, endMonth = this.o.endDate !== Infinity ? this.o.endDate.getUTCMonth() : Infinity, currentDate = this.date && this.date.valueOf(), tooltip; this.picker.find('.datepicker-days thead th.datepicker-switch') .text(dates[this.o.language].months[month]+' '+year); this.picker.find('tfoot th.today') .text(dates[this.o.language].today) .toggle(this.o.todayBtn !== false); this.picker.find('tfoot th.clear') .text(dates[this.o.language].clear) .toggle(this.o.clearBtn !== false); this.updateNavArrows(); this.fillMonths(); var prevMonth = UTCDate(year, month-1, 28,0,0,0,0), day = DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(), prevMonth.getUTCMonth()); prevMonth.setUTCDate(day); prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.o.weekStart + 7)%7); var nextMonth = new Date(prevMonth); nextMonth.setUTCDate(nextMonth.getUTCDate() + 42); nextMonth = nextMonth.valueOf(); var html = []; var clsName; while(prevMonth.valueOf() < nextMonth) { if (prevMonth.getUTCDay() == this.o.weekStart) { html.push('<tr>'); if(this.o.calendarWeeks){ // ISO 8601: First week contains first thursday. // ISO also states week starts on Monday, but we can be more abstract here. var // Start of current week: based on weekstart/current date ws = new Date(+prevMonth + (this.o.weekStart - prevMonth.getUTCDay() - 7) % 7 * 864e5), // Thursday of this week th = new Date(+ws + (7 + 4 - ws.getUTCDay()) % 7 * 864e5), // First Thursday of year, year from thursday yth = new Date(+(yth = UTCDate(th.getUTCFullYear(), 0, 1)) + (7 + 4 - yth.getUTCDay())%7*864e5), // Calendar week: ms between thursdays, div ms per day, div 7 days calWeek = (th - yth) / 864e5 / 7 + 1; html.push('<td class="cw">'+ calWeek +'</td>'); } } clsName = this.getClassNames(prevMonth); clsName.push('day'); var before = this.o.beforeShowDay(prevMonth); if (before === undefined) before = {}; else if (typeof(before) === 'boolean') before = {enabled: before}; else if (typeof(before) === 'string') before = {classes: before}; if (before.enabled === false) clsName.push('disabled'); if (before.classes) clsName = clsName.concat(before.classes.split(/\s+/)); if (before.tooltip) tooltip = before.tooltip; clsName = $.unique(clsName); html.push('<td class="'+clsName.join(' ')+'"' + (tooltip ? ' title="'+tooltip+'"' : '') + '>'+prevMonth.getUTCDate() + '</td>'); if (prevMonth.getUTCDay() == this.o.weekEnd) { html.push('</tr>'); } prevMonth.setUTCDate(prevMonth.getUTCDate()+1); } this.picker.find('.datepicker-days tbody').empty().append(html.join('')); var currentYear = this.date && this.date.getUTCFullYear(); var months = this.picker.find('.datepicker-months') .find('th:eq(1)') .text(year) .end() .find('span').removeClass('active'); if (currentYear && currentYear == year) { months.eq(this.date.getUTCMonth()).addClass('active'); } if (year < startYear || year > endYear) { months.addClass('disabled'); } if (year == startYear) { months.slice(0, startMonth).addClass('disabled'); } if (year == endYear) { months.slice(endMonth+1).addClass('disabled'); } html = ''; year = parseInt(year/10, 10) * 10; var yearCont = this.picker.find('.datepicker-years') .find('th:eq(1)') .text(year + '-' + (year + 9)) .end() .find('td'); year -= 1; for (var i = -1; i < 11; i++) { html += '<span class="year'+(i == -1 ? ' old' : i == 10 ? ' new' : '')+(currentYear == year ? ' active' : '')+(year < startYear || year > endYear ? ' disabled' : '')+'">'+year+'</span>'; year += 1; } yearCont.html(html); }, updateNavArrows: function() { if (!this._allow_update) return; var d = new Date(this.viewDate), year = d.getUTCFullYear(), month = d.getUTCMonth(); switch (this.viewMode) { case 0: if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear() && month <= this.o.startDate.getUTCMonth()) { this.picker.find('.prev').css({visibility: 'hidden'}); } else { this.picker.find('.prev').css({visibility: 'visible'}); } if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear() && month >= this.o.endDate.getUTCMonth()) { this.picker.find('.next').css({visibility: 'hidden'}); } else { this.picker.find('.next').css({visibility: 'visible'}); } break; case 1: case 2: if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear()) { this.picker.find('.prev').css({visibility: 'hidden'}); } else { this.picker.find('.prev').css({visibility: 'visible'}); } if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear()) { this.picker.find('.next').css({visibility: 'hidden'}); } else { this.picker.find('.next').css({visibility: 'visible'}); } break; } }, click: function(e) { e.preventDefault(); var target = $(e.target).closest('span, td, th'); if (target.length == 1) { switch(target[0].nodeName.toLowerCase()) { case 'th': switch(target[0].className) { case 'datepicker-switch': this.showMode(1); break; case 'prev': case 'next': var dir = DPGlobal.modes[this.viewMode].navStep * (target[0].className == 'prev' ? -1 : 1); switch(this.viewMode){ case 0: this.viewDate = this.moveMonth(this.viewDate, dir); break; case 1: case 2: this.viewDate = this.moveYear(this.viewDate, dir); break; } this.fill(); break; case 'today': var date = new Date(); date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0); this.showMode(-2); var which = this.o.todayBtn == 'linked' ? null : 'view'; this._setDate(date, which); break; case 'clear': var element; if (this.isInput) element = this.element; else if (this.component) element = this.element.find('input'); if (element) element.val("").change(); this._trigger('changeDate'); this.update(); if (this.o.autoclose) this.hide(); break; } break; case 'span': if (!target.is('.disabled')) { this.viewDate.setUTCDate(1); if (target.is('.month')) { var day = 1; var month = target.parent().find('span').index(target); var year = this.viewDate.getUTCFullYear(); this.viewDate.setUTCMonth(month); this._trigger('changeMonth', this.viewDate); if (this.o.minViewMode === 1) { this._setDate(UTCDate(year, month, day,0,0,0,0)); } } else { var year = parseInt(target.text(), 10)||0; var day = 1; var month = 0; this.viewDate.setUTCFullYear(year); this._trigger('changeYear', this.viewDate); if (this.o.minViewMode === 2) { this._setDate(UTCDate(year, month, day,0,0,0,0)); } } this.showMode(-1); this.fill(); } break; case 'td': if (target.is('.day') && !target.is('.disabled')){ var day = parseInt(target.text(), 10)||1; var year = this.viewDate.getUTCFullYear(), month = this.viewDate.getUTCMonth(); if (target.is('.old')) { if (month === 0) { month = 11; year -= 1; } else { month -= 1; } } else if (target.is('.new')) { if (month == 11) { month = 0; year += 1; } else { month += 1; } } this._setDate(UTCDate(year, month, day,0,0,0,0)); } break; } } }, _setDate: function(date, which){ if (!which || which == 'date') this.date = new Date(date); if (!which || which == 'view') this.viewDate = new Date(date); this.fill(); this.setValue(); this._trigger('changeDate'); var element; if (this.isInput) { element = this.element; } else if (this.component){ element = this.element.find('input'); } if (element) { element.change(); if (this.o.autoclose && (!which || which == 'date')) { this.hide(); } } }, moveMonth: function(date, dir){ if (!dir) return date; var new_date = new Date(date.valueOf()), day = new_date.getUTCDate(), month = new_date.getUTCMonth(), mag = Math.abs(dir), new_month, test; dir = dir > 0 ? 1 : -1; if (mag == 1){ test = dir == -1 // If going back one month, make sure month is not current month // (eg, Mar 31 -> Feb 31 == Feb 28, not Mar 02) ? function(){ return new_date.getUTCMonth() == month; } // If going forward one month, make sure month is as expected // (eg, Jan 31 -> Feb 31 == Feb 28, not Mar 02) : function(){ return new_date.getUTCMonth() != new_month; }; new_month = month + dir; new_date.setUTCMonth(new_month); // Dec -> Jan (12) or Jan -> Dec (-1) -- limit expected date to 0-11 if (new_month < 0 || new_month > 11) new_month = (new_month + 12) % 12; } else { // For magnitudes >1, move one month at a time... for (var i=0; i<mag; i++) // ...which might decrease the day (eg, Jan 31 to Feb 28, etc)... new_date = this.moveMonth(new_date, dir); // ...then reset the day, keeping it in the new month new_month = new_date.getUTCMonth(); new_date.setUTCDate(day); test = function(){ return new_month != new_date.getUTCMonth(); }; } // Common date-resetting loop -- if date is beyond end of month, make it // end of month while (test()){ new_date.setUTCDate(--day); new_date.setUTCMonth(new_month); } return new_date; }, moveYear: function(date, dir){ return this.moveMonth(date, dir*12); }, dateWithinRange: function(date){ return date >= this.o.startDate && date <= this.o.endDate; }, keydown: function(e){ if (this.picker.is(':not(:visible)')){ if (e.keyCode == 27) // allow escape to hide and re-show picker this.show(); return; } var dateChanged = false, dir, day, month, newDate, newViewDate; switch(e.keyCode){ case 27: // escape this.hide(); e.preventDefault(); break; case 37: // left case 39: // right if (!this.o.keyboardNavigation) break; dir = e.keyCode == 37 ? -1 : 1; if (e.ctrlKey){ newDate = this.moveYear(this.date, dir); newViewDate = this.moveYear(this.viewDate, dir); } else if (e.shiftKey){ newDate = this.moveMonth(this.date, dir); newViewDate = this.moveMonth(this.viewDate, dir); } else { newDate = new Date(this.date); newDate.setUTCDate(this.date.getUTCDate() + dir); newViewDate = new Date(this.viewDate); newViewDate.setUTCDate(this.viewDate.getUTCDate() + dir); } if (this.dateWithinRange(newDate)){ this.date = newDate; this.viewDate = newViewDate; this.setValue(); this.update(); e.preventDefault(); dateChanged = true; } break; case 38: // up case 40: // down if (!this.o.keyboardNavigation) break; dir = e.keyCode == 38 ? -1 : 1; if (e.ctrlKey){ newDate = this.moveYear(this.date, dir); newViewDate = this.moveYear(this.viewDate, dir); } else if (e.shiftKey){ newDate = this.moveMonth(this.date, dir); newViewDate = this.moveMonth(this.viewDate, dir); } else { newDate = new Date(this.date); newDate.setUTCDate(this.date.getUTCDate() + dir * 7); newViewDate = new Date(this.viewDate); newViewDate.setUTCDate(this.viewDate.getUTCDate() + dir * 7); } if (this.dateWithinRange(newDate)){ this.date = newDate; this.viewDate = newViewDate; this.setValue(); this.update(); e.preventDefault(); dateChanged = true; } break; case 13: // enter this.hide(); e.preventDefault(); break; case 9: // tab this.hide(); break; } if (dateChanged){ this._trigger('changeDate'); var element; if (this.isInput) { element = this.element; } else if (this.component){ element = this.element.find('input'); } if (element) { element.change(); } } }, showMode: function(dir) { if (dir) { this.viewMode = Math.max(this.o.minViewMode, Math.min(2, this.viewMode + dir)); } /* vitalets: fixing bug of very special conditions: jquery 1.7.1 + webkit + show inline datepicker in bootstrap popover. Method show() does not set display css correctly and datepicker is not shown. Changed to .css('display', 'block') solve the problem. See https://github.com/vitalets/x-editable/issues/37 In jquery 1.7.2+ everything works fine. */ //this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show(); this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).css('display', 'block'); this.updateNavArrows(); } }; var DateRangePicker = function(element, options){ this.element = $(element); this.inputs = $.map(options.inputs, function(i){ return i.jquery ? i[0] : i; }); delete options.inputs; $(this.inputs) .datepicker(options) .bind('changeDate', $.proxy(this.dateUpdated, this)); this.pickers = $.map(this.inputs, function(i){ return $(i).data('datepicker'); }); this.updateDates(); }; DateRangePicker.prototype = { updateDates: function(){ this.dates = $.map(this.pickers, function(i){ return i.date; }); this.updateRanges(); }, updateRanges: function(){ var range = $.map(this.dates, function(d){ return d.valueOf(); }); $.each(this.pickers, function(i, p){ p.setRange(range); }); }, dateUpdated: function(e){ var dp = $(e.target).data('datepicker'), new_date = dp.getUTCDate(), i = $.inArray(e.target, this.inputs), l = this.inputs.length; if (i == -1) return; if (new_date < this.dates[i]){ // Date being moved earlier/left while (i>=0 && new_date < this.dates[i]){ this.pickers[i--].setUTCDate(new_date); } } else if (new_date > this.dates[i]){ // Date being moved later/right while (i<l && new_date > this.dates[i]){ this.pickers[i++].setUTCDate(new_date); } } this.updateDates(); }, remove: function(){ $.map(this.pickers, function(p){ p.remove(); }); delete this.element.data().datepicker; } }; function opts_from_el(el, prefix){ // Derive options from element data-attrs var data = $(el).data(), out = {}, inkey, replace = new RegExp('^' + prefix.toLowerCase() + '([A-Z])'), prefix = new RegExp('^' + prefix.toLowerCase()); for (var key in data) if (prefix.test(key)){ inkey = key.replace(replace, function(_,a){ return a.toLowerCase(); }); out[inkey] = data[key]; } return out; } function opts_from_locale(lang){ // Derive options from locale plugins var out = {}; // Check if "de-DE" style date is available, if not language should // fallback to 2 letter code eg "de" if (!dates[lang]) { lang = lang.split('-')[0] if (!dates[lang]) return; } var d = dates[lang]; $.each(locale_opts, function(i,k){ if (k in d) out[k] = d[k]; }); return out; } var old = $.fn.datepicker; var datepicker = $.fn.datepicker = function ( option ) { var args = Array.apply(null, arguments); args.shift(); var internal_return, this_return; this.each(function () { var $this = $(this), data = $this.data('datepicker'), options = typeof option == 'object' && option; if (!data) { var elopts = opts_from_el(this, 'date'), // Preliminary otions xopts = $.extend({}, defaults, elopts, options), locopts = opts_from_locale(xopts.language), // Options priority: js args, data-attrs, locales, defaults opts = $.extend({}, defaults, locopts, elopts, options); if ($this.is('.input-daterange') || opts.inputs){ var ropts = { inputs: opts.inputs || $this.find('input').toArray() }; $this.data('datepicker', (data = new DateRangePicker(this, $.extend(opts, ropts)))); } else{ $this.data('datepicker', (data = new Datepicker(this, opts))); } } if (typeof option == 'string' && typeof data[option] == 'function') { internal_return = data[option].apply(data, args); if (internal_return !== undefined) return false; } }); if (internal_return !== undefined) return internal_return; else return this; }; var defaults = $.fn.datepicker.defaults = { autoclose: false, beforeShowDay: $.noop, calendarWeeks: false, clearBtn: false, daysOfWeekDisabled: [], endDate: Infinity, forceParse: true, format: 'mm/dd/yyyy', keyboardNavigation: true, language: 'en', minViewMode: 0, rtl: false, startDate: -Infinity, startView: 0, todayBtn: false, todayHighlight: false, weekStart: 0 }; var locale_opts = $.fn.datepicker.locale_opts = [ 'format', 'rtl', 'weekStart' ]; $.fn.datepicker.Constructor = Datepicker; var dates = $.fn.datepicker.dates = { en: { days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], today: "Today", clear: "Clear" } }; var DPGlobal = { modes: [ { clsName: 'days', navFnc: 'Month', navStep: 1 }, { clsName: 'months', navFnc: 'FullYear', navStep: 1 }, { clsName: 'years', navFnc: 'FullYear', navStep: 10 }], isLeapYear: function (year) { return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0)); }, getDaysInMonth: function (year, month) { return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]; }, validParts: /dd?|DD?|mm?|MM?|yy(?:yy)?/g, nonpunctuation: /[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g, parseFormat: function(format){ // IE treats \0 as a string end in inputs (truncating the value), // so it's a bad format delimiter, anyway var separators = format.replace(this.validParts, '\0').split('\0'), parts = format.match(this.validParts); if (!separators || !separators.length || !parts || parts.length === 0){ throw new Error("Invalid date format."); } return {separators: separators, parts: parts}; }, parseDate: function(date, format, language) { if (date instanceof Date) return date; if (typeof format === 'string') format = DPGlobal.parseFormat(format); if (/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(date)) { var part_re = /([\-+]\d+)([dmwy])/, parts = date.match(/([\-+]\d+)([dmwy])/g), part, dir; date = new Date(); for (var i=0; i<parts.length; i++) { part = part_re.exec(parts[i]); dir = parseInt(part[1]); switch(part[2]){ case 'd': date.setUTCDate(date.getUTCDate() + dir); break; case 'm': date = Datepicker.prototype.moveMonth.call(Datepicker.prototype, date, dir); break; case 'w': date.setUTCDate(date.getUTCDate() + dir * 7); break; case 'y': date = Datepicker.prototype.moveYear.call(Datepicker.prototype, date, dir); break; } } return UTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0); } var parts = date && date.match(this.nonpunctuation) || [], date = new Date(), parsed = {}, setters_order = ['yyyy', 'yy', 'M', 'MM', 'm', 'mm', 'd', 'dd'], setters_map = { yyyy: function(d,v){ return d.setUTCFullYear(v); }, yy: function(d,v){ return d.setUTCFullYear(2000+v); }, m: function(d,v){ v -= 1; while (v<0) v += 12; v %= 12; d.setUTCMonth(v); while (d.getUTCMonth() != v) d.setUTCDate(d.getUTCDate()-1); return d; }, d: function(d,v){ return d.setUTCDate(v); } }, val, filtered, part; setters_map['M'] = setters_map['MM'] = setters_map['mm'] = setters_map['m']; setters_map['dd'] = setters_map['d']; date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0); var fparts = format.parts.slice(); // Remove noop parts if (parts.length != fparts.length) { fparts = $(fparts).filter(function(i,p){ return $.inArray(p, setters_order) !== -1; }).toArray(); } // Process remainder if (parts.length == fparts.length) { for (var i=0, cnt = fparts.length; i < cnt; i++) { val = parseInt(parts[i], 10); part = fparts[i]; if (isNaN(val)) { switch(part) { case 'MM': filtered = $(dates[language].months).filter(function(){ var m = this.slice(0, parts[i].length), p = parts[i].slice(0, m.length); return m == p; }); val = $.inArray(filtered[0], dates[language].months) + 1; break; case 'M': filtered = $(dates[language].monthsShort).filter(function(){ var m = this.slice(0, parts[i].length), p = parts[i].slice(0, m.length); return m == p; }); val = $.inArray(filtered[0], dates[language].monthsShort) + 1; break; } } parsed[part] = val; } for (var i=0, s; i<setters_order.length; i++){ s = setters_order[i]; if (s in parsed && !isNaN(parsed[s])) setters_map[s](date, parsed[s]); } } return date; }, formatDate: function(date, format, language){ if (typeof format === 'string') format = DPGlobal.parseFormat(format); var val = { d: date.getUTCDate(), D: dates[language].daysShort[date.getUTCDay()], DD: dates[language].days[date.getUTCDay()], m: date.getUTCMonth() + 1, M: dates[language].monthsShort[date.getUTCMonth()], MM: dates[language].months[date.getUTCMonth()], yy: date.getUTCFullYear().toString().substring(2), yyyy: date.getUTCFullYear() }; val.dd = (val.d < 10 ? '0' : '') + val.d; val.mm = (val.m < 10 ? '0' : '') + val.m; var date = [], seps = $.extend([], format.separators); for (var i=0, cnt = format.parts.length; i <= cnt; i++) { if (seps.length) date.push(seps.shift()); date.push(val[format.parts[i]]); } return date.join(''); }, headTemplate: '<thead>'+ '<tr>'+ '<th class="prev"><i class="icon-arrow-left"/></th>'+ '<th colspan="5" class="datepicker-switch"></th>'+ '<th class="next"><i class="icon-arrow-right"/></th>'+ '</tr>'+ '</thead>', contTemplate: '<tbody><tr><td colspan="7"></td></tr></tbody>', footTemplate: '<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>' }; DPGlobal.template = '<div class="datepicker">'+ '<div class="datepicker-days">'+ '<table class=" table-condensed">'+ DPGlobal.headTemplate+ '<tbody></tbody>'+ DPGlobal.footTemplate+ '</table>'+ '</div>'+ '<div class="datepicker-months">'+ '<table class="table-condensed">'+ DPGlobal.headTemplate+ DPGlobal.contTemplate+ DPGlobal.footTemplate+ '</table>'+ '</div>'+ '<div class="datepicker-years">'+ '<table class="table-condensed">'+ DPGlobal.headTemplate+ DPGlobal.contTemplate+ DPGlobal.footTemplate+ '</table>'+ '</div>'+ '</div>'; $.fn.datepicker.DPGlobal = DPGlobal; /* DATEPICKER NO CONFLICT * =================== */ $.fn.datepicker.noConflict = function(){ $.fn.datepicker = old; return this; }; /* DATEPICKER DATA-API * ================== */ $(document).on( 'focus.datepicker.data-api click.datepicker.data-api', '[data-provide="datepicker"]', function(e){ var $this = $(this); if ($this.data('datepicker')) return; e.preventDefault(); // component click requires us to explicitly show it datepicker.call($this, 'show'); } ); $(function(){ //$('[data-provide="datepicker-inline"]').datepicker(); //vit: changed to support noConflict() datepicker.call($('[data-provide="datepicker-inline"]')); }); }( window.jQuery )); /** Bootstrap-datepicker. Description and examples: https://github.com/eternicode/bootstrap-datepicker. For **i18n** you should include js file from here: https://github.com/eternicode/bootstrap-datepicker/tree/master/js/locales and set `language` option. Since 1.4.0 date has different appearance in **popup** and **inline** modes. @class date @extends abstractinput @final @example <a href="#" id="dob" data-type="date" data-pk="1" data-url="/post" data-title="Select date">15/05/1984</a> <script> $(function(){ $('#dob').editable({ format: 'yyyy-mm-dd', viewformat: 'dd/mm/yyyy', datepicker: { weekStart: 1 } } }); }); </script> **/ (function ($) { "use strict"; //store bootstrap-datepicker as bdateicker to exclude conflict with jQuery UI one $.fn.bdatepicker = $.fn.datepicker.noConflict(); if(!$.fn.datepicker) { //if there were no other datepickers, keep also original name $.fn.datepicker = $.fn.bdatepicker; } var Date = function (options) { this.init('date', options, Date.defaults); this.initPicker(options, Date.defaults); }; $.fn.editableutils.inherit(Date, $.fn.editabletypes.abstractinput); $.extend(Date.prototype, { initPicker: function(options, defaults) { //'format' is set directly from settings or data-* attributes //by default viewformat equals to format if(!this.options.viewformat) { this.options.viewformat = this.options.format; } //try parse datepicker config defined as json string in data-datepicker options.datepicker = $.fn.editableutils.tryParseJson(options.datepicker, true); //overriding datepicker config (as by default jQuery extend() is not recursive) //since 1.4 datepicker internally uses viewformat instead of format. Format is for submit only this.options.datepicker = $.extend({}, defaults.datepicker, options.datepicker, { format: this.options.viewformat }); //language this.options.datepicker.language = this.options.datepicker.language || 'en'; //store DPglobal this.dpg = $.fn.bdatepicker.DPGlobal; //store parsed formats this.parsedFormat = this.dpg.parseFormat(this.options.format); this.parsedViewFormat = this.dpg.parseFormat(this.options.viewformat); }, render: function () { this.$input.bdatepicker(this.options.datepicker); //"clear" link if(this.options.clear) { this.$clear = $('<a href="#"></a>').html(this.options.clear).click($.proxy(function(e){ e.preventDefault(); e.stopPropagation(); this.clear(); }, this)); this.$tpl.parent().append($('<div class="editable-clear">').append(this.$clear)); } }, value2html: function(value, element) { var text = value ? this.dpg.formatDate(value, this.parsedViewFormat, this.options.datepicker.language) : ''; Date.superclass.value2html.call(this, text, element); }, html2value: function(html) { return this.parseDate(html, this.parsedViewFormat); }, value2str: function(value) { return value ? this.dpg.formatDate(value, this.parsedFormat, this.options.datepicker.language) : ''; }, str2value: function(str) { return this.parseDate(str, this.parsedFormat); }, value2submit: function(value) { return this.value2str(value); }, value2input: function(value) { this.$input.bdatepicker('update', value); }, input2value: function() { return this.$input.data('datepicker').date; }, activate: function() { }, clear: function() { this.$input.data('datepicker').date = null; this.$input.find('.active').removeClass('active'); if(!this.options.showbuttons) { this.$input.closest('form').submit(); } }, autosubmit: function() { this.$input.on('mouseup', '.day', function(e){ if($(e.currentTarget).is('.old') || $(e.currentTarget).is('.new')) { return; } var $form = $(this).closest('form'); setTimeout(function() { $form.submit(); }, 200); }); //changedate is not suitable as it triggered when showing datepicker. see #149 /* this.$input.on('changeDate', function(e){ var $form = $(this).closest('form'); setTimeout(function() { $form.submit(); }, 200); }); */ }, /* For incorrect date bootstrap-datepicker returns current date that is not suitable for datefield. This function returns null for incorrect date. */ parseDate: function(str, format) { var date = null, formattedBack; if(str) { date = this.dpg.parseDate(str, format, this.options.datepicker.language); if(typeof str === 'string') { formattedBack = this.dpg.formatDate(date, format, this.options.datepicker.language); if(str !== formattedBack) { date = null; } } } return date; } }); Date.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** @property tpl @default <div></div> **/ tpl:'<div class="editable-date well"></div>', /** @property inputclass @default null **/ inputclass: null, /** Format used for sending value to server. Also applied when converting date from <code>data-value</code> attribute.<br> Possible tokens are: <code>d, dd, m, mm, yy, yyyy</code> @property format @type string @default yyyy-mm-dd **/ format:'yyyy-mm-dd', /** Format used for displaying date. Also applied when converting date from element's text on init. If not specified equals to <code>format</code> @property viewformat @type string @default null **/ viewformat: null, /** Configuration of datepicker. Full list of options: http://vitalets.github.com/bootstrap-datepicker @property datepicker @type object @default { weekStart: 0, startView: 0, minViewMode: 0, autoclose: false } **/ datepicker:{ weekStart: 0, startView: 0, minViewMode: 0, autoclose: false }, /** Text shown as clear date button. If <code>false</code> clear button will not be rendered. @property clear @type boolean|string @default 'x clear' **/ clear: '&times; clear' }); $.fn.editabletypes.date = Date; }(window.jQuery)); /** Bootstrap datefield input - modification for inline mode. Shows normal <input type="text"> and binds popup datepicker. Automatically shown in inline mode. @class datefield @extends date @since 1.4.0 **/ (function ($) { "use strict"; var DateField = function (options) { this.init('datefield', options, DateField.defaults); this.initPicker(options, DateField.defaults); }; $.fn.editableutils.inherit(DateField, $.fn.editabletypes.date); $.extend(DateField.prototype, { render: function () { this.$input = this.$tpl.find('input'); this.setClass(); this.setAttr('placeholder'); //bootstrap-datepicker is set `bdateicker` to exclude conflict with jQuery UI one. (in date.js) this.$tpl.bdatepicker(this.options.datepicker); //need to disable original event handlers this.$input.off('focus keydown'); //update value of datepicker this.$input.keyup($.proxy(function(){ this.$tpl.removeData('date'); this.$tpl.bdatepicker('update'); }, this)); }, value2input: function(value) { this.$input.val(value ? this.dpg.formatDate(value, this.parsedViewFormat, this.options.datepicker.language) : ''); this.$tpl.bdatepicker('update'); }, input2value: function() { return this.html2value(this.$input.val()); }, activate: function() { $.fn.editabletypes.text.prototype.activate.call(this); }, autosubmit: function() { //reset autosubmit to empty } }); DateField.defaults = $.extend({}, $.fn.editabletypes.date.defaults, { /** @property tpl **/ tpl:'<div class="input-append date"><input type="text"/><span class="add-on"><i class="icon-th"></i></span></div>', /** @property inputclass @default 'input-small' **/ inputclass: 'input-small', /* datepicker config */ datepicker: { weekStart: 0, startView: 0, minViewMode: 0, autoclose: true } }); $.fn.editabletypes.datefield = DateField; }(window.jQuery)); /** Bootstrap-datetimepicker. Based on [smalot bootstrap-datetimepicker plugin](https://github.com/smalot/bootstrap-datetimepicker). Before usage you should manually include dependent js and css: <link href="css/datetimepicker.css" rel="stylesheet" type="text/css"></link> <script src="js/bootstrap-datetimepicker.js"></script> For **i18n** you should include js file from here: https://github.com/smalot/bootstrap-datetimepicker/tree/master/js/locales and set `language` option. @class datetime @extends abstractinput @final @since 1.4.4 @example <a href="#" id="last_seen" data-type="datetime" data-pk="1" data-url="/post" title="Select date & time">15/03/2013 12:45</a> <script> $(function(){ $('#last_seen').editable({ format: 'yyyy-mm-dd hh:ii', viewformat: 'dd/mm/yyyy hh:ii', datetimepicker: { weekStart: 1 } } }); }); </script> **/ (function ($) { "use strict"; var DateTime = function (options) { this.init('datetime', options, DateTime.defaults); this.initPicker(options, DateTime.defaults); }; $.fn.editableutils.inherit(DateTime, $.fn.editabletypes.abstractinput); $.extend(DateTime.prototype, { initPicker: function(options, defaults) { //'format' is set directly from settings or data-* attributes //by default viewformat equals to format if(!this.options.viewformat) { this.options.viewformat = this.options.format; } //try parse datetimepicker config defined as json string in data-datetimepicker options.datetimepicker = $.fn.editableutils.tryParseJson(options.datetimepicker, true); //overriding datetimepicker config (as by default jQuery extend() is not recursive) //since 1.4 datetimepicker internally uses viewformat instead of format. Format is for submit only this.options.datetimepicker = $.extend({}, defaults.datetimepicker, options.datetimepicker, { format: this.options.viewformat }); //language this.options.datetimepicker.language = this.options.datetimepicker.language || 'en'; //store DPglobal this.dpg = $.fn.datetimepicker.DPGlobal; //store parsed formats this.parsedFormat = this.dpg.parseFormat(this.options.format, this.options.formatType); this.parsedViewFormat = this.dpg.parseFormat(this.options.viewformat, this.options.formatType); }, render: function () { this.$input.datetimepicker(this.options.datetimepicker); //adjust container position when viewMode changes //see https://github.com/smalot/bootstrap-datetimepicker/pull/80 this.$input.on('changeMode', function(e) { var f = $(this).closest('form').parent(); //timeout here, otherwise container changes position before form has new size setTimeout(function(){ f.triggerHandler('resize'); }, 0); }); //"clear" link if(this.options.clear) { this.$clear = $('<a href="#"></a>').html(this.options.clear).click($.proxy(function(e){ e.preventDefault(); e.stopPropagation(); this.clear(); }, this)); this.$tpl.parent().append($('<div class="editable-clear">').append(this.$clear)); } }, value2html: function(value, element) { //formatDate works with UTCDate! var text = value ? this.dpg.formatDate(this.toUTC(value), this.parsedViewFormat, this.options.datetimepicker.language, this.options.formatType) : ''; if(element) { DateTime.superclass.value2html.call(this, text, element); } else { return text; } }, html2value: function(html) { //parseDate return utc date! var value = this.parseDate(html, this.parsedViewFormat); return value ? this.fromUTC(value) : null; }, value2str: function(value) { //formatDate works with UTCDate! return value ? this.dpg.formatDate(this.toUTC(value), this.parsedFormat, this.options.datetimepicker.language, this.options.formatType) : ''; }, str2value: function(str) { //parseDate return utc date! var value = this.parseDate(str, this.parsedFormat); return value ? this.fromUTC(value) : null; }, value2submit: function(value) { return this.value2str(value); }, value2input: function(value) { if(value) { this.$input.data('datetimepicker').setDate(value); } }, input2value: function() { //date may be cleared, in that case getDate() triggers error var dt = this.$input.data('datetimepicker'); return dt.date ? dt.getDate() : null; }, activate: function() { }, clear: function() { this.$input.data('datetimepicker').date = null; this.$input.find('.active').removeClass('active'); if(!this.options.showbuttons) { this.$input.closest('form').submit(); } }, autosubmit: function() { this.$input.on('mouseup', '.minute', function(e){ var $form = $(this).closest('form'); setTimeout(function() { $form.submit(); }, 200); }); }, //convert date from local to utc toUTC: function(value) { return value ? new Date(value.valueOf() - value.getTimezoneOffset() * 60000) : value; }, //convert date from utc to local fromUTC: function(value) { return value ? new Date(value.valueOf() + value.getTimezoneOffset() * 60000) : value; }, /* For incorrect date bootstrap-datetimepicker returns current date that is not suitable for datetimefield. This function returns null for incorrect date. */ parseDate: function(str, format) { var date = null, formattedBack; if(str) { date = this.dpg.parseDate(str, format, this.options.datetimepicker.language, this.options.formatType); if(typeof str === 'string') { formattedBack = this.dpg.formatDate(date, format, this.options.datetimepicker.language, this.options.formatType); if(str !== formattedBack) { date = null; } } } return date; } }); DateTime.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** @property tpl @default <div></div> **/ tpl:'<div class="editable-date well"></div>', /** @property inputclass @default null **/ inputclass: null, /** Format used for sending value to server. Also applied when converting date from <code>data-value</code> attribute.<br> Possible tokens are: <code>d, dd, m, mm, yy, yyyy, h, i</code> @property format @type string @default yyyy-mm-dd hh:ii **/ format:'yyyy-mm-dd hh:ii', formatType:'standard', /** Format used for displaying date. Also applied when converting date from element's text on init. If not specified equals to <code>format</code> @property viewformat @type string @default null **/ viewformat: null, /** Configuration of datetimepicker. Full list of options: https://github.com/smalot/bootstrap-datetimepicker @property datetimepicker @type object @default { } **/ datetimepicker:{ todayHighlight: false, autoclose: false }, /** Text shown as clear date button. If <code>false</code> clear button will not be rendered. @property clear @type boolean|string @default 'x clear' **/ clear: '&times; clear' }); $.fn.editabletypes.datetime = DateTime; }(window.jQuery)); /** Bootstrap datetimefield input - datetime input for inline mode. Shows normal <input type="text"> and binds popup datetimepicker. Automatically shown in inline mode. @class datetimefield @extends datetime **/ (function ($) { "use strict"; var DateTimeField = function (options) { this.init('datetimefield', options, DateTimeField.defaults); this.initPicker(options, DateTimeField.defaults); }; $.fn.editableutils.inherit(DateTimeField, $.fn.editabletypes.datetime); $.extend(DateTimeField.prototype, { render: function () { this.$input = this.$tpl.find('input'); this.setClass(); this.setAttr('placeholder'); this.$tpl.datetimepicker(this.options.datetimepicker); //need to disable original event handlers this.$input.off('focus keydown'); //update value of datepicker this.$input.keyup($.proxy(function(){ this.$tpl.removeData('date'); this.$tpl.datetimepicker('update'); }, this)); }, value2input: function(value) { this.$input.val(this.value2html(value)); this.$tpl.datetimepicker('update'); }, input2value: function() { return this.html2value(this.$input.val()); }, activate: function() { $.fn.editabletypes.text.prototype.activate.call(this); }, autosubmit: function() { //reset autosubmit to empty } }); DateTimeField.defaults = $.extend({}, $.fn.editabletypes.datetime.defaults, { /** @property tpl **/ tpl:'<div class="input-append date"><input type="text"/><span class="add-on"><i class="icon-th"></i></span></div>', /** @property inputclass @default 'input-medium' **/ inputclass: 'input-medium', /* datetimepicker config */ datetimepicker:{ todayHighlight: false, autoclose: true } }); $.fn.editabletypes.datetimefield = DateTimeField; }(window.jQuery)); /** Typeahead input (bootstrap 2 only). Based on Twitter Bootstrap 2 [typeahead](http://getbootstrap.com/2.3.2/javascript.html#typeahead). Depending on `source` format typeahead operates in two modes: * **strings**: When `source` defined as array of strings, e.g. `['text1', 'text2', 'text3' ...]`. User can submit one of these strings or any text entered in input (even if it is not matching source). * **objects**: When `source` defined as array of objects, e.g. `[{value: 1, text: "text1"}, {value: 2, text: "text2"}, ...]`. User can submit only values that are in source (otherwise `null` is submitted). This is more like *dropdown* behavior. @class typeahead @extends list @since 1.4.1 @final @example <a href="#" id="country" data-type="typeahead" data-pk="1" data-url="/post" data-title="Input country"></a> <script> $(function(){ $('#country').editable({ value: 'ru', source: [ {value: 'gb', text: 'Great Britain'}, {value: 'us', text: 'United States'}, {value: 'ru', text: 'Russia'} ] }); }); </script> **/ (function ($) { "use strict"; var Constructor = function (options) { this.init('typeahead', options, Constructor.defaults); //overriding objects in config (as by default jQuery extend() is not recursive) this.options.typeahead = $.extend({}, Constructor.defaults.typeahead, { //set default methods for typeahead to work with objects matcher: this.matcher, sorter: this.sorter, highlighter: this.highlighter, updater: this.updater }, options.typeahead); }; $.fn.editableutils.inherit(Constructor, $.fn.editabletypes.list); $.extend(Constructor.prototype, { renderList: function() { this.$input = this.$tpl.is('input') ? this.$tpl : this.$tpl.find('input[type="text"]'); //set source of typeahead this.options.typeahead.source = this.sourceData; //apply typeahead this.$input.typeahead(this.options.typeahead); //patch some methods in typeahead var ta = this.$input.data('typeahead'); ta.render = $.proxy(this.typeaheadRender, ta); ta.select = $.proxy(this.typeaheadSelect, ta); ta.move = $.proxy(this.typeaheadMove, ta); this.renderClear(); this.setClass(); this.setAttr('placeholder'); }, value2htmlFinal: function(value, element) { if(this.getIsObjects()) { var items = $.fn.editableutils.itemsByValue(value, this.sourceData); value = items.length ? items[0].text : ''; } $.fn.editabletypes.abstractinput.prototype.value2html.call(this, value, element); }, html2value: function (html) { return html ? html : null; }, value2input: function(value) { if(this.getIsObjects()) { var items = $.fn.editableutils.itemsByValue(value, this.sourceData); this.$input.data('value', value).val(items.length ? items[0].text : ''); } else { this.$input.val(value); } }, input2value: function() { if(this.getIsObjects()) { var value = this.$input.data('value'), items = $.fn.editableutils.itemsByValue(value, this.sourceData); if(items.length && items[0].text.toLowerCase() === this.$input.val().toLowerCase()) { return value; } else { return null; //entered string not found in source } } else { return this.$input.val(); } }, /* if in sourceData values <> texts, typeahead in "objects" mode: user must pick some value from list, otherwise `null` returned. if all values == texts put typeahead in "strings" mode: anything what entered is submited. */ getIsObjects: function() { if(this.isObjects === undefined) { this.isObjects = false; for(var i=0; i<this.sourceData.length; i++) { if(this.sourceData[i].value !== this.sourceData[i].text) { this.isObjects = true; break; } } } return this.isObjects; }, /* Methods borrowed from text input */ activate: $.fn.editabletypes.text.prototype.activate, renderClear: $.fn.editabletypes.text.prototype.renderClear, postrender: $.fn.editabletypes.text.prototype.postrender, toggleClear: $.fn.editabletypes.text.prototype.toggleClear, clear: function() { $.fn.editabletypes.text.prototype.clear.call(this); this.$input.data('value', ''); }, /* Typeahead option methods used as defaults */ /*jshint eqeqeq:false, curly: false, laxcomma: true, asi: true*/ matcher: function (item) { return $.fn.typeahead.Constructor.prototype.matcher.call(this, item.text); }, sorter: function (items) { var beginswith = [] , caseSensitive = [] , caseInsensitive = [] , item , text; while (item = items.shift()) { text = item.text; if (!text.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item); else if (~text.indexOf(this.query)) caseSensitive.push(item); else caseInsensitive.push(item); } return beginswith.concat(caseSensitive, caseInsensitive); }, highlighter: function (item) { return $.fn.typeahead.Constructor.prototype.highlighter.call(this, item.text); }, updater: function (item) { this.$element.data('value', item.value); return item.text; }, /* Overwrite typeahead's render method to store objects. There are a lot of disscussion in bootstrap repo on this point and still no result. See https://github.com/twitter/bootstrap/issues/5967 This function just store item via jQuery data() method instead of attr('data-value') */ typeaheadRender: function (items) { var that = this; items = $(items).map(function (i, item) { // i = $(that.options.item).attr('data-value', item) i = $(that.options.item).data('item', item); i.find('a').html(that.highlighter(item)); return i[0]; }); //add option to disable autoselect of first line //see https://github.com/twitter/bootstrap/pull/4164 if (this.options.autoSelect) { items.first().addClass('active'); } this.$menu.html(items); return this; }, //add option to disable autoselect of first line //see https://github.com/twitter/bootstrap/pull/4164 typeaheadSelect: function () { var val = this.$menu.find('.active').data('item') if(this.options.autoSelect || val){ this.$element .val(this.updater(val)) .change() } return this.hide() }, /* if autoSelect = false and nothing matched we need extra press onEnter that is not convinient. This patch fixes it. */ typeaheadMove: function (e) { if (!this.shown) return switch(e.keyCode) { case 9: // tab case 13: // enter case 27: // escape if (!this.$menu.find('.active').length) return e.preventDefault() break case 38: // up arrow e.preventDefault() this.prev() break case 40: // down arrow e.preventDefault() this.next() break } e.stopPropagation() } /*jshint eqeqeq: true, curly: true, laxcomma: false, asi: false*/ }); Constructor.defaults = $.extend({}, $.fn.editabletypes.list.defaults, { /** @property tpl @default <input type="text"> **/ tpl:'<input type="text">', /** Configuration of typeahead. [Full list of options](http://getbootstrap.com/2.3.2/javascript.html#typeahead). @property typeahead @type object @default null **/ typeahead: null, /** Whether to show `clear` button @property clear @type boolean @default true **/ clear: true }); $.fn.editabletypes.typeahead = Constructor; }(window.jQuery));
node_modules/react-addons-transition-group/index.js
smaccoun/wrapid-react-ts
module.exports = require('react/lib/ReactTransitionGroup');
node_modules/react-icons/md/gif.js
bengimbel/Solstice-React-Contacts-Project
import React from 'react' import Icon from 'react-icon-base' const MdGif = props => ( <Icon viewBox="0 0 40 40" {...props}> <g><path d="m31.6 17.5h-5v1.6h3.4v2.5h-3.4v3.4h-2.5v-10h7.5v2.5z m-16.6-2.5c1 0 1.6 0.8 1.6 1.6v0.9h-5.7v5h3.2v-2.5h2.5v3.4c0 0.8-0.6 1.6-1.6 1.6h-5c-1 0-1.6-0.8-1.6-1.6v-6.8c0-0.8 0.6-1.6 1.6-1.6h5z m4.1 0h2.5v10h-2.5v-10z"/></g> </Icon> ) export default MdGif
final-project/public/metronic/ftfl02/assets/global/plugins/bootstrap-editable/bootstrap-editable/js/bootstrap-editable.js
WakilaFarzan/laravel_clss
/*! X-editable - v1.4.6 * In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery * http://github.com/vitalets/x-editable * Copyright (c) 2013 Vitaliy Potapov; Licensed MIT * Improved by Keenthemes for Bootstrap 3.0 support */ /** Form with single input element, two buttons and two states: normal/loading. Applied as jQuery method to DIV tag (not to form tag!). This is because form can be in loading state when spinner shown. Editableform is linked with one of input types, e.g. 'text', 'select' etc. @class editableform @uses text @uses textarea **/ (function ($) { "use strict"; var EditableForm = function (div, options) { this.options = $.extend({}, $.fn.editableform.defaults, options); this.$div = $(div); //div, containing form. Not form tag. Not editable-element. if(!this.options.scope) { this.options.scope = this; } //nothing shown after init }; EditableForm.prototype = { constructor: EditableForm, initInput: function() { //called once //take input from options (as it is created in editable-element) this.input = this.options.input; //set initial value //todo: may be add check: typeof str === 'string' ? this.value = this.input.str2value(this.options.value); }, initTemplate: function() { this.$form = $($.fn.editableform.template); }, initButtons: function() { var $btn = this.$form.find('.editable-buttons'); $btn.append($.fn.editableform.buttons); if(this.options.showbuttons === 'bottom') { $btn.addClass('editable-buttons-bottom'); } }, /** Renders editableform @method render **/ render: function() { //init loader this.$loading = $($.fn.editableform.loading); this.$div.empty().append(this.$loading); //init form template and buttons this.initTemplate(); if(this.options.showbuttons) { this.initButtons(); } else { this.$form.find('.editable-buttons').remove(); } //show loading state this.showLoading(); //flag showing is form now saving value to server. //It is needed to wait when closing form. this.isSaving = false; /** Fired when rendering starts @event rendering @param {Object} event event object **/ this.$div.triggerHandler('rendering'); //init input this.initInput(); //append input to form this.input.prerender(); this.$form.find('div.editable-input').append(this.input.$tpl); //append form to container this.$div.append(this.$form); //render input $.when(this.input.render()) .then($.proxy(function () { //setup input to submit automatically when no buttons shown if(!this.options.showbuttons) { this.input.autosubmit(); } //attach 'cancel' handler this.$form.find('.editable-cancel').click($.proxy(this.cancel, this)); if(this.input.error) { this.error(this.input.error); this.$form.find('.editable-submit').attr('disabled', true); this.input.$input.attr('disabled', true); //prevent form from submitting this.$form.submit(function(e){ e.preventDefault(); }); } else { this.error(false); this.input.$input.removeAttr('disabled'); this.$form.find('.editable-submit').removeAttr('disabled'); var value = (this.value === null || this.value === undefined || this.value === '') ? this.options.defaultValue : this.value; this.input.value2input(value); //attach submit handler this.$form.submit($.proxy(this.submit, this)); } /** Fired when form is rendered @event rendered @param {Object} event event object **/ this.$div.triggerHandler('rendered'); this.showForm(); //call postrender method to perform actions required visibility of form if(this.input.postrender) { this.input.postrender(); } }, this)); }, cancel: function() { /** Fired when form was cancelled by user @event cancel @param {Object} event event object **/ this.$div.triggerHandler('cancel'); }, showLoading: function() { var w, h; if(this.$form) { //set loading size equal to form w = this.$form.outerWidth(); h = this.$form.outerHeight(); if(w) { this.$loading.width(w); } if(h) { this.$loading.height(h); } this.$form.hide(); } else { //stretch loading to fill container width w = this.$loading.parent().width(); if(w) { this.$loading.width(w); } } this.$loading.show(); }, showForm: function(activate) { this.$loading.hide(); this.$form.show(); if(activate !== false) { this.input.activate(); } /** Fired when form is shown @event show @param {Object} event event object **/ this.$div.triggerHandler('show'); }, error: function(msg) { var $group = this.$form.find('.form-group'), $block = this.$form.find('.editable-error-block'), lines; if(msg === false) { $group.removeClass($.fn.editableform.errorGroupClass); $block.removeClass($.fn.editableform.errorBlockClass).empty().hide(); } else { //convert newline to <br> for more pretty error display if(msg) { lines = msg.split("\n"); for (var i = 0; i < lines.length; i++) { lines[i] = $('<div>').text(lines[i]).html(); } msg = lines.join('<br>'); } $group.addClass($.fn.editableform.errorGroupClass); $block.addClass($.fn.editableform.errorBlockClass).html(msg).show(); } }, submit: function(e) { e.stopPropagation(); e.preventDefault(); var error, newValue = this.input.input2value(); //get new value from input //validation if (error = this.validate(newValue)) { this.error(error); this.showForm(); return; } //if value not changed --> trigger 'nochange' event and return /*jslint eqeq: true*/ if (!this.options.savenochange && this.input.value2str(newValue) == this.input.value2str(this.value)) { /*jslint eqeq: false*/ /** Fired when value not changed but form is submitted. Requires savenochange = false. @event nochange @param {Object} event event object **/ this.$div.triggerHandler('nochange'); return; } //convert value for submitting to server var submitValue = this.input.value2submit(newValue); this.isSaving = true; //sending data to server $.when(this.save(submitValue)) .done($.proxy(function(response) { this.isSaving = false; //run success callback var res = typeof this.options.success === 'function' ? this.options.success.call(this.options.scope, response, newValue) : null; //if success callback returns false --> keep form open and do not activate input if(res === false) { this.error(false); this.showForm(false); return; } //if success callback returns string --> keep form open, show error and activate input if(typeof res === 'string') { this.error(res); this.showForm(); return; } //if success callback returns object like {newValue: <something>} --> use that value instead of submitted //it is usefull if you want to chnage value in url-function if(res && typeof res === 'object' && res.hasOwnProperty('newValue')) { newValue = res.newValue; } //clear error message this.error(false); this.value = newValue; /** Fired when form is submitted @event save @param {Object} event event object @param {Object} params additional params @param {mixed} params.newValue raw new value @param {mixed} params.submitValue submitted value as string @param {Object} params.response ajax response @example $('#form-div').on('save'), function(e, params){ if(params.newValue === 'username') {...} }); **/ this.$div.triggerHandler('save', {newValue: newValue, submitValue: submitValue, response: response}); }, this)) .fail($.proxy(function(xhr) { this.isSaving = false; var msg; if(typeof this.options.error === 'function') { msg = this.options.error.call(this.options.scope, xhr, newValue); } else { msg = typeof xhr === 'string' ? xhr : xhr.responseText || xhr.statusText || 'Unknown error!'; } this.error(msg); this.showForm(); }, this)); }, save: function(submitValue) { //try parse composite pk defined as json string in data-pk this.options.pk = $.fn.editableutils.tryParseJson(this.options.pk, true); var pk = (typeof this.options.pk === 'function') ? this.options.pk.call(this.options.scope) : this.options.pk, /* send on server in following cases: 1. url is function 2. url is string AND (pk defined OR send option = always) */ send = !!(typeof this.options.url === 'function' || (this.options.url && ((this.options.send === 'always') || (this.options.send === 'auto' && pk !== null && pk !== undefined)))), params; if (send) { //send to server this.showLoading(); //standard params params = { name: this.options.name || '', value: submitValue, pk: pk }; //additional params if(typeof this.options.params === 'function') { params = this.options.params.call(this.options.scope, params); } else { //try parse json in single quotes (from data-params attribute) this.options.params = $.fn.editableutils.tryParseJson(this.options.params, true); $.extend(params, this.options.params); } if(typeof this.options.url === 'function') { //user's function return this.options.url.call(this.options.scope, params); } else { //send ajax to server and return deferred object return $.ajax($.extend({ url : this.options.url, data : params, type : 'POST' }, this.options.ajaxOptions)); } } }, validate: function (value) { if (value === undefined) { value = this.value; } if (typeof this.options.validate === 'function') { return this.options.validate.call(this.options.scope, value); } }, option: function(key, value) { if(key in this.options) { this.options[key] = value; } if(key === 'value') { this.setValue(value); } //do not pass option to input as it is passed in editable-element }, setValue: function(value, convertStr) { if(convertStr) { this.value = this.input.str2value(value); } else { this.value = value; } //if form is visible, update input if(this.$form && this.$form.is(':visible')) { this.input.value2input(this.value); } } }; /* Initialize editableform. Applied to jQuery object. @method $().editableform(options) @params {Object} options @example var $form = $('&lt;div&gt;').editableform({ type: 'text', name: 'username', url: '/post', value: 'vitaliy' }); //to display form you should call 'render' method $form.editableform('render'); */ $.fn.editableform = function (option) { var args = arguments; return this.each(function () { var $this = $(this), data = $this.data('editableform'), options = typeof option === 'object' && option; if (!data) { $this.data('editableform', (data = new EditableForm(this, options))); } if (typeof option === 'string') { //call method data[option].apply(data, Array.prototype.slice.call(args, 1)); } }); }; //keep link to constructor to allow inheritance $.fn.editableform.Constructor = EditableForm; //defaults $.fn.editableform.defaults = { /* see also defaults for input */ /** Type of input. Can be <code>text|textarea|select|date|checklist</code> @property type @type string @default 'text' **/ type: 'text', /** Url for submit, e.g. <code>'/post'</code> If function - it will be called instead of ajax. Function should return deferred object to run fail/done callbacks. @property url @type string|function @default null @example url: function(params) { var d = new $.Deferred; if(params.value === 'abc') { return d.reject('error message'); //returning error via deferred object } else { //async saving data in js model someModel.asyncSaveMethod({ ..., success: function(){ d.resolve(); } }); return d.promise(); } } **/ url:null, /** Additional params for submit. If defined as <code>object</code> - it is **appended** to original ajax data (pk, name and value). If defined as <code>function</code> - returned object **overwrites** original ajax data. @example params: function(params) { //originally params contain pk, name and value params.a = 1; return params; } @property params @type object|function @default null **/ params:null, /** Name of field. Will be submitted on server. Can be taken from <code>id</code> attribute @property name @type string @default null **/ name: null, /** Primary key of editable object (e.g. record id in database). For composite keys use object, e.g. <code>{id: 1, lang: 'en'}</code>. Can be calculated dynamically via function. @property pk @type string|object|function @default null **/ pk: null, /** Initial value. If not defined - will be taken from element's content. For __select__ type should be defined (as it is ID of shown text). @property value @type string|object @default null **/ value: null, /** Value that will be displayed in input if original field value is empty (`null|undefined|''`). @property defaultValue @type string|object @default null @since 1.4.6 **/ defaultValue: null, /** Strategy for sending data on server. Can be `auto|always|never`. When 'auto' data will be sent on server **only if pk and url defined**, otherwise new value will be stored locally. @property send @type string @default 'auto' **/ send: 'auto', /** Function for client-side validation. If returns string - means validation not passed and string showed as error. @property validate @type function @default null @example validate: function(value) { if($.trim(value) == '') { return 'This field is required'; } } **/ validate: null, /** Success callback. Called when value successfully sent on server and **response status = 200**. Usefull to work with json response. For example, if your backend response can be <code>{success: true}</code> or <code>{success: false, msg: "server error"}</code> you can check it inside this callback. If it returns **string** - means error occured and string is shown as error message. If it returns **object like** <code>{newValue: &lt;something&gt;}</code> - it overwrites value, submitted by user. Otherwise newValue simply rendered into element. @property success @type function @default null @example success: function(response, newValue) { if(!response.success) return response.msg; } **/ success: null, /** Error callback. Called when request failed (response status != 200). Usefull when you want to parse error response and display a custom message. Must return **string** - the message to be displayed in the error block. @property error @type function @default null @since 1.4.4 @example error: function(response, newValue) { if(response.status === 500) { return 'Service unavailable. Please try later.'; } else { return response.responseText; } } **/ error: null, /** Additional options for submit ajax request. List of values: http://api.jquery.com/jQuery.ajax @property ajaxOptions @type object @default null @since 1.1.1 @example ajaxOptions: { type: 'put', dataType: 'json' } **/ ajaxOptions: null, /** Where to show buttons: left(true)|bottom|false Form without buttons is auto-submitted. @property showbuttons @type boolean|string @default true @since 1.1.1 **/ showbuttons: true, /** Scope for callback methods (success, validate). If <code>null</code> means editableform instance itself. @property scope @type DOMElement|object @default null @since 1.2.0 @private **/ scope: null, /** Whether to save or cancel value when it was not changed but form was submitted @property savenochange @type boolean @default false @since 1.2.0 **/ savenochange: false }; /* Note: following params could redefined in engine: bootstrap or jqueryui: Classes 'form-group' and 'editable-error-block' must always present! */ $.fn.editableform.template = '<form class="form-inline editableform">'+ '<div class="form-group">' + '<div><div class="editable-input"></div><div class="editable-buttons"></div></div>'+ '<div class="editable-error-block"></div>' + '</div>' + '</form>'; //loading div $.fn.editableform.loading = '<div class="editableform-loading"></div>'; //buttons $.fn.editableform.buttons = '<button type="submit" class="editable-submit">ok</button>'+ '<button type="button" class="editable-cancel">cancel</button>'; //error class attached to form-group $.fn.editableform.errorGroupClass = 'has-error'; //error class attached to editable-error-block $.fn.editableform.errorBlockClass = 'editable-error'; }(window.jQuery)); /** * EditableForm utilites */ (function ($) { "use strict"; //utils $.fn.editableutils = { /** * classic JS inheritance function */ inherit: function (Child, Parent) { var F = function() { }; F.prototype = Parent.prototype; Child.prototype = new F(); Child.prototype.constructor = Child; Child.superclass = Parent.prototype; }, /** * set caret position in input * see http://stackoverflow.com/questions/499126/jquery-set-cursor-position-in-text-area */ setCursorPosition: function(elem, pos) { if (elem.setSelectionRange) { elem.setSelectionRange(pos, pos); } else if (elem.createTextRange) { var range = elem.createTextRange(); range.collapse(true); range.moveEnd('character', pos); range.moveStart('character', pos); range.select(); } }, /** * function to parse JSON in *single* quotes. (jquery automatically parse only double quotes) * That allows such code as: <a data-source="{'a': 'b', 'c': 'd'}"> * safe = true --> means no exception will be thrown * for details see http://stackoverflow.com/questions/7410348/how-to-set-json-format-to-html5-data-attributes-in-the-jquery */ tryParseJson: function(s, safe) { if (typeof s === 'string' && s.length && s.match(/^[\{\[].*[\}\]]$/)) { if (safe) { try { /*jslint evil: true*/ s = (new Function('return ' + s))(); /*jslint evil: false*/ } catch (e) {} finally { return s; } } else { /*jslint evil: true*/ s = (new Function('return ' + s))(); /*jslint evil: false*/ } } return s; }, /** * slice object by specified keys */ sliceObj: function(obj, keys, caseSensitive /* default: false */) { var key, keyLower, newObj = {}; if (!$.isArray(keys) || !keys.length) { return newObj; } for (var i = 0; i < keys.length; i++) { key = keys[i]; if (obj.hasOwnProperty(key)) { newObj[key] = obj[key]; } if(caseSensitive === true) { continue; } //when getting data-* attributes via $.data() it's converted to lowercase. //details: http://stackoverflow.com/questions/7602565/using-data-attributes-with-jquery //workaround is code below. keyLower = key.toLowerCase(); if (obj.hasOwnProperty(keyLower)) { newObj[key] = obj[keyLower]; } } return newObj; }, /* exclude complex objects from $.data() before pass to config */ getConfigData: function($element) { var data = {}; $.each($element.data(), function(k, v) { if(typeof v !== 'object' || (v && typeof v === 'object' && (v.constructor === Object || v.constructor === Array))) { data[k] = v; } }); return data; }, /* returns keys of object */ objectKeys: function(o) { if (Object.keys) { return Object.keys(o); } else { if (o !== Object(o)) { throw new TypeError('Object.keys called on a non-object'); } var k=[], p; for (p in o) { if (Object.prototype.hasOwnProperty.call(o,p)) { k.push(p); } } return k; } }, /** method to escape html. **/ escape: function(str) { return $('<div>').text(str).html(); }, /* returns array items from sourceData having value property equal or inArray of 'value' */ itemsByValue: function(value, sourceData, valueProp) { if(!sourceData || value === null) { return []; } if (typeof(valueProp) !== "function") { var idKey = valueProp || 'value'; valueProp = function (e) { return e[idKey]; }; } var isValArray = $.isArray(value), result = [], that = this; $.each(sourceData, function(i, o) { if(o.children) { result = result.concat(that.itemsByValue(value, o.children, valueProp)); } else { /*jslint eqeq: true*/ if(isValArray) { if($.grep(value, function(v){ return v == (o && typeof o === 'object' ? valueProp(o) : o); }).length) { result.push(o); } } else { var itemValue = (o && (typeof o === 'object')) ? valueProp(o) : o; if(value == itemValue) { result.push(o); } } /*jslint eqeq: false*/ } }); return result; }, /* Returns input by options: type, mode. */ createInput: function(options) { var TypeConstructor, typeOptions, input, type = options.type; //`date` is some kind of virtual type that is transformed to one of exact types //depending on mode and core lib if(type === 'date') { //inline if(options.mode === 'inline') { if($.fn.editabletypes.datefield) { type = 'datefield'; } else if($.fn.editabletypes.dateuifield) { type = 'dateuifield'; } //popup } else { if($.fn.editabletypes.date) { type = 'date'; } else if($.fn.editabletypes.dateui) { type = 'dateui'; } } //if type still `date` and not exist in types, replace with `combodate` that is base input if(type === 'date' && !$.fn.editabletypes.date) { type = 'combodate'; } } //`datetime` should be datetimefield in 'inline' mode if(type === 'datetime' && options.mode === 'inline') { type = 'datetimefield'; } //change wysihtml5 to textarea for jquery UI and plain versions if(type === 'wysihtml5' && !$.fn.editabletypes[type]) { type = 'textarea'; } //create input of specified type. Input will be used for converting value, not in form if(typeof $.fn.editabletypes[type] === 'function') { TypeConstructor = $.fn.editabletypes[type]; typeOptions = this.sliceObj(options, this.objectKeys(TypeConstructor.defaults)); input = new TypeConstructor(typeOptions); return input; } else { $.error('Unknown type: '+ type); return false; } }, //see http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr supportsTransitions: function () { var b = document.body || document.documentElement, s = b.style, p = 'transition', v = ['Moz', 'Webkit', 'Khtml', 'O', 'ms']; if(typeof s[p] === 'string') { return true; } // Tests for vendor specific prop p = p.charAt(0).toUpperCase() + p.substr(1); for(var i=0; i<v.length; i++) { if(typeof s[v[i] + p] === 'string') { return true; } } return false; } }; }(window.jQuery)); /** Attaches stand-alone container with editable-form to HTML element. Element is used only for positioning, value is not stored anywhere.<br> This method applied internally in <code>$().editable()</code>. You should subscribe on it's events (save / cancel) to get profit of it.<br> Final realization can be different: bootstrap-popover, jqueryui-tooltip, poshytip, inline-div. It depends on which js file you include.<br> Applied as jQuery method. @class editableContainer @uses editableform **/ (function ($) { "use strict"; var Popup = function (element, options) { this.init(element, options); }; var Inline = function (element, options) { this.init(element, options); }; //methods Popup.prototype = { containerName: null, //method to call container on element containerDataName: null, //object name in element's .data() innerCss: null, //tbd in child class containerClass: 'editable-container editable-popup', //css class applied to container element init: function(element, options) { this.$element = $(element); //since 1.4.1 container do not use data-* directly as they already merged into options. this.options = $.extend({}, $.fn.editableContainer.defaults, options); this.splitOptions(); //set scope of form callbacks to element this.formOptions.scope = this.$element[0]; this.initContainer(); //flag to hide container, when saving value will finish this.delayedHide = false; //bind 'destroyed' listener to destroy container when element is removed from dom this.$element.on('destroyed', $.proxy(function(){ this.destroy(); }, this)); //attach document handler to close containers on click / escape if(!$(document).data('editable-handlers-attached')) { //close all on escape $(document).on('keyup.editable', function (e) { if (e.which === 27) { $('.editable-open').editableContainer('hide'); //todo: return focus on element } }); //close containers when click outside //(mousedown could be better than click, it closes everything also on drag drop) $(document).on('click.editable', function(e) { var $target = $(e.target), i, exclude_classes = ['.editable-container', '.ui-datepicker-header', '.datepicker', //in inline mode datepicker is rendered into body '.modal-backdrop', '.bootstrap-wysihtml5-insert-image-modal', '.bootstrap-wysihtml5-insert-link-modal' ]; //check if element is detached. It occurs when clicking in bootstrap datepicker if (!$.contains(document.documentElement, e.target)) { return; } //for some reason FF 20 generates extra event (click) in select2 widget with e.target = document //we need to filter it via construction below. See https://github.com/vitalets/x-editable/issues/199 //Possibly related to http://stackoverflow.com/questions/10119793/why-does-firefox-react-differently-from-webkit-and-ie-to-click-event-on-selec if($target.is(document)) { return; } //if click inside one of exclude classes --> no nothing for(i=0; i<exclude_classes.length; i++) { if($target.is(exclude_classes[i]) || $target.parents(exclude_classes[i]).length) { return; } } //close all open containers (except one - target) Popup.prototype.closeOthers(e.target); }); $(document).data('editable-handlers-attached', true); } }, //split options on containerOptions and formOptions splitOptions: function() { this.containerOptions = {}; this.formOptions = {}; if(!$.fn[this.containerName]) { throw new Error(this.containerName + ' not found. Have you included corresponding js file?'); } var cDef = $.fn[this.containerName].defaults; //keys defined in container defaults go to container, others go to form for(var k in this.options) { if(k in cDef) { this.containerOptions[k] = this.options[k]; } else { this.formOptions[k] = this.options[k]; } } }, /* Returns jquery object of container @method tip() */ tip: function() { return this.container() ? this.container().$tip : null; }, /* returns container object */ container: function() { var container; //first, try get it by `containerDataName` if(this.containerDataName) { if(container = this.$element.data(this.containerDataName)) { return container; } } //second, try `containerName` container = this.$element.data(this.containerName); return container; }, /* call native method of underlying container, e.g. this.$element.popover('method') */ call: function() { this.$element[this.containerName].apply(this.$element, arguments); }, initContainer: function(){ this.call(this.containerOptions); }, renderForm: function() { this.$form .editableform(this.formOptions) .on({ save: $.proxy(this.save, this), //click on submit button (value changed) nochange: $.proxy(function(){ this.hide('nochange'); }, this), //click on submit button (value NOT changed) cancel: $.proxy(function(){ this.hide('cancel'); }, this), //click on calcel button show: $.proxy(function() { if(this.delayedHide) { this.hide(this.delayedHide.reason); this.delayedHide = false; } else { this.setPosition(); } }, this), //re-position container every time form is shown (occurs each time after loading state) rendering: $.proxy(this.setPosition, this), //this allows to place container correctly when loading shown resize: $.proxy(this.setPosition, this), //this allows to re-position container when form size is changed rendered: $.proxy(function(){ /** Fired when container is shown and form is rendered (for select will wait for loading dropdown options). **Note:** Bootstrap popover has own `shown` event that now cannot be separated from x-editable's one. The workaround is to check `arguments.length` that is always `2` for x-editable. @event shown @param {Object} event event object @example $('#username').on('shown', function(e, editable) { editable.input.$input.val('overwriting value of input..'); }); **/ /* TODO: added second param mainly to distinguish from bootstrap's shown event. It's a hotfix that will be solved in future versions via namespaced events. */ this.$element.triggerHandler('shown', $(this.options.scope).data('editable')); }, this) }) .editableform('render'); }, /** Shows container with form @method show() @param {boolean} closeAll Whether to close all other editable containers when showing this one. Default true. **/ /* Note: poshytip owerwrites this method totally! */ show: function (closeAll) { this.$element.addClass('editable-open'); if(closeAll !== false) { //close all open containers (except this) this.closeOthers(this.$element[0]); } //show container itself this.innerShow(); this.tip().addClass(this.containerClass); /* Currently, form is re-rendered on every show. The main reason is that we dont know, what will container do with content when closed: remove(), detach() or just hide() - it depends on container. Detaching form itself before hide and re-insert before show is good solution, but visually it looks ugly --> container changes size before hide. */ //if form already exist - delete previous data if(this.$form) { //todo: destroy prev data! //this.$form.destroy(); } this.$form = $('<div>'); //insert form into container body if(this.tip().is(this.innerCss)) { //for inline container this.tip().append(this.$form); } else { this.tip().find(this.innerCss).append(this.$form); } //render form this.renderForm(); }, /** Hides container with form @method hide() @param {string} reason Reason caused hiding. Can be <code>save|cancel|onblur|nochange|undefined (=manual)</code> **/ hide: function(reason) { if(!this.tip() || !this.tip().is(':visible') || !this.$element.hasClass('editable-open')) { return; } //if form is saving value, schedule hide if(this.$form.data('editableform').isSaving) { this.delayedHide = {reason: reason}; return; } else { this.delayedHide = false; } this.$element.removeClass('editable-open'); this.innerHide(); /** Fired when container was hidden. It occurs on both save or cancel. **Note:** Bootstrap popover has own `hidden` event that now cannot be separated from x-editable's one. The workaround is to check `arguments.length` that is always `2` for x-editable. @event hidden @param {object} event event object @param {string} reason Reason caused hiding. Can be <code>save|cancel|onblur|nochange|manual</code> @example $('#username').on('hidden', function(e, reason) { if(reason === 'save' || reason === 'cancel') { //auto-open next editable $(this).closest('tr').next().find('.editable').editable('show'); } }); **/ this.$element.triggerHandler('hidden', reason || 'manual'); }, /* internal show method. To be overwritten in child classes */ innerShow: function () { }, /* internal hide method. To be overwritten in child classes */ innerHide: function () { }, /** Toggles container visibility (show / hide) @method toggle() @param {boolean} closeAll Whether to close all other editable containers when showing this one. Default true. **/ toggle: function(closeAll) { if(this.container() && this.tip() && this.tip().is(':visible')) { this.hide(); } else { this.show(closeAll); } }, /* Updates the position of container when content changed. @method setPosition() */ setPosition: function() { //tbd in child class }, save: function(e, params) { /** Fired when new value was submitted. You can use <code>$(this).data('editableContainer')</code> inside handler to access to editableContainer instance @event save @param {Object} event event object @param {Object} params additional params @param {mixed} params.newValue submitted value @param {Object} params.response ajax response @example $('#username').on('save', function(e, params) { //assuming server response: '{success: true}' var pk = $(this).data('editableContainer').options.pk; if(params.response && params.response.success) { alert('value: ' + params.newValue + ' with pk: ' + pk + ' saved!'); } else { alert('error!'); } }); **/ this.$element.triggerHandler('save', params); //hide must be after trigger, as saving value may require methods of plugin, applied to input this.hide('save'); }, /** Sets new option @method option(key, value) @param {string} key @param {mixed} value **/ option: function(key, value) { this.options[key] = value; if(key in this.containerOptions) { this.containerOptions[key] = value; this.setContainerOption(key, value); } else { this.formOptions[key] = value; if(this.$form) { this.$form.editableform('option', key, value); } } }, setContainerOption: function(key, value) { this.call('option', key, value); }, /** Destroys the container instance @method destroy() **/ destroy: function() { this.hide(); this.innerDestroy(); this.$element.off('destroyed'); this.$element.removeData('editableContainer'); }, /* to be overwritten in child classes */ innerDestroy: function() { }, /* Closes other containers except one related to passed element. Other containers can be cancelled or submitted (depends on onblur option) */ closeOthers: function(element) { $('.editable-open').each(function(i, el){ //do nothing with passed element and it's children if(el === element || $(el).find(element).length) { return; } //otherwise cancel or submit all open containers var $el = $(el), ec = $el.data('editableContainer'); if(!ec) { return; } if(ec.options.onblur === 'cancel') { $el.data('editableContainer').hide('onblur'); } else if(ec.options.onblur === 'submit') { $el.data('editableContainer').tip().find('form').submit(); } }); }, /** Activates input of visible container (e.g. set focus) @method activate() **/ activate: function() { if(this.tip && this.tip().is(':visible') && this.$form) { this.$form.data('editableform').input.activate(); } } }; /** jQuery method to initialize editableContainer. @method $().editableContainer(options) @params {Object} options @example $('#edit').editableContainer({ type: 'text', url: '/post', pk: 1, value: 'hello' }); **/ $.fn.editableContainer = function (option) { var args = arguments; return this.each(function () { var $this = $(this), dataKey = 'editableContainer', data = $this.data(dataKey), options = typeof option === 'object' && option, Constructor = (options.mode === 'inline') ? Inline : Popup; if (!data) { $this.data(dataKey, (data = new Constructor(this, options))); } if (typeof option === 'string') { //call method data[option].apply(data, Array.prototype.slice.call(args, 1)); } }); }; //store constructors $.fn.editableContainer.Popup = Popup; $.fn.editableContainer.Inline = Inline; //defaults $.fn.editableContainer.defaults = { /** Initial value of form input @property value @type mixed @default null @private **/ value: null, /** Placement of container relative to element. Can be <code>top|right|bottom|left</code>. Not used for inline container. @property placement @type string @default 'top' **/ placement: 'top', /** Whether to hide container on save/cancel. @property autohide @type boolean @default true @private **/ autohide: true, /** Action when user clicks outside the container. Can be <code>cancel|submit|ignore</code>. Setting <code>ignore</code> allows to have several containers open. @property onblur @type string @default 'cancel' @since 1.1.1 **/ onblur: 'cancel', /** Animation speed (inline mode only) @property anim @type string @default false **/ anim: false, /** Mode of editable, can be `popup` or `inline` @property mode @type string @default 'popup' @since 1.4.0 **/ mode: 'popup' }; /* * workaround to have 'destroyed' event to destroy popover when element is destroyed * see http://stackoverflow.com/questions/2200494/jquery-trigger-event-when-an-element-is-removed-from-the-dom */ jQuery.event.special.destroyed = { remove: function(o) { if (o.handler) { o.handler(); } } }; }(window.jQuery)); /** * Editable Inline * --------------------- */ (function ($) { "use strict"; //copy prototype from EditableContainer //extend methods $.extend($.fn.editableContainer.Inline.prototype, $.fn.editableContainer.Popup.prototype, { containerName: 'editableform', innerCss: '.editable-inline', containerClass: 'editable-container editable-inline', //css class applied to container element initContainer: function(){ //container is <span> element this.$tip = $('<span></span>'); //convert anim to miliseconds (int) if(!this.options.anim) { this.options.anim = 0; } }, splitOptions: function() { //all options are passed to form this.containerOptions = {}; this.formOptions = this.options; }, tip: function() { return this.$tip; }, innerShow: function () { this.$element.hide(); this.tip().insertAfter(this.$element).show(); }, innerHide: function () { this.$tip.hide(this.options.anim, $.proxy(function() { this.$element.show(); this.innerDestroy(); }, this)); }, innerDestroy: function() { if(this.tip()) { this.tip().empty().remove(); } } }); }(window.jQuery)); /** Makes editable any HTML element on the page. Applied as jQuery method. @class editable @uses editableContainer **/ (function ($) { "use strict"; var Editable = function (element, options) { this.$element = $(element); //data-* has more priority over js options: because dynamically created elements may change data-* this.options = $.extend({}, $.fn.editable.defaults, options, $.fn.editableutils.getConfigData(this.$element)); if(this.options.selector) { this.initLive(); } else { this.init(); } //check for transition support if(this.options.highlight && !$.fn.editableutils.supportsTransitions()) { this.options.highlight = false; } }; Editable.prototype = { constructor: Editable, init: function () { var isValueByText = false, doAutotext, finalize; //name this.options.name = this.options.name || this.$element.attr('id'); //create input of specified type. Input needed already here to convert value for initial display (e.g. show text by id for select) //also we set scope option to have access to element inside input specific callbacks (e. g. source as function) this.options.scope = this.$element[0]; this.input = $.fn.editableutils.createInput(this.options); if(!this.input) { return; } //set value from settings or by element's text if (this.options.value === undefined || this.options.value === null) { this.value = this.input.html2value($.trim(this.$element.html())); isValueByText = true; } else { /* value can be string when received from 'data-value' attribute for complext objects value can be set as json string in data-value attribute, e.g. data-value="{city: 'Moscow', street: 'Lenina'}" */ this.options.value = $.fn.editableutils.tryParseJson(this.options.value, true); if(typeof this.options.value === 'string') { this.value = this.input.str2value(this.options.value); } else { this.value = this.options.value; } } //add 'editable' class to every editable element this.$element.addClass('editable'); //specifically for "textarea" add class .editable-pre-wrapped to keep linebreaks if(this.input.type === 'textarea') { this.$element.addClass('editable-pre-wrapped'); } //attach handler activating editable. In disabled mode it just prevent default action (useful for links) if(this.options.toggle !== 'manual') { this.$element.addClass('editable-click'); this.$element.on(this.options.toggle + '.editable', $.proxy(function(e){ //prevent following link if editable enabled if(!this.options.disabled) { e.preventDefault(); } //stop propagation not required because in document click handler it checks event target //e.stopPropagation(); if(this.options.toggle === 'mouseenter') { //for hover only show container this.show(); } else { //when toggle='click' we should not close all other containers as they will be closed automatically in document click listener var closeAll = (this.options.toggle !== 'click'); this.toggle(closeAll); } }, this)); } else { this.$element.attr('tabindex', -1); //do not stop focus on element when toggled manually } //if display is function it's far more convinient to have autotext = always to render correctly on init //see https://github.com/vitalets/x-editable-yii/issues/34 if(typeof this.options.display === 'function') { this.options.autotext = 'always'; } //check conditions for autotext: switch(this.options.autotext) { case 'always': doAutotext = true; break; case 'auto': //if element text is empty and value is defined and value not generated by text --> run autotext doAutotext = !$.trim(this.$element.text()).length && this.value !== null && this.value !== undefined && !isValueByText; break; default: doAutotext = false; } //depending on autotext run render() or just finilize init $.when(doAutotext ? this.render() : true).then($.proxy(function() { if(this.options.disabled) { this.disable(); } else { this.enable(); } /** Fired when element was initialized by `$().editable()` method. Please note that you should setup `init` handler **before** applying `editable`. @event init @param {Object} event event object @param {Object} editable editable instance (as here it cannot accessed via data('editable')) @since 1.2.0 @example $('#username').on('init', function(e, editable) { alert('initialized ' + editable.options.name); }); $('#username').editable(); **/ this.$element.triggerHandler('init', this); }, this)); }, /* Initializes parent element for live editables */ initLive: function() { //store selector var selector = this.options.selector; //modify options for child elements this.options.selector = false; this.options.autotext = 'never'; //listen toggle events this.$element.on(this.options.toggle + '.editable', selector, $.proxy(function(e){ var $target = $(e.target); if(!$target.data('editable')) { //if delegated element initially empty, we need to clear it's text (that was manually set to `empty` by user) //see https://github.com/vitalets/x-editable/issues/137 if($target.hasClass(this.options.emptyclass)) { $target.empty(); } $target.editable(this.options).trigger(e); } }, this)); }, /* Renders value into element's text. Can call custom display method from options. Can return deferred object. @method render() @param {mixed} response server response (if exist) to pass into display function */ render: function(response) { //do not display anything if(this.options.display === false) { return; } //if input has `value2htmlFinal` method, we pass callback in third param to be called when source is loaded if(this.input.value2htmlFinal) { return this.input.value2html(this.value, this.$element[0], this.options.display, response); //if display method defined --> use it } else if(typeof this.options.display === 'function') { return this.options.display.call(this.$element[0], this.value, response); //else use input's original value2html() method } else { return this.input.value2html(this.value, this.$element[0]); } }, /** Enables editable @method enable() **/ enable: function() { this.options.disabled = false; this.$element.removeClass('editable-disabled'); this.handleEmpty(this.isEmpty); if(this.options.toggle !== 'manual') { if(this.$element.attr('tabindex') === '-1') { this.$element.removeAttr('tabindex'); } } }, /** Disables editable @method disable() **/ disable: function() { this.options.disabled = true; this.hide(); this.$element.addClass('editable-disabled'); this.handleEmpty(this.isEmpty); //do not stop focus on this element this.$element.attr('tabindex', -1); }, /** Toggles enabled / disabled state of editable element @method toggleDisabled() **/ toggleDisabled: function() { if(this.options.disabled) { this.enable(); } else { this.disable(); } }, /** Sets new option @method option(key, value) @param {string|object} key option name or object with several options @param {mixed} value option new value @example $('.editable').editable('option', 'pk', 2); **/ option: function(key, value) { //set option(s) by object if(key && typeof key === 'object') { $.each(key, $.proxy(function(k, v){ this.option($.trim(k), v); }, this)); return; } //set option by string this.options[key] = value; //disabled if(key === 'disabled') { return value ? this.disable() : this.enable(); } //value if(key === 'value') { this.setValue(value); } //transfer new option to container! if(this.container) { this.container.option(key, value); } //pass option to input directly (as it points to the same in form) if(this.input.option) { this.input.option(key, value); } }, /* * set emptytext if element is empty */ handleEmpty: function (isEmpty) { //do not handle empty if we do not display anything if(this.options.display === false) { return; } /* isEmpty may be set directly as param of method. It is required when we enable/disable field and can't rely on content as node content is text: "Empty" that is not empty %) */ if(isEmpty !== undefined) { this.isEmpty = isEmpty; } else { //detect empty if($.trim(this.$element.html()) === '') { this.isEmpty = true; } else if($.trim(this.$element.text()) !== '') { this.isEmpty = false; } else { //e.g. '<img>' this.isEmpty = !this.$element.height() || !this.$element.width(); } } //emptytext shown only for enabled if(!this.options.disabled) { if (this.isEmpty) { this.$element.html(this.options.emptytext); if(this.options.emptyclass) { this.$element.addClass(this.options.emptyclass); } } else if(this.options.emptyclass) { this.$element.removeClass(this.options.emptyclass); } } else { //below required if element disable property was changed if(this.isEmpty) { this.$element.empty(); if(this.options.emptyclass) { this.$element.removeClass(this.options.emptyclass); } } } }, /** Shows container with form @method show() @param {boolean} closeAll Whether to close all other editable containers when showing this one. Default true. **/ show: function (closeAll) { if(this.options.disabled) { return; } //init editableContainer: popover, tooltip, inline, etc.. if(!this.container) { var containerOptions = $.extend({}, this.options, { value: this.value, input: this.input //pass input to form (as it is already created) }); this.$element.editableContainer(containerOptions); //listen `save` event this.$element.on("save.internal", $.proxy(this.save, this)); this.container = this.$element.data('editableContainer'); } else if(this.container.tip().is(':visible')) { return; } //show container this.container.show(closeAll); }, /** Hides container with form @method hide() **/ hide: function () { if(this.container) { this.container.hide(); } }, /** Toggles container visibility (show / hide) @method toggle() @param {boolean} closeAll Whether to close all other editable containers when showing this one. Default true. **/ toggle: function(closeAll) { if(this.container && this.container.tip().is(':visible')) { this.hide(); } else { this.show(closeAll); } }, /* * called when form was submitted */ save: function(e, params) { //mark element with unsaved class if needed if(this.options.unsavedclass) { /* Add unsaved css to element if: - url is not user's function - value was not sent to server - params.response === undefined, that means data was not sent - value changed */ var sent = false; sent = sent || typeof this.options.url === 'function'; sent = sent || this.options.display === false; sent = sent || params.response !== undefined; sent = sent || (this.options.savenochange && this.input.value2str(this.value) !== this.input.value2str(params.newValue)); if(sent) { this.$element.removeClass(this.options.unsavedclass); } else { this.$element.addClass(this.options.unsavedclass); } } //highlight when saving if(this.options.highlight) { var $e = this.$element, bgColor = $e.css('background-color'); $e.css('background-color', this.options.highlight); setTimeout(function(){ if(bgColor === 'transparent') { bgColor = ''; } $e.css('background-color', bgColor); $e.addClass('editable-bg-transition'); setTimeout(function(){ $e.removeClass('editable-bg-transition'); }, 1700); }, 10); } //set new value this.setValue(params.newValue, false, params.response); /** Fired when new value was submitted. You can use <code>$(this).data('editable')</code> to access to editable instance @event save @param {Object} event event object @param {Object} params additional params @param {mixed} params.newValue submitted value @param {Object} params.response ajax response @example $('#username').on('save', function(e, params) { alert('Saved value: ' + params.newValue); }); **/ //event itself is triggered by editableContainer. Description here is only for documentation }, validate: function () { if (typeof this.options.validate === 'function') { return this.options.validate.call(this, this.value); } }, /** Sets new value of editable @method setValue(value, convertStr) @param {mixed} value new value @param {boolean} convertStr whether to convert value from string to internal format **/ setValue: function(value, convertStr, response) { if(convertStr) { this.value = this.input.str2value(value); } else { this.value = value; } if(this.container) { this.container.option('value', this.value); } $.when(this.render(response)) .then($.proxy(function() { this.handleEmpty(); }, this)); }, /** Activates input of visible container (e.g. set focus) @method activate() **/ activate: function() { if(this.container) { this.container.activate(); } }, /** Removes editable feature from element @method destroy() **/ destroy: function() { this.disable(); if(this.container) { this.container.destroy(); } this.input.destroy(); if(this.options.toggle !== 'manual') { this.$element.removeClass('editable-click'); this.$element.off(this.options.toggle + '.editable'); } this.$element.off("save.internal"); this.$element.removeClass('editable editable-open editable-disabled'); this.$element.removeData('editable'); } }; /* EDITABLE PLUGIN DEFINITION * ======================= */ /** jQuery method to initialize editable element. @method $().editable(options) @params {Object} options @example $('#username').editable({ type: 'text', url: '/post', pk: 1 }); **/ $.fn.editable = function (option) { //special API methods returning non-jquery object var result = {}, args = arguments, datakey = 'editable'; switch (option) { /** Runs client-side validation for all matched editables @method validate() @returns {Object} validation errors map @example $('#username, #fullname').editable('validate'); // possible result: { username: "username is required", fullname: "fullname should be minimum 3 letters length" } **/ case 'validate': this.each(function () { var $this = $(this), data = $this.data(datakey), error; if (data && (error = data.validate())) { result[data.options.name] = error; } }); return result; /** Returns current values of editable elements. Note that it returns an **object** with name-value pairs, not a value itself. It allows to get data from several elements. If value of some editable is `null` or `undefined` it is excluded from result object. When param `isSingle` is set to **true** - it is supposed you have single element and will return value of editable instead of object. @method getValue() @param {bool} isSingle whether to return just value of single element @returns {Object} object of element names and values @example $('#username, #fullname').editable('getValue'); //result: { username: "superuser", fullname: "John" } //isSingle = true $('#username').editable('getValue', true); //result "superuser" **/ case 'getValue': if(arguments.length === 2 && arguments[1] === true) { //isSingle = true result = this.eq(0).data(datakey).value; } else { this.each(function () { var $this = $(this), data = $this.data(datakey); if (data && data.value !== undefined && data.value !== null) { result[data.options.name] = data.input.value2submit(data.value); } }); } return result; /** This method collects values from several editable elements and submit them all to server. Internally it runs client-side validation for all fields and submits only in case of success. See <a href="#newrecord">creating new records</a> for details. @method submit(options) @param {object} options @param {object} options.url url to submit data @param {object} options.data additional data to submit @param {object} options.ajaxOptions additional ajax options @param {function} options.error(obj) error handler @param {function} options.success(obj,config) success handler @returns {Object} jQuery object **/ case 'submit': //collects value, validate and submit to server for creating new record var config = arguments[1] || {}, $elems = this, errors = this.editable('validate'), values; if($.isEmptyObject(errors)) { values = this.editable('getValue'); if(config.data) { $.extend(values, config.data); } $.ajax($.extend({ url: config.url, data: values, type: 'POST' }, config.ajaxOptions)) .success(function(response) { //successful response 200 OK if(typeof config.success === 'function') { config.success.call($elems, response, config); } }) .error(function(){ //ajax error if(typeof config.error === 'function') { config.error.apply($elems, arguments); } }); } else { //client-side validation error if(typeof config.error === 'function') { config.error.call($elems, errors); } } return this; } //return jquery object return this.each(function () { var $this = $(this), data = $this.data(datakey), options = typeof option === 'object' && option; //for delegated targets do not store `editable` object for element //it's allows several different selectors. //see: https://github.com/vitalets/x-editable/issues/312 if(options && options.selector) { data = new Editable(this, options); return; } if (!data) { $this.data(datakey, (data = new Editable(this, options))); } if (typeof option === 'string') { //call method data[option].apply(data, Array.prototype.slice.call(args, 1)); } }); }; $.fn.editable.defaults = { /** Type of input. Can be <code>text|textarea|select|date|checklist</code> and more @property type @type string @default 'text' **/ type: 'text', /** Sets disabled state of editable @property disabled @type boolean @default false **/ disabled: false, /** How to toggle editable. Can be <code>click|dblclick|mouseenter|manual</code>. When set to <code>manual</code> you should manually call <code>show/hide</code> methods of editable. **Note**: if you call <code>show</code> or <code>toggle</code> inside **click** handler of some DOM element, you need to apply <code>e.stopPropagation()</code> because containers are being closed on any click on document. @example $('#edit-button').click(function(e) { e.stopPropagation(); $('#username').editable('toggle'); }); @property toggle @type string @default 'click' **/ toggle: 'click', /** Text shown when element is empty. @property emptytext @type string @default 'Empty' **/ emptytext: 'Empty', /** Allows to automatically set element's text based on it's value. Can be <code>auto|always|never</code>. Useful for select and date. For example, if dropdown list is <code>{1: 'a', 2: 'b'}</code> and element's value set to <code>1</code>, it's html will be automatically set to <code>'a'</code>. <code>auto</code> - text will be automatically set only if element is empty. <code>always|never</code> - always(never) try to set element's text. @property autotext @type string @default 'auto' **/ autotext: 'auto', /** Initial value of input. If not set, taken from element's text. Note, that if element's text is empty - text is automatically generated from value and can be customized (see `autotext` option). For example, to display currency sign: @example <a id="price" data-type="text" data-value="100"></a> <script> $('#price').editable({ ... display: function(value) { $(this).text(value + '$'); } }) </script> @property value @type mixed @default element's text **/ value: null, /** Callback to perform custom displaying of value in element's text. If `null`, default input's display used. If `false`, no displaying methods will be called, element's text will never change. Runs under element's scope. _**Parameters:**_ * `value` current value to be displayed * `response` server response (if display called after ajax submit), since 1.4.0 For _inputs with source_ (select, checklist) parameters are different: * `value` current value to be displayed * `sourceData` array of items for current input (e.g. dropdown items) * `response` server response (if display called after ajax submit), since 1.4.0 To get currently selected items use `$.fn.editableutils.itemsByValue(value, sourceData)`. @property display @type function|boolean @default null @since 1.2.0 @example display: function(value, sourceData) { //display checklist as comma-separated values var html = [], checked = $.fn.editableutils.itemsByValue(value, sourceData); if(checked.length) { $.each(checked, function(i, v) { html.push($.fn.editableutils.escape(v.text)); }); $(this).html(html.join(', ')); } else { $(this).empty(); } } **/ display: null, /** Css class applied when editable text is empty. @property emptyclass @type string @since 1.4.1 @default editable-empty **/ emptyclass: 'editable-empty', /** Css class applied when value was stored but not sent to server (`pk` is empty or `send = 'never'`). You may set it to `null` if you work with editables locally and submit them together. @property unsavedclass @type string @since 1.4.1 @default editable-unsaved **/ unsavedclass: 'editable-unsaved', /** If selector is provided, editable will be delegated to the specified targets. Usefull for dynamically generated DOM elements. **Please note**, that delegated targets can't be initialized with `emptytext` and `autotext` options, as they actually become editable only after first click. You should manually set class `editable-click` to these elements. Also, if element originally empty you should add class `editable-empty`, set `data-value=""` and write emptytext into element: @property selector @type string @since 1.4.1 @default null @example <div id="user"> <!-- empty --> <a href="#" data-name="username" data-type="text" class="editable-click editable-empty" data-value="" title="Username">Empty</a> <!-- non-empty --> <a href="#" data-name="group" data-type="select" data-source="/groups" data-value="1" class="editable-click" title="Group">Operator</a> </div> <script> $('#user').editable({ selector: 'a', url: '/post', pk: 1 }); </script> **/ selector: null, /** Color used to highlight element after update. Implemented via CSS3 transition, works in modern browsers. @property highlight @type string|boolean @since 1.4.5 @default #FFFF80 **/ highlight: '#FFFF80' }; }(window.jQuery)); /** AbstractInput - base class for all editable inputs. It defines interface to be implemented by any input type. To create your own input you can inherit from this class. @class abstractinput **/ (function ($) { "use strict"; //types $.fn.editabletypes = {}; var AbstractInput = function () { }; AbstractInput.prototype = { /** Initializes input @method init() **/ init: function(type, options, defaults) { this.type = type; this.options = $.extend({}, defaults, options); }, /* this method called before render to init $tpl that is inserted in DOM */ prerender: function() { this.$tpl = $(this.options.tpl); //whole tpl as jquery object this.$input = this.$tpl; //control itself, can be changed in render method this.$clear = null; //clear button this.error = null; //error message, if input cannot be rendered }, /** Renders input from tpl. Can return jQuery deferred object. Can be overwritten in child objects @method render() **/ render: function() { }, /** Sets element's html by value. @method value2html(value, element) @param {mixed} value @param {DOMElement} element **/ value2html: function(value, element) { $(element).text($.trim(value)); }, /** Converts element's html to value @method html2value(html) @param {string} html @returns {mixed} **/ html2value: function(html) { return $('<div>').html(html).text(); }, /** Converts value to string (for internal compare). For submitting to server used value2submit(). @method value2str(value) @param {mixed} value @returns {string} **/ value2str: function(value) { return value; }, /** Converts string received from server into value. Usually from `data-value` attribute. @method str2value(str) @param {string} str @returns {mixed} **/ str2value: function(str) { return str; }, /** Converts value for submitting to server. Result can be string or object. @method value2submit(value) @param {mixed} value @returns {mixed} **/ value2submit: function(value) { return value; }, /** Sets value of input. @method value2input(value) @param {mixed} value **/ value2input: function(value) { this.$input.val(value); }, /** Returns value of input. Value can be object (e.g. datepicker) @method input2value() **/ input2value: function() { return this.$input.val(); }, /** Activates input. For text it sets focus. @method activate() **/ activate: function() { if(this.$input.is(':visible')) { this.$input.focus(); } }, /** Creates input. @method clear() **/ clear: function() { this.$input.val(null); }, /** method to escape html. **/ escape: function(str) { return $('<div>').text(str).html(); }, /** attach handler to automatically submit form when value changed (useful when buttons not shown) **/ autosubmit: function() { }, /** Additional actions when destroying element **/ destroy: function() { }, // -------- helper functions -------- setClass: function() { if(this.options.inputclass) { this.$input.addClass(this.options.inputclass); } }, setAttr: function(attr) { if (this.options[attr] !== undefined && this.options[attr] !== null) { this.$input.attr(attr, this.options[attr]); } }, option: function(key, value) { this.options[key] = value; } }; AbstractInput.defaults = { /** HTML template of input. Normally you should not change it. @property tpl @type string @default '' **/ tpl: '', /** CSS class automatically applied to input @property inputclass @type string @default input-medium **/ inputclass: 'input-medium', //scope for external methods (e.g. source defined as function) //for internal use only scope: null, //need to re-declare showbuttons here to get it's value from common config (passed only options existing in defaults) showbuttons: true }; $.extend($.fn.editabletypes, {abstractinput: AbstractInput}); }(window.jQuery)); /** List - abstract class for inputs that have source option loaded from js array or via ajax @class list @extends abstractinput **/ (function ($) { "use strict"; var List = function (options) { }; $.fn.editableutils.inherit(List, $.fn.editabletypes.abstractinput); $.extend(List.prototype, { render: function () { var deferred = $.Deferred(); this.error = null; this.onSourceReady(function () { this.renderList(); deferred.resolve(); }, function () { this.error = this.options.sourceError; deferred.resolve(); }); return deferred.promise(); }, html2value: function (html) { return null; //can't set value by text }, value2html: function (value, element, display, response) { var deferred = $.Deferred(), success = function () { if(typeof display === 'function') { //custom display method display.call(element, value, this.sourceData, response); } else { this.value2htmlFinal(value, element); } deferred.resolve(); }; //for null value just call success without loading source if(value === null) { success.call(this); } else { this.onSourceReady(success, function () { deferred.resolve(); }); } return deferred.promise(); }, // ------------- additional functions ------------ onSourceReady: function (success, error) { //run source if it function var source; if ($.isFunction(this.options.source)) { source = this.options.source.call(this.options.scope); this.sourceData = null; //note: if function returns the same source as URL - sourceData will be taken from cahce and no extra request performed } else { source = this.options.source; } //if allready loaded just call success if(this.options.sourceCache && $.isArray(this.sourceData)) { success.call(this); return; } //try parse json in single quotes (for double quotes jquery does automatically) try { source = $.fn.editableutils.tryParseJson(source, false); } catch (e) { error.call(this); return; } //loading from url if (typeof source === 'string') { //try to get sourceData from cache if(this.options.sourceCache) { var cacheID = source, cache; if (!$(document).data(cacheID)) { $(document).data(cacheID, {}); } cache = $(document).data(cacheID); //check for cached data if (cache.loading === false && cache.sourceData) { //take source from cache this.sourceData = cache.sourceData; this.doPrepend(); success.call(this); return; } else if (cache.loading === true) { //cache is loading, put callback in stack to be called later cache.callbacks.push($.proxy(function () { this.sourceData = cache.sourceData; this.doPrepend(); success.call(this); }, this)); //also collecting error callbacks cache.err_callbacks.push($.proxy(error, this)); return; } else { //no cache yet, activate it cache.loading = true; cache.callbacks = []; cache.err_callbacks = []; } } //loading sourceData from server $.ajax({ url: source, type: 'get', cache: false, dataType: 'json', success: $.proxy(function (data) { if(cache) { cache.loading = false; } this.sourceData = this.makeArray(data); if($.isArray(this.sourceData)) { if(cache) { //store result in cache cache.sourceData = this.sourceData; //run success callbacks for other fields waiting for this source $.each(cache.callbacks, function () { this.call(); }); } this.doPrepend(); success.call(this); } else { error.call(this); if(cache) { //run error callbacks for other fields waiting for this source $.each(cache.err_callbacks, function () { this.call(); }); } } }, this), error: $.proxy(function () { error.call(this); if(cache) { cache.loading = false; //run error callbacks for other fields $.each(cache.err_callbacks, function () { this.call(); }); } }, this) }); } else { //options as json/array this.sourceData = this.makeArray(source); if($.isArray(this.sourceData)) { this.doPrepend(); success.call(this); } else { error.call(this); } } }, doPrepend: function () { if(this.options.prepend === null || this.options.prepend === undefined) { return; } if(!$.isArray(this.prependData)) { //run prepend if it is function (once) if ($.isFunction(this.options.prepend)) { this.options.prepend = this.options.prepend.call(this.options.scope); } //try parse json in single quotes this.options.prepend = $.fn.editableutils.tryParseJson(this.options.prepend, true); //convert prepend from string to object if (typeof this.options.prepend === 'string') { this.options.prepend = {'': this.options.prepend}; } this.prependData = this.makeArray(this.options.prepend); } if($.isArray(this.prependData) && $.isArray(this.sourceData)) { this.sourceData = this.prependData.concat(this.sourceData); } }, /* renders input list */ renderList: function() { // this method should be overwritten in child class }, /* set element's html by value */ value2htmlFinal: function(value, element) { // this method should be overwritten in child class }, /** * convert data to array suitable for sourceData, e.g. [{value: 1, text: 'abc'}, {...}] */ makeArray: function(data) { var count, obj, result = [], item, iterateItem; if(!data || typeof data === 'string') { return null; } if($.isArray(data)) { //array /* function to iterate inside item of array if item is object. Caclulates count of keys in item and store in obj. */ iterateItem = function (k, v) { obj = {value: k, text: v}; if(count++ >= 2) { return false;// exit from `each` if item has more than one key. } }; for(var i = 0; i < data.length; i++) { item = data[i]; if(typeof item === 'object') { count = 0; //count of keys inside item $.each(item, iterateItem); //case: [{val1: 'text1'}, {val2: 'text2} ...] if(count === 1) { result.push(obj); //case: [{value: 1, text: 'text1'}, {value: 2, text: 'text2'}, ...] } else if(count > 1) { //removed check of existance: item.hasOwnProperty('value') && item.hasOwnProperty('text') if(item.children) { item.children = this.makeArray(item.children); } result.push(item); } } else { //case: ['text1', 'text2' ...] result.push({value: item, text: item}); } } } else { //case: {val1: 'text1', val2: 'text2, ...} $.each(data, function (k, v) { result.push({value: k, text: v}); }); } return result; }, option: function(key, value) { this.options[key] = value; if(key === 'source') { this.sourceData = null; } if(key === 'prepend') { this.prependData = null; } } }); List.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** Source data for list. If **array** - it should be in format: `[{value: 1, text: "text1"}, {value: 2, text: "text2"}, ...]` For compability, object format is also supported: `{"1": "text1", "2": "text2" ...}` but it does not guarantee elements order. If **string** - considered ajax url to load items. In that case results will be cached for fields with the same source and name. See also `sourceCache` option. If **function**, it should return data in format above (since 1.4.0). Since 1.4.1 key `children` supported to render OPTGROUP (for **select** input only). `[{text: "group1", children: [{value: 1, text: "text1"}, {value: 2, text: "text2"}]}, ...]` @property source @type string | array | object | function @default null **/ source: null, /** Data automatically prepended to the beginning of dropdown list. @property prepend @type string | array | object | function @default false **/ prepend: false, /** Error message when list cannot be loaded (e.g. ajax error) @property sourceError @type string @default Error when loading list **/ sourceError: 'Error when loading list', /** if <code>true</code> and source is **string url** - results will be cached for fields with the same source. Usefull for editable column in grid to prevent extra requests. @property sourceCache @type boolean @default true @since 1.2.0 **/ sourceCache: true }); $.fn.editabletypes.list = List; }(window.jQuery)); /** Text input @class text @extends abstractinput @final @example <a href="#" id="username" data-type="text" data-pk="1">awesome</a> <script> $(function(){ $('#username').editable({ url: '/post', title: 'Enter username' }); }); </script> **/ (function ($) { "use strict"; var Text = function (options) { this.init('text', options, Text.defaults); }; $.fn.editableutils.inherit(Text, $.fn.editabletypes.abstractinput); $.extend(Text.prototype, { render: function() { this.renderClear(); this.setClass(); this.setAttr('placeholder'); }, activate: function() { if(this.$input.is(':visible')) { this.$input.focus(); $.fn.editableutils.setCursorPosition(this.$input.get(0), this.$input.val().length); if(this.toggleClear) { this.toggleClear(); } } }, //render clear button renderClear: function() { if (this.options.clear) { this.$clear = $('<span class="editable-clear-x"></span>'); this.$input.after(this.$clear) .css('padding-right', 24) .keyup($.proxy(function(e) { //arrows, enter, tab, etc if(~$.inArray(e.keyCode, [40,38,9,13,27])) { return; } clearTimeout(this.t); var that = this; this.t = setTimeout(function() { that.toggleClear(e); }, 100); }, this)) .parent().css('position', 'relative'); this.$clear.click($.proxy(this.clear, this)); } }, postrender: function() { /* //now `clear` is positioned via css if(this.$clear) { //can position clear button only here, when form is shown and height can be calculated // var h = this.$input.outerHeight(true) || 20, var h = this.$clear.parent().height(), delta = (h - this.$clear.height()) / 2; //this.$clear.css({bottom: delta, right: delta}); } */ }, //show / hide clear button toggleClear: function(e) { if(!this.$clear) { return; } var len = this.$input.val().length, visible = this.$clear.is(':visible'); if(len && !visible) { this.$clear.show(); } if(!len && visible) { this.$clear.hide(); } }, clear: function() { this.$clear.hide(); this.$input.val('').focus(); } }); Text.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** @property tpl @default <input type="text"> **/ tpl: '<input type="text">', /** Placeholder attribute of input. Shown when input is empty. @property placeholder @type string @default null **/ placeholder: null, /** Whether to show `clear` button @property clear @type boolean @default true **/ clear: true }); $.fn.editabletypes.text = Text; }(window.jQuery)); /** Textarea input @class textarea @extends abstractinput @final @example <a href="#" id="comments" data-type="textarea" data-pk="1">awesome comment!</a> <script> $(function(){ $('#comments').editable({ url: '/post', title: 'Enter comments', rows: 10 }); }); </script> **/ (function ($) { "use strict"; var Textarea = function (options) { this.init('textarea', options, Textarea.defaults); }; $.fn.editableutils.inherit(Textarea, $.fn.editabletypes.abstractinput); $.extend(Textarea.prototype, { render: function () { this.setClass(); this.setAttr('placeholder'); this.setAttr('rows'); //ctrl + enter this.$input.keydown(function (e) { if (e.ctrlKey && e.which === 13) { $(this).closest('form').submit(); } }); }, //using `white-space: pre-wrap` solves \n <--> BR conversion very elegant! /* value2html: function(value, element) { var html = '', lines; if(value) { lines = value.split("\n"); for (var i = 0; i < lines.length; i++) { lines[i] = $('<div>').text(lines[i]).html(); } html = lines.join('<br>'); } $(element).html(html); }, html2value: function(html) { if(!html) { return ''; } var regex = new RegExp(String.fromCharCode(10), 'g'); var lines = html.split(/<br\s*\/?>/i); for (var i = 0; i < lines.length; i++) { var text = $('<div>').html(lines[i]).text(); // Remove newline characters (\n) to avoid them being converted by value2html() method // thus adding extra <br> tags text = text.replace(regex, ''); lines[i] = text; } return lines.join("\n"); }, */ activate: function() { $.fn.editabletypes.text.prototype.activate.call(this); } }); Textarea.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** @property tpl @default <textarea></textarea> **/ tpl:'<textarea></textarea>', /** @property inputclass @default input-large **/ inputclass: 'input-large', /** Placeholder attribute of input. Shown when input is empty. @property placeholder @type string @default null **/ placeholder: null, /** Number of rows in textarea @property rows @type integer @default 7 **/ rows: 7 }); $.fn.editabletypes.textarea = Textarea; }(window.jQuery)); /** Select (dropdown) @class select @extends list @final @example <a href="#" id="status" data-type="select" data-pk="1" data-url="/post" data-original-title="Select status"></a> <script> $(function(){ $('#status').editable({ value: 2, source: [ {value: 1, text: 'Active'}, {value: 2, text: 'Blocked'}, {value: 3, text: 'Deleted'} ] }); }); </script> **/ (function ($) { "use strict"; var Select = function (options) { this.init('select', options, Select.defaults); }; $.fn.editableutils.inherit(Select, $.fn.editabletypes.list); $.extend(Select.prototype, { renderList: function() { this.$input.empty(); var fillItems = function($el, data) { var attr; if($.isArray(data)) { for(var i=0; i<data.length; i++) { attr = {}; if(data[i].children) { attr.label = data[i].text; $el.append(fillItems($('<optgroup>', attr), data[i].children)); } else { attr.value = data[i].value; if(data[i].disabled) { attr.disabled = true; } $el.append($('<option>', attr).text(data[i].text)); } } } return $el; }; fillItems(this.$input, this.sourceData); this.setClass(); //enter submit this.$input.on('keydown.editable', function (e) { if (e.which === 13) { $(this).closest('form').submit(); } }); }, value2htmlFinal: function(value, element) { var text = '', items = $.fn.editableutils.itemsByValue(value, this.sourceData); if(items.length) { text = items[0].text; } $(element).text(text); }, autosubmit: function() { this.$input.off('keydown.editable').on('change.editable', function(){ $(this).closest('form').submit(); }); } }); Select.defaults = $.extend({}, $.fn.editabletypes.list.defaults, { /** @property tpl @default <select></select> **/ tpl:'<select class="form-control"></select>' }); $.fn.editabletypes.select = Select; }(window.jQuery)); /** List of checkboxes. Internally value stored as javascript array of values. @class checklist @extends list @final @example <a href="#" id="options" data-type="checklist" data-pk="1" data-url="/post" data-original-title="Select options"></a> <script> $(function(){ $('#options').editable({ value: [2, 3], source: [ {value: 1, text: 'option1'}, {value: 2, text: 'option2'}, {value: 3, text: 'option3'} ] }); }); </script> **/ (function ($) { "use strict"; var Checklist = function (options) { this.init('checklist', options, Checklist.defaults); }; $.fn.editableutils.inherit(Checklist, $.fn.editabletypes.list); $.extend(Checklist.prototype, { renderList: function() { var $label, $div; this.$tpl.empty(); if(!$.isArray(this.sourceData)) { return; } for(var i=0; i<this.sourceData.length; i++) { $label = $('<label>').append($('<input>', { type: 'checkbox', value: this.sourceData[i].value })) .append($('<span>').text(' '+this.sourceData[i].text)); $('<div>').append($label).appendTo(this.$tpl); } this.$input = this.$tpl.find('input[type="checkbox"]'); this.setClass(); }, value2str: function(value) { return $.isArray(value) ? value.sort().join($.trim(this.options.separator)) : ''; }, //parse separated string str2value: function(str) { var reg, value = null; if(typeof str === 'string' && str.length) { reg = new RegExp('\\s*'+$.trim(this.options.separator)+'\\s*'); value = str.split(reg); } else if($.isArray(str)) { value = str; } else { value = [str]; } return value; }, //set checked on required checkboxes value2input: function(value) { this.$input.prop('checked', false); if($.isArray(value) && value.length) { this.$input.each(function(i, el) { var $el = $(el); // cannot use $.inArray as it performs strict comparison $.each(value, function(j, val){ /*jslint eqeq: true*/ if($el.val() == val) { /*jslint eqeq: false*/ $el.prop('checked', true); } }); }); } }, input2value: function() { var checked = []; this.$input.filter(':checked').each(function(i, el) { checked.push($(el).val()); }); return checked; }, //collect text of checked boxes value2htmlFinal: function(value, element) { var html = [], checked = $.fn.editableutils.itemsByValue(value, this.sourceData); if(checked.length) { $.each(checked, function(i, v) { html.push($.fn.editableutils.escape(v.text)); }); $(element).html(html.join('<br>')); } else { $(element).empty(); } }, activate: function() { this.$input.first().focus(); }, autosubmit: function() { this.$input.on('keydown', function(e){ if (e.which === 13) { $(this).closest('form').submit(); } }); } }); Checklist.defaults = $.extend({}, $.fn.editabletypes.list.defaults, { /** @property tpl @default <div></div> **/ tpl:'<div class="editable-checklist"></div>', /** @property inputclass @type string @default null **/ inputclass: null, /** Separator of values when reading from `data-value` attribute @property separator @type string @default ',' **/ separator: ',' }); $.fn.editabletypes.checklist = Checklist; }(window.jQuery)); /** HTML5 input types. Following types are supported: * password * email * url * tel * number * range * time Learn more about html5 inputs: http://www.w3.org/wiki/HTML5_form_additions To check browser compatibility please see: https://developer.mozilla.org/en-US/docs/HTML/Element/Input @class html5types @extends text @final @since 1.3.0 @example <a href="#" id="email" data-type="email" data-pk="1">[email protected]</a> <script> $(function(){ $('#email').editable({ url: '/post', title: 'Enter email' }); }); </script> **/ /** @property tpl @default depends on type **/ /* Password */ (function ($) { "use strict"; var Password = function (options) { this.init('password', options, Password.defaults); }; $.fn.editableutils.inherit(Password, $.fn.editabletypes.text); $.extend(Password.prototype, { //do not display password, show '[hidden]' instead value2html: function(value, element) { if(value) { $(element).text('[hidden]'); } else { $(element).empty(); } }, //as password not displayed, should not set value by html html2value: function(html) { return null; } }); Password.defaults = $.extend({}, $.fn.editabletypes.text.defaults, { tpl: '<input type="password">' }); $.fn.editabletypes.password = Password; }(window.jQuery)); /* Email */ (function ($) { "use strict"; var Email = function (options) { this.init('email', options, Email.defaults); }; $.fn.editableutils.inherit(Email, $.fn.editabletypes.text); Email.defaults = $.extend({}, $.fn.editabletypes.text.defaults, { tpl: '<input type="email">' }); $.fn.editabletypes.email = Email; }(window.jQuery)); /* Url */ (function ($) { "use strict"; var Url = function (options) { this.init('url', options, Url.defaults); }; $.fn.editableutils.inherit(Url, $.fn.editabletypes.text); Url.defaults = $.extend({}, $.fn.editabletypes.text.defaults, { tpl: '<input type="url">' }); $.fn.editabletypes.url = Url; }(window.jQuery)); /* Tel */ (function ($) { "use strict"; var Tel = function (options) { this.init('tel', options, Tel.defaults); }; $.fn.editableutils.inherit(Tel, $.fn.editabletypes.text); Tel.defaults = $.extend({}, $.fn.editabletypes.text.defaults, { tpl: '<input type="tel">' }); $.fn.editabletypes.tel = Tel; }(window.jQuery)); /* Number */ (function ($) { "use strict"; var NumberInput = function (options) { this.init('number', options, NumberInput.defaults); }; $.fn.editableutils.inherit(NumberInput, $.fn.editabletypes.text); $.extend(NumberInput.prototype, { render: function () { NumberInput.superclass.render.call(this); this.setAttr('min'); this.setAttr('max'); this.setAttr('step'); }, postrender: function() { if(this.$clear) { //increase right ffset for up/down arrows this.$clear.css({right: 24}); /* //can position clear button only here, when form is shown and height can be calculated var h = this.$input.outerHeight(true) || 20, delta = (h - this.$clear.height()) / 2; //add 12px to offset right for up/down arrows this.$clear.css({top: delta, right: delta + 16}); */ } } }); NumberInput.defaults = $.extend({}, $.fn.editabletypes.text.defaults, { tpl: '<input type="number">', inputclass: 'form-control input-small', min: null, max: null, step: null }); $.fn.editabletypes.number = NumberInput; }(window.jQuery)); /* Range (inherit from number) */ (function ($) { "use strict"; var Range = function (options) { this.init('range', options, Range.defaults); }; $.fn.editableutils.inherit(Range, $.fn.editabletypes.number); $.extend(Range.prototype, { render: function () { this.$input = this.$tpl.filter('input'); this.setClass(); this.setAttr('min'); this.setAttr('max'); this.setAttr('step'); this.$input.on('input', function(){ $(this).siblings('output').text($(this).val()); }); }, activate: function() { this.$input.focus(); } }); Range.defaults = $.extend({}, $.fn.editabletypes.number.defaults, { tpl: '<input type="range"><output style="width: 30px; display: inline-block"></output>', inputclass: 'form-control input-medium' }); $.fn.editabletypes.range = Range; }(window.jQuery)); /* Time */ (function ($) { "use strict"; var Time = function (options) { this.init('time', options, Time.defaults); }; //inherit from abstract, as inheritance from text gives selection error. $.fn.editableutils.inherit(Time, $.fn.editabletypes.abstractinput); $.extend(Time.prototype, { render: function() { this.setClass(); } }); Time.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { tpl: '<input type="time">' }); $.fn.editabletypes.time = Time; }(window.jQuery)); /** Select2 input. Based on amazing work of Igor Vaynberg https://github.com/ivaynberg/select2. Please see [original select2 docs](http://ivaynberg.github.com/select2) for detailed description and options. Compatible **select2 version is 3.4.1**! You should manually download and include select2 distributive: <link href="select2/select2.css" rel="stylesheet" type="text/css"></link> <script src="select2/select2.js"></script> To make it **bootstrap-styled** you can use css from [here](https://github.com/t0m/select2-bootstrap-css): <link href="select2-bootstrap.css" rel="stylesheet" type="text/css"></link> **Note:** currently `autotext` feature does not work for select2 with `ajax` remote source. You need initially put both `data-value` and element's text youself: <a href="#" data-type="select2" data-value="1">Text1</a> @class select2 @extends abstractinput @since 1.4.1 @final @example <a href="#" id="country" data-type="select2" data-pk="1" data-value="ru" data-url="/post" data-title="Select country"></a> <script> $(function(){ //local source $('#country').editable({ source: [ {id: 'gb', text: 'Great Britain'}, {id: 'us', text: 'United States'}, {id: 'ru', text: 'Russia'} ], select2: { multiple: true } }); //remote source (simple) $('#country').editable({ source: '/getCountries' }); //remote source (advanced) $('#country').editable({ select2: { placeholder: 'Select Country', allowClear: true, minimumInputLength: 3, id: function (item) { return item.CountryId; }, ajax: { url: '/getCountries', dataType: 'json', data: function (term, page) { return { query: term }; }, results: function (data, page) { return { results: data }; } }, formatResult: function (item) { return item.CountryName; }, formatSelection: function (item) { return item.CountryName; }, initSelection: function (element, callback) { return $.get('/getCountryById', { query: element.val() }, function (data) { callback(data); }); } } }); }); </script> **/ (function ($) { "use strict"; var Constructor = function (options) { this.init('select2', options, Constructor.defaults); options.select2 = options.select2 || {}; this.sourceData = null; //placeholder if(options.placeholder) { options.select2.placeholder = options.placeholder; } //if not `tags` mode, use source if(!options.select2.tags && options.source) { var source = options.source; //if source is function, call it (once!) if ($.isFunction(options.source)) { source = options.source.call(options.scope); } if (typeof source === 'string') { options.select2.ajax = options.select2.ajax || {}; //some default ajax params if(!options.select2.ajax.data) { options.select2.ajax.data = function(term) {return { query:term };}; } if(!options.select2.ajax.results) { options.select2.ajax.results = function(data) { return {results:data };}; } options.select2.ajax.url = source; } else { //check format and convert x-editable format to select2 format (if needed) this.sourceData = this.convertSource(source); options.select2.data = this.sourceData; } } //overriding objects in config (as by default jQuery extend() is not recursive) this.options.select2 = $.extend({}, Constructor.defaults.select2, options.select2); //detect whether it is multi-valued this.isMultiple = this.options.select2.tags || this.options.select2.multiple; this.isRemote = ('ajax' in this.options.select2); //store function returning ID of item //should be here as used inautotext for local source this.idFunc = this.options.select2.id; if (typeof(this.idFunc) !== "function") { var idKey = this.idFunc || 'id'; this.idFunc = function (e) { return e[idKey]; }; } //store function that renders text in select2 this.formatSelection = this.options.select2.formatSelection; if (typeof(this.formatSelection) !== "function") { this.formatSelection = function (e) { return e.text; }; } }; $.fn.editableutils.inherit(Constructor, $.fn.editabletypes.abstractinput); $.extend(Constructor.prototype, { render: function() { this.setClass(); //apply select2 this.$input.select2(this.options.select2); //when data is loaded via ajax, we need to know when it's done to populate listData if(this.isRemote) { //listen to loaded event to populate data this.$input.on('select2-loaded', $.proxy(function(e) { this.sourceData = e.items.results; }, this)); } //trigger resize of editableform to re-position container in multi-valued mode if(this.isMultiple) { this.$input.on('change', function() { $(this).closest('form').parent().triggerHandler('resize'); }); } }, value2html: function(value, element) { var text = '', data, that = this; if(this.options.select2.tags) { //in tags mode just assign value data = value; //data = $.fn.editableutils.itemsByValue(value, this.options.select2.tags, this.idFunc); } else if(this.sourceData) { data = $.fn.editableutils.itemsByValue(value, this.sourceData, this.idFunc); } else { //can not get list of possible values (e.g. autotext for select2 with ajax source) } //data may be array (when multiple values allowed) if($.isArray(data)) { //collect selected data and show with separator text = []; $.each(data, function(k, v){ text.push(v && typeof v === 'object' ? that.formatSelection(v) : v); }); } else if(data) { text = that.formatSelection(data); } text = $.isArray(text) ? text.join(this.options.viewseparator) : text; $(element).text(text); }, html2value: function(html) { return this.options.select2.tags ? this.str2value(html, this.options.viewseparator) : null; }, value2input: function(value) { //for local source use data directly from source (to allow autotext) /* if(!this.isRemote && !this.isMultiple) { var items = $.fn.editableutils.itemsByValue(value, this.sourceData, this.idFunc); if(items.length) { this.$input.select2('data', items[0]); return; } } */ //for remote source just set value, text is updated by initSelection this.$input.val(value).trigger('change', true); //second argument needed to separate initial change from user's click (for autosubmit) //if remote source AND no user's initSelection provided --> try to use element's text if(this.isRemote && !this.isMultiple && !this.options.select2.initSelection) { var customId = this.options.select2.id, customText = this.options.select2.formatSelection; if(!customId && !customText) { var data = {id: value, text: $(this.options.scope).text()}; this.$input.select2('data', data); } } }, input2value: function() { return this.$input.select2('val'); }, str2value: function(str, separator) { if(typeof str !== 'string' || !this.isMultiple) { return str; } separator = separator || this.options.select2.separator || $.fn.select2.defaults.separator; var val, i, l; if (str === null || str.length < 1) { return null; } val = str.split(separator); for (i = 0, l = val.length; i < l; i = i + 1) { val[i] = $.trim(val[i]); } return val; }, autosubmit: function() { this.$input.on('change', function(e, isInitial){ if(!isInitial) { $(this).closest('form').submit(); } }); }, /* Converts source from x-editable format: {value: 1, text: "1"} to select2 format: {id: 1, text: "1"} */ convertSource: function(source) { if($.isArray(source) && source.length && source[0].value !== undefined) { for(var i = 0; i<source.length; i++) { if(source[i].value !== undefined) { source[i].id = source[i].value; delete source[i].value; } } } return source; }, destroy: function() { if(this.$input.data('select2')) { this.$input.select2('destroy'); } } }); Constructor.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** @property tpl @default <input type="hidden"> **/ tpl:'<input type="hidden">', /** Configuration of select2. [Full list of options](http://ivaynberg.github.com/select2). @property select2 @type object @default null **/ select2: null, /** Placeholder attribute of select @property placeholder @type string @default null **/ placeholder: null, /** Source data for select. It will be assigned to select2 `data` property and kept here just for convenience. Please note, that format is different from simple `select` input: use 'id' instead of 'value'. E.g. `[{id: 1, text: "text1"}, {id: 2, text: "text2"}, ...]`. @property source @type array @default null **/ source: null, /** Separator used to display tags. @property viewseparator @type string @default ', ' **/ viewseparator: ', ' }); $.fn.editabletypes.select2 = Constructor; }(window.jQuery)); /** * Combodate - 1.0.4 * Dropdown date and time picker. * Converts text input into dropdowns to pick day, month, year, hour, minute and second. * Uses momentjs as datetime library http://momentjs.com. * For internalization include corresponding file from https://github.com/timrwood/moment/tree/master/lang * * Confusion at noon and midnight - see http://en.wikipedia.org/wiki/12-hour_clock#Confusion_at_noon_and_midnight * In combodate: * 12:00 pm --> 12:00 (24-h format, midday) * 12:00 am --> 00:00 (24-h format, midnight, start of day) * * Differs from momentjs parse rules: * 00:00 pm, 12:00 pm --> 12:00 (24-h format, day not change) * 00:00 am, 12:00 am --> 00:00 (24-h format, day not change) * * * Author: Vitaliy Potapov * Project page: http://github.com/vitalets/combodate * Copyright (c) 2012 Vitaliy Potapov. Released under MIT License. **/ (function ($) { var Combodate = function (element, options) { this.$element = $(element); if(!this.$element.is('input')) { $.error('Combodate should be applied to INPUT element'); return; } this.options = $.extend({}, $.fn.combodate.defaults, options, this.$element.data()); this.init(); }; Combodate.prototype = { constructor: Combodate, init: function () { this.map = { //key regexp moment.method day: ['D', 'date'], month: ['M', 'month'], year: ['Y', 'year'], hour: ['[Hh]', 'hours'], minute: ['m', 'minutes'], second: ['s', 'seconds'], ampm: ['[Aa]', ''] }; this.$widget = $('<span class="combodate"></span>').html(this.getTemplate()); this.initCombos(); //update original input on change this.$widget.on('change', 'select', $.proxy(function(){ this.$element.val(this.getValue()); }, this)); this.$widget.find('select').css('width', 'auto'); //hide original input and insert widget this.$element.hide().after(this.$widget); //set initial value this.setValue(this.$element.val() || this.options.value); }, /* Replace tokens in template with <select> elements */ getTemplate: function() { var tpl = this.options.template; //first pass $.each(this.map, function(k, v) { v = v[0]; var r = new RegExp(v+'+'), token = v.length > 1 ? v.substring(1, 2) : v; tpl = tpl.replace(r, '{'+token+'}'); }); //replace spaces with &nbsp; tpl = tpl.replace(/ /g, '&nbsp;'); //second pass $.each(this.map, function(k, v) { v = v[0]; var token = v.length > 1 ? v.substring(1, 2) : v; tpl = tpl.replace('{'+token+'}', '<select class="form-control '+k+'"></select>'); }); return tpl; }, /* Initialize combos that presents in template */ initCombos: function() { var that = this; $.each(this.map, function(k, v) { var $c = that.$widget.find('.'+k), f, items; if($c.length) { that['$'+k] = $c; //set properties like this.$day, this.$month etc. f = 'fill' + k.charAt(0).toUpperCase() + k.slice(1); //define method name to fill items, e.g `fillDays` items = that[f](); that['$'+k].html(that.renderItems(items)); } }); }, /* Initialize items of combos. Handles `firstItem` option */ initItems: function(key) { var values = [], relTime; if(this.options.firstItem === 'name') { //need both to support moment ver < 2 and >= 2 relTime = moment.relativeTime || moment.langData()._relativeTime; var header = typeof relTime[key] === 'function' ? relTime[key](1, true, key, false) : relTime[key]; //take last entry (see momentjs lang files structure) header = header.split(' ').reverse()[0]; values.push(['', header]); } else if(this.options.firstItem === 'empty') { values.push(['', '']); } return values; }, /* render items to string of <option> tags */ renderItems: function(items) { var str = []; for(var i=0; i<items.length; i++) { str.push('<option value="'+items[i][0]+'">'+items[i][1]+'</option>'); } return str.join("\n"); }, /* fill day */ fillDay: function() { var items = this.initItems('d'), name, i, twoDigit = this.options.template.indexOf('DD') !== -1; for(i=1; i<=31; i++) { name = twoDigit ? this.leadZero(i) : i; items.push([i, name]); } return items; }, /* fill month */ fillMonth: function() { var items = this.initItems('M'), name, i, longNames = this.options.template.indexOf('MMMM') !== -1, shortNames = this.options.template.indexOf('MMM') !== -1, twoDigit = this.options.template.indexOf('MM') !== -1; for(i=0; i<=11; i++) { if(longNames) { //see https://github.com/timrwood/momentjs.com/pull/36 name = moment().date(1).month(i).format('MMMM'); } else if(shortNames) { name = moment().date(1).month(i).format('MMM'); } else if(twoDigit) { name = this.leadZero(i+1); } else { name = i+1; } items.push([i, name]); } return items; }, /* fill year */ fillYear: function() { var items = [], name, i, longNames = this.options.template.indexOf('YYYY') !== -1; for(i=this.options.maxYear; i>=this.options.minYear; i--) { name = longNames ? i : (i+'').substring(2); items[this.options.yearDescending ? 'push' : 'unshift']([i, name]); } items = this.initItems('y').concat(items); return items; }, /* fill hour */ fillHour: function() { var items = this.initItems('h'), name, i, h12 = this.options.template.indexOf('h') !== -1, h24 = this.options.template.indexOf('H') !== -1, twoDigit = this.options.template.toLowerCase().indexOf('hh') !== -1, min = h12 ? 1 : 0, max = h12 ? 12 : 23; for(i=min; i<=max; i++) { name = twoDigit ? this.leadZero(i) : i; items.push([i, name]); } return items; }, /* fill minute */ fillMinute: function() { var items = this.initItems('m'), name, i, twoDigit = this.options.template.indexOf('mm') !== -1; for(i=0; i<=59; i+= this.options.minuteStep) { name = twoDigit ? this.leadZero(i) : i; items.push([i, name]); } return items; }, /* fill second */ fillSecond: function() { var items = this.initItems('s'), name, i, twoDigit = this.options.template.indexOf('ss') !== -1; for(i=0; i<=59; i+= this.options.secondStep) { name = twoDigit ? this.leadZero(i) : i; items.push([i, name]); } return items; }, /* fill ampm */ fillAmpm: function() { var ampmL = this.options.template.indexOf('a') !== -1, ampmU = this.options.template.indexOf('A') !== -1, items = [ ['am', ampmL ? 'am' : 'AM'], ['pm', ampmL ? 'pm' : 'PM'] ]; return items; }, /* Returns current date value from combos. If format not specified - `options.format` used. If format = `null` - Moment object returned. */ getValue: function(format) { var dt, values = {}, that = this, notSelected = false; //getting selected values $.each(this.map, function(k, v) { if(k === 'ampm') { return; } var def = k === 'day' ? 1 : 0; values[k] = that['$'+k] ? parseInt(that['$'+k].val(), 10) : def; if(isNaN(values[k])) { notSelected = true; return false; } }); //if at least one visible combo not selected - return empty string if(notSelected) { return ''; } //convert hours 12h --> 24h if(this.$ampm) { //12:00 pm --> 12:00 (24-h format, midday), 12:00 am --> 00:00 (24-h format, midnight, start of day) if(values.hour === 12) { values.hour = this.$ampm.val() === 'am' ? 0 : 12; } else { values.hour = this.$ampm.val() === 'am' ? values.hour : values.hour+12; } } dt = moment([values.year, values.month, values.day, values.hour, values.minute, values.second]); //highlight invalid date this.highlight(dt); format = format === undefined ? this.options.format : format; if(format === null) { return dt.isValid() ? dt : null; } else { return dt.isValid() ? dt.format(format) : ''; } }, setValue: function(value) { if(!value) { return; } var dt = typeof value === 'string' ? moment(value, this.options.format) : moment(value), that = this, values = {}; //function to find nearest value in select options function getNearest($select, value) { var delta = {}; $select.children('option').each(function(i, opt){ var optValue = $(opt).attr('value'), distance; if(optValue === '') return; distance = Math.abs(optValue - value); if(typeof delta.distance === 'undefined' || distance < delta.distance) { delta = {value: optValue, distance: distance}; } }); return delta.value; } if(dt.isValid()) { //read values from date object $.each(this.map, function(k, v) { if(k === 'ampm') { return; } values[k] = dt[v[1]](); }); if(this.$ampm) { //12:00 pm --> 12:00 (24-h format, midday), 12:00 am --> 00:00 (24-h format, midnight, start of day) if(values.hour >= 12) { values.ampm = 'pm'; if(values.hour > 12) { values.hour -= 12; } } else { values.ampm = 'am'; if(values.hour === 0) { values.hour = 12; } } } $.each(values, function(k, v) { //call val() for each existing combo, e.g. this.$hour.val() if(that['$'+k]) { if(k === 'minute' && that.options.minuteStep > 1 && that.options.roundTime) { v = getNearest(that['$'+k], v); } if(k === 'second' && that.options.secondStep > 1 && that.options.roundTime) { v = getNearest(that['$'+k], v); } that['$'+k].val(v); } }); this.$element.val(dt.format(this.options.format)); } }, /* highlight combos if date is invalid */ highlight: function(dt) { if(!dt.isValid()) { if(this.options.errorClass) { this.$widget.addClass(this.options.errorClass); } else { //store original border color if(!this.borderColor) { this.borderColor = this.$widget.find('select').css('border-color'); } this.$widget.find('select').css('border-color', 'red'); } } else { if(this.options.errorClass) { this.$widget.removeClass(this.options.errorClass); } else { this.$widget.find('select').css('border-color', this.borderColor); } } }, leadZero: function(v) { return v <= 9 ? '0' + v : v; }, destroy: function() { this.$widget.remove(); this.$element.removeData('combodate').show(); } //todo: clear method }; $.fn.combodate = function ( option ) { var d, args = Array.apply(null, arguments); args.shift(); //getValue returns date as string / object (not jQuery object) if(option === 'getValue' && this.length && (d = this.eq(0).data('combodate'))) { return d.getValue.apply(d, args); } return this.each(function () { var $this = $(this), data = $this.data('combodate'), options = typeof option == 'object' && option; if (!data) { $this.data('combodate', (data = new Combodate(this, options))); } if (typeof option == 'string' && typeof data[option] == 'function') { data[option].apply(data, args); } }); }; $.fn.combodate.defaults = { //in this format value stored in original input format: 'DD-MM-YYYY HH:mm', //in this format items in dropdowns are displayed template: 'D / MMM / YYYY H : mm', //initial value, can be `new Date()` value: null, minYear: 1970, maxYear: 2015, yearDescending: true, minuteStep: 5, secondStep: 1, firstItem: 'empty', //'name', 'empty', 'none' errorClass: 'has-error', roundTime: true //whether to round minutes and seconds if step > 1 }; }(window.jQuery)); /** Combodate input - dropdown date and time picker. Based on [combodate](http://vitalets.github.com/combodate) plugin (included). To use it you should manually include [momentjs](http://momentjs.com). <script src="js/moment.min.js"></script> Allows to input: * only date * only time * both date and time Please note, that format is taken from momentjs and **not compatible** with bootstrap-datepicker / jquery UI datepicker. Internally value stored as `momentjs` object. @class combodate @extends abstractinput @final @since 1.4.0 @example <a href="#" id="dob" data-type="combodate" data-pk="1" data-url="/post" data-value="1984-05-15" data-original-title="Select date"></a> <script> $(function(){ $('#dob').editable({ format: 'YYYY-MM-DD', viewformat: 'DD.MM.YYYY', template: 'D / MMMM / YYYY', combodate: { minYear: 2000, maxYear: 2015, minuteStep: 1 } } }); }); </script> **/ /*global moment*/ (function ($) { "use strict"; var Constructor = function (options) { this.init('combodate', options, Constructor.defaults); //by default viewformat equals to format if(!this.options.viewformat) { this.options.viewformat = this.options.format; } //try parse combodate config defined as json string in data-combodate options.combodate = $.fn.editableutils.tryParseJson(options.combodate, true); //overriding combodate config (as by default jQuery extend() is not recursive) this.options.combodate = $.extend({}, Constructor.defaults.combodate, options.combodate, { format: this.options.format, template: this.options.template }); }; $.fn.editableutils.inherit(Constructor, $.fn.editabletypes.abstractinput); $.extend(Constructor.prototype, { render: function () { this.$input.combodate(this.options.combodate); //"clear" link /* if(this.options.clear) { this.$clear = $('<a href="#"></a>').html(this.options.clear).click($.proxy(function(e){ e.preventDefault(); e.stopPropagation(); this.clear(); }, this)); this.$tpl.parent().append($('<div class="editable-clear">').append(this.$clear)); } */ }, value2html: function(value, element) { var text = value ? value.format(this.options.viewformat) : ''; $(element).text(text); }, html2value: function(html) { return html ? moment(html, this.options.viewformat) : null; }, value2str: function(value) { return value ? value.format(this.options.format) : ''; }, str2value: function(str) { return str ? moment(str, this.options.format) : null; }, value2submit: function(value) { return this.value2str(value); }, value2input: function(value) { this.$input.combodate('setValue', value); }, input2value: function() { return this.$input.combodate('getValue', null); }, activate: function() { this.$input.siblings('.combodate').find('select').eq(0).focus(); }, /* clear: function() { this.$input.data('datepicker').date = null; this.$input.find('.active').removeClass('active'); }, */ autosubmit: function() { } }); Constructor.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** @property tpl @default <input type="text"> **/ tpl:'<input type="text" class="form-control">', /** @property inputclass @default null **/ inputclass: null, /** Format used for sending value to server. Also applied when converting date from <code>data-value</code> attribute.<br> See list of tokens in [momentjs docs](http://momentjs.com/docs/#/parsing/string-format) @property format @type string @default YYYY-MM-DD **/ format:'YYYY-MM-DD', /** Format used for displaying date. Also applied when converting date from element's text on init. If not specified equals to `format`. @property viewformat @type string @default null **/ viewformat: null, /** Template used for displaying dropdowns. @property template @type string @default D / MMM / YYYY **/ template: 'D / MMM / YYYY', /** Configuration of combodate. Full list of options: http://vitalets.github.com/combodate/#docs @property combodate @type object @default null **/ combodate: null /* (not implemented yet) Text shown as clear date button. If <code>false</code> clear button will not be rendered. @property clear @type boolean|string @default 'x clear' */ //clear: '&times; clear' }); $.fn.editabletypes.combodate = Constructor; }(window.jQuery)); /* Editableform based on Twitter Bootstrap */ (function ($) { "use strict"; $.extend($.fn.editableform.Constructor.prototype, { initTemplate: function() { this.$form = $($.fn.editableform.template); this.$form.find('.editable-error-block').addClass('help-block'); } }); //buttons $.fn.editableform.buttons = '<button type="submit" class="btn blue editable-submit"><i class="fa fa-check"></i></button>'+ '<button type="button" class="btn default editable-cancel"><i class="fa fa-times"></i></button>'; //error classes $.fn.editableform.errorGroupClass = 'has-error'; $.fn.editableform.errorBlockClass = null; }(window.jQuery)); /** * Editable Popover * --------------------- * requires bootstrap-popover.js */ (function ($) { "use strict"; $.fn.popover.defaults = $.fn.popover.Constructor.DEFAULTS; //extend methods $.extend($.fn.editableContainer.Popup.prototype, { containerName: 'popover', containerDataName: 'bs.popover', //for compatibility with bootstrap <= 2.2.1 (content inserted into <p> instead of directly .popover-content) innerCss: $.fn.popover && $($.fn.popover.defaults.template).find('p').length ? '.popover-content p' : '.popover-content', initContainer: function(){ $.extend(this.containerOptions, { trigger: 'manual', selector: false, content: ' ', template: $.fn.popover.defaults.template }); //as template property is used in inputs, hide it from popover var t; if(this.$element.data('template')) { t = this.$element.data('template'); this.$element.removeData('template'); } this.call(this.containerOptions); if(t) { //restore data('template') this.$element.data('template', t); } }, /* show */ innerShow: function () { this.call('show'); }, /* hide */ innerHide: function () { this.call('hide'); }, /* destroy */ innerDestroy: function() { this.call('destroy'); }, setContainerOption: function(key, value) { this.container().options[key] = value; }, /** * move popover to new position. This function mainly copied from bootstrap-popover. */ /*jshint laxcomma: true*/ setPosition: function () { (function() { var $tip = this.tip() , inside , pos , actualWidth , actualHeight , placement , tp , tpt , tpb , tpl , tpr; placement = typeof this.options.placement === 'function' ? this.options.placement.call(this, $tip[0], this.$element[0]) : this.options.placement; inside = /in/.test(placement); $tip // .detach() //vitalets: remove any placement class because otherwise they dont influence on re-positioning of visible popover .removeClass('top right bottom left') .css({ top: 0, left: 0, display: 'block' }); // .insertAfter(this.$element); pos = this.getPosition(inside); actualWidth = $tip[0].offsetWidth; actualHeight = $tip[0].offsetHeight; placement = inside ? placement.split(' ')[1] : placement; tpb = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}; tpt = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}; tpl = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}; tpr = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}; switch (placement) { case 'bottom': if ((tpb.top + actualHeight) > ($(window).scrollTop() + $(window).height())) { if (tpt.top > $(window).scrollTop()) { placement = 'top'; } else if ((tpr.left + actualWidth) < ($(window).scrollLeft() + $(window).width())) { placement = 'right'; } else if (tpl.left > $(window).scrollLeft()) { placement = 'left'; } else { placement = 'right'; } } break; case 'top': if (tpt.top < $(window).scrollTop()) { if ((tpb.top + actualHeight) < ($(window).scrollTop() + $(window).height())) { placement = 'bottom'; } else if ((tpr.left + actualWidth) < ($(window).scrollLeft() + $(window).width())) { placement = 'right'; } else if (tpl.left > $(window).scrollLeft()) { placement = 'left'; } else { placement = 'right'; } } break; case 'left': if (tpl.left < $(window).scrollLeft()) { if ((tpr.left + actualWidth) < ($(window).scrollLeft() + $(window).width())) { placement = 'right'; } else if (tpt.top > $(window).scrollTop()) { placement = 'top'; } else if (tpt.top > $(window).scrollTop()) { placement = 'bottom'; } else { placement = 'right'; } } break; case 'right': if ((tpr.left + actualWidth) > ($(window).scrollLeft() + $(window).width())) { if (tpl.left > $(window).scrollLeft()) { placement = 'left'; } else if (tpt.top > $(window).scrollTop()) { placement = 'top'; } else if (tpt.top > $(window).scrollTop()) { placement = 'bottom'; } } break; } switch (placement) { case 'bottom': tp = tpb; break; case 'top': tp = tpt; break; case 'left': tp = tpl; break; case 'right': tp = tpr; break; } $tip .offset(tp) .addClass(placement) .addClass('in'); }).call(this.container()); /*jshint laxcomma: false*/ } }); }(window.jQuery)); /* ========================================================= * bootstrap-datepicker.js * http://www.eyecon.ro/bootstrap-datepicker * ========================================================= * Copyright 2012 Stefan Petre * Improvements by Andrew Rowls * * 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( $ ) { function UTCDate(){ return new Date(Date.UTC.apply(Date, arguments)); } function UTCToday(){ var today = new Date(); return UTCDate(today.getUTCFullYear(), today.getUTCMonth(), today.getUTCDate()); } // Picker object var Datepicker = function(element, options) { var that = this; this._process_options(options); this.element = $(element); this.isInline = false; this.isInput = this.element.is('input'); this.component = this.element.is('.date') ? this.element.find('.add-on, .btn') : false; this.hasInput = this.component && this.element.find('input').length; if(this.component && this.component.length === 0) this.component = false; this.picker = $(DPGlobal.template); this._buildEvents(); this._attachEvents(); if(this.isInline) { this.picker.addClass('datepicker-inline').appendTo(this.element); } else { this.picker.addClass('datepicker-dropdown dropdown-menu'); } if (this.o.rtl){ this.picker.addClass('datepicker-rtl'); this.picker.find('.prev i, .next i') .toggleClass('fa-angle-left fa-angle-right'); } this.viewMode = this.o.startView; if (this.o.calendarWeeks) this.picker.find('tfoot th.today') .attr('colspan', function(i, val){ return parseInt(val) + 1; }); this._allow_update = false; this.setStartDate(this.o.startDate); this.setEndDate(this.o.endDate); this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled); this.fillDow(); this.fillMonths(); this._allow_update = true; this.update(); this.showMode(); if(this.isInline) { this.show(); } }; Datepicker.prototype = { constructor: Datepicker, _process_options: function(opts){ // Store raw options for reference this._o = $.extend({}, this._o, opts); // Processed options var o = this.o = $.extend({}, this._o); // Check if "de-DE" style date is available, if not language should // fallback to 2 letter code eg "de" var lang = o.language; if (!dates[lang]) { lang = lang.split('-')[0]; if (!dates[lang]) lang = defaults.language; } o.language = lang; switch(o.startView){ case 2: case 'decade': o.startView = 2; break; case 1: case 'year': o.startView = 1; break; default: o.startView = 0; } switch (o.minViewMode) { case 1: case 'months': o.minViewMode = 1; break; case 2: case 'years': o.minViewMode = 2; break; default: o.minViewMode = 0; } o.startView = Math.max(o.startView, o.minViewMode); o.weekStart %= 7; o.weekEnd = ((o.weekStart + 6) % 7); var format = DPGlobal.parseFormat(o.format) if (o.startDate !== -Infinity) { o.startDate = DPGlobal.parseDate(o.startDate, format, o.language); } if (o.endDate !== Infinity) { o.endDate = DPGlobal.parseDate(o.endDate, format, o.language); } o.daysOfWeekDisabled = o.daysOfWeekDisabled||[]; if (!$.isArray(o.daysOfWeekDisabled)) o.daysOfWeekDisabled = o.daysOfWeekDisabled.split(/[,\s]*/); o.daysOfWeekDisabled = $.map(o.daysOfWeekDisabled, function (d) { return parseInt(d, 10); }); }, _events: [], _secondaryEvents: [], _applyEvents: function(evs){ for (var i=0, el, ev; i<evs.length; i++){ el = evs[i][0]; ev = evs[i][1]; el.on(ev); } }, _unapplyEvents: function(evs){ for (var i=0, el, ev; i<evs.length; i++){ el = evs[i][0]; ev = evs[i][1]; el.off(ev); } }, _buildEvents: function(){ if (this.isInput) { // single input this._events = [ [this.element, { focus: $.proxy(this.show, this), keyup: $.proxy(this.update, this), keydown: $.proxy(this.keydown, this) }] ]; } else if (this.component && this.hasInput){ // component: input + button this._events = [ // For components that are not readonly, allow keyboard nav [this.element.find('input'), { focus: $.proxy(this.show, this), keyup: $.proxy(this.update, this), keydown: $.proxy(this.keydown, this) }], [this.component, { click: $.proxy(this.show, this) }] ]; } else if (this.element.is('div')) { // inline datepicker this.isInline = true; } else { this._events = [ [this.element, { click: $.proxy(this.show, this) }] ]; } this._secondaryEvents = [ [this.picker, { click: $.proxy(this.click, this) }], [$(window), { resize: $.proxy(this.place, this) }], [$(document), { mousedown: $.proxy(function (e) { // Clicked outside the datepicker, hide it if (!( this.element.is(e.target) || this.element.find(e.target).size() || this.picker.is(e.target) || this.picker.find(e.target).size() )) { this.hide(); } }, this) }] ]; }, _attachEvents: function(){ this._detachEvents(); this._applyEvents(this._events); }, _detachEvents: function(){ this._unapplyEvents(this._events); }, _attachSecondaryEvents: function(){ this._detachSecondaryEvents(); this._applyEvents(this._secondaryEvents); }, _detachSecondaryEvents: function(){ this._unapplyEvents(this._secondaryEvents); }, _trigger: function(event, altdate){ var date = altdate || this.date, local_date = new Date(date.getTime() + (date.getTimezoneOffset()*60000)); this.element.trigger({ type: event, date: local_date, format: $.proxy(function(altformat){ var format = altformat || this.o.format; return DPGlobal.formatDate(date, format, this.o.language); }, this) }); }, show: function(e) { if (!this.isInline) this.picker.appendTo('body'); this.picker.show(); this.height = this.component ? this.component.outerHeight() : this.element.outerHeight(); this.place(); this._attachSecondaryEvents(); if (e) { e.preventDefault(); } this._trigger('show'); }, hide: function(e){ if(this.isInline) return; if (!this.picker.is(':visible')) return; this.picker.hide().detach(); this._detachSecondaryEvents(); this.viewMode = this.o.startView; this.showMode(); if ( this.o.forceParse && ( this.isInput && this.element.val() || this.hasInput && this.element.find('input').val() ) ) this.setValue(); this._trigger('hide'); }, remove: function() { this.hide(); this._detachEvents(); this._detachSecondaryEvents(); this.picker.remove(); delete this.element.data().datepicker; if (!this.isInput) { delete this.element.data().date; } }, getDate: function() { var d = this.getUTCDate(); return new Date(d.getTime() + (d.getTimezoneOffset()*60000)); }, getUTCDate: function() { return this.date; }, setDate: function(d) { this.setUTCDate(new Date(d.getTime() - (d.getTimezoneOffset()*60000))); }, setUTCDate: function(d) { this.date = d; this.setValue(); }, setValue: function() { var formatted = this.getFormattedDate(); if (!this.isInput) { if (this.component){ this.element.find('input').val(formatted); } } else { this.element.val(formatted); } }, getFormattedDate: function(format) { if (format === undefined) format = this.o.format; return DPGlobal.formatDate(this.date, format, this.o.language); }, setStartDate: function(startDate){ this._process_options({startDate: startDate}); this.update(); this.updateNavArrows(); }, setEndDate: function(endDate){ this._process_options({endDate: endDate}); this.update(); this.updateNavArrows(); }, setDaysOfWeekDisabled: function(daysOfWeekDisabled){ this._process_options({daysOfWeekDisabled: daysOfWeekDisabled}); this.update(); this.updateNavArrows(); }, place: function(){ if(this.isInline) return; var zIndex = parseInt(this.element.parents().filter(function() { return $(this).css('z-index') != 'auto'; }).first().css('z-index'))+10; var offset = this.component ? this.component.parent().offset() : this.element.offset(); var height = this.component ? this.component.outerHeight(true) : this.element.outerHeight(true); this.picker.css({ top: offset.top + height, left: offset.left, zIndex: zIndex }); }, _allow_update: true, update: function(){ if (!this._allow_update) return; var date, fromArgs = false; if(arguments && arguments.length && (typeof arguments[0] === 'string' || arguments[0] instanceof Date)) { date = arguments[0]; fromArgs = true; } else { date = this.isInput ? this.element.val() : this.element.data('date') || this.element.find('input').val(); delete this.element.data().date; } this.date = DPGlobal.parseDate(date, this.o.format, this.o.language); if(fromArgs) this.setValue(); if (this.date < this.o.startDate) { this.viewDate = new Date(this.o.startDate); } else if (this.date > this.o.endDate) { this.viewDate = new Date(this.o.endDate); } else { this.viewDate = new Date(this.date); } this.fill(); }, fillDow: function(){ var dowCnt = this.o.weekStart, html = '<tr>'; if(this.o.calendarWeeks){ var cell = '<th class="cw">&nbsp;</th>'; html += cell; this.picker.find('.datepicker-days thead tr:first-child').prepend(cell); } while (dowCnt < this.o.weekStart + 7) { html += '<th class="dow">'+dates[this.o.language].daysMin[(dowCnt++)%7]+'</th>'; } html += '</tr>'; this.picker.find('.datepicker-days thead').append(html); }, fillMonths: function(){ var html = '', i = 0; while (i < 12) { html += '<span class="month">'+dates[this.o.language].monthsShort[i++]+'</span>'; } this.picker.find('.datepicker-months td').html(html); }, setRange: function(range){ if (!range || !range.length) delete this.range; else this.range = $.map(range, function(d){ return d.valueOf(); }); this.fill(); }, getClassNames: function(date){ var cls = [], year = this.viewDate.getUTCFullYear(), month = this.viewDate.getUTCMonth(), currentDate = this.date.valueOf(), today = new Date(); if (date.getUTCFullYear() < year || (date.getUTCFullYear() == year && date.getUTCMonth() < month)) { cls.push('old'); } else if (date.getUTCFullYear() > year || (date.getUTCFullYear() == year && date.getUTCMonth() > month)) { cls.push('new'); } // Compare internal UTC date with local today, not UTC today if (this.o.todayHighlight && date.getUTCFullYear() == today.getFullYear() && date.getUTCMonth() == today.getMonth() && date.getUTCDate() == today.getDate()) { cls.push('today'); } if (currentDate && date.valueOf() == currentDate) { cls.push('active'); } if (date.valueOf() < this.o.startDate || date.valueOf() > this.o.endDate || $.inArray(date.getUTCDay(), this.o.daysOfWeekDisabled) !== -1) { cls.push('disabled'); } if (this.range){ if (date > this.range[0] && date < this.range[this.range.length-1]){ cls.push('range'); } if ($.inArray(date.valueOf(), this.range) != -1){ cls.push('selected'); } } return cls; }, fill: function() { var d = new Date(this.viewDate), year = d.getUTCFullYear(), month = d.getUTCMonth(), startYear = this.o.startDate !== -Infinity ? this.o.startDate.getUTCFullYear() : -Infinity, startMonth = this.o.startDate !== -Infinity ? this.o.startDate.getUTCMonth() : -Infinity, endYear = this.o.endDate !== Infinity ? this.o.endDate.getUTCFullYear() : Infinity, endMonth = this.o.endDate !== Infinity ? this.o.endDate.getUTCMonth() : Infinity, currentDate = this.date && this.date.valueOf(), tooltip; this.picker.find('.datepicker-days thead th.datepicker-switch') .text(dates[this.o.language].months[month]+' '+year); this.picker.find('tfoot th.today') .text(dates[this.o.language].today) .toggle(this.o.todayBtn !== false); this.picker.find('tfoot th.clear') .text(dates[this.o.language].clear) .toggle(this.o.clearBtn !== false); this.updateNavArrows(); this.fillMonths(); var prevMonth = UTCDate(year, month-1, 28,0,0,0,0), day = DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(), prevMonth.getUTCMonth()); prevMonth.setUTCDate(day); prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.o.weekStart + 7)%7); var nextMonth = new Date(prevMonth); nextMonth.setUTCDate(nextMonth.getUTCDate() + 42); nextMonth = nextMonth.valueOf(); var html = []; var clsName; while(prevMonth.valueOf() < nextMonth) { if (prevMonth.getUTCDay() == this.o.weekStart) { html.push('<tr>'); if(this.o.calendarWeeks){ // ISO 8601: First week contains first thursday. // ISO also states week starts on Monday, but we can be more abstract here. var // Start of current week: based on weekstart/current date ws = new Date(+prevMonth + (this.o.weekStart - prevMonth.getUTCDay() - 7) % 7 * 864e5), // Thursday of this week th = new Date(+ws + (7 + 4 - ws.getUTCDay()) % 7 * 864e5), // First Thursday of year, year from thursday yth = new Date(+(yth = UTCDate(th.getUTCFullYear(), 0, 1)) + (7 + 4 - yth.getUTCDay())%7*864e5), // Calendar week: ms between thursdays, div ms per day, div 7 days calWeek = (th - yth) / 864e5 / 7 + 1; html.push('<td class="cw">'+ calWeek +'</td>'); } } clsName = this.getClassNames(prevMonth); clsName.push('day'); var before = this.o.beforeShowDay(prevMonth); if (before === undefined) before = {}; else if (typeof(before) === 'boolean') before = {enabled: before}; else if (typeof(before) === 'string') before = {classes: before}; if (before.enabled === false) clsName.push('disabled'); if (before.classes) clsName = clsName.concat(before.classes.split(/\s+/)); if (before.tooltip) tooltip = before.tooltip; clsName = $.unique(clsName); html.push('<td class="'+clsName.join(' ')+'"' + (tooltip ? ' title="'+tooltip+'"' : '') + '>'+prevMonth.getUTCDate() + '</td>'); if (prevMonth.getUTCDay() == this.o.weekEnd) { html.push('</tr>'); } prevMonth.setUTCDate(prevMonth.getUTCDate()+1); } this.picker.find('.datepicker-days tbody').empty().append(html.join('')); var currentYear = this.date && this.date.getUTCFullYear(); var months = this.picker.find('.datepicker-months') .find('th:eq(1)') .text(year) .end() .find('span').removeClass('active'); if (currentYear && currentYear == year) { months.eq(this.date.getUTCMonth()).addClass('active'); } if (year < startYear || year > endYear) { months.addClass('disabled'); } if (year == startYear) { months.slice(0, startMonth).addClass('disabled'); } if (year == endYear) { months.slice(endMonth+1).addClass('disabled'); } html = ''; year = parseInt(year/10, 10) * 10; var yearCont = this.picker.find('.datepicker-years') .find('th:eq(1)') .text(year + '-' + (year + 9)) .end() .find('td'); year -= 1; for (var i = -1; i < 11; i++) { html += '<span class="year'+(i == -1 ? ' old' : i == 10 ? ' new' : '')+(currentYear == year ? ' active' : '')+(year < startYear || year > endYear ? ' disabled' : '')+'">'+year+'</span>'; year += 1; } yearCont.html(html); }, updateNavArrows: function() { if (!this._allow_update) return; var d = new Date(this.viewDate), year = d.getUTCFullYear(), month = d.getUTCMonth(); switch (this.viewMode) { case 0: if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear() && month <= this.o.startDate.getUTCMonth()) { this.picker.find('.prev').css({visibility: 'hidden'}); } else { this.picker.find('.prev').css({visibility: 'visible'}); } if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear() && month >= this.o.endDate.getUTCMonth()) { this.picker.find('.next').css({visibility: 'hidden'}); } else { this.picker.find('.next').css({visibility: 'visible'}); } break; case 1: case 2: if (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear()) { this.picker.find('.prev').css({visibility: 'hidden'}); } else { this.picker.find('.prev').css({visibility: 'visible'}); } if (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear()) { this.picker.find('.next').css({visibility: 'hidden'}); } else { this.picker.find('.next').css({visibility: 'visible'}); } break; } }, click: function(e) { e.preventDefault(); var target = $(e.target).closest('span, td, th'); if (target.length == 1) { switch(target[0].nodeName.toLowerCase()) { case 'th': switch(target[0].className) { case 'datepicker-switch': this.showMode(1); break; case 'prev': case 'next': var dir = DPGlobal.modes[this.viewMode].navStep * (target[0].className == 'prev' ? -1 : 1); switch(this.viewMode){ case 0: this.viewDate = this.moveMonth(this.viewDate, dir); break; case 1: case 2: this.viewDate = this.moveYear(this.viewDate, dir); break; } this.fill(); break; case 'today': var date = new Date(); date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0); this.showMode(-2); var which = this.o.todayBtn == 'linked' ? null : 'view'; this._setDate(date, which); break; case 'clear': var element; if (this.isInput) element = this.element; else if (this.component) element = this.element.find('input'); if (element) element.val("").change(); this._trigger('changeDate'); this.update(); if (this.o.autoclose) this.hide(); break; } break; case 'span': if (!target.is('.disabled')) { this.viewDate.setUTCDate(1); if (target.is('.month')) { var day = 1; var month = target.parent().find('span').index(target); var year = this.viewDate.getUTCFullYear(); this.viewDate.setUTCMonth(month); this._trigger('changeMonth', this.viewDate); if (this.o.minViewMode === 1) { this._setDate(UTCDate(year, month, day,0,0,0,0)); } } else { var year = parseInt(target.text(), 10)||0; var day = 1; var month = 0; this.viewDate.setUTCFullYear(year); this._trigger('changeYear', this.viewDate); if (this.o.minViewMode === 2) { this._setDate(UTCDate(year, month, day,0,0,0,0)); } } this.showMode(-1); this.fill(); } break; case 'td': if (target.is('.day') && !target.is('.disabled')){ var day = parseInt(target.text(), 10)||1; var year = this.viewDate.getUTCFullYear(), month = this.viewDate.getUTCMonth(); if (target.is('.old')) { if (month === 0) { month = 11; year -= 1; } else { month -= 1; } } else if (target.is('.new')) { if (month == 11) { month = 0; year += 1; } else { month += 1; } } this._setDate(UTCDate(year, month, day,0,0,0,0)); } break; } } }, _setDate: function(date, which){ if (!which || which == 'date') this.date = new Date(date); if (!which || which == 'view') this.viewDate = new Date(date); this.fill(); this.setValue(); this._trigger('changeDate'); var element; if (this.isInput) { element = this.element; } else if (this.component){ element = this.element.find('input'); } if (element) { element.change(); if (this.o.autoclose && (!which || which == 'date')) { this.hide(); } } }, moveMonth: function(date, dir){ if (!dir) return date; var new_date = new Date(date.valueOf()), day = new_date.getUTCDate(), month = new_date.getUTCMonth(), mag = Math.abs(dir), new_month, test; dir = dir > 0 ? 1 : -1; if (mag == 1){ test = dir == -1 // If going back one month, make sure month is not current month // (eg, Mar 31 -> Feb 31 == Feb 28, not Mar 02) ? function(){ return new_date.getUTCMonth() == month; } // If going forward one month, make sure month is as expected // (eg, Jan 31 -> Feb 31 == Feb 28, not Mar 02) : function(){ return new_date.getUTCMonth() != new_month; }; new_month = month + dir; new_date.setUTCMonth(new_month); // Dec -> Jan (12) or Jan -> Dec (-1) -- limit expected date to 0-11 if (new_month < 0 || new_month > 11) new_month = (new_month + 12) % 12; } else { // For magnitudes >1, move one month at a time... for (var i=0; i<mag; i++) // ...which might decrease the day (eg, Jan 31 to Feb 28, etc)... new_date = this.moveMonth(new_date, dir); // ...then reset the day, keeping it in the new month new_month = new_date.getUTCMonth(); new_date.setUTCDate(day); test = function(){ return new_month != new_date.getUTCMonth(); }; } // Common date-resetting loop -- if date is beyond end of month, make it // end of month while (test()){ new_date.setUTCDate(--day); new_date.setUTCMonth(new_month); } return new_date; }, moveYear: function(date, dir){ return this.moveMonth(date, dir*12); }, dateWithinRange: function(date){ return date >= this.o.startDate && date <= this.o.endDate; }, keydown: function(e){ if (this.picker.is(':not(:visible)')){ if (e.keyCode == 27) // allow escape to hide and re-show picker this.show(); return; } var dateChanged = false, dir, day, month, newDate, newViewDate; switch(e.keyCode){ case 27: // escape this.hide(); e.preventDefault(); break; case 37: // left case 39: // right if (!this.o.keyboardNavigation) break; dir = e.keyCode == 37 ? -1 : 1; if (e.ctrlKey){ newDate = this.moveYear(this.date, dir); newViewDate = this.moveYear(this.viewDate, dir); } else if (e.shiftKey){ newDate = this.moveMonth(this.date, dir); newViewDate = this.moveMonth(this.viewDate, dir); } else { newDate = new Date(this.date); newDate.setUTCDate(this.date.getUTCDate() + dir); newViewDate = new Date(this.viewDate); newViewDate.setUTCDate(this.viewDate.getUTCDate() + dir); } if (this.dateWithinRange(newDate)){ this.date = newDate; this.viewDate = newViewDate; this.setValue(); this.update(); e.preventDefault(); dateChanged = true; } break; case 38: // up case 40: // down if (!this.o.keyboardNavigation) break; dir = e.keyCode == 38 ? -1 : 1; if (e.ctrlKey){ newDate = this.moveYear(this.date, dir); newViewDate = this.moveYear(this.viewDate, dir); } else if (e.shiftKey){ newDate = this.moveMonth(this.date, dir); newViewDate = this.moveMonth(this.viewDate, dir); } else { newDate = new Date(this.date); newDate.setUTCDate(this.date.getUTCDate() + dir * 7); newViewDate = new Date(this.viewDate); newViewDate.setUTCDate(this.viewDate.getUTCDate() + dir * 7); } if (this.dateWithinRange(newDate)){ this.date = newDate; this.viewDate = newViewDate; this.setValue(); this.update(); e.preventDefault(); dateChanged = true; } break; case 13: // enter this.hide(); e.preventDefault(); break; case 9: // tab this.hide(); break; } if (dateChanged){ this._trigger('changeDate'); var element; if (this.isInput) { element = this.element; } else if (this.component){ element = this.element.find('input'); } if (element) { element.change(); } } }, showMode: function(dir) { if (dir) { this.viewMode = Math.max(this.o.minViewMode, Math.min(2, this.viewMode + dir)); } /* vitalets: fixing bug of very special conditions: jquery 1.7.1 + webkit + show inline datepicker in bootstrap popover. Method show() does not set display css correctly and datepicker is not shown. Changed to .css('display', 'block') solve the problem. See https://github.com/vitalets/x-editable/issues/37 In jquery 1.7.2+ everything works fine. */ //this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show(); this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).css('display', 'block'); this.updateNavArrows(); } }; var DateRangePicker = function(element, options){ this.element = $(element); this.inputs = $.map(options.inputs, function(i){ return i.jquery ? i[0] : i; }); delete options.inputs; $(this.inputs) .datepicker(options) .bind('changeDate', $.proxy(this.dateUpdated, this)); this.pickers = $.map(this.inputs, function(i){ return $(i).data('datepicker'); }); this.updateDates(); }; DateRangePicker.prototype = { updateDates: function(){ this.dates = $.map(this.pickers, function(i){ return i.date; }); this.updateRanges(); }, updateRanges: function(){ var range = $.map(this.dates, function(d){ return d.valueOf(); }); $.each(this.pickers, function(i, p){ p.setRange(range); }); }, dateUpdated: function(e){ var dp = $(e.target).data('datepicker'), new_date = dp.getUTCDate(), i = $.inArray(e.target, this.inputs), l = this.inputs.length; if (i == -1) return; if (new_date < this.dates[i]){ // Date being moved earlier/left while (i>=0 && new_date < this.dates[i]){ this.pickers[i--].setUTCDate(new_date); } } else if (new_date > this.dates[i]){ // Date being moved later/right while (i<l && new_date > this.dates[i]){ this.pickers[i++].setUTCDate(new_date); } } this.updateDates(); }, remove: function(){ $.map(this.pickers, function(p){ p.remove(); }); delete this.element.data().datepicker; } }; function opts_from_el(el, prefix){ // Derive options from element data-attrs var data = $(el).data(), out = {}, inkey, replace = new RegExp('^' + prefix.toLowerCase() + '([A-Z])'), prefix = new RegExp('^' + prefix.toLowerCase()); for (var key in data) if (prefix.test(key)){ inkey = key.replace(replace, function(_,a){ return a.toLowerCase(); }); out[inkey] = data[key]; } return out; } function opts_from_locale(lang){ // Derive options from locale plugins var out = {}; // Check if "de-DE" style date is available, if not language should // fallback to 2 letter code eg "de" if (!dates[lang]) { lang = lang.split('-')[0] if (!dates[lang]) return; } var d = dates[lang]; $.each(locale_opts, function(i,k){ if (k in d) out[k] = d[k]; }); return out; } var old = $.fn.datepicker; var datepicker = $.fn.datepicker = function ( option ) { var args = Array.apply(null, arguments); args.shift(); var internal_return, this_return; this.each(function () { var $this = $(this), data = $this.data('datepicker'), options = typeof option == 'object' && option; if (!data) { var elopts = opts_from_el(this, 'date'), // Preliminary otions xopts = $.extend({}, defaults, elopts, options), locopts = opts_from_locale(xopts.language), // Options priority: js args, data-attrs, locales, defaults opts = $.extend({}, defaults, locopts, elopts, options); if ($this.is('.input-daterange') || opts.inputs){ var ropts = { inputs: opts.inputs || $this.find('input').toArray() }; $this.data('datepicker', (data = new DateRangePicker(this, $.extend(opts, ropts)))); } else{ $this.data('datepicker', (data = new Datepicker(this, opts))); } } if (typeof option == 'string' && typeof data[option] == 'function') { internal_return = data[option].apply(data, args); if (internal_return !== undefined) return false; } }); if (internal_return !== undefined) return internal_return; else return this; }; var defaults = $.fn.datepicker.defaults = { autoclose: false, beforeShowDay: $.noop, calendarWeeks: false, clearBtn: false, daysOfWeekDisabled: [], endDate: Infinity, forceParse: true, format: 'mm/dd/yyyy', keyboardNavigation: true, language: 'en', minViewMode: 0, rtl: false, startDate: -Infinity, startView: 0, todayBtn: false, todayHighlight: false, weekStart: 0 }; var locale_opts = $.fn.datepicker.locale_opts = [ 'format', 'rtl', 'weekStart' ]; $.fn.datepicker.Constructor = Datepicker; var dates = $.fn.datepicker.dates = { en: { days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"], months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], today: "Today", clear: "Clear" } }; var DPGlobal = { modes: [ { clsName: 'days', navFnc: 'Month', navStep: 1 }, { clsName: 'months', navFnc: 'FullYear', navStep: 1 }, { clsName: 'years', navFnc: 'FullYear', navStep: 10 }], isLeapYear: function (year) { return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0)); }, getDaysInMonth: function (year, month) { return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]; }, validParts: /dd?|DD?|mm?|MM?|yy(?:yy)?/g, nonpunctuation: /[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g, parseFormat: function(format){ // IE treats \0 as a string end in inputs (truncating the value), // so it's a bad format delimiter, anyway var separators = format.replace(this.validParts, '\0').split('\0'), parts = format.match(this.validParts); if (!separators || !separators.length || !parts || parts.length === 0){ throw new Error("Invalid date format."); } return {separators: separators, parts: parts}; }, parseDate: function(date, format, language) { if (date instanceof Date) return date; if (typeof format === 'string') format = DPGlobal.parseFormat(format); if (/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(date)) { var part_re = /([\-+]\d+)([dmwy])/, parts = date.match(/([\-+]\d+)([dmwy])/g), part, dir; date = new Date(); for (var i=0; i<parts.length; i++) { part = part_re.exec(parts[i]); dir = parseInt(part[1]); switch(part[2]){ case 'd': date.setUTCDate(date.getUTCDate() + dir); break; case 'm': date = Datepicker.prototype.moveMonth.call(Datepicker.prototype, date, dir); break; case 'w': date.setUTCDate(date.getUTCDate() + dir * 7); break; case 'y': date = Datepicker.prototype.moveYear.call(Datepicker.prototype, date, dir); break; } } return UTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0); } var parts = date && date.match(this.nonpunctuation) || [], date = new Date(), parsed = {}, setters_order = ['yyyy', 'yy', 'M', 'MM', 'm', 'mm', 'd', 'dd'], setters_map = { yyyy: function(d,v){ return d.setUTCFullYear(v); }, yy: function(d,v){ return d.setUTCFullYear(2000+v); }, m: function(d,v){ v -= 1; while (v<0) v += 12; v %= 12; d.setUTCMonth(v); while (d.getUTCMonth() != v) d.setUTCDate(d.getUTCDate()-1); return d; }, d: function(d,v){ return d.setUTCDate(v); } }, val, filtered, part; setters_map['M'] = setters_map['MM'] = setters_map['mm'] = setters_map['m']; setters_map['dd'] = setters_map['d']; date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0); var fparts = format.parts.slice(); // Remove noop parts if (parts.length != fparts.length) { fparts = $(fparts).filter(function(i,p){ return $.inArray(p, setters_order) !== -1; }).toArray(); } // Process remainder if (parts.length == fparts.length) { for (var i=0, cnt = fparts.length; i < cnt; i++) { val = parseInt(parts[i], 10); part = fparts[i]; if (isNaN(val)) { switch(part) { case 'MM': filtered = $(dates[language].months).filter(function(){ var m = this.slice(0, parts[i].length), p = parts[i].slice(0, m.length); return m == p; }); val = $.inArray(filtered[0], dates[language].months) + 1; break; case 'M': filtered = $(dates[language].monthsShort).filter(function(){ var m = this.slice(0, parts[i].length), p = parts[i].slice(0, m.length); return m == p; }); val = $.inArray(filtered[0], dates[language].monthsShort) + 1; break; } } parsed[part] = val; } for (var i=0, s; i<setters_order.length; i++){ s = setters_order[i]; if (s in parsed && !isNaN(parsed[s])) setters_map[s](date, parsed[s]); } } return date; }, formatDate: function(date, format, language){ if (typeof format === 'string') format = DPGlobal.parseFormat(format); var val = { d: date.getUTCDate(), D: dates[language].daysShort[date.getUTCDay()], DD: dates[language].days[date.getUTCDay()], m: date.getUTCMonth() + 1, M: dates[language].monthsShort[date.getUTCMonth()], MM: dates[language].months[date.getUTCMonth()], yy: date.getUTCFullYear().toString().substring(2), yyyy: date.getUTCFullYear() }; val.dd = (val.d < 10 ? '0' : '') + val.d; val.mm = (val.m < 10 ? '0' : '') + val.m; var date = [], seps = $.extend([], format.separators); for (var i=0, cnt = format.parts.length; i <= cnt; i++) { if (seps.length) date.push(seps.shift()); date.push(val[format.parts[i]]); } return date.join(''); }, headTemplate: '<thead>'+ '<tr>'+ '<th class="prev"><i class="fa fa-angle-left"/></th>'+ '<th colspan="5" class="datepicker-switch"></th>'+ '<th class="next"><i class="fa fa-angle-right"/></th>'+ '</tr>'+ '</thead>', contTemplate: '<tbody><tr><td colspan="7"></td></tr></tbody>', footTemplate: '<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>' }; DPGlobal.template = '<div class="datepicker">'+ '<div class="datepicker-days">'+ '<table class=" table-condensed">'+ DPGlobal.headTemplate+ '<tbody></tbody>'+ DPGlobal.footTemplate+ '</table>'+ '</div>'+ '<div class="datepicker-months">'+ '<table class="table-condensed">'+ DPGlobal.headTemplate+ DPGlobal.contTemplate+ DPGlobal.footTemplate+ '</table>'+ '</div>'+ '<div class="datepicker-years">'+ '<table class="table-condensed">'+ DPGlobal.headTemplate+ DPGlobal.contTemplate+ DPGlobal.footTemplate+ '</table>'+ '</div>'+ '</div>'; $.fn.datepicker.DPGlobal = DPGlobal; /* DATEPICKER NO CONFLICT * =================== */ $.fn.datepicker.noConflict = function(){ $.fn.datepicker = old; return this; }; /* DATEPICKER DATA-API * ================== */ $(document).on( 'focus.datepicker.data-api click.datepicker.data-api', '[data-provide="datepicker"]', function(e){ var $this = $(this); if ($this.data('datepicker')) return; e.preventDefault(); // component click requires us to explicitly show it datepicker.call($this, 'show'); } ); $(function(){ //$('[data-provide="datepicker-inline"]').datepicker(); //vit: changed to support noConflict() datepicker.call($('[data-provide="datepicker-inline"]')); }); }( window.jQuery )); /** Bootstrap-datepicker. Description and examples: https://github.com/eternicode/bootstrap-datepicker. For **i18n** you should include js file from here: https://github.com/eternicode/bootstrap-datepicker/tree/master/js/locales and set `language` option. Since 1.4.0 date has different appearance in **popup** and **inline** modes. @class date @extends abstractinput @final @example <a href="#" id="dob" data-type="date" data-pk="1" data-url="/post" data-original-title="Select date">15/05/1984</a> <script> $(function(){ $('#dob').editable({ format: 'yyyy-mm-dd', viewformat: 'dd/mm/yyyy', datepicker: { weekStart: 1 } } }); }); </script> **/ (function ($) { "use strict"; //store bootstrap-datepicker as bdateicker to exclude conflict with jQuery UI one $.fn.bdatepicker = $.fn.datepicker.noConflict(); if(!$.fn.datepicker) { //if there were no other datepickers, keep also original name $.fn.datepicker = $.fn.bdatepicker; } var Date = function (options) { this.init('date', options, Date.defaults); this.initPicker(options, Date.defaults); }; $.fn.editableutils.inherit(Date, $.fn.editabletypes.abstractinput); $.extend(Date.prototype, { initPicker: function(options, defaults) { //'format' is set directly from settings or data-* attributes //by default viewformat equals to format if(!this.options.viewformat) { this.options.viewformat = this.options.format; } //try parse datepicker config defined as json string in data-datepicker options.datepicker = $.fn.editableutils.tryParseJson(options.datepicker, true); //overriding datepicker config (as by default jQuery extend() is not recursive) //since 1.4 datepicker internally uses viewformat instead of format. Format is for submit only this.options.datepicker = $.extend({}, defaults.datepicker, options.datepicker, { format: this.options.viewformat }); //language this.options.datepicker.language = this.options.datepicker.language || 'en'; //store DPglobal this.dpg = $.fn.bdatepicker.DPGlobal; //store parsed formats this.parsedFormat = this.dpg.parseFormat(this.options.format); this.parsedViewFormat = this.dpg.parseFormat(this.options.viewformat); }, render: function () { this.$input.bdatepicker(this.options.datepicker); //"clear" link if(this.options.clear) { this.$clear = $('<a href="#"></a>').html(this.options.clear).click($.proxy(function(e){ e.preventDefault(); e.stopPropagation(); this.clear(); }, this)); this.$tpl.parent().append($('<div class="editable-clear">').append(this.$clear)); } }, value2html: function(value, element) { var text = value ? this.dpg.formatDate(value, this.parsedViewFormat, this.options.datepicker.language) : ''; Date.superclass.value2html(text, element); }, html2value: function(html) { return this.parseDate(html, this.parsedViewFormat); }, value2str: function(value) { return value ? this.dpg.formatDate(value, this.parsedFormat, this.options.datepicker.language) : ''; }, str2value: function(str) { return this.parseDate(str, this.parsedFormat); }, value2submit: function(value) { return this.value2str(value); }, value2input: function(value) { this.$input.bdatepicker('update', value); }, input2value: function() { return this.$input.data('datepicker').date; }, activate: function() { }, clear: function() { this.$input.data('datepicker').date = null; this.$input.find('.active').removeClass('active'); if(!this.options.showbuttons) { this.$input.closest('form').submit(); } }, autosubmit: function() { this.$input.on('mouseup', '.day', function(e){ if($(e.currentTarget).is('.old') || $(e.currentTarget).is('.new')) { return; } var $form = $(this).closest('form'); setTimeout(function() { $form.submit(); }, 200); }); //changedate is not suitable as it triggered when showing datepicker. see #149 /* this.$input.on('changeDate', function(e){ var $form = $(this).closest('form'); setTimeout(function() { $form.submit(); }, 200); }); */ }, /* For incorrect date bootstrap-datepicker returns current date that is not suitable for datefield. This function returns null for incorrect date. */ parseDate: function(str, format) { var date = null, formattedBack; if(str) { date = this.dpg.parseDate(str, format, this.options.datepicker.language); if(typeof str === 'string') { formattedBack = this.dpg.formatDate(date, format, this.options.datepicker.language); if(str !== formattedBack) { date = null; } } } return date; } }); Date.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** @property tpl @default <div></div> **/ tpl:'<div class="editable-date well"></div>', /** @property inputclass @default null **/ inputclass: null, /** Format used for sending value to server. Also applied when converting date from <code>data-value</code> attribute.<br> Possible tokens are: <code>d, dd, m, mm, yy, yyyy</code> @property format @type string @default yyyy-mm-dd **/ format:'yyyy-mm-dd', /** Format used for displaying date. Also applied when converting date from element's text on init. If not specified equals to <code>format</code> @property viewformat @type string @default null **/ viewformat: null, /** Configuration of datepicker. Full list of options: http://vitalets.github.com/bootstrap-datepicker @property datepicker @type object @default { weekStart: 0, startView: 0, minViewMode: 0, autoclose: false } **/ datepicker:{ weekStart: 0, startView: 0, minViewMode: 0, autoclose: false }, /** Text shown as clear date button. If <code>false</code> clear button will not be rendered. @property clear @type boolean|string @default 'x clear' **/ clear: 'clear <i class="icon-remove fa fa-times" style="font-size:12px"></i>' }); $.fn.editabletypes.date = Date; }(window.jQuery)); /** Bootstrap datefield input - modification for inline mode. Shows normal <input type="text"> and binds popup datepicker. Automatically shown in inline mode. @class datefield @extends date @since 1.4.0 **/ (function ($) { "use strict"; var DateField = function (options) { this.init('datefield', options, DateField.defaults); this.initPicker(options, DateField.defaults); }; $.fn.editableutils.inherit(DateField, $.fn.editabletypes.date); $.extend(DateField.prototype, { render: function () { this.$input = this.$tpl.find('input'); this.setClass(); this.setAttr('placeholder'); //bootstrap-datepicker is set `bdateicker` to exclude conflict with jQuery UI one. (in date.js) this.$tpl.bdatepicker(this.options.datepicker); //need to disable original event handlers this.$input.off('focus keydown'); //update value of datepicker this.$input.keyup($.proxy(function(){ this.$tpl.removeData('date'); this.$tpl.bdatepicker('update'); }, this)); }, value2input: function(value) { this.$input.val(value ? this.dpg.formatDate(value, this.parsedViewFormat, this.options.datepicker.language) : ''); this.$tpl.bdatepicker('update'); }, input2value: function() { return this.html2value(this.$input.val()); }, activate: function() { $.fn.editabletypes.text.prototype.activate.call(this); }, autosubmit: function() { //reset autosubmit to empty } }); DateField.defaults = $.extend({}, $.fn.editabletypes.date.defaults, { /** @property tpl **/ tpl:'<div class="input-group input-group-fixed date"><input type="text" readonly class="form-control input-medium pull-left"/><span class="input-group-btn pull-left"><button class="btn default" type="button"><i class="fa fa-calendar"></i></button></span></div>', /** @property inputclass @default 'input-small' **/ inputclass: 'form-control input-medium', /* datepicker config */ datepicker: { weekStart: 0, startView: 0, minViewMode: 0, autoclose: true } }); $.fn.editabletypes.datefield = DateField; }(window.jQuery)); /** Bootstrap-datetimepicker. Based on [smalot bootstrap-datetimepicker plugin](https://github.com/smalot/bootstrap-datetimepicker). Before usage you should manually include dependent js and css: <link href="css/datetimepicker.css" rel="stylesheet" type="text/css"></link> <script src="js/bootstrap-datetimepicker.js"></script> For **i18n** you should include js file from here: https://github.com/smalot/bootstrap-datetimepicker/tree/master/js/locales and set `language` option. @class datetime @extends abstractinput @final @since 1.4.4 @example <a href="#" id="last_seen" data-type="datetime" data-pk="1" data-url="/post" title="Select date & time">15/03/2013 12:45</a> <script> $(function(){ $('#last_seen').editable({ format: 'yyyy-mm-dd hh:ii', viewformat: 'dd/mm/yyyy hh:ii', datetimepicker: { weekStart: 1 } } }); }); </script> **/ (function ($) { "use strict"; var DateTime = function (options) { this.init('datetime', options, DateTime.defaults); this.initPicker(options, DateTime.defaults); }; $.fn.editableutils.inherit(DateTime, $.fn.editabletypes.abstractinput); $.extend(DateTime.prototype, { initPicker: function(options, defaults) { //'format' is set directly from settings or data-* attributes //by default viewformat equals to format if(!this.options.viewformat) { this.options.viewformat = this.options.format; } //try parse datetimepicker config defined as json string in data-datetimepicker options.datetimepicker = $.fn.editableutils.tryParseJson(options.datetimepicker, true); //overriding datetimepicker config (as by default jQuery extend() is not recursive) //since 1.4 datetimepicker internally uses viewformat instead of format. Format is for submit only this.options.datetimepicker = $.extend({}, defaults.datetimepicker, options.datetimepicker, { format: this.options.viewformat }); //language this.options.datetimepicker.language = this.options.datetimepicker.language || 'en'; //store DPglobal this.dpg = $.fn.datetimepicker.DPGlobal; //store parsed formats this.parsedFormat = this.dpg.parseFormat(this.options.format, this.options.formatType); this.parsedViewFormat = this.dpg.parseFormat(this.options.viewformat, this.options.formatType); }, render: function () { this.$input.datetimepicker(this.options.datetimepicker); //adjust container position when viewMode changes //see https://github.com/smalot/bootstrap-datetimepicker/pull/80 this.$input.on('changeMode', function(e) { var f = $(this).closest('form').parent(); //timeout here, otherwise container changes position before form has new size setTimeout(function(){ f.triggerHandler('resize'); }, 0); }); //"clear" link if(this.options.clear) { this.$clear = $('<a href="#"></a>').html(this.options.clear).click($.proxy(function(e){ e.preventDefault(); e.stopPropagation(); this.clear(); }, this)); this.$tpl.parent().append($('<div class="editable-clear">').append(this.$clear)); } }, value2html: function(value, element) { //formatDate works with UTCDate! var text = value ? this.dpg.formatDate(this.toUTC(value), this.parsedViewFormat, this.options.datetimepicker.language, this.options.formatType) : ''; if(element) { DateTime.superclass.value2html(text, element); } else { return text; } }, html2value: function(html) { //parseDate return utc date! var value = this.parseDate(html, this.parsedViewFormat); return value ? this.fromUTC(value) : null; }, value2str: function(value) { //formatDate works with UTCDate! return value ? this.dpg.formatDate(this.toUTC(value), this.parsedFormat, this.options.datetimepicker.language, this.options.formatType) : ''; }, str2value: function(str) { //parseDate return utc date! var value = this.parseDate(str, this.parsedFormat); return value ? this.fromUTC(value) : null; }, value2submit: function(value) { return this.value2str(value); }, value2input: function(value) { if(value) { this.$input.data('datetimepicker').setDate(value); } }, input2value: function() { //date may be cleared, in that case getDate() triggers error var dt = this.$input.data('datetimepicker'); return dt.date ? dt.getDate() : null; }, activate: function() { }, clear: function() { this.$input.data('datetimepicker').date = null; this.$input.find('.active').removeClass('active'); if(!this.options.showbuttons) { this.$input.closest('form').submit(); } }, autosubmit: function() { this.$input.on('mouseup', '.minute', function(e){ var $form = $(this).closest('form'); setTimeout(function() { $form.submit(); }, 200); }); }, //convert date from local to utc toUTC: function(value) { return value ? new Date(value.valueOf() - value.getTimezoneOffset() * 60000) : value; }, //convert date from utc to local fromUTC: function(value) { return value ? new Date(value.valueOf() + value.getTimezoneOffset() * 60000) : value; }, /* For incorrect date bootstrap-datetimepicker returns current date that is not suitable for datetimefield. This function returns null for incorrect date. */ parseDate: function(str, format) { var date = null, formattedBack; if(str) { date = this.dpg.parseDate(str, format, this.options.datetimepicker.language, this.options.formatType); if(typeof str === 'string') { formattedBack = this.dpg.formatDate(date, format, this.options.datetimepicker.language, this.options.formatType); if(str !== formattedBack) { date = null; } } } return date; } }); DateTime.defaults = $.extend({}, $.fn.editabletypes.abstractinput.defaults, { /** @property tpl @default <div></div> **/ tpl:'<div class="editable-date well"></div>', /** @property inputclass @default null **/ inputclass: null, /** Format used for sending value to server. Also applied when converting date from <code>data-value</code> attribute.<br> Possible tokens are: <code>d, dd, m, mm, yy, yyyy, h, i</code> @property format @type string @default yyyy-mm-dd hh:ii **/ format:'yyyy-mm-dd hh:ii', formatType:'standard', /** Format used for displaying date. Also applied when converting date from element's text on init. If not specified equals to <code>format</code> @property viewformat @type string @default null **/ viewformat: null, /** Configuration of datetimepicker. Full list of options: https://github.com/smalot/bootstrap-datetimepicker @property datetimepicker @type object @default { } **/ datetimepicker:{ todayHighlight: false, autoclose: false }, /** Text shown as clear date button. If <code>false</code> clear button will not be rendered. @property clear @type boolean|string @default 'x clear' **/ clear: 'clear <i class="icon-remove fa fa-times" style="font-size:12px"></i>' }); $.fn.editabletypes.datetime = DateTime; }(window.jQuery)); /** Bootstrap datetimefield input - datetime input for inline mode. Shows normal <input type="text"> and binds popup datetimepicker. Automatically shown in inline mode. @class datetimefield @extends datetime **/ (function ($) { "use strict"; var DateTimeField = function (options) { this.init('datetimefield', options, DateTimeField.defaults); this.initPicker(options, DateTimeField.defaults); }; $.fn.editableutils.inherit(DateTimeField, $.fn.editabletypes.datetime); $.extend(DateTimeField.prototype, { render: function () { this.$input = this.$tpl.find('input'); this.setClass(); this.setAttr('placeholder'); this.$tpl.datetimepicker(this.options.datetimepicker); //need to disable original event handlers this.$input.off('focus keydown'); //update value of datepicker this.$input.keyup($.proxy(function(){ this.$tpl.removeData('date'); this.$tpl.datetimepicker('update'); }, this)); }, value2input: function(value) { this.$input.val(this.value2html(value)); this.$tpl.datetimepicker('update'); }, input2value: function() { return this.html2value(this.$input.val()); }, activate: function() { $.fn.editabletypes.text.prototype.activate.call(this); }, autosubmit: function() { //reset autosubmit to empty } }); DateTimeField.defaults = $.extend({}, $.fn.editabletypes.datetime.defaults, { /** @property tpl **/ tpl:'<div class="input-group input-group-fixed date"><input type="text" readonly class="form-control input-medium pull-left"/><span class="input-group-btn pull-left"><button class="btn date-set default" type="button"><i class="fa fa-calendar"></i></button></span></div>', /** @property inputclass @default 'input-medium' **/ inputclass: 'form-control input-medium', /* datetimepicker config */ datetimepicker:{ todayHighlight: false, autoclose: true } }); $.fn.editabletypes.datetimefield = DateTimeField; }(window.jQuery)); /** Typeahead input (bootstrap only). Based on Twitter Bootstrap [typeahead](http://twitter.github.com/bootstrap/javascript.html#typeahead). Depending on `source` format typeahead operates in two modes: * **strings**: When `source` defined as array of strings, e.g. `['text1', 'text2', 'text3' ...]`. User can submit one of these strings or any text entered in input (even if it is not matching source). * **objects**: When `source` defined as array of objects, e.g. `[{value: 1, text: "text1"}, {value: 2, text: "text2"}, ...]`. User can submit only values that are in source (otherwise `null` is submitted). This is more like *dropdown* behavior. @class typeahead @extends list @since 1.4.1 @final @example <a href="#" id="country" data-type="typeahead" data-pk="1" data-url="/post" data-original-title="Input country"></a> <script> $(function(){ $('#country').editable({ value: 'ru', source: [ {value: 'gb', text: 'Great Britain'}, {value: 'us', text: 'United States'}, {value: 'ru', text: 'Russia'} ] }); }); </script> **/ (function ($) { "use strict"; var Constructor = function (options) { this.init('typeahead', options, Constructor.defaults); //overriding objects in config (as by default jQuery extend() is not recursive) this.options.typeahead = $.extend({}, Constructor.defaults.typeahead, { //set default methods for typeahead to work with objects matcher: this.matcher, sorter: this.sorter, highlighter: this.highlighter, updater: this.updater }, options.typeahead); }; $.fn.editableutils.inherit(Constructor, $.fn.editabletypes.list); $.extend(Constructor.prototype, { renderList: function() { this.$input = this.$tpl.is('input') ? this.$tpl : this.$tpl.find('input[type="text"]'); //set source of typeahead this.options.typeahead.source = this.sourceData; //apply typeahead this.$input.typeahead(this.options.typeahead); //patch some methods in typeahead var ta = this.$input.data('typeahead'); ta.render = $.proxy(this.typeaheadRender, ta); ta.select = $.proxy(this.typeaheadSelect, ta); ta.move = $.proxy(this.typeaheadMove, ta); this.renderClear(); this.setClass(); this.setAttr('placeholder'); }, value2htmlFinal: function(value, element) { if(this.getIsObjects()) { var items = $.fn.editableutils.itemsByValue(value, this.sourceData); $(element).text(items.length ? items[0].text : ''); } else { $(element).text(value); } }, html2value: function (html) { return html ? html : null; }, value2input: function(value) { if(this.getIsObjects()) { var items = $.fn.editableutils.itemsByValue(value, this.sourceData); this.$input.data('value', value).val(items.length ? items[0].text : ''); } else { this.$input.val(value); } }, input2value: function() { if(this.getIsObjects()) { var value = this.$input.data('value'), items = $.fn.editableutils.itemsByValue(value, this.sourceData); if(items.length && items[0].text.toLowerCase() === this.$input.val().toLowerCase()) { return value; } else { return null; //entered string not found in source } } else { return this.$input.val(); } }, /* if in sourceData values <> texts, typeahead in "objects" mode: user must pick some value from list, otherwise `null` returned. if all values == texts put typeahead in "strings" mode: anything what entered is submited. */ getIsObjects: function() { if(this.isObjects === undefined) { this.isObjects = false; for(var i=0; i<this.sourceData.length; i++) { if(this.sourceData[i].value !== this.sourceData[i].text) { this.isObjects = true; break; } } } return this.isObjects; }, /* Methods borrowed from text input */ activate: $.fn.editabletypes.text.prototype.activate, renderClear: $.fn.editabletypes.text.prototype.renderClear, postrender: $.fn.editabletypes.text.prototype.postrender, toggleClear: $.fn.editabletypes.text.prototype.toggleClear, clear: function() { $.fn.editabletypes.text.prototype.clear.call(this); this.$input.data('value', ''); }, /* Typeahead option methods used as defaults */ /*jshint eqeqeq:false, curly: false, laxcomma: true, asi: true*/ matcher: function (item) { return $.fn.typeahead.Constructor.prototype.matcher.call(this, item.text); }, sorter: function (items) { var beginswith = [] , caseSensitive = [] , caseInsensitive = [] , item , text; while (item = items.shift()) { text = item.text; if (!text.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item); else if (~text.indexOf(this.query)) caseSensitive.push(item); else caseInsensitive.push(item); } return beginswith.concat(caseSensitive, caseInsensitive); }, highlighter: function (item) { return $.fn.typeahead.Constructor.prototype.highlighter.call(this, item.text); }, updater: function (item) { this.$element.data('value', item.value); return item.text; }, /* Overwrite typeahead's render method to store objects. There are a lot of disscussion in bootstrap repo on this point and still no result. See https://github.com/twitter/bootstrap/issues/5967 This function just store item via jQuery data() method instead of attr('data-value') */ typeaheadRender: function (items) { var that = this; items = $(items).map(function (i, item) { // i = $(that.options.item).attr('data-value', item) i = $(that.options.item).data('item', item); i.find('a').html(that.highlighter(item)); return i[0]; }); //add option to disable autoselect of first line //see https://github.com/twitter/bootstrap/pull/4164 if (this.options.autoSelect) { items.first().addClass('active'); } this.$menu.html(items); return this; }, //add option to disable autoselect of first line //see https://github.com/twitter/bootstrap/pull/4164 typeaheadSelect: function () { var val = this.$menu.find('.active').data('item') if(this.options.autoSelect || val){ this.$element .val(this.updater(val)) .change() } return this.hide() }, /* if autoSelect = false and nothing matched we need extra press onEnter that is not convinient. This patch fixes it. */ typeaheadMove: function (e) { if (!this.shown) return switch(e.keyCode) { case 9: // tab case 13: // enter case 27: // escape if (!this.$menu.find('.active').length) return e.preventDefault() break case 38: // up arrow e.preventDefault() this.prev() break case 40: // down arrow e.preventDefault() this.next() break } e.stopPropagation() } /*jshint eqeqeq: true, curly: true, laxcomma: false, asi: false*/ }); Constructor.defaults = $.extend({}, $.fn.editabletypes.list.defaults, { /** @property tpl @default <input type="text"> **/ tpl:'<input type="text">', /** Configuration of typeahead. [Full list of options](http://twitter.github.com/bootstrap/javascript.html#typeahead). @property typeahead @type object @default null **/ typeahead: null, /** Whether to show `clear` button @property clear @type boolean @default true **/ clear: true }); $.fn.editabletypes.typeahead = Constructor; }(window.jQuery));
lib/components/DateTitle.js
devinmarieb/budget-app
import React, { Component } from 'react'; import moment from 'moment'; import Button from './Button'; export default class DateTitle extends Component { render() { return ( <aside className='month-name-section'> <h3 className={this.props.className}>{ this.props.content }</h3> </aside> ); } }
fixtures/ssr/src/index.js
wmydz1/react
import React from 'react'; import {render} from 'react-dom'; import App from './components/App'; render(<App assets={window.assetManifest} />, document);
src/js/app-car-tool.js
training4developers/react_redux_12122016
/* @flow */ import React from 'react'; import ReactDOM from 'react-dom'; import 'bootstrap-loader'; import '../css/styles.scss'; import { CarTool } from './components/car-tool'; import { appStore } from './app-store'; ReactDOM.render(<CarTool toolCaption='Table of Cars' store={appStore} />, document.querySelector('main'));
client/modules/accounts/templates/dropdown/dropdown.js
evereveofficial/reaction
import { Reaction, Logger } from "/client/api"; import { Tags } from "/lib/collections"; import { Session } from "meteor/session"; import { Meteor } from "meteor/meteor"; import { Template } from "meteor/templating"; Template.loginDropdown.events({ /** * Submit sign up form * @param {Event} event - jQuery Event * @param {Template} template - Blaze Template * @return {void} */ "click #logout": (event, template) => { event.preventDefault(); template.$(".dropdown-toggle").dropdown("toggle"); // Meteor.logoutOtherClients(); Meteor.logout((error) => { if (error) { Logger.warn("Failed to logout.", error); } }); }, /** * Submit sign up form * @param {Event} event - jQuery Event * @param {Template} template - Blaze Template * @return {void} */ "click .user-accounts-dropdown-apps a": function (event, template) { if (this.name === "createProduct") { event.preventDefault(); event.stopPropagation(); Meteor.call("products/createProduct", (error, productId) => { let currentTag; let currentTagId; if (error) { throw new Meteor.Error("createProduct error", error); } else if (productId) { currentTagId = Session.get("currentTag"); currentTag = Tags.findOne(currentTagId); if (currentTag) { Meteor.call("products/updateProductTags", productId, currentTag.name, currentTagId); } Reaction.Router.go("product", { handle: productId }); } }); } else if (this.name !== "account/profile") { event.preventDefault(); /** TMP **/ Reaction.showActionView(this); } else if (this.route || this.name) { const route = this.name || this.route; Reaction.Router.go(route); } template.$(".dropdown-toggle").dropdown("toggle"); } }); Template.accountsDropdownApps.helpers({ reactionAppsOptions() { // get shortcuts with audience permissions based on user roles const roles = Roles.getRolesForUser(Meteor.userId(), Reaction.getShopId()); return { provides: "shortcut", enabled: true, audience: roles }; } });
client/views/admin/emailInbox/EmailInboxPage.js
VoiSmart/Rocket.Chat
import { Button, Icon } from '@rocket.chat/fuselage'; import React from 'react'; import Page from '../../../components/Page'; import { useRoute, useRouteParameter } from '../../../contexts/RouterContext'; import { useTranslation } from '../../../contexts/TranslationContext'; import EmailInboxEditWithData from './EmailInboxEditWithData'; import EmailInboxForm from './EmailInboxForm'; import EmailInboxTable from './EmailInboxTable'; export function EmailInboxPage() { const t = useTranslation(); const context = useRouteParameter('context'); const id = useRouteParameter('_id'); const emailInboxRoute = useRoute('admin-email-inboxes'); const handleNewButtonClick = () => { emailInboxRoute.push({ context: 'new' }); }; return ( <Page flexDirection='row'> <Page> <Page.Header title={t('Email_Inboxes')}> {context && ( <Button alignSelf='flex-end' onClick={() => emailInboxRoute.push({})}> <Icon name='back' /> {t('Back')} </Button> )} {!context && ( <Button primary onClick={handleNewButtonClick}> <Icon name='plus' /> {t('New_Email_Inbox')} </Button> )} </Page.Header> <Page.Content> {!context && <EmailInboxTable />} {context === 'new' && <EmailInboxForm />} {context === 'edit' && <EmailInboxEditWithData id={id} />} </Page.Content> </Page> </Page> ); } export default EmailInboxPage;
node_modules/react-native/node_modules/react-tools/src/addons/transitions/__tests__/ReactTransitionGroup-test.js
IlyasM/relay
/** * 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'; var React; var ReactTransitionGroup; // Most of the real functionality is covered in other unit tests, this just // makes sure we're wired up correctly. describe('ReactTransitionGroup', function() { var container; beforeEach(function() { React = require('React'); ReactTransitionGroup = require('ReactTransitionGroup'); container = document.createElement('div'); }); it('should handle willEnter correctly', function() { var log = []; var Child = React.createClass({ componentDidMount: function() { log.push('didMount'); }, componentWillAppear: function(cb) { log.push('willAppear'); cb(); }, componentDidAppear: function() { log.push('didAppear'); }, componentWillEnter: function(cb) { log.push('willEnter'); cb(); }, componentDidEnter: function() { log.push('didEnter'); }, componentWillLeave: function(cb) { log.push('willLeave'); cb(); }, componentDidLeave: function() { log.push('didLeave'); }, componentWillUnmount: function() { log.push('willUnmount'); }, render: function() { return <span />; }, }); var Component = React.createClass({ getInitialState: function() { return {count: 1}; }, render: function() { var children = []; for (var i = 0; i < this.state.count; i++) { children.push(<Child key={i} />); } return <ReactTransitionGroup>{children}</ReactTransitionGroup>; }, }); var instance = React.render(<Component />, container); expect(log).toEqual(['didMount', 'willAppear', 'didAppear']); log = []; instance.setState({count: 2}, function() { expect(log).toEqual(['didMount', 'willEnter', 'didEnter']); log = []; instance.setState({count: 1}, function() { expect(log).toEqual(['willLeave', 'didLeave', 'willUnmount']); }); }); }); it('should handle enter/leave/enter/leave correctly', function() { var log = []; var willEnterCb; var Child = React.createClass({ componentDidMount: function() { log.push('didMount'); }, componentWillEnter: function(cb) { log.push('willEnter'); willEnterCb = cb; }, componentDidEnter: function() { log.push('didEnter'); }, componentWillLeave: function(cb) { log.push('willLeave'); cb(); }, componentDidLeave: function() { log.push('didLeave'); }, componentWillUnmount: function() { log.push('willUnmount'); }, render: function() { return <span />; }, }); var Component = React.createClass({ getInitialState: function() { return {count: 1}; }, render: function() { var children = []; for (var i = 0; i < this.state.count; i++) { children.push(<Child key={i} />); } return <ReactTransitionGroup>{children}</ReactTransitionGroup>; }, }); var instance = React.render(<Component />, container); expect(log).toEqual(['didMount']); instance.setState({count: 2}); expect(log).toEqual(['didMount', 'didMount', 'willEnter']); for (var k = 0; k < 5; k++) { instance.setState({count: 2}); expect(log).toEqual(['didMount', 'didMount', 'willEnter']); instance.setState({count: 1}); } // other animations are blocked until willEnterCb is called willEnterCb(); expect(log).toEqual([ 'didMount', 'didMount', 'willEnter', 'didEnter', 'willLeave', 'didLeave', 'willUnmount', ]); }); it('should handle enter/leave/enter correctly', function() { var log = []; var willEnterCb; var Child = React.createClass({ componentDidMount: function() { log.push('didMount'); }, componentWillEnter: function(cb) { log.push('willEnter'); willEnterCb = cb; }, componentDidEnter: function() { log.push('didEnter'); }, componentWillLeave: function(cb) { log.push('willLeave'); cb(); }, componentDidLeave: function() { log.push('didLeave'); }, componentWillUnmount: function() { log.push('willUnmount'); }, render: function() { return <span />; }, }); var Component = React.createClass({ getInitialState: function() { return {count: 1}; }, render: function() { var children = []; for (var i = 0; i < this.state.count; i++) { children.push(<Child key={i} />); } return <ReactTransitionGroup>{children}</ReactTransitionGroup>; }, }); var instance = React.render(<Component />, container); expect(log).toEqual(['didMount']); instance.setState({count: 2}); expect(log).toEqual(['didMount', 'didMount', 'willEnter']); for (var k = 0; k < 5; k++) { instance.setState({count: 1}); expect(log).toEqual(['didMount', 'didMount', 'willEnter']); instance.setState({count: 2}); } willEnterCb(); expect(log).toEqual([ 'didMount', 'didMount', 'willEnter', 'didEnter', ]); }); it('should handle entering/leaving several elements at once', function() { var log = []; var Child = React.createClass({ componentDidMount: function() { log.push('didMount' + this.props.id); }, componentWillEnter: function(cb) { log.push('willEnter' + this.props.id); cb(); }, componentDidEnter: function() { log.push('didEnter' + this.props.id); }, componentWillLeave: function(cb) { log.push('willLeave' + this.props.id); cb(); }, componentDidLeave: function() { log.push('didLeave' + this.props.id); }, componentWillUnmount: function() { log.push('willUnmount' + this.props.id); }, render: function() { return <span />; }, }); var Component = React.createClass({ getInitialState: function() { return {count: 1}; }, render: function() { var children = []; for (var i = 0; i < this.state.count; i++) { children.push(<Child key={i} id={i} />); } return <ReactTransitionGroup>{children}</ReactTransitionGroup>; }, }); var instance = React.render(<Component />, container); expect(log).toEqual(['didMount0']); log = []; instance.setState({count: 3}); expect(log).toEqual([ 'didMount1', 'didMount2', 'willEnter1', 'didEnter1', 'willEnter2', 'didEnter2', ]); log = []; instance.setState({count: 0}); expect(log).toEqual([ 'willLeave0', 'didLeave0', 'willLeave1', 'didLeave1', 'willLeave2', 'didLeave2', 'willUnmount0', 'willUnmount1', 'willUnmount2', ]); }); });
ajax/libs/orb/1.0.7/orb.js
LaurensRietveld/cdnjs
/** * orb v1.0.7, Pivot grid javascript library. * * Copyright (c) 2014-2015 Najmeddine Nouri <[email protected]>. * * @version v1.0.7 * @link http://nnajm.github.io/orb/ * @license MIT */ 'use strict'; ! function(e) { if ("object" == typeof exports && "undefined" != typeof module) module.exports = e(); else if ("function" == typeof define && define.amd) define([], e); else { var f; "undefined" != typeof window ? f = window : "undefined" != typeof global ? f = global : "undefined" != typeof self && (f = self), f.orb = e() } }(function() { var define, module, exports; return (function e(t, n, r) { function s(o, u) { if (!n[o]) { if (!t[o]) { var a = typeof require == "function" && require; if (!u && a) return a(o, !0); if (i) return i(o, !0); var f = new Error("Cannot find module '" + o + "'"); throw f.code = "MODULE_NOT_FOUND", f } var l = n[o] = { exports: {} }; t[o][0].call(l.exports, function(e) { var n = t[o][1][e]; return s(n ? n : e) }, l, l.exports, e, t, n, r) } return n[o].exports } var i = typeof require == "function" && require; for (var o = 0; o < r.length; o++) s(r[o]); return s })({ 1: [function(_dereq_, module, exports) { module.exports.utils = _dereq_('./orb.utils'); module.exports.pgrid = _dereq_('./orb.pgrid'); module.exports.pgridwidget = _dereq_('./orb.ui.pgridwidget'); module.exports.query = _dereq_('./orb.query'); }, { "./orb.pgrid": 7, "./orb.query": 8, "./orb.ui.pgridwidget": 13, "./orb.utils": 15 }], 2: [function(_dereq_, module, exports) { var Aggregations = module.exports = { toAggregateFunc: function(func) { if (func) { if (typeof func === 'string' && Aggregations[func]) { return Aggregations[func]; } else if (typeof func === 'function') { return func; } else { return Aggregations.sum; } } else { return Aggregations.sum; } }, count: function(datafield, intersection, datasource) { return intersection === 'all' ? datasource.length : intersection.length; }, sum: function(datafield, intersection, datasource) { var sum = 0; forEachIntersection(datafield, intersection, datasource, function(val) { sum += val; }); return sum; }, min: function(datafield, intersection, datasource) { var min = null; forEachIntersection(datafield, intersection, datasource, function(val) { if (min == null || val < min) { min = val; } }); return min; }, max: function(datafield, intersection, datasource) { var max = null; forEachIntersection(datafield, intersection, datasource, function(val) { if (max == null || val > max) { max = val; } }); return max; }, avg: function(datafield, intersection, datasource) { var avg = 0; var len = (intersection === 'all' ? datasource : intersection).length; if (len > 0) { forEachIntersection(datafield, intersection, datasource, function(val) { avg += val; }); avg /= len; } return avg; }, prod: function(datafield, intersection, datasource) { var prod; var len = (intersection === 'all' ? datasource : intersection).length; if (len > 0) { prod = 1; forEachIntersection(datafield, intersection, datasource, function(val) { prod *= val; }); } return prod; }, stdev: function(datafield, intersection, datasource) { return Math.sqrt(calcVariance(datafield, intersection, datasource, false)); }, stdevp: function(datafield, intersection, datasource) { return Math.sqrt(calcVariance(datafield, intersection, datasource, true)); }, var: function(datafield, intersection, datasource) { return calcVariance(datafield, intersection, datasource, false); }, varp: function(datafield, intersection, datasource) { return calcVariance(datafield, intersection, datasource, true); } }; function calcVariance(datafield, intersection, datasource, population) { var variance = 0; var avg = 0; var len = (intersection === 'all' ? datasource : intersection).length; if (len > 0) { if (population || len > 1) { forEachIntersection(datafield, intersection, datasource, function(val) { avg += val; }); avg /= len; forEachIntersection(datafield, intersection, datasource, function(val) { variance += (val - avg) * (val - avg); }); variance = variance / (population ? len : len - 1); } else { variance = NaN; } } return variance; } function forEachIntersection(datafield, intersection, datasource, callback) { var all = intersection === 'all'; intersection = all ? datasource : intersection; if (intersection.length > 0) { for (var i = 0; i < intersection.length; i++) { callback((all ? intersection[i] : datasource[intersection[i]])[datafield]); } } } }, {}], 3: [function(_dereq_, module, exports) { var utils = _dereq_('./orb.utils'); var dimension = _dereq_('./orb.dimension'); var AxeType = { COLUMNS: 1, ROWS: 2, DATA: 3 }; module.exports = function(pgrid, type) { var self = this; var dimid = 0; if (pgrid != null && pgrid.config != null) { this.pgrid = pgrid; this.type = type; this.fields = (function() { switch (type) { case AxeType.COLUMNS: return self.pgrid.config.columnFields; case AxeType.ROWS: return self.pgrid.config.rowFields; case AxeType.DATA: return self.pgrid.config.dataFields; default: return []; } }()); this.dimensionsCount = null; this.root = null; this.dimensionsByDepth = null; this.update = function() { self.dimensionsCount = self.fields.length; self.root = new dimension(++dimid, null, null, null, self.dimensionsCount + 1, true); self.dimensionsByDepth = {}; for (var depth = 1; depth <= self.dimensionsCount; depth++) { self.dimensionsByDepth[depth] = []; } // fill data fill(); // initial sort for (var findex = 0; findex < self.fields.length; findex++) { var ffield = self.fields[findex]; if (ffield.sort.order === 'asc' || ffield.sort.order === 'desc') { self.sort(ffield, true); } } }; this.sort = function(field, donottoggle) { if (field != null) { if (donottoggle !== true) { if (field.sort.order !== 'asc') { field.sort.order = 'asc'; } else { field.sort.order = 'desc'; } } var depth = self.dimensionsCount - getfieldindex(field); var parents = depth === self.dimensionsCount ? [self.root] : self.dimensionsByDepth[depth + 1]; for (var i = 0; i < parents.length; i++) { parents[i].values.sort(); if (field.sort.order === 'desc') { parents[i].values.reverse(); } } } }; } function getfieldindex(field) { for (var i = 0; i < self.fields.length; i++) { if (self.fields[i].name === field.name) { return i; } } return -1; } function fill() { if (self.pgrid.filteredDataSource != null && self.dimensionsCount > 0) { var datasource = self.pgrid.filteredDataSource; if (datasource != null && utils.isArray(datasource) && datasource.length > 0) { for (var rowIndex = 0, dataLength = datasource.length; rowIndex < dataLength; rowIndex++) { var row = datasource[rowIndex]; var dim = self.root; for (var findex = 0; findex < self.dimensionsCount; findex++) { var depth = self.dimensionsCount - findex; var subfield = self.fields[findex]; var subvalue = row[subfield.name]; var subdimvals = dim.subdimvals; if (subdimvals[subvalue] !== undefined) { dim = subdimvals[subvalue]; } else { dim.values.push(subvalue); dim = new dimension(++dimid, dim, subvalue, subfield, depth, false, findex == self.dimensionsCount - 1); subdimvals[subvalue] = dim; dim.rowIndexes = []; self.dimensionsByDepth[depth].push(dim); } dim.rowIndexes.push(rowIndex); } } } } } }; module.exports.Type = AxeType; }, { "./orb.dimension": 5, "./orb.utils": 15 }], 4: [function(_dereq_, module, exports) { var utils = _dereq_('./orb.utils'); var axe = _dereq_('./orb.axe'); var aggregation = _dereq_('./orb.aggregation'); var filtering = _dereq_('./orb.filtering'); var themeManager = _dereq_('./orb.themes'); function getpropertyvalue(property, configs, defaultvalue) { for (var i = 0; i < configs.length; i++) { if (configs[i][property] != null) { return configs[i][property]; } } return defaultvalue; } function mergefieldconfigs() { var configs = []; var sorts = []; var subtotals = []; var functions = []; for (var i = 0; i < arguments.length; i++) { var nnconfig = arguments[i] || {}; configs.push(nnconfig); sorts.push(nnconfig.sort || {}); subtotals.push(nnconfig.subTotal || {}); functions.push({ aggregateFuncName: nnconfig.aggregateFuncName, aggregateFunc: i === 0 ? nnconfig.aggregateFunc : (nnconfig.aggregateFunc ? nnconfig.aggregateFunc() : null), formatFunc: i === 0 ? nnconfig.formatFunc : (nnconfig.formatFunc ? nnconfig.formatFunc() : null), }); } return new Field({ name: getpropertyvalue('name', configs, ''), caption: getpropertyvalue('caption', configs, ''), sort: { order: getpropertyvalue('order', sorts, null), customfunc: getpropertyvalue('customfunc', sorts, null) }, subTotal: { visible: getpropertyvalue('visible', subtotals, true), collapsible: getpropertyvalue('collapsible', subtotals, true), collapsed: getpropertyvalue('collapsed', subtotals, false) }, aggregateFuncName: getpropertyvalue('aggregateFuncName', functions, 'sum'), aggregateFunc: getpropertyvalue('aggregateFunc', functions, null), formatFunc: getpropertyvalue('formatFunc', functions, null) }, false); } function createfield(rootconfig, axetype, fieldconfig, defaultfieldconfig) { var axeconfig; if (defaultfieldconfig) { switch (axetype) { case axe.Type.ROWS: axeconfig = defaultfieldconfig.rowSettings; break; case axe.Type.COLUMNS: axeconfig = defaultfieldconfig.columnSettings; break; case axe.Type.DATA: axeconfig = defaultfieldconfig.dataSettings; break; default: axeconfig = null; break; } } else { axeconfig = null; } return mergefieldconfigs(fieldconfig, axeconfig, defaultfieldconfig, rootconfig); } function GrandTotalConfig(options) { options = options || {}; this.rowsvisible = options.rowsvisible !== undefined ? options.rowsvisible : true; this.columnsvisible = options.columnsvisible !== undefined ? options.columnsvisible : true; } function SubTotalConfig(options, setdefaults) { var defaults = { visible: setdefaults === true ? true : undefined, collapsible: setdefaults === true ? true : undefined, collapsed: setdefaults === true ? false : undefined }; options = options || {}; this.visible = options.visible !== undefined ? options.visible : defaults.visible; this.collapsible = options.collapsible !== undefined ? options.collapsible : defaults.collapsible; this.collapsed = options.collapsed !== undefined ? options.collapsed : defaults.collapsed; } function SortConfig(options) { options = options || {}; this.order = options.order; this.customfunc = options.customfunc; } var Field = module.exports.field = function(options, createSubOptions) { options = options || {}; // field name this.name = options.name; // shared settings this.caption = options.caption || this.name; // rows & columns settings this.sort = new SortConfig(options.sort); this.subTotal = new SubTotalConfig(options.subTotal); // data settings var _aggregatefunc; var _formatfunc; function defaultFormatFunc(val) { return val ? val.toString() : ''; } this.aggregateFunc = function(func) { if (func) { _aggregatefunc = aggregation.toAggregateFunc(func); } else { return _aggregatefunc; } }; this.formatFunc = function(func) { if (func) { _formatfunc = func; } else { return _formatfunc; } }; this.aggregateFuncName = options.aggregateFuncName || (options.aggregateFunc && utils.isString(options.aggregateFunc) ? options.aggregateFunc : null); this.aggregateFunc(options.aggregateFunc || 'sum'); this.formatFunc(options.formatFunc || defaultFormatFunc); if (createSubOptions !== false) { (this.rowSettings = new Field(options.rowSettings, false)).name = this.name; (this.columnSettings = new Field(options.columnSettings, false)).name = this.name; (this.dataSettings = new Field(options.dataSettings, false)).name = this.name; } }; module.exports.config = function(config) { var self = this; this.dataSource = config.dataSource || []; this.dataHeadersLocation = config.dataHeadersLocation === 'columns' ? 'columns' : 'rows'; this.grandTotal = new GrandTotalConfig(config.grandTotal); this.subTotal = new SubTotalConfig(config.subTotal, true); this.width = config.width; this.height = config.height; this.showToolbar = config.showToolbar || false; this.theme = themeManager; themeManager.current(config.theme); // datasource field names this.dataSourceFieldNames = []; // datasource field captions this.dataSourceFieldCaptions = []; this.captionToName = function(caption) { var fcaptionIndex = self.dataSourceFieldCaptions.indexOf(caption); return fcaptionIndex >= 0 ? self.dataSourceFieldNames[fcaptionIndex] : caption; }; this.nameToCaption = function(name) { var fnameIndex = self.dataSourceFieldNames.indexOf(name); return fnameIndex >= 0 ? self.dataSourceFieldCaptions[fnameIndex] : name; }; this.setTheme = function(newTheme) { return self.theme.current() !== self.theme.current(newTheme); }; this.allFields = (config.fields || []).map(function(fieldconfig) { var f = new Field(fieldconfig); // map fields names to captions self.dataSourceFieldNames.push(f.name); self.dataSourceFieldCaptions.push(f.caption); return f; }); function ensureFieldConfig(obj) { if (typeof obj === 'string') { return { name: self.captionToName(obj) }; } return obj; } this.rowFields = (config.rows || []).map(function(fieldconfig) { fieldconfig = ensureFieldConfig(fieldconfig); return createfield(self, axe.Type.ROWS, fieldconfig, getfield(self.allFields, fieldconfig.name)); }); this.columnFields = (config.columns || []).map(function(fieldconfig) { fieldconfig = ensureFieldConfig(fieldconfig); return createfield(self, axe.Type.COLUMNS, fieldconfig, getfield(self.allFields, fieldconfig.name)); }); this.dataFields = (config.data || []).map(function(fieldconfig) { fieldconfig = ensureFieldConfig(fieldconfig); return createfield(self, axe.Type.DATA, fieldconfig, getfield(self.allFields, fieldconfig.name)); }); this.dataFieldsCount = this.dataFields ? (this.dataFields.length || 1) : 1; function getfield(axefields, fieldname) { var fieldindex = getfieldindex(axefields, fieldname); if (fieldindex > -1) { return axefields[fieldindex]; } return null; } function getfieldindex(axefields, fieldname) { for (var fi = 0; fi < axefields.length; fi++) { if (axefields[fi].name === fieldname) { return fi; } } return -1; } this.getField = function(fieldname) { return getfield(self.allFields, fieldname); }; this.getRowField = function(fieldname) { return getfield(self.rowFields, fieldname); }; this.getColumnField = function(fieldname) { return getfield(self.columnFields, fieldname); }; this.getDataField = function(fieldname) { return getfield(self.dataFields, fieldname); }; this.availablefields = function() { return self.allFields.filter(function(field) { var notequalfield = function(otherfield) { return field.name !== otherfield.name; }; return self.dataFields.every(notequalfield) && self.rowFields.every(notequalfield) && self.columnFields.every(notequalfield); }); }; this.getDataSourceFieldCaptions = function() { var row0; if (self.dataSource && (row0 = self.dataSource[0])) { var fieldNames = utils.ownProperties(row0); var headers = []; for (var i = 0; i < fieldNames.length; i++) { headers.push(self.nameToCaption(fieldNames[i])); } return headers; } return null; }; this.getPreFilters = function() { var prefilters = {}; if (config.preFilters) { utils.ownProperties(config.preFilters).forEach(function(filteredField) { var prefilterConfig = config.preFilters[filteredField]; if (utils.isArray(prefilterConfig)) { prefilters[self.captionToName(filteredField)] = new filtering.expressionFilter(null, null, prefilterConfig, false); } else { var opname = utils.ownProperties(prefilterConfig)[0]; if (opname) { prefilters[self.captionToName(filteredField)] = new filtering.expressionFilter(opname, prefilterConfig[opname]); } } }); } return prefilters; } this.moveField = function(fieldname, oldaxetype, newaxetype, position) { var oldaxe, oldposition; var newaxe; var field = getfield(self.allFields, fieldname); if (field) { switch (oldaxetype) { case axe.Type.ROWS: oldaxe = self.rowFields; break; case axe.Type.COLUMNS: oldaxe = self.columnFields; break; case axe.Type.DATA: oldaxe = self.dataFields; break; default: break; } switch (newaxetype) { case axe.Type.ROWS: newaxe = self.rowFields; break; case axe.Type.COLUMNS: newaxe = self.columnFields; break; case axe.Type.DATA: newaxe = self.dataFields; break; default: break; } if (oldaxe || newaxe) { if (oldaxe) { oldposition = getfieldindex(oldaxe, fieldname); if (oldaxetype === newaxetype) { if (oldposition == oldaxe.length - 1 && position == null || oldposition === position - 1) { return false; } } oldaxe.splice(oldposition, 1); } field = createfield(self, newaxetype, null, field); if (newaxe) { if (position != null) { newaxe.splice(position, 0, field); } else { newaxe.push(field); } } // update data fields count self.dataFieldsCount = self.dataFields ? (self.dataFields.length || 1) : 1; return true; } } }; }; }, { "./orb.aggregation": 2, "./orb.axe": 3, "./orb.filtering": 6, "./orb.themes": 10, "./orb.utils": 15 }], 5: [function(_dereq_, module, exports) { module.exports = function(id, parent, value, field, depth, isRoot, isLeaf) { var self = this; this.id = id; this.parent = parent; this.value = value; this.isRoot = isRoot; this.isLeaf = isLeaf; this.field = field; this.depth = depth; this.values = []; this.subdimvals = {}; this.rowIndexes = null; this.getRowIndexes = function(result) { if (self.rowIndexes == null) { self.rowIndexes = []; for (var i = 0; i < self.values.length; i++) { self.subdimvals[self.values[i]].getRowIndexes(self.rowIndexes); } } if (result != null) { for (var j = 0; j < self.rowIndexes.length; j++) { result.push(self.rowIndexes[j]); } return result; } else { return self.rowIndexes; } }; }; }, {}], 6: [function(_dereq_, module, exports) { var utils = _dereq_('./orb.utils'); var filtering = module.exports = { ALL: '#All#', NONE: '#None#', BLANK: '#Blank#"' }; filtering.expressionFilter = function(operator, term, staticValue, excludeStatic) { var self = this; this.operator = ops.get(operator); this.regexpMode = false; this.term = term || null; if (this.term && this.operator && this.operator.regexpSupported) { if (utils.isRegExp(this.term)) { this.regexpMode = true; if (!this.term.ignoreCase) { this.term = new RegExp(this.term.source, 'i'); } } } this.staticValue = staticValue; this.excludeStatic = excludeStatic; this.test = function(value) { if (utils.isArray(self.staticValue)) { var found = self.staticValue.indexOf(value) >= 0; return (self.excludeStatic && !found) || (!self.excludeStatic && found); } else if (self.term) { return self.operator.func(value, self.term); } else if (self.staticValue === true || self.staticValue === filtering.ALL) { return true; } else if (self.staticValue === false || self.staticValue === filtering.NONE) { return false } else { return true; } } this.isAlwaysTrue = function() { return !(self.term || utils.isArray(self.staticValue) || self.staticValue === filtering.NONE || self.staticValue === false); } }; var ops = filtering.Operators = { get: function(opname) { switch (opname) { case ops.MATCH.name: return ops.MATCH; case ops.NOTMATCH.name: return ops.NOTMATCH; case ops.EQ.name: return ops.EQ; case ops.NEQ.name: return ops.NEQ; case ops.GT.name: return ops.GT; case ops.GTE.name: return ops.GTE; case ops.LT.name: return ops.LT; case ops.LTE.name: return ops.LTE; default: return ops.NONE; } }, NONE: null, MATCH: { name: 'Matches', func: function(value, term) { if (value) { return value.toString().search(utils.isRegExp(term) ? term : new RegExp(term, 'i')) >= 0; } else { return !(!!term); } }, regexpSupported: true }, NOTMATCH: { name: 'Does Not Match', func: function(value, term) { if (value) { return value.toString().search(utils.isRegExp(term) ? term : new RegExp(term, 'i')) < 0; } else { return !!term; } }, regexpSupported: true }, EQ: { name: '=', func: function(value, term) { return value == term; }, regexpSupported: false }, NEQ: { name: '<>', func: function(value, term) { return value != term; }, regexpSupported: false }, GT: { name: '>', func: function(value, term) { return value > term; }, regexpSupported: false }, GTE: { name: '>=', func: function(value, term) { return value >= term; }, regexpSupported: false }, LT: { name: '<', func: function(value, term) { return value < term; }, regexpSupported: false }, LTE: { name: '<=', func: function(value, term) { return value <= term; }, regexpSupported: false } }; }, { "./orb.utils": 15 }], 7: [function(_dereq_, module, exports) { var axe = _dereq_('./orb.axe'); var configuration = _dereq_('./orb.config').config; var filtering = _dereq_('./orb.filtering'); var query = _dereq_('./orb.query'); var utils = _dereq_('./orb.utils'); module.exports = function(config) { var defaultfield = { name: '#undefined#' }; var self = this; var _iCache; this.config = new configuration(config); this.filters = self.config.getPreFilters(); this.filteredDataSource = self.config.dataSource; this.rows = new axe(self, axe.Type.ROWS); this.columns = new axe(self, axe.Type.COLUMNS); this.dataMatrix = {}; function refresh(refreshFilters) { if (refreshFilters !== false) { refreshFilteredDataSource(); } self.rows.update(); self.columns.update(); computeValues(); } function refreshFilteredDataSource() { var filterFields = utils.ownProperties(self.filters); if (filterFields.length > 0) { self.filteredDataSource = []; for (var i = 0; i < self.config.dataSource.length; i++) { var row = self.config.dataSource[i]; var exclude = false; for (var fi = 0; fi < filterFields.length; fi++) { var fieldname = filterFields[fi]; var fieldFilter = self.filters[fieldname]; if (fieldFilter && !fieldFilter.test(row[fieldname])) { exclude = true; break; } } if (!exclude) { self.filteredDataSource.push(row); } } } else { self.filteredDataSource = self.config.dataSource; } } this.moveField = function(fieldname, oldaxetype, newaxetype, position) { if (self.config.moveField(fieldname, oldaxetype, newaxetype, position)) { refresh(false); } }; this.applyFilter = function(fieldname, operator, term, staticValue, excludeStatic) { self.filters[fieldname] = new filtering.expressionFilter(operator, term, staticValue, excludeStatic); refresh(); }; this.refreshData = function(data) { self.config.dataSource = data; refresh(); }; this.getFieldValues = function(field, filterFunc) { var values1 = []; var values = []; var containsBlank = false; for (var i = 0; i < self.config.dataSource.length; i++) { var row = self.config.dataSource[i]; var val = row[field]; if (filterFunc !== undefined) { if (filterFunc === true || (typeof filterFunc === 'function' && filterFunc(val))) { values1.push(val); } } else { if (val) { values1.push(val); } else { containsBlank = true; } } } if (values1.length > 1) { if (utils.isNumber(values1[0]) || utils.isDate(values1[0])) { values1.sort(function(a, b) { return a ? (b ? a - b : 1) : (b ? -1 : 0); }); } else { values1.sort(); } for (var vi = 0; vi < values1.length; vi++) { if (vi === 0 || values1[vi] !== values[values.length - 1]) { values.push(values1[vi]); } } } else { values = values1; } values.containsBlank = containsBlank; return values; }; this.getFieldFilter = function(field) { return self.filters[field]; } this.isFieldFiltered = function(field) { var filter = self.getFieldFilter(field); return filter != null && !filter.isAlwaysTrue(); } this.getData = function(field, rowdim, coldim, aggregateFunc) { if (rowdim && coldim) { var datafieldName = field || (self.config.dataFields[0] || defaultfield).name; var datafield = self.config.getDataField(datafieldName); if (!datafield || (aggregateFunc && datafield.aggregateFunc != aggregateFunc)) { return self.calcAggregation(rowdim.getRowIndexes().slice(0), coldim.getRowIndexes().slice(0), [datafieldName], aggregateFunc)[datafieldName] || null; } else { if (self.dataMatrix[rowdim.id] && self.dataMatrix[rowdim.id][coldim.id]) { return self.dataMatrix[rowdim.id][coldim.id][datafieldName] || null; } } return null; } }; this.calcAggregation = function(rowIndexes, colIndexes, fieldNames, aggregateFunc) { return computeValue(rowIndexes, colIndexes, rowIndexes, fieldNames, aggregateFunc); } this.query = query(self); refresh(); function computeValue(rowIndexes, colIndexes, origRowIndexes, fieldNames, aggregateFunc) { var res = {}; if (self.config.dataFieldsCount > 0) { var intersection; if (rowIndexes == null) { intersection = colIndexes; } else if (colIndexes == null) { intersection = rowIndexes; } else { intersection = []; for (var ri = 0; ri < rowIndexes.length; ri++) { var rowindex = rowIndexes[ri]; if (rowindex >= 0) { var colrowindex = colIndexes.indexOf(rowindex); if (colrowindex >= 0) { rowIndexes[ri] = 0 - (rowindex + 2); intersection.push(rowindex); } } } } var datasource = self.filteredDataSource; var datafield; var datafields = []; if (fieldNames) { for (var fieldnameIndex = 0; fieldnameIndex < fieldNames.length; fieldnameIndex++) { datafield = self.config.getDataField(fieldNames[fieldnameIndex]); if (!aggregateFunc) { if (!datafield) { datafield = self.config.getField(fieldNames[fieldnameIndex]); if (datafield) { aggregateFunc = datafield.dataSettings ? datafield.dataSettings.aggregateFunc() : datafield.aggregateFunc(); } } else { aggregateFunc = datafield.aggregateFunc() } } if (datafield && aggregateFunc) { datafields.push({ field: datafield, aggregateFunc: aggregateFunc }); } } } else { for (var datafieldIndex = 0; datafieldIndex < self.config.dataFieldsCount; datafieldIndex++) { datafield = self.config.dataFields[datafieldIndex] || defaultfield; if (aggregateFunc || datafield.aggregateFunc) { datafields.push({ field: datafield, aggregateFunc: aggregateFunc || datafield.aggregateFunc() }); } } } for (var dfi = 0; dfi < datafields.length; dfi++) { datafield = datafields[dfi]; res[datafield.field.name] = datafield.aggregateFunc(datafield.field.name, intersection || 'all', self.filteredDataSource, origRowIndexes || rowIndexes, colIndexes); } } return res; } function computeRowValues(rowDim) { if (rowDim) { var data = {}; var rid = 'r' + rowDim.id; // set cached row indexes for current row dimension if (_iCache[rid] === undefined) { _iCache[rid] = rowDim.isRoot ? null : (_iCache[rowDim.parent.id] || rowDim.getRowIndexes()); } // calc grand-total cell data[self.columns.root.id] = computeValue(rowDim.isRoot ? null : _iCache[rid].slice(0), null); if (self.columns.dimensionsCount > 0) { var p = 0; var parents = [self.columns.root]; while (p < parents.length) { var parent = parents[p]; var rowindexes = rowDim.isRoot ? null : (parent.isRoot ? _iCache[rid].slice(0) : _iCache['c' + parent.id].slice(0)); for (var i = 0; i < parent.values.length; i++) { var subdim = parent.subdimvals[parent.values[i]]; var cid = 'c' + subdim.id; // set cached row indexes for this column leaf dimension if (_iCache[cid] === undefined) { _iCache[cid] = _iCache[cid] || subdim.getRowIndexes().slice(0); } data[subdim.id] = computeValue(rowindexes, _iCache[cid], rowDim.isRoot ? null : rowDim.getRowIndexes()); if (!subdim.isLeaf) { parents.push(subdim); if (rowindexes) { _iCache[cid] = []; for (var ur = 0; ur < rowindexes.length; ur++) { var vr = rowindexes[ur]; if (vr != -1 && vr < 0) { _iCache[cid].push(0 - (vr + 2)); rowindexes[ur] = -1; } } } } } _iCache['c' + parent.id] = undefined; p++; } } return data; } } function computeValues() { self.dataMatrix = {}; _iCache = {}; // calc grand total row self.dataMatrix[self.rows.root.id] = computeRowValues(self.rows.root); if (self.rows.dimensionsCount > 0) { var parents = [self.rows.root]; var p = 0; var parent; while (p < parents.length) { parent = parents[p]; // calc children rows for (var i = 0; i < parent.values.length; i++) { var subdim = parent.subdimvals[parent.values[i]]; // calc child row self.dataMatrix[subdim.id] = computeRowValues(subdim); // if row is not a leaf, add it to parents array to process its children if (!subdim.isLeaf) { parents.push(subdim); } } // next parent p++; } } } }; }, { "./orb.axe": 3, "./orb.config": 4, "./orb.filtering": 6, "./orb.query": 8, "./orb.utils": 15 }], 8: [function(_dereq_, module, exports) { var utils = _dereq_('./orb.utils'); var axe = _dereq_('./orb.axe'); var aggregation = _dereq_('./orb.aggregation'); var queryBase = function(source, query, filters) { var self = this; this.source = source; this.query = query; this.filters = filters; this.extractResult = function(aggs, options, outerArgs) { if (outerArgs.multi === true) { var res = {}; for (var ai = 0; ai < options.multiFieldNames.length; ai++) { res[options.multiFieldNames[ai]] = aggs[self.getCaptionName(options.multiFieldNames[ai])]; } return res; } else { return aggs[outerArgs.datafieldname]; } }; this.measureFunc = function(datafieldname, multi, aggregateFunc, fieldsConfig) { var outerArgs = { datafieldname: self.getCaptionName(datafieldname), multi: multi, aggregateFunc: aggregateFunc }; return function(options) { options = self.cleanOptions(options, arguments, outerArgs); var aggs = self.compute(options, fieldsConfig, multi); return self.extractResult(aggs, options, outerArgs); }; }; this.setDefaultAggFunctions = function(param) { // if there is a registered field with a name or caption 'val', use 'val_' var valname = self.query.val ? 'val_' : 'val'; self.query[valname] = self.measureFunc(undefined, true, undefined, param); var aggFunctions = utils.ownProperties(aggregation); for (var funcIndex = 0; funcIndex < aggFunctions.length; funcIndex++) { var funcName = aggFunctions[funcIndex]; if (funcName !== 'toAggregateFunc') { self.query[funcName] = self.measureFunc( undefined, true, aggregation[funcName], param ); } } } }; var pgridQuery = function(pgrid) { queryBase.call(this, pgrid, {}, {}); var self = this; this.getCaptionName = function(caption) { return self.source.config.captionToName(caption); }; this.cleanOptions = function(options, innerArgs, outerArgs) { var opts = { fieldNames: [] }; if (outerArgs.multi === true) { if (options && typeof options === 'object') { opts.aggregateFunc = options.aggregateFunc; opts.multiFieldNames = options.fields; } else { opts.aggregateFunc = outerArgs.aggregateFunc; opts.multiFieldNames = innerArgs; } for (var ai = 0; ai < opts.multiFieldNames.length; ai++) { opts.fieldNames.push(self.getCaptionName(opts.multiFieldNames[ai])); } } else { opts.aggregateFunc = options; opts.fieldNames.push(outerArgs.datafieldname); } if (opts.aggregateFunc) { opts.aggregateFunc = aggregation.toAggregateFunc(opts.aggregateFunc); } return opts; }; this.setup = function(parameters) { var rowFields = self.source.config.rowFields; var colFields = self.source.config.columnFields; var datafields = self.source.config.dataFields; var fIndex; // row fields setup for (fIndex = 0; fIndex < rowFields.length; fIndex++) { self.slice(rowFields[fIndex], axe.Type.ROWS, rowFields.length - fIndex); } // column fields setup for (fIndex = 0; fIndex < colFields.length; fIndex++) { self.slice(colFields[fIndex], axe.Type.COLUMNS, colFields.length - fIndex); } // data fields setup for (fIndex = 0; fIndex < datafields.length; fIndex++) { var df = datafields[fIndex]; var dfname = df.name; var dfcaption = df.caption || dfname; self.query[dfname] = self.query[dfcaption] = self.measureFunc(dfname); } if (parameters) { for (var param in parameters) { if (parameters.hasOwnProperty(param)) { self.query[param](parameters[param]); } } } self.setDefaultAggFunctions(); return self.query; }; this.slice = function(field, axetype, depth) { self.query[field.name] = self.query[field.caption || field.name] = function(val) { var f = { name: field.name, val: val, depth: depth }; (self.filters[axetype] = self.filters[axetype] || []).push(f); return self.query; }; }; function filterDimensions(upperDims, filter) { return function(dim) { return dim.value === filter.val && (!upperDims || upperDims.some( function(upperDim) { var parent = dim.parent; if (parent) { while (parent.depth < upperDim.depth) { parent = parent.parent; } } return parent === upperDim; })); }; } this.applyFilters = function(axetype) { if (self.filters[axetype]) { var sortedFilters = self.filters[axetype].sort(function(f1, f2) { return f2.depth - f1.depth; }); var currAxe = self.source[axetype === axe.Type.ROWS ? 'rows' : 'columns']; var filterIndex = 0; var filtered = null; while (filterIndex < sortedFilters.length) { var filter = sortedFilters[filterIndex]; filtered = currAxe.dimensionsByDepth[filter.depth] .filter(filterDimensions(filtered, filter)); filterIndex++; } return filtered; } return null; }; this.compute = function(options) { var rowdims = self.applyFilters(axe.Type.ROWS) || [self.source.rows.root]; var coldims = self.applyFilters(axe.Type.COLUMNS) || [self.source.columns.root]; var aggs; if (rowdims.length === 1 && coldims.length === 1) { aggs = {}; for (var ai = 0; ai < options.fieldNames.length; ai++) { aggs[options.fieldNames[ai]] = self.source.getData(options.fieldNames[ai], rowdims[0], coldims[0], options.aggregateFunc); } } else { var rowIndexes = []; var colIndexes = []; for (var rdi = 0; rdi < rowdims.length; rdi++) { rowIndexes = rowIndexes.concat(rowdims[rdi].getRowIndexes()); } for (var cdi = 0; cdi < coldims.length; cdi++) { colIndexes = colIndexes.concat(coldims[cdi].getRowIndexes()); } aggs = self.source.calcAggregation(rowIndexes, colIndexes, options.fieldNames, options.aggregateFunc); } return aggs; }; }; var arrayQuery = function(array) { queryBase.call(this, array, {}, []); var self = this; var captionToName = {}; this.setCaptionName = function(caption, name) { captionToName[caption || name] = name; }; this.getCaptionName = function(caption) { return captionToName[caption] || caption; }; this.cleanOptions = function(options, innerArgs, outerArgs) { var opts = { fieldNames: [] }; if (outerArgs.multi === true) { if (options && typeof options === 'object') { opts.aggregateFunc = options.aggregateFunc; opts.multiFieldNames = options.fields; } else { opts.aggregateFunc = outerArgs.aggregateFunc; opts.multiFieldNames = innerArgs; } for (var ai = 0; ai < opts.multiFieldNames.length; ai++) { opts.fieldNames.push(self.getCaptionName(opts.multiFieldNames[ai])); } } else { opts.aggregateFunc = options || outerArgs.aggregateFunc; opts.fieldNames.push(outerArgs.datafieldname); } return opts; }; this.setup = function(fieldsConfig) { self.query.slice = function(field, val) { var f = { name: field, val: val }; self.filters.push(f); return self.query; }; if (fieldsConfig) { var fieldNames = utils.ownProperties(fieldsConfig); for (var fi = 0; fi < fieldNames.length; fi++) { var fname = fieldNames[fi]; var f = fieldsConfig[fname]; var fcaption = f.caption || f.name; f.name = fname; self.setCaptionName(fcaption, fname); if (f.toAggregate) { self.query[fname] = self.query[fcaption] = self.measureFunc(fname, false, f.aggregateFunc); } else { self.slice(f); } } } self.setDefaultAggFunctions(fieldsConfig); return self.query; }; this.slice = function(field) { self.query[field.name] = self.query[field.caption || field.name] = function(val) { return self.query.slice(field.name, val); }; }; this.applyFilters = function() { var rowIndexes = []; for (var i = 0; i < self.source.length; i++) { var row = self.source[i]; var include = true; for (var j = 0; j < self.filters.length; j++) { var filter = self.filters[j]; if (row[filter.name] !== filter.val) { include = false; break; } } if (include) { rowIndexes.push(i); } } return rowIndexes; }; this.compute = function(options, fieldsConfig, multi) { var rowIndexes = self.applyFilters(); var aggs = {}; for (var ai = 0; ai < options.fieldNames.length; ai++) { var datafield = options.fieldNames[ai]; var aggFunc = aggregation.toAggregateFunc( multi === true ? options.aggregateFunc || (fieldsConfig && fieldsConfig[datafield] ? fieldsConfig[datafield].aggregateFunc : undefined) : options.aggregateFunc); aggs[datafield] = aggFunc(datafield, rowIndexes || 'all', self.source, rowIndexes, null); } return aggs; }; }; module.exports = function(source, fieldsConfig) { if (utils.isArray(source)) { return new arrayQuery(source).setup(fieldsConfig); } else { // assume it's a pgrid return function(parameters) { return new pgridQuery(source).setup(parameters); }; } }; }, { "./orb.aggregation": 2, "./orb.axe": 3, "./orb.utils": 15 }], 9: [function(_dereq_, module, exports) { module.exports = function() { var states = {}; this.set = function(key, state) { states[key] = state; }; this.get = function(key) { return states[key]; }; }; }, {}], 10: [function(_dereq_, module, exports) { module.exports = (function() { var currentTheme = 'blue'; var themeManager = {}; function isBootstrap() { return currentTheme === 'bootstrap'; } themeManager.themes = { red: '#C72C48', blue: '#268BD2', green: '#3A9D23', orange: '#f7840d', flower: '#A74AC7', gray: '#808080', white: '#FFFFFF', black: '#000000' }; themeManager.current = function(newTheme) { if (newTheme) { currentTheme = themeManager.validateTheme(newTheme); } return currentTheme; }; themeManager.validateTheme = function(themeName) { themeName = (themeName || '').toString().trim(); if (!themeManager.themes[themeName] && themeName !== 'bootstrap') { return 'blue'; } else { return themeName; } }; themeManager.getPivotClasses = function() { return { container: 'orb-container orb-' + currentTheme, table: 'orb' + (isBootstrap() ? ' table' : '') }; }; themeManager.getButtonClasses = function() { return { pivotButton: 'fld-btn' + (isBootstrap() ? ' btn btn-default' : ''), orbButton: 'orb-btn' + (isBootstrap() ? ' btn btn-default btn-xs' : '') }; }; themeManager.getFilterClasses = function() { return { container: 'orb-' + currentTheme + ' orb fltr-cntnr' }; }; themeManager.getGridClasses = function() { return { table: isBootstrap() ? 'table table-striped table-condensed' : 'orb-table' }; }; themeManager.getDialogClasses = function(visible) { var classes = { overlay: 'orb-overlay orb-overlay-' + (visible ? 'visible' : 'hidden') + ' orb-' + currentTheme, dialog: 'orb-dialog', content: '', header: 'orb-dialog-header', title: '', body: 'orb-dialog-body' }; if (isBootstrap()) { classes.overlay += ' modal'; classes.dialog += ' modal-dialog'; classes.content = 'modal-content'; classes.header += ' modal-header'; classes.title = 'modal-title'; classes.body += ' modal-body'; } return classes; }; return themeManager; }()); }, {}], 11: [function(_dereq_, module, exports) { var axe = _dereq_('./orb.axe'); var uiheaders = _dereq_('./orb.ui.header'); module.exports = function(columnsAxe) { var self = this; this.axe = columnsAxe; this.uiInfos = null; this.leafsHeaders = null; var _multidatafields; var _datafieldscount; this.build = function() { _datafieldscount = self.axe.pgrid.config.dataHeadersLocation === 'columns' ? self.axe.pgrid.config.dataFieldsCount : 1; _multidatafields = self.axe.pgrid.config.dataHeadersLocation === 'columns' && _datafieldscount > 1; self.uiInfos = []; if (self.axe != null) { // Fill columns layout infos for (var depth = self.axe.root.depth; depth > 1; depth--) { self.uiInfos.push([]); getUiInfo(depth, self.uiInfos); } if (self.axe.pgrid.config.grandTotal.columnsvisible) { // add grandtotal header (self.uiInfos[0] = self.uiInfos[0] || []).push(new uiheaders.header(axe.Type.COLUMNS, uiheaders.HeaderType.GRAND_TOTAL, self.axe.root, null, _datafieldscount)); } if (self.uiInfos.length === 0) { self.uiInfos.push([new uiheaders.header(axe.Type.COLUMNS, uiheaders.HeaderType.INNER, self.axe.root, null, _datafieldscount)]); } // generate leafs headers generateLeafsHeaders(); } }; function generateLeafsHeaders() { var leafsHeaders = []; function pushsubtotal(pheader) { if (pheader && pheader.dim.field.subTotal.visible) { leafsHeaders.push(pheader.subtotalHeader); } } if (self.uiInfos.length > 0) { // last headers row var infos = self.uiInfos[self.uiInfos.length - 1]; var header = infos[0]; var currparent, prevpar = header.parent; for (var i = 0; i < infos.length; i++) { header = infos[i]; currparent = header.parent; // if current header parent is different than previous header parent, // add previous parent if (currparent != prevpar) { pushsubtotal(prevpar); if (currparent != null) { // walk up parent hierarchy and add grand parents if different // than current header grand parents var grandpar = currparent.parent; var prevgrandpar = prevpar ? prevpar.parent : null; while (grandpar != prevgrandpar && prevgrandpar != null) { pushsubtotal(prevgrandpar); grandpar = grandpar ? grandpar.parent : null; prevgrandpar = prevgrandpar ? prevgrandpar.parent : null; } } // update previous parent variable prevpar = currparent; } // push current header leafsHeaders.push(infos[i]); // if it's the last header, add all of its parents up to the top if (i === infos.length - 1) { while (prevpar != null) { pushsubtotal(prevpar); prevpar = prevpar.parent; } } } // grandtotal is visible for columns and if there is more than one dimension in this axe if (self.axe.pgrid.config.grandTotal.columnsvisible && self.axe.dimensionsCount > 1) { // push also grand total header leafsHeaders.push(self.uiInfos[0][self.uiInfos[0].length - 1]); } } // add data headers if more than 1 data field and they willbe the leaf headers if (_multidatafields) { self.leafsHeaders = []; for (var leafIndex = 0; leafIndex < leafsHeaders.length; leafIndex++) { for (var datafieldindex = 0; datafieldindex < _datafieldscount; datafieldindex++) { self.leafsHeaders.push(new uiheaders.dataHeader(self.axe.pgrid.config.dataFields[datafieldindex], leafsHeaders[leafIndex])); } } self.uiInfos.push(self.leafsHeaders); } else { self.leafsHeaders = leafsHeaders; } } this.build(); function getUiInfo(depth, uiInfos) { var infos = uiInfos[uiInfos.length - 1]; var parents = self.axe.root.depth === depth ? [null] : uiInfos[self.axe.root.depth - depth - 1].filter(function(p) { return p.type !== uiheaders.HeaderType.SUB_TOTAL; }); for (var pi = 0; pi < parents.length; pi++) { var parent = parents[pi]; var parentDim = parent == null ? self.axe.root : parent.dim; for (var di = 0; di < parentDim.values.length; di++) { var subvalue = parentDim.values[di]; var subdim = parentDim.subdimvals[subvalue]; var subtotalHeader; if (!subdim.isLeaf && subdim.field.subTotal.visible) { subtotalHeader = new uiheaders.header(axe.Type.COLUMNS, uiheaders.HeaderType.SUB_TOTAL, subdim, parent, _datafieldscount); } else { subtotalHeader = null; } var header = new uiheaders.header(axe.Type.COLUMNS, null, subdim, parent, _datafieldscount, subtotalHeader); infos.push(header); if (!subdim.isLeaf && subdim.field.subTotal.visible) { infos.push(subtotalHeader); } } } } }; }, { "./orb.axe": 3, "./orb.ui.header": 12 }], 12: [function(_dereq_, module, exports) { var axe = _dereq_('./orb.axe'); var state = new(_dereq_('./orb.state')); var HeaderType = module.exports.HeaderType = { EMPTY: 1, DATA_HEADER: 2, DATA_VALUE: 3, FIELD_BUTTON: 4, INNER: 5, WRAPPER: 6, SUB_TOTAL: 7, GRAND_TOTAL: 8, getHeaderClass: function(headerType, axetype) { var cssclass = axetype === axe.Type.ROWS ? 'header-row' : (axetype === axe.Type.COLUMNS ? 'header-col' : ''); switch (headerType) { case HeaderType.EMPTY: case HeaderType.FIELD_BUTTON: cssclass = 'empty'; break; case HeaderType.INNER: cssclass = 'header ' + cssclass; break; case HeaderType.WRAPPER: cssclass = 'header ' + cssclass break; case HeaderType.SUB_TOTAL: cssclass = 'header header-st ' + cssclass; break; case HeaderType.GRAND_TOTAL: cssclass = 'header header-gt ' + cssclass; break; } return cssclass; }, getCellClass: function(rowHeaderType, colHeaderType) { var cssclass = ''; switch (rowHeaderType) { case HeaderType.GRAND_TOTAL: cssclass = 'cell-gt'; break; case HeaderType.SUB_TOTAL: if (colHeaderType === HeaderType.GRAND_TOTAL) { cssclass = 'cell-gt'; } else { cssclass = 'cell-st'; } break; default: if (colHeaderType === HeaderType.GRAND_TOTAL) { cssclass = 'cell-gt'; } else if (colHeaderType === HeaderType.SUB_TOTAL) { cssclass = 'cell-st'; } else { cssclass = 'cell'; } } return cssclass; } }; function CellBase(options) { this.axetype = options.axetype; this.type = options.type; this.template = options.template; this.value = options.value; this.expanded = true; this.cssclass = options.cssclass; this.hspan = options.hspan || function() { return 1; }; this.vspan = options.vspan || function() { return 1; }; this.visible = options.isvisible || function() { return true; }; this.key = this.axetype + this.type + this.value; this.getState = function() { return state.get(this.key); }; this.setState = function(newState) { state.set(this.key, newState); }; } module.exports.header = function(axetype, headerType, dim, parent, datafieldscount, subtotalHeader) { var self = this; var hspan; var vspan; var value; var isRowsAxe = axetype === axe.Type.ROWS; headerType = headerType || (dim.depth === 1 ? HeaderType.INNER : HeaderType.WRAPPER); switch (headerType) { case HeaderType.GRAND_TOTAL: value = 'Grand Total'; hspan = isRowsAxe ? dim.depth - 1 || 1 : datafieldscount; vspan = isRowsAxe ? datafieldscount : dim.depth - 1 || 1; break; case HeaderType.SUB_TOTAL: value = 'Total ' + dim.value; hspan = isRowsAxe ? dim.depth : datafieldscount; vspan = isRowsAxe ? datafieldscount : dim.depth; break; default: value = dim.value; hspan = isRowsAxe ? 1 : null; vspan = isRowsAxe ? null : 1; break; } CellBase.call(this, { axetype: axetype, type: headerType, template: isRowsAxe ? 'cell-template-row-header' : 'cell-template-column-header', value: value, cssclass: HeaderType.getHeaderClass(headerType, axetype), hspan: hspan != null ? function() { return hspan; } : calcSpan, vspan: vspan != null ? function() { return vspan; } : calcSpan, isvisible: isParentExpanded }); this.subtotalHeader = subtotalHeader; this.parent = parent; this.subheaders = []; this.dim = dim; this.expanded = this.getState() ? this.getState().expanded : (headerType !== HeaderType.SUB_TOTAL || !dim.field.subTotal.collapsed); this.expand = function() { self.expanded = true; this.setState({ expanded: self.expanded }); }; this.collapse = function() { self.expanded = false; this.setState({ expanded: self.expanded }); }; if (parent != null) { parent.subheaders.push(this); } function isParentExpanded() { if (self.type === HeaderType.SUB_TOTAL) { var hparent = self.parent; while (hparent != null) { if (hparent.subtotalHeader && !hparent.subtotalHeader.expanded) { return false; } hparent = hparent.parent; } return true; } else { var isexpanded = self.dim.isRoot || self.dim.isLeaf || !self.dim.field.subTotal.visible || self.subtotalHeader.expanded; if (!isexpanded) { return false; } var par = self.parent; while (par != null && (!par.dim.field.subTotal.visible || (par.subtotalHeader != null && par.subtotalHeader.expanded))) { par = par.parent; } return par == null || par.subtotalHeader == null ? isexpanded : par.subtotalHeader.expanded; } } function calcSpan() { var tspan = 0; var subSpan; var addone = false; if (self.visible()) { if (!self.dim.isLeaf) { // subdimvals 'own' properties are the set of values for this dimension for (var i = 0; i < self.subheaders.length; i++) { var subheader = self.subheaders[i]; // if its not an array if (!subheader.dim.isLeaf) { subSpan = isRowsAxe ? subheader.vspan() : subheader.hspan(); tspan += subSpan; if (i === 0 && (subSpan === 0 || (isRowsAxe && subheader.type === HeaderType.SUB_TOTAL && !subheader.expanded))) { addone = true; } } else { tspan += datafieldscount; } } } else { return datafieldscount; } return tspan + (addone ? 1 : 0); } return tspan; } }; module.exports.dataHeader = function(datafield, parent) { CellBase.call(this, { axetype: null, type: HeaderType.DATA_HEADER, template: 'cell-template-dataheader', value: datafield, cssclass: HeaderType.getHeaderClass(parent.type, parent.axetype), isvisible: parent.visible }); this.parent = parent; }; module.exports.dataCell = function(pgrid, isvisible, rowinfo, colinfo) { this.rowDimension = rowinfo.type === HeaderType.DATA_HEADER ? rowinfo.parent.dim : rowinfo.dim; this.columnDimension = colinfo.type === HeaderType.DATA_HEADER ? colinfo.parent.dim : colinfo.dim; this.rowType = rowinfo.type === HeaderType.DATA_HEADER ? rowinfo.parent.type : rowinfo.type; this.colType = colinfo.type === HeaderType.DATA_HEADER ? colinfo.parent.type : colinfo.type; this.datafield = pgrid.config.dataFieldsCount > 1 ? (pgrid.config.dataHeadersLocation === 'rows' ? rowinfo.value : colinfo.value) : pgrid.config.dataFields[0]; CellBase.call(this, { axetype: null, type: HeaderType.DATA_VALUE, template: 'cell-template-datavalue', value: pgrid.getData(this.datafield ? this.datafield.name : null, this.rowDimension, this.columnDimension), cssclass: 'cell ' + HeaderType.getCellClass(this.rowType, this.colType), isvisible: isvisible }); }; module.exports.buttonCell = function(field) { CellBase.call(this, { axetype: null, type: HeaderType.FIELD_BUTTON, template: 'cell-template-fieldbutton', value: field, cssclass: HeaderType.getHeaderClass(HeaderType.FIELD_BUTTON) }); }; module.exports.emptyCell = function(hspan, vspan) { CellBase.call(this, { axetype: null, type: HeaderType.EMPTY, template: 'cell-template-empty', value: null, cssclass: HeaderType.getHeaderClass(HeaderType.EMPTY), hspan: function() { return hspan; }, vspan: function() { return vspan; }, }); }; }, { "./orb.axe": 3, "./orb.state": 9 }], 13: [function(_dereq_, module, exports) { var axe = _dereq_('./orb.axe'); var pgrid = _dereq_('./orb.pgrid'); var uiheaders = _dereq_('./orb.ui.header'); var uirows = _dereq_('./orb.ui.rows'); var uicols = _dereq_('./orb.ui.cols'); //var React = require('react'); var OrbReactComps = _dereq_('./react/orb.react.compiled'); module.exports = function(config) { var self = this; var renderElement; var pivotComponent; var dialog = OrbReactComps.Dialog.create(); this.pgrid = new pgrid(config); this.rows = null; this.columns = null; this.cells = []; this.layout = { rowHeaders: { width: null, height: null }, columnHeaders: { width: null, height: null, }, pivotTable: { width: null, height: null } }; this.sort = function(axetype, field) { if (axetype === axe.Type.ROWS) { self.pgrid.rows.sort(field); } else if (axetype === axe.Type.COLUMNS) { self.pgrid.columns.sort(field); } else { return; } buildUi(); }; this.refreshData = function(data) { self.pgrid.refreshData(data); buildUi(); pivotComponent.setProps({}); } this.applyFilter = function(fieldname, operator, term, staticValue, excludeStatic) { self.pgrid.applyFilter(fieldname, operator, term, staticValue, excludeStatic); buildUi(); }; this.moveField = function(field, oldAxeType, newAxeType, position) { self.pgrid.moveField(field, oldAxeType, newAxeType, position); buildUi(); }; this.changeTheme = function(newTheme) { pivotComponent.changeTheme(newTheme); } this.render = function(element) { renderElement = element; if (renderElement) { var pivotTableFactory = React.createFactory(OrbReactComps.PivotTable); var pivottable = pivotTableFactory({ pgridwidget: self }); pivotComponent = React.render(pivottable, element); } }; this.drilldown = function(dataCell, pivotId) { if (dataCell) { var colIndexes = dataCell.columnDimension.getRowIndexes(); var data = dataCell.rowDimension.getRowIndexes().filter(function(index) { return colIndexes.indexOf(index) >= 0; }).map(function(index) { return self.pgrid.filteredDataSource[index]; }); var title; if (dataCell.rowType === uiheaders.HeaderType.GRAND_TOTAL && dataCell.colType === uiheaders.HeaderType.GRAND_TOTAL) { title = 'Grand total'; } else { if (dataCell.rowType === uiheaders.HeaderType.GRAND_TOTAL) { title = dataCell.columnDimension.value + '/Grand total '; } else if (dataCell.colType === uiheaders.HeaderType.GRAND_TOTAL) { title = dataCell.rowDimension.value + '/Grand total '; } else { title = dataCell.rowDimension.value + '/' + dataCell.columnDimension.value; } } var pivotStyle = window.getComputedStyle(pivotComponent.getDOMNode(), null); dialog.show({ title: title, comp: { type: OrbReactComps.Grid, props: { headers: self.pgrid.config.getDataSourceFieldCaptions(), data: data, theme: self.pgrid.config.theme } }, theme: self.pgrid.config.theme, style: { fontFamily: pivotStyle.getPropertyValue('font-family'), fontSize: pivotStyle.getPropertyValue('font-size') } }); } }; buildUi(); function buildUi() { // build rows and columns self.rows = new uirows(self.pgrid.rows); self.columns = new uicols(self.pgrid.columns); var rowsInfos = self.rows.uiInfos; var rowsInfoslength = rowsInfos.length; var columnsInfos = self.columns.uiInfos; var columnsInfoslength = columnsInfos.length; var columnsAllHeaders = self.columns.leafsHeaders; var columnsAllHeaderslength = columnsAllHeaders.length; // set control layout infos self.layout = { rowHeaders: { width: (self.pgrid.rows.fields.length || 1) + (self.pgrid.config.dataHeadersLocation === 'rows' && self.pgrid.config.dataFieldsCount > 1 ? 1 : 0), height: rowsInfoslength }, columnHeaders: { width: columnsAllHeaderslength, height: (self.pgrid.columns.fields.length || 1) + (self.pgrid.config.dataHeadersLocation === 'columns' && self.pgrid.config.dataFieldsCount > 1 ? 1 : 0) } }; self.layout.pivotTable = { width: self.layout.rowHeaders.width + self.layout.columnHeaders.width, height: self.layout.rowHeaders.height + self.layout.columnHeaders.height }; var cells = []; setArrayLength(cells, columnsInfoslength + rowsInfoslength); function setArrayLength(arr, length) { if (arr.length !== length) { arr.length = length; return true; } return false; } var arr; for (var ci = 0; ci < columnsInfoslength; ci++) { var uiinfo = columnsInfos[ci]; var prelength = 0; arr = (cells[ci] = cells[ci] || []); if (columnsInfoslength > 1 && ci === 0) { prelength = 1; setArrayLength(arr, prelength + uiinfo.length); arr[0] = new uiheaders.emptyCell(self.layout.rowHeaders.width, self.layout.columnHeaders.height - 1); } else if (ci === columnsInfoslength - 1) { prelength = self.layout.rowHeaders.width; setArrayLength(arr, prelength + uiinfo.length); if (self.pgrid.rows.fields.length > 0) { for (var findex = 0; findex < self.pgrid.config.rowFields.length; findex++) { arr[findex] = new uiheaders.buttonCell(self.pgrid.config.rowFields[findex]); } } else { arr[0] = new uiheaders.emptyCell(self.layout.rowHeaders.width, 1); } } for (var ui = 0; ui < uiinfo.length; ui++) { arr[prelength + ui] = uiinfo[ui]; } } function createVisibleFunc(rowvisible, colvisible) { return function() { return rowvisible() && colvisible(); }; } for (var ri = 0; ri < rowsInfoslength; ri++) { var ruiinfo = rowsInfos[ri]; arr = (cells[columnsInfoslength + ri] = cells[columnsInfoslength + ri] || new Array(ruiinfo.length + columnsAllHeaderslength)); setArrayLength(arr, ruiinfo.length + columnsAllHeaderslength); for (var uri = 0; uri < ruiinfo.length; uri++) { arr[uri] = ruiinfo[uri]; } var rinfo = ruiinfo[ruiinfo.length - 1]; for (var cinfosIndex = 0; cinfosIndex < columnsAllHeaderslength; cinfosIndex++) { var cinfo = columnsAllHeaders[cinfosIndex]; var isvisible = createVisibleFunc(rinfo.visible, cinfo.visible); arr[ruiinfo.length + cinfosIndex] = new uiheaders.dataCell(self.pgrid, isvisible, rinfo, cinfo); } } self.cells = cells; } }; }, { "./orb.axe": 3, "./orb.pgrid": 7, "./orb.ui.cols": 11, "./orb.ui.header": 12, "./orb.ui.rows": 14, "./react/orb.react.compiled": 16 }], 14: [function(_dereq_, module, exports) { var axe = _dereq_('./orb.axe'); var uiheaders = _dereq_('./orb.ui.header'); module.exports = function(rowsAxe) { var self = this; this.axe = rowsAxe; this.uiInfos = []; var _multidatafields; var _datafieldscount; this.build = function() { _datafieldscount = self.axe.pgrid.config.dataHeadersLocation === 'rows' ? (self.axe.pgrid.config.dataFieldsCount || 1) : 1; _multidatafields = self.axe.pgrid.config.dataHeadersLocation === 'rows' && _datafieldscount > 1; var uiInfos = [ [] ]; if (self.axe != null) { // Fill Rows layout infos getUiInfo(uiInfos, self.axe.root); if (self.axe.pgrid.config.grandTotal.rowsvisible) { var lastrow = uiInfos[uiInfos.length - 1]; var grandtotalHeader = new uiheaders.header(axe.Type.ROWS, uiheaders.HeaderType.GRAND_TOTAL, self.axe.root, null, _datafieldscount); if (lastrow.length === 0) { lastrow.push(grandtotalHeader); } else { uiInfos.push([grandtotalHeader]); } // add grand-total data headers if more than 1 data field and they will be the leaf headers addDataHeaders(uiInfos, grandtotalHeader); } if (uiInfos[0].length === 0) { uiInfos[0].push(new uiheaders.header(axe.Type.ROWS, uiheaders.HeaderType.INNER, self.axe.root, null, _datafieldscount)); } } self.uiInfos = uiInfos; }; this.build(); function addDataHeaders(infos, parent) { if (_multidatafields) { var lastInfosArray = infos[infos.length - 1]; for (var datafieldindex = 0; datafieldindex < _datafieldscount; datafieldindex++) { lastInfosArray.push(new uiheaders.dataHeader(self.axe.pgrid.config.dataFields[datafieldindex], parent)); if (datafieldindex < _datafieldscount - 1) { infos.push((lastInfosArray = [])); } } } } function getUiInfo(infos, dimension) { if (dimension.values.length > 0) { var infosMaxIndex = infos.length - 1; var lastInfosArray = infos[infosMaxIndex]; var parent = lastInfosArray.length > 0 ? lastInfosArray[lastInfosArray.length - 1] : null; for (var valIndex = 0; valIndex < dimension.values.length; valIndex++) { var subvalue = dimension.values[valIndex]; var subdim = dimension.subdimvals[subvalue]; var subTotalHeader; if (!subdim.isLeaf && subdim.field.subTotal.visible) { subTotalHeader = new uiheaders.header(axe.Type.ROWS, uiheaders.HeaderType.SUB_TOTAL, subdim, parent, _datafieldscount); } else { subTotalHeader = null; } var newHeader = new uiheaders.header(axe.Type.ROWS, null, subdim, parent, _datafieldscount, subTotalHeader); if (valIndex > 0) { infos.push((lastInfosArray = [])); } lastInfosArray.push(newHeader); if (!subdim.isLeaf) { getUiInfo(infos, subdim); if (subdim.field.subTotal.visible) { infos.push([subTotalHeader]); // add sub-total data headers if more than 1 data field and they will be the leaf headers addDataHeaders(infos, subTotalHeader); } } else { // add data headers if more than 1 data field and they will be the leaf headers addDataHeaders(infos, newHeader); } } } } }; }, { "./orb.axe": 3, "./orb.ui.header": 12 }], 15: [function(_dereq_, module, exports) { module.exports = { ns: function(identifier, parent) { var parts = identifier.split('.'); var i = 0; parent = parent || window; while (i < parts.length) { parent[parts[i]] = parent[parts[i]] || {}; parent = parent[parts[i]]; i++; } return parent; }, ownProperties: function(obj) { var arr = []; for (var prop in obj) { if (obj.hasOwnProperty(prop)) { arr.push(prop); } } return arr; }, isArray: function(obj) { return Object.prototype.toString.apply(obj) === '[object Array]'; }, isNumber: function(obj) { return Object.prototype.toString.apply(obj) === '[object Number]'; }, isDate: function(obj) { return Object.prototype.toString.apply(obj) === '[object Date]'; }, isString: function(obj) { return Object.prototype.toString.apply(obj) === '[object String]'; }, isRegExp: function(obj) { return Object.prototype.toString.apply(obj) === '[object RegExp]'; }, escapeRegex: function(re) { return re.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); }, findInArray: function(array, predicate) { if (this.isArray(array) && predicate) { for (var i = 0; i < array.length; i++) { var item = array[i]; if (predicate(item)) { return item; } } } return undefined; }, jsonStringify: function(obj, censorKeywords) { function censor(key, value) { return censorKeywords && censorKeywords.indexOf(key) > -1 ? undefined : value; } return JSON.stringify(obj, censor, 2); } }; }, {}], 16: [function(_dereq_, module, exports) { var react = typeof window === 'undefined' ? _dereq_('react') : window.React; var utils = _dereq_('../orb.utils'); var axe = _dereq_('../orb.axe'); var uiheaders = _dereq_('../orb.ui.header'); var filtering = _dereq_('../orb.filtering'); var reactUtils = _dereq_('./orb.react.utils'); var extraCol = 1; var comps = module.exports; var pivotId = 1; var themeChangeCallbacks = {}; module.exports.PivotTable = react.createClass({ id: pivotId++, pgrid: null, pgridwidget: null, getInitialState: function() { comps.DragManager.init(this); themeChangeCallbacks[this.id] = []; this.registerThemeChanged(this.updateClasses); this.pgridwidget = this.props.pgridwidget; this.pgrid = this.pgridwidget.pgrid; return {}; }, sort: function(axetype, field) { this.pgridwidget.sort(axetype, field); this.setProps({}); }, moveButton: function(button, newAxeType, position) { this.pgridwidget.moveField(button.props.field.name, button.props.axetype, newAxeType, position); this.setProps({}); }, expandRow: function(cell) { cell.expand(); this.setProps({}); }, collapseRow: function(cell) { cell.subtotalHeader.collapse(); this.setProps({}); }, applyFilter: function(fieldname, operator, term, staticValue, excludeStatic) { this.pgridwidget.applyFilter(fieldname, operator, term, staticValue, excludeStatic); this.setProps({}); }, registerThemeChanged: function(compCallback) { if (compCallback) { themeChangeCallbacks[this.id].push(compCallback); } }, unregisterThemeChanged: function(compCallback) { var i; if (compCallback && (i = themeChangeCallbacks[this.id].indexOf(compCallback)) >= 0) { themeChangeCallbacks[this.id].splice(i, 1); } }, changeTheme: function(newTheme) { if (this.pgridwidget.pgrid.config.setTheme(newTheme)) { // notify self/sub-components of the theme change for (var i = 0; i < themeChangeCallbacks[this.id].length; i++) { themeChangeCallbacks[this.id][i](); } } }, updateClasses: function() { var thisnode = this.getDOMNode(); var classes = this.pgridwidget.pgrid.config.theme.getPivotClasses(); thisnode.className = classes.container; thisnode.children[1].className = classes.table; }, render: function() { var self = this; var config = this.pgridwidget.pgrid.config; var PivotButton = comps.PivotButton; var PivotRow = comps.PivotRow; var DropTarget = comps.DropTarget; var Toolbar = comps.Toolbar; var fieldButtons = config.availablefields().map(function(field, index) { return React.createElement(PivotButton, { key: field.name, field: field, axetype: null, position: index, pivotTableComp: self }); }); var dataButtons = config.dataFields.map(function(field, index) { return React.createElement(PivotButton, { key: field.name, field: field, axetype: axe.Type.DATA, position: index, pivotTableComp: self }); }); var columnButtons = config.columnFields.map(function(field, index) { return React.createElement(PivotButton, { key: field.name, field: field, axetype: axe.Type.COLUMNS, position: index, pivotTableComp: self }); }); // get 'row buttons' row (also last row containing column headers) var rowButtons = utils.findInArray(this.pgridwidget.cells, function(row) { return row[0].template === 'cell-template-fieldbutton'; }); // build row buttons if (rowButtons !== undefined) { rowButtons = rowButtons.filter(function(buttonCell) { return buttonCell.template === 'cell-template-fieldbutton'; }).map(function(buttonCell, index) { return React.createElement(PivotButton, { key: buttonCell.value.name, field: buttonCell.value, axetype: axe.Type.ROWS, position: index, pivotTableComp: self }); }); } else { rowButtons = []; } // build the cell that will contains 'row buttons' var rowButtonsCell = React.createElement("td", { className: "empty", colSpan: this.pgridwidget.layout.rowHeaders.width + extraCol, rowSpan: "1" }, React.createElement(DropTarget, { buttons: rowButtons, axetype: axe.Type.ROWS }) ); var rows = this.pgridwidget.cells.map(function(row, index) { if (index == self.pgridwidget.layout.columnHeaders.height - 1) { return React.createElement(PivotRow, { key: index, row: row, topmost: index === 0, rowButtonsCount: self.pgridwidget.layout.rowHeaders.width, rowButtonsCell: rowButtonsCell, pivotTableComp: self }); } else { return React.createElement(PivotRow, { key: index, topmost: index === 0, row: row, pivotTableComp: self }); } }); var classes = config.theme.getPivotClasses(); var tblStyle = {}; if (config.width) { tblStyle.width = config.width; } if (config.height) { tblStyle.height = config.height; } return ( React.createElement("div", { className: classes.container, style: tblStyle }, React.createElement("div", { className: "orb-toolbar", style: { display: config.showToolbar ? 'block' : 'none' } }, React.createElement(Toolbar, { pivotTableComp: self }) ), React.createElement("table", { id: "{'tbl' + self.id}", className: classes.table, style: { width: '100%' } }, React.createElement("tbody", null, React.createElement("tr", null, React.createElement("td", { className: "flds-grp-cap av-flds text-muted", colSpan: extraCol, rowSpan: "1" }, React.createElement("div", null, "Fields") ), React.createElement("td", { className: "av-flds", colSpan: this.pgridwidget.layout.pivotTable.width, rowSpan: "1" }, React.createElement(DropTarget, { buttons: fieldButtons, axetype: null }) ) ), React.createElement("tr", null, React.createElement("td", { className: "flds-grp-cap text-muted", colSpan: extraCol, rowSpan: "1" }, React.createElement("div", null, "Data") ), React.createElement("td", { className: "empty", colSpan: this.pgridwidget.layout.pivotTable.width, rowSpan: "1" }, React.createElement(DropTarget, { buttons: dataButtons, axetype: axe.Type.DATA }) ) ), React.createElement("tr", null, React.createElement("td", { className: "empty", colSpan: this.pgridwidget.layout.rowHeaders.width + extraCol, rowSpan: "1" }), React.createElement("td", { className: "empty", colSpan: this.pgridwidget.layout.columnHeaders.width, rowSpan: "1" }, React.createElement(DropTarget, { buttons: columnButtons, axetype: axe.Type.COLUMNS }) ) ), rows ) ), React.createElement("div", { className: "orb-overlay orb-overlay-hidden", id: 'drilldialog' + self.id }) ) ); } }); module.exports.PivotRow = react.createClass({ render: function() { var self = this; var PivotCell = comps.PivotCell; var lastCellIndex = this.props.row.length - 1; var cell0 = this.props.row[0]; var cells; var rowstyle = {}; if (this.props.rowButtonsCell !== undefined) { cells = this.props.row.slice(this.props.rowButtonsCount).map(function(cell, index) { var isrightmost = index === (lastCellIndex - self.props.rowButtonsCount); var isleftmostHeader = index === 0; return React.createElement(PivotCell, { key: index, cell: cell, topmost: self.props.topmost, rightmost: isrightmost, leftmostheader: isleftmostHeader, pivotTableComp: self.props.pivotTableComp }); }); return ( React.createElement("tr", null, this.props.rowButtonsCell, cells ) ); } else { if (cell0.template == 'cell-template-row-header' && cell0.visible && !cell0.visible()) { rowstyle.display = 'none'; } cells = this.props.row.map(function(cell, index) { var isrightmost = index === lastCellIndex; var isleftmost = index === 0 && ( cell.type === uiheaders.HeaderType.EMPTY || (cell.type === uiheaders.HeaderType.SUB_TOTAL && cell.dim.parent.isRoot) || (cell.type === uiheaders.HeaderType.GRAND_TOTAL) || (cell.dim && (cell.dim.isRoot || cell.dim.parent.isRoot)) ); var isleftmostHeader = cell.template === 'cell-template-column-header' && index === 1; var isleftmostDataValue = cell.template === 'cell-template-datavalue' && cell.visible() && (self.props.row[index - 1].template !== 'cell-template-datavalue' || !self.props.row[index - 1].visible()); return React.createElement(PivotCell, { key: index, cell: cell, topmost: self.props.topmost, leftmostheader: isleftmostHeader, leftmostdatavalue: isleftmostDataValue, rightmost: isrightmost, leftmost: isleftmost, pivotTableComp: self.props.pivotTableComp }); }); return ( React.createElement("tr", { style: rowstyle }, cells ) ); } } }); module.exports.PivotCell = react.createClass({ expand: function() { this.props.pivotTableComp.expandRow(this.props.cell); }, collapse: function() { this.props.pivotTableComp.collapseRow(this.props.cell); }, render: function() { var self = this; var cell = this.props.cell; var divcontent = []; var value; var cellClick; var headerPushed = false; switch (cell.template) { case 'cell-template-row-header': case 'cell-template-column-header': var isWrapper = cell.type === uiheaders.HeaderType.WRAPPER && cell.dim.field.subTotal.visible && cell.dim.field.subTotal.collapsible && cell.subtotalHeader.expanded; var isSubtotal = cell.type === uiheaders.HeaderType.SUB_TOTAL && !cell.expanded; if (isWrapper || isSubtotal) { headerPushed = true; divcontent.push(React.createElement("table", { key: "header-value" }, React.createElement("tbody", null, React.createElement("tr", null, React.createElement("td", { className: "orb-tgl-btn" }, React.createElement("div", { className: 'orb-tgl-btn-' + (isWrapper ? 'down' : 'right'), onClick: (isWrapper ? this.collapse : this.expand) })), React.createElement("td", { className: "hdr-val" }, React.createElement("div", null, cell.value))) ))); } value = cell.value; break; case 'cell-template-dataheader': value = cell.value.caption; break; case 'cell-template-datavalue': value = (cell.datafield && cell.datafield.formatFunc) ? cell.datafield.formatFunc()(cell.value) : cell.value; cellClick = function() { self.props.pivotTableComp.pgridwidget.drilldown(cell, self.props.pivotTableComp.id); } break; default: break; } if (!headerPushed) { divcontent.push(React.createElement("div", { key: "cell-value", className: cell.template !== 'cell-template-datavalue' ? 'hdr-val' : '' }, React.createElement("div", null, value))); } return React.createElement("td", { className: getClassname(this.props), onDoubleClick: cellClick, colSpan: cell.hspan() + (this.props.leftmost ? extraCol : 0), rowSpan: cell.vspan() }, React.createElement("div", null, divcontent ) ); } }); function getClassname(compProps) { var cell = compProps.cell; var classname = cell.cssclass; var isHidden = !cell.visible(); var isEmpty = cell.template === 'cell-template-empty'; if (isHidden) { classname += ' cell-hidden'; } if (compProps.leftmostheader || compProps.leftmostdatavalue || (compProps.leftmost && !isEmpty)) { classname += ' cell-leftmost'; } if (compProps.topmost && !isEmpty) { classname += ' cell-topmost'; } if (compProps.rightmost && (cell.axetype !== axe.Type.COLUMNS || cell.type === uiheaders.HeaderType.GRAND_TOTAL)) { classname += ' cell-rightmost'; } if (cell.template === 'cell-template-column-header' || cell.template === 'cell-template-dataheader') { classname += ' cntr'; } return classname; } var dragManager = module.exports.DragManager = (function() { var _pivotComp = null; var _dragElement = null; var _dragNode = null; var _dropTargets = []; var _dropIndicators = []; function doElementsOverlap(elem1Rect, elem2Rect) { return !(elem1Rect.right < elem2Rect.left || elem1Rect.left > elem2Rect.right || elem1Rect.bottom < elem2Rect.top || elem1Rect.top > elem2Rect.bottom); } function signalDragOver(target) { if (target.onDragOver) { target.onDragOver(_dragElement); return true; } return false; } function signalDragEnd(target) { if (target.onDragEnd) { target.onDragEnd(); return true; } return false; } function getDropTarget() { return reactUtils.forEach(_dropTargets, function(target) { if (target.component.state.isover) { return target; } }, true); } function getDropIndicator() { return reactUtils.forEach(_dropIndicators, function(indicator) { if (indicator.component.state.isover) { return indicator; } }, true); } var _initialized = false; return { init: function(pivotComp) { _initialized = true; _pivotComp = pivotComp; }, dragElement: function(elem) { var prevDragElement = _dragElement; _dragElement = elem; if (_dragElement != prevDragElement) { if (elem == null) { // Drop Target var dropTarget = getDropTarget(); // Drop Indicator var dropIndicator = getDropIndicator(); if (dropTarget) { var position = dropIndicator != null ? dropIndicator.position : null; _pivotComp.moveButton(prevDragElement, dropTarget.component.props.axetype, position); } _dragNode = null; reactUtils.forEach(_dropTargets, function(target) { signalDragEnd(target); }); reactUtils.forEach(_dropIndicators, function(indicator) { signalDragEnd(indicator); }); } else { _dragNode = _dragElement.getDOMNode(); } } }, registerTarget: function(target, axetype, dragOverHandler, dargEndHandler) { _dropTargets.push({ component: target, axetype: axetype, onDragOver: dragOverHandler, onDragEnd: dargEndHandler }); }, unregisterTarget: function(target) { var tindex; for (var i = 0; i < _dropTargets.length; i++) { if (_dropTargets[i].component == target) { tindex = i; break; } } if (tindex != null) { _dropTargets.splice(tindex, 1); } }, registerIndicator: function(indicator, axetype, position, dragOverHandler, dargEndHandler) { _dropIndicators.push({ component: indicator, axetype: axetype, position: position, onDragOver: dragOverHandler, onDragEnd: dargEndHandler }); }, unregisterIndicator: function(indicator) { var iindex; for (var i = 0; i < _dropIndicators.length; i++) { if (_dropIndicators[i].component == indicator) { iindex = i; break; } } if (iindex != null) { _dropIndicators.splice(iindex, 1); } }, elementMoved: function() { if (_dragElement != null) { var dragNodeRect = _dragNode.getBoundingClientRect(); var foundTarget; reactUtils.forEach(_dropTargets, function(target) { if (!foundTarget) { var tnodeRect = target.component.getDOMNode().getBoundingClientRect(); var isOverlap = doElementsOverlap(dragNodeRect, tnodeRect); if (isOverlap && signalDragOver(target)) { foundTarget = target; return true; } else { signalDragEnd(target); } } }, true); var foundIndicator; if (foundTarget) { reactUtils.forEach(_dropIndicators, function(indicator, index) { if (!foundIndicator) { var elementOwnIndicator = indicator.component.props.axetype === _dragElement.props.axetype && indicator.component.props.position === _dragElement.props.position; var targetIndicator = indicator.component.props.axetype === foundTarget.component.props.axetype; if (targetIndicator && !elementOwnIndicator) { var tnodeRect = indicator.component.getDOMNode().getBoundingClientRect(); var isOverlap = doElementsOverlap(dragNodeRect, tnodeRect); if (isOverlap && signalDragOver(indicator)) { foundIndicator = indicator; return; } } } signalDragEnd(indicator); }); if (!foundIndicator) { var axeIndicators = _dropIndicators.filter(function(indicator) { return indicator.component.props.axetype === foundTarget.component.props.axetype; }); if (axeIndicators.length > 0) { signalDragOver(axeIndicators[axeIndicators.length - 1]); } } } else { reactUtils.forEach(_dropIndicators, function(indicator, index) { signalDragEnd(indicator); }); } } } }; }()); module.exports.DropIndicator = react.createClass({ displayName: 'DropIndicator', getInitialState: function() { dragManager.registerIndicator(this, this.props.axetype, this.props.position, this.onDragOver, this.onDragEnd); return { isover: false }; }, componentWillUnmount: function() { dragManager.unregisterIndicator(this); }, onDragOver: function(component) { this.setState({ isover: true, width: component.getDOMNode().style.width }); }, onDragEnd: function() { this.setState({ isover: false, width: null }); }, render: function() { var classname = 'drp-indic'; if (this.props.isFirst) { classname += ' drp-indic-first'; } if (this.props.isLast) { classname += ' drp-indic-last'; } var style = {}; if (this.state.isover) { classname += ' drp-indic-over'; } return React.createElement("div", { style: style, className: classname }); } }); var dtid = 0; module.exports.DropTarget = react.createClass({ getInitialState: function() { this.dtid = ++dtid; // initial state, all zero. dragManager.registerTarget(this, this.props.axetype, this.onDragOver, this.onDragEnd); return { isover: false }; }, componentWillUnmount: function() { dragManager.unregisterTarget(this); }, onDragOver: function(component) { this.setState({ isover: true }); }, onDragEnd: function() { this.setState({ isover: false }); }, render: function() { var self = this; var DropIndicator = module.exports.DropIndicator; var buttons = this.props.buttons.map(function(button, index) { if (index < self.props.buttons.length - 1) { return [ React.createElement(DropIndicator, { isFirst: index === 0, position: index, axetype: self.props.axetype }), button ]; } else { return [ React.createElement(DropIndicator, { isFirst: index === 0, position: index, axetype: self.props.axetype }), button, React.createElement(DropIndicator, { isLast: true, position: null, axetype: self.props.axetype }) ]; } }); return React.createElement("div", { className: 'drp-trgt' + (this.state.isover ? ' drp-trgt-over' : '') }, buttons ); } }); var pbid = 0; module.exports.PivotButton = react.createClass({ displayName: 'PivotButton', getInitialState: function() { this.pbid = ++pbid; // initial state, all zero. return { pos: { x: 0, y: 0 }, startpos: { x: 0, y: 0 }, mousedown: false, dragging: false }; }, onFilterMouseDown: function(e) { // left mouse button only if (e.button !== 0) return; var filterButton = this.getDOMNode().childNodes[0].rows[0].cells[2].childNodes[0]; var filterButtonPos = reactUtils.getOffset(filterButton); var filterContainer = document.createElement('div'); var filterPanelFactory = React.createFactory(comps.FilterPanel); var filterPanel = filterPanelFactory({ field: this.props.field.name, pivotTableComp: this.props.pivotTableComp }); filterContainer.className = this.props.pivotTableComp.pgrid.config.theme.getFilterClasses().container; filterContainer.style.top = filterButtonPos.y + 'px'; filterContainer.style.left = filterButtonPos.x + 'px'; document.body.appendChild(filterContainer); React.render(filterPanel, filterContainer); // prevent event bubbling (to prevent text selection while dragging for example) e.stopPropagation(); e.preventDefault(); }, componentDidUpdate: function() { if (!this.state.mousedown) { // mouse not down, don't care about mouse up/move events. dragManager.dragElement(null); document.removeEventListener('mousemove', this.onMouseMove); document.removeEventListener('mouseup', this.onMouseUp); } else if (this.state.mousedown) { // mouse down, interested by mouse up/move events. dragManager.dragElement(this); document.addEventListener('mousemove', this.onMouseMove); document.addEventListener('mouseup', this.onMouseUp); } }, componentDidMount: function() { this.props.pivotTableComp.registerThemeChanged(this.updateClasses); }, componentWillUnmount: function() { this.props.pivotTableComp.unregisterThemeChanged(this.updateClasses); document.removeEventListener('mousemove', this.onMouseMove); document.removeEventListener('mouseup', this.onMouseUp); }, onMouseDown: function(e) { // drag/sort with left mouse button if (e.button !== 0) return; var thispos = reactUtils.getOffset(this.getDOMNode()); // inform mousedown, save start pos this.setState({ mousedown: true, mouseoffset: { x: thispos.x - e.pageX, y: thispos.y - e.pageY, }, startpos: { x: e.pageX, y: e.pageY } }); // prevent event bubbling (to prevent text selection while dragging for example) e.stopPropagation(); e.preventDefault(); }, onMouseUp: function() { var wasdragging = this.state.dragging; this.setState({ mousedown: false, dragging: false, size: null, pos: { x: 0, y: 0 } }); // if button was not dragged, proceed as a click if (!wasdragging) { this.props.pivotTableComp.sort(this.props.axetype, this.props.field); } return true; }, onMouseMove: function(e) { // if the mouse is not down while moving, return (no drag) if (!this.state.mousedown) return; var size = null; if (!this.state.dragging) { size = reactUtils.getSize(this.getDOMNode()); } else { size = this.state.size; } var newpos = { x: e.pageX + this.state.mouseoffset.x, y: e.pageY + this.state.mouseoffset.y }; this.setState({ dragging: true, size: size, pos: newpos }); dragManager.elementMoved(); e.stopPropagation(); e.preventDefault(); }, updateClasses: function() { this.getDOMNode().className = this.props.pivotTableComp.pgrid.config.theme.getButtonClasses().pivotButton; }, render: function() { var self = this; var divstyle = { left: self.state.pos.x + 'px', top: self.state.pos.y + 'px', position: self.state.dragging ? 'fixed' : '' }; if (self.state.size) { divstyle.width = self.state.size.width + 'px'; } var sortIndicator = self.props.field.sort.order === 'asc' ? ' \u2191' : (self.props.field.sort.order === 'desc' ? ' \u2193' : ''); var filterClass = (self.state.dragging ? '' : 'fltr-btn') + (this.props.pivotTableComp.pgrid.isFieldFiltered(this.props.field.name) ? ' fltr-btn-active' : ''); var fieldAggFunc = ''; if (self.props.axetype === axe.Type.DATA) { fieldAggFunc = React.createElement("small", null, ' (' + self.props.field.aggregateFuncName + ')'); } return React.createElement("div", { key: self.props.field.name, className: this.props.pivotTableComp.pgrid.config.theme.getButtonClasses().pivotButton, onMouseDown: this.onMouseDown, style: divstyle }, React.createElement("table", null, React.createElement("tbody", null, React.createElement("tr", null, React.createElement("td", { style: { padding: 0 } }, self.props.field.caption, fieldAggFunc), React.createElement("td", { style: { padding: 0, width: 13 } }, sortIndicator), React.createElement("td", { style: { padding: 0, verticalAlign: 'top' } }, React.createElement("div", { className: filterClass, onMouseDown: self.state.dragging ? null : this.onFilterMouseDown }) ) ) ) ) ); } }); module.exports.FilterPanel = react.createClass({ pgridwidget: null, values: null, filterManager: null, getInitialState: function() { this.pgridwidget = this.props.pivotTableComp.pgridwidget; return {}; }, destroy: function() { var container = this.getDOMNode().parentNode; React.unmountComponentAtNode(container); container.parentNode.removeChild(container); }, onFilter: function(operator, term, staticValue, excludeStatic) { this.props.pivotTableComp.applyFilter(this.props.field, operator, term, staticValue, excludeStatic); this.destroy(); }, onMouseDown: function(e) { var container = this.getDOMNode().parentNode; var target = e.target; while (target != null) { if (target == container) { return true; } target = target.parentNode; } this.destroy(); }, onMouseWheel: function(e) { var valuesTable = this.getDOMNode().rows[1].cells[0].children[0]; var target = e.target; while (target != null) { if (target == valuesTable) { if (valuesTable.scrollHeight <= valuesTable.clientHeight) { e.stopPropagation(); e.preventDefault(); } return; } target = target.parentNode; } this.destroy(); }, componentWillMount: function() { document.addEventListener('mousedown', this.onMouseDown); document.addEventListener('wheel', this.onMouseWheel); window.addEventListener('resize', this.destroy); }, componentDidMount: function() { this.filterManager.init(this.getDOMNode()); }, componentWillUnmount: function() { document.removeEventListener('mousedown', this.onMouseDown); document.removeEventListener('wheel', this.onMouseWheel); window.removeEventListener('resize', this.destroy); }, render: function() { var Dropdown = comps.Dropdown; var checkboxes = []; this.filterManager = new FilterManager(this, this.pgridwidget.pgrid.getFieldFilter(this.props.field)); this.values = this.pgridwidget.pgrid.getFieldValues(this.props.field); function addCheckboxRow(value, text) { return checkboxes.push(React.createElement("tr", { key: value }, React.createElement("td", { className: "fltr-chkbox" }, React.createElement("input", { type: "checkbox", value: value, defaultChecked: "checked" }) ), React.createElement("td", { className: "fltr-val", title: text || value }, text || value) )); } addCheckboxRow(filtering.ALL, '(Show All)'); if (this.values.containsBlank) { addCheckboxRow(filtering.BLANK, '(Blank)'); } for (var i = 0; i < this.values.length; i++) { addCheckboxRow(this.values[i]); } var buttonClass = this.props.pivotTableComp.pgrid.config.theme.getButtonClasses().orbButton; var pivotStyle = window.getComputedStyle(this.props.pivotTableComp.getDOMNode(), null); var style = { fontFamily: pivotStyle.getPropertyValue('font-family'), fontSize: pivotStyle.getPropertyValue('font-size') }; var currentFilter = this.pgridwidget.pgrid.getFieldFilter(this.props.field); return React.createElement("table", { className: "fltr-scntnr", style: style }, React.createElement("tbody", null, React.createElement("tr", null, React.createElement("td", { className: "srchop-col" }, React.createElement(Dropdown, { values: [ filtering.Operators.MATCH.name, filtering.Operators.NOTMATCH.name, filtering.Operators.EQ.name, filtering.Operators.NEQ.name, filtering.Operators.GT.name, filtering.Operators.GTE.name, filtering.Operators.LT.name, filtering.Operators.LTE.name ], selectedValue: currentFilter && currentFilter.operator ? currentFilter.operator.name : filtering.Operators.MATCH.name, onValueChanged: this.filterManager.onOperatorChanged }) ), React.createElement("td", { className: "srchtyp-col", title: "Enable/disable Regular expressions" }, ".*"), React.createElement("td", { className: "srchbox-col" }, React.createElement("input", { type: "text", placeholder: "search" })) ), React.createElement("tr", null, React.createElement("td", { colSpan: "3", className: "fltr-vals-col" }, React.createElement("table", { className: "fltr-vals-tbl" }, React.createElement("tbody", null, checkboxes ) ) ) ), React.createElement("tr", { className: "bottom-row" }, React.createElement("td", { className: "cnfrm-btn-col", colSpan: "2" }, React.createElement("input", { type: "button", className: buttonClass, value: "Ok", style: { float: 'left' } }), React.createElement("input", { type: "button", className: buttonClass, value: "Cancel", style: { float: 'left' } }) ), React.createElement("td", { className: "resize-col" }, React.createElement("div", null) ) ) ) ); } }); function FilterManager(reactComp, initialFilterObject) { var self = this; var INDETERMINATE = 'indeterminate'; var savedCheckedValues; var isSearchMode = false; var isRegexMode = false; var operator = filtering.Operators.MATCH; var lastSearchTerm = ''; var elems = { filterContainer: null, checkboxes: {}, searchBox: null, operatorBox: null, allCheckbox: null, addCheckbox: null, enableRegexButton: null, okButton: null, cancelButton: null, resizeGrip: null }; var resizeManager; this.init = function(filterContainerElement) { elems.filterContainer = filterContainerElement; elems.checkboxes = {}; elems.searchBox = elems.filterContainer.rows[0].cells[2].children[0]; elems.operatorBox = elems.filterContainer.rows[0].cells[0].children[0]; elems.okButton = elems.filterContainer.rows[2].cells[0].children[0]; elems.cancelButton = elems.filterContainer.rows[2].cells[0].children[1]; elems.resizeGrip = elems.filterContainer.rows[2].cells[1].children[0]; var rows = elems.filterContainer.rows[1].cells[0].children[0].rows; for (var i = 0; i < rows.length; i++) { var checkbox = rows[i].cells[0].children[0]; elems.checkboxes[checkbox.value] = checkbox; } elems.allCheckbox = elems.checkboxes[filtering.ALL]; elems.addCheckbox = null; elems.enableRegexButton = elems.filterContainer.rows[0].cells[1]; resizeManager = new ResizeManager(elems.filterContainer.parentNode, elems.filterContainer.rows[1].cells[0].children[0], elems.resizeGrip); applyInitialFilterObject(); addEventListeners(); }; this.onOperatorChanged = function(newOperator) { if (operator.name !== newOperator) { operator = filtering.Operators.get(newOperator); self.toggleRegexpButtonVisibility(); self.searchChanged('operatorChanged'); } }; function checkboxVisible(checkbox, isVisible) { if (isVisible != null) { checkbox.parentNode.parentNode.style.display = isVisible ? '' : 'none'; } else { return checkbox.parentNode.parentNode.style.display != 'none'; } } function applyInitialFilterObject() { if (initialFilterObject) { var staticInfos = { values: initialFilterObject.staticValue, toExclude: initialFilterObject.excludeStatic }; if (initialFilterObject.term) { isSearchMode = true; operator = initialFilterObject.operator; self.toggleRegexpButtonVisibility(); if (initialFilterObject.regexpMode) { isRegexMode = true; self.toggleRegexpButtonState(); lastSearchTerm = initialFilterObject.term.source; } else { lastSearchTerm = initialFilterObject.term; } elems.searchBox.value = lastSearchTerm; self.applyFilterTerm(initialFilterObject.operator, initialFilterObject.term); } else { savedCheckedValues = staticInfos; } self.updateCheckboxes(staticInfos); self.updateAllCheckbox(); } } function addEventListeners() { self.toggleRegexpButtonVisibility(); elems.filterContainer.addEventListener('click', self.valueChecked); elems.searchBox.addEventListener('keyup', self.searchChanged); elems.okButton.addEventListener('click', function() { var checkedObj = self.getCheckedValues(); reactComp.onFilter(operator.name, operator.regexpSupported && isSearchMode && isRegexMode ? new RegExp(lastSearchTerm, 'i') : lastSearchTerm, checkedObj.values, checkedObj.toExclude); }); elems.cancelButton.addEventListener('click', function() { reactComp.destroy(); }); } function ResizeManager(outerContainerElem, valuesTableElem, resizeGripElem) { var minContainerWidth = 301; var minContainerHeight = 223; var mousedownpos = { x: 0, y: 0 }; var isMouseDown = false; this.resizeMouseDown = function(e) { // drag/sort with left mouse button if (e.button !== 0) return; isMouseDown = true; document.body.style.cursor = 'se-resize'; mousedownpos.x = e.pageX; mousedownpos.y = e.pageY; // prevent event bubbling (to prevent text selection while dragging for example) e.stopPropagation(); e.preventDefault(); }; this.resizeMouseUp = function() { isMouseDown = false; document.body.style.cursor = 'auto'; return true; }; this.resizeMouseMove = function(e) { // if the mouse is not down while moving, return (no drag) if (!isMouseDown) return; var resizeGripSize = resizeGripElem.getBoundingClientRect(); var outerContainerSize = outerContainerElem.getBoundingClientRect(); var valuesTableSize = valuesTableElem.getBoundingClientRect(); var outerContainerWidth = outerContainerSize.right - outerContainerSize.left; var outerContainerHeight = outerContainerSize.bottom - outerContainerSize.top; var offset = { x: outerContainerWidth <= minContainerWidth && e.pageX < resizeGripSize.left ? 0 : e.pageX - mousedownpos.x, y: outerContainerHeight <= minContainerHeight && e.pageY < resizeGripSize.top ? 0 : e.pageY - mousedownpos.y }; var newContainerWidth = outerContainerWidth + offset.x; var newContainerHeight = outerContainerHeight + offset.y; mousedownpos.x = e.pageX; mousedownpos.y = e.pageY; if (newContainerWidth >= minContainerWidth) { outerContainerElem.style.width = newContainerWidth + 'px'; } if (newContainerHeight >= minContainerHeight) { outerContainerElem.style.height = newContainerHeight + 'px'; valuesTableElem.style.height = (valuesTableSize.bottom - valuesTableSize.top + offset.y) + 'px'; } e.stopPropagation(); e.preventDefault(); }; resizeGripElem.addEventListener('mousedown', this.resizeMouseDown); document.addEventListener('mouseup', this.resizeMouseUp); document.addEventListener('mousemove', this.resizeMouseMove); } this.toggleRegexpButtonVisibility = function() { if (operator.regexpSupported) { elems.enableRegexButton.addEventListener('click', self.regexpActiveChanged); elems.enableRegexButton.className = elems.enableRegexButton.className.replace(/\s+srchtyp\-col\-hidden/, ''); } else { elems.enableRegexButton.removeEventListener('click', self.regexpActiveChanged); elems.enableRegexButton.className += ' srchtyp-col-hidden'; } } this.toggleRegexpButtonState = function() { elems.enableRegexButton.className = elems.enableRegexButton.className.replace('srchtyp-col-active', ''); if (isRegexMode) { elems.enableRegexButton.className += ' srchtyp-col-active'; } } this.regexpActiveChanged = function() { isRegexMode = !isRegexMode; self.toggleRegexpButtonState(); self.searchChanged('regexModeChanged'); }; this.valueChecked = function(e) { var target = e.target; if (target && target.type && target.type === 'checkbox') { if (target == elems.allCheckbox) { self.updateCheckboxes({ values: elems.allCheckbox.checked }); } else { self.updateAllCheckbox(); } } }; this.applyFilterTerm = function(operator, term) { var defaultVisible = term ? false : true; var opterm = operator.regexpSupported && isSearchMode ? (isRegexMode ? term : utils.escapeRegex(term)) : term; checkboxVisible(elems.allCheckbox, defaultVisible); for (var i = 0; i < reactComp.values.length; i++) { var val = reactComp.values[i]; var checkbox = elems.checkboxes[val]; var visible = !isSearchMode || operator.func(val, opterm); checkboxVisible(checkbox, visible); checkbox.checked = visible; } } this.searchChanged = function(e) { var search = (elems.searchBox.value || '').trim(); if (e === 'operatorChanged' || (e === 'regexModeChanged' && search) || search != lastSearchTerm) { lastSearchTerm = search; var previousIsSearchMode = isSearchMode; isSearchMode = search !== ''; if (isSearchMode && !previousIsSearchMode) { savedCheckedValues = self.getCheckedValues(); } //var searchTerm = operator.regexpSupported && isSearchMode ? new RegExp(isRegexMode ? search : utils.escapeRegex(search), 'i') : search; if (e !== 'operatorChanged' || isSearchMode) { self.applyFilterTerm(operator, search); } if (!isSearchMode && previousIsSearchMode) { self.updateCheckboxes(savedCheckedValues); } self.updateAllCheckbox(); } }; this.getCheckedValues = function() { if (!isSearchMode && !elems.allCheckbox.indeterminate) { return { values: elems.allCheckbox.checked ? filtering.ALL : filtering.NONE, toExclude: false }; } else { var staticValue; var i, val, checkbox; var valuesCount = 0, checkedCount = 0; for (i = 0; i < reactComp.values.length; i++) { val = reactComp.values[i]; checkbox = elems.checkboxes[val]; if (checkboxVisible(checkbox)) { valuesCount++; if (checkbox.checked) { checkedCount++; } } } if (checkedCount == 0) { staticValue = filtering.NONE; } else if (checkedCount == valuesCount) { staticValue = filtering.ALL; } else { staticValue = []; var excludeUnchecked = checkedCount > (valuesCount / 2 + 1); for (i = 0; i < reactComp.values.length; i++) { val = reactComp.values[i]; checkbox = elems.checkboxes[val]; if (checkboxVisible(checkbox)) { if ((!excludeUnchecked && checkbox.checked) || (excludeUnchecked && !checkbox.checked)) { staticValue.push(val); } } } } return { values: staticValue, toExclude: excludeUnchecked }; } }; this.updateCheckboxes = function(checkedList) { var values = checkedList ? checkedList.values : null; var allchecked = utils.isArray(values) ? null : (values == null || values === filtering.ALL ? true : (values === filtering.NONE ? false : !!values ) ); for (var i = 0; i < reactComp.values.length; i++) { var val = reactComp.values[i]; var checkbox = elems.checkboxes[val]; if (checkboxVisible(checkbox)) { if (allchecked != null) { checkbox.checked = allchecked; } else { var valInList = values.indexOf(val) >= 0; checkbox.checked = checkedList.toExclude ? !valInList : valInList; } } } }; this.updateAllCheckbox = function() { if (!isSearchMode) { var allchecked = null; for (var i = 0; i < reactComp.values.length; i++) { var checkbox = elems.checkboxes[reactComp.values[i]]; if (allchecked == null) { allchecked = checkbox.checked; } else { if (allchecked !== checkbox.checked) { allchecked = INDETERMINATE; break; } } } if (allchecked === INDETERMINATE) { elems.allCheckbox.indeterminate = true; elems.allCheckbox.checked = false; } else { elems.allCheckbox.indeterminate = false; elems.allCheckbox.checked = allchecked; } } }; } module.exports.Dropdown = react.createClass({ openOrClose: function(e) { var valueNode = this.refs.valueElement.getDOMNode(); var valuesListNode = this.refs.valuesList.getDOMNode(); if (e.target === valueNode && valuesListNode.style.display === 'none') { valuesListNode.style.display = 'block'; } else { valuesListNode.style.display = 'none'; } }, onMouseEnter: function() { var valueNode = this.refs.valueElement.getDOMNode(); valueNode.className = "orb-tgl-btn-down"; valueNode.style.backgroundPosition = 'right center'; }, onMouseLeave: function() { this.refs.valueElement.getDOMNode().className = ""; }, componentDidMount: function() { document.addEventListener('click', this.openOrClose); }, componentWillUnmount: function() { document.removeEventListener('click', this.openOrClose); }, selectValue: function(e) { var listNode = this.refs.valuesList.getDOMNode(); var target = e.target; var isli = false; while (!isli && target != null) { if (target.parentNode == listNode) { isli = true; break; } target = target.parentNode; } if (isli) { var value = target.textContent; var valueElement = this.refs.valueElement.getDOMNode(); if (valueElement.textContent != value) { valueElement.textContent = value; if (this.props.onValueChanged) { this.props.onValueChanged(value); } } } }, render: function() { function createSelectValueFunc(value) { return function() { this.selectValue(value); }; } var values = []; for (var i = 0; i < this.props.values.length; i++) { values.push(React.createElement("li", { dangerouslySetInnerHTML: { __html: this.props.values[i] } })) } return React.createElement("div", { className: "orb-select" }, React.createElement("div", { ref: "valueElement", dangerouslySetInnerHTML: { __html: this.props.selectedValue }, onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave }), React.createElement("ul", { ref: "valuesList", style: { display: 'none' }, onClick: this.selectValue }, values ) ); } }); module.exports.Grid = react.createClass({ render: function() { var data = this.props.data; var headers = this.props.headers; var tableClasses = this.props.theme.getGridClasses(); var rows = []; if (headers && headers.length > 0) { var headerRow = []; for (var h = 0; h < headers.length; h++) { headerRow.push(React.createElement("th", { key: 'h' + h }, headers[h])); } rows.push(React.createElement("tr", { key: 'h' }, headerRow)); } if (data && data.length > 0) { for (var i = 0; i < data.length; i++) { var row = []; for (var j = 0; j < data[i].length; j++) { row.push(React.createElement("td", { key: i + '' + j }, data[i][j])); } rows.push(React.createElement("tr", { key: i }, row)); } } return React.createElement("table", { className: tableClasses.table }, React.createElement("tbody", null, rows ) ); } }); function createOverlay() { var overlayElement = document.createElement('div'); overlayElement.className = 'orb-overlay orb-overlay-hidden'; document.body.appendChild(overlayElement); return overlayElement; } var Dialog = module.exports.Dialog = react.createClass({ statics: { create: function() { var dialogFactory = React.createFactory(Dialog); var overlay = createOverlay(); return { show: function(props) { React.render(dialogFactory(props), overlay); } } } }, overlayElement: null, setOverlayClass: function(visible) { this.overlayElement.className = this.props.theme.getDialogClasses(visible).overlay; }, componentDidMount: function() { this.overlayElement = this.getDOMNode().parentNode; this.setOverlayClass(true); this.overlayElement.addEventListener('click', this.close); var dialogElement = this.overlayElement.children[0]; var dialogBodyElement = dialogElement.children[0].children[1]; var screenWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0) var screenHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0) var maxHeight = 2 * screenHeight / 3; maxHeight = maxHeight < 301 ? 301 : maxHeight; var dWidth = dialogElement.offsetWidth + (dialogElement.offsetHeight > maxHeight ? 11 : 0); var dHeight = dialogElement.offsetHeight > maxHeight ? maxHeight : dialogElement.offsetHeight; dialogElement.style.top = (screenHeight > dHeight ? (screenHeight - dHeight) / 2 : 0) + 'px'; dialogElement.style.left = (screenWidth > dWidth ? (screenWidth - dWidth) / 2 : 0) + 'px'; dialogElement.style.height = dHeight + 'px'; dialogBodyElement.style.width = dWidth + 'px'; dialogBodyElement.style.height = (dHeight - 45) + 'px'; }, close: function(e) { if (e.target == this.overlayElement || e.target.className === 'button-close') { this.overlayElement.removeEventListener('click', this.close); React.unmountComponentAtNode(this.overlayElement); this.setOverlayClass(false); } }, render: function() { if (this.props.comp) { var comp = React.createElement(this.props.comp.type, this.props.comp.props); var classes = this.props.theme.getDialogClasses(); return React.createElement("div", { className: classes.dialog, style: this.props.style || {} }, React.createElement("div", { className: classes.content }, React.createElement("div", { className: classes.header }, React.createElement("div", { className: "button-close", onClick: this.close }), React.createElement("div", { className: classes.title }, this.props.title)), React.createElement("div", { className: classes.body }, comp ) ) ); } } }); module.exports.Toolbar = react.createClass({ onThemeChanged: function(newTheme) { this.props.pivotTableComp.changeTheme(newTheme); }, render: function() { var Dropdown = comps.Dropdown; var themeColors = _dereq_('../orb.themes').themes; var values = []; for (var color in themeColors) { values.push('<div style="float: left; width: 16px; height: 16px; margin-right: 3px; border: 1px dashed lightgray; background-color: ' + themeColors[color] + '"></div><div style="float: left;">' + color + '</div>'); } values.push('<div style="float: left; width: 16px; height: 16px; margin-right: 3px; border: 1px dashed lightgray;"></div><div style="float: left;">bootstrap</div>'); var buttons = [ React.createElement("div", { className: "orb-tlbr-btn", style: { width: 101 } }, React.createElement(Dropdown, { values: values, selectedValue: 'Theme', onValueChanged: this.onThemeChanged })) ]; return React.createElement("div", null, buttons ); } }); }, { "../orb.axe": 3, "../orb.filtering": 6, "../orb.themes": 10, "../orb.ui.header": 12, "../orb.utils": 15, "./orb.react.utils": 17, "react": undefined }], 17: [function(_dereq_, module, exports) { module.exports.forEach = function(list, func, defStop) { var ret; if (list != null) { for (var i = 0, l = list.length; i < l; i++) { ret = func(list[i], i); if (ret !== undefined && defStop === true) { break; } } } return ret; } module.exports.getOffset = function(element) { if (element != null) { var rect = element.getBoundingClientRect(); return { x: rect.left + 0, y: rect.top + 0 }; } return { x: 0, y: 0 }; } module.exports.getSize = function(element) { if (element != null) { var rect = element.getBoundingClientRect(); return { width: rect.right - rect.left, height: rect.bottom - rect.top }; } return { x: 0, y: 0 }; } }, {}] }, {}, [1])(1) });
src/svg-icons/hardware/keyboard-hide.js
tan-jerene/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let HardwareKeyboardHide = (props) => ( <SvgIcon {...props}> <path d="M20 3H4c-1.1 0-1.99.9-1.99 2L2 15c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-9 3h2v2h-2V6zm0 3h2v2h-2V9zM8 6h2v2H8V6zm0 3h2v2H8V9zm-1 2H5V9h2v2zm0-3H5V6h2v2zm9 7H8v-2h8v2zm0-4h-2V9h2v2zm0-3h-2V6h2v2zm3 3h-2V9h2v2zm0-3h-2V6h2v2zm-7 15l4-4H8l4 4z"/> </SvgIcon> ); HardwareKeyboardHide = pure(HardwareKeyboardHide); HardwareKeyboardHide.displayName = 'HardwareKeyboardHide'; HardwareKeyboardHide.muiName = 'SvgIcon'; export default HardwareKeyboardHide;
imports/ui/components/EditorialTeamView/EditorialTeamView.js
jamiebones/Journal_Publication
import React from 'react'; import PropTypes from 'prop-types'; import { Meteor } from 'meteor/meteor'; import { Link } from 'react-router'; import { Bert } from 'meteor/themeteorchef:bert'; import { Row, Col, FormGroup, ControlLabel, Panel , ButtonGroup, Media, FormControl, Button , Label , Modal , Well } from 'react-bootstrap'; import { Capitalize , GetNameFromUserId , JournalMessages } from '../../../modules/utilities'; import validate from '../../../modules/validate'; import EditorialTeam from '../EditorialTeam/EditorialTeam'; import Uploader from '../Uploader/Uploader.js'; import Journal from '../../../api/Journal/Journal'; import { createContainer } from 'meteor/react-meteor-data'; import './EditorialTeamView.scss'; class EditorialTeamView extends React.Component { constructor(props){ super(props); this.state = { showModal: false , show : false, index: "", } this.startEditMode = this.startEditMode.bind( this ); this.close = this.close.bind( this ); this.open = this.open.bind( this ); this.deleteMember = this.deleteMember.bind( this ); this.addNewMember = this.addNewMember.bind( this); this.handleRemoveImage = this.handleRemoveImage.bind( this ); } startEditMode(event , index){ event.preventDefault(); let value = index + 1 this.setState({"showModal" : true , "index" : value}) } addNewMember(event){ event.preventDefault(); this.setState({"showModal" : true , "index" : ""}) } deleteMember(event , id){ event.preventDefault(); const teamId = id; const { journal } = this.props; const journalId = journal[0] && journal[0]._id; if (confirm('Are you sure. This is permanent')){ Meteor.call('journal.removeTeamMember' , id , journalId , (error , response ) => { if (response){ Bert.alert('Successful' , 'success'); } else{ Bert.alert(`${error} : There was an error` , 'danger'); } }) } } close() { this.setState({ showModal: false }); } open() { this.setState({ showModal: true }); } handleRemoveImage( journalId , id ){ if (confirm('Are you sure? This is permanent!')) { Meteor.call('journal.deleteEditorsPics', journalId , id , (error) => { if (error) { Bert.alert(error.reason, 'danger'); } else { Bert.alert('Image removed!', 'success'); } }); } } render(){ const { journal } = this.props; return ( journal[0] && journal[0].settings && journal[0].settings.editorialTeam && journal[0].settings.editorialTeam.length ? ( <div className="top"> <Row> {journal[0] && journal[0].settings && journal[0].settings.editorialTeam.map(({imageUrl , firstname, qualification , title , fileName , awards , specialization , id , surname , department , position }, index)=>{ return ( <Col md={6} key={index}> <Media> <Media.Left align="top"> {imageUrl ? ( <div> <img className="img img-responsive" src={imageUrl} /> <br/> <Button bsSize="xsmall" bsStyle="danger" onClick={( )=> this.handleRemoveImage( journal[0] && journal[0]._id , id )} > Remove Image </Button> </div> ) : <Uploader paperId={ journal[0] && journal[0]._id } methodName="journal.saveEditorsPics" slingshot="EditorialTeamProfileImage" uploadMessage="upload profile picture" teamId={ id } /> } </Media.Left> <Media.Body> <Media.Heading>{title} {firstname} {surname}</Media.Heading> <p>Department : {department}</p> <p>Qualification : {qualification}</p> <p>Specialization : {specialization}</p> <p>Academic Awards : {awards}</p> <p>Journal Position : {position}</p> <p> <Button onClick={(event)=>this.startEditMode(event, index)}> Edit </Button> <Button bsStyle="danger" onClick={(event)=>this.deleteMember(event, id , imageUrl , fileName)}> Delete </Button> </p> </Media.Body> </Media> </Col> ) })} </Row> <Row> <div className="ModalOverlay"> <Modal bsSize="large" show={this.state.showModal} onHide={this.close} dialogClassName="custom-modal" aria-labelledby="contained-modal-title-lg"> <Modal.Header closeButton bsSize="large" aria-labelledby="contained-modal-title-lg"> <Modal.Title>{this.state.index ? ('Edit Details') : 'Add New Member'}</Modal.Title> </Modal.Header> <Modal.Body> <Row> <Col md={12}> {this.state.index ? ( <EditorialTeam journal={journal} index={this.state.index} close={this.close} /> ) : <EditorialTeam journal={journal} close={this.close} /> } </Col> </Row> </Modal.Body> <Modal.Footer> <ButtonGroup> <Button onClick={this.close}>Close</Button> </ButtonGroup> </Modal.Footer> </Modal> </div> </Row> <Row> <p className="pull-right"> <Button onClick={(event)=>this.addNewMember(event)}> Add New Member </Button> </p> </Row> </div> ) : <EditorialTeam journal={journal} /> ) } } export default EditorialTeamView; //export default EditorialTeamView;
admin/src/components/PopoutList.js
geminiyellow/keystone
import blacklist from 'blacklist'; import classnames from 'classnames'; import React from 'react'; var PopoutList = React.createClass({ displayName: 'PopoutList', propTypes: { children: React.PropTypes.node.isRequired, }, render () { let className = classnames('PopoutList', this.props.className); let props = blacklist(this.props, 'className'); return <div className={className} {...props} />; } }); module.exports = PopoutList; // expose the child to the top level export module.exports.Item = require('./PopoutListItem'); module.exports.Heading = require('./PopoutListHeading');
node_modules/react-icons/io/tshirt.js
bairrada97/festival
import React from 'react' import Icon from 'react-icon-base' const IoTshirt = props => ( <Icon viewBox="0 0 40 40" {...props}> <g><path d="m35 7.5l-2.5 6.9-5-0.6 1.3 22.5h-22.5l1.2-22.5-5 0.6-2.5-6.9 12.5-3.7c1.1 2.1 2.4 3 5 3.1 2.6 0 3.9-1 5-3.1z"/></g> </Icon> ) export default IoTshirt
app/renderer/presentational/generic/Tab.js
AbsoluteZero273/Deezic
import React from 'react' const Tab = ({ children, tabID, active }) => { return ( <div className={'mdl-tabs__panel custom-tabs__panel' + (active ? ' is-active' : '')} id={tabID}> { children } </div> ) } export default Tab
ajax/libs/yui/3.7.2/datatable-core/datatable-core-coverage.js
mival/cdnjs
if (typeof _yuitest_coverage == "undefined"){ _yuitest_coverage = {}; _yuitest_coverline = function(src, line){ var coverage = _yuitest_coverage[src]; if (!coverage.lines[line]){ coverage.calledLines++; } coverage.lines[line]++; }; _yuitest_coverfunc = function(src, name, line){ var coverage = _yuitest_coverage[src], funcId = name + ":" + line; if (!coverage.functions[funcId]){ coverage.calledFunctions++; } coverage.functions[funcId]++; }; } _yuitest_coverage["build/datatable-core/datatable-core.js"] = { lines: {}, functions: {}, coveredLines: 0, calledLines: 0, coveredFunctions: 0, calledFunctions: 0, path: "build/datatable-core/datatable-core.js", code: [] }; _yuitest_coverage["build/datatable-core/datatable-core.js"].code=["YUI.add('datatable-core', function (Y, NAME) {","","/**","The core implementation of the `DataTable` and `DataTable.Base` Widgets.","","@module datatable","@submodule datatable-core","@since 3.5.0","**/","","var INVALID = Y.Attribute.INVALID_VALUE,",""," Lang = Y.Lang,"," isFunction = Lang.isFunction,"," isObject = Lang.isObject,"," isArray = Lang.isArray,"," isString = Lang.isString,"," isNumber = Lang.isNumber,",""," toArray = Y.Array,",""," keys = Y.Object.keys,",""," Table;"," ","/**","_API docs for this extension are included in the DataTable class._","","Class extension providing the core API and structure for the DataTable Widget.","","Use this class extension with Widget or another Base-based superclass to create","the basic DataTable model API and composing class structure.","","@class DataTable.Core","@for DataTable","@since 3.5.0","**/","Table = Y.namespace('DataTable').Core = function () {};","","Table.ATTRS = {"," /**"," Columns to include in the rendered table."," "," If omitted, the attributes on the configured `recordType` or the first item"," in the `data` collection will be used as a source.",""," This attribute takes an array of strings or objects (mixing the two is"," fine). Each string or object is considered a column to be rendered."," Strings are converted to objects, so `columns: ['first', 'last']` becomes"," `columns: [{ key: 'first' }, { key: 'last' }]`.",""," DataTable.Core only concerns itself with a few properties of columns."," These properties are:",""," * `key` - Used to identify the record field/attribute containing content for"," this column. Also used to create a default Model if no `recordType` or"," `data` are provided during construction. If `name` is not specified, this"," is assigned to the `_id` property (with added incrementer if the key is"," used by multiple columns)."," * `children` - Traversed to initialize nested column objects"," * `name` - Used in place of, or in addition to, the `key`. Useful for"," columns that aren't bound to a field/attribute in the record data. This"," is assigned to the `_id` property."," * `id` - For backward compatibility. Implementers can specify the id of"," the header cell. This should be avoided, if possible, to avoid the"," potential for creating DOM elements with duplicate IDs."," * `field` - For backward compatibility. Implementers should use `name`."," * `_id` - Assigned unique-within-this-instance id for a column. By order"," of preference, assumes the value of `name`, `key`, `id`, or `_yuid`."," This is used by the rendering views as well as feature module"," as a means to identify a specific column without ambiguity (such as"," multiple columns using the same `key`."," * `_yuid` - Guid stamp assigned to the column object."," * `_parent` - Assigned to all child columns, referencing their parent"," column.",""," @attribute columns"," @type {Object[]|String[]}"," @default (from `recordType` ATTRS or first item in the `data`)"," @since 3.5.0"," **/"," columns: {"," // TODO: change to setter to clone input array/objects"," validator: isArray,"," setter: '_setColumns',"," getter: '_getColumns'"," },",""," /**"," Model subclass to use as the `model` for the ModelList stored in the `data`"," attribute.",""," If not provided, it will try really hard to figure out what to use. The"," following attempts will be made to set a default value:"," "," 1. If the `data` attribute is set with a ModelList instance and its `model`"," property is set, that will be used."," 2. If the `data` attribute is set with a ModelList instance, and its"," `model` property is unset, but it is populated, the `ATTRS` of the"," `constructor of the first item will be used."," 3. If the `data` attribute is set with a non-empty array, a Model subclass"," will be generated using the keys of the first item as its `ATTRS` (see"," the `_createRecordClass` method)."," 4. If the `columns` attribute is set, a Model subclass will be generated"," using the columns defined with a `key`. This is least desirable because"," columns can be duplicated or nested in a way that's not parsable."," 5. If neither `data` nor `columns` is set or populated, a change event"," subscriber will listen for the first to be changed and try all over"," again.",""," @attribute recordType"," @type {Function}"," @default (see description)"," @since 3.5.0"," **/"," recordType: {"," getter: '_getRecordType',"," setter: '_setRecordType'"," },",""," /**"," The collection of data records to display. This attribute is a pass"," through to a `data` property, which is a ModelList instance.",""," If this attribute is passed a ModelList or subclass, it will be assigned to"," the property directly. If an array of objects is passed, a new ModelList"," will be created using the configured `recordType` as its `model` property"," and seeded with the array.",""," Retrieving this attribute will return the ModelList stored in the `data`"," property.",""," @attribute data"," @type {ModelList|Object[]}"," @default `new ModelList()`"," @since 3.5.0"," **/"," data: {"," valueFn: '_initData',"," setter : '_setData',"," lazyAdd: false"," },",""," /**"," Content for the `<table summary=\"ATTRIBUTE VALUE HERE\">`. Values assigned"," to this attribute will be HTML escaped for security.",""," @attribute summary"," @type {String}"," @default '' (empty string)"," @since 3.5.0"," **/"," //summary: {},",""," /**"," HTML content of an optional `<caption>` element to appear above the table."," Leave this config unset or set to a falsy value to remove the caption.",""," @attribute caption"," @type HTML"," @default '' (empty string)"," @since 3.5.0"," **/"," //caption: {},",""," /**"," Deprecated as of 3.5.0. Passes through to the `data` attribute.",""," WARNING: `get('recordset')` will NOT return a Recordset instance as of"," 3.5.0. This is a break in backward compatibility.",""," @attribute recordset"," @type {Object[]|Recordset}"," @deprecated Use the `data` attribute"," @since 3.5.0"," **/"," recordset: {"," setter: '_setRecordset',"," getter: '_getRecordset',"," lazyAdd: false"," },",""," /**"," Deprecated as of 3.5.0. Passes through to the `columns` attribute.",""," WARNING: `get('columnset')` will NOT return a Columnset instance as of"," 3.5.0. This is a break in backward compatibility.",""," @attribute columnset"," @type {Object[]}"," @deprecated Use the `columns` attribute"," @since 3.5.0"," **/"," columnset: {"," setter: '_setColumnset',"," getter: '_getColumnset',"," lazyAdd: false"," }","};","","Y.mix(Table.prototype, {"," // -- Instance properties -------------------------------------------------"," /**"," The ModelList that manages the table's data.",""," @property data"," @type {ModelList}"," @default undefined (initially unset)"," @since 3.5.0"," **/"," //data: null,",""," // -- Public methods ------------------------------------------------------",""," /**"," Gets the column configuration object for the given key, name, or index. For"," nested columns, `name` can be an array of indexes, each identifying the index"," of that column in the respective parent's \"children\" array.",""," If you pass a column object, it will be returned.",""," For columns with keys, you can also fetch the column with"," `instance.get('columns.foo')`.",""," @method getColumn"," @param {String|Number|Number[]} name Key, \"name\", index, or index array to"," identify the column"," @return {Object} the column configuration object"," @since 3.5.0"," **/"," getColumn: function (name) {"," var col, columns, i, len, cols;",""," if (isObject(name) && !isArray(name)) {"," // TODO: support getting a column from a DOM node - this will cross"," // the line into the View logic, so it should be relayed",""," // Assume an object passed in is already a column def"," col = name;"," } else {"," col = this.get('columns.' + name);"," }",""," if (col) {"," return col;"," }",""," columns = this.get('columns');",""," if (isNumber(name) || isArray(name)) {"," name = toArray(name);"," cols = columns;",""," for (i = 0, len = name.length - 1; cols && i < len; ++i) {"," cols = cols[name[i]] && cols[name[i]].children;"," }",""," return (cols && cols[name[i]]) || null;"," }",""," return null;"," },",""," /**"," Returns the Model associated to the record `id`, `clientId`, or index (not"," row index). If none of those yield a Model from the `data` ModelList, the"," arguments will be passed to the `view` instance's `getRecord` method"," if it has one.",""," If no Model can be found, `null` is returned.",""," @method getRecord"," @param {Number|String|Node} seed Record `id`, `clientId`, index, Node, or"," identifier for a row or child element"," @return {Model}"," @since 3.5.0"," **/"," getRecord: function (seed) {"," var record = this.data.getById(seed) || this.data.getByClientId(seed);",""," if (!record) {"," if (isNumber(seed)) {"," record = this.data.item(seed);"," }"," "," // TODO: this should be split out to base somehow"," if (!record && this.view && this.view.getRecord) {"," record = this.view.getRecord.apply(this.view, arguments);"," }"," }",""," return record || null;"," },",""," // -- Protected and private properties and methods ------------------------",""," /**"," This tells `Y.Base` that it should create ad-hoc attributes for config"," properties passed to DataTable's constructor. This is useful for setting"," configurations on the DataTable that are intended for the rendering View(s).",""," @property _allowAdHocAttrs"," @type Boolean"," @default true"," @protected"," @since 3.6.0"," **/"," _allowAdHocAttrs: true,",""," /**"," A map of column key to column configuration objects parsed from the"," `columns` attribute.",""," @property _columnMap"," @type {Object}"," @default undefined (initially unset)"," @protected"," @since 3.5.0"," **/"," //_columnMap: null,",""," /**"," The Node instance of the table containing the data rows. This is set when"," the table is rendered. It may also be set by progressive enhancement,"," though this extension does not provide the logic to parse from source.",""," @property _tableNode"," @type {Node}"," @default undefined (initially unset)"," @protected"," @since 3.5.0"," **/"," //_tableNode: null,",""," /**"," Updates the `_columnMap` property in response to changes in the `columns`"," attribute.",""," @method _afterColumnsChange"," @param {EventFacade} e The `columnsChange` event object"," @protected"," @since 3.5.0"," **/"," _afterColumnsChange: function (e) {"," this._setColumnMap(e.newVal);"," },",""," /**"," Updates the `modelList` attributes of the rendered views in response to the"," `data` attribute being assigned a new ModelList.",""," @method _afterDataChange"," @param {EventFacade} e the `dataChange` event"," @protected"," @since 3.5.0"," **/"," _afterDataChange: function (e) {"," var modelList = e.newVal;",""," this.data = e.newVal;",""," if (!this.get('columns') && modelList.size()) {"," // TODO: this will cause a re-render twice because the Views are"," // subscribed to columnsChange"," this._initColumns();"," }"," },",""," /**"," Assigns to the new recordType as the model for the data ModelList",""," @method _afterRecordTypeChange"," @param {EventFacade} e recordTypeChange event"," @protected"," @since 3.6.0"," **/"," _afterRecordTypeChange: function (e) {"," var data = this.data.toJSON();",""," this.data.model = e.newVal;",""," this.data.reset(data);",""," if (!this.get('columns') && data) {"," if (data.length) {"," this._initColumns();"," } else {"," this.set('columns', keys(e.newVal.ATTRS));"," }"," }"," },",""," /**"," Creates a Model subclass from an array of attribute names or an object of"," attribute definitions. This is used to generate a class suitable to"," represent the data passed to the `data` attribute if no `recordType` is"," set.",""," @method _createRecordClass"," @param {String[]|Object} attrs Names assigned to the Model subclass's"," `ATTRS` or its entire `ATTRS` definition object"," @return {Model}"," @protected"," @since 3.5.0"," **/"," _createRecordClass: function (attrs) {"," var ATTRS, i, len;",""," if (isArray(attrs)) {"," ATTRS = {};",""," for (i = 0, len = attrs.length; i < len; ++i) {"," ATTRS[attrs[i]] = {};"," }"," } else if (isObject(attrs)) {"," ATTRS = attrs;"," }",""," return Y.Base.create('record', Y.Model, [], null, { ATTRS: ATTRS });"," },",""," /**"," Tears down the instance.",""," @method destructor"," @protected"," @since 3.6.0"," **/"," destructor: function () {"," new Y.EventHandle(Y.Object.values(this._eventHandles)).detach();"," },",""," /**"," The getter for the `columns` attribute. Returns the array of column"," configuration objects if `instance.get('columns')` is called, or the"," specific column object if `instance.get('columns.columnKey')` is called.",""," @method _getColumns"," @param {Object[]} columns The full array of column objects"," @param {String} name The attribute name requested"," (e.g. 'columns' or 'columns.foo');"," @protected"," @since 3.5.0"," **/"," _getColumns: function (columns, name) {"," // Workaround for an attribute oddity (ticket #2529254)"," // getter is expected to return an object if get('columns.foo') is called."," // Note 'columns.' is 8 characters"," return name.length > 8 ? this._columnMap : columns;"," },",""," /**"," Relays the `get()` request for the deprecated `columnset` attribute to the"," `columns` attribute.",""," THIS BREAKS BACKWARD COMPATIBILITY. 3.4.1 and prior implementations will"," expect a Columnset instance returned from `get('columnset')`.",""," @method _getColumnset"," @param {Object} ignored The current value stored in the `columnset` state"," @param {String} name The attribute name requested"," (e.g. 'columnset' or 'columnset.foo');"," @deprecated This will be removed with the `columnset` attribute in a future"," version."," @protected"," @since 3.5.0"," **/"," _getColumnset: function (_, name) {"," return this.get(name.replace(/^columnset/, 'columns'));"," },",""," /**"," Returns the Model class of the instance's `data` attribute ModelList. If"," not set, returns the explicitly configured value.",""," @method _getRecordType"," @param {Model} val The currently configured value"," @return {Model}"," **/"," _getRecordType: function (val) {"," // Prefer the value stored in the attribute because the attribute"," // change event defaultFn sets e.newVal = this.get('recordType')"," // before notifying the after() subs. But if this getter returns"," // this.data.model, then after() subs would get e.newVal === previous"," // model before _afterRecordTypeChange can set"," // this.data.model = e.newVal"," return val || (this.data && this.data.model);"," },",""," /**"," Initializes the `_columnMap` property from the configured `columns`"," attribute. If `columns` is not set, but there are records in the `data`"," ModelList, use"," `ATTRS` of that class.",""," @method _initColumns"," @protected"," @since 3.5.0"," **/"," _initColumns: function () {"," var columns = this.get('columns') || [],"," item;"," "," // Default column definition from the configured recordType"," if (!columns.length && this.data.size()) {"," // TODO: merge superclass attributes up to Model?"," item = this.data.item(0);",""," if (item.toJSON) {"," item = item.toJSON();"," }",""," this.set('columns', keys(item));"," }",""," this._setColumnMap(columns);"," },",""," /**"," Sets up the change event subscriptions to maintain internal state.",""," @method _initCoreEvents"," @protected"," @since 3.6.0"," **/"," _initCoreEvents: function () {"," this._eventHandles.coreAttrChanges = this.after({"," columnsChange : Y.bind('_afterColumnsChange', this),"," recordTypeChange: Y.bind('_afterRecordTypeChange', this),"," dataChange : Y.bind('_afterDataChange', this)"," });"," },",""," /**"," Defaults the `data` attribute to an empty ModelList if not set during"," construction. Uses the configured `recordType` for the ModelList's `model`"," proeprty if set.",""," @method _initData"," @protected"," @return {ModelList}"," @since 3.6.0"," **/"," _initData: function () {"," var recordType = this.get('recordType'),"," // TODO: LazyModelList if recordType doesn't have complex ATTRS"," modelList = new Y.ModelList();",""," if (recordType) {"," modelList.model = recordType;"," }",""," return modelList;"," },",""," /**"," Initializes the instance's `data` property from the value of the `data`"," attribute. If the attribute value is a ModelList, it is assigned directly"," to `this.data`. If it is an array, a ModelList is created, its `model`"," property is set to the configured `recordType` class, and it is seeded with"," the array data. This ModelList is then assigned to `this.data`.",""," @method _initDataProperty"," @param {Array|ModelList|ArrayList} data Collection of data to populate the"," DataTable"," @protected"," @since 3.6.0"," **/"," _initDataProperty: function (data) {"," var recordType;",""," if (!this.data) {"," recordType = this.get('recordType');",""," if (data && data.each && data.toJSON) {"," this.data = data;",""," if (recordType) {"," this.data.model = recordType;"," }"," } else {"," // TODO: customize the ModelList or read the ModelList class"," // from a configuration option?"," this.data = new Y.ModelList();"," "," if (recordType) {"," this.data.model = recordType;"," }"," }",""," // TODO: Replace this with an event relay for specific events."," // Using bubbling causes subscription conflicts with the models'"," // aggregated change event and 'change' events from DOM elements"," // inside the table (via Widget UI event)."," this.data.addTarget(this);"," }"," },",""," /**"," Initializes the columns, `recordType` and data ModelList.",""," @method initializer"," @param {Object} config Configuration object passed to constructor"," @protected"," @since 3.5.0"," **/"," initializer: function (config) {"," var data = config.data,"," columns = config.columns,"," recordType;",""," // Referencing config.data to allow _setData to be more stringent"," // about its behavior"," this._initDataProperty(data);",""," // Default columns from recordType ATTRS if recordType is supplied at"," // construction. If no recordType is supplied, but the data is"," // supplied as a non-empty array, use the keys of the first item"," // as the columns."," if (!columns) {"," recordType = (config.recordType || config.data === this.data) &&"," this.get('recordType');",""," if (recordType) {"," columns = keys(recordType.ATTRS);"," } else if (isArray(data) && data.length) {"," columns = keys(data[0]);"," }",""," if (columns) {"," this.set('columns', columns);"," }"," }",""," this._initColumns();",""," this._eventHandles = {};",""," this._initCoreEvents();"," },",""," /**"," Iterates the array of column configurations to capture all columns with a"," `key` property. An map is built with column keys as the property name and"," the corresponding column object as the associated value. This map is then"," assigned to the instance's `_columnMap` property.",""," @method _setColumnMap"," @param {Object[]|String[]} columns The array of column config objects"," @protected"," @since 3.6.0"," **/"," _setColumnMap: function (columns) {"," var map = {};"," "," function process(cols) {"," var i, len, col, key;",""," for (i = 0, len = cols.length; i < len; ++i) {"," col = cols[i];"," key = col.key;",""," // First in wins for multiple columns with the same key"," // because the first call to genId (in _setColumns) will"," // return the same key, which will then be overwritten by the"," // subsequent same-keyed column. So table.getColumn(key) would"," // return the last same-keyed column."," if (key && !map[key]) {"," map[key] = col;"," }",""," //TODO: named columns can conflict with keyed columns"," map[col._id] = col;",""," if (col.children) {"," process(col.children);"," }"," }"," }",""," process(columns);",""," this._columnMap = map;"," },",""," /**"," Translates string columns into objects with that string as the value of its"," `key` property.",""," All columns are assigned a `_yuid` stamp and `_id` property corresponding"," to the column's configured `name` or `key` property with any spaces"," replaced with dashes. If the same `name` or `key` appears in multiple"," columns, subsequent appearances will have their `_id` appended with an"," incrementing number (e.g. if column \"foo\" is included in the `columns`"," attribute twice, the first will get `_id` of \"foo\", and the second an `_id`"," of \"foo1\"). Columns that are children of other columns will have the"," `_parent` property added, assigned the column object to which they belong.",""," @method _setColumns"," @param {null|Object[]|String[]} val Array of config objects or strings"," @return {null|Object[]}"," @protected"," **/"," _setColumns: function (val) {"," var keys = {},"," known = [],"," knownCopies = [],"," arrayIndex = Y.Array.indexOf;"," "," function copyObj(o) {"," var copy = {},"," key, val, i;",""," known.push(o);"," knownCopies.push(copy);",""," for (key in o) {"," if (o.hasOwnProperty(key)) {"," val = o[key];",""," if (isArray(val)) {"," copy[key] = val.slice();"," } else if (isObject(val, true)) {"," i = arrayIndex(val, known);",""," copy[key] = i === -1 ? copyObj(val) : knownCopies[i];"," } else {"," copy[key] = o[key];"," }"," }"," }",""," return copy;"," }",""," function genId(name) {"," // Sanitize the name for use in generated CSS classes."," // TODO: is there more to do for other uses of _id?"," name = name.replace(/\\s+/, '-');",""," if (keys[name]) {"," name += (keys[name]++);"," } else {"," keys[name] = 1;"," }",""," return name;"," }",""," function process(cols, parent) {"," var columns = [],"," i, len, col, yuid;",""," for (i = 0, len = cols.length; i < len; ++i) {"," columns[i] = // chained assignment"," col = isString(cols[i]) ? { key: cols[i] } : copyObj(cols[i]);",""," yuid = Y.stamp(col);",""," // For backward compatibility"," if (!col.id) {"," // Implementers can shoot themselves in the foot by setting"," // this config property to a non-unique value"," col.id = yuid;"," }"," if (col.field) {"," // Field is now known as \"name\" to avoid confusion with data"," // fields or schema.resultFields"," col.name = col.field;"," }",""," if (parent) {"," col._parent = parent;"," } else {"," delete col._parent;"," }",""," // Unique id based on the column's configured name or key,"," // falling back to the yuid. Duplicates will have a counter"," // added to the end."," col._id = genId(col.name || col.key || col.id);",""," if (isArray(col.children)) {"," col.children = process(col.children, col);"," }"," }",""," return columns;"," }",""," return val && process(val);"," },",""," /**"," Relays attribute assignments of the deprecated `columnset` attribute to the"," `columns` attribute. If a Columnset is object is passed, its basic object"," structure is mined.",""," @method _setColumnset"," @param {Array|Columnset} val The columnset value to relay"," @deprecated This will be removed with the deprecated `columnset` attribute"," in a later version."," @protected"," @since 3.5.0"," **/"," _setColumnset: function (val) {"," this.set('columns', val);",""," return isArray(val) ? val : INVALID;"," },",""," /**"," Accepts an object with `each` and `getAttrs` (preferably a ModelList or"," subclass) or an array of data objects. If an array is passes, it will"," create a ModelList to wrap the data. In doing so, it will set the created"," ModelList's `model` property to the class in the `recordType` attribute,"," which will be defaulted if not yet set.",""," If the `data` property is already set with a ModelList, passing an array as"," the value will call the ModelList's `reset()` method with that array rather"," than replacing the stored ModelList wholesale.",""," Any non-ModelList-ish and non-array value is invalid.",""," @method _setData"," @protected"," @since 3.5.0"," **/"," _setData: function (val) {"," if (val === null) {"," val = [];"," }",""," if (isArray(val)) {"," this._initDataProperty();",""," // silent to prevent subscribers to both reset and dataChange"," // from reacting to the change twice."," // TODO: would it be better to return INVALID to silence the"," // dataChange event, or even allow both events?"," this.data.reset(val, { silent: true });",""," // Return the instance ModelList to avoid storing unprocessed"," // data in the state and their vivified Model representations in"," // the instance's data property. Decreases memory consumption."," val = this.data;"," } else if (!val || !val.each || !val.toJSON) {"," // ModelList/ArrayList duck typing"," val = INVALID;"," }",""," return val;"," },",""," /**"," Relays the value assigned to the deprecated `recordset` attribute to the"," `data` attribute. If a Recordset instance is passed, the raw object data"," will be culled from it.",""," @method _setRecordset"," @param {Object[]|Recordset} val The recordset value to relay"," @deprecated This will be removed with the deprecated `recordset` attribute"," in a later version."," @protected"," @since 3.5.0"," **/"," _setRecordset: function (val) {"," var data;",""," if (val && Y.Recordset && val instanceof Y.Recordset) {"," data = [];"," val.each(function (record) {"," data.push(record.get('data'));"," });"," val = data;"," }",""," this.set('data', val);",""," return val;"," },",""," /**"," Accepts a Base subclass (preferably a Model subclass). Alternately, it will"," generate a custom Model subclass from an array of attribute names or an"," object defining attributes and their respective configurations (it is"," assigned as the `ATTRS` of the new class).",""," Any other value is invalid.",""," @method _setRecordType"," @param {Function|String[]|Object} val The Model subclass, array of"," attribute names, or the `ATTRS` definition for a custom model"," subclass"," @return {Function} A Base/Model subclass"," @protected"," @since 3.5.0"," **/"," _setRecordType: function (val) {"," var modelClass;",""," // Duck type based on known/likely consumed APIs"," if (isFunction(val) && val.prototype.toJSON && val.prototype.setAttrs) {"," modelClass = val;"," } else if (isObject(val)) {"," modelClass = this._createRecordClass(val);"," }",""," return modelClass || INVALID;"," }","","});","","","}, '@VERSION@', {\"requires\": [\"escape\", \"model-list\", \"node-event-delegate\"]});"]; _yuitest_coverage["build/datatable-core/datatable-core.js"].lines = {"1":0,"11":0,"38":0,"40":0,"201":0,"232":0,"234":0,"239":0,"241":0,"244":0,"245":0,"248":0,"250":0,"251":0,"252":0,"254":0,"255":0,"258":0,"261":0,"279":0,"281":0,"282":0,"283":0,"287":0,"288":0,"292":0,"345":0,"358":0,"360":0,"362":0,"365":0,"378":0,"380":0,"382":0,"384":0,"385":0,"386":0,"388":0,"407":0,"409":0,"410":0,"412":0,"413":0,"415":0,"416":0,"419":0,"430":0,"449":0,"469":0,"487":0,"501":0,"505":0,"507":0,"509":0,"510":0,"513":0,"516":0,"527":0,"545":0,"549":0,"550":0,"553":0,"570":0,"572":0,"573":0,"575":0,"576":0,"578":0,"579":0,"584":0,"586":0,"587":0,"595":0,"608":0,"614":0,"620":0,"621":0,"624":0,"625":0,"626":0,"627":0,"630":0,"631":0,"635":0,"637":0,"639":0,"654":0,"656":0,"657":0,"659":0,"660":0,"661":0,"668":0,"669":0,"673":0,"675":0,"676":0,"681":0,"683":0,"705":0,"710":0,"711":0,"714":0,"715":0,"717":0,"718":0,"719":0,"721":0,"722":0,"723":0,"724":0,"726":0,"728":0,"733":0,"736":0,"739":0,"741":0,"742":0,"744":0,"747":0,"750":0,"751":0,"754":0,"755":0,"758":0,"761":0,"764":0,"766":0,"769":0,"772":0,"773":0,"775":0,"781":0,"783":0,"784":0,"788":0,"791":0,"807":0,"809":0,"830":0,"831":0,"834":0,"835":0,"841":0,"846":0,"847":0,"849":0,"852":0,"868":0,"870":0,"871":0,"872":0,"873":0,"875":0,"878":0,"880":0,"900":0,"903":0,"904":0,"905":0,"906":0,"909":0}; _yuitest_coverage["build/datatable-core/datatable-core.js"].functions = {"getColumn:231":0,"getRecord:278":0,"_afterColumnsChange:344":0,"_afterDataChange:357":0,"_afterRecordTypeChange:377":0,"_createRecordClass:406":0,"destructor:429":0,"_getColumns:445":0,"_getColumnset:468":0,"_getRecordType:480":0,"_initColumns:500":0,"_initCoreEvents:526":0,"_initData:544":0,"_initDataProperty:569":0,"initializer:607":0,"process:656":0,"_setColumnMap:653":0,"copyObj:710":0,"genId:736":0,"process:750":0,"_setColumns:704":0,"_setColumnset:806":0,"_setData:829":0,"(anonymous 2):872":0,"_setRecordset:867":0,"_setRecordType:899":0,"(anonymous 1):1":0}; _yuitest_coverage["build/datatable-core/datatable-core.js"].coveredLines = 162; _yuitest_coverage["build/datatable-core/datatable-core.js"].coveredFunctions = 27; _yuitest_coverline("build/datatable-core/datatable-core.js", 1); YUI.add('datatable-core', function (Y, NAME) { /** The core implementation of the `DataTable` and `DataTable.Base` Widgets. @module datatable @submodule datatable-core @since 3.5.0 **/ _yuitest_coverfunc("build/datatable-core/datatable-core.js", "(anonymous 1)", 1); _yuitest_coverline("build/datatable-core/datatable-core.js", 11); var INVALID = Y.Attribute.INVALID_VALUE, Lang = Y.Lang, isFunction = Lang.isFunction, isObject = Lang.isObject, isArray = Lang.isArray, isString = Lang.isString, isNumber = Lang.isNumber, toArray = Y.Array, keys = Y.Object.keys, Table; /** _API docs for this extension are included in the DataTable class._ Class extension providing the core API and structure for the DataTable Widget. Use this class extension with Widget or another Base-based superclass to create the basic DataTable model API and composing class structure. @class DataTable.Core @for DataTable @since 3.5.0 **/ _yuitest_coverline("build/datatable-core/datatable-core.js", 38); Table = Y.namespace('DataTable').Core = function () {}; _yuitest_coverline("build/datatable-core/datatable-core.js", 40); Table.ATTRS = { /** Columns to include in the rendered table. If omitted, the attributes on the configured `recordType` or the first item in the `data` collection will be used as a source. This attribute takes an array of strings or objects (mixing the two is fine). Each string or object is considered a column to be rendered. Strings are converted to objects, so `columns: ['first', 'last']` becomes `columns: [{ key: 'first' }, { key: 'last' }]`. DataTable.Core only concerns itself with a few properties of columns. These properties are: * `key` - Used to identify the record field/attribute containing content for this column. Also used to create a default Model if no `recordType` or `data` are provided during construction. If `name` is not specified, this is assigned to the `_id` property (with added incrementer if the key is used by multiple columns). * `children` - Traversed to initialize nested column objects * `name` - Used in place of, or in addition to, the `key`. Useful for columns that aren't bound to a field/attribute in the record data. This is assigned to the `_id` property. * `id` - For backward compatibility. Implementers can specify the id of the header cell. This should be avoided, if possible, to avoid the potential for creating DOM elements with duplicate IDs. * `field` - For backward compatibility. Implementers should use `name`. * `_id` - Assigned unique-within-this-instance id for a column. By order of preference, assumes the value of `name`, `key`, `id`, or `_yuid`. This is used by the rendering views as well as feature module as a means to identify a specific column without ambiguity (such as multiple columns using the same `key`. * `_yuid` - Guid stamp assigned to the column object. * `_parent` - Assigned to all child columns, referencing their parent column. @attribute columns @type {Object[]|String[]} @default (from `recordType` ATTRS or first item in the `data`) @since 3.5.0 **/ columns: { // TODO: change to setter to clone input array/objects validator: isArray, setter: '_setColumns', getter: '_getColumns' }, /** Model subclass to use as the `model` for the ModelList stored in the `data` attribute. If not provided, it will try really hard to figure out what to use. The following attempts will be made to set a default value: 1. If the `data` attribute is set with a ModelList instance and its `model` property is set, that will be used. 2. If the `data` attribute is set with a ModelList instance, and its `model` property is unset, but it is populated, the `ATTRS` of the `constructor of the first item will be used. 3. If the `data` attribute is set with a non-empty array, a Model subclass will be generated using the keys of the first item as its `ATTRS` (see the `_createRecordClass` method). 4. If the `columns` attribute is set, a Model subclass will be generated using the columns defined with a `key`. This is least desirable because columns can be duplicated or nested in a way that's not parsable. 5. If neither `data` nor `columns` is set or populated, a change event subscriber will listen for the first to be changed and try all over again. @attribute recordType @type {Function} @default (see description) @since 3.5.0 **/ recordType: { getter: '_getRecordType', setter: '_setRecordType' }, /** The collection of data records to display. This attribute is a pass through to a `data` property, which is a ModelList instance. If this attribute is passed a ModelList or subclass, it will be assigned to the property directly. If an array of objects is passed, a new ModelList will be created using the configured `recordType` as its `model` property and seeded with the array. Retrieving this attribute will return the ModelList stored in the `data` property. @attribute data @type {ModelList|Object[]} @default `new ModelList()` @since 3.5.0 **/ data: { valueFn: '_initData', setter : '_setData', lazyAdd: false }, /** Content for the `<table summary="ATTRIBUTE VALUE HERE">`. Values assigned to this attribute will be HTML escaped for security. @attribute summary @type {String} @default '' (empty string) @since 3.5.0 **/ //summary: {}, /** HTML content of an optional `<caption>` element to appear above the table. Leave this config unset or set to a falsy value to remove the caption. @attribute caption @type HTML @default '' (empty string) @since 3.5.0 **/ //caption: {}, /** Deprecated as of 3.5.0. Passes through to the `data` attribute. WARNING: `get('recordset')` will NOT return a Recordset instance as of 3.5.0. This is a break in backward compatibility. @attribute recordset @type {Object[]|Recordset} @deprecated Use the `data` attribute @since 3.5.0 **/ recordset: { setter: '_setRecordset', getter: '_getRecordset', lazyAdd: false }, /** Deprecated as of 3.5.0. Passes through to the `columns` attribute. WARNING: `get('columnset')` will NOT return a Columnset instance as of 3.5.0. This is a break in backward compatibility. @attribute columnset @type {Object[]} @deprecated Use the `columns` attribute @since 3.5.0 **/ columnset: { setter: '_setColumnset', getter: '_getColumnset', lazyAdd: false } }; _yuitest_coverline("build/datatable-core/datatable-core.js", 201); Y.mix(Table.prototype, { // -- Instance properties ------------------------------------------------- /** The ModelList that manages the table's data. @property data @type {ModelList} @default undefined (initially unset) @since 3.5.0 **/ //data: null, // -- Public methods ------------------------------------------------------ /** Gets the column configuration object for the given key, name, or index. For nested columns, `name` can be an array of indexes, each identifying the index of that column in the respective parent's "children" array. If you pass a column object, it will be returned. For columns with keys, you can also fetch the column with `instance.get('columns.foo')`. @method getColumn @param {String|Number|Number[]} name Key, "name", index, or index array to identify the column @return {Object} the column configuration object @since 3.5.0 **/ getColumn: function (name) { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "getColumn", 231); _yuitest_coverline("build/datatable-core/datatable-core.js", 232); var col, columns, i, len, cols; _yuitest_coverline("build/datatable-core/datatable-core.js", 234); if (isObject(name) && !isArray(name)) { // TODO: support getting a column from a DOM node - this will cross // the line into the View logic, so it should be relayed // Assume an object passed in is already a column def _yuitest_coverline("build/datatable-core/datatable-core.js", 239); col = name; } else { _yuitest_coverline("build/datatable-core/datatable-core.js", 241); col = this.get('columns.' + name); } _yuitest_coverline("build/datatable-core/datatable-core.js", 244); if (col) { _yuitest_coverline("build/datatable-core/datatable-core.js", 245); return col; } _yuitest_coverline("build/datatable-core/datatable-core.js", 248); columns = this.get('columns'); _yuitest_coverline("build/datatable-core/datatable-core.js", 250); if (isNumber(name) || isArray(name)) { _yuitest_coverline("build/datatable-core/datatable-core.js", 251); name = toArray(name); _yuitest_coverline("build/datatable-core/datatable-core.js", 252); cols = columns; _yuitest_coverline("build/datatable-core/datatable-core.js", 254); for (i = 0, len = name.length - 1; cols && i < len; ++i) { _yuitest_coverline("build/datatable-core/datatable-core.js", 255); cols = cols[name[i]] && cols[name[i]].children; } _yuitest_coverline("build/datatable-core/datatable-core.js", 258); return (cols && cols[name[i]]) || null; } _yuitest_coverline("build/datatable-core/datatable-core.js", 261); return null; }, /** Returns the Model associated to the record `id`, `clientId`, or index (not row index). If none of those yield a Model from the `data` ModelList, the arguments will be passed to the `view` instance's `getRecord` method if it has one. If no Model can be found, `null` is returned. @method getRecord @param {Number|String|Node} seed Record `id`, `clientId`, index, Node, or identifier for a row or child element @return {Model} @since 3.5.0 **/ getRecord: function (seed) { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "getRecord", 278); _yuitest_coverline("build/datatable-core/datatable-core.js", 279); var record = this.data.getById(seed) || this.data.getByClientId(seed); _yuitest_coverline("build/datatable-core/datatable-core.js", 281); if (!record) { _yuitest_coverline("build/datatable-core/datatable-core.js", 282); if (isNumber(seed)) { _yuitest_coverline("build/datatable-core/datatable-core.js", 283); record = this.data.item(seed); } // TODO: this should be split out to base somehow _yuitest_coverline("build/datatable-core/datatable-core.js", 287); if (!record && this.view && this.view.getRecord) { _yuitest_coverline("build/datatable-core/datatable-core.js", 288); record = this.view.getRecord.apply(this.view, arguments); } } _yuitest_coverline("build/datatable-core/datatable-core.js", 292); return record || null; }, // -- Protected and private properties and methods ------------------------ /** This tells `Y.Base` that it should create ad-hoc attributes for config properties passed to DataTable's constructor. This is useful for setting configurations on the DataTable that are intended for the rendering View(s). @property _allowAdHocAttrs @type Boolean @default true @protected @since 3.6.0 **/ _allowAdHocAttrs: true, /** A map of column key to column configuration objects parsed from the `columns` attribute. @property _columnMap @type {Object} @default undefined (initially unset) @protected @since 3.5.0 **/ //_columnMap: null, /** The Node instance of the table containing the data rows. This is set when the table is rendered. It may also be set by progressive enhancement, though this extension does not provide the logic to parse from source. @property _tableNode @type {Node} @default undefined (initially unset) @protected @since 3.5.0 **/ //_tableNode: null, /** Updates the `_columnMap` property in response to changes in the `columns` attribute. @method _afterColumnsChange @param {EventFacade} e The `columnsChange` event object @protected @since 3.5.0 **/ _afterColumnsChange: function (e) { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "_afterColumnsChange", 344); _yuitest_coverline("build/datatable-core/datatable-core.js", 345); this._setColumnMap(e.newVal); }, /** Updates the `modelList` attributes of the rendered views in response to the `data` attribute being assigned a new ModelList. @method _afterDataChange @param {EventFacade} e the `dataChange` event @protected @since 3.5.0 **/ _afterDataChange: function (e) { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "_afterDataChange", 357); _yuitest_coverline("build/datatable-core/datatable-core.js", 358); var modelList = e.newVal; _yuitest_coverline("build/datatable-core/datatable-core.js", 360); this.data = e.newVal; _yuitest_coverline("build/datatable-core/datatable-core.js", 362); if (!this.get('columns') && modelList.size()) { // TODO: this will cause a re-render twice because the Views are // subscribed to columnsChange _yuitest_coverline("build/datatable-core/datatable-core.js", 365); this._initColumns(); } }, /** Assigns to the new recordType as the model for the data ModelList @method _afterRecordTypeChange @param {EventFacade} e recordTypeChange event @protected @since 3.6.0 **/ _afterRecordTypeChange: function (e) { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "_afterRecordTypeChange", 377); _yuitest_coverline("build/datatable-core/datatable-core.js", 378); var data = this.data.toJSON(); _yuitest_coverline("build/datatable-core/datatable-core.js", 380); this.data.model = e.newVal; _yuitest_coverline("build/datatable-core/datatable-core.js", 382); this.data.reset(data); _yuitest_coverline("build/datatable-core/datatable-core.js", 384); if (!this.get('columns') && data) { _yuitest_coverline("build/datatable-core/datatable-core.js", 385); if (data.length) { _yuitest_coverline("build/datatable-core/datatable-core.js", 386); this._initColumns(); } else { _yuitest_coverline("build/datatable-core/datatable-core.js", 388); this.set('columns', keys(e.newVal.ATTRS)); } } }, /** Creates a Model subclass from an array of attribute names or an object of attribute definitions. This is used to generate a class suitable to represent the data passed to the `data` attribute if no `recordType` is set. @method _createRecordClass @param {String[]|Object} attrs Names assigned to the Model subclass's `ATTRS` or its entire `ATTRS` definition object @return {Model} @protected @since 3.5.0 **/ _createRecordClass: function (attrs) { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "_createRecordClass", 406); _yuitest_coverline("build/datatable-core/datatable-core.js", 407); var ATTRS, i, len; _yuitest_coverline("build/datatable-core/datatable-core.js", 409); if (isArray(attrs)) { _yuitest_coverline("build/datatable-core/datatable-core.js", 410); ATTRS = {}; _yuitest_coverline("build/datatable-core/datatable-core.js", 412); for (i = 0, len = attrs.length; i < len; ++i) { _yuitest_coverline("build/datatable-core/datatable-core.js", 413); ATTRS[attrs[i]] = {}; } } else {_yuitest_coverline("build/datatable-core/datatable-core.js", 415); if (isObject(attrs)) { _yuitest_coverline("build/datatable-core/datatable-core.js", 416); ATTRS = attrs; }} _yuitest_coverline("build/datatable-core/datatable-core.js", 419); return Y.Base.create('record', Y.Model, [], null, { ATTRS: ATTRS }); }, /** Tears down the instance. @method destructor @protected @since 3.6.0 **/ destructor: function () { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "destructor", 429); _yuitest_coverline("build/datatable-core/datatable-core.js", 430); new Y.EventHandle(Y.Object.values(this._eventHandles)).detach(); }, /** The getter for the `columns` attribute. Returns the array of column configuration objects if `instance.get('columns')` is called, or the specific column object if `instance.get('columns.columnKey')` is called. @method _getColumns @param {Object[]} columns The full array of column objects @param {String} name The attribute name requested (e.g. 'columns' or 'columns.foo'); @protected @since 3.5.0 **/ _getColumns: function (columns, name) { // Workaround for an attribute oddity (ticket #2529254) // getter is expected to return an object if get('columns.foo') is called. // Note 'columns.' is 8 characters _yuitest_coverfunc("build/datatable-core/datatable-core.js", "_getColumns", 445); _yuitest_coverline("build/datatable-core/datatable-core.js", 449); return name.length > 8 ? this._columnMap : columns; }, /** Relays the `get()` request for the deprecated `columnset` attribute to the `columns` attribute. THIS BREAKS BACKWARD COMPATIBILITY. 3.4.1 and prior implementations will expect a Columnset instance returned from `get('columnset')`. @method _getColumnset @param {Object} ignored The current value stored in the `columnset` state @param {String} name The attribute name requested (e.g. 'columnset' or 'columnset.foo'); @deprecated This will be removed with the `columnset` attribute in a future version. @protected @since 3.5.0 **/ _getColumnset: function (_, name) { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "_getColumnset", 468); _yuitest_coverline("build/datatable-core/datatable-core.js", 469); return this.get(name.replace(/^columnset/, 'columns')); }, /** Returns the Model class of the instance's `data` attribute ModelList. If not set, returns the explicitly configured value. @method _getRecordType @param {Model} val The currently configured value @return {Model} **/ _getRecordType: function (val) { // Prefer the value stored in the attribute because the attribute // change event defaultFn sets e.newVal = this.get('recordType') // before notifying the after() subs. But if this getter returns // this.data.model, then after() subs would get e.newVal === previous // model before _afterRecordTypeChange can set // this.data.model = e.newVal _yuitest_coverfunc("build/datatable-core/datatable-core.js", "_getRecordType", 480); _yuitest_coverline("build/datatable-core/datatable-core.js", 487); return val || (this.data && this.data.model); }, /** Initializes the `_columnMap` property from the configured `columns` attribute. If `columns` is not set, but there are records in the `data` ModelList, use `ATTRS` of that class. @method _initColumns @protected @since 3.5.0 **/ _initColumns: function () { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "_initColumns", 500); _yuitest_coverline("build/datatable-core/datatable-core.js", 501); var columns = this.get('columns') || [], item; // Default column definition from the configured recordType _yuitest_coverline("build/datatable-core/datatable-core.js", 505); if (!columns.length && this.data.size()) { // TODO: merge superclass attributes up to Model? _yuitest_coverline("build/datatable-core/datatable-core.js", 507); item = this.data.item(0); _yuitest_coverline("build/datatable-core/datatable-core.js", 509); if (item.toJSON) { _yuitest_coverline("build/datatable-core/datatable-core.js", 510); item = item.toJSON(); } _yuitest_coverline("build/datatable-core/datatable-core.js", 513); this.set('columns', keys(item)); } _yuitest_coverline("build/datatable-core/datatable-core.js", 516); this._setColumnMap(columns); }, /** Sets up the change event subscriptions to maintain internal state. @method _initCoreEvents @protected @since 3.6.0 **/ _initCoreEvents: function () { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "_initCoreEvents", 526); _yuitest_coverline("build/datatable-core/datatable-core.js", 527); this._eventHandles.coreAttrChanges = this.after({ columnsChange : Y.bind('_afterColumnsChange', this), recordTypeChange: Y.bind('_afterRecordTypeChange', this), dataChange : Y.bind('_afterDataChange', this) }); }, /** Defaults the `data` attribute to an empty ModelList if not set during construction. Uses the configured `recordType` for the ModelList's `model` proeprty if set. @method _initData @protected @return {ModelList} @since 3.6.0 **/ _initData: function () { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "_initData", 544); _yuitest_coverline("build/datatable-core/datatable-core.js", 545); var recordType = this.get('recordType'), // TODO: LazyModelList if recordType doesn't have complex ATTRS modelList = new Y.ModelList(); _yuitest_coverline("build/datatable-core/datatable-core.js", 549); if (recordType) { _yuitest_coverline("build/datatable-core/datatable-core.js", 550); modelList.model = recordType; } _yuitest_coverline("build/datatable-core/datatable-core.js", 553); return modelList; }, /** Initializes the instance's `data` property from the value of the `data` attribute. If the attribute value is a ModelList, it is assigned directly to `this.data`. If it is an array, a ModelList is created, its `model` property is set to the configured `recordType` class, and it is seeded with the array data. This ModelList is then assigned to `this.data`. @method _initDataProperty @param {Array|ModelList|ArrayList} data Collection of data to populate the DataTable @protected @since 3.6.0 **/ _initDataProperty: function (data) { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "_initDataProperty", 569); _yuitest_coverline("build/datatable-core/datatable-core.js", 570); var recordType; _yuitest_coverline("build/datatable-core/datatable-core.js", 572); if (!this.data) { _yuitest_coverline("build/datatable-core/datatable-core.js", 573); recordType = this.get('recordType'); _yuitest_coverline("build/datatable-core/datatable-core.js", 575); if (data && data.each && data.toJSON) { _yuitest_coverline("build/datatable-core/datatable-core.js", 576); this.data = data; _yuitest_coverline("build/datatable-core/datatable-core.js", 578); if (recordType) { _yuitest_coverline("build/datatable-core/datatable-core.js", 579); this.data.model = recordType; } } else { // TODO: customize the ModelList or read the ModelList class // from a configuration option? _yuitest_coverline("build/datatable-core/datatable-core.js", 584); this.data = new Y.ModelList(); _yuitest_coverline("build/datatable-core/datatable-core.js", 586); if (recordType) { _yuitest_coverline("build/datatable-core/datatable-core.js", 587); this.data.model = recordType; } } // TODO: Replace this with an event relay for specific events. // Using bubbling causes subscription conflicts with the models' // aggregated change event and 'change' events from DOM elements // inside the table (via Widget UI event). _yuitest_coverline("build/datatable-core/datatable-core.js", 595); this.data.addTarget(this); } }, /** Initializes the columns, `recordType` and data ModelList. @method initializer @param {Object} config Configuration object passed to constructor @protected @since 3.5.0 **/ initializer: function (config) { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "initializer", 607); _yuitest_coverline("build/datatable-core/datatable-core.js", 608); var data = config.data, columns = config.columns, recordType; // Referencing config.data to allow _setData to be more stringent // about its behavior _yuitest_coverline("build/datatable-core/datatable-core.js", 614); this._initDataProperty(data); // Default columns from recordType ATTRS if recordType is supplied at // construction. If no recordType is supplied, but the data is // supplied as a non-empty array, use the keys of the first item // as the columns. _yuitest_coverline("build/datatable-core/datatable-core.js", 620); if (!columns) { _yuitest_coverline("build/datatable-core/datatable-core.js", 621); recordType = (config.recordType || config.data === this.data) && this.get('recordType'); _yuitest_coverline("build/datatable-core/datatable-core.js", 624); if (recordType) { _yuitest_coverline("build/datatable-core/datatable-core.js", 625); columns = keys(recordType.ATTRS); } else {_yuitest_coverline("build/datatable-core/datatable-core.js", 626); if (isArray(data) && data.length) { _yuitest_coverline("build/datatable-core/datatable-core.js", 627); columns = keys(data[0]); }} _yuitest_coverline("build/datatable-core/datatable-core.js", 630); if (columns) { _yuitest_coverline("build/datatable-core/datatable-core.js", 631); this.set('columns', columns); } } _yuitest_coverline("build/datatable-core/datatable-core.js", 635); this._initColumns(); _yuitest_coverline("build/datatable-core/datatable-core.js", 637); this._eventHandles = {}; _yuitest_coverline("build/datatable-core/datatable-core.js", 639); this._initCoreEvents(); }, /** Iterates the array of column configurations to capture all columns with a `key` property. An map is built with column keys as the property name and the corresponding column object as the associated value. This map is then assigned to the instance's `_columnMap` property. @method _setColumnMap @param {Object[]|String[]} columns The array of column config objects @protected @since 3.6.0 **/ _setColumnMap: function (columns) { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "_setColumnMap", 653); _yuitest_coverline("build/datatable-core/datatable-core.js", 654); var map = {}; _yuitest_coverline("build/datatable-core/datatable-core.js", 656); function process(cols) { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "process", 656); _yuitest_coverline("build/datatable-core/datatable-core.js", 657); var i, len, col, key; _yuitest_coverline("build/datatable-core/datatable-core.js", 659); for (i = 0, len = cols.length; i < len; ++i) { _yuitest_coverline("build/datatable-core/datatable-core.js", 660); col = cols[i]; _yuitest_coverline("build/datatable-core/datatable-core.js", 661); key = col.key; // First in wins for multiple columns with the same key // because the first call to genId (in _setColumns) will // return the same key, which will then be overwritten by the // subsequent same-keyed column. So table.getColumn(key) would // return the last same-keyed column. _yuitest_coverline("build/datatable-core/datatable-core.js", 668); if (key && !map[key]) { _yuitest_coverline("build/datatable-core/datatable-core.js", 669); map[key] = col; } //TODO: named columns can conflict with keyed columns _yuitest_coverline("build/datatable-core/datatable-core.js", 673); map[col._id] = col; _yuitest_coverline("build/datatable-core/datatable-core.js", 675); if (col.children) { _yuitest_coverline("build/datatable-core/datatable-core.js", 676); process(col.children); } } } _yuitest_coverline("build/datatable-core/datatable-core.js", 681); process(columns); _yuitest_coverline("build/datatable-core/datatable-core.js", 683); this._columnMap = map; }, /** Translates string columns into objects with that string as the value of its `key` property. All columns are assigned a `_yuid` stamp and `_id` property corresponding to the column's configured `name` or `key` property with any spaces replaced with dashes. If the same `name` or `key` appears in multiple columns, subsequent appearances will have their `_id` appended with an incrementing number (e.g. if column "foo" is included in the `columns` attribute twice, the first will get `_id` of "foo", and the second an `_id` of "foo1"). Columns that are children of other columns will have the `_parent` property added, assigned the column object to which they belong. @method _setColumns @param {null|Object[]|String[]} val Array of config objects or strings @return {null|Object[]} @protected **/ _setColumns: function (val) { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "_setColumns", 704); _yuitest_coverline("build/datatable-core/datatable-core.js", 705); var keys = {}, known = [], knownCopies = [], arrayIndex = Y.Array.indexOf; _yuitest_coverline("build/datatable-core/datatable-core.js", 710); function copyObj(o) { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "copyObj", 710); _yuitest_coverline("build/datatable-core/datatable-core.js", 711); var copy = {}, key, val, i; _yuitest_coverline("build/datatable-core/datatable-core.js", 714); known.push(o); _yuitest_coverline("build/datatable-core/datatable-core.js", 715); knownCopies.push(copy); _yuitest_coverline("build/datatable-core/datatable-core.js", 717); for (key in o) { _yuitest_coverline("build/datatable-core/datatable-core.js", 718); if (o.hasOwnProperty(key)) { _yuitest_coverline("build/datatable-core/datatable-core.js", 719); val = o[key]; _yuitest_coverline("build/datatable-core/datatable-core.js", 721); if (isArray(val)) { _yuitest_coverline("build/datatable-core/datatable-core.js", 722); copy[key] = val.slice(); } else {_yuitest_coverline("build/datatable-core/datatable-core.js", 723); if (isObject(val, true)) { _yuitest_coverline("build/datatable-core/datatable-core.js", 724); i = arrayIndex(val, known); _yuitest_coverline("build/datatable-core/datatable-core.js", 726); copy[key] = i === -1 ? copyObj(val) : knownCopies[i]; } else { _yuitest_coverline("build/datatable-core/datatable-core.js", 728); copy[key] = o[key]; }} } } _yuitest_coverline("build/datatable-core/datatable-core.js", 733); return copy; } _yuitest_coverline("build/datatable-core/datatable-core.js", 736); function genId(name) { // Sanitize the name for use in generated CSS classes. // TODO: is there more to do for other uses of _id? _yuitest_coverfunc("build/datatable-core/datatable-core.js", "genId", 736); _yuitest_coverline("build/datatable-core/datatable-core.js", 739); name = name.replace(/\s+/, '-'); _yuitest_coverline("build/datatable-core/datatable-core.js", 741); if (keys[name]) { _yuitest_coverline("build/datatable-core/datatable-core.js", 742); name += (keys[name]++); } else { _yuitest_coverline("build/datatable-core/datatable-core.js", 744); keys[name] = 1; } _yuitest_coverline("build/datatable-core/datatable-core.js", 747); return name; } _yuitest_coverline("build/datatable-core/datatable-core.js", 750); function process(cols, parent) { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "process", 750); _yuitest_coverline("build/datatable-core/datatable-core.js", 751); var columns = [], i, len, col, yuid; _yuitest_coverline("build/datatable-core/datatable-core.js", 754); for (i = 0, len = cols.length; i < len; ++i) { _yuitest_coverline("build/datatable-core/datatable-core.js", 755); columns[i] = // chained assignment col = isString(cols[i]) ? { key: cols[i] } : copyObj(cols[i]); _yuitest_coverline("build/datatable-core/datatable-core.js", 758); yuid = Y.stamp(col); // For backward compatibility _yuitest_coverline("build/datatable-core/datatable-core.js", 761); if (!col.id) { // Implementers can shoot themselves in the foot by setting // this config property to a non-unique value _yuitest_coverline("build/datatable-core/datatable-core.js", 764); col.id = yuid; } _yuitest_coverline("build/datatable-core/datatable-core.js", 766); if (col.field) { // Field is now known as "name" to avoid confusion with data // fields or schema.resultFields _yuitest_coverline("build/datatable-core/datatable-core.js", 769); col.name = col.field; } _yuitest_coverline("build/datatable-core/datatable-core.js", 772); if (parent) { _yuitest_coverline("build/datatable-core/datatable-core.js", 773); col._parent = parent; } else { _yuitest_coverline("build/datatable-core/datatable-core.js", 775); delete col._parent; } // Unique id based on the column's configured name or key, // falling back to the yuid. Duplicates will have a counter // added to the end. _yuitest_coverline("build/datatable-core/datatable-core.js", 781); col._id = genId(col.name || col.key || col.id); _yuitest_coverline("build/datatable-core/datatable-core.js", 783); if (isArray(col.children)) { _yuitest_coverline("build/datatable-core/datatable-core.js", 784); col.children = process(col.children, col); } } _yuitest_coverline("build/datatable-core/datatable-core.js", 788); return columns; } _yuitest_coverline("build/datatable-core/datatable-core.js", 791); return val && process(val); }, /** Relays attribute assignments of the deprecated `columnset` attribute to the `columns` attribute. If a Columnset is object is passed, its basic object structure is mined. @method _setColumnset @param {Array|Columnset} val The columnset value to relay @deprecated This will be removed with the deprecated `columnset` attribute in a later version. @protected @since 3.5.0 **/ _setColumnset: function (val) { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "_setColumnset", 806); _yuitest_coverline("build/datatable-core/datatable-core.js", 807); this.set('columns', val); _yuitest_coverline("build/datatable-core/datatable-core.js", 809); return isArray(val) ? val : INVALID; }, /** Accepts an object with `each` and `getAttrs` (preferably a ModelList or subclass) or an array of data objects. If an array is passes, it will create a ModelList to wrap the data. In doing so, it will set the created ModelList's `model` property to the class in the `recordType` attribute, which will be defaulted if not yet set. If the `data` property is already set with a ModelList, passing an array as the value will call the ModelList's `reset()` method with that array rather than replacing the stored ModelList wholesale. Any non-ModelList-ish and non-array value is invalid. @method _setData @protected @since 3.5.0 **/ _setData: function (val) { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "_setData", 829); _yuitest_coverline("build/datatable-core/datatable-core.js", 830); if (val === null) { _yuitest_coverline("build/datatable-core/datatable-core.js", 831); val = []; } _yuitest_coverline("build/datatable-core/datatable-core.js", 834); if (isArray(val)) { _yuitest_coverline("build/datatable-core/datatable-core.js", 835); this._initDataProperty(); // silent to prevent subscribers to both reset and dataChange // from reacting to the change twice. // TODO: would it be better to return INVALID to silence the // dataChange event, or even allow both events? _yuitest_coverline("build/datatable-core/datatable-core.js", 841); this.data.reset(val, { silent: true }); // Return the instance ModelList to avoid storing unprocessed // data in the state and their vivified Model representations in // the instance's data property. Decreases memory consumption. _yuitest_coverline("build/datatable-core/datatable-core.js", 846); val = this.data; } else {_yuitest_coverline("build/datatable-core/datatable-core.js", 847); if (!val || !val.each || !val.toJSON) { // ModelList/ArrayList duck typing _yuitest_coverline("build/datatable-core/datatable-core.js", 849); val = INVALID; }} _yuitest_coverline("build/datatable-core/datatable-core.js", 852); return val; }, /** Relays the value assigned to the deprecated `recordset` attribute to the `data` attribute. If a Recordset instance is passed, the raw object data will be culled from it. @method _setRecordset @param {Object[]|Recordset} val The recordset value to relay @deprecated This will be removed with the deprecated `recordset` attribute in a later version. @protected @since 3.5.0 **/ _setRecordset: function (val) { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "_setRecordset", 867); _yuitest_coverline("build/datatable-core/datatable-core.js", 868); var data; _yuitest_coverline("build/datatable-core/datatable-core.js", 870); if (val && Y.Recordset && val instanceof Y.Recordset) { _yuitest_coverline("build/datatable-core/datatable-core.js", 871); data = []; _yuitest_coverline("build/datatable-core/datatable-core.js", 872); val.each(function (record) { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "(anonymous 2)", 872); _yuitest_coverline("build/datatable-core/datatable-core.js", 873); data.push(record.get('data')); }); _yuitest_coverline("build/datatable-core/datatable-core.js", 875); val = data; } _yuitest_coverline("build/datatable-core/datatable-core.js", 878); this.set('data', val); _yuitest_coverline("build/datatable-core/datatable-core.js", 880); return val; }, /** Accepts a Base subclass (preferably a Model subclass). Alternately, it will generate a custom Model subclass from an array of attribute names or an object defining attributes and their respective configurations (it is assigned as the `ATTRS` of the new class). Any other value is invalid. @method _setRecordType @param {Function|String[]|Object} val The Model subclass, array of attribute names, or the `ATTRS` definition for a custom model subclass @return {Function} A Base/Model subclass @protected @since 3.5.0 **/ _setRecordType: function (val) { _yuitest_coverfunc("build/datatable-core/datatable-core.js", "_setRecordType", 899); _yuitest_coverline("build/datatable-core/datatable-core.js", 900); var modelClass; // Duck type based on known/likely consumed APIs _yuitest_coverline("build/datatable-core/datatable-core.js", 903); if (isFunction(val) && val.prototype.toJSON && val.prototype.setAttrs) { _yuitest_coverline("build/datatable-core/datatable-core.js", 904); modelClass = val; } else {_yuitest_coverline("build/datatable-core/datatable-core.js", 905); if (isObject(val)) { _yuitest_coverline("build/datatable-core/datatable-core.js", 906); modelClass = this._createRecordClass(val); }} _yuitest_coverline("build/datatable-core/datatable-core.js", 909); return modelClass || INVALID; } }); }, '@VERSION@', {"requires": ["escape", "model-list", "node-event-delegate"]});
resources/public/js/jquery.min.js
clojurecup2014/yak
/*! 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});
packages/cp-frontend/test/unit/components/messaging/error.js
yldio/copilot
/** * @jest-environment jsdom */ import React from 'react'; import renderer from 'react-test-renderer'; import 'jest-styled-components'; import Error from '@components/messaging/error'; it('renders <Error /> without throwing', () => { const tree = renderer.create(<Error />).toJSON(); expect(tree).toMatchSnapshot(); });
_site/scripts/vendor/jquery-1.11.0.min.js
danielevora/danielevora.com
/*! jQuery v1.11.0 | (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="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,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=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.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},n.extend=n.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||n.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&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return 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"!==n.type(a)||a.nodeType||n.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(l.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&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},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=s(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:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.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=s(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),n.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||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=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{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(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 mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(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=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?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!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.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},z=b?function(a,b){if(a===b)return j=!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===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.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=db.selectors={cacheLength:50,createPseudo:fb,match:V,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(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===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]||db.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]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(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(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.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(),t=!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&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&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]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)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&&(t&&((l[s]||(l[s]={}))[a]=[u,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()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(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:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?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===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.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 X.test(a.nodeName)},input:function(a){return W.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:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(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]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[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?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;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=[u,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[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(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 sb(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 tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(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?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.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]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(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}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(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&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.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){n.each(b,function(b,c){var d=n.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&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.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},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.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?n.extend(a,d):d}},e={};return d.pipe=d.then,n.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&&n.isFunction(a.promise)?e:0,g=1===f?a:n.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]&&n.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 I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.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()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f }}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.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=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.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 n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.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=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(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},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.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?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.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]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.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||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.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)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.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=((n.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?n(c,this).index(i)>=0:n.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[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),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||z,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!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.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]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._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 n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.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=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.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,n(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=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={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:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._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++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.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)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.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),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).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=xb(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=xb(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?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.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 n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(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,n.cleanData(vb(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,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.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+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.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 Mb(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=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.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 Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.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 Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(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+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.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=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.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=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b) },a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,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||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.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):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.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,n.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 gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.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=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.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],bc.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]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.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 lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),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:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.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(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.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)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._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=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.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)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.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})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.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=z.createElement("div");e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.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||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.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}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.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 n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={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}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.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||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.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=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.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(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.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(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._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(vc," ").indexOf(b)>=0)return!0;return!1}}),n.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){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.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 wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.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||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.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 Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.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 Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(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 Qc(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}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,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":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.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=Dc.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||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.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]?", "+Kc+"; 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=Nc(Jc,k,b,v)){v.readyState=1,h&&m.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=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.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&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(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(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;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 Yc[g],b=void 0,f.onreadystatechange=n.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=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.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 ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.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,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.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,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(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"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.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?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n});
app/index.js
wujysh/Lepton
'use strict' import fs from 'fs' import { remote, ipcRenderer } from 'electron' import React from 'react' import ReactDom from 'react-dom' import { Provider } from 'react-redux' import { createStore, applyMiddleware } from 'redux' import thunk from 'redux-thunk' import './utilities/vendor/bootstrap/css/bootstrap.css' import AppContainer from './containers/appContainer' import HumanReadableTime from 'human-readable-time' import ImageDownloader from 'image-downloader' import SearchIndex from './utilities/search' import { addLangPrefix as Prefixed, parseCustomTags, descriptionParser } from './utilities/parser' let Account = null try { Account = require('../configs/account') } catch (e) { if (e.code !== 'MODULE_NOT_FOUND') throw e Account = require('../configs/accountDummy') } import { getGitHubApi, GET_ALL_GISTS, GET_USER_PROFILE, EXCHANGE_ACCESS_TOKEN } from './utilities/githubApi' import RootReducer from './reducers' import { updateGists, updateSyncTime, updateGistTags, selectGistTag, updateAccessToken, updateUserSession, fetchSingleGist, selectGist, updateAuthWindowStatus, updateGistSyncStatus, updateSearchWindowStatus, updateUpdateAvailableBarStatus, updateNewVersionInfo, updateImmersiveModeStatus } from './actions/index' import Notifier from './utilities/notifier' const logger = remote.getGlobal('logger') const CONFIG_OPTIONS = { client_id: Account.client_id, client_secret: Account.client_secret, scopes: ['gist'] } let preSyncSnapshot = { activeGistTag: null, activeGist: null } function launchAuthWindow (accessToken) { if (accessToken) { initUserSession(accessToken) return } let authWindow = new remote.BrowserWindow({ parent: remote.getGlobal('mainWindow'), width: 400, height: 600, show: false }) let githubUrl = 'https://github.com/login/oauth/authorize?' let authUrl = githubUrl + 'client_id=' + CONFIG_OPTIONS.client_id + '&scope=' + CONFIG_OPTIONS.scopes authWindow.loadURL(authUrl) authWindow.show() updateAuthWindowStatusOn() function handleCallback (url) { let rawCode = /code=([^&]*)/.exec(url) || null let code = (rawCode && rawCode.length > 1) ? rawCode[1] : null let error = /\?error=(.+)$/.exec(url) if (code || error) { // Close the browser if code found or error authWindow.webContents.session.clearStorageData([], () => {}) authWindow.destroy() updateAuthWindowStatusOff() } // If there is a code, proceed to get token from github if (code) { logger.info('[Dispatch] updateUserSession IN_PROGRESS') reduxStore.dispatch(updateUserSession({ activeStatus: 'IN_PROGRESS' })) let accessTokenPromise = getGitHubApi(EXCHANGE_ACCESS_TOKEN)( CONFIG_OPTIONS.client_id, CONFIG_OPTIONS.client_secret, code) accessTokenPromise.then((response) => { let accessToken = response.access_token initUserSession(accessToken) }).catch((err) => { logger.error('Failed: ' + JSON.stringify(err.error)) Notifier('Sync failed', 'Please check your network condition.') }) } else if (error) { alert('Oops! Something went wrong and we couldn\'t' + 'log you in using Github. Please try again.') } } // Handle the response from GitHub - See Update from 4/12/2015 authWindow.webContents.on('will-navigate', function (event, url) { handleCallback(url) }) authWindow.webContents.on('did-get-redirect-request', function (event, oldUrl, newUrl) { handleCallback(newUrl) }) // Reset the authWindow on close authWindow.on('close', function () { updateAuthWindowStatusOff() authWindow = null }, false) } function setSyncTime (time) { logger.info('[Dispatch] updateSyncTime') reduxStore.dispatch(updateSyncTime(time)) } function initAccessToken (token) { logger.info('[Dispatch] updateAccessToken') reduxStore.dispatch(updateAccessToken(token)) } function updateAuthWindowStatusOn () { logger.info('[Dispatch] updateAuthWindowStatus ON') reduxStore.dispatch(updateAuthWindowStatus('ON')) } function updateAuthWindowStatusOff () { logger.info('[Dispatch] updateAuthWindowStatus OFF') reduxStore.dispatch(updateAuthWindowStatus('OFF')) } /** Start: Language tags management **/ function updateGistTagsAfterSync (gistTags) { logger.info('[Dispatch] updateGistTags') reduxStore.dispatch(updateGistTags(gistTags)) } /** End: Language tags management **/ /** Start: Acitive language tag management **/ function getEffectiveActiveGistTagAfterSync (gistTags, newActiveTag) { // The active language tag could be invalid if the specific language tag no // long exists after synchronization. However, if it is still valid, we should // keep it. if (!gistTags || !gistTags[preSyncSnapshot.activeGistTag]) { return newActiveTag } return preSyncSnapshot.activeGistTag } function updateActiveGistTagAfterSync (gistTags, newActiveTagCandidate) { // The active language tag could be invalid if the specific language tag no // long exists after synchronization. We should get the effective active tag // by calling getEffectiveActiveGistTagAfterSync() let effectiveGistTag = getEffectiveActiveGistTagAfterSync(gistTags, newActiveTagCandidate) if (effectiveGistTag !== preSyncSnapshot.activeGistTag) { logger.info('[Dispatch] selectGistTag') reduxStore.dispatch(selectGistTag(newActiveTagCandidate)) } } /** End: Acitive language tag management **/ /** Start: Acitive gist management **/ function updateActiveGistBase (gists, activeGist) { if (!gists || !activeGist) { // user has no gists return } if (!gists[activeGist].details) { logger.info('[Dispatch] fetchSingleGist ' + activeGist) reduxStore.dispatch(fetchSingleGist(gists[activeGist], activeGist)) } logger.info('[Dispatch] selectGist ' + activeGist) reduxStore.dispatch(selectGist(activeGist)) } function updateActiveGistAfterSync (gists, gistTags, newActiveTagCandidate) { let activeGist = preSyncSnapshot.activeGist if (!activeGist || !gists[activeGist]) { // If the previous active gist is not set or is deleted, we should reset it. let effectiveGistTag = getEffectiveActiveGistTagAfterSync(gistTags, newActiveTagCandidate) let gistListForActiveGistTag = gistTags[effectiveGistTag] activeGist = gistListForActiveGistTag[0] // reset the active gist } updateActiveGistBase(gists, activeGist) } function updateActiveGistAfterClicked (gists, gistTags, newActiveTag) { let gistListForActiveGistTag = gistTags[newActiveTag] let activeGist = gistListForActiveGistTag[0] // reset the active gist updateActiveGistBase(gists, activeGist) } /** End: Acitive gist management **/ /** Start: User gists management **/ function updateGistStoreAfterSync (gists) { logger.info('[Dispatch] updateGists') reduxStore.dispatch(updateGists(gists)) } function takeSyncSnapshot () { let state = reduxStore.getState() preSyncSnapshot = { activeGistTag: state.activeGistTag, activeGist: state.activeGist } } function clearSyncSnapshot () { preSyncSnapshot = { activeGistTag: Prefixed('All'), activeGist: null } } function reSyncUserGists () { let { userSession, accessToken } = reduxStore.getState() updateUserGists(userSession.profile.login, accessToken) } function updateUserGists (userLoginId, accessToken) { reduxStore.dispatch(updateGistSyncStatus('IN_PROGRESS')) return getGitHubApi(GET_ALL_GISTS)(accessToken, userLoginId) .then((gistList) => { let preGists = reduxStore.getState().gists let gists = {} let rawGistTags = {} let activeTagCandidate = Prefixed('All') rawGistTags[Prefixed('All')] = new Set() let gistTags = {} let fuseSearchIndex = [] gistList.forEach((gist) => { let langs = new Set() Object.keys(gist.files).forEach(filename => { let file = gist.files[filename] let language = file.language || 'Other' langs.add(language) rawGistTags[Prefixed('All')].add(gist.id) // update the language tags let prefixedLang = Prefixed(language) if (rawGistTags.hasOwnProperty(prefixedLang)) { rawGistTags[prefixedLang].add(gist.id) } else { rawGistTags[prefixedLang] = new Set() rawGistTags[prefixedLang].add(gist.id) } // update the custom tags let customTags = parseCustomTags(descriptionParser(gist.description).customTags) customTags.forEach(tag => { if (rawGistTags.hasOwnProperty(tag)) { rawGistTags[tag].add(gist.id) } else { rawGistTags[tag] = new Set() rawGistTags[tag].add(gist.id) } }) }) gists[gist.id] = { langs: langs, brief: gist, details: null } // Keep the date for the unchanged gist, so that user doesn't need // to resync. let preGist = preGists[gist.id] if (preGist && preGist.details && preGist.details.updated_at === gist.updated_at) { gists[gist.id] = Object.assign(gists[gist.id], { details: preGist.details }) } let langSearchRecords = '' langs.forEach(lang => { langSearchRecords += ',' + lang }) // Update the SearchIndex fuseSearchIndex.push({ id: gist.id, description: gist.description, language: langSearchRecords }) }) // gistList.forEach SearchIndex.resetFuseIndex(fuseSearchIndex) for (let language in rawGistTags) { // Save the gist ids in an Array rather than a Set, which facilitate // many operations later, like displaying the gist id from an Array gistTags[language] = [...rawGistTags[language]] } // take the state snapshot at this moment takeSyncSnapshot() // refresh the redux state let humanReadableSyncTime = HumanReadableTime(new Date()) setSyncTime(humanReadableSyncTime) updateGistStoreAfterSync(gists) updateGistTagsAfterSync(gistTags) updateActiveGistTagAfterSync(gistTags, activeTagCandidate) updateActiveGistAfterSync(gists, gistTags, activeTagCandidate) // clean up the snapshot for the previous state clearSyncSnapshot() Notifier('Sync succeeds', humanReadableSyncTime) }) .catch(err => { Notifier('Sync failed', 'Please check your network condition.') logger.error('The request has failed: ' + err) }) .finally(() => { reduxStore.dispatch(updateGistSyncStatus('DONE')) }) } /** End: User gists management **/ /** Start: User session management **/ function initUserSession (accessToken) { logger.info('[Dispatch] updateUserSession IN_PROGRESS') reduxStore.dispatch(updateUserSession({ activeStatus: 'IN_PROGRESS' })) initAccessToken(accessToken) getGitHubApi(GET_USER_PROFILE)(accessToken) .then((profile) => { updateUserGists(profile.login, accessToken).then(() => { logger.info('[Dispatch] updateUserSession ACTIVE') reduxStore.dispatch(updateUserSession({ activeStatus: 'ACTIVE', profile: profile })) updateLocalStorage({ token: accessToken, profile: profile.login, image: profile.avatar_url }) }) }) .catch((err) => { logger.error('The request has failed: \n' + JSON.stringify(err)) if (err.statusCode === 401) { logger.info('[Dispatch] updateUserSession EXPIRED') reduxStore.dispatch(updateUserSession({ activeStatus: 'EXPIRED' })) } else { logger.info('[Dispatch] updateUserSession INACTIVE') reduxStore.dispatch(updateUserSession({ activeStatus: 'INACTIVE' })) } Notifier('Sync failed', 'Please check your network condition.') }) } /** End: User session management **/ /** Start: Local storage management **/ function updateLocalStorage (localData) { localStorage.setItem('token', localData.token) localStorage.setItem('profile', localData.profile) downloadImage(localData.image, localData.profile) } function downloadImage (imageUrl, filename) { if (!imageUrl) return const userProfilePath = (remote.app).getPath('userData') + '/profile/' if (!fs.existsSync(userProfilePath)) { fs.mkdirSync(userProfilePath) } let imagePath = userProfilePath + filename + '.png' ImageDownloader({ url: imageUrl, dest: imagePath, done: function (err, filename, image) { if (err) logger.error(err) localStorage.setItem('image', imagePath) }, }) } function getLoggedInUserInfo () { let loggedInUserProfile = localStorage.getItem('profile') let loggedInUserToken = localStorage.getItem('token') logger.info('Found user profile ' + loggedInUserProfile) if (loggedInUserProfile && loggedInUserToken) { return { token: loggedInUserToken, profile: loggedInUserProfile, image: localStorage.getItem('image') } } return null } /** End: Local storage management **/ /** Start: Response to main process events **/ function allDialogsClosed (dialogs) { let status = true dialogs.forEach(dialog => { if (dialog !== 'OFF') status = false }) return status } ipcRenderer.on('search-gist', data => { const state = reduxStore.getState() const { immersiveMode, gistRawModal, searchWindowStatus, gistEditModalStatus, gistNewModalStatus, gistDeleteModalStatus, logoutModalStatus } = state const dialogs = [ immersiveMode, gistRawModal.status, gistEditModalStatus, gistNewModalStatus, gistDeleteModalStatus, logoutModalStatus ] if (allDialogsClosed(dialogs)) { const preStatus = searchWindowStatus const newStatus = preStatus === 'ON' ? 'OFF' : 'ON' reduxStore.dispatch(updateSearchWindowStatus(newStatus)) } }) ipcRenderer.on('new-gist', data => { const state = reduxStore.getState() const { immersiveMode, gistRawModal, searchWindowStatus, gistEditModalStatus, gistDeleteModalStatus, logoutModalStatus } = state const dialogs = [ immersiveMode, gistRawModal.status, searchWindowStatus, gistEditModalStatus, gistDeleteModalStatus, logoutModalStatus ] if (allDialogsClosed(dialogs)) { ipcRenderer.emit('new-gist-renderer') } }) ipcRenderer.on('edit-gist', data => { const state = reduxStore.getState() const { immersiveMode, gistRawModal, searchWindowStatus, gistNewModalStatus, gistDeleteModalStatus, logoutModalStatus } = state const dialogs = [ gistRawModal.status, gistNewModalStatus, searchWindowStatus, gistDeleteModalStatus, logoutModalStatus ] if (allDialogsClosed(dialogs)) { ipcRenderer.emit('edit-gist-renderer') } }) ipcRenderer.on('immersive-mode', data => { const state = reduxStore.getState() const { searchWindowStatus, immersiveMode, gistRawModal, gistEditModalStatus, gistNewModalStatus, gistDeleteModalStatus, logoutModalStatus } = state const dialogs = [ searchWindowStatus, gistRawModal.status, gistEditModalStatus, gistNewModalStatus, gistDeleteModalStatus, logoutModalStatus ] if (allDialogsClosed(dialogs)) { const preStatus = immersiveMode const newStatus = preStatus === 'ON' ? 'OFF' : 'ON' reduxStore.dispatch(updateImmersiveModeStatus(newStatus)) } }) ipcRenderer.on('exit-immersive-mode', data => { const state = reduxStore.getState() const { gistRawModal, gistEditModalStatus } = state const dialogs = [gistRawModal.status, gistEditModalStatus] if (allDialogsClosed(dialogs)) { reduxStore.dispatch(updateImmersiveModeStatus('OFF')) } }) ipcRenderer.on('update-available', payload => { const newVersionInfo = remote.getGlobal('newVersionInfo') if (localStorage.getItem('skipped-version') === newVersionInfo.version) return reduxStore.dispatch(updateNewVersionInfo(newVersionInfo)) reduxStore.dispatch(updateUpdateAvailableBarStatus('ON')) }) /** End: Response to main process events **/ // Start const reduxStore = createStore( RootReducer, applyMiddleware(thunk) ) ReactDom.render( <Provider store={ reduxStore }> <AppContainer searchIndex = { SearchIndex } updateLocalStorage = { updateLocalStorage } getLoggedInUserInfo = { getLoggedInUserInfo } launchAuthWindow = { launchAuthWindow } reSyncUserGists = { reSyncUserGists } updateActiveGistAfterClicked = { updateActiveGistAfterClicked } /> </Provider>, document.getElementById('container') )
src/components/ContestPreview.js
jsize8/learn-fullstack-javascript
import React, { Component } from 'react'; class ContestPreview extends Component { handleClick = () => { this.props.onClick(this.props.id) }; render() { return( <div className="link ContestPreview" onClick={this.handleClick}> <div className="category-name"> {this.props.categoryName} </div> <div className="contest-name"> {this.props.contestName} </div> </div> ); } } ContestPreview.PropTypes = { id: React.PropTypes.number.isRequired, categoryName: React.PropTypes.string.isRequired, contestName: React.PropTypes.string.isRequired, onClick: React.PropTypes.func.isRequired, } export default ContestPreview;