code
stringlengths
2
1.05M
!function(a){var b=document.body.clientWidth,c=document.body.clientHeight;$(a).resize(function(){b=document.body.clientWidth,c=document.body.clientHeight}),$(".nav-toggle-menu").click(function(a){a.preventDefault(),$(this).toggleClass("active"),$(".nav").toggleClass("active")}),$(".nav-toggle-search").click(function(a){a.preventDefault(),$(this).toggleClass("active"),$(".header .search-form").toggleClass("active")}),$(".button-group").find("a").click(function(a){a.preventDefault(),$(this).toggleClass("active")})}(this);
self.onmessage = function() { function test(method, args) { try { var request = self.webkitIndexedDB[method].call(self.webkitIndexedDB, args); return 'Successfully called self.webkitIndexedDB.' + method + '().<br>'; } catch (exception) { return 'self.webkitIndexedDB.' + method + '() threw an exception: ' + exception.name + '<br>'; } } self.postMessage({ 'result': [ test('deleteDatabase', 'testDBName'), test('open', 'testDBName'), test('webkitGetDatabaseNames') ] }); };
/** * @license Highcharts JS v7.1.3 (2019-08-14) * @module highcharts/modules/xrange * @requires highcharts * * X-range series * * (c) 2010-2019 Torstein Honsi, Lars A. V. Cabrera * * License: www.highcharts.com/license */ 'use strict'; import '../../modules/xrange.src.js';
var _ = require('underscore'); module.exports = _.min([3,2,1,4,5]);
export default { // Options.jsx items_per_page: '/ pagina', jump_to: 'vai a', page: '', // Pagination.jsx prev_page: 'Pagina precedente', next_page: 'Pagina successiva', prev_5: 'Precedente 5 pagine', next_5: 'Prossime 5 pagine', prev_3: 'Precedente 3 pagine', next_3: 'Prossime 3 pagine' };
var Sequelize = require('sequelize'); var config = require('../config/environment'); var User, Event, Observation; var init = function() { var orm; // Use different parameters for initializing the Sequelize instance depending on environment if (config.postgres.uri) { // The production environment should have a DATABASE_URL environment variable, which includes a URL // with username, password, host, port, and database. The URL will be set in config/environment/production.js. orm = new Sequelize(config.postgres.uri, config.postgres.options); } else { // The development environment will not use a URL, and each config parameter // will be set in config/environment/development.js orm = new Sequelize(config.postgres.database, config.postgres.user, config.postgres.password, config.postgres.options); } User = orm.define('User', { username: Sequelize.STRING, facebook_id: Sequelize.STRING }); Event = orm.define('Event', { name: Sequelize.STRING, start: Sequelize.DATE, end: Sequelize.DATE, location: Sequelize.STRING, description: Sequelize.TEXT, minParticipants: Sequelize.INTEGER, maxParticipants: Sequelize.INTEGER, action: Sequelize.STRING }); Observation = orm.define('Observation', { content: Sequelize.STRING, completed: Sequelize.BOOLEAN, rawImage: Sequelize.TEXT }); /** * MODEL RELATIONS * belongsToMany connects a source with multiple targets, and the targets can connect to multiple sources * Using a `through` option will create a new model with foreign keys for the source and target * * Example: * User.belongsToMany(Event, {as: 'ShepherdEvents', through: 'ShepherdEvent'}); * Event.belongsToMany(User, {as: 'Shepherds', through: 'ShepherdEvent'}); * * We create a many-to-many relationship between users and events, and the join table is called ShepherdEvent. * The ShepherdEvent table will have a foreign key for EventId and UserId. * The User and Event models will have get, set, and add methods. For example, user.getShepherdEvents() * will return all instances of a ShepherdEvent belonging to that user, and each instance would reference the * Event the user is a shepherd for. * * See http://sequelize.readthedocs.org/en/latest/docs/associations/#belongs-to-many-associations * * hasMany connects a source with multiple targets, but the targets can only connect to one source * * See http://sequelize.readthedocs.org/en/latest/docs/associations/#one-to-many-associations */ User.belongsToMany(Event, {as: 'ShepherdEvents', through: 'ShepherdEvent'}); Event.belongsToMany(User, {as: 'Shepherds', through: 'ShepherdEvent'}); User.belongsToMany(Event, {as: 'SheepEvents', through: 'SheepEvent'}); Event.belongsToMany(User, {as: 'Sheep', through: 'SheepEvent'}); User.hasMany(Observation); Observation.belongsTo(User); Event.hasMany(Observation); Observation.belongsTo(Event); // EXAMPLE OF HOW TO CREATE A USER, THEN AN EVENT, AND FINALLY AN OBSERVATION TIED TO THE USER AND EVENT: // User.create({ // username: 'Kev' // }).then(function (user) { // Event.create({ // name: 'Dance party', // location: 'San Francisco' // }).then(function (event) { // Observation.create({ // content: 'It is poppin in herrr', // completed: false // }).then(function (observation) { // // Associate the observation to the event // return event.addObservation(observation); // }).then(function (observation) { // // Associate the observation to the user // user.addObservation(observation); // }); // }); // }); // EXAMPLE OF HOW TO CREATE A USER, A SHEEP, AND ADD THE USER TO AN EXISTING EVENT // User.create({ // username: 'Derek' // }).then(function (user) { // var sheepId = user.id; // Event.findOne({ // where: { // name: 'Dance party' // } // }).then(function (event) { // event.addSheep(sheepId); // }); // }); // EXAMPLE OF HOW TO CREATE A USER, A SHEEP, ADD AND THEN REMOVE THE USER TO AND FROM AN EXISTING EVENT // var eventId, eventInstance, userInstance; // User.create({ // username: 'Eddie' // }).then(function (user) { // userInstance = user; // Event.findOne({ // where: { // name: 'Dance party' // } // }).then(function (event) { // eventInstance = event // event.addSheep(user); // }).then(function (user) { // userInstance.removeSheepEvent(eventInstance); // }); // }); // export all models exports.User = User; exports.Event = Event; exports.Observation = Observation; // sync all models return orm.sync(); }; exports.init = init;
/** * Copyright (c) UNA, Inc - https://una.io * MIT License - https://opensource.org/licenses/MIT * * @defgroup UnaStudio UNA Studio * @{ */ function BxDolStudioNavigationImport(oOptions) { this.sActionsUrl = oOptions.sActionUrl; this.sPageUrl = oOptions.sPageUrl; this.sObjNameGrid = oOptions.sObjNameGrid; this.sObjName = oOptions.sObjName == undefined ? 'oBxDolStudioNavigationImport' : oOptions.sObjName; this.sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'fade' : oOptions.sAnimationEffect; this.iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed; this.sParamsDivider = oOptions.sParamsDivider == undefined ? '#-#' : oOptions.sParamsDivider; this.sTextSearchInput = oOptions.sTextSearchInput == undefined ? '' : oOptions.sTextSearchInput; } BxDolStudioNavigationImport.prototype.onChangeFilter = function() { var sValueSet = $('#bx-grid-set-' + this.sObjNameGrid).val(); var sValueModule = $('#bx-grid-module-' + this.sObjNameGrid).val(); var sValueSearch = $('#bx-grid-search-' + this.sObjNameGrid).val(); if(sValueSearch == this.sTextSearchInput) sValueSearch = ''; glGrids[this.sObjNameGrid].setFilter(sValueSet + this.sParamsDivider + sValueModule + this.sParamsDivider + sValueSearch, true); }; BxDolStudioNavigationImport.prototype.onImport = function(oData) { $.each(oData.disable, function (iKey, iValue){ $("[bx_grid_action_single = 'import'][bx_grid_action_data = '" + iValue + "']").addClass('bx-btn-disabled'); }); glGrids.sys_studio_nav_items.processJson({grid: oData.parent_grid, blink: oData.parent_blink}, 'import', false); }; /** @} */
/**! * easyPieChart * Lightweight plugin to render simple, animated and retina optimized pie charts * * @license * @author Robert Fleischmann <rendro87@gmail.com> (http://robert-fleischmann.de) * @version 2.1.4 **/ (function(root, factory) { if(typeof exports === 'object') { module.exports = factory(); } else if(typeof define === 'function' && define.amd) { define([], factory); } else { factory(); } }(this, function() { /** * Renderer to render the chart on a canvas object * @param {DOMElement} el DOM element to host the canvas (root of the plugin) * @param {object} options options object of the plugin */ var CanvasRenderer = function(el, options) { var cachedBackground; var canvas = document.createElement('canvas'); el.appendChild(canvas); if (typeof(G_vmlCanvasManager) !== 'undefined') { G_vmlCanvasManager.initElement(canvas); } var ctx = canvas.getContext('2d'); canvas.width = canvas.height = options.size; // canvas on retina devices var scaleBy = 1; if (window.devicePixelRatio > 1) { scaleBy = window.devicePixelRatio; canvas.style.width = canvas.style.height = [options.size, 'px'].join(''); canvas.width = canvas.height = options.size * scaleBy; ctx.scale(scaleBy, scaleBy); } // move 0,0 coordinates to the center ctx.translate(options.size / 2, options.size / 2); // rotate canvas -90deg ctx.rotate((-1 / 2 + options.rotate / 180) * Math.PI); var radius = (options.size - options.lineWidth) / 2; if (options.scaleColor && options.scaleLength) { radius -= options.scaleLength + 2; // 2 is the distance between scale and bar } // IE polyfill for Date Date.now = Date.now || function() { return +(new Date()); }; /** * Draw a circle around the center of the canvas * @param {strong} color Valid CSS color string * @param {number} lineWidth Width of the line in px * @param {number} percent Percentage to draw (float between -1 and 1) */ var drawCircle = function(color, lineWidth, percent) { percent = Math.min(Math.max(-1, percent || 0), 1); var isNegative = percent <= 0 ? true : false; ctx.beginPath(); ctx.arc(0, 0, radius, 0, Math.PI * 2 * percent, isNegative); ctx.strokeStyle = color; ctx.lineWidth = lineWidth; ctx.stroke(); }; /** * Draw the scale of the chart */ var drawScale = function() { var offset; var length; ctx.lineWidth = 1; ctx.fillStyle = options.scaleColor; ctx.save(); for (var i = 24; i > 0; --i) { if (i % 6 === 0) { length = options.scaleLength; offset = 0; } else { length = options.scaleLength * 0.6; offset = options.scaleLength - length; } ctx.fillRect(-options.size/2 + offset, 0, length, 1); ctx.rotate(Math.PI / 12); } ctx.restore(); }; /** * Request animation frame wrapper with polyfill * @return {function} Request animation frame method or timeout fallback */ var reqAnimationFrame = (function() { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60); }; }()); /** * Draw the background of the plugin including the scale and the track */ var drawBackground = function() { if(options.scaleColor) drawScale(); if(options.trackColor) drawCircle(options.trackColor, options.lineWidth, 1); }; /** * Canvas accessor */ this.getCanvas = function() { return canvas; }; /** * Canvas 2D context 'ctx' accessor */ this.getCtx = function() { return ctx; }; /** * Clear the complete canvas */ this.clear = function() { ctx.clearRect(options.size / -2, options.size / -2, options.size, options.size); }; /** * Draw the complete chart * @param {number} percent Percent shown by the chart between -100 and 100 */ this.draw = function(percent) { // do we need to render a background if (!!options.scaleColor || !!options.trackColor) { // getImageData and putImageData are supported if (ctx.getImageData && ctx.putImageData) { if (!cachedBackground) { drawBackground(); cachedBackground = ctx.getImageData(0, 0, options.size * scaleBy, options.size * scaleBy); } else { ctx.putImageData(cachedBackground, 0, 0); } } else { this.clear(); drawBackground(); } } else { this.clear(); } ctx.lineCap = options.lineCap; // if barcolor is a function execute it and pass the percent as a value var color; if (typeof(options.barColor) === 'function') { color = options.barColor(percent); } else { color = options.barColor; } // draw bar drawCircle(color, options.lineWidth, percent / 100); }.bind(this); /** * Animate from some percent to some other percentage * @param {number} from Starting percentage * @param {number} to Final percentage */ this.animate = function(from, to) { var startTime = Date.now(); options.onStart(from, to); var animation = function() { var process = Math.min(Date.now() - startTime, options.animate.duration); var currentValue = options.easing(this, process, from, to - from, options.animate.duration); this.draw(currentValue); options.onStep(from, to, currentValue); if (process >= options.animate.duration) { options.onStop(from, to); } else { reqAnimationFrame(animation); } }.bind(this); reqAnimationFrame(animation); }.bind(this); }; var EasyPieChart = function(el, opts) { var defaultOptions = { barColor: '#ef1e25', trackColor: '#f9f9f9', scaleColor: '#dfe0e0', scaleLength: 5, lineCap: 'round', lineWidth: 3, size: 110, rotate: 0, animate: { duration: 1000, enabled: true }, easing: function (x, t, b, c, d) { // more can be found here: http://gsgd.co.uk/sandbox/jquery/easing/ t = t / (d/2); if (t < 1) { return c / 2 * t * t + b; } return -c/2 * ((--t)*(t-2) - 1) + b; }, onStart: function(from, to) { return; }, onStep: function(from, to, currentValue) { return; }, onStop: function(from, to) { return; } }; // detect present renderer if (typeof(CanvasRenderer) !== 'undefined') { defaultOptions.renderer = CanvasRenderer; } else if (typeof(SVGRenderer) !== 'undefined') { defaultOptions.renderer = SVGRenderer; } else { throw new Error('Please load either the SVG- or the CanvasRenderer'); } var options = {}; var currentValue = 0; /** * Initialize the plugin by creating the options object and initialize rendering */ var init = function() { this.el = el; this.options = options; // merge user options into default options for (var i in defaultOptions) { if (defaultOptions.hasOwnProperty(i)) { options[i] = opts && typeof(opts[i]) !== 'undefined' ? opts[i] : defaultOptions[i]; if (typeof(options[i]) === 'function') { options[i] = options[i].bind(this); } } } // check for jQuery easing if (typeof(options.easing) === 'string' && typeof(jQuery) !== 'undefined' && jQuery.isFunction(jQuery.easing[options.easing])) { options.easing = jQuery.easing[options.easing]; } else { options.easing = defaultOptions.easing; } // process earlier animate option to avoid bc breaks if (typeof(options.animate) === 'number') { options.animate = { duration: options.animate, enabled: true }; } if (typeof(options.animate) === 'boolean' && !options.animate) { options.animate = { duration: 1000, enabled: options.animate }; } // create renderer this.renderer = new options.renderer(el, options); // initial draw this.renderer.draw(currentValue); // initial update if (el.dataset && el.dataset.percent) { this.update(parseFloat(el.dataset.percent)); } else if (el.getAttribute && el.getAttribute('data-percent')) { this.update(parseFloat(el.getAttribute('data-percent'))); } }.bind(this); /** * Update the value of the chart * @param {number} newValue Number between 0 and 100 * @return {object} Instance of the plugin for method chaining */ this.update = function(newValue) { newValue = parseFloat(newValue); if (options.animate.enabled) { this.renderer.animate(currentValue, newValue); } else { this.renderer.draw(newValue); } currentValue = newValue; return this; }.bind(this); /** * Disable animation * @return {object} Instance of the plugin for method chaining */ this.disableAnimation = function() { options.animate.enabled = false; return this; }; /** * Enable animation * @return {object} Instance of the plugin for method chaining */ this.enableAnimation = function() { options.animate.enabled = true; return this; }; init(); }; }));
import * as modReact from 'react'; import * as modClassNames from 'classnames'; import * as modAccordion from '../../src/Accordion'; import * as modAlert from '../../src/Alert'; import * as modBadge from '../../src/Badge'; import * as modmodButton from '../../src/Button'; import * as modButtonGroup from '../../src/ButtonGroup'; import * as modButtonInput from '../../src/ButtonInput'; import * as modmodButtonToolbar from '../../src/ButtonToolbar'; import * as modCollapsibleNav from '../../src/CollapsibleNav'; import * as modCollapsibleMixin from '../../src/CollapsibleMixin'; import * as modCarousel from '../../src/Carousel'; import * as modCarouselItem from '../../src/CarouselItem'; import * as modCol from '../../src/Col'; import * as modDropdownButton from '../../src/DropdownButton'; import * as modFormControls from '../../src/FormControls'; import * as modGlyphicon from '../../src/Glyphicon'; import * as modGrid from '../../src/Grid'; import * as modInput from '../../src/Input'; import * as modJumbotron from '../../src/Jumbotron'; import * as modLabel from '../../src/Label'; import * as modListGroup from '../../src/ListGroup'; import * as modListGroupItem from '../../src/ListGroupItem'; import * as modNav from '../../src/Nav'; import * as modNavbar from '../../src/Navbar'; import * as modNavItem from '../../src/NavItem'; import * as modMenuItem from '../../src/MenuItem'; import * as modModal from '../../src/Modal'; import * as modModalTrigger from '../../src/ModalTrigger'; import * as modOverlayTrigger from '../../src/OverlayTrigger'; import * as modOverlayMixin from '../../src/OverlayMixin'; import * as modPageHeader from '../../src/PageHeader'; import * as modPageItem from '../../src/PageItem'; import * as modPager from '../../src/Pager'; import * as modPagination from '../../src/Pagination'; import * as modPanel from '../../src/Panel'; import * as modPanelGroup from '../../src/PanelGroup'; import * as modPopover from '../../src/Popover'; import * as modProgressBar from '../../src/ProgressBar'; import * as modRow from '../../src/Row'; import * as modSplitButton from '../../src/SplitButton'; import * as modTabbedArea from '../../src/TabbedArea'; import * as modTable from '../../src/Table'; import * as modTabPane from '../../src/TabPane'; import * as modThumbnail from '../../src/Thumbnail'; import * as modTooltip from '../../src/Tooltip'; import * as modWell from '../../src/Well'; import babel from 'babel-core/browser'; import CodeExample from './CodeExample'; const classNames = modClassNames.default; /* eslint-disable */ const React = modReact.default; const Accordion = modAccordion.default; const Alert = modAlert.default; const Badge = modBadge.default; const Button = modmodButton.default; const ButtonGroup = modButtonGroup.default; const ButtonInput = modButtonInput.default; const ButtonToolbar = modmodButtonToolbar.default; const CollapsibleNav = modCollapsibleNav.default; const CollapsibleMixin = modCollapsibleMixin.default; const Carousel = modCarousel.default; const CarouselItem = modCarouselItem.default; const Col = modCol.default; const DropdownButton = modDropdownButton.default; const FormControls = modFormControls.default; const Glyphicon = modGlyphicon.default; const Grid = modGrid.default; const Input = modInput.default; const Jumbotron = modJumbotron.default; const Label = modLabel.default; const ListGroup = modListGroup.default; const ListGroupItem = modListGroupItem.default; const Nav = modNav.default; const Navbar = modNavbar.default; const NavItem = modNavItem.default; const MenuItem = modMenuItem.default; const Modal = modModal.default; const ModalTrigger = modModalTrigger.default; const OverlayTrigger = modOverlayTrigger.default; const OverlayMixin = modOverlayMixin.default; const PageHeader = modPageHeader.default; const PageItem = modPageItem.default; const Pagination = modPagination.default; const Pager = modPager.default; const Panel = modPanel.default; const PanelGroup = modPanelGroup.default; const Popover = modPopover.default; const ProgressBar = modProgressBar.default; const Row = modRow.default; const SplitButton = modSplitButton.default; const TabbedArea = modTabbedArea.default; const Table = modTable.default; const TabPane = modTabPane.default; const Thumbnail = modThumbnail.default; const Tooltip = modTooltip.default; const Well = modWell.default; /* eslint-enable */ const IS_MOBILE = typeof navigator !== 'undefined' && ( navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/BlackBerry/i) || navigator.userAgent.match(/Windows Phone/i) ); class CodeMirrorEditor extends React.Component { constructor(props) { super(props); this.handleChange = this.handleChange.bind(this); } componentDidMount() { if (IS_MOBILE || CodeMirror === undefined) { return; } this.editor = CodeMirror.fromTextArea(React.findDOMNode(this.refs.editor), { mode: 'javascript', lineNumbers: false, lineWrapping: false, matchBrackets: true, tabSize: 2, theme: 'solarized light', readOnly: this.props.readOnly }); this.editor.on('change', this.handleChange); } componentDidUpdate() { if (this.props.readOnly) { this.editor.setValue(this.props.codeText); } } handleChange() { if (!this.props.readOnly && this.props.onChange) { this.props.onChange(this.editor.getValue()); } } render() { // wrap in a div to fully contain CodeMirror let editor; if (IS_MOBILE) { editor = ( <CodeExample mode='javascript' codeText={this.props.codeText} /> ); } else { editor = <textarea ref='editor' defaultValue={this.props.codeText} />; } return ( <div style={this.props.style} className={this.props.className}> {editor} </div> ); } } const selfCleaningTimeout = { componentDidUpdate() { clearTimeout(this.timeoutID); }, updateTimeout() { clearTimeout(this.timeoutID); this.timeoutID = setTimeout.apply(null, arguments); } }; const ReactPlayground = React.createClass({ mixins: [selfCleaningTimeout], MODES: {JSX: 'JSX', JS: 'JS', NONE: null}, propTypes: { codeText: React.PropTypes.string.isRequired, transformer: React.PropTypes.func, renderCode: React.PropTypes.bool }, getDefaultProps() { return { transformer(code) { return babel.transform(code).code; } }; }, getInitialState() { return { mode: this.MODES.NONE, code: this.props.codeText }; }, handleCodeChange(value) { this.setState({code: value}); this.executeCode(); }, handleCodeModeSwitch(mode) { this.setState({mode}); }, handleCodeModeToggle(e) { let mode; e.preventDefault(); switch (this.state.mode) { case this.MODES.NONE: mode = this.MODES.JSX; break; case this.MODES.JSX: default: mode = this.MODES.NONE; } this.setState({mode}); }, compileCode() { return this.props.transformer(this.state.code); }, render() { let classes = { 'bs-example': true }; let toggleClasses = { 'code-toggle': true }; let editor; if (this.props.exampleClassName){ classes[this.props.exampleClassName] = true; } if (this.state.mode !== this.MODES.NONE) { editor = ( <CodeMirrorEditor key='jsx' onChange={this.handleCodeChange} className='highlight' codeText={this.state.code}/> ); toggleClasses.open = true; } return ( <div className='playground'> <div className={classNames(classes)}> <div ref='mount' /> </div> {editor} <a className={classNames(toggleClasses)} onClick={this.handleCodeModeToggle} href='#'>{this.state.mode === this.MODES.NONE ? 'show code' : 'hide code'}</a> </div> ); }, componentDidMount() { this.executeCode(); }, componentWillUpdate(nextProps, nextState) { // execute code only when the state's not being updated by switching tab // this avoids re-displaying the error, which comes after a certain delay if (this.state.code !== nextState.code) { this.executeCode(); } }, componentWillUnmount() { let mountNode = React.findDOMNode(this.refs.mount); try { React.unmountComponentAtNode(mountNode); } catch (e) { console.error(e); } }, executeCode() { let mountNode = React.findDOMNode(this.refs.mount); try { React.unmountComponentAtNode(mountNode); } catch (e) { console.error(e); } let compiledCode = null; try { compiledCode = this.compileCode(); if (this.props.renderCode) { React.render( <CodeMirrorEditor codeText={compiledCode} readOnly={true} />, mountNode ); } else { /* eslint-disable */ eval(compiledCode); /* eslint-enable */ } } catch (err) { if (compiledCode !== null) { console.log(err, compiledCode); } else { console.log(err); } this.updateTimeout(() => { React.render( <Alert bsStyle='danger'>{err.toString()}</Alert>, mountNode ); }, 500); } } }); export default ReactPlayground;
System.register([], function (_export) { 'use strict'; var ValidationViewStrategy; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } return { setters: [], execute: function () { ValidationViewStrategy = (function () { function ValidationViewStrategy() { _classCallCheck(this, ValidationViewStrategy); this.bindingPathAttributes = ['validate', 'value.bind', 'value.two-way']; } ValidationViewStrategy.prototype.getValidationProperty = function getValidationProperty(validation, element) { var atts = element.attributes; for (var i = 0; i < this.bindingPathAttributes.length; i++) { var attributeName = this.bindingPathAttributes[i]; var bindingPath = undefined; var validationProperty = undefined; if (atts[attributeName]) { bindingPath = atts[attributeName].value.trim(); if (bindingPath.indexOf('|') !== -1) { bindingPath = bindingPath.split('|')[0].trim(); } validationProperty = validation.result.properties[bindingPath]; if (attributeName === 'validate' && (validationProperty === null || validationProperty === undefined)) { validation.ensure(bindingPath); validationProperty = validation.result.properties[bindingPath]; } return validationProperty; } } return null; }; ValidationViewStrategy.prototype.prepareElement = function prepareElement(validationProperty, element) { throw Error('View strategy must implement prepareElement(validationProperty, element)'); }; ValidationViewStrategy.prototype.updateElement = function updateElement(validationProperty, element) { throw Error('View strategy must implement updateElement(validationProperty, element)'); }; return ValidationViewStrategy; })(); _export('ValidationViewStrategy', ValidationViewStrategy); } }; });
export function sortLinear(data, property, direction) { if (direction === void 0) { direction = 'asc'; } return data.sort(function (a, b) { if (direction === 'asc') { return a[property] - b[property]; } else { return b[property] - a[property]; } }); } export function sortByDomain(data, property, direction, domain) { if (direction === void 0) { direction = 'asc'; } return data.sort(function (a, b) { var aVal = a[property]; var bVal = b[property]; var aIdx = domain.indexOf(aVal); var bIdx = domain.indexOf(bVal); if (direction === 'asc') { return aIdx - bIdx; } else { return bIdx - aIdx; } }); } export function sortByTime(data, property, direction) { if (direction === void 0) { direction = 'asc'; } return data.sort(function (a, b) { var aDate = a[property].getTime(); var bDate = b[property].getTime(); if (direction === 'asc') { if (aDate > bDate) return 1; if (bDate > aDate) return -1; return 0; } else { if (aDate > bDate) return -1; if (bDate > aDate) return 1; return 0; } }); } //# sourceMappingURL=sort.js.map
const config = { baseUrl: 'http://localhost:5555/', specs: [ './dist/e2e/**/*.e2e-spec.js' ], exclude: [], // 'jasmine' by default will use the latest jasmine framework framework: 'jasmine', // allScriptsTimeout: 110000, jasmineNodeOpts: { // showTiming: true, showColors: true, isVerbose: false, includeStackTrace: false, // defaultTimeoutInterval: 400000 }, directConnect: true, multicapabilities: [{ browserName: 'chrome' }], onPrepare: function () { browser.ignoreSynchronization = false; }, }; if (process.env.TRAVIS) { config.multicapabilities.push({ browserName: 'firefox' }); // https://github.com/angular/protractor/issues/4253 } exports.config = config;
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const NullDependency = require("./NullDependency"); const DepBlockHelpers = require("./DepBlockHelpers"); class AMDRequireDependency extends NullDependency { constructor(block) { super(); this.block = block; } } AMDRequireDependency.Template = class AMDRequireDependencyTemplate { apply(dep, source, outputOptions, requestShortener) { const depBlock = dep.block; const wrapper = DepBlockHelpers.getLoadDepBlockWrapper(depBlock, outputOptions, requestShortener, "require"); // has array range but no function range if(depBlock.arrayRange && !depBlock.functionRange) { const startBlock = wrapper[0] + "function() {"; const endBlock = `;}${wrapper[1]}__webpack_require__.oe${wrapper[2]}`; source.replace(depBlock.outerRange[0], depBlock.arrayRange[0] - 1, startBlock); source.replace(depBlock.arrayRange[1], depBlock.outerRange[1] - 1, endBlock); return; } // has function range but no array range if(depBlock.functionRange && !depBlock.arrayRange) { const startBlock = wrapper[0] + "function() {("; const endBlock = `.call(exports, __webpack_require__, exports, module));}${wrapper[1]}__webpack_require__.oe${wrapper[2]}`; source.replace(depBlock.outerRange[0], depBlock.functionRange[0] - 1, startBlock); source.replace(depBlock.functionRange[1], depBlock.outerRange[1] - 1, endBlock); return; } // has array range, function range, and errorCallbackRange if(depBlock.arrayRange && depBlock.functionRange && depBlock.errorCallbackRange) { const startBlock = wrapper[0] + "function() { "; const errorRangeBlock = `}${depBlock.functionBindThis ? ".bind(this)" : ""}${wrapper[1]}`; const endBlock = `${depBlock.errorCallbackBindThis ? ".bind(this)" : ""}${wrapper[2]}`; source.replace(depBlock.outerRange[0], depBlock.arrayRange[0] - 1, startBlock); source.insert(depBlock.arrayRange[0] + 0.9, "var __WEBPACK_AMD_REQUIRE_ARRAY__ = "); source.replace(depBlock.arrayRange[1], depBlock.functionRange[0] - 1, "; (("); source.insert(depBlock.functionRange[1], ").apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));"); source.replace(depBlock.functionRange[1], depBlock.errorCallbackRange[0] - 1, errorRangeBlock); source.replace(depBlock.errorCallbackRange[1], depBlock.outerRange[1] - 1, endBlock); return; } // has array range, function range, but no errorCallbackRange if(depBlock.arrayRange && depBlock.functionRange) { const startBlock = wrapper[0] + "function() { "; const endBlock = `}${depBlock.functionBindThis ? ".bind(this)" : ""}${wrapper[1]}__webpack_require__.oe${wrapper[2]}`; source.replace(depBlock.outerRange[0], depBlock.arrayRange[0] - 1, startBlock); source.insert(depBlock.arrayRange[0] + 0.9, "var __WEBPACK_AMD_REQUIRE_ARRAY__ = "); source.replace(depBlock.arrayRange[1], depBlock.functionRange[0] - 1, "; (("); source.insert(depBlock.functionRange[1], ").apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));"); source.replace(depBlock.functionRange[1], depBlock.outerRange[1] - 1, endBlock); } } }; module.exports = AMDRequireDependency;
"use strict"; var ts = require("typescript"); var SyntaxWalker = (function () { function SyntaxWalker() { } SyntaxWalker.prototype.walk = function (node) { this.visitNode(node); }; SyntaxWalker.prototype.visitAnyKeyword = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitArrayLiteralExpression = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitArrayType = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitArrowFunction = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitBinaryExpression = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitBindingElement = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitBindingPattern = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitBlock = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitBreakStatement = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitCallExpression = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitCallSignature = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitCaseClause = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitClassDeclaration = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitClassExpression = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitCatchClause = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitConditionalExpression = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitConstructSignature = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitConstructorDeclaration = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitConstructorType = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitContinueStatement = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitDebuggerStatement = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitDefaultClause = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitDoStatement = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitElementAccessExpression = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitEnumDeclaration = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitExportAssignment = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitExpressionStatement = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitForStatement = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitForInStatement = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitForOfStatement = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitFunctionDeclaration = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitFunctionExpression = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitFunctionType = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitGetAccessor = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitIdentifier = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitIfStatement = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitImportDeclaration = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitImportEqualsDeclaration = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitIndexSignatureDeclaration = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitInterfaceDeclaration = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitJsxAttribute = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitJsxElement = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitJsxExpression = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitJsxSelfClosingElement = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitJsxSpreadAttribute = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitLabeledStatement = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitMethodDeclaration = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitMethodSignature = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitModuleDeclaration = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitNamedImports = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitNamespaceImport = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitNewExpression = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitObjectLiteralExpression = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitParameterDeclaration = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitPostfixUnaryExpression = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitPrefixUnaryExpression = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitPropertyAccessExpression = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitPropertyAssignment = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitPropertyDeclaration = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitPropertySignature = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitRegularExpressionLiteral = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitReturnStatement = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitSetAccessor = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitSourceFile = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitStringLiteral = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitSwitchStatement = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitTemplateExpression = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitThrowStatement = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitTryStatement = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitTupleType = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitTypeAliasDeclaration = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitTypeAssertionExpression = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitTypeLiteral = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitTypeReference = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitVariableDeclaration = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitVariableStatement = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitWhileStatement = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitWithStatement = function (node) { this.walkChildren(node); }; SyntaxWalker.prototype.visitNode = function (node) { switch (node.kind) { case ts.SyntaxKind.AnyKeyword: this.visitAnyKeyword(node); break; case ts.SyntaxKind.ArrayBindingPattern: this.visitBindingPattern(node); break; case ts.SyntaxKind.ArrayLiteralExpression: this.visitArrayLiteralExpression(node); break; case ts.SyntaxKind.ArrayType: this.visitArrayType(node); break; case ts.SyntaxKind.ArrowFunction: this.visitArrowFunction(node); break; case ts.SyntaxKind.BinaryExpression: this.visitBinaryExpression(node); break; case ts.SyntaxKind.BindingElement: this.visitBindingElement(node); break; case ts.SyntaxKind.Block: this.visitBlock(node); break; case ts.SyntaxKind.BreakStatement: this.visitBreakStatement(node); break; case ts.SyntaxKind.CallExpression: this.visitCallExpression(node); break; case ts.SyntaxKind.CallSignature: this.visitCallSignature(node); break; case ts.SyntaxKind.CaseClause: this.visitCaseClause(node); break; case ts.SyntaxKind.ClassDeclaration: this.visitClassDeclaration(node); break; case ts.SyntaxKind.ClassExpression: this.visitClassExpression(node); break; case ts.SyntaxKind.CatchClause: this.visitCatchClause(node); break; case ts.SyntaxKind.ConditionalExpression: this.visitConditionalExpression(node); break; case ts.SyntaxKind.ConstructSignature: this.visitConstructSignature(node); break; case ts.SyntaxKind.Constructor: this.visitConstructorDeclaration(node); break; case ts.SyntaxKind.ConstructorType: this.visitConstructorType(node); break; case ts.SyntaxKind.ContinueStatement: this.visitContinueStatement(node); break; case ts.SyntaxKind.DebuggerStatement: this.visitDebuggerStatement(node); break; case ts.SyntaxKind.DefaultClause: this.visitDefaultClause(node); break; case ts.SyntaxKind.DoStatement: this.visitDoStatement(node); break; case ts.SyntaxKind.ElementAccessExpression: this.visitElementAccessExpression(node); break; case ts.SyntaxKind.EnumDeclaration: this.visitEnumDeclaration(node); break; case ts.SyntaxKind.ExportAssignment: this.visitExportAssignment(node); break; case ts.SyntaxKind.ExpressionStatement: this.visitExpressionStatement(node); break; case ts.SyntaxKind.ForStatement: this.visitForStatement(node); break; case ts.SyntaxKind.ForInStatement: this.visitForInStatement(node); break; case ts.SyntaxKind.ForOfStatement: this.visitForOfStatement(node); break; case ts.SyntaxKind.FunctionDeclaration: this.visitFunctionDeclaration(node); break; case ts.SyntaxKind.FunctionExpression: this.visitFunctionExpression(node); break; case ts.SyntaxKind.FunctionType: this.visitFunctionType(node); break; case ts.SyntaxKind.GetAccessor: this.visitGetAccessor(node); break; case ts.SyntaxKind.Identifier: this.visitIdentifier(node); break; case ts.SyntaxKind.IfStatement: this.visitIfStatement(node); break; case ts.SyntaxKind.ImportDeclaration: this.visitImportDeclaration(node); break; case ts.SyntaxKind.ImportEqualsDeclaration: this.visitImportEqualsDeclaration(node); break; case ts.SyntaxKind.IndexSignature: this.visitIndexSignatureDeclaration(node); break; case ts.SyntaxKind.InterfaceDeclaration: this.visitInterfaceDeclaration(node); break; case ts.SyntaxKind.JsxAttribute: this.visitJsxAttribute(node); break; case ts.SyntaxKind.JsxElement: this.visitJsxElement(node); break; case ts.SyntaxKind.JsxExpression: this.visitJsxExpression(node); break; case ts.SyntaxKind.JsxSelfClosingElement: this.visitJsxSelfClosingElement(node); break; case ts.SyntaxKind.JsxSpreadAttribute: this.visitJsxSpreadAttribute(node); break; case ts.SyntaxKind.LabeledStatement: this.visitLabeledStatement(node); break; case ts.SyntaxKind.MethodDeclaration: this.visitMethodDeclaration(node); break; case ts.SyntaxKind.MethodSignature: this.visitMethodSignature(node); break; case ts.SyntaxKind.ModuleDeclaration: this.visitModuleDeclaration(node); break; case ts.SyntaxKind.NamedImports: this.visitNamedImports(node); break; case ts.SyntaxKind.NamespaceImport: this.visitNamespaceImport(node); break; case ts.SyntaxKind.NewExpression: this.visitNewExpression(node); break; case ts.SyntaxKind.ObjectBindingPattern: this.visitBindingPattern(node); break; case ts.SyntaxKind.ObjectLiteralExpression: this.visitObjectLiteralExpression(node); break; case ts.SyntaxKind.Parameter: this.visitParameterDeclaration(node); break; case ts.SyntaxKind.PostfixUnaryExpression: this.visitPostfixUnaryExpression(node); break; case ts.SyntaxKind.PrefixUnaryExpression: this.visitPrefixUnaryExpression(node); break; case ts.SyntaxKind.PropertyAccessExpression: this.visitPropertyAccessExpression(node); break; case ts.SyntaxKind.PropertyAssignment: this.visitPropertyAssignment(node); break; case ts.SyntaxKind.PropertyDeclaration: this.visitPropertyDeclaration(node); break; case ts.SyntaxKind.PropertySignature: this.visitPropertySignature(node); break; case ts.SyntaxKind.RegularExpressionLiteral: this.visitRegularExpressionLiteral(node); break; case ts.SyntaxKind.ReturnStatement: this.visitReturnStatement(node); break; case ts.SyntaxKind.SetAccessor: this.visitSetAccessor(node); break; case ts.SyntaxKind.SourceFile: this.visitSourceFile(node); break; case ts.SyntaxKind.StringLiteral: this.visitStringLiteral(node); break; case ts.SyntaxKind.SwitchStatement: this.visitSwitchStatement(node); break; case ts.SyntaxKind.TemplateExpression: this.visitTemplateExpression(node); break; case ts.SyntaxKind.ThrowStatement: this.visitThrowStatement(node); break; case ts.SyntaxKind.TryStatement: this.visitTryStatement(node); break; case ts.SyntaxKind.TupleType: this.visitTupleType(node); break; case ts.SyntaxKind.TypeAliasDeclaration: this.visitTypeAliasDeclaration(node); break; case ts.SyntaxKind.TypeAssertionExpression: this.visitTypeAssertionExpression(node); break; case ts.SyntaxKind.TypeLiteral: this.visitTypeLiteral(node); break; case ts.SyntaxKind.TypeReference: this.visitTypeReference(node); break; case ts.SyntaxKind.VariableDeclaration: this.visitVariableDeclaration(node); break; case ts.SyntaxKind.VariableStatement: this.visitVariableStatement(node); break; case ts.SyntaxKind.WhileStatement: this.visitWhileStatement(node); break; case ts.SyntaxKind.WithStatement: this.visitWithStatement(node); break; default: this.walkChildren(node); break; } }; SyntaxWalker.prototype.walkChildren = function (node) { var _this = this; ts.forEachChild(node, function (child) { return _this.visitNode(child); }); }; return SyntaxWalker; }()); exports.SyntaxWalker = SyntaxWalker;
import 'ember'; import Ember from 'ember-metal/core'; import isEnabled from 'ember-metal/features'; import EmberHandlebars from 'ember-htmlbars/compat'; import HandlebarsCompatibleHelper from 'ember-htmlbars/compat/helper'; import Helper from 'ember-htmlbars/helper'; var compile, helpers, makeBoundHelper; compile = EmberHandlebars.compile; helpers = EmberHandlebars.helpers; makeBoundHelper = EmberHandlebars.makeBoundHelper; var makeViewHelper = EmberHandlebars.makeViewHelper; var App, registry, container; function reverseHelper(value) { return arguments.length > 1 ? value.split('').reverse().join('') : '--'; } QUnit.module('Application Lifecycle - Helper Registration', { teardown() { Ember.run(function() { if (App) { App.destroy(); } App = null; Ember.TEMPLATES = {}; }); } }); var boot = function(callback) { Ember.run(function() { App = Ember.Application.create({ name: 'App', rootElement: '#qunit-fixture' }); App.deferReadiness(); App.Router = Ember.Router.extend({ location: 'none' }); registry = App.registry; container = App.__container__; if (callback) { callback(); } }); var router = container.lookup('router:main'); Ember.run(App, 'advanceReadiness'); Ember.run(function() { router.handleURL('/'); }); }; QUnit.test('Unbound dashed helpers registered on the container can be late-invoked', function() { Ember.TEMPLATES.application = compile('<div id=\'wrapper\'>{{x-borf}} {{x-borf \'YES\'}}</div>'); let helper = new HandlebarsCompatibleHelper(function(val) { return arguments.length > 1 ? val : 'BORF'; }); boot(() => { registry.register('helper:x-borf', helper); }); equal(Ember.$('#wrapper').text(), 'BORF YES', 'The helper was invoked from the container'); ok(!helpers['x-borf'], 'Container-registered helper doesn\'t wind up on global helpers hash'); }); // need to make `makeBoundHelper` for HTMLBars QUnit.test('Bound helpers registered on the container can be late-invoked', function() { Ember.TEMPLATES.application = compile('<div id=\'wrapper\'>{{x-reverse}} {{x-reverse foo}}</div>'); boot(function() { registry.register('controller:application', Ember.Controller.extend({ foo: 'alex' })); registry.register('helper:x-reverse', makeBoundHelper(reverseHelper)); }); equal(Ember.$('#wrapper').text(), '-- xela', 'The bound helper was invoked from the container'); ok(!helpers['x-reverse'], 'Container-registered helper doesn\'t wind up on global helpers hash'); }); QUnit.test('Bound `makeViewHelper` helpers registered on the container can be used', function() { Ember.TEMPLATES.application = compile('<div id=\'wrapper\'>{{x-foo}} {{x-foo name=foo}}</div>'); boot(function() { registry.register('controller:application', Ember.Controller.extend({ foo: 'alex' })); registry.register('helper:x-foo', makeViewHelper(Ember.Component.extend({ layout: compile('woot!!{{attrs.name}}') }))); }); equal(Ember.$('#wrapper').text(), 'woot!! woot!!alex', 'The helper was invoked from the container'); }); if (isEnabled('ember-htmlbars-dashless-helpers')) { QUnit.test('Undashed helpers registered on the container can be invoked', function() { Ember.TEMPLATES.application = compile('<div id=\'wrapper\'>{{omg}}|{{yorp \'boo\'}}|{{yorp \'ya\'}}</div>'); expectDeprecation(function() { boot(function() { registry.register('helper:omg', function([value]) { return 'OMG'; }); registry.register('helper:yorp', makeBoundHelper(function(value) { return value; })); }, /Please use Ember.Helper.build to wrap helper functions./); }); equal(Ember.$('#wrapper').text(), 'OMG|boo|ya', 'The helper was invoked from the container'); }); } else { QUnit.test('Undashed helpers registered on the container can not (presently) be invoked', function() { // Note: the reason we're not allowing undashed helpers is to avoid // a possible perf hit in hot code paths, i.e. _triageMustache. // We only presently perform container lookups if prop.indexOf('-') >= 0 Ember.TEMPLATES.application = compile('<div id=\'wrapper\'>{{omg}}|{{omg \'GRRR\'}}|{{yorp}}|{{yorp \'ahh\'}}</div>'); expectAssertion(function() { boot(function() { registry.register('helper:omg', function() { return 'OMG'; }); registry.register('helper:yorp', makeBoundHelper(function() { return 'YORP'; })); }); }, /A helper named 'omg' could not be found/); }); } QUnit.test('Helpers can receive injections', function() { Ember.TEMPLATES.application = compile('<div id=\'wrapper\'>{{full-name}}</div>'); var serviceCalled = false; boot(function() { registry.register('service:name-builder', Ember.Service.extend({ build() { serviceCalled = true; } })); registry.register('helper:full-name', Helper.extend({ nameBuilder: Ember.inject.service('name-builder'), compute() { this.get('nameBuilder').build(); } })); }); ok(serviceCalled, 'service was injected, method called'); });
/* * Throttle the window resize event for performance and smoothness. */ +function ($) { 'use strict'; // SMARTRESIZE PUBLIC CLASS DEFINITION // =================================== var Smartresize = function (element, options) { this.element = element this.options = options this._bounce = [] } Smartresize.VERSION = '0.0.2' Smartresize.prototype = {} Smartresize.prototype.constructor = Smartresize /** * Debounce function * @author John Hann * @source http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/ */ Smartresize.prototype.debounce = function ( func, threshold, execAsap ) { var timeout var outer = function () { var obj = this var args = arguments function delayed () { if ( ! execAsap ) { func.apply ( obj, args ) } timeout = null } if ( timeout ) clearTimeout( timeout ) else if ( execAsap ) func.apply( obj, args ) timeout = setTimeout( delayed, threshold || 500 ) } this._bounce.push({ bounce : outer, callback : func }) return outer } /** * Unbinds specific handlers or if handler is null or undefined, will * unbind ALL handlers * * @param {function} handler the callback * @return {$} returns the element for chainability */ Smartresize.prototype.unbind = function (handler) { for (var i = 0; i < this._bounce.length; i++ ) { if (handler == null || handler == this._bounce[i].callback) { $(this.element).unbind( 'resize', this._bounce[i].bounce ) } } return $(this.element) } // SMARTRESIZE POPOVER PLUGIN DEFINITION // ================================== function Plugin(option, handler) { var $this = $(this) var data = $this.data('bs.smartresize') var options = typeof option == 'object' && option var selector = options && options.selector if (! data && option == 'destroy') return if (selector) { if (! data) $this.data('bs.smartresize', (data = {})) if (! data[selector]) data[selector] = new Smartresize(this, options) } else { if (! data) $this.data('bs.smartresize', (data = new Smartresize(this, options))) } if (typeof option == 'string') data[option](handler) else { return option ? this.bind( 'resize', data.debounce( option ) ) : this.trigger( 'smartresize' ) } } var old = $.fn.smartresize $.fn.smartresize = Plugin $.fn.smartresize.Constructor = Smartresize // SMARTRESIZE POPOVER NO CONFLICT // ============================ $.fn.smartresize.noConflict = function () { $.fn.smartresize = old return this } } (jQuery)
/*! JsRender * Version for web: jsrender.js * Version for Node.js: jsrender-node.js */ 'use strict'; module.exports = require('./jsrender-node.js');
/*global define*/ /*global describe, it, expect*/ /*global jasmine*/ /*global beforeEach, afterEach*/ /*jslint white: true*/ define([ 'kbaseRNASeqHistogram' ], function(Widget) { describe('Test the kbaseRNASeqHistogram widget', function() { it('Should do things', function() { }); }); });
/*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2015 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ sap.ui.define(['jquery.sap.global','./Element'],function(q,E){"use strict";var V={};var t=null;var e=function(){if(!t){t={};var r=sap.ui.getCore().getLibraryResourceBundle("sap.ui.core");t[sap.ui.core.ValueState.Error]=r.getText("VALUE_STATE_ERROR");t[sap.ui.core.ValueState.Warning]=r.getText("VALUE_STATE_WARNING");t[sap.ui.core.ValueState.Success]=r.getText("VALUE_STATE_SUCCESS");}};V.enrichTooltip=function(o,T){if(!T&&o.getTooltip()){return undefined;}var s=sap.ui.core.ValueStateSupport.getAdditionalText(o);if(s){return(T?T+" - ":"")+s;}return T;};V.getAdditionalText=function(v){var s=null;if(v.getValueState){s=v.getValueState();}else if(sap.ui.core.ValueState[v]){s=v;}if(s&&(s!=sap.ui.core.ValueState.None)){e();return t[s];}return null;};V.formatValueState=function(s){switch(s){case 1:return sap.ui.core.ValueState.Warning;case 2:return sap.ui.core.ValueState.Success;case 3:return sap.ui.core.ValueState.Error;default:return sap.ui.core.ValueState.None;}};return V;},true);
settingsSchemaObject = { title: { type: String, optional: true, autoform: { group: 'general' } }, siteUrl: { type: String, optional: true, autoform: { group: 'general', instructions: 'Your site\'s URL (with trailing "/"). Will default to Meteor.absoluteUrl()' } }, tagline: { type: String, optional: true, autoform: { group: 'general' } }, description: { type: String, optional: true, autoform: { group: 'general', rows: 5, instructions: 'A short description used for SEO purposes.' } }, siteImage: { type: String, optional: true, regEx: SimpleSchema.RegEx.Url, autoform: { group: "general", instructions: "URL to an image for the open graph image tag for all pages" } }, navLayout: { type: String, optional: true, autoform: { group: 'general', instructions: 'The layout used for the main menu', options: [ {value: 'top-nav', label: 'Top'}, {value: 'side-nav', label: 'Side'} ] } }, requireViewInvite: { type: Boolean, optional: true, autoform: { group: 'invites', leftLabel: 'Require View Invite' } }, requirePostInvite: { type: Boolean, optional: true, autoform: { group: 'invites', leftLabel: 'Require Post Invite' } }, requirePostsApproval: { type: Boolean, optional: true, autoform: { group: 'general', instructions: "Posts must be approved by admin", leftLabel: "Require Posts Approval" } }, defaultEmail: { type: String, optional: true, autoform: { group: 'email', instructions: 'The address all outgoing emails will be sent from.', private: true } }, mailUrl: { type: String, optional: true, autoform: { group: 'email', instructions: 'MAIL_URL environment variable (requires restart).', private: true } }, scoreUpdateInterval: { type: Number, optional: true, defaultValue: 30, autoform: { group: 'scoring', instructions: 'How often to recalculate scores, in seconds (default to 30)', private: true } }, defaultView: { type: String, optional: true, autoform: { group: 'posts', instructions: 'The view used for the front page', options: _.map(viewsMenu, function (view) { return { value: camelCaseify(view.label), label: view.label }; }) } }, postsLayout: { type: String, optional: true, autoform: { group: 'posts', instructions: 'The layout used for post lists', options: [ {value: 'posts-list', label: 'List'}, {value: 'posts-grid', label: 'Grid'} ] } }, postViews: { type: [String], optional: true, autoform: { group: 'posts', instructions: 'Posts views showed in the views menu', editable: true, noselect: true, options: _.map(viewsMenu, function (item){ return { value: item.route, label: item.label } }) } }, postInterval: { type: Number, optional: true, defaultValue: 30, autoform: { group: 'posts', instructions: 'Minimum time between posts, in seconds (defaults to 30)' } }, commentInterval: { type: Number, optional: true, defaultValue: 15, autoform: { group: 'comments', instructions: 'Minimum time between comments, in seconds (defaults to 15)' } }, maxPostsPerDay: { type: Number, optional: true, defaultValue: 30, autoform: { group: 'posts', instructions: 'Maximum number of posts a user can post in a day (default to 30).' } }, startInvitesCount: { type: Number, defaultValue: 3, optional: true, autoform: { group: 'invites' } }, postsPerPage: { type: Number, defaultValue: 10, optional: true, autoform: { group: 'posts' } }, logoUrl: { type: String, optional: true, autoform: { group: 'logo' } }, logoHeight: { type: Number, optional: true, autoform: { group: 'logo' } }, logoWidth: { type: Number, optional: true, autoform: { group: 'logo' } }, faviconUrl: { type: String, optional: true, autoform: { group: 'logo' } }, language: { type: String, defaultValue: 'en', optional: true, autoform: { group: 'general', instructions: 'The app\'s language. Defaults to English.', options: function () { var languages = _.map(TAPi18n.getLanguages(), function (item, key) { return { value: key, label: item.name } }); return languages } } }, backgroundCSS: { type: String, optional: true, autoform: { group: 'extras', instructions: 'CSS code for the <body>\'s "background" property', rows: 5 } }, accentColor: { type: String, optional: true, autoform: { group: 'colors', instructions: 'Used for button backgrounds.' } }, accentContrastColor: { type: String, optional: true, autoform: { group: 'colors', instructions: 'Used for button text.' } }, secondaryColor: { type: String, optional: true, autoform: { group: 'colors', instructions: 'Used for the navigation background.' } }, secondaryContrastColor: { type: String, optional: true, autoform: { group: 'colors', instructions: 'Used for header text.' } }, fontUrl: { type: String, optional: true, autoform: { group: 'fonts', instructions: '@import URL (e.g. https://fonts.googleapis.com/css?family=Source+Sans+Pro)' } }, fontFamily: { type: String, optional: true, autoform: { group: 'fonts', instructions: 'font-family (e.g. "Source Sans Pro", sans-serif)' } }, twitterAccount: { type: String, optional: true, autoform: { group: 'integrations' } }, googleAnalyticsId: { type: String, optional: true, autoform: { group: 'integrations' } }, mixpanelId: { type: String, optional: true, autoform: { group: 'integrations' } }, clickyId: { type: String, optional: true, autoform: { group: 'integrations' } }, footerCode: { type: String, optional: true, autoform: { group: 'extras', instructions: 'Footer content (accepts Markdown).', rows: 5 } }, extraCode: { type: String, optional: true, autoform: { group: 'extras', instructions: 'Any extra HTML code you want to include on every page.', rows: 5 } }, emailFooter: { type: String, optional: true, autoform: { group: 'email', instructions: 'Content that will appear at the bottom of outgoing emails (accepts HTML).', rows: 5, private: true } }, notes: { type: String, optional: true, autoform: { group: 'extras', instructions: 'You can store any notes or extra information here.', rows: 5, private: true } }, debug: { type: Boolean, optional: true, autoform: { group: 'debug', instructions: 'Enable debug mode for more details console logs' } }, authMethods: { type: [String], optional: true, autoform: { group: 'auth', editable: true, noselect: true, options: [ { value: 'email', label: 'Email/Password' }, { value: 'twitter', label: 'Twitter' }, { value: 'facebook', label: 'Facebook' } ], instructions: 'Authentication methods (default to email only)' } } }; // add any extra properties to settingsSchemaObject (provided by packages for example) _.each(addToSettingsSchema, function(item){ settingsSchemaObject[item.propertyName] = item.propertySchema; }); Settings = new Meteor.Collection("settings"); SettingsSchema = new SimpleSchema(settingsSchemaObject); Settings.attachSchema(SettingsSchema); // use custom template for checkboxes - not working yet // if(Meteor.isClient){ // AutoForm.setDefaultTemplateForType('afCheckbox', 'settings'); // } Settings.allow({ insert: isAdminById, update: isAdminById, remove: isAdminById }); if (Meteor.isClient){ var query = Settings.find(); var handle = query.observeChanges({ added: function (id, fields) { if (fields.language) setLanguage(fields.language) }, changed: function (id, fields) { if (fields.language) setLanguage(fields.language) } }); } Meteor.startup(function () { // override Meteor.absoluteUrl() with URL provided in settings Meteor.absoluteUrl.defaultOptions.rootUrl = getSetting('siteUrl', Meteor.absoluteUrl()); debug = getSetting('debug', false); });
Clazz.declarePackage ("J.adapter.readers.more"); Clazz.load (["J.adapter.smarter.AtomSetCollectionReader"], "J.adapter.readers.more.MdCrdReader", ["java.lang.Float", "JU.P3", "J.util.Logger"], function () { c$ = Clazz.decorateAsClass (function () { this.ptFloat = 0; this.lenLine = 0; Clazz.instantialize (this, arguments); }, J.adapter.readers.more, "MdCrdReader", J.adapter.smarter.AtomSetCollectionReader); $_V(c$, "initializeReader", function () { this.initializeTrajectoryFile (); }); $_V(c$, "checkLine", function () { this.readCoordinates (); J.util.Logger.info ("Total number of trajectory steps=" + this.trajectorySteps.size ()); this.continuing = false; return false; }); $_M(c$, "readCoordinates", ($fz = function () { this.line = null; var atomCount = (this.bsFilter == null ? this.templateAtomCount : (this.htParams.get ("filteredAtomCount")).intValue ()); var isPeriodic = this.htParams.containsKey ("isPeriodic"); var floatCount = this.templateAtomCount * 3 + (isPeriodic ? 3 : 0); while (true) if (this.doGetModel (++this.modelNumber, null)) { var trajectoryStep = new Array (atomCount); if (!this.getTrajectoryStep (trajectoryStep, isPeriodic)) return; this.trajectorySteps.addLast (trajectoryStep); if (this.isLastModel (this.modelNumber)) return; } else { if (!this.skipFloats (floatCount)) return; } }, $fz.isPrivate = true, $fz)); $_M(c$, "getFloat", ($fz = function () { while (this.line == null || this.ptFloat >= this.lenLine) { if (this.readLine () == null) return NaN; this.ptFloat = 0; this.lenLine = this.line.length; } this.ptFloat += 8; return this.parseFloatRange (this.line, this.ptFloat - 8, this.ptFloat); }, $fz.isPrivate = true, $fz)); $_M(c$, "getPoint", ($fz = function () { var x = this.getFloat (); var y = this.getFloat (); var z = this.getFloat (); return (Float.isNaN (z) ? null : JU.P3.new3 (x, y, z)); }, $fz.isPrivate = true, $fz)); $_M(c$, "getTrajectoryStep", ($fz = function (trajectoryStep, isPeriodic) { var atomCount = trajectoryStep.length; var n = -1; for (var i = 0; i < this.templateAtomCount; i++) { var pt = this.getPoint (); if (pt == null) return false; if (this.bsFilter == null || this.bsFilter.get (i)) { if (++n == atomCount) return false; trajectoryStep[n] = pt; }} if (isPeriodic) this.getPoint (); return (this.line != null); }, $fz.isPrivate = true, $fz), "~A,~B"); $_M(c$, "skipFloats", ($fz = function (n) { var i = 0; while (i < n && this.readLine () != null) i += this.getTokens ().length; return (this.line != null); }, $fz.isPrivate = true, $fz), "~N"); });
'use strict'; // Use Applicaion configuration module to register a new module ApplicationConfiguration.registerModule('products');
const self = module.exports; self.exit = () => { console.error('catch block not called'); process.exit(); };
// userRoutes.js var userController = require('./userController.js'); module.exports = function (router) { // router === userRouter injected from middlware.js router.route('/todo') .get(userController.getTodos) .post(userController.addTodo); router.route('/bookmark/:url') .get(userController.getBookmark); router.route('/bookmark') .get(userController.getBookmarks) .post(userController.addBookmark); router.get('/', userController.getUser); };
'use strict'; angular.module('copayApp.controllers').controller('preferencesColorController', function($scope, $timeout, $log, configService, profileService, go) { var config = configService.getSync(); this.colorOpts = [ '#DD4B39', '#F38F12', '#FAA77F', '#D0B136', '#9EDD72', '#29BB9C', '#019477', '#77DADA', '#4A90E2', '#484ED3', '#9B59B6', '#E856EF', '#FF599E', '#7A8C9E', ]; var fc = profileService.focusedClient; var walletId = fc.credentials.walletId; var config = configService.getSync(); config.colorFor = config.colorFor || {}; this.color = config.colorFor[walletId] || '#4A90E2'; this.save = function(color) { var self = this; var opts = { colorFor: {} }; opts.colorFor[walletId] = color; configService.set(opts, function(err) { if (err) $log.warn(err); go.preferences(); $scope.$emit('Local/ColorUpdated'); $timeout(function() { $scope.$apply(); }, 100); }); }; });
/** * Copyright (c) UNA, Inc - https://una.io * MIT License - https://opensource.org/licenses/MIT * * @defgroup UnaStudio UNA Studio * @{ */ function BxDolStudioFormsCategories(oOptions) { this.sActionsUrl = oOptions.sActionUrl; this.sPageUrl = oOptions.sPageUrl; this.sObjNameGrid = oOptions.sObjNameGrid; this.sObjName = oOptions.sObjName == undefined ? 'oBxDolStudioFormsCategories' : oOptions.sObjName; this.sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'fade' : oOptions.sAnimationEffect; this.iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed; this.sParamsDivider = oOptions.sParamsDivider == undefined ? '#-#' : oOptions.sParamsDivider; this.sTextSearchInput = oOptions.sTextSearchInput == undefined ? '' : oOptions.sTextSearchInput; } BxDolStudioFormsCategories.prototype.onChangeModule = function () { this.reloadGrid($('#bx-grid-module-' + this.sObjNameGrid).val()); }; BxDolStudioFormsCategories.prototype.reloadGrid = function (sModule) { var bReload = false; var oActions = $("[bx_grid_action_independent]"); if(!sModule){ oActions.addClass('bx-btn-disabled'); } else { oActions.removeClass('bx-btn-disabled'); } if (glGrids[this.sObjNameGrid]._oQueryAppend['module'] != sModule) { glGrids[this.sObjNameGrid]._oQueryAppend['module'] = sModule; bReload = true; } if (bReload) { var sValueSearch = $('#bx-grid-search-' + this.sObjNameGrid).val(); if (sValueSearch == this.sTextSearchInput) sValueSearch = ''; glGrids[this.sObjNameGrid].setFilter(sModule + this.sParamsDivider + sValueSearch, true); } }; /** @} */
/* */ require('../modules/es7.reflect.define-metadata'); require('../modules/es7.reflect.delete-metadata'); require('../modules/es7.reflect.get-metadata'); require('../modules/es7.reflect.get-metadata-keys'); require('../modules/es7.reflect.get-own-metadata'); require('../modules/es7.reflect.get-own-metadata-keys'); require('../modules/es7.reflect.has-metadata'); require('../modules/es7.reflect.has-own-metadata'); require('../modules/es7.reflect.metadata'); module.exports = require('../modules/_core').Reflect;
/*global window, document, Ghost, Backbone, $, _, NProgress */ (function () { "use strict"; Ghost.Router = Backbone.Router.extend({ routes: { '' : 'blog', 'content/' : 'blog', 'settings(/:pane)/' : 'settings', 'editor(/:id)/' : 'editor', 'debug/' : 'debug', 'register/' : 'register', 'signup/' : 'signup', 'signin/' : 'login', 'forgotten/' : 'forgotten', 'reset/:token/' : 'reset' }, signup: function () { Ghost.currentView = new Ghost.Views.Signup({ el: '.js-signup-box' }); }, login: function () { Ghost.currentView = new Ghost.Views.Login({ el: '.js-login-box' }); }, forgotten: function () { Ghost.currentView = new Ghost.Views.Forgotten({ el: '.js-forgotten-box' }); }, reset: function (token) { Ghost.currentView = new Ghost.Views.ResetPassword({ el: '.js-reset-box', token: token }); }, blog: function () { var posts = new Ghost.Collections.Posts(); NProgress.start(); posts.fetch({ data: { status: 'all', orderBy: ['updated_at', 'DESC'], where: { page: 'all' } } }).then(function () { Ghost.currentView = new Ghost.Views.Blog({ el: '#main', collection: posts }); NProgress.done(); }); }, settings: function (pane) { if (!pane) { // Redirect to settings/general if no pane supplied this.navigate('/settings/general/', { trigger: true, replace: true }); return; } // only update the currentView if we don't already have a Settings view if (!Ghost.currentView || !(Ghost.currentView instanceof Ghost.Views.Settings)) { Ghost.currentView = new Ghost.Views.Settings({ el: '#main', pane: pane }); } }, editor: function (id) { var post = new Ghost.Models.Post(); post.urlRoot = Ghost.paths.apiRoot + '/posts'; if (id) { post.id = id; post.fetch({ data: {status: 'all'}}).then(function () { Ghost.currentView = new Ghost.Views.Editor({ el: '#main', model: post }); }); } else { Ghost.currentView = new Ghost.Views.Editor({ el: '#main', model: post }); } }, debug: function () { Ghost.currentView = new Ghost.Views.Debug({ el: "#main" }); } }); }());
define(["jquery", "knockout", 'durandal/app', 'plugins/dialog', 'service!taskever/task', 'session'], function ($, ko, app, dialogs, taskService, session) { var maxTaskCount = 10; return function () { var that = this; // Private variables ////////////////////////////////////////////////// var $view; var eventSubscriptions = []; // Public fields ////////////////////////////////////////////////////// that.tasks = ko.mapping.fromJS([]); that.currentUserId = session.getCurrentUser().id(); that.refreshing = ko.observable(false); // Public methods ///////////////////////////////////////////////////// that.activate = function () { eventSubscriptions.push(app.on('te.task.new', function (data) { if (data.task.assignedUserId() == that.currentUserId) { that.refresh(); } })); eventSubscriptions.push(app.on('te.task.update', function (data) { if (data.task.assignedUserId() == that.currentUserId) { that.refresh(); } })); eventSubscriptions.push(app.on('te.task.delete', function (data) { if (data.task.assignedUserId() == that.currentUserId) { that.refresh(); } })); }; that.deactivate = function () { for (var i = 0; i < eventSubscriptions.length; i++) { eventSubscriptions[i].off(); } }; that.attached = function (view) { $view = $(view); that.refresh(); }; that.refresh = function () { if (that.refreshing()) { return; } that.refreshing(true); abp.ui.setBusy($view, { promise: taskService.getTasksByImportance({ assignedUserId: session.getCurrentUser().id(), maxResultCount: maxTaskCount }).done(function (data) { ko.mapping.fromJS(data.tasks, that.tasks); }).always(function () { that.refreshing(false); }) }); }; that.createTask = function () { dialogs.show('viewmodels/task/create'); }; }; });
//Date globlal var gDate; //Mostra o primeiro elemento passado enquanto oculta o segundo. //O terceiro elemento define até onde será feito o scroll da página function mostra(aparece,oculta,rola) { let aux = document.querySelector('#'+aparece); aux.style.display = "flex"; aux = document.querySelector('#'+oculta); aux.style.display = "none"; scroll(rola); } //Faz a página realizar o Scroll function scroll(rola) { let target_offset = $("#" + rola).offset(); let target_top = target_offset.top; $('html, body').animate({ scrollTop: target_top }, 0); } //Utiliza Ajax para receber dados do Servidor //Preenche o Calendário com os eventos function atividades(linha, mes, ano, dsemana) { $(function () { $.ajax({ url: 'php/load.php', //Arquivo a ser chamado no servidor data: { //Dados a serem enviados ao servidor mes: mes, ano: ano, linha: linha }, dataType: 'json', //Forma a se receber os dados //Caso receba dados com sucesso realiza a funcao //data contêm os dados recebidos success: function(data) { if(data!=null) { if(data.ano == ano && data.mes == mes) { let aux = parseInt(data.dia) + parseInt(dsemana); let divDia = document.querySelector("[id='"+String(aux)+"']"); //Não deixa mostrar mais que 6 linhas na div let str = divDia.innerHTML; str = str.split("<br>"); if(str.length < 7) { let atividade = data.atividade; //Não deixa mostra mais que 11 caracteres na div if(atividade.length>11) { atividade = atividade.substr(0,11); divDia.innerHTML += "<br>" + atividade + "..."; } else { divDia.innerHTML += "<br>" + atividade; } } atividades(++linha, mes, ano, dsemana); } } } }); }); } //Mostra o Calendário básico sem as atividades function calendario(d) { d.setDate(1); //Define a data para o primeiro dia do mês let dsemana = (d.getDay()+1); //Guarda o dia da semana em que o mês começa //Define o mês na div dentro do HTML let aux = document.querySelector('#mes'); switch (d.getMonth()) { case 0: aux.innerHTML = "Janeiro"; break; case 1: aux.innerHTML = "Fevereiro"; break; case 2: aux.innerHTML = "Março"; break; case 3: aux.innerHTML = "Abril"; break; case 4: aux.innerHTML = "Maio"; break; case 5: aux.innerHTML = "Junho"; break; case 6: aux.innerHTML = "Julho"; break; case 7: aux.innerHTML = "Agosto"; break; case 8: aux.innerHTML = "Setembro"; break; case 9: aux.innerHTML = "Outubro"; break; case 10: aux.innerHTML = "Novembro"; break; case 11: aux.innerHTML = "Dezembro"; break; } //Esvazia o calendário for(x=1; x<=42; x++) { let divDia = document.querySelector("[id='"+String(x)+"']"); divDia.innerHTML = " "; } //Limpa as cores do calendário let divDia = document.querySelectorAll("div.dia"); for(x=0; x<42; x++) { let auxDia = divDia.item(x); auxDia = auxDia.classList; auxDia.remove('grey'); auxDia.remove('lighten-2'); } //Colore os dias anteriores let colDia = 0; for(x=1; x<dsemana; x++) { let auxDia = divDia.item(colDia); auxDia = auxDia.classList; auxDia.add('grey'); auxDia.add('lighten-2'); colDia+=6; } //Pega o último dia do mês d.setMonth(d.getMonth()+1); d.setDate(0); //Define a data como o último dia do mês anterior let dfinal = d.getDate(); //Guarda a data //Preenche o calendário com os dias let auxd = 1; while(auxd<=dfinal) { let divDia = document.querySelector("[id='"+String(dsemana)+"']"); divDia.innerHTML = auxd + "<br>"; auxd++; dsemana++; } //Colore os dias posteriores colDia = 41; for(x=dsemana; x<=42; x++) { let auxDia = divDia.item(colDia); auxDia = auxDia.classList; auxDia.add('grey'); auxDia.add('lighten-2'); colDia-=6; if(colDia==-1) colDia=40; } //Retorna a data para o primeiro dia do mês d.setDate(1); } //Monta o Calendário completo function carrega(d) { //Salva a última data imposta gDate = d; calendario(d); atividades(1,(d.getMonth()+1),d.getFullYear(), d.getDay()); } //Trabalha com a Data inserida e transfere como um Date para a função Calendário function dataShow() { let ok = document.querySelector('#ok').classList; let mensagem = document.querySelector('#mensagem'); let data = document.querySelector('#data'); let preData = data.value.split('/'); let mes = (parseInt(preData[0])-1); if(mes<0 || mes>11 || data.value == "") { mensagem.style.display = "block"; ok.remove('blue'); ok.add('red'); carrega(new Date()); } else { mensagem.style.display = "none"; ok.remove('red'); ok.add('blue'); let d = new Date(preData[1], mes,1); carrega(d); } } //Filtra as atividades mostradas function filtro() { //Recupera o valor da última data salva let d = gDate; //Parâmetros para filtragem let atv = document.querySelector("[id=fAtividade]"); let mat = document.querySelector("[id=fMateria]"); //Verifica se foi passado parâmetros let mensagem = document.querySelector('#fMensagem'); let botao = document.querySelector('#filtrar').classList; if(atv.value=="" && mat.value=="") { mensagem.style.display = "block"; botao.remove('blue'); botao.add('red'); scroll('fMensagem'); carrega(d); } else { mensagem.style.display = "none"; botao.remove('red'); botao.add('blue'); //Limpa o calendário calendario(d); //Organiza a data mes = gDate.getMonth()+1; ano = gDate.getFullYear(); dsemana = gDate.getDay(); //Exibe as atividades já filtradas fAtividade(1,mes,ano,dsemana,atv.value,mat.value); } } //Consulta no servidor os dados com filtro function fAtividade(linha, mes, ano, dsemana, atv, mat) { $(function () { $.ajax({ url: 'php/load.php', //Arquivo a ser chamado no servidor data: { //Dados a serem enviados ao servidor mes: mes, ano: ano, linha: linha }, dataType: 'json', //Forma a se receber os dados //Caso receba dados com sucesso realiza a funcao //data contêm os dados recebidos success: function(data) { //Filtragem usando apenas o parâmetro atividade if(data!=null) { if(atv!="") { if(data.ano == ano && data.mes == mes && data.atividade == atv) { let aux = parseInt(data.dia) + parseInt(dsemana); let divDia = document.querySelector("[id='"+String(aux)+"']"); //Não deixa mostrar mais que 6 linhas na div let str = divDia.innerHTML; str = str.split("<br>"); if(str.length < 7) { let atividade = data.atividade; //Não deixa mostra mais que 11 caracteres na div if(atividade.length>11) { atividade = atividade.substr(0,11); divDia.innerHTML += "<br>" + atividade + "..."; } else { divDia.innerHTML += "<br>" + atividade; } } fAtividade(++linha, mes, ano, dsemana, atv, mat); } } else { //Filtragem usando o parâmetro materia if(data.ano == ano && data.mes == mes && data.materia == mat) { let aux = parseInt(data.dia) + parseInt(dsemana); let divDia = document.querySelector("[id='"+String(aux)+"']"); //Não deixa mostrar mais que 6 linhas na div let str = divDia.innerHTML; str = str.split("<br>"); if(str.length < 7) { let atividade = data.atividade; //Não deixa mostra mais que 11 caracteres na div if(atividade.length>11) { atividade = atividade.substr(0,11); divDia.innerHTML += "<br>" + atividade + "..."; } else { divDia.innerHTML += "<br>" + atividade; } } fAtividade(++linha, mes, ano, dsemana, atv, mat); } } fAtividade(++linha, mes, ano, dsemana, atv, mat); } } }); }); } //Valida os campos de inserção function validar(frm) { let mensagem = document.querySelector('#mensagem2'); let botao = document.querySelector('#inserir').classList; let data = document.querySelector('#dataForm'); let preData = data.value.split('/'); let dia = parseInt(preData[2]); let mes = parseInt(preData[1]); if(frm.atividade.value == "" || frm.dataForm.value == "" || frm.materia.value == "" || mes<1 || mes>12 || dia<1 || dia>31) { mensagem.style.display = "block"; botao.remove('blue'); botao.add('red'); scroll('mensagem2'); return false; } else { mensagem.style.display = "none"; botao.remove('red'); botao.add('blue'); } frm.submit(); } //Preenche os Models com as atividades function preenche(div) { div = document.querySelector("[id='"+String(div)+"']"); let dia = div.innerHTML.split("<"); dia = dia[0]; let mes = (gDate.getMonth()+1); let ano = gDate.getFullYear(); //Limpa o model let box = document.querySelector('#mAtividades'); box.innerHTML = ""; completoAtividades(1, dia, mes,ano); } //Retorna as atividades completas do servidor function completoAtividades(linha, dia, mes, ano) { $(function () { $.ajax({ url: 'php/load.php', //Arquivo a ser chamado no servidor data: { //Dados a serem enviados ao servidor mes: mes, ano: ano, linha: linha }, dataType: 'json', //Forma a se receber os dados //Caso receba dados com sucesso realiza a funcao //data contêm os dados recebidos success: function(data) { if(data!=null) { if(data.ano == ano && data.mes == mes && data.dia == dia) { let box = document.querySelector('#mAtividades'); box.innerHTML += "<b>Atividade:</b> " + data.atividade + "<br>"; box.innerHTML += "<b>Descrição: </b>" + data.descricao + "<br>"; box.innerHTML += "<b>Matéria: </b>" + data.materia + "&nbsp&nbsp&nbsp&" + "nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp"; if(data.hora!="00:00:00") box.innerHTML += "<b>Hora: </b>" + data.hora + "\n\n"; completoAtividades(++linha, dia, mes, ano); box.innerHTML += "<br>________________________________________________" + "_______________________________________________________________" + "____________________________________<br><br>"; } else { if(data!=null) completoAtividades(++linha, dia, mes, ano); } } } }); }); }
'use strict' var util = require('util') var hasOwn = Object.prototype.hasOwnProperty exports.setPrivate = function (ctx, key, value) { Object.defineProperty(ctx, key, { value: value, writable: false, enumerable: false, configurable: false }) } exports.slice = function (args, start) { start = start || 0 if (start >= args.length) return [] var len = args.length var ret = Array(len - start) while (len-- > start) ret[len - start] = args[len] return ret } exports.log = function (err) { var silent = this.silent if (util.isError(err)) { arguments[0] = err.stack silent = false } if (!silent) console.log.apply(console, arguments) } exports.each = function (obj, iterator, context, arrayLike) { var i, l, key if (!obj) return if (arrayLike == null) arrayLike = Array.isArray(obj) if (arrayLike) { for (i = 0, l = obj.length; i < l; i++) iterator.call(context, obj[i], i, obj) } else { for (key in obj) { if (hasOwn.call(obj, key)) iterator.call(context, obj[key], key, obj) } } }
/*! * jQuery JavaScript Library v1.10.2 -wrap,-offset,-deprecated * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2013-07-07T16:56Z */ (function( window, undefined ) { // Can't do this because several apps including ASP.NET trace // the stack via arguments.caller.callee and Firefox dies if // you try to trace through "use strict" call chains. (#13335) // Support: Firefox 18+ //"use strict"; var // The deferred used on DOM ready readyList, // A central reference to the root jQuery(document) rootjQuery, // Support: IE<10 // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined` core_strundefined = typeof undefined, // Use the correct document accordingly with window argument (sandbox) location = window.location, document = window.document, docElem = document.documentElement, // 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.10.2 -wrap,-offset,-deprecated", // 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 = /^(?:\s*(<[\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 completed = function( event ) { // readyState === "complete" is good enough for us to call the dom ready in oldIE if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { detach(); jQuery.ready(); } }, // Clean-up method for dom ready events detach = function() { if ( document.addEventListener ) { document.removeEventListener( "DOMContentLoaded", completed, false ); window.removeEventListener( "load", completed, false ); } else { document.detachEvent( "onreadystatechange", completed ); window.detachEvent( "onload", completed ); } }; 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, 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 src, copyIsArray, copy, name, options, 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({ // Unique for each copy of jQuery on the page // Non-digits removed to match rinlinejQuery expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), 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 ) { /* jshint eqeqeq: false */ 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 ) { var key; // 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; } // Support: IE<9 // Handle iteration over inherited properties before own properties. if ( jQuery.support.ownLast ) { for ( key in obj ) { return core_hasOwn.call( obj, key ); } } // Own properties are enumerated firstly, so to speed up, // if last one is own, then all properties are own. 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 args, proxy, tmp; 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(); }, // A method for quickly swapping in/out CSS properties to get correct calculations. // Note: this method belongs to the css module but it's needed here for the support module. // If support gets modularized, this method should be moved back to the css module. 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; } }); 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", completed, false ); // A fallback to window.onload, that will always work window.addEventListener( "load", completed, false ); // If IE event model is used } else { // Ensure firing before onload, maybe late but safe also for iframes document.attachEvent( "onreadystatechange", completed ); // A fallback to window.onload, that will always work window.attachEvent( "onload", completed ); // 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 ); } // detach all dom ready events detach(); // 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); /*! * Sizzle CSS Selector Engine v1.10.2 * http://sizzlejs.com/ * * Copyright 2013 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2013-07-03 */ (function( window, undefined ) { var i, support, cachedruns, Expr, getText, isXML, compile, outermostContext, sortInput, // Local document vars setDocument, document, docElem, documentIsHTML, rbuggyQSA, rbuggyMatches, matches, contains, // Instance-specific data expando = "sizzle" + -(new Date()), preferredDoc = window.document, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), hasDuplicate = false, sortOrder = function( a, b ) { if ( a === b ) { hasDuplicate = true; return 0; } return 0; }, // General-purpose constants strundefined = typeof undefined, MAX_NEGATIVE = 1 << 31, // Instance methods hasOwn = ({}).hasOwnProperty, arr = [], pop = arr.pop, push_native = arr.push, 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; }, booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", // 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 attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + "*(?:([*^$|!~]?=)" + 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 + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), rsibling = new RegExp( whitespace + "*[+~]" ), rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ), rpseudo = new RegExp( pseudos ), ridentifier = new RegExp( "^" + identifier + "$" ), matchExpr = { "ID": new RegExp( "^#(" + characterEncoding + ")" ), "CLASS": new RegExp( "^\\.(" + 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" ), "bool": new RegExp( "^(?:" + booleans + ")$", "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" ) }, rnative = /^[^{]+\{\s*\[native \w/, // 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, // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), funescape = function( _, escaped, escapedWhitespace ) { var high = "0x" + escaped - 0x10000; // NaN means non-codepoint // Support: Firefox // Workaround erroneous numeric interpretation of +"0x" return high !== high || escapedWhitespace ? escaped : // BMP codepoint high < 0 ? String.fromCharCode( high + 0x10000 ) : // Supplemental Plane codepoint (surrogate pair) String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); }; // Optimize for push.apply( _, NodeList ) try { push.apply( (arr = slice.call( preferredDoc.childNodes )), preferredDoc.childNodes ); // Support: Android<4.0 // Detect silently failing push.apply arr[ preferredDoc.childNodes.length ].nodeType; } catch ( e ) { push = { apply: arr.length ? // Leverage slice if possible function( target, els ) { push_native.apply( target, slice.call(els) ); } : // Support: IE<9 // Otherwise append directly function( target, els ) { var j = target.length, i = 0; // Can't trust NodeList.length while ( (target[j++] = els[i++]) ) {} target.length = j - 1; } }; } 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 ( documentIsHTML && !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, context.getElementsByTagName( selector ) ); return results; // Speed-up: Sizzle(".CLASS") } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { push.apply( results, context.getElementsByClassName( m ) ); return results; } } // QSA path if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { nid = old = 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, newContext.querySelectorAll( newSelector ) ); return results; } catch(qsaError) { } finally { if ( !old ) { context.removeAttribute("id"); } } } } } // All others return select( selector.replace( rtrim, "$1" ), context, results, seed ); } /** * 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 keys = []; function cache( 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); } return cache; } /** * 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 { // Remove from its parent by default if ( div.parentNode ) { div.parentNode.removeChild( div ); } // release memory in IE div = null; } } /** * Adds the same handler for all of the specified attrs * @param {String} attrs Pipe-separated list of attributes * @param {Function} handler The method that will be applied */ function addHandle( attrs, handler ) { var arr = attrs.split("|"), i = attrs.length; while ( i-- ) { Expr.attrHandle[ arr[i] ] = handler; } } /** * Checks document order of two siblings * @param {Element} a * @param {Element} b * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b */ function siblingCheck( a, b ) { var cur = b && a, diff = cur && a.nodeType === 1 && b.nodeType === 1 && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE ); // Use IE sourceIndex if available on both nodes if ( diff ) { return diff; } // Check if b follows a if ( cur ) { while ( (cur = cur.nextSibling) ) { if ( cur === b ) { return -1; } } } return a ? 1 : -1; } /** * Returns a function to use in pseudos for input types * @param {String} type */ 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 * @param {String} type */ 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 * @param {Function} fn */ 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]); } } }); }); } /** * 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; }; // Expose support vars for convenience support = Sizzle.support = {}; /** * 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, parent = doc.defaultView; // 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 documentIsHTML = !isXML( doc ); // Support: IE>8 // If iframe document is assigned to "document" variable and if iframe has been reloaded, // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 // IE6-8 do not support the defaultView property so parent will be undefined if ( parent && parent.attachEvent && parent !== parent.top ) { parent.attachEvent( "onbeforeunload", function() { setDocument(); }); } /* Attributes ---------------------------------------------------------------------- */ // Support: IE<8 // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) support.attributes = assert(function( div ) { div.className = "i"; return !div.getAttribute("className"); }); /* getElement(s)By* ---------------------------------------------------------------------- */ // Check if getElementsByTagName("*") returns only elements support.getElementsByTagName = assert(function( div ) { div.appendChild( doc.createComment("") ); return !div.getElementsByTagName("*").length; }); // Check if getElementsByClassName can be trusted support.getElementsByClassName = assert(function( div ) { div.innerHTML = "<div class='a'></div><div class='a i'></div>"; // Support: Safari<4 // Catch class over-caching div.firstChild.className = "i"; // Support: Opera<10 // Catch gEBCN failure to find non-leading classes return div.getElementsByClassName("i").length === 2; }); // Support: IE<10 // Check if getElementById returns elements by name // The broken getElementById methods don't pick up programatically-set names, // so use a roundabout getElementsByName test support.getById = assert(function( div ) { docElem.appendChild( div ).id = expando; return !doc.getElementsByName || !doc.getElementsByName( expando ).length; }); // ID find and filter if ( support.getById ) { Expr.find["ID"] = function( id, context ) { if ( typeof context.getElementById !== strundefined && documentIsHTML ) { 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 { // Support: IE6/7 // getElementById is not reliable as a find shortcut delete Expr.find["ID"]; 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.getElementsByTagName ? 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 === "*" ) { while ( (elem = results[i++]) ) { if ( elem.nodeType === 1 ) { tmp.push( elem ); } } return tmp; } return results; }; // Class Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { return context.getElementsByClassName( className ); } }; /* QSA/matchesSelector ---------------------------------------------------------------------- */ // QSA and matchesSelector support // matchesSelector(:active) reports false when true (IE9/Opera 11.5) rbuggyMatches = []; // qSa(:focus) reports false when true (Chrome 21) // We allow this because of a bug in IE8/9 that throws an error // whenever `document.activeElement` is accessed on an iframe // So, we allow :focus to pass through QSA all the time to avoid the IE error // See http://bugs.jquery.com/ticket/13378 rbuggyQSA = []; if ( (support.qsa = rnative.test( 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 explicitly // setting a boolean content attribute, // since its presence should be enough // http://bugs.jquery.com/ticket/12359 div.innerHTML = "<select><option selected=''></option></select>"; // Support: IE8 // Boolean attributes and "value" are not treated correctly if ( !div.querySelectorAll("[selected]").length ) { rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); } // 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 ) { // Support: Opera 10-12/IE8 // ^= $= *= and empty values // Should not select anything // Support: Windows 8 Native Apps // The type attribute is restricted during .innerHTML assignment var input = doc.createElement("input"); input.setAttribute( "type", "hidden" ); div.appendChild( input ).setAttribute( "t", "" ); if ( div.querySelectorAll("[t^='']").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 = rnative.test( (matches = docElem.webkitMatchesSelector || docElem.mozMatchesSelector || 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 = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); /* Contains ---------------------------------------------------------------------- */ // Element contains another // Purposefully does not implement inclusive descendent // As in, an element does not contain itself contains = rnative.test( 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; }; /* Sorting ---------------------------------------------------------------------- */ // Document order sorting sortOrder = docElem.compareDocumentPosition ? function( a, b ) { // Flag for duplicate removal if ( a === b ) { hasDuplicate = true; return 0; } var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b ); if ( compare ) { // Disconnected nodes if ( compare & 1 || (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { // Choose the first element that is related to our preferred document if ( a === doc || contains(preferredDoc, a) ) { return -1; } if ( b === doc || contains(preferredDoc, b) ) { return 1; } // Maintain original order return sortInput ? ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : 0; } return compare & 4 ? -1 : 1; } // Not directly comparable, sort on existence of method return a.compareDocumentPosition ? -1 : 1; } : function( a, b ) { var cur, i = 0, aup = a.parentNode, bup = b.parentNode, ap = [ a ], bp = [ b ]; // Exit early if the nodes are identical if ( a === b ) { hasDuplicate = true; return 0; // Parentless nodes are either documents or disconnected } else if ( !aup || !bup ) { return a === doc ? -1 : b === doc ? 1 : aup ? -1 : bup ? 1 : sortInput ? ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : 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; }; return doc; }; 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']" ); if ( support.matchesSelector && documentIsHTML && ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && ( !rbuggyQSA || !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 ) { // Set document vars if needed if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } var fn = Expr.attrHandle[ name.toLowerCase() ], // Don't get fooled by Object.prototype properties (jQuery #13807) val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? fn( elem, name, !documentIsHTML ) : undefined; return val === undefined ? support.attributes || !documentIsHTML ? elem.getAttribute( name ) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null : val; }; Sizzle.error = function( msg ) { throw new Error( "Syntax error, unrecognized expression: " + msg ); }; /** * Document sorting and removing duplicates * @param {ArrayLike} results */ Sizzle.uniqueSort = function( results ) { var elem, duplicates = [], j = 0, i = 0; // Unless we *know* we can detect duplicates, assume their presence hasDuplicate = !support.detectDuplicates; sortInput = !support.sortStable && results.slice( 0 ); results.sort( sortOrder ); if ( hasDuplicate ) { while ( (elem = results[i++]) ) { if ( elem === results[ i ] ) { j = duplicates.push( i ); } } while ( j-- ) { results.splice( duplicates[ j ], 1 ); } } return results; }; /** * 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, attrHandle: {}, 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[3] && match[4] !== undefined ) { 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( nodeNameSelector ) { var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); return nodeNameSelector === "*" ? function() { return true; } : 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( typeof elem.className === "string" && 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.slice( -check.length ) === check : operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : operator === "|=" ? result === check || result.slice( 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 identifier if ( !ridentifier.test(lang || "") ) { Sizzle.error( "unsupported lang: " + lang ); } lang = lang.replace( runescape, funescape ).toLowerCase(); return function( elem ) { var elemLang; do { if ( (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("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; }) } }; Expr.pseudos["nth"] = Expr.pseudos["eq"]; // 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 ); } // Easy API for creating new setFilters function setFilters() {} setFilters.prototype = Expr.filters = Expr.pseudos; Expr.setFilters = new setFilters(); 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 && 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( // If the preceding token was a descendant combinator, insert an implicit any-element `*` tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) ).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 ), // Use integer dirruns iff this is the outermost matcher dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); if ( outermost ) { outermostContext = context !== document && context; cachedruns = matcherCachedRuns; } // Add elements passing elementMatchers directly to results // Keep `i` a string if there are no elements so `matchedCount` will be "00" below for ( ; (elem = elems[i]) != null; i++ ) { if ( byElement && elem ) { j = 0; while ( (matcher = elementMatchers[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 matchedCount += i; if ( bySet && i !== matchedCount ) { j = 0; while ( (matcher = setMatchers[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" && support.getById && context.nodeType === 9 && documentIsHTML && 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 i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; while ( 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, seed ); 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, !documentIsHTML, results, rsibling.test( selector ) ); return results; } // One-time assignments // Sort stability support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; // Support: Chrome<14 // Always assume duplicates if they aren't passed to the comparison function support.detectDuplicates = hasDuplicate; // Initialize against the default document setDocument(); // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) // Detached nodes confoundingly follow *each other* support.sortDetached = assert(function( div1 ) { // Should return 1, but returns 4 (following) return div1.compareDocumentPosition( document.createElement("div") ) & 1; }); // Support: IE<8 // Prevent attribute/property "interpolation" // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx if ( !assert(function( div ) { div.innerHTML = "<a href='#'></a>"; return div.firstChild.getAttribute("href") === "#" ; }) ) { addHandle( "type|href|height|width", function( elem, name, isXML ) { if ( !isXML ) { return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); } }); } // Support: IE<9 // Use defaultValue in place of getAttribute("value") if ( !support.attributes || !assert(function( div ) { div.innerHTML = "<input/>"; div.firstChild.setAttribute( "value", "" ); return div.firstChild.getAttribute( "value" ) === ""; }) ) { addHandle( "value", function( elem, name, isXML ) { if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { return elem.defaultValue; } }); } // Support: IE<9 // Use getAttributeNode to fetch booleans when getAttribute lies if ( !assert(function( div ) { return div.getAttribute("disabled") == null; }) ) { addHandle( booleans, function( elem, name, isXML ) { var val; if ( !isXML ) { return (val = elem.getAttributeNode( name )) && val.specified ? val.value : elem[ name ] === true ? name.toLowerCase() : null; } }); } 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 ); // 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 // Flag to know if list is currently firing firing, // Last fire value (for non-forgettable lists) memory, // Flag to know if list was already fired fired, // End of the loop when firing firingLength, // Index of currently firing callback (modified by remove if needed) firingIndex, // First callback to fire (used internally by add and fireWith) firingStart, // 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; }, // Check if a given callback is in the list. // If no argument is given, return whether or not list has callbacks attached. has: function( fn ) { return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); }, // Remove all callbacks from the list empty: function() { list = []; firingLength = 0; 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 ) { if ( list && ( !fired || stack ) ) { args = args || []; args = [ context, args.slice ? args.slice() : args ]; 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( support ) { var all, a, input, select, fragment, opt, 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'/>"; // Finish early in limited (non-browser) environments all = div.getElementsByTagName("*") || []; a = div.getElementsByTagName("a")[ 0 ]; if ( !a || !a.style || !all.length ) { return support; } // 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"; // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) support.getSetAttribute = div.className !== "t"; // IE strips leading whitespace when .innerHTML is used support.leadingWhitespace = div.firstChild.nodeType === 3; // Make sure that tbody elements aren't automatically inserted // IE will insert them into empty tables support.tbody = !div.getElementsByTagName("tbody").length; // Make sure that link elements get serialized correctly by innerHTML // This requires a wrapper element in IE support.htmlSerialize = !!div.getElementsByTagName("link").length; // Get the style information from getAttribute // (IE uses .cssText instead) support.style = /top/.test( a.getAttribute("style") ); // Make sure that URLs aren't manipulated // (IE normalizes it by default) support.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 support.opacity = /^0.5/.test( a.style.opacity ); // Verify style float existence // (IE uses styleFloat instead of cssFloat) support.cssFloat = !!a.style.cssFloat; // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) support.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) support.optSelected = opt.selected; // Tests for enctype support on a form (#6743) support.enctype = !!document.createElement("form").enctype; // Makes sure cloning an html5 element does not cause problems // Where outerHTML is undefined, this still works support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>"; // Will be defined later support.inlineBlockNeedsLayout = false; support.shrinkWrapBlocks = false; support.pixelPosition = false; support.deleteExpando = true; support.noCloneEvent = true; support.reliableMarginRight = true; support.boxSizingReliable = true; // Make sure checked status is properly cloned input.checked = true; support.noCloneChecked = input.cloneNode( true ).checked; // Make sure that the options inside disabled selects aren't marked as disabled // (WebKit marks them as disabled) select.disabled = true; support.optDisabled = !opt.disabled; // 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) 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"; // Support: IE<9 // Iteration over object's inherited properties before its own. for ( i in jQuery( support ) ) { break; } support.ownLast = i !== "0"; // 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%;"; // Workaround failing boxSizing test due to offsetWidth returning wrong value // with some non-1 values of body zoom, ticket #13543 jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() { support.boxSizing = div.offsetWidth === 4; }); // 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 !== core_strundefined ) { // 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 ); if ( support.inlineBlockNeedsLayout ) { // Prevent IE 6 from affecting layout for positioned elements #11048 // Prevent IE from shrinking the body in IE 7 mode #12869 // Support: IE<8 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 ret, thisCache, internalKey = jQuery.expando, // 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)) && data === undefined && typeof name === "string" ) { 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 ) { id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++; } else { id = internalKey; } } if ( !cache[ id ] ) { // Avoid exposing jQuery metadata on plain JS objects when the object // is serialized using JSON.stringify cache[ id ] = isNode ? {} : { 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 ( typeof name === "string" ) { // 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 ) { if ( !jQuery.acceptData( elem ) ) { return; } var thisCache, i, 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 ) ); } i = name.length; while ( 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(thisCache) : !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) /* jshint eqeqeq: false */ } else if ( jQuery.support.deleteExpando || cache != cache.window ) { /* jshint eqeqeq: true */ delete cache[ id ]; // When all else fails, null } else { cache[ id ] = null; } } jQuery.extend({ cache: {}, // The following elements throw uncatchable exceptions if you // attempt to add expando properties to them. noData: { "applet": true, "embed": true, // Ban all objects except for Flash (which handle expandos) "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" }, 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 ); }, removeData: function( elem, name ) { return internalRemoveData( elem, name ); }, // 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 ) { // Do not set data on non-element because it will not be cleared (#8335). if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { return false; } 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, data = null, i = 0, elem = this[0]; // Special expections of .data basically thwart jQuery.access, // so implement the relevant behavior ourselves // 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-") === 0 ) { name = jQuery.camelCase( name.slice(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 arguments.length > 1 ? // Sets one value this.each(function() { jQuery.data( this, key, value ); }) : // Gets one value // Try to fetch any internally stored data first elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; }, 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--; } 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\f]/g, rreturn = /\r/g, rfocusable = /^(?:input|select|textarea|button|object)$/i, rclickable = /^(?:a|area)$/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; if ( typeof stateVal === "boolean" && type === "string" ) { return stateVal ? this.addClass( value ) : this.removeClass( value ); } 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 ), classNames = value.match( core_rnotwhite ) || []; while ( (className = classNames[ i++ ]) ) { // check each className given, space separated list if ( self.hasClass( className ) ) { self.removeClass( className ); } else { self.addClass( className ); } } // Toggle whole class name } else if ( type === core_strundefined || 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 ret, hooks, 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; if ( this.nodeType !== 1 ) { return; } if ( isFunction ) { val = value.call( this, i, jQuery( this ).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 ) { // Use proper attribute retrieval(#6932, #12072) var val = jQuery.find.attr( elem, "value" ); return val != null ? val : 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 optionSet, option, options = elem.options, values = jQuery.makeArray( value ), i = options.length; while ( i-- ) { option = options[ i ]; if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) { optionSet = true; } } // force browsers to behave consistently when non-matching value is set if ( !optionSet ) { elem.selectedIndex = -1; } return values; } } }, attr: function( elem, name, value ) { var hooks, ret, 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 === core_strundefined ) { return jQuery.prop( elem, name, value ); } // All attributes are lowercase // Grab necessary hook if one is defined if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { name = name.toLowerCase(); hooks = jQuery.attrHooks[ name ] || ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook ); } if ( value !== undefined ) { if ( value === null ) { jQuery.removeAttr( elem, name ); } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { return ret; } else { elem.setAttribute( name, value + "" ); return value; } } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { return ret; } else { ret = jQuery.find.attr( elem, 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 ( jQuery.expr.match.bool.test( name ) ) { // Set corresponding property to false if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { elem[ propName ] = false; // Support: IE<9 // Also clear defaultChecked/defaultSelected (if appropriate) } else { elem[ jQuery.camelCase( "default-" + name ) ] = 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: { "for": "htmlFor", "class": "className" }, 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 ) { return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ? ret : ( elem[ name ] = value ); } else { return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ? ret : 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/ // Use proper attribute retrieval(#12072) var tabindex = jQuery.find.attr( elem, "tabindex" ); return tabindex ? parseInt( tabindex, 10 ) : rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? 0 : -1; } } } }); // Hooks for boolean attributes boolHook = { 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; } }; jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr; jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ? function( elem, name, isXML ) { var fn = jQuery.expr.attrHandle[ name ], ret = isXML ? undefined : /* jshint eqeqeq: false */ (jQuery.expr.attrHandle[ name ] = undefined) != getter( elem, name, isXML ) ? name.toLowerCase() : null; jQuery.expr.attrHandle[ name ] = fn; return ret; } : function( elem, name, isXML ) { return isXML ? undefined : elem[ jQuery.camelCase( "default-" + name ) ] ? name.toLowerCase() : null; }; }); // fix oldIE attroperties if ( !getSetInput || !getSetAttribute ) { jQuery.attrHooks.value = { 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 = { 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; } }; jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords = // Some attributes are constructed with empty-string values when not defined function( elem, name, isXML ) { var ret; return isXML ? undefined : (ret = elem.getAttributeNode( name )) && ret.value !== "" ? ret.value : null; }; jQuery.valHooks.button = { get: function( elem, name ) { var ret = elem.getAttributeNode( name ); return ret && ret.specified ? ret.value : undefined; }, set: nodeHook.set }; // Set contenteditable to false on removals(#10429) // Setting to empty string throws an error as an invalid value jQuery.attrHooks.contenteditable = { 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 ] = { 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 ) { // 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 = { 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; } }; } jQuery.each([ "tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable" ], function() { jQuery.propFix[ this.toLowerCase() ] = this; }); // IE6/7 call enctype encoding if ( !jQuery.support.enctype ) { jQuery.propFix.enctype = "encoding"; } // Radios and checkboxes getter/setter jQuery.each([ "radio", "checkbox" ], function() { jQuery.valHooks[ this ] = { set: function( elem, value ) { if ( jQuery.isArray( value ) ) { return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); } } }; if ( !jQuery.support.checkOn ) { jQuery.valHooks[ this ].get = function( elem ) { // Support: Webkit // "" is returned instead of "on" if a value isn't specified return elem.getAttribute("value") === null ? "on" : elem.value; }; } }); var rformElems = /^(?:input|select|textarea)$/i, rkeyEvent = /^key/, rmouseEvent = /^(?:mouse|contextmenu)|click/, rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; function returnTrue() { return true; } function returnFalse() { return false; } function safeActiveElement() { try { return document.activeElement; } catch ( err ) { } } /* * 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 tmp, events, t, handleObjIn, special, eventHandle, handleObj, handlers, type, namespaces, origType, elemData = jQuery._data( elem ); // Don't attach events to noData or text/comment nodes (but allow plain objects) 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 !== core_strundefined && (!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 types = ( types || "" ).match( core_rnotwhite ) || [""]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[t] ) || []; type = origType = tmp[1]; namespaces = ( tmp[2] || "" ).split( "." ).sort(); // There *must* be a type, no attaching namespace-only handlers if ( !type ) { continue; } // 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, handleObj, tmp, origCount, t, events, 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 handle, ontype, cur, bubbleType, special, tmp, i, eventPath = [ elem || document ], type = core_hasOwn.call( event, "type" ) ? event.type : event, namespaces = core_hasOwn.call( 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 ); // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) event.isTrigger = onlyHandlers ? 2 : 3; 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( eventPath.pop(), data ) === false) && 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, ret, handleObj, matched, j, 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 sel, handleObj, matches, i, 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") ) { /* jshint eqeqeq: false */ for ( ; cur != this; cur = cur.parentNode || this ) { /* jshint eqeqeq: true */ // Don't check non-elements (#13208) // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) if ( cur.nodeType === 1 && (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, copy, type = event.type, originalEvent = event, fixHook = this.fixHooks[ type ]; if ( !fixHook ) { this.fixHooks[ type ] = fixHook = rmouseEvent.test( type ) ? this.mouseHooks : rkeyEvent.test( type ) ? this.keyHooks : {}; } 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 body, eventDoc, doc, 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 }, focus: { // Fire native event if possible so blur/focus sequence is correct trigger: function() { if ( this !== safeActiveElement() && 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 === safeActiveElement() && this.blur ) { this.blur(); return false; } }, delegateType: "focusout" }, 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; } }, // For cross-browser consistency, don't fire native .click() on links _default: function( event ) { return jQuery.nodeName( event.target, "a" ); } }, 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 ] === core_strundefined ) { 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 type, origFn; // 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 ); }); }, 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 ); } } }); var isSimple = /^.[^:#\[\.,]*$/, rparentsprev = /^(?:parents|prev(?:Until|All))/, 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 = this, len = self.length; if ( typeof selector !== "string" ) { return this.pushStack( jQuery( selector ).filter(function() { for ( i = 0; i < len; i++ ) { if ( jQuery.contains( self[ i ], this ) ) { return true; } } }) ); } for ( i = 0; i < len; i++ ) { jQuery.find( selector, self[ i ], ret ); } // Needed because $( selector, context ) becomes $( context ).find( selector ) ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); ret.selector = this.selector ? this.selector + " " + 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 || [], true) ); }, filter: function( selector ) { return this.pushStack( winnow(this, selector || [], false) ); }, is: function( selector ) { return !!winnow( this, // 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". typeof selector === "string" && rneedsContext.test( selector ) ? jQuery( selector ) : selector || [], false ).length; }, 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++ ) { for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { // Always skip document fragments if ( cur.nodeType < 11 && (pos ? pos.index(cur) > -1 : // Don't pass non-elements to Sizzle cur.nodeType === 1 && jQuery.find.matchesSelector(cur, selectors)) ) { cur = ret.push( cur ); break; } } } 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) ); } }); 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 ( name.slice( -5 ) !== "Until" ) { selector = until; } if ( selector && typeof selector === "string" ) { ret = jQuery.filter( selector, ret ); } if ( this.length > 1 ) { // Remove duplicates if ( !guaranteedUnique[ name ] ) { ret = jQuery.unique( ret ); } // Reverse order for parents* and prev-derivatives if ( rparentsprev.test( name ) ) { ret = ret.reverse(); } } return this.pushStack( ret ); }; }); jQuery.extend({ filter: function( expr, elems, not ) { var elem = elems[ 0 ]; if ( not ) { expr = ":not(" + expr + ")"; } return elems.length === 1 && elem.nodeType === 1 ? jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { return elem.nodeType === 1; })); }, 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, not ) { if ( jQuery.isFunction( qualifier ) ) { return jQuery.grep( elements, function( elem, i ) { /* jshint -W018 */ return !!qualifier.call( elem, i, elem ) !== not; }); } if ( qualifier.nodeType ) { return jQuery.grep( elements, function( elem ) { return ( elem === qualifier ) !== not; }); } if ( typeof qualifier === "string" ) { if ( isSimple.test( qualifier ) ) { return jQuery.filter( qualifier, elements, not ); } qualifier = jQuery.filter( qualifier, elements ); } return jQuery.grep( elements, function( elem ) { return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not; }); } 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 ); }, append: function() { return this.domManip( arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.appendChild( elem ); } }); }, prepend: function() { return this.domManip( arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.insertBefore( elem, target.firstChild ); } }); }, before: function() { return this.domManip( arguments, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this ); } }); }, after: function() { return this.domManip( arguments, 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, elems = selector ? jQuery.filter( selector, this ) : this, i = 0; for ( ; (elem = elems[i]) != null; i++ ) { 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() { var // Snapshot the DOM in case .domManip sweeps something relevant into its fragment args = jQuery.map( this, function( elem ) { return [ elem.nextSibling, elem.parentNode ]; }), i = 0; // Make the changes, replacing each context element with the new content this.domManip( arguments, function( elem ) { var next = args[ i++ ], parent = args[ i++ ]; if ( parent ) { // Don't use the snapshot next if it has moved (#13810) if ( next && next.parentNode !== parent ) { next = this.nextSibling; } jQuery( this ).remove(); parent.insertBefore( elem, next ); } // Allow new content to include elements from the context set }, true ); // Force removal if there was no new content (e.g., from empty arguments) return i ? this : this.remove(); }, detach: function( selector ) { return this.remove( selector, true ); }, domManip: function( args, callback, allowIntersection ) { // Flatten any nested arrays args = core_concat.apply( [], args ); var first, node, hasScripts, scripts, doc, fragment, 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, self.html() ); } self.domManip( args, callback, allowIntersection ); }); } if ( l ) { fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this ); first = fragment.firstChild; if ( fragment.childNodes.length === 1 ) { fragment = first; } if ( first ) { 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( 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._evalUrl( node.src ); } else { jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); } } } } // Fix #11809: Avoid leaking memory fragment = first = null; } } return this; } }); // Support: IE<8 // Manipulating tables requires a tbody function manipulationTarget( elem, content ) { return jQuery.nodeName( elem, "table" ) && jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ? elem.getElementsByTagName("tbody")[0] || elem.appendChild( elem.ownerDocument.createElement("tbody") ) : elem; } // Replace/restore the type attribute of script elements for safe DOM manipulation function disableScript( elem ) { elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + 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, e, data; // 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 !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : typeof context.querySelectorAll !== core_strundefined ? 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, node, clone, i, srcElements, 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 j, elem, contains, tmp, tag, tbody, wrap, 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 elem, type, id, data, 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 !== core_strundefined ) { elem.removeAttribute( internalKey ); } else { elem[ internalKey ] = null; } core_deletedIds.push( id ); } } } } }, _evalUrl: function( url ) { return jQuery.ajax({ url: url, type: "GET", dataType: "script", async: false, global: false, "throws": true }); } }); var iframe, getStyles, curCSS, 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 display, elem, hidden, values = [], index = 0, length = elements.length; for ( ; index < length; index++ ) { elem = elements[ index ]; if ( !elem.style ) { continue; } values[ index ] = jQuery._data( elem, "olddisplay" ); display = elem.style.display; if ( show ) { // Reset the inline display of this element to learn if it is // being hidden by cascaded rules or not if ( !values[ index ] && 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 ] ) { hidden = isHidden( elem ); if ( display && display !== "none" || !hidden ) { jQuery._data( elem, "olddisplay", hidden ? display : 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 len, styles, 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 ) { if ( typeof state === "boolean" ) { return state ? this.show() : this.hide(); } return this.each(function() { if ( 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; } } } }, // Don't automatically add "px" to these possibly-unitless properties cssNumber: { "columnCount": true, "fillOpacity": true, "fontWeight": true, "lineHeight": true, "opacity": true, "order": 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 num, val, 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 === "" || extra ) { num = parseFloat( val ); return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; } return val; } }); // 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 ) { // Support: Opera <= 12.12 // Opera reports offsetWidths and offsetHeights less than zero on some elements 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|file)$/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 ); } } 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 ); }; }); jQuery.fn.extend({ hover: function( fnOver, fnOut ) { return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); }, 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 ); } }); 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 deep, key, 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, response, type, 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.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", json: "responseJSON" }, // Data converters // Keys separate source (or catchall "*") and destination types with a single space converters: { // Convert anything to text "* text": 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 // Cross-domain detection vars parts, // Loop variable i, // URL without anti-cache param cacheURL, // Response headers as string responseHeadersString, // timeout handle timeoutTimer, // To know if global events are to be dispatched fireGlobals, transport, // Response headers responseHeaders, // 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; // Determine if successful isSuccess = status >= 200 && status < 300 || status === 304; // Get response data if ( responses ) { response = ajaxHandleResponses( s, jqXHR, responses ); } // Convert no matter what (that way responseXXX fields are always set) response = ajaxConvert( s, response, jqXHR, isSuccess ); // If successful, handle type chaining if ( isSuccess ) { // 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 no content if ( status === 204 || s.type === "HEAD" ) { statusText = "nocontent"; // if not modified } else if ( status === 304 ) { statusText = "notmodified"; // If we have data, let's convert it } else { statusText = response.state; success = response.data; error = response.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; }, getJSON: function( url, data, callback ) { return jQuery.get( url, data, callback, "json" ); }, getScript: function( url, callback ) { return jQuery.get( url, undefined, callback, "script" ); } }); 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 }); }; }); /* Handles responses to an ajax request: * - finds the right dataType (mediates between content-type and expected dataType) * - returns the corresponding response */ function ajaxHandleResponses( s, jqXHR, responses ) { var firstDataType, ct, finalDataType, type, contents = s.contents, dataTypes = s.dataTypes; // 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 * Also sets the responseXXX fields on the jqXHR instance */ function ajaxConvert( s, response, jqXHR, isSuccess ) { var conv2, current, conv, tmp, prev, converters = {}, // Work with a copy of dataTypes in case we need to modify it for conversion dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys if ( dataTypes[ 1 ] ) { for ( conv in s.converters ) { converters[ conv.toLowerCase() ] = s.converters[ conv ]; } } current = dataTypes.shift(); // Convert to each sequential dataType while ( current ) { if ( s.responseFields[ current ] ) { jqXHR[ s.responseFields[ current ] ] = response; } // Apply the dataFilter if provided if ( !prev && isSuccess && s.dataFilter ) { response = s.dataFilter( response, s.dataType ); } prev = current; current = dataTypes.shift(); if ( current ) { // There's only work to do if current dataType is non-auto if ( current === "*" ) { current = prev; // Convert response if prev dataType is non-auto and differs from current } else 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.unshift( tmp[ 1 ] ); } 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 }; } } } } } } 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, responseHeaders, statusText, responses; // 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; responseHeaders = xhr.getAllResponseHeaders(); // 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 tween = this.createTween( prop, value ), target = tween.cur(), parts = rfxnum.exec( value ), unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), // Starting value computation is required for potential unit mismatches start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) && rfxnum.exec( jQuery.css( tween.elem, prop ) ), scale = 1, maxIterations = 20; if ( start && start[ 3 ] !== unit ) { // Trust units reported by jQuery.css unit = unit || start[ 3 ]; // Make sure we update the tween properties later on parts = parts || []; // Iteratively approximate from a nonzero starting point start = +target || 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 ); } // Update tween properties if ( parts ) { start = tween.start = +start || +target || 0; tween.unit = unit; // If a +=/-= token was provided, we're doing a relative animation tween.end = parts[ 1 ] ? start + ( parts[ 1 ] + 1 ) * parts[ 2 ] : +parts[ 2 ]; } return tween; }] }; // Animations created synchronously will run synchronously function createFxNow() { setTimeout(function() { fxNow = undefined; }); return ( fxNow = jQuery.now() ); } function createTween( value, prop, animation ) { var tween, collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), index = 0, length = collection.length; for ( ; index < length; index++ ) { if ( (tween = collection[ index ].call( animation, prop, value )) ) { // we're done with this property return tween; } } } 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; } } jQuery.map( props, createTween, animation ); 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 prop, value, toggle, tween, hooks, oldfire, anim = this, orig = {}, style = elem.style, hidden = elem.nodeType && isHidden( elem ), dataShow = jQuery._data( elem, "fxshow" ); // 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.always(function() { style.overflow = opts.overflow[ 0 ]; style.overflowX = opts.overflow[ 1 ]; style.overflowY = opts.overflow[ 2 ]; }); } } // show/hide pass for ( prop in props ) { value = props[ prop ]; if ( rfxtypes.exec( value ) ) { delete props[ prop ]; toggle = toggle || value === "toggle"; if ( value === ( hidden ? "hide" : "show" ) ) { continue; } orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); } } if ( !jQuery.isEmptyObject( orig ) ) { if ( dataShow ) { if ( "hidden" in dataShow ) { hidden = dataShow.hidden; } } else { dataShow = jQuery._data( elem, "fxshow", {} ); } // 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 ( prop in orig ) { tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); 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 an 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, "" ); // 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; } } } }; // Support: IE <=9 // 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 ); // 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.stop ) { hooks.stop.call( this, true ); } // 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; }; } // 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 ); }; }); }); if ( typeof module === "object" && module && typeof module.exports === "object" ) { // Expose jQuery as module.exports in loaders that implement the Node // module pattern (including browserify). Do not create the global, since // the user will be storing it themselves locally, and globals are frowned // upon in the Node module world. module.exports = jQuery; } else { // Otherwise expose jQuery to the global object as usual window.jQuery = window.$ = jQuery; // Register as a named AMD module, since jQuery can be concatenated with other // files that may use define, but not via 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( "jquery", [], function () { return jQuery; } ); } } })( window );
/** * @author WestLangley / http://github.com/WestLangley * @author zz85 / http://github.com/zz85 * @author bhouston / http://clara.io * * Creates an arrow for visualizing directions * * Parameters: * dir - Vector3 * origin - Vector3 * length - Number * color - color in hex value * headLength - Number * headWidth - Number */ import { Float32BufferAttribute } from '../core/BufferAttribute.js'; import { BufferGeometry } from '../core/BufferGeometry.js'; import { Object3D } from '../core/Object3D.js'; import { CylinderBufferGeometry } from '../geometries/CylinderGeometry.js'; import { MeshBasicMaterial } from '../materials/MeshBasicMaterial.js'; import { LineBasicMaterial } from '../materials/LineBasicMaterial.js'; import { Mesh } from '../objects/Mesh.js'; import { Line } from '../objects/Line.js'; import { Vector3 } from '../math/Vector3.js'; var lineGeometry, coneGeometry; function ArrowHelper( dir, origin, length, color, headLength, headWidth ) { // dir is assumed to be normalized Object3D.call( this ); if ( dir === undefined ) dir = new Vector3( 0, 0, 1 ); if ( origin === undefined ) origin = new Vector3( 0, 0, 0 ); if ( length === undefined ) length = 1; if ( color === undefined ) color = 0xffff00; if ( headLength === undefined ) headLength = 0.2 * length; if ( headWidth === undefined ) headWidth = 0.2 * headLength; if ( lineGeometry === undefined ) { lineGeometry = new BufferGeometry(); lineGeometry.addAttribute( 'position', new Float32BufferAttribute( [ 0, 0, 0, 0, 1, 0 ], 3 ) ); coneGeometry = new CylinderBufferGeometry( 0, 0.5, 1, 5, 1 ); coneGeometry.translate( 0, - 0.5, 0 ); } this.position.copy( origin ); this.line = new Line( lineGeometry, new LineBasicMaterial( { color: color } ) ); this.line.matrixAutoUpdate = false; this.add( this.line ); this.cone = new Mesh( coneGeometry, new MeshBasicMaterial( { color: color } ) ); this.cone.matrixAutoUpdate = false; this.add( this.cone ); this.setDirection( dir ); this.setLength( length, headLength, headWidth ); } ArrowHelper.prototype = Object.create( Object3D.prototype ); ArrowHelper.prototype.constructor = ArrowHelper; ArrowHelper.prototype.setDirection = ( function () { var axis = new Vector3(); var radians; return function setDirection( dir ) { // dir is assumed to be normalized if ( dir.y > 0.99999 ) { this.quaternion.set( 0, 0, 0, 1 ); } else if ( dir.y < - 0.99999 ) { this.quaternion.set( 1, 0, 0, 0 ); } else { axis.set( dir.z, 0, - dir.x ).normalize(); radians = Math.acos( dir.y ); this.quaternion.setFromAxisAngle( axis, radians ); } }; }() ); ArrowHelper.prototype.setLength = function ( length, headLength, headWidth ) { if ( headLength === undefined ) headLength = 0.2 * length; if ( headWidth === undefined ) headWidth = 0.2 * headLength; this.line.scale.set( 1, Math.max( 0, length - headLength ), 1 ); this.line.updateMatrix(); this.cone.scale.set( headWidth, headLength, headWidth ); this.cone.position.y = length; this.cone.updateMatrix(); }; ArrowHelper.prototype.setColor = function ( color ) { this.line.material.color.set( color ); this.cone.material.color.set( color ); }; ArrowHelper.prototype.copy = function ( source ) { Object3D.prototype.copy.call( this, source, false ); this.line.copy( source.line ); this.cone.copy( source.cone ); return this; }; ArrowHelper.prototype.clone = function () { return new this.constructor().copy( this ); }; export { ArrowHelper };
// The ABSTRACTS must be put here. Each abstract is a numbered variable. Pay attention to the presence of \ at the end of each line. var abstract001 = "Typical control systems designs concentrate on plant output specifications and don't always take sufficiently into account \ specifications related to its input (e.g., coming from saturation phenomenas). This fact is especially relevant when there \ are degrees of freedom in the plant input selection due to some kind of acuator redundancy. In this talk we will present a \ dynamic input allocation scheme that has been proposed roughly five years ago. The core ideas behind the dynamic scheme will \ be illustrated while discussing its recent application to: elongation and shape control for Tokamak plasmas, control of parallel \ hybrid electric vehicles, and satellite attitude control."; var abstract002 = 'Output regulation is the problem of ensuring that an output is driven to zero despite the influence of an exogenous signal \ generated by a known system in free evolution (the "exosystem"); such a problem includes as special cases output tracking and \ disturbance rejection for preassigned classes of references and disturbances. In classic results, when the plant is fat (i.e. it \ has more inputs than outputs) it is just squared down a priori in order to ensure that a unique, linear regulator exists, thus \ disregarding the infinitely many available alternatives. In this talk, starting from ideas related to input allocation and \ focusing on linear fat plants in the presence of constraints or performance criteria, it is shown that better output regulators \ can be obtained by scheduling inside the linear variety of linear regulators, and that optimal regulators are nonlinear even in \ very simple cases.'; var abstract003 = 'Ultra-High Field MRI at UHF suffers from severe B1 field inhomogeneities which are detrimental to medical diagnosis. Although \ many powerful flip-angle homogenizing RF pulse designs have been developed to mitigate this effect, there are still numerous and \ useful MRI applications where the initial input for an RF pulse can be arbitrary, i.e. not necessarily longitudinal, which means \ that true rotation matrices need to be designed and must perform well regardless of the input magnetization state. This is a very \ common scenario in quantum computing applications where control schemes are designed to synthetize logic gates to be effective \ regardless of the input state. For that purpose, the GRadient Ascent Pulse Engineering (GRAPE) method of Khaneja et al (JMR 2005) \ developed within the framework of NMR quantum computing has been successfully implemented in our laboratory to design arbitrary \ refocusing pulses. No approximation is made so that all non-linearities and Larmor frequency offsets are fully taken into account. \ After introducing the theory, I will present experimental data obtained in-vitro (spin-echo) and in-vivo (SPACE, FLAIR) at 7 Tesla \ which demonstrates the applicability of the technique as well as the correct control of the nuclear spins.'; var abstract004 = 'We give a short introduction to the emerging field of engineering controlled quantum physical devices. For simplicity we focus on the \ discrete-time approach and on idealized models that are close to actual experimental realizations. We carefully introduce the basic \ models involved and two feedback stabilization strategies: one equivalent to classical measurement-based control, and the other \ working as control by interconnection. We illustrate these strategies on a quantum microwave cavity experiment from the Laboratoire \ Kastler Brossel at ENS Paris. <br> Related paper: \ Stabilization of nonclassical states of one- and two-mode radiation fields by reservoir engineering, Phys.Rev.A (2012)'; var abstract005 = 'We apply two optimization methods to solve an optimal control problem of a linear neutral differential equation (NDE) arising in economics. \ The first one is a variational method, and the second follows a dynamic programming approach. Because of the infinite dimensionality \ of the NDE, the second method requires the reformulation of the latter as an ordinary differential equation in an appropriate abstract space. \ It is shown that the resulting Hamilton–Jacobi–Bellman equation admits a closed-form solution, allowing for a much finer characterization \ of the optimal dynamics compared with the alternative variational method. The latter is clearly limited by the nontrivial nature of \ asymptotic analysis of NDEs. (joint with Giorgio Fabbri and Patrick Pintus)'; var abstract006 = 'We present several results of the theory of insurance demand; we experimentally test some of them and show how our experimental observations may \ renew the theory.'; var abstract007 = 'In this seminar a non-iterative, non-cooperative distributed state-feedback control algorithm based on neighbor-to-neighbor communication, \ named distributed predictive control (DPC), will be presented. Its theoretical properties, extensions, realization issues, and some \ of its applications will be discussed.'; var abstract008 = 'Scalability of control architectures is a central issue in networks of systems connected through physical or communication channels. \ In the past, several contributions addressed the problem of parallelising on-line computation of control actions using decentralized \ and distributed controllers. Instead, we focus on off-line design and formalize conditions that allow the synthesis of local \ controllers using information from neighbouring systems while guaranteeing stability and constraint satisfaction for the overall plant. \ This paves the way to Plug-and-Play (PnP) operations enabling the addition and removal of systems in a modular fashion by updating a \ limited number of local controllers within the network. Furthermore, PnP design principles can be extended to the synthesis of \ distributed state estimators and fault detection systems. We argue that PnP design can be very useful in the context of cyber-physical \ systems, where the number of subsystems changes over time, and for revamping hardware with minimal human intervention. In this talk \ we will present PnP design techniques for constrained systems and illustrate their application to the synthesis of the frequency \ control layer in power networks.'; var abstract009 = 'The purpose of this talk is to present stability conditions for linear hyperbolic PDEs presenting jumps in boundary conditions and speeds. \ The conditions used are constructive and numerically tractable. They are based on Lyapunov theory. We will also present results \ control state feedback using switching controls for conservation laws. We will conclude our talk with the control of the shallow \ water equations by means of switching boundary controllers.'; var abstract010 = 'This talk is concerned with a class of linear hyperbolic systems of conservation laws with two time scales modeled by a perturbation parameter. \ By setting the perturbation parameter to zero, two subsystems, namely the reduced and boundary-layer subsystems, are computed. We first show \ that the stability of the full system implies the stability of both subsystems. Moreover, a counterexample is used to illustrate that the \ stability of the two subsystems does not guarantee the full system\'s stability. Next, the approximation between the full system and the \ reduced subsystem is achieved by Lyapunov technique. Finally, a boundary control synthesis to a linearized Saint-Venant-Exner system is \ shown based on singular perturbation method.'; var abstract011 = 'We present a brief but detailed historical review on the development of stability theory, from its early starts out of the minds of Lagrangia \ and Dirichlet. The survey carries on to focus on Lyapunov stability. Through exact citations from the works of the developpers of stability, \ including many Soviet texts from the 20th century, we revise the fundamental definitions and theorems; making emphasis on several misfortunate \ translations which have led to wrong interpretations and ambigous statements. We favour depth and sacrifice generality: on technical grounds, \ we focus on the most elementary (yet not so) well-known forms of Lyapunov stability and common but crucial qualifiers that go with it: \ uniform, asymptotic, global. We revise the origin of the wrongly known invariance principle ... <br><br>\ We hope, with this survey, to contribute \ to the preserving of milestones otherwise little remembered in modern texts and, hence, little known to young(er) generations.'; var abstract012 = 'One challenging and not extensively studied issue in obstacle \ avoidance is the corner cutting problem. Avoidance constraints are \ usually imposed at the sampling time without regards to the \ intra-sample behavior of the dynamics. This talk improves upon state \ of the art by describing a multi-obstacle environment via a hyperplane \ arrangement, provides a piecewise description of the forbidden regions \ and represents them into a combined mixed integer and \ predictive control formulation. Furthermore, over-approximation \ constraints which reduce to strictly binary conditions are discussed \ in detail.'; var abstract013 = 'This presentation describes a comprehensive framework for the cooperative guidance of a fleet of autonomous vehicles, relying on \ Model Predictive Control (MPC). Solutions are provided for many common problems in cooperative control, namely collision and \ obstacle avoidance, formation flying and area exploration. Cost functions of the MPC strategy are defined to ensure a safe \ collaboration between the vehicles for these applications. An efficient way to select the optimal cost with limited computation \ time is also provided. The performance of the proposed approach is illustrated by simulation and experimental results.'; var abstract014 = 'In this seminar, we review some recent advances in nonlinear stability theory and robust adaptive \ control that involve persistence of excitation theory and switching methods. Specifically, these \ new state-estimation and control design tools involve the construction of auxiliary filters \ (dynamic augmentation) ultimately leading to some strong convergence properties and \ robustness features. In this talk, we will specifically focus upon spacecraft attitude control \ systems operating under the framework of non-negligible actuator misalignments. These \ technical foundations are strongly motivated by growing numbers of aerospace engineering \ applications that are currently addressing the critical need for autonomous \ (and semi-autonomous) control systems with agile maneuvering and robust perception inside dynamic, complex \ and uncertain environments. The seminar concludes with a brief discussion of broader \ aerospace applications that include control over bandwidth-constrained networks and reversible \ transducer mechanisms for flexible spacecraft controller design.'; var abstract015 = 'This talk addresses the stability of non-autonomous linear difference equations of the form \ x(t) = \sum_{i=1}^N A_i(t) x(t - L_i) for positive delays L_i. When the matrices A_i are time-independent, \ the corresponding autonomous system can be analyzed by Laplace transform methods leading to a well-known \ stability criterion by Hale and Silkowski, but this technique fails to apply to the non-autonomous case. \ We rely rather on an explicit formula expressing the solution at time t in terms of the initial condition \ and time-dependent coefficients. We then relate the asymptotic behavior of such coefficients to that of \ solutions, which in turn leads to a necessary and sufficient stability criterion for non-autonomous \ difference equations. When applied to the case of switching matrices A_i(t) subject to arbitrary \ switching signals, one obtains a criterion in terms of a generalized joint spectral radius, which \ extends Hale and Silkowski\'s criterion. Corresponding stability criteria for transport and wave \ propagation on networks with variable coefficients are derived by expressing these systems as \ difference equations. In particular, we show that the wave equation on a network with arbitrarily \ switching damping at external vertices is exponentially stable if and only if the network is a \ tree and the damping is bounded away from zero at all external vertices but one. This is a \ joint work with Y. Chitour and M. Sigalotti.'; var abstract016 = 'In Lagrangian mechanics, constraints that can be expressed in the form of equations involving only configuration variables, \ and not their derivatives, are called “holonomic.” For example, a particle constrained to move on the surface of a sphere \ is subject to a holonomic constraint. In the case of Lagrangian control systems, one may use feedback to emulate the presence \ of holonomic constraints. For example, one may make a platoon of vehicles move in rigid formation by emulating the presence \ of distance constraints among the vehicles. Such emulated constraints are called “virtual holonomic constraints” (VHCs). \ In robotics, VHCs have become a popular tool to induce stable walking gaits in biped robots, and there is a growing body \ of work suggesting that VHCs might represent a universal paradigm for locomotion. <br><br> \ From a theoretical viewpoint, there are a number of interesting questions arising in the context of VHCs. \ One of them is whether or not the motion of a Lagrangian control system subjected to a VHC is still Lagrangian. \ In this second talk I will show that, in contrast with classical mechanics, the answer to this question \ is “typically no.” For underactuated Lagrangian control systems with underactuation degree one, \ I will give necessary and sufficient conditions guaranteeing that the constrained dynamics arising \ from a VHC are Lagrangian. I will show experimental results illustrating VHCs in action and giving \ an intuitive feel of the significance of Lagrangian constrained dynamics.' var abstract017 = 'In this talk, the convergence property, which is a system-level stability property of nonlinear \ dynamical systems originally introduced in the 1960\'s in Russia, will be discussed in detail. \ A convergent system exhibits a unique, bounded globally asymptotically steady-state solution. \ Lyapunov characterisations of, sufficient conditions for and properties of convergent systems \ will be presented. Moreover, relations to notions such as e.g. incremental stability will be \ briefly addressed. In the second part of the talk it will be advocated that convergence is \ a useful property in the analysis and design of nonlinear control systems. Particular \ applications are: steady-state performance analysis through "nonlinear frequency response \ functions", output regulation (with tracking, synchronisation as particular sub-problems), \ observer design, model reduction and extremum seeking control.' var abstract018 = 'Model reduction is a tool for the approximation of complex dynamical systems by systems of \ reduced order, hereby enabling efficient analysis or controller synthesis. In this presentation, \ several methods for model reduction of nonlinear systems will be discussed. These methods \ have in common that they rely on incremental system properties in obtaining an accurate \ reduced-order model that preserves relevant stability properties and satisfies an a priori \ bound on the reduction error. Specifically, (input-to-state) convergent nonlinear systems \ will be considered, in which reduction is performed by isolating the nonlinearities and the \ application of linear model reduction techniques. Next, the reduction technique of \ incremental balanced truncation is introduced, which explicitly takes nonlinearities into \ account in the reduction procedure and can be regarded as an extension of the well-known \ technique of balanced truncation to the nonlinear domain.' var abstract019 = 'Contact stability in humans and robots is guaranteed by generating task-adapted restoring \ forces in response to the environmental displacements, which can be achieved using different \ techniques. For instance, in humans, muscle activations can modify the joint stiffness matrix \ via cocontraction of muscles involved in the task, or through modifications in the sensitivity \ of reflex feedback. Similarly in robots, the joint stiffness profile can be adjusted to realize \ a desired compliant behavior in Cartesian coordinates through conservative congruence transformations.<br><br>\ Endpoint stiffness in different directions, often represented by stiffness ellipsoids, is also \ modified by varying the geometry of the arm; due to this geometric dependence, endpoint stiffness \ is subject to variations depending on the position of the endpoint in task space, or even on \ the arm configuration for the same end-effector position, when the arm is redundant. Observations \ in human neuromotor control of the arm endpoint stiffness suggest that due to i) the major \ contribution of the limb geometry to efficient modifications in the orientation of the endpoint \ stiffness ellipsoid, ii) ergonomic efficiency of postural adjustments in comparison to cocontractions, \ and iii) the existence of cross-joint muscles in limbs, humans tend to maximize the use of limb \ postures to realize a desired endpoint stiffness direction. Concurringly, cocontractions appear \ to mostly contribute to modifications in size, rather than orientation of the stiffness ellipsoid.<br><br> \ Relying on the above observations, in this talk, a reduced complexity model of the human arm endpoint \ stiffness is introduced for real-time and cost-efficient tracking of the human\'s physical interaction \ behavior. Next, the underlying motor control principles, namely common-mode and configuration-dependent \ stiffness, are exploited for the design of the compliant robots\' control architecture with the aim \ to achieve a human like physical interaction behavior.' var abstract020 = 'Since its relatively recent birth, control systems theory has reached \ outstanding results in the understanding of feedback systems and in \ the design of effective solutions for an enormous variety of \ applications, substantially contributing to the improvement of the \ quality of life of citizens. What are the new challenges to progress \ further? Many agree that a crucial one is the ability to cope with \ complexity, as it arises e.g. in the domains of life and social \ sciences. In the endeavour of understanding, regulating, and even \ replicating natural systems and social organizations, an enormous \ potential resides in the combination of powerful analytical tools and \ ideas and inspirations that comes from studies in the neurosciences.<br><br> \ In this talk I will present some examples of how this process can \ work, reporting on few case-studies, mainly from Robotics, where a fruitful \ multidisciplinary collaboration has led to interesting insight and \ technological solutions. The talk will however focus mostly on open \ questions and discussion points.' var abstract021 = 'Reaction networks are systems in which the populations of a finite number of species evolve according \ to predefined interactions. Such networks are found as modeling tools in many disciplines (spanning \ biochemistry, epidemiology, pharmacology, ecology and social networks). Traditionally, reaction \ networks are mathematically analyzed by expressing the dynamics as a set of ordinary differential \ equations. Such a deterministic model is reasonably accurate when the number of network participants \ is large. However, when this is not the case, the discrete nature of the interactions becomes \ important and the dynamics is inherently noisy. This random component of the dynamics cannot be \ ignored as it can have a significant impact on the macroscopic properties of the system. This is \ the reason why stochastic models for reaction networks are necessary for representing certain \ reaction networks. The tools for analyzing them, however, still lag far behind their deterministic \ counterparts.<br><br> The objective of this talk is to introduce the stochastic modeling paradigm for \ reaction networks with an emphasis towards biology. It will be shown that the trajectories of such \ processes can be represented by a jump Markov process over the nonnegative integer lattice. Two \ problems will then be addressed. The first one is related to the stability of these processes while \ the second one is related to their control. Regarding stability, it will be shown that the ergodicity \ of the such processes can be, in many cases, efficiently established using linear programs, well \ known for their tractability. These conditions will then be applied on several reaction networks \ arising in fields such as biochemistry, epidemiology and ecology. Finally, the problem of \ controlling single-cell dynamics or cell populations using in-vivo controllers will be addressed. \ Several theoretical properties for the closed-loop system (robustness, non-fragility, tracking, \ disturbance rejection, etc) will be emphasized and illustrated through several examples.' var abstract022 = 'Temporal dynamic control of gene expression can have far reaching implications for bioprocess \ regulation and optimization, among other biotechnology applications. Thanks to the advantages \ of light as a modulator, optogenetics has emerged as an ideal technology for achieving such \ gene expression control. Current state-of-the-art methods for optical expression control fail \ to combine precision and repeatability, and cannot withstand changing operating conditions in \ cell cultures. We present a novel fully automatic experimental platform for the robust and \ precise long-term optogenetic regulation of protein production in liquid E. coli cultures. \ Using a computer-controlled light-responsive two-component system, we accurately track \ prescribed dynamic GFP expression profiles through the application of feedback control. \ The achieved tracking precision is shown to robustly adapt to global perturbations such as \ abrupt switching of media and large temperature changes. We finally provide the implementation \ details and compare the performance of the two alternative control strategies used: a \ simple PI scheme and a more elaborate MPC controller coupled to a particle filter for \ online state, parameter and disturbance estimation.' var abstract023 = 'We consider linear infinite dimensional control systems with unbounded and periodic evolution, \ input and output operators, and mixed discrete/continuous time in state and measurement equations. \ In the first section we introduce the concepts of left and right admissible input and output operators, \ and generalized Pritchard-Salamon system. In the second section we study perturbation results. \ The third section is devoted to dual operators and dual Pritchard-Salamon systems. In the next \ section we introduce and study the concepts of admissible stabilizability and detectability, \ and get stability criteria. Dynamic output feedback is the subject of section five. Next, we \ formulate the standard H-infinity control problem with arbitrary cost quadratic functional. \ It is solved first for the case of systems with full measurements, and then in the general case. \ A discussion of all results concludes the presentation.' var abstract024 = 'For linear systems in continuous time with random switching, the Lyapunov exponents are characterized \ using the Multiplicative Ergodic Theorem for an associated system in discrete time. An application to \ control systems shows that here a controllability condition implies that arbitrary exponential decay \ rates for almost sure stabilization can be obtained. This talk is based on joint work with Guilherme Mazanti.' var abstract025 = 'Let us consider two vector fields, each one of which possesses a unique stable equilibrium, and a \ stochastic process following alternatively the two associated flows with random switching times. \ We are interested in the long time behavior of this process. More precisely, we investigate how \ its stability depends on the alea of the switchings. Finally, we relate this problem to some \ questions in a deterministic control setting.' var abstract026 = 'Milton Erikson used to tell a story, that a centipede was asked how it was able to move all \ the hundred legs in such a synchronous way. After this question had been put to the poor \ creature, it had been unable to make a step ever since.<br><br>The centipede tale is not \ so meaningless as it seems from a first glance. There is an evidence that wave-like motions \ of centipede\'s legs are generated by a spatially distributed neural network rather than by \ a local generator.<br><br>Apparently a very primitive and distributed nervous system can \ generate complex wave-like patterns and this problem will be addressed in the talk.<br><br> \ In particular it will be shown how the symmetries of the network can contribute to the \ existence of linear invariant manifolds which could be associated with in-phase and \ anti-phase behavior of the networks\' nodes. Those linear manifolds can be represented \ as kernels of some linear operators and the distance to those sets can play a role of \ Lyapunov functions which prove stability of those regimes.<br><br>The talk is illustrated \ by some examples.' var abstract027 = 'The ISS theory and its characterizations by means of Lyapunov dissipation inequalities are presented \ for the systems admitting invariant sets, which are not necessarily stable in the sense of Lyapunov, \ but admit a suitable hierarchical decomposition. The proposed theory is applied to oscillators in \ Euclidean coordinates, almost globally asymptotically stable systems on manifolds, systems with \ multiple equilibria, limit cycles, etc.' var abstract028 = 'In this talk we propose a Lyapunov based analysis of microgrids. The starting point is an energy \ function comprising the kinetic energy associated with the elements that emulate the rotating \ machinery and terms taking into account the reactive power stored in the lines and dissipated \ on shunt elements. We then shape this energy function with the addition of an adjustable \ voltage-dependent term, and construct incremental storage functions satisfying suitable \ dissipation inequalities. The choice of the voltage-dependent term depends on the voltage \ dynamics/controller under investigation. Several microgrids dynamics that have similarities \ or coincide with dynamics already considered in the literature are captured in this incremental \ energy analysis framework. These incremental storage functions allow for a complete analysis \ of the coupled microgrid obviating the need for simplifying linearization techniques and for \ the restrictive decoupling assumption in which the frequency dynamics is fully separated \ from the voltage one.' var abstract029 = 'A major transition in the operation of electric power grids is the replacement of bulk \ generation based on synchronous machines by distributed generation based on low-inertia \ power electronic sources. The accompanying "loss of rotational inertia" and the fluctuations \ by renewable sources jeopardize the system stability, as testified by the ever-growing \ number of frequency incidents. As a remedy, numerous studies demonstrate how virtual \ inertia can be emulated through various devices, but few of them address the question of \ "where" to place this inertia. It is however strongly believed that the placement of \ virtual inertia hugely impacts system efficiency, as demonstrated by recent case studies. \ We carry out a comprehensive analysis in an attempt to address the optimal inertia placement \ problem, considering a linear network-reduced power system model along with an H2 performance \ metric accounting for the network coherency. The optimal inertia placement problem turns \ out to be non-convex, yet we provide a set of closed-form global optimality results for \ particular problem instances as well as a computational approach resulting in locally \ optimal solutions. We illustrate our results with a three-region power grid case study \ and compare our locally optimal solution with different placement heuristics in terms \ of different performance metrics.' var abstract030 = 'An inverse control problem is formulated as follows: given a set of trajectories and \ a control system, find a cost such that these paths are optimal. The first question \ to ask is the uniqueness of the solution of such a problem. For general classes of costs \ the problem appears to be very difficult, even with a trivial dynamics. We are therefore \ interested in this issue for the class of costs which are quadratic in the control, \ when the dynamics depend linearly in the control (Riemannian and sub-Riemannian case). \ In this case we can reduce the problem to the question of the existence of geodesically \ equivalent metrics and the existing results will be described, from the theorem of Levi-Civita \ (1890) to those we obtained recently with Sofya Maslovskaya and Igor Zelenko.' var abstract031 = 'The use of Lyapunov functions is generally limited to proving the stability of a system \ with a given control law. In this presentation, Lyapunov functions are used to formulate \ optimal control problems as pointwise nonlinear programmes. These optimisation problems \ are equivalent to inverse optimal control problems. This approach is applied to satellite \ attitude control. The optimal attitude control problems under consideration will be the \ minimisation of the norm of the control torque subject to constraints on the convergence \ rate of a Lyapunov function. This approach improves the tradeoff between rapidity and \ energy consumption compared to a benchmark controller, which is taken to be a PD type \ controller without loss of generality. The phase space trajectories show that the solutions \ to some fundamental open loop optimization problems are particular cases of optimal control \ problem formulations based on the convergence rates of Lyapunov functions. This is the \ case of the minimum time single axis attitude control problem, which is a special case \ of the problem of maximizing the convergence rate of a Lyapunov function under maximum \ torque limitations. It is also the case of the problem of minimising toque for fixed \ manoeuvre time. The solution to this problem is a particular case of the problem of \ minimizing the norm of the control torque under a Lyapunov convergence rate constraint.' var abstract032 = 'This talk deals with the stabilization in the sample-and-hold sense of nonlinear systems \ described by retarded functional differential equations. The notion of stabilization in \ the sample-and-hold sense has been introduced in 1997 by Clarke, Ledyaev, Sontag and Subbotin, \ for nonlinear delay-free systems. Roughly speaking, a state feedback (continuous or not) \ is said to be a stabilizer in the sample-and- hold sense if, for any given large ball and \ small ball of the origin, there exists a suitable small sampling period such that the \ feedback control law obtained by sampling and holding the above state feedback, with \ the given sampling period, keeps uniformly bounded all the trajectories starting in any \ point of the large ball and, moreover, drives all such trajectories into the small ball, \ uniformly in a maximum finite time, keeping them in, thereafter. In this talk suitable \ control Lyapunov-Krasovski functionals will be introduced and suitable induced state \ feedbacks (continuous or not), and it will be shown that these state feedbacks are \ stabilizers in the sample-and- hold sense, for fully nonlinear time-delay systems. \ Moreover, in the case of time-delay systems, implementation by means of digital \ devices often requires some further approximation due to non availability in the \ buffer of the value of the system variables at some past times, as it can be frequently \ required by the proposed state feedback. In order to cope with this problem, well known \ approximation schemes based on first order splines are used. It is shown, for fully \ nonlinear retarded systems, that, by sampling at suitable high frequency the system \ (finite dimensional) variable, stabilization in the sample-and-hold sense is still \ guaranteed, when the holden input is obtained as a feedback of the (first order) \ spline approximation of the (infinite dimensional) system state, whose entries are \ available at sampling times, and the state feedback is Lipschitz on any bounded \ subset of the Banach state space.' var abstract033 = 'In a feedback system, besides the stabilization, the controllers are often designed to \ meet some performance specifications defined by <font face="Cursive">H</font>&infin; \ norm minimization of corresponding sensitivity functions. From the practical point of view, \ if it is possible, it is desired the controller to be designed is stable. In this work, stable \ controller design to minimize the <font face="Cursive">H</font><sub>&infin;</sub> norm of \ the corresponding sensitivity function in a feedback system with a single-input single-output \ biproper infinite-dimensional real plant is considered. \ The plant may have infinitely many poles and simple zeros in the right-half-plane, however, it is \ zeros are assumed to satisfy some growth condition. Interpolation-based approach will be used to \ design such a controller and a numerical example will be presented.' // ----------------------------------------------------- FUNCTIONS ----------------------------------------------------- function insertAbstractToggle(absnumstr) { var absstr = 'abstract' + absnumstr; var txt = "<div id=\"hide_part" + absnumstr + "\" style=\"display:none;\"> \n" + "<p class=\"sem_abstract\" style=\"text-align: justify;text-justify: inter-word;\"><strong>Abstract</strong><br> \n" + eval(absstr) + " \n" + "</p> \n" + "<a href=\"javascript:;\" onClick=\"document.getElementById('show_part" + absnumstr + "').style.display='block';" + "document.getElementById('hide_part" + absnumstr + "').style.display='none';\">&#8657; </a> \n" + "</div> \n" + "<div id=\"show_part" + absnumstr + "\" style=\"display:block;\"> \n" + "<a href=\"javascript:;\" onClick=\"document.getElementById('show_part" + absnumstr + "').style.display='none';" + " document.getElementById('hide_part" + absnumstr + "').style.display='block';\">Abstract &#8659;</a> \n" + "</div> \n"; return txt; }
'use strict'; var nativeForEach = [].forEach; var internalForEach = require('../internals/array-methods')(0); var SLOPPY_METHOD = require('../internals/sloppy-array-method')('forEach'); // `Array.prototype.forEach` method implementation // https://tc39.github.io/ecma262/#sec-array.prototype.foreach module.exports = SLOPPY_METHOD ? function forEach(callbackfn /* , thisArg */) { return internalForEach(this, callbackfn, arguments[1]); } : nativeForEach;
require('../../support/spec_helper'); describe("Cucumber.Listener.SummaryFormatter", function () { var Cucumber = requireLib('cucumber'); var formatter, formatterHearMethod, summaryFormatter, statsJournal, failedStepResults, options; beforeEach(function () { options = createSpy("options"); formatter = createSpyWithStubs("formatter", {log: null}); formatterHearMethod = spyOnStub(formatter, 'hear'); statsJournal = createSpy("stats journal"); failedStepResults = createSpy("failed steps"); spyOn(Cucumber.Type, 'Collection').andReturn(failedStepResults); spyOn(Cucumber.Listener, 'Formatter').andReturn(formatter); spyOn(Cucumber.Listener, 'StatsJournal').andReturn(statsJournal); summaryFormatter = Cucumber.Listener.SummaryFormatter(options); color = Cucumber.Util.ConsoleColor; }); describe("constructor", function () { it("creates a formatter", function() { expect(Cucumber.Listener.Formatter).toHaveBeenCalledWith(options); }); it("extends the formatter", function () { expect(summaryFormatter).toBe(formatter); }); it("creates a collection to store the failed steps", function () { expect(Cucumber.Type.Collection).toHaveBeenCalled(); }); it("creates a stats journal", function () { expect(Cucumber.Listener.StatsJournal).toHaveBeenCalled(); }) }); describe("hear()", function () { var event, callback; beforeEach(function () { event = createSpy("event"); callback = createSpy("callback"); spyOnStub(statsJournal, 'hear'); }); it("tells the stats journal to listen to the event", function () { summaryFormatter.hear(event, callback); expect(statsJournal.hear).toHaveBeenCalled(); expect(statsJournal.hear).toHaveBeenCalledWithValueAsNthParameter(event, 1); expect(statsJournal.hear).toHaveBeenCalledWithAFunctionAsNthParameter(2); }); describe("stats journal callback", function () { var statsJournalCallback; beforeEach(function () { summaryFormatter.hear(event, callback); statsJournalCallback = statsJournal.hear.mostRecentCall.args[1]; }); it("tells the formatter to listen to the event", function () { statsJournalCallback(); expect(formatterHearMethod).toHaveBeenCalledWith(event, callback); }); }); }); describe("handleStepResultEvent()", function () { var event, callback, stepResult; beforeEach(function () { stepResult = createSpyWithStubs("step result", { isUndefined: undefined, isFailed: undefined }); event = createSpyWithStubs("event", {getPayloadItem: stepResult}); callback = createSpy("Callback"); spyOn(summaryFormatter, 'handleFailedStepResult'); }); it("gets the step result from the event payload", function () { summaryFormatter.handleStepResultEvent(event, callback); expect(event.getPayloadItem).toHaveBeenCalledWith('stepResult'); }); it("checks whether the step was undefined", function () { summaryFormatter.handleStepResultEvent(event, callback); expect(stepResult.isUndefined).toHaveBeenCalled(); }); describe("when the step was undefined", function () { beforeEach(function () { stepResult.isUndefined.andReturn(true); spyOn(summaryFormatter, 'handleUndefinedStepResult'); }); it("handles the undefined step result", function () { summaryFormatter.handleStepResultEvent(event, callback); expect(summaryFormatter.handleUndefinedStepResult).toHaveBeenCalledWith(stepResult); }); }); describe("when the step was not undefined", function () { beforeEach(function () { stepResult.isUndefined.andReturn(false); spyOn(summaryFormatter, 'handleUndefinedStepResult'); }); it("does not handle an undefined step result", function () { summaryFormatter.handleStepResultEvent(event, callback); expect(summaryFormatter.handleUndefinedStepResult).not.toHaveBeenCalled(); }); it("checks whether the step failed", function () { summaryFormatter.handleStepResultEvent(event, callback); expect(stepResult.isFailed).toHaveBeenCalled(); }); describe("when the step failed", function () { beforeEach(function () { stepResult.isFailed.andReturn(true); }); it("handles the failed step result", function () { summaryFormatter.handleStepResultEvent(event, callback); expect(summaryFormatter.handleFailedStepResult).toHaveBeenCalledWith(stepResult); }); }); describe("when the step did not fail", function () { beforeEach(function () { stepResult.isFailed.andReturn(false); }); it("handles the failed step result", function () { summaryFormatter.handleStepResultEvent(event, callback); expect(summaryFormatter.handleFailedStepResult).not.toHaveBeenCalled(); }); }); }); it("calls back", function () { summaryFormatter.handleStepResultEvent(event, callback); expect(callback).toHaveBeenCalled(); }); }); describe("handleUndefinedStepResult()", function () { var stepResult, step; beforeEach(function () { step = createSpy("step"); stepResult = createSpyWithStubs("step result", {getStep: step}); spyOn(summaryFormatter, 'storeUndefinedStep'); }); it("gets the step from the step result", function () { summaryFormatter.handleUndefinedStepResult(stepResult); expect(stepResult.getStep).toHaveBeenCalled(); }); it("stores the undefined step", function () { summaryFormatter.handleUndefinedStepResult(stepResult); expect(summaryFormatter.storeUndefinedStep).toHaveBeenCalledWith(step); }); }); describe("handleFailedStepResult()", function () { var stepResult; beforeEach(function () { stepResult = createSpy("failed step result"); spyOn(summaryFormatter, 'storeFailedStepResult'); }); it("stores the failed step result", function () { summaryFormatter.handleFailedStepResult(stepResult); expect(summaryFormatter.storeFailedStepResult).toHaveBeenCalledWith(stepResult); }); }); describe("handleAfterScenarioEvent()", function () { var event, callback; beforeEach(function () { event = createSpy("event"); callback = createSpy("callback"); spyOnStub(statsJournal, 'isCurrentScenarioFailing'); }); it("checks whether the current scenario failed", function () { summaryFormatter.handleAfterScenarioEvent(event, callback); expect(statsJournal.isCurrentScenarioFailing).toHaveBeenCalled(); }); describe("when the current scenario failed", function () { var scenario; beforeEach(function () { scenario = createSpy("scenario"); statsJournal.isCurrentScenarioFailing.andReturn(true); spyOn(summaryFormatter, 'storeFailedScenario'); spyOnStub(event, 'getPayloadItem').andReturn(scenario); }); it("gets the scenario from the payload", function () { summaryFormatter.handleAfterScenarioEvent(event, callback); expect(event.getPayloadItem).toHaveBeenCalledWith('scenario'); }); it("stores the failed scenario", function () { summaryFormatter.handleAfterScenarioEvent(event, callback); expect(summaryFormatter.storeFailedScenario).toHaveBeenCalledWith(scenario); }); }); describe("when the current scenario did not fail", function () { beforeEach(function () { statsJournal.isCurrentScenarioFailing.andReturn(false); spyOn(summaryFormatter, 'storeFailedScenario'); spyOnStub(event, 'getPayloadItem'); }); it("does not get the scenario from the payload", function () { summaryFormatter.handleAfterScenarioEvent(event, callback); expect(event.getPayloadItem).not.toHaveBeenCalled(); }); it("does not store the failed scenario", function () { summaryFormatter.handleAfterScenarioEvent(event, callback); expect(summaryFormatter.storeFailedScenario).not.toHaveBeenCalled(); }); }); it("calls back", function () { summaryFormatter.handleAfterScenarioEvent(event, callback); expect(callback).toHaveBeenCalled(); }); }); describe("handleAfterFeaturesEvent()", function () { var callback, event; beforeEach(function () { callback = createSpy("callback"); event = createSpy("event"); spyOn(summaryFormatter, 'logSummary'); }); it("logs the summary", function () { summaryFormatter.handleAfterFeaturesEvent(event, callback); expect(summaryFormatter.logSummary).toHaveBeenCalled(); }); it("calls back", function () { summaryFormatter.handleAfterFeaturesEvent(event, callback); expect(callback).toHaveBeenCalled(); }); }); describe("storeFailedStepResult()", function () { var failedStepResult; beforeEach(function () { failedStepResult = createSpy("failed step result"); spyOnStub(failedStepResults, 'add'); }); it("adds the result to the failed step result collection", function () { summaryFormatter.storeFailedStepResult(failedStepResult); expect(failedStepResults.add).toHaveBeenCalledWith(failedStepResult); }); }); describe("storeFailedScenario()", function () { var failedScenario, name, uri, line; beforeEach(function () { name = "some failed scenario"; uri = "/path/to/some.feature"; line = "123"; string = uri + ":" + line + " # Scenario: " + name; failedScenario = createSpyWithStubs("failedScenario", {getName: name, getUri: uri, getLine: line}); spyOn(summaryFormatter, 'appendStringToFailedScenarioLogBuffer'); }); it("gets the name of the scenario", function () { summaryFormatter.storeFailedScenario(failedScenario); expect(failedScenario.getName).toHaveBeenCalled(); }); it("gets the URI of the scenario", function () { summaryFormatter.storeFailedScenario(failedScenario); expect(failedScenario.getUri).toHaveBeenCalled(); }); it("gets the line of the scenario", function () { summaryFormatter.storeFailedScenario(failedScenario); expect(failedScenario.getLine).toHaveBeenCalled(); }); it("appends the scenario details to the failed scenario log buffer", function () { summaryFormatter.storeFailedScenario(failedScenario); expect(summaryFormatter.appendStringToFailedScenarioLogBuffer).toHaveBeenCalledWith(string); }); }); describe("storeUndefinedStep()", function () { var snippetBuilderSyntax, numberMatchingGroup, snippetBuilder, snippet, step; beforeEach(function () { numberMatchingGroup = createSpy("snippet number matching group"); snippetBuilderSyntax = createSpyWithStubs("snippet builder syntax", {getNumberMatchingGroup: numberMatchingGroup}); step = createSpy("step"); snippet = createSpy("step definition snippet"); snippetBuilder = createSpyWithStubs("snippet builder", {buildSnippet: snippet}); spyOn(Cucumber.SupportCode, 'StepDefinitionSnippetBuilder').andReturn(snippetBuilder); spyOn(summaryFormatter, 'appendStringToUndefinedStepLogBuffer'); spyOn(summaryFormatter, 'getStepDefinitionSyntax').andReturn(snippetBuilderSyntax); }); it("creates a new step definition snippet builder", function () { summaryFormatter.storeUndefinedStep(step, snippetBuilderSyntax); expect(Cucumber.SupportCode.StepDefinitionSnippetBuilder).toHaveBeenCalledWith(step, snippetBuilderSyntax); }); it("builds the step definition", function () { summaryFormatter.storeUndefinedStep(step, snippetBuilderSyntax); expect(snippetBuilder.buildSnippet).toHaveBeenCalled(); }); it("appends the snippet to the undefined step log buffer", function () { summaryFormatter.storeUndefinedStep(step, snippetBuilderSyntax); expect(summaryFormatter.appendStringToUndefinedStepLogBuffer).toHaveBeenCalledWith(snippet); }); }); describe("getFailedScenarioLogBuffer() [appendStringToFailedScenarioLogBuffer()]", function () { it("returns the logged failed scenario details", function () { summaryFormatter.appendStringToFailedScenarioLogBuffer("abc"); expect(summaryFormatter.getFailedScenarioLogBuffer()).toBe("abc\n"); }); it("returns all logged failed scenario lines joined with a line break", function () { summaryFormatter.appendStringToFailedScenarioLogBuffer("abc"); summaryFormatter.appendStringToFailedScenarioLogBuffer("def"); expect(summaryFormatter.getFailedScenarioLogBuffer()).toBe("abc\ndef\n"); }); }); describe("getUndefinedStepLogBuffer() [appendStringToUndefinedStepLogBuffer()]", function () { it("returns the logged undefined step details", function () { summaryFormatter.appendStringToUndefinedStepLogBuffer("abc"); expect(summaryFormatter.getUndefinedStepLogBuffer()).toBe("abc\n"); }); it("returns all logged failed scenario lines joined with a line break", function () { summaryFormatter.appendStringToUndefinedStepLogBuffer("abc"); summaryFormatter.appendStringToUndefinedStepLogBuffer("def"); expect(summaryFormatter.getUndefinedStepLogBuffer()).toBe("abc\ndef\n"); }); }); describe("appendStringToUndefinedStepLogBuffer() [getUndefinedStepLogBuffer()]", function () { it("does not log the same string twice", function () { summaryFormatter.appendStringToUndefinedStepLogBuffer("abcdef"); summaryFormatter.appendStringToUndefinedStepLogBuffer("abcdef"); expect(summaryFormatter.getUndefinedStepLogBuffer()).toBe("abcdef\n"); }); }); describe("logSummary()", function () { var scenarioCount, passedScenarioCount, failedScenarioCount; var stepCount, passedStepCount; beforeEach(function () { spyOn(summaryFormatter, 'logScenariosSummary'); spyOn(summaryFormatter, 'logStepsSummary'); spyOn(summaryFormatter, 'logFailedStepResults'); spyOn(summaryFormatter, 'logUndefinedStepSnippets'); spyOnStub(statsJournal, 'witnessedAnyFailedStep'); spyOnStub(statsJournal, 'witnessedAnyUndefinedStep'); spyOnStub(statsJournal, 'logFailedStepResults'); spyOnStub(statsJournal, 'logScenariosSummary'); spyOnStub(statsJournal, 'logStepsSummary'); spyOnStub(statsJournal, 'logUndefinedStepSnippets'); }); it("checks whether there are failed steps or not", function () { summaryFormatter.logSummary(); expect(statsJournal.witnessedAnyFailedStep).toHaveBeenCalled(); }); describe("when there are failed steps", function () { beforeEach(function () { statsJournal.witnessedAnyFailedStep.andReturn(true); }); it("logs the failed steps", function () { summaryFormatter.logSummary(); expect(summaryFormatter.logFailedStepResults).toHaveBeenCalled(); }); }); describe("when there are no failed steps", function () { beforeEach(function () { statsJournal.witnessedAnyFailedStep.andReturn(false); }); it("does not log failed steps", function () { summaryFormatter.logSummary(); expect(summaryFormatter.logFailedStepResults).not.toHaveBeenCalled(); }); }); it("logs the scenarios summary", function () { summaryFormatter.logSummary(); expect(summaryFormatter.logScenariosSummary).toHaveBeenCalled(); }); it("logs the steps summary", function () { summaryFormatter.logSummary(); expect(summaryFormatter.logStepsSummary).toHaveBeenCalled(); }); it("checks whether there are undefined steps or not", function () { summaryFormatter.logSummary(); expect(statsJournal.witnessedAnyUndefinedStep).toHaveBeenCalled(); }); describe("when there are undefined steps", function () { beforeEach(function () { statsJournal.witnessedAnyUndefinedStep.andReturn(true); }); it("logs the undefined step snippets", function () { summaryFormatter.logSummary(); expect(summaryFormatter.logUndefinedStepSnippets).toHaveBeenCalled(); }); }); describe("when there are no undefined steps", function () { beforeEach(function () { statsJournal.witnessedAnyUndefinedStep.andReturn(false); }); it("does not log the undefined step snippets", function () { summaryFormatter.logSummary(); expect(summaryFormatter.logUndefinedStepSnippets).not.toHaveBeenCalled(); }); }); }); describe("logFailedStepResults()", function () { var failedScenarioLogBuffer; beforeEach(function () { failedScenarioLogBuffer = createSpy("failed scenario log buffer"); spyOnStub(failedStepResults, 'syncForEach'); spyOn(summaryFormatter, 'getFailedScenarioLogBuffer').andReturn(failedScenarioLogBuffer); }); it("logs a failed steps header", function () { summaryFormatter.logFailedStepResults(); expect(summaryFormatter.log).toHaveBeenCalledWith("(::) failed steps (::)\n\n"); }); it("iterates synchronously over the failed step results", function () { summaryFormatter.logFailedStepResults(); expect(failedStepResults.syncForEach).toHaveBeenCalled(); expect(failedStepResults.syncForEach).toHaveBeenCalledWithAFunctionAsNthParameter(1); }); describe("for each failed step result", function () { var userFunction, failedStep, forEachCallback; beforeEach(function () { summaryFormatter.logFailedStepResults(); userFunction = failedStepResults.syncForEach.mostRecentCall.args[0]; failedStepResult = createSpy("failed step result"); spyOn(summaryFormatter, 'logFailedStepResult'); }); it("tells the visitor to visit the feature and call back when finished", function () { userFunction(failedStepResult); expect(summaryFormatter.logFailedStepResult).toHaveBeenCalledWith(failedStepResult); }); }); it("logs a failed scenarios header", function () { summaryFormatter.logFailedStepResults(); expect(summaryFormatter.log).toHaveBeenCalledWith("Failing scenarios:\n"); }); it("gets the failed scenario details from its log buffer", function () { summaryFormatter.logFailedStepResults(); expect(summaryFormatter.getFailedScenarioLogBuffer).toHaveBeenCalled(); }); it("logs the failed scenario details", function () { summaryFormatter.logFailedStepResults(); expect(summaryFormatter.log).toHaveBeenCalledWith(failedScenarioLogBuffer); }); it("logs a line break", function () { summaryFormatter.logFailedStepResults(); expect(summaryFormatter.log).toHaveBeenCalledWith("\n"); }); }); describe("logFailedStepResult()", function () { var stepResult, failureException; beforeEach(function () { failureException = createSpy('caught exception'); stepResult = createSpyWithStubs("failed step result", { getFailureException: failureException }); }); it("gets the failure exception from the step result", function () { summaryFormatter.logFailedStepResult(stepResult); expect(stepResult.getFailureException).toHaveBeenCalled(); }); describe("when the failure exception has a stack", function () { beforeEach(function () { failureException.stack = createSpy('failure exception stack'); }); it("logs the stack", function () { summaryFormatter.logFailedStepResult(stepResult); expect(summaryFormatter.log).toHaveBeenCalledWith(failureException.stack); }); }); describe("when the failure exception has no stack", function () { it("logs the exception itself", function () { summaryFormatter.logFailedStepResult(stepResult); expect(summaryFormatter.log).toHaveBeenCalledWith(failureException); }); }); it("logs two line breaks", function () { summaryFormatter.logFailedStepResult(stepResult); expect(summaryFormatter.log).toHaveBeenCalledWith("\n\n"); }); }); describe("logScenariosSummary()", function () { var scenarioCount, passedScenarioCount, pendingScenarioCount, failedScenarioCount; beforeEach(function () { scenarioCount = 12; passedScenarioCount = 9; undefinedScenarioCount = 17; pendingScenarioCount = 7; failedScenarioCount = 15; spyOnStub(statsJournal, 'getScenarioCount').andReturn(scenarioCount); spyOnStub(statsJournal, 'getPassedScenarioCount').andReturn(passedScenarioCount); spyOnStub(statsJournal, 'getUndefinedScenarioCount').andReturn(undefinedScenarioCount); spyOnStub(statsJournal, 'getPendingScenarioCount').andReturn(pendingScenarioCount); spyOnStub(statsJournal, 'getFailedScenarioCount').andReturn(failedScenarioCount); }); it("gets the number of scenarios", function () { summaryFormatter.logScenariosSummary(); expect(statsJournal.getScenarioCount).toHaveBeenCalled(); }); describe("when there are no scenarios", function () { beforeEach(function () { statsJournal.getScenarioCount.andReturn(0); }); it("logs 0 scenarios", function () { summaryFormatter.logScenariosSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/0 scenarios/); }); it("does not log any details", function () { summaryFormatter.logScenariosSummary(); expect(summaryFormatter.log).not.toHaveBeenCalledWithStringMatching(/\(.*\)/); }); }); describe("when there are scenarios", function () { beforeEach(function () { statsJournal.getScenarioCount.andReturn(12); }); describe("when there is one scenario", function () { beforeEach(function () { statsJournal.getScenarioCount.andReturn(1); }); it("logs one scenario", function () { summaryFormatter.logScenariosSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/1 scenario([^s]|$)/); }); }); describe("when there are 2 or more scenarios", function () { beforeEach(function () { statsJournal.getScenarioCount.andReturn(2); }); it("logs two or more scenarios", function () { summaryFormatter.logScenariosSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/2 scenarios/); }); }); it("gets the number of failed scenarios", function () { summaryFormatter.logScenariosSummary(); expect(statsJournal.getFailedScenarioCount).toHaveBeenCalled(); }); describe("when there are no failed scenarios", function () { beforeEach(function () { statsJournal.getFailedScenarioCount.andReturn(0); }); it("does not log failed scenarios", function () { summaryFormatter.logScenariosSummary(); expect(summaryFormatter.log).not.toHaveBeenCalledWithStringMatching(/failed/); }); }); describe("when there is one failed scenario", function () { beforeEach(function () { statsJournal.getFailedScenarioCount.andReturn(1); }); it("logs a failed scenario", function () { summaryFormatter.logScenariosSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/1 failed/); }); }); describe("when there are two or more failed scenarios", function () { beforeEach(function () { statsJournal.getFailedScenarioCount.andReturn(2); }); it("logs the number of failed scenarios", function () { summaryFormatter.logScenariosSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/2 failed/); }); }); it("gets the number of undefined scenarios", function () { summaryFormatter.logScenariosSummary(); expect(statsJournal.getUndefinedScenarioCount).toHaveBeenCalled(); }); describe("when there are no undefined scenarios", function () { beforeEach(function () { statsJournal.getUndefinedScenarioCount.andReturn(0); }); it("does not log passed scenarios", function () { summaryFormatter.logScenariosSummary(); expect(summaryFormatter.log).not.toHaveBeenCalledWithStringMatching(/undefined/); }); }); describe("when there is one undefined scenario", function () { beforeEach(function () { statsJournal.getUndefinedScenarioCount.andReturn(1); }); it("logs one undefined scenario", function () { summaryFormatter.logScenariosSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/1 undefined/); }); }); describe("when there are two or more undefined scenarios", function () { beforeEach(function () { statsJournal.getUndefinedScenarioCount.andReturn(2); }); it("logs the undefined scenarios", function () { summaryFormatter.logScenariosSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/2 undefined/); }); }); it("gets the number of pending scenarios", function () { summaryFormatter.logScenariosSummary(); expect(statsJournal.getPendingScenarioCount).toHaveBeenCalled(); }); describe("when there are no pending scenarios", function () { beforeEach(function () { statsJournal.getPendingScenarioCount.andReturn(0); }); it("does not log passed scenarios", function () { summaryFormatter.logScenariosSummary(); expect(summaryFormatter.log).not.toHaveBeenCalledWithStringMatching(/pending/); }); }); describe("when there is one pending scenario", function () { beforeEach(function () { statsJournal.getPendingScenarioCount.andReturn(1); }); it("logs one pending scenario", function () { summaryFormatter.logScenariosSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/1 pending/); }); }); describe("when there are two or more pending scenarios", function () { beforeEach(function () { statsJournal.getPendingScenarioCount.andReturn(2); }); it("logs the pending scenarios", function () { summaryFormatter.logScenariosSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/2 pending/); }); }); it("gets the number of passed scenarios", function () { summaryFormatter.logScenariosSummary(); expect(statsJournal.getPassedScenarioCount).toHaveBeenCalled(); }); describe("when there are no passed scenarios", function () { beforeEach(function () { statsJournal.getPassedScenarioCount.andReturn(0); }); it("does not log passed scenarios", function () { summaryFormatter.logScenariosSummary(); expect(summaryFormatter.log).not.toHaveBeenCalledWithStringMatching(/passed/); }); }); describe("when there is one passed scenario", function () { beforeEach(function () { statsJournal.getPassedScenarioCount.andReturn(1); }); it("logs 1 passed scenarios", function () { summaryFormatter.logScenariosSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/1 passed/); }); }); describe("when there are two or more passed scenarios", function () { beforeEach(function () { statsJournal.getPassedScenarioCount.andReturn(2); }); it("logs the number of passed scenarios", function () { summaryFormatter.logScenariosSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/2 passed/); }); }); }); }); describe("logStepsSummary()", function () { var stepCount, passedStepCount, failedStepCount, skippedStepCount, pendingStepCount; beforeEach(function () { stepCount = 34; passedStepCount = 31; failedStepCount = 7; skippedStepCount = 5; undefinedStepCount = 4; pendingStepCount = 2; spyOnStub(statsJournal, 'getStepCount').andReturn(stepCount); spyOnStub(statsJournal, 'getPassedStepCount').andReturn(passedStepCount); spyOnStub(statsJournal, 'getFailedStepCount').andReturn(failedStepCount); spyOnStub(statsJournal, 'getSkippedStepCount').andReturn(skippedStepCount); spyOnStub(statsJournal, 'getUndefinedStepCount').andReturn(undefinedStepCount); spyOnStub(statsJournal, 'getPendingStepCount').andReturn(pendingStepCount); }); it("gets the number of steps", function () { summaryFormatter.logStepsSummary(); expect(statsJournal.getStepCount).toHaveBeenCalled(); }); describe("when there are no steps", function () { beforeEach(function () { statsJournal.getStepCount.andReturn(0); }); it("logs 0 steps", function () { summaryFormatter.logStepsSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/0 steps/); }); it("does not log any details", function () { summaryFormatter.logStepsSummary(); expect(summaryFormatter.log).not.toHaveBeenCalledWithStringMatching(/\(.*\)/); }); }); describe("when there are steps", function () { beforeEach(function () { statsJournal.getStepCount.andReturn(13); }); describe("when there is one step", function () { beforeEach(function () { statsJournal.getStepCount.andReturn(1); }); it("logs 1 step", function () { summaryFormatter.logStepsSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/1 step/); }); }); describe("when there are two or more steps", function () { beforeEach(function () { statsJournal.getStepCount.andReturn(2); }); it("logs the number of steps", function () { summaryFormatter.logStepsSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/2 steps/); }); }); it("gets the number of failed steps", function () { summaryFormatter.logStepsSummary(); expect(statsJournal.getFailedStepCount).toHaveBeenCalled(); }); describe("when there are no failed steps", function () { beforeEach(function () { statsJournal.getFailedStepCount.andReturn(0); }); it("does not log failed steps", function () { summaryFormatter.logStepsSummary(); expect(summaryFormatter.log).not.toHaveBeenCalledWithStringMatching(/failed/); }); }); describe("when there is one failed step", function () { beforeEach(function () { statsJournal.getFailedStepCount.andReturn(1); }); it("logs one failed step", function () { summaryFormatter.logStepsSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/1 failed/); }); }); describe("when there is two or more failed steps", function () { beforeEach(function () { statsJournal.getFailedStepCount.andReturn(2); }); it("logs the number of failed steps", function () { summaryFormatter.logStepsSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/2 failed/); }); }); it("gets the number of undefined steps", function () { summaryFormatter.logStepsSummary(); expect(statsJournal.getUndefinedStepCount).toHaveBeenCalled(); }); describe("when there are no undefined steps", function () { beforeEach(function () { statsJournal.getUndefinedStepCount.andReturn(0); }); it("does not log undefined steps", function () { summaryFormatter.logStepsSummary(); expect(summaryFormatter.log).not.toHaveBeenCalledWithStringMatching(/undefined/); }); }); describe("when there is one undefined step", function () { beforeEach(function () { statsJournal.getUndefinedStepCount.andReturn(1); }); it("logs one undefined steps", function () { summaryFormatter.logStepsSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/1 undefined/); }); }); describe("when there are two or more undefined steps", function () { beforeEach(function () { statsJournal.getUndefinedStepCount.andReturn(2); }); it("logs the number of undefined steps", function () { summaryFormatter.logStepsSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/2 undefined/); }); }); it("gets the number of pending steps", function () { summaryFormatter.logStepsSummary(); expect(statsJournal.getPendingStepCount).toHaveBeenCalled(); }); describe("when there are no pending steps", function () { beforeEach(function () { statsJournal.getPendingStepCount.andReturn(0); }); it("does not log pending steps", function () { summaryFormatter.logStepsSummary(); expect(summaryFormatter.log).not.toHaveBeenCalledWithStringMatching(/pending/); }); }); describe("when there is one pending step", function () { beforeEach(function () { statsJournal.getPendingStepCount.andReturn(1); }); it("logs one pending steps", function () { summaryFormatter.logStepsSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/1 pending/); }); }); describe("when there are two or more pending steps", function () { beforeEach(function () { statsJournal.getPendingStepCount.andReturn(2); }); it("logs the number of pending steps", function () { summaryFormatter.logStepsSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/2 pending/); }); }); it("gets the number of skipped steps", function () { summaryFormatter.logStepsSummary(); expect(statsJournal.getSkippedStepCount).toHaveBeenCalled(); }); describe("when there are no skipped steps", function () { beforeEach(function () { statsJournal.getSkippedStepCount.andReturn(0); }); it("does not log skipped steps", function () { summaryFormatter.logStepsSummary(); expect(summaryFormatter.log).not.toHaveBeenCalledWithStringMatching(/skipped/); }); }); describe("when there is one skipped step", function () { beforeEach(function () { statsJournal.getSkippedStepCount.andReturn(1); }); it("logs one skipped steps", function () { summaryFormatter.logStepsSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/1 skipped/); }); }); describe("when there are two or more skipped steps", function () { beforeEach(function () { statsJournal.getSkippedStepCount.andReturn(2); }); it("logs the number of skipped steps", function () { summaryFormatter.logStepsSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/2 skipped/); }); }); it("gets the number of passed steps", function () { summaryFormatter.logStepsSummary(); expect(statsJournal.getPassedStepCount).toHaveBeenCalled(); }); describe("when there are no passed steps", function () { beforeEach(function () { statsJournal.getPassedStepCount.andReturn(0); }); it("does not log passed steps", function () { summaryFormatter.logStepsSummary(); expect(summaryFormatter.log).not.toHaveBeenCalledWithStringMatching(/passed/); }); }); describe("when there is one passed step", function () { beforeEach(function () { statsJournal.getPassedStepCount.andReturn(1); }); it("logs one passed step", function () { summaryFormatter.logStepsSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/1 passed/); }); }); describe("when there is two or more passed steps", function () { beforeEach(function () { statsJournal.getPassedStepCount.andReturn(2); }); it("logs the number of passed steps", function () { summaryFormatter.logStepsSummary(); expect(summaryFormatter.log).toHaveBeenCalledWithStringMatching(/2 passed/); }); }); }); }); describe("logUndefinedStepSnippets()", function () { var undefinedStepLogBuffer; beforeEach(function () { // Undefined Step Log buffer is string undefinedStepLogBuffer = 'undefinedStepsLogBuffer'; spyOn(summaryFormatter, 'getUndefinedStepLogBuffer').andReturn(undefinedStepLogBuffer); }); it("logs a little explanation about the snippets", function () { summaryFormatter.logUndefinedStepSnippets(); expect(summaryFormatter.log).toHaveBeenCalledWith(color.format('pending', "\nYou can implement step definitions for undefined steps with these snippets:\n\n")); }); it("gets the undefined steps log buffer", function () { summaryFormatter.logUndefinedStepSnippets(); expect(summaryFormatter.getUndefinedStepLogBuffer).toHaveBeenCalled(); }); it("logs the undefined steps", function () { summaryFormatter.logUndefinedStepSnippets(); expect(summaryFormatter.log).toHaveBeenCalledWith(color.format('pending', undefinedStepLogBuffer)); }); }); });
/*globals Ember*/ /*jshint eqnull:true*/ /** @module ember-data */ import normalizeModelName from "ember-data/system/normalize-model-name"; import { InvalidError } from 'ember-data/adapters/errors'; import { Map } from "ember-data/system/map"; import { promiseArray, promiseObject } from "ember-data/system/promise-proxies"; import { _bind, _guard, _objectIsAlive } from "ember-data/system/store/common"; import { convertResourceObject, normalizeResponseHelper, _normalizeSerializerPayload } from "ember-data/system/store/serializer-response"; import { serializerForAdapter } from "ember-data/system/store/serializers"; import { _find, _findMany, _findHasMany, _findBelongsTo, _findAll, _query, _queryRecord } from "ember-data/system/store/finders"; import coerceId from "ember-data/system/coerce-id"; import RecordArrayManager from "ember-data/system/record-array-manager"; import ContainerInstanceCache from 'ember-data/system/store/container-instance-cache'; import InternalModel from "ember-data/system/model/internal-model"; var Backburner = Ember._Backburner || Ember.Backburner || Ember.__loader.require('backburner')['default'] || Ember.__loader.require('backburner')['Backburner']; //Shim Backburner.join if (!Backburner.prototype.join) { var isString = function(suspect) { return typeof suspect === 'string'; }; Backburner.prototype.join = function(/*target, method, args */) { var method, target; if (this.currentInstance) { var length = arguments.length; if (length === 1) { method = arguments[0]; target = null; } else { target = arguments[0]; method = arguments[1]; } if (isString(method)) { method = target[method]; } if (length === 1) { return method(); } else if (length === 2) { return method.call(target); } else { var args = new Array(length - 2); for (var i =0, l = length - 2; i < l; i++) { args[i] = arguments[i + 2]; } return method.apply(target, args); } } else { return this.run.apply(this, arguments); } }; } //Get the materialized model from the internalModel/promise that returns //an internal model and return it in a promiseObject. Useful for returning //from find methods function promiseRecord(internalModel, label) { var toReturn = internalModel.then((model) => model.getRecord()); return promiseObject(toReturn, label); } var get = Ember.get; var set = Ember.set; var once = Ember.run.once; var isNone = Ember.isNone; var Promise = Ember.RSVP.Promise; var copy = Ember.copy; var Store; var Service = Ember.Service; if (!Service) { Service = Ember.Object; } // Implementors Note: // // The variables in this file are consistently named according to the following // scheme: // // * +id+ means an identifier managed by an external source, provided inside // the data provided by that source. These are always coerced to be strings // before being used internally. // * +clientId+ means a transient numerical identifier generated at runtime by // the data store. It is important primarily because newly created objects may // not yet have an externally generated id. // * +internalModel+ means a record internalModel object, which holds metadata about a // record, even if it has not yet been fully materialized. // * +type+ means a DS.Model. /** The store contains all of the data for records loaded from the server. It is also responsible for creating instances of `DS.Model` that wrap the individual data for a record, so that they can be bound to in your Handlebars templates. Define your application's store like this: ```app/stores/application.js import DS from 'ember-data'; export default DS.Store.extend({ }); ``` Most Ember.js applications will only have a single `DS.Store` that is automatically created by their `Ember.Application`. You can retrieve models from the store in several ways. To retrieve a record for a specific id, use `DS.Store`'s `find()` method: ```javascript store.find('person', 123).then(function (person) { }); ``` By default, the store will talk to your backend using a standard REST mechanism. You can customize how the store talks to your backend by specifying a custom adapter: ```app/adapters/application.js import DS from 'ember-data'; export default DS.Adapter.extend({ }); ``` You can learn more about writing a custom adapter by reading the `DS.Adapter` documentation. ### Store createRecord() vs. push() vs. pushPayload() The store provides multiple ways to create new record objects. They have some subtle differences in their use which are detailed below: [createRecord](#method_createRecord) is used for creating new records on the client side. This will return a new record in the `created.uncommitted` state. In order to persist this record to the backend you will need to call `record.save()`. [push](#method_push) is used to notify Ember Data's store of new or updated records that exist in the backend. This will return a record in the `loaded.saved` state. The primary use-case for `store#push` is to notify Ember Data about record updates (full or partial) that happen outside of the normal adapter methods (for example [SSE](http://dev.w3.org/html5/eventsource/) or [Web Sockets](http://www.w3.org/TR/2009/WD-websockets-20091222/)). [pushPayload](#method_pushPayload) is a convenience wrapper for `store#push` that will deserialize payloads if the Serializer implements a `pushPayload` method. Note: When creating a new record using any of the above methods Ember Data will update `DS.RecordArray`s such as those returned by `store#peekAll()`, `store#findAll()` or `store#filter()`. This means any data bindings or computed properties that depend on the RecordArray will automatically be synced to include the new or updated record values. @class Store @namespace DS @extends Ember.Service */ Store = Service.extend({ /** @method init @private */ init: function() { this._super(...arguments); this._backburner = new Backburner(['normalizeRelationships', 'syncRelationships', 'finished']); // internal bookkeeping; not observable this.typeMaps = {}; this.recordArrayManager = RecordArrayManager.create({ store: this }); this._pendingSave = []; this._instanceCache = new ContainerInstanceCache(this.container); //Used to keep track of all the find requests that need to be coalesced this._pendingFetch = Map.create(); }, /** The adapter to use to communicate to a backend server or other persistence layer. This can be specified as an instance, class, or string. If you want to specify `app/adapters/custom.js` as a string, do: ```js adapter: 'custom' ``` @property adapter @default DS.RESTAdapter @type {(DS.Adapter|String)} */ adapter: '-rest', /** Returns a JSON representation of the record using a custom type-specific serializer, if one exists. The available options are: * `includeId`: `true` if the record's ID should be included in the JSON representation @method serialize @private @param {DS.Model} record the record to serialize @param {Object} options an options hash */ serialize: function(record, options) { var snapshot = record._internalModel.createSnapshot(); return snapshot.serialize(options); }, /** This property returns the adapter, after resolving a possible string key. If the supplied `adapter` was a class, or a String property path resolved to a class, this property will instantiate the class. This property is cacheable, so the same instance of a specified adapter class should be used for the lifetime of the store. @property defaultAdapter @private @return DS.Adapter */ defaultAdapter: Ember.computed('adapter', function() { var adapter = get(this, 'adapter'); Ember.assert('You tried to set `adapter` property to an instance of `DS.Adapter`, where it should be a name', typeof adapter === 'string'); adapter = this.retrieveManagedInstance('adapter', adapter); return adapter; }), // ..................... // . CREATE NEW RECORD . // ..................... /** Create a new record in the current store. The properties passed to this method are set on the newly created record. To create a new instance of a `Post`: ```js store.createRecord('post', { title: "Rails is omakase" }); ``` To create a new instance of a `Post` that has a relationship with a `User` record: ```js var user = this.store.peekRecord('user', 1); store.createRecord('post', { title: "Rails is omakase", user: user }); ``` @method createRecord @param {String} modelName @param {Object} inputProperties a hash of properties to set on the newly created record. @return {DS.Model} record */ createRecord: function(modelName, inputProperties) { Ember.assert(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${Ember.inspect(modelName)}`, typeof modelName === 'string'); var typeClass = this.modelFor(modelName); var properties = copy(inputProperties) || Object.create(null); // If the passed properties do not include a primary key, // give the adapter an opportunity to generate one. Typically, // client-side ID generators will use something like uuid.js // to avoid conflicts. if (isNone(properties.id)) { properties.id = this._generateId(modelName, properties); } // Coerce ID to a string properties.id = coerceId(properties.id); var internalModel = this.buildInternalModel(typeClass, properties.id); var record = internalModel.getRecord(); // Move the record out of its initial `empty` state into // the `loaded` state. internalModel.loadedData(); // Set the properties specified on the record. record.setProperties(properties); internalModel.eachRelationship((key, descriptor) => { internalModel._relationships.get(key).setHasData(true); }); return record; }, /** If possible, this method asks the adapter to generate an ID for a newly created record. @method _generateId @private @param {String} modelName @param {Object} properties from the new record @return {String} if the adapter can generate one, an ID */ _generateId: function(modelName, properties) { var adapter = this.adapterFor(modelName); if (adapter && adapter.generateIdForRecord) { return adapter.generateIdForRecord(this, modelName, properties); } return null; }, // ................. // . DELETE RECORD . // ................. /** For symmetry, a record can be deleted via the store. Example ```javascript var post = store.createRecord('post', { title: "Rails is omakase" }); store.deleteRecord(post); ``` @method deleteRecord @param {DS.Model} record */ deleteRecord: function(record) { record.deleteRecord(); }, /** For symmetry, a record can be unloaded via the store. Only non-dirty records can be unloaded. Example ```javascript store.find('post', 1).then(function(post) { store.unloadRecord(post); }); ``` @method unloadRecord @param {DS.Model} record */ unloadRecord: function(record) { record.unloadRecord(); }, // ................ // . FIND RECORDS . // ................ /** This is the main entry point into finding records. The first parameter to this method is the model's name as a string. --- To find a record by ID, pass the `id` as the second parameter: ```javascript store.find('person', 1); ``` The `find` method will always return a **promise** that will be resolved with the record. If the record was already in the store, the promise will be resolved immediately. Otherwise, the store will ask the adapter's `find` method to find the necessary data. The `find` method will always resolve its promise with the same object for a given type and `id`. --- You can optionally `preload` specific attributes and relationships that you know of by passing them as the third argument to find. For example, if your Ember route looks like `/posts/1/comments/2` and your API route for the comment also looks like `/posts/1/comments/2` if you want to fetch the comment without fetching the post you can pass in the post to the `find` call: ```javascript store.find('comment', 2, { preload: { post: 1 } }); ``` If you have access to the post model you can also pass the model itself: ```javascript store.find('post', 1).then(function (myPostModel) { store.find('comment', 2, {post: myPostModel}); }); ``` This way, your adapter's `find` or `buildURL` method will be able to look up the relationship on the record and construct the nested URL without having to first fetch the post. --- To find all records for a type, call `findAll`: ```javascript store.findAll('person'); ``` This will ask the adapter's `findAll` method to find the records for the given type, and return a promise that will be resolved once the server returns the values. The promise will resolve into all records of this type present in the store, even if the server only returns a subset of them. @method find @param {String} modelName @param {(Object|String|Integer|null)} id @param {Object} options @return {Promise} promise */ find: function(modelName, id, preload) { Ember.assert("You need to pass a type to the store's find method", arguments.length >= 1); Ember.assert("You may not pass `" + id + "` as id to the store's find method", arguments.length === 1 || !Ember.isNone(id)); Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string'); if (arguments.length === 1) { Ember.deprecate('Using store.find(type) has been deprecated. Use store.findAll(type) to retrieve all records for a given type.'); return this.findAll(modelName); } // We are passed a query instead of an id. if (Ember.typeOf(id) === 'object') { Ember.deprecate('Calling store.find() with a query object is deprecated. Use store.query() instead.'); return this.query(modelName, id); } var options = deprecatePreload(preload, this.modelFor(modelName), 'find'); return this.findRecord(modelName, coerceId(id), options); }, /** This method returns a fresh record for a given type and id combination. @method fetchById @deprecated Use [findRecord](#method_findRecord) instead @param {String} modelName @param {(String|Integer)} id @param {Object} options @return {Promise} promise */ fetchById: function(modelName, id, preload) { Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string'); var options = deprecatePreload(preload, this.modelFor(modelName), 'fetchById'); Ember.deprecate('Using store.fetchById(type, id) has been deprecated. Use store.findRecord(type, id, { reload: true }) to reload a record for a given type.'); if (this.hasRecordForId(modelName, id)) { return this.peekRecord(modelName, id).reload(); } else { return this.findRecord(modelName, id, options); } }, /** This method returns a fresh collection from the server, regardless of if there is already records in the store or not. @method fetchAll @deprecated Use [findAll](#method_findAll) instead @param {String} modelName @return {Promise} promise */ fetchAll: function(modelName) { Ember.deprecate('Using store.fetchAll(type) has been deprecated. Use store.findAll(type, { reload: true }) to retrieve all records for a given type.'); return this.findAll(modelName, { reload: true }); }, /** @method fetch @param {String} modelName @param {(String|Integer)} id @param {Object} preload - optional set of attributes and relationships passed in either as IDs or as actual models @return {Promise} promise @deprecated Use [findRecord](#method_findRecord) instead */ fetch: function(modelName, id, preload) { Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string'); Ember.deprecate('Using store.fetch() has been deprecated. Use store.findRecord for fetching individual records or store.findAll for collections'); return this.findRecord(modelName, id, { reload: true, preload: preload }); }, /** This method returns a record for a given type and id combination. @method findById @private @param {String} modelName @param {(String|Integer)} id @param {Object} options @return {Promise} promise */ findById: function(modelName, id, preload) { Ember.deprecate('Using store.findById() has been deprecated. Use store.findRecord() to return a record for a given type and id combination.'); var options = deprecatePreload(preload, this.modelFor(modelName), 'findById'); return this.findRecord(modelName, id, options); }, /** This method returns a record for a given type and id combination. The `findRecord` method will always return a **promise** that will be resolved with the record. If the record was already in the store, the promise will be resolved immediately. Otherwise, the store will ask the adapter's `find` method to find the necessary data. The `findRecord` method will always resolve its promise with the same object for a given type and `id`. Example ```app/routes/post.js import Ember from 'ember'; export default Ember.Route.extend({ model: function(params) { return this.store.findRecord('post', params.post_id); } }); ``` If you would like to force the record to reload, instead of loading it from the cache when present you can set `reload: true` in the options object for `findRecord`. ```app/routes/post/edit.js import Ember from 'ember'; export default Ember.Route.extend({ model: function(params) { return this.store.findRecord('post', params.post_id, { reload: true }); } }); ``` @method findRecord @param {String} modelName @param {(String|Integer)} id @param {Object} options @return {Promise} promise */ findRecord: function(modelName, id, options) { Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string'); var internalModel = this._internalModelForId(modelName, id); options = options || {}; return this._findByInternalModel(internalModel, options); }, _findByInternalModel: function(internalModel, options) { options = options || {}; if (options.preload) { internalModel._preloadData(options.preload); } var fetchedInternalModel = this._fetchOrResolveInternalModel(internalModel, options); return promiseRecord(fetchedInternalModel, "DS: Store#findRecord " + internalModel.typeKey + " with id: " + get(internalModel, 'id')); }, _fetchOrResolveInternalModel: function(internalModel, options) { var typeClass = internalModel.type; var adapter = this.adapterFor(typeClass.modelName); // Always fetch the model if it is not loaded if (internalModel.isEmpty()) { return this.scheduleFetch(internalModel, options); } //TODO double check about reloading if (internalModel.isLoading()) { return internalModel._loadingPromise; } // Refetch if the reload option is passed if (options.reload) { return this.scheduleFetch(internalModel, options); } // Refetch the record if the adapter thinks the record is stale var snapshot = internalModel.createSnapshot(); snapshot.adapterOptions = options && options.adapterOptions; if (adapter.shouldReloadRecord(this, snapshot)) { return this.scheduleFetch(internalModel, options); } // Trigger the background refetch if all the previous checks fail if (adapter.shouldBackgroundReloadRecord(this, snapshot)) { this.scheduleFetch(internalModel, options); } // Return the cached record return Promise.resolve(internalModel); }, /** This method makes a series of requests to the adapter's `find` method and returns a promise that resolves once they are all loaded. @private @method findByIds @param {String} modelName @param {Array} ids @return {Promise} promise */ findByIds: function(modelName, ids) { Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string'); var store = this; return promiseArray(Ember.RSVP.all(ids.map((id) => { return store.findRecord(modelName, id); })).then(Ember.A, null, "DS: Store#findByIds of " + modelName + " complete")); }, /** This method is called by `findRecord` if it discovers that a particular type/id pair hasn't been loaded yet to kick off a request to the adapter. @method fetchRecord @private @param {InternalModel} internalModel model @return {Promise} promise */ // TODO rename this to have an underscore fetchRecord: function(internalModel, options) { var typeClass = internalModel.type; var id = internalModel.id; var adapter = this.adapterFor(typeClass.modelName); Ember.assert("You tried to find a record but you have no adapter (for " + typeClass + ")", adapter); Ember.assert("You tried to find a record but your adapter (for " + typeClass + ") does not implement 'findRecord'", typeof adapter.findRecord === 'function' || typeof adapter.find === 'function'); var promise = _find(adapter, this, typeClass, id, internalModel, options); return promise; }, scheduleFetchMany: function(records) { var internalModels = records.map((record) => record._internalModel); return Promise.all(internalModels.map(this.scheduleFetch, this)); }, scheduleFetch: function(internalModel, options) { var typeClass = internalModel.type; if (internalModel._loadingPromise) { return internalModel._loadingPromise; } var resolver = Ember.RSVP.defer('Fetching ' + typeClass + 'with id: ' + internalModel.id); var pendingFetchItem = { record: internalModel, resolver: resolver, options: options }; var promise = resolver.promise; internalModel.loadingData(promise); if (!this._pendingFetch.get(typeClass)) { this._pendingFetch.set(typeClass, [pendingFetchItem]); } else { this._pendingFetch.get(typeClass).push(pendingFetchItem); } Ember.run.scheduleOnce('afterRender', this, this.flushAllPendingFetches); return promise; }, flushAllPendingFetches: function() { if (this.isDestroyed || this.isDestroying) { return; } this._pendingFetch.forEach(this._flushPendingFetchForType, this); this._pendingFetch = Map.create(); }, _flushPendingFetchForType: function (pendingFetchItems, typeClass) { var store = this; var adapter = store.adapterFor(typeClass.modelName); var shouldCoalesce = !!adapter.findMany && adapter.coalesceFindRequests; var records = Ember.A(pendingFetchItems).mapBy('record'); function _fetchRecord(recordResolverPair) { recordResolverPair.resolver.resolve(store.fetchRecord(recordResolverPair.record, recordResolverPair.options)); // TODO adapter options } function resolveFoundRecords(records) { records.forEach((record) => { var pair = Ember.A(pendingFetchItems).findBy('record', record); if (pair) { var resolver = pair.resolver; resolver.resolve(record); } }); return records; } function makeMissingRecordsRejector(requestedRecords) { return function rejectMissingRecords(resolvedRecords) { resolvedRecords = Ember.A(resolvedRecords); var missingRecords = requestedRecords.reject((record) => resolvedRecords.contains(record)); if (missingRecords.length) { Ember.warn('Ember Data expected to find records with the following ids in the adapter response but they were missing: ' + Ember.inspect(Ember.A(missingRecords).mapBy('id')), false); } rejectRecords(missingRecords); }; } function makeRecordsRejector(records) { return function (error) { rejectRecords(records, error); }; } function rejectRecords(records, error) { records.forEach((record) => { var pair = Ember.A(pendingFetchItems).findBy('record', record); if (pair) { var resolver = pair.resolver; resolver.reject(error); } }); } if (pendingFetchItems.length === 1) { _fetchRecord(pendingFetchItems[0]); } else if (shouldCoalesce) { // TODO: Improve records => snapshots => records => snapshots // // We want to provide records to all store methods and snapshots to all // adapter methods. To make sure we're doing that we're providing an array // of snapshots to adapter.groupRecordsForFindMany(), which in turn will // return grouped snapshots instead of grouped records. // // But since the _findMany() finder is a store method we need to get the // records from the grouped snapshots even though the _findMany() finder // will once again convert the records to snapshots for adapter.findMany() var snapshots = Ember.A(records).invoke('createSnapshot'); var groups = adapter.groupRecordsForFindMany(this, snapshots); groups.forEach((groupOfSnapshots) => { var groupOfRecords = Ember.A(groupOfSnapshots).mapBy('_internalModel'); var requestedRecords = Ember.A(groupOfRecords); var ids = requestedRecords.mapBy('id'); if (ids.length > 1) { _findMany(adapter, store, typeClass, ids, requestedRecords). then(resolveFoundRecords). then(makeMissingRecordsRejector(requestedRecords)). then(null, makeRecordsRejector(requestedRecords)); } else if (ids.length === 1) { var pair = Ember.A(pendingFetchItems).findBy('record', groupOfRecords[0]); _fetchRecord(pair); } else { Ember.assert("You cannot return an empty array from adapter's method groupRecordsForFindMany", false); } }); } else { pendingFetchItems.forEach(_fetchRecord); } }, /** Get a record by a given type and ID without triggering a fetch. This method will synchronously return the record if it is available in the store, otherwise it will return `null`. A record is available if it has been fetched earlier, or pushed manually into the store. _Note: This is an synchronous method and does not return a promise._ ```js var post = store.getById('post', 1); post.get('id'); // 1 ``` @method getById @param {String} modelName @param {String|Integer} id @return {DS.Model|null} record */ getById: function(modelName, id) { Ember.deprecate('Using store.getById() has been deprecated. Use store.peekRecord to get a record by a given type and ID without triggering a fetch.'); return this.peekRecord(modelName, id); }, /** Get a record by a given type and ID without triggering a fetch. This method will synchronously return the record if it is available in the store, otherwise it will return `null`. A record is available if it has been fetched earlier, or pushed manually into the store. _Note: This is an synchronous method and does not return a promise._ ```js var post = store.peekRecord('post', 1); post.get('id'); // 1 ``` @method peekRecord @param {String} modelName @param {String|Integer} id @return {DS.Model|null} record */ peekRecord: function(modelName, id) { Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string'); if (this.hasRecordForId(modelName, id)) { return this._internalModelForId(modelName, id).getRecord(); } else { return null; } }, /** This method is called by the record's `reload` method. This method calls the adapter's `find` method, which returns a promise. When **that** promise resolves, `reloadRecord` will resolve the promise returned by the record's `reload`. @method reloadRecord @private @param {DS.Model} internalModel @return {Promise} promise */ reloadRecord: function(internalModel) { var modelName = internalModel.type.modelName; var adapter = this.adapterFor(modelName); var id = internalModel.id; Ember.assert("You cannot reload a record without an ID", id); Ember.assert("You tried to reload a record but you have no adapter (for " + modelName + ")", adapter); Ember.assert("You tried to reload a record but your adapter does not implement `findRecord`", typeof adapter.findRecord === 'function' || typeof adapter.find === 'function'); return this.scheduleFetch(internalModel); }, /** Returns true if a record for a given type and ID is already loaded. @method hasRecordForId @param {(String|DS.Model)} modelName @param {(String|Integer)} inputId @return {Boolean} */ hasRecordForId: function(modelName, inputId) { Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string'); var typeClass = this.modelFor(modelName); var id = coerceId(inputId); var internalModel = this.typeMapFor(typeClass).idToRecord[id]; return !!internalModel && internalModel.isLoaded(); }, /** Returns id record for a given type and ID. If one isn't already loaded, it builds a new record and leaves it in the `empty` state. @method recordForId @private @param {String} modelName @param {(String|Integer)} id @return {DS.Model} record */ recordForId: function(modelName, id) { Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string'); return this._internalModelForId(modelName, id).getRecord(); }, _internalModelForId: function(typeName, inputId) { var typeClass = this.modelFor(typeName); var id = coerceId(inputId); var idToRecord = this.typeMapFor(typeClass).idToRecord; var record = idToRecord[id]; if (!record || !idToRecord[id]) { record = this.buildInternalModel(typeClass, id); } return record; }, /** @method findMany @private @param {Array} internalModels @return {Promise} promise */ findMany: function(internalModels) { return Promise.all(internalModels.map((internalModel) => this._findByInternalModel(internalModel))); }, /** If a relationship was originally populated by the adapter as a link (as opposed to a list of IDs), this method is called when the relationship is fetched. The link (which is usually a URL) is passed through unchanged, so the adapter can make whatever request it wants. The usual use-case is for the server to register a URL as a link, and then use that URL in the future to make a request for the relationship. @method findHasMany @private @param {DS.Model} owner @param {any} link @param {(Relationship)} relationship @return {Promise} promise */ findHasMany: function(owner, link, relationship) { var adapter = this.adapterFor(owner.type.modelName); Ember.assert("You tried to load a hasMany relationship but you have no adapter (for " + owner.type + ")", adapter); Ember.assert("You tried to load a hasMany relationship from a specified `link` in the original payload but your adapter does not implement `findHasMany`", typeof adapter.findHasMany === 'function'); return _findHasMany(adapter, this, owner, link, relationship); }, /** @method findBelongsTo @private @param {DS.Model} owner @param {any} link @param {Relationship} relationship @return {Promise} promise */ findBelongsTo: function(owner, link, relationship) { var adapter = this.adapterFor(owner.type.modelName); Ember.assert("You tried to load a belongsTo relationship but you have no adapter (for " + owner.type + ")", adapter); Ember.assert("You tried to load a belongsTo relationship from a specified `link` in the original payload but your adapter does not implement `findBelongsTo`", typeof adapter.findBelongsTo === 'function'); return _findBelongsTo(adapter, this, owner, link, relationship); }, /** This method delegates a query to the adapter. This is the one place where adapter-level semantics are exposed to the application. Exposing queries this way seems preferable to creating an abstract query language for all server-side queries, and then require all adapters to implement them. The call made to the server, using a Rails backend, will look something like this: ``` Started GET "/api/v1/person?page=1" Processing by Api::V1::PersonsController#index as HTML Parameters: {"page"=>"1"} ``` If you do something like this: ```javascript store.query('person', {ids: [1, 2, 3]}); ``` The call to the server, using a Rails backend, will look something like this: ``` Started GET "/api/v1/person?ids%5B%5D=1&ids%5B%5D=2&ids%5B%5D=3" Processing by Api::V1::PersonsController#index as HTML Parameters: {"ids"=>["1", "2", "3"]} ``` This method returns a promise, which is resolved with a `RecordArray` once the server returns. @method query @param {String} modelName @param {any} query an opaque query to be used by the adapter @return {Promise} promise */ query: function(modelName, query) { Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string'); var typeClass = this.modelFor(modelName); var array = this.recordArrayManager .createAdapterPopulatedRecordArray(typeClass, query); var adapter = this.adapterFor(modelName); Ember.assert("You tried to load a query but you have no adapter (for " + typeClass + ")", adapter); Ember.assert("You tried to load a query but your adapter does not implement `query`", typeof adapter.query === 'function' || typeof adapter.findQuery === 'function'); return promiseArray(_query(adapter, this, typeClass, query, array)); }, /** This method delegates a query to the adapter. This is the one place where adapter-level semantics are exposed to the application. Exposing queries this way seems preferable to creating an abstract query language for all server-side queries, and then require all adapters to implement them. This method returns a promise, which is resolved with a `RecordObject` once the server returns. @method queryRecord @param {String or subclass of DS.Model} type @param {any} query an opaque query to be used by the adapter @return {Promise} promise */ queryRecord: function(modelName, query) { Ember.assert("You need to pass a type to the store's queryRecord method", modelName); Ember.assert("You need to pass a query hash to the store's queryRecord method", query); Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string'); var typeClass = this.modelFor(modelName); var adapter = this.adapterFor(modelName); Ember.assert("You tried to make a query but you have no adapter (for " + typeClass + ")", adapter); Ember.assert("You tried to make a query but your adapter does not implement `queryRecord`", typeof adapter.queryRecord === 'function'); return promiseObject(_queryRecord(adapter, this, typeClass, query)); }, /** This method delegates a query to the adapter. This is the one place where adapter-level semantics are exposed to the application. Exposing queries this way seems preferable to creating an abstract query language for all server-side queries, and then require all adapters to implement them. This method returns a promise, which is resolved with a `RecordArray` once the server returns. @method query @param {String} modelName @param {any} query an opaque query to be used by the adapter @return {Promise} promise @deprecated Use `store.query instead` */ findQuery: function(modelName, query) { Ember.deprecate('store#findQuery is deprecated. You should use store#query instead.'); return this.query(modelName, query); }, /** `findAll` ask the adapter's `findAll` method to find the records for the given type, and return a promise that will be resolved once the server returns the values. The promise will resolve into all records of this type present in the store, even if the server only returns a subset of them. ```app/routes/authors.js import Ember from 'ember'; export default Ember.Route.extend({ model: function(params) { return this.store.findAll('author'); } }); ``` @method findAll @param {String} modelName @param {Object} options @return {DS.AdapterPopulatedRecordArray} */ findAll: function(modelName, options) { Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string'); var typeClass = this.modelFor(modelName); return this._fetchAll(typeClass, this.peekAll(modelName), options); }, /** @method _fetchAll @private @param {DS.Model} typeClass @param {DS.RecordArray} array @return {Promise} promise */ _fetchAll: function(typeClass, array, options) { options = options || {}; var adapter = this.adapterFor(typeClass.modelName); var sinceToken = this.typeMapFor(typeClass).metadata.since; set(array, 'isUpdating', true); Ember.assert("You tried to load all records but you have no adapter (for " + typeClass + ")", adapter); Ember.assert("You tried to load all records but your adapter does not implement `findAll`", typeof adapter.findAll === 'function'); if (options.reload) { return promiseArray(_findAll(adapter, this, typeClass, sinceToken, options)); } var snapshotArray = array.createSnapshot(options); if (adapter.shouldReloadAll(this, snapshotArray)) { return promiseArray(_findAll(adapter, this, typeClass, sinceToken, options)); } if (adapter.shouldBackgroundReloadAll(this, snapshotArray)) { promiseArray(_findAll(adapter, this, typeClass, sinceToken, options)); } return promiseArray(Promise.resolve(array)); }, /** @method didUpdateAll @param {DS.Model} typeClass @private */ didUpdateAll: function(typeClass) { var liveRecordArray = this.recordArrayManager.liveRecordArrayFor(typeClass); set(liveRecordArray, 'isUpdating', false); }, /** This method returns a filtered array that contains all of the known records for a given type in the store. Note that because it's just a filter, the result will contain any locally created records of the type, however, it will not make a request to the backend to retrieve additional records. If you would like to request all the records from the backend please use [store.find](#method_find). Also note that multiple calls to `all` for a given type will always return the same `RecordArray`. Example ```javascript var localPosts = store.all('post'); ``` @method all @param {String} modelName @return {DS.RecordArray} */ all: function(modelName) { Ember.deprecate('Using store.all() has been deprecated. Use store.peekAll() to get all records by a given type without triggering a fetch.'); return this.peekAll(modelName); }, /** This method returns a filtered array that contains all of the known records for a given type in the store. Note that because it's just a filter, the result will contain any locally created records of the type, however, it will not make a request to the backend to retrieve additional records. If you would like to request all the records from the backend please use [store.find](#method_find). Also note that multiple calls to `peekAll` for a given type will always return the same `RecordArray`. Example ```javascript var localPosts = store.peekAll('post'); ``` @method peekAll @param {String} modelName @return {DS.RecordArray} */ peekAll: function(modelName) { Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string'); var typeClass = this.modelFor(modelName); var liveRecordArray = this.recordArrayManager.liveRecordArrayFor(typeClass); this.recordArrayManager.populateLiveRecordArray(liveRecordArray, typeClass); return liveRecordArray; }, /** This method unloads all records in the store. Optionally you can pass a type which unload all records for a given type. ```javascript store.unloadAll(); store.unloadAll('post'); ``` @method unloadAll @param {String=} modelName */ unloadAll: function(modelName) { Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), !modelName || typeof modelName === 'string'); if (arguments.length === 0) { var typeMaps = this.typeMaps; var keys = Object.keys(typeMaps); var types = keys.map(byType); types.forEach(this.unloadAll, this); } else { var typeClass = this.modelFor(modelName); var typeMap = this.typeMapFor(typeClass); var records = typeMap.records.slice(); var record; for (var i = 0; i < records.length; i++) { record = records[i]; record.unloadRecord(); record.destroy(); // maybe within unloadRecord } typeMap.metadata = Object.create(null); } function byType(entry) { return typeMaps[entry]['type'].modelName; } }, /** Takes a type and filter function, and returns a live RecordArray that remains up to date as new records are loaded into the store or created locally. The filter function takes a materialized record, and returns true if the record should be included in the filter and false if it should not. Example ```javascript store.filter('post', function(post) { return post.get('unread'); }); ``` The filter function is called once on all records for the type when it is created, and then once on each newly loaded or created record. If any of a record's properties change, or if it changes state, the filter function will be invoked again to determine whether it should still be in the array. Optionally you can pass a query, which is the equivalent of calling [find](#method_find) with that same query, to fetch additional records from the server. The results returned by the server could then appear in the filter if they match the filter function. The query itself is not used to filter records, it's only sent to your server for you to be able to do server-side filtering. The filter function will be applied on the returned results regardless. Example ```javascript store.filter('post', { unread: true }, function(post) { return post.get('unread'); }).then(function(unreadPosts) { unreadPosts.get('length'); // 5 var unreadPost = unreadPosts.objectAt(0); unreadPost.set('unread', false); unreadPosts.get('length'); // 4 }); ``` @method filter @param {String} modelName @param {Object} query optional query @param {Function} filter @return {DS.PromiseArray} */ filter: function(modelName, query, filter) { Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string'); if (!Ember.ENV.ENABLE_DS_FILTER) { Ember.deprecate('The filter API will be moved into a plugin soon. To enable store.filter using an environment flag, or to use an alternative, you can visit the ember-data-filter addon page', false, { url: 'https://github.com/ember-data/ember-data-filter' }); } var promise; var length = arguments.length; var array; var hasQuery = length === 3; // allow an optional server query if (hasQuery) { promise = this.query(modelName, query); } else if (arguments.length === 2) { filter = query; } modelName = this.modelFor(modelName); if (hasQuery) { array = this.recordArrayManager.createFilteredRecordArray(modelName, filter, query); } else { array = this.recordArrayManager.createFilteredRecordArray(modelName, filter); } promise = promise || Promise.resolve(array); return promiseArray(promise.then(() => array, null, 'DS: Store#filter of ' + modelName)); }, /** This method returns if a certain record is already loaded in the store. Use this function to know beforehand if a find() will result in a request or that it will be a cache hit. Example ```javascript store.recordIsLoaded('post', 1); // false store.find('post', 1).then(function() { store.recordIsLoaded('post', 1); // true }); ``` @method recordIsLoaded @param {String} modelName @param {string} id @return {boolean} */ recordIsLoaded: function(modelName, id) { Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string'); return this.hasRecordForId(modelName, id); }, /** This method returns the metadata for a specific type. @method metadataFor @param {String} modelName @return {object} @deprecated */ metadataFor: function(modelName) { Ember.deprecate("`store.metadataFor()` has been deprecated. You can use `.get('meta')` on relationships and arrays returned from `store.query()`."); return this._metadataFor(modelName); }, /** @method _metadataFor @param {String} modelName @return {object} @private */ _metadataFor: function(modelName) { Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string'); var typeClass = this.modelFor(modelName); return this.typeMapFor(typeClass).metadata; }, /** This method sets the metadata for a specific type. @method setMetadataFor @param {String} modelName @param {Object} metadata metadata to set @return {object} @deprecated */ setMetadataFor: function(modelName, metadata) { Ember.deprecate("`store.setMetadataFor()` has been deprecated. Please return meta from your serializer's `extractMeta` hook."); this._setMetadataFor(modelName, metadata); }, /** @method _setMetadataFor @param {String} modelName @param {Object} metadata metadata to set @private */ _setMetadataFor: function(modelName, metadata) { Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string'); var typeClass = this.modelFor(modelName); Ember.merge(this.typeMapFor(typeClass).metadata, metadata); }, // ............ // . UPDATING . // ............ /** If the adapter updates attributes the record will notify the store to update its membership in any filters. To avoid thrashing, this method is invoked only once per run loop per record. @method dataWasUpdated @private @param {Class} type @param {InternalModel} internalModel */ dataWasUpdated: function(type, internalModel) { this.recordArrayManager.recordDidChange(internalModel); }, // .............. // . PERSISTING . // .............. /** This method is called by `record.save`, and gets passed a resolver for the promise that `record.save` returns. It schedules saving to happen at the end of the run loop. @method scheduleSave @private @param {InternalModel} internalModel @param {Resolver} resolver @param {Object} options */ scheduleSave: function(internalModel, resolver, options) { var snapshot = internalModel.createSnapshot(options); internalModel.flushChangedAttributes(); internalModel.adapterWillCommit(); this._pendingSave.push({ snapshot: snapshot, resolver: resolver }); once(this, 'flushPendingSave'); }, /** This method is called at the end of the run loop, and flushes any records passed into `scheduleSave` @method flushPendingSave @private */ flushPendingSave: function() { var pending = this._pendingSave.slice(); this._pendingSave = []; pending.forEach((pendingItem) => { var snapshot = pendingItem.snapshot; var resolver = pendingItem.resolver; var record = snapshot._internalModel; var adapter = this.adapterFor(record.type.modelName); var operation; if (get(record, 'currentState.stateName') === 'root.deleted.saved') { return resolver.resolve(); } else if (record.isNew()) { operation = 'createRecord'; } else if (record.isDeleted()) { operation = 'deleteRecord'; } else { operation = 'updateRecord'; } resolver.resolve(_commit(adapter, this, operation, snapshot)); }); }, /** This method is called once the promise returned by an adapter's `createRecord`, `updateRecord` or `deleteRecord` is resolved. If the data provides a server-generated ID, it will update the record and the store's indexes. @method didSaveRecord @private @param {InternalModel} internalModel the in-flight internal model @param {Object} data optional data (see above) */ didSaveRecord: function(internalModel, dataArg) { var data; if (dataArg) { data = dataArg.data; } if (data) { // normalize relationship IDs into records this._backburner.schedule('normalizeRelationships', this, '_setupRelationships', internalModel, internalModel.type, data); this.updateId(internalModel, data); } //We first make sure the primary data has been updated //TODO try to move notification to the user to the end of the runloop internalModel.adapterDidCommit(data); }, /** This method is called once the promise returned by an adapter's `createRecord`, `updateRecord` or `deleteRecord` is rejected with a `DS.InvalidError`. @method recordWasInvalid @private @param {InternalModel} internalModel @param {Object} errors */ recordWasInvalid: function(internalModel, errors) { internalModel.adapterDidInvalidate(errors); }, /** This method is called once the promise returned by an adapter's `createRecord`, `updateRecord` or `deleteRecord` is rejected (with anything other than a `DS.InvalidError`). @method recordWasError @private @param {InternalModel} internalModel @param {Error} error */ recordWasError: function(internalModel, error) { internalModel.adapterDidError(error); }, /** When an adapter's `createRecord`, `updateRecord` or `deleteRecord` resolves with data, this method extracts the ID from the supplied data. @method updateId @private @param {InternalModel} internalModel @param {Object} data */ updateId: function(internalModel, data) { var oldId = internalModel.id; var id = coerceId(data.id); Ember.assert("An adapter cannot assign a new id to a record that already has an id. " + internalModel + " had id: " + oldId + " and you tried to update it with " + id + ". This likely happened because your server returned data in response to a find or update that had a different id than the one you sent.", oldId === null || id === oldId); this.typeMapFor(internalModel.type).idToRecord[id] = internalModel; internalModel.setId(id); }, /** Returns a map of IDs to client IDs for a given type. @method typeMapFor @private @param {DS.Model} typeClass @return {Object} typeMap */ typeMapFor: function(typeClass) { var typeMaps = get(this, 'typeMaps'); var guid = Ember.guidFor(typeClass); var typeMap = typeMaps[guid]; if (typeMap) { return typeMap; } typeMap = { idToRecord: Object.create(null), records: [], metadata: Object.create(null), type: typeClass }; typeMaps[guid] = typeMap; return typeMap; }, // ................ // . LOADING DATA . // ................ /** This internal method is used by `push`. @method _load @private @param {(String|DS.Model)} type @param {Object} data */ _load: function(data) { var id = coerceId(data.id); var internalModel = this._internalModelForId(data.type, id); internalModel.setupData(data); this.recordArrayManager.recordDidChange(internalModel); return internalModel; }, /* In case someone defined a relationship to a mixin, for example: ``` var Comment = DS.Model.extend({ owner: belongsTo('commentable'. { polymorphic: true}) }); var Commentable = Ember.Mixin.create({ comments: hasMany('comment') }); ``` we want to look up a Commentable class which has all the necessary relationship metadata. Thus, we look up the mixin and create a mock DS.Model, so we can access the relationship CPs of the mixin (`comments`) in this case */ _modelForMixin: function(modelName) { var normalizedModelName = normalizeModelName(modelName); var registry = this.container._registry ? this.container._registry : this.container; var mixin = registry.resolve('mixin:' + normalizedModelName); if (mixin) { //Cache the class as a model registry.register('model:' + normalizedModelName, DS.Model.extend(mixin)); } var factory = this.modelFactoryFor(normalizedModelName); if (factory) { factory.__isMixin = true; factory.__mixin = mixin; } return factory; }, /** Returns a model class for a particular key. Used by methods that take a type key (like `find`, `createRecord`, etc.) @method modelFor @param {String} modelName @return {DS.Model} */ modelFor: function(modelName) { Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string'); var factory = this.modelFactoryFor(modelName); if (!factory) { //Support looking up mixins as base types for polymorphic relationships factory = this._modelForMixin(modelName); } if (!factory) { throw new Ember.Error("No model was found for '" + modelName + "'"); } factory.modelName = factory.modelName || normalizeModelName(modelName); // deprecate typeKey if (!('typeKey' in factory)) { Object.defineProperty(factory, 'typeKey', { enumerable: true, configurable: false, get: function() { Ember.deprecate('Usage of `typeKey` has been deprecated and will be removed in Ember Data 1.0. It has been replaced by `modelName` on the model class.'); var typeKey = this.modelName; if (typeKey) { typeKey = Ember.String.camelize(this.modelName); } return typeKey; }, set: function() { Ember.assert('Setting typeKey is not supported. In addition, typeKey has also been deprecated in favor of modelName. Setting modelName is also not supported.'); } }); } return factory; }, modelFactoryFor: function(modelName) { Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string'); var normalizedKey = normalizeModelName(modelName); return this.container.lookupFactory('model:' + normalizedKey); }, /** Push some data for a given type into the store. This method expects normalized data: * The ID is a key named `id` (an ID is mandatory) * The names of attributes are the ones you used in your model's `DS.attr`s. * Your relationships must be: * represented as IDs or Arrays of IDs * represented as model instances * represented as URLs, under the `links` key For this model: ```app/models/person.js import DS from 'ember-data'; export default DS.Model.extend({ firstName: DS.attr(), lastName: DS.attr(), children: DS.hasMany('person') }); ``` To represent the children as IDs: ```js { id: 1, firstName: "Tom", lastName: "Dale", children: [1, 2, 3] } ``` To represent the children relationship as a URL: ```js { id: 1, firstName: "Tom", lastName: "Dale", links: { children: "/people/1/children" } } ``` If you're streaming data or implementing an adapter, make sure that you have converted the incoming data into this form. The store's [normalize](#method_normalize) method is a convenience helper for converting a json payload into the form Ember Data expects. ```js store.push('person', store.normalize('person', data)); ``` This method can be used both to push in brand new records, as well as to update existing records. @method push @param {String} modelName @param {Object} data @return {DS.Model|Array} the record(s) that was created or updated. */ push: function(modelNameArg, dataArg) { var data, modelName; if (Ember.typeOf(modelNameArg) === 'object' && Ember.typeOf(dataArg) === 'undefined') { data = modelNameArg; } else { Ember.deprecate('store.push(type, data) has been deprecated. Please provide a JSON-API document object as the first and only argument to store.push.'); Ember.assert("Expected an object as `data` in a call to `push` for " + modelNameArg + " , but was " + Ember.typeOf(dataArg), Ember.typeOf(dataArg) === 'object'); Ember.assert("You must include an `id` for " + modelNameArg + " in an object passed to `push`", dataArg.id != null && dataArg.id !== ''); data = _normalizeSerializerPayload(this.modelFor(modelNameArg), dataArg); modelName = modelNameArg; Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string' || typeof data === 'undefined'); } if (data.included) { data.included.forEach((recordData) => this._pushInternalModel(recordData)); } if (Ember.typeOf(data.data) === 'array') { var internalModels = data.data.map((recordData) => this._pushInternalModel(recordData)); return internalModels.map((internalModel) => internalModel.getRecord()); } var internalModel = this._pushInternalModel(data.data || data); return internalModel.getRecord(); }, _pushInternalModel: function(data) { var modelName = data.type; Ember.assert(`Expected an object as 'data' in a call to 'push' for ${modelName}, but was ${Ember.typeOf(data)}`, Ember.typeOf(data) === 'object'); Ember.assert(`You must include an 'id' for ${modelName} in an object passed to 'push'`, data.id != null && data.id !== ''); var type = this.modelFor(modelName); // If Ember.ENV.DS_WARN_ON_UNKNOWN_KEYS is set to true and the payload // contains unknown keys, log a warning. if (Ember.ENV.DS_WARN_ON_UNKNOWN_KEYS) { Ember.warn("The payload for '" + type.modelName + "' contains these unknown keys: " + Ember.inspect(Object.keys(data).forEach((key) => { return !(key === 'id' || key === 'links' || get(type, 'fields').has(key) || key.match(/Type$/)); })) + ". Make sure they've been defined in your model.", Object.keys(data).filter((key) => { return !(key === 'id' || key === 'links' || get(type, 'fields').has(key) || key.match(/Type$/)); }).length === 0 ); } // Actually load the record into the store. var internalModel = this._load(data); this._backburner.join(() => { this._backburner.schedule('normalizeRelationships', this, '_setupRelationships', internalModel, type, data); }); return internalModel; }, _setupRelationships: function(record, type, data) { // If the payload contains relationships that are specified as // IDs, normalizeRelationships will convert them into DS.Model instances // (possibly unloaded) before we push the payload into the // store. data = normalizeRelationships(this, type, data); // Now that the pushed record as well as any related records // are in the store, create the data structures used to track // relationships. setupRelationships(this, record, data); }, /** Push some raw data into the store. This method can be used both to push in brand new records, as well as to update existing records. You can push in more than one type of object at once. All objects should be in the format expected by the serializer. ```app/serializers/application.js import DS from 'ember-data'; export default DS.ActiveModelSerializer; ``` ```js var pushData = { posts: [ { id: 1, post_title: "Great post", comment_ids: [2] } ], comments: [ { id: 2, comment_body: "Insightful comment" } ] } store.pushPayload(pushData); ``` By default, the data will be deserialized using a default serializer (the application serializer if it exists). Alternatively, `pushPayload` will accept a model type which will determine which serializer will process the payload. However, the serializer itself (processing this data via `normalizePayload`) will not know which model it is deserializing. ```app/serializers/application.js import DS from 'ember-data'; export default DS.ActiveModelSerializer; ``` ```app/serializers/post.js import DS from 'ember-data'; export default DS.JSONSerializer; ``` ```js store.pushPayload('comment', pushData); // Will use the application serializer store.pushPayload('post', pushData); // Will use the post serializer ``` @method pushPayload @param {String} modelName Optionally, a model type used to determine which serializer will be used @param {Object} inputPayload */ pushPayload: function (modelName, inputPayload) { var serializer; var payload; if (!inputPayload) { payload = modelName; serializer = defaultSerializer(this.container); Ember.assert("You cannot use `store#pushPayload` without a modelName unless your default serializer defines `pushPayload`", typeof serializer.pushPayload === 'function'); } else { payload = inputPayload; Ember.assert(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${Ember.inspect(modelName)}`, typeof modelName === 'string'); serializer = this.serializerFor(modelName); } this._adapterRun(() => serializer.pushPayload(this, payload)); }, /** `normalize` converts a json payload into the normalized form that [push](#method_push) expects. Example ```js socket.on('message', function(message) { var modelName = message.model; var data = message.data; store.push(modelName, store.normalize(modelName, data)); }); ``` @method normalize @param {String} modelName The name of the model type for this payload @param {Object} payload @return {Object} The normalized payload */ normalize: function (modelName, payload) { Ember.assert(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${Ember.inspect(modelName)}`, typeof modelName === 'string'); var serializer = this.serializerFor(modelName); var model = this.modelFor(modelName); return serializer.normalize(model, payload); }, /** @method update @param {String} modelName @param {Object} data @return {DS.Model} the record that was updated. @deprecated Use [push](#method_push) instead */ update: function(modelName, data) { Ember.assert(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${Ember.inspect(modelName)}`, typeof modelName === 'string'); Ember.deprecate('Using store.update() has been deprecated since store.push() now handles partial updates. You should use store.push() instead.'); return this.push(modelName, data); }, /** If you have an Array of normalized data to push, you can call `pushMany` with the Array, and it will call `push` repeatedly for you. @method pushMany @param {String} modelName @param {Array} datas @return {Array} @deprecated Use [push](#method_push) instead */ pushMany: function(modelName, datas) { Ember.assert(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${Ember.inspect(modelName)}`, typeof modelName === 'string'); Ember.deprecate('Using store.pushMany() has been deprecated since store.push() now handles multiple items. You should use store.push() instead.'); var length = datas.length; var result = new Array(length); for (var i = 0; i < length; i++) { result[i] = this.push(modelName, datas[i]); } return result; }, /** @method metaForType @param {String} modelName @param {Object} metadata @deprecated Use [setMetadataFor](#method_setMetadataFor) instead */ metaForType: function(modelName, metadata) { Ember.assert(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${Ember.inspect(modelName)}`, typeof modelName === 'string'); Ember.deprecate('Using store.metaForType() has been deprecated. Use store.setMetadataFor() to set metadata for a specific type.'); this.setMetadataFor(modelName, metadata); }, /** Build a brand new record for a given type, ID, and initial data. @method buildRecord @private @param {DS.Model} type @param {String} id @param {Object} data @return {InternalModel} internal model */ buildInternalModel: function(type, id, data) { var typeMap = this.typeMapFor(type); var idToRecord = typeMap.idToRecord; Ember.assert(`The id ${id} has already been used with another record of type ${type.toString()}.`, !id || !idToRecord[id]); Ember.assert(`'${Ember.inspect(type)}' does not appear to be an ember-data model`, (typeof type._create === 'function') ); // lookupFactory should really return an object that creates // instances with the injections applied var internalModel = new InternalModel(type, id, this, this.container, data); // if we're creating an item, this process will be done // later, once the object has been persisted. if (id) { idToRecord[id] = internalModel; } typeMap.records.push(internalModel); return internalModel; }, //Called by the state machine to notify the store that the record is ready to be interacted with recordWasLoaded: function(record) { this.recordArrayManager.recordWasLoaded(record); }, // ............... // . DESTRUCTION . // ............... /** @method dematerializeRecord @private @param {DS.Model} record @deprecated Use [unloadRecord](#method_unloadRecord) instead */ dematerializeRecord: function(record) { Ember.deprecate('Using store.dematerializeRecord() has been deprecated since it was intended for private use only. You should use store.unloadRecord() instead.'); this._dematerializeRecord(record); }, /** When a record is destroyed, this un-indexes it and removes it from any record arrays so it can be GCed. @method _dematerializeRecord @private @param {InternalModel} internalModel */ _dematerializeRecord: function(internalModel) { var type = internalModel.type; var typeMap = this.typeMapFor(type); var id = internalModel.id; internalModel.updateRecordArrays(); if (id) { delete typeMap.idToRecord[id]; } var loc = typeMap.records.indexOf(internalModel); typeMap.records.splice(loc, 1); }, // ...................... // . PER-TYPE ADAPTERS // ...................... /** Returns an instance of the adapter for a given type. For example, `adapterFor('person')` will return an instance of `App.PersonAdapter`. If no `App.PersonAdapter` is found, this method will look for an `App.ApplicationAdapter` (the default adapter for your entire application). If no `App.ApplicationAdapter` is found, it will return the value of the `defaultAdapter`. @method adapterFor @private @param {String} modelName @return DS.Adapter */ adapterFor: function(modelOrClass) { var modelName; Ember.deprecate(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${Ember.inspect(modelName)}`, typeof modelOrClass === 'string'); if (typeof modelOrClass !== 'string') { modelName = modelOrClass.modelName; } else { modelName = modelOrClass; } return this.lookupAdapter(modelName); }, _adapterRun: function (fn) { return this._backburner.run(fn); }, // .............................. // . RECORD CHANGE NOTIFICATION . // .............................. /** Returns an instance of the serializer for a given type. For example, `serializerFor('person')` will return an instance of `App.PersonSerializer`. If no `App.PersonSerializer` is found, this method will look for an `App.ApplicationSerializer` (the default serializer for your entire application). if no `App.ApplicationSerializer` is found, it will attempt to get the `defaultSerializer` from the `PersonAdapter` (`adapterFor('person')`). If a serializer cannot be found on the adapter, it will fall back to an instance of `DS.JSONSerializer`. @method serializerFor @private @param {String} modelName the record to serialize @return {DS.Serializer} */ serializerFor: function(modelOrClass) { var modelName; Ember.deprecate(`Passing classes to store methods has been removed. Please pass a dasherized string instead of ${Ember.inspect(modelOrClass)}`, typeof modelOrClass === 'string'); if (typeof modelOrClass !== 'string') { modelName = modelOrClass.modelName; } else { modelName = modelOrClass; } var fallbacks = [ 'application', this.adapterFor(modelName).get('defaultSerializer'), '-default' ]; var serializer = this.lookupSerializer(modelName, fallbacks); return serializer; }, /** Retrieve a particular instance from the container cache. If not found, creates it and placing it in the cache. Enabled a store to manage local instances of adapters and serializers. @method retrieveManagedInstance @private @param {String} modelName the object modelName @param {String} name the object name @param {Array} fallbacks the fallback objects to lookup if the lookup for modelName or 'application' fails @return {Ember.Object} */ retrieveManagedInstance: function(type, modelName, fallbacks) { var normalizedModelName = normalizeModelName(modelName); var instance = this._instanceCache.get(type, normalizedModelName, fallbacks); set(instance, 'store', this); return instance; }, lookupAdapter: function(name) { return this.retrieveManagedInstance('adapter', name, this.get('_adapterFallbacks')); }, _adapterFallbacks: Ember.computed('adapter', function() { var adapter = this.get('adapter'); return ['application', adapter, '-rest']; }), lookupSerializer: function(name, fallbacks) { return this.retrieveManagedInstance('serializer', name, fallbacks); }, willDestroy: function() { this._super(...arguments); this.recordArrayManager.destroy(); this.unloadAll(); for (var cacheKey in this._containerCache) { this._containerCache[cacheKey].destroy(); delete this._containerCache[cacheKey]; } delete this._containerCache; } }); function normalizeRelationships(store, type, data, record) { data.relationships = data.relationships || {}; type.eachRelationship(function(key, relationship) { var kind = relationship.kind; var value; if (data.relationships[key] && data.relationships[key].data) { value = data.relationships[key].data; if (kind === 'belongsTo') { data.relationships[key].data = deserializeRecordId(store, key, relationship, value); } else if (kind === 'hasMany') { data.relationships[key].data = deserializeRecordIds(store, key, relationship, value); } } }); return data; } function deserializeRecordId(store, key, relationship, id) { if (isNone(id)) { return; } Ember.assert(`A ${relationship.parentType} record was pushed into the store with the value of ${key} being ${Ember.inspect(id)}, but ${key} is a belongsTo relationship so the value must not be an array. You should probably check your data payload or serializer.`, !Ember.isArray(id)); //TODO:Better asserts return store._internalModelForId(id.type, id.id); } function deserializeRecordIds(store, key, relationship, ids) { if (isNone(ids)) { return; } Ember.assert(`A ${relationship.parentType} record was pushed into the store with the value of ${key} being '${Ember.inspect(ids)}', but ${key} is a hasMany relationship so the value must be an array. You should probably check your data payload or serializer.`, Ember.isArray(ids)); return ids.map((id) => deserializeRecordId(store, key, relationship, id)); } // Delegation to the adapter and promise management function defaultSerializer(container) { return container.lookup('serializer:application') || container.lookup('serializer:-default'); } function _commit(adapter, store, operation, snapshot) { var internalModel = snapshot._internalModel; var modelName = snapshot.modelName; var typeClass = store.modelFor(modelName); var promise = adapter[operation](store, typeClass, snapshot); var serializer = serializerForAdapter(store, adapter, modelName); var label = `DS: Extract and notify about ${operation} completion of ${internalModel}`; Ember.assert(`Your adapter's '${operation}' method must return a value, but it returned 'undefined'`, promise !==undefined); promise = Promise.resolve(promise, label); promise = _guard(promise, _bind(_objectIsAlive, store)); promise = _guard(promise, _bind(_objectIsAlive, internalModel)); return promise.then((adapterPayload) => { store._adapterRun(() => { var payload, data; if (adapterPayload) { payload = normalizeResponseHelper(serializer, store, typeClass, adapterPayload, snapshot.id, operation); if (payload.included) { store.push({ data: payload.included }); } data = convertResourceObject(payload.data); } store.didSaveRecord(internalModel, _normalizeSerializerPayload(internalModel.type, data)); }); return internalModel; }, function(error) { if (error instanceof InvalidError) { var errors = serializer.extractErrors(store, typeClass, error, snapshot.id); store.recordWasInvalid(internalModel, errors); } else { store.recordWasError(internalModel, error); } throw error; }, label); } function setupRelationships(store, record, data) { var typeClass = record.type; if (!data.relationships) { return; } typeClass.eachRelationship((key, descriptor) => { var kind = descriptor.kind; if (!data.relationships[key]) { return; } var relationship; if (data.relationships[key].links && data.relationships[key].links.related) { relationship = record._relationships.get(key); relationship.updateLink(data.relationships[key].links.related); } if (data.relationships[key].meta) { relationship = record._relationships.get(key); relationship.updateMeta(data.relationships[key].meta); } var value = data.relationships[key].data; if (value !== undefined) { if (kind === 'belongsTo') { relationship = record._relationships.get(key); relationship.setCanonicalRecord(value); } else if (kind === 'hasMany') { relationship = record._relationships.get(key); relationship.updateRecordsFromAdapter(value); } } }); } function deprecatePreload(preloadOrOptions, type, methodName) { if (preloadOrOptions) { var modelProperties = []; var fields = Ember.get(type, 'fields'); fields.forEach((fieldType, key) => modelProperties.push(key)); var preloadDetected = false; for (let i = 0, length = modelProperties.length; i < length; i++) { let key = modelProperties[i]; if (typeof preloadOrOptions[key] !== 'undefined') { preloadDetected = true; break; } } if (preloadDetected) { Ember.deprecate(`Passing a preload argument to \`store.${methodName}\` is deprecated. Please move it to the preload key on the ${methodName} \`options\` argument.`); var preload = preloadOrOptions; return { preload: preload }; } } return preloadOrOptions; } export { Store }; export default Store;
/** * BlockRangeDelete.js * * Released under LGPL License. * Copyright (c) 1999-2017 Ephox Corp. All rights reserved * * License: http://www.tinymce.com/license * Contributing: http://www.tinymce.com/contributing */ define( 'tinymce.core.delete.BlockRangeDelete', [ 'ephox.katamari.api.Options', 'ephox.sugar.api.dom.Compare', 'ephox.sugar.api.node.Element', 'tinymce.core.delete.DeleteUtils', 'tinymce.core.delete.MergeBlocks' ], function (Options, Compare, Element, DeleteUtils, MergeBlocks) { var deleteRange = function (rootNode, selection) { var rng = selection.getRng(); return Options.liftN([ DeleteUtils.getParentTextBlock(rootNode, Element.fromDom(rng.startContainer)), DeleteUtils.getParentTextBlock(rootNode, Element.fromDom(rng.endContainer)) ], function (block1, block2) { if (Compare.eq(block1, block2) === false) { rng.deleteContents(); MergeBlocks.mergeBlocks(true, block1, block2).each(function (pos) { selection.setRng(pos.toRange()); }); return true; } else { return false; } }).getOr(false); }; var backspaceDelete = function (editor, forward) { var rootNode = Element.fromDom(editor.getBody()); if (editor.selection.isCollapsed() === false) { return deleteRange(rootNode, editor.selection); } else { return false; } }; return { backspaceDelete: backspaceDelete }; } );
angular.module("umbraco") .controller("Umbraco.Dialogs.UserController", function ($scope, $location, $timeout, userService, historyService, eventsService) { $scope.user = userService.getCurrentUser(); $scope.history = historyService.getCurrent(); $scope.version = Umbraco.Sys.ServerVariables.application.version + " assembly: " + Umbraco.Sys.ServerVariables.application.assemblyVersion; var evtHandlers = []; evtHandlers.push(eventsService.on("historyService.add", function (e, args) { $scope.history = args.all; })); evtHandlers.push(eventsService.on("historyService.remove", function (e, args) { $scope.history = args.all; })); evtHandlers.push(eventsService.on("historyService.removeAll", function (e, args) { $scope.history = []; })); $scope.logout = function () { //Add event listener for when there are pending changes on an editor which means our route was not successful var pendingChangeEvent = eventsService.on("valFormManager.pendingChanges", function (e, args) { //one time listener, remove the event pendingChangeEvent(); $scope.close(); }); //perform the path change, if it is successful then the promise will resolve otherwise it will fail $scope.close(); $location.path("/logout"); }; $scope.gotoHistory = function (link) { $location.path(link); $scope.close(); }; //Manually update the remaining timeout seconds function updateTimeout() { $timeout(function () { if ($scope.remainingAuthSeconds > 0) { $scope.remainingAuthSeconds--; $scope.$digest(); //recurse updateTimeout(); } }, 1000, false); // 1 second, do NOT execute a global digest } //get the user userService.getCurrentUser().then(function (user) { $scope.user = user; if ($scope.user) { $scope.remainingAuthSeconds = $scope.user.remainingAuthSeconds; $scope.canEditProfile = _.indexOf($scope.user.allowedSections, "users") > -1; //set the timer updateTimeout(); } }); //remove all event handlers $scope.$on('$destroy', function () { for (var i = 0; i < evtHandlers.length; i++) { evtHandlers[i](); } }); });
"use strict"; var _getSert = require("../getsert"); var generateCode = require("../../../src/utils/code-generator"); class CategoryDataUtil { getSert(input) { var ManagerType = require("../../../src/managers/master/garment-category-manager"); return _getSert(input, ManagerType, (data) => { return { code: data.code }; }); } getNewData() { var Model = require("dl-models").master.Category; var data = new Model(); var code = generateCode(); data.code = code; data.name = `name[${code}]`; data.codeRequirement = `codeRequirement[${code}]`; return Promise.resolve(data); } getTestData() { var data = { code: "UT/CATEGORY/01", name: "Category 01", codeRequirement: "", }; return this.getSert(data); } } module.exports = new CategoryDataUtil();
'use strict'; angular.module('todoStats', []);
suite('rb/views/CollectionView', function() { var TestModel, TestCollection, TestModelView, TestCollectionView, collection, view; TestModel = Backbone.Model.extend({ defaults: _.defaults({ data: '' }) }); TestCollection = Backbone.Collection.extend({ model: TestModel }); TestModelView = Backbone.View.extend({ className: 'test-class', render: function() { this.$el.text(this.model.get('data')); return this; } }); TestCollectionView = RB.CollectionView.extend({ itemViewType: TestModelView }); beforeEach(function() { collection = new TestCollection(); view = new TestCollectionView({ collection: collection }); }); describe('Rendering', function() { it('When empty', function() { view.render(); expect(view.$el.children().length).toBe(0); }); it('With items', function() { var $children; collection.add([ { data: 'Item 1' }, { data: 'Item 2' } ]); view.render(); $children = view.$el.children(); expect($children.length).toBe(2); expect($children[0].innerHTML).toBe('Item 1'); expect($children[1].innerHTML).toBe('Item 2'); }); it('Item model type', function() { collection.add([ { data: 'Item 1' } ]); view.render(); expect(view.$el.children().hasClass('test-class')).toBe(true); }); }); describe('Live updating', function() { it('Adding items after rendering', function() { var $children; collection.add([ { data: 'Item 1' } ]); view.render(); expect(view.$el.children().length).toBe(1); collection.add([ { data: 'Item 2' }, { data: 'Item 3' } ]); $children = view.$el.children(); expect($children.length).toBe(3); expect($children[2].innerHTML).toBe('Item 3'); }); it('Removing items after rendering', function() { var model1 = new TestModel({ data: 'Item 1' }), model2 = new TestModel({ data: 'Item 2' }), model3 = new TestModel({ data: 'Item 3' }), $children; collection.add([model1, model2, model3]); view.render(); expect(view.$el.children().length).toBe(3); collection.remove([model1, model3]); $children = view.$el.children(); expect($children.length).toBe(1); expect($children[0].innerHTML).toBe('Item 2'); }); }); });
// This test written in mocha+should.js var should = require('./init.js'); var db, Model; describe('datatypes', function () { before(function (done) { db = getSchema(); Model = db.define('Model', { str: String, date: Date, num: Number, bool: Boolean, list: {type: [String]}, arr: Array }); db.automigrate(function () { Model.destroyAll(done); }); }); it('should keep types when get read data from db', function (done) { var d = new Date, id; Model.create({ str: 'hello', date: d, num: '3', bool: 1, list: ['test'], arr: [1, 'str'] }, function (err, m) { should.not.exist(err); should.exist(m && m.id); m.str.should.be.a('string'); m.num.should.be.a('number'); m.bool.should.be.a('boolean'); m.list[0].should.be.equal('test'); m.arr[0].should.be.equal(1); m.arr[1].should.be.equal('str'); id = m.id; testFind(testAll); }); function testFind(next) { Model.findById(id, function (err, m) { should.not.exist(err); should.exist(m); m.str.should.be.a('string'); m.num.should.be.a('number'); m.bool.should.be.a('boolean'); m.list[0].should.be.equal('test'); m.arr[0].should.be.equal(1); m.arr[1].should.be.equal('str'); m.date.should.be.an.instanceOf(Date); m.date.toString().should.equal(d.toString(), 'Time must match'); next(); }); } function testAll() { Model.findOne(function (err, m) { should.not.exist(err); should.exist(m); m.str.should.be.a('string'); m.num.should.be.a('number'); m.bool.should.be.a('boolean'); m.date.should.be.an.instanceOf(Date); m.date.toString().should.equal(d.toString(), 'Time must match'); done(); }); } }); it('should respect data types when updating attributes', function (done) { var d = new Date, id; Model.create({ str: 'hello', date: d, num: '3', bool: 1}, function(err, m) { should.not.exist(err); should.exist(m && m.id); // sanity check initial types m.str.should.be.a('string'); m.num.should.be.a('number'); m.bool.should.be.a('boolean'); id = m.id; testDataInDB(function () { testUpdate(function() { testDataInDB(done); }); }); }); function testUpdate(done) { Model.findById(id, function(err, m) { should.not.exist(err); // update using updateAttributes m.updateAttributes({ id: id, num: '10' }, function (err, m) { should.not.exist(err); m.num.should.be.a('number'); done(); }); }); } function testDataInDB(done) { // verify that the value stored in the db is still an object db.connector.find(Model.modelName, id, function (err, data) { should.exist(data); data.num.should.be.a('number'); done(); }); } }); });
// ----------------------- // UI Helpers // ----------------------- // Get a constant from the constants.js UI.registerHelper('constant', function(variable){ return window["CONSTANTS"][variable]; }); // ----------------------- // Handlebars Helpers // ----------------------- // Check if a user is a certain role UI.registerHelper('userIs', function(role){ return authorized[role](); });
var name = "First-Best Bubble Farmer"; var collection_type = 0; var is_secret = 0; var desc = "Ever-so-carefully harvested 5003 Bubbles"; var status_text = "Glory of glories, you are now a First-Best Bubble Farmer! Go ahead and let that go to your head."; var last_published = 1348798465; var is_shareworthy = 1; var url = "firstbest-bubble-farmer"; var category = "trees"; var url_swf = "\/c2.glitch.bz\/achievements\/2011-05-09\/firstbest_bubble_farmer_1304984496.swf"; var url_img_180 = "\/c2.glitch.bz\/achievements\/2011-05-09\/firstbest_bubble_farmer_1304984496_180.png"; var url_img_60 = "\/c2.glitch.bz\/achievements\/2011-05-09\/firstbest_bubble_farmer_1304984496_60.png"; var url_img_40 = "\/c2.glitch.bz\/achievements\/2011-05-09\/firstbest_bubble_farmer_1304984496_40.png"; function on_apply(pc){ } var conditions = { 303 : { type : "counter", group : "trants_fruit_harvested", label : "plain_bubble", value : "5003" }, }; function onComplete(pc){ // generated from rewards var multiplier = pc.buffs_has('gift_of_gab') ? 1.2 : pc.buffs_has('silvertongue') ? 1.05 : 1.0; multiplier += pc.imagination_get_achievement_modifier(); if (/completist/i.exec(this.name)) { var level = pc.stats_get_level(); if (level > 4) { multiplier *= (pc.stats_get_level()/4); } } pc.stats_add_xp(round_to_5(700 * multiplier), true); pc.stats_add_favor_points("spriggan", round_to_5(150 * multiplier)); if(pc.buffs_has('gift_of_gab')) { pc.buffs_remove('gift_of_gab'); } else if(pc.buffs_has('silvertongue')) { pc.buffs_remove('silvertongue'); } } var rewards = { "xp" : 700, "favor" : { "giant" : "spriggan", "points" : 150 } }; // generated ok (NO DATE)
import { RenderSyntax } from './syntax/render'; import { OutletSyntax } from './syntax/outlet'; import { MountSyntax } from './syntax/mount'; import { DynamicComponentSyntax } from './syntax/dynamic-component'; import { InputSyntax } from './syntax/input'; import { WithDynamicVarsSyntax, InElementSyntax } from 'glimmer-runtime'; let syntaxKeys = []; let syntaxes = []; export function registerSyntax(key, syntax) { syntaxKeys.push(key); syntaxes.push(syntax); } export function findSyntaxBuilder(key) { let index = syntaxKeys.indexOf(key); if (index > -1) { return syntaxes[index]; } } registerSyntax('render', RenderSyntax); registerSyntax('outlet', OutletSyntax); registerSyntax('mount', MountSyntax); registerSyntax('component', DynamicComponentSyntax); registerSyntax('input', InputSyntax); registerSyntax('-with-dynamic-vars', class { static create(environment, args, templates, symbolTable) { return new WithDynamicVarsSyntax({ args, templates }); } }); registerSyntax('-in-element', class { static create(environment, args, templates, symbolTable) { return new InElementSyntax({ args, templates }); } });
angular.module('ngCordova.plugins.statusbar', []) .factory('$cordovaStatusbar', [function() { return { overlaysWebView: function(bool) { return StatusBar.overlaysWebView(true); }, // styles: Default, LightContent, BlackTranslucent, BlackOpaque style: function (style) { switch (style) { case 0: // Default return StatusBar.styleDefault(); break; case 1: // LightContent return StatusBar.styleLightContent(); break; case 2: // BlackTranslucent return StatusBar.styleBlackTranslucent(); break; case 3: // BlackOpaque return StatusBar.styleBlackOpaque(); break; default: // Default return StatusBar.styleDefault(); } }, // supported names: black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown styleColor: function (color) { return StatusBar.backgroundColorByName(color); }, styleHex: function (colorHex) { return StatusBar.backgroundColorByHexString(colorHex); }, hide: function () { return StatusBar.hide(); }, show: function () { return StatusBar.show() }, isVisible: function () { return StatusBar.isVisible(); } } }]);
console.log('ready');
module.exports = function (name) { try { require.resolve(name) return true } catch (e) { return false } }
'use strict'; const chai = require('chai'), expect = chai.expect, Support = require(__dirname + '/../support'), Sequelize = require(__dirname + '/../../../index'), current = Support.sequelize; describe(Support.getTestDialectTeaser('Model'), () => { describe('all', () => { const Referral = current.define('referal'); Referral.belongsTo(Referral); it('can expand nested self-reference', () => { const options = { include: [{ all: true, nested: true }] }; current.Model._expandIncludeAll.call(Referral, options); expect(options.include).to.deep.equal([ { model: Referral } ]); }); }); describe('_validateIncludedElements', () => { beforeEach(function() { this.User = this.sequelize.define('User'); this.Task = this.sequelize.define('Task', { title: Sequelize.STRING }); this.Company = this.sequelize.define('Company', { id: { type: Sequelize.INTEGER, primaryKey: true, autoIncrement: true, field: 'field_id' }, name: Sequelize.STRING }); this.User.Tasks = this.User.hasMany(this.Task); this.User.Company = this.User.belongsTo(this.Company); this.Company.Employees = this.Company.hasMany(this.User); this.Company.Owner = this.Company.belongsTo(this.User, {as: 'Owner', foreignKey: 'ownerId'}); }); describe('attributes', () => { it('should not inject the aliased PK again, if it\'s already there', function() { let options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [ { model: this.Company, attributes: ['name'] } ] }); expect(options.include[0].attributes).to.deep.equal([['field_id', 'id'], 'name']); options = Sequelize.Model._validateIncludedElements(options); // Calling validate again shouldn't add the pk again expect(options.include[0].attributes).to.deep.equal([['field_id', 'id'], 'name']); }); describe('include / exclude', () => { it('allows me to include additional attributes', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [ { model: this.Company, attributes: { include: ['foobar'] } } ] }); expect(options.include[0].attributes).to.deep.equal([ ['field_id', 'id'], 'name', 'createdAt', 'updatedAt', 'ownerId', 'foobar' ]); }); it('allows me to exclude attributes', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [ { model: this.Company, attributes: { exclude: ['name'] } } ] }); expect(options.include[0].attributes).to.deep.equal([ ['field_id', 'id'], 'createdAt', 'updatedAt', 'ownerId' ]); }); it('include takes precendence over exclude', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [ { model: this.Company, attributes: { exclude: ['name'], include: ['name'] } } ] }); expect(options.include[0].attributes).to.deep.equal([ ['field_id', 'id'], 'createdAt', 'updatedAt', 'ownerId', 'name' ]); }); }); }); describe('scope', () => { beforeEach(function() { this.Project = this.sequelize.define('project', { bar: { type: Sequelize.STRING, field: 'foo' } }, { defaultScope: { where: { active: true } }, scopes: { this: { where: { this: true} }, that: { where: { that: false }, limit: 12 }, attr: { attributes: ['baz'] }, foobar: { where: { bar: 42 } } } }); this.User.hasMany(this.Project); this.User.hasMany(this.Project.scope('this'), { as: 'thisProject' }); }); it('adds the default scope to where', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [{ model: this.Project }] }); expect(options.include[0]).to.have.property('where').which.deep.equals({ active: true }); }); it('adds the where from a scoped model', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [{ model: this.Project.scope('that') }] }); expect(options.include[0]).to.have.property('where').which.deep.equals({ that: false }); expect(options.include[0]).to.have.property('limit').which.equals(12); }); it('adds the attributes from a scoped model', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [{ model: this.Project.scope('attr') }] }); expect(options.include[0]).to.have.property('attributes').which.deep.equals(['baz']); }); it('merges where with the where from a scoped model', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [{ where: { active: false }, model: this.Project.scope('that') }] }); expect(options.include[0]).to.have.property('where').which.deep.equals({ active: false, that: false }); }); it('add the where from a scoped associated model', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [{ model: this.Project, as: 'thisProject' }] }); expect(options.include[0]).to.have.property('where').which.deep.equals({ this: true }); }); it('handles a scope with an aliased column (.field)', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [{ model: this.Project.scope('foobar') }] }); expect(options.include[0]).to.have.property('where').which.deep.equals({ foo: 42 }); }); }); describe('duplicating', () => { it('should tag a hasMany association as duplicating: true if undefined', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [ this.User.Tasks ] }); expect(options.include[0].duplicating).to.equal(true); }); it('should respect include.duplicating for a hasMany', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [ {association: this.User.Tasks, duplicating: false} ] }); expect(options.include[0].duplicating).to.equal(false); }); }); describe('_conformInclude: string alias', () => { it('should expand association from string alias', function() { const options = { include: ['Owner'] }; Sequelize.Model._conformOptions(options, this.Company); expect(options.include[0]).to.deep.equal({ model: this.User, association: this.Company.Owner, as: 'Owner' }); }); it('should expand string association', function() { const options = { include: [{ association: 'Owner', attributes: ['id'] }] }; Sequelize.Model._conformOptions(options, this.Company); expect(options.include[0]).to.deep.equal({ model: this.User, association: this.Company.Owner, attributes: ['id'], as: 'Owner' }); }); }); describe('_getIncludedAssociation', () => { it('returns an association when there is a single unaliased association', function() { expect(this.User._getIncludedAssociation(this.Task)).to.equal(this.User.Tasks); }); it('returns an association when there is a single aliased association', function() { const User = this.sequelize.define('User'); const Task = this.sequelize.define('Task'); const Tasks = Task.belongsTo(User, {as: 'owner'}); expect(Task._getIncludedAssociation(User, 'owner')).to.equal(Tasks); }); it('returns an association when there are multiple aliased associations', function() { expect(this.Company._getIncludedAssociation(this.User, 'Owner')).to.equal(this.Company.Owner); }); }); describe('subQuery', () => { it('should be true if theres a duplicating association', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [ {association: this.User.Tasks} ], limit: 3 }); expect(options.subQuery).to.equal(true); }); it('should be false if theres a duplicating association but no limit', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [ {association: this.User.Tasks} ], limit: null }); expect(options.subQuery).to.equal(false); }); it('should be true if theres a nested duplicating association', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [ {association: this.User.Company, include: [ this.Company.Employees ]} ], limit: 3 }); expect(options.subQuery).to.equal(true); }); it('should be false if theres a nested duplicating association but no limit', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [ {association: this.User.Company, include: [ this.Company.Employees ]} ], limit: null }); expect(options.subQuery).to.equal(false); }); it('should tag a required hasMany association', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [ {association: this.User.Tasks, required: true} ], limit: 3 }); expect(options.subQuery).to.equal(true); expect(options.include[0].subQuery).to.equal(false); expect(options.include[0].subQueryFilter).to.equal(true); }); it('should not tag a required hasMany association with duplicating false', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [ {association: this.User.Tasks, required: true, duplicating: false} ], limit: 3 }); expect(options.subQuery).to.equal(false); expect(options.include[0].subQuery).to.equal(false); expect(options.include[0].subQueryFilter).to.equal(false); }); it('should tag a hasMany association with where', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [ {association: this.User.Tasks, where: {title: Math.random().toString()}} ], limit: 3 }); expect(options.subQuery).to.equal(true); expect(options.include[0].subQuery).to.equal(false); expect(options.include[0].subQueryFilter).to.equal(true); }); it('should not tag a hasMany association with where and duplicating false', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [ {association: this.User.Tasks, where: {title: Math.random().toString()}, duplicating: false} ], limit: 3 }); expect(options.subQuery).to.equal(false); expect(options.include[0].subQuery).to.equal(false); expect(options.include[0].subQueryFilter).to.equal(false); }); it('should tag a required belongsTo alongside a duplicating association', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [ {association: this.User.Company, required: true}, {association: this.User.Tasks} ], limit: 3 }); expect(options.subQuery).to.equal(true); expect(options.include[0].subQuery).to.equal(true); }); it('should not tag a required belongsTo alongside a duplicating association with duplicating false', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [ {association: this.User.Company, required: true}, {association: this.User.Tasks, duplicating: false} ], limit: 3 }); expect(options.subQuery).to.equal(false); expect(options.include[0].subQuery).to.equal(false); }); it('should tag a belongsTo association with where alongside a duplicating association', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [ {association: this.User.Company, where: {name: Math.random().toString()}}, {association: this.User.Tasks} ], limit: 3 }); expect(options.subQuery).to.equal(true); expect(options.include[0].subQuery).to.equal(true); }); it('should tag a required belongsTo association alongside a duplicating association with a nested belongsTo', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [ {association: this.User.Company, required: true, include: [ this.Company.Owner ]}, this.User.Tasks ], limit: 3 }); expect(options.subQuery).to.equal(true); expect(options.include[0].subQuery).to.equal(true); expect(options.include[0].include[0].subQuery).to.equal(false); expect(options.include[0].include[0].parent.subQuery).to.equal(true); }); it('should tag a belongsTo association with where alongside a duplicating association with duplicating false', function() { const options = Sequelize.Model._validateIncludedElements({ model: this.User, include: [ {association: this.User.Company, where: {name: Math.random().toString()}}, {association: this.User.Tasks, duplicating: false} ], limit: 3 }); expect(options.subQuery).to.equal(false); expect(options.include[0].subQuery).to.equal(false); }); }); }); });
/** * @fileoverview Options configuration for optionator. * @author George Zahariev */ "use strict"; //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ var optionator = require("optionator"); //------------------------------------------------------------------------------ // Initialization and Public Interface //------------------------------------------------------------------------------ // exports "parse(args)", "generateHelp()", and "generateHelpForOption(optionName)" module.exports = optionator({ prepend: "eslint [options] file.js [file.js] [dir]", concatRepeatedArrays: true, mergeRepeatedObjects: true, options: [ { heading: "Basic configuration" }, { option: "config", alias: "c", type: "path::String", description: "Use configuration from this file or sharable config" }, { option: "eslintrc", type: "Boolean", default: "true", description: "Disable use of configuration from .eslintrc" }, { option: "env", type: "[String]", description: "Specify environments" }, { option: "ext", type: "[String]", default: ".js", description: "Specify JavaScript file extensions" }, { option: "global", type: "[String]", description: "Define global variables" }, { option: "parser", type: "String", default: "espree", description: "Specify the parser to be used" }, { option: "cache", type: "Boolean", default: "false", description: "Only check changed files" }, { option: "cache-file", type: "String", default: ".eslintcache", description: "Path to the cache file" }, { heading: "Specifying rules and plugins" }, { option: "rulesdir", type: "[path::String]", description: "Use additional rules from this directory" }, { option: "plugin", type: "[String]", description: "Specify plugins" }, { option: "rule", type: "Object", description: "Specify rules" }, { heading: "Ignoring files" }, { option: "ignore-path", type: "path::String", description: "Specify path of ignore file" }, { option: "ignore", type: "Boolean", default: "true", description: "Disable use of .eslintignore" }, { option: "ignore-pattern", type: "String", description: "Pattern of files to ignore (in addition to those in .eslintignore)" }, { heading: "Using stdin" }, { option: "stdin", type: "Boolean", default: "false", description: "Lint code provided on <STDIN>" }, { option: "stdin-filename", type: "String", description: "Specify filename to process STDIN as" }, { heading: "Handling warnings" }, { option: "quiet", type: "Boolean", default: "false", description: "Report errors only" }, { option: "max-warnings", type: "Number", default: "-1", description: "Number of warnings to trigger nonzero exit code" }, { heading: "Output" }, { option: "output-file", alias: "o", type: "path::String", description: "Specify file to write report to" }, { option: "format", alias: "f", type: "String", default: "stylish", description: "Use a specific output format" }, { option: "color", type: "Boolean", default: "true", description: "Disable color in piped output" }, { heading: "Miscellaneous" }, { option: "init", type: "Boolean", default: "false", description: "Run config initialization wizard" }, { option: "help", alias: "h", type: "Boolean", description: "Show help" }, { option: "version", alias: "v", type: "Boolean", description: "Outputs the version number" } ] });
require("./assets/loader"); if (!window.Intl) { // Safari polyfill require.ensure(["intl"], require => { window.Intl = require("intl"); Intl.__addLocaleData(require("./assets/intl-data/en.json")); require("index.js"); }); } else { require("index.js"); }
var _ = require('lodash'); var templateMapping = { protractor: _.template('https://github.com/angular/protractor/blob/' + '<%= linksHash %>/lib/<%= fileName %>.js#L<%= startingLine %>'), webdriver: _.template('https://github.com/SeleniumHQ/selenium/blob/master/' + 'javascript/webdriver/<%= fileName %>.js#L<%= startingLine %>') }; /** * A lookup table with all the types in the parsed files. * @type {Object.<string, Array.<Object>>} */ var typeTable; /** * The hash used to generate the links to the source code. */ var linksHash = require('../../../package.json').version; /** * Add a link to the source code. * @param {!Object} doc Current document. */ var addLinkToSourceCode = function(doc) { var template = doc.fileInfo.filePath.indexOf('selenium-webdriver') !== -1 ? templateMapping.webdriver : templateMapping.protractor; doc.sourceLink = template({ linksHash: linksHash, fileName: doc.fileName, startingLine: doc.startingLine }); }; /** * Add links to @link annotations. For example: `{@link foo.bar}` will be * transformed into `[foo.bar](foo.bar)` and `{@link foo.bar FooBar Link}` will * be transfirned into `[FooBar Link](foo.bar)` * @param {string} str The string with the annotations. * @param {!Object} doc Current document. * @return {string} A link in markdown format. */ var addLinkToLinkAnnotation = function(str, doc) { var oldStr = null; while (str != oldStr) { oldStr = str; var matches = /{\s*@link\s+([^]+?)\s*}/.exec(str); if (matches) { var str = str.replace( new RegExp('{\\s*@link\\s+' + matches[1].replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&') + '\\s*}'), toMarkdownLinkFormat(matches[1], doc) ); } } return str; }; /** * Escape the < > | characters. * @param {string} str The string to escape. */ var escape = function(str) { return _.escape(str).replace(/\|/g, '&#124;').replace(/!\[/, '&#33;['); }; /** * Takes a link of the format 'type' or 'type description' and creates one of * the format '[description](type)'. * * Also does some minor reformatting of the type. * * @param {string} link The raw link. * @param {!Object} doc Current document. * @return {string} A link for the type. */ var toMarkdownLinkFormat = function(link, doc) { var type, desc; // Split type and description var i = link.indexOf(' '); if (i == -1) { desc = type = link; } else { desc = link.substr(i).trim(); type = link.substr(0, i).trim(); } if (!type.match(/^https?:\/\//)) { // Remove extra '()' at the end of types if (type.substr(-2) == '()') { type = type.substr(0, type.length - 2); } // Expand '#' at the start of types if (type[0] == '#') { type = doc.name.substr(0, doc.name.lastIndexOf('.') + 1) + type.substr(1); } // Replace '#' in the middle of types with '.' type = type.replace(new RegExp('#', 'g'), '.'); // Only create a link if it's in the API if (!typeTable[type]) { return desc; } } return '[' + desc + '](' + type + ')'; }; /** * Create the param or return type. * @param {!Object} param Parameter. * @return {string} Escaped param string with links to the types. */ var getTypeString = function(param) { var str = param.typeExpression; var type = param.type; if (!type) { return escape(str); } var replaceWithLinkIfPresent = function(type) { if (type.name) { str = str.replace(type.name, toMarkdownLinkFormat(type.name)); } }; if (type.type === 'FunctionType') { _.each(type.params, replaceWithLinkIfPresent); } else if (type.type === 'TypeApplication') { // Is this an Array.<type>? var match = str.match(/Array\.<(.*)>/); if (match) { var typeInsideArray = match[1]; str = str.replace(typeInsideArray, toMarkdownLinkFormat(typeInsideArray)); } } else if (type.type === 'NameExpression') { replaceWithLinkIfPresent(type); } return escape(str); }; /** * Add links to the external documents */ module.exports = function addLinks() { return { $runAfter: ['extracting-tags'], $runBefore: ['tags-extracted'], $process: function(docs) { typeTable = _.groupBy(docs, 'name'); docs.forEach(function(doc) { addLinkToSourceCode(doc); doc.description = addLinkToLinkAnnotation(doc.description, doc); // Add links for the params. _.each(doc.params, function(param) { param.paramString = getTypeString(param); param.description = addLinkToLinkAnnotation(param.description, doc); }); // Add links for the return types. var returns = doc.returns; if (returns) { doc.returnString = getTypeString(returns); returns.description = addLinkToLinkAnnotation(returns.description); } else { doc.returnString = ''; } }); } }; };
var app = angular.module('hackalist', []); app.controller('hackathonEvents', ['$http', '$scope', function($http, $scope){ $scope.hackathons = []; $scope.applicable = function(hackathon) { if (!$scope.travelReimbursements && !$scope.prizes && !$scope.highSchoolers && !$scope.cost) { return true; } if ($scope.travelReimbursements && hackathon.travel != 'yes') { return false; } if ($scope.prizes && hackathon.prize != 'yes') { return false; } if ($scope.highSchoolers && hackathon.highSchoolers != 'yes') { return false; } if ($scope.cost && hackathon.cost != 'free') { return false; } return true; } var today = new Date(); var month = today.getMonth() + 1; var year = today.getFullYear(); function getData(month, year) { $http.get(urlString(month, year)).success(function (data) { (function(month, year){ var months = [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ]; var monthString = months[month - 1]; var hacks = data[monthString]; $scope.hackathons.push({year: year, hacks: hacks, month: monthString}); if (month >= 12) { year += 1; month = 1; } else { month += 1; } getData(month, year); })(month, year); }).error(function() { $scope.chunkedHackathons = chunk($scope.hackathons, 3); console.log($scope.hackathons); }); } getData(month, year) }]); function urlString(month, year) { return 'api/1.0/' + year + '/' + monthString(month) + '.json'; } function monthString(n) { return n > 9 ? "" + n : "0" + n; } function chunk(arr, size) { var newArr = []; for (var i=0; i<arr.length; i+=size) { newArr.push(arr.slice(i, i+size)); } return newArr; }
var MINIFY = process.env.MINIFY; if (!MINIFY) throw "Please specify a build to minifiy, e.g. MINIFY=web ..." var config = require('./config.' + MINIFY); var webpack = require('webpack'); var objectAssign = require('object-assign-deep'); var config = objectAssign(config, { output: { filename: "[name].min.js" }, plugins: [ new webpack.optimize.UglifyJsPlugin() ] }); module.exports = config;
import assert from 'assert' window.assert = assert
/** * Main JS file for Casper behaviours */ /*globals jQuery, document */ (function ($) { "use strict"; $(document).ready(function(){ // Taken from http://css-tricks.com/snippets/jquery/smooth-scrolling/ $('a[href*=#]:not([href=#])').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { $('html,body').animate({ scrollTop: (target.offset().top - 50) }, 739); return false; } } }); // On the home page, move the blog icon inside the header // for better relative/absolute positioning. //$("#blog-logo").prependTo("#site-head-content"); }); }(jQuery));
// By: Christopher Buchholz // with heavy copying from, I mean use of as a Pattern, TokenMod var ChangeTokenImg = ChangeTokenImg || (function() { 'use strict'; var version = '0.1.31', lastUpdate = 1447948979, schemaVersion = 0.1, showHelp = function(id) { var who=getObj('player',id).get('_displayname').split(' ')[0]; sendChat('', '/w '+who+' <div style="border: 1px solid black; background-color: white; padding: 3px 3px">' + '<div style="padding-bottom:5px">' + '<span style="font-size:130%;border-bottom:1px;font-weight:bold">ChangeTokenImg v'+version+ '</span>' + '</div><div style="padding-left:10px;padding-right:10px;padding-bottom:5px">' + 'Changes the image for selected token IF the tokens are from a Rollable Table.' + '<span style="color:#FF0000;">Currently works <b>ONLY</b> if images are in your personal library!</span>' + '</div><div>' + '<span style="border-bottom:1px;font-weight:bold">Usage:</span>' + '</div><div style="padding-left:10px;padding-right:10px;padding-bottom:5px">' + 'select token(s) to change, then type ' + '<br/><b>!change-token-img</b> ' + '<br/>with one of the following options.' + '</div><div>' + '<span style="border-bottom:1px;font-weight:bold">Type of change:</span>' + '</div><div style="padding-left:10px;padding-right:10px;padding-bottom:5px">' + '<b>--flip</b> Flips image between 0 and 1 ' + '<br/><b>--set</b> Set the image index, must be followed by a space and a number: --set 3 sets the token to the 4th image in the rollable table. ' + '<br/><b>--incr</b> Increments the token to the next image in the rollable table ' + '</div><div>' + '<br/><span style="border-bottom:1px;font-weight:bold">Modifiers:</span>' + '</div><div style="padding-left:10px;padding-right:10px;padding-bottom:5px">' + 'These can be used with any of the above options:' + '<br/><b>--notsame</b> Asserts scripts should NOT assume all tokens have same rollable table of images. Default is ' + 'script assumes all selected tokens use same images.' + '</div><div>' + '<br/><span style="border-bottom:1px;font-weight:bold">Examples:</span>' + '</div><div style="padding-left:10px;padding-right:10px;padding-bottom:5px">' + '<b>!change-token-img --set 2 --notsame</b> change all tokens to image in index 2 (3rd image) of rollable table. For each token, ' + 'check the rollable table for images, do NOT assume all tokens are the same.' + '<br/><b>!change-token-img --flip</b> for all selected tokens, check their current image displayed. If it is the first image, flip ' + 'token to the second image. If it is set to the second image, then flip token to the first image. All tokens have the same rollable table of images.' + '<br/><b>!change-token-img --set 0</b> Set all tokens to the first image, assume they are all the same.' + '</div>' ); }, showError = function(id,n,tname,errortype) { var who=getObj('player',id).get('_displayname').split(' ')[0], errorstr = 'ChangeTokenImg: ', sidestr; if (errortype === 'SIDES') { sidestr='s'; if (n === 1) { sidestr=''; } errorstr = tname+' has only ' + n + ' side'+sidestr+'!'; } else if (errortype === 'EMPTY') { errorstr = 'You must pick --flip, --set or --incr'; } else if (errortype === 'ARG') { errorstr = n + ' is not a valid value for set parameter'; } sendChat('', '/w '+who+' <div>'+errorstr+'</div>' ); }, getCleanImgsrc = function (imgsrc) { var parts = imgsrc.match(/(.*\/images\/.*)(thumb|max)(.*)$/); if(parts) { return parts[1]+'thumb'+parts[3]; } return; }, setImg = function (o,nextSide,allSides) { var nextURL = getCleanImgsrc(decodeURIComponent(allSides[nextSide])); o.set({ currentSide: nextSide, imgsrc: nextURL }); return nextURL; }, setImgUrl = function (o, nextSide, nextURL) { o.set({ currentSide: nextSide, imgsrc: getCleanImgsrc(nextURL) }); }, isInt = function (value) { return !(value === undefined) && !isNaN(value) && parseInt(Number(value),10) === value && !isNaN(parseInt(value, 10)) && value >= 0; }, handleInput = function(msg_orig) { var msg = _.clone(msg_orig), args, cmds, allSides=[], nextSide, nextURL, flipimg, setimg, incrementimg, sameimages, setval,isthismethod=false; flipimg = false; setimg = false; sameimages = false; incrementimg = false; nextURL='BLANK'; if (msg.type !== "api") { return; } args = msg.content .replace(/<br\/>\n/g, ' ') .replace(/(\{\{(.*?)\}\})/g," $2 ") .split(/\s+--/); switch(args.shift()) { case '!change-token-img': isthismethod=true; while(args.length) { cmds=args.shift().match(/([^\s]+[\|#]'[^']+'|[^\s]+[\|#]"[^"]+"|[^\s]+)/g); switch(cmds.shift()) { case 'help': showHelp(msg.playerid); return; case 'set': setimg = true; setval = cmds; if (! isInt(setval)) { showError(msg.playerid,setval,'','ARG'); return; } break; case 'flip': flipimg = true; break; case 'incr': incrementimg = true; break; case 'notsame': sameimages = false; break; } } break; } if (isthismethod === false) { return; } if (setimg === false && flipimg === false && incrementimg === false ) { showError(msg.playerid,'','','EMPTY'); return; } //loop through selected tokens _.chain(msg.selected) .uniq() .map(function(o){ return getObj('graphic',o._id); }) .reject(_.isUndefined) .each(function(o) { if (sameimages === false || allSides === undefined || allSides.length === 0 ) { allSides = o.get("sides").split("|"); } if ( allSides.length > 1) { if (setimg === true) { nextSide = setval; } else { nextSide = o.get("currentSide") ; nextSide++; if (flipimg === true && nextSide > 1) { nextSide = 0; } else if (nextSide === allSides.length) { nextSide = 0; } } if (nextSide >= allSides.length) { showError(msg.playerid,allSides.length,o.get("name"),'SIDES'); if (sameimages === true) { //quit since they are all the same return; } } else { if (nextURL === 'BLANK' || sameimages === false) { nextURL = setImg(o,nextSide,allSides); } else { setImgUrl(o,nextSide,nextURL); } } } else { showError(msg.playerid,allSides.length,o.get("name"),'SIDES'); if (sameimages === true) { //quit since they are all the same return; } } }); }, checkInstall = function() { log('-=> ChangeTokenImg v'+version+' <=- ['+(new Date(lastUpdate*1000))+']'); }, registerEventHandlers = function() { on('chat:message', handleInput); }; return { CheckInstall: checkInstall, RegisterEventHandlers: registerEventHandlers }; }()); on("ready",function(){ 'use strict'; ChangeTokenImg.CheckInstall(); ChangeTokenImg.RegisterEventHandlers(); });
var assert = require('assert') var saxStream = require('../lib/sax').createStream() var b = new Buffer('误') saxStream.on('text', function(text) { assert.equal(text, b.toString()) }) saxStream.write(new Buffer('<test><a>')) saxStream.write(b.slice(0, 1)) saxStream.write(b.slice(1)) saxStream.write(new Buffer('</a><b>')) saxStream.write(b.slice(0, 2)) saxStream.write(b.slice(2)) saxStream.write(new Buffer('</b><c>')) saxStream.write(b) saxStream.write(new Buffer('</c>')) saxStream.write(Buffer.concat([new Buffer('<d>'), b.slice(0, 1)])) saxStream.end(Buffer.concat([b.slice(1), new Buffer('</d></test>')])) var saxStream2 = require('../lib/sax').createStream() saxStream2.on('text', function(text) { assert.equal(text, '�') }); saxStream2.write(new Buffer('<e>')); saxStream2.write(new Buffer([0xC0])); saxStream2.write(new Buffer('</e>')); saxStream2.write(Buffer.concat([new Buffer('<f>'), b.slice(0,1)])); saxStream2.end();
define( //begin v1.x content { "field-second-relative+0": "сейчас", "field-quarter-relative+-1": "в прошлом квартале", "field-weekday": "день недели", "field-mon-narrow-relative+0": "в этот пн.", "field-mon-narrow-relative+1": "в след. пн.", "field-wed-relative+0": "в эту среду", "field-wed-relative+1": "в следующую среду", "field-week-short": "нед.", "field-tue-relative+-1": "в прошлый вторник", "field-year-short": "г.", "field-thu-narrow-relative+-1": "в прош. чт.", "field-hour-relative+0": "в этом часе", "field-quarter-narrow": "кв.", "field-fri-relative+-1": "в прошлую пятницу", "field-hour-short": "ч.", "field-wed-relative+-1": "в прошлую среду", "field-mon-short-relative+-1": "в прош. пн.", "field-thu-relative+-1": "в прошлый четверг", "field-era": "эра", "field-sat-narrow-relative+0": "в эту сб.", "field-sat-narrow-relative+1": "в след. сб.", "field-year": "год", "field-hour": "час", "field-sat-relative+0": "в эту субботу", "field-sat-relative+1": "в следующую субботу", "field-sat-short-relative+-1": "в прош. сб.", "field-minute-narrow": "мин", "field-day-relative+0": "сегодня", "field-day-relative+1": "завтра", "field-thu-relative+0": "в этот четверг", "field-mon-narrow-relative+-1": "в прош. пн.", "field-day-relative+2": "послезавтра", "field-wed-narrow-relative+0": "в эту ср.", "field-thu-relative+1": "в следующий четверг", "field-wed-narrow-relative+1": "в след. ср.", "field-mon-short-relative+0": "в этот пн.", "field-mon-short-relative+1": "в след. пн.", "field-wed-short-relative+-1": "в прош. ср.", "field-fri-narrow-relative+-1": "в прош. пт.", "field-hour-narrow": "ч", "field-tue-short-relative+0": "в этот вт.", "field-year-narrow": "г.", "field-tue-short-relative+1": "в след. вт.", "field-minute-short": "мин.", "field-day-narrow": "дн.", "field-wed-short-relative+0": "в эту ср.", "field-wed-short-relative+1": "в след. ср.", "field-sun-relative+0": "в это воскресенье", "field-sun-relative+1": "в следующее воскресенье", "eraAbbr": [ "Before R.O.C.", "Minguo" ], "field-minute": "минута", "field-month-short": "мес.", "field-dayperiod": "ДП/ПП", "field-day-relative+-1": "вчера", "field-day-relative+-2": "позавчера", "field-minute-relative+0": "в эту минуту", "field-week-narrow": "нед.", "field-wed-narrow-relative+-1": "в прош. ср.", "field-day-short": "дн.", "field-quarter-relative+0": "в текущем квартале", "field-quarter-relative+1": "в следующем квартале", "field-fri-relative+0": "в эту пятницу", "field-fri-relative+1": "в следующую пятницу", "field-day": "день", "field-second-narrow": "с", "field-zone": "часовой пояс", "field-year-relative+-1": "в прошлом году", "field-month-relative+-1": "в прошлом месяце", "field-thu-short-relative+0": "в этот чт.", "field-thu-short-relative+1": "в след. чт.", "field-quarter-narrow-relative+0": "тек. кв.", "field-quarter-narrow-relative+1": "след. кв.", "field-quarter": "квартал", "field-month": "месяц", "field-tue-relative+0": "в этот вторник", "field-quarter-short-relative+0": "текущий кв.", "field-tue-relative+1": "в следующий вторник", "field-quarter-short-relative+1": "следующий кв.", "field-fri-narrow-relative+0": "в эту пт.", "field-fri-narrow-relative+1": "в след. пт.", "field-fri-short-relative+-1": "в прош. пт.", "field-sun-narrow-relative+-1": "в прош. вс.", "field-quarter-short-relative+-1": "последний кв.", "field-sun-narrow-relative+0": "в это вс.", "field-thu-narrow-relative+0": "в этот чт.", "field-sun-narrow-relative+1": "в след. вс.", "field-thu-narrow-relative+1": "в след. чт.", "field-tue-narrow-relative+0": "в этот вт.", "field-mon-relative+0": "в этот понедельник", "field-tue-narrow-relative+1": "в след. вт.", "field-mon-relative+1": "в следующий понедельник", "field-tue-narrow-relative+-1": "в прош. вт.", "field-second-short": "сек.", "field-second": "секунда", "field-fri-short-relative+0": "в эту пт.", "field-sat-relative+-1": "в прошлую субботу", "field-fri-short-relative+1": "в след. пт.", "field-sun-relative+-1": "в прошлое воскресенье", "field-month-relative+0": "в этом месяце", "field-quarter-narrow-relative+-1": "посл. кв.", "field-month-relative+1": "в следующем месяце", "field-week": "неделя", "field-sat-short-relative+0": "в эту сб.", "field-sat-short-relative+1": "в след. сб.", "field-year-relative+0": "в этом году", "field-week-relative+-1": "на прошлой неделе", "field-year-relative+1": "в следующем году", "field-quarter-short": "кв.", "field-sun-short-relative+-1": "в прош. вс.", "field-thu-short-relative+-1": "в прош. чт.", "field-tue-short-relative+-1": "в прош. вт.", "field-mon-relative+-1": "в прошлый понедельник", "field-sat-narrow-relative+-1": "в прош. сб.", "field-month-narrow": "мес.", "field-week-relative+0": "на этой неделе", "field-sun-short-relative+0": "в это вс.", "field-week-relative+1": "на следующей неделе", "field-sun-short-relative+1": "в след. вс." } //end v1.x content );
var strftime = require("prettydate").strftime; var relative = require('relative-date'); module.exports = function() { $(formatDates) setInterval(formatDates, 10*1000) } var formatDates = function() { $("[data-date]").each(function(i, el){ var date = new Date($(this).data().date) if (!date.getYear()) { return console.error("Invalid date", date) } var format = $(this).data().dateFormat || "%Y-%m-%d" var result = format === "relative" ? relative(date) : strftime(date, format) $(this).text(result) }) }
var q = 0; function addParticleMap() { addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eA,eA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAA,eAA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAAP,eAAP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAAPL,eAAPL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAAWW,eAAWW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAAXJ,eAAXJ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eABB,eABB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eABBV,eABBV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eABC,eABC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eABCO,eABCO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eABG,eABG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eABMD,eABMD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eABT,eABT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eABV,eABV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eABX,eABX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eACAD,eACAD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eACAS,eACAS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eACC,eACC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eACE,eACE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eACGL,eACGL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eACI,eACI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eACIW,eACIW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eACM,eACM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eACMP,eACMP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eACN,eACN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eACOR,eACOR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eACT,eACT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eACTG,eACTG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eACWI,eACWI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eACXM,eACXM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eADBE,eADBE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eADI,eADI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eADM,eADM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eADP,eADP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eADS,eADS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eADSK,eADSK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eADT,eADT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eADTN,eADTN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAEE,eAEE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAEG,eAEG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAEGR,eAEGR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAEM,eAEM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAEO,eAEO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAEP,eAEP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAES,eAES); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAET,eAET); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAF,eAF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAFCE,eAFCE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAFG,eAFG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAFL,eAFL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAG,eAG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAGCO,eAGCO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAGN,eAGN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAGNC,eAGNC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAGO,eAGO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAGQ,eAGQ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAGU,eAGU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAHL,eAHL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAI,eAI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAIA,eAIA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAIG,eAIG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAINV,eAINV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAIRM,eAIRM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAIT,eAIT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAIV,eAIV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAIZ,eAIZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAJG,eAJG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAKAM,eAKAM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAKS,eAKS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eALB,eALB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eALGN,eALGN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eALGT,eALGT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eALJ,eALJ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eALK,eALK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eALKS,eALKS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eALL,eALL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eALNY,eALNY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eALR,eALR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eALTR,eALTR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eALU,eALU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eALV,eALV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eALXN,eALXN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAMAT,eAMAT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAMCX,eAMCX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAMD,eAMD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAME,eAME); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAMG,eAMG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAMGN,eAMGN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAMP,eAMP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAMRN,eAMRN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAMT,eAMT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAMTD,eAMTD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAMX,eAMX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAMZN,eAMZN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAN,eAN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eANF,eANF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eANN,eANN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eANR,eANR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eANSS,eANSS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eANV,eANV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAOL,eAOL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAON,eAON); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAOS,eAOS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAPA,eAPA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAPC,eAPC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAPD,eAPD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAPEI,eAPEI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAPH,eAPH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAPO,eAPO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAPOG,eAPOG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAPOL,eAPOL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eARCC,eARCC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eARCO,eARCO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eARCP,eARCP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eARE,eARE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAREX,eAREX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eARG,eARG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eARIA,eARIA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eARMH,eARMH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eARNA,eARNA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eARO,eARO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eARR,eARR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eARRS,eARRS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eARUN,eARUN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eARW,eARW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eASBC,eASBC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eASH,eASH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eASML,eASML); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eASNA,eASNA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eASPS,eASPS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eASTX,eASTX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAT,eAT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eATHN,eATHN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eATI,eATI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eATK,eATK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eATML,eATML); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eATO,eATO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eATU,eATU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eATVI,eATVI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eATW,eATW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAU,eAU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAUQ,eAUQ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAUXL,eAUXL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAUY,eAUY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAVA,eAVA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAVB,eAVB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAVGO,eAVGO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAVP,eAVP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAVT,eAVT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAVY,eAVY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAWAY,eAWAY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAWH,eAWH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAWI,eAWI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAWK,eAWK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAWR,eAWR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAXE,eAXE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAXJS,eAXJS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAXL,eAXL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAXLL,eAXLL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAXP,eAXP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAXS,eAXS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAYI,eAYI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAZN,eAZN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAZO,eAZO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAZPN,eAZPN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eAZZ,eAZZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBA,eBA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBAC,eBAC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBAK,eBAK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBAM,eBAM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBANR,eBANR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBAP,eBAP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBAS,eBAS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBAX,eBAX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBBBY,eBBBY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBBD,eBBD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBBG,eBBG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBBL,eBBL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBBRY,eBBRY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBBT,eBBT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBBVA,eBBVA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBBY,eBBY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBC,eBC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBCE,eBCE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBCEI,eBCEI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBCR,eBCR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBCS,eBCS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBDC,eBDC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBDN,eBDN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBDX,eBDX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBEAM,eBEAM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBEAV,eBEAV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBECN,eBECN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBEE,eBEE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBEN,eBEN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBG,eBG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBGC,eBGC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBGCP,eBGCP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBGG,eBGG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBHE,eBHE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBHI,eBHI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBHP,eBHP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBID,eBID); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBIDU,eBIDU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBIG,eBIG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBIIB,eBIIB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBIS,eBIS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBJRI,eBJRI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBK,eBK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBKD,eBKD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBKE,eBKE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBKH,eBKH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBKI,eBKI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBKS,eBKS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBLC,eBLC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBLK,eBLK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBLL,eBLL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBLMN,eBLMN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBMC,eBMC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBMO,eBMO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBMR,eBMR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBMRN,eBMRN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBMS,eBMS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBMY,eBMY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBNO,eBNO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBNS,eBNS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBOH,eBOH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBOIL,eBOIL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBP,eBP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBPO,eBPO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBPOP,eBPOP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBR,eBR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBRCD,eBRCD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBRCM,eBRCM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBRE,eBRE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBRF,eBRF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBRFS,eBRFS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBRLI,eBRLI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBRO,eBRO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBRS,eBRS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBRY,eBRY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBRZU,eBRZU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBSBR,eBSBR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBSMX,eBSMX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBSX,eBSX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBT,eBT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBTE,eBTE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBTI,eBTI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBTU,eBTU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBUD,eBUD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBVN,eBVN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBWA,eBWA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBWC,eBWC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBWLD,eBWLD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBWS,eBWS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBX,eBX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBXP,eBXP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBXS,eBXS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBYD,eBYD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBYI,eBYI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBZ,eBZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBZH,eBZH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eBZQ,eBZQ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eC,eC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCA,eCA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCAB,eCAB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCACI,eCACI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCAE,eCAE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCAG,eCAG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCAH,eCAH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCAJ,eCAJ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCAKE,eCAKE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCAM,eCAM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCAR,eCAR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCASS,eCASS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCASY,eCASY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCAT,eCAT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCATM,eCATM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCAVM,eCAVM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCB,eCB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCBB,eCBB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCBD,eCBD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCBG,eCBG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCBI,eCBI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCBL,eCBL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCBOE,eCBOE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCBS,eCBS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCBSH,eCBSH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCBST,eCBST); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCBT,eCBT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCCE,eCCE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCCI,eCCI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCCJ,eCCJ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCCK,eCCK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCCL,eCCL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCDE,eCDE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCDNS,eCDNS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCE,eCE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCEB,eCEB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCEF,eCEF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCELG,eCELG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCENX,eCENX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCERN,eCERN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCF,eCF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCFFN,eCFFN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCFN,eCFN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCFR,eCFR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCFX,eCFX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCGNX,eCGNX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCHD,eCHD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCHE,eCHE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCHK,eCHK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCHKP,eCHKP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCHL,eCHL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCHMT,eCHMT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCHRW,eCHRW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCHS,eCHS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCHTR,eCHTR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCI,eCI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCIE,eCIE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCIEN,eCIEN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCIG,eCIG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCIM,eCIM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCINF,eCINF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCIT,eCIT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCJES,eCJES); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCL,eCL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCLB,eCLB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCLD,eCLD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCLDX,eCLDX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCLF,eCLF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCLGX,eCLGX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCLH,eCLH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCLI,eCLI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCLNE,eCLNE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCLP,eCLP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCLR,eCLR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCLS,eCLS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCLW,eCLW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCLX,eCLX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCM,eCM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCMA,eCMA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCMC,eCMC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCMCSA,eCMCSA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCMCSK,eCMCSK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCME,eCME); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCMG,eCMG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCMI,eCMI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCMO,eCMO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCMP,eCMP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCMS,eCMS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCNC,eCNC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCNH,eCNH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCNI,eCNI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCNK,eCNK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCNO,eCNO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCNP,eCNP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCNQ,eCNQ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCNQR,eCNQR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCNW,eCNW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCNX,eCNX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCOF,eCOF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCOG,eCOG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCOH,eCOH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCOL,eCOL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCOLB,eCOLB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCONN,eCONN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCOO,eCOO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCOP,eCOP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCOR,eCOR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCORN,eCORN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCOST,eCOST); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCOV,eCOV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCP,eCP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCPA,eCPA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCPB,eCPB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCPHD,eCPHD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCPL,eCPL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCPN,eCPN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCPRT,eCPRT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCPT,eCPT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCPTS,eCPTS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCPWR,eCPWR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCR,eCR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCRBC,eCRBC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCREE,eCREE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCRI,eCRI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCRK,eCRK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCRL,eCRL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCRM,eCRM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCROX,eCROX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCRR,eCRR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCRS,eCRS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCRT,eCRT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCRUS,eCRUS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCRZO,eCRZO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCS,eCS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCSC,eCSC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCSCO,eCSCO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCSE,eCSE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCSGP,eCSGP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCSL,eCSL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCSOD,eCSOD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCSX,eCSX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCTAS,eCTAS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCTB,eCTB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCTL,eCTL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCTRP,eCTRP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCTRX,eCTRX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCTSH,eCTSH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCTXS,eCTXS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCUBE,eCUBE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCUK,eCUK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCUZ,eCUZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCVA,eCVA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCVC,eCVC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCVD,eCVD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCVE,eCVE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCVG,eCVG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCVH,eCVH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCVI,eCVI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCVLT,eCVLT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCVS,eCVS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCVX,eCVX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCWH,eCWH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCX,eCX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCXO,eCXO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCXW,eCXW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCY,eCY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCYBX,eCYBX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCYH,eCYH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCYMI,eCYMI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCYN,eCYN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCYS,eCYS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCYT,eCYT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCZA,eCZA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eCZZ,eCZZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eD,eD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDAL,eDAL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDAN,eDAN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDAR,eDAR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDB,eDB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDBA,eDBA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDBC,eDBC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDBD,eDBD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDBE,eDBE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDBO,eDBO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDBP,eDBP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDBS,eDBS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDBV,eDBV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDCI,eDCI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDCNG,eDCNG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDCT,eDCT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDD,eDD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDDD,eDDD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDDM,eDDM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDDR,eDDR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDDS,eDDS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDE,eDE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDECK,eDECK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDEG,eDEG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDEI,eDEI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDELL,eDELL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDEM,eDEM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDEO,eDEO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDES,eDES); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDF,eDF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDFS,eDFS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDFT,eDFT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDG,eDG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDGAZ,eDGAZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDGI,eDGI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDGIT,eDGIT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDGL,eDGL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDGLD,eDGLD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDGP,eDGP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDGX,eDGX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDHI,eDHI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDHR,eDHR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDIA,eDIA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDIG,eDIG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDIN,eDIN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDIOD,eDIOD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDIS,eDIS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDISCA,eDISCA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDISCK,eDISCK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDISH,eDISH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDJP,eDJP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDK,eDK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDKS,eDKS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDLB,eDLB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDLLR,eDLLR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDLPH,eDLPH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDLR,eDLR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDLTR,eDLTR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDLX,eDLX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDNB,eDNB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDNDN,eDNDN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDNKN,eDNKN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDNO,eDNO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDNR,eDNR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDO,eDO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDOG,eDOG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDOLE,eDOLE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDOV,eDOV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDOW,eDOW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDOX,eDOX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDPS,eDPS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDPZ,eDPZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDRC,eDRC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDRE,eDRE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDRH,eDRH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDRI,eDRI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDRN,eDRN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDRQ,eDRQ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDRV,eDRV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDSLV,eDSLV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDST,eDST); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDSW,eDSW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDSX,eDSX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDTE,eDTE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDTO,eDTO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDTV,eDTV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDUG,eDUG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDUK,eDUK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDUST,eDUST); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDV,eDV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDVA,eDVA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDVAX,eDVAX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDVN,eDVN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDVR,eDVR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDVY,eDVY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDVYL,eDVYL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDW,eDW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDWA,eDWA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDXD,eDXD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDXJ,eDXJ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eDZZ,eDZZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eE,eE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEA,eEA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEAT,eEAT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEBAY,eEBAY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEBR,eEBR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEC,eEC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eECA,eECA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eECL,eECL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eED,eED); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEDC,eEDC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEDR,eEDR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEDU,eEDU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEDZ,eEDZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEEFT,eEEFT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEEM,eEEM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEEP,eEEP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEES,eEES); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEEV,eEEV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEFA,eEFA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEFII,eEFII); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEFX,eEFX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEGN,eEGN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEGO,eEGO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEIPL,eEIPL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEIX,eEIX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEL,eEL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eELN,eELN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eELNK,eELNK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eELP,eELP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eELS,eELS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eELX,eELX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEMC,eEMC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEMM,eEMM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEMN,eEMN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEMR,eEMR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eENB,eENB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eENDP,eENDP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eENR,eENR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eENS,eENS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eENTG,eENTG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEOG,eEOG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEPD,eEPD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEPI,eEPI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEPL,eEPL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEPP,eEPP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEQIX,eEQIX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEQR,eEQR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEQT,eEQT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEQY,eEQY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eERF,eERF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eERIC,eERIC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eERJ,eERJ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eERX,eERX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eERY,eERY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eESL,eESL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eESRX,eESRX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eESS,eESS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eESV,eESV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eETE,eETE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eETFC,eETFC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eETN,eETN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eETP,eETP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eETR,eETR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEUO,eEUO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEV,eEV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEVR,eEVR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEW,eEW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEWA,eEWA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEWBC,eEWBC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEWC,eEWC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEWG,eEWG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEWH,eEWH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEWJ,eEWJ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEWP,eEWP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEWQ,eEWQ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEWT,eEWT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEWU,eEWU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEWW,eEWW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEWY,eEWY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEWZ,eEWZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEXAS,eEXAS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEXC,eEXC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEXH,eEXH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEXK,eEXK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEXP,eEXP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEXPD,eEXPD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEXPE,eEXPE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEXPR,eEXPR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEXR,eEXR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEXXI,eEXXI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEZA,eEZA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eEZU,eEZU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eF,eF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFAF,eFAF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFAS,eFAS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFAST,eFAST); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFAZ,eFAZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFB,eFB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFBC,eFBC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFBHS,eFBHS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFBR,eFBR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFCFS,eFCFS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFCG,eFCG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFCN,eFCN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFCS,eFCS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFCX,eFCX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFDN,eFDN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFDO,eFDO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFDS,eFDS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFDX,eFDX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFE,eFE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFEIC,eFEIC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFEZ,eFEZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFFIV,eFFIV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFHN,eFHN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFICO,eFICO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFII,eFII); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFINL,eFINL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFIO,eFIO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFIRE,eFIRE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFIS,eFIS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFISV,eFISV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFITB,eFITB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFL,eFL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFLEX,eFLEX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFLIR,eFLIR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFLO,eFLO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFLR,eFLR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFLS,eFLS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFLT,eFLT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFMC,eFMC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFMCN,eFMCN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFMER,eFMER); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFMS,eFMS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFMX,eFMX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFNB,eFNB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFNF,eFNF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFNFG,eFNFG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFNGN,eFNGN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFNP,eFNP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFNSR,eFNSR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFNV,eFNV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFNX,eFNX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFOR,eFOR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFOSL,eFOSL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFR,eFR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFRC,eFRC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFRT,eFRT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFRX,eFRX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFSL,eFSL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFSLR,eFSLR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFSRV,eFSRV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFST,eFST); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFSYS,eFSYS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFTE,eFTE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFTI,eFTI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFTK,eFTK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFTNT,eFTNT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFTR,eFTR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFULT,eFULT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFWLT,eFWLT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFXA,eFXA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFXB,eFXB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFXE,eFXE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFXF,eFXF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFXI,eFXI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFXY,eFXY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eFYX,eFYX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eG,eG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGAS,eGAS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGB,eGB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGBX,eGBX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGCI,eGCI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGCO,eGCO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGD,eGD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGDP,eGDP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGDX,eGDX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGDXJ,eGDXJ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGE,eGE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGEF,eGEF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGEO,eGEO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGES,eGES); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGFA,eGFA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGFI,eGFI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGG,eGG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGGB,eGGB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGGG,eGGG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGGP,eGGP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGHL,eGHL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGIB,eGIB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGIL,eGIL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGILD,eGILD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGIS,eGIS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGLD,eGLD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGLF,eGLF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGLL,eGLL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGLNG,eGLNG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGLW,eGLW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGM,eGM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGMCR,eGMCR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGME,eGME); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGNC,eGNC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGNTX,eGNTX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGNW,eGNW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGOL,eGOL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGOLD,eGOLD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGOOG,eGOOG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGOV,eGOV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGPC,eGPC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGPI,eGPI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGPK,eGPK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGPN,eGPN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGPOR,eGPOR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGPS,eGPS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGRA,eGRA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGRMN,eGRMN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGRPN,eGRPN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGRT,eGRT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGS,eGS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGSK,eGSK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGT,eGT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGTAT,eGTAT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGTI,eGTI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGTLS,eGTLS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGVA,eGVA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGWR,eGWR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGWW,eGWW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGXP,eGXP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eGY,eGY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eH,eH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHAE,eHAE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHAIN,eHAIN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHAL,eHAL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHALO,eHALO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHAR,eHAR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHAS,eHAS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHBAN,eHBAN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHBC,eHBC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHBHC,eHBHC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHBI,eHBI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHCA,eHCA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHCBK,eHCBK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHCC,eHCC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHCI,eHCI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHCN,eHCN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHCP,eHCP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHD,eHD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHDB,eHDB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHDV,eHDV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHE,eHE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHEI,eHEI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHEK,eHEK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHERO,eHERO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHES,eHES); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHFC,eHFC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHGR,eHGR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHIBB,eHIBB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHIG,eHIG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHII,eHII); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHIMX,eHIMX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHITT,eHITT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHIW,eHIW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHK,eHK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHL,eHL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHLF,eHLF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHLS,eHLS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHLX,eHLX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHMA,eHMA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHMC,eHMC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHME,eHME); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHMIN,eHMIN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHMSY,eHMSY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHMY,eHMY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHNI,eHNI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHNT,eHNT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHNZ,eHNZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHOG,eHOG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHOLX,eHOLX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHON,eHON); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHOS,eHOS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHOT,eHOT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHOV,eHOV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHP,eHP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHPQ,eHPQ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHPT,eHPT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHPY,eHPY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHR,eHR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHRB,eHRB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHRC,eHRC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHRL,eHRL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHRS,eHRS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHSC,eHSC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHSH,eHSH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHSIC,eHSIC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHSP,eHSP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHST,eHST); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHSY,eHSY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHT,eHT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHTLD,eHTLD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHTS,eHTS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHTZ,eHTZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHUM,eHUM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHUN,eHUN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHURN,eHURN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHXL,eHXL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHXM,eHXM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eHYG,eHYG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIACI,eIACI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIAG,eIAG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIAU,eIAU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIBB,eIBB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIBM,eIBM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIBN,eIBN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eICE,eICE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eICF,eICF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eICLR,eICLR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eICON,eICON); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIDCC,eIDCC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIDTI,eIDTI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIDU,eIDU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIDXX,eIDXX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIEF,eIEF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIEMG,eIEMG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIEO,eIEO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIEV,eIEV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIEX,eIEX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIEZ,eIEZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIFF,eIFF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIGE,eIGE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIGN,eIGN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIGT,eIGT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIGV,eIGV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIHI,eIHI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIHS,eIHS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIJH,eIJH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIJJ,eIJJ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIJK,eIJK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIJR,eIJR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIJS,eIJS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIJT,eIJT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eILF,eILF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eILMN,eILMN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIM,eIM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIMAX,eIMAX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIMGN,eIMGN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIMO,eIMO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eINCY,eINCY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eINFA,eINFA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eINFI,eINFI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eINFN,eINFN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eINFY,eINFY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eING,eING); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eINGR,eINGR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eINT,eINT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eINTC,eINTC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eINTU,eINTU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eINVN,eINVN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIO,eIO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIP,eIP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIPG,eIPG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIPHS,eIPHS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIPI,eIPI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIPXL,eIPXL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIR,eIR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIRF,eIRF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIRM,eIRM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIRWD,eIRWD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eISCA,eISCA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eISH,eISH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eISIL,eISIL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eISIS,eISIS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eISRG,eISRG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIT,eIT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eITB,eITB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eITMN,eITMN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eITT,eITT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eITUB,eITUB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eITW,eITW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIVE,eIVE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIVOO,eIVOO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIVR,eIVR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIVV,eIVV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIVW,eIVW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIVZ,eIVZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIWB,eIWB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIWC,eIWC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIWD,eIWD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIWF,eIWF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIWM,eIWM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIWN,eIWN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIWO,eIWO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIWP,eIWP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIWR,eIWR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIWS,eIWS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIWV,eIWV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIWW,eIWW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIWZ,eIWZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIYE,eIYE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIYF,eIYF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIYH,eIYH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIYJ,eIYJ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIYM,eIYM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIYR,eIYR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIYT,eIYT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eIYW,eIYW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJACK,eJACK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJAG,eJAG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJAH,eJAH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJAZZ,eJAZZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJBHT,eJBHT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJBL,eJBL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJBLU,eJBLU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJCI,eJCI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJCP,eJCP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJDSU,eJDSU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJE,eJE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJEC,eJEC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJJA,eJJA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJJC,eJJC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJJG,eJJG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJKD,eJKD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJKE,eJKE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJKF,eJKF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJKH,eJKH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJKHY,eJKHY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJKJ,eJKJ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJKK,eJKK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJKL,eJKL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJLL,eJLL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJNJ,eJNJ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJNK,eJNK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJNPR,eJNPR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJNS,eJNS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJNY,eJNY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJOE,eJOE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJOSB,eJOSB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJOY,eJOY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJPM,eJPM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eJWN,eJWN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eK,eK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKBE,eKBE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKBH,eKBH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKBR,eKBR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKBWI,eKBWI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKEG,eKEG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKERX,eKERX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKEX,eKEX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKEY,eKEY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKGC,eKGC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKIM,eKIM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKKD,eKKD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKKR,eKKR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKLAC,eKLAC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKLIC,eKLIC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKMB,eKMB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKMI,eKMI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKMP,eKMP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKMR,eKMR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKMT,eKMT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKMX,eKMX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKNOP,eKNOP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKNX,eKNX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKO,eKO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKOF,eKOF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKOG,eKOG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKOLD,eKOLD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKORS,eKORS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKR,eKR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKRC,eKRC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKRE,eKRE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKRFT,eKRFT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKS,eKS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKSS,eKSS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKSU,eKSU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eKWK,eKWK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eL,eL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLAD,eLAD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLAMR,eLAMR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLAZ,eLAZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLBTYA,eLBTYA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLBTYK,eLBTYK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLCC,eLCC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLEA,eLEA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLEAP,eLEAP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLECO,eLECO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLEG,eLEG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLEN,eLEN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLF,eLF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLG,eLG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLGF,eLGF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLH,eLH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLHO,eLHO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLIFE,eLIFE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLII,eLII); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLINTA,eLINTA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLKQ,eLKQ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLL,eLL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLLL,eLLL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLLTC,eLLTC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLLY,eLLY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLM,eLM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLMT,eLMT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLNC,eLNC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLNG,eLNG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLNKD,eLNKD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLNN,eLNN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLNT,eLNT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLO,eLO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLOPE,eLOPE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLOW,eLOW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLPL,eLPL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLPNT,eLPNT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLPS,eLPS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLPX,eLPX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLQD,eLQD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLQDT,eLQDT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLRCX,eLRCX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLRY,eLRY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLSCC,eLSCC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLSE,eLSE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLSI,eLSI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLSKY,eLSKY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLSTR,eLSTR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLTC,eLTC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLTD,eLTD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLTL,eLTL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLTM,eLTM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLUFK,eLUFK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLUK,eLUK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLULU,eLULU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLUV,eLUV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLVLT,eLVLT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLVS,eLVS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLXK,eLXK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLXP,eLXP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLXU,eLXU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLYB,eLYB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLYG,eLYG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLYV,eLYV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eLZB,eLZB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eM,eM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMA,eMA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMAA,eMAA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMAC,eMAC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMAKO,eMAKO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMAN,eMAN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMAR,eMAR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMAS,eMAS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMASI,eMASI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMAT,eMAT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMBFI,eMBFI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMBI,eMBI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMBT,eMBT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMCD,eMCD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMCHP,eMCHP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMCK,eMCK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMCO,eMCO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMCP,eMCP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMCRS,eMCRS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMCY,eMCY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMD,eMD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMDC,eMDC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMDCO,eMDCO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMDLZ,eMDLZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMDP,eMDP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMDR,eMDR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMDRX,eMDRX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMDSO,eMDSO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMDT,eMDT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMDU,eMDU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMDVN,eMDVN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMDY,eMDY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMDYG,eMDYG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMED,eMED); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMELI,eMELI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMENT,eMENT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMEOH,eMEOH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMET,eMET); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMFA,eMFA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMFC,eMFC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMGA,eMGA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMGM,eMGM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMHK,eMHK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMHO,eMHO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMHP,eMHP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMHR,eMHR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMIC,eMIC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMIDU,eMIDU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMIDZ,eMIDZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMINI,eMINI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMJN,eMJN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMKC,eMKC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMKTX,eMKTX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMLI,eMLI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMLM,eMLM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMLNX,eMLNX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMM,eMM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMMC,eMMC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMMM,eMMM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMMR,eMMR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMMS,eMMS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMNKD,eMNKD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMNRO,eMNRO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMNST,eMNST); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMO,eMO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMOH,eMOH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMOLX,eMOLX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMON,eMON); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMOS,eMOS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMPC,eMPC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMPEL,eMPEL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMPW,eMPW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMR,eMR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMRK,eMRK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMRO,eMRO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMRVL,eMRVL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMS,eMS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMSA,eMSA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMSCC,eMSCC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMSCI,eMSCI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMSFT,eMSFT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMSG,eMSG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMSI,eMSI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMSM,eMSM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMT,eMT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMTB,eMTB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMTD,eMTD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMTG,eMTG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMTGE,eMTGE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMTH,eMTH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMTL,eMTL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMTN,eMTN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMTOR,eMTOR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMTU,eMTU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMTW,eMTW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMTX,eMTX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMTZ,eMTZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMU,eMU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMUR,eMUR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMUX,eMUX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMVV,eMVV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMW,eMW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMWA,eMWA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMWE,eMWE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMWV,eMWV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMWW,eMWW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMXIM,eMXIM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMYGN,eMYGN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eMYL,eMYL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eN,eN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNATI,eNATI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNAV,eNAV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNBIX,eNBIX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNBL,eNBL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNBR,eNBR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNC,eNC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNCR,eNCR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNCT,eNCT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNDAQ,eNDAQ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNDSN,eNDSN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNE,eNE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNEE,eNEE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNEM,eNEM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNFG,eNFG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNFLX,eNFLX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNFX,eNFX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNG,eNG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNGD,eNGD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNGG,eNGG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNHI,eNHI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNI,eNI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNICE,eNICE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNIHD,eNIHD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNILE,eNILE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNKE,eNKE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNKTR,eNKTR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNKY,eNKY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNLSN,eNLSN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNLY,eNLY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNNI,eNNI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNNN,eNNN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNOC,eNOC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNOG,eNOG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNOK,eNOK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNOV,eNOV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNOW,eNOW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNPBC,eNPBC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNPO,eNPO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNPSP,eNPSP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNR,eNR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNRF,eNRF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNRG,eNRG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNS,eNS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNSC,eNSC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNSM,eNSM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNSR,eNSR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNSU,eNSU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNTAP,eNTAP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNTES,eNTES); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNTGR,eNTGR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNTRS,eNTRS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNU,eNU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNUAN,eNUAN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNUE,eNUE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNUGT,eNUGT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNUS,eNUS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNVAX,eNVAX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNVDA,eNVDA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNVE,eNVE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNVO,eNVO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNVS,eNVS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNWL,eNWL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNWS,eNWS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNWSA,eNWSA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNX,eNX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNXPI,eNXPI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNY,eNY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNYCB,eNYCB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNYT,eNYT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eNYX,eNYX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eO,eO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOAS,eOAS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOC,eOC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOCN,eOCN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOCR,eOCR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eODFL,eODFL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eODP,eODP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOEF,eOEF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOFC,eOFC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOGE,eOGE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOHI,eOHI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOI,eOI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOIBR,eOIBR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOIH,eOIH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOII,eOII); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOIL,eOIL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOIS,eOIS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOKE,eOKE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOKS,eOKS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOLEM,eOLEM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOLN,eOLN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOMC,eOMC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOMG,eOMG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOMI,eOMI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOMX,eOMX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eONN,eONN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eONNN,eONNN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eONXX,eONXX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOPEN,eOPEN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eORCL,eORCL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOREX,eOREX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eORI,eORI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eORLY,eORLY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOSIS,eOSIS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOSK,eOSK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOTEX,eOTEX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOVTI,eOVTI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOXM,eOXM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eOXY,eOXY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eP,eP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePAA,ePAA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePAAS,ePAAS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePAG,ePAG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePANL,ePANL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePANW,ePANW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePAY,ePAY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePAYX,ePAYX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePB,ePB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePBCT,ePBCT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePBF,ePBF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePBH,ePBH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePBI,ePBI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePBR,ePBR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePCAR,ePCAR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePCG,ePCG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePCL,ePCL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePCLN,ePCLN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePCP,ePCP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePCS,ePCS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePCYC,ePCYC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePDCE,ePDCE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePDCO,ePDCO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePDLI,ePDLI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePDM,ePDM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePDS,ePDS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePEB,ePEB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePEG,ePEG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePENN,ePENN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePEP,ePEP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePETM,ePETM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePFE,ePFE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePFG,ePFG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePG,ePG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePGH,ePGH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePGR,ePGR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePH,ePH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePHG,ePHG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePHH,ePHH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePHM,ePHM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePII,ePII); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePIR,ePIR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePJC,ePJC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePKG,ePKG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePKI,ePKI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePKT,ePKT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePKX,ePKX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePL,ePL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePLCE,ePLCE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePLCM,ePLCM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePLD,ePLD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePLL,ePLL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePLT,ePLT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePM,ePM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePMCS,ePMCS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePMT,ePMT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePMTC,ePMTC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePNC,ePNC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePNNT,ePNNT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePNR,ePNR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePNRA,ePNRA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePNW,ePNW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePNY,ePNY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePOL,ePOL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePOM,ePOM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePOOL,ePOOL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePOT,ePOT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePPG,ePPG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePPL,ePPL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePPO,ePPO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePPS,ePPS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePRE,ePRE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePRFZ,ePRFZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePRGO,ePRGO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePRGS,ePRGS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePRLB,ePRLB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePRU,ePRU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePRXL,ePRXL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePSA,ePSA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePSEC,ePSEC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePSLV,ePSLV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePSMT,ePSMT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePSQ,ePSQ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePSR,ePSR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePSX,ePSX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePTEN,ePTEN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePUK,ePUK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePVA,ePVA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePVH,ePVH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePVR,ePVR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePVTB,ePVTB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePWE,ePWE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePWER,ePWER); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePWR,ePWR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePX,ePX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePXD,ePXD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePXJ,ePXJ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",ePXP,ePXP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eQCOM,eQCOM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eQCOR,eQCOR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eQEP,eQEP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eQGEN,eQGEN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eQID,eQID); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eQIHU,eQIHU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eQLD,eQLD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eQLGC,eQLGC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eQLIK,eQLIK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eQLTI,eQLTI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eQQQ,eQQQ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eQSII,eQSII); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eR,eR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRAD,eRAD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRAI,eRAI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRAS,eRAS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRAX,eRAX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRBA,eRBA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRBS,eRBS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRCI,eRCI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRCII,eRCII); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRCL,eRCL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRDC,eRDC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRDEN,eRDEN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRDN,eRDN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRE,eRE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eREG,eREG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eREGN,eREGN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRES,eRES); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRETL,eRETL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eREW,eREW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eREXX,eREXX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRF,eRF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRFG,eRFG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRFMD,eRFMD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRGA,eRGA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRGLD,eRGLD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRGR,eRGR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRHI,eRHI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRHP,eRHP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRHT,eRHT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRIG,eRIG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRIO,eRIO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRJET,eRJET); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRJF,eRJF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRKT,eRKT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRL,eRL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRLGY,eRLGY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRLJ,eRLJ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRMBS,eRMBS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRMD,eRMD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRNR,eRNR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eROC,eROC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eROK,eROK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eROM,eROM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eROP,eROP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eROSE,eROSE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eROST,eROST); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eROVI,eROVI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRPAI,eRPAI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRPM,eRPM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRRC,eRRC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRRD,eRRD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRS,eRS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRSG,eRSG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRSH,eRSH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRSO,eRSO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRSP,eRSP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRSTI,eRSTI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRSX,eRSX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRT,eRT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRTH,eRTH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRTI,eRTI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRTK,eRTK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRTN,eRTN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRVBD,eRVBD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRWM,eRWM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRWR,eRWR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRWT,eRWT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRY,eRY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRYL,eRYL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRYN,eRYN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRZG,eRZG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eRZV,eRZV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eS,eS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSA,eSA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSAFM,eSAFM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSAI,eSAI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSAIA,eSAIA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSAN,eSAN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSANM,eSANM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSAP,eSAP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSAPE,eSAPE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSAVE,eSAVE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSBAC,eSBAC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSBGI,eSBGI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSBH,eSBH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSBNY,eSBNY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSBRA,eSBRA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSBS,eSBS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSBUX,eSBUX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSCCO,eSCCO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSCG,eSCG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSCHA,eSCHA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSCHB,eSCHB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSCHN,eSCHN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSCHW,eSCHW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSCI,eSCI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSCJ,eSCJ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSCO,eSCO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSCS,eSCS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSCSC,eSCSC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSCSS,eSCSS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSD,eSD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSDK,eSDK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSDOW,eSDOW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSDRL,eSDRL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSDS,eSDS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSDY,eSDY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSDYL,eSDYL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSE,eSE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSEE,eSEE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSEIC,eSEIC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSEMG,eSEMG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSFD,eSFD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSFG,eSFG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSFI,eSFI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSFLY,eSFLY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSFY,eSFY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSGEN,eSGEN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSGI,eSGI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSGMO,eSGMO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSGOL,eSGOL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSGY,eSGY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSH,eSH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSHLD,eSHLD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSHO,eSHO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSHOO,eSHOO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSHOS,eSHOS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSHPG,eSHPG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSHW,eSHW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSI,eSI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSIAL,eSIAL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSID,eSID); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSIG,eSIG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSINA,eSINA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSIR,eSIR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSIRI,eSIRI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSIRO,eSIRO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSIVB,eSIVB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSIVR,eSIVR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSIX,eSIX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSJL,eSJL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSJM,eSJM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSJR,eSJR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSKF,eSKF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSKM,eSKM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSKS,eSKS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSKT,eSKT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSKX,eSKX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSKYW,eSKYW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSLB,eSLB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSLCA,eSLCA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSLF,eSLF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSLG,eSLG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSLGN,eSLGN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSLM,eSLM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSLV,eSLV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSLW,eSLW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSLXP,eSLXP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSLY,eSLY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSM,eSM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSMDD,eSMDD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSMG,eSMG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSMH,eSMH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSMN,eSMN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSMP,eSMP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSMTC,eSMTC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSNA,eSNA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSNDK,eSNDK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSNE,eSNE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSNH,eSNH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSNI,eSNI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSNPS,eSNPS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSNTS,eSNTS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSNV,eSNV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSNX,eSNX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSNY,eSNY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSO,eSO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSODA,eSODA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSOHU,eSOHU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSON,eSON); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSONC,eSONC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSONS,eSONS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSOXL,eSOXL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSOXS,eSOXS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSOXX,eSOXX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSPF,eSPF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSPG,eSPG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSPHB,eSPHB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSPLK,eSPLK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSPLS,eSPLS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSPN,eSPN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSPR,eSPR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSPRD,eSPRD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSPW,eSPW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSPWR,eSPWR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSPXL,eSPXL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSPXS,eSPXS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSPXU,eSPXU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSPY,eSPY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSPYG,eSPYG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSQM,eSQM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSQQQ,eSQQQ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSRCL,eSRCL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSRE,eSRE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSRPT,eSRPT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSRS,eSRS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSRTY,eSRTY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSSD,eSSD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSSDL,eSSDL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSSI,eSSI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSSO,eSSO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSSRI,eSSRI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSSS,eSSS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSSYS,eSSYS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eST,eST); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSTI,eSTI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSTJ,eSTJ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSTLD,eSTLD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSTM,eSTM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSTMP,eSTMP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSTO,eSTO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSTP,eSTP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSTR,eSTR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSTRZA,eSTRZA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSTT,eSTT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSTWD,eSTWD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSTX,eSTX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSTZ,eSTZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSU,eSU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSUSQ,eSUSQ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSUSS,eSUSS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSVU,eSVU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSVXY,eSVXY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSWC,eSWC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSWFT,eSWFT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSWHC,eSWHC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSWI,eSWI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSWK,eSWK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSWKS,eSWKS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSWN,eSWN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSWY,eSWY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSXC,eSXC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSXL,eSXL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSXT,eSXT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSYK,eSYK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSYMC,eSYMC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSYNA,eSYNA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSYT,eSYT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSYY,eSYY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eSZO,eSZO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eT,eT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTAHO,eTAHO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTAL,eTAL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTAP,eTAP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTBF,eTBF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTBT,eTBT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTC,eTC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTCB,eTCB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTCBI,eTCBI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTCK,eTCK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTCO,eTCO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTCP,eTCP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTD,eTD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTDC,eTDC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTDG,eTDG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTDS,eTDS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTDW,eTDW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTDY,eTDY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTE,eTE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTECD,eTECD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTECL,eTECL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTECS,eTECS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTEF,eTEF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTEG,eTEG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTEL,eTEL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTEN,eTEN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTER,eTER); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTEVA,eTEVA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTEX,eTEX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTFM,eTFM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTFX,eTFX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTGH,eTGH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTGI,eTGI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTGT,eTGT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTHC,eTHC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTHD,eTHD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTHG,eTHG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTHI,eTHI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTHO,eTHO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTHOR,eTHOR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTHRX,eTHRX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTIBX,eTIBX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTIF,eTIF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTITN,eTITN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTIVO,eTIVO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTJX,eTJX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTKR,eTKR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTLAB,eTLAB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTLM,eTLM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTLT,eTLT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTM,eTM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTMF,eTMF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTMH,eTMH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTMHC,eTMHC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTMK,eTMK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTMO,eTMO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTMV,eTMV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTNA,eTNA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTNC,eTNC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTOL,eTOL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTOT,eTOT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTPX,eTPX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTQNT,eTQNT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTQQQ,eTQQQ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTRAK,eTRAK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTRC,eTRC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTREX,eTREX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTRGP,eTRGP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTRI,eTRI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTRIP,eTRIP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTRLA,eTRLA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTRMB,eTRMB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTRMK,eTRMK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTRN,eTRN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTROW,eTROW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTROX,eTROX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTRP,eTRP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTRQ,eTRQ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTRS,eTRS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTRV,eTRV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTRW,eTRW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTRX,eTRX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTS,eTS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTSCO,eTSCO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTSL,eTSL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTSLA,eTSLA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTSM,eTSM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTSN,eTSN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTSO,eTSO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTSS,eTSS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTSU,eTSU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTTC,eTTC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTTEK,eTTEK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTTI,eTTI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTTM,eTTM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTTT,eTTT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTTWO,eTTWO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTU,eTU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTUP,eTUP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTV,eTV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTVIX,eTVIX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTW,eTW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTWC,eTWC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTWI,eTWI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTWM,eTWM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTWO,eTWO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTWTC,eTWTC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTWX,eTWX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTXI,eTXI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTXN,eTXN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTXRH,eTXRH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTXT,eTXT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTYC,eTYC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTYL,eTYL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eTZA,eTZA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUA,eUA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUAL,eUAL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUBS,eUBS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUCO,eUCO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUDOW,eUDOW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUDR,eUDR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUFS,eUFS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUGA,eUGA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUGAZ,eUGAZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUGI,eUGI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUGL,eUGL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUGLD,eUGLD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUGP,eUGP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUHS,eUHS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUIL,eUIL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUIS,eUIS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUKW,eUKW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUL,eUL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eULTA,eULTA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eULTI,eULTI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUMBF,eUMBF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUMDD,eUMDD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUMPQ,eUMPQ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUN,eUN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUNFI,eUNFI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUNG,eUNG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUNH,eUNH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUNM,eUNM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUNP,eUNP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUNT,eUNT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUPL,eUPL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUPRO,eUPRO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUPS,eUPS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eURBN,eURBN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eURE,eURE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eURI,eURI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eURS,eURS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eURTY,eURTY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUSB,eUSB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUSD,eUSD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUSG,eUSG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUSL,eUSL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUSLV,eUSLV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUSO,eUSO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUSTR,eUSTR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUTEK,eUTEK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUTHR,eUTHR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUTIW,eUTIW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUTX,eUTX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUUP,eUUP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUVV,eUVV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUVXY,eUVXY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUWM,eUWM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUYG,eUYG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eUYM,eUYM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eV,eV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVAC,eVAC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVAL,eVAL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVALE,eVALE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVAR,eVAR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVAW,eVAW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVB,eVB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVBK,eVBK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVBR,eVBR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVC,eVC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVCI,eVCI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVCLK,eVCLK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVDC,eVDC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVDE,eVDE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVEA,eVEA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVECO,eVECO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVEU,eVEU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVFC,eVFC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVFH,eVFH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVG,eVG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVGK,eVGK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVGT,eVGT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVHC,eVHC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVHS,eVHS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVIAB,eVIAB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVIG,eVIG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVIIX,eVIIX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVIOG,eVIOG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVIOO,eVIOO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVIP,eVIP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVIV,eVIV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVIVO,eVIVO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVIXY,eVIXY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVLO,eVLO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVLY,eVLY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVMC,eVMC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVMED,eVMED); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVMI,eVMI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVMW,eVMW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVNO,eVNO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVNQ,eVNQ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVO,eVO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVOD,eVOD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVOLC,eVOLC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVONE,eVONE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVONG,eVONG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVOO,eVOO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVPHM,eVPHM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVPRT,eVPRT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVR,eVR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVRSK,eVRSK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVRSN,eVRSN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVRTX,eVRTX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVRX,eVRX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVSH,eVSH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVSI,eVSI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVT,eVT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVTI,eVTI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVTR,eVTR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVTV,eVTV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVTWO,eVTWO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVTWV,eVTWV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVUG,eVUG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVV,eVV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVVC,eVVC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVVUS,eVVUS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVWO,eVWO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVXF,eVXF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVXX,eVXX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVYM,eVYM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eVZ,eVZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWAB,eWAB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWAC,eWAC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWAG,eWAG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWAT,eWAT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWBC,eWBC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWBS,eWBS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWCC,eWCC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWCG,eWCG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWCN,eWCN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWCRX,eWCRX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWDAY,eWDAY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWDC,eWDC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWDR,eWDR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWEC,eWEC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWEN,eWEN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWERN,eWERN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWETF,eWETF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWFC,eWFC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWFM,eWFM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWFR,eWFR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWFT,eWFT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWHR,eWHR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWIN,eWIN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWLK,eWLK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWLL,eWLL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWLP,eWLP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWLT,eWLT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWM,eWM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWMB,eWMB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWMT,eWMT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWNC,eWNC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWNR,eWNR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWOOF,eWOOF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWOR,eWOR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWPRT,eWPRT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWPX,eWPX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWPZ,eWPZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWR,eWR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWRB,eWRB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWRI,eWRI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWRLD,eWRLD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWSH,eWSH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWSM,eWSM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWSO,eWSO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWTI,eWTI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWTR,eWTR); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWTS,eWTS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWTW,eWTW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWU,eWU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWWD,eWWD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWWW,eWWW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWXS,eWXS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWY,eWY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWYN,eWYN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eWYNN,eWYNN); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eX,eX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXBI,eXBI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXCO,eXCO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXEC,eXEC); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXEL,eXEL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXES,eXES); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXHB,eXHB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXIV,eXIV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXL,eXL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXLB,eXLB); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXLE,eXLE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXLF,eXLF); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXLG,eXLG); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXLI,eXLI); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXLK,eXLK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXLNX,eXLNX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXLP,eXLP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXLS,eXLS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXLU,eXLU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXLV,eXLV); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXLY,eXLY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXME,eXME); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXOM,eXOM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXOP,eXOP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXRAY,eXRAY); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXRT,eXRT); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXRX,eXRX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXSD,eXSD); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXSW,eXSW); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXXIA,eXXIA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eXYL,eXYL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eYCS,eYCS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eYELP,eYELP); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eYGE,eYGE); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eYHOO,eYHOO); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eYNDX,eYNDX); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eYOKU,eYOKU); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eYUM,eYUM); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eZ,eZ); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eZBRA,eZBRA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eZION,eZION); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eZMH,eZMH); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eZNGA,eZNGA); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eZQK,eZQK); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eZSL,eZSL); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eZTS,eZTS); addPointCloud(scene, 1170, 0.1, [0,q--,0], "1170",eZUMZ,eZUMZ); }
define('lodash/object/create', ['exports', 'lodash/internal/baseAssign', 'lodash/internal/baseCreate', 'lodash/internal/isIterateeCall'], function (exports, _lodashInternalBaseAssign, _lodashInternalBaseCreate, _lodashInternalIsIterateeCall) { 'use strict'; /** * Creates an object that inherits from the given `prototype` object. If a * `properties` object is provided its own enumerable properties are assigned * to the created object. * * @static * @memberOf _ * @category Object * @param {Object} prototype The object to inherit from. * @param {Object} [properties] The properties to assign to the object. * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. * @returns {Object} Returns the new object. * @example * * function Shape() { * this.x = 0; * this.y = 0; * } * * function Circle() { * Shape.call(this); * } * * Circle.prototype = _.create(Shape.prototype, { * 'constructor': Circle * }); * * var circle = new Circle; * circle instanceof Circle; * // => true * * circle instanceof Shape; * // => true */ function create(prototype, properties, guard) { var result = (0, _lodashInternalBaseCreate['default'])(prototype); if (guard && (0, _lodashInternalIsIterateeCall['default'])(prototype, properties, guard)) { properties = undefined; } return properties ? (0, _lodashInternalBaseAssign['default'])(result, properties) : result; } exports['default'] = create; });
/** * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ test('should pass', () => {});
import { moduleForComponent, test } from 'ember-qunit'; moduleForComponent( 'sl-radio', 'Unit | Component | sl radio', { unit: true }); test( 'Disabled state applies disabled class, and attribute to input', function( assert ) { this.subject({ disabled: true }); assert.ok( this.$( 'input' ).prop( 'disabled' ), 'has attribute "disabled"' ); assert.ok( this.$().hasClass( 'disabled' ), 'has class "disabled"' ); }); test( 'Inline property sets relevant class', function( assert ) { this.subject({ inline: true }); assert.ok( this.$().hasClass( 'radio-inline' ), 'has class "radio-inline"' ); });
/******/ (function(modules) { // webpackBootstrap /******/ // install a JSONP callback for chunk loading /******/ var parentJsonpFunction = window["webpackJsonp"]; /******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) { /******/ // add "moreModules" to the modules object, /******/ // then flag all "chunkIds" as loaded and fire callback /******/ var moduleId, chunkId, i = 0, callbacks = []; /******/ for(;i < chunkIds.length; i++) { /******/ chunkId = chunkIds[i]; /******/ if(installedChunks[chunkId]) /******/ callbacks.push.apply(callbacks, installedChunks[chunkId]); /******/ installedChunks[chunkId] = 0; /******/ } /******/ for(moduleId in moreModules) { /******/ modules[moduleId] = moreModules[moduleId]; /******/ } /******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules); /******/ while(callbacks.length) /******/ callbacks.shift().call(null, __webpack_require__); /******/ }; /******/ // The module cache /******/ var installedModules = {}; /******/ // object to store loaded and loading chunks /******/ // "0" means "already loaded" /******/ // Array means "loading", array contains callbacks /******/ var installedChunks = { /******/ 0:0 /******/ }; /******/ // 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; /******/ } /******/ // This file contains only the entry chunk. /******/ // The chunk loading function for additional chunks /******/ __webpack_require__.e = function requireEnsure(chunkId, callback) { /******/ // "0" is the signal for "already loaded" /******/ if(installedChunks[chunkId] === 0) /******/ return callback.call(null, __webpack_require__); /******/ // an array means "currently loading". /******/ if(installedChunks[chunkId] !== undefined) { /******/ installedChunks[chunkId].push(callback); /******/ } else { /******/ // start chunk loading /******/ installedChunks[chunkId] = [callback]; /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); /******/ script.type = 'text/javascript'; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.src = __webpack_require__.p + "" + chunkId + ".bundle.js"; /******/ head.appendChild(script); /******/ } /******/ }; /******/ // 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 a_1 = __webpack_require__(1); var b_1 = __webpack_require__(2); console.log(a_1.default); console.log(b_1.default); __webpack_require__.e/* nsure */(1, function (require) { // These require calls are emitted (note these are NOT TypeScript // `import ... from` statements). `require.ensure` is defined in // require.d.ts. Webpack sees this and automatically puts c and d // into a separate chunk. // Note that requiring an ES6 module always returns an object // with the named exports. This means if you want to access // the default export you have to do so manually. // Since we used syntactic sugar for the default export for c, we // go ahead and access the default property. var cDefault = __webpack_require__(3)["default"]; // For d, we imported the whole module so we don't access the default // property yet. var dModule = __webpack_require__(4); console.log(cDefault); console.log(dModule["default"]); }); /***/ }, /* 1 */ /***/ function(module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = 'a'; /***/ }, /* 2 */ /***/ function(module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = 'b'; /***/ } /******/ ]);
var searchData= [ ['handle',['Handle',['../classv8_1_1_handle.html',1,'v8']]], ['handle',['Handle',['../classv8_1_1_handle.html#aa7543a3d572565806a66e922634cc2f4',1,'v8::Handle::Handle()'],['../classv8_1_1_handle.html#aac16277f1131898a4a2ef664d051cc18',1,'v8::Handle::Handle(T *val)'],['../classv8_1_1_handle.html#a64aee8fcde243c8a5abebfe534b3797a',1,'v8::Handle::Handle(Handle&lt; S &gt; that)']]], ['handle_3c_20v8_3a_3acontext_20_3e',['Handle&lt; v8::Context &gt;',['../classv8_1_1_handle.html',1,'v8']]], ['handle_3c_20v8_3a_3afunction_20_3e',['Handle&lt; v8::Function &gt;',['../classv8_1_1_handle.html',1,'v8']]], ['handle_3c_20v8_3a_3ainteger_20_3e',['Handle&lt; v8::Integer &gt;',['../classv8_1_1_handle.html',1,'v8']]], ['handle_3c_20v8_3a_3aobject_20_3e',['Handle&lt; v8::Object &gt;',['../classv8_1_1_handle.html',1,'v8']]], ['handle_3c_20v8_3a_3avalue_20_3e',['Handle&lt; v8::Value &gt;',['../classv8_1_1_handle.html',1,'v8']]], ['handlescope',['HandleScope',['../classv8_1_1_handle_scope.html',1,'v8']]], ['hascaught',['HasCaught',['../classv8_1_1_try_catch.html#a48f704fbf2b82564b5d2a4ff596e4137',1,'v8::TryCatch']]], ['haserror',['HasError',['../classv8_1_1_script_data.html#ab5cea77b299b7dd73b7024fb114fd7e4',1,'v8::ScriptData']]], ['hasindexedlookupinterceptor',['HasIndexedLookupInterceptor',['../classv8_1_1_object.html#afd36ea440a254335bde065a4ceafffb3',1,'v8::Object']]], ['hasinstance',['HasInstance',['../classv8_1_1_function_template.html#aa883e4ab6643498662f7873506098c98',1,'v8::FunctionTemplate']]], ['hasnamedlookupinterceptor',['HasNamedLookupInterceptor',['../classv8_1_1_object.html#ad0791109068a7816d65a06bbc9f6f870',1,'v8::Object']]], ['hasoutofmemoryexception',['HasOutOfMemoryException',['../classv8_1_1_context.html#aadec400a5da1e79e58a8770fd706b9a0',1,'v8::Context']]], ['heapgraphedge',['HeapGraphEdge',['../classv8_1_1_heap_graph_edge.html',1,'v8']]], ['heapgraphnode',['HeapGraphNode',['../classv8_1_1_heap_graph_node.html',1,'v8']]], ['heapgraphpath',['HeapGraphPath',['../classv8_1_1_heap_graph_path.html',1,'v8']]], ['heapprofiler',['HeapProfiler',['../classv8_1_1_heap_profiler.html',1,'v8']]], ['heapsnapshot',['HeapSnapshot',['../classv8_1_1_heap_snapshot.html',1,'v8']]], ['heapsnapshotsdiff',['HeapSnapshotsDiff',['../classv8_1_1_heap_snapshots_diff.html',1,'v8']]], ['heapstatistics',['HeapStatistics',['../classv8_1_1_heap_statistics.html',1,'v8']]], ['hostdispatchhandler',['HostDispatchHandler',['../classv8_1_1_debug.html#a442f686afe7d80928b57b3ff8ac3f6e7',1,'v8::Debug']]] ];
import moment from 'moment'; moment.locale('ja'); import Pagination from 'rc-pagination/es/locale/ja_JP'; import DatePicker from '../date-picker/locale/ja_JP'; import TimePicker from '../time-picker/locale/ja_JP'; import Calendar from '../calendar/locale/ja_JP'; export default { locale: 'ja', Pagination: Pagination, DatePicker: DatePicker, TimePicker: TimePicker, Calendar: Calendar, Table: { filterTitle: 'メニューをフィルター', filterConfirm: 'OK', filterReset: 'リセット', emptyText: 'データがありません', selectAll: 'すべてを選択', selectInvert: '選択を反転' }, Modal: { okText: 'OK', cancelText: 'キャンセル', justOkText: 'OK' }, Popconfirm: { okText: 'OK', cancelText: 'キャンセル' }, Transfer: { notFoundContent: '結果はありません', searchPlaceholder: 'ここを検索', itemUnit: 'アイテム', itemsUnit: 'アイテム' }, Select: { notFoundContent: '結果はありません' }, Upload: { uploading: 'アップロード中...', removeFile: 'ファイルを削除', uploadError: 'アップロードエラー', previewFile: 'ファイルをプレビュー' } };
// Copyright 2006 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // 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. /** * @fileoverview Utilities for manipulating objects/maps/hashes. */ goog.provide('goog.object'); /** * Calls a function for each element in an object/map/hash. * * @param {Object} obj The object over which to iterate. * @param {Function} f The function to call for every element. This function * takes 3 arguments (the element, the index and the object) * and the return value is irrelevant. * @param {Object=} opt_obj This is used as the 'this' object within f. */ goog.object.forEach = function(obj, f, opt_obj) { for (var key in obj) { f.call(opt_obj, obj[key], key, obj); } }; /** * Calls a function for each element in an object/map/hash. If that call returns * true, adds the element to a new object. * * @param {Object} obj The object over which to iterate. * @param {Function} f The function to call for every element. This * function takes 3 arguments (the element, the index and the object) * and should return a boolean. If the return value is true the * element is added to the result object. If it is false the * element is not included. * @param {Object=} opt_obj This is used as the 'this' object within f. * @return {!Object} a new object in which only elements that passed the test * are present. */ goog.object.filter = function(obj, f, opt_obj) { var res = {}; for (var key in obj) { if (f.call(opt_obj, obj[key], key, obj)) { res[key] = obj[key]; } } return res; }; /** * For every element in an object/map/hash calls a function and inserts the * result into a new object. * * @param {Object} obj The object over which to iterate. * @param {Function} f The function to call for every element. This function * takes 3 arguments (the element, the index and the object) * and should return something. The result will be inserted * into a new object. * @param {Object=} opt_obj This is used as the 'this' object within f. * @return {!Object} a new object with the results from f. */ goog.object.map = function(obj, f, opt_obj) { var res = {}; for (var key in obj) { res[key] = f.call(opt_obj, obj[key], key, obj); } return res; }; /** * Calls a function for each element in an object/map/hash. If any * call returns true, returns true (without checking the rest). If * all calls return false, returns false. * * @param {Object} obj The object to check. * @param {Function} f The function to call for every element. This function * takes 3 arguments (the element, the index and the object) and should * return a boolean. * @param {Object=} opt_obj This is used as the 'this' object within f. * @return {boolean} true if any element passes the test. */ goog.object.some = function(obj, f, opt_obj) { for (var key in obj) { if (f.call(opt_obj, obj[key], key, obj)) { return true; } } return false; }; /** * Calls a function for each element in an object/map/hash. If * all calls return true, returns true. If any call returns false, returns * false at this point and does not continue to check the remaining elements. * * @param {Object} obj The object to check. * @param {Function} f The function to call for every element. This function * takes 3 arguments (the element, the index and the object) and should * return a boolean. * @param {Object=} opt_obj This is used as the 'this' object within f. * @return {boolean} false if any element fails the test. */ goog.object.every = function(obj, f, opt_obj) { for (var key in obj) { if (!f.call(opt_obj, obj[key], key, obj)) { return false; } } return true; }; /** * Returns the number of key-value pairs in the object map. * * @param {Object} obj The object for which to get the number of key-value * pairs. * @return {number} The number of key-value pairs in the object map. */ goog.object.getCount = function(obj) { // JS1.5 has __count__ but it has been deprecated so it raises a warning... // in other words do not use. Also __count__ only includes the fields on the // actual object and not in the prototype chain. var rv = 0; for (var key in obj) { rv++; } return rv; }; /** * Returns one key from the object map, if any exists. * For map literals the returned key will be the first one in most of the * browsers (a know exception is Konqueror). * * @param {Object} obj The object to pick a key from. * @return {string|undefined} The key or undefined if the object is empty. */ goog.object.getAnyKey = function(obj) { for (var key in obj) { return key; } }; /** * Returns one value from the object map, if any exists. * For map literals the returned value will be the first one in most of the * browsers (a know exception is Konqueror). * * @param {Object} obj The object to pick a value from. * @return {*} The value or undefined if the object is empty. */ goog.object.getAnyValue = function(obj) { for (var key in obj) { return obj[key]; } }; /** * Whether the object/hash/map contains the given object as a value. * An alias for goog.object.containsValue(obj, val). * * @param {Object} obj The object in which to look for val. * @param {*} val The object for which to check. * @return {boolean} true if val is present. */ goog.object.contains = function(obj, val) { return goog.object.containsValue(obj, val); }; /** * Returns the values of the object/map/hash. * * @param {Object} obj The object from which to get the values. * @return {!Array} The values in the object/map/hash. */ goog.object.getValues = function(obj) { var res = []; var i = 0; for (var key in obj) { res[i++] = obj[key]; } return res; }; /** * Returns the keys of the object/map/hash. * * @param {Object} obj The object from which to get the keys. * @return {!Array.<string>} Array of property keys. */ goog.object.getKeys = function(obj) { var res = []; var i = 0; for (var key in obj) { res[i++] = key; } return res; }; /** * Get a value from an object multiple levels deep. This is useful for * pulling values from deeply nested objects, such as JSON responses. * Example usage: getValueByKeys(jsonObj, 'foo', 'entries', 3) * * @param {!Object} obj An object to get the value from. Can be array-like. * @param {...(string|number|!Array.<number|string>)} var_args A number of keys * (as strings, or nubmers, for array-like objects). Can also be * specified as a single array of keys. * @return {*} The resulting value. If, at any point, the value for a key * is undefined, returns undefined. */ goog.object.getValueByKeys = function(obj, var_args) { var isArrayLike = goog.isArrayLike(var_args); var keys = isArrayLike ? var_args : arguments; // Start with the 2nd parameter for the variable parameters syntax. for (var i = isArrayLike ? 0 : 1; i < keys.length; i++) { obj = obj[keys[i]]; if (!goog.isDef(obj)) { break; } } return obj; }; /** * Whether the object/map/hash contains the given key. * * @param {Object} obj The object in which to look for key. * @param {*} key The key for which to check. * @return {boolean} true If the map contains the key. */ goog.object.containsKey = function(obj, key) { return key in obj; }; /** * Whether the object/map/hash contains the given value. This is O(n). * * @param {Object} obj The object in which to look for val. * @param {*} val The value for which to check. * @return {boolean} true If the map contains the value. */ goog.object.containsValue = function(obj, val) { for (var key in obj) { if (obj[key] == val) { return true; } } return false; }; /** * Searches an object for an element that satisfies the given condition and * returns its key. * @param {Object} obj The object to search in. * @param {function(*, string, Object): boolean} f The function to call for * every element. Takes 3 arguments (the value, the key and the object) and * should return a boolean. * @param {Object=} opt_this An optional "this" context for the function. * @return {string|undefined} The key of an element for which the function * returns true or undefined if no such element is found. */ goog.object.findKey = function(obj, f, opt_this) { for (var key in obj) { if (f.call(opt_this, obj[key], key, obj)) { return key; } } return undefined; }; /** * Searches an object for an element that satisfies the given condition and * returns its value. * @param {Object} obj The object to search in. * @param {function(*, string, Object): boolean} f The function to call for * every element. Takes 3 arguments (the value, the key and the object) and * should return a boolean. * @param {Object=} opt_this An optional "this" context for the function. * @return {*} The value of an element for which the function returns true or * undefined if no such element is found. */ goog.object.findValue = function(obj, f, opt_this) { var key = goog.object.findKey(obj, f, opt_this); return key && obj[key]; }; /** * Whether the object/map/hash is empty. * * @param {Object} obj The object to test. * @return {boolean} true if obj is empty. */ goog.object.isEmpty = function(obj) { for (var key in obj) { return false; } return true; }; /** * Removes all key value pairs from the object/map/hash. * * @param {Object} obj The object to clear. */ goog.object.clear = function(obj) { for (var i in obj) { delete obj[i]; } }; /** * Removes a key-value pair based on the key. * * @param {Object} obj The object from which to remove the key. * @param {*} key The key to remove. * @return {boolean} Whether an element was removed. */ goog.object.remove = function(obj, key) { var rv; if ((rv = key in obj)) { delete obj[key]; } return rv; }; /** * Adds a key-value pair to the object. Throws an exception if the key is * already in use. Use set if you want to change an existing pair. * * @param {Object} obj The object to which to add the key-value pair. * @param {string} key The key to add. * @param {*} val The value to add. */ goog.object.add = function(obj, key, val) { if (key in obj) { throw Error('The object already contains the key "' + key + '"'); } goog.object.set(obj, key, val); }; /** * Returns the value for the given key. * * @param {Object} obj The object from which to get the value. * @param {string} key The key for which to get the value. * @param {*=} opt_val The value to return if no item is found for the given * key (default is undefined). * @return {*} The value for the given key. */ goog.object.get = function(obj, key, opt_val) { if (key in obj) { return obj[key]; } return opt_val; }; /** * Adds a key-value pair to the object/map/hash. * * @param {Object} obj The object to which to add the key-value pair. * @param {string} key The key to add. * @param {*} value The value to add. */ goog.object.set = function(obj, key, value) { obj[key] = value; }; /** * Adds a key-value pair to the object/map/hash if it doesn't exist yet. * * @param {Object} obj The object to which to add the key-value pair. * @param {string} key The key to add. * @param {*} value The value to add if the key wasn't present. * @return {*} The value of the entry at the end of the function. */ goog.object.setIfUndefined = function(obj, key, value) { return key in obj ? obj[key] : (obj[key] = value); }; /** * Does a flat clone of the object. * * @param {Object} obj Object to clone. * @return {!Object} Clone of the input object. */ goog.object.clone = function(obj) { // We cannot use the prototype trick because a lot of methods depend on where // the actual key is set. var res = {}; for (var key in obj) { res[key] = obj[key]; } return res; // We could also use goog.mixin but I wanted this to be independent from that. }; /** * Returns a new object in which all the keys and values are interchanged * (keys become values and values become keys). If multiple keys map to the * same value, the chosen transposed value is implementation-dependent. * * @param {Object} obj The object to transpose. * @return {!Object} The transposed object. */ goog.object.transpose = function(obj) { var transposed = {}; for (var key in obj) { transposed[obj[key]] = key; } return transposed; }; /** * The names of the fields that are defined on Object.prototype. * @type {Array.<string>} * @private */ goog.object.PROTOTYPE_FIELDS_ = [ 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf' ]; /** * Extends an object with another object. * This operates 'in-place'; it does not create a new Object. * * Example: * var o = {}; * goog.object.extend(o, {a: 0, b: 1}); * o; // {a: 0, b: 1} * goog.object.extend(o, {c: 2}); * o; // {a: 0, b: 1, c: 2} * * @param {Object} target The object to modify. * @param {...Object} var_args The objects from which values will be copied. */ goog.object.extend = function(target, var_args) { var key, source; for (var i = 1; i < arguments.length; i++) { source = arguments[i]; for (key in source) { target[key] = source[key]; } // For IE the for-in-loop does not contain any properties that are not // enumerable on the prototype object (for example isPrototypeOf from // Object.prototype) and it will also not include 'replace' on objects that // extend String and change 'replace' (not that it is common for anyone to // extend anything except Object). for (var j = 0; j < goog.object.PROTOTYPE_FIELDS_.length; j++) { key = goog.object.PROTOTYPE_FIELDS_[j]; if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } }; /** * Creates a new object built from the key-value pairs provided as arguments. * @param {...*} var_args If only one argument is provided and it is an array * then this is used as the arguments, otherwise even arguments are used as * the property names and odd arguments are used as the property values. * @return {!Object} The new object. * @throws {Error} If there are uneven number of arguments or there is only one * non array argument. */ goog.object.create = function(var_args) { var argLength = arguments.length; if (argLength == 1 && goog.isArray(arguments[0])) { return goog.object.create.apply(null, arguments[0]); } if (argLength % 2) { throw Error('Uneven number of arguments'); } var rv = {}; for (var i = 0; i < argLength; i += 2) { rv[arguments[i]] = arguments[i + 1]; } return rv; }; /** * Creates a new object where the property names come from the arguments but * the value is always set to true * @param {...*} var_args If only one argument is provided and it is an array * then this is used as the arguments, otherwise the arguments are used * as the property names. * @return {!Object} The new object. */ goog.object.createSet = function(var_args) { var argLength = arguments.length; if (argLength == 1 && goog.isArray(arguments[0])) { return goog.object.createSet.apply(null, arguments[0]); } var rv = {}; for (var i = 0; i < argLength; i++) { rv[arguments[i]] = true; } return rv; };
/************************************************************* * * MathJax/jax/output/HTML-CSS/entities/s.js * * Copyright (c) 2010-2016 The MathJax Consortium * * 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 (MATHML) { MathJax.Hub.Insert(MATHML.Parse.Entity,{ 'SHCHcy': '\u0429', 'SHcy': '\u0428', 'SOFTcy': '\u042C', 'Sacute': '\u015A', 'Sc': '\u2ABC', 'Scaron': '\u0160', 'Scedil': '\u015E', 'Scirc': '\u015C', 'Scy': '\u0421', 'ShortDownArrow': '\u2193', 'ShortLeftArrow': '\u2190', 'ShortRightArrow': '\u2192', 'ShortUpArrow': '\u2191', 'Sub': '\u22D0', 'Sup': '\u22D1', 'sacute': '\u015B', 'sbquo': '\u201A', 'sc': '\u227B', 'scE': '\u2AB4', 'scaron': '\u0161', 'sccue': '\u227D', 'sce': '\u2AB0', 'scedil': '\u015F', 'scirc': '\u015D', 'scpolint': '\u2A13', 'scsim': '\u227F', 'scy': '\u0441', 'sdotb': '\u22A1', 'sdote': '\u2A66', 'seArr': '\u21D8', 'searhk': '\u2925', 'searrow': '\u2198', 'semi': '\u003B', 'seswar': '\u2929', 'setminus': '\u2216', 'setmn': '\u2216', 'sext': '\u2736', 'sfrown': '\u2322', 'shchcy': '\u0449', 'shcy': '\u0448', 'shortmid': '\u2223', 'shortparallel': '\u2225', 'shy': '\u00AD', 'sigmaf': '\u03C2', 'sim': '\u223C', 'simdot': '\u2A6A', 'sime': '\u2243', 'simeq': '\u2243', 'simg': '\u2A9E', 'simgE': '\u2AA0', 'siml': '\u2A9D', 'simlE': '\u2A9F', 'simplus': '\u2A24', 'simrarr': '\u2972', 'slarr': '\u2190', 'smallsetminus': '\u2216', 'smashp': '\u2A33', 'smeparsl': '\u29E4', 'smid': '\u2223', 'smt': '\u2AAA', 'smte': '\u2AAC', 'smtes': '\u2AAC\uFE00', 'softcy': '\u044C', 'sol': '\u002F', 'solb': '\u29C4', 'solbar': '\u233F', 'spadesuit': '\u2660', 'spar': '\u2225', 'sqcap': '\u2293', 'sqcaps': '\u2293\uFE00', 'sqcup': '\u2294', 'sqcups': '\u2294\uFE00', 'sqsub': '\u228F', 'sqsube': '\u2291', 'sqsubset': '\u228F', 'sqsubseteq': '\u2291', 'sqsup': '\u2290', 'sqsupe': '\u2292', 'sqsupset': '\u2290', 'sqsupseteq': '\u2292', 'squ': '\u25A1', 'square': '\u25A1', 'squarf': '\u25AA', 'squf': '\u25AA', 'srarr': '\u2192', 'ssetmn': '\u2216', 'ssmile': '\u2323', 'sstarf': '\u22C6', 'star': '\u2606', 'starf': '\u2605', 'straightepsilon': '\u03F5', 'straightphi': '\u03D5', 'strns': '\u00AF', 'subdot': '\u2ABD', 'sube': '\u2286', 'subedot': '\u2AC3', 'submult': '\u2AC1', 'subplus': '\u2ABF', 'subrarr': '\u2979', 'subset': '\u2282', 'subseteq': '\u2286', 'subseteqq': '\u2AC5', 'subsetneq': '\u228A', 'subsetneqq': '\u2ACB', 'subsim': '\u2AC7', 'subsub': '\u2AD5', 'subsup': '\u2AD3', 'succ': '\u227B', 'succapprox': '\u2AB8', 'succcurlyeq': '\u227D', 'succeq': '\u2AB0', 'succnapprox': '\u2ABA', 'succneqq': '\u2AB6', 'succnsim': '\u22E9', 'succsim': '\u227F', 'sum': '\u2211', 'sung': '\u266A', 'sup': '\u2283', 'sup1': '\u00B9', 'sup2': '\u00B2', 'sup3': '\u00B3', 'supdot': '\u2ABE', 'supdsub': '\u2AD8', 'supe': '\u2287', 'supedot': '\u2AC4', 'suphsol': '\u27C9', 'suphsub': '\u2AD7', 'suplarr': '\u297B', 'supmult': '\u2AC2', 'supplus': '\u2AC0', 'supset': '\u2283', 'supseteq': '\u2287', 'supseteqq': '\u2AC6', 'supsetneq': '\u228B', 'supsetneqq': '\u2ACC', 'supsim': '\u2AC8', 'supsub': '\u2AD4', 'supsup': '\u2AD6', 'swArr': '\u21D9', 'swarhk': '\u2926', 'swarrow': '\u2199', 'swnwar': '\u292A', 'szlig': '\u00DF' }); MathJax.Ajax.loadComplete(MATHML.entityDir+"/s.js"); })(MathJax.InputJax.MathML);
// Characters [].:/ are reserved for track binding syntax. const _RESERVED_CHARS_RE = '\\[\\]\\.:\\/'; const _reservedRe = new RegExp( '[' + _RESERVED_CHARS_RE + ']', 'g' ); // Attempts to allow node names from any language. ES5's `\w` regexp matches // only latin characters, and the unicode \p{L} is not yet supported. So // instead, we exclude reserved characters and match everything else. const _wordChar = '[^' + _RESERVED_CHARS_RE + ']'; const _wordCharOrDot = '[^' + _RESERVED_CHARS_RE.replace( '\\.', '' ) + ']'; // Parent directories, delimited by '/' or ':'. Currently unused, but must // be matched to parse the rest of the track name. const _directoryRe = /((?:WC+[\/:])*)/.source.replace( 'WC', _wordChar ); // Target node. May contain word characters (a-zA-Z0-9_) and '.' or '-'. const _nodeRe = /(WCOD+)?/.source.replace( 'WCOD', _wordCharOrDot ); // Object on target node, and accessor. May not contain reserved // characters. Accessor may contain any character except closing bracket. const _objectRe = /(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace( 'WC', _wordChar ); // Property and accessor. May not contain reserved characters. Accessor may // contain any non-bracket characters. const _propertyRe = /\.(WC+)(?:\[(.+)\])?/.source.replace( 'WC', _wordChar ); const _trackRe = new RegExp( '' + '^' + _directoryRe + _nodeRe + _objectRe + _propertyRe + '$' ); const _supportedObjectNames = [ 'material', 'materials', 'bones' ]; class Composite { constructor( targetGroup, path, optionalParsedPath ) { const parsedPath = optionalParsedPath || PropertyBinding.parseTrackName( path ); this._targetGroup = targetGroup; this._bindings = targetGroup.subscribe_( path, parsedPath ); } getValue( array, offset ) { this.bind(); // bind all binding const firstValidIndex = this._targetGroup.nCachedObjects_, binding = this._bindings[ firstValidIndex ]; // and only call .getValue on the first if ( binding !== undefined ) binding.getValue( array, offset ); } setValue( array, offset ) { const bindings = this._bindings; for ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) { bindings[ i ].setValue( array, offset ); } } bind() { const bindings = this._bindings; for ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) { bindings[ i ].bind(); } } unbind() { const bindings = this._bindings; for ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) { bindings[ i ].unbind(); } } } // Note: This class uses a State pattern on a per-method basis: // 'bind' sets 'this.getValue' / 'setValue' and shadows the // prototype version of these methods with one that represents // the bound state. When the property is not found, the methods // become no-ops. class PropertyBinding { constructor( rootNode, path, parsedPath ) { this.path = path; this.parsedPath = parsedPath || PropertyBinding.parseTrackName( path ); this.node = PropertyBinding.findNode( rootNode, this.parsedPath.nodeName ) || rootNode; this.rootNode = rootNode; // initial state of these methods that calls 'bind' this.getValue = this._getValue_unbound; this.setValue = this._setValue_unbound; } static create( root, path, parsedPath ) { if ( ! ( root && root.isAnimationObjectGroup ) ) { return new PropertyBinding( root, path, parsedPath ); } else { return new PropertyBinding.Composite( root, path, parsedPath ); } } /** * Replaces spaces with underscores and removes unsupported characters from * node names, to ensure compatibility with parseTrackName(). * * @param {string} name Node name to be sanitized. * @return {string} */ static sanitizeNodeName( name ) { return name.replace( /\s/g, '_' ).replace( _reservedRe, '' ); } static parseTrackName( trackName ) { const matches = _trackRe.exec( trackName ); if ( ! matches ) { throw new Error( 'PropertyBinding: Cannot parse trackName: ' + trackName ); } const results = { // directoryName: matches[ 1 ], // (tschw) currently unused nodeName: matches[ 2 ], objectName: matches[ 3 ], objectIndex: matches[ 4 ], propertyName: matches[ 5 ], // required propertyIndex: matches[ 6 ] }; const lastDot = results.nodeName && results.nodeName.lastIndexOf( '.' ); if ( lastDot !== undefined && lastDot !== - 1 ) { const objectName = results.nodeName.substring( lastDot + 1 ); // Object names must be checked against an allowlist. Otherwise, there // is no way to parse 'foo.bar.baz': 'baz' must be a property, but // 'bar' could be the objectName, or part of a nodeName (which can // include '.' characters). if ( _supportedObjectNames.indexOf( objectName ) !== - 1 ) { results.nodeName = results.nodeName.substring( 0, lastDot ); results.objectName = objectName; } } if ( results.propertyName === null || results.propertyName.length === 0 ) { throw new Error( 'PropertyBinding: can not parse propertyName from trackName: ' + trackName ); } return results; } static findNode( root, nodeName ) { if ( ! nodeName || nodeName === '' || nodeName === '.' || nodeName === - 1 || nodeName === root.name || nodeName === root.uuid ) { return root; } // search into skeleton bones. if ( root.skeleton ) { const bone = root.skeleton.getBoneByName( nodeName ); if ( bone !== undefined ) { return bone; } } // search into node subtree. if ( root.children ) { const searchNodeSubtree = function ( children ) { for ( let i = 0; i < children.length; i ++ ) { const childNode = children[ i ]; if ( childNode.name === nodeName || childNode.uuid === nodeName ) { return childNode; } const result = searchNodeSubtree( childNode.children ); if ( result ) return result; } return null; }; const subTreeNode = searchNodeSubtree( root.children ); if ( subTreeNode ) { return subTreeNode; } } return null; } // these are used to "bind" a nonexistent property _getValue_unavailable() {} _setValue_unavailable() {} // Getters _getValue_direct( buffer, offset ) { buffer[ offset ] = this.targetObject[ this.propertyName ]; } _getValue_array( buffer, offset ) { const source = this.resolvedProperty; for ( let i = 0, n = source.length; i !== n; ++ i ) { buffer[ offset ++ ] = source[ i ]; } } _getValue_arrayElement( buffer, offset ) { buffer[ offset ] = this.resolvedProperty[ this.propertyIndex ]; } _getValue_toArray( buffer, offset ) { this.resolvedProperty.toArray( buffer, offset ); } // Direct _setValue_direct( buffer, offset ) { this.targetObject[ this.propertyName ] = buffer[ offset ]; } _setValue_direct_setNeedsUpdate( buffer, offset ) { this.targetObject[ this.propertyName ] = buffer[ offset ]; this.targetObject.needsUpdate = true; } _setValue_direct_setMatrixWorldNeedsUpdate( buffer, offset ) { this.targetObject[ this.propertyName ] = buffer[ offset ]; this.targetObject.matrixWorldNeedsUpdate = true; } // EntireArray _setValue_array( buffer, offset ) { const dest = this.resolvedProperty; for ( let i = 0, n = dest.length; i !== n; ++ i ) { dest[ i ] = buffer[ offset ++ ]; } } _setValue_array_setNeedsUpdate( buffer, offset ) { const dest = this.resolvedProperty; for ( let i = 0, n = dest.length; i !== n; ++ i ) { dest[ i ] = buffer[ offset ++ ]; } this.targetObject.needsUpdate = true; } _setValue_array_setMatrixWorldNeedsUpdate( buffer, offset ) { const dest = this.resolvedProperty; for ( let i = 0, n = dest.length; i !== n; ++ i ) { dest[ i ] = buffer[ offset ++ ]; } this.targetObject.matrixWorldNeedsUpdate = true; } // ArrayElement _setValue_arrayElement( buffer, offset ) { this.resolvedProperty[ this.propertyIndex ] = buffer[ offset ]; } _setValue_arrayElement_setNeedsUpdate( buffer, offset ) { this.resolvedProperty[ this.propertyIndex ] = buffer[ offset ]; this.targetObject.needsUpdate = true; } _setValue_arrayElement_setMatrixWorldNeedsUpdate( buffer, offset ) { this.resolvedProperty[ this.propertyIndex ] = buffer[ offset ]; this.targetObject.matrixWorldNeedsUpdate = true; } // HasToFromArray _setValue_fromArray( buffer, offset ) { this.resolvedProperty.fromArray( buffer, offset ); } _setValue_fromArray_setNeedsUpdate( buffer, offset ) { this.resolvedProperty.fromArray( buffer, offset ); this.targetObject.needsUpdate = true; } _setValue_fromArray_setMatrixWorldNeedsUpdate( buffer, offset ) { this.resolvedProperty.fromArray( buffer, offset ); this.targetObject.matrixWorldNeedsUpdate = true; } _getValue_unbound( targetArray, offset ) { this.bind(); this.getValue( targetArray, offset ); } _setValue_unbound( sourceArray, offset ) { this.bind(); this.setValue( sourceArray, offset ); } // create getter / setter pair for a property in the scene graph bind() { let targetObject = this.node; const parsedPath = this.parsedPath; const objectName = parsedPath.objectName; const propertyName = parsedPath.propertyName; let propertyIndex = parsedPath.propertyIndex; if ( ! targetObject ) { targetObject = PropertyBinding.findNode( this.rootNode, parsedPath.nodeName ) || this.rootNode; this.node = targetObject; } // set fail state so we can just 'return' on error this.getValue = this._getValue_unavailable; this.setValue = this._setValue_unavailable; // ensure there is a value node if ( ! targetObject ) { console.error( 'THREE.PropertyBinding: Trying to update node for track: ' + this.path + ' but it wasn\'t found.' ); return; } if ( objectName ) { let objectIndex = parsedPath.objectIndex; // special cases were we need to reach deeper into the hierarchy to get the face materials.... switch ( objectName ) { case 'materials': if ( ! targetObject.material ) { console.error( 'THREE.PropertyBinding: Can not bind to material as node does not have a material.', this ); return; } if ( ! targetObject.material.materials ) { console.error( 'THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.', this ); return; } targetObject = targetObject.material.materials; break; case 'bones': if ( ! targetObject.skeleton ) { console.error( 'THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.', this ); return; } // potential future optimization: skip this if propertyIndex is already an integer // and convert the integer string to a true integer. targetObject = targetObject.skeleton.bones; // support resolving morphTarget names into indices. for ( let i = 0; i < targetObject.length; i ++ ) { if ( targetObject[ i ].name === objectIndex ) { objectIndex = i; break; } } break; default: if ( targetObject[ objectName ] === undefined ) { console.error( 'THREE.PropertyBinding: Can not bind to objectName of node undefined.', this ); return; } targetObject = targetObject[ objectName ]; } if ( objectIndex !== undefined ) { if ( targetObject[ objectIndex ] === undefined ) { console.error( 'THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.', this, targetObject ); return; } targetObject = targetObject[ objectIndex ]; } } // resolve property const nodeProperty = targetObject[ propertyName ]; if ( nodeProperty === undefined ) { const nodeName = parsedPath.nodeName; console.error( 'THREE.PropertyBinding: Trying to update property for track: ' + nodeName + '.' + propertyName + ' but it wasn\'t found.', targetObject ); return; } // determine versioning scheme let versioning = this.Versioning.None; this.targetObject = targetObject; if ( targetObject.needsUpdate !== undefined ) { // material versioning = this.Versioning.NeedsUpdate; } else if ( targetObject.matrixWorldNeedsUpdate !== undefined ) { // node transform versioning = this.Versioning.MatrixWorldNeedsUpdate; } // determine how the property gets bound let bindingType = this.BindingType.Direct; if ( propertyIndex !== undefined ) { // access a sub element of the property array (only primitives are supported right now) if ( propertyName === 'morphTargetInfluences' ) { // potential optimization, skip this if propertyIndex is already an integer, and convert the integer string to a true integer. // support resolving morphTarget names into indices. if ( ! targetObject.geometry ) { console.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.', this ); return; } if ( targetObject.geometry.isBufferGeometry ) { if ( ! targetObject.geometry.morphAttributes ) { console.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.', this ); return; } if ( targetObject.morphTargetDictionary[ propertyIndex ] !== undefined ) { propertyIndex = targetObject.morphTargetDictionary[ propertyIndex ]; } } else { console.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.', this ); return; } } bindingType = this.BindingType.ArrayElement; this.resolvedProperty = nodeProperty; this.propertyIndex = propertyIndex; } else if ( nodeProperty.fromArray !== undefined && nodeProperty.toArray !== undefined ) { // must use copy for Object3D.Euler/Quaternion bindingType = this.BindingType.HasFromToArray; this.resolvedProperty = nodeProperty; } else if ( Array.isArray( nodeProperty ) ) { bindingType = this.BindingType.EntireArray; this.resolvedProperty = nodeProperty; } else { this.propertyName = propertyName; } // select getter / setter this.getValue = this.GetterByBindingType[ bindingType ]; this.setValue = this.SetterByBindingTypeAndVersioning[ bindingType ][ versioning ]; } unbind() { this.node = null; // back to the prototype version of getValue / setValue // note: avoiding to mutate the shape of 'this' via 'delete' this.getValue = this._getValue_unbound; this.setValue = this._setValue_unbound; } } PropertyBinding.Composite = Composite; PropertyBinding.prototype.BindingType = { Direct: 0, EntireArray: 1, ArrayElement: 2, HasFromToArray: 3 }; PropertyBinding.prototype.Versioning = { None: 0, NeedsUpdate: 1, MatrixWorldNeedsUpdate: 2 }; PropertyBinding.prototype.GetterByBindingType = [ PropertyBinding.prototype._getValue_direct, PropertyBinding.prototype._getValue_array, PropertyBinding.prototype._getValue_arrayElement, PropertyBinding.prototype._getValue_toArray, ]; PropertyBinding.prototype.SetterByBindingTypeAndVersioning = [ [ // Direct PropertyBinding.prototype._setValue_direct, PropertyBinding.prototype._setValue_direct_setNeedsUpdate, PropertyBinding.prototype._setValue_direct_setMatrixWorldNeedsUpdate, ], [ // EntireArray PropertyBinding.prototype._setValue_array, PropertyBinding.prototype._setValue_array_setNeedsUpdate, PropertyBinding.prototype._setValue_array_setMatrixWorldNeedsUpdate, ], [ // ArrayElement PropertyBinding.prototype._setValue_arrayElement, PropertyBinding.prototype._setValue_arrayElement_setNeedsUpdate, PropertyBinding.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate, ], [ // HasToFromArray PropertyBinding.prototype._setValue_fromArray, PropertyBinding.prototype._setValue_fromArray_setNeedsUpdate, PropertyBinding.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate, ] ]; export { PropertyBinding };
var usage = require('../'); var pid = (process.argv[2])? parseInt(process.argv[2]): process.pid; setInterval(function() { var options = { keepHistory: true }; usage.lookup(pid, options, function(err, stat) { console.log(err, stat); }); }, 2000);
//used for the media picker dialog angular.module("umbraco").controller("Umbraco.Dialogs.LinkPickerController", function ($scope, eventsService, dialogService, entityResource, contentResource, mediaHelper, userService, localizationService, tinyMceService) { var dialogOptions = $scope.dialogOptions; var searchText = "Search..."; localizationService.localize("general_search").then(function (value) { searchText = value + "..."; }); $scope.dialogTreeEventHandler = $({}); $scope.target = {}; $scope.searchInfo = { searchFromId: null, searchFromName: null, showSearch: false, results: [], selectedSearchResults: [] } if (dialogOptions.currentTarget) { $scope.target = dialogOptions.currentTarget; //if we have a node ID, we fetch the current node to build the form data if ($scope.target.id || $scope.target.udi) { var id = $scope.target.udi ? $scope.target.udi : $scope.target.id; if (!$scope.target.path) { entityResource.getPath(id, "Document").then(function (path) { $scope.target.path = path; //now sync the tree to this path $scope.dialogTreeEventHandler.syncTree({ path: $scope.target.path, tree: "content" }); }); } // if a link exists, get the properties to build the anchor name list contentResource.getById(id).then(function (resp) { $scope.anchorValues = tinyMceService.getAnchorNames(JSON.stringify(resp.properties)); $scope.target.url = resp.urls[0]; }); } else if ($scope.target.url.length) { // a url but no id/udi indicates an external link - trim the url to remove the anchor/qs // only do the substring if there's a # or a ? var indexOfAnchor = $scope.target.url.search(/(#|\?)/); if (indexOfAnchor > -1) { // populate the anchor $scope.target.anchor = $scope.target.url.substring(indexOfAnchor); // then rewrite the model and populate the link $scope.target.url = $scope.target.url.substring(0, indexOfAnchor); } } } if (dialogOptions.anchors) { $scope.anchorValues = dialogOptions.anchors; } function nodeSelectHandler(ev, args) { args.event.preventDefault(); args.event.stopPropagation(); if (args.node.metaData.listViewNode) { //check if list view 'search' node was selected $scope.searchInfo.showSearch = true; $scope.searchInfo.searchFromId = args.node.metaData.listViewNode.id; $scope.searchInfo.searchFromName = args.node.metaData.listViewNode.name; } else { eventsService.emit("dialogs.linkPicker.select", args); if ($scope.currentNode) { //un-select if there's a current one selected $scope.currentNode.selected = false; } $scope.currentNode = args.node; $scope.currentNode.selected = true; $scope.target.id = args.node.id; $scope.target.udi = args.node.udi; $scope.target.name = args.node.name; if (args.node.id < 0) { $scope.target.url = "/"; } else { contentResource.getById(args.node.id).then(function (resp) { $scope.anchorValues = tinyMceService.getAnchorNames(JSON.stringify(resp.properties)); $scope.target.url = resp.urls[0]; }); } if (!angular.isUndefined($scope.target.isMedia)) { delete $scope.target.isMedia; } } } function nodeExpandedHandler(ev, args) { if (angular.isArray(args.children)) { //iterate children _.each(args.children, function (child) { //check if any of the items are list views, if so we need to add a custom // child: A node to activate the search if (child.metaData.isContainer) { child.hasChildren = true; child.children = [ { level: child.level + 1, hasChildren: false, name: searchText, metaData: { listViewNode: child }, cssClass: "icon umb-tree-icon sprTree icon-search", cssClasses: ["not-published"] } ]; } }); } } $scope.switchToMediaPicker = function () { userService.getCurrentUser().then(function (userData) { dialogService.mediaPicker({ startNodeId: userData.startMediaIds.length == 0 ? -1 : userData.startMediaIds[0], callback: function (media) { $scope.target.id = media.id; $scope.target.isMedia = true; $scope.target.name = media.name; $scope.target.url = mediaHelper.resolveFile(media); } }); }); }; $scope.hideSearch = function () { $scope.searchInfo.showSearch = false; $scope.searchInfo.searchFromId = null; $scope.searchInfo.searchFromName = null; $scope.searchInfo.results = []; } // method to select a search result $scope.selectResult = function (evt, result) { result.selected = result.selected === true ? false : true; nodeSelectHandler(evt, { event: evt, node: result }); }; //callback when there are search results $scope.onSearchResults = function (results) { $scope.searchInfo.results = results; $scope.searchInfo.showSearch = true; }; $scope.dialogTreeEventHandler.bind("treeNodeSelect", nodeSelectHandler); $scope.dialogTreeEventHandler.bind("treeNodeExpanded", nodeExpandedHandler); $scope.$on('$destroy', function () { $scope.dialogTreeEventHandler.unbind("treeNodeSelect", nodeSelectHandler); $scope.dialogTreeEventHandler.unbind("treeNodeExpanded", nodeExpandedHandler); }); });
var fs = require('fs'); var ProtoBuf = require("protobufjs"); var builder = ProtoBuf.loadProtoFile(__dirname + "/cast_channel.proto"); var extensions = builder.build('extensions.api.cast_channel'); var messages = [ 'CastMessage', 'AuthChallenge', 'AuthResponse', 'AuthError', 'DeviceAuthMessage' ]; messages.forEach(function(message) { module.exports[message] = { serialize: function(data) { var msg = new extensions[message](data); return msg.encode().toBuffer(); }, parse: function(data) { return extensions[message].decode(data); } }; });
(function(a){a.fn.Touchdown=function(){return this.each(function(){$this=a(this);var b=$this.parents().length,c=$this.find("a"),d="Navigate",e;if($this.attr("title")){d=$this.attr("title")}e+='<option value="">'+d+"</option>";for(var f=0;f<c.length;f++){var g=a(c[f]),h=(g.parents().length-b)/2-1,i="";while(h>0){i+="  ";h--}e+='<option value="'+g.attr("href")+'">'+i+g.text()+"</option>"}$this.addClass("touchdown-list").after('<select class="touchdown"> '+e+"</select>");$this.next("select").change(function(){window.location=a(this).val()})})}})(jQuery)
'use strict'; var Promise = require('../ext/promise'); var EOL = require('os').EOL; var chalk = require('chalk'); var writeError = require('./write-error'); var DEFAULT_WRITE_LEVEL = 'INFO'; // Note: You should use `ui.outputStream`, `ui.inputStream` and `ui.write()` // instead of `process.stdout` and `console.log`. // Thus the pleasant progress indicator automatically gets // interrupted and doesn't mess up the output! -> Convenience :P module.exports = UI; /* @constructor The UI provides the CLI with a unified mechanism for providing output and requesting input from the user. This becomes useful when wanting to adjust logLevels, or mock input/output for tests. new UI({ inputStream: process.stdin, outputStream: process.stdout, writeLevel: 'DEBUG' | 'INFO' | 'WARNING' | 'ERROR', ci: true | false }); **/ function UI(options) { // Output stream this.outputStream = options.outputStream; this.inputStream = options.inputStream; this.errorStream = options.errorStream; this.errorLog = options.errorLog || []; this.writeLevel = options.writeLevel || DEFAULT_WRITE_LEVEL; this.ci = !!options.ci; } /** Unified mechanism to write a string to the console. Optionally include a writeLevel, this is used to decide if the specific logging mechanism should or should not be printed. @method write @param {String} data @param {Number} writeLevel */ UI.prototype.write = function(data, writeLevel) { if (writeLevel === 'ERROR') { this.errorStream.write(data); } else if (this.writeLevelVisible(writeLevel)) { this.outputStream.write(data); } }; /** Unified mechanism to write a string and new line to the console. Optionally include a writeLevel, this is used to decide if the specific logging mechanism should or should not be printed. @method writeLine @param {String} data @param {Number} writeLevel */ UI.prototype.writeLine = function(data, writeLevel) { this.write(data + EOL, writeLevel); }; /** Helper method to write a string with the DEBUG writeLevel and gray chalk @method writeDebugLine @param {String} data */ UI.prototype.writeDebugLine = function(data) { this.writeLine(chalk.gray(data), 'DEBUG'); }; /** Helper method to write a string with the INFO writeLevel and cyan chalk @method writeInfoLine @param {String} data */ UI.prototype.writeInfoLine = function(data) { this.writeLine(chalk.cyan(data), 'INFO'); }; /** Helper method to write a string with the WARNING writeLevel and yellow chalk. Optionally include a test. If falsy, the warning will be printed. By default, warnings will be prepended with WARNING text when printed. @method writeWarnLine @param {String} data @param {Boolean} test @param {Boolean} prepend */ UI.prototype.writeWarnLine = function(data, test, prepend) { if (test) { return; } data = this.prependLine('WARNING', data, prepend); this.writeLine(chalk.yellow(data), 'WARNING', test); }; /** Helper method to write a string with the WARNING writeLevel and yellow chalk. Optionally include a test. If falsy, the deprecation will be printed. By default deprecations will be prepended with DEPRECATION text when printed. @method writeDeprecateLine @param {String} data @param {Boolean} test @param {Boolean} prepend */ UI.prototype.writeDeprecateLine = function(data, test, prepend) { data = this.prependLine('DEPRECATION', data, prepend); this.writeWarnLine(data, test, false); }; /** Utility method to prepend a line with a flag-like string (i.e., WARNING). @method prependLine @param {String} prependData @param {String} data @param {Boolean} prepend */ UI.prototype.prependLine = function(prependData, data, prepend) { if (typeof prepend === 'undefined' || prepend) { data = prependData + ': ' + data; } return data; }; /** Unified mechanism to an Error to the console. This will occure at a writeLevel of ERROR @method writeError @param {Error} error */ UI.prototype.writeError = function(error) { writeError(this, error); }; /** Sets the write level for the UI. Valid write levels are 'DEBUG', 'INFO', 'WARNING', and 'ERROR'. @method setWriteLevel @param {String} level */ UI.prototype.setWriteLevel = function(level) { if (Object.keys(this.WRITE_LEVELS).indexOf(level) === -1) { throw new Error('Unknown write level. Valid values are \'DEBUG\', \'INFO\', \'WARNING\', and \'ERROR\'.'); } this.writeLevel = level; }; UI.prototype.startProgress = function(message/*, stepString*/) { if (this.writeLevelVisible('INFO')) { this.writeLine(message); } }; UI.prototype.stopProgress = function() { }; UI.prototype.prompt = function(questions, callback) { var inquirer = require('inquirer'); // If no callback was provided, automatically return a promise if (callback) { inquirer.prompt(questions, callback); } else { return new Promise(function(resolve) { inquirer.prompt(questions, resolve); }); } }; /** @property WRITE_LEVELS @private @type Object */ UI.prototype.WRITE_LEVELS = { 'DEBUG': 1, 'INFO': 2, 'WARNING': 3, 'ERROR': 4 }; /** Whether or not the specified write level should be printed by this UI. @method writeLevelVisible @private @param {String} writeLevel @return {Boolean} */ UI.prototype.writeLevelVisible = function(writeLevel) { var levels = this.WRITE_LEVELS; writeLevel = writeLevel || DEFAULT_WRITE_LEVEL; return levels[writeLevel] >= levels[this.writeLevel]; };
(function() { "use strict"; var root = this; var Chart = root.Chart; var helpers = Chart.helpers; Chart.Bar = function(context, config) { config.type = 'bar'; return new Chart(context, config); }; }).call(this);
/* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ 'use strict'; const msRest = require('ms-rest'); const msRestAzure = require('ms-rest-azure'); const WebResource = msRest.WebResource; /** * Gets the current usage count and the limit for the resources under the * subscription. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} callback - The callback. * * @returns {function} callback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. * See {@link UsageListResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ function _list(options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { callback = options; options = null; } if (!callback) { throw new Error('callback cannot be null.'); } // Validate try { if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } } catch (error) { return callback(error); } // Construct URL let baseUrl = this.client.baseUri; let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.Storage/usages'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } // Create HTTP transport objects let httpRequest = new WebResource(); httpRequest.method = 'GET'; httpRequest.headers = {}; httpRequest.url = requestUrl; // Set Headers if (this.client.generateClientRequestId) { httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); } if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { httpRequest.headers['accept-language'] = this.client.acceptLanguage; } if(options) { for(let headerName in options['customHeaders']) { if (options['customHeaders'].hasOwnProperty(headerName)) { httpRequest.headers[headerName] = options['customHeaders'][headerName]; } } } httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; httpRequest.body = null; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; if (statusCode !== 200) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); error.response = msRest.stripResponse(response); if (responseBody === '') responseBody = null; let parsedErrorResponse; try { parsedErrorResponse = JSON.parse(responseBody); if (parsedErrorResponse) { if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; } if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { let resultMapper = new client.models['CloudError']().mapper(); error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); } } catch (defaultError) { error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + `- "${responseBody}" for the default response.`; return callback(error); } return callback(error); } // Create Result let result = null; if (responseBody === '') responseBody = null; // Deserialize Response if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { let resultMapper = new client.models['UsageListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); deserializationError.request = msRest.stripRequest(httpRequest); deserializationError.response = msRest.stripResponse(response); return callback(deserializationError); } } return callback(null, result, httpRequest, response); }); } /** * @class * UsageOperations * __NOTE__: An instance of this class is automatically created for an * instance of the StorageManagementClient. * Initializes a new instance of the UsageOperations class. * @constructor * * @param {StorageManagementClient} client Reference to the service client. */ class UsageOperations { constructor(client) { this.client = client; this._list = _list; } /** * Gets the current usage count and the limit for the resources under the * subscription. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * * @resolve {HttpOperationResponse<UsageListResult>} - The deserialized result object. * * @reject {Error} - The error object. */ listWithHttpOperationResponse(options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { self._list(options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } else { resolve(httpOperationResponse); } return; }); }); } /** * Gets the current usage count and the limit for the resources under the * subscription. * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @param {function} [optionalCallback] - The optional callback. * * @returns {function|Promise} If a callback was passed as the last parameter * then it returns the callback else returns a Promise. * * {Promise} A promise is returned * * @resolve {UsageListResult} - The deserialized result object. * * @reject {Error} - The error object. * * {function} optionalCallback(err, result, request, response) * * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. * See {@link UsageListResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ list(options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { optionalCallback = options; options = null; } if (!optionalCallback) { return new Promise((resolve, reject) => { self._list(options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { return self._list(options, optionalCallback); } } } module.exports = UsageOperations;
iD.debug = true; mocha.setup({ ui: 'bdd', globals: [ '__onresize.tail-size', '__onmousemove.zoom', '__onmouseup.zoom', '__onkeydown.select', '__onkeyup.select', '__onclick.draw', '__onclick.draw-block' ] }); var expect = chai.expect; chai.use(function (chai, utils) { var flag = utils.flag; chai.Assertion.addMethod('classed', function (className) { this.assert( flag(this, 'object').classed(className) , 'expected #{this} to be classed #{exp}' , 'expected #{this} not to be classed #{exp}' , className ); }); });
"use strict"; var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.styles = void 0; var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")); var React = _interopRequireWildcard(require("react")); var _propTypes = _interopRequireDefault(require("prop-types")); var _clsx = _interopRequireDefault(require("clsx")); var _formControlState = _interopRequireDefault(require("../FormControl/formControlState")); var _useFormControl = _interopRequireDefault(require("../FormControl/useFormControl")); var _withStyles = _interopRequireDefault(require("../styles/withStyles")); var _FormLabel = _interopRequireDefault(require("../FormLabel")); var styles = function styles(theme) { return { /* Styles applied to the root element. */ root: { display: 'block', transformOrigin: 'top left' }, /* Pseudo-class applied to the root element if `focused={true}`. */ focused: {}, /* Pseudo-class applied to the root element if `disabled={true}`. */ disabled: {}, /* Pseudo-class applied to the root element if `error={true}`. */ error: {}, /* Pseudo-class applied to the root element if `required={true}`. */ required: {}, /* Pseudo-class applied to the asterisk element. */ asterisk: {}, /* Styles applied to the root element if the component is a descendant of `FormControl`. */ formControl: { position: 'absolute', left: 0, top: 0, // slight alteration to spec spacing to match visual spec result transform: 'translate(0, 24px) scale(1)' }, /* Styles applied to the root element if `margin="dense"`. */ marginDense: { // Compensation for the `Input.inputDense` style. transform: 'translate(0, 21px) scale(1)' }, /* Styles applied to the `input` element if `shrink={true}`. */ shrink: { transform: 'translate(0, 1.5px) scale(0.75)', transformOrigin: 'top left' }, /* Styles applied to the `input` element if `disableAnimation={false}`. */ animated: { transition: theme.transitions.create(['color', 'transform'], { duration: theme.transitions.duration.shorter, easing: theme.transitions.easing.easeOut }) }, /* Styles applied to the root element if `variant="filled"`. */ filled: { // Chrome's autofill feature gives the input field a yellow background. // Since the input field is behind the label in the HTML tree, // the input field is drawn last and hides the label with an opaque background color. // zIndex: 1 will raise the label above opaque background-colors of input. zIndex: 1, pointerEvents: 'none', transform: 'translate(12px, 20px) scale(1)', '&$marginDense': { transform: 'translate(12px, 17px) scale(1)' }, '&$shrink': { transform: 'translate(12px, 10px) scale(0.75)', '&$marginDense': { transform: 'translate(12px, 7px) scale(0.75)' } } }, /* Styles applied to the root element if `variant="outlined"`. */ outlined: { // see comment above on filled.zIndex zIndex: 1, pointerEvents: 'none', transform: 'translate(14px, 20px) scale(1)', '&$marginDense': { transform: 'translate(14px, 12px) scale(1)' }, '&$shrink': { transform: 'translate(14px, -6px) scale(0.75)' } } }; }; exports.styles = styles; var InputLabel = React.forwardRef(function InputLabel(props, ref) { var classes = props.classes, className = props.className, _props$disableAnimati = props.disableAnimation, disableAnimation = _props$disableAnimati === void 0 ? false : _props$disableAnimati, margin = props.margin, shrinkProp = props.shrink, variant = props.variant, other = (0, _objectWithoutProperties2.default)(props, ["classes", "className", "disableAnimation", "margin", "shrink", "variant"]); var muiFormControl = (0, _useFormControl.default)(); var shrink = shrinkProp; if (typeof shrink === 'undefined' && muiFormControl) { shrink = muiFormControl.filled || muiFormControl.focused || muiFormControl.adornedStart; } var fcs = (0, _formControlState.default)({ props: props, muiFormControl: muiFormControl, states: ['margin', 'variant'] }); return /*#__PURE__*/React.createElement(_FormLabel.default, (0, _extends2.default)({ "data-shrink": shrink, className: (0, _clsx.default)(classes.root, className, muiFormControl && classes.formControl, !disableAnimation && classes.animated, shrink && classes.shrink, fcs.margin === 'dense' && classes.marginDense, { 'filled': classes.filled, 'outlined': classes.outlined }[fcs.variant]), classes: { focused: classes.focused, disabled: classes.disabled, error: classes.error, required: classes.required, asterisk: classes.asterisk }, ref: ref }, other)); }); process.env.NODE_ENV !== "production" ? InputLabel.propTypes = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | // | To update them edit the d.ts file and run "yarn proptypes" | // ---------------------------------------------------------------------- /** * The contents of the `InputLabel`. */ children: _propTypes.default.node, /** * Override or extend the styles applied to the component. * See [CSS API](#css) below for more details. */ classes: _propTypes.default.object, /** * @ignore */ className: _propTypes.default.string, /** * The color of the component. It supports those theme colors that make sense for this component. */ color: _propTypes.default.oneOf(['primary', 'secondary']), /** * If `true`, the transition animation is disabled. */ disableAnimation: _propTypes.default.bool, /** * If `true`, apply disabled class. */ disabled: _propTypes.default.bool, /** * If `true`, the label will be displayed in an error state. */ error: _propTypes.default.bool, /** * If `true`, the input of this label is focused. */ focused: _propTypes.default.bool, /** * If `dense`, will adjust vertical spacing. This is normally obtained via context from * FormControl. */ margin: _propTypes.default.oneOf(['dense']), /** * if `true`, the label will indicate that the input is required. */ required: _propTypes.default.bool, /** * If `true`, the label is shrunk. */ shrink: _propTypes.default.bool, /** * The variant to use. */ variant: _propTypes.default.oneOf(['filled', 'outlined', 'standard']) } : void 0; var _default = (0, _withStyles.default)(styles, { name: 'MuiInputLabel' })(InputLabel); exports.default = _default;
import './waves.css'; const vueWaves = {}; vueWaves.install = (Vue, options = {}) => { Vue.directive('waves', { bind(el, binding) { el.addEventListener('click', e => { const customOpts = Object.assign(options, binding.value); const opts = Object.assign({ ele: el, // 波纹作用元素 type: 'hit', // hit点击位置扩散center中心点扩展 color: 'rgba(0, 0, 0, 0.15)' // 波纹颜色 }, customOpts), target = opts.ele; if (target) { target.style.position = 'relative'; target.style.overflow = 'hidden'; const rect = target.getBoundingClientRect(); let ripple = target.querySelector('.waves-ripple'); if (!ripple) { ripple = document.createElement('span'); ripple.className = 'waves-ripple'; ripple.style.height = ripple.style.width = Math.max(rect.width, rect.height) + 'px'; target.appendChild(ripple); } else { ripple.className = 'waves-ripple'; } switch (opts.type) { case 'center': ripple.style.top = (rect.height / 2 - ripple.offsetHeight / 2) + 'px'; ripple.style.left = (rect.width / 2 - ripple.offsetWidth / 2) + 'px'; break; default: ripple.style.top = (e.pageY - rect.top - ripple.offsetHeight / 2 - document.body.scrollTop) + 'px'; ripple.style.left = (e.pageX - rect.left - ripple.offsetWidth / 2 - document.body.scrollLeft) + 'px'; } ripple.style.backgroundColor = opts.color; ripple.className = 'waves-ripple z-active'; return false; } }, false); } }) }; export default vueWaves;
// This file was automatically generated. Do not modify. 'use strict'; goog.provide('Blockly.Msg.is'); goog.require('Blockly.Msg'); Blockly.Msg.ADD_COMMENT = "Skrifa skýringu"; Blockly.Msg.AUTH = "Please authorize this app to enable your work to be saved and to allow it to be shared by you."; // untranslated Blockly.Msg.CHANGE_VALUE_TITLE = "Breyta gildi:"; Blockly.Msg.CHAT = "Chat with your collaborator by typing in this box!"; // untranslated Blockly.Msg.COLLAPSE_ALL = "Loka kubbum"; Blockly.Msg.COLLAPSE_BLOCK = "Loka kubbi"; Blockly.Msg.COLOUR_BLEND_COLOUR1 = "litur 1"; Blockly.Msg.COLOUR_BLEND_COLOUR2 = "litur 2"; Blockly.Msg.COLOUR_BLEND_HELPURL = "http://meyerweb.com/eric/tools/color-blend/"; // untranslated Blockly.Msg.COLOUR_BLEND_RATIO = "hlutfall"; Blockly.Msg.COLOUR_BLEND_TITLE = "blöndun"; Blockly.Msg.COLOUR_BLEND_TOOLTIP = "Blandar tveimur litum í gefnu hlutfalli (0.0 - 1.0)."; Blockly.Msg.COLOUR_PICKER_HELPURL = "https://en.wikipedia.org/wiki/Color"; Blockly.Msg.COLOUR_PICKER_TOOLTIP = "Velja lit úr litakorti."; Blockly.Msg.COLOUR_RANDOM_HELPURL = "http://randomcolour.com"; // untranslated Blockly.Msg.COLOUR_RANDOM_TITLE = "einhver litur"; Blockly.Msg.COLOUR_RANDOM_TOOLTIP = "Velja einhvern lit af handahófi."; Blockly.Msg.COLOUR_RGB_BLUE = "blátt"; Blockly.Msg.COLOUR_RGB_GREEN = "grænt"; Blockly.Msg.COLOUR_RGB_HELPURL = "http://www.december.com/html/spec/colorper.html"; // untranslated Blockly.Msg.COLOUR_RGB_RED = "rautt"; Blockly.Msg.COLOUR_RGB_TITLE = "litur"; Blockly.Msg.COLOUR_RGB_TOOLTIP = "Búa til lit úr tilteknu magni af rauðu, grænu og bláu. Allar tölurnar verða að vera á bilinu 0 til 100."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://code.google.com/p/blockly/wiki/Loops#Loop_Termination_Blocks"; // untranslated Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "fara út úr lykkju"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "fara beint í næstu umferð lykkjunnar"; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Fara út úr umlykjandi lykkju."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Sleppa afganginum af lykkjunni og fara beint í næstu umferð hennar."; Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Aðvörun: Þennan kubb má aðeins nota innan lykkju."; Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://code.google.com/p/blockly/wiki/Loops#for_each for each block"; // untranslated Blockly.Msg.CONTROLS_FOREACH_INPUT_INLIST = "í lista"; Blockly.Msg.CONTROLS_FOREACH_INPUT_INLIST_TAIL = ""; // untranslated Blockly.Msg.CONTROLS_FOREACH_INPUT_ITEM = "fyrir hvert"; Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Fyrir hvert atriði í lista er breyta '%1' stillt á atriðið og skipanir gerðar."; Blockly.Msg.CONTROLS_FOR_HELPURL = "https://code.google.com/p/blockly/wiki/Loops#count_with"; // untranslated Blockly.Msg.CONTROLS_FOR_INPUT_FROM_TO_BY = "frá %1 til %2 um %3"; Blockly.Msg.CONTROLS_FOR_INPUT_WITH = "telja með"; Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Láta breytuna %1 taka inn gildi frá fyrstu tölu til síðustu tölu hlaupandi á bilinu og endurtaka kubbana fyrir hverja tölu."; Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Bæta skilyrði við EF kubbinn."; Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Bæta við hluta EF kubbs sem grípur öll tilfelli sem uppfylla ekki hin skilyrðin."; Blockly.Msg.CONTROLS_IF_HELPURL = "https://code.google.com/p/blockly/wiki/If_Then"; // untranslated Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Bæta við, fjarlægja eða umraða til að breyta skipan þessa EF kubbs."; Blockly.Msg.CONTROLS_IF_MSG_ELSE = "annars"; Blockly.Msg.CONTROLS_IF_MSG_ELSEIF = "annars ef"; Blockly.Msg.CONTROLS_IF_MSG_IF = "ef"; Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Ef gildi er satt skal gera einhverjar skipanir."; Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Ef gildi er satt skal gera skipanir í fyrri kubbnum. Annars skal gera skipanir í seinni kubbnum."; Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Ef fyrra gildið er satt skal gera skipanir í fyrri kubbnum. Annars, ef seinna gildið er satt, þá skal gera skipanir í seinni kubbnum."; Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Ef fyrra gildið er satt skal gera skipanir í fyrri kubbnum. Annars, ef seinna gildið er satt, skal gera skipanir í seinni kubbnum. Ef hvorugt gildið er satt, skal gera skipanir í síðasta kubbnum."; Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop"; Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "gera"; Blockly.Msg.CONTROLS_REPEAT_TITLE = "endurtaka %1 sinnum"; Blockly.Msg.CONTROLS_REPEAT_TITLE_REPEAT = "endurtaka"; Blockly.Msg.CONTROLS_REPEAT_TITLE_TIMES = "sinnum"; Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Gera eitthvað aftur og aftur."; Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://code.google.com/p/blockly/wiki/Repeat"; // untranslated Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "endurtaka þar til"; Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "endurtaka á meðan"; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Endurtaka eitthvað á meðan gildi er ósatt."; Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Endurtaka eitthvað á meðan gildi er satt."; Blockly.Msg.DELETE_BLOCK = "Eyða kubbi"; Blockly.Msg.DELETE_X_BLOCKS = "Eyða %1 kubbum"; Blockly.Msg.DISABLE_BLOCK = "Óvirkja kubb"; Blockly.Msg.DUPLICATE_BLOCK = "Afrita"; Blockly.Msg.ENABLE_BLOCK = "Virkja kubb"; Blockly.Msg.EXPAND_ALL = "Opna kubba"; Blockly.Msg.EXPAND_BLOCK = "Opna kubb"; Blockly.Msg.EXTERNAL_INPUTS = "Ytri inntök"; Blockly.Msg.HELP = "Hjálp"; Blockly.Msg.INLINE_INPUTS = "Innri inntök"; Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://en.wikipedia.org/wiki/Linked_list#Empty_lists"; // untranslated Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "búa til tóman lista"; Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Skilar lista með lengdina 0 án gagna"; Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD = "listi"; Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP = "Bæta við, fjarlægja eða umraða hlutum til að breyta skipan þessa listakubbs."; Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH = "búa til lista með"; Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP = "Bæta atriði við listann."; Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP = "Búa til lista með einhverjum fjölda atriða."; Blockly.Msg.LISTS_GET_INDEX_FIRST = "fyrsta"; Blockly.Msg.LISTS_GET_INDEX_FROM_END = "# frá enda"; Blockly.Msg.LISTS_GET_INDEX_FROM_START = "#"; // untranslated Blockly.Msg.LISTS_GET_INDEX_GET = "sækja"; Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE = "sækja og fjarlægja"; Blockly.Msg.LISTS_GET_INDEX_LAST = "síðasta"; Blockly.Msg.LISTS_GET_INDEX_RANDOM = "eitthvert"; Blockly.Msg.LISTS_GET_INDEX_REMOVE = "fjarlægja"; Blockly.Msg.LISTS_GET_INDEX_TAIL = ""; // untranslated Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST = "Skilar fyrsta atriði í lista."; Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM_END = "Skilar atriðinu á hinum tiltekna stað í lista. #1 er síðasta atriðið."; Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM_START = "Skilar atriðinu í hinum tiltekna stað í lista. #1 er fyrsta atriðið."; Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST = "Skilar síðasta atriði í lista."; Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM = "Skilar einhverju atriði úr lista."; Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST = "Fjarlægir og skilar fyrsta atriðinu í lista."; Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM_END = "Fjarlægir og skilar atriðinu á hinum tiltekna stað í lista. #1 er síðasta atriðið."; Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM_START = "Fjarlægir og skilar atriðinu á hinum tiltekna stað í lista. #1 er fyrsta atriðið."; Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST = "Fjarlægir og skilar síðasta atriðinu í lista."; Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM = "Fjarlægir og skilar einhverju atriði úr lista."; Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST = "Fjarlægir fyrsta atriðið í lista."; Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM_END = "Fjarlægir atriðið á hinum tiltekna stað í lista. #1 er síðasta atriðið."; Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM_START = "Fjarlægir atriðið á hinum tiltekna stað í lista. #1 er fyrsta atriðið."; Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST = "Fjarlægir síðasta atriðið í lista."; Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM = "Fjarlægir eitthvert atriði úr lista."; Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_END = "til # frá enda"; Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_START = "til #"; Blockly.Msg.LISTS_GET_SUBLIST_END_LAST = "til síðasta"; Blockly.Msg.LISTS_GET_SUBLIST_HELPURL = "https://code.google.com/p/blockly/wiki/Lists#Getting_a_sublist"; // untranslated Blockly.Msg.LISTS_GET_SUBLIST_START_FIRST = "sækja undirlista frá fyrsta"; Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_END = "sækja undirlista frá # frá enda"; Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_START = "sækja undirlista frá #"; Blockly.Msg.LISTS_GET_SUBLIST_TAIL = ""; // untranslated Blockly.Msg.LISTS_GET_SUBLIST_TOOLTIP = "Býr til afrit af tilteknum hluta lista."; Blockly.Msg.LISTS_INDEX_OF_FIRST = "finna fyrsta tilfelli atriðis"; Blockly.Msg.LISTS_INDEX_OF_HELPURL = "https://code.google.com/p/blockly/wiki/Lists#Getting_Items_from_a_List"; // untranslated Blockly.Msg.LISTS_INDEX_OF_LAST = "finna síðasta tilfelli atriðis"; Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Finnur hvar atriðið kemur fyrir fyrst/síðast í listanum og skilar sæti þess. Skilar 0 ef textinn finnst ekki."; Blockly.Msg.LISTS_INLIST = "í lista"; Blockly.Msg.LISTS_IS_EMPTY_HELPURL = "https://code.google.com/p/blockly/wiki/Lists#is_empty"; // untranslated Blockly.Msg.LISTS_IS_EMPTY_TITLE = "%1 er tómur"; Blockly.Msg.LISTS_LENGTH_HELPURL = "https://code.google.com/p/blockly/wiki/Lists#length_of"; // untranslated Blockly.Msg.LISTS_LENGTH_TITLE = "lengd %1"; Blockly.Msg.LISTS_LENGTH_TOOLTIP = "Skilar lengd lista."; Blockly.Msg.LISTS_REPEAT_HELPURL = "https://code.google.com/p/blockly/wiki/Lists#create_list_with"; // untranslated Blockly.Msg.LISTS_REPEAT_TITLE = "búa til lista með atriði %1 endurtekið %2 sinnum"; Blockly.Msg.LISTS_REPEAT_TOOLTIP = "Býr til lista sem inniheldur tiltekna gildið endurtekið tiltekið oft."; Blockly.Msg.LISTS_SET_INDEX_HELPURL = "https://code.google.com/p/blockly/wiki/Lists#in_list_..._set"; // untranslated Blockly.Msg.LISTS_SET_INDEX_INPUT_TO = "sem"; Blockly.Msg.LISTS_SET_INDEX_INSERT = "bæta við"; Blockly.Msg.LISTS_SET_INDEX_SET = "setja í"; Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST = "Bætir atriðinu fremst í listann."; Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM_END = "Bætir atriðinu í listann á tilteknum stað. #1 er síðasta atriðið."; Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM_START = "Bætir atriðinu í listann á tilteknum stað. #1 er fyrsta atriðið."; Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST = "Bætir atriðinu aftan við listann."; Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM = "Bætir atriðinu einhversstaðar við listann."; Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST = "Setur atriðið í fyrsta sæti lista."; Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Setur atriðið í tiltekna sætið í listanum. #1 er síðasta atriðið."; Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Setur atriðið í tiltekna sætið í listanum. #1 er fyrsta atriðið."; Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Setur atriðið í síðasta sæti lista."; Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Setur atriðið í eitthvert sæti lista."; Blockly.Msg.LISTS_TOOLTIP = "Skilar sönnu ef listinn er tómur."; Blockly.Msg.LOGIC_BOOLEAN_FALSE = "ósatt"; Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://code.google.com/p/blockly/wiki/True_False"; // untranslated Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Skilar annað hvort sönnu eða ósönnu."; Blockly.Msg.LOGIC_BOOLEAN_TRUE = "satt"; Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Skila sönnu ef inntökin eru jöfn."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Skila sönnu ef fyrra inntakið er stærra en seinna inntakið."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Skila sönnu ef fyrra inntakið er stærra en eða jafnt og seinna inntakið."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Skila sönnu ef fyrra inntakið er minna en seinna inntakið."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Skila sönnu ef fyrra inntakið er minna en eða jafnt og seinna inntakið."; Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Skila sönnu ef inntökin eru ekki jöfn."; Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://code.google.com/p/blockly/wiki/Not"; // untranslated Blockly.Msg.LOGIC_NEGATE_TITLE = "ekki %1"; Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Skilar sönnu ef inntakið er ósatt. Skilar ósönnu ef inntakið er satt."; Blockly.Msg.LOGIC_NULL = "tómagildi"; Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated Blockly.Msg.LOGIC_NULL_TOOLTIP = "Skilar tómagildi."; Blockly.Msg.LOGIC_OPERATION_AND = "og"; Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://code.google.com/p/blockly/wiki/And_Or"; // untranslated Blockly.Msg.LOGIC_OPERATION_OR = "eða"; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Skila sönnu ef bæði inntökin eru sönn."; Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Skila sönnu ef að minnsta kosti eitt inntak er satt."; Blockly.Msg.LOGIC_TERNARY_CONDITION = "prófun"; Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // untranslated Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "ef ósatt"; Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "ef satt"; Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Kanna skilyrðið í 'prófun'. Skilar 'ef satt' gildinu ef skilyrðið er satt, en skilar annars 'ef ósatt' gildinu."; Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Skila summu talnanna tveggja."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Skila deilingu talnanna."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Skila mismun talnanna."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY = "Skila margfeldi talnanna."; Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Skila fyrri tölunni í veldinu seinni talan."; Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; Blockly.Msg.MATH_CHANGE_INPUT_BY = "um"; Blockly.Msg.MATH_CHANGE_TITLE_CHANGE = "breyta"; Blockly.Msg.MATH_CHANGE_TOOLTIP = "Bæta tölu við breytu '%1'."; Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Skila algengum fasta: π (3.141…), e (2.718…), φ (1.618…), kvrót(2) (1.414…), kvrót(½) (0.707…) eða ∞ (óendanleika)."; Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated Blockly.Msg.MATH_CONSTRAIN_TITLE = "þröngva %1 lægst %2 hæst %3"; Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Þröngva tölu til að vera innan hinna tilgreindu marka (að báðum meðtöldum)."; Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated Blockly.Msg.MATH_IS_DIVISIBLE_BY = "er\u00A0deilanleg með"; Blockly.Msg.MATH_IS_EVEN = "er\u00A0jöfn tala"; Blockly.Msg.MATH_IS_NEGATIVE = "er neikvæð"; Blockly.Msg.MATH_IS_ODD = "er oddatala"; Blockly.Msg.MATH_IS_POSITIVE = "er jákvæð"; Blockly.Msg.MATH_IS_PRIME = "er prímtala"; Blockly.Msg.MATH_IS_TOOLTIP = "Kanna hvort tala sé jöfn tala, oddatala, jákvæð, neikvæð eða deilanleg með tiltekinni tölu. Skilar sönnu eða ósönnu."; Blockly.Msg.MATH_IS_WHOLE = "er heiltala"; Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; Blockly.Msg.MATH_MODULO_TITLE = "afgangur af %1 ÷ %2"; Blockly.Msg.MATH_MODULO_TOOLTIP = "Skila afgangi deilingar með tölunum."; Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; Blockly.Msg.MATH_NUMBER_TOOLTIP = "Tala."; Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "meðaltal lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "stærst í lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "miðgildi lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MIN = "minnst í lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "tíðast í lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "eitthvað úr lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "staðalfrávik lista"; Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "summa lista"; Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Skila meðaltali talna í listanum."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Skila stærstu tölu í listanum."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Skila miðgildi listans."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MIN = "Skila minnstu tölu í listanum."; Blockly.Msg.MATH_ONLIST_TOOLTIP_MODE = "Skila lista yfir tíðustu gildin í listanum."; Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM = "Skila einhverju atriði úr listanum."; Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV = "Skila staðalfráviki lista."; Blockly.Msg.MATH_ONLIST_TOOLTIP_SUM = "Skila summu allra talna í listanum."; Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "slembibrot"; Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Skila broti sem er valið af handahófi úr tölum á bilinu frá og með 0.0 til (en ekki með) 1.0."; Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; Blockly.Msg.MATH_RANDOM_INT_TITLE = "slembitala frá %1 til %2"; Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Skila heiltölu sem valin er af handahófi og er innan tilgreindra marka, að báðum meðtöldum."; Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "námunda"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "námunda niður"; Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "námunda upp"; Blockly.Msg.MATH_ROUND_TOOLTIP = "Námunda tölu upp eða niður."; Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "algildi"; Blockly.Msg.MATH_SINGLE_OP_ROOT = "kvaðratrót"; Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Skila algildi tölu."; Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Skila e í veldi tölu."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Skila náttúrlegum lógaritma tölu."; Blockly.Msg.MATH_SINGLE_TOOLTIP_LOG10 = "Skila tugalógaritma tölu."; Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG = "Skila neitun tölu (tölunni með öfugu formerki)."; Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Skila 10 í veldi tölu."; Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Skila kvaðratrót tölu."; Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Skilar arkarkósínusi tölu."; Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Skilar arkarsínusi tölu."; Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Skilar arkartangensi tölu."; Blockly.Msg.MATH_TRIG_TOOLTIP_COS = "Skila kósínusi horns gefnu í gráðum."; Blockly.Msg.MATH_TRIG_TOOLTIP_SIN = "Skila sínusi horns gefnu í gráðum."; Blockly.Msg.MATH_TRIG_TOOLTIP_TAN = "Skila tangensi horns gefnu í gráðum."; Blockly.Msg.NEW_VARIABLE = "Ný breyta..."; Blockly.Msg.NEW_VARIABLE_TITLE = "Heiti nýrrar breytu:"; Blockly.Msg.ORDINAL_NUMBER_SUFFIX = ""; // untranslated Blockly.Msg.PROCEDURES_BEFORE_PARAMS = "með:"; Blockly.Msg.PROCEDURES_CALLNORETURN_CALL = ""; // untranslated Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; Blockly.Msg.PROCEDURES_CALLNORETURN_TOOLTIP = "Keyra heimatilbúna fallið '%1'."; Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP = "Keyra heimatilbúna fallið '%1' og nota úttak þess."; Blockly.Msg.PROCEDURES_CREATE_DO = "Búa til '%1'"; Blockly.Msg.PROCEDURES_DEFNORETURN_DO = ""; // untranslated Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE = "gera eitthvað"; Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE = "til að"; Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP = "Býr til fall sem skilar engu."; Blockly.Msg.PROCEDURES_DEFRETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated Blockly.Msg.PROCEDURES_DEFRETURN_RETURN = "skila"; Blockly.Msg.PROCEDURES_DEFRETURN_TOOLTIP = "Býr til fall sem skilar úttaki."; Blockly.Msg.PROCEDURES_DEF_DUPLICATE_WARNING = "Aðvörun: Þetta fall er með tvítekna stika."; Blockly.Msg.PROCEDURES_HIGHLIGHT_DEF = "Sýna skilgreiningu falls"; Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP = "Ef gildi er satt, skal skila öðru gildi."; Blockly.Msg.PROCEDURES_IFRETURN_WARNING = "Aðvörun: Þennan kubb má aðeins nota í skilgreiningu falls."; Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "heiti inntaks:"; Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "inntök"; Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated Blockly.Msg.REMOVE_COMMENT = "Fjarlægja skýringu"; Blockly.Msg.RENAME_VARIABLE = "Endurnefna breytu..."; Blockly.Msg.RENAME_VARIABLE_TITLE = "Endurnefna allar '%1' breyturnar:"; Blockly.Msg.TEXT_APPEND_APPENDTEXT = "bæta texta"; Blockly.Msg.TEXT_APPEND_HELPURL = "https://code.google.com/p/blockly/wiki/Text#Text_modification"; // untranslated Blockly.Msg.TEXT_APPEND_TO = "við"; Blockly.Msg.TEXT_APPEND_TOOLTIP = "Bæta texta við breytuna '%1'."; Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://code.google.com/p/blockly/wiki/Text#Adjusting_text_case"; // untranslated Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "í lágstafi"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "í Upphafstafi"; Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "í HÁSTAFI"; Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Skila afriti af textanum með annarri stafastöðu."; Blockly.Msg.TEXT_CHARAT_FIRST = "sækja fyrsta staf"; Blockly.Msg.TEXT_CHARAT_FROM_END = "sækja staf # frá enda"; Blockly.Msg.TEXT_CHARAT_FROM_START = "sækja staf #"; Blockly.Msg.TEXT_CHARAT_HELPURL = "https://code.google.com/p/blockly/wiki/Text#Extracting_text"; // untranslated Blockly.Msg.TEXT_CHARAT_INPUT_INTEXT = "í texta"; Blockly.Msg.TEXT_CHARAT_LAST = "sækja síðasta staf"; Blockly.Msg.TEXT_CHARAT_RANDOM = "sækja einhvern staf"; Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Skila staf á tilteknum stað."; Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Bæta atriði við textann."; Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "tengja"; Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Bæta við, fjarlægja eða umraða hlutum til að breyta skipan þessa textakubbs."; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "að staf # frá enda"; Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "að staf #"; Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "að síðasta staf"; Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://code.google.com/p/blockly/wiki/Text#Extracting_a_region_of_text"; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "í texta"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "sækja textabút frá fyrsta staf"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "sækja textabút frá staf # frá enda"; Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "sækja textabút frá staf #"; Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Skilar tilteknum hluta textans."; Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://code.google.com/p/blockly/wiki/Text#Finding_text"; // untranslated Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "í texta"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "finna fyrsta tilfelli texta"; Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "finna síðasta tilfelli texta"; Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Finnur fyrsta/síðasta tilfelli fyrri textans í seinni textanum og skilar sæti hans. Skilar 0 ef textinn finnst ekki."; Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://code.google.com/p/blockly/wiki/Text#Checking_for_empty_text"; // untranslated Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 er tómur"; Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Skilar sönnu ef gefni textinn er tómur."; Blockly.Msg.TEXT_JOIN_HELPURL = "https://code.google.com/p/blockly/wiki/Text#Text_creation"; // untranslated Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "búa til texta með"; Blockly.Msg.TEXT_JOIN_TOOLTIP = "Búa til texta með því að tengja saman einhvern fjölda atriða."; Blockly.Msg.TEXT_LENGTH_HELPURL = "https://code.google.com/p/blockly/wiki/Text#Text_modification"; // untranslated Blockly.Msg.TEXT_LENGTH_TITLE = "lengd %1"; Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Skilar fjölda stafa (með bilum) í gefna textanum."; Blockly.Msg.TEXT_PRINT_HELPURL = "https://code.google.com/p/blockly/wiki/Text#Printing_text"; // untranslated Blockly.Msg.TEXT_PRINT_TITLE = "prenta %1"; Blockly.Msg.TEXT_PRINT_TOOLTIP = "Prenta tiltekinn texta, tölu eða annað gildi."; Blockly.Msg.TEXT_PROMPT_HELPURL = "https://code.google.com/p/blockly/wiki/Text#Getting_input_from_the_user"; // untranslated Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Biðja notandann um tölu."; Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Biðja notandann um texta."; Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "biðja um tölu með skilaboðum"; Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "biðja um texta með skilaboðum"; Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_science)"; Blockly.Msg.TEXT_TEXT_TOOLTIP = "Stafur, orð eða textalína."; Blockly.Msg.TEXT_TRIM_HELPURL = "https://code.google.com/p/blockly/wiki/Text#Trimming_%28removing%29_spaces"; // untranslated Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "eyða bilum af báðum endum"; Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "eyða bilum af vinstri enda"; Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "eyða bilum af hægri enda"; Blockly.Msg.TEXT_TRIM_TOOLTIP = "Skila afriti af textanum þar sem möguleg bil við báða enda hafa verið fjarlægð."; Blockly.Msg.VARIABLES_DEFAULT_NAME = "atriði"; Blockly.Msg.VARIABLES_GET_CREATE_SET = "Búa til 'stilla %1'"; Blockly.Msg.VARIABLES_GET_HELPURL = "https://code.google.com/p/blockly/wiki/Variables#Get"; // untranslated Blockly.Msg.VARIABLES_GET_TAIL = ""; // untranslated Blockly.Msg.VARIABLES_GET_TITLE = ""; // untranslated Blockly.Msg.VARIABLES_GET_TOOLTIP = "Skilar gildi þessarar breytu."; Blockly.Msg.VARIABLES_SET_CREATE_GET = "Búa til 'sækja %1'"; Blockly.Msg.VARIABLES_SET_HELPURL = "https://code.google.com/p/blockly/wiki/Variables#Set"; // untranslated Blockly.Msg.VARIABLES_SET_TAIL = "á"; Blockly.Msg.VARIABLES_SET_TITLE = "stilla"; Blockly.Msg.VARIABLES_SET_TOOLTIP = "Stillir þessa breytu á innihald inntaksins."; Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE; Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE; Blockly.Msg.VARIABLES_SET_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.VARIABLES_GET_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO; Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL; Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.PROCEDURES_CALLRETURN_CALL = Blockly.Msg.PROCEDURES_CALLNORETURN_CALL; Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST; Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF; Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO; Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF; Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME; Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE;
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.wrapLifecycle = exports.run = exports.Install = undefined; var _assign; function _load_assign() { return _assign = _interopRequireDefault(require('babel-runtime/core-js/object/assign')); } var _keys; function _load_keys() { return _keys = _interopRequireDefault(require('babel-runtime/core-js/object/keys')); } var _asyncToGenerator2; function _load_asyncToGenerator() { return _asyncToGenerator2 = _interopRequireDefault(require('babel-runtime/helpers/asyncToGenerator')); } let run = exports.run = (() => { var _ref9 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { let lockfile; if (flags.lockfile === false) { lockfile = new (_wrapper || _load_wrapper()).default(); } else { lockfile = yield (_wrapper || _load_wrapper()).default.fromDirectory(config.cwd, reporter); } if (args.length) { const exampleArgs = args.slice(); if (flags.saveDev) { exampleArgs.push('--dev'); } if (flags.savePeer) { exampleArgs.push('--peer'); } if (flags.saveOptional) { exampleArgs.push('--optional'); } if (flags.saveExact) { exampleArgs.push('--exact'); } if (flags.saveTilde) { exampleArgs.push('--tilde'); } let command = 'add'; if (flags.global) { command = 'global add'; } throw new (_errors || _load_errors()).MessageError(reporter.lang('installCommandRenamed', `yarn ${command} ${exampleArgs.join(' ')}`)); } yield wrapLifecycle(config, flags, (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { const install = new Install(flags, config, reporter, lockfile); yield install.init(); })); }); return function run(_x14, _x15, _x16, _x17) { return _ref9.apply(this, arguments); }; })(); let wrapLifecycle = exports.wrapLifecycle = (() => { var _ref11 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, flags, factory) { yield config.executeLifecycleScript('preinstall'); yield factory(); // npm behaviour, seems kinda funky but yay compatibility yield config.executeLifecycleScript('install'); yield config.executeLifecycleScript('postinstall'); if (!config.production) { yield config.executeLifecycleScript('prepublish'); } }); return function wrapLifecycle(_x18, _x19, _x20) { return _ref11.apply(this, arguments); }; })(); exports.setFlags = setFlags; var _index; function _load_index() { return _index = _interopRequireDefault(require('../../util/normalize-manifest/index.js')); } var _index2; function _load_index2() { return _index2 = require('../../registries/index.js'); } var _errors; function _load_errors() { return _errors = require('../../errors.js'); } var _wrapper; function _load_wrapper() { return _wrapper = _interopRequireDefault(require('../../lockfile/wrapper.js')); } var _stringify; function _load_stringify() { return _stringify = _interopRequireDefault(require('../../lockfile/stringify.js')); } var _packageFetcher; function _load_packageFetcher() { return _packageFetcher = _interopRequireDefault(require('../../package-fetcher.js')); } var _packageInstallScripts; function _load_packageInstallScripts() { return _packageInstallScripts = _interopRequireDefault(require('../../package-install-scripts.js')); } var _packageCompatibility; function _load_packageCompatibility() { return _packageCompatibility = _interopRequireDefault(require('../../package-compatibility.js')); } var _packageResolver; function _load_packageResolver() { return _packageResolver = _interopRequireDefault(require('../../package-resolver.js')); } var _packageLinker; function _load_packageLinker() { return _packageLinker = _interopRequireDefault(require('../../package-linker.js')); } var _packageRequest; function _load_packageRequest() { return _packageRequest = _interopRequireDefault(require('../../package-request.js')); } var _clean; function _load_clean() { return _clean = require('./clean.js'); } var _constants; function _load_constants() { return _constants = _interopRequireWildcard(require('../../constants.js')); } var _fs; function _load_fs() { return _fs = _interopRequireWildcard(require('../../util/fs.js')); } var _crypto; function _load_crypto() { return _crypto = _interopRequireWildcard(require('../../util/crypto.js')); } var _map; function _load_map() { return _map = _interopRequireDefault(require('../../util/map.js')); } var _misc; function _load_misc() { return _misc = require('../../util/misc.js'); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const invariant = require('invariant'); const semver = require('semver'); const emoji = require('node-emoji'); const isCI = require('is-ci'); const path = require('path'); var _require = require('../../../package.json'); const YARN_VERSION = _require.version, YARN_INSTALL_METHOD = _require.installationMethod; const ONE_DAY = 1000 * 60 * 60 * 24; /** * Try and detect the installation method for Yarn and provide a command to update it with. */ function getUpdateCommand() { if (YARN_INSTALL_METHOD === 'tar') { return `curl -o- -L ${(_constants || _load_constants()).YARN_INSTALLER_SH} | bash`; } if (YARN_INSTALL_METHOD === 'homebrew') { return 'brew upgrade yarn'; } if (YARN_INSTALL_METHOD === 'deb') { return 'sudo apt-get update && sudo apt-get install yarn'; } if (YARN_INSTALL_METHOD === 'rpm') { return 'sudo yum install yarn'; } if (YARN_INSTALL_METHOD === 'npm') { return 'npm upgrade --global yarn'; } if (YARN_INSTALL_METHOD === 'chocolatey') { return 'choco upgrade yarn'; } if (YARN_INSTALL_METHOD === 'apk') { return 'apk update && apk add -u yarn'; } return null; } function getUpdateInstaller() { // Windows if (YARN_INSTALL_METHOD === 'msi') { return (_constants || _load_constants()).YARN_INSTALLER_MSI; } return null; } function normalizeFlags(config, rawFlags) { const flags = { // install har: !!rawFlags.har, ignorePlatform: !!rawFlags.ignorePlatform, ignoreEngines: !!rawFlags.ignoreEngines, ignoreScripts: !!rawFlags.ignoreScripts, ignoreOptional: !!rawFlags.ignoreOptional, force: !!rawFlags.force, flat: !!rawFlags.flat, lockfile: rawFlags.lockfile !== false, pureLockfile: !!rawFlags.pureLockfile, skipIntegrity: !!rawFlags.skipIntegrity, frozenLockfile: !!rawFlags.frozenLockfile, linkDuplicates: !!rawFlags.linkDuplicates, // add peer: !!rawFlags.peer, dev: !!rawFlags.dev, optional: !!rawFlags.optional, exact: !!rawFlags.exact, tilde: !!rawFlags.tilde }; if (config.getOption('ignore-scripts')) { flags.ignoreScripts = true; } if (config.getOption('ignore-platform')) { flags.ignorePlatform = true; } if (config.getOption('ignore-engines')) { flags.ignoreEngines = true; } if (config.getOption('ignore-optional')) { flags.ignoreOptional = true; } if (config.getOption('force')) { flags.force = true; } return flags; } class Install { constructor(flags, config, reporter, lockfile) { this.rootManifestRegistries = []; this.rootPatternsToOrigin = (0, (_map || _load_map()).default)(); this.resolutions = (0, (_map || _load_map()).default)(); this.lockfile = lockfile; this.reporter = reporter; this.config = config; this.flags = normalizeFlags(config, flags); this.resolver = new (_packageResolver || _load_packageResolver()).default(config, lockfile); this.fetcher = new (_packageFetcher || _load_packageFetcher()).default(config, this.resolver); this.compatibility = new (_packageCompatibility || _load_packageCompatibility()).default(config, this.resolver, this.flags.ignoreEngines); this.linker = new (_packageLinker || _load_packageLinker()).default(config, this.resolver); this.scripts = new (_packageInstallScripts || _load_packageInstallScripts()).default(config, this.resolver, this.flags.force); } /** * Create a list of dependency requests from the current directories manifests. */ fetchRequestFromCwd() { var _arguments = arguments, _this = this; return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { let excludePatterns = _arguments.length > 0 && _arguments[0] !== undefined ? _arguments[0] : []; const patterns = []; const deps = []; const manifest = {}; const ignorePatterns = []; const usedPatterns = []; // exclude package names that are in install args const excludeNames = []; for (const pattern of excludePatterns) { // can't extract a package name from this if ((_packageRequest || _load_packageRequest()).default.getExoticResolver(pattern)) { continue; } // extract the name const parts = (_packageRequest || _load_packageRequest()).default.normalizePattern(pattern); excludeNames.push(parts.name); } for (const registry of (0, (_keys || _load_keys()).default)((_index2 || _load_index2()).registries)) { const filename = (_index2 || _load_index2()).registries[registry].filename; const loc = path.join(_this.config.cwd, filename); if (!(yield (_fs || _load_fs()).exists(loc))) { continue; } _this.rootManifestRegistries.push(registry); const json = yield _this.config.readJson(loc); yield (0, (_index || _load_index()).default)(json, _this.config.cwd, _this.config, true); (0, (_assign || _load_assign()).default)(_this.resolutions, json.resolutions); (0, (_assign || _load_assign()).default)(manifest, json); const pushDeps = function pushDeps(depType, _ref, isUsed) { let hint = _ref.hint, optional = _ref.optional; const depMap = json[depType]; for (const name in depMap) { if (excludeNames.indexOf(name) >= 0) { continue; } let pattern = name; if (!_this.lockfile.getLocked(pattern, true)) { // when we use --save we save the dependency to the lockfile with just the name rather than the // version combo pattern += '@' + depMap[name]; } if (isUsed) { usedPatterns.push(pattern); } else { ignorePatterns.push(pattern); } _this.rootPatternsToOrigin[pattern] = depType; patterns.push(pattern); deps.push({ pattern: pattern, registry: registry, hint: hint, optional: optional }); } }; pushDeps('dependencies', { hint: null, optional: false }, true); pushDeps('devDependencies', { hint: 'dev', optional: false }, !_this.config.production); pushDeps('optionalDependencies', { hint: 'optional', optional: true }, !_this.flags.ignoreOptional); break; } // inherit root flat flag if (manifest.flat) { _this.flags.flat = true; } return { requests: deps, patterns: patterns, manifest: manifest, usedPatterns: usedPatterns, ignorePatterns: ignorePatterns }; })(); } /** * TODO description */ prepareRequests(requests) { return requests; } preparePatterns(patterns) { return patterns; } bailout(patterns) { var _this2 = this; return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { const match = yield _this2.matchesIntegrityHash(patterns); const haveLockfile = yield (_fs || _load_fs()).exists(path.join(_this2.config.cwd, (_constants || _load_constants()).LOCKFILE_FILENAME)); if (_this2.flags.frozenLockfile && !_this2.lockFileInSync(patterns)) { throw new (_errors || _load_errors()).MessageError(_this2.reporter.lang('frozenLockfileError')); } if (!_this2.flags.skipIntegrity && !_this2.flags.force && match.matches && haveLockfile) { _this2.reporter.success(_this2.reporter.lang('upToDate')); return true; } if (!patterns.length && !match.expected) { _this2.reporter.success(_this2.reporter.lang('nothingToInstall')); yield _this2.createEmptyManifestFolders(); yield _this2.saveLockfileAndIntegrity(patterns); return true; } return false; })(); } /** * Produce empty folders for all used root manifests. */ createEmptyManifestFolders() { var _this3 = this; return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { if (_this3.config.modulesFolder) { // already created return; } for (const registryName of _this3.rootManifestRegistries) { const folder = _this3.config.registries[registryName].folder; yield (_fs || _load_fs()).mkdirp(path.join(_this3.config.cwd, folder)); } })(); } /** * TODO description */ markIgnored(patterns) { for (const pattern of patterns) { const manifest = this.resolver.getStrictResolvedPattern(pattern); const ref = manifest._reference; invariant(ref, 'expected package reference'); if (ref.requests.length === 1) { // this module was only depended on once by the root so we can safely ignore it // if it was requested more than once then ignoring it would break a transitive // dep that resolved to it ref.ignore = true; } } } /** * TODO description */ init() { var _this4 = this; return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { _this4.checkUpdate(); // warn if we have a shrinkwrap if (yield (_fs || _load_fs()).exists(path.join(_this4.config.cwd, 'npm-shrinkwrap.json'))) { _this4.reporter.warn(_this4.reporter.lang('shrinkwrapWarning')); } let patterns = []; const steps = []; var _ref2 = yield _this4.fetchRequestFromCwd(); const depRequests = _ref2.requests, rawPatterns = _ref2.patterns, ignorePatterns = _ref2.ignorePatterns, usedPatterns = _ref2.usedPatterns; steps.push((() => { var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { _this4.reporter.step(curr, total, _this4.reporter.lang('resolvingPackages'), emoji.get('mag')); yield _this4.resolver.init(_this4.prepareRequests(depRequests), _this4.flags.flat); patterns = yield _this4.flatten(_this4.preparePatterns(rawPatterns)); return { bailout: yield _this4.bailout(usedPatterns) }; }); return function (_x2, _x3) { return _ref3.apply(this, arguments); }; })()); steps.push((() => { var _ref4 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { _this4.markIgnored(ignorePatterns); _this4.reporter.step(curr, total, _this4.reporter.lang('fetchingPackages'), emoji.get('truck')); yield _this4.fetcher.init(); yield _this4.compatibility.init(); }); return function (_x4, _x5) { return _ref4.apply(this, arguments); }; })()); steps.push((() => { var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { // remove integrity hash to make this operation atomic const loc = yield _this4.getIntegrityHashLocation(); yield (_fs || _load_fs()).unlink(loc); _this4.reporter.step(curr, total, _this4.reporter.lang('linkingDependencies'), emoji.get('link')); yield _this4.linker.init(patterns, _this4.flags.linkDuplicates); }); return function (_x6, _x7) { return _ref5.apply(this, arguments); }; })()); steps.push((() => { var _ref6 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { _this4.reporter.step(curr, total, _this4.flags.force ? _this4.reporter.lang('rebuildingPackages') : _this4.reporter.lang('buildingFreshPackages'), emoji.get('page_with_curl')); if (_this4.flags.ignoreScripts) { _this4.reporter.warn(_this4.reporter.lang('ignoredScripts')); } else { yield _this4.scripts.init(patterns); } }); return function (_x8, _x9) { return _ref6.apply(this, arguments); }; })()); if (_this4.flags.har) { steps.push((() => { var _ref7 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { const formattedDate = new Date().toISOString().replace(/:/g, '-'); const filename = `yarn-install_${formattedDate}.har`; _this4.reporter.step(curr, total, _this4.reporter.lang('savingHar', filename), emoji.get('black_circle_for_record')); yield _this4.config.requestManager.saveHar(filename); }); return function (_x10, _x11) { return _ref7.apply(this, arguments); }; })()); } if (yield _this4.shouldClean()) { steps.push((() => { var _ref8 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { _this4.reporter.step(curr, total, _this4.reporter.lang('cleaningModules'), emoji.get('recycle')); yield (0, (_clean || _load_clean()).clean)(_this4.config, _this4.reporter); }); return function (_x12, _x13) { return _ref8.apply(this, arguments); }; })()); } let currentStep = 0; for (const step of steps) { const stepResult = yield step(++currentStep, steps.length); if (stepResult && stepResult.bailout) { return patterns; } } // fin! yield _this4.saveLockfileAndIntegrity(patterns); _this4.maybeOutputUpdate(); _this4.config.requestManager.clearCache(); return patterns; })(); } /** * Check if we should run the cleaning step. */ shouldClean() { return (_fs || _load_fs()).exists(path.join(this.config.cwd, (_constants || _load_constants()).CLEAN_FILENAME)); } /** * TODO */ flatten(patterns) { var _this5 = this; return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { if (!_this5.flags.flat) { return patterns; } const flattenedPatterns = []; for (const name of _this5.resolver.getAllDependencyNamesByLevelOrder(patterns)) { const infos = _this5.resolver.getAllInfoForPackageName(name).filter(function (manifest) { const ref = manifest._reference; invariant(ref, 'expected package reference'); return !ref.ignore; }); if (infos.length === 0) { continue; } if (infos.length === 1) { // single version of this package // take out a single pattern as multiple patterns may have resolved to this package flattenedPatterns.push(_this5.resolver.patternsByPackage[name][0]); continue; } const options = infos.map(function (info) { const ref = info._reference; invariant(ref, 'expected reference'); return { // TODO `and is required by {PARENT}`, name: _this5.reporter.lang('manualVersionResolutionOption', ref.patterns.join(', '), info.version), value: info.version }; }); const versions = infos.map(function (info) { return info.version; }); let version; const resolutionVersion = _this5.resolutions[name]; if (resolutionVersion && versions.indexOf(resolutionVersion) >= 0) { // use json `resolution` version version = resolutionVersion; } else { version = yield _this5.reporter.select(_this5.reporter.lang('manualVersionResolution', name), _this5.reporter.lang('answer'), options); _this5.resolutions[name] = version; } flattenedPatterns.push(_this5.resolver.collapseAllVersionsOfPackage(name, version)); } // save resolutions to their appropriate root manifest if ((0, (_keys || _load_keys()).default)(_this5.resolutions).length) { const manifests = yield _this5.config.getRootManifests(); for (const name in _this5.resolutions) { const version = _this5.resolutions[name]; const patterns = _this5.resolver.patternsByPackage[name]; if (!patterns) { continue; } let manifest; for (const pattern of patterns) { manifest = _this5.resolver.getResolvedPattern(pattern); if (manifest) { break; } } invariant(manifest, 'expected manifest'); const ref = manifest._reference; invariant(ref, 'expected reference'); const object = manifests[ref.registry].object; object.resolutions = object.resolutions || {}; object.resolutions[name] = version; } yield _this5.config.saveRootManifests(manifests); } return flattenedPatterns; })(); } /** * Check if the loaded lockfile has all the included patterns */ lockFileInSync(patterns) { let inSync = true; for (const pattern of patterns) { if (!this.lockfile.getLocked(pattern)) { inSync = false; break; } } return inSync; } /** * Save updated integrity and lockfiles. */ saveLockfileAndIntegrity(patterns) { var _this6 = this; return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { // stringify current lockfile const lockSource = (0, (_stringify || _load_stringify()).default)(_this6.lockfile.getLockfile(_this6.resolver.patterns)); // write integrity hash yield _this6.writeIntegrityHash(lockSource, patterns); // --no-lockfile or --pure-lockfile flag if (_this6.flags.lockfile === false || _this6.flags.pureLockfile) { return; } const inSync = _this6.lockFileInSync(patterns); // remove is followed by install with force on which we rewrite lockfile if (inSync && patterns.length && !_this6.flags.force) { return; } // build lockfile location const loc = path.join(_this6.config.cwd, (_constants || _load_constants()).LOCKFILE_FILENAME); // write lockfile yield (_fs || _load_fs()).writeFilePreservingEol(loc, lockSource); _this6._logSuccessSaveLockfile(); })(); } _logSuccessSaveLockfile() { this.reporter.success(this.reporter.lang('savedLockfile')); } /** * Check if the integrity hash of this installation matches one on disk. */ matchesIntegrityHash(patterns) { var _this7 = this; return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { const loc = yield _this7.getIntegrityHashLocation(); if (!(yield (_fs || _load_fs()).exists(loc))) { return { actual: '', expected: '', loc: loc, matches: false }; } const lockSource = (0, (_stringify || _load_stringify()).default)(_this7.lockfile.getLockfile(_this7.resolver.patterns)); const actual = _this7.generateIntegrityHash(lockSource, patterns); const expected = (yield (_fs || _load_fs()).readFile(loc)).trim(); return { actual: actual, expected: expected, loc: loc, matches: actual === expected }; })(); } /** * Get the location of an existing integrity hash. If none exists then return the location where we should * write a new one. */ getIntegrityHashLocation() { var _this8 = this; return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { // build up possible folders const possibleFolders = []; if (_this8.config.modulesFolder) { possibleFolders.push(_this8.config.modulesFolder); } // get a list of registry names to check existence in let checkRegistryNames = _this8.resolver.usedRegistries; if (!checkRegistryNames.length) { // we haven't used any registries yet checkRegistryNames = (_index2 || _load_index2()).registryNames; } // ensure we only write to a registry folder that was used for (const name of checkRegistryNames) { const loc = path.join(_this8.config.cwd, _this8.config.registries[name].folder); possibleFolders.push(loc); } // if we already have an integrity hash in one of these folders then use it's location otherwise use the // first folder const possibles = possibleFolders.map(function (folder) { return path.join(folder, (_constants || _load_constants()).INTEGRITY_FILENAME); }); let loc = possibles[0]; for (const possibleLoc of possibles) { if (yield (_fs || _load_fs()).exists(possibleLoc)) { loc = possibleLoc; break; } } return loc; })(); } /** * Write the integrity hash of the current install to disk. */ writeIntegrityHash(lockSource, patterns) { var _this9 = this; return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { const loc = yield _this9.getIntegrityHashLocation(); invariant(loc, 'expected integrity hash location'); yield (_fs || _load_fs()).mkdirp(path.dirname(loc)); yield (_fs || _load_fs()).writeFile(loc, _this9.generateIntegrityHash(lockSource, patterns)); })(); } /** * Generate integrity hash of input lockfile. */ generateIntegrityHash(lockfile, patterns) { const opts = [lockfile]; opts.push(`patterns:${patterns.sort((_misc || _load_misc()).sortAlpha).join(',')}`); if (this.flags.flat) { opts.push('flat'); } if (this.config.production) { opts.push('production'); } const linkedModules = this.config.linkedModules; if (linkedModules.length) { opts.push(`linked:${linkedModules.join(',')}`); } const mirror = this.config.getOfflineMirrorPath(); if (mirror != null) { opts.push(`mirror:${mirror}`); } return (_crypto || _load_crypto()).hash(opts.join('-'), 'sha256'); } /** * Load the dependency graph of the current install. Only does package resolving and wont write to the cwd. */ hydrate(fetch) { var _this10 = this; return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { const request = yield _this10.fetchRequestFromCwd(); const depRequests = request.requests, rawPatterns = request.patterns, ignorePatterns = request.ignorePatterns; yield _this10.resolver.init(depRequests, _this10.flags.flat); yield _this10.flatten(rawPatterns); _this10.markIgnored(ignorePatterns); if (fetch) { // fetch packages, should hit cache most of the time yield _this10.fetcher.init(); yield _this10.compatibility.init(); // expand minimal manifests for (const manifest of _this10.resolver.getManifests()) { const ref = manifest._reference; invariant(ref, 'expected reference'); const loc = _this10.config.generateHardModulePath(ref); const newPkg = yield _this10.config.readManifest(loc); yield _this10.resolver.updateManifest(ref, newPkg); } } return request; })(); } /** * Check for updates every day and output a nag message if there's a newer version. */ checkUpdate() { if (!process.stdout.isTTY || isCI) { // don't show upgrade dialog on CI or non-TTY terminals return; } // only check for updates once a day const lastUpdateCheck = Number(this.config.getOption('lastUpdateCheck')) || 0; if (lastUpdateCheck && Date.now() - lastUpdateCheck < ONE_DAY) { return; } // don't bug for updates on tagged releases if (YARN_VERSION.indexOf('-') >= 0) { return; } this._checkUpdate().catch(() => { // swallow errors }); } _checkUpdate() { var _this11 = this; return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { let latestVersion = yield _this11.config.requestManager.request({ url: (_constants || _load_constants()).SELF_UPDATE_VERSION_URL }); invariant(typeof latestVersion === 'string', 'expected string'); latestVersion = latestVersion.trim(); if (!semver.valid(latestVersion)) { return; } // ensure we only check for updates periodically _this11.config.registries.yarn.saveHomeConfig({ lastUpdateCheck: Date.now() }); if (semver.gt(latestVersion, YARN_VERSION)) { _this11.maybeOutputUpdate = function () { _this11.reporter.warn(_this11.reporter.lang('yarnOutdated', latestVersion, YARN_VERSION)); const command = getUpdateCommand(); if (command) { _this11.reporter.info(_this11.reporter.lang('yarnOutdatedCommand')); _this11.reporter.command(command); } else { const installer = getUpdateInstaller(); if (installer) { _this11.reporter.info(_this11.reporter.lang('yarnOutdatedInstaller', installer)); } } }; } })(); } /** * Method to override with a possible upgrade message. */ maybeOutputUpdate() {} } exports.Install = Install; function setFlags(commander) { commander.usage('install [flags]'); commander.option('-g, --global', 'DEPRECATED'); commander.option('-S, --save', 'DEPRECATED - save package to your `dependencies`'); commander.option('-D, --save-dev', 'DEPRECATED - save package to your `devDependencies`'); commander.option('-P, --save-peer', 'DEPRECATED - save package to your `peerDependencies`'); commander.option('-O, --save-optional', 'DEPRECATED - save package to your `optionalDependencies`'); commander.option('-E, --save-exact', 'DEPRECATED'); commander.option('-T, --save-tilde', 'DEPRECATED'); }
var buster = require("buster"); var args = require("../lib/posix-argv-parser"); var t = args.types; buster.testCase("types", { setUp: function () { this.a = args.create(); }, "integer": { "validates value as integer": function (done) { this.a.createOption(["-p"], t.integer()); this.a.parse(["-p", "abc"], done(function (errors) { assert.match(errors[0], "-p"); assert.match(errors[0], "integer"); })); }, "validates with additional validators": function (done) { this.a.createOption(["-p"], t.integer({ validators: [function () { throw new Error("OMG"); }] })); this.a.parse(["-p", "abc"], done(function (errors) { assert.match(errors[0], "OMG"); })); }, "validates integer when additional validators": function (done) { this.a.createOption(["-p"], t.integer({ validators: [function () {}] })); this.a.parse(["-p", "abc"], done(function (errors) { assert.match(errors[0], "abc"); })); }, "produces number value": function (done) { this.a.createOption(["-p"], t.integer()); this.a.parse(["-p", "1111"], done(function (errors, options) { assert.same(options["-p"].value, 1111); })); }, "produces number with radix 10 by default": function (done) { this.a.createOption(["-p"], t.integer()); this.a.parse(["-p", "08"], done(function (errors, options) { assert.same(options["-p"].value, 8); })); }, "produces number with custom radix": function (done) { this.a.createOption(["-p"], t.integer({ radix: 8 })); this.a.parse(["-p", "08"], done(function (errors, options) { assert.same(options["-p"].value, 0); })); } }, "number": { "validates value as number": function (done) { this.a.createOption(["-p"], t.number()); this.a.parse(["-p", "2,3"], done(function (errors) { assert.match(errors[0], "-p"); assert.match(errors[0], "number"); })); }, "validates with additional validators": function (done) { this.a.createOption(["-p"], t.number({ validators: [function () { throw new Error("OMG"); }] })); this.a.parse(["-p", "abc"], done(function (errors) { assert.match(errors[0], "OMG"); })); }, "validates integer when additional validators": function (done) { this.a.createOption(["-p"], t.number({ validators: [function () {}] })); this.a.parse(["-p", "abc"], done(function (errors) { assert.match(errors[0], "abc"); })); }, "produces number value": function (done) { this.a.createOption(["-p"], t.number()); this.a.parse(["-p", "1111.3"], done(function (errors, options) { assert.same(options["-p"].value, 1111.3); })); } }, "enum": { "throws without values": function () { assert.exception(function () { t.enum(); }); }, "validates values in enum": function (done) { this.a.createOption(["-p"], t.enum(["1", "2", "3", "4"])); this.a.createOption(["-t"], t.enum(["1", "2", "3", "4"])); this.a.parse(["-p", "1", "-t", "5"], done(function (err) { assert.match(err[0], "-t"); })); } } });
/** * @author Eberhard Graether / http://egraether.com/ * @author Mark Lundin / http://mark-lundin.com */ if( typeof require === 'function' && !THREE ) { var THREE = require( 'three' ); } THREE.TrackballControls = function ( object, domElement ) { var _this = this; var STATE = { NONE: -1, ROTATE: 0, ZOOM: 1, PAN: 2, TOUCH_ROTATE: 3, TOUCH_ZOOM_PAN: 4 }; this.object = object; this.domElement = ( domElement !== undefined ) ? domElement : document; // API this.enabled = true; this.screen = { left: 0, top: 0, width: 0, height: 0 }; this.rotateSpeed = 1.0; this.zoomSpeed = 1.2; this.panSpeed = 0.3; this.noRotate = false; this.noZoom = false; this.noPan = false; this.noRoll = false; this.staticMoving = false; this.dynamicDampingFactor = 0.2; this.minDistance = 0; this.maxDistance = Infinity; this.keys = [ 65 /*A*/, 83 /*S*/, 68 /*D*/ ]; // internals this.target = new THREE.Vector3(); var EPS = 0.000001; var lastPosition = new THREE.Vector3(); var _state = STATE.NONE, _prevState = STATE.NONE, _eye = new THREE.Vector3(), _rotateStart = new THREE.Vector3(), _rotateEnd = new THREE.Vector3(), _zoomStart = new THREE.Vector2(), _zoomEnd = new THREE.Vector2(), _touchZoomDistanceStart = 0, _touchZoomDistanceEnd = 0, _panStart = new THREE.Vector2(), _panEnd = new THREE.Vector2(); // for reset this.target0 = this.target.clone(); this.position0 = this.object.position.clone(); this.up0 = this.object.up.clone(); // events var changeEvent = { type: 'change' }; var startEvent = { type: 'start'}; var endEvent = { type: 'end'}; // methods this.handleResize = function () { if ( this.domElement === document ) { this.screen.left = 0; this.screen.top = 0; this.screen.width = window.innerWidth; this.screen.height = window.innerHeight; } else { var box = this.domElement.getBoundingClientRect(); // adjustments come from similar code in the jquery offset() function var d = this.domElement.ownerDocument.documentElement; this.screen.left = box.left + window.pageXOffset - d.clientLeft; this.screen.top = box.top + window.pageYOffset - d.clientTop; this.screen.width = box.width; this.screen.height = box.height; } }; this.handleEvent = function ( event ) { if ( typeof this[ event.type ] == 'function' ) { this[ event.type ]( event ); } }; var getMouseOnScreen = ( function () { var vector = new THREE.Vector2(); return function ( pageX, pageY ) { vector.set( ( pageX - _this.screen.left ) / _this.screen.width, ( pageY - _this.screen.top ) / _this.screen.height ); return vector; }; }() ); var getMouseProjectionOnBall = ( function () { var vector = new THREE.Vector3(); var objectUp = new THREE.Vector3(); var mouseOnBall = new THREE.Vector3(); return function ( pageX, pageY ) { mouseOnBall.set( ( pageX - _this.screen.width * 0.5 - _this.screen.left ) / (_this.screen.width*.5), ( _this.screen.height * 0.5 + _this.screen.top - pageY ) / (_this.screen.height*.5), 0.0 ); var length = mouseOnBall.length(); if ( _this.noRoll ) { if ( length < Math.SQRT1_2 ) { mouseOnBall.z = Math.sqrt( 1.0 - length*length ); } else { mouseOnBall.z = .5 / length; } } else if ( length > 1.0 ) { mouseOnBall.normalize(); } else { mouseOnBall.z = Math.sqrt( 1.0 - length * length ); } _eye.copy( _this.object.position ).sub( _this.target ); vector.copy( _this.object.up ).setLength( mouseOnBall.y ) vector.add( objectUp.copy( _this.object.up ).cross( _eye ).setLength( mouseOnBall.x ) ); vector.add( _eye.setLength( mouseOnBall.z ) ); return vector; }; }() ); this.rotateCamera = (function(){ var axis = new THREE.Vector3(), quaternion = new THREE.Quaternion(); return function () { var angle = Math.acos( _rotateStart.dot( _rotateEnd ) / _rotateStart.length() / _rotateEnd.length() ); if ( angle ) { axis.crossVectors( _rotateStart, _rotateEnd ).normalize(); angle *= _this.rotateSpeed; quaternion.setFromAxisAngle( axis, -angle ); _eye.applyQuaternion( quaternion ); _this.object.up.applyQuaternion( quaternion ); _rotateEnd.applyQuaternion( quaternion ); if ( _this.staticMoving ) { _rotateStart.copy( _rotateEnd ); } else { quaternion.setFromAxisAngle( axis, angle * ( _this.dynamicDampingFactor - 1.0 ) ); _rotateStart.applyQuaternion( quaternion ); } } } }()); this.zoomCamera = function () { if ( _state === STATE.TOUCH_ZOOM_PAN ) { var factor = _touchZoomDistanceStart / _touchZoomDistanceEnd; _touchZoomDistanceStart = _touchZoomDistanceEnd; _eye.multiplyScalar( factor ); } else { var factor = 1.0 + ( _zoomEnd.y - _zoomStart.y ) * _this.zoomSpeed; if ( factor !== 1.0 && factor > 0.0 ) { _eye.multiplyScalar( factor ); if ( _this.staticMoving ) { _zoomStart.copy( _zoomEnd ); } else { _zoomStart.y += ( _zoomEnd.y - _zoomStart.y ) * this.dynamicDampingFactor; } } } }; this.panCamera = (function(){ var mouseChange = new THREE.Vector2(), objectUp = new THREE.Vector3(), pan = new THREE.Vector3(); return function () { mouseChange.copy( _panEnd ).sub( _panStart ); if ( mouseChange.lengthSq() ) { mouseChange.multiplyScalar( _eye.length() * _this.panSpeed ); pan.copy( _eye ).cross( _this.object.up ).setLength( mouseChange.x ); pan.add( objectUp.copy( _this.object.up ).setLength( mouseChange.y ) ); _this.object.position.add( pan ); _this.target.add( pan ); if ( _this.staticMoving ) { _panStart.copy( _panEnd ); } else { _panStart.add( mouseChange.subVectors( _panEnd, _panStart ).multiplyScalar( _this.dynamicDampingFactor ) ); } } } }()); this.checkDistances = function () { if ( !_this.noZoom || !_this.noPan ) { if ( _eye.lengthSq() > _this.maxDistance * _this.maxDistance ) { _this.object.position.addVectors( _this.target, _eye.setLength( _this.maxDistance ) ); } if ( _eye.lengthSq() < _this.minDistance * _this.minDistance ) { _this.object.position.addVectors( _this.target, _eye.setLength( _this.minDistance ) ); } } }; this.update = function () { _eye.subVectors( _this.object.position, _this.target ); if ( !_this.noRotate ) { _this.rotateCamera(); } if ( !_this.noZoom ) { _this.zoomCamera(); } if ( !_this.noPan ) { _this.panCamera(); } _this.object.position.addVectors( _this.target, _eye ); _this.checkDistances(); _this.object.lookAt( _this.target ); if ( lastPosition.distanceToSquared( _this.object.position ) > EPS ) { _this.dispatchEvent( changeEvent ); lastPosition.copy( _this.object.position ); } }; this.reset = function () { _state = STATE.NONE; _prevState = STATE.NONE; _this.target.copy( _this.target0 ); _this.object.position.copy( _this.position0 ); _this.object.up.copy( _this.up0 ); _eye.subVectors( _this.object.position, _this.target ); _this.object.lookAt( _this.target ); _this.dispatchEvent( changeEvent ); lastPosition.copy( _this.object.position ); }; // listeners function keydown( event ) { if ( _this.enabled === false ) return; window.removeEventListener( 'keydown', keydown ); _prevState = _state; if ( _state !== STATE.NONE ) { return; } else if ( event.keyCode === _this.keys[ STATE.ROTATE ] && !_this.noRotate ) { _state = STATE.ROTATE; } else if ( event.keyCode === _this.keys[ STATE.ZOOM ] && !_this.noZoom ) { _state = STATE.ZOOM; } else if ( event.keyCode === _this.keys[ STATE.PAN ] && !_this.noPan ) { _state = STATE.PAN; } } function keyup( event ) { if ( _this.enabled === false ) return; _state = _prevState; window.addEventListener( 'keydown', keydown, false ); } function mousedown( event ) { if ( _this.enabled === false ) return; event.preventDefault(); event.stopPropagation(); if ( _state === STATE.NONE ) { _state = event.button; } if ( _state === STATE.ROTATE && !_this.noRotate ) { _rotateStart.copy( getMouseProjectionOnBall( event.pageX, event.pageY ) ); _rotateEnd.copy( _rotateStart ); } else if ( _state === STATE.ZOOM && !_this.noZoom ) { _zoomStart.copy( getMouseOnScreen( event.pageX, event.pageY ) ); _zoomEnd.copy(_zoomStart); } else if ( _state === STATE.PAN && !_this.noPan ) { _panStart.copy( getMouseOnScreen( event.pageX, event.pageY ) ); _panEnd.copy(_panStart) } document.addEventListener( 'mousemove', mousemove, false ); document.addEventListener( 'mouseup', mouseup, false ); _this.dispatchEvent( startEvent ); } function mousemove( event ) { if ( _this.enabled === false ) return; event.preventDefault(); event.stopPropagation(); if ( _state === STATE.ROTATE && !_this.noRotate ) { _rotateEnd.copy( getMouseProjectionOnBall( event.pageX, event.pageY ) ); } else if ( _state === STATE.ZOOM && !_this.noZoom ) { _zoomEnd.copy( getMouseOnScreen( event.pageX, event.pageY ) ); } else if ( _state === STATE.PAN && !_this.noPan ) { _panEnd.copy( getMouseOnScreen( event.pageX, event.pageY ) ); } } function mouseup( event ) { if ( _this.enabled === false ) return; event.preventDefault(); event.stopPropagation(); _state = STATE.NONE; document.removeEventListener( 'mousemove', mousemove ); document.removeEventListener( 'mouseup', mouseup ); _this.dispatchEvent( endEvent ); } function mousewheel( event ) { if ( _this.enabled === false ) return; event.preventDefault(); event.stopPropagation(); var delta = 0; if ( event.wheelDelta ) { // WebKit / Opera / Explorer 9 delta = event.wheelDelta / 40; } else if ( event.detail ) { // Firefox delta = - event.detail / 3; } _zoomStart.y += delta * 0.01; _this.dispatchEvent( startEvent ); _this.dispatchEvent( endEvent ); } function touchstart( event ) { if ( _this.enabled === false ) return; switch ( event.touches.length ) { case 1: _state = STATE.TOUCH_ROTATE; _rotateStart.copy( getMouseProjectionOnBall( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY ) ); _rotateEnd.copy( _rotateStart ); break; case 2: _state = STATE.TOUCH_ZOOM_PAN; var dx = event.touches[ 0 ].pageX - event.touches[ 1 ].pageX; var dy = event.touches[ 0 ].pageY - event.touches[ 1 ].pageY; _touchZoomDistanceEnd = _touchZoomDistanceStart = Math.sqrt( dx * dx + dy * dy ); var x = ( event.touches[ 0 ].pageX + event.touches[ 1 ].pageX ) / 2; var y = ( event.touches[ 0 ].pageY + event.touches[ 1 ].pageY ) / 2; _panStart.copy( getMouseOnScreen( x, y ) ); _panEnd.copy( _panStart ); break; default: _state = STATE.NONE; } _this.dispatchEvent( startEvent ); } function touchmove( event ) { if ( _this.enabled === false ) return; event.preventDefault(); event.stopPropagation(); switch ( event.touches.length ) { case 1: _rotateEnd.copy( getMouseProjectionOnBall( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY ) ); break; case 2: var dx = event.touches[ 0 ].pageX - event.touches[ 1 ].pageX; var dy = event.touches[ 0 ].pageY - event.touches[ 1 ].pageY; _touchZoomDistanceEnd = Math.sqrt( dx * dx + dy * dy ); var x = ( event.touches[ 0 ].pageX + event.touches[ 1 ].pageX ) / 2; var y = ( event.touches[ 0 ].pageY + event.touches[ 1 ].pageY ) / 2; _panEnd.copy( getMouseOnScreen( x, y ) ); break; default: _state = STATE.NONE; } } function touchend( event ) { if ( _this.enabled === false ) return; switch ( event.touches.length ) { case 1: _rotateEnd.copy( getMouseProjectionOnBall( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY ) ); _rotateStart.copy( _rotateEnd ); break; case 2: _touchZoomDistanceStart = _touchZoomDistanceEnd = 0; var x = ( event.touches[ 0 ].pageX + event.touches[ 1 ].pageX ) / 2; var y = ( event.touches[ 0 ].pageY + event.touches[ 1 ].pageY ) / 2; _panEnd.copy( getMouseOnScreen( x, y ) ); _panStart.copy( _panEnd ); break; } _state = STATE.NONE; _this.dispatchEvent( endEvent ); } this.domElement.addEventListener( 'contextmenu', function ( event ) { event.preventDefault(); }, false ); this.domElement.addEventListener( 'mousedown', mousedown, false ); this.domElement.addEventListener( 'mousewheel', mousewheel, false ); this.domElement.addEventListener( 'DOMMouseScroll', mousewheel, false ); // firefox this.domElement.addEventListener( 'touchstart', touchstart, false ); this.domElement.addEventListener( 'touchend', touchend, false ); this.domElement.addEventListener( 'touchmove', touchmove, false ); window.addEventListener( 'keydown', keydown, false ); window.addEventListener( 'keyup', keyup, false ); this.handleResize(); // force an update at start this.update(); }; THREE.TrackballControls.prototype = Object.create( THREE.EventDispatcher.prototype );
jQuery(function($){ /** * TRANSLATOR PLUGIN * * Example: * var trans = jQuery("input[type='text'], textarea").not(":hidden").Translatable(["es", "en"]) ===> convert input/textarea into translatable panel * * trans.trigger("trans_integrate") ==> encode translations into owner element (destroy translation elements) */ /** * * @param languages => ["es", "en", 'fr'] * @param default_language => not important (deprecated) * @returns {$.fn.Translatable} * @constructor * select tag fix: save translated value in data-value */ var TRANSLATOR_counter = 1; $.fn.Translatable = function(languages, default_language){ languages = languages || ADMIN_TRANSLATIONS; // rescue from admin variable default_language = default_language?default_language:languages[0]; var self = $(this).not(".translated-item, .translate-item"); // decode translations // text: string containing translations // language(optional): get translation value for this language // return a hash of translations get_translations = function(text, language){ var translations_per_locale = {}; var res = ""; if(!text || text.trim().search("<!--") != 0){ // not translated string for(var i in languages){ translations_per_locale[languages[i]] = text; } res = translations_per_locale; }else{ // has translations var splitted = text.split('<!--:-->'); for(var i in splitted){ var str = splitted[i]; var m_atch = str.trim().match(/^<!--:([\w||-]{2,5})/); if(m_atch && m_atch.length == 2){ m_atch[1] = m_atch[1].replace("--", "") translations_per_locale[m_atch[1]] = str.replace("<!--:"+m_atch[1]+"-->", "") } } res = translations_per_locale; } if(language) return get_translation(res, language); else return res; } // get translation for a language get_translation = function(translations, language){ return language in translations?translations[language]:(languages[0] in translations?translations[languages[0]]: ""); } //if translations is a uniq language if(languages.length < 2){ self.each(function(){ $(this).val(get_translations($(this).val(), languages[0])); }); return this; } self.each(function(){ var ele = $(this); var tabs_title = [], tabs_content = [], translations = get_translations(ele.is('select') ? ele.data('value') : ele.val()), inputs = {}; var class_group = ele.parent().hasClass("form-group") ? "" : "form-group"; // decoding languages for(var ii in languages){ var l = languages[ii]; var key = "translation-"+l+"-"+TRANSLATOR_counter; tabs_title.push('<li role="presentation" class="pull-right '+(ii==0?"active":"")+'"><a href="#pane-'+key+'" role="tab" data-toggle="tab">'+ l.titleize()+'</a></li>'); var clone = ele.clone(true).attr({id: key, name: key, "data-name": key, 'data-translation_l': l, 'data-translation': "translation-"+l}).addClass("translate-item").val(get_translation(translations, l)); if(ii > 0 && !clone.hasClass('required_all_langs')) clone.removeClass('required'); // to permit enter empty values for secondary languages inputs[l] = clone; clone.wrap("<div class='tab-pane "+class_group+" trans_tab_item "+(ii==0?"active":"")+"' id='pane-"+key+"'/>"); tabs_content.push(clone.parent()); TRANSLATOR_counter++; // Auto Update Translates clone.bind('change change_in',function(){ var r = []; for(var l in inputs){ r.push("<!--:"+l+"-->"+inputs[l].val()+"<!--:-->"); } ele.val(r.join("")); if((typeof tinymce == "object") && ele.is('textarea') && ele.attr('id') && tinymce.get(ele.attr('id'))) tinymce.get(ele.attr('id')).setContent(r.join("")); }); } // creating tabs per translation var tabs = $('<div class="trans_panel" role="tabpanel"><ul class="nav nav-tabs" role="tablist"></ul><div class="tab-content"></div></div>'); tabs.find(".nav-tabs").append(tabs_title.reverse()); tabs.find(".tab-content").append(tabs_content); // unknown fields (fix for select fields) if(ele.is('select')){ var rep_field = $('<input type="hidden">').attr({class: ele.attr('class'), name: ele.attr('name')}) ele.replaceWith(rep_field); ele = rep_field; tabs_content[0].find('.translate-item').trigger('change'); } ele.addClass("translated-item").hide().after(tabs); //ele.data("tabs_content", tabs_content); ele.data("translation_inputs", inputs); // encode translation // remove tabs added by translation ele.bind("trans_integrate", function(){ var r = []; for(var l in inputs){ r.push("<!--:"+l+"-->"+inputs[l].val()+"<!--:-->"); } ele.show().val(r.join("")); if((typeof tinymce == "object") && ele.is('textarea') && ele.attr('id') && tinymce.get(ele.attr('id'))) tinymce.get(ele.attr('id')).setContent(r.join("")); tabs.remove(); $(this).removeClass("translated-item"); }); }); return this; } });
version https://git-lfs.github.com/spec/v1 oid sha256:9ebb4f98d1512ad94df125c0f8e8cfe5fb66f5abf078f099ef890502849b2f2e size 1981
// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /** * @name: S12.14_A1; * @section: 12.14; * @assertion: The production TryStatement : try Block Catch is evaluated as follows: 2. If Result(1).type is not throw, return Result(1); * @description: Executing TryStatement : try Block Catch. The statements doesn't cause actual exceptions; */ // CHECK#1 try { var x=0; } catch (e) { $ERROR('#1: If Result(1).type is not throw, return Result(1). Actual: 4 Return(Result(3))'); } // CHECK#2 var c1=0; try{ var x1=1; } finally { c1=1; } if(x1!==1){ $ERROR('#2.1: "try" block must be evaluated. Actual: try Block has not been evaluated'); } if (c1!==1){ $ERROR('#2.2: "finally" block must be evaluated. Actual: finally Block has not been evaluated'); } // CHECK#3 var c2=0; try{ var x2=1; } catch(e){ $ERROR('#3.1: If Result(1).type is not throw, return Result(1). Actual: 4 Return(Result(3))'); } finally{ c2=1; } if(x2!==1){ $ERROR('#3.2: "try" block must be evaluated. Actual: try Block has not been evaluated'); } if (c2!==1){ $ERROR('#3.3: "finally" block must be evaluated. Actual: finally Block has not been evaluated'); }
'use strict'; var gulp = require('gulp'); var del = require('del'); var sass = require('gulp-sass'); var webpack = require('webpack'); var WebpackDevServer = require('webpack-dev-server'); var runSequence = require('run-sequence'); var assign = require('object-assign'); gulp.task('default', ['watch', 'server']); gulp.task('clean', function () { return del(['./build/*']); }); gulp.task('copy', function () { gulp.src('./docs/index.html') .pipe(gulp.dest('./build')); gulp.src('./docs/img/**/*') .pipe(gulp.dest('./build/img')); gulp.src('./node_modules/slick-carousel/slick/fonts/*') .pipe(gulp.dest('./build/fonts')); return gulp.src('./node_modules/slick-carousel/slick/ajax-loader.gif') .pipe(gulp.dest('./build')); }); gulp.task('sass', function () { return gulp.src(['./docs/**/*.{scss,sass}']) .pipe(sass({ includePaths: ['bower_components', 'node_modules'], errLogToConsole: true})) .pipe(gulp.dest('./build')); }); gulp.task('watch', ['copy', 'sass'], function () { gulp.watch(['./docs/**/*.{scss,sass}'], ['sass']); gulp.watch(['./docs/index.html'], ['copy']); }); gulp.task('server', ['copy', 'sass'], function (callback) { var myConfig = require('./webpack.config'); myConfig.plugins = myConfig.plugins.concat( new webpack.DefinePlugin({ 'process.env': { 'NODE_ENV': JSON.stringify('dev_docs') } }) ); new WebpackDevServer(webpack(myConfig), { contentBase: './build', hot: true, debug: true }).listen(8080, '0.0.0.0', function (err, result) { if (err) { console.log(err); } }); callback(); }); // gulp tasks for building dist files gulp.task('dist-clean', function () { return del(['./dist/*']); }); var distConfig = require('./webpack.config.dist.js'); gulp.task('dist-unmin', function (cb) { var unminConfig = assign({}, distConfig); unminConfig.output.filename = 'react-slick.js'; return webpack(unminConfig, function (err, stat) { console.error(err); cb(); }); }); gulp.task('dist-min', function (cb) { var minConfig = assign({}, distConfig); minConfig.output.filename = 'react-slick.min.js'; minConfig.plugins = minConfig.plugins.concat( new webpack.optimize.UglifyJsPlugin({ compressor: { warnings: false } }) ); return webpack(minConfig, function (err, stat) { console.error(err); cb(); }); }); gulp.task('dist', function (cb) { runSequence('dist-clean', 'dist-unmin', 'dist-min', cb); });
/** * @file 窗口大小改变捕获器 * @author mengke01(kekee000@gmail.com) */ define( function (require) { var lang = require('common/lang'); var observable = require('common/observable'); /** * 获取事件参数 * * @param {MouseEvent} e 事件 * @return {Object} 事件参数 */ function getEvent(e) { return { originEvent: e }; } /** * 窗口大小改变处理 * * @param {Object} e 事件参数 */ function resizedetect(e) { if (false === this.events.resize) { return; } var event = getEvent(e); this.fire('resize', event); } /** * 窗口大小改变捕获器 * * @constructor * @param {HTMLElement} main 控制元素 * @param {Object} options 参数选项 * @param {HTMLElement} options.main 监控对象 */ function ResizeCapture(main, options) { this.main = main; options = options || {}; this.events = options.events || {}; this.debounce = options.debounce || 200; this.handlers = { resize: lang.debounce(lang.bind(resizedetect, this), this.debounce) }; this.start(); } ResizeCapture.prototype = { constructor: ResizeCapture, /** * 开始监听 * * @return {this} */ start: function () { if (!this.listening) { this.listening = true; window.addEventListener('resize', this.handlers.resize, false); } return this; }, /** * 停止监听 * * @return {this} */ stop: function () { if (this.listening) { this.listening = false; window.removeEventListener('resize', this.handlers.resize); } return this; }, /** * 是否监听中 * * @return {boolean} 是否 */ isListening: function () { return !!this.listening; }, /** * 注销 */ dispose: function () { this.stop(); this.main = this.events = null; this.un(); } }; observable.mixin(ResizeCapture.prototype); return ResizeCapture; } );
/** * @fileoverview Tests for config validator. * @author Brandon Mills * @copyright 2015 Brandon Mills * See LICENSE file in root directory for full license. */ "use strict"; //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ var assert = require("chai").assert, eslint = require("../../../lib/eslint"), validator = require("../../../lib/config/config-validator"); //------------------------------------------------------------------------------ // Tests //------------------------------------------------------------------------------ /** * Fake a rule object * @param {object} context context passed to the rules by eslint * @returns {object} mocked rule listeners * @private */ function mockRule(context) { return { "Program": function(node) { context.report(node, "Expected a validation error."); } }; } mockRule.schema = [ { "enum": ["first", "second"] } ]; /** * Fake a rule object * @param {object} context context passed to the rules by eslint * @returns {object} mocked rule listeners * @private */ function mockObjectRule(context) { return { "Program": function(node) { context.report(node, "Expected a validation error."); } }; } mockObjectRule.schema = { "enum": ["first", "second"] }; /** * Fake a rule with no options * @param {object} context context passed to the rules by eslint * @returns {object} mocked rule listeners * @private */ function mockNoOptionsRule(context) { return { "Program": function(node) { context.report(node, "Expected a validation error."); } }; } mockNoOptionsRule.schema = []; describe("Validator", function() { beforeEach(function() { eslint.defineRule("mock-rule", mockRule); }); describe("validate", function() { it("should do nothing with an empty config", function() { var fn = validator.validate.bind(null, {}, "tests"); assert.doesNotThrow(fn); }); it("should do nothing with an empty rules object", function() { var fn = validator.validate.bind(null, { rules: {} }, "tests"); assert.doesNotThrow(fn); }); it("should do nothing with a valid config", function() { var fn = validator.validate.bind(null, { rules: { "mock-rule": [2, "second"] } }, "tests"); assert.doesNotThrow(fn); }); it("should catch invalid rule options", function() { var fn = validator.validate.bind(null, { rules: { "mock-rule": [3, "third"] } }, "tests"); assert.throws(fn, "tests:\n\tConfiguration for rule \"mock-rule\" is invalid:\n\tSeverity should be one of the following: 0 = off, 1 = warning, 2 = error (you passed \"3\").\n\tValue \"third\" must be an enum value.\n"); }); it("should allow for rules with no options", function() { eslint.defineRule("mock-no-options-rule", mockNoOptionsRule); var fn = validator.validate.bind(null, { rules: { "mock-no-options-rule": 2 } }, "tests"); assert.doesNotThrow(fn); }); it("should not allow options for rules with no options", function() { eslint.defineRule("mock-no-options-rule", mockNoOptionsRule); var fn = validator.validate.bind(null, { rules: { "mock-no-options-rule": [2, "extra"] } }, "tests"); assert.throws(fn, "tests:\n\tConfiguration for rule \"mock-no-options-rule\" is invalid:\n\tValue \"extra\" has more items than allowed.\n"); }); it("should throw with an array environment", function() { var fn = validator.validate.bind(null, { env: [] }); assert.throws(fn, "Environment must not be an array"); }); it("should throw with a primitive environment", function() { var fn = validator.validate.bind(null, { env: 1 }); assert.throws(fn, "Environment must be an object"); }); it("should catch invalid environments", function() { var fn = validator.validate.bind(null, { env: {"browser": true, "invalid": true } }); assert.throws(fn, "Environment key \"invalid\" is unknown\n"); }); it("should catch disabled invalid environments", function() { var fn = validator.validate.bind(null, { env: {"browser": true, "invalid": false } }); assert.throws(fn, "Environment key \"invalid\" is unknown\n"); }); it("should do nothing with an undefined environment", function() { var fn = validator.validate.bind(null, {}); assert.doesNotThrow(fn); }); }); describe("getRuleOptionsSchema", function() { it("should return null for a missing rule", function() { assert.equal(validator.getRuleOptionsSchema("non-existent-rule"), null); }); it("should not modify object schema", function() { eslint.defineRule("mock-object-rule", mockObjectRule); assert.deepEqual(validator.getRuleOptionsSchema("mock-object-rule"), { "enum": ["first", "second"] }); }); }); describe("validateRuleOptions", function() { it("should throw for incorrect warning level", function() { var fn = validator.validateRuleOptions.bind(null, "mock-rule", 3, "tests"); assert.throws(fn, "tests:\n\tConfiguration for rule \"mock-rule\" is invalid:\n\tSeverity should be one of the following: 0 = off, 1 = warning, 2 = error (you passed \"3\").\n"); }); it("should only check warning level for nonexistent rules", function() { var fn = validator.validateRuleOptions.bind(null, "non-existent-rule", [3, "foobar"], "tests"); assert.throws(fn, "tests:\n\tConfiguration for rule \"non-existent-rule\" is invalid:\n\tSeverity should be one of the following: 0 = off, 1 = warning, 2 = error (you passed \"3\").\n"); }); it("should only check warning level for plugin rules", function() { var fn = validator.validateRuleOptions.bind(null, "plugin/rule", 3, "tests"); assert.throws(fn, "tests:\n\tConfiguration for rule \"plugin/rule\" is invalid:\n\tSeverity should be one of the following: 0 = off, 1 = warning, 2 = error (you passed \"3\").\n"); }); it("should throw for incorrect configuration values", function() { var fn = validator.validateRuleOptions.bind(null, "mock-rule", [2, "frist"], "tests"); assert.throws(fn, "tests:\n\tConfiguration for rule \"mock-rule\" is invalid:\n\tValue \"frist\" must be an enum value.\n"); }); it("should throw for too many configuration values", function() { var fn = validator.validateRuleOptions.bind(null, "mock-rule", [2, "first", "second"], "tests"); assert.throws(fn, "tests:\n\tConfiguration for rule \"mock-rule\" is invalid:\n\tValue \"first,second\" has more items than allowed.\n"); }); }); });
/** * Copyright (c) 2014,Egret-Labs.org * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the Egret-Labs.org nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY EGRET-LABS.ORG AND CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL EGRET-LABS.ORG AND CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var RES; (function (RES) { var SoundAnalyzer = (function (_super) { __extends(SoundAnalyzer, _super); function SoundAnalyzer() { _super.call(this); this._dataFormat = egret.URLLoaderDataFormat.SOUND; } SoundAnalyzer.prototype.analyzeData = function (resItem, data) { var name = resItem.name; if (this.fileDic[name] || !data) { return; } this.fileDic[name] = data; var config = resItem.data; if (config && config["soundType"]) { data.preload(config.soundType); } else { data.preload(egret.Sound.EFFECT); } }; return SoundAnalyzer; })(RES.BinAnalyzer); RES.SoundAnalyzer = SoundAnalyzer; SoundAnalyzer.prototype.__class__ = "RES.SoundAnalyzer"; })(RES || (RES = {}));
var path = require('path'); var Hapi = require('hapi'); module.exports = function(done) { var metrics = require('../../adapters/metrics')(); var server = new Hapi.Server(); server.connection(); server.views({ engines: { hbs: require('handlebars') }, relativeTo: path.resolve(__dirname, "..", ".."), path: './templates', helpersPath: './templates/helpers', layoutPath: './templates/layouts', partialsPath: './templates/partials', layout: 'default' }); server.stamp = require("../../lib/stamp")() server.gitHead = require("../../lib/git-head")() server.methods = require('./server-methods')(server); server.register(require('hapi-auth-cookie'), function(err) { if (err) { throw err; } server.app.cache = server.cache({ expiresIn: 30, segment: '|sessions' // Adding a '|' prefix to keep the cache keys same as in hapi 7.x and older }); server.auth.strategy('session', 'cookie', 'required', { password: '12345', redirectTo: '/login' }); server.register([{ register: require('crumb'), options: { cookieOptions: { isSecure: true } } }, require('../../adapters/bonbon') ], function(err) { server.route(require('../../routes/index')); server.start(function() { return done(server); }); }); }); };
'use strict'; var _ = require('lodash'); var chai = require('chai'); var should = chai.should(); var expect = chai.expect; var bitcore = require('../..'); var UnspentOutput = bitcore.Transaction.UnspentOutput; describe('UnspentOutput', function() { var sampleData1 = { 'address': 'mszYqVnqKoQx4jcTdJXxwKAissE3Jbrrc1', 'txId': 'a477af6b2667c29670467e4e0728b685ee07b240235771862318e29ddbe58458', 'outputIndex': 0, 'script': 'OP_DUP OP_HASH160 20 0x88d9931ea73d60eaf7e5671efc0552b912911f2a OP_EQUALVERIFY OP_CHECKSIG', 'satoshis': 1020000 }; var sampleData2 = { 'txid': 'e42447187db5a29d6db161661e4bc66d61c3e499690fe5ea47f87b79ca573986', 'vout': 1, 'address': 'mgBCJAsvzgT2qNNeXsoECg2uPKrUsZ76up', 'scriptPubKey': '76a914073b7eae2823efa349e3b9155b8a735526463a0f88ac', 'amount': 0.01080000 }; it('roundtrip from raw data', function() { expect(UnspentOutput(sampleData2).toObject()).to.deep.equal(sampleData2); }); it('can be created without "new" operand', function() { expect(UnspentOutput(sampleData1) instanceof UnspentOutput).to.equal(true); }); it('fails if no tx id is provided', function() { expect(function() { return new UnspentOutput({}); }).to.throw(); }); it('fails if vout is not a number', function() { var sample = _.cloneDeep(sampleData2); sample.vout = '1'; expect(function() { return new UnspentOutput(sample); }).to.throw(); }); it('displays nicely on the console', function() { var expected = '<UnspentOutput: a477af6b2667c29670467e4e0728b685ee07b240235771862318e29ddbe58458:0' + ', satoshis: 1020000, address: mszYqVnqKoQx4jcTdJXxwKAissE3Jbrrc1>'; expect(new UnspentOutput(sampleData1).inspect()).to.equal(expected); }); describe('checking the constructor parameters', function() { var notDefined = { 'txId': 'a477af6b2667c29670467e4e0728b685ee07b240235771862318e29ddbe58458', 'outputIndex': 0, 'script': 'OP_DUP OP_HASH160 20 0x88d9931ea73d60eaf7e5671efc0552b912911f2a OP_EQUALVERIFY OP_CHECKSIG', }; var zero = { 'txId': 'a477af6b2667c29670467e4e0728b685ee07b240235771862318e29ddbe58458', 'outputIndex': 0, 'script': 'OP_DUP OP_HASH160 20 0x88d9931ea73d60eaf7e5671efc0552b912911f2a OP_EQUALVERIFY OP_CHECKSIG', 'amount': 0 }; it('fails when no amount is defined', function() { expect(function() { return new UnspentOutput(notDefined); }).to.throw('Must provide an amount for the output'); }); it('does not fail when amount is zero', function() { expect(function() { return new UnspentOutput(zero); }).to.not.throw(); }); }); it('toString returns txid:vout', function() { var expected = 'a477af6b2667c29670467e4e0728b685ee07b240235771862318e29ddbe58458:0'; expect(new UnspentOutput(sampleData1).toString()).to.equal(expected); }); it('to/from JSON roundtrip', function() { var utxo = new UnspentOutput(sampleData2); expect( JSON.parse( UnspentOutput.fromJSON( UnspentOutput.fromObject( UnspentOutput.fromJSON( utxo.toJSON() ).toObject() ).toJSON() ).toJSON() ) ).to.deep.equal(sampleData2); }); });
module.exports = function(grunt) { // Project Configuration grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), watch: { jade: { files: ['app/views/**'], options: { livereload: true, }, }, js: { files: ['public/js/**', 'app/**/*.js'], tasks: ['jshint'], options: { livereload: true, }, }, html: { files: ['public/views/**'], options: { livereload: true, }, }, css: { files: ['public/css/**'], options: { livereload: true } } }, jshint: { all: ['gruntfile.js', 'public/js/**/*.js', 'test/**/*.js', 'app/**/*.js'] }, nodemon: { dev: { options: { file: 'server.js', args: [], ignoredFiles: ['README.md', 'node_modules/**', '.DS_Store'], watchedExtensions: ['js'], watchedFolders: ['app', 'config'], debug: true, delayTime: 1, env: { PORT: 3000 }, cwd: __dirname } } }, concurrent: { tasks: ['nodemon', 'watch'], options: { logConcurrentOutput: true } }, mochaTest: { options: { reporter: 'spec' }, src: ['test/**/*.js'] }, env: { test: { NODE_ENV: 'test' } } }); //Load NPM tasks grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-mocha-test'); grunt.loadNpmTasks('grunt-nodemon'); grunt.loadNpmTasks('grunt-concurrent'); grunt.loadNpmTasks('grunt-env'); //Making grunt default to force in order not to break the project. grunt.option('force', true); //Default task(s). grunt.registerTask('default', ['jshint', 'concurrent']); //Test task. grunt.registerTask('test', ['env:test', 'mochaTest']); };
var assert = require('assert') var crypto = require('crypto') var ecurve = require('ecurve') var networks = require('../src/networks') var sinon = require('sinon') var BigInteger = require('bigi') var ECKey = require('../src/eckey') var fixtures = require('./fixtures/eckey.json') describe('ECKey', function() { describe('constructor', function() { it('defaults to compressed', function() { var privKey = new ECKey(BigInteger.ONE) assert.equal(privKey.pub.compressed, true) }) it('supports the uncompressed flag', function() { var privKey = new ECKey(BigInteger.ONE, false) assert.equal(privKey.pub.compressed, false) }) fixtures.valid.forEach(function(f) { it('calculates the matching pubKey for ' + f.d, function() { var d = new BigInteger(f.d) var privKey = new ECKey(d) assert.equal(privKey.pub.Q.toString(), f.Q) }) }) fixtures.invalid.constructor.forEach(function(f) { it('throws on ' + f.d, function() { var d = new BigInteger(f.d) assert.throws(function() { new ECKey(d) }, new RegExp(f.exception)) }) }) }) it('uses the secp256k1 curve by default', function() { var secp256k1 = ecurve.getCurveByName('secp256k1') for (var property in secp256k1) { // FIXME: circular structures in ecurve if (property === 'G') continue if (property === 'infinity') continue var actual = ECKey.curve[property] var expected = secp256k1[property] assert.deepEqual(actual, expected) } }) describe('fromWIF', function() { fixtures.valid.forEach(function(f) { f.WIFs.forEach(function(wif) { it('imports ' + wif.string + ' correctly', function() { var privKey = ECKey.fromWIF(wif.string) assert.equal(privKey.d.toString(), f.d) assert.equal(privKey.pub.compressed, wif.compressed) }) }) }) fixtures.invalid.WIF.forEach(function(f) { it('throws on ' + f.string, function() { assert.throws(function() { ECKey.fromWIF(f.string) }, new RegExp(f.exception)) }) }) }) describe('toWIF', function() { fixtures.valid.forEach(function(f) { f.WIFs.forEach(function(wif) { it('exports ' + wif.string + ' correctly', function() { var privKey = ECKey.fromWIF(wif.string) var network = networks[wif.network] var result = privKey.toWIF(network) assert.equal(result, wif.string) }) }) }) }) describe('makeRandom', function() { var exWIF = 'KwMWvwRJeFqxYyhZgNwYuYjbQENDAPAudQx5VEmKJrUZcq6aL2pv' var exPrivKey = ECKey.fromWIF(exWIF) var exBuffer = exPrivKey.d.toBuffer(32) describe('uses default crypto RNG', function() { beforeEach(function() { sinon.stub(crypto, 'randomBytes').returns(exBuffer) }) afterEach(function() { crypto.randomBytes.restore() }) it('generates a ECKey', function() { var privKey = ECKey.makeRandom() assert.equal(privKey.toWIF(), exWIF) }) it('supports compression', function() { assert.equal(ECKey.makeRandom(true).pub.compressed, true) assert.equal(ECKey.makeRandom(false).pub.compressed, false) }) }) it('allows a custom RNG to be used', function() { function rng(size) { return exBuffer.slice(0, size) } var privKey = ECKey.makeRandom(undefined, rng) assert.equal(privKey.toWIF(), exWIF) }) }) describe('signing', function() { var hash = crypto.randomBytes(32) var priv = ECKey.makeRandom() var signature = priv.sign(hash) it('should verify against the public key', function() { assert(priv.pub.verify(hash, signature)) }) it('should not verify against the wrong public key', function() { var priv2 = ECKey.makeRandom() assert(!priv2.pub.verify(hash, signature)) }) }) })
/** @module ember @submodule ember-htmlbars */ import { get } from 'ember-metal/property_get'; import { isArray } from "ember-metal/utils"; export default function bindAttrClassHelper(params) { var value = params[0]; if (isArray(value)) { value = get(value, 'length') !== 0; } if (value === true) { return params[1]; } if (value === false || value === undefined || value === null) { return ""; } else { return value; } }
import Ember from 'ember'; import Resolver from 'ember/resolver'; import loadInitializers from 'ember/load-initializers'; import config from './config/environment'; Ember.MODEL_FACTORY_INJECTIONS = true; const App = Ember.Application.extend({ modulePrefix: config.modulePrefix, podModulePrefix: config.podModulePrefix, Resolver: Resolver }); loadInitializers( App, config.modulePrefix ); export default App;
var vows = require('vows'); var assert = require('assert'); var suite = vows.describe('jStat.distribution'); require('../env.js'); suite.addBatch({ 'hypergeometric pdf': { 'topic': function() { return jStat; }, 'check pdf calculation': function(jStat) { var tol = 0.0000001; // How many 1s were obtained by sampling? var successes = [10, 16]; // How big was the source population? var population = [100, 3589]; // How many 1s were in it? var available = [20, 16]; // How big a sample was taken? var draws = [15, 2290]; // What was the probability of exactly this many 1s? // Obtained from the calculator at // <http://www.geneprof.org/GeneProf/tools/hypergeometric.jsp> var answers = [0.000017532028090435493, 0.0007404996809672229]; for (var i = 0; i < answers.length; i++) { // See if we get the right answer for each calculation. var calculated = jStat.hypgeom.pdf(successes[i], population[i], available[i], draws[i]); // None of the answers should be NaN assert(!isNaN(calculated)); // And they should all match assert.epsilon(tol, calculated, answers[i]); } } } }); suite.export(module);
/************************ * Test orderItemOptionTypeVm: * Creates viewmodels of the orderItemOptionVms for a given OrderItem. * See orderItemOptionVm.js * There is one OptionType vm for each option type (e.g., 'sauce"). * Each vm appears as one of the tabs on the orderItem view. *******************************/ describe("OrderItemOptionTypeVm: ", function () { var lookups, manager, model, optionTypeVm; testFns.beforeEachApp('emFactoryMock'); beforeEach(inject(function(entityManagerFactory, _lookups_, _model_, orderItemOptionTypeVm) { lookups = _lookups_; lookups.ready(); manager = entityManagerFactory.getManager(); model = _model_; optionTypeVm = orderItemOptionTypeVm; })); describe("when create OptionTypeVms for the 'Plain Cheese' pizza", function () { var crust, orderItem, product, spice, vms; beforeEach(function () { var order = createOrder(); product = lookups.products.byName("Plain Cheese")[0]; orderItem = order.addNewItem(product); vms = optionTypeVm.createVms(orderItem); crust = vms[0]; spice = vms[1]; }); it("pizza has two vms", function () { expect(vms.length).toEqual(2); }); it("pizza has 'crust' and 'spice' vms in that order", function () { expect(crust.type).toEqual('crust'); expect(spice.type).toEqual('spice'); }); it("the 'crust' vm exposes the single choice view", function () { expect(crust.choiceTemplate).toMatch(/orderItemOptionOne/i); }); it("the 'spice' vm exposes the multiple choice view", function () { expect(spice.choiceTemplate).toMatch(/orderItemOptionMany/i); }); it("the 'spice' vm says all items are free", function () { expect(spice.allFree).toBe(true); expect(spice.someCostMore).toBe(false); }); }); describe("when create OptionTypeVms for the 'Chicken Caesar' salad", function () { var orderItem, meat, product, saladDressing, vms; beforeEach(function () { var order = createOrder(); product = lookups.products.byName("Chicken Caesar Salad")[0]; orderItem = order.addNewItem(product); vms = optionTypeVm.createVms(orderItem); meat = vms[2]; saladDressing = vms[4]; }); it("pizza has five vms", function () { expect(vms.length).toEqual(5); }); it("the title of the last salad dressing vm is in 'Title' case", function () { expect(saladDressing.title).toEqual('Salad Dressing'); }); it("salad dressings are not free", function () { expect(saladDressing.allFree).toBe(false); }); it("some meat toppings cost more", function () { expect(meat.type).toEqual('meat'); expect(meat.someCostMore).toBe(true); expect(meat.allFree).toBe(false); }); }); /* helpers */ function createOrder(){ var pending = lookups.OrderStatus.Pending; return model.Order.create(manager, { orderStatus: pending}); } });