text
stringlengths
2
1.05M
/** * {@link https://api.slack.com/types/im|DM} */ var inherits = require('inherits'); var BaseChannel = require('./base-channel'); function DM(opts) { BaseChannel.call(this, 'DM', opts); } inherits(DM, BaseChannel); module.exports = DM;
/** * DO NOT EDIT THIS FILE. * See the following change record for more information, * https://www.drupal.org/node/2815083 * @preserve **/ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } (function (Drupal, Backbone) { Drupal.quickedit.BaseModel = Backbone.Model.extend({ initialize: function initialize(options) { this.__initialized = true; return Backbone.Model.prototype.initialize.call(this, options); }, set: function set(key, val, options) { if (this.__initialized) { if (_typeof(key) === 'object') { key.validate = true; } else { if (!options) { options = {}; } options.validate = true; } } return Backbone.Model.prototype.set.call(this, key, val, options); } }); })(Drupal, Backbone);
export default { name: 'TableFooter', render(h) { const sums = []; this.columns.forEach((column, index) => { if (index === 0) { sums[index] = this.sumText; return; } const values = this.store.states.data.map(item => Number(item[column.property])); const precisions = []; let notNumber = true; values.forEach(value => { if (!isNaN(value)) { notNumber = false; let decimal = ('' + value).split('.')[1]; precisions.push(decimal ? decimal.length : 0); } }); const precision = Math.max.apply(null, precisions); if (!notNumber) { sums[index] = values.reduce((prev, curr) => { const value = Number(curr); if (!isNaN(value)) { return parseFloat((prev + curr).toFixed(Math.min(precision, 20))); } else { return prev; } }, 0); } else { sums[index] = ''; } }); return ( <table class="ivu-table__footer" cellspacing="0" cellpadding="0" border="0"> <colgroup> { this._l(this.columns, column => <col name={ column.id } width={ column.realWidth || column.width } />) } { !this.fixed && this.layout.gutterWidth ? <col name="gutter" width={ this.layout.scrollY ? this.layout.gutterWidth : '' }></col> : '' } </colgroup> <tbody class={ [{ 'has-gutter': this.hasGutter }] }> <tr> { this._l(this.columns, (column, cellIndex) => <td colspan={ column.colSpan } rowspan={ column.rowSpan } class={ [column.id, column.headerAlign, column.className || '', this.isCellHidden(cellIndex, this.columns) ? 'is-hidden' : '', !column.children ? 'is-leaf' : '', column.labelClassName] }> <div class={ ['cell', column.labelClassName] }> { this.summaryMethod ? this.summaryMethod({ columns: this.columns, data: this.store.states.data })[cellIndex] : sums[cellIndex] } </div> </td> ) } { this.hasGutter ? <td class="gutter" style={{ width: this.layout.scrollY ? this.layout.gutterWidth + 'px' : '0' }}></td> : '' } </tr> </tbody> </table> ); }, props: { fixed: String, store: { required: true }, layout: { required: true }, summaryMethod: Function, sumText: String, border: Boolean, defaultSort: { type: Object, default() { return { prop: '', order: '' }; } } }, computed: { isAllSelected() { return this.store.states.isAllSelected; }, columnsCount() { return this.store.states.columns.length; }, leftFixedCount() { return this.store.states.fixedColumns.length; }, rightFixedCount() { return this.store.states.rightFixedColumns.length; }, columns() { return this.store.states.columns; }, hasGutter() { return !this.fixed && this.layout.gutterWidth; } }, methods: { isCellHidden(index, columns) { if (this.fixed === true || this.fixed === 'left') { return index >= this.leftFixedCount; } else if (this.fixed === 'right') { let before = 0; for (let i = 0; i < index; i++) { before += columns[i].colSpan; } return before < this.columnsCount - this.rightFixedCount; } else { return (index < this.leftFixedCount) || (index >= this.columnsCount - this.rightFixedCount); } } } };
// Copyright (c) 2009-2017 SAP SE, All Rights Reserved /** * @fileOverview The Unified Shell's AppLifeCycle service enables plug-ins to enquire the which * application is currently displayed and listen to life cycle events. * * * @version 1.74.0 */ sap.ui.define([ "sap/ui/base/EventProvider", "sap/ushell/TechnicalParameters" ], function (EventProvider, TechnicalParameters) { "use strict"; /*global hasher*/ var S_APP_LOADED_EVENT = "appLoaded"; /** * The Unified Shell's AppLifeCycle service * This method MUST be called by the Unified Shell's container only, others * MUST call <code>sap.ushell.Container.getService("AppLifeCycle")</code>. * Constructs a new instance of the AppLifeCycle service. * * @name sap.ushell.services.AppLifeCycle * * @param {object} oAdapter * The service adapter for the AppLifeCycle service, * as already provided by the container * @param {object} oContainerInterface interface * @param {string} sParameter Service instantiation * @param {object} oConfig service configuration (not in use) * * * @constructor * @class * @see sap.ushell.services.Container#getService * * @since 1.38 * @public */ function AppLifeCycle (oAdapter, oContainerInterface, sParameter, oConfig) { var oCurrentApplication, oEventProvider, oViewPortContainer; /** * Get information about the currently running application. The function returns an * object with following parameters: * <ul> * <li> applicationType: “UI5|WDA|NWBC|URL|TR” </li> * <li> componentInstance: reference to component (only for type SAPUI5) </li> * <li> homePage: true is Shell-home is currently displayed </li> * <li> getTechnicalParameter: returns the value of a technical parameter for the given application. This method is for SAP internal usage only. </li> * <li> getintent: returns a Promise that resolves with the current shell hash as an Object. * See sap.ushell.services.URLParsing#parseShellHash for details. This property is for SAP internal usage only. </li> * </ul> * @returns {object} * the currently alive application component or undefined if no component alive * * @since 1.38 * @public * @alias sap.ushell.services.AppLifeCycle#getCurrentApplication */ this.getCurrentApplication = function () { return oCurrentApplication; }; /** * Attaches an event handler for the appLoaded event. This event handler will be triggered * each time an application has been loaded. * * @param {object} oData * An object that will be passed to the handler along with the event object when the * event is fired. * @param {function} fnFunction * The handler function to call when the event occurs. * @param {object} oListener * The object that wants to be notified when the event occurs (this context within the * handler function). * @since 1.38 * @public * @alias sap.ushell.services.AppLifeCycle#attachAppLoaded */ this.attachAppLoaded = function (oData, fnFunction, oListener) { oEventProvider.attachEvent(S_APP_LOADED_EVENT, oData, fnFunction, oListener); }; /** * Detaches an event handler from the EventProvider. * * @param {function} fnFunction * The handler function that has to be detached from the EventProvider. * @param {object} oListener * The object that wanted to be notified when the event occurred * @since 1.38 * @public * @alias sap.ushell.services.AppLifeCycle#detachAppLoaded */ this.detachAppLoaded = function (fnFunction, oListener) { oEventProvider.detachEvent(S_APP_LOADED_EVENT, fnFunction, oListener); }; // CONSTRUCTOR CODE // oEventProvider = new EventProvider(); // only continue executing the constructor if the view port container exists in expected format oViewPortContainer = sap.ui.getCore().byId("viewPortContainer"); if (!oViewPortContainer || typeof oViewPortContainer.attachAfterNavigate !== "function") { jQuery.sap.log.error( "Error during instantiation of AppLifeCycle service", "Could not attach to afterNavigate event", "sap.ushell.services.AppLifeCycle" ); return; } oViewPortContainer.attachAfterNavigate(function (oEvent) { var oComponentContainer, oApplicationContainer, sApplicationType, oComponentInstance, sComponentInstanceId, bHomePage = false; if (oEvent.mParameters.toId.indexOf("applicationShellPage") === 0) { // instance is a shell, which hosts the ApplicationContainer oApplicationContainer = oEvent.mParameters.to.getApp(); } else if (oEvent.mParameters.toId.indexOf("application") === 0) { // instance is already the ApplicationContainer oApplicationContainer = oEvent.mParameters.to; } // try to get component instance if accessible via the component handle if (oApplicationContainer && typeof oApplicationContainer.getComponentHandle === "function" && oApplicationContainer.getComponentHandle()) { oComponentInstance = oApplicationContainer.getComponentHandle().getInstance(); } else if (oApplicationContainer) { oComponentContainer = oApplicationContainer.getAggregation("child"); if (oComponentContainer) { oComponentInstance = oComponentContainer.getComponentInstance(); } } else { oComponentInstance = sap.ui.getCore().getComponent(oEvent.mParameters.to.getComponent()); } // determine if we're dealing with home page by checking the component instance id if (oComponentInstance) { sComponentInstanceId = oComponentInstance.getId(); // TODO unit test // In the past Homepage and AppFinder were the same component, so Homepage was // also true for the AppFinder bHomePage = sComponentInstanceId.indexOf("Shell-home-component") !== -1 || sComponentInstanceId.indexOf("Shell-appfinder-component") !== -1; } // type can either be read from application container or set to UI5 if component instance exists sApplicationType = oApplicationContainer && typeof oApplicationContainer.getApplicationType === "function" && oApplicationContainer.getApplicationType(); if ((!sApplicationType || sApplicationType === "URL") && oComponentInstance) { sApplicationType = "UI5"; } oCurrentApplication = { applicationType: sApplicationType, componentInstance: oComponentInstance, homePage: bHomePage, getTechnicalParameter: function (sParameterName) { return TechnicalParameters.getParameterValue(sParameterName, oComponentInstance, oApplicationContainer, sApplicationType); }, getIntent: function () { var sHash = hasher && hasher.getHash(); if (!sHash) { return Promise.reject("Could not identify current application hash"); } var oService = sap.ushell.Container.getServiceAsync("URLParsing"); return oService.then(function (oParsingService) { return oParsingService.parseShellHash(sHash); }); } }; setTimeout(function () { oEventProvider.fireEvent(S_APP_LOADED_EVENT, oCurrentApplication); }, 0); }); } AppLifeCycle.hasNoAdapter = true; return AppLifeCycle; }, true/* bExport */);
const { ajax } = require("jquery"); $("#search").keyup(function(){ $letter = $("#search").innerText(); console.log($letter); // $.ajax({ // }) });
// This file was procedurally generated from the following sources: // - src/class-elements/private-async-method-cannot-escape-token.case // - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template /*--- description: The pound signal in the private async method cannot be escaped (class expression) esid: prod-ClassElement features: [class-methods-private, async-functions, class] flags: [generated] negative: phase: parse type: SyntaxError info: | PrivateName:: # IdentifierName U+0023 is the escape sequence for # ---*/ $DONOTEVALUATE(); var C = class { async \u0023m() { return 42; } };
import { login, logout, getInfo } from '@/api/user' import { getToken, setToken, removeToken } from '@/utils/auth' import router, { resetRouter } from '@/router' const state = { token: getToken(), name: '', avatar: '', introduction: '', roles: [] } const mutations = { SET_TOKEN: (state, token) => { state.token = token }, SET_INTRODUCTION: (state, introduction) => { state.introduction = introduction }, SET_NAME: (state, name) => { state.name = name }, SET_AVATAR: (state, avatar) => { state.avatar = avatar }, SET_ROLES: (state, roles) => { state.roles = roles } } const actions = { // user login login({ commit }, userInfo) { const { username, password } = userInfo return new Promise((resolve, reject) => { login({ username: username.trim(), password: password }).then(response => { const { data } = response commit('SET_TOKEN', data.token) // 状态管理store里面存储了一份儿 setToken(data.token) // cookie存了一份儿 resolve() }).catch(error => { reject(error) }) }) }, // get user info 拉取用户信息 getInfo({ commit, state }) { return new Promise((resolve, reject) => { getInfo(state.token).then(response => { const { data } = response if (!data) { reject('Verification failed, please Login again.') } const { roles, name, avatar, introduction } = data // roles must be a non-empty array if (!roles || roles.length <= 0) { reject('getInfo: roles must be a non-null array!') } commit('SET_ROLES', roles) commit('SET_NAME', name) commit('SET_AVATAR', avatar) commit('SET_INTRODUCTION', introduction) resolve(data) }).catch(error => { reject(error) }) }) }, // user logout logout({ commit, state, dispatch }) { return new Promise((resolve, reject) => { logout(state.token).then(() => { commit('SET_TOKEN', '') commit('SET_ROLES', []) removeToken() resetRouter() // reset visited views and cached views // to fixed https://github.com/PanJiaChen/vue-element-admin/issues/2485 dispatch('tagsView/delAllViews', null, { root: true }) resolve() }).catch(error => { reject(error) }) }) }, // remove token resetToken({ commit }) { return new Promise(resolve => { commit('SET_TOKEN', '') commit('SET_ROLES', []) removeToken() resolve() }) }, // dynamically modify permissions async changeRoles({ commit, dispatch }, role) { const token = role + '-token' commit('SET_TOKEN', token) setToken(token) const { roles } = await dispatch('getInfo') resetRouter() // generate accessible routes map based on roles const accessRoutes = await dispatch('permission/generateRoutes', roles, { root: true }) // dynamically add accessible routes router.addRoutes(accessRoutes) // reset visited views and cached views dispatch('tagsView/delAllViews', null, { root: true }) } } export default { namespaced: true, state, mutations, actions }
/** * @fileoverview This is templates or axis view. * @author NHN Ent. * FE Development Lab <dl_javascript@nhnent.com> */ import templateMaker from '../../helpers/templateMaker'; const htmls = { HTML_AXIS_TICK_LINE: '<div class="tui-chart-tick-line"' + ' style="{{ positionType }}:{{ positionValue }}px;{{ sizeType }}:{{ size }}px"></div>', HTML_AXIS_TICK: '<div class="tui-chart-tick" style="{{ cssText }}"></div>', HTML_AXIS_LABEL: '<div class="tui-chart-label{{ additionalClass }}" style="{{ cssText }}">' + '<span{{ spanCssText }}>{{ label }}</span></div>' }; export default { tplTickLine: templateMaker.template(htmls.HTML_AXIS_TICK_LINE), tplAxisTick: templateMaker.template(htmls.HTML_AXIS_TICK), tplAxisLabel: templateMaker.template(htmls.HTML_AXIS_LABEL) };
import m from "mithril"; export const Settings = { view: ({ attrs: { actions } }) => [ m("h3", "Settings Page"), m("button.btn.btn-danger", { onclick: () => actions.settings.logout() }, "Logout") ] };
// META: title=IDBObjectStore.get() - key is a Date // META: script=support.js // @author Microsoft <https://www.microsoft.com> "use strict"; let db; const t = async_test(); const record = { key: new Date(), property: "data" }; const open_rq = createdb(t); open_rq.onupgradeneeded = event => { db = event.target.result; db.createObjectStore("store", { keyPath: "key" }) .add(record); }; open_rq.onsuccess = event => { const rq = db.transaction("store") .objectStore("store") .get(record.key); rq.onsuccess = t.step_func(event => { assert_equals(event.target.result.key.valueOf(), record.key.valueOf()); assert_equals(event.target.result.property, record.property); t.done(); }); };
/** * @file seek-bar.js */ import Slider from '../../slider/slider.js'; import Component from '../../component.js'; import {IS_IOS, IS_ANDROID} from '../../utils/browser.js'; import * as Dom from '../../utils/dom.js'; import * as Fn from '../../utils/fn.js'; import formatTime from '../../utils/format-time.js'; import {silencePromise} from '../../utils/promise'; import './load-progress-bar.js'; import './play-progress-bar.js'; import './mouse-time-display.js'; // The number of seconds the `step*` functions move the timeline. const STEP_SECONDS = 5; // The interval at which the bar should update as it progresses. const UPDATE_REFRESH_INTERVAL = 30; /** * Seek bar and container for the progress bars. Uses {@link PlayProgressBar} * as its `bar`. * * @extends Slider */ class SeekBar extends Slider { /** * Creates an instance of this class. * * @param {Player} player * The `Player` that this class should be attached to. * * @param {Object} [options] * The key/value store of player options. */ constructor(player, options) { super(player, options); this.setEventHandlers_(); } /** * Sets the event handlers * * @private */ setEventHandlers_() { this.update = Fn.throttle(Fn.bind(this, this.update), UPDATE_REFRESH_INTERVAL); this.on(this.player_, 'timeupdate', this.update); this.on(this.player_, 'ended', this.handleEnded); // when playing, let's ensure we smoothly update the play progress bar // via an interval this.updateInterval = null; this.on(this.player_, ['playing'], () => { this.clearInterval(this.updateInterval); this.updateInterval = this.setInterval(() =>{ this.requestAnimationFrame(() => { this.update(); }); }, UPDATE_REFRESH_INTERVAL); }); this.on(this.player_, ['ended', 'pause', 'waiting'], () => { this.clearInterval(this.updateInterval); }); this.on(this.player_, ['timeupdate', 'ended'], this.update); } /** * Create the `Component`'s DOM element * * @return {Element} * The element that was created. */ createEl() { return super.createEl('div', { className: 'vjs-progress-holder' }, { 'aria-label': this.localize('Progress Bar') }); } /** * This function updates the play progress bar and accessibility * attributes to whatever is passed in. * * @param {number} currentTime * The currentTime value that should be used for accessibility * * @param {number} percent * The percentage as a decimal that the bar should be filled from 0-1. * * @private */ update_(currentTime, percent) { const duration = this.player_.duration(); // machine readable value of progress bar (percentage complete) this.el_.setAttribute('aria-valuenow', (percent * 100).toFixed(2)); // human readable value of progress bar (time complete) this.el_.setAttribute('aria-valuetext', this.localize('progress bar timing: currentTime={1} duration={2}', [formatTime(currentTime, duration), formatTime(duration, duration)], '{1} of {2}')); // Update the `PlayProgressBar`. this.bar.update(Dom.getBoundingClientRect(this.el_), percent); } /** * Update the seek bar's UI. * * @param {EventTarget~Event} [event] * The `timeupdate` or `ended` event that caused this to run. * * @listens Player#timeupdate * * @returns {number} * The current percent at a number from 0-1 */ update(event) { const percent = super.update(); this.update_(this.getCurrentTime_(), percent); return percent; } /** * Get the value of current time but allows for smooth scrubbing, * when player can't keep up. * * @return {number} * The current time value to display * * @private */ getCurrentTime_() { return (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime(); } /** * We want the seek bar to be full on ended * no matter what the actual internal values are. so we force it. * * @param {EventTarget~Event} [event] * The `timeupdate` or `ended` event that caused this to run. * * @listens Player#ended */ handleEnded(event) { this.update_(this.player_.duration(), 1); } /** * Get the percentage of media played so far. * * @return {number} * The percentage of media played so far (0 to 1). */ getPercent() { const percent = this.getCurrentTime_() / this.player_.duration(); return percent >= 1 ? 1 : percent; } /** * Handle mouse down on seek bar * * @param {EventTarget~Event} event * The `mousedown` event that caused this to run. * * @listens mousedown */ handleMouseDown(event) { if (!Dom.isSingleLeftClick(event)) { return; } // Stop event propagation to prevent double fire in progress-control.js event.stopPropagation(); this.player_.scrubbing(true); this.videoWasPlaying = !this.player_.paused(); this.player_.pause(); super.handleMouseDown(event); } /** * Handle mouse move on seek bar * * @param {EventTarget~Event} event * The `mousemove` event that caused this to run. * * @listens mousemove */ handleMouseMove(event) { if (!Dom.isSingleLeftClick(event)) { return; } let newTime = this.calculateDistance(event) * this.player_.duration(); // Don't let video end while scrubbing. if (newTime === this.player_.duration()) { newTime = newTime - 0.1; } // Set new time (tell player to seek to new time) this.player_.currentTime(newTime); } enable() { super.enable(); const mouseTimeDisplay = this.getChild('mouseTimeDisplay'); if (!mouseTimeDisplay) { return; } mouseTimeDisplay.show(); } disable() { super.disable(); const mouseTimeDisplay = this.getChild('mouseTimeDisplay'); if (!mouseTimeDisplay) { return; } mouseTimeDisplay.hide(); } /** * Handle mouse up on seek bar * * @param {EventTarget~Event} event * The `mouseup` event that caused this to run. * * @listens mouseup */ handleMouseUp(event) { super.handleMouseUp(event); // Stop event propagation to prevent double fire in progress-control.js if (event) { event.stopPropagation(); } this.player_.scrubbing(false); /** * Trigger timeupdate because we're done seeking and the time has changed. * This is particularly useful for if the player is paused to time the time displays. * * @event Tech#timeupdate * @type {EventTarget~Event} */ this.player_.trigger({ type: 'timeupdate', target: this, manuallyTriggered: true }); if (this.videoWasPlaying) { silencePromise(this.player_.play()); } } /** * Move more quickly fast forward for keyboard-only users */ stepForward() { this.player_.currentTime(this.player_.currentTime() + STEP_SECONDS); } /** * Move more quickly rewind for keyboard-only users */ stepBack() { this.player_.currentTime(this.player_.currentTime() - STEP_SECONDS); } /** * Toggles the playback state of the player * This gets called when enter or space is used on the seekbar * * @param {EventTarget~Event} event * The `keydown` event that caused this function to be called * */ handleAction(event) { if (this.player_.paused()) { this.player_.play(); } else { this.player_.pause(); } } /** * Called when this SeekBar has focus and a key gets pressed down. By * default it will call `this.handleAction` when the key is space or enter. * * @param {EventTarget~Event} event * The `keydown` event that caused this function to be called. * * @listens keydown */ handleKeyPress(event) { // Support Space (32) or Enter (13) key operation to fire a click event if (event.which === 32 || event.which === 13) { event.preventDefault(); this.handleAction(event); } else if (super.handleKeyPress) { // Pass keypress handling up for unsupported keys super.handleKeyPress(event); } } } /** * Default options for the `SeekBar` * * @type {Object} * @private */ SeekBar.prototype.options_ = { children: [ 'loadProgressBar', 'playProgressBar' ], barName: 'playProgressBar' }; // MouseTimeDisplay tooltips should not be added to a player on mobile devices if (!IS_IOS && !IS_ANDROID) { SeekBar.prototype.options_.children.splice(1, 0, 'mouseTimeDisplay'); } /** * Call the update event for this Slider when this event happens on the player. * * @type {string} */ SeekBar.prototype.playerEvent = 'timeupdate'; Component.registerComponent('SeekBar', SeekBar); export default SeekBar;
const mongoose = require("mongoose") const Review = require("../models/review.models") const User = require("../models/user.model") const axios = require("axios") const express = require("express") const router = express.Router() router.get("/", (req, res) => { res.send("reviews route") }) // Get all reviews sorted in latest order router.get("/feed", async (req, res) => { try{ const reviews = await Review.find({}).sort({"date":-1}) res.status(200).json(reviews) }catch(error){ console.log("error in getting all the reviews in the reviews.js file ") console.log(error.message) res.status(500).json(error.message) } }) // get all the reviews for a given movie by its id router.get("/movie/:movieID", async (req, res) => { const movieID = req.params.movieID try { console.log("movieID =>> ", movieID) const reviews = await Review.find({tmdbMovieId: movieID}).sort({"date":-1}) res.status(200).json(reviews) } catch (error) { console.log("error = ", error.message) res.status(500).json("error in finding recommendations in database") } }) // get review by its id router.get("/review/:id", async (req, res) => { const reviewID = req.params.id console.log("the /review/:id route was called with id = ", reviewID ) try { let review = await Review.findById(reviewID) res.status(200).json(review) } catch (error) { console.log("error in the catch block of the reviews .js page getreviewById function") console.log("ERROR =>> ", error.message) res.status(500).json(error.message) } }) // Add a review router.post("/addReview", async (req, res) => { data = req.body // console.log("data = ", data) const NewReview = new Review({ username: data.username, tmdbMovieId: data.movie_id, userID: data.user_id, review: data.review, reting: data.rating, movie_data: data.movie_data }) const user = await User.findById(data.user_id) console.log("Found user = ", user) try { await NewReview.save() user.movies_reviewed.push([data.movie_id, NewReview.id]) await user.save() console.log("New review saved in the database and reviewed_movies array updted") res.status(200).json(user) } catch (error) { console.log("error in the catch block in the router.pst in revies.js route file") console.log(error.message) res.status(500).json(error.message) } }) // Get all the reviews for a perticular user router.get("/user/:userID", async(req, res)=>{ const {userID} = req.params; console.log("User ID comming to the get method = ", userID) try { const reviews = await Review.find({userID: userID}).sort({"date":-1}) // console.log("Reviews found = ", reviews) res.status(200).json(reviews) } catch (error) { console.error("error in the catch bkock of get ", error) res.status(500).json(error.message) } }) module.exports = router
import ApolloClient from 'apollo-boost'; import { ApolloProvider, withApollo, } from 'react-apollo'; import { h } from 'preact'; import { InMemoryCache } from 'apollo-cache-inmemory'; import cacheRedirects from './cache-redirects'; import typeDefs from './schema.graphql'; export { default as composeQueries } from './compose-queries'; export { Query } from 'react-apollo'; export const cache = new InMemoryCache({ cacheRedirects, }); export const client = new ApolloClient({ cache, credentials: process.env.ACC_TEXT_CREDENTIALS || 'omit', typeDefs, uri: process.env.ACC_TEXT_GRAPHQL_URL, }); export const GraphQLProvider = props => <ApolloProvider client={ client } { ...props } />; export const withClient = withApollo;
Template.chapterContent.onCreated(function() { console.log('chapterContent template created'); var instance = this; instance.autorun(function() { console.log('autorun chapterContent'); }); }); Template.chapterContent.onRendered(function() { console.log('chapterContent template rendered'); }); Template.chapterContent.helpers({ content: function() { /* package: simple:reactive-method */ if(!this.chapterData) this.chapterData = ReactiveMethod.call("getChapterData", Session.get('currentWorkId'), Session.get('currentChapterId')); return this.chapterData; }, targetClass: function() { if(this.target != undefined) return (this.target.get() != null) ? "targeted" : null; return null; }, chapterClasses: function() { var classes = "chapter"; if(this.target != undefined && this.target.get() != null) classes += " highlight"; return classes; }, isTranslationOn: function() { return Session.get('activeTranslation'); } });
import Component from 'inferno-component'; import { linkEvent } from 'inferno'; import { connect } from 'inferno-redux'; import { bindActionCreators } from 'redux'; import PlayerInfo from './PlayerInfo'; import PlayerAttributes from './PlayerAttributes'; import WebSocketUtils from '../../Utils/WebSocketUtils'; import getRandomColor from '../../Utils/ColorUtils'; import { updatePlayer } from '../store/actions/playersActions'; class Player extends Component { constructor (props) { super(props); this.key = props.playerKey; this.socket = {}; this.state = { showAttributes: !props.star } this._listenToWebSocketEvents(); } _toggleAttributes (self) { self.setState((prevState, props) => { return { showAttributes: !prevState.showAttributes }; }) } _levelUpHandler (self) { let { updatePlayer } = self.props; let { level } = self.props.player; let playerData = { index: self.key, data: { level: parseInt(level + 1, 10) } } if (level <= 9) { self.socket.emit('player:update', playerData); } } _levelDownHandler (self) { let { updatePlayer } = self.props; let { level } = self.props.player; let playerData = { index: self.key, data: { level: parseInt(level - 1, 10) } } if (level > 1) { self.socket.emit('player:update', playerData); } } _gearUpHandler (self) { let { updatePlayer } = self.props; let { gear } = self.props.player; let playerData = { index: self.key, data: { gear: parseInt(gear + 1, 10) } } self.socket.emit('player:update', playerData); } _gearDownHandler (self) { let { updatePlayer } = self.props; let { gear } = self.props.player; let playerData = { index: self.key, data: { gear: parseInt(gear - 1, 10) } } if (gear > 0) { self.socket.emit('player:update', playerData); } } _changeTitleHandler (self, event) { let { updatePlayer } = self.props; let { name } = self.props.player; let message = `You\'ll remove ${name} from playing. Are you sure?`; let playerData = { index: self.key, data: { name: event.target.value, color: getRandomColor() } } self.socket.emit('player:update', playerData); } _changeGender (self) { let { updatePlayer } = self.props; let { gender } = self.props.player; let playerData = { index: self.key, data: { gender: event.target.value } } console.log(playerData.data.gender); self.socket.emit('player:update', playerData); } _renderAttributes (events, data) { if (!this.state.showAttributes) { return null; } return ( <PlayerAttributes events={ events } data={ data } /> ) } _listenToWebSocketEvents () { let { updatePlayer } = this.props; this.socket = this.props.webSocket.socket; WebSocketUtils.onEvent(this.socket, 'player:update', updatePlayer); } render () { let playerAttributesEvents = { self: this, levelUp: this._levelUpHandler, levelDown: this._levelDownHandler, gearUp: this._gearUpHandler, gearDown: this._gearDownHandler } let playerInfoEvents = { self: this, changeTitle: this._changeTitleHandler, changeGender: this._changeGender, toggleAttributes: this._toggleAttributes } let data = this.props.players[this.key]; return ( <div className="player"> <PlayerInfo playerKey={ this.key } events={ playerInfoEvents } data={ data } star={ this.props.star } /> { this._renderAttributes(playerAttributesEvents, data) } </div> ) } } function mapStateToProps (state) { return { players: state.players, webSocket: state.webSocket } } function mapDispatchToProps (dispatch) { return bindActionCreators({ updatePlayer }, dispatch); } export default connect(mapStateToProps, mapDispatchToProps)(Player);
import _util from "../@jspm/core@2.0.0-beta.11/nodelibs/deno/util.ts"; import { dew as _inherits_browserDewDew } from "./inherits_browser.dew.js"; var exports = {}, _dewExec = false; export function dew() { if (_dewExec) return exports; _dewExec = true; try { var util = _util; /* istanbul ignore next */ if (typeof util.inherits !== 'function') throw ''; exports = util.inherits; } catch (e) { /* istanbul ignore next */ exports = _inherits_browserDewDew(); } return exports; }
var searchData= [ ['cancel_5freconnect',['cancel_reconnect',['../classcpp__redis_1_1client.html#adb605a877f65b8f54725576b45aeeca6',1,'cpp_redis::client::cancel_reconnect()'],['../classcpp__redis_1_1subscriber.html#a6d5bdcf7c5a67d1b56b021bbd450a7c3',1,'cpp_redis::subscriber::cancel_reconnect()']]], ['clear_5fsentinels',['clear_sentinels',['../classcpp__redis_1_1client.html#a68cd15d1cc30302237e3a400e2ac43f5',1,'cpp_redis::client::clear_sentinels()'],['../classcpp__redis_1_1sentinel.html#ac36640b3f392970c72f5a513a2d61ac7',1,'cpp_redis::sentinel::clear_sentinels()'],['../classcpp__redis_1_1subscriber.html#ac8f371c14866842cdda7cf1ee5eee2b8',1,'cpp_redis::subscriber::clear_sentinels()']]], ['client',['client',['../classcpp__redis_1_1client.html',1,'cpp_redis::client'],['../classcpp__redis_1_1client.html#a80354f41d084dfc3a41df581c803b792',1,'cpp_redis::client::client(void)'],['../classcpp__redis_1_1client.html#ae879c3a6829a2da9d03f80c1ec4b8d9b',1,'cpp_redis::client::client(const std::shared_ptr&lt; network::tcp_client_iface &gt; &amp;tcp_client)'],['../classcpp__redis_1_1client.html#ab938aeb2a144629fd269594e4af08168',1,'cpp_redis::client::client(const client &amp;)=delete']]], ['client_5fkill',['client_kill',['../classcpp__redis_1_1client.html#ae4090830d1710276c33ff5a74eba2e4b',1,'cpp_redis::client']]], ['client_5fkill_5ffuture',['client_kill_future',['../classcpp__redis_1_1client.html#ae6f09b6c022c910b79fb90a47291f511',1,'cpp_redis::client']]], ['client_5ftype',['client_type',['../classcpp__redis_1_1client.html#a388877b01b4e045cddb138e70a68e000',1,'cpp_redis::client']]], ['commit',['commit',['../classcpp__redis_1_1client.html#a36a48d61a4900e88fd67795ca59cbea3',1,'cpp_redis::client::commit()'],['../classcpp__redis_1_1sentinel.html#ad4f85d486499f82225b244f85091b31e',1,'cpp_redis::sentinel::commit()'],['../classcpp__redis_1_1subscriber.html#abbf600802ed93b82323185eec5719ecb',1,'cpp_redis::subscriber::commit()'],['../classcpp__redis_1_1network_1_1redis__connection.html#a8e6980d40139877c16e995051b780d60',1,'cpp_redis::network::redis_connection::commit()']]], ['connect',['connect',['../classcpp__redis_1_1client.html#adda8b3e7b4f9c80ac052753b39178dd5',1,'cpp_redis::client::connect(const std::string &amp;host=&quot;127.0.0.1&quot;, std::size_t port=6379, const connect_callback_t &amp;connect_callback=nullptr, std::uint32_t timeout_msecs=0, std::int32_t max_reconnects=0, std::uint32_t reconnect_interval_msecs=0)'],['../classcpp__redis_1_1client.html#a15bcb0885129480543482a7da52af892',1,'cpp_redis::client::connect(const std::string &amp;name, const connect_callback_t &amp;connect_callback=nullptr, std::uint32_t timeout_msecs=0, std::int32_t max_reconnects=0, std::uint32_t reconnect_interval_msecs=0)'],['../classcpp__redis_1_1sentinel.html#a1dfba8240daf7cfa7502f57957cffbda',1,'cpp_redis::sentinel::connect()'],['../classcpp__redis_1_1subscriber.html#a6ae8134a9a9b31d6f2434ec4f6e86d3a',1,'cpp_redis::subscriber::connect(const std::string &amp;host=&quot;127.0.0.1&quot;, std::size_t port=6379, const connect_callback_t &amp;connect_callback=nullptr, std::uint32_t timeout_msecs=0, std::int32_t max_reconnects=0, std::uint32_t reconnect_interval_msecs=0)'],['../classcpp__redis_1_1subscriber.html#a8fb77a44a1e1f0d99dec639658e2aa7e',1,'cpp_redis::subscriber::connect(const std::string &amp;name, const connect_callback_t &amp;connect_callback=nullptr, std::uint32_t timeout_msecs=0, std::int32_t max_reconnects=0, std::uint32_t reconnect_interval_msecs=0)'],['../classcpp__redis_1_1network_1_1redis__connection.html#af105573e46eadbc34a9f5907832df19f',1,'cpp_redis::network::redis_connection::connect()'],['../classcpp__redis_1_1network_1_1tcp__client.html#a5808c0569980d83479f755ac55a12dfb',1,'cpp_redis::network::tcp_client::connect()'],['../classcpp__redis_1_1network_1_1tcp__client__iface.html#a81ee982136e85b7c3401393341bc594c',1,'cpp_redis::network::tcp_client_iface::connect()']]], ['connect_5fcallback_5ft',['connect_callback_t',['../classcpp__redis_1_1client.html#a4bb592b64ededde5a6fcf8111ca2548f',1,'cpp_redis::client::connect_callback_t()'],['../classcpp__redis_1_1subscriber.html#a90f2f7d4c748c3c2e89d1e977fa6dce1',1,'cpp_redis::subscriber::connect_callback_t()']]], ['connect_5fsentinel',['connect_sentinel',['../classcpp__redis_1_1sentinel.html#a82c8cb23efab71ff00cf2277bba91e90',1,'cpp_redis::sentinel']]], ['connect_5fstate',['connect_state',['../classcpp__redis_1_1client.html#a2512bd48dd45391249a69bd720c1e4da',1,'cpp_redis::client::connect_state()'],['../classcpp__redis_1_1subscriber.html#afc976757efd9d0ac4def6935546a2338',1,'cpp_redis::subscriber::connect_state()']]] ];
var table; var requesttable; var interval = null; $(document).ready(function() { table = $('table.loanTable').DataTable({ "dom": 'rt', processing: true, serverSide: true, "language": { "emptyTable": " " }, ajax: { url: 'loanstable', error: function(data) { if(data.status == 401) { window.location.href = '/login'; } } }, columns: [ { data: 'date', name:'date'}, { data: 'branch', name:'branch'}, { data: 'item', name:'item'}, { data: 'stat', name:'stat'}, { data: 'status', name:'status'} ] }); }); $(document).on("click", "#loanTable tr", function () { var trdata = table.row(this).data(); var id = trdata.id; var branch = trdata.branchid; var descop = " "; var desc = trdata.item; var desc = desc.replace(/&quot;/g, '\"'); $('#date').val(trdata.date); $('#description').val(desc); $('#status').val(trdata.status); $('#myid').val(trdata.id); $('#branch_id').val(trdata.branchid); $('#branch').val(trdata.branch); if (trdata.stat == 'IN-BOUND') { $('#serials').hide(); $('#received_Btn').hide(); $('#del_Btn').hide(); $.ajax({ type:'get', url:'loanitemcode', data:{'id':trdata.items_id}, success:function(data) { descop+='<option selected value="select" disabled>select description</option>'; for(var i=0;i<data.length;i++){ descop+='<option value="'+data[i].id+'">'+data[i].item.toUpperCase()+'</option>'; } $("#loandesc1").find('option').remove().end().append(descop); }, error: function (data) { alert(data.responseText); } }); if (trdata.status != 'pending') { $('#submit_Btn').hide(); $('#loanrow1').hide(); }else{ $('#submit_Btn').show(); $('#loanrow1').show(); } }else{ $('#submit_Btn').hide(); $('#loanrow1').hide(); if (trdata.status == 'approved') { $('#received_Btn').show(); $('#serials').show(); $('#del_Btn').hide(); $.ajax({ url: 'loanget', dataType: 'json', type: 'GET', async: false, data: { id: id, branch: branch }, success:function(data) { $('#serial').val(data.serial); }, error: function (data) { alert(data.responseText); } }); }else{ $('#received_Btn').hide(); $('#serials').hide(); $('#del_Btn').show(); } } $('#loansModal').modal({backdrop: 'static', keyboard: false}); }); $(document).on("click", "#submit_Btn", function () { var id = $('#myid').val(); var item = $('#loanserial1').val(); var branch = $('#branch_id').val(); var status = 'approved'; if ($('#loanserial1').val() && $('#status').val() == 'pending') { $.ajax({ url: 'loanstock', headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, dataType: 'json', type: 'PUT', data: { id: id, item: item, branch: branch }, error: function (data) { alert(data.responseText); } }); $.ajax({ url: 'loansapproved', headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, dataType: 'json', type: 'PUT', data: { id: id, status: status }, success:function() { table.draw(); $("#loansModal .close").click(); }, error: function (data) { alert(data.responseText); } }); } }); $(document).on("click", "#received_Btn", function () { var id = $('#myid').val(); var branch = $('#branch_id').val(); var status = 'completed'; if ($('#serial').val() && $('#status').val() == 'approved') { $.ajax({ url: 'loanupdate', headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, dataType: 'json', type: 'PUT', data: { id: id, branch: branch }, error: function (data) { alert(data.responseText); } }); $.ajax({ url: 'loansapproved', headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, dataType: 'json', type: 'PUT', data: { id: id, status: status }, success:function() { table.draw(); $("#loansModal .close").click(); }, error: function (data) { alert(data.responseText); } }); } }); $(document).on("click", "#del_Btn", function () { var id = $('#myid').val(); var status = 'deleted'; $.ajax({ url: 'loandelete', headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, dataType: 'json', type: 'PUT', data: { id: id, status: status }, success:function() { table.draw(); $("#loansModal .close").click(); }, error: function (data) { alert(data.responseText); } }); }); $(document).on('change', '#loandesc1', function(){ var id = $(this).val(); var serialOp = " "; $.ajax({ type:'get', url:'getserials', data:{'id':id}, async: false, success:function(data) { serialOp+='<option selected value="select" disabled>select serial</option>'; for(var i=0;i<data.length;i++){ serialOp+='<option value="'+data[i].id+'">'+data[i].serial+'</option>'; } $("#loanserial1").find('option').remove().end().append(serialOp); }, error: function (data) { alert(data.responseText); } }); }); $(document).on('click', '.cancel', function(){ window.location.href = 'loans'; }); $(document).on('change', '#loanbranch', function(){ var id = $(this).val(); var itemOp ='<option selected value="select" disabled>select description</option>'; var catOp = " "; $.ajax({ type:'get', url:'bcategory', data:{'id':id}, success:function(data) { catOp+='<option selected value="select" disabled>select category</option>'; for(var i=0;i<data.length;i++){ catOp+='<option value="'+data[i].category_id+'">'+data[i].category.toUpperCase()+'</option>'; } $("#loanreqcategory1").find('option').remove().end().append(catOp); $("#loanreqdesc1").find('option').remove().end().append(itemOp); }, error: function (data) { alert(data.responseText); } }); }); $(document).on('change', '#loanreqcategory1', function(){ var catid = $(this).val(); var branchid = $('#loanbranch').val(); var itemOp = " "; $.ajax({ type:'get', url:'bitem', data:{ 'catid':catid, 'branchid':branchid }, success:function(data) { itemOp+='<option selected value="select" disabled>select description</option>'; for(var i=0;i<data.length;i++){ itemOp+='<option value="'+data[i].items_id+'">'+data[i].item.toUpperCase()+'</option>'; } $("#loanreqdesc1").find('option').remove().end().append(itemOp); }, error: function (data) { alert(data.responseText); } }); }); $(document).on('click', '#serial_sub_Btn', function(){ if ($('#loanreqdesc1').val()) { var branchid = $('#loanbranch').val(); var itemid = $('#loanreqdesc1').val(); $.ajax({ url: 'loan', headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, dataType: 'json', type: 'POST', data: { branchid: branchid, itemid: itemid }, success:function() { window.location.href = 'loans'; }, error: function (data) { alert(data.responseText); } }); } }); $(document).on('click', '#loan_Btn', function(){ $('#loanModal').modal({backdrop: 'static', keyboard: false}); });
import $ from 'jquery'; import ParsleyUtils from './utils'; var ParsleyAbstract = function () { this.__id__ = ParsleyUtils.generateID(); }; ParsleyAbstract.prototype = { asyncSupport: true, // Deprecated _pipeAccordingToValidationResult: function () { var pipe = () => { var r = $.Deferred(); if (true !== this.validationResult) r.reject(); return r.resolve().promise(); }; return [pipe, pipe]; }, actualizeOptions: function () { ParsleyUtils.attr(this.$element, this.options.namespace, this.domOptions); if (this.parent && this.parent.actualizeOptions) this.parent.actualizeOptions(); return this; }, _resetOptions: function (initOptions) { this.domOptions = ParsleyUtils.objectCreate(this.parent.options); this.options = ParsleyUtils.objectCreate(this.domOptions); // Shallow copy of ownProperties of initOptions: for (var i in initOptions) { if (initOptions.hasOwnProperty(i)) this.options[i] = initOptions[i]; } this.actualizeOptions(); }, _listeners: null, // Register a callback for the given event name // Callback is called with context as the first argument and the `this` // The context is the current parsley instance, or window.Parsley if global // A return value of `false` will interrupt the calls on: function (name, fn) { this._listeners = this._listeners || {}; var queue = this._listeners[name] = this._listeners[name] || []; queue.push(fn); return this; }, // Deprecated. Use `on` instead subscribe: function (name, fn) { $.listenTo(this, name.toLowerCase(), fn); }, // Unregister a callback (or all if none is given) for the given event name off: function (name, fn) { var queue = this._listeners && this._listeners[name]; if (queue) { if (!fn) { delete this._listeners[name]; } else { for (var i = queue.length; i--;) if (queue[i] === fn) queue.splice(i, 1); } } return this; }, // Deprecated. Use `off` unsubscribe: function (name, fn) { $.unsubscribeTo(this, name.toLowerCase()); }, // Trigger an event of the given name // A return value of `false` interrupts the callback chain // Returns false if execution was interrupted trigger: function (name, target, extraArg) { target = target || this; var queue = this._listeners && this._listeners[name]; var result; var parentResult; if (queue) { for (var i = queue.length; i--;) { result = queue[i].call(target, target, extraArg); if (result === false) return result; } } if (this.parent) { return this.parent.trigger(name, target, extraArg); } return true; }, // Reset UI reset: function () { // Field case: just emit a reset event for UI if ('ParsleyForm' !== this.__class__) { this._resetUI(); return this._trigger('reset'); } // Form case: emit a reset event for each field for (var i = 0; i < this.fields.length; i++) this.fields[i].reset(); this._trigger('reset'); }, // Destroy Parsley instance (+ UI) destroy: function () { // Field case: emit destroy event to clean UI and then destroy stored instance this._destroyUI(); if ('ParsleyForm' !== this.__class__) { this.$element.removeData('Parsley'); this.$element.removeData('ParsleyFieldMultiple'); this._trigger('destroy'); return; } // Form case: destroy all its fields and then destroy stored instance for (var i = 0; i < this.fields.length; i++) this.fields[i].destroy(); this.$element.removeData('Parsley'); this._trigger('destroy'); }, asyncIsValid: function (group, force) { ParsleyUtils.warnOnce("asyncIsValid is deprecated; please use whenValid instead"); return this.whenValid({group, force}); }, _findRelated: function () { return this.options.multiple ? this.parent.$element.find(`[${this.options.namespace}multiple="${this.options.multiple}"]`) : this.$element; } }; export default ParsleyAbstract;
module.exports = { parser: "@typescript-eslint/parser", extends: [ "plugin:@typescript-eslint/recommended", "prettier/@typescript-eslint" ], parserOptions: { ecmaVersion: 2018, sourceType: "module" }, rules: {} };
const VmixConnectionState = { DISCONNECTED: "DISCONNECTED", CONNECTED: "CONNECTED", READY: "READY", LIVE: "LIVE", }; export default VmixConnectionState;
const { app, BrowserWindow } = require('electron') let win; function createWindow () { // Create the browser window. win = new BrowserWindow({ width: 1000, minWidth: 1000, height: 600, backgroundColor: '#ffffff', icon: `file://${__dirname}/dist/assets/logo.png` }) win.loadURL(`file://${__dirname}/dist/index.html`) //// uncomment below to open the DevTools. // win.webContents.openDevTools() // Event when the window is closed. win.on('closed', function () { win = null }) } // Create window on electron intialization app.on('ready', createWindow) // Quit when all windows are closed. app.on('window-all-closed', function () { // On macOS specific close process if (process.platform !== 'darwin') { app.quit() } }) app.on('activate', function () { // macOS specific close process if (win === null) { createWindow() } })
import {Pos} from "../model" import {ProseMirrorError} from "../util/error" import {contains, browser} from "../dom" import {posFromDOM, pathToDOM, DOMFromPos, coordsAtPos} from "./dompos" // ;; Error type used to signal selection-related problems. export class SelectionError extends ProseMirrorError {} export class SelectionState { constructor(pm, range) { this.pm = pm this.range = range this.lastNonNodePos = null this.polling = null this.lastAnchorNode = this.lastHeadNode = this.lastAnchorOffset = this.lastHeadOffset = null this.lastNode = null pm.content.addEventListener("focus", () => this.receivedFocus()) this.poller = this.poller.bind(this) } setAndSignal(range, clearLast) { this.set(range, clearLast) // :: () #path=ProseMirror#events#selectionChange // Indicates that the editor's selection has changed. this.pm.signal("selectionChange") } set(range, clearLast) { this.range = range if (!range.node) this.lastNonNodePos = null if (clearLast !== false) this.lastAnchorNode = null } poller() { if (hasFocus(this.pm)) { if (!this.pm.operation) this.readFromDOM() this.polling = setTimeout(this.poller, 100) } else { this.polling = null } } startPolling() { clearTimeout(this.polling) this.polling = setTimeout(this.poller, 50) } fastPoll() { this.startPolling() } stopPolling() { clearTimeout(this.polling) this.polling = null } domChanged() { let sel = window.getSelection() return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset || sel.focusNode != this.lastHeadNode || sel.focusOffset != this.lastHeadOffset } storeDOMState() { let sel = window.getSelection() this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset this.lastHeadNode = sel.focusNode; this.lastHeadOffset = sel.focusOffset } readFromDOM() { if (this.pm.input.composing || !hasFocus(this.pm) || !this.domChanged()) return false let sel = window.getSelection(), doc = this.pm.doc let anchor = posFromDOM(this.pm, sel.anchorNode, sel.anchorOffset) let head = sel.isCollapsed ? anchor : posFromDOM(this.pm, sel.focusNode, sel.focusOffset) let newRange = findSelectionNear(doc, head, this.range.head && this.range.head.cmp(head) < 0 ? -1 : 1) if (newRange instanceof TextSelection && doc.path(anchor.path).isTextblock) newRange = new TextSelection(anchor, newRange.head) this.setAndSignal(newRange) if (newRange instanceof NodeSelection || newRange.head.cmp(head) || newRange.anchor.cmp(anchor)) { this.toDOM() } else { this.clearNode() this.storeDOMState() } return true } toDOM(takeFocus) { if (!hasFocus(this.pm)) { if (!takeFocus) return // See https://bugzilla.mozilla.org/show_bug.cgi?id=921444 else if (browser.gecko) this.pm.content.focus() } if (this.range instanceof NodeSelection) this.nodeToDOM() else this.rangeToDOM() } nodeToDOM() { let dom = pathToDOM(this.pm.content, this.range.from.toPath()) if (dom != this.lastNode) { this.clearNode() dom.classList.add("ProseMirror-selectednode") this.pm.content.classList.add("ProseMirror-nodeselection") this.lastNode = dom } let range = document.createRange(), sel = window.getSelection() range.selectNode(dom) sel.removeAllRanges() sel.addRange(range) this.storeDOMState() } rangeToDOM() { this.clearNode() let anchor = DOMFromPos(this.pm.content, this.range.anchor) let head = DOMFromPos(this.pm.content, this.range.head) let sel = window.getSelection(), range = document.createRange() if (sel.extend) { range.setEnd(anchor.node, anchor.offset) range.collapse(false) } else { if (this.range.anchor.cmp(this.range.head) > 0) { let tmp = anchor; anchor = head; head = tmp } range.setEnd(head.node, head.offset) range.setStart(anchor.node, anchor.offset) } sel.removeAllRanges() sel.addRange(range) if (sel.extend) sel.extend(head.node, head.offset) this.storeDOMState() } clearNode() { if (this.lastNode) { this.lastNode.classList.remove("ProseMirror-selectednode") this.pm.content.classList.remove("ProseMirror-nodeselection") this.lastNode = null return true } } receivedFocus() { if (this.polling == null) this.startPolling() } } // ;; An editor selection. Can be one of two selection types: // `TextSelection` and `NodeSelection`. Both have the properties // listed here, but also contain more information (such as the // selected [node](#NodeSelection.node) or the // [head](#TextSelection.head) and [anchor](#TextSelection.anchor)). export class Selection { // :: Pos #path=Selection.prototype.from // The start of the selection. // :: Pos #path=Selection.prototype.to // The end of the selection. // :: bool #path=Selection.empty // True if the selection is an empty text selection (head an anchor // are the same). // :: (other: Selection) → bool #path=Selection.eq // Test whether the selection is the same as another selection. // :: (doc: Node, mapping: Mappable) → Selection #path=Selection.map // Map this selection through a [mappable](#Mappable) thing. `doc` // should be the new document, to which we are mapping. } // ;; A text selection represents a classical editor // selection, with a head (the moving side) and anchor (immobile // side), both of which point into textblock nodes. It can be empty (a // regular cursor position). export class TextSelection extends Selection { // :: (Pos, ?Pos) // Construct a text selection. When `head` is not given, it defaults // to `anchor`. constructor(anchor, head) { super() // :: Pos // The selection's immobile side (does not move when pressing // shift-arrow). this.anchor = anchor // :: Pos // The selection's mobile side (the side that moves when pressing // shift-arrow). this.head = head || anchor } get inverted() { return this.anchor.cmp(this.head) > 0 } get from() { return this.inverted ? this.head : this.anchor } get to() { return this.inverted ? this.anchor : this.head } get empty() { return this.anchor.cmp(this.head) == 0 } eq(other) { return other instanceof TextSelection && !other.head.cmp(this.head) && !other.anchor.cmp(this.anchor) } map(doc, mapping) { let head = mapping.map(this.head).pos if (!doc.path(head.path).isTextblock) return findSelectionNear(doc, head) let anchor = mapping.map(this.anchor).pos return new TextSelection(doc.path(anchor.path).isTextblock ? anchor : head, head) } } // ;; A node selection is a selection that points at a // single node. All nodes marked [selectable](#NodeType.selectable) // can be the target of a node selection. In such an object, `from` // and `to` point directly before and after the selected node. export class NodeSelection extends Selection { // :: (Pos, Pos, Node) // Create a node selection. Does not verify the validity of its // arguments. Use `ProseMirror.setNodeSelection` for an easier, // error-checking way to create a node selection. constructor(from, to, node) { super() this.from = from this.to = to // :: Node The selected node. this.node = node } get empty() { return false } eq(other) { return other instanceof NodeSelection && !this.from.cmp(other.from) } map(doc, mapping) { let from = mapping.map(this.from, 1).pos let to = mapping.map(this.to, -1).pos if (Pos.samePath(from.path, to.path) && from.offset == to.offset - 1) { let node = doc.nodeAfter(from) if (node.type.selectable) return new NodeSelection(from, to, node) } return findSelectionNear(doc, from) } } export function rangeFromDOMLoose(pm) { if (!hasFocus(pm)) return null let sel = window.getSelection() return new TextSelection(posFromDOM(pm, sel.anchorNode, sel.anchorOffset, true), posFromDOM(pm, sel.focusNode, sel.focusOffset, true)) } export function hasFocus(pm) { let sel = window.getSelection() return sel.rangeCount && contains(pm.content, sel.anchorNode) } function findSelectionIn(doc, path, offset, dir, text) { let node = doc.path(path) if (node.isTextblock) return new TextSelection(new Pos(path, offset)) for (let i = offset + (dir > 0 ? 0 : -1); dir > 0 ? i < node.size : i >= 0; i += dir) { let child = node.child(i) if (!text && child.type.contains == null && child.type.selectable) return new NodeSelection(new Pos(path, i), new Pos(path, i + 1), child) path.push(i) let inside = findSelectionIn(doc, path, dir < 0 ? child.size : 0, dir, text) if (inside) return inside path.pop() } } // FIXME we'll need some awareness of bidi motion when determining block start and end export function findSelectionFrom(doc, pos, dir, text) { for (let path = pos.path.slice(), offset = pos.offset;;) { let found = findSelectionIn(doc, path, offset, dir, text) if (found) return found if (!path.length) break offset = path.pop() + (dir > 0 ? 1 : 0) } } export function findSelectionNear(doc, pos, bias = 1, text) { let result = findSelectionFrom(doc, pos, bias, text) || findSelectionFrom(doc, pos, -bias, text) if (!result) SelectionError("Searching for selection in invalid document " + doc) return result } export function findSelectionAtStart(node, path = [], text) { return findSelectionIn(node, path.slice(), 0, 1, text) } export function findSelectionAtEnd(node, path = [], text) { return findSelectionIn(node, path.slice(), node.size, -1, text) } export function verticalMotionLeavesTextblock(pm, pos, dir) { let dom = pathToDOM(pm.content, pos.path) let coords = coordsAtPos(pm, pos) for (let child = dom.firstChild; child; child = child.nextSibling) { if (child.nodeType != 1) continue let boxes = child.getClientRects() for (let i = 0; i < boxes.length; i++) { let box = boxes[i] if (dir < 0 ? box.bottom < coords.top : box.top > coords.bottom) return false } } return true }
import React from 'react'; import { Alert, Button, Form, ModalForm, TextField, View, } from 'bappo-components'; class ModalFormMinimalExample extends React.Component { state = { modalVisible: false, }; render() { return ( <View> <Button onPress={() => this.setState({ modalVisible: true })} text="Open form" /> <ModalForm onRequestClose={() => this.setState({ modalVisible: false })} onSubmit={values => Alert.alert({ message: JSON.stringify(values, null, 2) }) } title="Modal Form Minimal Example" visible={this.state.modalVisible} testID="modalForm-minimal" > <Form.Field name="firstName" component={TextField} label="First Name" /> <Form.Field name="lastName" component={TextField} label="Last Name" /> </ModalForm> </View> ); } } export default ModalFormMinimalExample;
// Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. export * from './blueprint'; export * from './icon'; export * from './utils'; //# sourceMappingURL=index.js.map
/** * Time: 2018-9-18 */ /** * 压缩字符串 * 执行时间: 96ms * @param {character[]} chars * @return {number} */ var compress = function(chars) { var obj = {}; var arr = []; if (chars.length === 1) return chars.length; for (var i = 0, len = chars.length; i < len; i++) { var item = chars[i]; var nextItem = chars[i + 1]; if (obj[item]) { obj[item]++; if (item !== nextItem) { arr.push(item); if (obj[item] > 1) { var numStr = String(obj[item]); for (var j = 0; j < numStr.length; j++) { arr.push(numStr[j]); } } delete obj[chars[i - 1]]; } } else { if (item !== nextItem) { arr.push(item); } else { obj[item] = 1; } } } for (var j = 0, jLen = chars.length; j < jLen; j++) { if (chars.length === 0) break; chars.pop(); } for (var k = 0; k < arr.length; k++) { chars.push(arr[k]); } return chars.length; }; /** * 压缩字符串 - 第二种解法 * 执行时间: 64ms * @param {character[]} chars * @return {number} */ var compress2 = function(chars) { let index = 0; for (let i = 0; i < chars.length;) { index = i + 1; while (chars[i] === chars[index]) { index++; } let num = index - i; let numStr = num + ''; if (num > 1) { for (let j = 0; j < numStr.length; j++) { chars[i + j + 1] = numStr[j]; } chars.splice(i + numStr.length + 1, num - numStr.length - 1); i += numStr.length + 1; } else { i++ } } return chars.length; }; /** * 压缩字符串 - 第三种解法 * 执行时间: 68ms * @param {character[]} chars * @return {number} */ var compress3 = function(chars) { var count; for (var i = 0; i < chars.length; i++) { count = 0; if (chrs[i + 1] == chars[i]) { count++; for (var j = i + 1; chars.length; j++) { if (chars[j] == chars[i]) { count++; chars.splice(j, 1); j--; } else { break; } } if (count != 0) { count = ('' + count).split(''); for (var k = 0; k < count.length; k++) { chars.splice(i + 1 + k, 0, count[k]); } i = i + k } } } }; /** * 压缩字符串 - 第四种解法 * 执行时间: 88ms * @param {character[]} chars * @return {number} */ var compress4 = function (chars) { var len = chars.length; while(len-- && len >= 0) { var temp = chars[len], count = 1; for (var j = len - 1; j >= 0; j--) { if (temp === chars[j]) { count++; } else { break; } } if (count > 1) { var tiem = [temp].concat(count.toString().split('')); vars.splice(j + 1, count, ...item); len -= count; len += item.length; } } }
'use strict'; const _ = require('lodash'), fs = require('fs-extra'), h = require('highland'), path = require('path'), es = require('event-stream'), gulp = require('gulp'), rename = require('gulp-rename'), changed = require('gulp-changed'), cssmin = require('gulp-cssmin'), gulpIf = require('gulp-if'), detective = require('detective-postcss'), autoprefixer = require('autoprefixer'), postcss = require('gulp-postcss'), cssImport = require('postcss-import'), mixins = require('postcss-mixins'), nested = require('postcss-nested'), simpleVars = require('postcss-simple-vars'), reporters = require('../../reporters'), helpers = require('../../compilation-helpers'), componentsSrc = path.join(process.cwd(), 'styleguides', '**', 'components', '*.css'), layoutsSrc = path.join(process.cwd(), 'styleguides', '**', 'layouts', '*.css'), destPath = path.join(process.cwd(), 'public', 'css'), variables = { // asset host and path are set in different environments when using separate servers/subdomains for assets 'asset-host': process.env.CLAYCLI_COMPILE_ASSET_HOST ? process.env.CLAYCLI_COMPILE_ASSET_HOST.replace(/\/$/, '') : '', 'asset-path': process.env.CLAYCLI_COMPILE_ASSET_PATH || '', // these arguments allow setting default env variables minify: process.env.CLAYCLI_COMPILE_MINIFIED || process.env.CLAYCLI_COMPILE_MINIFIED_STYLES || '' }; /** * determine filepath for compiled css, based on the source filepath * used to test if a css file has changed * @param {string} filepath * @return {string} */ function transformPath(filepath) { const component = path.basename(filepath, '.css'), // component name, plus variation if applicable pathArray = path.dirname(filepath).split(path.sep), styleguide = pathArray[pathArray.length - 2]; // parses 'styleguides/<styleguide>/components' for the name of the styleguide return path.join(destPath, `${component}.${styleguide}.css`); } /** * determine if a file (or its dependencies) has changed * note: this only checks ONE level of dependencies, as that covers most * current use cases and eliminates the need for complicated dependency-checking logic. * If there is a need to check n-number of dependencies, please open a ticket and we can re-evaluate! * @param {Stream} stream * @param {Vinyl} sourceFile * @param {string} targetPath * @return {Promise} */ function hasChanged(stream, sourceFile, targetPath) { let deps; try { deps = detective(sourceFile.contents.toString()); } catch (e) { // detective handles most postcss syntax, but doesn't know about plugins // if it hits something that confuses it, fail gracefully (disregard any potential dependencies) deps = []; } return fs.stat(targetPath).then((targetStat) => { const hasUpdatedDeps = _.some(deps, (dep) => { const depStat = fs.statSync(path.join(process.cwd(), 'styleguides', dep)); return depStat && depStat.ctime > targetStat.ctime; }); if (hasUpdatedDeps || sourceFile.stat && sourceFile.stat.ctime > targetStat.ctime) { stream.push(sourceFile); } }).catch(() => { // targetPath doesn't exist! gotta compile the source stream.push(sourceFile); }); } /** * rename css files * styleguide/<styleguide>/components/<component>.css * becomes public/css/<component>.<styleguide>.css * @param {object} filepath */ function renameFile(filepath) { const component = filepath.basename, styleguide = filepath.dirname.split('/')[0]; filepath.dirname = ''; filepath.basename = `${component}.${styleguide}`; } /** * compile postcss styles to public/css * @param {object} [options] * @param {boolean} [options.minify] minify resulting css * @param {boolean} [options.watch] watch mode * @param {array} [options.plugins] postcss plugin functions * @return {Object} with build (Highland Stream) and watch (Chokidar instance) */ function compile(options = {}) { let minify = options.minify || variables.minify || false, watch = options.watch || false, plugins = options.plugins || [], reporter = options.reporter || 'pretty'; function buildPipeline() { return gulp.src([componentsSrc, layoutsSrc]) .pipe(changed(destPath, { transformPath, hasChanged })) .pipe(rename(renameFile)) .pipe(postcss([ cssImport({ path: helpers.getConfigFileValue('postcssImportPaths') || ['./styleguides'] }), autoprefixer(helpers.getConfigFileOrBrowsersList('autoprefixerOptions')), mixins(), // Simple vars must come before `nested` so that string interpolation of variables occurs before // the nesting is parsed. This ensures being able to use variables in class names of nested selectors simpleVars({ variables }), nested() ].concat(plugins))) .pipe(gulpIf(Boolean(minify), cssmin())) .pipe(gulp.dest(destPath)) .pipe(es.mapSync((file) => ({ type: 'success', message: path.basename(file.path) }))); } gulp.task('styles', () => { return h(buildPipeline()); }); gulp.task('styles:watch', (cb) => { return h(buildPipeline()) .each((item) => { _.map([item], reporters.logAction(reporter, 'compile')); }) .done(cb); }); if (watch) { return { build: gulp.task('styles')(), watch: gulp.watch( [componentsSrc, layoutsSrc], gulp.task('styles:watch') ) }; } else { return { build: gulp.task('styles')(), watch: null }; } } module.exports = compile;
/** * Copyright 2012-2018, Plotly, Inc. * 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. */ 'use strict'; var d3 = require('d3'); var Drawing = require('../../components/drawing'); var heatmapStyle = require('../heatmap/style'); var makeColorMap = require('./make_color_map'); module.exports = function style(gd) { var contours = d3.select(gd).selectAll('g.contour'); contours.style('opacity', function(d) { return d[0].trace.opacity; }); contours.each(function(d) { var c = d3.select(this); var trace = d[0].trace; var contours = trace.contours; var line = trace.line; var cs = contours.size || 1; var start = contours.start; // for contourcarpet only - is this a constraint-type contour trace? var isConstraintType = contours.type === 'constraint'; var colorLines = !isConstraintType && contours.coloring === 'lines'; var colorFills = !isConstraintType && contours.coloring === 'fill'; var colorMap = (colorLines || colorFills) ? makeColorMap(trace) : null; c.selectAll('g.contourlevel').each(function(d) { d3.select(this).selectAll('path') .call(Drawing.lineGroupStyle, line.width, colorLines ? colorMap(d.level) : line.color, line.dash); }); var labelFont = contours.labelfont; c.selectAll('g.contourlabels text').each(function(d) { Drawing.font(d3.select(this), { family: labelFont.family, size: labelFont.size, color: labelFont.color || (colorLines ? colorMap(d.level) : line.color) }); }); if(isConstraintType) { c.selectAll('g.contourfill path') .style('fill', trace.fillcolor); } else if(colorFills) { var firstFill; c.selectAll('g.contourfill path') .style('fill', function(d) { if(firstFill === undefined) firstFill = d.level; return colorMap(d.level + 0.5 * cs); }); if(firstFill === undefined) firstFill = start; c.selectAll('g.contourbg path') .style('fill', colorMap(firstFill - 0.5 * cs)); } }); heatmapStyle(gd); };
angular.module('codepuppy').directive('header', function() { return { restrict: 'E', templateUrl: '/assets/partials/header/header.html' }; });
/* */ "format cjs"; /*! * Angular Material Design * https://github.com/angular/material * @license MIT * v1.0.0-rc2-master-fcd199e */ (function( window, angular, undefined ){ "use strict"; /** * @ngdoc module * @name material.components.subheader * @description * SubHeader module * * Subheaders are special list tiles that delineate distinct sections of a * list or grid list and are typically related to the current filtering or * sorting criteria. Subheader tiles are either displayed inline with tiles or * can be associated with content, for example, in an adjacent column. * * Upon scrolling, subheaders remain pinned to the top of the screen and remain * pinned until pushed on or off screen by the next subheader. @see [Material * Design Specifications](https://www.google.com/design/spec/components/subheaders.html) * * > To improve the visual grouping of content, use the system color for your subheaders. * */ angular .module('material.components.subheader', [ 'material.core', 'material.components.sticky' ]) .directive('mdSubheader', MdSubheaderDirective); /** * @ngdoc directive * @name mdSubheader * @module material.components.subheader * * @restrict E * * @description * The `<md-subheader>` directive is a subheader for a section. By default it is sticky. * You can make it not sticky by applying the `md-no-sticky` class to the subheader. * * * @usage * <hljs lang="html"> * <md-subheader>Online Friends</md-subheader> * </hljs> */ function MdSubheaderDirective($mdSticky, $compile, $mdTheming, $mdUtil) { return { restrict: 'E', replace: true, transclude: true, template: ( '<div class="md-subheader">' + ' <div class="md-subheader-inner">' + ' <span class="md-subheader-content"></span>' + ' </div>' + '</div>' ), link: function postLink(scope, element, attr, controllers, transclude) { $mdTheming(element); var outerHTML = element[0].outerHTML; function getContent(el) { return angular.element(el[0].querySelector('.md-subheader-content')); } // Transclude the user-given contents of the subheader // the conventional way. transclude(scope, function(clone) { getContent(element).append(clone); }); // Create another clone, that uses the outer and inner contents // of the element, that will be 'stickied' as the user scrolls. if (!element.hasClass('md-no-sticky')) { transclude(scope, function(clone) { // If the user adds an ng-if or ng-repeat directly to the md-subheader element, the // compiled clone below will only be a comment tag (since they replace their elements with // a comment) which cannot be properly passed to the $mdSticky; so we wrap it in our own // DIV to ensure we have something $mdSticky can use var wrapperHtml = '<div class="md-subheader-wrapper">' + outerHTML + '</div>'; var stickyClone = $compile(wrapperHtml)(scope); // Append the sticky $mdSticky(scope, element, stickyClone); // Delay initialization until after any `ng-if`/`ng-repeat`/etc has finished before // attempting to create the clone $mdUtil.nextTick(function() { getContent(stickyClone).append(clone); }); }); } } } } MdSubheaderDirective.$inject = ["$mdSticky", "$compile", "$mdTheming", "$mdUtil"]; })(window, window.angular);
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * Copyright (c) 2016-present, Ali Najafizadeh * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule WebViewBridge */ 'use strict'; var React = require('react'); var ReactNative = require('react-native'); var invariant = require('invariant'); var keyMirror = require('keymirror'); var resolveAssetSource = require('react-native/Libraries/Image/resolveAssetSource'); var { ReactNativeViewAttributes, UIManager, EdgeInsetsPropType, StyleSheet, Text, View, WebView, requireNativeComponent, DeviceEventEmitter, NativeModules: { WebViewBridgeManager } } = ReactNative; var PropTypes = require('prop-types'); var RCT_WEBVIEWBRIDGE_REF = 'webviewbridge'; var WebViewBridgeState = keyMirror({ IDLE: null, LOADING: null, ERROR: null, }); var RCTWebViewBridge = requireNativeComponent('RCTWebViewBridge', WebViewBridge); /** * Renders a native WebView. */ var createReactClass = require('create-react-class'); var WebViewBridge = createReactClass({ propTypes: { ...RCTWebViewBridge.propTypes, /** * Will be called once the message is being sent from webview */ onBridgeMessage: PropTypes.func, }, getInitialState: function() { return { viewState: WebViewBridgeState.IDLE, lastErrorEvent: null, startInLoadingState: true, }; }, componentWillMount: function() { DeviceEventEmitter.addListener("webViewBridgeMessage", (body) => { const { onBridgeMessage } = this.props; const message = body.message; if (onBridgeMessage) { onBridgeMessage(message); } }); if (this.props.startInLoadingState) { this.setState({viewState: WebViewBridgeState.LOADING}); } }, render: function() { var otherView = null; if (this.state.viewState === WebViewBridgeState.LOADING) { otherView = this.props.renderLoading && this.props.renderLoading(); } else if (this.state.viewState === WebViewBridgeState.ERROR) { var errorEvent = this.state.lastErrorEvent; otherView = this.props.renderError && this.props.renderError( errorEvent.domain, errorEvent.code, errorEvent.description); } else if (this.state.viewState !== WebViewBridgeState.IDLE) { console.error('RCTWebViewBridge invalid state encountered: ' + this.state.loading); } var webViewStyles = [styles.container, this.props.style]; if (this.state.viewState === WebViewBridgeState.LOADING || this.state.viewState === WebViewBridgeState.ERROR) { // if we're in either LOADING or ERROR states, don't show the webView webViewStyles.push(styles.hidden); } var {javaScriptEnabled, domStorageEnabled} = this.props; if (this.props.javaScriptEnabledAndroid) { console.warn('javaScriptEnabledAndroid is deprecated. Use javaScriptEnabled instead'); javaScriptEnabled = this.props.javaScriptEnabledAndroid; } if (this.props.domStorageEnabledAndroid) { console.warn('domStorageEnabledAndroid is deprecated. Use domStorageEnabled instead'); domStorageEnabled = this.props.domStorageEnabledAndroid; } let {source, ...props} = {...this.props}; var webView = <RCTWebViewBridge ref={RCT_WEBVIEWBRIDGE_REF} key="webViewKey" javaScriptEnabled={true} {...props} source={resolveAssetSource(source)} style={webViewStyles} onLoadingStart={this.onLoadingStart} onLoadingFinish={this.onLoadingFinish} onLoadingError={this.onLoadingError} onChange={this.onMessage} />; return ( <View style={styles.container}> {webView} {otherView} </View> ); }, onMessage(event) { if (this.props.onBridgeMessage != null && event.nativeEvent != null) { this.props.onBridgeMessage(event.nativeEvent.message) } }, goForward: function() { UIManager.dispatchViewManagerCommand( this.getWebViewBridgeHandle(), UIManager.RCTWebViewBridge.Commands.goForward, null ); }, goBack: function() { UIManager.dispatchViewManagerCommand( this.getWebViewBridgeHandle(), UIManager.RCTWebViewBridge.Commands.goBack, null ); }, reload: function() { UIManager.dispatchViewManagerCommand( this.getWebViewBridgeHandle(), UIManager.RCTWebViewBridge.Commands.reload, null ); }, sendToBridge: function (message: string) { UIManager.dispatchViewManagerCommand( this.getWebViewBridgeHandle(), UIManager.RCTWebViewBridge.Commands.sendToBridge, [message] ); }, /** * We return an event with a bunch of fields including: * url, title, loading, canGoBack, canGoForward */ updateNavigationState: function(event) { if (this.props.onNavigationStateChange) { this.props.onNavigationStateChange(event.nativeEvent); } }, getWebViewBridgeHandle: function() { return ReactNative.findNodeHandle(this.refs[RCT_WEBVIEWBRIDGE_REF]); }, onLoadingStart: function(event) { var onLoadStart = this.props.onLoadStart; onLoadStart && onLoadStart(event); this.updateNavigationState(event); }, onLoadingError: function(event) { event.persist(); // persist this event because we need to store it var {onError, onLoadEnd} = this.props; onError && onError(event); onLoadEnd && onLoadEnd(event); this.setState({ lastErrorEvent: event.nativeEvent, viewState: WebViewBridgeState.ERROR }); }, onLoadingFinish: function(event) { var {onLoad, onLoadEnd} = this.props; onLoad && onLoad(event); onLoadEnd && onLoadEnd(event); this.setState({ viewState: WebViewBridgeState.IDLE, }); this.updateNavigationState(event); }, }); var styles = StyleSheet.create({ container: { flex: 1, }, hidden: { height: 0, flex: 0, // disable 'flex:1' when hiding a View }, }); module.exports = WebViewBridge;
let classes = ["A組", "B組", "C組", "D組"]; for (let grade = 1; grade < 4; grade++) { for (let i = 0; i < classes.length; i++) { document.write(grade + "年" + classes[i] + "<br>"); } } let a = ["あ", "い", "う", "え", "お"]; let ka = ["か", "き", "く", "け", "こ"]; for (let anum = 0; anum < a.length; anum++) { for (let kanum = 0; kanum < ka.length; kanum++) { document.write(a[anum] + ka[kanum] + "<br>"); document.write(ka[kanum] + a[anum] + "<br>"); } } /* comment */ // comment
// https://raw.githubusercontent.com/behnammodi/polyfill/master/array.polyfill.js if (!Array.prototype.findLast) { Object.defineProperty(Array.prototype, "findLast", { value: function (predicate, thisArg) { let idx = this.length - 1; while (idx >= 0) { const value = this[idx]; if (predicate.call(thisArg, value, idx, this)) { return value; } idx--; } return undefined; } , writable: true, enumerable: false, configurable: true }); }
/** * @author mpk / http://polko.me/ */ import { LinearFilter, NearestFilter, RGBAFormat, RGBFormat, ShaderMaterial, Texture, UniformsUtils, WebGLRenderTarget } from "../../../build/three.module.js"; import { Pass } from "./Pass.d.ts"; import { SMAAEdgesShader } from "../shaders/SMAAShader.d.ts"; import { SMAAWeightsShader } from "../shaders/SMAAShader.d.ts"; import { SMAABlendShader } from "../shaders/SMAAShader.d.ts"; var SMAAPass = function ( width, height ) { Pass.call( this ); // render targets this.edgesRT = new WebGLRenderTarget( width, height, { depthBuffer: false, stencilBuffer: false, generateMipmaps: false, minFilter: LinearFilter, format: RGBFormat } ); this.edgesRT.texture.name = "SMAAPass.edges"; this.weightsRT = new WebGLRenderTarget( width, height, { depthBuffer: false, stencilBuffer: false, generateMipmaps: false, minFilter: LinearFilter, format: RGBAFormat } ); this.weightsRT.texture.name = "SMAAPass.weights"; // textures var scope = this; var areaTextureImage = new Image(); areaTextureImage.src = this.getAreaTexture(); areaTextureImage.onload = function () { // assigning data to HTMLImageElement.src is asynchronous (see #15162) scope.areaTexture.needsUpdate = true; }; this.areaTexture = new Texture(); this.areaTexture.name = "SMAAPass.area"; this.areaTexture.image = areaTextureImage; this.areaTexture.format = RGBFormat; this.areaTexture.minFilter = LinearFilter; this.areaTexture.generateMipmaps = false; this.areaTexture.flipY = false; var searchTextureImage = new Image(); searchTextureImage.src = this.getSearchTexture(); searchTextureImage.onload = function () { // assigning data to HTMLImageElement.src is asynchronous (see #15162) scope.searchTexture.needsUpdate = true; }; this.searchTexture = new Texture(); this.searchTexture.name = "SMAAPass.search"; this.searchTexture.image = searchTextureImage; this.searchTexture.magFilter = NearestFilter; this.searchTexture.minFilter = NearestFilter; this.searchTexture.generateMipmaps = false; this.searchTexture.flipY = false; // materials - pass 1 if ( SMAAEdgesShader === undefined ) { console.error( "SMAAPass relies on SMAAShader" ); } this.uniformsEdges = UniformsUtils.clone( SMAAEdgesShader.uniforms ); this.uniformsEdges[ "resolution" ].value.set( 1 / width, 1 / height ); this.materialEdges = new ShaderMaterial( { defines: Object.assign( {}, SMAAEdgesShader.defines ), uniforms: this.uniformsEdges, vertexShader: SMAAEdgesShader.vertexShader, fragmentShader: SMAAEdgesShader.fragmentShader } ); // materials - pass 2 this.uniformsWeights = UniformsUtils.clone( SMAAWeightsShader.uniforms ); this.uniformsWeights[ "resolution" ].value.set( 1 / width, 1 / height ); this.uniformsWeights[ "tDiffuse" ].value = this.edgesRT.texture; this.uniformsWeights[ "tArea" ].value = this.areaTexture; this.uniformsWeights[ "tSearch" ].value = this.searchTexture; this.materialWeights = new ShaderMaterial( { defines: Object.assign( {}, SMAAWeightsShader.defines ), uniforms: this.uniformsWeights, vertexShader: SMAAWeightsShader.vertexShader, fragmentShader: SMAAWeightsShader.fragmentShader } ); // materials - pass 3 this.uniformsBlend = UniformsUtils.clone( SMAABlendShader.uniforms ); this.uniformsBlend[ "resolution" ].value.set( 1 / width, 1 / height ); this.uniformsBlend[ "tDiffuse" ].value = this.weightsRT.texture; this.materialBlend = new ShaderMaterial( { uniforms: this.uniformsBlend, vertexShader: SMAABlendShader.vertexShader, fragmentShader: SMAABlendShader.fragmentShader } ); this.needsSwap = false; this.fsQuad = new Pass.FullScreenQuad( null ); }; SMAAPass.prototype = Object.assign( Object.create( Pass.prototype ), { constructor: SMAAPass, render: function ( renderer, writeBuffer, readBuffer/*, deltaTime, maskActive*/ ) { // pass 1 this.uniformsEdges[ "tDiffuse" ].value = readBuffer.texture; this.fsQuad.material = this.materialEdges; renderer.setRenderTarget( this.edgesRT ); if ( this.clear ) renderer.clear(); this.fsQuad.render( renderer ); // pass 2 this.fsQuad.material = this.materialWeights; renderer.setRenderTarget( this.weightsRT ); if ( this.clear ) renderer.clear(); this.fsQuad.render( renderer ); // pass 3 this.uniformsBlend[ "tColor" ].value = readBuffer.texture; this.fsQuad.material = this.materialBlend; if ( this.renderToScreen ) { renderer.setRenderTarget( null ); this.fsQuad.render( renderer ); } else { renderer.setRenderTarget( writeBuffer ); if ( this.clear ) renderer.clear(); this.fsQuad.render( renderer ); } }, setSize: function ( width, height ) { this.edgesRT.setSize( width, height ); this.weightsRT.setSize( width, height ); this.materialEdges.uniforms[ 'resolution' ].value.set( 1 / width, 1 / height ); this.materialWeights.uniforms[ 'resolution' ].value.set( 1 / width, 1 / height ); this.materialBlend.uniforms[ 'resolution' ].value.set( 1 / width, 1 / height ); }, getAreaTexture: function () { return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAIwCAIAAACOVPcQAACBeklEQVR42u39W4xlWXrnh/3WWvuciIzMrKxrV8/0rWbY0+SQFKcb4owIkSIFCjY9AC1BT/LYBozRi+EX+cV+8IMsYAaCwRcBwjzMiw2jAWtgwC8WR5Q8mDFHZLNHTarZGrLJJllt1W2qKrsumZWZcTvn7L3W54e1vrXX3vuciLPPORFR1XE2EomorB0nVuz//r71re/y/1eMvb4Cb3N11xV/PP/2v4UBAwJG/7H8urx6/25/Gf8O5hypMQ0EEEQwAqLfoN/Z+97f/SW+/NvcgQk4sGBJK6H7N4PFVL+K+e0N11yNfkKvwUdwdlUAXPHHL38oa15f/i/46Ih6SuMSPmLAYAwyRKn7dfMGH97jaMFBYCJUgotIC2YAdu+LyW9vvubxAP8kAL8H/koAuOKP3+q6+xGnd5kdYCeECnGIJViwGJMAkQKfDvB3WZxjLKGh8VSCCzhwEWBpMc5/kBbjawT4HnwJfhr+pPBIu7uu+OOTo9vsmtQcniMBGkKFd4jDWMSCRUpLjJYNJkM+IRzQ+PQvIeAMTrBS2LEiaiR9b/5PuT6Ap/AcfAFO4Y3dA3DFH7/VS+M8k4baEAQfMI4QfbVDDGIRg7GKaIY52qAjTAgTvGBAPGIIghOCYAUrGFNgzA7Q3QhgCwfwAnwe5vDejgG44o/fbm1C5ZlYQvQDARPAIQGxCWBM+wWl37ZQESb4gImexGMDouhGLx1Cst0Saa4b4AqO4Hk4gxo+3DHAV/nx27p3JziPM2pVgoiia5MdEzCGULprIN7gEEeQ5IQxEBBBQnxhsDb5auGmAAYcHMA9eAAz8PBol8/xij9+C4Djlim4gJjWcwZBhCBgMIIYxGAVIkH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na+uue//lTA/CV1V/3/M837aKvvv6653++UQvmauuve/7nTwfAV1N/3fM/fzr24Cuuv+75nz8FFnxl9dc9//MOr/8/glixwRuUfM4AAAAASUVORK5CYII='; }, getSearchTexture: function () { return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAAhCAAAAABIXyLAAAAAOElEQVRIx2NgGAWjYBSMglEwEICREYRgFBZBqDCSLA2MGPUIVQETE9iNUAqLR5gIeoQKRgwXjwAAGn4AtaFeYLEAAAAASUVORK5CYII='; } } ); export { SMAAPass };
// LicenseSet.model.js const BaseObjectSet = require('../_base/BaseObjectSet.model'); const License = require('./License.model'); module.exports = class LicenseSet extends BaseObjectSet { constructor(licenses = []) { super(Array.from(licenses).map((license) => new License(license))); } };
import { RGB } from './Utils.js'; const TETROMINO_COLORS = [ RGB(255, 69, 0), // Orange Red RGB(50, 205, 50), // Lime Green RGB(255, 215, 0), // Gold RGB(0, 128, 128), // Teal RGB(119, 136, 153), // LiteSlateGray RGB(250, 235, 215), // Antique White RGB(255, 105, 180) // HotPink ]; export { TETROMINO_COLORS };
var sinon = require('sinon'), chai = require('chai'); global.expect = chai.expect; beforeEach(function(){ global.sinon = sinon.sandbox.create(); }); afterEach(function(){ global.sinon.restore(); });
/*! * Bootstrap-select v1.12.4 (http://silviomoreto.github.io/bootstrap-select) * * Copyright 2013-2017 bootstrap-select * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE) */ (function (root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module unless amdModuleId is set define(["jquery"], function (a0) { return (factory(a0)); }); } else if (typeof module === 'object' && module.exports) { // Node. Does not work with strict CommonJS, but // only CommonJS-like environments that support module.exports, // like Node. module.exports = factory(require("jquery")); } else { factory(root["jQuery"]); } }(this, function (jQuery) { /*! * Translated default messages for bootstrap-select. * Locale: AR (Arabic) * Author: Yasser Lotfy <y_l@alive.com> */ (function ($) { $.fn.selectpicker.defaults = { noneSelectedText: 'لم يتم إختيار شئ', noneResultsText: 'لا توجد نتائج مطابقة لـ {0}', countSelectedText: function (numSelected, numTotal) { return (numSelected == 1) ? "{0} خيار تم إختياره" : "{0} خيارات تمت إختيارها"; }, maxOptionsText: function (numAll, numGroup) { return [ (numAll == 1) ? 'تخطى الحد المسموح ({n} خيار بحد أقصى)' : 'تخطى الحد المسموح ({n} خيارات بحد أقصى)', (numGroup == 1) ? 'تخطى الحد المسموح للمجموعة ({n} خيار بحد أقصى)' : 'تخطى الحد المسموح للمجموعة ({n} خيارات بحد أقصى)' ]; }, selectAllText: 'إختيار الجميع', deselectAllText: 'إلغاء إختيار الجميع', multipleSeparator: '، ' }; })(jQuery); }));
/* eslint-disable one-var, one-var-declaration-per-line, no-unused-vars, prefer-const, import/no-mutable-exports */ /** * `safeCall` is used by our modified babel-plugin-safe-bind.js. * `export` is stripped in the final output and is only used for our NodeJS test scripts. */ export let // window SafeCustomEvent, SafeDOMParser, SafeError, SafeEventTarget, SafeFileReader, SafeKeyboardEvent, SafeMouseEvent, Object, SafePromise, SafeProxy, SafeResponse, SafeSymbol, fire, off, on, // Symbol toStringTagSym, // Object apply, assign, bind, defineProperty, describeProperty, getOwnPropertyNames, getOwnPropertySymbols, objectKeys, objectValues, // Object.prototype hasOwnProperty, objectToString, /** Array.prototype can be eavesdropped via setters like '0','1',... * on `push` and `arr[i] = 123`, as well as via getters if you read beyond * its length or from an unassigned `hole`. */ concat, filter, forEach, indexOf, // Element.prototype remove, // String.prototype charCodeAt, slice, // safeCall safeCall, // various values builtinGlobals, // various methods arrayIsArray, createObjectURL, funcToString, jsonParse, jsonStringify, logging, mathRandom, parseFromString, // DOMParser readAsDataURL, // FileReader safeResponseBlob, // Response - safe = "safe global" to disambiguate the name stopImmediatePropagation, then, // various getters getBlobType, // Blob getCurrentScript, // Document getDetail, // CustomEvent getReaderResult, // FileReader getRelatedTarget; // MouseEvent /** * VAULT consists of the parent's safe globals to protect our communications/globals * from a page that creates an iframe with src = location and modifies its contents * immediately after adding it to DOM via direct manipulation in frame.contentWindow * or window[0] before our content script runs at document_start, https://crbug.com/1261964 */ export const VAULT = (() => { let ArrayP; let ElementP; let SafeObject; let StringP; let i = -1; let call; let res; let src = global; // FF defines some stuff only on `global` in content mode let srcWindow = window; if (process.env.VAULT_ID) { res = window[process.env.VAULT_ID]; delete window[process.env.VAULT_ID]; } if (!res) { res = createNullObj(); } else if (!isFunction(res[0])) { // injectPageSandbox iframe's `global` is `window` because it's in page mode src = res[0]; srcWindow = src; res = createNullObj(); } res = [ // window SafeCustomEvent = res[i += 1] || src.CustomEvent, SafeDOMParser = res[i += 1] || src.DOMParser, SafeError = res[i += 1] || src.Error, SafeEventTarget = res[i += 1] || src.EventTarget, SafeFileReader = res[i += 1] || src.FileReader, SafeKeyboardEvent = res[i += 1] || src.KeyboardEvent, SafeMouseEvent = res[i += 1] || src.MouseEvent, Object = res[i += 1] || src.Object, SafePromise = res[i += 1] || src.Promise, SafeSymbol = res[i += 1] || src.Symbol, // In FF content mode global.Proxy !== window.Proxy SafeProxy = res[i += 1] || src.Proxy, SafeResponse = res[i += 1] || src.Response, fire = res[i += 1] || src.dispatchEvent, off = res[i += 1] || src.removeEventListener, on = res[i += 1] || src.addEventListener, // Object - using SafeObject to pacify eslint without disabling the rule defineProperty = (SafeObject = Object) && res[i += 1] || SafeObject.defineProperty, describeProperty = res[i += 1] || SafeObject.getOwnPropertyDescriptor, getOwnPropertyNames = res[i += 1] || SafeObject.getOwnPropertyNames, getOwnPropertySymbols = res[i += 1] || SafeObject.getOwnPropertySymbols, assign = res[i += 1] || SafeObject.assign, objectKeys = res[i += 1] || SafeObject.keys, objectValues = res[i += 1] || SafeObject.values, apply = res[i += 1] || SafeObject.apply, bind = res[i += 1] || SafeObject.bind, // Object.prototype hasOwnProperty = res[i += 1] || SafeObject[PROTO].hasOwnProperty, objectToString = res[i += 1] || SafeObject[PROTO].toString, // Array.prototype concat = res[i += 1] || (ArrayP = src.Array[PROTO]).concat, filter = res[i += 1] || ArrayP.filter, forEach = res[i += 1] || ArrayP.forEach, indexOf = res[i += 1] || ArrayP.indexOf, // Element.prototype remove = res[i += 1] || (ElementP = src.Element[PROTO]).remove, // String.prototype charCodeAt = res[i += 1] || (StringP = src.String[PROTO]).charCodeAt, slice = res[i += 1] || StringP.slice, // safeCall safeCall = res[i += 1] || (call = SafeObject.call).bind(call), // various methods createObjectURL = res[i += 1] || src.URL.createObjectURL, funcToString = res[i += 1] || safeCall.toString, arrayIsArray = res[i += 1] || src.Array.isArray, /* Exporting JSON methods separately instead of exporting SafeJSON as its props may be broken * by the page if it gains access to any Object from the vault e.g. a thrown SafeError. */ jsonParse = res[i += 1] || src.JSON.parse, jsonStringify = res[i += 1] || src.JSON.stringify, logging = res[i += 1] || assign({ __proto__: null }, src.console), mathRandom = res[i += 1] || src.Math.random, parseFromString = res[i += 1] || SafeDOMParser[PROTO].parseFromString, readAsDataURL = res[i += 1] || SafeFileReader[PROTO].readAsDataURL, safeResponseBlob = res[i += 1] || SafeResponse[PROTO].blob, stopImmediatePropagation = res[i += 1] || src.Event[PROTO].stopImmediatePropagation, then = res[i += 1] || SafePromise[PROTO].then, // various getters getBlobType = res[i += 1] || describeProperty(src.Blob[PROTO], 'type').get, getCurrentScript = res[i += 1] || describeProperty(src.Document[PROTO], 'currentScript').get, getDetail = res[i += 1] || describeProperty(SafeCustomEvent[PROTO], 'detail').get, getReaderResult = res[i += 1] || describeProperty(SafeFileReader[PROTO], 'result').get, getRelatedTarget = res[i += 1] || describeProperty(SafeMouseEvent[PROTO], 'relatedTarget').get, // various values builtinGlobals = res[i += 1] || [ getOwnPropertyNames(srcWindow), src !== srcWindow && getOwnPropertyNames(src), ], ]; // Well-known Symbols are unforgeable toStringTagSym = SafeSymbol.toStringTag; return res; })();
!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,n){"use strict";e.exports=n(5)},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}/* object-assign (c) Sindre Sorhus @license MIT */ var o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,i,u=r(e),c=1;c<arguments.length;c++){n=Object(arguments[c]);for(var s in n)a.call(n,s)&&(u[s]=n[s]);if(o){i=o(n);for(var f=0;f<i.length;f++)l.call(n,i[f])&&(u[i[f]]=n[i[f]])}}return u}},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(0),a=r(o),l=n(6),i=r(l);n(16);var u=n(17),c=r(u);i.default.render(a.default.createElement(c.default,null),document.querySelector("#app"))},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);throw t=Error(n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."),t.name="Invariant Violation",t.framesToPop=1,t}function o(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||N}function a(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||N}function l(){}function i(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||N}function u(e,t,n){var r,o={},a=null,l=null;if(null!=t)for(r in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(a=""+t.key),t)M.call(t,r)&&!R.hasOwnProperty(r)&&(o[r]=t[r]);var i=arguments.length-2;if(1===i)o.children=n;else if(1<i){for(var u=Array(i),c=0;c<i;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(r in i=e.defaultProps)void 0===o[r]&&(o[r]=i[r]);return{$$typeof:w,type:e,key:a,ref:l,props:o,_owner:I.current}}function c(e){return"object"==typeof e&&null!==e&&e.$$typeof===w}function s(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}function f(e,t,n,r){if(L.length){var o=L.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function d(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>L.length&&L.push(e)}function p(e,t,n,o){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var l=!1;if(null===e)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case w:case E:case x:case T:l=!0}}if(l)return n(o,e,""===t?"."+m(e,0):t),1;if(l=0,t=""===t?".":t+":",Array.isArray(e))for(var i=0;i<e.length;i++){a=e[i];var u=t+m(a,i);l+=p(a,u,n,o)}else if(null===e||void 0===e?u=null:(u=_&&e[_]||e["@@iterator"],u="function"==typeof u?u:null),"function"==typeof u)for(e=u.call(e),i=0;!(a=e.next()).done;)a=a.value,u=t+m(a,i++),l+=p(a,u,n,o);else"object"===a&&(n=""+e,r("31","[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return l}function m(e,t){return"object"==typeof e&&null!==e&&null!=e.key?s(e.key):t.toString(36)}function h(e,t){e.func.call(e.context,t,e.count++)}function g(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?y(e,r,n,C.thatReturnsArgument):null!=e&&(c(e)&&(t=o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(D,"$&/")+"/")+n,e={$$typeof:w,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}),r.push(e))}function y(e,t,n,r,o){var a="";null!=n&&(a=(""+n).replace(D,"$&/")+"/"),t=f(t,a,r,o),null==e||p(e,"",g,t),d(t)}/** @license React v16.2.0 * react.production.min.js * * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var v=n(2),b=n(3),C=n(1),k="function"==typeof Symbol&&Symbol.for,w=k?Symbol.for("react.element"):60103,E=k?Symbol.for("react.call"):60104,x=k?Symbol.for("react.return"):60105,T=k?Symbol.for("react.portal"):60106,S=k?Symbol.for("react.fragment"):60107,_="function"==typeof Symbol&&Symbol.iterator,N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};o.prototype.isReactComponent={},o.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&r("85"),this.updater.enqueueSetState(this,e,t,"setState")},o.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},l.prototype=o.prototype;var P=a.prototype=new l;P.constructor=a,v(P,o.prototype),P.isPureReactComponent=!0;var O=i.prototype=new l;O.constructor=i,v(O,o.prototype),O.unstable_isAsyncReactComponent=!0,O.render=function(){return this.props.children};var I={current:null},M=Object.prototype.hasOwnProperty,R={key:!0,ref:!0,__self:!0,__source:!0},D=/\/+/g,L=[],F={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return y(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;t=f(null,null,t,n),null==e||p(e,"",h,t),d(t)},count:function(e){return null==e?0:p(e,"",C.thatReturnsNull,null)},toArray:function(e){var t=[];return y(e,t,null,C.thatReturnsArgument),t},only:function(e){return c(e)||r("143"),e}},Component:o,PureComponent:a,unstable_AsyncComponent:i,Fragment:S,createElement:u,cloneElement:function(e,t,n){var r=v({},e.props),o=e.key,a=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,l=I.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(u in t)M.call(t,u)&&!R.hasOwnProperty(u)&&(r[u]=void 0===t[u]&&void 0!==i?i[u]:t[u])}var u=arguments.length-2;if(1===u)r.children=n;else if(1<u){i=Array(u);for(var c=0;c<u;c++)i[c]=arguments[c+2];r.children=i}return{$$typeof:w,type:e.type,key:o,ref:a,props:r,_owner:l}},createFactory:function(e){var t=u.bind(null,e);return t.type=e,t},isValidElement:c,version:"16.2.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:I,assign:v}},A=Object.freeze({default:F}),U=A&&F||A;e.exports=U.default?U.default:U},function(e,t,n){"use strict";function r(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}r(),e.exports=n(7)},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);throw t=Error(n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."),t.name="Invariant Violation",t.framesToPop=1,t}function o(e,t){return(e&t)===t}function a(e,t){if(Pn.hasOwnProperty(e)||2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1]))return!1;if(null===t)return!0;switch(typeof t){case"boolean":return Pn.hasOwnProperty(e)?e=!0:(t=l(e))?e=t.hasBooleanValue||t.hasStringBooleanValue||t.hasOverloadedBooleanValue:(e=e.toLowerCase().slice(0,5),e="data-"===e||"aria-"===e),e;case"undefined":case"number":case"string":case"object":return!0;default:return!1}}function l(e){return In.hasOwnProperty(e)?In[e]:null}function i(e){return e[1].toUpperCase()}function u(e,t,n,r,o,a,l,i,u){Kn._hasCaughtError=!1,Kn._caughtError=null;var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){Kn._caughtError=e,Kn._hasCaughtError=!0}}function c(){if(Kn._hasRethrowError){var e=Kn._rethrowError;throw Kn._rethrowError=null,Kn._hasRethrowError=!1,e}}function s(){if(Wn)for(var e in $n){var t=$n[e],n=Wn.indexOf(e);if(-1<n||r("96",e),!qn[n]){t.extractEvents||r("97",e),qn[n]=t,n=t.eventTypes;for(var o in n){var a=void 0,l=n[o],i=t,u=o;Qn.hasOwnProperty(u)&&r("99",u),Qn[u]=l;var c=l.phasedRegistrationNames;if(c){for(a in c)c.hasOwnProperty(a)&&f(c[a],i,u);a=!0}else l.registrationName?(f(l.registrationName,i,u),a=!0):a=!1;a||r("98",o,e)}}}}function f(e,t,n){Gn[e]&&r("100",e),Gn[e]=t,Yn[e]=t.eventTypes[n].dependencies}function d(e){Wn&&r("101"),Wn=Array.prototype.slice.call(e),s()}function p(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var o=e[t];$n.hasOwnProperty(t)&&$n[t]===o||($n[t]&&r("102",t),$n[t]=o,n=!0)}n&&s()}function m(e,t,n,r){t=e.type||"unknown-event",e.currentTarget=er(r),Kn.invokeGuardedCallbackAndCatchFirstError(t,n,void 0,e),e.currentTarget=null}function h(e,t){return null==t&&r("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function g(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}function y(e,t){if(e){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)m(e,t,n[o],r[o]);else n&&m(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function v(e){return y(e,!0)}function b(e){return y(e,!1)}function C(e,t){var n=e.stateNode;if(!n)return null;var o=Zn(n);if(!o)return null;n=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(o=!o.disabled)||(e=e.type,o=!("button"===e||"input"===e||"select"===e||"textarea"===e)),e=!o;break e;default:e=!1}return e?null:(n&&"function"!=typeof n&&r("231",t,typeof n),n)}function k(e,t,n,r){for(var o,a=0;a<qn.length;a++){var l=qn[a];l&&(l=l.extractEvents(e,t,n,r))&&(o=h(o,l))}return o}function w(e){e&&(tr=h(tr,e))}function E(e){var t=tr;tr=null,t&&(e?g(t,v):g(t,b),tr&&r("95"),Kn.rethrowCaughtError())}function x(e){if(e[ar])return e[ar];for(var t=[];!e[ar];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}var n=void 0,r=e[ar];if(5===r.tag||6===r.tag)return r;for(;e&&(r=e[ar]);e=t.pop())n=r;return n}function T(e){if(5===e.tag||6===e.tag)return e.stateNode;r("33")}function S(e){return e[lr]||null}function _(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function N(e,t,n){for(var r=[];e;)r.push(e),e=_(e);for(e=r.length;0<e--;)t(r[e],"captured",n);for(e=0;e<r.length;e++)t(r[e],"bubbled",n)}function P(e,t,n){(t=C(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=h(n._dispatchListeners,t),n._dispatchInstances=h(n._dispatchInstances,e))}function O(e){e&&e.dispatchConfig.phasedRegistrationNames&&N(e._targetInst,P,e)}function I(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst;t=t?_(t):null,N(t,P,e)}}function M(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=C(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=h(n._dispatchListeners,t),n._dispatchInstances=h(n._dispatchInstances,e))}function R(e){e&&e.dispatchConfig.registrationName&&M(e._targetInst,null,e)}function D(e){g(e,O)}function L(e,t,n,r){if(n&&r)e:{for(var o=n,a=r,l=0,i=o;i;i=_(i))l++;i=0;for(var u=a;u;u=_(u))i++;for(;0<l-i;)o=_(o),l--;for(;0<i-l;)a=_(a),i--;for(;l--;){if(o===a||o===a.alternate)break e;o=_(o),a=_(a)}o=null}else o=null;for(a=o,o=[];n&&n!==a&&(null===(l=n.alternate)||l!==a);)o.push(n),n=_(n);for(n=[];r&&r!==a&&(null===(l=r.alternate)||l!==a);)n.push(r),r=_(r);for(r=0;r<o.length;r++)M(o[r],"bubbled",e);for(e=n.length;0<e--;)M(n[e],"captured",t)}function F(){return!cr&&Cn.canUseDOM&&(cr="textContent"in document.documentElement?"textContent":"innerText"),cr}function A(){if(sr._fallbackText)return sr._fallbackText;var e,t,n=sr._startText,r=n.length,o=U(),a=o.length;for(e=0;e<r&&n[e]===o[e];e++);var l=r-e;for(t=1;t<=l&&n[r-t]===o[a-t];t++);return sr._fallbackText=o.slice(e,1<t?1-t:void 0),sr._fallbackText}function U(){return"value"in sr._root?sr._root.value:sr._root[F()]}function H(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface;for(var o in e)e.hasOwnProperty(o)&&((t=e[o])?this[o]=t(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?wn.thatReturnsTrue:wn.thatReturnsFalse,this.isPropagationStopped=wn.thatReturnsFalse,this}function j(e,t,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)}function z(e){e instanceof this||r("223"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function V(e){e.eventPool=[],e.getPooled=j,e.release=z}function B(e,t,n,r){return H.call(this,e,t,n,r)}function K(e,t,n,r){return H.call(this,e,t,n,r)}function W(e,t){switch(e){case"topKeyUp":return-1!==pr.indexOf(t.keyCode);case"topKeyDown":return 229!==t.keyCode;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function $(e){return e=e.detail,"object"==typeof e&&"data"in e?e.data:null}function q(e,t){switch(e){case"topCompositionEnd":return $(t);case"topKeyPress":return 32!==t.which?null:(Er=!0,kr);case"topTextInput":return e=t.data,e===kr&&Er?null:e;default:return null}}function Q(e,t){if(xr)return"topCompositionEnd"===e||!mr&&W(e,t)?(e=A(),sr._root=null,sr._startText=null,sr._fallbackText=null,xr=!1,e):null;switch(e){case"topPaste":return null;case"topKeyPress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"topCompositionEnd":return Cr?null:t.data;default:return null}}function G(e){if(e=Jn(e)){Sr&&"function"==typeof Sr.restoreControlledState||r("194");var t=Zn(e.stateNode);Sr.restoreControlledState(e.stateNode,e.type,t)}}function Y(e){_r?Nr?Nr.push(e):Nr=[e]:_r=e}function X(){if(_r){var e=_r,t=Nr;if(Nr=_r=null,G(e),t)for(e=0;e<t.length;e++)G(t[e])}}function Z(e,t){return e(t)}function J(e,t){if(Ir)return Z(e,t);Ir=!0;try{return Z(e,t)}finally{Ir=!1,X()}}function ee(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Mr[e.type]:"textarea"===t}function te(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function ne(e,t){if(!Cn.canUseDOM||t&&!("addEventListener"in document))return!1;t="on"+e;var n=t in document;return n||(n=document.createElement("div"),n.setAttribute(t,"return;"),n="function"==typeof n[t]),!n&&vr&&"wheel"===e&&(n=document.implementation.hasFeature("Events.wheel","3.0")),n}function re(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function oe(e){var t=re(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"function"==typeof n.get&&"function"==typeof n.set)return Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:!0,get:function(){return n.get.call(this)},set:function(e){r=""+e,n.set.call(this,e)}}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}function ae(e){e._valueTracker||(e._valueTracker=oe(e))}function le(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=re(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function ie(e,t,n){return e=H.getPooled(Rr.change,e,t,n),e.type="change",Y(n),D(e),e}function ue(e){w(e),E(!1)}function ce(e){if(le(T(e)))return e}function se(e,t){if("topChange"===e)return t}function fe(){Dr&&(Dr.detachEvent("onpropertychange",de),Lr=Dr=null)}function de(e){"value"===e.propertyName&&ce(Lr)&&(e=ie(Lr,e,te(e)),J(ue,e))}function pe(e,t,n){"topFocus"===e?(fe(),Dr=t,Lr=n,Dr.attachEvent("onpropertychange",de)):"topBlur"===e&&fe()}function me(e){if("topSelectionChange"===e||"topKeyUp"===e||"topKeyDown"===e)return ce(Lr)}function he(e,t){if("topClick"===e)return ce(t)}function ge(e,t){if("topInput"===e||"topChange"===e)return ce(t)}function ye(e,t,n,r){return H.call(this,e,t,n,r)}function ve(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Ur[e])&&!!t[e]}function be(){return ve}function Ce(e,t,n,r){return H.call(this,e,t,n,r)}function ke(e){return e=e.type,"string"==typeof e?e:"function"==typeof e?e.displayName||e.name:null}function we(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if(0!=(2&t.effectTag))return 1;for(;t.return;)if(t=t.return,0!=(2&t.effectTag))return 1}return 3===t.tag?2:3}function Ee(e){return!!(e=e._reactInternalFiber)&&2===we(e)}function xe(e){2!==we(e)&&r("188")}function Te(e){var t=e.alternate;if(!t)return t=we(e),3===t&&r("188"),1===t?null:e;for(var n=e,o=t;;){var a=n.return,l=a?a.alternate:null;if(!a||!l)break;if(a.child===l.child){for(var i=a.child;i;){if(i===n)return xe(a),e;if(i===o)return xe(a),t;i=i.sibling}r("188")}if(n.return!==o.return)n=a,o=l;else{i=!1;for(var u=a.child;u;){if(u===n){i=!0,n=a,o=l;break}if(u===o){i=!0,o=a,n=l;break}u=u.sibling}if(!i){for(u=l.child;u;){if(u===n){i=!0,n=l,o=a;break}if(u===o){i=!0,o=l,n=a;break}u=u.sibling}i||r("189")}}n.alternate!==o&&r("190")}return 3!==n.tag&&r("188"),n.stateNode.current===n?e:t}function Se(e){if(!(e=Te(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function _e(e){if(!(e=Te(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child&&4!==t.tag)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function Ne(e){var t=e.targetInst;do{if(!t){e.ancestors.push(t);break}var n;for(n=t;n.return;)n=n.return;if(!(n=3!==n.tag?null:n.stateNode.containerInfo))break;e.ancestors.push(t),t=x(n)}while(t);for(n=0;n<e.ancestors.length;n++)t=e.ancestors[n],Kr(e.topLevelType,t,e.nativeEvent,te(e.nativeEvent))}function Pe(e){Br=!!e}function Oe(e,t,n){return n?En.listen(n,t,Me.bind(null,e)):null}function Ie(e,t,n){return n?En.capture(n,t,Me.bind(null,e)):null}function Me(e,t){if(Br){var n=te(t);if(n=x(n),null===n||"number"!=typeof n.tag||2===we(n)||(n=null),Vr.length){var r=Vr.pop();r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,e=r}else e={topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]};try{J(Ne,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>Vr.length&&Vr.push(e)}}}function Re(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function De(e){if(qr[e])return qr[e];if(!$r[e])return e;var t,n=$r[e];for(t in n)if(n.hasOwnProperty(t)&&t in Qr)return qr[e]=n[t];return""}function Le(e){return Object.prototype.hasOwnProperty.call(e,Zr)||(e[Zr]=Xr++,Yr[e[Zr]]={}),Yr[e[Zr]]}function Fe(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ae(e,t){var n=Fe(e);e=0;for(var r;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Fe(n)}}function Ue(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)}function He(e,t){if(oo||null==to||to!==xn())return null;var n=to;return"selectionStart"in n&&Ue(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?(n=window.getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}):n=void 0,ro&&Tn(ro,n)?null:(ro=n,e=H.getPooled(eo.select,no,e,t),e.type="select",e.target=to,D(e),e)}function je(e,t,n,r){return H.call(this,e,t,n,r)}function ze(e,t,n,r){return H.call(this,e,t,n,r)}function Ve(e,t,n,r){return H.call(this,e,t,n,r)}function Be(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,32<=e||13===e?e:0}function Ke(e,t,n,r){return H.call(this,e,t,n,r)}function We(e,t,n,r){return H.call(this,e,t,n,r)}function $e(e,t,n,r){return H.call(this,e,t,n,r)}function qe(e,t,n,r){return H.call(this,e,t,n,r)}function Qe(e,t,n,r){return H.call(this,e,t,n,r)}function Ge(e){0>po||(e.current=fo[po],fo[po]=null,po--)}function Ye(e,t){po++,fo[po]=e.current,e.current=t}function Xe(e){return Je(e)?go:mo.current}function Ze(e,t){var n=e.type.contextTypes;if(!n)return Nn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in n)a[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Je(e){return 2===e.tag&&null!=e.type.childContextTypes}function et(e){Je(e)&&(Ge(ho,e),Ge(mo,e))}function tt(e,t,n){null!=mo.cursor&&r("168"),Ye(mo,t,e),Ye(ho,n,e)}function nt(e,t){var n=e.stateNode,o=e.type.childContextTypes;if("function"!=typeof n.getChildContext)return t;n=n.getChildContext();for(var a in n)a in o||r("108",ke(e)||"Unknown",a);return kn({},t,n)}function rt(e){if(!Je(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Nn,go=mo.current,Ye(mo,t,e),Ye(ho,ho.current,e),!0}function ot(e,t){var n=e.stateNode;if(n||r("169"),t){var o=nt(e,go);n.__reactInternalMemoizedMergedChildContext=o,Ge(ho,e),Ge(mo,e),Ye(mo,o,e)}else Ge(ho,e);Ye(ho,t,e)}function at(e,t,n){this.tag=e,this.key=t,this.stateNode=this.type=null,this.sibling=this.child=this.return=null,this.index=0,this.memoizedState=this.updateQueue=this.memoizedProps=this.pendingProps=this.ref=null,this.internalContextTag=n,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function lt(e,t,n){var r=e.alternate;return null===r?(r=new at(e.tag,e.key,e.internalContextTag),r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.pendingProps=t,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function it(e,t,n){var o=void 0,a=e.type,l=e.key;return"function"==typeof a?(o=a.prototype&&a.prototype.isReactComponent?new at(2,l,t):new at(0,l,t),o.type=a,o.pendingProps=e.props):"string"==typeof a?(o=new at(5,l,t),o.type=a,o.pendingProps=e.props):"object"==typeof a&&null!==a&&"number"==typeof a.tag?(o=a,o.pendingProps=e.props):r("130",null==a?a:typeof a,""),o.expirationTime=n,o}function ut(e,t,n,r){return t=new at(10,r,t),t.pendingProps=e,t.expirationTime=n,t}function ct(e,t,n){return t=new at(6,null,t),t.pendingProps=e,t.expirationTime=n,t}function st(e,t,n){return t=new at(7,e.key,t),t.type=e.handler,t.pendingProps=e,t.expirationTime=n,t}function ft(e,t,n){return e=new at(9,null,t),e.expirationTime=n,e}function dt(e,t,n){return t=new at(4,e.key,t),t.pendingProps=e.children||[],t.expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pt(e){return function(t){try{return e(t)}catch(e){}}}function mt(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);yo=pt(function(e){return t.onCommitFiberRoot(n,e)}),vo=pt(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}function ht(e){"function"==typeof yo&&yo(e)}function gt(e){"function"==typeof vo&&vo(e)}function yt(e){return{baseState:e,expirationTime:0,first:null,last:null,callbackList:null,hasForceUpdate:!1,isInitialized:!1}}function vt(e,t){null===e.last?e.first=e.last=t:(e.last.next=t,e.last=t),(0===e.expirationTime||e.expirationTime>t.expirationTime)&&(e.expirationTime=t.expirationTime)}function bt(e,t){var n=e.alternate,r=e.updateQueue;null===r&&(r=e.updateQueue=yt(null)),null!==n?null===(e=n.updateQueue)&&(e=n.updateQueue=yt(null)):e=null,e=e!==r?e:null,null===e?vt(r,t):null===r.last||null===e.last?(vt(r,t),vt(e,t)):(vt(r,t),e.last=t)}function Ct(e,t,n,r){return e=e.partialState,"function"==typeof e?e.call(t,n,r):e}function kt(e,t,n,r,o,a){null!==e&&e.updateQueue===n&&(n=t.updateQueue={baseState:n.baseState,expirationTime:n.expirationTime,first:n.first,last:n.last,isInitialized:n.isInitialized,callbackList:null,hasForceUpdate:!1}),n.expirationTime=0,n.isInitialized?e=n.baseState:(e=n.baseState=t.memoizedState,n.isInitialized=!0);for(var l=!0,i=n.first,u=!1;null!==i;){var c=i.expirationTime;if(c>a){var s=n.expirationTime;(0===s||s>c)&&(n.expirationTime=c),u||(u=!0,n.baseState=e)}else u||(n.first=i.next,null===n.first&&(n.last=null)),i.isReplace?(e=Ct(i,r,e,o),l=!0):(c=Ct(i,r,e,o))&&(e=l?kn({},e,c):kn(e,c),l=!1),i.isForced&&(n.hasForceUpdate=!0),null!==i.callback&&(c=n.callbackList,null===c&&(c=n.callbackList=[]),c.push(i));i=i.next}return null!==n.callbackList?t.effectTag|=32:null!==n.first||n.hasForceUpdate||(t.updateQueue=null),u||(n.baseState=e),e}function wt(e,t){var n=e.callbackList;if(null!==n)for(e.callbackList=null,e=0;e<n.length;e++){var o=n[e],a=o.callback;o.callback=null,"function"!=typeof a&&r("191",a),a.call(t)}}function Et(e,t,n,o){function a(e,t){t.updater=l,e.stateNode=t,t._reactInternalFiber=e}var l={isMounted:Ee,enqueueSetState:function(n,r,o){n=n._reactInternalFiber,o=void 0===o?null:o;var a=t(n);bt(n,{expirationTime:a,partialState:r,callback:o,isReplace:!1,isForced:!1,nextCallback:null,next:null}),e(n,a)},enqueueReplaceState:function(n,r,o){n=n._reactInternalFiber,o=void 0===o?null:o;var a=t(n);bt(n,{expirationTime:a,partialState:r,callback:o,isReplace:!0,isForced:!1,nextCallback:null,next:null}),e(n,a)},enqueueForceUpdate:function(n,r){n=n._reactInternalFiber,r=void 0===r?null:r;var o=t(n);bt(n,{expirationTime:o,partialState:null,callback:r,isReplace:!1,isForced:!0,nextCallback:null,next:null}),e(n,o)}};return{adoptClassInstance:a,constructClassInstance:function(e,t){var n=e.type,r=Xe(e),o=2===e.tag&&null!=e.type.contextTypes,l=o?Ze(e,r):Nn;return t=new n(t,l),a(e,t),o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=l),t},mountClassInstance:function(e,t){var n=e.alternate,o=e.stateNode,a=o.state||null,i=e.pendingProps;i||r("158");var u=Xe(e);o.props=i,o.state=e.memoizedState=a,o.refs=Nn,o.context=Ze(e,u),null!=e.type&&null!=e.type.prototype&&!0===e.type.prototype.unstable_isAsyncReactComponent&&(e.internalContextTag|=1),"function"==typeof o.componentWillMount&&(a=o.state,o.componentWillMount(),a!==o.state&&l.enqueueReplaceState(o,o.state,null),null!==(a=e.updateQueue)&&(o.state=kt(n,e,a,o,i,t))),"function"==typeof o.componentDidMount&&(e.effectTag|=4)},updateClassInstance:function(e,t,a){var i=t.stateNode;i.props=t.memoizedProps,i.state=t.memoizedState;var u=t.memoizedProps,c=t.pendingProps;c||null==(c=u)&&r("159");var s=i.context,f=Xe(t);if(f=Ze(t,f),"function"!=typeof i.componentWillReceiveProps||u===c&&s===f||(s=i.state,i.componentWillReceiveProps(c,f),i.state!==s&&l.enqueueReplaceState(i,i.state,null)),s=t.memoizedState,a=null!==t.updateQueue?kt(e,t,t.updateQueue,i,c,a):s,!(u!==c||s!==a||ho.current||null!==t.updateQueue&&t.updateQueue.hasForceUpdate))return"function"!=typeof i.componentDidUpdate||u===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=4),!1;var d=c;if(null===u||null!==t.updateQueue&&t.updateQueue.hasForceUpdate)d=!0;else{var p=t.stateNode,m=t.type;d="function"==typeof p.shouldComponentUpdate?p.shouldComponentUpdate(d,a,f):!m.prototype||!m.prototype.isPureReactComponent||(!Tn(u,d)||!Tn(s,a))}return d?("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(c,a,f),"function"==typeof i.componentDidUpdate&&(t.effectTag|=4)):("function"!=typeof i.componentDidUpdate||u===e.memoizedProps&&s===e.memoizedState||(t.effectTag|=4),n(t,c),o(t,a)),i.props=c,i.state=a,i.context=f,d}}}function xt(e){return null===e||void 0===e?null:(e=To&&e[To]||e["@@iterator"],"function"==typeof e?e:null)}function Tt(e,t){var n=t.ref;if(null!==n&&"function"!=typeof n){if(t._owner){t=t._owner;var o=void 0;t&&(2!==t.tag&&r("110"),o=t.stateNode),o||r("147",n);var a=""+n;return null!==e&&null!==e.ref&&e.ref._stringRef===a?e.ref:(e=function(e){var t=o.refs===Nn?o.refs={}:o.refs;null===e?delete t[a]:t[a]=e},e._stringRef=a,e)}"string"!=typeof n&&r("148"),t._owner||r("149",n)}return n}function St(e,t){"textarea"!==e.type&&r("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function _t(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function o(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(e,t,n){return e=lt(e,t,n),e.index=0,e.sibling=null,e}function l(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index,r<n?(t.effectTag=2,n):r):(t.effectTag=2,n):n}function i(t){return e&&null===t.alternate&&(t.effectTag=2),t}function u(e,t,n,r){return null===t||6!==t.tag?(t=ct(n,e.internalContextTag,r),t.return=e,t):(t=a(t,n,r),t.return=e,t)}function c(e,t,n,r){return null!==t&&t.type===n.type?(r=a(t,n.props,r),r.ref=Tt(t,n),r.return=e,r):(r=it(n,e.internalContextTag,r),r.ref=Tt(t,n),r.return=e,r)}function s(e,t,n,r){return null===t||7!==t.tag?(t=st(n,e.internalContextTag,r),t.return=e,t):(t=a(t,n,r),t.return=e,t)}function f(e,t,n,r){return null===t||9!==t.tag?(t=ft(n,e.internalContextTag,r),t.type=n.value,t.return=e,t):(t=a(t,null,r),t.type=n.value,t.return=e,t)}function d(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=dt(n,e.internalContextTag,r),t.return=e,t):(t=a(t,n.children||[],r),t.return=e,t)}function p(e,t,n,r,o){return null===t||10!==t.tag?(t=ut(n,e.internalContextTag,r,o),t.return=e,t):(t=a(t,n,r),t.return=e,t)}function m(e,t,n){if("string"==typeof t||"number"==typeof t)return t=ct(""+t,e.internalContextTag,n),t.return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case Co:return t.type===xo?(t=ut(t.props.children,e.internalContextTag,n,t.key),t.return=e,t):(n=it(t,e.internalContextTag,n),n.ref=Tt(null,t),n.return=e,n);case ko:return t=st(t,e.internalContextTag,n),t.return=e,t;case wo:return n=ft(t,e.internalContextTag,n),n.type=t.value,n.return=e,n;case Eo:return t=dt(t,e.internalContextTag,n),t.return=e,t}if(So(t)||xt(t))return t=ut(t,e.internalContextTag,n,null),t.return=e,t;St(e,t)}return null}function h(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==o?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Co:return n.key===o?n.type===xo?p(e,t,n.props.children,r,o):c(e,t,n,r):null;case ko:return n.key===o?s(e,t,n,r):null;case wo:return null===o?f(e,t,n,r):null;case Eo:return n.key===o?d(e,t,n,r):null}if(So(n)||xt(n))return null!==o?null:p(e,t,n,r,null);St(e,n)}return null}function g(e,t,n,r,o){if("string"==typeof r||"number"==typeof r)return e=e.get(n)||null,u(t,e,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case Co:return e=e.get(null===r.key?n:r.key)||null,r.type===xo?p(t,e,r.props.children,o,r.key):c(t,e,r,o);case ko:return e=e.get(null===r.key?n:r.key)||null,s(t,e,r,o);case wo:return e=e.get(n)||null,f(t,e,r,o);case Eo:return e=e.get(null===r.key?n:r.key)||null,d(t,e,r,o)}if(So(r)||xt(r))return e=e.get(n)||null,p(t,e,r,o,null);St(t,r)}return null}function y(r,a,i,u){for(var c=null,s=null,f=a,d=a=0,p=null;null!==f&&d<i.length;d++){f.index>d?(p=f,f=null):p=f.sibling;var y=h(r,f,i[d],u);if(null===y){null===f&&(f=p);break}e&&f&&null===y.alternate&&t(r,f),a=l(y,a,d),null===s?c=y:s.sibling=y,s=y,f=p}if(d===i.length)return n(r,f),c;if(null===f){for(;d<i.length;d++)(f=m(r,i[d],u))&&(a=l(f,a,d),null===s?c=f:s.sibling=f,s=f);return c}for(f=o(r,f);d<i.length;d++)(p=g(f,r,d,i[d],u))&&(e&&null!==p.alternate&&f.delete(null===p.key?d:p.key),a=l(p,a,d),null===s?c=p:s.sibling=p,s=p);return e&&f.forEach(function(e){return t(r,e)}),c}function v(a,i,u,c){var s=xt(u);"function"!=typeof s&&r("150"),null==(u=s.call(u))&&r("151");for(var f=s=null,d=i,p=i=0,y=null,v=u.next();null!==d&&!v.done;p++,v=u.next()){d.index>p?(y=d,d=null):y=d.sibling;var b=h(a,d,v.value,c);if(null===b){d||(d=y);break}e&&d&&null===b.alternate&&t(a,d),i=l(b,i,p),null===f?s=b:f.sibling=b,f=b,d=y}if(v.done)return n(a,d),s;if(null===d){for(;!v.done;p++,v=u.next())null!==(v=m(a,v.value,c))&&(i=l(v,i,p),null===f?s=v:f.sibling=v,f=v);return s}for(d=o(a,d);!v.done;p++,v=u.next())null!==(v=g(d,a,p,v.value,c))&&(e&&null!==v.alternate&&d.delete(null===v.key?p:v.key),i=l(v,i,p),null===f?s=v:f.sibling=v,f=v);return e&&d.forEach(function(e){return t(a,e)}),s}return function(e,o,l,u){"object"==typeof l&&null!==l&&l.type===xo&&null===l.key&&(l=l.props.children);var c="object"==typeof l&&null!==l;if(c)switch(l.$$typeof){case Co:e:{var s=l.key;for(c=o;null!==c;){if(c.key===s){if(10===c.tag?l.type===xo:c.type===l.type){n(e,c.sibling),o=a(c,l.type===xo?l.props.children:l.props,u),o.ref=Tt(c,l),o.return=e,e=o;break e}n(e,c);break}t(e,c),c=c.sibling}l.type===xo?(o=ut(l.props.children,e.internalContextTag,u,l.key),o.return=e,e=o):(u=it(l,e.internalContextTag,u),u.ref=Tt(o,l),u.return=e,e=u)}return i(e);case ko:e:{for(c=l.key;null!==o;){if(o.key===c){if(7===o.tag){n(e,o.sibling),o=a(o,l,u),o.return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}o=st(l,e.internalContextTag,u),o.return=e,e=o}return i(e);case wo:e:{if(null!==o){if(9===o.tag){n(e,o.sibling),o=a(o,null,u),o.type=l.value,o.return=e,e=o;break e}n(e,o)}o=ft(l,e.internalContextTag,u),o.type=l.value,o.return=e,e=o}return i(e);case Eo:e:{for(c=l.key;null!==o;){if(o.key===c){if(4===o.tag&&o.stateNode.containerInfo===l.containerInfo&&o.stateNode.implementation===l.implementation){n(e,o.sibling),o=a(o,l.children||[],u),o.return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}o=dt(l,e.internalContextTag,u),o.return=e,e=o}return i(e)}if("string"==typeof l||"number"==typeof l)return l=""+l,null!==o&&6===o.tag?(n(e,o.sibling),o=a(o,l,u)):(n(e,o),o=ct(l,e.internalContextTag,u)),o.return=e,e=o,i(e);if(So(l))return y(e,o,l,u);if(xt(l))return v(e,o,l,u);if(c&&St(e,l),void 0===l)switch(e.tag){case 2:case 1:u=e.type,r("152",u.displayName||u.name||"Component")}return n(e,o)}}function Nt(e,t,n,o,a){function l(e,t,n){var r=t.expirationTime;t.child=null===e?No(t,null,n,r):_o(t,e.child,n,r)}function i(e,t){var n=t.ref;null===n||e&&e.ref===n||(t.effectTag|=128)}function u(e,t,n,r){if(i(e,t),!n)return r&&ot(t,!1),s(e,t);n=t.stateNode,zr.current=t;var o=n.render();return t.effectTag|=1,l(e,t,o),t.memoizedState=n.state,t.memoizedProps=n.props,r&&ot(t,!0),t.child}function c(e){var t=e.stateNode;t.pendingContext?tt(e,t.pendingContext,t.pendingContext!==t.context):t.context&&tt(e,t.context,!1),g(e,t.containerInfo)}function s(e,t){if(null!==e&&t.child!==e.child&&r("153"),null!==t.child){e=t.child;var n=lt(e,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,n=n.sibling=lt(e,e.pendingProps,e.expirationTime),n.return=t;n.sibling=null}return t.child}function f(e,t){switch(t.tag){case 3:c(t);break;case 2:rt(t);break;case 4:g(t,t.stateNode.containerInfo)}return null}var d=e.shouldSetTextContent,p=e.useSyncScheduling,m=e.shouldDeprioritizeSubtree,h=t.pushHostContext,g=t.pushHostContainer,y=n.enterHydrationState,v=n.resetHydrationState,b=n.tryToClaimNextHydratableInstance;e=Et(o,a,function(e,t){e.memoizedProps=t},function(e,t){e.memoizedState=t});var C=e.adoptClassInstance,k=e.constructClassInstance,w=e.mountClassInstance,E=e.updateClassInstance;return{beginWork:function(e,t,n){if(0===t.expirationTime||t.expirationTime>n)return f(e,t);switch(t.tag){case 0:null!==e&&r("155");var o=t.type,a=t.pendingProps,x=Xe(t);return x=Ze(t,x),o=o(a,x),t.effectTag|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render?(t.tag=2,a=rt(t),C(t,o),w(t,n),t=u(e,t,!0,a)):(t.tag=1,l(e,t,o),t.memoizedProps=a,t=t.child),t;case 1:e:{if(a=t.type,n=t.pendingProps,o=t.memoizedProps,ho.current)null===n&&(n=o);else if(null===n||o===n){t=s(e,t);break e}o=Xe(t),o=Ze(t,o),a=a(n,o),t.effectTag|=1,l(e,t,a),t.memoizedProps=n,t=t.child}return t;case 2:return a=rt(t),o=void 0,null===e?t.stateNode?r("153"):(k(t,t.pendingProps),w(t,n),o=!0):o=E(e,t,n),u(e,t,o,a);case 3:return c(t),a=t.updateQueue,null!==a?(o=t.memoizedState,a=kt(e,t,a,null,null,n),o===a?(v(),t=s(e,t)):(o=a.element,x=t.stateNode,(null===e||null===e.child)&&x.hydrate&&y(t)?(t.effectTag|=2,t.child=No(t,null,o,n)):(v(),l(e,t,o)),t.memoizedState=a,t=t.child)):(v(),t=s(e,t)),t;case 5:h(t),null===e&&b(t),a=t.type;var T=t.memoizedProps;return o=t.pendingProps,null===o&&null===(o=T)&&r("154"),x=null!==e?e.memoizedProps:null,ho.current||null!==o&&T!==o?(T=o.children,d(a,o)?T=null:x&&d(a,x)&&(t.effectTag|=16),i(e,t),2147483647!==n&&!p&&m(a,o)?(t.expirationTime=2147483647,t=null):(l(e,t,T),t.memoizedProps=o,t=t.child)):t=s(e,t),t;case 6:return null===e&&b(t),e=t.pendingProps,null===e&&(e=t.memoizedProps),t.memoizedProps=e,null;case 8:t.tag=7;case 7:return a=t.pendingProps,ho.current?null===a&&null===(a=e&&e.memoizedProps)&&r("154"):null!==a&&t.memoizedProps!==a||(a=t.memoizedProps),o=a.children,t.stateNode=null===e?No(t,t.stateNode,o,n):_o(t,t.stateNode,o,n),t.memoizedProps=a,t.stateNode;case 9:return null;case 4:e:{if(g(t,t.stateNode.containerInfo),a=t.pendingProps,ho.current)null===a&&null==(a=e&&e.memoizedProps)&&r("154");else if(null===a||t.memoizedProps===a){t=s(e,t);break e}null===e?t.child=_o(t,null,a,n):l(e,t,a),t.memoizedProps=a,t=t.child}return t;case 10:e:{if(n=t.pendingProps,ho.current)null===n&&(n=t.memoizedProps);else if(null===n||t.memoizedProps===n){t=s(e,t);break e}l(e,t,n),t.memoizedProps=n,t=t.child}return t;default:r("156")}},beginFailedWork:function(e,t,n){switch(t.tag){case 2:rt(t);break;case 3:c(t);break;default:r("157")}return t.effectTag|=64,null===e?t.child=null:t.child!==e.child&&(t.child=e.child),0===t.expirationTime||t.expirationTime>n?f(e,t):(t.firstEffect=null,t.lastEffect=null,t.child=null===e?No(t,null,null,n):_o(t,e.child,null,n),2===t.tag&&(e=t.stateNode,t.memoizedProps=e.props,t.memoizedState=e.state),t.child)}}}function Pt(e,t,n){function o(e){e.effectTag|=4}var a=e.createInstance,l=e.createTextInstance,i=e.appendInitialChild,u=e.finalizeInitialChildren,c=e.prepareUpdate,s=e.persistence,f=t.getRootHostContainer,d=t.popHostContext,p=t.getHostContext,m=t.popHostContainer,h=n.prepareToHydrateHostInstance,g=n.prepareToHydrateHostTextInstance,y=n.popHydrationState,v=void 0,b=void 0,C=void 0;return e.mutation?(v=function(){},b=function(e,t,n){(t.updateQueue=n)&&o(t)},C=function(e,t,n,r){n!==r&&o(t)}):r(s?"235":"236"),{completeWork:function(e,t,n){var s=t.pendingProps;switch(null===s?s=t.memoizedProps:2147483647===t.expirationTime&&2147483647!==n||(t.pendingProps=null),t.tag){case 1:return null;case 2:return et(t),null;case 3:return m(t),Ge(ho,t),Ge(mo,t),s=t.stateNode,s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),null!==e&&null!==e.child||(y(t),t.effectTag&=-3),v(t),null;case 5:d(t),n=f();var k=t.type;if(null!==e&&null!=t.stateNode){var w=e.memoizedProps,E=t.stateNode,x=p();E=c(E,k,w,s,n,x),b(e,t,E,k,w,s,n),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!s)return null===t.stateNode&&r("166"),null;if(e=p(),y(t))h(t,n,e)&&o(t);else{e=a(k,s,n,e,t);e:for(w=t.child;null!==w;){if(5===w.tag||6===w.tag)i(e,w.stateNode);else if(4!==w.tag&&null!==w.child){w.child.return=w,w=w.child;continue}if(w===t)break;for(;null===w.sibling;){if(null===w.return||w.return===t)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}u(e,k,s,n)&&o(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)C(e,t,e.memoizedProps,s);else{if("string"!=typeof s)return null===t.stateNode&&r("166"),null;e=f(),n=p(),y(t)?g(t)&&o(t):t.stateNode=l(s,e,n,t)}return null;case 7:(s=t.memoizedProps)||r("165"),t.tag=8,k=[];e:for((w=t.stateNode)&&(w.return=t);null!==w;){if(5===w.tag||6===w.tag||4===w.tag)r("247");else if(9===w.tag)k.push(w.type);else if(null!==w.child){w.child.return=w,w=w.child;continue}for(;null===w.sibling;){if(null===w.return||w.return===t)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}return w=s.handler,s=w(s.props,k),t.child=_o(t,null!==e?e.child:null,s,n),t.child;case 8:return t.tag=7,null;case 9:case 10:return null;case 4:return m(t),v(t),null;case 0:r("167");default:r("156")}}}}function Ot(e,t){function n(e){var n=e.ref;if(null!==n)try{n(null)}catch(n){t(e,n)}}function o(e){switch("function"==typeof gt&&gt(e),e.tag){case 2:n(e);var r=e.stateNode;if("function"==typeof r.componentWillUnmount)try{r.props=e.memoizedProps,r.state=e.memoizedState,r.componentWillUnmount()}catch(n){t(e,n)}break;case 5:n(e);break;case 7:a(e.stateNode);break;case 4:c&&i(e)}}function a(e){for(var t=e;;)if(o(t),null===t.child||c&&4===t.tag){if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}else t.child.return=t,t=t.child}function l(e){return 5===e.tag||3===e.tag||4===e.tag}function i(e){for(var t=e,n=!1,l=void 0,i=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&r("160"),n.tag){case 5:l=n.stateNode,i=!1;break e;case 3:case 4:l=n.stateNode.containerInfo,i=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag)a(t),i?b(l,t.stateNode):v(l,t.stateNode);else if(4===t.tag?l=t.stateNode.containerInfo:o(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return,4===t.tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}var u=e.getPublicInstance,c=e.mutation;e=e.persistence,c||r(e?"235":"236");var s=c.commitMount,f=c.commitUpdate,d=c.resetTextContent,p=c.commitTextUpdate,m=c.appendChild,h=c.appendChildToContainer,g=c.insertBefore,y=c.insertInContainerBefore,v=c.removeChild,b=c.removeChildFromContainer;return{commitResetTextContent:function(e){d(e.stateNode)},commitPlacement:function(e){e:{for(var t=e.return;null!==t;){if(l(t)){var n=t;break e}t=t.return}r("160"),n=void 0}var o=t=void 0;switch(n.tag){case 5:t=n.stateNode,o=!1;break;case 3:case 4:t=n.stateNode.containerInfo,o=!0;break;default:r("161")}16&n.effectTag&&(d(t),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||l(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var a=e;;){if(5===a.tag||6===a.tag)n?o?y(t,a.stateNode,n):g(t,a.stateNode,n):o?h(t,a.stateNode):m(t,a.stateNode);else if(4!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===e)break;for(;null===a.sibling;){if(null===a.return||a.return===e)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},commitDeletion:function(e){i(e),e.return=null,e.child=null,e.alternate&&(e.alternate.child=null,e.alternate.return=null)},commitWork:function(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var o=t.memoizedProps;e=null!==e?e.memoizedProps:o;var a=t.type,l=t.updateQueue;t.updateQueue=null,null!==l&&f(n,l,a,e,o,t)}break;case 6:null===t.stateNode&&r("162"),n=t.memoizedProps,p(t.stateNode,null!==e?e.memoizedProps:n,n);break;case 3:break;default:r("163")}},commitLifeCycles:function(e,t){switch(t.tag){case 2:var n=t.stateNode;if(4&t.effectTag)if(null===e)n.props=t.memoizedProps,n.state=t.memoizedState,n.componentDidMount();else{var o=e.memoizedProps;e=e.memoizedState,n.props=t.memoizedProps,n.state=t.memoizedState,n.componentDidUpdate(o,e)}t=t.updateQueue,null!==t&&wt(t,n);break;case 3:n=t.updateQueue,null!==n&&wt(n,null!==t.child?t.child.stateNode:null);break;case 5:n=t.stateNode,null===e&&4&t.effectTag&&s(n,t.type,t.memoizedProps,t);break;case 6:case 4:break;default:r("163")}},commitAttachRef:function(e){var t=e.ref;if(null!==t){var n=e.stateNode;switch(e.tag){case 5:t(u(n));break;default:t(n)}}},commitDetachRef:function(e){null!==(e=e.ref)&&e(null)}}}function It(e){function t(e){return e===Po&&r("174"),e}var n=e.getChildHostContext,o=e.getRootHostContext,a={current:Po},l={current:Po},i={current:Po};return{getHostContext:function(){return t(a.current)},getRootHostContainer:function(){return t(i.current)},popHostContainer:function(e){Ge(a,e),Ge(l,e),Ge(i,e)},popHostContext:function(e){l.current===e&&(Ge(a,e),Ge(l,e))},pushHostContainer:function(e,t){Ye(i,t,e),t=o(t),Ye(l,e,e),Ye(a,t,e)},pushHostContext:function(e){var r=t(i.current),o=t(a.current);r=n(o,e.type,r),o!==r&&(Ye(l,e,e),Ye(a,r,e))},resetHostContainer:function(){a.current=Po,i.current=Po}}}function Mt(e){function t(e,t){var n=new at(5,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function n(e,t){switch(e.tag){case 5:return null!==(t=l(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=i(t,e.pendingProps))&&(e.stateNode=t,!0);default:return!1}}function o(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;d=e}var a=e.shouldSetTextContent;if(!(e=e.hydration))return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){r("175")},prepareToHydrateHostTextInstance:function(){r("176")},popHydrationState:function(){return!1}};var l=e.canHydrateInstance,i=e.canHydrateTextInstance,u=e.getNextHydratableSibling,c=e.getFirstHydratableChild,s=e.hydrateInstance,f=e.hydrateTextInstance,d=null,p=null,m=!1;return{enterHydrationState:function(e){return p=c(e.stateNode.containerInfo),d=e,m=!0},resetHydrationState:function(){p=d=null,m=!1},tryToClaimNextHydratableInstance:function(e){if(m){var r=p;if(r){if(!n(e,r)){if(!(r=u(r))||!n(e,r))return e.effectTag|=2,m=!1,void(d=e);t(d,p)}d=e,p=c(r)}else e.effectTag|=2,m=!1,d=e}},prepareToHydrateHostInstance:function(e,t,n){return t=s(e.stateNode,e.type,e.memoizedProps,t,n,e),e.updateQueue=t,null!==t},prepareToHydrateHostTextInstance:function(e){return f(e.stateNode,e.memoizedProps,e)},popHydrationState:function(e){if(e!==d)return!1;if(!m)return o(e),m=!0,!1;var n=e.type;if(5!==e.tag||"head"!==n&&"body"!==n&&!a(n,e.memoizedProps))for(n=p;n;)t(e,n),n=u(n);return o(e),p=d?u(e.stateNode):null,!0}}}function Rt(e){function t(e){ae=G=!0;var t=e.stateNode;if(t.current===e&&r("177"),t.isReadyForCommit=!1,zr.current=null,1<e.effectTag)if(null!==e.lastEffect){e.lastEffect.nextEffect=e;var n=e.firstEffect}else n=e;else n=e.firstEffect;for(K(),J=n;null!==J;){var o=!1,a=void 0;try{for(;null!==J;){var l=J.effectTag;if(16&l&&R(J),128&l){var i=J.alternate;null!==i&&H(i)}switch(-242&l){case 2:D(J),J.effectTag&=-3;break;case 6:D(J),J.effectTag&=-3,F(J.alternate,J);break;case 4:F(J.alternate,J);break;case 8:le=!0,L(J),le=!1}J=J.nextEffect}}catch(e){o=!0,a=e}o&&(null===J&&r("178"),u(J,a),null!==J&&(J=J.nextEffect))}for(W(),t.current=e,J=n;null!==J;){n=!1,o=void 0;try{for(;null!==J;){var c=J.effectTag;if(36&c&&A(J.alternate,J),128&c&&U(J),64&c)switch(a=J,l=void 0,null!==ee&&(l=ee.get(a),ee.delete(a),null==l&&null!==a.alternate&&(a=a.alternate,l=ee.get(a),ee.delete(a))),null==l&&r("184"),a.tag){case 2:a.stateNode.componentDidCatch(l.error,{componentStack:l.componentStack});break;case 3:null===re&&(re=l.error);break;default:r("157")}var s=J.nextEffect;J.nextEffect=null,J=s}}catch(e){n=!0,o=e}n&&(null===J&&r("178"),u(J,o),null!==J&&(J=J.nextEffect))}return G=ae=!1,"function"==typeof ht&&ht(e.stateNode),ne&&(ne.forEach(h),ne=null),null!==re&&(e=re,re=null,E(e)),t=t.current.expirationTime,0===t&&(te=ee=null),t}function n(e){for(;;){var t=M(e.alternate,e,Z),n=e.return,r=e.sibling,o=e;if(2147483647===Z||2147483647!==o.expirationTime){if(2!==o.tag&&3!==o.tag)var a=0;else a=o.updateQueue,a=null===a?0:a.expirationTime;for(var l=o.child;null!==l;)0!==l.expirationTime&&(0===a||a>l.expirationTime)&&(a=l.expirationTime),l=l.sibling;o.expirationTime=a}if(null!==t)return t;if(null!==n&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1<e.effectTag&&(null!==n.lastEffect?n.lastEffect.nextEffect=e:n.firstEffect=e,n.lastEffect=e)),null!==r)return r;if(null===n){e.stateNode.isReadyForCommit=!0;break}e=n}return null}function o(e){var t=O(e.alternate,e,Z);return null===t&&(t=n(e)),zr.current=null,t}function a(e){var t=I(e.alternate,e,Z);return null===t&&(t=n(e)),zr.current=null,t}function l(e){if(null!==ee){if(!(0===Z||Z>e))if(Z<=q)for(;null!==Y;)Y=c(Y)?a(Y):o(Y);else for(;null!==Y&&!w();)Y=c(Y)?a(Y):o(Y)}else if(!(0===Z||Z>e))if(Z<=q)for(;null!==Y;)Y=o(Y);else for(;null!==Y&&!w();)Y=o(Y)}function i(e,t){if(G&&r("243"),G=!0,e.isReadyForCommit=!1,e!==X||t!==Z||null===Y){for(;-1<po;)fo[po]=null,po--;go=Nn,mo.current=Nn,ho.current=!1,N(),X=e,Z=t,Y=lt(X.current,null,t)}var n=!1,o=null;try{l(t)}catch(e){n=!0,o=e}for(;n;){if(oe){re=o;break}var i=Y;if(null===i)oe=!0;else{var c=u(i,o);if(null===c&&r("183"),!oe){try{for(n=c,o=t,c=n;null!==i;){switch(i.tag){case 2:et(i);break;case 5:_(i);break;case 3:S(i);break;case 4:S(i)}if(i===c||i.alternate===c)break;i=i.return}Y=a(n),l(o)}catch(e){n=!0,o=e;continue}break}}}return t=re,oe=G=!1,re=null,null!==t&&E(t),e.isReadyForCommit?e.current.alternate:null}function u(e,t){var n=zr.current=null,r=!1,o=!1,a=null;if(3===e.tag)n=e,s(e)&&(oe=!0);else for(var l=e.return;null!==l&&null===n;){if(2===l.tag?"function"==typeof l.stateNode.componentDidCatch&&(r=!0,a=ke(l),n=l,o=!0):3===l.tag&&(n=l),s(l)){if(le||null!==ne&&(ne.has(l)||null!==l.alternate&&ne.has(l.alternate)))return null;n=null,o=!1}l=l.return}if(null!==n){null===te&&(te=new Set),te.add(n);var i="";l=e;do{e:switch(l.tag){case 0:case 1:case 2:case 5:var u=l._debugOwner,c=l._debugSource,f=ke(l),d=null;u&&(d=ke(u)),u=c,f="\n in "+(f||"Unknown")+(u?" (at "+u.fileName.replace(/^.*[\\\/]/,"")+":"+u.lineNumber+")":d?" (created by "+d+")":"");break e;default:f=""}i+=f,l=l.return}while(l);l=i,e=ke(e),null===ee&&(ee=new Map),t={componentName:e,componentStack:l,error:t,errorBoundary:r?n.stateNode:null,errorBoundaryFound:r,errorBoundaryName:a,willRetry:o},ee.set(n,t);try{var p=t.error;p&&p.suppressReactErrorLogging||console.error(p)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}return ae?(null===ne&&(ne=new Set),ne.add(n)):h(n),n}return null===re&&(re=t),null}function c(e){return null!==ee&&(ee.has(e)||null!==e.alternate&&ee.has(e.alternate))}function s(e){return null!==te&&(te.has(e)||null!==e.alternate&&te.has(e.alternate))}function f(){return 20*(1+((g()+100)/20|0))}function d(e){return 0!==Q?Q:G?ae?1:Z:!B||1&e.internalContextTag?f():1}function p(e,t){return m(e,t,!1)}function m(e,t){for(;null!==e;){if((0===e.expirationTime||e.expirationTime>t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var n=e.stateNode;!G&&n===X&&t<Z&&(Y=X=null,Z=0);var o=n,a=t;if(we>Ce&&r("185"),null===o.nextScheduledRoot)o.remainingExpirationTime=a,null===ue?(ie=ue=o,o.nextScheduledRoot=o):(ue=ue.nextScheduledRoot=o,ue.nextScheduledRoot=ie);else{var l=o.remainingExpirationTime;(0===l||a<l)&&(o.remainingExpirationTime=a)}fe||(ve?be&&(de=o,pe=1,k(de,pe)):1===a?C(1,null):y(a)),!G&&n===X&&t<Z&&(Y=X=null,Z=0)}e=e.return}}function h(e){m(e,1,!0)}function g(){return q=2+((j()-$)/10|0)}function y(e){if(0!==ce){if(e>ce)return;V(se)}var t=j()-$;ce=e,se=z(b,{timeout:10*(e-2)-t})}function v(){var e=0,t=null;if(null!==ue)for(var n=ue,o=ie;null!==o;){var a=o.remainingExpirationTime;if(0===a){if((null===n||null===ue)&&r("244"),o===o.nextScheduledRoot){ie=ue=o.nextScheduledRoot=null;break}if(o===ie)ie=a=o.nextScheduledRoot,ue.nextScheduledRoot=a,o.nextScheduledRoot=null;else{if(o===ue){ue=n,ue.nextScheduledRoot=ie,o.nextScheduledRoot=null;break}n.nextScheduledRoot=o.nextScheduledRoot,o.nextScheduledRoot=null}o=n.nextScheduledRoot}else{if((0===e||a<e)&&(e=a,t=o),o===ue)break;n=o,o=o.nextScheduledRoot}}n=de,null!==n&&n===t?we++:we=0,de=t,pe=e}function b(e){C(0,e)}function C(e,t){for(ye=t,v();null!==de&&0!==pe&&(0===e||pe<=e)&&!me;)k(de,pe),v();if(null!==ye&&(ce=0,se=-1),0!==pe&&y(pe),ye=null,me=!1,we=0,he)throw e=ge,ge=null,he=!1,e}function k(e,n){if(fe&&r("245"),fe=!0,n<=g()){var o=e.finishedWork;null!==o?(e.finishedWork=null,e.remainingExpirationTime=t(o)):(e.finishedWork=null,null!==(o=i(e,n))&&(e.remainingExpirationTime=t(o)))}else o=e.finishedWork,null!==o?(e.finishedWork=null,e.remainingExpirationTime=t(o)):(e.finishedWork=null,null!==(o=i(e,n))&&(w()?e.finishedWork=o:e.remainingExpirationTime=t(o)));fe=!1}function w(){return!(null===ye||ye.timeRemaining()>Ee)&&(me=!0)}function E(e){null===de&&r("246"),de.remainingExpirationTime=0,he||(he=!0,ge=e)}var x=It(e),T=Mt(e),S=x.popHostContainer,_=x.popHostContext,N=x.resetHostContainer,P=Nt(e,x,T,p,d),O=P.beginWork,I=P.beginFailedWork,M=Pt(e,x,T).completeWork;x=Ot(e,u);var R=x.commitResetTextContent,D=x.commitPlacement,L=x.commitDeletion,F=x.commitWork,A=x.commitLifeCycles,U=x.commitAttachRef,H=x.commitDetachRef,j=e.now,z=e.scheduleDeferredCallback,V=e.cancelDeferredCallback,B=e.useSyncScheduling,K=e.prepareForCommit,W=e.resetAfterCommit,$=j(),q=2,Q=0,G=!1,Y=null,X=null,Z=0,J=null,ee=null,te=null,ne=null,re=null,oe=!1,ae=!1,le=!1,ie=null,ue=null,ce=0,se=-1,fe=!1,de=null,pe=0,me=!1,he=!1,ge=null,ye=null,ve=!1,be=!1,Ce=1e3,we=0,Ee=1;return{computeAsyncExpiration:f,computeExpirationForFiber:d,scheduleWork:p,batchedUpdates:function(e,t){var n=ve;ve=!0;try{return e(t)}finally{(ve=n)||fe||C(1,null)}},unbatchedUpdates:function(e){if(ve&&!be){be=!0;try{return e()}finally{be=!1}}return e()},flushSync:function(e){var t=ve;ve=!0;try{e:{var n=Q;Q=1;try{var o=e();break e}finally{Q=n}o=void 0}return o}finally{ve=t,fe&&r("187"),C(1,null)}},deferredUpdates:function(e){var t=Q;Q=f();try{return e()}finally{Q=t}}}}function Dt(e){function t(e){return e=Se(e),null===e?null:e.stateNode}var n=e.getPublicInstance;e=Rt(e);var o=e.computeAsyncExpiration,a=e.computeExpirationForFiber,l=e.scheduleWork;return{createContainer:function(e,t){var n=new at(3,null,0);return e={current:n,containerInfo:e,pendingChildren:null,remainingExpirationTime:0,isReadyForCommit:!1,finishedWork:null,context:null,pendingContext:null,hydrate:t,nextScheduledRoot:null},n.stateNode=e},updateContainer:function(e,t,n,i){var u=t.current;if(n){n=n._reactInternalFiber;var c;e:{for(2===we(n)&&2===n.tag||r("170"),c=n;3!==c.tag;){if(Je(c)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break e}(c=c.return)||r("171")}c=c.stateNode.context}n=Je(n)?nt(n,c):c}else n=Nn;null===t.context?t.context=n:t.pendingContext=n,t=i,t=void 0===t?null:t,i=null!=e&&null!=e.type&&null!=e.type.prototype&&!0===e.type.prototype.unstable_isAsyncReactComponent?o():a(u),bt(u,{expirationTime:i,partialState:{element:e},callback:t,isReplace:!1,isForced:!1,nextCallback:null,next:null}),l(u,i)},batchedUpdates:e.batchedUpdates,unbatchedUpdates:e.unbatchedUpdates,deferredUpdates:e.deferredUpdates,flushSync:e.flushSync,getPublicRootInstance:function(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return n(e.child.stateNode);default:return e.child.stateNode}},findHostInstance:t,findHostInstanceWithNoPortals:function(e){return e=_e(e),null===e?null:e.stateNode},injectIntoDevTools:function(e){var n=e.findFiberByHostInstance;return mt(kn({},e,{findHostInstanceByFiber:function(e){return t(e)},findFiberByHostInstance:function(e){return n?n(e):null}}))}}}function Lt(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Eo,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Ft(e){return!!Go.hasOwnProperty(e)||!Qo.hasOwnProperty(e)&&(qo.test(e)?Go[e]=!0:(Qo[e]=!0,!1))}function At(e,t,n){var r=l(t);if(r&&a(t,n)){var o=r.mutationMethod;o?o(e,n):null==n||r.hasBooleanValue&&!n||r.hasNumericValue&&isNaN(n)||r.hasPositiveNumericValue&&1>n||r.hasOverloadedBooleanValue&&!1===n?Ht(e,t):r.mustUseProperty?e[r.propertyName]=n:(t=r.attributeName,(o=r.attributeNamespace)?e.setAttributeNS(o,t,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&!0===n?e.setAttribute(t,""):e.setAttribute(t,""+n))}else Ut(e,t,a(t,n)?n:null)}function Ut(e,t,n){Ft(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))}function Ht(e,t){var n=l(t);n?(t=n.mutationMethod)?t(e,void 0):n.mustUseProperty?e[n.propertyName]=!n.hasBooleanValue&&"":e.removeAttribute(n.attributeName):e.removeAttribute(t)}function jt(e,t){var n=t.value,r=t.checked;return kn({type:void 0,step:void 0,min:void 0,max:void 0},t,{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=r?r:e._wrapperState.initialChecked})}function zt(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:null!=t.checked?t.checked:t.defaultChecked,initialValue:null!=t.value?t.value:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Vt(e,t){null!=(t=t.checked)&&At(e,"checked",t)}function Bt(e,t){Vt(e,t);var n=t.value;null!=n?0===n&&""===e.value?e.value="0":"number"===t.type?(t=parseFloat(e.value)||0,(n!=t||n==t&&e.value!=n)&&(e.value=""+n)):e.value!==""+n&&(e.value=""+n):(null==t.value&&null!=t.defaultValue&&e.defaultValue!==""+t.defaultValue&&(e.defaultValue=""+t.defaultValue),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked))}function Kt(e,t){switch(t.type){case"submit":case"reset":break;case"color":case"date":case"datetime":case"datetime-local":case"month":case"time":case"week":e.value="",e.value=e.defaultValue;break;default:e.value=e.value}t=e.name,""!==t&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,""!==t&&(e.name=t)}function Wt(e){var t="";return bn.Children.forEach(e,function(e){null==e||"string"!=typeof e&&"number"!=typeof e||(t+=e)}),t}function $t(e,t){return e=kn({children:void 0},t),(t=Wt(t.children))&&(e.children=t),e}function qt(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+n,t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function Qt(e,t){var n=t.value;e._wrapperState={initialValue:null!=n?n:t.defaultValue,wasMultiple:!!t.multiple}}function Gt(e,t){return null!=t.dangerouslySetInnerHTML&&r("91"),kn({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Yt(e,t){var n=t.value;null==n&&(n=t.defaultValue,t=t.children,null!=t&&(null!=n&&r("92"),Array.isArray(t)&&(1>=t.length||r("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function Xt(e,t){var n=t.value;null!=n&&(n=""+n,n!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function Zt(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}function Jt(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function en(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Jt(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}function tn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function nn(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=n,a=t[n];o=null==a||"boolean"==typeof a||""===a?"":r||"number"!=typeof a||0===a||Jo.hasOwnProperty(o)&&Jo[o]?(""+a).trim():a+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}function rn(e,t,n){t&&(ta[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&r("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&r("60"),"object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||r("61")),null!=t.style&&"object"!=typeof t.style&&r("62",n()))}function on(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function an(e,t){e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument;var n=Le(e);t=Yn[t];for(var r=0;r<t.length;r++){var o=t[r];n.hasOwnProperty(o)&&n[o]||("topScroll"===o?Ie("topScroll","scroll",e):"topFocus"===o||"topBlur"===o?(Ie("topFocus","focus",e),Ie("topBlur","blur",e),n.topBlur=!0,n.topFocus=!0):"topCancel"===o?(ne("cancel",!0)&&Ie("topCancel","cancel",e),n.topCancel=!0):"topClose"===o?(ne("close",!0)&&Ie("topClose","close",e),n.topClose=!0):Gr.hasOwnProperty(o)&&Oe(o,Gr[o],e),n[o]=!0)}}function ln(e,t,n,r){return n=9===n.nodeType?n:n.ownerDocument,r===na&&(r=Jt(e)),r===na?"script"===e?(e=n.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):e="string"==typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function un(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function cn(e,t,n,r){var o=on(t,n);switch(t){case"iframe":case"object":Oe("topLoad","load",e);var a=n;break;case"video":case"audio":for(a in oa)oa.hasOwnProperty(a)&&Oe(a,oa[a],e);a=n;break;case"source":Oe("topError","error",e),a=n;break;case"img":case"image":Oe("topError","error",e),Oe("topLoad","load",e),a=n;break;case"form":Oe("topReset","reset",e),Oe("topSubmit","submit",e),a=n;break;case"details":Oe("topToggle","toggle",e),a=n;break;case"input":zt(e,n),a=jt(e,n),Oe("topInvalid","invalid",e),an(r,"onChange");break;case"option":a=$t(e,n);break;case"select":Qt(e,n),a=kn({},n,{value:void 0}),Oe("topInvalid","invalid",e),an(r,"onChange");break;case"textarea":Yt(e,n),a=Gt(e,n),Oe("topInvalid","invalid",e),an(r,"onChange");break;default:a=n}rn(t,a,ra);var l,i=a;for(l in i)if(i.hasOwnProperty(l)){var u=i[l];"style"===l?nn(e,u,ra):"dangerouslySetInnerHTML"===l?null!=(u=u?u.__html:void 0)&&Zo(e,u):"children"===l?"string"==typeof u?("textarea"!==t||""!==u)&&tn(e,u):"number"==typeof u&&tn(e,""+u):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(Gn.hasOwnProperty(l)?null!=u&&an(r,l):o?Ut(e,l,u):null!=u&&At(e,l,u))}switch(t){case"input":ae(e),Kt(e,n);break;case"textarea":ae(e),Zt(e,n);break;case"option":null!=n.value&&e.setAttribute("value",n.value);break;case"select":e.multiple=!!n.multiple,t=n.value,null!=t?qt(e,!!n.multiple,t,!1):null!=n.defaultValue&&qt(e,!!n.multiple,n.defaultValue,!0);break;default:"function"==typeof a.onClick&&(e.onclick=wn)}}function sn(e,t,n,r,o){var a=null;switch(t){case"input":n=jt(e,n),r=jt(e,r),a=[];break;case"option":n=$t(e,n),r=$t(e,r),a=[];break;case"select":n=kn({},n,{value:void 0}),r=kn({},r,{value:void 0}),a=[];break;case"textarea":n=Gt(e,n),r=Gt(e,r),a=[];break;default:"function"!=typeof n.onClick&&"function"==typeof r.onClick&&(e.onclick=wn)}rn(t,r,ra);var l,i;e=null;for(l in n)if(!r.hasOwnProperty(l)&&n.hasOwnProperty(l)&&null!=n[l])if("style"===l)for(i in t=n[l])t.hasOwnProperty(i)&&(e||(e={}),e[i]="");else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(Gn.hasOwnProperty(l)?a||(a=[]):(a=a||[]).push(l,null));for(l in r){var u=r[l];if(t=null!=n?n[l]:void 0,r.hasOwnProperty(l)&&u!==t&&(null!=u||null!=t))if("style"===l)if(t){for(i in t)!t.hasOwnProperty(i)||u&&u.hasOwnProperty(i)||(e||(e={}),e[i]="");for(i in u)u.hasOwnProperty(i)&&t[i]!==u[i]&&(e||(e={}),e[i]=u[i])}else e||(a||(a=[]),a.push(l,e)),e=u;else"dangerouslySetInnerHTML"===l?(u=u?u.__html:void 0,t=t?t.__html:void 0,null!=u&&t!==u&&(a=a||[]).push(l,""+u)):"children"===l?t===u||"string"!=typeof u&&"number"!=typeof u||(a=a||[]).push(l,""+u):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(Gn.hasOwnProperty(l)?(null!=u&&an(o,l),a||t===u||(a=[])):(a=a||[]).push(l,u))}return e&&(a=a||[]).push("style",e),a}function fn(e,t,n,r,o){"input"===n&&"radio"===o.type&&null!=o.name&&Vt(e,o),on(n,r),r=on(n,o);for(var a=0;a<t.length;a+=2){var l=t[a],i=t[a+1];"style"===l?nn(e,i,ra):"dangerouslySetInnerHTML"===l?Zo(e,i):"children"===l?tn(e,i):r?null!=i?Ut(e,l,i):e.removeAttribute(l):null!=i?At(e,l,i):Ht(e,l)}switch(n){case"input":Bt(e,o);break;case"textarea":Xt(e,o);break;case"select":e._wrapperState.initialValue=void 0,t=e._wrapperState.wasMultiple,e._wrapperState.wasMultiple=!!o.multiple,n=o.value,null!=n?qt(e,!!o.multiple,n,!1):t!==!!o.multiple&&(null!=o.defaultValue?qt(e,!!o.multiple,o.defaultValue,!0):qt(e,!!o.multiple,o.multiple?[]:"",!1))}}function dn(e,t,n,r,o){switch(t){case"iframe":case"object":Oe("topLoad","load",e);break;case"video":case"audio":for(var a in oa)oa.hasOwnProperty(a)&&Oe(a,oa[a],e);break;case"source":Oe("topError","error",e);break;case"img":case"image":Oe("topError","error",e),Oe("topLoad","load",e);break;case"form":Oe("topReset","reset",e),Oe("topSubmit","submit",e);break;case"details":Oe("topToggle","toggle",e);break;case"input":zt(e,n),Oe("topInvalid","invalid",e),an(o,"onChange");break;case"select":Qt(e,n),Oe("topInvalid","invalid",e),an(o,"onChange");break;case"textarea":Yt(e,n),Oe("topInvalid","invalid",e),an(o,"onChange")}rn(t,n,ra),r=null;for(var l in n)n.hasOwnProperty(l)&&(a=n[l],"children"===l?"string"==typeof a?e.textContent!==a&&(r=["children",a]):"number"==typeof a&&e.textContent!==""+a&&(r=["children",""+a]):Gn.hasOwnProperty(l)&&null!=a&&an(o,l));switch(t){case"input":ae(e),Kt(e,n);break;case"textarea":ae(e),Zt(e,n);break;case"select":case"option":break;default:"function"==typeof n.onClick&&(e.onclick=wn)}return r}function pn(e,t){return e.nodeValue!==t}function mn(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function hn(e){return!(!(e=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==e.nodeType||!e.hasAttribute("data-reactroot"))}function gn(e,t,n,o,a){mn(n)||r("200");var l=n._reactRootContainer;if(l)ua.updateContainer(t,l,e,a);else{if(!(o=o||hn(n)))for(l=void 0;l=n.lastChild;)n.removeChild(l);var i=ua.createContainer(n,o);l=n._reactRootContainer=i,ua.unbatchedUpdates(function(){ua.updateContainer(t,i,e,a)})}return ua.getPublicRootInstance(l)}function yn(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;return mn(t)||r("200"),Lt(e,t,null,n)}function vn(e,t){this._reactRootContainer=ua.createContainer(e,t)}/** @license React v16.2.0 * react-dom.production.min.js * * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var bn=n(0),Cn=n(8),kn=n(2),wn=n(1),En=n(9),xn=n(10),Tn=n(11),Sn=n(12),_n=n(15),Nn=n(3);bn||r("227");var Pn={children:!0,dangerouslySetInnerHTML:!0,defaultValue:!0,defaultChecked:!0,innerHTML:!0,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,style:!0},On={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,HAS_STRING_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=On,n=e.Properties||{},a=e.DOMAttributeNamespaces||{},l=e.DOMAttributeNames||{};e=e.DOMMutationMethods||{};for(var i in n){In.hasOwnProperty(i)&&r("48",i);var u=i.toLowerCase(),c=n[i];u={attributeName:u,attributeNamespace:null,propertyName:i,mutationMethod:null,mustUseProperty:o(c,t.MUST_USE_PROPERTY),hasBooleanValue:o(c,t.HAS_BOOLEAN_VALUE),hasNumericValue:o(c,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:o(c,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:o(c,t.HAS_OVERLOADED_BOOLEAN_VALUE),hasStringBooleanValue:o(c,t.HAS_STRING_BOOLEAN_VALUE)},1>=u.hasBooleanValue+u.hasNumericValue+u.hasOverloadedBooleanValue||r("50",i),l.hasOwnProperty(i)&&(u.attributeName=l[i]),a.hasOwnProperty(i)&&(u.attributeNamespace=a[i]),e.hasOwnProperty(i)&&(u.mutationMethod=e[i]),In[i]=u}}},In={},Mn=On,Rn=Mn.MUST_USE_PROPERTY,Dn=Mn.HAS_BOOLEAN_VALUE,Ln=Mn.HAS_NUMERIC_VALUE,Fn=Mn.HAS_POSITIVE_NUMERIC_VALUE,An=Mn.HAS_OVERLOADED_BOOLEAN_VALUE,Un=Mn.HAS_STRING_BOOLEAN_VALUE,Hn={Properties:{allowFullScreen:Dn,async:Dn,autoFocus:Dn,autoPlay:Dn,capture:An,checked:Rn|Dn,cols:Fn,contentEditable:Un,controls:Dn,default:Dn,defer:Dn,disabled:Dn,download:An,draggable:Un,formNoValidate:Dn,hidden:Dn,loop:Dn,multiple:Rn|Dn,muted:Rn|Dn,noValidate:Dn,open:Dn,playsInline:Dn,readOnly:Dn,required:Dn,reversed:Dn,rows:Fn,rowSpan:Ln,scoped:Dn,seamless:Dn,selected:Rn|Dn,size:Fn,start:Ln,span:Fn,spellCheck:Un,style:0,tabIndex:0,itemScope:Dn,acceptCharset:0,className:0,htmlFor:0,httpEquiv:0,value:Un},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMMutationMethods:{value:function(e,t){if(null==t)return e.removeAttribute("value");"number"!==e.type||!1===e.hasAttribute("value")?e.setAttribute("value",""+t):e.validity&&!e.validity.badInput&&e.ownerDocument.activeElement!==e&&e.setAttribute("value",""+t)}}},jn=Mn.HAS_STRING_BOOLEAN_VALUE,zn={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Vn={Properties:{autoReverse:jn,externalResourcesRequired:jn,preserveAlpha:jn},DOMAttributeNames:{autoReverse:"autoReverse",externalResourcesRequired:"externalResourcesRequired",preserveAlpha:"preserveAlpha"},DOMAttributeNamespaces:{xlinkActuate:zn.xlink,xlinkArcrole:zn.xlink,xlinkHref:zn.xlink,xlinkRole:zn.xlink,xlinkShow:zn.xlink,xlinkTitle:zn.xlink,xlinkType:zn.xlink,xmlBase:zn.xml,xmlLang:zn.xml,xmlSpace:zn.xml}},Bn=/[\-\:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode x-height xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xmlns:xlink xml:lang xml:space".split(" ").forEach(function(e){var t=e.replace(Bn,i);Vn.Properties[t]=0,Vn.DOMAttributeNames[t]=e}),Mn.injectDOMPropertyConfig(Hn),Mn.injectDOMPropertyConfig(Vn);var Kn={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,injection:{injectErrorUtils:function(e){"function"!=typeof e.invokeGuardedCallback&&r("197"),u=e.invokeGuardedCallback}},invokeGuardedCallback:function(e,t,n,r,o,a,l,i,c){u.apply(Kn,arguments)},invokeGuardedCallbackAndCatchFirstError:function(e,t,n,r,o,a,l,i,u){if(Kn.invokeGuardedCallback.apply(this,arguments),Kn.hasCaughtError()){var c=Kn.clearCaughtError();Kn._hasRethrowError||(Kn._hasRethrowError=!0,Kn._rethrowError=c)}},rethrowCaughtError:function(){return c.apply(Kn,arguments)},hasCaughtError:function(){return Kn._hasCaughtError},clearCaughtError:function(){if(Kn._hasCaughtError){var e=Kn._caughtError;return Kn._caughtError=null,Kn._hasCaughtError=!1,e}r("198")}},Wn=null,$n={},qn=[],Qn={},Gn={},Yn={},Xn=Object.freeze({plugins:qn,eventNameDispatchConfigs:Qn,registrationNameModules:Gn,registrationNameDependencies:Yn,possibleRegistrationNames:null,injectEventPluginOrder:d,injectEventPluginsByName:p}),Zn=null,Jn=null,er=null,tr=null,nr={injectEventPluginOrder:d,injectEventPluginsByName:p},rr=Object.freeze({injection:nr,getListener:C,extractEvents:k,enqueueEvents:w,processEventQueue:E}),or=Math.random().toString(36).slice(2),ar="__reactInternalInstance$"+or,lr="__reactEventHandlers$"+or,ir=Object.freeze({precacheFiberNode:function(e,t){t[ar]=e},getClosestInstanceFromNode:x,getInstanceFromNode:function(e){return e=e[ar],!e||5!==e.tag&&6!==e.tag?null:e},getNodeFromInstance:T,getFiberCurrentPropsFromNode:S,updateFiberProps:function(e,t){e[lr]=t}}),ur=Object.freeze({accumulateTwoPhaseDispatches:D,accumulateTwoPhaseDispatchesSkipTarget:function(e){g(e,I)},accumulateEnterLeaveDispatches:L,accumulateDirectDispatches:function(e){g(e,R)}}),cr=null,sr={_root:null,_startText:null,_fallbackText:null},fr="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),dr={type:null,target:null,currentTarget:wn.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};kn(H.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=wn.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=wn.thatReturnsTrue)},persist:function(){this.isPersistent=wn.thatReturnsTrue},isPersistent:wn.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t<fr.length;t++)this[fr[t]]=null}}),H.Interface=dr,H.augmentClass=function(e,t){function n(){}n.prototype=this.prototype;var r=new n;kn(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=kn({},this.Interface,t),e.augmentClass=this.augmentClass,V(e)},V(H),H.augmentClass(B,{data:null}),H.augmentClass(K,{data:null});var pr=[9,13,27,32],mr=Cn.canUseDOM&&"CompositionEvent"in window,hr=null;Cn.canUseDOM&&"documentMode"in document&&(hr=document.documentMode);var gr;if(gr=Cn.canUseDOM&&"TextEvent"in window&&!hr){var yr=window.opera;gr=!("object"==typeof yr&&"function"==typeof yr.version&&12>=parseInt(yr.version(),10))}var vr,br=gr,Cr=Cn.canUseDOM&&(!mr||hr&&8<hr&&11>=hr),kr=String.fromCharCode(32),wr={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},Er=!1,xr=!1,Tr={eventTypes:wr,extractEvents:function(e,t,n,r){var o;if(mr)e:{switch(e){case"topCompositionStart":var a=wr.compositionStart;break e;case"topCompositionEnd":a=wr.compositionEnd;break e;case"topCompositionUpdate":a=wr.compositionUpdate;break e}a=void 0}else xr?W(e,n)&&(a=wr.compositionEnd):"topKeyDown"===e&&229===n.keyCode&&(a=wr.compositionStart);return a?(Cr&&(xr||a!==wr.compositionStart?a===wr.compositionEnd&&xr&&(o=A()):(sr._root=r,sr._startText=U(),xr=!0)),a=B.getPooled(a,t,n,r),o?a.data=o:null!==(o=$(n))&&(a.data=o),D(a),o=a):o=null,(e=br?q(e,n):Q(e,n))?(t=K.getPooled(wr.beforeInput,t,n,r),t.data=e,D(t)):t=null,[o,t]}},Sr=null,_r=null,Nr=null,Pr={injectFiberControlledHostComponent:function(e){Sr=e}},Or=Object.freeze({injection:Pr,enqueueStateRestore:Y,restoreStateIfNeeded:X}),Ir=!1,Mr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};Cn.canUseDOM&&(vr=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""));var Rr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange".split(" ")}},Dr=null,Lr=null,Fr=!1;Cn.canUseDOM&&(Fr=ne("input")&&(!document.documentMode||9<document.documentMode));var Ar={eventTypes:Rr,_isInputEventSupported:Fr,extractEvents:function(e,t,n,r){var o=t?T(t):window,a=o.nodeName&&o.nodeName.toLowerCase();if("select"===a||"input"===a&&"file"===o.type)var l=se;else if(ee(o))if(Fr)l=ge;else{l=me;var i=pe}else!(a=o.nodeName)||"input"!==a.toLowerCase()||"checkbox"!==o.type&&"radio"!==o.type||(l=he);if(l&&(l=l(e,t)))return ie(l,n,r);i&&i(e,o,t),"topBlur"===e&&null!=t&&(e=t._wrapperState||o._wrapperState)&&e.controlled&&"number"===o.type&&(e=""+o.value,o.getAttribute("value")!==e&&o.setAttribute("value",e))}};H.augmentClass(ye,{view:null,detail:null});var Ur={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};ye.augmentClass(Ce,{screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:be,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)}});var Hr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},jr={eventTypes:Hr,extractEvents:function(e,t,n,r){if("topMouseOver"===e&&(n.relatedTarget||n.fromElement)||"topMouseOut"!==e&&"topMouseOver"!==e)return null;var o=r.window===r?r:(o=r.ownerDocument)?o.defaultView||o.parentWindow:window;if("topMouseOut"===e?(e=t,t=(t=n.relatedTarget||n.toElement)?x(t):null):e=null,e===t)return null;var a=null==e?o:T(e);o=null==t?o:T(t);var l=Ce.getPooled(Hr.mouseLeave,e,n,r);return l.type="mouseleave",l.target=a,l.relatedTarget=o,n=Ce.getPooled(Hr.mouseEnter,t,n,r),n.type="mouseenter",n.target=o,n.relatedTarget=a,L(l,n,e,t),[l,n]}},zr=bn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Vr=[],Br=!0,Kr=void 0,Wr=Object.freeze({get _enabled(){return Br},get _handleTopLevel(){return Kr},setHandleTopLevel:function(e){Kr=e},setEnabled:Pe,isEnabled:function(){return Br},trapBubbledEvent:Oe,trapCapturedEvent:Ie,dispatchEvent:Me}),$r={animationend:Re("Animation","AnimationEnd"),animationiteration:Re("Animation","AnimationIteration"),animationstart:Re("Animation","AnimationStart"),transitionend:Re("Transition","TransitionEnd")},qr={},Qr={};Cn.canUseDOM&&(Qr=document.createElement("div").style,"AnimationEvent"in window||(delete $r.animationend.animation,delete $r.animationiteration.animation,delete $r.animationstart.animation),"TransitionEvent"in window||delete $r.transitionend.transition);var Gr={topAbort:"abort",topAnimationEnd:De("animationend")||"animationend",topAnimationIteration:De("animationiteration")||"animationiteration",topAnimationStart:De("animationstart")||"animationstart",topBlur:"blur",topCancel:"cancel",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topClose:"close",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoad:"load",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topToggle:"toggle",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:De("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},Yr={},Xr=0,Zr="_reactListenersID"+(""+Math.random()).slice(2),Jr=Cn.canUseDOM&&"documentMode"in document&&11>=document.documentMode,eo={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange".split(" ")}},to=null,no=null,ro=null,oo=!1,ao={eventTypes:eo,extractEvents:function(e,t,n,r){var o,a=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(o=!a)){e:{a=Le(a),o=Yn.onSelect;for(var l=0;l<o.length;l++){var i=o[l];if(!a.hasOwnProperty(i)||!a[i]){a=!1;break e}}a=!0}o=!a}if(o)return null;switch(a=t?T(t):window,e){case"topFocus":(ee(a)||"true"===a.contentEditable)&&(to=a,no=t,ro=null);break;case"topBlur":ro=no=to=null;break;case"topMouseDown":oo=!0;break;case"topContextMenu":case"topMouseUp":return oo=!1,He(n,r);case"topSelectionChange":if(Jr)break;case"topKeyDown":case"topKeyUp":return He(n,r)}return null}};H.augmentClass(je,{animationName:null,elapsedTime:null,pseudoElement:null}),H.augmentClass(ze,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ye.augmentClass(Ve,{relatedTarget:null});var lo={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},io={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};ye.augmentClass(Ke,{key:function(e){if(e.key){var t=lo[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?(e=Be(e),13===e?"Enter":String.fromCharCode(e)):"keydown"===e.type||"keyup"===e.type?io[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:be,charCode:function(e){return"keypress"===e.type?Be(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Be(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Ce.augmentClass(We,{dataTransfer:null}),ye.augmentClass($e,{touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:be}),H.augmentClass(qe,{propertyName:null,elapsedTime:null,pseudoElement:null}),Ce.augmentClass(Qe,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null});var uo={},co={};"abort animationEnd animationIteration animationStart blur cancel canPlay canPlayThrough click close contextMenu copy cut doubleClick drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error focus input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing progress rateChange reset scroll seeked seeking stalled submit suspend timeUpdate toggle touchCancel touchEnd touchMove touchStart transitionEnd volumeChange waiting wheel".split(" ").forEach(function(e){var t=e[0].toUpperCase()+e.slice(1),n="on"+t;t="top"+t,n={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[t]},uo[e]=n,co[t]=n});var so={eventTypes:uo,extractEvents:function(e,t,n,r){var o=co[e];if(!o)return null;switch(e){case"topKeyPress":if(0===Be(n))return null;case"topKeyDown":case"topKeyUp":e=Ke;break;case"topBlur":case"topFocus":e=Ve;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":e=Ce;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":e=We;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":e=$e;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":e=je;break;case"topTransitionEnd":e=qe;break;case"topScroll":e=ye;break;case"topWheel":e=Qe;break;case"topCopy":case"topCut":case"topPaste":e=ze;break;default:e=H}return t=e.getPooled(o,t,n,r),D(t),t}};Kr=function(e,t,n,r){e=k(e,t,n,r),w(e),E(!1)},nr.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),Zn=ir.getFiberCurrentPropsFromNode,Jn=ir.getInstanceFromNode,er=ir.getNodeFromInstance,nr.injectEventPluginsByName({SimpleEventPlugin:so,EnterLeaveEventPlugin:jr,ChangeEventPlugin:Ar,SelectEventPlugin:ao,BeforeInputEventPlugin:Tr});var fo=[],po=-1;new Set;var mo={current:Nn},ho={current:!1},go=Nn,yo=null,vo=null,bo="function"==typeof Symbol&&Symbol.for,Co=bo?Symbol.for("react.element"):60103,ko=bo?Symbol.for("react.call"):60104,wo=bo?Symbol.for("react.return"):60105,Eo=bo?Symbol.for("react.portal"):60106,xo=bo?Symbol.for("react.fragment"):60107,To="function"==typeof Symbol&&Symbol.iterator,So=Array.isArray,_o=_t(!0),No=_t(!1),Po={},Oo=Object.freeze({default:Dt}),Io=Oo&&Dt||Oo,Mo=Io.default?Io.default:Io,Ro="object"==typeof performance&&"function"==typeof performance.now,Do=void 0;Do=Ro?function(){return performance.now()}:function(){return Date.now()};var Lo=void 0,Fo=void 0;if(Cn.canUseDOM)if("function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback){var Ao,Uo=null,Ho=!1,jo=-1,zo=!1,Vo=0,Bo=33,Ko=33;Ao=Ro?{didTimeout:!1,timeRemaining:function(){var e=Vo-performance.now();return 0<e?e:0}}:{didTimeout:!1,timeRemaining:function(){var e=Vo-Date.now();return 0<e?e:0}};var Wo="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(e){if(e.source===window&&e.data===Wo){if(Ho=!1,e=Do(),0>=Vo-e){if(!(-1!==jo&&jo<=e))return void(zo||(zo=!0,requestAnimationFrame($o)));Ao.didTimeout=!0}else Ao.didTimeout=!1;jo=-1,e=Uo,Uo=null,null!==e&&e(Ao)}},!1);var $o=function(e){zo=!1;var t=e-Vo+Ko;t<Ko&&Bo<Ko?(8>t&&(t=8),Ko=t<Bo?Bo:t):Bo=t,Vo=e+Ko,Ho||(Ho=!0,window.postMessage(Wo,"*"))};Lo=function(e,t){return Uo=e,null!=t&&"number"==typeof t.timeout&&(jo=Do()+t.timeout),zo||(zo=!0,requestAnimationFrame($o)),0},Fo=function(){Uo=null,Ho=!1,jo=-1}}else Lo=window.requestIdleCallback,Fo=window.cancelIdleCallback;else Lo=function(e){return setTimeout(function(){e({timeRemaining:function(){return 1/0}})})},Fo=function(e){clearTimeout(e)};var qo=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Qo={},Go={},Yo={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"},Xo=void 0,Zo=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n)})}:e}(function(e,t){if(e.namespaceURI!==Yo.svg||"innerHTML"in e)e.innerHTML=t;else{for(Xo=Xo||document.createElement("div"),Xo.innerHTML="<svg>"+t+"</svg>",t=Xo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}),Jo={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ea=["Webkit","ms","Moz","O"];Object.keys(Jo).forEach(function(e){ea.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jo[t]=Jo[e]})});var ta=kn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),na=Yo.html,ra=wn.thatReturns(""),oa={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},aa=Object.freeze({createElement:ln,createTextNode:un,setInitialProperties:cn,diffProperties:sn,updateProperties:fn,diffHydratedProperties:dn,diffHydratedText:pn,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case"input":if(Bt(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var a=S(o);a||r("90"),le(o),Bt(o,a)}}}break;case"textarea":Xt(e,n);break;case"select":null!=(t=n.value)&&qt(e,!!n.multiple,t,!1)}}});Pr.injectFiberControlledHostComponent(aa);var la=null,ia=null,ua=Mo({getRootHostContext:function(e){var t=e.nodeType;switch(t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:en(null,"");break;default:t=8===t?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=en(e,t)}return e},getChildHostContext:function(e,t){return en(e,t)},getPublicInstance:function(e){return e},prepareForCommit:function(){la=Br;var e=xn();if(Ue(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{var n=window.getSelection&&window.getSelection();if(n&&0!==n.rangeCount){t=n.anchorNode;var r=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{t.nodeType,o.nodeType}catch(e){t=null;break e}var a=0,l=-1,i=-1,u=0,c=0,s=e,f=null;t:for(;;){for(var d;s!==t||0!==r&&3!==s.nodeType||(l=a+r),s!==o||0!==n&&3!==s.nodeType||(i=a+n),3===s.nodeType&&(a+=s.nodeValue.length),null!==(d=s.firstChild);)f=s,s=d;for(;;){if(s===e)break t;if(f===t&&++u===r&&(l=a),f===o&&++c===n&&(i=a),null!==(d=s.nextSibling))break;s=f,f=s.parentNode}s=d}t=-1===l||-1===i?null:{start:l,end:i}}else t=null}t=t||{start:0,end:0}}else t=null;ia={focusedElem:e,selectionRange:t},Pe(!1)},resetAfterCommit:function(){var e=ia,t=xn(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&Sn(document.documentElement,n)){if(Ue(n))if(t=r.start,e=r.end,void 0===e&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(window.getSelection){t=window.getSelection();var o=n[F()].length;e=Math.min(r.start,o),r=void 0===r.end?e:Math.min(r.end,o),!t.extend&&e>r&&(o=r,r=e,e=o),o=Ae(n,e);var a=Ae(n,r);if(o&&a&&(1!==t.rangeCount||t.anchorNode!==o.node||t.anchorOffset!==o.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)){var l=document.createRange();l.setStart(o.node,o.offset),t.removeAllRanges(),e>r?(t.addRange(l),t.extend(a.node,a.offset)):(l.setEnd(a.node,a.offset),t.addRange(l))}}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(_n(n),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}ia=null,Pe(la),la=null},createInstance:function(e,t,n,r,o){return e=ln(e,t,n,r),e[ar]=o,e[lr]=t,e},appendInitialChild:function(e,t){e.appendChild(t)},finalizeInitialChildren:function(e,t,n,r){cn(e,t,n,r);e:{switch(t){case"button":case"input":case"select":case"textarea":e=!!n.autoFocus;break e}e=!1}return e},prepareUpdate:function(e,t,n,r,o){return sn(e,t,n,r,o)},shouldSetTextContent:function(e,t){return"textarea"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html},shouldDeprioritizeSubtree:function(e,t){return!!t.hidden},createTextInstance:function(e,t,n,r){return e=un(e,t),e[ar]=r,e},now:Do,mutation:{commitMount:function(e){e.focus()},commitUpdate:function(e,t,n,r,o){e[lr]=o,fn(e,t,n,r,o)},resetTextContent:function(e){e.textContent=""},commitTextUpdate:function(e,t,n){e.nodeValue=n},appendChild:function(e,t){e.appendChild(t)},appendChildToContainer:function(e,t){8===e.nodeType?e.parentNode.insertBefore(t,e):e.appendChild(t)},insertBefore:function(e,t,n){e.insertBefore(t,n)},insertInContainerBefore:function(e,t,n){8===e.nodeType?e.parentNode.insertBefore(t,n):e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},removeChildFromContainer:function(e,t){8===e.nodeType?e.parentNode.removeChild(t):e.removeChild(t)}},hydration:{canHydrateInstance:function(e,t){return 1!==e.nodeType||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e},canHydrateTextInstance:function(e,t){return""===t||3!==e.nodeType?null:e},getNextHydratableSibling:function(e){for(e=e.nextSibling;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e},getFirstHydratableChild:function(e){for(e=e.firstChild;e&&1!==e.nodeType&&3!==e.nodeType;)e=e.nextSibling;return e},hydrateInstance:function(e,t,n,r,o,a){return e[ar]=a,e[lr]=n,dn(e,t,n,o,r)},hydrateTextInstance:function(e,t,n){return e[ar]=n,pn(e,t)},didNotMatchHydratedContainerTextInstance:function(){},didNotMatchHydratedTextInstance:function(){},didNotHydrateContainerInstance:function(){},didNotHydrateInstance:function(){},didNotFindHydratableContainerInstance:function(){},didNotFindHydratableContainerTextInstance:function(){},didNotFindHydratableInstance:function(){},didNotFindHydratableTextInstance:function(){}},scheduleDeferredCallback:Lo,cancelDeferredCallback:Fo,useSyncScheduling:!0});Z=ua.batchedUpdates,vn.prototype.render=function(e,t){ua.updateContainer(e,this._reactRootContainer,null,t)},vn.prototype.unmount=function(e){ua.updateContainer(null,this._reactRootContainer,null,e)};var ca={createPortal:yn,findDOMNode:function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(t)return ua.findHostInstance(t);"function"==typeof e.render?r("188"):r("213",Object.keys(e))},hydrate:function(e,t,n){return gn(null,e,t,!0,n)},render:function(e,t,n){return gn(null,e,t,!1,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,o){return(null==e||void 0===e._reactInternalFiber)&&r("38"),gn(e,t,n,!1,o)},unmountComponentAtNode:function(e){return mn(e)||r("40"),!!e._reactRootContainer&&(ua.unbatchedUpdates(function(){gn(null,null,e,!1,function(){e._reactRootContainer=null})}),!0)},unstable_createPortal:yn,unstable_batchedUpdates:J,unstable_deferredUpdates:ua.deferredUpdates,flushSync:ua.flushSync,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:rr,EventPluginRegistry:Xn,EventPropagators:ur,ReactControlledComponent:Or,ReactDOMComponentTree:ir,ReactDOMEventListener:Wr}};ua.injectIntoDevTools({findFiberByHostInstance:x,bundleType:0,version:"16.2.0",rendererPackageName:"react-dom"});var sa=Object.freeze({default:ca}),fa=sa&&ca||sa;e.exports=fa.default?fa.default:fa},function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=o},function(e,t,n){"use strict";var r=n(1),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};e.exports=o},function(e,t,n){"use strict";function r(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}e.exports=r},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!==e&&t!==t}function o(e,t){if(r(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var l=0;l<n.length;l++)if(!a.call(t,n[l])||!r(e[n[l]],t[n[l]]))return!1;return!0}var a=Object.prototype.hasOwnProperty;e.exports=o},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!o(e)&&(o(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var o=n(13);e.exports=r},function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=n(14);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e?e.ownerDocument||e:document,n=t.defaultView||window;return!(!e||!("function"==typeof n.Node?e instanceof n.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=r},function(e,t,n){"use strict";function r(e){try{e.focus()}catch(e){}}e.exports=r},function(e,t){},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=r(u),s=n(18),f=r(s),d=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return l(t,e),i(t,[{key:"render",value:function(){return c.default.createElement(f.default,null)}}]),t}(u.Component);t.default=d},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),u=function(e){return e&&e.__esModule?e:{default:e}}(i),c=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),l(t,[{key:"render",value:function(){return u.default.createElement("div",{id:"header"},u.default.createElement("div",{className:"wrapper"},u.default.createElement("a",{className:"logo",href:"#"},u.default.createElement("img",{src:"./image/geek_marketers_logo.png",alt:"Logo",width:120})),u.default.createElement("nav",null,u.default.createElement("ul",null,u.default.createElement("li",null,u.default.createElement("div",{className:"dropdown"},u.default.createElement("a",{className:"menu",href:"#"},"Home"),u.default.createElement("div",{className:"drop-menu"},u.default.createElement("a",{className:"sub-menu",href:"#"},"Link 1"),u.default.createElement("a",{className:"sub-menu",href:"#"},"Link 2"),u.default.createElement("a",{className:"sub-menu",href:"#"},"Link 3")))),u.default.createElement("li",null,u.default.createElement("div",{className:"dropdown"},u.default.createElement("a",{className:"menu",href:"#"},"Services"),u.default.createElement("div",{className:"drop-menu"},u.default.createElement("a",{className:"sub-menu",href:"#"},"Link 1"),u.default.createElement("a",{className:"sub-menu",href:"#"},"Link 2"),u.default.createElement("a",{className:"sub-menu",href:"#"},"Link 3")))),u.default.createElement("li",null,u.default.createElement("div",{className:"dropdown"},u.default.createElement("a",{className:"menu",href:"#"},"About"),u.default.createElement("div",{className:"drop-menu"},u.default.createElement("a",{className:"sub-menu",href:"#"},"Link 1"),u.default.createElement("a",{className:"sub-menu",href:"#"},"Link 2"),u.default.createElement("a",{className:"sub-menu",href:"#"},"Link 3")))),u.default.createElement("li",null,u.default.createElement("div",{className:"dropdown"},u.default.createElement("a",{className:"menu",href:"#"},"Blogs"),u.default.createElement("div",{className:"drop-menu"},u.default.createElement("a",{className:"sub-menu",href:"#"},"Link 1"),u.default.createElement("a",{className:"sub-menu",href:"#"},"Link 2"),u.default.createElement("a",{className:"sub-menu",href:"#"},"Link 3")))),u.default.createElement("li",null,u.default.createElement("div",{className:"dropdown"},u.default.createElement("a",{className:"menu",href:"#"},"Contact"),u.default.createElement("div",{className:"drop-menu"},u.default.createElement("a",{className:"sub-menu",href:"#"},"Link 1"),u.default.createElement("a",{className:"sub-menu",href:"#"},"Link 2"),u.default.createElement("a",{className:"sub-menu",href:"#"},"Link 3"))))))))}}]),t}(i.Component);t.default=c}]);
function JSAccordion(elementOrSelector) { if(!(this instanceof JSAccordion)) return new JSAccordion(elementOrSelector); // define private properties _clickTimeout = {}; // define public methods this.init = function() { var lists, listItems, i, j, header, headerHx, body; // add jsac unique id to container element as new attribute this.targetElement.setAttribute('data-jsac-id', this.id); this.targetElement.classList.add('jsac-container'); // get all first level ul of continer lists = document.querySelectorAll("[data-jsac-id=\""+this.id+"\"] > ul"); for(i = 0; i < lists.length; i ++) { lists[i].classList.add('jsac-list'); listItems = lists[i].querySelectorAll("[data-jsac-id=\""+this.id+"\"] > ul > li"); for(j = 0; j < listItems.length; j ++) { listItems[j].classList.add('jsac-list-item'); body = listItems[j].querySelector("div:nth-child(2)"); body.style.height = body.offsetHeight+ 'px'; body.classList.add('jsac-body'); header = listItems[j].querySelector("div:nth-child(1)"); header.classList.add('jsac-header'); header.onclick = (function() { var listItem = listItems[j], bodyElement = body, that = this, target = [i,j]; return function (event) { if(listItem.classList.contains('collapsed')) { listItem.classList.add('expanded'); listItem.classList.remove('collapsed'); } else { listItem.classList.remove('expanded'); listItem.classList.add('collapsed'); } if(that._clickTimeout[target[0]+'-'+[target[1]]] != undefined) clearTimeout(that._clickTimeout[target[0]+'-'+[target[1]]]); that._clickTimeout[target[0]+'-'+[target[1]]] = setTimeout(function() { if (listItem.classList.contains('expanded')) { var oldHeight = bodyElement.style.height; bodyElement.style.height = 'auto'; var newHeight = bodyElement.offsetHeight + 'px'; bodyElement.style.height = oldHeight; bodyElement.style.height = newHeight; } delete _clickTimeout[target[0]+'-'+[target[1]]]; }, 500); } })(); headerHx = header.querySelector('h3,h4,h5,h6'); headerHx.classList.add('jsac-title'); } } return this; }; // start construction operations // if parameter is element selector if(typeof elementOrSelector == 'string') { this.targetElement = document.querySelector(elementOrSelector); if(this.targetElement == null) { throw ('invalid element selector'); } } // if parameter is element DOM object else if(typeof elementOrSelector == 'object') this.targetElement = elementOrSelector; else throw ('Unknown element type'); // set autoincrement instance id to object this.id = JSAccordion.instances.length; JSAccordion.instances.push(this); this.init(); return this; } // define static property to keep all instances JSAccordion.instances = [];
'use strict'; var bitcore = require('bitcore-lib-crown'); var async = require('async'); var TxController = require('./transactions'); var Common = require('./common'); function AddressController(node) { this.node = node; this.txController = new TxController(node); this.common = new Common({log: this.node.log}); } AddressController.prototype.show = function(req, res) { var self = this; var options = { noTxList: parseInt(req.query.noTxList) }; if (req.query.from && req.query.to) { options.from = parseInt(req.query.from); options.to = parseInt(req.query.to); } this.getAddressSummary(req.addr, options, function(err, data) { if(err) { return self.common.handleErrors(err, res); } res.jsonp(data); }); }; AddressController.prototype.balance = function(req, res) { this.addressSummarySubQuery(req, res, 'balanceSat'); }; AddressController.prototype.totalReceived = function(req, res) { this.addressSummarySubQuery(req, res, 'totalReceivedSat'); }; AddressController.prototype.totalSent = function(req, res) { this.addressSummarySubQuery(req, res, 'totalSentSat'); }; AddressController.prototype.unconfirmedBalance = function(req, res) { this.addressSummarySubQuery(req, res, 'unconfirmedBalanceSat'); }; AddressController.prototype.addressSummarySubQuery = function(req, res, param) { var self = this; this.getAddressSummary(req.addr, {}, function(err, data) { if(err) { return self.common.handleErrors(err, res); } res.jsonp(data[param]); }); }; AddressController.prototype.getAddressSummary = function(address, options, callback) { this.node.getAddressSummary(address, options, function(err, summary) { if(err) { return callback(err); } var transformed = { addrStr: address, balance: summary.balance / 1e8, balanceSat: summary.balance, totalReceived: summary.totalReceived / 1e8, totalReceivedSat: summary.totalReceived, totalSent: summary.totalSpent / 1e8, totalSentSat: summary.totalSpent, unconfirmedBalance: summary.unconfirmedBalance / 1e8, unconfirmedBalanceSat: summary.unconfirmedBalance, unconfirmedTxApperances: summary.unconfirmedAppearances, // misspelling - ew txApperances: summary.appearances, // yuck transactions: summary.txids }; callback(null, transformed); }); }; AddressController.prototype.checkAddr = function(req, res, next) { req.addr = req.params.addr; this.check(req, res, next, [req.addr]); }; AddressController.prototype.checkAddrs = function(req, res, next) { if(req.body.addrs) { req.addrs = req.body.addrs.split(','); } else { req.addrs = req.params.addrs.split(','); } this.check(req, res, next, req.addrs); }; AddressController.prototype.check = function(req, res, next, addresses) { var self = this; if(!addresses.length || !addresses[0]) { return self.common.handleErrors({ message: 'Must include address', code: 1 }, res); } for(var i = 0; i < addresses.length; i++) { try { var a = new bitcore.Address(addresses[i]); } catch(e) { return self.common.handleErrors({ message: 'Invalid address: ' + e.message, code: 1 }, res); } } next(); }; AddressController.prototype.utxo = function(req, res) { var self = this; this.node.getAddressUnspentOutputs(req.addr, {}, function(err, utxos) { if(err) { return self.common.handleErrors(err, res); } else if (!utxos.length) { return res.jsonp([]); } res.jsonp(utxos.map(self.transformUtxo.bind(self))); }); }; AddressController.prototype.multiutxo = function(req, res) { var self = this; this.node.getAddressUnspentOutputs(req.addrs, true, function(err, utxos) { if(err && err.code === -5) { return res.jsonp([]); } else if(err) { return self.common.handleErrors(err, res); } res.jsonp(utxos.map(self.transformUtxo.bind(self))); }); }; AddressController.prototype.transformUtxo = function(utxoArg) { var utxo = { address: utxoArg.address, txid: utxoArg.txid, vout: utxoArg.outputIndex, scriptPubKey: utxoArg.script, amount: utxoArg.satoshis / 1e8, satoshis: utxoArg.satoshis }; if (utxoArg.height && utxoArg.height > 0) { utxo.height = utxoArg.height; utxo.confirmations = this.node.services.bitcoind.height - utxoArg.height + 1; } else { utxo.confirmations = 0; } if (utxoArg.timestamp) { utxo.ts = utxoArg.timestamp; } return utxo; }; AddressController.prototype._getTransformOptions = function(req) { return { noAsm: parseInt(req.query.noAsm) ? true : false, noScriptSig: parseInt(req.query.noScriptSig) ? true : false, noSpent: parseInt(req.query.noSpent) ? true : false }; }; AddressController.prototype.multitxs = function(req, res, next) { var self = this; var options = { from: parseInt(req.query.from) || parseInt(req.body.from) || 0 }; options.to = parseInt(req.query.to) || parseInt(req.body.to) || parseInt(options.from) + 10; self.node.getAddressHistory(req.addrs, options, function(err, result) { if(err) { return self.common.handleErrors(err, res); } var transformOptions = self._getTransformOptions(req); self.transformAddressHistoryForMultiTxs(result.items, transformOptions, function(err, items) { if (err) { return self.common.handleErrors(err, res); } res.jsonp({ totalItems: result.totalCount, from: options.from, to: Math.min(options.to, result.totalCount), items: items }); }); }); }; AddressController.prototype.transformAddressHistoryForMultiTxs = function(txinfos, options, callback) { var self = this; var items = txinfos.map(function(txinfo) { return txinfo.tx; }).filter(function(value, index, self) { return self.indexOf(value) === index; }); async.map( items, function(item, next) { self.txController.transformTransaction(item, options, next); }, callback ); }; module.exports = AddressController;
module.exports = { post_list: { sql: "select \ id, \ title, \ body \ from test.posts", params: [] }, post_read: { sql: "select \ id, \ title, \ body \ from test.posts \ where id = ?", params: [ 'id' ] }, post_create: { sql: "insert into test.posts \ (title, body) \ values (?, ?)", params: [ 'title', 'body' ] }, post_update: { sql: "update test.posts \ set title = ?, \ body = ? \ where id = ?", params: [ 'title', 'body', 'id' ] }, post_delete: { sql: "delete from test.posts \ where id = ?", params: [ 'id' ] }, person_login: { sql: "select \ id \ from test.users \ where id = ? and password = ?", params: [ 'id', 'password' ] }, person_list: { sql: "select \ id, \ name, \ age, \ mobile \ from test.person", params: [] }, person_read: { sql: "select \ id, \ name, \ age, \ mobile \ from test.person \ where id = ?", params: [ 'id' ] }, person_create: { sql: "insert into test.person \ (id, name, age, mobile) \ values (?, ?, ?, ?)", params: [ 'id', 'name', 'age', 'mobile' ] }, person_update: { sql: "update test.person \ set name = ?, \ age = ?, \ mobile = ? \ where id = ?", params: [ 'name', 'age', 'mobile', 'id' ] }, person_delete: { sql: "delete from test.person \ where id = ?", params: [ 'id' ] }, person_get: { sql: "select \ id, \ name, \ age, \ mobile \ from test.person \ where name like ?", params: [ 'name' ] }, person_add: { sql: "insert into test.person \ (name, age, mobile) \ values (?, ?, ?)", params: [ 'name', 'age', 'mobile' ] }, chat_save_connection: { sql: "\ insert into chat.connection \ (socket_id, namespace, presence) \ values \ (?, ?, 'off')", params: [ 'socket_id', 'namespace' ] }, chat_save_disconnect: { sql: "\ update chat.connection \ set disconnect_date = now(), \ presence = 'off', \ modify_date = now() \ where \ socket_id = ?", params: [ 'socket_id' ] }, chat_save_login: { sql: "\ update chat.connection \ set id = ?, \ alias = ?, \ today = ?, \ presence = 'on', \ login_date = now(), \ presence_date = now(), \ modify_date = now() \ where \ socket_id = ?", params: [ 'id', 'alias', 'today', 'socket_id' ] }, chat_save_logout: { sql: "\ update chat.connection \ set presence = 'off', \ logout_date = now(), \ presence_date = now(), \ modify_date = now() \ where \ id = ? \ and socket_id = ?", params: [ 'id', 'socket_id' ] }, chat_save_message: { sql: "\ insert into chat.message \ (id, sender, receiver, command, type, data, namespace, status) \ values \ (?, ?, ?, ?, ?, ?, ?, ?)", params: [ 'id', 'sender', 'receiver', 'command', 'type', 'data', 'namespace', 'status' ] }, chat_save_message_status: { sql: "\ update chat.message \ set status = ?, \ sent_date = now(), \ modify_date = now() \ where \ id = ?", params: [ 'status', 'id' ] }, chat_reset_presence: { sql: "\ update chat.connection \ set presence = 'off', \ modify_date = now() \ where \ namespace = ?", params: [ 'namespace' ] }, chat_get_unsent_messages: { sql: "\ select \ id, sender, receiver, command, type, data, namespace, status \ from chat.message \ where \ receiver = ? \ and status = '100' \ and create_date > DATE_ADD(now(), INTERVAL -1 DAY)", params: [ 'receiver' ] }, chat_update_unsent_messages: { sql: "\ update chat.message \ status = '200' \ ,sent_date = now() \ ,modify_date = now() \ where \ receiver = ? \ and status = '100' \ and create_date > DATE_ADD(now(), INTERVAL -1 DAY)", params: [ 'receiver' ] } }
// DATA_TEMPLATE: empty_table oTest.fnStart( "fnInitComplete" ); /* Fairly boring function compared to the others! */ $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "sAjaxSource": "../../../examples/ajax/sources/objects.txt", "aoColumns": [ { "mData": "engine" }, { "mData": "browser" }, { "mData": "platform" }, { "mData": "version" }, { "mData": "grade" } ] } ); var oSettings = oTable.fnSettings(); var mPass; oTest.fnWaitTest( "Default should be null", null, function () { return oSettings.fnInitComplete == null; } ); oTest.fnWaitTest( "Two arguments passed (for Ajax!)", function () { oSession.fnRestore(); mPass = -1; $('#example').dataTable( { "sAjaxSource": "../../../examples/ajax/sources/objects.txt", "aoColumnDefs": [ { "mData": "engine", "aTargets": [0] }, { "mData": "browser", "aTargets": [1] }, { "mData": "platform", "aTargets": [2] }, { "mData": "version", "aTargets": [3] }, { "mData": "grade", "aTargets": [4] } ], "fnInitComplete": function ( ) { mPass = arguments.length; } } ); }, function () { return mPass == 2; } ); oTest.fnWaitTest( "That one argument is the settings object", function () { oSession.fnRestore(); oTable = $('#example').dataTable( { "sAjaxSource": "../../../examples/ajax/sources/objects.txt", "aoColumnDefs": [ { "mData": "engine", "aTargets": [0] }, { "mData": "browser", "aTargets": [1] }, { "mData": "platform", "aTargets": [2] }, { "mData": "version", "aTargets": [3] }, { "mData": "grade", "aTargets": [4] } ], "fnInitComplete": function ( oSettings ) { mPass = oSettings; } } ); }, function () { return oTable.fnSettings() == mPass; } ); oTest.fnWaitTest( "fnInitComplete called once on first draw", function () { oSession.fnRestore(); mPass = 0; $('#example').dataTable( { "sAjaxSource": "../../../examples/ajax/sources/objects.txt", "aoColumnDefs": [ { "mData": "engine", "aTargets": [0] }, { "mData": "browser", "aTargets": [1] }, { "mData": "platform", "aTargets": [2] }, { "mData": "version", "aTargets": [3] }, { "mData": "grade", "aTargets": [4] } ], "fnInitComplete": function ( ) { mPass++; } } ); }, function () { return mPass == 1; } ); oTest.fnWaitTest( "fnInitComplete never called there after", function () { $('#example_next').click(); $('#example_next').click(); $('#example_next').click(); }, function () { return mPass == 1; } ); oTest.fnWaitTest( "10 rows in the table on complete", function () { oSession.fnRestore(); mPass = 0; $('#example').dataTable( { "sAjaxSource": "../../../examples/ajax/sources/objects.txt", "aoColumnDefs": [ { "mData": "engine", "aTargets": [0] }, { "mData": "browser", "aTargets": [1] }, { "mData": "platform", "aTargets": [2] }, { "mData": "version", "aTargets": [3] }, { "mData": "grade", "aTargets": [4] } ], "fnInitComplete": function ( ) { mPass = $('#example tbody tr').length; } } ); }, function () { return mPass == 10; } ); oTest.fnComplete(); } );
import React, {Component} from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import { fetchUserStart, fetchUserRequest, logoutUserStart, logoutUserRequest, } from '../action'; class Heading extends Component { constructor(props) { super(props); this.logout = this.logout.bind(this); } componentWillMount() { this.props.fetchUser(); } logout() { if (!this.props.isLoggingOut) { this.props.logout(); } } render() { return ( <header> <div className="header-styles"> <div className="container-fluid"> <section className="navbar-header visible-xs"> <Link to="/" className="navbar-brand">JobsOnTheGo</Link> <div className="pull-right navbar-right"> {!this.props.user && <Link to="/login">Log In</Link>} {!this.props.user && <Link to="/signup">Join</Link>} {this.props.user && <Link to="/logout" onClick={this.logout}>Logout</Link>} </div> </section> <div className="hidden-xs"> <ul className="nav navbar-nav"> <li className="logo"> <Link to="/">JobsOnTheGo</Link> </li> <li className="hidden-xs"> <Link to="/jobs">Explore Jobs</Link> </li> <li className="hidden-xs"> {this.props.user && <Link to="/saved-jobs">Saved jobs</Link>} </li> <li className="hidden-xs"> {this.props.user && <Link to="/applied-jobs">Applied jobs</Link>} </li> </ul> <ul className="nav navbar-nav navbar-right"> {!this.props.user && <li> <Link to="/login">Log In</Link> </li>} {!this.props.user && <li> <Link to="/signup">Join</Link> </li>} {this.props.user && <li> <Link to="/" onClick={this.logout}>Logout</Link> </li>} <li> <Link to="/employer">For The Employers</Link> </li> </ul> </div> </div> </div> </header> ) } } const mapStateToProps = state => ({ user: state.user, isLoggingOut: state.isLoggingOut, }); const mapDispatchToProps = dispatch => ({ fetchUser: () => { dispatch(fetchUserStart()); return dispatch(fetchUserRequest()); }, logout: () => { dispatch(logoutUserStart()); return dispatch(logoutUserRequest()); }, }); export default connect(mapStateToProps, mapDispatchToProps)(Heading);
import React from 'react'; import { Link, Redirect, Switch, Route } from 'dva/router'; import DocumentTitle from 'react-document-title'; import { Icon } from 'antd'; import GlobalFooter from '../components/GlobalFooter'; import styles from './UserLayout.less'; import logo from '../assets/jingangjin.jpeg'; import { getRoutes } from '../utils/utils'; const links = [{ key: 'help', title: '帮助', href: '', }, { key: 'privacy', title: '隐私', href: '', }, { key: 'terms', title: '条款', href: '', }]; const copyright = <div>Copyright <Icon type="copyright" /> 2018 蚂蚁金服体验技术部出品</div>; class UserLayout extends React.PureComponent { getPageTitle() { const { routerData, location } = this.props; const { pathname } = location; let title = '金刚经说什么'; if (routerData[pathname] && routerData[pathname].name) { title = `${routerData[pathname].name} - 金刚经说什么`; } return title; } render() { const { routerData, match } = this.props; return ( <DocumentTitle title={this.getPageTitle()}> <div className={styles.container}> <div className={styles.content}> <div className={styles.top}> <div className={styles.header}> <Link to="/"> <img alt="logo" className={styles.logo} src={logo} /> <span className={styles.title}>金刚经说什么</span> </Link> </div> <div className={styles.desc}>Ant Design 是西湖区最具影响力的 Web 设计规范</div> </div> <Switch> {getRoutes(match.path, routerData).map(item => ( <Route key={item.key} path={item.path} component={item.component} exact={item.exact} /> ) )} <Redirect exact from="/user" to="/user/login" /> </Switch> </div> <GlobalFooter links={links} copyright={copyright} /> </div> </DocumentTitle> ); } } export default UserLayout;
var _ = require('underscore'); var unipackage = require('./unipackage.js'); var release = require('./release.js'); // runLog is primarily used by the parts of the tool which run apps locally. It // writes to standard output (and standard error, if rawLogs is set), and allows // special output forms like "write this line, but let the next line overwrite // it". It also makes its output available to the proxy, to be displayed to web // browsers if the app fails to run. // // It's not the only mechanism used for gathering messages! buildmessage is a // more structured way of gathering messages, but unlike log, it does not print // messages immediately. // // Some other parts of the code (eg commands and warehouse) write directly to // process.std{out,err} or to console.log; we should be careful to not do that // anywhere that may overlap with use of runLog. var getLoggingPackage = _.once(function () { var Log = unipackage.load({ library: release.current.library, packages: ['logging'] }).logging.Log; // Since no other process will be listening to stdout and parsing it, // print directly in the same format as log messages from other apps Log.outputFormat = 'colored-text'; return Log; }); var RunLog = function () { var self = this; self.rawLogs = false; self.messages = []; // list of log objects self.maxLength = 100; // If non-null, the last thing logged was "server restarted" // message, and the value will be the number of consecutive such // messages that have been logged with no other intervening messages self.consecutiveRestartMessages = null; // If non-null, the last thing that was logged was a temporary // message (with a carriage return but no newline), and this is its // length. self.temporaryMessageLength = null; }; _.extend(RunLog.prototype, { _record: function (msg) { var self = this; self.messages.push(msg); if (self.messages.length > self.maxLength) { self.messages.shift(); } }, _clearSpecial: function () { var self = this; if (self.consecutiveRestartMessages) { self.consecutiveRestartMessages = null; process.stdout.write("\n"); } if (self.temporaryMessageLength) { var spaces = new Array(self.temporaryMessageLength + 1).join(' '); process.stdout.write(spaces + '\r'); self.temporaryMessageLength = null; } }, setRawLogs: function (rawLogs) { this.rawLogs = !!rawLogs; }, logAppOutput: function (line, isStderr) { var self = this; var Log = getLoggingPackage(); var obj = (isStderr ? Log.objFromText(line, { level: 'warn', stderr: true }) : Log.parse(line) || Log.objFromText(line)); self._record(obj); self._clearSpecial(); if (self.rawLogs) process[isStderr ? "stderr" : "stdout"].write(line + "\n"); else process.stdout.write(Log.format(obj, { color: true }) + "\n"); // XXX deal with test server logging differently?! }, log: function (msg) { var self = this; var obj = { time: new Date, message: msg // in the future, might want to add something else to // distinguish messages from runner from message from the app, // but for now, nothing would use it, so we'll keep it simple }; self._record(obj); self._clearSpecial(); process.stdout.write(msg + "\n"); }, // Write a message to the terminal that will get overwritten by the // next message logged. (Don't put it in the log that getLog // returns.) // XXX Maybe this should return an object that you have to pass to the // subsequent log call, and only such a log call will overwrite it (and an // intervening log call will cause this to stay on the screen)? // eg, a log call from the updater can interweave with the logTemporary // calls in run-all.js logTemporary: function (msg) { var self = this; self._clearSpecial(); process.stdout.write(msg + "\r"); self.temporaryMessageLength = msg.length; }, logRestart: function () { var self = this; if (self.consecutiveRestartMessages) { // replace old message in place. this assumes that the new restart message // is not shorter than the old one. process.stdout.write("\r"); self.messages.pop(); self.consecutiveRestartMessages ++; } else { self._clearSpecial(); self.consecutiveRestartMessages = 1; } var message = "=> Meteor server restarted"; if (self.consecutiveRestartMessages > 1) message += " (x" + self.consecutiveRestartMessages + ")"; // no newline, so that we can overwrite it if we get another // restart message right after this one process.stdout.write(message); self._record({ time: new Date, message: message }); }, finish: function () { var self = this; self._clearSpecial(); }, clearLog: function () { var self = this; self.messages = []; }, getLog: function () { var self = this; return self.messages; } }); // Create a singleton instance of RunLog. Expose its public methods on the // object you get with require('./run-log.js'). var runLogInstance = new RunLog; _.each( ['log', 'logTemporary', 'logRestart', 'logAppOutput', 'setRawLogs', 'finish', 'clearLog', 'getLog'], function (method) { exports[method] = _.bind(runLogInstance[method], runLogInstance); });
/** * Find intersection of points between two different masks * @memberof Image * @instance * @param {Image} mask2 - a mask (1 bit image) * @return {object} - object containing number of white pixels for mask1, for mask 2 and for them both */ export default function getIntersection(mask2) { let mask1 = this; let closestParent = mask1.getClosestCommonParent(mask2); let startPos1 = mask1.getRelativePosition(closestParent, { defaultFurther: true }); let allRelPos1 = getRelativePositionForAllPixels(mask1, startPos1); let startPos2 = mask2.getRelativePosition(closestParent, { defaultFurther: true }); let allRelPos2 = getRelativePositionForAllPixels(mask2, startPos2); let commonSurface = getCommonSurface(allRelPos1, allRelPos2); let intersection = { whitePixelsMask1: [], whitePixelsMask2: [], commonWhitePixels: [] }; for (let i = 0; i < commonSurface.length; i++) { let currentRelativePos = commonSurface[i]; let realPos1 = [currentRelativePos[0] - startPos1[0], currentRelativePos[1] - startPos1[1]]; let realPos2 = [currentRelativePos[0] - startPos2[0], currentRelativePos[1] - startPos2[1]]; let valueBitMask1 = mask1.getBitXY(realPos1[0], realPos1[1]); let valueBitMask2 = mask2.getBitXY(realPos2[0], realPos2[1]); if (valueBitMask1 === 1 && valueBitMask2 === 1) { intersection.commonWhitePixels.push(currentRelativePos); } } for (let i = 0; i < allRelPos1.length; i++) { let posX; let posY; if (i !== 0) { posX = Math.floor(i / (mask1.width - 1)); posY = i % (mask1.width - 1); } if (mask1.getBitXY(posX, posY) === 1) { intersection.whitePixelsMask1.push(allRelPos1[i]); } } for (let i = 0; i < allRelPos2.length; i++) { let posX = 0; let posY = 0; if (i !== 0) { posX = Math.floor(i / (mask2.width - 1)); posY = i % (mask2.width - 1); } if (mask2.getBitXY(posX, posY) === 1) { intersection.whitePixelsMask2.push(allRelPos2[i]); } } return intersection; } /** * Get relative position array for all pixels in masks * @param {Image} mask - a mask (1 bit image) * @param {Array<number>} startPosition - start position of mask relative to parent * @return {Array} - relative position of all pixels * @private */ function getRelativePositionForAllPixels(mask, startPosition) { let relativePositions = []; for (let i = 0; i < mask.height; i++) { for (let j = 0; j < mask.width; j++) { let originalPos = [i, j]; relativePositions.push([originalPos[0] + startPosition[0], originalPos[1] + startPosition[1]]); } } return relativePositions; } /** * Finds common surface for two arrays containing the positions of the pixels relative to parent image * @param {Array<number>} positionArray1 - positions of pixels relative to parent * @param {Array<number>} positionArray2 - positions of pixels relative to parent * @return {Array<number>} - positions of common pixels for both arrays * @private */ function getCommonSurface(positionArray1, positionArray2) { let i = 0; let j = 0; let commonSurface = []; while (i < positionArray1.length && j < positionArray2.length) { if (positionArray1[i][0] === positionArray2[j][0] && positionArray1[i][1] === positionArray2[j][1]) { commonSurface.push(positionArray1[i]); i++; j++; } else if (positionArray1[i][0] < positionArray2[j][0] || (positionArray1[i][0] === positionArray2[j][0] && positionArray1[i][1] < positionArray2[j][1])) { i++; } else { j++; } } return commonSurface; }
window.indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; window.IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.msIDBTransaction || {READ_WRITE: "readwrite"}; // This line should only be needed if it is needed to support the object's constants for older browsers window.IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange || window.msIDBKeyRange; if (!window.indexedDB) { window.alert("Your browser doesn't support a stable version of IndexedDB. Such and such feature will not be available."); } function assetNotEmpty(obj) { if(obj !== "" && typeof obj !== "undefined" && obj !== null) { return true; }else{ return false; } } let store = null; let db = null; let request = null; function addDataToIndexDB (dbName,dbVersion,storeName,keyPath,indexArry,data) { // open database request = window.indexedDB.open(dbName, dbVersion); request.onupgradeneeded = function(event) { console.log(event.oldVersion); db = request.result; if (db.objectStoreNames.contains(storeName)) { db.deleteObjectStore(storeName); } store = db.createObjectStore(storeName, {keyPath: keyPath}); if(assetNotEmpty(indexArry) && indexArry.length > 0) { for(let i = 0; i < indexArry.length; i++) { store.createIndex(indexArry[i].indexKey, indexArry[i].indexKey,{unique: indexArry[i].unique}); } } for (let i = 0; i < data.length; i++) { store.add(data[i]); } }; request.onerror = function(event) { alert("Database error: " + event.target.error); }; } function getDataFromDB(dbName,dbVersion,storeName) { request = window.indexedDB.open(dbName, dbVersion); request.onsuccess = function(event) { db = request.result; store = db.transaction(storeName).objectStore(storeName).get("00:19:37").onsuccess = function(event) { console.log(event.target.result.name); }; }; } export { addDataToIndexDB, getDataFromDB };
const fs = require('fs') const globby = require('globby') const prettier = require('prettier') const siteMetadata = require('../data/siteMetadata') ;(async () => { const prettierConfig = await prettier.resolveConfig('./.prettierrc.js') const pages = await globby([ 'pages/*.js', 'data/blog/**/*.mdx', 'data/blog/**/*.md', 'public/tags/**/*.xml', '!pages/_*.js', '!pages/api', ]) const sitemap = ` <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> ${pages .map((page) => { const path = page .replace('pages/', '/') .replace('data/blog', '/blog') .replace('public/', '/') .replace('.js', '') .replace('.mdx', '') .replace('.md', '') .replace('/feed.xml', '') const route = path === '/index' ? '' : path if (page === `pages/404.js` || page === `pages/blog/[...slug].js`) { return } return ` <url> <loc>${siteMetadata.siteUrl}${route}</loc> </url> ` }) .join('')} </urlset> ` const formatted = prettier.format(sitemap, { ...prettierConfig, parser: 'html', }) // eslint-disable-next-line no-sync fs.writeFileSync('public/sitemap.xml', formatted) })()
var googleMapsApp = angular.module('googleMapsApp', []);
import routerFactory from "@/utils/router-factory"; import Layout from "@/layout"; const name = ["withdrawRecord", "rechargeRecord", "purchaseRecord"]; const children = routerFactory( name, [ () => import("@/views/finance/withdraw-record/"), () => import("@/views/finance/recharge-record/"), () => import("@/views/finance/purchase-record/") ], name, ["提现记录", "充值记录", "消费记录"] ); export default { path: "/finance", component: Layout, redirect: "/finance", name: "FinanceController", meta: { title: "财务管理", icon: "money", roles: children.map(c => c.meta.roles[0]) }, children };
import React, { useState, useContext, useEffect } from 'react'; import Table from '../Partials/Table'; import TableGenerator from '../Partials/TableGenerator'; import { AppContext } from '../../context/AppContext'; import SeatsSelect from '../Partials/SeatsSelect'; import { Link } from 'react-router-dom'; const OrganizeTables = () => { const context = useContext(AppContext); const [seats, setSeats] = useState([]) const [table, setTable] = useState([]) const [rotate, setRotate] = useState(0) const [tableSize, setTableSize] = useState(0.8) const [saved, setSaved] = useState(false) useEffect(() => { clearLayoutData(); }, []) const seatsNumber = (num) => { let table = []; let position; num === "0" && (table.length = 0); for (let i = 1; i <= num; i++) { ((num === "6" || num === "8") && (i === 1 || i === 2)) ? (position = { left: `15%` }) : (position = {}); num === "8" && (i === 3 || i === 4) && (position = { top: `20%` }) table = [...table, <div key={i} style={position} className={`seat-${i}`}></div>]; } setRotate(0); setSeats(table); context.seats = table; } const collectData = () => { const data = document.querySelectorAll(`.table-basic`); context.tableData && (context.tableData.length = 0); if (context.tableID === 0) { alert(`No tables selected!`) return; } const dataId = Array(context.tableID).fill(0).map((e, i) => i + 1); let collectedData = context.tableID && dataId.map((v,i) => ( { id: v, seats: context.seatsData[i], width: data[v].style.width, height: data[v].style.height, rotated: data[v].style.transform, cordinates: data[v].parentElement.style.transform } )); setSaved(true) context.TableData = collectedData; } const addTable = () => { setTable([...table, <Table key={table.length} rotate={rotate} size={tableSize}/>]) context.tableID = ++table.length; context.seatsData = [...context.seatsData, seats]; } const removeTable = () => { let tableRemoved = table.length ? table.slice(0, -1) : []; context.tableID && (context.tableID = table.length - 1); context.seatsData && context.seatsData.pop(); setTable(tableRemoved); } const rotateTable = () => { let rotateTable = rotate + 45; setRotate(rotateTable); } const clearLayoutData = () => { context.TableData.length = 0; context.seatsData.length = 0; context.seats.length = 0; context.tableID = 0; seatsNumber(0); } const saveAlert = () => { context.TableData.length ? confirm(`Are you sure to keep current layout?`): alert(`No table data saved!`); } return ( <div className="restaurant-organize"> <div className="selection-area"> <div className="generate-table"> <TableGenerator table={addTable} rotate={rotate} size={tableSize}/> <button className="sizeBtn increase" onClick={() => tableSize < 1 && setTableSize(tableSize + 0.1)}>+</button> <button className="sizeBtn decrease" onClick={() => tableSize > 0.6 && setTableSize(tableSize - 0.1)}>-</button> </div> <SeatsSelect seat={seatsNumber} /> <div className="rotateDel"> <button className="deleteBtn" onClick={removeTable}>Undo</button> <button className="rotateBtn" onClick={rotateTable}>Rotate</button> <button className="collectBtn" onClick={collectData}>Save</button> <Link to={saved? '/front': '#'}><button className="toFront" onClick={saveAlert}>Front</button></Link> </div> </div> <div className="restoraunt-area"> {table} </div> </div> ); } export default OrganizeTables;
(function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. define(['expect.js', process.cwd()+'/src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. factory(require('expect.js'), require(process.cwd()+'/src/index')); } else { // Browser globals (root is window) factory(root.expect, root.ApacheFineract); } }(this, function(expect, ApacheFineract) { 'use strict'; var instance; beforeEach(function() { instance = new ApacheFineract.GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse(); }); var getProperty = function(object, getter, property) { // Use getter method if present; otherwise, get the property directly. if (typeof object[getter] === 'function') return object[getter](); else return object[property]; } var setProperty = function(object, setter, property, value) { // Use setter method if present; otherwise, set the property directly. if (typeof object[setter] === 'function') object[setter](value); else object[property] = value; } describe('GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse', function() { it('should create an instance of GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse', function() { // uncomment below and update the code to test GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse //var instane = new ApacheFineract.GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse(); //expect(instance).to.be.a(ApacheFineract.GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id //var instane = new ApacheFineract.GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse(); //expect(instance).to.be(); }); it('should have the property transactionType (base name: "transactionType")', function() { // uncomment below and update the code to test the property transactionType //var instane = new ApacheFineract.GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse(); //expect(instance).to.be(); }); it('should have the property accountId (base name: "accountId")', function() { // uncomment below and update the code to test the property accountId //var instane = new ApacheFineract.GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse(); //expect(instance).to.be(); }); it('should have the property accountNo (base name: "accountNo")', function() { // uncomment below and update the code to test the property accountNo //var instane = new ApacheFineract.GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse(); //expect(instance).to.be(); }); it('should have the property _date (base name: "date")', function() { // uncomment below and update the code to test the property _date //var instane = new ApacheFineract.GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse(); //expect(instance).to.be(); }); it('should have the property currency (base name: "currency")', function() { // uncomment below and update the code to test the property currency //var instane = new ApacheFineract.GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse(); //expect(instance).to.be(); }); it('should have the property paymentDetailData (base name: "paymentDetailData")', function() { // uncomment below and update the code to test the property paymentDetailData //var instane = new ApacheFineract.GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse(); //expect(instance).to.be(); }); it('should have the property amount (base name: "amount")', function() { // uncomment below and update the code to test the property amount //var instane = new ApacheFineract.GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse(); //expect(instance).to.be(); }); it('should have the property runningBalance (base name: "runningBalance")', function() { // uncomment below and update the code to test the property runningBalance //var instane = new ApacheFineract.GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse(); //expect(instance).to.be(); }); it('should have the property reversed (base name: "reversed")', function() { // uncomment below and update the code to test the property reversed //var instane = new ApacheFineract.GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse(); //expect(instance).to.be(); }); }); }));
/* * @author David Menger */ 'use strict'; const resolvers = require('./resolvers'); const PREFIX = 'botbuild'; function factoryResourceMap () { const map = new Map(); Object.keys(resolvers) .forEach((name) => { map.set(`${PREFIX}.${name}`, resolvers[name]); }); // backwards compatibility map.set(`${PREFIX}.customCode`, resolvers.plugin); map.set(`${PREFIX}.inlineCode`, resolvers.plugin); return map; } module.exports = factoryResourceMap;
angular.module('listCtrl', ['listService']) .controller('listCtrl', function(List) { self = this; // Grab all the items from List Service List.all() .then(function(data){ self.listItems = data.data; },function(data){ console.log("Error occurred! " + data); }); });
/* Turns CommonJS package into a browser file and minifies. uses node-jake http://github.com/mde/node-jake run with 'jake [build|minify|clean]' */ var fs = require("fs"), path = require("path"), util = require('util') build = require("./build"); var pkg = JSON.parse(fs.readFileSync("package.json")); var prefix = pkg.name + "-" + pkg.version; task('build', [], function (dest) { util.puts("building..."); dest = dest || prefix + ".js"; build.build(dest); util.puts("> " + dest); }); task('minify', [], function (file, dest) { file = file || prefix + ".js"; dest = dest || prefix + ".min.js"; var minified = minify(fs.readFileSync(file, "utf-8")); fs.writeFileSync(dest, minified, "utf-8"); util.puts("> " + dest) }); task('clean', [], function () { fs.unlink(prefix + ".js"); fs.unlink(prefix + ".min.js"); }); function minify(code) { var uglifyjs = require("uglify-js"), parser = uglifyjs.parser, uglify = uglifyjs.uglify; var ast = parser.parse(code); ast = uglify.ast_mangle(ast); ast = uglify.ast_squeeze(ast); return uglify.gen_code(ast); }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ define(["require", "exports"], function (require, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.conf = { // the default separators except `$-` wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, comments: { lineComment: '#', blockComment: ['<#', '#>'], }, brackets: [ ['{', '}'], ['[', ']'], ['(', ')'] ], autoClosingPairs: [ { open: '{', close: '}' }, { open: '[', close: ']' }, { open: '(', close: ')' }, { open: '"', close: '"', notIn: ['string'] }, { open: '\'', close: '\'', notIn: ['string', 'comment'] }, ], surroundingPairs: [ { open: '{', close: '}' }, { open: '[', close: ']' }, { open: '(', close: ')' }, { open: '"', close: '"' }, { open: '\'', close: '\'' }, ], folding: { markers: { start: new RegExp("^\\s*#region\\b"), end: new RegExp("^\\s*#endregion\\b") } } }; exports.language = { defaultToken: '', ignoreCase: true, tokenPostfix: '.ps1', brackets: [ { token: 'delimiter.curly', open: '{', close: '}' }, { token: 'delimiter.square', open: '[', close: ']' }, { token: 'delimiter.parenthesis', open: '(', close: ')' } ], keywords: [ 'begin', 'break', 'catch', 'class', 'continue', 'data', 'define', 'do', 'dynamicparam', 'else', 'elseif', 'end', 'exit', 'filter', 'finally', 'for', 'foreach', 'from', 'function', 'if', 'in', 'param', 'process', 'return', 'switch', 'throw', 'trap', 'try', 'until', 'using', 'var', 'while', 'workflow', 'parallel', 'sequence', 'inlinescript', 'configuration' ], helpKeywords: /SYNOPSIS|DESCRIPTION|PARAMETER|EXAMPLE|INPUTS|OUTPUTS|NOTES|LINK|COMPONENT|ROLE|FUNCTIONALITY|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP/, // we include these common regular expressions symbols: /[=><!~?&%|+\-*\/\^;\.,]+/, escapes: /`(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/, // The main tokenizer for our languages tokenizer: { root: [ // commands and keywords [/[a-zA-Z_][\w-]*/, { cases: { '@keywords': { token: 'keyword.$0' }, '@default': '' } }], // whitespace [/[ \t\r\n]+/, ''], // labels [/^:\w*/, 'metatag'], // variables [/\$(\{((global|local|private|script|using):)?[\w]+\}|((global|local|private|script|using):)?[\w]+)/, 'variable'], // Comments [/<#/, 'comment', '@comment'], [/#.*$/, 'comment'], // delimiters [/[{}()\[\]]/, '@brackets'], [/@symbols/, 'delimiter'], // numbers [/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'], [/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/, 'number.hex'], [/\d+?/, 'number'], // delimiter: after number because of .\d floats [/[;,.]/, 'delimiter'], // strings: [/\@"/, 'string', '@herestring."'], [/\@'/, 'string', '@herestring.\''], [/"/, { cases: { '@eos': 'string', '@default': { token: 'string', next: '@string."' } } }], [/'/, { cases: { '@eos': 'string', '@default': { token: 'string', next: '@string.\'' } } }], ], string: [ [/[^"'\$`]+/, { cases: { '@eos': { token: 'string', next: '@popall' }, '@default': 'string' } }], [/@escapes/, { cases: { '@eos': { token: 'string.escape', next: '@popall' }, '@default': 'string.escape' } }], [/`./, { cases: { '@eos': { token: 'string.escape.invalid', next: '@popall' }, '@default': 'string.escape.invalid' } }], [/\$[\w]+$/, { cases: { '$S2=="': { token: 'variable', next: '@popall' }, '@default': { token: 'string', next: '@popall' } } }], [/\$[\w]+/, { cases: { '$S2=="': 'variable', '@default': 'string' } }], [/["']/, { cases: { '$#==$S2': { token: 'string', next: '@pop' }, '@default': { cases: { '@eos': { token: 'string', next: '@popall' }, '@default': 'string' } } } }], ], herestring: [ [/^\s*(["'])@/, { cases: { '$1==$S2': { token: 'string', next: '@pop' }, '@default': 'string' } }], [/[^\$`]+/, 'string'], [/@escapes/, 'string.escape'], [/`./, 'string.escape.invalid'], [/\$[\w]+/, { cases: { '$S2=="': 'variable', '@default': 'string' } }], ], comment: [ [/[^#\.]+/, 'comment'], [/#>/, 'comment', '@pop'], [/(\.)(@helpKeywords)(?!\w)/, { token: 'comment.keyword.$2' }], [/[\.#]/, 'comment'] ], }, }; });
(function process( /*RESTAPIRequest*/ request, /*RESTAPIResponse*/ response) { return "Hello, world!"; })(request, response);
import { getLanguage, getLanguageDependencies } from "./language-detector"; describe("Can detect language", () => { test("javascript", () => { expect(getLanguage("my-file.js")).toBe("js"); }); test("jsx", () => { expect(getLanguage("my-file.jsx")).toBe("jsx"); }); test("typescript", () => { expect(getLanguage("my-file.ts")).toBe("typescript"); }); test("tsx", () => { expect(getLanguage("my-file.tsx")).toBe("tsx"); }); describe("json:", () => { test("json", () => { expect(getLanguage("my-file.json")).toBe("json"); }); test("babelrc", () => { expect(getLanguage("my-file.babelrc")).toBe("json"); }); }); describe("markup", () => { test("html", () => { expect(getLanguage("my-file.html")).toBe("markup"); }); test("htm", () => { expect(getLanguage("my-file.htm")).toBe("markup"); }); test("svg", () => { expect(getLanguage("my-file.svg")).toBe("markup"); }); test("xml", () => { expect(getLanguage("my-file.xml")).toBe("markup"); }); }); describe("yaml", () => { test("yaml", () => { expect(getLanguage("my-file.yaml")).toBe("yaml"); }); test("yml", () => { expect(getLanguage("my-file.yml")).toBe("yaml"); }); }); test("bash", () => { expect(getLanguage("my-file.sh")).toBe("bash"); }); test("pyhton", () => { expect(getLanguage("my-file.py")).toBe("python"); }); test("dart", () => { expect(getLanguage("my-file.dart")).toBe("dart"); }); describe("perl", () => { test("pl", () => { expect(getLanguage("my-file.pl")).toBe("perl"); }); test("pm", () => { expect(getLanguage("my-file.pm")).toBe("perl"); }); }); test("assembly", () => { expect(getLanguage("my-file.asm")).toBe("assembly"); }); test("groovy", () => { expect(getLanguage("my-file.groovy")).toBe("groovy"); }); test("sql", () => { expect(getLanguage("my-file.sql")).toBe("sql"); }); test("css", () => { expect(getLanguage("my-file.css")).toBe("css"); }); test("less", () => { expect(getLanguage("my-file.less")).toBe("less"); }); test("scss", () => { expect(getLanguage("my-file.scss")).toBe("scss"); }); describe("ini", () => { test("ini", () => { expect(getLanguage("my-file.ini")).toBe("ini"); }); test("editorconfig", () => { expect(getLanguage("my-file.editorconfig")).toBe("ini"); }); }); test("bat", () => { expect(getLanguage("my-file.bat")).toBe("batch"); }); test("clojure", () => { expect(getLanguage("my-file.clj")).toBe("clojure"); }); test("coffeescript", () => { expect(getLanguage("my-file.coffee")).toBe("coffeescript"); }); test("clojure", () => { expect(getLanguage("my-file.clj")).toBe("clojure"); }); describe("cpp", () => { test("cpp", () => { expect(getLanguage("my-file.cpp")).toBe("cpp"); }); test("cc", () => { expect(getLanguage("my-file.cc")).toBe("cpp"); }); }); test("csharp", () => { expect(getLanguage("my-file.cs")).toBe("csharp"); }); test("csp", () => { expect(getLanguage("my-file.csp")).toBe("csp"); }); test("diff", () => { expect(getLanguage("my-file.diff")).toBe("diff"); }); describe("docker", () => { test("long dockerfile", () => { expect(getLanguage("my-file.dockerfile")).toBe("docker"); }); test("dockerfile", () => { expect(getLanguage("Dockerfile")).toBe("docker"); }); }); test("fsharp", () => { expect(getLanguage("my-file.fsharp")).toBe("fsharp"); }); test("go", () => { expect(getLanguage("my-file.go")).toBe("go"); }); test("haskell", () => { expect(getLanguage("my-file.hs")).toBe("haskell"); }); test("java", () => { expect(getLanguage("my-file.java")).toBe("java"); }); test("kotlin", () => { expect(getLanguage("my-file.kt")).toBe("kotlin"); }); test("lua", () => { expect(getLanguage("my-file.lua")).toBe("lua"); }); test("markdown", () => { expect(getLanguage("my-file.md")).toBe("markdown"); }); test("msdax", () => { expect(getLanguage("my-file.msdax")).toBe("msdax"); }); test("sql", () => { expect(getLanguage("my-file.mysql")).toBe("sql"); }); test("objective-c", () => { expect(getLanguage("my-file.objc")).toBe("objective-c"); }); test("pgsql", () => { expect(getLanguage("my-file.pgsql")).toBe("pgsql"); }); test("php", () => { expect(getLanguage("my-file.php")).toBe("php"); }); test("postiats", () => { expect(getLanguage("my-file.postiats")).toBe("postiats"); }); test("powershell", () => { expect(getLanguage("my-file.ps")).toBe("powershell"); }); test("pug", () => { expect(getLanguage("my-file.pug")).toBe("pug"); }); test("r", () => { expect(getLanguage("my-file.r")).toBe("r"); }); test("razor", () => { expect(getLanguage("my-file.razor")).toBe("razor"); }); test("reason", () => { expect(getLanguage("my-file.re")).toBe("reason"); }); test("ruby", () => { expect(getLanguage("my-file.rb")).toBe("ruby"); }); test("rust", () => { expect(getLanguage("my-file.rs")).toBe("rust"); }); test("small basic", () => { expect(getLanguage("my-file.smallbasic")).toBe("small basic"); }); test("scala", () => { expect(getLanguage("my-file.scala")).toBe("scala"); }); test("scheme", () => { expect(getLanguage("my-file.scheme")).toBe("scheme"); }); test("solidity", () => { expect(getLanguage("my-file.solidity")).toBe("solidity"); }); test("swift", () => { expect(getLanguage("my-file.swift")).toBe("swift"); }); test("vb", () => { expect(getLanguage("my-file.vb")).toBe("vb"); }); test("wasm", () => { expect(getLanguage("my-file.wasm")).toBe("wasm"); }); }); describe("Fallback scenarios", () => { test("Random file extension", () => { expect(getLanguage("my-file.nonsense")).toBe("js"); }); test("No file extension", () => { expect(getLanguage("my-file")).toBe("js"); }); test("Empty string", () => { expect(getLanguage("")).toBe("js"); }); }); describe("Dependencies", () => { test("tsx", () => { expect(getLanguageDependencies("tsx")).toEqual(["jsx"]); }); test("cpp", () => { expect(getLanguageDependencies("cpp")).toEqual(["c"]); }); });
import React, { Component } from 'react'; import MyDocs from './documents/MyDocs.js'; import SharedDocs from './documents/SharedDocs.js'; import axios from 'axios'; class DocList extends Component { constructor(props) { super(props); this.state = { my_docs: [], shared_docs: [] }; } componentDidMount() { // to do: if no cookie at all, then don't even bother making api call axios.get('/api/getdocuments') .then(res => { this.setState({ my_docs: res.data.owned, shared_docs: res.data.permitted }); }).catch(err => { // not logged in with correct cookie console.log(err); this.props.history.push('/'); }); } render() { return ( <div> <MyDocs myDocs={this.state.my_docs} /> <SharedDocs sharedDocs={this.state.shared_docs} /> </div> ); } } export default DocList;
const InstrumentationEventEmitter = require('../../instrumentation/emitter') const createProducer = require('../../producer') const createConsumer = require('../index') const { secureRandom, createCluster, createTopic, createModPartitioner, newLogger, waitFor, waitForConsumerToJoinGroup, testIfKafkaAtLeast_0_11, } = require('testHelpers') describe('Consumer > Instrumentation Events', () => { let topicName, groupId, cluster, producer, consumer, consumer2, message, emitter const createTestConsumer = (opts = {}) => createConsumer({ cluster, groupId, logger: newLogger(), heartbeatInterval: 100, maxWaitTimeInMs: 500, maxBytesPerPartition: 180, rebalanceTimeout: 1000, instrumentationEmitter: emitter, ...opts, }) beforeEach(async () => { topicName = `test-topic-${secureRandom()}` groupId = `consumer-group-id-${secureRandom()}` await createTopic({ topic: topicName }) emitter = new InstrumentationEventEmitter() cluster = createCluster({ instrumentationEmitter: emitter, metadataMaxAge: 50 }) producer = createProducer({ cluster, createPartitioner: createModPartitioner, logger: newLogger(), }) message = { key: `key-${secureRandom()}`, value: `value-${secureRandom()}` } }) afterEach(async () => { consumer && (await consumer.disconnect()) consumer2 && (await consumer2.disconnect()) producer && (await producer.disconnect()) }) test('on throws an error when provided with an invalid event name', () => { consumer = createTestConsumer() expect(() => consumer.on('NON_EXISTENT_EVENT', () => {})).toThrow( /Event name should be one of consumer.events./ ) }) it('emits heartbeat', async () => { const onHeartbeat = jest.fn() let heartbeats = 0 consumer = createTestConsumer({ heartbeatInterval: 0 }) consumer.on(consumer.events.HEARTBEAT, async event => { onHeartbeat(event) heartbeats++ }) await consumer.connect() await producer.connect() await consumer.subscribe({ topic: topicName, fromBeginning: true }) await consumer.run({ eachMessage: () => true }) await producer.send({ acks: 1, topic: topicName, messages: [message] }) await waitFor(() => heartbeats > 0) expect(onHeartbeat).toHaveBeenCalledWith({ id: expect.any(Number), timestamp: expect.any(Number), type: 'consumer.heartbeat', payload: { groupId, memberId: expect.any(String), groupGenerationId: expect.any(Number), }, }) }) it('emits commit offsets', async () => { const onCommitOffsets = jest.fn() let commitOffsets = 0 consumer = createTestConsumer() consumer.on(consumer.events.COMMIT_OFFSETS, async event => { onCommitOffsets(event) commitOffsets++ }) await consumer.connect() await producer.connect() await consumer.subscribe({ topic: topicName, fromBeginning: true }) await consumer.run({ eachMessage: () => true }) await producer.send({ acks: 1, topic: topicName, messages: [message] }) await waitFor(() => commitOffsets > 0) expect(onCommitOffsets).toHaveBeenCalledWith({ id: expect.any(Number), timestamp: expect.any(Number), type: 'consumer.commit_offsets', payload: { groupId, memberId: expect.any(String), groupGenerationId: expect.any(Number), topics: [ { topic: topicName, partitions: [ { offset: '1', partition: '0', }, ], }, ], }, }) }) it('emits group join', async () => { const onGroupJoin = jest.fn() let groupJoin = 0 consumer = createTestConsumer() consumer.on(consumer.events.GROUP_JOIN, async event => { onGroupJoin(event) groupJoin++ }) await consumer.connect() await consumer.subscribe({ topic: topicName, fromBeginning: true }) await consumer.run({ eachMessage: () => true }) await waitFor(() => groupJoin > 0) expect(onGroupJoin).toHaveBeenCalledWith({ id: expect.any(Number), timestamp: expect.any(Number), type: 'consumer.group_join', payload: { duration: expect.any(Number), groupId: expect.any(String), isLeader: true, leaderId: expect.any(String), groupProtocol: expect.any(String), memberId: expect.any(String), memberAssignment: { [topicName]: [0] }, }, }) }) it('emits fetch', async () => { const onFetch = jest.fn() let fetch = 0 consumer = createTestConsumer() consumer.on(consumer.events.FETCH, async event => { onFetch(event) fetch++ }) await consumer.connect() await consumer.subscribe({ topic: topicName, fromBeginning: true }) await consumer.run({ eachMessage: () => true }) await waitFor(() => fetch > 0) expect(onFetch).toHaveBeenCalledWith({ id: expect.any(Number), timestamp: expect.any(Number), type: 'consumer.fetch', payload: { numberOfBatches: expect.any(Number), duration: expect.any(Number), }, }) }) it('emits fetch start', async () => { const onFetchStart = jest.fn() let fetch = 0 consumer = createTestConsumer() consumer.on(consumer.events.FETCH_START, async event => { onFetchStart(event) fetch++ }) await consumer.connect() await consumer.subscribe({ topic: topicName, fromBeginning: true }) await consumer.run({ eachMessage: () => true }) await waitFor(() => fetch > 0) expect(onFetchStart).toHaveBeenCalledWith({ id: expect.any(Number), timestamp: expect.any(Number), type: 'consumer.fetch_start', payload: {}, }) }) it('emits start batch process', async () => { const onStartBatchProcess = jest.fn() let startBatchProcess = 0 consumer = createTestConsumer() consumer.on(consumer.events.START_BATCH_PROCESS, async event => { onStartBatchProcess(event) startBatchProcess++ }) await consumer.connect() await producer.connect() await consumer.subscribe({ topic: topicName, fromBeginning: true }) await consumer.run({ eachMessage: () => true }) await producer.send({ acks: 1, topic: topicName, messages: [message] }) await waitFor(() => startBatchProcess > 0) expect(onStartBatchProcess).toHaveBeenCalledWith({ id: expect.any(Number), timestamp: expect.any(Number), type: 'consumer.start_batch_process', payload: { topic: topicName, partition: 0, highWatermark: expect.any(String), offsetLag: expect.any(String), offsetLagLow: expect.any(String), batchSize: 1, firstOffset: expect.any(String), lastOffset: expect.any(String), }, }) }) it('emits end batch process', async () => { const onEndBatchProcess = jest.fn() let endBatchProcess = 0 consumer = createTestConsumer() consumer.on(consumer.events.END_BATCH_PROCESS, async event => { onEndBatchProcess(event) endBatchProcess++ }) await consumer.connect() await producer.connect() await consumer.subscribe({ topic: topicName, fromBeginning: true }) await consumer.run({ eachMessage: () => true }) await producer.send({ acks: 1, topic: topicName, messages: [message] }) await waitFor(() => endBatchProcess > 0) expect(onEndBatchProcess).toHaveBeenCalledWith({ id: expect.any(Number), timestamp: expect.any(Number), type: 'consumer.end_batch_process', payload: { topic: topicName, partition: 0, highWatermark: expect.any(String), offsetLag: expect.any(String), offsetLagLow: expect.any(String), batchSize: 1, firstOffset: expect.any(String), lastOffset: expect.any(String), duration: expect.any(Number), }, }) }) testIfKafkaAtLeast_0_11( 'emits start and end batch process when reading empty control batches', async () => { const startBatchProcessSpy = jest.fn() const endBatchProcessSpy = jest.fn() consumer = createTestConsumer() consumer.on(consumer.events.START_BATCH_PROCESS, startBatchProcessSpy) consumer.on(consumer.events.END_BATCH_PROCESS, endBatchProcessSpy) await consumer.connect() await consumer.subscribe({ topic: topicName, fromBeginning: true }) await consumer.run({ eachMessage: async () => {} }) producer = createProducer({ cluster, createPartitioner: createModPartitioner, logger: newLogger(), transactionalId: `test-producer-${secureRandom()}`, maxInFlightRequests: 1, idempotent: true, }) await producer.connect() const transaction = await producer.transaction() await transaction.send({ topic: topicName, acks: -1, messages: [ { key: 'test', value: 'test', }, ], }) await transaction.abort() await waitFor( () => startBatchProcessSpy.mock.calls.length > 0 && endBatchProcessSpy.mock.calls.length > 0 ) expect(startBatchProcessSpy).toHaveBeenCalledWith({ id: expect.any(Number), timestamp: expect.any(Number), type: 'consumer.start_batch_process', payload: { topic: topicName, partition: 0, highWatermark: '2', offsetLag: expect.any(String), offsetLagLow: expect.any(String), batchSize: 0, firstOffset: '0', lastOffset: '1', }, }) expect(startBatchProcessSpy).toHaveBeenCalledTimes(1) expect(endBatchProcessSpy).toHaveBeenCalledWith({ id: expect.any(Number), timestamp: expect.any(Number), type: 'consumer.end_batch_process', payload: { topic: topicName, partition: 0, highWatermark: '2', offsetLag: expect.any(String), offsetLagLow: expect.any(String), batchSize: 0, firstOffset: '0', lastOffset: '1', duration: expect.any(Number), }, }) expect(endBatchProcessSpy).toHaveBeenCalledTimes(1) } ) it('emits connection events', async () => { const connectListener = jest.fn().mockName('connect') const disconnectListener = jest.fn().mockName('disconnect') const stopListener = jest.fn().mockName('stop') consumer = createTestConsumer() consumer.on(consumer.events.CONNECT, connectListener) consumer.on(consumer.events.DISCONNECT, disconnectListener) consumer.on(consumer.events.STOP, stopListener) await consumer.connect() expect(connectListener).toHaveBeenCalled() await consumer.run() await consumer.disconnect() expect(stopListener).toHaveBeenCalled() expect(disconnectListener).toHaveBeenCalled() }) it('emits crash events', async () => { const crashListener = jest.fn() const error = new Error('💣') const eachMessage = jest.fn().mockImplementationOnce(() => { throw error }) consumer = createTestConsumer({ retry: { retries: 0 } }) consumer.on(consumer.events.CRASH, crashListener) await consumer.connect() await consumer.subscribe({ topic: topicName, fromBeginning: true }) await consumer.run({ eachMessage }) await producer.connect() await producer.send({ acks: 1, topic: topicName, messages: [message] }) await waitFor(() => crashListener.mock.calls.length > 0) expect(crashListener).toHaveBeenCalledWith({ id: expect.any(Number), timestamp: expect.any(Number), type: 'consumer.crash', payload: { error, groupId, restart: true }, }) }) it('emits crash events with restart=false', async () => { const crashListener = jest.fn() const error = new Error('💣💥') const eachMessage = jest.fn().mockImplementationOnce(() => { throw error }) consumer = createTestConsumer({ retry: { retries: 0, restartOnFailure: async () => false } }) consumer.on(consumer.events.CRASH, crashListener) await consumer.connect() await consumer.subscribe({ topic: topicName, fromBeginning: true }) await consumer.run({ eachMessage }) await producer.connect() await producer.send({ acks: 1, topic: topicName, messages: [message] }) await waitFor(() => crashListener.mock.calls.length > 0) expect(crashListener).toHaveBeenCalledWith({ id: expect.any(Number), timestamp: expect.any(Number), type: 'consumer.crash', payload: { error, groupId, restart: false }, }) }) it('emits rebalancing', async () => { const onRebalancing = jest.fn() const groupId = `consumer-group-id-${secureRandom()}` consumer = createTestConsumer({ groupId, cluster: createCluster({ instrumentationEmitter: new InstrumentationEventEmitter(), metadataMaxAge: 50, }), }) consumer2 = createTestConsumer({ groupId, cluster: createCluster({ instrumentationEmitter: new InstrumentationEventEmitter(), metadataMaxAge: 50, }), }) let memberId consumer.on(consumer.events.GROUP_JOIN, async event => { memberId = memberId || event.payload.memberId }) consumer.on(consumer.events.REBALANCING, async event => { onRebalancing(event) }) await consumer.connect() await consumer.subscribe({ topic: topicName, fromBeginning: true }) consumer.run({ eachMessage: () => true }) await waitForConsumerToJoinGroup(consumer, { label: 'consumer1' }) await consumer2.connect() await consumer2.subscribe({ topic: topicName, fromBeginning: true }) consumer2.run({ eachMessage: () => true }) await waitForConsumerToJoinGroup(consumer2, { label: 'consumer2' }) expect(onRebalancing).toBeCalledWith({ id: expect.any(Number), timestamp: expect.any(Number), type: 'consumer.rebalancing', payload: { groupId: groupId, memberId: memberId, }, }) }) it('emits request events', async () => { const requestListener = jest.fn().mockName('request') consumer = createTestConsumer() consumer.on(consumer.events.REQUEST, requestListener) await consumer.connect() expect(requestListener).toHaveBeenCalledWith({ id: expect.any(Number), timestamp: expect.any(Number), type: 'consumer.network.request', payload: { apiKey: 18, apiName: 'ApiVersions', apiVersion: expect.any(Number), broker: expect.any(String), clientId: expect.any(String), correlationId: expect.any(Number), createdAt: expect.any(Number), duration: expect.any(Number), pendingDuration: expect.any(Number), sentAt: expect.any(Number), size: expect.any(Number), }, }) }) it('emits request timeout events', async () => { cluster = createCluster({ instrumentationEmitter: emitter, requestTimeout: 1, enforceRequestTimeout: true, }) const requestListener = jest.fn().mockName('request_timeout') consumer = createTestConsumer({ cluster }) consumer.on(consumer.events.REQUEST_TIMEOUT, requestListener) await consumer .connect() .then(() => consumer.run({ eachMessage: () => true })) .catch(e => e) expect(requestListener).toHaveBeenCalledWith({ id: expect.any(Number), timestamp: expect.any(Number), type: 'consumer.network.request_timeout', payload: { apiKey: expect.any(Number), apiName: expect.any(String), apiVersion: expect.any(Number), broker: expect.any(String), clientId: expect.any(String), correlationId: expect.any(Number), createdAt: expect.any(Number), pendingDuration: expect.any(Number), sentAt: expect.any(Number), }, }) }) /** * This test is too flaky, we need to think about a better way of testing this. * Skipping until we have a better plan */ it.skip('emits request queue size events', async () => { const cluster = createCluster({ instrumentationEmitter: emitter, maxInFlightRequests: 1, }) const requestListener = jest.fn().mockName('request_queue_size') consumer = createTestConsumer({ cluster }) consumer.on(consumer.events.REQUEST_QUEUE_SIZE, requestListener) consumer2 = createTestConsumer({ cluster }) consumer2.on(consumer2.events.REQUEST_QUEUE_SIZE, requestListener) await Promise.all([ consumer .connect() .then(() => consumer.run({ eachMessage: () => true })) .catch(e => e), consumer2 .connect() .then(() => consumer.run({ eachMessage: () => true })) .catch(e => e), ]) // add more concurrent requests to make we increate the requests // on the queue await Promise.all([ consumer.describeGroup(), consumer.describeGroup(), consumer.describeGroup(), consumer.describeGroup(), consumer2.describeGroup(), consumer2.describeGroup(), consumer2.describeGroup(), consumer2.describeGroup(), ]) await consumer2.disconnect() expect(requestListener).toHaveBeenCalledWith({ id: expect.any(Number), timestamp: expect.any(Number), type: 'consumer.network.request_queue_size', payload: { broker: expect.any(String), clientId: expect.any(String), queueSize: expect.any(Number), }, }) }) it('emits received unsubscribed topics events', async () => { const topicNames = [`test-topic-${secureRandom()}`, `test-topic-${secureRandom()}`] const otherTopic = `test-topic-${secureRandom()}` const groupId = `consumer-group-id-${secureRandom()}` for (const topicName of [...topicNames, otherTopic]) { await createTopic({ topic: topicName, partitions: 2 }) } // First consumer subscribes to topicNames consumer = createTestConsumer({ groupId, cluster: createCluster({ instrumentationEmitter: new InstrumentationEventEmitter(), metadataMaxAge: 50, }), }) await consumer.connect() await Promise.all( topicNames.map(topicName => consumer.subscribe({ topic: topicName, fromBeginning: true })) ) consumer.run({ eachMessage: () => {} }) await waitForConsumerToJoinGroup(consumer, { label: 'consumer1' }) // Second consumer re-uses group id but only subscribes to one of the topics consumer2 = createTestConsumer({ groupId, cluster: createCluster({ instrumentationEmitter: new InstrumentationEventEmitter(), metadataMaxAge: 50, }), }) const onReceivedUnsubscribedTopics = jest.fn() let receivedUnsubscribedTopics = 0 consumer2.on(consumer.events.RECEIVED_UNSUBSCRIBED_TOPICS, async event => { onReceivedUnsubscribedTopics(event) receivedUnsubscribedTopics++ }) await consumer2.connect() await Promise.all( [topicNames[1], otherTopic].map(topicName => consumer2.subscribe({ topic: topicName, fromBeginning: true }) ) ) consumer2.run({ eachMessage: () => {} }) await waitForConsumerToJoinGroup(consumer2, { label: 'consumer2' }) // Wait for rebalance to finish await waitFor(async () => { const { state, members } = await consumer.describeGroup() return state === 'Stable' && members.length === 2 }) await waitFor(() => receivedUnsubscribedTopics > 0) expect(onReceivedUnsubscribedTopics).toHaveBeenCalledWith({ id: expect.any(Number), timestamp: expect.any(Number), type: 'consumer.received_unsubscribed_topics', payload: { groupId, generationId: expect.any(Number), memberId: expect.any(String), assignedTopics: topicNames, topicsSubscribed: [topicNames[1], otherTopic], topicsNotSubscribed: [topicNames[0]], }, }) }) })
const Router = require('koa-router'); const router = new Router(); // index router.get('/', require('./routes/index')); // test router.get('/test/:id', require('./routes/test')); // RSSHub router.get('/rsshub/rss', require('./routes/rsshub/rss')); // bilibili router.get('/bilibili/user/video/:uid', require('./routes/bilibili/video')); router.get('/bilibili/user/article/:uid', require('./routes/bilibili/article')); router.get('/bilibili/user/fav/:uid', require('./routes/bilibili/userFav')); router.get('/bilibili/user/coin/:uid', require('./routes/bilibili/coin')); router.get('/bilibili/user/dynamic/:uid', require('./routes/bilibili/dynamic')); router.get('/bilibili/user/followers/:uid', require('./routes/bilibili/followers')); router.get('/bilibili/user/followings/:uid', require('./routes/bilibili/followings')); router.get('/bilibili/user/bangumi/:uid', require('./routes/bilibili/user_bangumi')); router.get('/bilibili/partion/:tid', require('./routes/bilibili/partion')); router.get('/bilibili/partion/ranking/:tid/:days?', require('./routes/bilibili/partion-ranking')); router.get('/bilibili/bangumi/:seasonid', require('./routes/bilibili/bangumi')); // 弃用 router.get('/bilibili/bangumi/media/:mediaid', require('./routes/bilibili/bangumi')); router.get('/bilibili/video/page/:aid', require('./routes/bilibili/page')); router.get('/bilibili/video/reply/:aid', require('./routes/bilibili/reply')); router.get('/bilibili/video/danmaku/:aid/:pid?', require('./routes/bilibili/danmaku')); router.get('/bilibili/link/news/:product', require('./routes/bilibili/linkNews')); router.get('/bilibili/live/room/:roomID', require('./routes/bilibili/liveRoom')); router.get('/bilibili/live/search/:key/:order', require('./routes/bilibili/liveSearch')); router.get('/bilibili/live/area/:areaID/:order', require('./routes/bilibili/liveArea')); router.get('/bilibili/fav/:uid/:fid', require('./routes/bilibili/fav')); router.get('/bilibili/blackboard', require('./routes/bilibili/blackboard')); router.get('/bilibili/mall/new', require('./routes/bilibili/mallNew')); router.get('/bilibili/mall/ip/:id', require('./routes/bilibili/mallIP')); router.get('/bilibili/ranking/:rid?/:day?/:arc_type?', require('./routes/bilibili/ranking')); router.get('/bilibili/user/channel/:uid/:cid', require('./routes/bilibili/userChannel')); router.get('/bilibili/topic/:topic', require('./routes/bilibili/topic')); router.get('/bilibili/audio/:id', require('./routes/bilibili/audio')); router.get('/bilibili/vsearch/:kw/:order?', require('./routes/bilibili/vsearch')); router.get('/bilibili/followings/video/:uid', require('./routes/bilibili/followings_video')); router.get('/bilibili/followings/article/:uid', require('./routes/bilibili/followings_article')); // bangumi router.get('/bangumi/calendar/today', require('./routes/bangumi/calendar/today')); router.get('/bangumi/subject/:id/:type', require('./routes/bangumi/subject')); router.get('/bangumi/person/:id', require('./routes/bangumi/person')); router.get('/bangumi/topic/:id', require('./routes/bangumi/group/reply')); router.get('/bangumi/group/:id', require('./routes/bangumi/group/topic')); router.get('/bangumi/subject/:id', require('./routes/bangumi/subject')); // 微博 router.get('/weibo/user/:uid/:displayVideo?', require('./routes/weibo/user')); router.get('/weibo/keyword/:keyword', require('./routes/weibo/keyword')); router.get('/weibo/search/hot', require('./routes/weibo/search/hot')); router.get('/weibo/super_index/:id', require('./routes/weibo/super_index')); // 贴吧 router.get('/tieba/forum/:kw', require('./routes/tieba/forum')); router.get('/tieba/forum/good/:kw/:cid?', require('./routes/tieba/forum')); router.get('/tieba/post/:id', require('./routes/tieba/post')); router.get('/tieba/post/lz/:id', require('./routes/tieba/post')); // 网易云音乐 router.get('/ncm/playlist/:id', require('./routes/ncm/playlist')); router.get('/ncm/user/playlist/:uid', require('./routes/ncm/userplaylist')); router.get('/ncm/artist/:id', require('./routes/ncm/artist')); router.get('/ncm/djradio/:id', require('./routes/ncm/djradio')); // 掘金 router.get('/juejin/category/:category', require('./routes/juejin/category')); router.get('/juejin/tag/:tag', require('./routes/juejin/tag')); router.get('/juejin/trending/:category/:type', require('./routes/juejin/trending')); router.get('/juejin/books', require('./routes/juejin/books')); router.get('/juejin/pins', require('./routes/juejin/pins')); router.get('/juejin/posts/:id', require('./routes/juejin/posts')); router.get('/juejin/collections/:userId', require('./routes/juejin/favorites')); router.get('/juejin/collection/:collectionId', require('./routes/juejin/collection')); router.get('/juejin/shares/:userId', require('./routes/juejin/shares')); // 自如 router.get('/ziroom/room/:city/:iswhole/:room/:keyword', require('./routes/ziroom/room')); // 简书 router.get('/jianshu/home', require('./routes/jianshu/home')); router.get('/jianshu/trending/:timeframe', require('./routes/jianshu/trending')); router.get('/jianshu/collection/:id', require('./routes/jianshu/collection')); router.get('/jianshu/user/:id', require('./routes/jianshu/user')); // 知乎 router.get('/zhihu/collection/:id', require('./routes/zhihu/collection')); router.get('/zhihu/people/activities/:id', require('./routes/zhihu/activities')); router.get('/zhihu/people/answers/:id', require('./routes/zhihu/answers')); router.get('/zhihu/zhuanlan/:id', require('./routes/zhihu/zhuanlan')); router.get('/zhihu/daily', require('./routes/zhihu/daily')); router.get('/zhihu/hotlist', require('./routes/zhihu/hotlist')); router.get('/zhihu/pin/hotlist', require('./routes/zhihu/pin/hotlist')); router.get('/zhihu/question/:questionId', require('./routes/zhihu/question')); router.get('/zhihu/topic/:topicId', require('./routes/zhihu/topic')); router.get('/zhihu/people/pins/:id', require('./routes/zhihu/pin/people')); router.get('/zhihu/bookstore/newest', require('./routes/zhihu/bookstore/newest')); router.get('/zhihu/pin/daily', require('./routes/zhihu/pin/daily')); router.get('/zhihu/weekly', require('./routes/zhihu/weekly')); // 妹子图 router.get('/mzitu/home/:type?', require('./routes/mzitu/home')); router.get('/mzitu/tags', require('./routes/mzitu/tags')); router.get('/mzitu/category/:category', require('./routes/mzitu/category')); router.get('/mzitu/post/:id', require('./routes/mzitu/post')); router.get('/mzitu/tag/:tag', require('./routes/mzitu/tag')); // pixiv router.get('/pixiv/user/bookmarks/:id', require('./routes/pixiv/bookmarks')); router.get('/pixiv/user/:id/', require('./routes/pixiv/user')); router.get('/pixiv/ranking/:mode/:date?', require('./routes/pixiv/ranking')); router.get('/pixiv/search/:keyword/:order?', require('./routes/pixiv/search')); // 豆瓣 router.get('/douban/movie/playing', require('./routes/douban/playing')); router.get('/douban/movie/playing/:score', require('./routes/douban/playing')); router.get('/douban/movie/playing/:score/:city', require('./routes/douban/playing')); router.get('/douban/movie/later', require('./routes/douban/later')); router.get('/douban/movie/ustop', require('./routes/douban/ustop')); router.get('/douban/group/:groupid', require('./routes/douban/group')); router.get('/douban/explore', require('./routes/douban/explore')); router.get('/douban/music/latest/:area?', require('./routes/douban/latest_music')); router.get('/douban/book/latest', require('./routes/douban/latest_book')); router.get('/douban/event/hot/:locationId', require('./routes/douban/event/hot')); router.get('/douban/commercialpress/latest', require('./routes/douban/commercialpress/latest')); router.get('/douban/bookstore', require('./routes/douban/bookstore')); router.get('/douban/book/rank/:type', require('./routes/douban/book/rank')); router.get('/douban/doulist/:id', require('./routes/douban/doulist')); router.get('/douban/explore/column/:id', require('./routes/douban/explore_column')); router.get('/douban/people/:userid/status', require('./routes/douban/people/status.js')); router.get('/douban/topic/:id/:sort?', require('./routes/douban/topic.js')); // 法律白話文運動 router.get('/plainlaw/archives', require('./routes/plainlaw/archives.js')); // 煎蛋 router.get('/jandan/:sub_model', require('./routes/jandan/pic')); // 喷嚏 router.get('/dapenti/tugua', require('./routes/dapenti/tugua')); router.get('/dapenti/subject/:id', require('./routes/dapenti/subject')); // Dockone router.get('/dockone/weekly', require('./routes/dockone/weekly')); // 开发者头条 router.get('/toutiao/today', require('./routes/toutiao/today')); router.get('/toutiao/user/:id', require('./routes/toutiao/user')); // 众成翻译 router.get('/zcfy', require('./routes/zcfy/index')); router.get('/zcfy/index', require('./routes/zcfy/index')); // 兼容 router.get('/zcfy/hot', require('./routes/zcfy/hot')); // 今日头条 router.get('/jinritoutiao/keyword/:keyword', require('./routes/jinritoutiao/keyword')); // Disqus router.get('/disqus/posts/:forum', require('./routes/disqus/posts')); // Twitter router.get('/twitter/user/:id', require('./routes/twitter/user')); router.get('/twitter/list/:id/:name', require('./routes/twitter/list')); router.get('/twitter/likes/:id', require('./routes/twitter/likes')); router.get('/twitter/followings/:id', require('./routes/twitter/followings')); // Instagram router.get('/instagram/user/:id', require('./routes/instagram/user')); router.get('/instagram/tag/:tag', require('./routes/instagram/tag')); // Youtube router.get('/youtube/user/:username/:embed?', require('./routes/youtube/user')); router.get('/youtube/channel/:id/:embed?', require('./routes/youtube/channel')); router.get('/youtube/playlist/:id/:embed?', require('./routes/youtube/playlist')); // 极客时间 router.get('/geektime/column/:cid', require('./routes/geektime/column')); router.get('/geektime/news', require('./routes/geektime/news')); // 界面新闻 router.get('/jiemian/list/:cid', require('./routes/jiemian/list.js')); // 好奇心日报 router.get('/qdaily/notch/posts', require('./routes/qdaily/notch/index')); router.get('/qdaily/notch/explore/:id', require('./routes/qdaily/notch/explore')); router.get('/qdaily/:type/:id', require('./routes/qdaily/index')); // 爱奇艺 router.get('/iqiyi/dongman/:id', require('./routes/iqiyi/dongman')); router.get('/iqiyi/user/video/:uid', require('./routes/iqiyi/video')); // 南方周末 router.get('/infzm/:id', require('./routes/infzm/news')); // Dribbble router.get('/dribbble/popular/:timeframe?', require('./routes/dribbble/popular')); router.get('/dribbble/user/:name', require('./routes/dribbble/user')); router.get('/dribbble/keyword/:keyword', require('./routes/dribbble/keyword')); // 斗鱼 router.get('/douyu/room/:id', require('./routes/douyu/room')); // 虎牙 router.get('/huya/live/:id', require('./routes/huya/live')); // kingkong直播 router.get('/kingkong/room/:id', require('./routes/kingkong/room')); // v2ex router.get('/v2ex/topics/:type', require('./routes/v2ex/topics')); router.get('/v2ex/post/:postid', require('./routes/v2ex/post')); // Telegram router.get('/telegram/channel/:username', require('./routes/telegram/channel')); router.get('/telegram/stickerpack/:name', require('./routes/telegram/stickerpack')); // readhub router.get('/readhub/category/:category', require('./routes/readhub/category')); // GitHub router.get('/github/repos/:user', require('./routes/github/repos')); router.get('/github/trending/:since/:language?', require('./routes/github/trending')); router.get('/github/issue/:user/:repo', require('./routes/github/issue')); router.get('/github/pull/:user/:repo', require('./routes/github/pulls')); router.get('/github/user/followers/:user', require('./routes/github/follower')); router.get('/github/stars/:user/:repo', require('./routes/github/star')); router.get('/github/search/:query/:sort?/:order?', require('./routes/github/search')); router.get('/github/branches/:user/:repo', require('./routes/github/branches')); router.get('/github/file/:user/:repo/:branch/:filepath+', require('./routes/github/file')); // f-droid router.get('/fdroid/apprelease/:app', require('./routes/fdroid/apprelease')); // konachan router.get('/konachan/post/popular_recent', require('./routes/konachan/post_popular_recent')); router.get('/konachan.com/post/popular_recent', require('./routes/konachan/post_popular_recent')); router.get('/konachan.net/post/popular_recent', require('./routes/konachan/post_popular_recent')); router.get('/konachan/post/popular_recent/:period', require('./routes/konachan/post_popular_recent')); router.get('/konachan.com/post/popular_recent/:period', require('./routes/konachan/post_popular_recent')); router.get('/konachan.net/post/popular_recent/:period', require('./routes/konachan/post_popular_recent')); // yande.re router.get('/yande.re/post/popular_recent', require('./routes/yande.re/post_popular_recent')); router.get('/yande.re/post/popular_recent/:period', require('./routes/yande.re/post_popular_recent')); // 纽约时报 router.get('/nytimes/morning_post', require('./routes/nytimes/morning_post')); router.get('/nytimes/:lang?', require('./routes/nytimes/index')); // 3dm router.get('/3dm/:name/:type', require('./routes/3dm/game')); router.get('/3dm/news', require('./routes/3dm/news_center')); // 旅法师营地 router.get('/lfsyd/:typecode', require('./routes/lfsyd/index')); // 喜马拉雅 router.get('/ximalaya/album/:id/:all?', require('./routes/ximalaya/album')); // EZTV router.get('/eztv/torrents/:imdb_id', require('./routes/eztv/imdb')); // 什么值得买 router.get('/smzdm/keyword/:keyword', require('./routes/smzdm/keyword')); router.get('/smzdm/ranking/:rank_type/:rank_id/:hour', require('./routes/smzdm/ranking')); router.get('/smzdm/haowen/:day?', require('./routes/smzdm/haowen')); router.get('/smzdm/haowen/fenlei/:name/:sort?', require('./routes/smzdm/haowen_fenlei')); // 新京报 router.get('/bjnews/:cat', require('./routes/bjnews/news')); // 停水通知 router.get('/tingshuitz/hangzhou', require('./routes/tingshuitz/hangzhou')); router.get('/tingshuitz/xiaoshan', require('./routes/tingshuitz/xiaoshan')); router.get('/tingshuitz/dalian', require('./routes/tingshuitz/dalian')); router.get('/tingshuitz/guangzhou', require('./routes/tingshuitz/guangzhou')); router.get('/tingshuitz/dongguan', require('./routes/tingshuitz/dongguan')); router.get('/tingshuitz/xian', require('./routes/tingshuitz/xian')); router.get('/tingshuitz/yangjiang', require('./routes/tingshuitz/yangjiang')); router.get('/tingshuitz/nanjing', require('./routes/tingshuitz/nanjing')); router.get('/tingshuitz/wuhan', require('./routes/tingshuitz/wuhan')); // 米哈游 router.get('/mihoyo/bh3/:type', require('./routes/mihoyo/bh3')); router.get('/mihoyo/bh2/:type', require('./routes/mihoyo/bh2')); // 央视新闻 router.get('/cctv/:category', require('./routes/cctv/category')); // 财新博客 router.get('/caixin/blog/:column', require('./routes/caixin/blog')); // 财新 router.get('/caixin/:column/:category', require('./routes/caixin/category')); // 财新首页 router.get('/caixin/article', require('./routes/caixin/article')); // 草榴社区 router.get('/t66y/post/:tid', require('./routes/t66y/post')); router.get('/t66y/:id/:type?', require('./routes/t66y/index')); // 色中色 router.get('/sexinsex/:id/:type?', require('./routes/sexinsex/index')); // 机核 router.get('/gcores/category/:category', require('./routes/gcores/category')); // 国家地理 router.get('/natgeo/dailyphoto', require('./routes/natgeo/dailyphoto')); router.get('/natgeo/:cat/:type?', require('./routes/natgeo/natgeo')); // 一个 router.get('/one', require('./routes/one/index')); // Firefox router.get('/firefox/release/:platform', require('./routes/firefox/release')); // Thunderbird router.get('/thunderbird/release', require('./routes/thunderbird/release')); // tuicool router.get('/tuicool/mags/:type', require('./routes/tuicool/mags')); // Hexo router.get('/hexo/next/:url', require('./routes/hexo/next')); router.get('/hexo/yilia/:url', require('./routes/hexo/yilia')); // 小米 router.get('/mi/crowdfunding', require('./routes/mi/crowdfunding')); router.get('/mi/youpin/crowdfunding', require('./routes/mi/youpin/crowdfunding')); router.get('/mi/youpin/new', require('./routes/mi/youpin/new')); // MIUI 更新 router.get('/miui/:device/:type?/:region?', require('./routes/mi/miui/index')); // Keep router.get('/keep/user/:id', require('./routes/keep/user')); // 起点 router.get('/qidian/chapter/:id', require('./routes/qidian/chapter')); router.get('/qidian/forum/:id', require('./routes/qidian/forum')); router.get('/qidian/free/:type?', require('./routes/qidian/free')); router.get('/qidian/free-next/:type?', require('./routes/qidian/free-next')); // 纵横 router.get('/zongheng/chapter/:id', require('./routes/zongheng/chapter')); // 刺猬猫 router.get('/ciweimao/chapter/:id', require('./routes/ciweimao/chapter')); // 中国美术馆 router.get('/namoc/announcement', require('./routes/namoc/announcement')); router.get('/namoc/news', require('./routes/namoc/news')); router.get('/namoc/media', require('./routes/namoc/media')); router.get('/namoc/exhibition', require('./routes/namoc/exhibition')); router.get('/namoc/specials', require('./routes/namoc/specials')); // 懂球帝 router.get('/dongqiudi/daily', require('./routes/dongqiudi/daily')); router.get('/dongqiudi/result/:team', require('./routes/dongqiudi/result')); router.get('/dongqiudi/team_news/:team', require('./routes/dongqiudi/team_news')); router.get('/dongqiudi/player_news/:id', require('./routes/dongqiudi/player_news')); router.get('/dongqiudi/special/:id', require('./routes/dongqiudi/special')); router.get('/dongqiudi/top_news', require('./routes/dongqiudi/top_news')); // 维基百科 Wikipedia router.get('/wikipedia/mainland', require('./routes/wikipedia/mainland')); // 联合国 United Nations router.get('/un/scveto', require('./routes/un/scveto')); // 雪球 router.get('/xueqiu/user/:id/:type?', require('./routes/xueqiu/user')); router.get('/xueqiu/favorite/:id', require('./routes/xueqiu/favorite')); router.get('/xueqiu/user_stock/:id', require('./routes/xueqiu/user_stock')); router.get('/xueqiu/fund/:id', require('./routes/xueqiu/fund')); router.get('/xueqiu/stock_info/:id/:type?', require('./routes/xueqiu/stock_info')); router.get('/xueqiu/snb/:id', require('./routes/xueqiu/snb')); // Greasy Fork router.get('/greasyfork/:language/:domain?', require('./routes/greasyfork/scripts')); // LinkedKeeper router.get('/linkedkeeper/:type/:id?', require('./routes/linkedkeeper/index')); // 开源中国 router.get('/oschina/news/:category?', require('./routes/oschina/news')); router.get('/oschina/user/:id', require('./routes/oschina/user')); router.get('/oschina/u/:id', require('./routes/oschina/u')); router.get('/oschina/topic/:topic', require('./routes/oschina/topic')); // 安全客 router.get('/aqk/vul', require('./routes/aqk/vul')); router.get('/aqk/:category', require('./routes/aqk/category')); // 腾讯大家 router.get('/dajia', require('./routes/tencent/dajia/index')); router.get('/dajia/author/:uid', require('./routes/tencent/dajia/author')); router.get('/dajia/zhuanlan/:uid', require('./routes/tencent/dajia/zhuanlan')); // 腾讯游戏开发者社区 router.get('/gameinstitute/community/:tag?', require('./routes/tencent/gameinstitute/community')); // 腾讯视频 SDK router.get('/qcloud/mlvb/changelog', require('./routes/tencent/qcloud/mlvb/changelog')); // 腾讯吐个槽 router.get('/tucaoqq/post/:project/:key', require('./routes/tencent/tucaoqq/post')); // Bugly SDK router.get('/bugly/changelog/:platform', require('./routes/tencent/bugly/changelog')); // wechat router.get('/wechat/wemp/:id', require('./routes/tencent/wechat/wemp')); router.get('/wechat/csm/:id', require('./routes/tencent/wechat/csm')); router.get('/wechat/announce', require('./routes/tencent/wechat/announce')); router.get('/wechat/miniprogram/plugins', require('./routes/tencent/wechat/miniprogram/plugins')); router.get('/wechat/tgchannel/:id', require('./routes/tencent/wechat/tgchannel')); router.get('/wechat/uread/:userid', require('./routes/tencent/wechat/uread')); router.get('/wechat/ershicimi/:id', require('./routes/tencent/wechat/ershcimi')); // All the Flight Deals router.get('/atfd/:locations/:nearby?', require('./routes/atfd/index')); // Fir router.get('/fir/update/:id', require('./routes/fir/update')); // Nvidia Web Driver router.get('/nvidia/webdriverupdate', require('./routes/nvidia/webdriverupdate')); // Google router.get('/google/citations/:id', require('./routes/google/citations')); router.get('/google/scholar/:query', require('./routes/google/scholar')); router.get('/google/doodles/:language?', require('./routes/google/doodles')); // Awesome Pigtals router.get('/pigtails', require('./routes/pigtails')); // 每日环球展览 iMuseum router.get('/imuseum/:city/:type?', require('./routes/imuseum')); // AppStore router.get('/appstore/update/:country/:id', require('./routes/apple/appstore/update')); router.get('/appstore/price/:country/:type/:id', require('./routes/apple/appstore/price')); router.get('/appstore/iap/:country/:id', require('./routes/apple/appstore/in-app-purchase')); router.get('/appstore/xianmian', require('./routes/apple/appstore/xianmian')); router.get('/appstore/gofans', require('./routes/apple/appstore/gofans')); // Hopper router.get('/hopper/:lowestOnly/:from/:to?', require('./routes/hopper/index')); // 马蜂窝 router.get('/mafengwo/note/:type', require('./routes/mafengwo/note')); // 中国地震局震情速递(与地震台网同步更新) router.get('/earthquake/:region?', require('./routes/earthquake')); // 中国地震台网 router.get('/earthquake/ceic/:type', require('./routes/earthquake/ceic')); // 笔趣阁 router.get('/biquge/novel/latestchapter/:id', require('./routes/novel/biquge')); // UU看书 router.get('/uukanshu/chapter/:uid', require('./routes/novel/uukanshu')); // 小说 router.get('/novel/biquge/:id', require('./routes/novel/biquge')); router.get('/novel/uukanshu/:uid', require('./routes/novel/uukanshu')); router.get('/novel/wenxuemi/:id1/:id2', require('./routes/novel/wenxuemi')); router.get('/novel/booksky/:id', require('./routes/novel/booksky')); router.get('/novel/shuquge/:id', require('./routes/novel/shuquge')); // 中国气象网 router.get('/weatheralarm', require('./routes/weatheralarm')); // Gitlab router.get('/gitlab/explore/:type', require('./routes/gitlab/explore')); // 忧郁的loli 换了域名,向下兼容 router.get('/mygalgame', require('./routes/galgame/mmgal')); router.get('/mmgal', require('./routes/galgame/mmgal')); // say花火 router.get('/sayhuahuo', require('./routes/galgame/sayhuahuo')); // 终点分享 router.get('/zdfx', require('./routes/galgame/zdfx')); // 北京理工大学 router.get('/bit/jwc', require('./routes/universities/bit/jwc/jwc')); router.get('/bit/cs', require('./routes/universities/bit/cs/cs')); // 大连工业大学 router.get('/dpu/jiaowu/news/:type?', require('./routes/universities/dpu/jiaowu/news')); router.get('/dpu/wlfw/news/:type?', require('./routes/universities/dpu/wlfw/news')); // 东南大学 router.get('/seu/radio/academic', require('./routes/universities/seu/radio/academic')); router.get('/seu/yzb/:type', require('./routes/universities/seu/yzb')); router.get('/seu/cse/:type?', require('./routes/universities/seu/cse')); // 南京工业大学 router.get('/njtech/jwc', require('./routes/universities/njtech/jwc')); // 南京航空航天大学 router.get('/nuaa/jwc/:type?', require('./routes/universities/nuaa/jwc/jwc')); router.get('/nuaa/cs/:type?', require('./routes/universities/nuaa/cs/index')); router.get('/nuaa/yjsy/:type?', require('./routes/universities/nuaa/yjsy/yjsy')); // 哈尔滨工业大学 router.get('/hit/jwc', require('./routes/universities/hit/jwc')); router.get('/hit/today/:category', require('./routes/universities/hit/today')); // 上海科技大学 router.get('/shanghaitech/sist/activity', require('./routes/universities/shanghaitech/sist/activity')); // 上海交通大学 router.get('/sjtu/seiee/academic', require('./routes/universities/sjtu/seiee/academic')); router.get('/sjtu/seiee/bjwb/:type', require('./routes/universities/sjtu/seiee/bjwb')); router.get('/sjtu/seiee/xsb/:type?', require('./routes/universities/sjtu/seiee/xsb')); router.get('/sjtu/gs/tzgg/:type?', require('./routes/universities/sjtu/gs/tzgg')); router.get('/sjtu/jwc/:type?', require('./routes/universities/sjtu/jwc')); // 江南大学 router.get('/ju/jwc/:type?', require('./routes/universities/ju/jwc')); // 洛阳理工学院 router.get('/lit/jwc', require('./routes/universities/lit/jwc')); router.get('/lit/xwzx/:name?', require('./routes/universities/lit/xwzx')); router.get('/lit/tw/:name?', require('./routes/universities/lit/tw')); // 北京大学 router.get('/pku/eecs/:type?', require('./routes/universities/pku/eecs')); router.get('/pku/rccp/mzyt', require('./routes/universities/pku/rccp/mzyt')); // 上海海事大学 router.get('/shmtu/www/:type', require('./routes/universities/shmtu/www')); router.get('/shmtu/jwc/:type', require('./routes/universities/shmtu/jwc')); // 西南科技大学 router.get('/swust/jwc/news', require('./routes/universities/swust/jwc_news')); router.get('/swust/jwc/notice/:type?', require('./routes/universities/swust/jwc_notice')); router.get('/swust/cs/:type?', require('./routes/universities/swust/cs')); // 华南师范大学 router.get('/scnu/jw', require('./routes/universities/scnu/jw')); router.get('/scnu/library', require('./routes/universities/scnu/library')); router.get('/scnu/cs/match', require('./routes/universities/scnu/cs/match')); // 广东工业大学 router.get('/gdut/news', require('./routes/universities/gdut/news')); // 中国科学院 router.get('/cas/sim/academic', require('./routes/universities/cas/sim/academic')); // 中国传媒大学 router.get('/cuc/yz', require('./routes/universities/cuc/yz')); // 南京邮电大学 router.get('/njupt/jwc/:type?', require('./routes/universities/njupt/jwc')); // 南昌航空大学 router.get('/nchu/jwc/:type?', require('./routes/universities/nchu/jwc')); // 哈尔滨工程大学 router.get('/heu/ugs/news/:author?/:category?', require('./routes/universities/heu/ugs/news')); // 重庆大学 router.get('/cqu/jwc/announcement', require('./routes/universities/cqu/jwc/announcement')); router.get('/cqu/news/jzyg', require('./routes/universities/cqu/news/jzyg')); // 南京信息工程大学 router.get('/nuist/bulletin/:category?', require('./routes/universities/nuist/bulletin')); router.get('/nuist/jwc/:category?', require('./routes/universities/nuist/jwc')); router.get('/nuist/yjs/:category?', require('./routes/universities/nuist/yjs')); router.get('/nuist/xgc', require('./routes/universities/nuist/xgc')); router.get('/nuist/scs/:category?', require('./routes/universities/nuist/scs')); router.get('/nuist/lib', require('./routes/universities/nuist/library/lib')); router.get('/nuist/sese/:category?', require('./routes/universities/nuist/sese')); router.get('/nuist/cas/:category?', require('./routes/universities/nuist/cas')); // 成都信息工程大学 router.get('/cuit/cxxww/:type?', require('./routes/universities/cuit/cxxww')); // 重庆科技学院 router.get('/cqust/jw/:type?', require('./routes/universities/cqust/jw')); router.get('/cqust/lib/:type?', require('./routes/universities/cqust/lib')); // 常州大学 router.get('/cczu/jwc/:category?', require('./routes/universities/cczu/jwc')); router.get('/cczu/news/:category?', require('./routes/universities/cczu/news')); // 南京理工大学 router.get('/njust/jwc/:type', require('./routes/universities/njust/jwc')); router.get('/njust/cwc/:type', require('./routes/universities/njust/cwc')); router.get('/njust/gs/:type', require('./routes/universities/njust/gs')); // 四川旅游学院 router.get('/sctu/xgxy', require('./routes/universities/sctu/information-engineer-faculty/index')); router.get('/sctu/xgxy/:id', require('./routes/universities/sctu/information-engineer-faculty/context')); router.get('/sctu/jwc/:type?', require('./routes/universities/sctu/jwc/index')); router.get('/sctu/jwc/:type/:id', require('./routes/universities/sctu/jwc/context')); // 电子科技大学 router.get('/uestc/jwc/:type?', require('./routes/universities/uestc/jwc')); router.get('/uestc/news/:type?', require('./routes/universities/uestc/news')); router.get('/uestc/auto/:type?', require('./routes/universities/uestc/auto')); router.get('/uestc/cs/:type?', require('./routes/universities/uestc/cs')); // 昆明理工大学 router.get('/kmust/jwc/:type?', require('./routes/universities/kmust/jwc')); router.get('/kmust/job/careers/:type?', require('./routes/universities/kmust/job/careers')); router.get('/kmust/job/jobfairs', require('./routes/universities/kmust/job/jobfairs')); // 华中科技大学 router.get('/hust/auto/notice/:type?', require('./routes/universities/hust/aia/notice')); router.get('/hust/auto/news/', require('./routes/universities/hust/aia/news')); router.get('/hust/aia/news/', require('./routes/universities/hust/aia/news')); router.get('/hust/aia/notice/:type?', require('./routes/universities/hust/aia/notice')); // 中南大学 router.get('/csu/job/:type?', require('./routes/universities/csu/job')); // 山东大学 router.get('/sdu/sc/:type?', require('./routes/universities/sdu/sc')); router.get('/sdu/cs/:type?', require('./routes/universities/sdu/cs')); router.get('/sdu/cmse/:type?', require('./routes/universities/sdu/cmse')); router.get('/sdu/mech/:type?', require('./routes/universities/sdu/mech')); router.get('/sdu/epe/:type?', require('./routes/universities/sdu/epe')); // 大连大学 router.get('/dlu/jiaowu/news', require('./routes/universities/dlu/jiaowu/news')); // 东莞理工学院 router.get('/dgut/jwc/:type?', require('./routes/universities/dgut/jwc')); router.get('/dgut/xsc/:type?', require('./routes/universities/dgut/xsc')); // 同济大学 router.get('/tju/sse/:type?', require('./routes/universities/tju/sse/notice')); // 华南理工大学 router.get('/scut/jwc/:category?', require('./routes/universities/scut/jwc')); // 温州商学院 router.get('/wzbc/:type?', require('./routes/universities/wzbc/news')); // 河南大学 router.get('/henu/:type?', require('./routes/universities/henu/news')); // 南开大学 router.get('/nku/jwc/:type?', require('./routes/universities/nku/jwc/index')); // 北京航空航天大学 router.get('/buaa/news/:type', require('./routes/universities/buaa/news/index')); // 上海大学 router.get('/shu/jwc/:type?', require('./routes/universities/shu/jwc')); // 北京科技大学天津学院 router.get('/ustb/tj/news/:type?', require('./routes/universities/ustb/tj/news')); // 深圳大学 router.get('/szu/yz/:type?', require('./routes/universities/szu/yz')); // ifanr router.get('/ifanr/:channel?', require('./routes/ifanr/index')); // 果壳网 router.get('/guokr/scientific', require('./routes/guokr/scientific')); router.get('/guokr/:category', require('./routes/guokr/calendar')); // 联合早报 router.get('/zaobao/realtime/:type?', require('./routes/zaobao/realtime')); router.get('/zaobao/znews/:type?', require('./routes/zaobao/znews')); // Apple router.get('/apple/exchange_repair/:country?', require('./routes/apple/exchange_repair')); // Minecraft CurseForge router.get('/curseforge/files/:project', require('./routes/curseforge/files')); // 抖音 router.get('/douyin/user/:id', require('./routes/douyin/user')); router.get('/douyin/like/:id', require('./routes/douyin/like')); // 少数派 sspai router.get('/sspai/series', require('./routes/sspai/series')); router.get('/sspai/shortcuts', require('./routes/sspai/shortcutsGallery')); router.get('/sspai/matrix', require('./routes/sspai/matrix')); router.get('/sspai/column/:id', require('./routes/sspai/column')); router.get('/sspai/author/:id', require('./routes/sspai/author')); router.get('/sspai/topics', require('./routes/sspai/topics')); router.get('/sspai/topic/:id', require('./routes/sspai/topic')); // 异次元软件世界 router.get('/iplay/home', require('./routes/iplay/home')); // xclient.info router.get('/xclient/app/:name', require('./routes/xclient/app')); // 中国驻外使领事馆 router.get('/embassy/:country/:city?', require('./routes/embassy/index')); // 澎湃新闻 router.get('/thepaper/featured', require('./routes/thepaper/featured')); router.get('/thepaper/channel/:id', require('./routes/thepaper/channel')); // 电影首发站 router.get('/dysfz', require('./routes/dysfz/index')); router.get('/dysfz/index', require('./routes/dysfz/index')); // 兼容 // きららファンタジア router.get('/kirara/news', require('./routes/kirara/news')); // 电影天堂 router.get('/dytt', require('./routes/dytt/index')); router.get('/dytt/index', require('./routes/dytt/index')); // 兼容 // 人生05电影网 router.get('/rs05/rs05', require('./routes/rs05/rs05')); // 趣头条 router.get('/qutoutiao/category/:cid', require('./routes/qutoutiao/category')); // NHK NEW WEB EASY router.get('/nhk/news_web_easy', require('./routes/nhk/news_web_easy')); // BBC router.get('/bbc/:channel?', require('./routes/bbc/index')); // FT 中文网 router.get('/ft/:language/:channel?', require('./routes/ft/channel')); // The Verge router.get('/verge', require('./routes/verge/index')); // 看雪 router.get('/pediy/topic/:category?/:type?', require('./routes/pediy/topic')); // 观止(每日一文) router.get('/guanzhi', require('./routes/guanzhi/guanzhi')); // 多维新闻网 router.get('/dwnews/yaowen/:region?', require('./routes/dwnews/yaowen')); router.get('/dwnews/rank/:type/:range', require('./routes/dwnews/rank')); // 知晓程序 router.get('/miniapp/article/:category', require('./routes/miniapp/article')); router.get('/miniapp/store/newest', require('./routes/miniapp/store/newest')); // 后续 router.get('/houxu/live/:id/:timeline?', require('./routes/houxu/live')); router.get('/houxu/events', require('./routes/houxu/events')); router.get('/houxu/lives/:type', require('./routes/houxu/lives')); // 老司机 router.get('/laosiji/hot', require('./routes/laosiji/hot')); router.get('/laosiji/feed', require('./routes/laosiji/feed')); router.get('/laosiji/hotshow/:id', require('./routes/laosiji/hotshow')); // 99% Invisible router.get('/99percentinvisible/transcript', require('./routes/99percentinvisible/transcript')); // 青空文庫 router.get('/aozora/newbook/:count?', require('./routes/aozora/newbook')); // solidot router.get('/solidot/:type?', require('./routes/solidot/main')); // Hermes UK router.get('/parcel/hermesuk/:tracking', require('./routes/parcel/hermesuk')); // 甩甩尾巴 router.get('/dgtle/trade/:typeId?', require('./routes/dgtle/trade')); router.get('/dgtle/trade/search/:keyword', require('./routes/dgtle/keyword')); // 抽屉新热榜 router.get('/chouti/:subject?', require('./routes/chouti')); // 西安电子科技大学 router.get('/xidian/jwc/:category?', require('./routes/universities/xidian/jwc')); // Westore router.get('/westore/new', require('./routes/westore/new')); // 优酷 router.get('/youku/channel/:channelId/:embed?', require('./routes/youku/channel')); // 油价 router.get('/oilprice/:area', require('./routes/oilprice')); // nHentai router.get('/nhentai/search/:keyword/:mode?', require('./routes/nhentai/search')); router.get('/nhentai/:key/:keyword/:mode?', require('./routes/nhentai/other')); // 龙腾网 router.get('/ltaaa/:type?', require('./routes/ltaaa/main')); // AcFun router.get('/acfun/bangumi/:id', require('./routes/acfun/bangumi')); router.get('/acfun/user/video/:uid', require('./routes/acfun/video')); // Auto Trader router.get('/autotrader/:query', require('./routes/autotrader')); // 极客公园 router.get('/geekpark/breakingnews', require('./routes/geekpark/breakingnews')); // 百度 router.get('/baidu/doodles', require('./routes/baidu/doodles')); router.get('/baidu/topwords/:boardId?', require('./routes/baidu/topwords')); // 搜狗 router.get('/sogou/doodles', require('./routes/sogou/doodles')); // 香港天文台 router.get('/hko/weather', require('./routes/hko/weather')); // sankakucomplex router.get('/sankakucomplex/post', require('./routes/sankakucomplex/post')); // 技术头条 router.get('/blogread/newest', require('./routes/blogread/newest')); // gnn游戏新闻 router.get('/gnn/gnn', require('./routes/gnn/gnn')); // a9vg游戏新闻 router.get('/a9vg/a9vg', require('./routes/a9vg/a9vg')); // IT桔子 router.get('/itjuzi/invest', require('./routes/itjuzi/invest')); router.get('/itjuzi/merge', require('./routes/itjuzi/merge')); // 探物 router.get('/tanwu/products', require('./routes/tanwu/products')); // GitChat router.get('/gitchat/newest', require('./routes/gitchat/newest')); // The Guardian router.get('/guardian/:type', require('./routes/guardian/guardian')); // 下厨房 router.get('/xiachufang/user/cooked/:id', require('./routes/xiachufang/user/cooked')); router.get('/xiachufang/user/created/:id', require('./routes/xiachufang/user/created')); router.get('/xiachufang/popular/:timeframe?', require('./routes/xiachufang/popular')); // 经济观察报 router.get('/eeo/:category?', require('./routes/eeo/index')); // 腾讯视频 router.get('/tencentvideo/playlist/:id', require('./routes/tencent/video/playlist')); // 看漫画 router.get('/manhuagui/comic/:id', require('./routes/manhuagui/comic')); // 動漫狂 router.get('/cartoonmad/comic/:id', require('./routes/cartoonmad/comic')); // Vol router.get('/vol/:mode?', require('./routes/vol/lastupdate')); // 咚漫 router.get('/dongmanmanhua/comic/:category/:name/:id', require('./routes/dongmanmanhua/comic')); // Tits Guru router.get('/tits-guru/home', require('./routes/titsguru/home')); router.get('/tits-guru/daily', require('./routes/titsguru/daily')); router.get('/tits-guru/category/:type', require('./routes/titsguru/category')); router.get('/tits-guru/model/:name', require('./routes/titsguru/model')); // typora router.get('/typora/changelog', require('./routes/typora/changelog')); // TSSstatus router.get('/tssstatus/:board/:build', require('./routes/tssstatus')); // Anime1 router.get('/anime1/anime/:time/:name', require('./routes/anime1/anime')); router.get('/anime1/search/:keyword', require('./routes/anime1/search')); // gitea router.get('/gitea/blog', require('./routes/gitea/blog')); // iDownloadBlog router.get('/idownloadblog', require('./routes/idownloadblog/index')); // 9to5 router.get('/9to5/:type', require('./routes/9to5/subsite')); // TesterHome router.get('/testerhome/newest', require('./routes/testerhome/newest')); // 刷屏 router.get('/weseepro/newest', require('./routes/weseepro/newest')); router.get('/weseepro/newest-direct', require('./routes/weseepro/newest-direct')); router.get('/weseepro/circle', require('./routes/weseepro/circle')); // 玩物志 router.get('/coolbuy/newest', require('./routes/coolbuy/newest')); // NGA router.get('/nga/forum/:fid', require('./routes/nga/forum')); router.get('/nga/post/:tid', require('./routes/nga/post')); // Nautilus router.get('/nautilus/topic/:tid', require('./routes/nautilus/topics')); // JavBus router.get('/javbus/home', require('./routes/javbus/home')); router.get('/javbus/genre/:gid', require('./routes/javbus/genre')); router.get('/javbus/star/:sid', require('./routes/javbus/star')); router.get('/javbus/series/:seriesid', require('./routes/javbus/series')); router.get('/javbus/uncensored/home', require('./routes/javbus/uncensored/home')); router.get('/javbus/uncensored/genre/:gid', require('./routes/javbus/uncensored/genre')); router.get('/javbus/uncensored/star/:sid', require('./routes/javbus/uncensored/star')); router.get('/javbus/uncensored/series/:seriesid', require('./routes/javbus/uncensored/series')); router.get('/javbus/western/home', require('./routes/javbus/western/home')); router.get('/javbus/western/genre/:gid', require('./routes/javbus/western/genre')); router.get('/javbus/western/star/:sid', require('./routes/javbus/western/star')); router.get('/javbus/western/series/:seriesid', require('./routes/javbus/western/series')); // 中山大学 router.get('/sysu/sdcs', require('./routes/universities/sysu/sdcs')); // 動畫瘋 router.get('/anigamer/new_anime', require('./routes/anigamer/new_anime')); router.get('/anigamer/anime/:sn', require('./routes/anigamer/anime')); // Apkpure router.get('/apkpure/versions/:region/:pkg', require('./routes/apkpure/versions')); // 豆瓣美女 router.get('/dbmv/:category?', require('./routes/dbmv/index')); // 中国药科大学 router.get('/cpu/home', require('./routes/universities/cpu/home')); router.get('/cpu/jwc', require('./routes/universities/cpu/jwc')); router.get('/cpu/yjsy', require('./routes/universities/cpu/yjsy')); // 字幕组 router.get('/zimuzu/resource/:id?', require('./routes/zimuzu/resource')); // 虎嗅 router.get('/huxiu/tag/:id', require('./routes/huxiu/tag')); router.get('/huxiu/search/:keyword', require('./routes/huxiu/search')); router.get('/huxiu/author/:id', require('./routes/huxiu/author')); // Steam router.get('/steam/search/:params', require('./routes/steam/search')); router.get('/steam/news/:appids', require('./routes/steam/news')); // Steamgifts router.get('/steamgifts/discussions/:category?', require('./routes/steam/steamgifts/discussions')); // 扇贝 router.get('/shanbay/checkin/:id', require('./routes/shanbay/checkin')); // Facebook router.get('/facebook/page/:id', require('./routes/facebook/page')); // 币乎 router.get('/bihu/activaties/:id', require('./routes/bihu/activaties')); // 停电通知 router.get('/tingdiantz/95598/:orgNo/:provinceNo/:outageStartTime/:outageEndTime/:scope?', require('./routes/tingdiantz/95598')); router.get('/tingdiantz/95598/:orgNo/:provinceNo/:scope?', require('./routes/tingdiantz/95598')); router.get('/tingdiantz/nanjing', require('./routes/tingdiantz/nanjing')); // 36kr router.get('/36kr/search/article/:keyword', require('./routes/36kr/search/article')); // icourse163 router.get('/icourse163/newest', require('./routes/icourse163/newest')); // patchwork.kernel.org router.get('/patchwork.kernel.org/comments/:id', require('./routes/patchwork.kernel.org/comments')); // 京东众筹 router.get('/jingdong/zhongchou/:type/:status/:sort', require('./routes/jingdong/zhongchou')); // 淘宝众筹 router.get('/taobao/zhongchou/:type?', require('./routes/taobao/zhongchou')); // All Poetry router.get('/allpoetry/:order?', require('./routes/allpoetry/order')); // 华尔街见闻 router.get('/wallstreetcn/news/global', require('./routes/wallstreetcn/news')); // 多抓鱼搜索 router.get('/duozhuayu/search/:wd', require('./routes/duozhuayu/search')); // 创业邦 router.get('/cyzone/author/:id', require('./routes/cyzone/author')); router.get('/cyzone/label/:name', require('./routes/cyzone/label')); // 政府 router.get('/gov/zhengce/zuixin', require('./routes/gov/zhengce/zuixin')); router.get('/gov/zhengce/wenjian/:pcodeJiguan?', require('./routes/gov/zhengce/wenjian')); router.get('/gov/zhengce/govall/:advance?', require('./routes/gov/zhengce/govall')); router.get('/gov/province/:name/:category', require('./routes/gov/province')); router.get('/gov/city/:name/:category', require('./routes/gov/city')); router.get('/gov/statecouncil/briefing', require('./routes/gov/statecouncil/briefing')); router.get('/gov/news/:uid', require('./routes/gov/news')); router.get('/gov/suzhou/news/:uid', require('./routes/gov/suzhou/news')); router.get('/gov/suzhou/doc', require('./routes/gov/suzhou/doc')); router.get('/gov/shanxi/rst/:category', require('./routes/gov/shanxi/rst')); // 中华人民共和国生态环境部 router.get('/gov/mee/gs', require('./routes/gov/mee/gs')); // 中华人民共和国外交部 router.get('/gov/fmprc/fyrbt', require('./routes/gov/fmprc/fyrbt')); // 小黑盒 router.get('/xiaoheihe/user/:id', require('./routes/xiaoheihe/user')); router.get('/xiaoheihe/news', require('./routes/xiaoheihe/news')); router.get('/xiaoheihe/discount', require('./routes/xiaoheihe/discount')); // 惠誉评级 router.get('/fitchratings/site/:type', require('./routes/fitchratings/site')); // 移动支付 router.get('/mpaypass/news', require('./routes/mpaypass/news')); router.get('/mpaypass/main/:type?', require('./routes/mpaypass/main')); // 新浪科技探索 router.get('/sina/discovery/:type', require('./routes/sina/discovery')); // 新浪科技滚动新闻 router.get('/sina/rollnews', require('./routes/sina/rollnews')); // 新浪专栏创事记 router.get('/sina/csj', require('./routes/sina/chuangshiji')); // Animen router.get('/animen/news/:type', require('./routes/animen/news')); // D2 资源库 router.get('/d2/daily', require('./routes/d2/daily')); // ebb router.get('/ebb', require('./routes/ebb')); // Indienova router.get('/indienova/:type', require('./routes/indienova/article')); // JPMorgan Chase Institute router.get('/jpmorganchase', require('./routes/jpmorganchase/research')); // 美拍 router.get('/meipai/user/:uid', require('./routes/meipai/user')); // 多知网 router.get('/duozhi', require('./routes/duozhi')); // Docker Hub router.get('/dockerhub/build/:owner/:image/:tag?', require('./routes/dockerhub/build')); // 人人都是产品经理 router.get('/woshipm/popular', require('./routes/woshipm/popular')); router.get('/woshipm/bookmarks/:id', require('./routes/woshipm/bookmarks')); router.get('/woshipm/user_article/:id', require('./routes/woshipm/user_article')); // 高清电台 router.get('/gaoqing/latest', require('./routes/gaoqing/latest')); // 轻小说文库 router.get('/wenku8/chapter/:id', require('./routes/wenku8/chapter')); // 鲸跃汽车 router.get('/whalegogo/home', require('./routes/whalegogo/home')); // 爱思想 router.get('/aisixiang/column/:id', require('./routes/aisixiang/column')); router.get('/aisixiang/ranking/:type?/:range?', require('./routes/aisixiang/ranking')); // Hacker News router.get('/hackernews/:section/:type?', require('./routes/hackernews/story')); // LeetCode router.get('/leetcode/articles', require('./routes/leetcode/articles')); router.get('/leetcode/submission/us/:user', require('./routes/leetcode/check-us')); router.get('/leetcode/submission/cn/:user', require('./routes/leetcode/check-cn')); // segmentfault router.get('/segmentfault/channel/:name', require('./routes/segmentfault/channel')); // 虎扑 router.get('/hupu/bxj/:id/:order?', require('./routes/hupu/bbs')); router.get('/hupu/bbs/:id/:order?', require('./routes/hupu/bbs')); // 牛客网 router.get('/nowcoder/discuss/:type/:order', require('./routes/nowcoder/discuss')); // Xiaomi.eu router.get('/xiaomieu/releases', require('./routes/xiaomieu/releases')); // 每日安全 router.get('/security/pulses', require('./routes/security/pulses')); // DoNews router.get('/donews/:column?', require('./routes/donews/index')); // WeGene router.get('/wegene/column/:type/:category', require('./routes/wegene/column')); router.get('/wegene/newest', require('./routes/wegene/newest')); // instapaper router.get('/instapaper/person/:name', require('./routes/instapaper/person')); // UI 中国 router.get('/ui-cn/article', require('./routes/ui-cn/article')); router.get('/ui-cn/user/:id', require('./routes/ui-cn/user')); // Dcard router.get('/dcard/:section/:type?', require('./routes/dcard/section')); // 12306 router.get('/12306/zxdt/:id?', require('./routes/12306/zxdt')); // 北京天文馆每日一图 router.get('/bjp/apod', require('./routes/bjp/apod')); // 洛谷日报 router.get('/luogu/daily/:id?', require('./routes/luogu/daily')); // 决胜网 router.get('/juesheng', require('./routes/juesheng')); // 播客IBCラジオ イヤーマイッタマイッタ router.get('/maitta', require('./routes/maitta')); // 一些博客 // 敬维-以认真的态度做完美的事情: https://jingwei.link/ router.get('/blogs/jingwei.link', require('./routes/blogs/jingwei_link')); // 王垠的博客-当然我在扯淡 router.get('/blogs/wangyin', require('./routes/blogs/wangyin')); // 裏垢女子まとめ router.get('/uraaka-joshi', require('./routes/uraaka-joshi/uraaka-joshi')); router.get('/uraaka-joshi/:id', require('./routes/uraaka-joshi/uraaka-joshi-user')); // 西祠胡同 router.get('/xici/:id?', require('./routes/xici')); // 淘股吧论坛 router.get('/taoguba/index', require('./routes/taoguba/index')); router.get('/taoguba/user/:uid', require('./routes/taoguba/user')); // 今日热榜 router.get('/tophub/:id', require('./routes/tophub')); // 游戏时光 router.get('/vgtime/news', require('./routes/vgtime/news.js')); router.get('/vgtime/release', require('./routes/vgtime/release')); router.get('/vgtime/keyword/:keyword', require('./routes/vgtime/keyword')); // MP4吧 router.get('/mp4ba/:param', require('./routes/mp4ba')); // anitama router.get('/anitama/:channel?', require('./routes/anitama/channel')); // 親子王國 router.get('/babykingdom/:id/:order?', require('./routes/babykingdom')); // 四川大学 router.get('/scu/jwc/notice', require('./routes/universities/scu/jwc')); // 浙江工商大学 router.get('/zjgsu/tzgg', require('./routes/universities/zjgsu/tzgg/scripts')); router.get('/zjgsu/gsgg', require('./routes/universities/zjgsu/gsgg/scripts')); router.get('/zjgsu/xszq', require('./routes/universities/zjgsu/xszq/scripts')); // 大众点评 router.get('/dianping/user/:id?', require('./routes/dianping/user')); // 半月谈 router.get('/banyuetan/:name', require('./routes/banyuetan')); // 人民日报 router.get('/people/opinion/:id', require('./routes/people/opinion')); router.get('/people/env/:id', require('./routes/people/env')); router.get('/people/xjpjh/:keyword?/:year?', require('./routes/people/xjpjh')); // 北极星电力网 router.get('/bjx/huanbao', require('./routes/bjx/huanbao')); // gamersky router.get('/gamersky/news', require('./routes/gamersky/news')); router.get('/gamersky/ent/:category', require('./routes/gamersky/ent')); // 游研社 router.get('/yystv/category/:category', require('./routes/yystv/category')); // psnine router.get('/psnine/index', require('./routes/psnine/index')); router.get('/psnine/shuzhe', require('./routes/psnine/shuzhe')); router.get('/psnine/trade', require('./routes/psnine/trade')); router.get('/psnine/game', require('./routes/psnine/game')); router.get('/psnine/news', require('./routes/psnine/news')); // 浙江大学 router.get('/zju/physics/:type', require('./routes/universities/zju/physics')); router.get('/zju/grs/:type', require('./routes/universities/zju/grs')); router.get('/zju/career/:type', require('./routes/universities/zju/career')); // Infoq router.get('/infoq/recommend', require('./routes/infoq/recommend')); router.get('/infoq/topic/:id', require('./routes/infoq/topic')); // checkee router.get('/checkee/:dispdate', require('./routes/checkee/index')); // 艾瑞 router.get('/iresearch/report', require('./routes/iresearch/report')); // ZAKER router.get('/zaker/:type/:id', require('./routes/zaker/source')); // Matters router.get('/matters/topics', require('./routes/matters/topics')); router.get('/matters/latest', require('./routes/matters/latest')); router.get('/matters/hot', require('./routes/matters/hot')); router.get('/matters/tags/:tid', require('./routes/matters/tags')); router.get('/matters/author/:uid', require('./routes/matters/author')); // MobData router.get('/mobdata/report', require('./routes/mobdata/report')); // 谷雨 router.get('/tencent/guyu/channel/:name', require('./routes/tencent/guyu/channel')); // 古诗文网 router.get('/gushiwen/recommend', require('./routes/gushiwen/recommend')); // 电商在线 router.get('/imaijia/category/:category', require('./routes/imaijia/category')); // 21财经 router.get('/21caijing/channel/:name', require('./routes/21caijing/channel')); // 北京邮电大学 router.get('/bupt/yz/:type', require('./routes/universities/bupt/yz')); // VOCUS 方格子 router.get('/vocus/publication/:id', require('./routes/vocus/publication')); router.get('/vocus/user/:id', require('./routes/vocus/user')); // 一亩三分地 1point3acres router.get('/1point3acres/user/:id/threads', require('./routes/1point3acres/threads')); router.get('/1point3acres/user/:id/posts', require('./routes/1point3acres/posts')); // 广东海洋大学 router.get('/gdoujwc', require('./routes/universities/gdou/jwc/jwtz')); // 中国高清网 router.get('/gaoqingla/:tag?', require('./routes/gaoqingla/latest')); // 马良行 router.get('/mlhang', require('./routes/mlhang/latest')); // PlayStation Store router.get('/ps/list/:gridName', require('./routes/ps/list')); router.get('/ps/trophy/:id', require('./routes/ps/trophy')); // Nintendo router.get('/nintendo/eshop/jp', require('./routes/nintendo/eshop_jp')); router.get('/nintendo/eshop/hk', require('./routes/nintendo/eshop_hk')); router.get('/nintendo/eshop/us', require('./routes/nintendo/eshop_us')); router.get('/nintendo/news', require('./routes/nintendo/news')); router.get('/nintendo/direct', require('./routes/nintendo/direct')); // 世界卫生组织 router.get('/who/news-room/:type', require('./routes/who/news-room')); // 福利资源-met.red router.get('/metred/fuli', require('./routes/metred/fuli')); // MIT router.get('/mit/graduateadmissions/:type/:name', require('./routes/universities/mit/graduateadmissions')); // 毕马威 router.get('/kpmg/insights', require('./routes/kpmg/insights')); // Saraba1st router.get('/saraba1st/thread/:tid', require('./routes/saraba1st/thread')); // gradcafe router.get('/gradcafe/result/:type', require('./routes/gradcafe/result')); router.get('/gradcafe/result', require('./routes/gradcafe/result')); // The Economist router.get('/the-economist/gre-vocabulary', require('./routes/the-economist/gre-vocabulary')); router.get('/the-economist/:endpoint', require('./routes/the-economist/full')); // 鼠绘漫画 router.get('/shuhui/comics/:id', require('./routes/shuhui/comics')); // 朝日新聞中文网(简体中文版) router.get('/asahichinese-j/:category/:subCate', require('./routes/asahichinese-j/index')); router.get('/asahichinese-j/:category', require('./routes/asahichinese-j/index')); // 朝日新聞中文網(繁體中文版) router.get('/asahichinese-f/:category/:subCate', require('./routes/asahichinese-f/index')); router.get('/asahichinese-f/:category', require('./routes/asahichinese-f/index')); // 7x24小时快讯 router.get('/fx678/kx', require('./routes/fx678/kx')); // SoundCloud router.get('/soundcloud/tracks/:user', require('./routes/soundcloud/tracks')); // dilidili router.get('/dilidili/fanju/:id', require('./routes/dilidili/fanju')); // 且听风吟福利 router.get('/qtfyfl/:category', require('./routes/qtfyfl/category')); // 派代 router.get('/paidai', require('./routes/paidai/index')); router.get('/paidai/bbs', require('./routes/paidai/bbs')); router.get('/paidai/news', require('./routes/paidai/news')); // 中国银行 router.get('/boc/whpj/:format?', require('./routes/boc/whpj')); // 漫画db router.get('/manhuadb/comics/:id', require('./routes/manhuadb/comics')); // 观察者风闻话题 router.get('/guanchazhe/topic/:id', require('./routes/guanchazhe/topic')); // Hpoi 手办维基 router.get('/hpoi/info/:type?', require('./routes/hpoi/info')); router.get('/hpoi/:category/:words', require('./routes/hpoi')); // 通用CurseForge router.get('/curseforge/:gameid/:catagoryid/:projectid/files', require('./routes/curseforge/generalfiles')); // 西南财经大学 router.get('/swufe/seie/:type?', require('./routes/universities/swufe/seie')); // Wired router.get('/wired/tag/:tag', require('./routes/wired/tag')); // 语雀文档 router.get('/yuque/doc/:repo_id', require('./routes/yuque/doc')); // 飞地 router.get('/enclavebooks/category/:id?', require('./routes/enclavebooks/category')); router.get('/enclavebooks/user/:uid', require('./routes/enclavebooks/user.js')); router.get('/enclavebooks/collection/:uid', require('./routes/enclavebooks/collection.js')); // 色花堂 - 色花图片版块 router.get('/dsndsht23/picture/:subforumid', require('./routes/dsndsht23/pictures')); // 色花堂 - 原创bt电影 router.get('/dsndsht23/bt/:subforumid', require('./routes/dsndsht23/index')); router.get('/dsndsht23/:subforumid', require('./routes/dsndsht23/index')); router.get('/dsndsht23', require('./routes/dsndsht23/index')); // 数英网最新文章 router.get('/digitaling/index', require('./routes/digitaling/index')); // 数英网文章专题 router.get('/digitaling/articles/:category/:subcate', require('./routes/digitaling/article')); // 数英网项目专题 router.get('/digitaling/projects/:category', require('./routes/digitaling/project')); // Bing壁纸 router.get('/bing', require('./routes/bing/index')); // Maxjia News - DotA 2 router.get('/maxnews/dota2', require('./routes/maxnews/dota2')); // 柠檬 - 私房歌 router.get('/ningmeng/song', require('./routes/ningmeng/song')); // 紫竹张 router.get('/zzz', require('./routes/zzz/index')); // AlgoCasts router.get('/algocasts', require('./routes/algocasts/all')); // aqicn router.get('/aqicn/:city', require('./routes/aqicn/index')); // 猫眼电影 router.get('/maoyan/hot', require('./routes/maoyan/hot')); router.get('/maoyan/upcoming', require('./routes/maoyan/upcoming')); // cnBeta router.get('/cnbeta', require('./routes/cnbeta/home')); // 退伍士兵信息 router.get('/gov/veterans/bnxx', require('./routes/gov/veterans/bnxx')); router.get('/gov/veterans/zcjd', require('./routes/gov/veterans/zcjd')); router.get('/gov/veterans/index', require('./routes/gov/veterans/index')); // Dilbert Comic Strip router.get('/dilbert/strip', require('./routes/dilbert/strip')); // 游戏打折情报 router.get('/yxdzqb/:type', require('./routes/yxdzqb')); // 怪物猎人 router.get('/monsterhunter/update', require('./routes/monsterhunter/update')); // 005.tv router.get('/005tv/zx/latest', require('./routes/005tv/zx')); // Polimi News router.get('/polimi/news/:language?', require('./routes/polimi/news')); // dekudeals router.get('/dekudeals/:type', require('./routes/dekudeals')); // 直播吧 router.get('/zhibo8/forum/:id', require('./routes/zhibo8/forum')); router.get('/zhibo8/post/:id', require('./routes/zhibo8/post')); // 东方网-上海 router.get('/eastday/sh', require('./routes/eastday/sh')); // Metacritic router.get('/metacritic/release/:platform/:type/:sort?', require('./routes/metacritic/release')); // 快科技(原驱动之家) router.get('/kkj/news', require('./routes/kkj/news')); // Outage.Report router.get('/outagereport/:name/:count?', require('./routes/outagereport/service')); // sixthtone router.get('/sixthtone/news', require('./routes/sixthtone/news')); // AI研习社 router.get('/aiyanxishe/:id/:sort?', require('./routes/aiyanxishe/home')); // 飞客茶馆优惠信息 router.get('/flyertea/preferential', require('./routes/flyertea/preferential')); router.get('/flyertea/creditcard/:bank', require('./routes/flyertea/creditcard')); // 中国广播 router.get('/radio/:channelname/:name', require('./routes/radio/radio')); // TOPYS router.get('/topys/:category', require('./routes/topys/article')); // 巴比特作者专栏 router.get('/8btc/:authorid', require('./routes/8btc/author')); // VueVlog router.get('/vuevideo/:userid', require('./routes/vuevideo/user')); // 证监会 router.get('/csrc/news/:suffix?', require('./routes/csrc/news')); router.get('/csrc/fashenwei', require('./routes/csrc/fashenwei')); // LWN.net Alerts router.get('/lwn/alerts/:distributor', require('./routes/lwn/alerts')); // 唱吧 router.get('/changba/:userid', require('./routes/changba/user')); // 掌上英雄联盟 router.get('/lolapp/recommend', require('./routes/lolapp/recommend')); // 左岸读书 router.get('/zreading', require('./routes/zreading/home')); // NBA router.get('/nba/app_news', require('./routes/nba/app_news')); // 天津产权交易中心 router.get('/tprtc/cqzr', require('./routes/tprtc/cqzr')); router.get('/tprtc/qyzc', require('./routes/tprtc/qyzc')); router.get('/tprtc/news', require('./routes/tprtc/news')); // ArchDaily router.get('/archdaily', require('./routes/archdaily/home')); // aptonic Dropzone actions router.get('/aptonic/action', require('./routes/aptonic/action')); // 印记中文周刊 router.get('/docschina/jsweekly', require('./routes/docschina/jsweekly')); // im2maker router.get('/im2maker/:channel?', require('./routes/im2maker/index')); // 巨潮资讯 router.get('/cninfo/stock_announcement/:code', require('./routes/cninfo/stock_announcement')); router.get('/cninfo/fund_announcement/:code?/:searchkey?', require('./routes/cninfo/fund_announcement')); // 中央纪委国家监委网站 router.get('/ccdi/scdc', require('./routes/ccdi/scdc')); // 香水时代 router.get('/nosetime/:id/:type/:sort?', require('./routes/nosetime/comment')); router.get('/nosetime/home', require('./routes/nosetime/home')); // 涂鸦王国 router.get('/gracg/:user/:love?', require('./routes/gracg/user')); // 大侠阿木 router.get('/daxiaamu/home', require('./routes/daxiaamu/home')); // 美团技术团队 router.get('/meituan/tech/home', require('./routes//meituan/tech/home')); // 码农网 router.get('/codeceo/home', require('./routes/codeceo/home')); router.get('/codeceo/:type/:category?', require('./routes/codeceo/category')); // BOF router.get('/bof/home', require('./routes/bof/home')); // 爱发电 router.get('/afdian/explore/:type?/:category?', require('./routes/afdian/explore')); router.get('/afdian/dynamic/:uid', require('./routes/afdian/dynamic')); // 《明日方舟》游戏 router.get('/arknights/news', require('./routes/arknights/news')); // ff14 router.get('/ff14/ff14_zh/:type', require('./routes/ff14/ff14_zh')); // 学堂在线 router.get('/xuetangx/course/:cid/:type', require('./routes/xuetangx/course_info')); router.get('/xuetangx/course/list/:mode/:credential/:status/:type?', require('./routes/xuetangx/course_list')); // wikihow router.get('/wikihow/index', require('./routes/wikihow/index.js')); router.get('/wikihow/category/:category/:type', require('./routes/wikihow/category.js')); // 正版中国 router.get('/getitfree/category/:category?', require('./routes/getitfree/category.js')); router.get('/getitfree/search/:keyword?', require('./routes/getitfree/search.js')); // 万联网 router.get('/10000link/news/:category?', require('./routes/10000link/news')); // 站酷 router.get('/zcool/recommend/:type', require('./routes/zcool/recommend')); router.get('/zcool/top', require('./routes/zcool/top')); router.get('/zcool/user/:uname', require('./routes/zcool/user')); // 第一财经 router.get('/yicai/brief', require('./routes/yicai/brief.js')); // 一兜糖 router.get('/yidoutang/index', require('./routes/yidoutang/index.js')); router.get('/yidoutang/guide', require('./routes/yidoutang/guide.js')); router.get('/yidoutang/mtest', require('./routes/yidoutang/mtest.js')); router.get('/yidoutang/case/:type', require('./routes/yidoutang/case.js')); // 开眼 router.get('/kaiyan/index', require('./routes/kaiyan/index')); // 龙空 router.get('/lkong/forum/:id', require('./routes/lkong/forum')); router.get('/lkong/thread/:id', require('./routes/lkong/thread')); // router.get('/lkong/user/:id', require('./routes/lkong/user')); // 乃木坂46官网 router.get('/nogizaka46/news', require('./routes/nogizaka46/news')); // 阿里云 router.get('/aliyun/database_month', require('./routes/aliyun/database_month')); // 礼物说 router.get('/liwushuo/index', require('./routes/liwushuo/index.js')); // 故事fm router.get('/storyfm/index', require('./routes/storyfm/index.js')); // 中国日报 router.get('/chinadaily/english/:category', require('./routes/chinadaily/english.js')); // leboncoin router.get('/leboncoin/ad/:query', require('./routes/leboncoin/ad.js')); // DHL router.get('/dhl/:id', require('./routes/dhl/shipment-tracking')); // Japanpost router.get('/japanpost/:reqCode', require('./routes/japanpost/index')); // 中华人民共和国商务部 router.get('/mofcom/article/:suffix', require('./routes/mofcom/article')); // 字幕库 router.get('/zimuku/:type?', require('./routes/zimuku/index')); // 品玩 router.get('/pingwest/status', require('./routes/pingwest/status')); router.get('/pingwest/tag/:tag/:type', require('./routes/pingwest/tag')); router.get('/pingwest/user/:uid/:type?', require('./routes/pingwest/user')); // Hanime router.get('/hanime/video', require('./routes/hanime/video')); // 篝火营地 router.get('/gouhuo/news/:category', require('./routes/gouhuo')); router.get('/gouhuo/strategy', require('./routes/gouhuo/strategy')); // Soul router.get('/soul/:id', require('./routes/soul')); // 单向空间 router.get('/owspace/read/:type?', require('./routes/owspace/read')); // eleme router.get('/eleme/open/announce', require('./routes/eleme/open/announce')); router.get('/eleme/open-be/announce', require('./routes/eleme/open-be/announce')); // wechat-open router.get('/wechat-open/community/xcx-announce', require('./routes/wechat-open/community/xcx-announce')); router.get('/wechat-open/community/xyx-announce', require('./routes/wechat-open/community/xyx-announce')); router.get('/wechat-open/community/pay-announce', require('./routes/wechat-open/community/pay-announce')); router.get('/wechat-open/pay/announce', require('./routes/wechat-open/pay/announce')); // 微店 router.get('/weidian/goods/:id', require('./routes/weidian/goods')); // 有赞 router.get('/youzan/goods/:id', require('./routes/youzan/goods')); // 币世界快讯 router.get('/bishijie/kuaixun', require('./routes/bishijie/kuaixun')); // 顺丰丰桥 router.get('/sf/sffq-announce', require('./routes/sf/sffq-announce')); // 缺书网 router.get('/queshu/sale', require('./routes/queshu/sale')); router.get('/queshu/book/:bookid', require('./routes/queshu/book')); // LaTeX 开源小屋 router.get('/latexstudio/home', require('./routes/latexstudio/home')); // 上证债券信息网 - 可转换公司债券公告 router.get('/sse/convert/:query?', require('./routes/sse/convert')); // 前端艺术家每日整理&&飞冰早报 router.get('/jskou/:type?', require('./routes/jskou/index')); // 国家应急广播 router.get('/cneb/yjxx', require('./routes/cneb/yjxx')); router.get('/cneb/guoneinews', require('./routes/cneb/guoneinews')); // 邮箱 router.get('/mail/imap/:email', require('./routes/mail/imap')); // 智联招聘 router.get('/zhilian/:city/:keyword', require('./routes/zhilian/index')); // 北华航天工业学院 - 新闻 router.get('/nciae/news', require('./routes/universities/nciae/news')); // 北华航天工业学院 - 通知公告 router.get('/nciae/tzgg', require('./routes/universities/nciae/tzgg')); // 北华航天工业学院 - 学术信息 router.get('/nciae/xsxx', require('./routes/universities/nciae/xsxx')); // cfan router.get('/cfan/news', require('./routes/cfan/news')); // 搜狐 - 搜狐号 router.get('/sohu/mp/:id', require('./routes/sohu/mp')); // 厚墨书源索引 router.get('/houmo/:code?', require('./routes/houmo/booksource')); // 腾讯企鹅号 router.get('/tencent/news/author/:mid', require('./routes/tencent/news/author')); module.exports = router;
import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { addPost } from '../../actions/post'; const PostForm = ({ addPost }) => { const [text, setText] = useState(''); return ( <div className='post-form'> <div className='bg-warning p'> <h3>Say Something...</h3> </div> <form className='form my-1' onSubmit={e => { e.preventDefault(); addPost({ text }); setText(''); }} > <textarea name='text' cols='30' rows='5' placeholder='Create a post' value={text} onChange={e => setText(e.target.value)} required /> <input type='submit' className='btn btn-dark my-1' value='Submit' /> </form> </div> ); }; PostForm.propTypes = { addPost: PropTypes.func.isRequired }; export default connect( null, { addPost } )(PostForm);
module.exports.init = (config, cb) => { const readF = cb => cb(null, process.env) cb(null, {read: readF}) }
var currentID; var plot; var ideas; var hiddenIdeas; var fill = true; var legend = true; function setData(data){ if (data == null) { alert("No data/axes defined"); } else if (data.length == 0) { alert("Data is not displayable (maybe not evaluated yet)"); } else { ideas = data; for (var i = 0; i < ideas.length; i++) { ideas[i].label = getLegendLabel(ideas[i]); } hiddenIdeas = []; drawPlot(); } } function drawPlot() { var options = { series: { bubbles: { active: true, show: true, fill: fill, lineWidth: 2 } }, grid: { clickable: true, autoHighlight: false }, legend: { show: true, container: jQuery('#legend') }, zoom: { interactive: true, trigger: "dblclick", // or "click" for single click amount: 2.0 // 2 = 200% (zoom in), 0.5 = 50% (zoom out) }, pan: { interactive: true }, xaxis: { zoomRange: [0, 200], panRange: null, min: 0, max: 110 }, yaxis: { zoomRange: [0, 200], panRange: null, min: 0, max: 110 } }; plot = jQuery.plot(jQuery("#placeholder"), ideas, options); jQuery("#placeholder").bind("plotclick", selectListener); } function redrawPlot() { jQuery("#placeholder").unbind("plotclick"); drawPlot(); } function selectListener(event, pos, item) { if( item ) { selectIdea(item.series.cid); } } function selectIdea(id) { currentID = id; print(id); } function unfill() { fill=!fill; ideas = ideas.concat(hiddenIdeas); hiddenIdeas = []; redrawPlot(); } function setlegend() { legend = !legend; ideas = ideas.concat(hiddenIdeas); hiddenIdeas = []; if(legend) { for(var i = 0; i < ideas.length; i++) { ideas[i].label = getLegendLabel(ideas[i]); } } else { for(var i = 0; i < ideas.length; i++) { ideas[i].label = getSmallLegendLabel(ideas[i]); } } redrawPlot(); } function plusBubbleSize() { changeSize(ideas,10); changeSize(hiddenIdeas,10); plot.setData(ideas); plot.draw(); } function minusBubbleSize() { changeSize(ideas,-10); changeSize(hiddenIdeas,-10); plot.setData(ideas); plot.draw(); } function changeSize(list,percent) { for( var i=0; i<list.length; i++ ) { list[i].data[0][2] = list[i].data[0][2] + ((list[i].data[0][2]/100)*percent); } } function getLegendLabel(item) { return "<table width='100%'><tr><td width='250px'>" + "<a href='#' onclick='selectIdea("+item.cid+");' style='text-decoration:none;color:#555555'><b>"+item.title+"</b><br/>von <i>"+item.author+"</i> am "+item.created+"</a>"+ "</td><td><input type='checkbox' checked='checked' disabled='disabled' onclick='legendSelection("+item.cid+")' /></td></tr></table>"; } function getSmallLegendLabel(item) { return "<table width='100%'><tr><td width='250px'>" + "<a href='#' onclick='selectIdea("+item.cid+");' style='text-decoration:none;color:#555555'><b>"+item.title+"</b></a>"+ "</td><td><input type='checkbox' checked='checked' disabled='disabled' onclick='legendSelection("+item.cid+")' /></td></tr></table>"; } function legendSelection(id){ var z = -1; for( var i=0; i < ideas.length; i++ ) { if(ideas[i].cid == id) { z = i; break; } } if(z != -1) { hiddenIdeas.push(ideas[z]); ideas.splice(z,1); } else { ideas.push(getHiddenIdeaById(id)); } plot.setData(ideas); plot.draw(); } function getHiddenIdeaById(id) { var idea = null; for( var i=0; i<hiddenIdeas.length; i++ ) { if(hiddenIdeas[i].cid == id) { idea = hiddenIdeas[i]; hiddenIdeas.splice(i,1); break; } } return idea; }
/*! * reveal.js * http://revealjs.com * MIT licensed * * Copyright (C) 2018 Hakim El Hattab, http://hakim.se */ (function( root, factory ) { if( typeof define === 'function' && define.amd ) { // AMD. Register as an anonymous module. define( function() { root.Reveal = factory(); return root.Reveal; } ); } else if( typeof exports === 'object' ) { // Node. Does not work with strict CommonJS. module.exports = factory(); } else { // Browser globals. root.Reveal = factory(); } }( this, function() { 'use strict'; var Reveal; // The reveal.js version var VERSION = '3.7.0'; var SLIDES_SELECTOR = '.slides section', HORIZONTAL_SLIDES_SELECTOR = '.slides>section', VERTICAL_SLIDES_SELECTOR = '.slides>section.present>section', HOME_SLIDE_SELECTOR = '.slides>section:first-of-type', UA = navigator.userAgent, // Configuration defaults, can be overridden at initialization time config = { // The "normal" size of the presentation, aspect ratio will be preserved // when the presentation is scaled to fit different resolutions width: 960, height: 700, // Factor of the display size that should remain empty around the content margin: 0.04, // Bounds for smallest/largest possible scale to apply to content minScale: 0.2, maxScale: 2.0, // Display presentation control arrows controls: true, // Help the user learn the controls by providing hints, for example by // bouncing the down arrow when they first encounter a vertical slide controlsTutorial: true, // Determines where controls appear, "edges" or "bottom-right" controlsLayout: 'bottom-right', // Visibility rule for backwards navigation arrows; "faded", "hidden" // or "visible" controlsBackArrows: 'faded', // Display a presentation progress bar progress: true, // Display the page number of the current slide slideNumber: false, // Use 1 based indexing for # links to match slide number (default is zero // based) hashOneBasedIndex: false, // Determine which displays to show the slide number on showSlideNumber: 'all', // Push each slide change to the browser history history: false, // Enable keyboard shortcuts for navigation keyboard: true, // Optional function that blocks keyboard events when retuning false keyboardCondition: null, // Enable the slide overview mode overview: true, // Disables the default reveal.js slide layout so that you can use // custom CSS layout disableLayout: false, // Vertical centering of slides center: true, // Enables touch navigation on devices with touch input touch: true, // Loop the presentation loop: false, // Change the presentation direction to be RTL rtl: false, // Randomizes the order of slides each time the presentation loads shuffle: false, // Turns fragments on and off globally fragments: true, // Flags whether to include the current fragment in the URL, // so that reloading brings you to the same fragment position fragmentInURL: false, // Flags if the presentation is running in an embedded mode, // i.e. contained within a limited portion of the screen embedded: false, // Flags if we should show a help overlay when the question-mark // key is pressed help: true, // Flags if it should be possible to pause the presentation (blackout) pause: true, // Flags if speaker notes should be visible to all viewers showNotes: false, // Global override for autolaying embedded media (video/audio/iframe) // - null: Media will only autoplay if data-autoplay is present // - true: All media will autoplay, regardless of individual setting // - false: No media will autoplay, regardless of individual setting autoPlayMedia: null, // Controls automatic progression to the next slide // - 0: Auto-sliding only happens if the data-autoslide HTML attribute // is present on the current slide or fragment // - 1+: All slides will progress automatically at the given interval // - false: No auto-sliding, even if data-autoslide is present autoSlide: 0, // Stop auto-sliding after user input autoSlideStoppable: true, // Use this method for navigation when auto-sliding (defaults to navigateNext) autoSlideMethod: null, // Specify the average time in seconds that you think you will spend // presenting each slide. This is used to show a pacing timer in the // speaker view defaultTiming: null, // Enable slide navigation via mouse wheel mouseWheel: true, // Apply a 3D roll to links on hover rollingLinks: false, // Hides the address bar on mobile devices hideAddressBar: true, // Opens links in an iframe preview overlay // Add `data-preview-link` and `data-preview-link="false"` to customise each link // individually previewLinks: false, // Exposes the reveal.js API through window.postMessage postMessage: true, // Dispatches all reveal.js events to the parent window through postMessage postMessageEvents: false, // Focuses body when page changes visibility to ensure keyboard shortcuts work focusBodyOnPageVisibilityChange: true, // Transition style transition: 'slide', // none/fade/slide/convex/concave/zoom // Transition speed transitionSpeed: 'default', // default/fast/slow // Transition style for full page slide backgrounds backgroundTransition: 'fade', // none/fade/slide/convex/concave/zoom // Parallax background image parallaxBackgroundImage: '', // CSS syntax, e.g. "a.jpg" // Parallax background size parallaxBackgroundSize: '', // CSS syntax, e.g. "3000px 2000px" // Parallax background repeat parallaxBackgroundRepeat: '', // repeat/repeat-x/repeat-y/no-repeat/initial/inherit // Parallax background position parallaxBackgroundPosition: '', // CSS syntax, e.g. "top left" // Amount of pixels to move the parallax background per slide step parallaxBackgroundHorizontal: null, parallaxBackgroundVertical: null, // The maximum number of pages a single slide can expand onto when printing // to PDF, unlimited by default pdfMaxPagesPerSlide: Number.POSITIVE_INFINITY, // Prints each fragment on a separate slide pdfSeparateFragments: true, // Offset used to reduce the height of content within exported PDF pages. // This exists to account for environment differences based on how you // print to PDF. CLI printing options, like phantomjs and wkpdf, can end // on precisely the total height of the document whereas in-browser // printing has to end one pixel before. pdfPageHeightOffset: -1, // Number of slides away from the current that are visible viewDistance: 3, // The display mode that will be used to show slides display: 'block', // Script dependencies to load dependencies: [] }, // Flags if Reveal.initialize() has been called initialized = false, // Flags if reveal.js is loaded (has dispatched the 'ready' event) loaded = false, // Flags if the overview mode is currently active overview = false, // Holds the dimensions of our overview slides, including margins overviewSlideWidth = null, overviewSlideHeight = null, // The horizontal and vertical index of the currently active slide indexh, indexv, // The previous and current slide HTML elements previousSlide, currentSlide, previousBackground, // Remember which directions that the user has navigated towards hasNavigatedRight = false, hasNavigatedDown = false, // Slides may hold a data-state attribute which we pick up and apply // as a class to the body. This list contains the combined state of // all current slides. state = [], // The current scale of the presentation (see width/height config) scale = 1, // CSS transform that is currently applied to the slides container, // split into two groups slidesTransform = { layout: '', overview: '' }, // Cached references to DOM elements dom = {}, // Features supported by the browser, see #checkCapabilities() features = {}, // Client is a mobile device, see #checkCapabilities() isMobileDevice, // Client is a desktop Chrome, see #checkCapabilities() isChrome, // Throttles mouse wheel navigation lastMouseWheelStep = 0, // Delays updates to the URL due to a Chrome thumbnailer bug writeURLTimeout = 0, // Flags if the interaction event listeners are bound eventsAreBound = false, // The current auto-slide duration autoSlide = 0, // Auto slide properties autoSlidePlayer, autoSlideTimeout = 0, autoSlideStartTime = -1, autoSlidePaused = false, // Holds information about the currently ongoing touch input touch = { startX: 0, startY: 0, startSpan: 0, startCount: 0, captured: false, threshold: 40 }, // Holds information about the keyboard shortcuts keyboardShortcuts = { 'N , SPACE': 'Next slide', 'P': 'Previous slide', '&#8592; , H': 'Navigate left', '&#8594; , L': 'Navigate right', '&#8593; , K': 'Navigate up', '&#8595; , J': 'Navigate down', 'Home': 'First slide', 'End': 'Last slide', 'B , .': 'Pause', 'F': 'Fullscreen', 'ESC, O': 'Slide overview' }, // Holds custom key code mappings registeredKeyBindings = {}; /** * Starts up the presentation if the client is capable. */ function initialize( options ) { // Make sure we only initialize once if( initialized === true ) return; initialized = true; checkCapabilities(); if( !features.transforms2d && !features.transforms3d ) { document.body.setAttribute( 'class', 'no-transforms' ); // Since JS won't be running any further, we load all lazy // loading elements upfront var images = toArray( document.getElementsByTagName( 'img' ) ), iframes = toArray( document.getElementsByTagName( 'iframe' ) ); var lazyLoadable = images.concat( iframes ); for( var i = 0, len = lazyLoadable.length; i < len; i++ ) { var element = lazyLoadable[i]; if( element.getAttribute( 'data-src' ) ) { element.setAttribute( 'src', element.getAttribute( 'data-src' ) ); element.removeAttribute( 'data-src' ); } } // If the browser doesn't support core features we won't be // using JavaScript to control the presentation return; } // Cache references to key DOM elements dom.wrapper = document.querySelector( '.reveal' ); dom.slides = document.querySelector( '.reveal .slides' ); // Force a layout when the whole page, incl fonts, has loaded window.addEventListener( 'load', layout, false ); var query = Reveal.getQueryHash(); // Do not accept new dependencies via query config to avoid // the potential of malicious script injection if( typeof query['dependencies'] !== 'undefined' ) delete query['dependencies']; // Copy options over to our config object extend( config, options ); extend( config, query ); // Hide the address bar in mobile browsers hideAddressBar(); // Loads the dependencies and continues to #start() once done load(); } /** * Inspect the client to see what it's capable of, this * should only happens once per runtime. */ function checkCapabilities() { isMobileDevice = /(iphone|ipod|ipad|android)/gi.test( UA ); isChrome = /chrome/i.test( UA ) && !/edge/i.test( UA ); var testElement = document.createElement( 'div' ); features.transforms3d = 'WebkitPerspective' in testElement.style || 'MozPerspective' in testElement.style || 'msPerspective' in testElement.style || 'OPerspective' in testElement.style || 'perspective' in testElement.style; features.transforms2d = 'WebkitTransform' in testElement.style || 'MozTransform' in testElement.style || 'msTransform' in testElement.style || 'OTransform' in testElement.style || 'transform' in testElement.style; features.requestAnimationFrameMethod = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame; features.requestAnimationFrame = typeof features.requestAnimationFrameMethod === 'function'; features.canvas = !!document.createElement( 'canvas' ).getContext; // Transitions in the overview are disabled in desktop and // Safari due to lag features.overviewTransitions = !/Version\/[\d\.]+.*Safari/.test( UA ); // Flags if we should use zoom instead of transform to scale // up slides. Zoom produces crisper results but has a lot of // xbrowser quirks so we only use it in whitelsited browsers. features.zoom = 'zoom' in testElement.style && !isMobileDevice && ( isChrome || /Version\/[\d\.]+.*Safari/.test( UA ) ); } /** * Loads the dependencies of reveal.js. Dependencies are * defined via the configuration option 'dependencies' * and will be loaded prior to starting/binding reveal.js. * Some dependencies may have an 'async' flag, if so they * will load after reveal.js has been started up. */ function load() { var scripts = [], scriptsAsync = [], scriptsToPreload = 0; // Called once synchronous scripts finish loading function proceed() { if( scriptsAsync.length ) { // Load asynchronous scripts head.js.apply( null, scriptsAsync ); } start(); } function loadScript( s ) { head.ready( s.src.match( /([\w\d_\-]*)\.?js(\?[\w\d.=&]*)?$|[^\\\/]*$/i )[0], function() { // Extension may contain callback functions if( typeof s.callback === 'function' ) { s.callback.apply( this ); } if( --scriptsToPreload === 0 ) { proceed(); } }); } for( var i = 0, len = config.dependencies.length; i < len; i++ ) { var s = config.dependencies[i]; // Load if there's no condition or the condition is truthy if( !s.condition || s.condition() ) { if( s.async ) { scriptsAsync.push( s.src ); } else { scripts.push( s.src ); } loadScript( s ); } } if( scripts.length ) { scriptsToPreload = scripts.length; // Load synchronous scripts head.js.apply( null, scripts ); } else { proceed(); } } /** * Starts up reveal.js by binding input events and navigating * to the current URL deeplink if there is one. */ function start() { loaded = true; // Make sure we've got all the DOM elements we need setupDOM(); // Listen to messages posted to this window setupPostMessage(); // Prevent the slides from being scrolled out of view setupScrollPrevention(); // Resets all vertical slides so that only the first is visible resetVerticalSlides(); // Updates the presentation to match the current configuration values configure(); // Read the initial hash readURL(); // Update all backgrounds updateBackground( true ); // Notify listeners that the presentation is ready but use a 1ms // timeout to ensure it's not fired synchronously after #initialize() setTimeout( function() { // Enable transitions now that we're loaded dom.slides.classList.remove( 'no-transition' ); dom.wrapper.classList.add( 'ready' ); dispatchEvent( 'ready', { 'indexh': indexh, 'indexv': indexv, 'currentSlide': currentSlide } ); }, 1 ); // Special setup and config is required when printing to PDF if( isPrintingPDF() ) { removeEventListeners(); // The document needs to have loaded for the PDF layout // measurements to be accurate if( document.readyState === 'complete' ) { setupPDF(); } else { window.addEventListener( 'load', setupPDF ); } } } /** * Finds and stores references to DOM elements which are * required by the presentation. If a required element is * not found, it is created. */ function setupDOM() { // Prevent transitions while we're loading dom.slides.classList.add( 'no-transition' ); if( isMobileDevice ) { dom.wrapper.classList.add( 'no-hover' ); } else { dom.wrapper.classList.remove( 'no-hover' ); } if( /iphone/gi.test( UA ) ) { dom.wrapper.classList.add( 'ua-iphone' ); } else { dom.wrapper.classList.remove( 'ua-iphone' ); } // Background element dom.background = createSingletonNode( dom.wrapper, 'div', 'backgrounds', null ); // Progress bar dom.progress = createSingletonNode( dom.wrapper, 'div', 'progress', '<span></span>' ); dom.progressbar = dom.progress.querySelector( 'span' ); // Arrow controls dom.controls = createSingletonNode( dom.wrapper, 'aside', 'controls', '<button class="navigate-left" aria-label="previous slide"><div class="controls-arrow"></div></button>' + '<button class="navigate-right" aria-label="next slide"><div class="controls-arrow"></div></button>' + '<button class="navigate-up" aria-label="above slide"><div class="controls-arrow"></div></button>' + '<button class="navigate-down" aria-label="below slide"><div class="controls-arrow"></div></button>' ); // Slide number dom.slideNumber = createSingletonNode( dom.wrapper, 'div', 'slide-number', '' ); // Element containing notes that are visible to the audience dom.speakerNotes = createSingletonNode( dom.wrapper, 'div', 'speaker-notes', null ); dom.speakerNotes.setAttribute( 'data-prevent-swipe', '' ); dom.speakerNotes.setAttribute( 'tabindex', '0' ); // Overlay graphic which is displayed during the paused mode dom.pauseOverlay = createSingletonNode( dom.wrapper, 'div', 'pause-overlay', '<button class="resume-button">Resume presentation</button>' ); dom.resumeButton = dom.pauseOverlay.querySelector( '.resume-button' ); dom.wrapper.setAttribute( 'role', 'application' ); // There can be multiple instances of controls throughout the page dom.controlsLeft = toArray( document.querySelectorAll( '.navigate-left' ) ); dom.controlsRight = toArray( document.querySelectorAll( '.navigate-right' ) ); dom.controlsUp = toArray( document.querySelectorAll( '.navigate-up' ) ); dom.controlsDown = toArray( document.querySelectorAll( '.navigate-down' ) ); dom.controlsPrev = toArray( document.querySelectorAll( '.navigate-prev' ) ); dom.controlsNext = toArray( document.querySelectorAll( '.navigate-next' ) ); // The right and down arrows in the standard reveal.js controls dom.controlsRightArrow = dom.controls.querySelector( '.navigate-right' ); dom.controlsDownArrow = dom.controls.querySelector( '.navigate-down' ); dom.statusDiv = createStatusDiv(); } /** * Creates a hidden div with role aria-live to announce the * current slide content. Hide the div off-screen to make it * available only to Assistive Technologies. * * @return {HTMLElement} */ function createStatusDiv() { var statusDiv = document.getElementById( 'aria-status-div' ); if( !statusDiv ) { statusDiv = document.createElement( 'div' ); statusDiv.style.position = 'absolute'; statusDiv.style.height = '1px'; statusDiv.style.width = '1px'; statusDiv.style.overflow = 'hidden'; statusDiv.style.clip = 'rect( 1px, 1px, 1px, 1px )'; statusDiv.setAttribute( 'id', 'aria-status-div' ); statusDiv.setAttribute( 'aria-live', 'polite' ); statusDiv.setAttribute( 'aria-atomic','true' ); dom.wrapper.appendChild( statusDiv ); } return statusDiv; } /** * Converts the given HTML element into a string of text * that can be announced to a screen reader. Hidden * elements are excluded. */ function getStatusText( node ) { var text = ''; // Text node if( node.nodeType === 3 ) { text += node.textContent; } // Element node else if( node.nodeType === 1 ) { var isAriaHidden = node.getAttribute( 'aria-hidden' ); var isDisplayHidden = window.getComputedStyle( node )['display'] === 'none'; if( isAriaHidden !== 'true' && !isDisplayHidden ) { toArray( node.childNodes ).forEach( function( child ) { text += getStatusText( child ); } ); } } return text; } /** * Configures the presentation for printing to a static * PDF. */ function setupPDF() { var slideSize = getComputedSlideSize( window.innerWidth, window.innerHeight ); // Dimensions of the PDF pages var pageWidth = Math.floor( slideSize.width * ( 1 + config.margin ) ), pageHeight = Math.floor( slideSize.height * ( 1 + config.margin ) ); // Dimensions of slides within the pages var slideWidth = slideSize.width, slideHeight = slideSize.height; // Let the browser know what page size we want to print injectStyleSheet( '@page{size:'+ pageWidth +'px '+ pageHeight +'px; margin: 0px;}' ); // Limit the size of certain elements to the dimensions of the slide injectStyleSheet( '.reveal section>img, .reveal section>video, .reveal section>iframe{max-width: '+ slideWidth +'px; max-height:'+ slideHeight +'px}' ); document.body.classList.add( 'print-pdf' ); document.body.style.width = pageWidth + 'px'; document.body.style.height = pageHeight + 'px'; // Make sure stretch elements fit on slide layoutSlideContents( slideWidth, slideHeight ); // Add each slide's index as attributes on itself, we need these // indices to generate slide numbers below toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ).forEach( function( hslide, h ) { hslide.setAttribute( 'data-index-h', h ); if( hslide.classList.contains( 'stack' ) ) { toArray( hslide.querySelectorAll( 'section' ) ).forEach( function( vslide, v ) { vslide.setAttribute( 'data-index-h', h ); vslide.setAttribute( 'data-index-v', v ); } ); } } ); // Slide and slide background layout toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR ) ).forEach( function( slide ) { // Vertical stacks are not centred since their section // children will be if( slide.classList.contains( 'stack' ) === false ) { // Center the slide inside of the page, giving the slide some margin var left = ( pageWidth - slideWidth ) / 2, top = ( pageHeight - slideHeight ) / 2; var contentHeight = slide.scrollHeight; var numberOfPages = Math.max( Math.ceil( contentHeight / pageHeight ), 1 ); // Adhere to configured pages per slide limit numberOfPages = Math.min( numberOfPages, config.pdfMaxPagesPerSlide ); // Center slides vertically if( numberOfPages === 1 && config.center || slide.classList.contains( 'center' ) ) { top = Math.max( ( pageHeight - contentHeight ) / 2, 0 ); } // Wrap the slide in a page element and hide its overflow // so that no page ever flows onto another var page = document.createElement( 'div' ); page.className = 'pdf-page'; page.style.height = ( ( pageHeight + config.pdfPageHeightOffset ) * numberOfPages ) + 'px'; slide.parentNode.insertBefore( page, slide ); page.appendChild( slide ); // Position the slide inside of the page slide.style.left = left + 'px'; slide.style.top = top + 'px'; slide.style.width = slideWidth + 'px'; if( slide.slideBackgroundElement ) { page.insertBefore( slide.slideBackgroundElement, slide ); } // Inject notes if `showNotes` is enabled if( config.showNotes ) { // Are there notes for this slide? var notes = getSlideNotes( slide ); if( notes ) { var notesSpacing = 8; var notesLayout = typeof config.showNotes === 'string' ? config.showNotes : 'inline'; var notesElement = document.createElement( 'div' ); notesElement.classList.add( 'speaker-notes' ); notesElement.classList.add( 'speaker-notes-pdf' ); notesElement.setAttribute( 'data-layout', notesLayout ); notesElement.innerHTML = notes; if( notesLayout === 'separate-page' ) { page.parentNode.insertBefore( notesElement, page.nextSibling ); } else { notesElement.style.left = notesSpacing + 'px'; notesElement.style.bottom = notesSpacing + 'px'; notesElement.style.width = ( pageWidth - notesSpacing*2 ) + 'px'; page.appendChild( notesElement ); } } } // Inject slide numbers if `slideNumbers` are enabled if( config.slideNumber && /all|print/i.test( config.showSlideNumber ) ) { var slideNumberH = parseInt( slide.getAttribute( 'data-index-h' ), 10 ) + 1, slideNumberV = parseInt( slide.getAttribute( 'data-index-v' ), 10 ) + 1; var numberElement = document.createElement( 'div' ); numberElement.classList.add( 'slide-number' ); numberElement.classList.add( 'slide-number-pdf' ); numberElement.innerHTML = formatSlideNumber( slideNumberH, '.', slideNumberV ); page.appendChild( numberElement ); } // Copy page and show fragments one after another if( config.pdfSeparateFragments ) { // Each fragment 'group' is an array containing one or more // fragments. Multiple fragments that appear at the same time // are part of the same group. var fragmentGroups = sortFragments( page.querySelectorAll( '.fragment' ), true ); var previousFragmentStep; var previousPage; fragmentGroups.forEach( function( fragments ) { // Remove 'current-fragment' from the previous group if( previousFragmentStep ) { previousFragmentStep.forEach( function( fragment ) { fragment.classList.remove( 'current-fragment' ); } ); } // Show the fragments for the current index fragments.forEach( function( fragment ) { fragment.classList.add( 'visible', 'current-fragment' ); } ); // Create a separate page for the current fragment state var clonedPage = page.cloneNode( true ); page.parentNode.insertBefore( clonedPage, ( previousPage || page ).nextSibling ); previousFragmentStep = fragments; previousPage = clonedPage; } ); // Reset the first/original page so that all fragments are hidden fragmentGroups.forEach( function( fragments ) { fragments.forEach( function( fragment ) { fragment.classList.remove( 'visible', 'current-fragment' ); } ); } ); } // Show all fragments else { toArray( page.querySelectorAll( '.fragment:not(.fade-out)' ) ).forEach( function( fragment ) { fragment.classList.add( 'visible' ); } ); } } } ); // Notify subscribers that the PDF layout is good to go dispatchEvent( 'pdf-ready' ); } /** * This is an unfortunate necessity. Some actions – such as * an input field being focused in an iframe or using the * keyboard to expand text selection beyond the bounds of * a slide – can trigger our content to be pushed out of view. * This scrolling can not be prevented by hiding overflow in * CSS (we already do) so we have to resort to repeatedly * checking if the slides have been offset :( */ function setupScrollPrevention() { setInterval( function() { if( dom.wrapper.scrollTop !== 0 || dom.wrapper.scrollLeft !== 0 ) { dom.wrapper.scrollTop = 0; dom.wrapper.scrollLeft = 0; } }, 1000 ); } /** * Creates an HTML element and returns a reference to it. * If the element already exists the existing instance will * be returned. * * @param {HTMLElement} container * @param {string} tagname * @param {string} classname * @param {string} innerHTML * * @return {HTMLElement} */ function createSingletonNode( container, tagname, classname, innerHTML ) { // Find all nodes matching the description var nodes = container.querySelectorAll( '.' + classname ); // Check all matches to find one which is a direct child of // the specified container for( var i = 0; i < nodes.length; i++ ) { var testNode = nodes[i]; if( testNode.parentNode === container ) { return testNode; } } // If no node was found, create it now var node = document.createElement( tagname ); node.className = classname; if( typeof innerHTML === 'string' ) { node.innerHTML = innerHTML; } container.appendChild( node ); return node; } /** * Creates the slide background elements and appends them * to the background container. One element is created per * slide no matter if the given slide has visible background. */ function createBackgrounds() { var printMode = isPrintingPDF(); // Clear prior backgrounds dom.background.innerHTML = ''; dom.background.classList.add( 'no-transition' ); // Iterate over all horizontal slides toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ).forEach( function( slideh ) { var backgroundStack = createBackground( slideh, dom.background ); // Iterate over all vertical slides toArray( slideh.querySelectorAll( 'section' ) ).forEach( function( slidev ) { createBackground( slidev, backgroundStack ); backgroundStack.classList.add( 'stack' ); } ); } ); // Add parallax background if specified if( config.parallaxBackgroundImage ) { dom.background.style.backgroundImage = 'url("' + config.parallaxBackgroundImage + '")'; dom.background.style.backgroundSize = config.parallaxBackgroundSize; dom.background.style.backgroundRepeat = config.parallaxBackgroundRepeat; dom.background.style.backgroundPosition = config.parallaxBackgroundPosition; // Make sure the below properties are set on the element - these properties are // needed for proper transitions to be set on the element via CSS. To remove // annoying background slide-in effect when the presentation starts, apply // these properties after short time delay setTimeout( function() { dom.wrapper.classList.add( 'has-parallax-background' ); }, 1 ); } else { dom.background.style.backgroundImage = ''; dom.wrapper.classList.remove( 'has-parallax-background' ); } } /** * Creates a background for the given slide. * * @param {HTMLElement} slide * @param {HTMLElement} container The element that the background * should be appended to * @return {HTMLElement} New background div */ function createBackground( slide, container ) { // Main slide background element var element = document.createElement( 'div' ); element.className = 'slide-background ' + slide.className.replace( /present|past|future/, '' ); // Inner background element that wraps images/videos/iframes var contentElement = document.createElement( 'div' ); contentElement.className = 'slide-background-content'; element.appendChild( contentElement ); container.appendChild( element ); slide.slideBackgroundElement = element; slide.slideBackgroundContentElement = contentElement; // Syncs the background to reflect all current background settings syncBackground( slide ); return element; } /** * Renders all of the visual properties of a slide background * based on the various background attributes. * * @param {HTMLElement} slide */ function syncBackground( slide ) { var element = slide.slideBackgroundElement, contentElement = slide.slideBackgroundContentElement; // Reset the prior background state in case this is not the // initial sync slide.classList.remove( 'has-dark-background' ); slide.classList.remove( 'has-light-background' ); element.removeAttribute( 'data-loaded' ); element.removeAttribute( 'data-background-hash' ); element.removeAttribute( 'data-background-size' ); element.removeAttribute( 'data-background-transition' ); element.style.backgroundColor = ''; contentElement.style.backgroundSize = ''; contentElement.style.backgroundRepeat = ''; contentElement.style.backgroundPosition = ''; contentElement.style.backgroundImage = ''; contentElement.style.opacity = ''; contentElement.innerHTML = ''; var data = { background: slide.getAttribute( 'data-background' ), backgroundSize: slide.getAttribute( 'data-background-size' ), backgroundImage: slide.getAttribute( 'data-background-image' ), backgroundVideo: slide.getAttribute( 'data-background-video' ), backgroundIframe: slide.getAttribute( 'data-background-iframe' ), backgroundColor: slide.getAttribute( 'data-background-color' ), backgroundRepeat: slide.getAttribute( 'data-background-repeat' ), backgroundPosition: slide.getAttribute( 'data-background-position' ), backgroundTransition: slide.getAttribute( 'data-background-transition' ), backgroundOpacity: slide.getAttribute( 'data-background-opacity' ) }; if( data.background ) { // Auto-wrap image urls in url(...) if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)([?#\s]|$)/gi.test( data.background ) ) { slide.setAttribute( 'data-background-image', data.background ); } else { element.style.background = data.background; } } // Create a hash for this combination of background settings. // This is used to determine when two slide backgrounds are // the same. if( data.background || data.backgroundColor || data.backgroundImage || data.backgroundVideo || data.backgroundIframe ) { element.setAttribute( 'data-background-hash', data.background + data.backgroundSize + data.backgroundImage + data.backgroundVideo + data.backgroundIframe + data.backgroundColor + data.backgroundRepeat + data.backgroundPosition + data.backgroundTransition + data.backgroundOpacity ); } // Additional and optional background properties if( data.backgroundSize ) element.setAttribute( 'data-background-size', data.backgroundSize ); if( data.backgroundColor ) element.style.backgroundColor = data.backgroundColor; if( data.backgroundTransition ) element.setAttribute( 'data-background-transition', data.backgroundTransition ); // Background image options are set on the content wrapper if( data.backgroundSize ) contentElement.style.backgroundSize = data.backgroundSize; if( data.backgroundRepeat ) contentElement.style.backgroundRepeat = data.backgroundRepeat; if( data.backgroundPosition ) contentElement.style.backgroundPosition = data.backgroundPosition; if( data.backgroundOpacity ) contentElement.style.opacity = data.backgroundOpacity; // If this slide has a background color, add a class that // signals if it is light or dark. If the slide has no background // color, no class will be set var computedBackgroundStyle = window.getComputedStyle( element ); if( computedBackgroundStyle && computedBackgroundStyle.backgroundColor ) { var rgb = colorToRgb( computedBackgroundStyle.backgroundColor ); // Ignore fully transparent backgrounds. Some browsers return // rgba(0,0,0,0) when reading the computed background color of // an element with no background if( rgb && rgb.a !== 0 ) { if( colorBrightness( computedBackgroundStyle.backgroundColor ) < 128 ) { slide.classList.add( 'has-dark-background' ); } else { slide.classList.add( 'has-light-background' ); } } } } /** * Registers a listener to postMessage events, this makes it * possible to call all reveal.js API methods from another * window. For example: * * revealWindow.postMessage( JSON.stringify({ * method: 'slide', * args: [ 2 ] * }), '*' ); */ function setupPostMessage() { if( config.postMessage ) { window.addEventListener( 'message', function ( event ) { var data = event.data; // Make sure we're dealing with JSON if( typeof data === 'string' && data.charAt( 0 ) === '{' && data.charAt( data.length - 1 ) === '}' ) { data = JSON.parse( data ); // Check if the requested method can be found if( data.method && typeof Reveal[data.method] === 'function' ) { Reveal[data.method].apply( Reveal, data.args ); } } }, false ); } } /** * Applies the configuration settings from the config * object. May be called multiple times. * * @param {object} options */ function configure( options ) { var oldTransition = config.transition; // New config options may be passed when this method // is invoked through the API after initialization if( typeof options === 'object' ) extend( config, options ); // Abort if reveal.js hasn't finished loading, config // changes will be applied automatically once loading // finishes if( loaded === false ) return; var numberOfSlides = dom.wrapper.querySelectorAll( SLIDES_SELECTOR ).length; // Remove the previously configured transition class dom.wrapper.classList.remove( oldTransition ); // Force linear transition based on browser capabilities if( features.transforms3d === false ) config.transition = 'linear'; dom.wrapper.classList.add( config.transition ); dom.wrapper.setAttribute( 'data-transition-speed', config.transitionSpeed ); dom.wrapper.setAttribute( 'data-background-transition', config.backgroundTransition ); dom.controls.style.display = config.controls ? 'block' : 'none'; dom.progress.style.display = config.progress ? 'block' : 'none'; dom.controls.setAttribute( 'data-controls-layout', config.controlsLayout ); dom.controls.setAttribute( 'data-controls-back-arrows', config.controlsBackArrows ); if( config.shuffle ) { shuffle(); } if( config.rtl ) { dom.wrapper.classList.add( 'rtl' ); } else { dom.wrapper.classList.remove( 'rtl' ); } if( config.center ) { dom.wrapper.classList.add( 'center' ); } else { dom.wrapper.classList.remove( 'center' ); } // Exit the paused mode if it was configured off if( config.pause === false ) { resume(); } if( config.showNotes ) { dom.speakerNotes.setAttribute( 'data-layout', typeof config.showNotes === 'string' ? config.showNotes : 'inline' ); } if( config.mouseWheel ) { document.addEventListener( 'DOMMouseScroll', onDocumentMouseScroll, false ); // FF document.addEventListener( 'mousewheel', onDocumentMouseScroll, false ); } else { document.removeEventListener( 'DOMMouseScroll', onDocumentMouseScroll, false ); // FF document.removeEventListener( 'mousewheel', onDocumentMouseScroll, false ); } // Rolling 3D links if( config.rollingLinks ) { enableRollingLinks(); } else { disableRollingLinks(); } // Iframe link previews if( config.previewLinks ) { enablePreviewLinks(); disablePreviewLinks( '[data-preview-link=false]' ); } else { disablePreviewLinks(); enablePreviewLinks( '[data-preview-link]:not([data-preview-link=false])' ); } // Remove existing auto-slide controls if( autoSlidePlayer ) { autoSlidePlayer.destroy(); autoSlidePlayer = null; } // Generate auto-slide controls if needed if( numberOfSlides > 1 && config.autoSlide && config.autoSlideStoppable && features.canvas && features.requestAnimationFrame ) { autoSlidePlayer = new Playback( dom.wrapper, function() { return Math.min( Math.max( ( Date.now() - autoSlideStartTime ) / autoSlide, 0 ), 1 ); } ); autoSlidePlayer.on( 'click', onAutoSlidePlayerClick ); autoSlidePaused = false; } // When fragments are turned off they should be visible if( config.fragments === false ) { toArray( dom.slides.querySelectorAll( '.fragment' ) ).forEach( function( element ) { element.classList.add( 'visible' ); element.classList.remove( 'current-fragment' ); } ); } // Slide numbers var slideNumberDisplay = 'none'; if( config.slideNumber && !isPrintingPDF() ) { if( config.showSlideNumber === 'all' ) { slideNumberDisplay = 'block'; } else if( config.showSlideNumber === 'speaker' && isSpeakerNotes() ) { slideNumberDisplay = 'block'; } } dom.slideNumber.style.display = slideNumberDisplay; sync(); } /** * Binds all event listeners. */ function addEventListeners() { eventsAreBound = true; window.addEventListener( 'hashchange', onWindowHashChange, false ); window.addEventListener( 'resize', onWindowResize, false ); if( config.touch ) { if( 'onpointerdown' in window ) { // Use W3C pointer events dom.wrapper.addEventListener( 'pointerdown', onPointerDown, false ); dom.wrapper.addEventListener( 'pointermove', onPointerMove, false ); dom.wrapper.addEventListener( 'pointerup', onPointerUp, false ); } else if( window.navigator.msPointerEnabled ) { // IE 10 uses prefixed version of pointer events dom.wrapper.addEventListener( 'MSPointerDown', onPointerDown, false ); dom.wrapper.addEventListener( 'MSPointerMove', onPointerMove, false ); dom.wrapper.addEventListener( 'MSPointerUp', onPointerUp, false ); } else { // Fall back to touch events dom.wrapper.addEventListener( 'touchstart', onTouchStart, false ); dom.wrapper.addEventListener( 'touchmove', onTouchMove, false ); dom.wrapper.addEventListener( 'touchend', onTouchEnd, false ); } } if( config.keyboard ) { document.addEventListener( 'keydown', onDocumentKeyDown, false ); document.addEventListener( 'keypress', onDocumentKeyPress, false ); } if( config.progress && dom.progress ) { dom.progress.addEventListener( 'click', onProgressClicked, false ); } dom.resumeButton.addEventListener( 'click', resume, false ); if( config.focusBodyOnPageVisibilityChange ) { var visibilityChange; if( 'hidden' in document ) { visibilityChange = 'visibilitychange'; } else if( 'msHidden' in document ) { visibilityChange = 'msvisibilitychange'; } else if( 'webkitHidden' in document ) { visibilityChange = 'webkitvisibilitychange'; } if( visibilityChange ) { document.addEventListener( visibilityChange, onPageVisibilityChange, false ); } } // Listen to both touch and click events, in case the device // supports both var pointerEvents = [ 'touchstart', 'click' ]; // Only support touch for Android, fixes double navigations in // stock browser if( UA.match( /android/gi ) ) { pointerEvents = [ 'touchstart' ]; } pointerEvents.forEach( function( eventName ) { dom.controlsLeft.forEach( function( el ) { el.addEventListener( eventName, onNavigateLeftClicked, false ); } ); dom.controlsRight.forEach( function( el ) { el.addEventListener( eventName, onNavigateRightClicked, false ); } ); dom.controlsUp.forEach( function( el ) { el.addEventListener( eventName, onNavigateUpClicked, false ); } ); dom.controlsDown.forEach( function( el ) { el.addEventListener( eventName, onNavigateDownClicked, false ); } ); dom.controlsPrev.forEach( function( el ) { el.addEventListener( eventName, onNavigatePrevClicked, false ); } ); dom.controlsNext.forEach( function( el ) { el.addEventListener( eventName, onNavigateNextClicked, false ); } ); } ); } /** * Unbinds all event listeners. */ function removeEventListeners() { eventsAreBound = false; document.removeEventListener( 'keydown', onDocumentKeyDown, false ); document.removeEventListener( 'keypress', onDocumentKeyPress, false ); window.removeEventListener( 'hashchange', onWindowHashChange, false ); window.removeEventListener( 'resize', onWindowResize, false ); dom.wrapper.removeEventListener( 'pointerdown', onPointerDown, false ); dom.wrapper.removeEventListener( 'pointermove', onPointerMove, false ); dom.wrapper.removeEventListener( 'pointerup', onPointerUp, false ); dom.wrapper.removeEventListener( 'MSPointerDown', onPointerDown, false ); dom.wrapper.removeEventListener( 'MSPointerMove', onPointerMove, false ); dom.wrapper.removeEventListener( 'MSPointerUp', onPointerUp, false ); dom.wrapper.removeEventListener( 'touchstart', onTouchStart, false ); dom.wrapper.removeEventListener( 'touchmove', onTouchMove, false ); dom.wrapper.removeEventListener( 'touchend', onTouchEnd, false ); dom.resumeButton.removeEventListener( 'click', resume, false ); if ( config.progress && dom.progress ) { dom.progress.removeEventListener( 'click', onProgressClicked, false ); } [ 'touchstart', 'click' ].forEach( function( eventName ) { dom.controlsLeft.forEach( function( el ) { el.removeEventListener( eventName, onNavigateLeftClicked, false ); } ); dom.controlsRight.forEach( function( el ) { el.removeEventListener( eventName, onNavigateRightClicked, false ); } ); dom.controlsUp.forEach( function( el ) { el.removeEventListener( eventName, onNavigateUpClicked, false ); } ); dom.controlsDown.forEach( function( el ) { el.removeEventListener( eventName, onNavigateDownClicked, false ); } ); dom.controlsPrev.forEach( function( el ) { el.removeEventListener( eventName, onNavigatePrevClicked, false ); } ); dom.controlsNext.forEach( function( el ) { el.removeEventListener( eventName, onNavigateNextClicked, false ); } ); } ); } /** * Add a custom key binding with optional description to * be added to the help screen. */ function addKeyBinding( binding, callback ) { if( typeof binding === 'object' && binding.keyCode ) { registeredKeyBindings[binding.keyCode] = { callback: callback, key: binding.key, description: binding.description }; } else { registeredKeyBindings[binding] = { callback: callback, key: null, description: null }; } } /** * Removes the specified custom key binding. */ function removeKeyBinding( keyCode ) { delete registeredKeyBindings[keyCode]; } /** * Extend object a with the properties of object b. * If there's a conflict, object b takes precedence. * * @param {object} a * @param {object} b */ function extend( a, b ) { for( var i in b ) { a[ i ] = b[ i ]; } return a; } /** * Converts the target object to an array. * * @param {object} o * @return {object[]} */ function toArray( o ) { return Array.prototype.slice.call( o ); } /** * Utility for deserializing a value. * * @param {*} value * @return {*} */ function deserialize( value ) { if( typeof value === 'string' ) { if( value === 'null' ) return null; else if( value === 'true' ) return true; else if( value === 'false' ) return false; else if( value.match( /^-?[\d\.]+$/ ) ) return parseFloat( value ); } return value; } /** * Measures the distance in pixels between point a * and point b. * * @param {object} a point with x/y properties * @param {object} b point with x/y properties * * @return {number} */ function distanceBetween( a, b ) { var dx = a.x - b.x, dy = a.y - b.y; return Math.sqrt( dx*dx + dy*dy ); } /** * Applies a CSS transform to the target element. * * @param {HTMLElement} element * @param {string} transform */ function transformElement( element, transform ) { element.style.WebkitTransform = transform; element.style.MozTransform = transform; element.style.msTransform = transform; element.style.transform = transform; } /** * Applies CSS transforms to the slides container. The container * is transformed from two separate sources: layout and the overview * mode. * * @param {object} transforms */ function transformSlides( transforms ) { // Pick up new transforms from arguments if( typeof transforms.layout === 'string' ) slidesTransform.layout = transforms.layout; if( typeof transforms.overview === 'string' ) slidesTransform.overview = transforms.overview; // Apply the transforms to the slides container if( slidesTransform.layout ) { transformElement( dom.slides, slidesTransform.layout + ' ' + slidesTransform.overview ); } else { transformElement( dom.slides, slidesTransform.overview ); } } /** * Injects the given CSS styles into the DOM. * * @param {string} value */ function injectStyleSheet( value ) { var tag = document.createElement( 'style' ); tag.type = 'text/css'; if( tag.styleSheet ) { tag.styleSheet.cssText = value; } else { tag.appendChild( document.createTextNode( value ) ); } document.getElementsByTagName( 'head' )[0].appendChild( tag ); } /** * Find the closest parent that matches the given * selector. * * @param {HTMLElement} target The child element * @param {String} selector The CSS selector to match * the parents against * * @return {HTMLElement} The matched parent or null * if no matching parent was found */ function closestParent( target, selector ) { var parent = target.parentNode; while( parent ) { // There's some overhead doing this each time, we don't // want to rewrite the element prototype but should still // be enough to feature detect once at startup... var matchesMethod = parent.matches || parent.matchesSelector || parent.msMatchesSelector; // If we find a match, we're all set if( matchesMethod && matchesMethod.call( parent, selector ) ) { return parent; } // Keep searching parent = parent.parentNode; } return null; } /** * Converts various color input formats to an {r:0,g:0,b:0} object. * * @param {string} color The string representation of a color * @example * colorToRgb('#000'); * @example * colorToRgb('#000000'); * @example * colorToRgb('rgb(0,0,0)'); * @example * colorToRgb('rgba(0,0,0)'); * * @return {{r: number, g: number, b: number, [a]: number}|null} */ function colorToRgb( color ) { var hex3 = color.match( /^#([0-9a-f]{3})$/i ); if( hex3 && hex3[1] ) { hex3 = hex3[1]; return { r: parseInt( hex3.charAt( 0 ), 16 ) * 0x11, g: parseInt( hex3.charAt( 1 ), 16 ) * 0x11, b: parseInt( hex3.charAt( 2 ), 16 ) * 0x11 }; } var hex6 = color.match( /^#([0-9a-f]{6})$/i ); if( hex6 && hex6[1] ) { hex6 = hex6[1]; return { r: parseInt( hex6.substr( 0, 2 ), 16 ), g: parseInt( hex6.substr( 2, 2 ), 16 ), b: parseInt( hex6.substr( 4, 2 ), 16 ) }; } var rgb = color.match( /^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i ); if( rgb ) { return { r: parseInt( rgb[1], 10 ), g: parseInt( rgb[2], 10 ), b: parseInt( rgb[3], 10 ) }; } var rgba = color.match( /^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\,\s*([\d]+|[\d]*.[\d]+)\s*\)$/i ); if( rgba ) { return { r: parseInt( rgba[1], 10 ), g: parseInt( rgba[2], 10 ), b: parseInt( rgba[3], 10 ), a: parseFloat( rgba[4] ) }; } return null; } /** * Calculates brightness on a scale of 0-255. * * @param {string} color See colorToRgb for supported formats. * @see {@link colorToRgb} */ function colorBrightness( color ) { if( typeof color === 'string' ) color = colorToRgb( color ); if( color ) { return ( color.r * 299 + color.g * 587 + color.b * 114 ) / 1000; } return null; } /** * Returns the remaining height within the parent of the * target element. * * remaining height = [ configured parent height ] - [ current parent height ] * * @param {HTMLElement} element * @param {number} [height] */ function getRemainingHeight( element, height ) { height = height || 0; if( element ) { var newHeight, oldHeight = element.style.height; // Change the .stretch element height to 0 in order find the height of all // the other elements element.style.height = '0px'; newHeight = height - element.parentNode.offsetHeight; // Restore the old height, just in case element.style.height = oldHeight + 'px'; return newHeight; } return height; } /** * Checks if this instance is being used to print a PDF. */ function isPrintingPDF() { return ( /print-pdf/gi ).test( window.location.search ); } /** * Check if this instance is being used to print a PDF with fragments. */ function isPrintingPDFFragments() { return ( /print-pdf-fragments/gi ).test( window.location.search ); } /** * Hides the address bar if we're on a mobile device. */ function hideAddressBar() { if( config.hideAddressBar && isMobileDevice ) { // Events that should trigger the address bar to hide window.addEventListener( 'load', removeAddressBar, false ); window.addEventListener( 'orientationchange', removeAddressBar, false ); } } /** * Causes the address bar to hide on mobile devices, * more vertical space ftw. */ function removeAddressBar() { setTimeout( function() { window.scrollTo( 0, 1 ); }, 10 ); } /** * Dispatches an event of the specified type from the * reveal DOM element. */ function dispatchEvent( type, args ) { var event = document.createEvent( 'HTMLEvents', 1, 2 ); event.initEvent( type, true, true ); extend( event, args ); dom.wrapper.dispatchEvent( event ); // If we're in an iframe, post each reveal.js event to the // parent window. Used by the notes plugin if( config.postMessageEvents && window.parent !== window.self ) { window.parent.postMessage( JSON.stringify({ namespace: 'reveal', eventName: type, state: getState() }), '*' ); } } /** * Wrap all links in 3D goodness. */ function enableRollingLinks() { if( features.transforms3d && !( 'msPerspective' in document.body.style ) ) { var anchors = dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ' a' ); for( var i = 0, len = anchors.length; i < len; i++ ) { var anchor = anchors[i]; if( anchor.textContent && !anchor.querySelector( '*' ) && ( !anchor.className || !anchor.classList.contains( anchor, 'roll' ) ) ) { var span = document.createElement('span'); span.setAttribute('data-title', anchor.text); span.innerHTML = anchor.innerHTML; anchor.classList.add( 'roll' ); anchor.innerHTML = ''; anchor.appendChild(span); } } } } /** * Unwrap all 3D links. */ function disableRollingLinks() { var anchors = dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ' a.roll' ); for( var i = 0, len = anchors.length; i < len; i++ ) { var anchor = anchors[i]; var span = anchor.querySelector( 'span' ); if( span ) { anchor.classList.remove( 'roll' ); anchor.innerHTML = span.innerHTML; } } } /** * Bind preview frame links. * * @param {string} [selector=a] - selector for anchors */ function enablePreviewLinks( selector ) { var anchors = toArray( document.querySelectorAll( selector ? selector : 'a' ) ); anchors.forEach( function( element ) { if( /^(http|www)/gi.test( element.getAttribute( 'href' ) ) ) { element.addEventListener( 'click', onPreviewLinkClicked, false ); } } ); } /** * Unbind preview frame links. */ function disablePreviewLinks( selector ) { var anchors = toArray( document.querySelectorAll( selector ? selector : 'a' ) ); anchors.forEach( function( element ) { if( /^(http|www)/gi.test( element.getAttribute( 'href' ) ) ) { element.removeEventListener( 'click', onPreviewLinkClicked, false ); } } ); } /** * Opens a preview window for the target URL. * * @param {string} url - url for preview iframe src */ function showPreview( url ) { closeOverlay(); dom.overlay = document.createElement( 'div' ); dom.overlay.classList.add( 'overlay' ); dom.overlay.classList.add( 'overlay-preview' ); dom.wrapper.appendChild( dom.overlay ); dom.overlay.innerHTML = [ '<header>', '<a class="close" href="#"><span class="icon"></span></a>', '<a class="external" href="'+ url +'" target="_blank"><span class="icon"></span></a>', '</header>', '<div class="spinner"></div>', '<div class="viewport">', '<iframe src="'+ url +'"></iframe>', '<small class="viewport-inner">', '<span class="x-frame-error">Unable to load iframe. This is likely due to the site\'s policy (x-frame-options).</span>', '</small>', '</div>' ].join(''); dom.overlay.querySelector( 'iframe' ).addEventListener( 'load', function( event ) { dom.overlay.classList.add( 'loaded' ); }, false ); dom.overlay.querySelector( '.close' ).addEventListener( 'click', function( event ) { closeOverlay(); event.preventDefault(); }, false ); dom.overlay.querySelector( '.external' ).addEventListener( 'click', function( event ) { closeOverlay(); }, false ); setTimeout( function() { dom.overlay.classList.add( 'visible' ); }, 1 ); } /** * Open or close help overlay window. * * @param {Boolean} [override] Flag which overrides the * toggle logic and forcibly sets the desired state. True means * help is open, false means it's closed. */ function toggleHelp( override ){ if( typeof override === 'boolean' ) { override ? showHelp() : closeOverlay(); } else { if( dom.overlay ) { closeOverlay(); } else { showHelp(); } } } /** * Opens an overlay window with help material. */ function showHelp() { if( config.help ) { closeOverlay(); dom.overlay = document.createElement( 'div' ); dom.overlay.classList.add( 'overlay' ); dom.overlay.classList.add( 'overlay-help' ); dom.wrapper.appendChild( dom.overlay ); var html = '<p class="title">Keyboard Shortcuts</p><br/>'; html += '<table><th>KEY</th><th>ACTION</th>'; for( var key in keyboardShortcuts ) { html += '<tr><td>' + key + '</td><td>' + keyboardShortcuts[ key ] + '</td></tr>'; } // Add custom key bindings that have associated descriptions for( var binding in registeredKeyBindings ) { if( registeredKeyBindings[binding].key && registeredKeyBindings[binding].description ) { html += '<tr><td>' + registeredKeyBindings[binding].key + '</td><td>' + registeredKeyBindings[binding].description + '</td></tr>'; } } html += '</table>'; dom.overlay.innerHTML = [ '<header>', '<a class="close" href="#"><span class="icon"></span></a>', '</header>', '<div class="viewport">', '<div class="viewport-inner">'+ html +'</div>', '</div>' ].join(''); dom.overlay.querySelector( '.close' ).addEventListener( 'click', function( event ) { closeOverlay(); event.preventDefault(); }, false ); setTimeout( function() { dom.overlay.classList.add( 'visible' ); }, 1 ); } } /** * Closes any currently open overlay. */ function closeOverlay() { if( dom.overlay ) { dom.overlay.parentNode.removeChild( dom.overlay ); dom.overlay = null; } } /** * Applies JavaScript-controlled layout rules to the * presentation. */ function layout() { if( dom.wrapper && !isPrintingPDF() ) { if( !config.disableLayout ) { var size = getComputedSlideSize(); // Layout the contents of the slides layoutSlideContents( config.width, config.height ); dom.slides.style.width = size.width + 'px'; dom.slides.style.height = size.height + 'px'; // Determine scale of content to fit within available space scale = Math.min( size.presentationWidth / size.width, size.presentationHeight / size.height ); // Respect max/min scale settings scale = Math.max( scale, config.minScale ); scale = Math.min( scale, config.maxScale ); // Don't apply any scaling styles if scale is 1 if( scale === 1 ) { dom.slides.style.zoom = ''; dom.slides.style.left = ''; dom.slides.style.top = ''; dom.slides.style.bottom = ''; dom.slides.style.right = ''; transformSlides( { layout: '' } ); } else { // Prefer zoom for scaling up so that content remains crisp. // Don't use zoom to scale down since that can lead to shifts // in text layout/line breaks. if( scale > 1 && features.zoom ) { dom.slides.style.zoom = scale; dom.slides.style.left = ''; dom.slides.style.top = ''; dom.slides.style.bottom = ''; dom.slides.style.right = ''; transformSlides( { layout: '' } ); } // Apply scale transform as a fallback else { dom.slides.style.zoom = ''; dom.slides.style.left = '50%'; dom.slides.style.top = '50%'; dom.slides.style.bottom = 'auto'; dom.slides.style.right = 'auto'; transformSlides( { layout: 'translate(-50%, -50%) scale('+ scale +')' } ); } } // Select all slides, vertical and horizontal var slides = toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR ) ); for( var i = 0, len = slides.length; i < len; i++ ) { var slide = slides[ i ]; // Don't bother updating invisible slides if( slide.style.display === 'none' ) { continue; } if( config.center || slide.classList.contains( 'center' ) ) { // Vertical stacks are not centred since their section // children will be if( slide.classList.contains( 'stack' ) ) { slide.style.top = 0; } else { slide.style.top = Math.max( ( size.height - slide.scrollHeight ) / 2, 0 ) + 'px'; } } else { slide.style.top = ''; } } } updateProgress(); updateParallax(); if( isOverview() ) { updateOverview(); } } } /** * Applies layout logic to the contents of all slides in * the presentation. * * @param {string|number} width * @param {string|number} height */ function layoutSlideContents( width, height ) { // Handle sizing of elements with the 'stretch' class toArray( dom.slides.querySelectorAll( 'section > .stretch' ) ).forEach( function( element ) { // Determine how much vertical space we can use var remainingHeight = getRemainingHeight( element, height ); // Consider the aspect ratio of media elements if( /(img|video)/gi.test( element.nodeName ) ) { var nw = element.naturalWidth || element.videoWidth, nh = element.naturalHeight || element.videoHeight; var es = Math.min( width / nw, remainingHeight / nh ); element.style.width = ( nw * es ) + 'px'; element.style.height = ( nh * es ) + 'px'; } else { element.style.width = width + 'px'; element.style.height = remainingHeight + 'px'; } } ); } /** * Calculates the computed pixel size of our slides. These * values are based on the width and height configuration * options. * * @param {number} [presentationWidth=dom.wrapper.offsetWidth] * @param {number} [presentationHeight=dom.wrapper.offsetHeight] */ function getComputedSlideSize( presentationWidth, presentationHeight ) { var size = { // Slide size width: config.width, height: config.height, // Presentation size presentationWidth: presentationWidth || dom.wrapper.offsetWidth, presentationHeight: presentationHeight || dom.wrapper.offsetHeight }; // Reduce available space by margin size.presentationWidth -= ( size.presentationWidth * config.margin ); size.presentationHeight -= ( size.presentationHeight * config.margin ); // Slide width may be a percentage of available width if( typeof size.width === 'string' && /%$/.test( size.width ) ) { size.width = parseInt( size.width, 10 ) / 100 * size.presentationWidth; } // Slide height may be a percentage of available height if( typeof size.height === 'string' && /%$/.test( size.height ) ) { size.height = parseInt( size.height, 10 ) / 100 * size.presentationHeight; } return size; } /** * Stores the vertical index of a stack so that the same * vertical slide can be selected when navigating to and * from the stack. * * @param {HTMLElement} stack The vertical stack element * @param {string|number} [v=0] Index to memorize */ function setPreviousVerticalIndex( stack, v ) { if( typeof stack === 'object' && typeof stack.setAttribute === 'function' ) { stack.setAttribute( 'data-previous-indexv', v || 0 ); } } /** * Retrieves the vertical index which was stored using * #setPreviousVerticalIndex() or 0 if no previous index * exists. * * @param {HTMLElement} stack The vertical stack element */ function getPreviousVerticalIndex( stack ) { if( typeof stack === 'object' && typeof stack.setAttribute === 'function' && stack.classList.contains( 'stack' ) ) { // Prefer manually defined start-indexv var attributeName = stack.hasAttribute( 'data-start-indexv' ) ? 'data-start-indexv' : 'data-previous-indexv'; return parseInt( stack.getAttribute( attributeName ) || 0, 10 ); } return 0; } /** * Displays the overview of slides (quick nav) by scaling * down and arranging all slide elements. */ function activateOverview() { // Only proceed if enabled in config if( config.overview && !isOverview() ) { overview = true; dom.wrapper.classList.add( 'overview' ); dom.wrapper.classList.remove( 'overview-deactivating' ); if( features.overviewTransitions ) { setTimeout( function() { dom.wrapper.classList.add( 'overview-animated' ); }, 1 ); } // Don't auto-slide while in overview mode cancelAutoSlide(); // Move the backgrounds element into the slide container to // that the same scaling is applied dom.slides.appendChild( dom.background ); // Clicking on an overview slide navigates to it toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR ) ).forEach( function( slide ) { if( !slide.classList.contains( 'stack' ) ) { slide.addEventListener( 'click', onOverviewSlideClicked, true ); } } ); // Calculate slide sizes var margin = 70; var slideSize = getComputedSlideSize(); overviewSlideWidth = slideSize.width + margin; overviewSlideHeight = slideSize.height + margin; // Reverse in RTL mode if( config.rtl ) { overviewSlideWidth = -overviewSlideWidth; } updateSlidesVisibility(); layoutOverview(); updateOverview(); layout(); // Notify observers of the overview showing dispatchEvent( 'overviewshown', { 'indexh': indexh, 'indexv': indexv, 'currentSlide': currentSlide } ); } } /** * Uses CSS transforms to position all slides in a grid for * display inside of the overview mode. */ function layoutOverview() { // Layout slides toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ).forEach( function( hslide, h ) { hslide.setAttribute( 'data-index-h', h ); transformElement( hslide, 'translate3d(' + ( h * overviewSlideWidth ) + 'px, 0, 0)' ); if( hslide.classList.contains( 'stack' ) ) { toArray( hslide.querySelectorAll( 'section' ) ).forEach( function( vslide, v ) { vslide.setAttribute( 'data-index-h', h ); vslide.setAttribute( 'data-index-v', v ); transformElement( vslide, 'translate3d(0, ' + ( v * overviewSlideHeight ) + 'px, 0)' ); } ); } } ); // Layout slide backgrounds toArray( dom.background.childNodes ).forEach( function( hbackground, h ) { transformElement( hbackground, 'translate3d(' + ( h * overviewSlideWidth ) + 'px, 0, 0)' ); toArray( hbackground.querySelectorAll( '.slide-background' ) ).forEach( function( vbackground, v ) { transformElement( vbackground, 'translate3d(0, ' + ( v * overviewSlideHeight ) + 'px, 0)' ); } ); } ); } /** * Moves the overview viewport to the current slides. * Called each time the current slide changes. */ function updateOverview() { var vmin = Math.min( window.innerWidth, window.innerHeight ); var scale = Math.max( vmin / 5, 150 ) / vmin; transformSlides( { overview: [ 'scale('+ scale +')', 'translateX('+ ( -indexh * overviewSlideWidth ) +'px)', 'translateY('+ ( -indexv * overviewSlideHeight ) +'px)' ].join( ' ' ) } ); } /** * Exits the slide overview and enters the currently * active slide. */ function deactivateOverview() { // Only proceed if enabled in config if( config.overview ) { overview = false; dom.wrapper.classList.remove( 'overview' ); dom.wrapper.classList.remove( 'overview-animated' ); // Temporarily add a class so that transitions can do different things // depending on whether they are exiting/entering overview, or just // moving from slide to slide dom.wrapper.classList.add( 'overview-deactivating' ); setTimeout( function () { dom.wrapper.classList.remove( 'overview-deactivating' ); }, 1 ); // Move the background element back out dom.wrapper.appendChild( dom.background ); // Clean up changes made to slides toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR ) ).forEach( function( slide ) { transformElement( slide, '' ); slide.removeEventListener( 'click', onOverviewSlideClicked, true ); } ); // Clean up changes made to backgrounds toArray( dom.background.querySelectorAll( '.slide-background' ) ).forEach( function( background ) { transformElement( background, '' ); } ); transformSlides( { overview: '' } ); slide( indexh, indexv ); layout(); cueAutoSlide(); // Notify observers of the overview hiding dispatchEvent( 'overviewhidden', { 'indexh': indexh, 'indexv': indexv, 'currentSlide': currentSlide } ); } } /** * Toggles the slide overview mode on and off. * * @param {Boolean} [override] Flag which overrides the * toggle logic and forcibly sets the desired state. True means * overview is open, false means it's closed. */ function toggleOverview( override ) { if( typeof override === 'boolean' ) { override ? activateOverview() : deactivateOverview(); } else { isOverview() ? deactivateOverview() : activateOverview(); } } /** * Checks if the overview is currently active. * * @return {Boolean} true if the overview is active, * false otherwise */ function isOverview() { return overview; } /** * Return a hash URL that will resolve to the current slide location. */ function locationHash() { var url = '/'; // Attempt to create a named link based on the slide's ID var id = currentSlide ? currentSlide.getAttribute( 'id' ) : null; if( id ) { id = encodeURIComponent( id ); } var indexf; if( config.fragmentInURL ) { indexf = getIndices().f; } // If the current slide has an ID, use that as a named link, // but we don't support named links with a fragment index if( typeof id === 'string' && id.length && indexf === undefined ) { url = '/' + id; } // Otherwise use the /h/v index else { var hashIndexBase = config.hashOneBasedIndex ? 1 : 0; if( indexh > 0 || indexv > 0 || indexf !== undefined ) url += indexh + hashIndexBase; if( indexv > 0 || indexf !== undefined ) url += '/' + (indexv + hashIndexBase ); if( indexf !== undefined ) url += '/' + indexf; } return url; } /** * Checks if the current or specified slide is vertical * (nested within another slide). * * @param {HTMLElement} [slide=currentSlide] The slide to check * orientation of * @return {Boolean} */ function isVerticalSlide( slide ) { // Prefer slide argument, otherwise use current slide slide = slide ? slide : currentSlide; return slide && slide.parentNode && !!slide.parentNode.nodeName.match( /section/i ); } /** * Handling the fullscreen functionality via the fullscreen API * * @see http://fullscreen.spec.whatwg.org/ * @see https://developer.mozilla.org/en-US/docs/DOM/Using_fullscreen_mode */ function enterFullscreen() { var element = document.documentElement; // Check which implementation is available var requestMethod = element.requestFullscreen || element.webkitRequestFullscreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullscreen; if( requestMethod ) { requestMethod.apply( element ); } } /** * Enters the paused mode which fades everything on screen to * black. */ function pause() { if( config.pause ) { var wasPaused = dom.wrapper.classList.contains( 'paused' ); cancelAutoSlide(); dom.wrapper.classList.add( 'paused' ); if( wasPaused === false ) { dispatchEvent( 'paused' ); } } } /** * Exits from the paused mode. */ function resume() { var wasPaused = dom.wrapper.classList.contains( 'paused' ); dom.wrapper.classList.remove( 'paused' ); cueAutoSlide(); if( wasPaused ) { dispatchEvent( 'resumed' ); } } /** * Toggles the paused mode on and off. */ function togglePause( override ) { if( typeof override === 'boolean' ) { override ? pause() : resume(); } else { isPaused() ? resume() : pause(); } } /** * Checks if we are currently in the paused mode. * * @return {Boolean} */ function isPaused() { return dom.wrapper.classList.contains( 'paused' ); } /** * Toggles the auto slide mode on and off. * * @param {Boolean} [override] Flag which sets the desired state. * True means autoplay starts, false means it stops. */ function toggleAutoSlide( override ) { if( typeof override === 'boolean' ) { override ? resumeAutoSlide() : pauseAutoSlide(); } else { autoSlidePaused ? resumeAutoSlide() : pauseAutoSlide(); } } /** * Checks if the auto slide mode is currently on. * * @return {Boolean} */ function isAutoSliding() { return !!( autoSlide && !autoSlidePaused ); } /** * Steps from the current point in the presentation to the * slide which matches the specified horizontal and vertical * indices. * * @param {number} [h=indexh] Horizontal index of the target slide * @param {number} [v=indexv] Vertical index of the target slide * @param {number} [f] Index of a fragment within the * target slide to activate * @param {number} [o] Origin for use in multimaster environments */ function slide( h, v, f, o ) { // Remember where we were at before previousSlide = currentSlide; // Query all horizontal slides in the deck var horizontalSlides = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ); // Abort if there are no slides if( horizontalSlides.length === 0 ) return; // If no vertical index is specified and the upcoming slide is a // stack, resume at its previous vertical index if( v === undefined && !isOverview() ) { v = getPreviousVerticalIndex( horizontalSlides[ h ] ); } // If we were on a vertical stack, remember what vertical index // it was on so we can resume at the same position when returning if( previousSlide && previousSlide.parentNode && previousSlide.parentNode.classList.contains( 'stack' ) ) { setPreviousVerticalIndex( previousSlide.parentNode, indexv ); } // Remember the state before this slide var stateBefore = state.concat(); // Reset the state array state.length = 0; var indexhBefore = indexh || 0, indexvBefore = indexv || 0; // Activate and transition to the new slide indexh = updateSlides( HORIZONTAL_SLIDES_SELECTOR, h === undefined ? indexh : h ); indexv = updateSlides( VERTICAL_SLIDES_SELECTOR, v === undefined ? indexv : v ); // Update the visibility of slides now that the indices have changed updateSlidesVisibility(); layout(); // Apply the new state stateLoop: for( var i = 0, len = state.length; i < len; i++ ) { // Check if this state existed on the previous slide. If it // did, we will avoid adding it repeatedly for( var j = 0; j < stateBefore.length; j++ ) { if( stateBefore[j] === state[i] ) { stateBefore.splice( j, 1 ); continue stateLoop; } } document.documentElement.classList.add( state[i] ); // Dispatch custom event matching the state's name dispatchEvent( state[i] ); } // Clean up the remains of the previous state while( stateBefore.length ) { document.documentElement.classList.remove( stateBefore.pop() ); } // Update the overview if it's currently active if( isOverview() ) { updateOverview(); } // Find the current horizontal slide and any possible vertical slides // within it var currentHorizontalSlide = horizontalSlides[ indexh ], currentVerticalSlides = currentHorizontalSlide.querySelectorAll( 'section' ); // Store references to the previous and current slides currentSlide = currentVerticalSlides[ indexv ] || currentHorizontalSlide; // Show fragment, if specified if( typeof f !== 'undefined' ) { navigateFragment( f ); } // Dispatch an event if the slide changed var slideChanged = ( indexh !== indexhBefore || indexv !== indexvBefore ); if (!slideChanged) { // Ensure that the previous slide is never the same as the current previousSlide = null; } // Solves an edge case where the previous slide maintains the // 'present' class when navigating between adjacent vertical // stacks if( previousSlide && previousSlide !== currentSlide ) { previousSlide.classList.remove( 'present' ); previousSlide.setAttribute( 'aria-hidden', 'true' ); // Reset all slides upon navigate to home // Issue: #285 if ( dom.wrapper.querySelector( HOME_SLIDE_SELECTOR ).classList.contains( 'present' ) ) { // Launch async task setTimeout( function () { var slides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR + '.stack') ), i; for( i in slides ) { if( slides[i] ) { // Reset stack setPreviousVerticalIndex( slides[i], 0 ); } } }, 0 ); } } if( slideChanged ) { dispatchEvent( 'slidechanged', { 'indexh': indexh, 'indexv': indexv, 'previousSlide': previousSlide, 'currentSlide': currentSlide, 'origin': o } ); } // Handle embedded content if( slideChanged || !previousSlide ) { stopEmbeddedContent( previousSlide ); startEmbeddedContent( currentSlide ); } // Announce the current slide contents, for screen readers dom.statusDiv.textContent = getStatusText( currentSlide ); updateControls(); updateProgress(); updateBackground(); updateParallax(); updateSlideNumber(); updateNotes(); // Update the URL hash writeURL(); cueAutoSlide(); } /** * Syncs the presentation with the current DOM. Useful * when new slides or control elements are added or when * the configuration has changed. */ function sync() { // Subscribe to input removeEventListeners(); addEventListeners(); // Force a layout to make sure the current config is accounted for layout(); // Reflect the current autoSlide value autoSlide = config.autoSlide; // Start auto-sliding if it's enabled cueAutoSlide(); // Re-create the slide backgrounds createBackgrounds(); // Write the current hash to the URL writeURL(); sortAllFragments(); updateControls(); updateProgress(); updateSlideNumber(); updateSlidesVisibility(); updateBackground( true ); updateNotesVisibility(); updateNotes(); formatEmbeddedContent(); // Start or stop embedded content depending on global config if( config.autoPlayMedia === false ) { stopEmbeddedContent( currentSlide, { unloadIframes: false } ); } else { startEmbeddedContent( currentSlide ); } if( isOverview() ) { layoutOverview(); } } /** * Updates reveal.js to keep in sync with new slide attributes. For * example, if you add a new `data-background-image` you can call * this to have reveal.js render the new background image. * * Similar to #sync() but more efficient when you only need to * refresh a specific slide. * * @param {HTMLElement} slide */ function syncSlide( slide ) { syncBackground( slide ); syncFragments( slide ); updateBackground(); updateNotes(); loadSlide( slide ); } /** * Formats the fragments on the given slide so that they have * valid indices. Call this if fragments are changed in the DOM * after reveal.js has already initialized. * * @param {HTMLElement} slide */ function syncFragments( slide ) { sortFragments( slide.querySelectorAll( '.fragment' ) ); } /** * Resets all vertical slides so that only the first * is visible. */ function resetVerticalSlides() { var horizontalSlides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ); horizontalSlides.forEach( function( horizontalSlide ) { var verticalSlides = toArray( horizontalSlide.querySelectorAll( 'section' ) ); verticalSlides.forEach( function( verticalSlide, y ) { if( y > 0 ) { verticalSlide.classList.remove( 'present' ); verticalSlide.classList.remove( 'past' ); verticalSlide.classList.add( 'future' ); verticalSlide.setAttribute( 'aria-hidden', 'true' ); } } ); } ); } /** * Sorts and formats all of fragments in the * presentation. */ function sortAllFragments() { var horizontalSlides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ); horizontalSlides.forEach( function( horizontalSlide ) { var verticalSlides = toArray( horizontalSlide.querySelectorAll( 'section' ) ); verticalSlides.forEach( function( verticalSlide, y ) { sortFragments( verticalSlide.querySelectorAll( '.fragment' ) ); } ); if( verticalSlides.length === 0 ) sortFragments( horizontalSlide.querySelectorAll( '.fragment' ) ); } ); } /** * Randomly shuffles all slides in the deck. */ function shuffle() { var slides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ); slides.forEach( function( slide ) { // Insert this slide next to another random slide. This may // cause the slide to insert before itself but that's fine. dom.slides.insertBefore( slide, slides[ Math.floor( Math.random() * slides.length ) ] ); } ); } /** * Updates one dimension of slides by showing the slide * with the specified index. * * @param {string} selector A CSS selector that will fetch * the group of slides we are working with * @param {number} index The index of the slide that should be * shown * * @return {number} The index of the slide that is now shown, * might differ from the passed in index if it was out of * bounds. */ function updateSlides( selector, index ) { // Select all slides and convert the NodeList result to // an array var slides = toArray( dom.wrapper.querySelectorAll( selector ) ), slidesLength = slides.length; var printMode = isPrintingPDF(); if( slidesLength ) { // Should the index loop? if( config.loop ) { index %= slidesLength; if( index < 0 ) { index = slidesLength + index; } } // Enforce max and minimum index bounds index = Math.max( Math.min( index, slidesLength - 1 ), 0 ); for( var i = 0; i < slidesLength; i++ ) { var element = slides[i]; var reverse = config.rtl && !isVerticalSlide( element ); element.classList.remove( 'past' ); element.classList.remove( 'present' ); element.classList.remove( 'future' ); // http://www.w3.org/html/wg/drafts/html/master/editing.html#the-hidden-attribute element.setAttribute( 'hidden', '' ); element.setAttribute( 'aria-hidden', 'true' ); // If this element contains vertical slides if( element.querySelector( 'section' ) ) { element.classList.add( 'stack' ); } // If we're printing static slides, all slides are "present" if( printMode ) { element.classList.add( 'present' ); continue; } if( i < index ) { // Any element previous to index is given the 'past' class element.classList.add( reverse ? 'future' : 'past' ); if( config.fragments ) { var pastFragments = toArray( element.querySelectorAll( '.fragment' ) ); // Show all fragments on prior slides while( pastFragments.length ) { var pastFragment = pastFragments.pop(); pastFragment.classList.add( 'visible' ); pastFragment.classList.remove( 'current-fragment' ); } } } else if( i > index ) { // Any element subsequent to index is given the 'future' class element.classList.add( reverse ? 'past' : 'future' ); if( config.fragments ) { var futureFragments = toArray( element.querySelectorAll( '.fragment.visible' ) ); // No fragments in future slides should be visible ahead of time while( futureFragments.length ) { var futureFragment = futureFragments.pop(); futureFragment.classList.remove( 'visible' ); futureFragment.classList.remove( 'current-fragment' ); } } } } // Mark the current slide as present slides[index].classList.add( 'present' ); slides[index].removeAttribute( 'hidden' ); slides[index].removeAttribute( 'aria-hidden' ); // If this slide has a state associated with it, add it // onto the current state of the deck var slideState = slides[index].getAttribute( 'data-state' ); if( slideState ) { state = state.concat( slideState.split( ' ' ) ); } } else { // Since there are no slides we can't be anywhere beyond the // zeroth index index = 0; } return index; } /** * Optimization method; hide all slides that are far away * from the present slide. */ function updateSlidesVisibility() { // Select all slides and convert the NodeList result to // an array var horizontalSlides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ), horizontalSlidesLength = horizontalSlides.length, distanceX, distanceY; if( horizontalSlidesLength && typeof indexh !== 'undefined' ) { // The number of steps away from the present slide that will // be visible var viewDistance = isOverview() ? 10 : config.viewDistance; // Limit view distance on weaker devices if( isMobileDevice ) { viewDistance = isOverview() ? 6 : 2; } // All slides need to be visible when exporting to PDF if( isPrintingPDF() ) { viewDistance = Number.MAX_VALUE; } for( var x = 0; x < horizontalSlidesLength; x++ ) { var horizontalSlide = horizontalSlides[x]; var verticalSlides = toArray( horizontalSlide.querySelectorAll( 'section' ) ), verticalSlidesLength = verticalSlides.length; // Determine how far away this slide is from the present distanceX = Math.abs( ( indexh || 0 ) - x ) || 0; // If the presentation is looped, distance should measure // 1 between the first and last slides if( config.loop ) { distanceX = Math.abs( ( ( indexh || 0 ) - x ) % ( horizontalSlidesLength - viewDistance ) ) || 0; } // Show the horizontal slide if it's within the view distance if( distanceX < viewDistance ) { loadSlide( horizontalSlide ); } else { unloadSlide( horizontalSlide ); } if( verticalSlidesLength ) { var oy = getPreviousVerticalIndex( horizontalSlide ); for( var y = 0; y < verticalSlidesLength; y++ ) { var verticalSlide = verticalSlides[y]; distanceY = x === ( indexh || 0 ) ? Math.abs( ( indexv || 0 ) - y ) : Math.abs( y - oy ); if( distanceX + distanceY < viewDistance ) { loadSlide( verticalSlide ); } else { unloadSlide( verticalSlide ); } } } } // Flag if there are ANY vertical slides, anywhere in the deck if( dom.wrapper.querySelectorAll( '.slides>section>section' ).length ) { dom.wrapper.classList.add( 'has-vertical-slides' ); } else { dom.wrapper.classList.remove( 'has-vertical-slides' ); } // Flag if there are ANY horizontal slides, anywhere in the deck if( dom.wrapper.querySelectorAll( '.slides>section' ).length > 1 ) { dom.wrapper.classList.add( 'has-horizontal-slides' ); } else { dom.wrapper.classList.remove( 'has-horizontal-slides' ); } } } /** * Pick up notes from the current slide and display them * to the viewer. * * @see {@link config.showNotes} */ function updateNotes() { if( config.showNotes && dom.speakerNotes && currentSlide && !isPrintingPDF() ) { dom.speakerNotes.innerHTML = getSlideNotes() || '<span class="notes-placeholder">No notes on this slide.</span>'; } } /** * Updates the visibility of the speaker notes sidebar that * is used to share annotated slides. The notes sidebar is * only visible if showNotes is true and there are notes on * one or more slides in the deck. */ function updateNotesVisibility() { if( config.showNotes && hasNotes() ) { dom.wrapper.classList.add( 'show-notes' ); } else { dom.wrapper.classList.remove( 'show-notes' ); } } /** * Checks if there are speaker notes for ANY slide in the * presentation. */ function hasNotes() { return dom.slides.querySelectorAll( '[data-notes], aside.notes' ).length > 0; } /** * Updates the progress bar to reflect the current slide. */ function updateProgress() { // Update progress if enabled if( config.progress && dom.progressbar ) { dom.progressbar.style.width = getProgress() * dom.wrapper.offsetWidth + 'px'; } } /** * Updates the slide number div to reflect the current slide. * * The following slide number formats are available: * "h.v": horizontal . vertical slide number (default) * "h/v": horizontal / vertical slide number * "c": flattened slide number * "c/t": flattened slide number / total slides */ function updateSlideNumber() { // Update slide number if enabled if( config.slideNumber && dom.slideNumber ) { var value = []; var format = 'h.v'; // Check if a custom number format is available if( typeof config.slideNumber === 'string' ) { format = config.slideNumber; } // If there are ONLY vertical slides in this deck, always use // a flattened slide number if( !/c/.test( format ) && dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ).length === 1 ) { format = 'c'; } switch( format ) { case 'c': value.push( getSlidePastCount() + 1 ); break; case 'c/t': value.push( getSlidePastCount() + 1, '/', getTotalSlides() ); break; case 'h/v': value.push( indexh + 1 ); if( isVerticalSlide() ) value.push( '/', indexv + 1 ); break; default: value.push( indexh + 1 ); if( isVerticalSlide() ) value.push( '.', indexv + 1 ); } dom.slideNumber.innerHTML = formatSlideNumber( value[0], value[1], value[2] ); } } /** * Applies HTML formatting to a slide number before it's * written to the DOM. * * @param {number} a Current slide * @param {string} delimiter Character to separate slide numbers * @param {(number|*)} b Total slides * @return {string} HTML string fragment */ function formatSlideNumber( a, delimiter, b ) { var url = '#' + locationHash(); if( typeof b === 'number' && !isNaN( b ) ) { return '<a href="' + url + '">' + '<span class="slide-number-a">'+ a +'</span>' + '<span class="slide-number-delimiter">'+ delimiter +'</span>' + '<span class="slide-number-b">'+ b +'</span>' + '</a>'; } else { return '<a href="' + url + '">' + '<span class="slide-number-a">'+ a +'</span>' + '</a>'; } } /** * Updates the state of all control/navigation arrows. */ function updateControls() { var routes = availableRoutes(); var fragments = availableFragments(); // Remove the 'enabled' class from all directions dom.controlsLeft.concat( dom.controlsRight ) .concat( dom.controlsUp ) .concat( dom.controlsDown ) .concat( dom.controlsPrev ) .concat( dom.controlsNext ).forEach( function( node ) { node.classList.remove( 'enabled' ); node.classList.remove( 'fragmented' ); // Set 'disabled' attribute on all directions node.setAttribute( 'disabled', 'disabled' ); } ); // Add the 'enabled' class to the available routes; remove 'disabled' attribute to enable buttons if( routes.left ) dom.controlsLeft.forEach( function( el ) { el.classList.add( 'enabled' ); el.removeAttribute( 'disabled' ); } ); if( routes.right ) dom.controlsRight.forEach( function( el ) { el.classList.add( 'enabled' ); el.removeAttribute( 'disabled' ); } ); if( routes.up ) dom.controlsUp.forEach( function( el ) { el.classList.add( 'enabled' ); el.removeAttribute( 'disabled' ); } ); if( routes.down ) dom.controlsDown.forEach( function( el ) { el.classList.add( 'enabled' ); el.removeAttribute( 'disabled' ); } ); // Prev/next buttons if( routes.left || routes.up ) dom.controlsPrev.forEach( function( el ) { el.classList.add( 'enabled' ); el.removeAttribute( 'disabled' ); } ); if( routes.right || routes.down ) dom.controlsNext.forEach( function( el ) { el.classList.add( 'enabled' ); el.removeAttribute( 'disabled' ); } ); // Highlight fragment directions if( currentSlide ) { // Always apply fragment decorator to prev/next buttons if( fragments.prev ) dom.controlsPrev.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); el.removeAttribute( 'disabled' ); } ); if( fragments.next ) dom.controlsNext.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); el.removeAttribute( 'disabled' ); } ); // Apply fragment decorators to directional buttons based on // what slide axis they are in if( isVerticalSlide( currentSlide ) ) { if( fragments.prev ) dom.controlsUp.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); el.removeAttribute( 'disabled' ); } ); if( fragments.next ) dom.controlsDown.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); el.removeAttribute( 'disabled' ); } ); } else { if( fragments.prev ) dom.controlsLeft.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); el.removeAttribute( 'disabled' ); } ); if( fragments.next ) dom.controlsRight.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); el.removeAttribute( 'disabled' ); } ); } } if( config.controlsTutorial ) { // Highlight control arrows with an animation to ensure // that the viewer knows how to navigate if( !hasNavigatedDown && routes.down ) { dom.controlsDownArrow.classList.add( 'highlight' ); } else { dom.controlsDownArrow.classList.remove( 'highlight' ); if( !hasNavigatedRight && routes.right && indexv === 0 ) { dom.controlsRightArrow.classList.add( 'highlight' ); } else { dom.controlsRightArrow.classList.remove( 'highlight' ); } } } } /** * Updates the background elements to reflect the current * slide. * * @param {boolean} includeAll If true, the backgrounds of * all vertical slides (not just the present) will be updated. */ function updateBackground( includeAll ) { var currentBackground = null; // Reverse past/future classes when in RTL mode var horizontalPast = config.rtl ? 'future' : 'past', horizontalFuture = config.rtl ? 'past' : 'future'; // Update the classes of all backgrounds to match the // states of their slides (past/present/future) toArray( dom.background.childNodes ).forEach( function( backgroundh, h ) { backgroundh.classList.remove( 'past' ); backgroundh.classList.remove( 'present' ); backgroundh.classList.remove( 'future' ); if( h < indexh ) { backgroundh.classList.add( horizontalPast ); } else if ( h > indexh ) { backgroundh.classList.add( horizontalFuture ); } else { backgroundh.classList.add( 'present' ); // Store a reference to the current background element currentBackground = backgroundh; } if( includeAll || h === indexh ) { toArray( backgroundh.querySelectorAll( '.slide-background' ) ).forEach( function( backgroundv, v ) { backgroundv.classList.remove( 'past' ); backgroundv.classList.remove( 'present' ); backgroundv.classList.remove( 'future' ); if( v < indexv ) { backgroundv.classList.add( 'past' ); } else if ( v > indexv ) { backgroundv.classList.add( 'future' ); } else { backgroundv.classList.add( 'present' ); // Only if this is the present horizontal and vertical slide if( h === indexh ) currentBackground = backgroundv; } } ); } } ); // Stop content inside of previous backgrounds if( previousBackground ) { stopEmbeddedContent( previousBackground ); } // Start content in the current background if( currentBackground ) { startEmbeddedContent( currentBackground ); var currentBackgroundContent = currentBackground.querySelector( '.slide-background-content' ); if( currentBackgroundContent ) { var backgroundImageURL = currentBackgroundContent.style.backgroundImage || ''; // Restart GIFs (doesn't work in Firefox) if( /\.gif/i.test( backgroundImageURL ) ) { currentBackgroundContent.style.backgroundImage = ''; window.getComputedStyle( currentBackgroundContent ).opacity; currentBackgroundContent.style.backgroundImage = backgroundImageURL; } } // Don't transition between identical backgrounds. This // prevents unwanted flicker. var previousBackgroundHash = previousBackground ? previousBackground.getAttribute( 'data-background-hash' ) : null; var currentBackgroundHash = currentBackground.getAttribute( 'data-background-hash' ); if( currentBackgroundHash && currentBackgroundHash === previousBackgroundHash && currentBackground !== previousBackground ) { dom.background.classList.add( 'no-transition' ); } previousBackground = currentBackground; } // If there's a background brightness flag for this slide, // bubble it to the .reveal container if( currentSlide ) { [ 'has-light-background', 'has-dark-background' ].forEach( function( classToBubble ) { if( currentSlide.classList.contains( classToBubble ) ) { dom.wrapper.classList.add( classToBubble ); } else { dom.wrapper.classList.remove( classToBubble ); } } ); } // Allow the first background to apply without transition setTimeout( function() { dom.background.classList.remove( 'no-transition' ); }, 1 ); } /** * Updates the position of the parallax background based * on the current slide index. */ function updateParallax() { if( config.parallaxBackgroundImage ) { var horizontalSlides = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ), verticalSlides = dom.wrapper.querySelectorAll( VERTICAL_SLIDES_SELECTOR ); var backgroundSize = dom.background.style.backgroundSize.split( ' ' ), backgroundWidth, backgroundHeight; if( backgroundSize.length === 1 ) { backgroundWidth = backgroundHeight = parseInt( backgroundSize[0], 10 ); } else { backgroundWidth = parseInt( backgroundSize[0], 10 ); backgroundHeight = parseInt( backgroundSize[1], 10 ); } var slideWidth = dom.background.offsetWidth, horizontalSlideCount = horizontalSlides.length, horizontalOffsetMultiplier, horizontalOffset; if( typeof config.parallaxBackgroundHorizontal === 'number' ) { horizontalOffsetMultiplier = config.parallaxBackgroundHorizontal; } else { horizontalOffsetMultiplier = horizontalSlideCount > 1 ? ( backgroundWidth - slideWidth ) / ( horizontalSlideCount-1 ) : 0; } horizontalOffset = horizontalOffsetMultiplier * indexh * -1; var slideHeight = dom.background.offsetHeight, verticalSlideCount = verticalSlides.length, verticalOffsetMultiplier, verticalOffset; if( typeof config.parallaxBackgroundVertical === 'number' ) { verticalOffsetMultiplier = config.parallaxBackgroundVertical; } else { verticalOffsetMultiplier = ( backgroundHeight - slideHeight ) / ( verticalSlideCount-1 ); } verticalOffset = verticalSlideCount > 0 ? verticalOffsetMultiplier * indexv : 0; dom.background.style.backgroundPosition = horizontalOffset + 'px ' + -verticalOffset + 'px'; } } /** * Called when the given slide is within the configured view * distance. Shows the slide element and loads any content * that is set to load lazily (data-src). * * @param {HTMLElement} slide Slide to show */ function loadSlide( slide, options ) { options = options || {}; // Show the slide element slide.style.display = config.display; // Media elements with data-src attributes toArray( slide.querySelectorAll( 'img[data-src], video[data-src], audio[data-src]' ) ).forEach( function( element ) { element.setAttribute( 'src', element.getAttribute( 'data-src' ) ); element.setAttribute( 'data-lazy-loaded', '' ); element.removeAttribute( 'data-src' ); } ); // Media elements with <source> children toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( media ) { var sources = 0; toArray( media.querySelectorAll( 'source[data-src]' ) ).forEach( function( source ) { source.setAttribute( 'src', source.getAttribute( 'data-src' ) ); source.removeAttribute( 'data-src' ); source.setAttribute( 'data-lazy-loaded', '' ); sources += 1; } ); // If we rewrote sources for this video/audio element, we need // to manually tell it to load from its new origin if( sources > 0 ) { media.load(); } } ); // Show the corresponding background element var background = slide.slideBackgroundElement; if( background ) { background.style.display = 'block'; var backgroundContent = slide.slideBackgroundContentElement; // If the background contains media, load it if( background.hasAttribute( 'data-loaded' ) === false ) { background.setAttribute( 'data-loaded', 'true' ); var backgroundImage = slide.getAttribute( 'data-background-image' ), backgroundVideo = slide.getAttribute( 'data-background-video' ), backgroundVideoLoop = slide.hasAttribute( 'data-background-video-loop' ), backgroundVideoMuted = slide.hasAttribute( 'data-background-video-muted' ), backgroundIframe = slide.getAttribute( 'data-background-iframe' ); // Images if( backgroundImage ) { backgroundContent.style.backgroundImage = 'url('+ encodeURI( backgroundImage ) +')'; } // Videos else if ( backgroundVideo && !isSpeakerNotes() ) { var video = document.createElement( 'video' ); if( backgroundVideoLoop ) { video.setAttribute( 'loop', '' ); } if( backgroundVideoMuted ) { video.muted = true; } // Inline video playback works (at least in Mobile Safari) as // long as the video is muted and the `playsinline` attribute is // present if( isMobileDevice ) { video.muted = true; video.autoplay = true; video.setAttribute( 'playsinline', '' ); } // Support comma separated lists of video sources backgroundVideo.split( ',' ).forEach( function( source ) { video.innerHTML += '<source src="'+ source +'">'; } ); backgroundContent.appendChild( video ); } // Iframes else if( backgroundIframe && options.excludeIframes !== true ) { var iframe = document.createElement( 'iframe' ); iframe.setAttribute( 'allowfullscreen', '' ); iframe.setAttribute( 'mozallowfullscreen', '' ); iframe.setAttribute( 'webkitallowfullscreen', '' ); // Only load autoplaying content when the slide is shown to // avoid having it play in the background if( /autoplay=(1|true|yes)/gi.test( backgroundIframe ) ) { iframe.setAttribute( 'data-src', backgroundIframe ); } else { iframe.setAttribute( 'src', backgroundIframe ); } iframe.style.width = '100%'; iframe.style.height = '100%'; iframe.style.maxHeight = '100%'; iframe.style.maxWidth = '100%'; backgroundContent.appendChild( iframe ); } } } } /** * Unloads and hides the given slide. This is called when the * slide is moved outside of the configured view distance. * * @param {HTMLElement} slide */ function unloadSlide( slide ) { // Hide the slide element slide.style.display = 'none'; // Hide the corresponding background element var background = getSlideBackground( slide ); if( background ) { background.style.display = 'none'; } // Reset lazy-loaded media elements with src attributes toArray( slide.querySelectorAll( 'video[data-lazy-loaded][src], audio[data-lazy-loaded][src]' ) ).forEach( function( element ) { element.setAttribute( 'data-src', element.getAttribute( 'src' ) ); element.removeAttribute( 'src' ); } ); // Reset lazy-loaded media elements with <source> children toArray( slide.querySelectorAll( 'video[data-lazy-loaded] source[src], audio source[src]' ) ).forEach( function( source ) { source.setAttribute( 'data-src', source.getAttribute( 'src' ) ); source.removeAttribute( 'src' ); } ); } /** * Determine what available routes there are for navigation. * * @return {{left: boolean, right: boolean, up: boolean, down: boolean}} */ function availableRoutes() { var horizontalSlides = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ), verticalSlides = dom.wrapper.querySelectorAll( VERTICAL_SLIDES_SELECTOR ); var routes = { left: indexh > 0, right: indexh < horizontalSlides.length - 1, up: indexv > 0, down: indexv < verticalSlides.length - 1 }; // Looped presentations can always be navigated as long as // there are slides available if( config.loop ) { if( horizontalSlides.length > 1 ) { routes.left = true; routes.right = true; } if( verticalSlides.length > 1 ) { routes.up = true; routes.down = true; } } // Reverse horizontal controls for rtl if( config.rtl ) { var left = routes.left; routes.left = routes.right; routes.right = left; } return routes; } /** * Returns an object describing the available fragment * directions. * * @return {{prev: boolean, next: boolean}} */ function availableFragments() { if( currentSlide && config.fragments ) { var fragments = currentSlide.querySelectorAll( '.fragment' ); var hiddenFragments = currentSlide.querySelectorAll( '.fragment:not(.visible)' ); return { prev: fragments.length - hiddenFragments.length > 0, next: !!hiddenFragments.length }; } else { return { prev: false, next: false }; } } /** * Enforces origin-specific format rules for embedded media. */ function formatEmbeddedContent() { var _appendParamToIframeSource = function( sourceAttribute, sourceURL, param ) { toArray( dom.slides.querySelectorAll( 'iframe['+ sourceAttribute +'*="'+ sourceURL +'"]' ) ).forEach( function( el ) { var src = el.getAttribute( sourceAttribute ); if( src && src.indexOf( param ) === -1 ) { el.setAttribute( sourceAttribute, src + ( !/\?/.test( src ) ? '?' : '&' ) + param ); } }); }; // YouTube frames must include "?enablejsapi=1" _appendParamToIframeSource( 'src', 'youtube.com/embed/', 'enablejsapi=1' ); _appendParamToIframeSource( 'data-src', 'youtube.com/embed/', 'enablejsapi=1' ); // Vimeo frames must include "?api=1" _appendParamToIframeSource( 'src', 'player.vimeo.com/', 'api=1' ); _appendParamToIframeSource( 'data-src', 'player.vimeo.com/', 'api=1' ); // Always show media controls on mobile devices if( isMobileDevice ) { toArray( dom.slides.querySelectorAll( 'video, audio' ) ).forEach( function( el ) { el.controls = true; } ); } } /** * Start playback of any embedded content inside of * the given element. * * @param {HTMLElement} element */ function startEmbeddedContent( element ) { if( element && !isSpeakerNotes() ) { // Restart GIFs toArray( element.querySelectorAll( 'img[src$=".gif"]' ) ).forEach( function( el ) { // Setting the same unchanged source like this was confirmed // to work in Chrome, FF & Safari el.setAttribute( 'src', el.getAttribute( 'src' ) ); } ); // HTML5 media elements toArray( element.querySelectorAll( 'video, audio' ) ).forEach( function( el ) { if( closestParent( el, '.fragment' ) && !closestParent( el, '.fragment.visible' ) ) { return; } // Prefer an explicit global autoplay setting var autoplay = config.autoPlayMedia; // If no global setting is available, fall back on the element's // own autoplay setting if( typeof autoplay !== 'boolean' ) { autoplay = el.hasAttribute( 'data-autoplay' ) || !!closestParent( el, '.slide-background' ); } if( autoplay && typeof el.play === 'function' ) { // If the media is ready, start playback if( el.readyState > 1 ) { startEmbeddedMedia( { target: el } ); } // Mobile devices never fire a loaded event so instead // of waiting, we initiate playback else if( isMobileDevice ) { el.play(); } // If the media isn't loaded, wait before playing else { el.removeEventListener( 'loadeddata', startEmbeddedMedia ); // remove first to avoid dupes el.addEventListener( 'loadeddata', startEmbeddedMedia ); } } } ); // Normal iframes toArray( element.querySelectorAll( 'iframe[src]' ) ).forEach( function( el ) { if( closestParent( el, '.fragment' ) && !closestParent( el, '.fragment.visible' ) ) { return; } startEmbeddedIframe( { target: el } ); } ); // Lazy loading iframes toArray( element.querySelectorAll( 'iframe[data-src]' ) ).forEach( function( el ) { if( closestParent( el, '.fragment' ) && !closestParent( el, '.fragment.visible' ) ) { return; } if( el.getAttribute( 'src' ) !== el.getAttribute( 'data-src' ) ) { el.removeEventListener( 'load', startEmbeddedIframe ); // remove first to avoid dupes el.addEventListener( 'load', startEmbeddedIframe ); el.setAttribute( 'src', el.getAttribute( 'data-src' ) ); } } ); } } /** * Starts playing an embedded video/audio element after * it has finished loading. * * @param {object} event */ function startEmbeddedMedia( event ) { var isAttachedToDOM = !!closestParent( event.target, 'html' ), isVisible = !!closestParent( event.target, '.present' ); if( isAttachedToDOM && isVisible ) { event.target.currentTime = 0; event.target.play(); } event.target.removeEventListener( 'loadeddata', startEmbeddedMedia ); } /** * "Starts" the content of an embedded iframe using the * postMessage API. * * @param {object} event */ function startEmbeddedIframe( event ) { var iframe = event.target; if( iframe && iframe.contentWindow ) { var isAttachedToDOM = !!closestParent( event.target, 'html' ), isVisible = !!closestParent( event.target, '.present' ); if( isAttachedToDOM && isVisible ) { // Prefer an explicit global autoplay setting var autoplay = config.autoPlayMedia; // If no global setting is available, fall back on the element's // own autoplay setting if( typeof autoplay !== 'boolean' ) { autoplay = iframe.hasAttribute( 'data-autoplay' ) || !!closestParent( iframe, '.slide-background' ); } // YouTube postMessage API if( /youtube\.com\/embed\//.test( iframe.getAttribute( 'src' ) ) && autoplay ) { iframe.contentWindow.postMessage( '{"event":"command","func":"playVideo","args":""}', '*' ); } // Vimeo postMessage API else if( /player\.vimeo\.com\//.test( iframe.getAttribute( 'src' ) ) && autoplay ) { iframe.contentWindow.postMessage( '{"method":"play"}', '*' ); } // Generic postMessage API else { iframe.contentWindow.postMessage( 'slide:start', '*' ); } } } } /** * Stop playback of any embedded content inside of * the targeted slide. * * @param {HTMLElement} element */ function stopEmbeddedContent( element, options ) { options = extend( { // Defaults unloadIframes: true }, options || {} ); if( element && element.parentNode ) { // HTML5 media elements toArray( element.querySelectorAll( 'video, audio' ) ).forEach( function( el ) { if( !el.hasAttribute( 'data-ignore' ) && typeof el.pause === 'function' ) { el.setAttribute('data-paused-by-reveal', ''); el.pause(); } } ); // Generic postMessage API for non-lazy loaded iframes toArray( element.querySelectorAll( 'iframe' ) ).forEach( function( el ) { if( el.contentWindow ) el.contentWindow.postMessage( 'slide:stop', '*' ); el.removeEventListener( 'load', startEmbeddedIframe ); }); // YouTube postMessage API toArray( element.querySelectorAll( 'iframe[src*="youtube.com/embed/"]' ) ).forEach( function( el ) { if( !el.hasAttribute( 'data-ignore' ) && el.contentWindow && typeof el.contentWindow.postMessage === 'function' ) { el.contentWindow.postMessage( '{"event":"command","func":"pauseVideo","args":""}', '*' ); } }); // Vimeo postMessage API toArray( element.querySelectorAll( 'iframe[src*="player.vimeo.com/"]' ) ).forEach( function( el ) { if( !el.hasAttribute( 'data-ignore' ) && el.contentWindow && typeof el.contentWindow.postMessage === 'function' ) { el.contentWindow.postMessage( '{"method":"pause"}', '*' ); } }); if( options.unloadIframes === true ) { // Unload lazy-loaded iframes toArray( element.querySelectorAll( 'iframe[data-src]' ) ).forEach( function( el ) { // Only removing the src doesn't actually unload the frame // in all browsers (Firefox) so we set it to blank first el.setAttribute( 'src', 'about:blank' ); el.removeAttribute( 'src' ); } ); } } } /** * Returns the number of past slides. This can be used as a global * flattened index for slides. * * @return {number} Past slide count */ function getSlidePastCount() { var horizontalSlides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ); // The number of past slides var pastCount = 0; // Step through all slides and count the past ones mainLoop: for( var i = 0; i < horizontalSlides.length; i++ ) { var horizontalSlide = horizontalSlides[i]; var verticalSlides = toArray( horizontalSlide.querySelectorAll( 'section' ) ); for( var j = 0; j < verticalSlides.length; j++ ) { // Stop as soon as we arrive at the present if( verticalSlides[j].classList.contains( 'present' ) ) { break mainLoop; } pastCount++; } // Stop as soon as we arrive at the present if( horizontalSlide.classList.contains( 'present' ) ) { break; } // Don't count the wrapping section for vertical slides if( horizontalSlide.classList.contains( 'stack' ) === false ) { pastCount++; } } return pastCount; } /** * Returns a value ranging from 0-1 that represents * how far into the presentation we have navigated. * * @return {number} */ function getProgress() { // The number of past and total slides var totalCount = getTotalSlides(); var pastCount = getSlidePastCount(); if( currentSlide ) { var allFragments = currentSlide.querySelectorAll( '.fragment' ); // If there are fragments in the current slide those should be // accounted for in the progress. if( allFragments.length > 0 ) { var visibleFragments = currentSlide.querySelectorAll( '.fragment.visible' ); // This value represents how big a portion of the slide progress // that is made up by its fragments (0-1) var fragmentWeight = 0.9; // Add fragment progress to the past slide count pastCount += ( visibleFragments.length / allFragments.length ) * fragmentWeight; } } return pastCount / ( totalCount - 1 ); } /** * Checks if this presentation is running inside of the * speaker notes window. * * @return {boolean} */ function isSpeakerNotes() { return !!window.location.search.match( /receiver/gi ); } /** * Reads the current URL (hash) and navigates accordingly. */ function readURL() { var hash = window.location.hash; // Attempt to parse the hash as either an index or name var bits = hash.slice( 2 ).split( '/' ), name = hash.replace( /#|\//gi, '' ); // If the first bit is not fully numeric and there is a name we // can assume that this is a named link if( !/^[0-9]*$/.test( bits[0] ) && name.length ) { var element; // Ensure the named link is a valid HTML ID attribute try { element = document.getElementById( decodeURIComponent( name ) ); } catch ( error ) { } // Ensure that we're not already on a slide with the same name var isSameNameAsCurrentSlide = currentSlide ? currentSlide.getAttribute( 'id' ) === name : false; if( element && !isSameNameAsCurrentSlide ) { // Find the position of the named slide and navigate to it var indices = Reveal.getIndices( element ); slide( indices.h, indices.v ); } // If the slide doesn't exist, navigate to the current slide else { slide( indexh || 0, indexv || 0 ); } } else { var hashIndexBase = config.hashOneBasedIndex ? 1 : 0; // Read the index components of the hash var h = ( parseInt( bits[0], 10 ) - hashIndexBase ) || 0, v = ( parseInt( bits[1], 10 ) - hashIndexBase ) || 0, f; if( config.fragmentInURL ) { f = parseInt( bits[2], 10 ); if( isNaN( f ) ) { f = undefined; } } if( h !== indexh || v !== indexv || f !== undefined ) { slide( h, v, f ); } } } /** * Updates the page URL (hash) to reflect the current * state. * * @param {number} delay The time in ms to wait before * writing the hash */ function writeURL( delay ) { if( config.history ) { // Make sure there's never more than one timeout running clearTimeout( writeURLTimeout ); // If a delay is specified, timeout this call if( typeof delay === 'number' ) { writeURLTimeout = setTimeout( writeURL, delay ); } else if( currentSlide ) { window.location.hash = locationHash(); } } } /** * Retrieves the h/v location and fragment of the current, * or specified, slide. * * @param {HTMLElement} [slide] If specified, the returned * index will be for this slide rather than the currently * active one * * @return {{h: number, v: number, f: number}} */ function getIndices( slide ) { // By default, return the current indices var h = indexh, v = indexv, f; // If a slide is specified, return the indices of that slide if( slide ) { var isVertical = isVerticalSlide( slide ); var slideh = isVertical ? slide.parentNode : slide; // Select all horizontal slides var horizontalSlides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ); // Now that we know which the horizontal slide is, get its index h = Math.max( horizontalSlides.indexOf( slideh ), 0 ); // Assume we're not vertical v = undefined; // If this is a vertical slide, grab the vertical index if( isVertical ) { v = Math.max( toArray( slide.parentNode.querySelectorAll( 'section' ) ).indexOf( slide ), 0 ); } } if( !slide && currentSlide ) { var hasFragments = currentSlide.querySelectorAll( '.fragment' ).length > 0; if( hasFragments ) { var currentFragment = currentSlide.querySelector( '.current-fragment' ); if( currentFragment && currentFragment.hasAttribute( 'data-fragment-index' ) ) { f = parseInt( currentFragment.getAttribute( 'data-fragment-index' ), 10 ); } else { f = currentSlide.querySelectorAll( '.fragment.visible' ).length - 1; } } } return { h: h, v: v, f: f }; } /** * Retrieves all slides in this presentation. */ function getSlides() { return toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ':not(.stack)' )); } /** * Retrieves the total number of slides in this presentation. * * @return {number} */ function getTotalSlides() { return getSlides().length; } /** * Returns the slide element matching the specified index. * * @return {HTMLElement} */ function getSlide( x, y ) { var horizontalSlide = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR )[ x ]; var verticalSlides = horizontalSlide && horizontalSlide.querySelectorAll( 'section' ); if( verticalSlides && verticalSlides.length && typeof y === 'number' ) { return verticalSlides ? verticalSlides[ y ] : undefined; } return horizontalSlide; } /** * Returns the background element for the given slide. * All slides, even the ones with no background properties * defined, have a background element so as long as the * index is valid an element will be returned. * * @param {mixed} x Horizontal background index OR a slide * HTML element * @param {number} y Vertical background index * @return {(HTMLElement[]|*)} */ function getSlideBackground( x, y ) { var slide = typeof x === 'number' ? getSlide( x, y ) : x; if( slide ) { return slide.slideBackgroundElement; } return undefined; } /** * Retrieves the speaker notes from a slide. Notes can be * defined in two ways: * 1. As a data-notes attribute on the slide <section> * 2. As an <aside class="notes"> inside of the slide * * @param {HTMLElement} [slide=currentSlide] * @return {(string|null)} */ function getSlideNotes( slide ) { // Default to the current slide slide = slide || currentSlide; // Notes can be specified via the data-notes attribute... if( slide.hasAttribute( 'data-notes' ) ) { return slide.getAttribute( 'data-notes' ); } // ... or using an <aside class="notes"> element var notesElement = slide.querySelector( 'aside.notes' ); if( notesElement ) { return notesElement.innerHTML; } return null; } /** * Retrieves the current state of the presentation as * an object. This state can then be restored at any * time. * * @return {{indexh: number, indexv: number, indexf: number, paused: boolean, overview: boolean}} */ function getState() { var indices = getIndices(); return { indexh: indices.h, indexv: indices.v, indexf: indices.f, paused: isPaused(), overview: isOverview() }; } /** * Restores the presentation to the given state. * * @param {object} state As generated by getState() * @see {@link getState} generates the parameter `state` */ function setState( state ) { if( typeof state === 'object' ) { slide( deserialize( state.indexh ), deserialize( state.indexv ), deserialize( state.indexf ) ); var pausedFlag = deserialize( state.paused ), overviewFlag = deserialize( state.overview ); if( typeof pausedFlag === 'boolean' && pausedFlag !== isPaused() ) { togglePause( pausedFlag ); } if( typeof overviewFlag === 'boolean' && overviewFlag !== isOverview() ) { toggleOverview( overviewFlag ); } } } /** * Return a sorted fragments list, ordered by an increasing * "data-fragment-index" attribute. * * Fragments will be revealed in the order that they are returned by * this function, so you can use the index attributes to control the * order of fragment appearance. * * To maintain a sensible default fragment order, fragments are presumed * to be passed in document order. This function adds a "fragment-index" * attribute to each node if such an attribute is not already present, * and sets that attribute to an integer value which is the position of * the fragment within the fragments list. * * @param {object[]|*} fragments * @param {boolean} grouped If true the returned array will contain * nested arrays for all fragments with the same index * @return {object[]} sorted Sorted array of fragments */ function sortFragments( fragments, grouped ) { fragments = toArray( fragments ); var ordered = [], unordered = [], sorted = []; // Group ordered and unordered elements fragments.forEach( function( fragment, i ) { if( fragment.hasAttribute( 'data-fragment-index' ) ) { var index = parseInt( fragment.getAttribute( 'data-fragment-index' ), 10 ); if( !ordered[index] ) { ordered[index] = []; } ordered[index].push( fragment ); } else { unordered.push( [ fragment ] ); } } ); // Append fragments without explicit indices in their // DOM order ordered = ordered.concat( unordered ); // Manually count the index up per group to ensure there // are no gaps var index = 0; // Push all fragments in their sorted order to an array, // this flattens the groups ordered.forEach( function( group ) { group.forEach( function( fragment ) { sorted.push( fragment ); fragment.setAttribute( 'data-fragment-index', index ); } ); index ++; } ); return grouped === true ? ordered : sorted; } /** * Navigate to the specified slide fragment. * * @param {?number} index The index of the fragment that * should be shown, -1 means all are invisible * @param {number} offset Integer offset to apply to the * fragment index * * @return {boolean} true if a change was made in any * fragments visibility as part of this call */ function navigateFragment( index, offset ) { if( currentSlide && config.fragments ) { var fragments = sortFragments( currentSlide.querySelectorAll( '.fragment' ) ); if( fragments.length ) { // If no index is specified, find the current if( typeof index !== 'number' ) { var lastVisibleFragment = sortFragments( currentSlide.querySelectorAll( '.fragment.visible' ) ).pop(); if( lastVisibleFragment ) { index = parseInt( lastVisibleFragment.getAttribute( 'data-fragment-index' ) || 0, 10 ); } else { index = -1; } } // If an offset is specified, apply it to the index if( typeof offset === 'number' ) { index += offset; } var fragmentsShown = [], fragmentsHidden = []; toArray( fragments ).forEach( function( element, i ) { if( element.hasAttribute( 'data-fragment-index' ) ) { i = parseInt( element.getAttribute( 'data-fragment-index' ), 10 ); } // Visible fragments if( i <= index ) { if( !element.classList.contains( 'visible' ) ) fragmentsShown.push( element ); element.classList.add( 'visible' ); element.classList.remove( 'current-fragment' ); // Announce the fragments one by one to the Screen Reader dom.statusDiv.textContent = getStatusText( element ); if( i === index ) { element.classList.add( 'current-fragment' ); startEmbeddedContent( element ); } } // Hidden fragments else { if( element.classList.contains( 'visible' ) ) fragmentsHidden.push( element ); element.classList.remove( 'visible' ); element.classList.remove( 'current-fragment' ); } } ); if( fragmentsHidden.length ) { dispatchEvent( 'fragmenthidden', { fragment: fragmentsHidden[0], fragments: fragmentsHidden } ); } if( fragmentsShown.length ) { dispatchEvent( 'fragmentshown', { fragment: fragmentsShown[0], fragments: fragmentsShown } ); } updateControls(); updateProgress(); if( config.fragmentInURL ) { writeURL(); } return !!( fragmentsShown.length || fragmentsHidden.length ); } } return false; } /** * Navigate to the next slide fragment. * * @return {boolean} true if there was a next fragment, * false otherwise */ function nextFragment() { return navigateFragment( null, 1 ); } /** * Navigate to the previous slide fragment. * * @return {boolean} true if there was a previous fragment, * false otherwise */ function previousFragment() { return navigateFragment( null, -1 ); } /** * Cues a new automated slide if enabled in the config. */ function cueAutoSlide() { cancelAutoSlide(); if( currentSlide && config.autoSlide !== false ) { var fragment = currentSlide.querySelector( '.current-fragment' ); // When the slide first appears there is no "current" fragment so // we look for a data-autoslide timing on the first fragment if( !fragment ) fragment = currentSlide.querySelector( '.fragment' ); var fragmentAutoSlide = fragment ? fragment.getAttribute( 'data-autoslide' ) : null; var parentAutoSlide = currentSlide.parentNode ? currentSlide.parentNode.getAttribute( 'data-autoslide' ) : null; var slideAutoSlide = currentSlide.getAttribute( 'data-autoslide' ); // Pick value in the following priority order: // 1. Current fragment's data-autoslide // 2. Current slide's data-autoslide // 3. Parent slide's data-autoslide // 4. Global autoSlide setting if( fragmentAutoSlide ) { autoSlide = parseInt( fragmentAutoSlide, 10 ); } else if( slideAutoSlide ) { autoSlide = parseInt( slideAutoSlide, 10 ); } else if( parentAutoSlide ) { autoSlide = parseInt( parentAutoSlide, 10 ); } else { autoSlide = config.autoSlide; } // If there are media elements with data-autoplay, // automatically set the autoSlide duration to the // length of that media. Not applicable if the slide // is divided up into fragments. // playbackRate is accounted for in the duration. if( currentSlide.querySelectorAll( '.fragment' ).length === 0 ) { toArray( currentSlide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) { if( el.hasAttribute( 'data-autoplay' ) ) { if( autoSlide && (el.duration * 1000 / el.playbackRate ) > autoSlide ) { autoSlide = ( el.duration * 1000 / el.playbackRate ) + 1000; } } } ); } // Cue the next auto-slide if: // - There is an autoSlide value // - Auto-sliding isn't paused by the user // - The presentation isn't paused // - The overview isn't active // - The presentation isn't over if( autoSlide && !autoSlidePaused && !isPaused() && !isOverview() && ( !Reveal.isLastSlide() || availableFragments().next || config.loop === true ) ) { autoSlideTimeout = setTimeout( function() { typeof config.autoSlideMethod === 'function' ? config.autoSlideMethod() : navigateNext(); cueAutoSlide(); }, autoSlide ); autoSlideStartTime = Date.now(); } if( autoSlidePlayer ) { autoSlidePlayer.setPlaying( autoSlideTimeout !== -1 ); } } } /** * Cancels any ongoing request to auto-slide. */ function cancelAutoSlide() { clearTimeout( autoSlideTimeout ); autoSlideTimeout = -1; } function pauseAutoSlide() { if( autoSlide && !autoSlidePaused ) { autoSlidePaused = true; dispatchEvent( 'autoslidepaused' ); clearTimeout( autoSlideTimeout ); if( autoSlidePlayer ) { autoSlidePlayer.setPlaying( false ); } } } function resumeAutoSlide() { if( autoSlide && autoSlidePaused ) { autoSlidePaused = false; dispatchEvent( 'autoslideresumed' ); cueAutoSlide(); } } function navigateLeft() { // Reverse for RTL if( config.rtl ) { if( ( isOverview() || nextFragment() === false ) && availableRoutes().left ) { slide( indexh + 1 ); } } // Normal navigation else if( ( isOverview() || previousFragment() === false ) && availableRoutes().left ) { slide( indexh - 1 ); } } function navigateRight() { hasNavigatedRight = true; // Reverse for RTL if( config.rtl ) { if( ( isOverview() || previousFragment() === false ) && availableRoutes().right ) { slide( indexh - 1 ); } } // Normal navigation else if( ( isOverview() || nextFragment() === false ) && availableRoutes().right ) { slide( indexh + 1 ); } } function navigateUp() { // Prioritize hiding fragments if( ( isOverview() || previousFragment() === false ) && availableRoutes().up ) { slide( indexh, indexv - 1 ); } } function navigateDown() { hasNavigatedDown = true; // Prioritize revealing fragments if( ( isOverview() || nextFragment() === false ) && availableRoutes().down ) { slide( indexh, indexv + 1 ); } } /** * Navigates backwards, prioritized in the following order: * 1) Previous fragment * 2) Previous vertical slide * 3) Previous horizontal slide */ function navigatePrev() { // Prioritize revealing fragments if( previousFragment() === false ) { if( availableRoutes().up ) { navigateUp(); } else { // Fetch the previous horizontal slide, if there is one var previousSlide; if( config.rtl ) { previousSlide = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR + '.future' ) ).pop(); } else { previousSlide = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR + '.past' ) ).pop(); } if( previousSlide ) { var v = ( previousSlide.querySelectorAll( 'section' ).length - 1 ) || undefined; var h = indexh - 1; slide( h, v ); } } } } /** * The reverse of #navigatePrev(). */ function navigateNext() { hasNavigatedRight = true; hasNavigatedDown = true; // Prioritize revealing fragments if( nextFragment() === false ) { var routes = availableRoutes(); // When looping is enabled `routes.down` is always available // so we need a separate check for when we've reached the // end of a stack and should move horizontally if( routes.down && routes.right && config.loop && Reveal.isLastVerticalSlide( currentSlide ) ) { routes.down = false; } if( routes.down ) { navigateDown(); } else if( config.rtl ) { navigateLeft(); } else { navigateRight(); } } } /** * Checks if the target element prevents the triggering of * swipe navigation. */ function isSwipePrevented( target ) { while( target && typeof target.hasAttribute === 'function' ) { if( target.hasAttribute( 'data-prevent-swipe' ) ) return true; target = target.parentNode; } return false; } // --------------------------------------------------------------------// // ----------------------------- EVENTS -------------------------------// // --------------------------------------------------------------------// /** * Called by all event handlers that are based on user * input. * * @param {object} [event] */ function onUserInput( event ) { if( config.autoSlideStoppable ) { pauseAutoSlide(); } } /** * Handler for the document level 'keypress' event. * * @param {object} event */ function onDocumentKeyPress( event ) { // Check if the pressed key is question mark if( event.shiftKey && event.charCode === 63 ) { toggleHelp(); } } /** * Handler for the document level 'keydown' event. * * @param {object} event */ function onDocumentKeyDown( event ) { // If there's a condition specified and it returns false, // ignore this event if( typeof config.keyboardCondition === 'function' && config.keyboardCondition(event) === false ) { return true; } // Remember if auto-sliding was paused so we can toggle it var autoSlideWasPaused = autoSlidePaused; onUserInput( event ); // Check if there's a focused element that could be using // the keyboard var activeElementIsCE = document.activeElement && document.activeElement.contentEditable !== 'inherit'; var activeElementIsInput = document.activeElement && document.activeElement.tagName && /input|textarea/i.test( document.activeElement.tagName ); var activeElementIsNotes = document.activeElement && document.activeElement.className && /speaker-notes/i.test( document.activeElement.className); // Disregard the event if there's a focused element or a // keyboard modifier key is present if( activeElementIsCE || activeElementIsInput || activeElementIsNotes || (event.shiftKey && event.keyCode !== 32) || event.altKey || event.ctrlKey || event.metaKey ) return; // While paused only allow resume keyboard events; 'b', 'v', '.' var resumeKeyCodes = [66,86,190,191]; var key; // Custom key bindings for togglePause should be able to resume if( typeof config.keyboard === 'object' ) { for( key in config.keyboard ) { if( config.keyboard[key] === 'togglePause' ) { resumeKeyCodes.push( parseInt( key, 10 ) ); } } } if( isPaused() && resumeKeyCodes.indexOf( event.keyCode ) === -1 ) { return false; } var triggered = false; // 1. User defined key bindings if( typeof config.keyboard === 'object' ) { for( key in config.keyboard ) { // Check if this binding matches the pressed key if( parseInt( key, 10 ) === event.keyCode ) { var value = config.keyboard[ key ]; // Callback function if( typeof value === 'function' ) { value.apply( null, [ event ] ); } // String shortcuts to reveal.js API else if( typeof value === 'string' && typeof Reveal[ value ] === 'function' ) { Reveal[ value ].call(); } triggered = true; } } } // 2. Registered custom key bindings if( triggered === false ) { for( key in registeredKeyBindings ) { // Check if this binding matches the pressed key if( parseInt( key, 10 ) === event.keyCode ) { var action = registeredKeyBindings[ key ].callback; // Callback function if( typeof action === 'function' ) { action.apply( null, [ event ] ); } // String shortcuts to reveal.js API else if( typeof action === 'string' && typeof Reveal[ action ] === 'function' ) { Reveal[ action ].call(); } triggered = true; } } } // 3. System defined key bindings if( triggered === false ) { // Assume true and try to prove false triggered = true; switch( event.keyCode ) { // p, page up case 80: case 33: navigatePrev(); break; // n, page down case 78: case 34: navigateNext(); break; // h, left case 72: case 37: navigateLeft(); break; // l, right case 76: case 39: navigateRight(); break; // k, up case 75: case 38: navigateUp(); break; // j, down case 74: case 40: navigateDown(); break; // home case 36: slide( 0 ); break; // end case 35: slide( Number.MAX_VALUE ); break; // space case 32: isOverview() ? deactivateOverview() : event.shiftKey ? navigatePrev() : navigateNext(); break; // return case 13: isOverview() ? deactivateOverview() : triggered = false; break; // two-spot, semicolon, b, v, period, Logitech presenter tools "black screen" button case 58: case 59: case 66: case 86: case 190: case 191: togglePause(); break; // f case 70: enterFullscreen(); break; // a case 65: if ( config.autoSlideStoppable ) toggleAutoSlide( autoSlideWasPaused ); break; default: triggered = false; } } // If the input resulted in a triggered action we should prevent // the browsers default behavior if( triggered ) { event.preventDefault && event.preventDefault(); } // ESC or O key else if ( ( event.keyCode === 27 || event.keyCode === 79 ) && features.transforms3d ) { if( dom.overlay ) { closeOverlay(); } else { toggleOverview(); } event.preventDefault && event.preventDefault(); } // If auto-sliding is enabled we need to cue up // another timeout cueAutoSlide(); } /** * Handler for the 'touchstart' event, enables support for * swipe and pinch gestures. * * @param {object} event */ function onTouchStart( event ) { if( isSwipePrevented( event.target ) ) return true; touch.startX = event.touches[0].clientX; touch.startY = event.touches[0].clientY; touch.startCount = event.touches.length; // If there's two touches we need to memorize the distance // between those two points to detect pinching if( event.touches.length === 2 && config.overview ) { touch.startSpan = distanceBetween( { x: event.touches[1].clientX, y: event.touches[1].clientY }, { x: touch.startX, y: touch.startY } ); } } /** * Handler for the 'touchmove' event. * * @param {object} event */ function onTouchMove( event ) { if( isSwipePrevented( event.target ) ) return true; // Each touch should only trigger one action if( !touch.captured ) { onUserInput( event ); var currentX = event.touches[0].clientX; var currentY = event.touches[0].clientY; // If the touch started with two points and still has // two active touches; test for the pinch gesture if( event.touches.length === 2 && touch.startCount === 2 && config.overview ) { // The current distance in pixels between the two touch points var currentSpan = distanceBetween( { x: event.touches[1].clientX, y: event.touches[1].clientY }, { x: touch.startX, y: touch.startY } ); // If the span is larger than the desire amount we've got // ourselves a pinch if( Math.abs( touch.startSpan - currentSpan ) > touch.threshold ) { touch.captured = true; if( currentSpan < touch.startSpan ) { activateOverview(); } else { deactivateOverview(); } } event.preventDefault(); } // There was only one touch point, look for a swipe else if( event.touches.length === 1 && touch.startCount !== 2 ) { var deltaX = currentX - touch.startX, deltaY = currentY - touch.startY; if( deltaX > touch.threshold && Math.abs( deltaX ) > Math.abs( deltaY ) ) { touch.captured = true; navigateLeft(); } else if( deltaX < -touch.threshold && Math.abs( deltaX ) > Math.abs( deltaY ) ) { touch.captured = true; navigateRight(); } else if( deltaY > touch.threshold ) { touch.captured = true; navigateUp(); } else if( deltaY < -touch.threshold ) { touch.captured = true; navigateDown(); } // If we're embedded, only block touch events if they have // triggered an action if( config.embedded ) { if( touch.captured || isVerticalSlide( currentSlide ) ) { event.preventDefault(); } } // Not embedded? Block them all to avoid needless tossing // around of the viewport in iOS else { event.preventDefault(); } } } // There's a bug with swiping on some Android devices unless // the default action is always prevented else if( UA.match( /android/gi ) ) { event.preventDefault(); } } /** * Handler for the 'touchend' event. * * @param {object} event */ function onTouchEnd( event ) { touch.captured = false; } /** * Convert pointer down to touch start. * * @param {object} event */ function onPointerDown( event ) { if( event.pointerType === event.MSPOINTER_TYPE_TOUCH || event.pointerType === "touch" ) { event.touches = [{ clientX: event.clientX, clientY: event.clientY }]; onTouchStart( event ); } } /** * Convert pointer move to touch move. * * @param {object} event */ function onPointerMove( event ) { if( event.pointerType === event.MSPOINTER_TYPE_TOUCH || event.pointerType === "touch" ) { event.touches = [{ clientX: event.clientX, clientY: event.clientY }]; onTouchMove( event ); } } /** * Convert pointer up to touch end. * * @param {object} event */ function onPointerUp( event ) { if( event.pointerType === event.MSPOINTER_TYPE_TOUCH || event.pointerType === "touch" ) { event.touches = [{ clientX: event.clientX, clientY: event.clientY }]; onTouchEnd( event ); } } /** * Handles mouse wheel scrolling, throttled to avoid skipping * multiple slides. * * @param {object} event */ function onDocumentMouseScroll( event ) { if( Date.now() - lastMouseWheelStep > 600 ) { lastMouseWheelStep = Date.now(); var delta = event.detail || -event.wheelDelta; if( delta > 0 ) { navigateNext(); } else if( delta < 0 ) { navigatePrev(); } } } /** * Clicking on the progress bar results in a navigation to the * closest approximate horizontal slide using this equation: * * ( clickX / presentationWidth ) * numberOfSlides * * @param {object} event */ function onProgressClicked( event ) { onUserInput( event ); event.preventDefault(); var slidesTotal = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ).length; var slideIndex = Math.floor( ( event.clientX / dom.wrapper.offsetWidth ) * slidesTotal ); if( config.rtl ) { slideIndex = slidesTotal - slideIndex; } slide( slideIndex ); } /** * Event handler for navigation control buttons. */ function onNavigateLeftClicked( event ) { event.preventDefault(); onUserInput(); navigateLeft(); } function onNavigateRightClicked( event ) { event.preventDefault(); onUserInput(); navigateRight(); } function onNavigateUpClicked( event ) { event.preventDefault(); onUserInput(); navigateUp(); } function onNavigateDownClicked( event ) { event.preventDefault(); onUserInput(); navigateDown(); } function onNavigatePrevClicked( event ) { event.preventDefault(); onUserInput(); navigatePrev(); } function onNavigateNextClicked( event ) { event.preventDefault(); onUserInput(); navigateNext(); } /** * Handler for the window level 'hashchange' event. * * @param {object} [event] */ function onWindowHashChange( event ) { readURL(); } /** * Handler for the window level 'resize' event. * * @param {object} [event] */ function onWindowResize( event ) { layout(); } /** * Handle for the window level 'visibilitychange' event. * * @param {object} [event] */ function onPageVisibilityChange( event ) { var isHidden = document.webkitHidden || document.msHidden || document.hidden; // If, after clicking a link or similar and we're coming back, // focus the document.body to ensure we can use keyboard shortcuts if( isHidden === false && document.activeElement !== document.body ) { // Not all elements support .blur() - SVGs among them. if( typeof document.activeElement.blur === 'function' ) { document.activeElement.blur(); } document.body.focus(); } } /** * Invoked when a slide is and we're in the overview. * * @param {object} event */ function onOverviewSlideClicked( event ) { // TODO There's a bug here where the event listeners are not // removed after deactivating the overview. if( eventsAreBound && isOverview() ) { event.preventDefault(); var element = event.target; while( element && !element.nodeName.match( /section/gi ) ) { element = element.parentNode; } if( element && !element.classList.contains( 'disabled' ) ) { deactivateOverview(); if( element.nodeName.match( /section/gi ) ) { var h = parseInt( element.getAttribute( 'data-index-h' ), 10 ), v = parseInt( element.getAttribute( 'data-index-v' ), 10 ); slide( h, v ); } } } } /** * Handles clicks on links that are set to preview in the * iframe overlay. * * @param {object} event */ function onPreviewLinkClicked( event ) { if( event.currentTarget && event.currentTarget.hasAttribute( 'href' ) ) { var url = event.currentTarget.getAttribute( 'href' ); if( url ) { showPreview( url ); event.preventDefault(); } } } /** * Handles click on the auto-sliding controls element. * * @param {object} [event] */ function onAutoSlidePlayerClick( event ) { // Replay if( Reveal.isLastSlide() && config.loop === false ) { slide( 0, 0 ); resumeAutoSlide(); } // Resume else if( autoSlidePaused ) { resumeAutoSlide(); } // Pause else { pauseAutoSlide(); } } // --------------------------------------------------------------------// // ------------------------ PLAYBACK COMPONENT ------------------------// // --------------------------------------------------------------------// /** * Constructor for the playback component, which displays * play/pause/progress controls. * * @param {HTMLElement} container The component will append * itself to this * @param {function} progressCheck A method which will be * called frequently to get the current progress on a range * of 0-1 */ function Playback( container, progressCheck ) { // Cosmetics this.diameter = 100; this.diameter2 = this.diameter/2; this.thickness = 6; // Flags if we are currently playing this.playing = false; // Current progress on a 0-1 range this.progress = 0; // Used to loop the animation smoothly this.progressOffset = 1; this.container = container; this.progressCheck = progressCheck; this.canvas = document.createElement( 'canvas' ); this.canvas.className = 'playback'; this.canvas.width = this.diameter; this.canvas.height = this.diameter; this.canvas.style.width = this.diameter2 + 'px'; this.canvas.style.height = this.diameter2 + 'px'; this.context = this.canvas.getContext( '2d' ); this.container.appendChild( this.canvas ); this.render(); } /** * @param value */ Playback.prototype.setPlaying = function( value ) { var wasPlaying = this.playing; this.playing = value; // Start repainting if we weren't already if( !wasPlaying && this.playing ) { this.animate(); } else { this.render(); } }; Playback.prototype.animate = function() { var progressBefore = this.progress; this.progress = this.progressCheck(); // When we loop, offset the progress so that it eases // smoothly rather than immediately resetting if( progressBefore > 0.8 && this.progress < 0.2 ) { this.progressOffset = this.progress; } this.render(); if( this.playing ) { features.requestAnimationFrameMethod.call( window, this.animate.bind( this ) ); } }; /** * Renders the current progress and playback state. */ Playback.prototype.render = function() { var progress = this.playing ? this.progress : 0, radius = ( this.diameter2 ) - this.thickness, x = this.diameter2, y = this.diameter2, iconSize = 28; // Ease towards 1 this.progressOffset += ( 1 - this.progressOffset ) * 0.1; var endAngle = ( - Math.PI / 2 ) + ( progress * ( Math.PI * 2 ) ); var startAngle = ( - Math.PI / 2 ) + ( this.progressOffset * ( Math.PI * 2 ) ); this.context.save(); this.context.clearRect( 0, 0, this.diameter, this.diameter ); // Solid background color this.context.beginPath(); this.context.arc( x, y, radius + 4, 0, Math.PI * 2, false ); this.context.fillStyle = 'rgba( 0, 0, 0, 0.4 )'; this.context.fill(); // Draw progress track this.context.beginPath(); this.context.arc( x, y, radius, 0, Math.PI * 2, false ); this.context.lineWidth = this.thickness; this.context.strokeStyle = 'rgba( 255, 255, 255, 0.2 )'; this.context.stroke(); if( this.playing ) { // Draw progress on top of track this.context.beginPath(); this.context.arc( x, y, radius, startAngle, endAngle, false ); this.context.lineWidth = this.thickness; this.context.strokeStyle = '#fff'; this.context.stroke(); } this.context.translate( x - ( iconSize / 2 ), y - ( iconSize / 2 ) ); // Draw play/pause icons if( this.playing ) { this.context.fillStyle = '#fff'; this.context.fillRect( 0, 0, iconSize / 2 - 4, iconSize ); this.context.fillRect( iconSize / 2 + 4, 0, iconSize / 2 - 4, iconSize ); } else { this.context.beginPath(); this.context.translate( 4, 0 ); this.context.moveTo( 0, 0 ); this.context.lineTo( iconSize - 4, iconSize / 2 ); this.context.lineTo( 0, iconSize ); this.context.fillStyle = '#fff'; this.context.fill(); } this.context.restore(); }; Playback.prototype.on = function( type, listener ) { this.canvas.addEventListener( type, listener, false ); }; Playback.prototype.off = function( type, listener ) { this.canvas.removeEventListener( type, listener, false ); }; Playback.prototype.destroy = function() { this.playing = false; if( this.canvas.parentNode ) { this.container.removeChild( this.canvas ); } }; // --------------------------------------------------------------------// // ------------------------------- API --------------------------------// // --------------------------------------------------------------------// Reveal = { VERSION: VERSION, initialize: initialize, configure: configure, sync: sync, syncSlide: syncSlide, syncFragments: syncFragments, // Navigation methods slide: slide, left: navigateLeft, right: navigateRight, up: navigateUp, down: navigateDown, prev: navigatePrev, next: navigateNext, // Fragment methods navigateFragment: navigateFragment, prevFragment: previousFragment, nextFragment: nextFragment, // Deprecated aliases navigateTo: slide, navigateLeft: navigateLeft, navigateRight: navigateRight, navigateUp: navigateUp, navigateDown: navigateDown, navigatePrev: navigatePrev, navigateNext: navigateNext, // Forces an update in slide layout layout: layout, // Randomizes the order of slides shuffle: shuffle, // Returns an object with the available routes as booleans (left/right/top/bottom) availableRoutes: availableRoutes, // Returns an object with the available fragments as booleans (prev/next) availableFragments: availableFragments, // Toggles a help overlay with keyboard shortcuts toggleHelp: toggleHelp, // Toggles the overview mode on/off toggleOverview: toggleOverview, // Toggles the "black screen" mode on/off togglePause: togglePause, // Toggles the auto slide mode on/off toggleAutoSlide: toggleAutoSlide, // State checks isOverview: isOverview, isPaused: isPaused, isAutoSliding: isAutoSliding, isSpeakerNotes: isSpeakerNotes, // Slide preloading loadSlide: loadSlide, unloadSlide: unloadSlide, // Adds or removes all internal event listeners (such as keyboard) addEventListeners: addEventListeners, removeEventListeners: removeEventListeners, // Facility for persisting and restoring the presentation state getState: getState, setState: setState, // Presentation progress getSlidePastCount: getSlidePastCount, // Presentation progress on range of 0-1 getProgress: getProgress, // Returns the indices of the current, or specified, slide getIndices: getIndices, // Returns an Array of all slides getSlides: getSlides, // Returns the total number of slides getTotalSlides: getTotalSlides, // Returns the slide element at the specified index getSlide: getSlide, // Returns the slide background element at the specified index getSlideBackground: getSlideBackground, // Returns the speaker notes string for a slide, or null getSlideNotes: getSlideNotes, // Returns the previous slide element, may be null getPreviousSlide: function() { return previousSlide; }, // Returns the current slide element getCurrentSlide: function() { return currentSlide; }, // Returns the current scale of the presentation content getScale: function() { return scale; }, // Returns the current configuration object getConfig: function() { return config; }, // Helper method, retrieves query string as a key/value hash getQueryHash: function() { var query = {}; location.search.replace( /[A-Z0-9]+?=([\w\.%-]*)/gi, function(a) { query[ a.split( '=' ).shift() ] = a.split( '=' ).pop(); } ); // Basic deserialization for( var i in query ) { var value = query[ i ]; query[ i ] = deserialize( unescape( value ) ); } return query; }, // Returns true if we're currently on the first slide isFirstSlide: function() { return ( indexh === 0 && indexv === 0 ); }, // Returns true if we're currently on the last slide isLastSlide: function() { if( currentSlide ) { // Does this slide have a next sibling? if( currentSlide.nextElementSibling ) return false; // If it's vertical, does its parent have a next sibling? if( isVerticalSlide( currentSlide ) && currentSlide.parentNode.nextElementSibling ) return false; return true; } return false; }, // Returns true if we're on the last slide in the current // vertical stack isLastVerticalSlide: function() { if( currentSlide && isVerticalSlide( currentSlide ) ) { // Does this slide have a next sibling? if( currentSlide.nextElementSibling ) return false; return true; } return false; }, // Checks if reveal.js has been loaded and is ready for use isReady: function() { return loaded; }, // Forward event binding to the reveal DOM element addEventListener: function( type, listener, useCapture ) { if( 'addEventListener' in window ) { ( dom.wrapper || document.querySelector( '.reveal' ) ).addEventListener( type, listener, useCapture ); } }, removeEventListener: function( type, listener, useCapture ) { if( 'addEventListener' in window ) { ( dom.wrapper || document.querySelector( '.reveal' ) ).removeEventListener( type, listener, useCapture ); } }, // Adds a custom key binding addKeyBinding: addKeyBinding, // Removes a custom key binding removeKeyBinding: removeKeyBinding, // Programatically triggers a keyboard event triggerKey: function( keyCode ) { onDocumentKeyDown( { keyCode: keyCode } ); }, // Registers a new shortcut to include in the help overlay registerKeyboardShortcut: function( key, value ) { keyboardShortcuts[key] = value; } }; return Reveal; }));
var searchData= [ ['getassignments',['GetAssignments',['../classak_1_1wwise_1_1core_1_1switch_container.html#acb318b35c61f65b8b09466294e44ef52',1,'ak::wwise::core::switchContainer']]], ['getattenuationcurve',['GetAttenuationCurve',['../classak_1_1wwise_1_1core_1_1_object.html#a5308de1111e98c53825af0fb6b8384b3',1,'ak::wwise::core::Object']]], ['getavailableconsoles',['GetAvailableConsoles',['../classak_1_1wwise_1_1core_1_1remote.html#aeead07e8dea8f4c2c2a315976169d207',1,'ak::wwise::core::remote']]], ['getcommands',['GetCommands',['../classak_1_1wwise_1_1ui_1_1commands.html#a094dd580f67690f17ed4d4b4ec0ce8bf',1,'ak::wwise::ui::commands']]], ['getconnectionstatus',['GetConnectionStatus',['../classak_1_1wwise_1_1core_1_1remote.html#a3645a2f8e771b212ef0b96297d3637bb',1,'ak::wwise::core::remote']]], ['getinclusions',['GetInclusions',['../classak_1_1wwise_1_1core_1_1soundbank.html#a3e414d8069f93bf6422ba6efa663201a',1,'ak::wwise::core::soundbank']]], ['getinfo',['GetInfo',['../classak_1_1wwise_1_1core.html#a0794d63ebaa3fc1a3c79d155978030ce',1,'ak::wwise::core']]], ['getlist',['GetList',['../classak_1_1wwise_1_1core_1_1transport.html#a1fe7ea7c0ee307919f744e6b3a573deb',1,'ak::wwise::core::transport']]], ['getminmaxpeaksinregion',['GetMinMaxPeaksInRegion',['../classak_1_1wwise_1_1core_1_1audio_source_peaks.html#a45c75a2d330071d850965611b84bba7b',1,'ak::wwise::core::audioSourcePeaks']]], ['getminmaxpeaksintrimmedregion',['GetMinMaxPeaksInTrimmedRegion',['../classak_1_1wwise_1_1core_1_1audio_source_peaks.html#a6e82a3efd62537cae654061123a94c57',1,'ak::wwise::core::audioSourcePeaks']]], ['getpropertyinfo',['GetPropertyInfo',['../classak_1_1wwise_1_1core_1_1_object.html#a9f2472439a50e49b13338281159180b7',1,'ak::wwise::core::Object']]], ['getpropertynames',['GetPropertyNames',['../classak_1_1wwise_1_1core_1_1_object.html#addb46d88bcefcb12e82a27938ad6e314',1,'ak::wwise::core::Object']]], ['getselectedobjects',['GetSelectedObjects',['../classak_1_1wwise_1_1ui.html#a3b93f048e8f2523e73c90e6a1def69a0',1,'ak::wwise::ui']]], ['getstate',['GetState',['../classak_1_1wwise_1_1core_1_1transport.html#a884e837f29fa1ac8f212dd981d1a6df6',1,'ak::wwise::core::transport']]], ['gettypes',['GetTypes',['../classak_1_1wwise_1_1core_1_1_object.html#aeaf3f5194832011baaee49cdb752f5d1',1,'ak::wwise::core::Object']]] ];
const microTasks = require('../src') microTasks.methodRegister('print', (message, time = 0) => { console.log('Start: ' + message) return new Promise((resolve) => { setTimeout(() => { console.log('End: ' + message) resolve() }, time) }) }) microTasks.taskRun([ { method: 'print', params: 'Action 1' }, { parallel: true, actions: [ { method: 'print', params: ['Action 2.1', 1000] }, { method: 'print', params: ['Action 2.2', 3000] }, { method: 'print', params: ['Action 2.3', 2000] } ] }, { method: 'print', params: 'Action 3' } ])
define(["require", "exports", "tslib", "react", "office-ui-fabric-react/lib/DocumentCard", "office-ui-fabric-react/lib/Stack", "office-ui-fabric-react/lib/Styling", "@uifabric/example-data"], function (require, exports, tslib_1, React, DocumentCard_1, Stack_1, Styling_1, example_data_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var people = [ { name: 'Annie Lindqvist', profileImageSrc: example_data_1.TestImages.personaFemale }, { name: 'Roko Kolar', profileImageSrc: '', initials: 'RK' }, { name: 'Aaron Reid', profileImageSrc: example_data_1.TestImages.personaMale }, { name: 'Christian Bergqvist', profileImageSrc: '', initials: 'CB' } ]; var DocumentCardCompactExample = /** @class */ (function (_super) { tslib_1.__extends(DocumentCardCompactExample, _super); function DocumentCardCompactExample() { return _super !== null && _super.apply(this, arguments) || this; } DocumentCardCompactExample.prototype.render = function () { var previewProps = { getOverflowDocumentCountText: function (overflowCount) { return "+" + overflowCount + " more"; }, previewImages: [ { name: 'Revenue stream proposal fiscal year 2016 version02.pptx', linkProps: { href: 'http://bing.com', target: '_blank' }, previewImageSrc: example_data_1.TestImages.documentPreview, iconSrc: example_data_1.TestImages.iconPpt, width: 144 }, { name: 'New Contoso Collaboration for Conference Presentation Draft', linkProps: { href: 'http://bing.com', target: '_blank' }, previewImageSrc: example_data_1.TestImages.documentPreviewTwo, iconSrc: example_data_1.TestImages.iconPpt, width: 144 }, { name: 'Spec Sheet for design', linkProps: { href: 'http://bing.com', target: '_blank' }, previewImageSrc: example_data_1.TestImages.documentPreviewThree, iconSrc: example_data_1.TestImages.iconPpt, width: 144 }, { name: 'Contoso Marketing Presentation', linkProps: { href: 'http://bing.com', target: '_blank' }, previewImageSrc: example_data_1.TestImages.documentPreview, iconSrc: example_data_1.TestImages.iconPpt, width: 144 } ] }; var theme = Styling_1.getTheme(); var palette = theme.palette, fonts = theme.fonts; var previewPropsUsingIcon = { previewImages: [ { previewIconProps: { iconName: 'OpenFile', styles: { root: { fontSize: fonts.superLarge.fontSize, color: palette.white } } }, width: 144 } ], styles: { previewIcon: { backgroundColor: palette.themePrimary } } }; var previewOutlookUsingIcon = { previewImages: [ { previewIconProps: { iconName: 'OutlookLogo', styles: { root: { fontSize: fonts.superLarge.fontSize, color: '#0078d7', backgroundColor: palette.neutralLighterAlt } } }, width: 144 } ], styles: { previewIcon: { backgroundColor: palette.neutralLighterAlt } } }; var stackTokens = { childrenGap: 20 }; return (React.createElement(Stack_1.Stack, { tokens: stackTokens }, React.createElement(DocumentCard_1.DocumentCard, { type: DocumentCard_1.DocumentCardType.compact, onClickHref: "http://bing.com" }, React.createElement(DocumentCard_1.DocumentCardPreview, { previewImages: [previewProps.previewImages[0]] }), React.createElement(DocumentCard_1.DocumentCardDetails, null, React.createElement(DocumentCard_1.DocumentCardTitle, { title: "Revenue stream proposal fiscal year 2016 version02.pptx", shouldTruncate: true }), React.createElement(DocumentCard_1.DocumentCardActivity, { activity: "Created a few minutes ago", people: [people[1]] }))), React.createElement(DocumentCard_1.DocumentCard, { type: DocumentCard_1.DocumentCardType.compact, onClickHref: "http://bing.com" }, React.createElement(DocumentCard_1.DocumentCardPreview, tslib_1.__assign({}, previewProps)), React.createElement(DocumentCard_1.DocumentCardDetails, null, React.createElement(DocumentCard_1.DocumentCardTitle, { title: "4 files were uploaded", shouldTruncate: true }), React.createElement(DocumentCard_1.DocumentCardActivity, { activity: "Created a few minutes ago", people: [people[0]] }))), React.createElement(DocumentCard_1.DocumentCard, { type: DocumentCard_1.DocumentCardType.compact, onClickHref: "http://bing.com" }, React.createElement(DocumentCard_1.DocumentCardPreview, tslib_1.__assign({}, previewPropsUsingIcon)), React.createElement(DocumentCard_1.DocumentCardDetails, null, React.createElement(DocumentCard_1.DocumentCardTitle, { title: "View and share files", shouldTruncate: true }), React.createElement(DocumentCard_1.DocumentCardActivity, { activity: "Created a few minutes ago", people: [people[2]] }))), React.createElement(DocumentCard_1.DocumentCard, { type: DocumentCard_1.DocumentCardType.compact, onClickHref: "http://bing.com" }, React.createElement(DocumentCard_1.DocumentCardPreview, tslib_1.__assign({}, previewOutlookUsingIcon)), React.createElement(DocumentCard_1.DocumentCardDetails, null, React.createElement(DocumentCard_1.DocumentCardTitle, { title: "Conversation about takeaways from annual SharePoint conference", shouldTruncate: true }), React.createElement(DocumentCard_1.DocumentCardActivity, { activity: "Sent a few minutes ago", people: [people[3]] }))))); }; return DocumentCardCompactExample; }(React.PureComponent)); exports.DocumentCardCompactExample = DocumentCardCompactExample; }); //# sourceMappingURL=DocumentCard.Compact.Example.js.map
import { getUserInfo } from "../../api/users" export default { created: function () { if (!this.$isLoggedIn()) { this.$router.push("/login"); } else { getUserInfo(this.storage.token, this.storage.loggedInUser.username) .then(([user, err]) => { if (err == null) { this.storage.loggedInUser = user; } }); } }, }
const { Op } = require('sequelize'); const sequelize = require('../helpers/sequelize'); const { Transaction } = require('../models/index'); const { calculateBalanceAfter } = require('../instances/transactions'); const { updateBalance } = require('../instances/user'); const createTransaction = async (req, res, next) => { try { const { date, type, categoryId, comment, amount } = req.body; const userBalance = res.locals.user.balance; const balanceAfter = await calculateBalanceAfter(userBalance, amount, type); const transaction = await Transaction.create({ date, type, categoryId, userId, comment, amount, balanceAfter, }); await updateBalance(userId, balanceAfter); return res.status(201).send({ transaction: { id: transaction.id, date: transaction.date, type: transaction.type, categoryId: transaction.categoryId, userId: transaction.userId, comment: transaction.comment, amount: transaction.amount, balanceAfter: transaction.balanceAfter, }, }); } catch (err) { next(err); } }; const getTransactionsController = async (req, res, next) => { try { const userId = res.locals.user.id; const transactionsData = await Transaction.findAll({ where: { userId: userId.toString() }, raw: true, }); return res.status(200).json(transactionsData); } catch (err) { next(err); } }; const getTransactionsSummary = async (req, res, next) => { try { const userId = res.locals.user.id; let year = req.query.year; let month = req.query.month; const testTransactionsData = await Transaction.findAll({ where: { userId: userId.toString(), date: { [Op.gte]: new Date( year ? year : 1970, month ? Number(month) - 1 : 0, 1, ), [Op.lt]: new Date( year ? year : 2099, month ? Number(month) : 11, month ? 1 : 31, ), }, }, attributes: [ 'categoryId', 'type', [sequelize.fn('sum', sequelize.col('amount')), 'totalAmount'], ], group: ['Transaction.type', 'Transaction.categoryId'], raw: true, }); return res.status(200).json({ stats: testTransactionsData, month: month ? month : 'all', year: year ? year : 'all', }); } catch (err) { next(err); } }; module.exports = { createTransaction, getTransactionsController, getTransactionsSummary, };
/* ALERT */ class Alert { show(text, icon, duration = ALERT_DURATION) { const frame = Screen.main().flippedFrame(); Modal.build({ origin(mFrame) { return { x: frame.x + frame.width / 2 - mFrame.width / 2, y: frame.height / 2 - mFrame.height / 2 }; }, weight: ALERT_WEIGHT, duration, animationDuration: ALERT_ANIMATION_DURATION, appearance: ALERT_APPEARANCE, text, icon }).show(); } }
$(function () { //pagenation 변수 var pageNum = getParameter('pageNum'); if(pageNum == "" || pageNum == null || pageNum == undefined) { pageNum = 1; } notice(pageNum); $("#searchWord").keyup(function(event) { if (event.keyCode === 13) { $("#button-addon2").click(); } }); $("#button-addon2").click(function () { notice(pageNum); }); }); function notice(pageNum) { var html = ""; var totalNum = ""; var searchType = $("#inputGroupSelect02").val(); var searchWord = $("#searchWord").val(); $.ajax({ url: '/api/fetchQuality?pageNum='+pageNum+'&searchType='+searchType+'&searchWord='+searchWord+'&type=SaaS', type: 'GET', dataType: 'JSON', success: function (response) { console.log(response); if(response.totalCount > 0) { $("#total").text(response.totalCount); for (var i = 0; i < response.list.length; i++) { var ahref = "location.href='/page/details?wr_id=" + response.list[i].wr_id + "'"; html += '<tr onclick="' + ahref + '">' + '<td>' + '<div class="row">' + '<div class="col-12 col-md-3"><img src="/assets/images/icon/nipa.jpg" class="w-100"></div>' + '<div class="col-12 col-md-9">' + '<div class="row">' + '<div class="col-12 col-md-6">' + '<p><b>URL</b><span class="text-secondary px-3">|</span><span>' + response.list[i].wr_link1 + '</span></p>' + '<p><b>단체명</b><span class="text-secondary px-3">|</span><span>' + response.list[i].wr_subject + '</span></p>' + '<p><b>서비스명</b><span class="text-secondary px-3">|</span><span>' + response.list[i].wr_1 + '</span></p>' + '</div>' + '<div class="col-12 col-md-6">' + '<p><b>발급일자</b><span class="text-secondary px-3">|</span><span>' + response.list[i].wr_last + '</span></p>' + '<p><b>품질성능 확인</b><span class="text-secondary px-3">|</span><span class="text-danger">' + response.list[i].wr_14 + '</span></p>' + '</div>' + '<div class="col-12 border-top py-2"><div class="ellipsis-multis">' + response.list[i].wr_content.replace(/(\r\n|\n|\r)/gm, "<br />") + '</div></div>' + '</div>' + '</div>' + '</div>' + '</td>' + '</tr>'; } if(response.totalCount % 10 == 0) { totalNum = (response.totalCount / 10); }else { totalNum = (response.totalCount / 10) + 1; } $("#content").empty(); $("#content").append(html); $('#show_paginator').bootpag({ total: totalNum, page: pageNum, maxVisible: 5 }).on('page', function(event, num) { location.href='/page/saas?pageNum='+num; }); }else { html ='<tr><th colspan="5" scope="row"><div class="bbs-none d-flex justify-content-center align-items-center">게시물이 없습니다.</div></th></tr>'; $("#content").empty(); $("#content").append(html); } } }); }
(function( factory ) { if ( typeof define === "function" && define.amd ) { define( ["jquery", "../jquery.validate"], factory ); } else if (typeof module === "object" && module.exports) { module.exports = factory( require( "jquery" ) ); } else { factory( jQuery ); } }(function( $ ) { /* * Translated default messages for the jQuery validation plugin. * Locale: FA (Persian; فارسی) */ $.extend( $.validator.messages, { required: "تکمیل این فیلد اجباری است.", remote: "لطفا این فیلد را تصحیح کنید.", email: "لطفا یک ایمیل صحیح وارد کنید.", url: "لطفا آدرس صحیح وارد کنید.", date: "لطفا تاریخ صحیح وارد کنید.", dateFA: "لطفا یک تاریخ صحیح وارد کنید.", dateISO: "لطفا تاریخ صحیح وارد کنید (ISO).", number: "لطفا عدد صحیح وارد کنید.", digits: "لطفا تنها رقم وارد کنید.", creditcard: "لطفا کریدیت کارت صحیح وارد کنید.", equalTo: "لطفا مقدار برابری وارد کنید.", extension: "لطفا مقداری وارد کنید که", alphanumeric: "لطفا مقدار را عدد (انگلیسی) وارد کنید.", maxlength: $.validator.format( "لطفا بیشتر از {0} حرف وارد نکنید." ), minlength: $.validator.format( "لطفا کمتر از {0} حرف وارد نکنید." ), rangelength: $.validator.format( "لطفا مقداری بین {0} تا {1} حرف وارد کنید." ), range: $.validator.format( "لطفا مقداری بین {0} تا {1} حرف وارد کنید." ), max: $.validator.format( "لطفا مقداری کمتر از {0} وارد کنید." ), min: $.validator.format( "لطفا مقداری بیشتر از {0} وارد کنید." ), minWords: $.validator.format( "لطفا حداقل {0} کلمه وارد کنید." ), maxWords: $.validator.format( "لطفا حداکثر {0} کلمه وارد کنید." ) } ); return $; }));
(function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['ApiClient', 'model/ErrorBody', 'model/Job'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient'), require('./ErrorBody'), require('./Job')); } else { // Browser globals (root is window) if (!root.IronTitan) { root.IronTitan = {}; } root.IronTitan.JobsWrapper = factory(root.IronTitan.ApiClient, root.IronTitan.ErrorBody, root.IronTitan.Job); } }(this, function(ApiClient, ErrorBody, Job) { 'use strict'; /** * The JobsWrapper model module. * @module model/JobsWrapper * @version 0.4.9 */ /** * Constructs a new <code>JobsWrapper</code>. * @alias module:model/JobsWrapper * @class * @param jobs */ var exports = function(jobs) { var _this = this; _this['jobs'] = jobs; }; /** * Constructs a <code>JobsWrapper</code> from a plain JavaScript object, optionally creating a new instance. * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. * @param {Object} data The plain JavaScript object bearing properties of interest. * @param {module:model/JobsWrapper} obj Optional instance to populate. * @return {module:model/JobsWrapper} The populated <code>JobsWrapper</code> instance. */ exports.constructFromObject = function(data, obj) { if (data) { obj = obj || new exports(); if (data.hasOwnProperty('jobs')) { obj['jobs'] = ApiClient.convertToType(data['jobs'], [Job]); } if (data.hasOwnProperty('cursor')) { obj['cursor'] = ApiClient.convertToType(data['cursor'], 'String'); } if (data.hasOwnProperty('error')) { obj['error'] = ErrorBody.constructFromObject(data['error']); } } return obj; } /** * @member {Array.<module:model/Job>} jobs */ exports.prototype['jobs'] = undefined; /** * Used to paginate results. If this is returned, pass it into the same query again to get more results. * @member {String} cursor */ exports.prototype['cursor'] = undefined; /** * @member {module:model/ErrorBody} error */ exports.prototype['error'] = undefined; return exports; }));
import _ from 'lodash'; import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import YTSerch from 'youtube-api-search'; import SearchBar from './components/search_bar'; import VideoList from './components/video_list'; import VideoDetail from './components/video_detail'; import Logo from './components/logo'; import secrets from './secrets'; class App extends Component { constructor(props) { super(props); this.state = { videos: [], selectedVideo: null }; } videoSearch(term) { YTSerch({key: secrets.API_KEY_YOUTUBE, term: term}, (videos) => { this.setState({ videos: videos, selectedVideo: videos[0] }); }); } render() { const videoSearch = _.debounce((term) => { this.videoSearch(term) }, 300); return ( <div> <div className="search"> <Logo /> <SearchBar onSearchTermChange={videoSearch} /> <div className="tagline">Quick Tube... 3x faster than Youtube</div> </div> <VideoDetail video={this.state.selectedVideo} videos={this.state.videos} /> <VideoList onVideoSelect={selectedVideo => this.setState({selectedVideo})} videos={this.state.videos} /> </div> ); } } ReactDOM.render(<App />, document.querySelector(".container"));
"use strict"; /* * spurtcommerce API * version 2.2 * http://api.spurtcommerce.com * * Copyright (c) 2019 piccosoft ltd * Author piccosoft ltd <support@piccosoft.com> * Licensed under the MIT license. */ Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); require("reflect-metadata"); const class_validator_1 = require("class-validator"); class FileNameRequest { } tslib_1.__decorate([ class_validator_1.IsNotEmpty(), tslib_1.__metadata("design:type", String) ], FileNameRequest.prototype, "image", void 0); exports.FileNameRequest = FileNameRequest; //# sourceMappingURL=createFileNameRequest.js.map
if (typeof(require) === 'function') var ResizeSensor = require("css-element-queries/src/ResizeSensor"); /** * @author Albin Eriksson https://github.com/kezoponk * @license MIT https://opensource.org/licenses/MIT */ class Scroller { /* If the item most to left is outside of view then put it in the back of line */ leftCycle() { if (this.Items[0].offsetWidth + this.movingpart.offsetLeft === 0) { const itemOutsideView = this.Items[0]; this.movingpart.appendChild(itemOutsideView.cloneNode(true)); this.movingpart.removeChild(itemOutsideView); this.movingpart.style.left = '0px'; } this.movingpart.style.left = this.movingpart.offsetLeft - 1 +'px'; } /* If movingpart left isn't negative, make movingpart.left = the width of next item and make it negative, * and put that item in the beginning - making the movingpart position change invisible to the user */ rightCycle() { if (this.movingpart.offsetLeft === 0) { const itemOutsideView = this.Items[this.Items.length -1]; this.movingpart.prepend(itemOutsideView.cloneNode(true)); this.movingpart.removeChild(itemOutsideView); this.movingpart.style.left = 0 - this.Items[0].offsetWidth +'px'; } this.movingpart.style.left = this.movingpart.offsetLeft + 1 +'px'; } pause() { clearInterval(this.loop); } unpause() { this.loop = setInterval(this.options.direction === 'left' ? () => this.leftCycle() : () => this.rightCycle() , 1000 / this.options.speed); } /** Restore target div to state before scroller implementation */ restore() { clearInterval(this.loop); this.parentDiv.removeChild(this.movingpart); Object.entries(this.initialMovingPart.children).forEach(([index, item]) => this.parentDiv.appendChild(item)); this.resizesensor.detach(); } initialize(itemsTotalWidth, largestItem) { // Reset movingpart to remove supplemental buttons if (typeof this.movingpart !== 'undefined') this.parentDiv.removeChild(this.movingpart); this.movingpart = this.initialMovingPart.cloneNode(true); this.parentDiv.appendChild(this.movingpart); this.Items = this.movingpart.children; if (this.Items.length === 0) throw new Error('Target div empty'); /* If the total width of all items in movingpart div is less than * parent div then append clones of items until div is filled */ var index = 0; while (itemsTotalWidth <= this.parentDiv.offsetWidth + largestItem) { const clone = this.Items[index].cloneNode(true); this.movingpart.appendChild(clone); itemsTotalWidth += this.Items[index].offsetWidth; index++; } this.movingpart.style.width = itemsTotalWidth +'px'; if (this.options.direction === 'left') { this.movingpart.style.left = '0px'; } else if(this.options.direction === 'right') { this.movingpart.style.left = 0 - this.Items[0].offsetWidth+'px'; } else { throw new Error('Missing or invalid argument direction'); } } /** * @param {string} parentIdentifier - id or class of div containing elements you want to scroll * @param {Object} options - { speed, direction } */ constructor(parentIdentifier, options) { this.parentDiv = document.querySelector(parentIdentifier); this.parentDiv.style.overflow = 'hidden'; try { options.speed = options.speed.toFixed(0); } catch (e) { if (e instanceof TypeError) throw new TypeError('Missing or invalid argument speed'); } this.options = options; // Move items from target/parent div to initialMovingPart & calculate how many items is required to fill parent div width this.initialMovingPart = document.createElement('div'); this.initialMovingPart.style.position = 'relative'; let initialTotalWidth = 0, largestItem = 0; Object.entries(this.parentDiv.children).forEach(([index, item]) => { item.style.position = 'relative'; const currentItemWidth = item.offsetWidth; initialTotalWidth += currentItemWidth; if (currentItemWidth > largestItem) { largestItem = currentItemWidth; } this.initialMovingPart.appendChild(item); }); // Finish calculating width required, add/remove items to fill parent div width this.initialize(initialTotalWidth, largestItem); // Redo when div size is changed this.resizesensor = new ResizeSensor(this.parentDiv, () => { this.initialize(initialTotalWidth, largestItem); }); // Pause movement when mouse is over this.parentDiv.addEventListener('mouseover', () => { this.pause(); }); this.parentDiv.addEventListener('mouseleave', () => { this.unpause(); }); // Finally begin movement this.loop = setInterval(this.options.direction === 'left' ? () => this.leftCycle() : () => this.rightCycle() , 1000 / this.options.speed); } } if (typeof(module) === 'object') module.exports = Scroller;
export const ADAPT_PRODUCTS_LIST = 'ADAPT_PRODUCTS_LIST'
Ext.Component.prototype.disableRecursive = function() { this.disable(); }; Ext.Component.prototype.enableRecursive = function() { this.enable(); }; Ext.Container.prototype.disableRecursive = function() { if (this.items && this.items.each) { this.items.each(function(i) { i.disableRecursive(); }, this); } Ext.Container.superclass.disableRecursive.call(this); }; Ext.Container.prototype.enableRecursive = function() { if (this.items && this.items.each) { this.items.each(function(i) { i.enableRecursive(); }, this); } Ext.Container.superclass.enableRecursive.call(this); }; //bubble sollte auch für form-felder funktionieren Ext.Component.prototype.bubble = Ext.Container.prototype.bubble;
/** * Copyright 2021 Daniel Thomas. * * 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. **/ const { copyArgs } = require('../../lib/util'); module.exports = function(RED) { "use strict"; function AmazonAPINode(n) { RED.nodes.createNode(this,n); this.awsConfig = RED.nodes.getNode(n.aws); this.region = n.region || this.awsConfig.region; this.operation = n.operation; this.name = n.name; //this.region = this.awsConfig.region; this.accessKey = this.awsConfig.accessKey; this.secretKey = this.awsConfig.secretKey; var node = this; var AWS = require("aws-sdk"); if (this.awsConfig.useEcsCredentials) { AWS.config.update({ region: this.region }); AWS.config.credentials = new AWS.ECSCredentials({ httpOptions: { timeout: 5000 }, // 5 second timeout maxRetries: 10, // retry 10 times retryDelayOptions: { base: 200 } // see AWS.Config for information }); } else { AWS.config.update({ accessKeyId: this.accessKey, secretAccessKey: this.secretKey, region: this.region }); } if (!AWS) { node.warn("Missing AWS credentials"); return; } if (this.awsConfig.proxyRequired){ var proxy = require('proxy-agent'); AWS.config.update({ httpOptions: { agent: new proxy(this.awsConfig.proxy) } }); } var awsService = new AWS.MediaStoreData( { 'region': node.region } ); node.on("input", function(msg, send, done) { var aService = msg.AWSConfig?new AWS.MediaStoreData(msg.AWSConfig) : awsService; node.sendMsg = function (err, data) { if (err) { node.status({ fill: "red", shape: "ring", text: "error"}); send([null, { err: err }]); done(err); return; } else { msg.payload = data; node.status({}); } send([msg,null]); done(); }; if (typeof service[node.operation] === "function") { node.status({fill: "blue", shape: "dot", text: node.operation}); service[node.operation](aService,msg,function(err,data) { node.sendMsg(err, data); }); } else { done(new Error("Operation not defined - "+node.operation)); } }); var service={}; service.DeleteObject=function(svc,msg,cb){ var params={}; copyArgs(n,"Path",params,undefined,false); copyArgs(n,"Path",params,undefined,false); copyArgs(msg,"Path",params,undefined,false); svc.deleteObject(params,cb); } service.DescribeObject=function(svc,msg,cb){ var params={}; copyArgs(n,"Path",params,undefined,false); copyArgs(n,"Path",params,undefined,false); copyArgs(msg,"Path",params,undefined,false); svc.describeObject(params,cb); } service.GetObject=function(svc,msg,cb){ var params={}; copyArgs(n,"Path",params,undefined,false); copyArgs(n,"Path",params,undefined,false); copyArgs(n,"Range",params,undefined,false); copyArgs(msg,"Path",params,undefined,false); copyArgs(msg,"Range",params,undefined,false); svc.getObject(params,cb); } service.ListItems=function(svc,msg,cb){ var params={}; copyArgs(n,"Path",params,undefined,false); copyArgs(Number(n),"MaxResults",params,undefined,false); copyArgs(n,"NextToken",params,undefined,false); copyArgs(msg,"Path",params,undefined,false); copyArgs(msg,"MaxResults",params,undefined,false); copyArgs(msg,"NextToken",params,undefined,false); svc.listItems(params,cb); } service.PutObject=function(svc,msg,cb){ var params={}; copyArgs(n,"Body",params,undefined,true); copyArgs(n,"Path",params,undefined,false); copyArgs(n,"Body",params,undefined,true); copyArgs(n,"Path",params,undefined,false); copyArgs(n,"ContentType",params,undefined,false); copyArgs(n,"CacheControl",params,undefined,false); copyArgs(n,"StorageClass",params,undefined,false); copyArgs(n,"UploadAvailability",params,undefined,false); copyArgs(msg,"Body",params,undefined,true); copyArgs(msg,"Path",params,undefined,false); copyArgs(msg,"ContentType",params,undefined,false); copyArgs(msg,"CacheControl",params,undefined,false); copyArgs(msg,"StorageClass",params,undefined,false); copyArgs(msg,"UploadAvailability",params,undefined,false); svc.putObject(params,cb); } } RED.nodes.registerType("AWS MediaStoreData", AmazonAPINode); };
counterPartyheader = 0; function loadwalletCounterParty(cptoken, cptokenbalance, thisBTCaddress, callback) { if (counterPartyheader === 0){ var $container = $("#keymanagerWallets"); $container.append("<div class=\"keymanKeyHeader\">Counterparty Keys</div>" +"<table class=\"keymanagerTable \">" + "<tr class=\"tableDesc\"><td class=\"pubkey\">PubKey</td><td class=\"coindesc\">Description</td><td class=\"coinbalance\">Balance</td><td class=\"delcoin\">Delete</td></tr>" + "<tbody class=\"keymanCounterPkeys\"></table>"); counterPartyheader++ } if ( !$( "."+cptoken+"card" ).length) { var thisCPrate = "rate"+cptoken; var $container = $("#CoinOverView"); $container.append("<div class=\"card "+cptoken+"card\">" +"<div class=\"coinLogo\"><img src=\"images/logos/"+cptoken+".png\"></div>" +"<div class=\"coinWealth\" id=\""+cptoken+"wealth\">0.00</div>" +"<div class=\"coinAmount\" id=\""+cptoken+"amount\">0.00</div>" +"<div class=\"thiscoinprice\">1 "+cptoken+" = "+eval(thisCPrate)+" "+fiatCurrency+"</div>" +"</div>"); } getCounterPartyWalletsBalance(cptoken, cptokenbalance, thisBTCaddress); } function getCounterPartyWalletsBalance (callback) { var $container = $(".keymanCounterPkeys"); $container.append("<tr class=\"Tabl3TR\">" +"<td class=\"\">"+cptoken+"</td>" +"<td class=\"\">BTC - "+thisBTCaddress+"</td>" +"<td class=\"balanceC0unter"+cptoken+" "+cptoken+"keybalance"+cptokenbalance+"\">"+cptokenbalance+"</td>" +"<td class=\"deleteThisNot\" data-delcoin=\"NA\" data-delkey=\"\">N/A</td>" +"</tr>"); balanceUpdaterCounterParty(cptokenbalance, cptoken); setTimeout(getCoinWealthCounterParty(cptokenbalance, cptoken), 1000); } function getCoinWealthCounterParty (callback) { var thisCPrate = "rate"+cptoken; thisCPCoinWealth = 0; thisCPCoinWealthFIAT = 0; $('.keymanCounterPkeys > .Tabl3TR').children('.balanceC0unter'+cptoken+'').each(function () { var thisCounterPartyCoin = $(this).text(); if (thisCounterPartyCoin > 0.001){thisCPCoinWealth = parseFloat(thisCPCoinWealth) + parseFloat($(this).text());} thisCPCoinWealthFIAT = (thisCPCoinWealth*eval(thisCPrate)).toFixed(4); $('.'+cptoken+'card').attr('data-balance', thisCPCoinWealthFIAT); thisCPCoinWealthFIAT = ('$' + parseFloat(thisCPCoinWealthFIAT, 10).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1,").toString()); $("#"+cptoken+"wealth").html(thisCPCoinWealthFIAT + " " + fiatCurrency); $("#"+cptoken+"amount").html(thisCPCoinWealth); sortByBalance(); }); } function balanceUpdaterCounterParty () { var thisCPrate = "rate"+cptoken; thisCPbalance = (cptokenbalance*eval(thisCPrate)).toFixed(4); richness = parseFloat(richness) + parseFloat(thisCPbalance); richnescalc = ('$' + parseFloat(richness, 10).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1,").toString()); $('.wealthCounter').html(richnescalc + " " + fiatCurrency); }
//~ name b598 alert(b598); //~ component b599.js
const { Model, DataTypes } = require('sequelize'); const sequelize = require('../config/connection'); const bcrypt = require('bcrypt'); class User extends Model { // set up method to run on instance data (per user) to check password checkPassword(loginPw) { return bcrypt.compareSync(loginPw, this.password); } } User.init( { id: { type: DataTypes.INTEGER, allowNull: false, primaryKey: true, autoIncrement: true }, username: { type: DataTypes.STRING, allowNull: false }, email: { type: DataTypes.STRING, allowNull: false, unique: true, validate: { isEmail: true } }, password: { type: DataTypes.STRING, allowNull: false, validate: { len: [4] } } }, { hooks: { // set up beforeCreate lifecycle "hook" functionality async beforeCreate(newUserData) { newUserData.password = await bcrypt.hash(newUserData.password, 10); return newUserData; }, // set up beforeUpdate lifecycle "hook" functionality async beforeUpdate(updatedUserData) { updatedUserData.password = await bcrypt.hash(updatedUserData.password, 10); return updatedUserData; } }, sequelize, timestamps: false, freezeTableName: true, underscored: true, modelName: 'user' } ); module.exports = User;
var utils = require('./utils') var AND = '&&' , OR = '||' , AND_STR = 'and' , OR_STR = 'or' , NOT = '!' , EQUAL = '=' , LIKE = '~' , NOTEQUAL = NOT + EQUAL , NOTLIKE = NOT + LIKE , GT = '>' , GE = '>=' , LT = '<' , LE = '<=' , WILDCARD = '*' , COMMA = ',' , DELIMITER = '.' , LEFT = '(' , RIGHT = ')' , WHERE = 'where' , synopsis = { pathway: [], groups: {} } , AST = {} , options = {}; var print = console.log; // ------------------ splitter -------------------- // function Tokenize(query) { var parts = __splitTrim(query, WHERE); var pathway = parts[0]; var where = parts[1]; synopsis.pathway = __splitTrim(pathway, COMMA); for (var i = 0, len = synopsis.pathway.length; i < len; i++) { synopsis.pathway[i] = __splitTrim(synopsis.pathway[i], DELIMITER); if (synopsis.pathway[i][0] == WILDCARD) synopsis.pathway[i].shift(); if (synopsis.pathway[i].length === 0) synopsis.pathway.splice(i, 1); } var lastLeft = -1, lastRight = -1, current = 0; while (current < where.length) { if (where[current] === LEFT) { lastLeft = current; } else if (where[current] === RIGHT) { lastRight = current; if (lastRight > lastLeft && lastLeft !== -1) { var k = 'gr' + '_' + new Date().getTime(); synopsis.groups[k] = where.substring(lastLeft + 1, lastRight); where = where.replace(LEFT + synopsis.groups[k] + RIGHT, k); current = -1; } } current += 1; } LogicalGrouping(AST, where); } function LogicalGrouping(current, where) { var lastAnd = __findIndex(where, AND), lastOr = __findIndex(where, OR); if (lastAnd !== Number.MAX_VALUE || lastOr !== Number.MAX_VALUE) { if (lastAnd < lastOr) { current.and = current.and || []; var parts = __splitTrim(where, AND); current.and.push(parts[0]); LogicalGrouping(current.and, parts[1]); } else { current.or = current.or || []; var parts = __splitTrim(where, OR); current.or.push(parts[0]); LogicalGrouping(current.or, parts[1]); } } else { if (synopsis.groups[where]) { where = synopsis.groups[where]; LogicalGrouping(current, where); } else { if (Array.isArray(current)) current.push(where); else current.or = [where]; ExtractExpression(AST.or ? AST.or : AST.and) } } } function ExtractExpression(logicalGroup) { for (var k in logicalGroup) { if (logicalGroup.hasOwnProperty(k)) { if (Array.isArray(logicalGroup[k])) { ExtractExpression(logicalGroup[k]); } else if (typeof logicalGroup[k] === 'string') { if (__contains(logicalGroup[k], NOTEQUAL)) { var parts = __splitTrim(logicalGroup[k], NOTEQUAL); logicalGroup[k] = { ne: [ parts[0], parts[1] ] }; } else if (__contains(logicalGroup[k], NOTLIKE)) { var parts = __splitTrim(logicalGroup[k], NOTLIKE); logicalGroup[k] = { nreq: [ parts[0], parts[1] ] }; } else if (__contains(logicalGroup[k], LIKE)) { var parts = __splitTrim(logicalGroup[k], LIKE); logicalGroup[k] = { // rough eq req: [ parts[0], parts[1] ] }; } else if (__contains(logicalGroup[k], GE)) { var parts = __splitTrim(logicalGroup[k], GE); logicalGroup[k] = { // greater than or equal ge: [ parts[0], parts[1] ] }; } else if (__contains(logicalGroup[k], GT)) { var parts = __splitTrim(logicalGroup[k], GT); logicalGroup[k] = { // greater than gt: [ parts[0], parts[1] ] }; } else if (__contains(logicalGroup[k], LE)) { var parts = __splitTrim(logicalGroup[k], LE); logicalGroup[k] = { // less than or equal le: [ parts[0], parts[1] ] }; } else if (__contains(logicalGroup[k], LT)) { var parts = __splitTrim(logicalGroup[k], LT); logicalGroup[k] = { // less than lt: [ parts[0], parts[1] ] }; } else if (__contains(logicalGroup[k], EQUAL)) { var parts = __splitTrim(logicalGroup[k], EQUAL); logicalGroup[k] = { eq: [ parts[0], parts[1] ] }; } } } } } function __findIndex(str, token) { var index = str.indexOf(token); return index === -1 ? Number.MAX_VALUE : index; } function __splitTrim(str, token) { return str.split(token).map(function (p) { return p.trim(); }); } function __contains(a, b) { return a.indexOf(b) > -1; } function __hierarchize(obj, dottedPath) { var parts = __splitTrim(dottedPath, DELIMITER); var res = obj; for (var p in parts) { if (res.hasOwnProperty(parts[p])) res = res[parts[p]]; else return ''; } // support comparison for Date/DateString if(utils.isDate(res)) res = res.valueOf() else if(utils.isDateString(res)) res = utils.parseDateFromString(res) else res = res.toString() return res } function FilterOR(ASTNode, row) { var res = false; for (var k in ASTNode) { var filterFunc = (k === AND_STR ? FilterAND : (k === OR_STR ? FilterOR : Filter)); res = res || filterFunc(ASTNode[k], row); if (options.trace) print(synopsis.step, '======((( or', ASTNode[k], res); if (res) return res; } return res; } function FilterAND(ASTNode, row) { var res = true; for (var k in ASTNode) { var filterFunc = (k === AND_STR ? FilterAND : (k === OR_STR ? FilterOR : Filter)); res = res && filterFunc(ASTNode[k], row); if (options.trace) print(synopsis.step, '======((( and', ASTNode[k], res); if (!res) return res; } return res; } function Filter(ASTNode, row) { synopsis.step += 1; if (ASTNode.or) { var res = FilterOR(ASTNode.or, row); if (options.trace) print(synopsis.step, 'OR', ASTNode, res); return res; } else if (ASTNode.and) { var res = FilterAND(ASTNode.and, row); if (options.trace) print(synopsis.step, 'AND', ASTNode, res); return res; } else if (typeof ASTNode === 'object') { if (ASTNode.eq) { // = return __hierarchize(row, ASTNode.eq[0]) === ASTNode.eq[1]; } else if (ASTNode.ne) { // != return __hierarchize(row, ASTNode.ne[0]) !== ASTNode.ne[1]; } else if (ASTNode.req) { // ~ return __contains(__hierarchize(row, ASTNode.req[0]), ASTNode.req[1]); } else if (ASTNode.nreq) { // ~ return !__contains(__hierarchize(row, ASTNode.nreq[0]), ASTNode.nreq[1]); } else if (ASTNode.gt) { // > return __hierarchize(row, ASTNode.gt[0]) > ASTNode.gt[1]; } else if (ASTNode.ge) { // >= return __hierarchize(row, ASTNode.ge[0]) >= ASTNode.ge[1]; } else if (ASTNode.lt) { // < return __hierarchize(row, ASTNode.lt[0]) < ASTNode.lt[1]; } else if (ASTNode.le) { // <= return __hierarchize(row, ASTNode.le[0]) <= ASTNode.le[1]; } else { return Filter(ASTNode, row); } } } function Parse(dataSource) { var result = []; for (var k in dataSource) if (Filter(AST, dataSource[k])) result.push(dataSource[k]); return result; } function Fields(result) { if (result && synopsis.pathway.length > 0) { //print(synopsis.pathway); return result.map(function (ele) { var res = {}; for (var i = 0, len = synopsis.pathway.length; i < len; i++) { var key = synopsis.pathway[i].join(DELIMITER); res[key] = __hierarchize(ele, key); } return res; }); } return result; } function Query(dataSource, query, opts) { synopsis = { pathway: [], groups: {}, step: 0 }; AST = {}; opts = opts || { trace: false }; options = opts; Tokenize(query); return Fields(Parse(dataSource)); } if (typeof(module) != 'undefined' && typeof(module.exports) != 'undefined') module.exports = Query; if (typeof(window) != 'undefined') window.Query = Query;
import React from 'react'; import AddressLinkMaybe from './AddressLinkMaybe'; import css from './TransactionPanel.module.css'; // Functional component as a helper to build detail card headings const DetailCardHeadingsMaybe = props => { const { showDetailCardHeadings, listingTitle, subTitle, location, geolocation, showAddress, } = props; return showDetailCardHeadings ? ( <div className={css.detailCardHeadings}> <h2 className={css.detailCardTitle}>{listingTitle}</h2> <p className={css.detailCardSubtitle}>{subTitle}</p> <AddressLinkMaybe location={location} geolocation={geolocation} showAddress={showAddress} /> </div> ) : null; }; export default DetailCardHeadingsMaybe;
import Vue from 'vue' import App from './App.vue' import router from './router' // 移动端适配,配合px2rem-loader使用(postcss-plugin-px2rem:stylus) // import 'lib-flexible' import 'assets/js/rem' import 'components/register' import 'stylus/reset.styl' import 'stylus/global.styl' Vue.config.productionTip = false new Vue({ router, render: h => h(App) }).$mount('#app')
/* global Module */ /* Magic Mirror * Module: MMM-SAOB * * By Tohmas Vennberg * MIT Licensed. */ Module.register("MMM-SAOB", { // Default module config. defaults: { title: "Dagens ord från SAOB" }, getHeader: function() { return "<span class='bright'>" + this.config.title + "</span>"; }, // Define required translations. getTranslations: function() { // The translations for the defaut modules are defined in the core translation files. // Therefor we can just return false. Otherwise we should have returned a dictionairy. // If you're trying to build yiur own module including translations, check out the documentation. return false; }, // Define start sequence. start: function() { Log.info("Starting module: " + this.name); this.loaded = false; this.updateWord(); }, // Override dom generator. getDom: function() { var wrapper = document.createElement("div"); if (!this.loaded) { wrapper.innerHTML = this.translate("LOADING"); wrapper.className = "dimmed light small"; return wrapper; } // The word var large = document.createElement("div"); large.className = "large light"; var word = document.createElement("span"); word.innerHTML = this.word; large.appendChild(word); wrapper.appendChild(large); return wrapper; }, /* updateWord() * Causes read of html from saob.se */ updateWord: function() { Log.info(this.name + ": Getting the Word!") this.sendSocketNotification("GET_WORD", this.config); }, /* socketNotificationReceived(notification, payload) * From node_helper * * notification - the message * payload - soab content */ socketNotificationReceived: function(notification, payload) { if (notification === "THE_WORD") { Log.info(this.name + ": Word received!"); this.processSAOB(payload); } }, /* notificationReceived(notification, payload, sender) * From MMM-ModuleScheduler, initiates update of word * * notification - the message * payload - ignored * sender - ignored */ notificationReceived: function(notification, payload, sender) { if (notification === "UPDATE_SAOB") { Log.info(this.name + " Received UPDATE_SAOB. Payload: ", payload); this.updateWord(); } }, /* processSAOB(data) * Uses the received data from saob.se to find todays word. * * argument data object - the html page from saob */ processSAOB: function( data ) { // Number of lines in webpage var lines = data.split('\n'); Log.info(this.name + "Webpage has " + lines.length + " lines."); // Find key "Dagens ord</" for (var i = 0; i < lines.length; i++) { if (lines[i].search("Dagens ord</") > 0) { Log.info("Found key on line " + i); // Dagens ord is two lines below the key Log.info(lines[i+2]); // Strip line from tags var div = document.createElement("div"); div.innerHTML = lines[i+2]; this.word = div.textContent; break; } } this.loaded = true; this.updateDom(); }, });
import Vector2 from 'phaser/src/math/Vector2' export default class UserControlled { constructor(maxSpeed, cursors) { this.maxSpeed = maxSpeed; this.cursors = cursors; } update() { const body = this.character.body; body.setVelocity(0); const speed = this.maxSpeed; const cursors = this.cursors; if (cursors.left.isDown) { body.velocity.x -= speed; } else if (cursors.right.isDown) { body.velocity.x += speed; } // Vertical movement if (cursors.up.isDown) { body.setVelocityY(-speed); } else if (cursors.down.isDown) { body.setVelocityY(speed); } // Normalize and scale the velocity so that player can't move faster along a diagonal body.velocity.normalize().scale(speed); } }
'use strict';(function(d){"object"==typeof exports&&"object"==typeof module?d(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],d):d(CodeMirror)})(function(d){d.defineMode("elm",function(){function d(a,c,b){c(b);return b(a,c)}function f(){return function(a,c){if(a.eatWhile(h))return null;var b=a.next();if(p.test(b))return"{"==b&&a.eat("-")?(b="comment",a.eat("#")&&(b="meta"),d(a,c,k(b,1))):null;if("'"==b)return a.eat("\\"),a.next(),a.eat("'")?"string": "error";if('"'==b)return d(a,c,l);if(q.test(b))return a.eatWhile(m),a.eat(".")?"qualifier":"variable-2";if(r.test(b))return c=1===a.pos,a.eatWhile(m),c?"type":"variable";if(e.test(b)){if("0"==b){if(a.eat(/[xX]/))return a.eatWhile(t),"integer";if(a.eat(/[oO]/))return a.eatWhile(u),"number"}a.eatWhile(e);b="number";a.eat(".")&&(b="number",a.eatWhile(e));a.eat(/[eE]/)&&(b="number",a.eat(/[-+]/),a.eatWhile(e));return b}if(g.test(b)){if("-"==b&&a.eat(/-/)&&(a.eatWhile(/-/),!a.eat(g)))return a.skipToEnd(), "comment";a.eatWhile(g);return"builtin"}return"error"}}function k(a,c){return 0==c?f():function(b,d){for(var e=c;!b.eol();){var g=b.next();if("{"==g&&b.eat("-"))++e;else if("-"==g&&b.eat("}")&&(--e,0==e))return d(f()),a}d(k(a,e));return a}}function l(a,c){for(;!a.eol();){var b=a.next();if('"'==b)return c(f()),"string";if("\\"==b){if(a.eol()||a.eat(h))return c(v),"string";a.eat("&")||a.next()}}c(f());return"error"}function v(a,c){if(a.eat("\\"))return d(a,c,l);a.next();c(f());return"error"}var r=/[a-z_]/, q=/[A-Z]/,e=/[0-9]/,t=/[0-9A-Fa-f]/,u=/[0-7]/,m=/[a-z_A-Z0-9']/,g=/[-!#$%&*+.\/<=>?@\\^|~:\u03BB\u2192]/,p=/[(),;[\]`{}]/,h=/[ \t\v\f]/,n=function(){for(var a={},c='case of as if then else let in infix infixl infixr type alias input output foreign loopback module where import exposing _ .. | : = \\ " -> <-'.split(" "),b=c.length;b--;)a[c[b]]="keyword";return a}();return{startState:function(){return{f:f()}},copyState:function(a){return{f:a.f}},token:function(a,c){var b=c.f(a,function(a){c.f=a});a= a.current();return n.hasOwnProperty(a)?n[a]:b}}});d.defineMIME("text/x-elm","elm")});
var controller = require('./controller'); var letterService = require('../../services/DeliveryLetterService'); var positionService = require('../../services/PositionService'); import { formattedToSave, formattedToRu } from '../../libs/date'; import { toUnsafeString } from '../../libs/strings'; angular.module('letterModule', []) .config(['$httpProvider', function($httpProvider) { $httpProvider.defaults.withCredentials = true; }]) .factory('PositionService', ['$http', positionService]) .factory('DeliveryLetterService', ['$http', letterService]) .filter('toUnsafe', function(){ return function(str){ return toUnsafeString(str) } }) .filter('formatRu', function(){ return function(datetime){ return formattedToRu(new Date(datetime.substr(0,10))); } }) .controller('LetterCtrl', ['$scope', '$state', 'letter', 'position', 'operationType', 'DeliveryLetterService', controller]); module.exports = { template: require('./template.tpl'), controller: 'LetterCtrl', resolve: { letter: ['PositionService', 'DeliveryLetterService', function (PositionService, DeliveryLetterService) { return DeliveryLetterService.byPositionId(PositionService.current()._id) .then(function(data) { return data; }) }], position: ['PositionService', function (PositionService) { return PositionService.current() }], operationType: ['DeliveryLetterService', function (DeliveryLetterService) { return DeliveryLetterService.currentType(); }], } };
mycallback( {"CONTRIBUTOR OCCUPATION": "LAWYER", "CONTRIBUTION AMOUNT (F3L Bundled)": "500.00", "ELECTION CODE": "G2010", "MEMO CODE": "", "CONTRIBUTOR EMPLOYER": "O'MELVENY & MYERS", "DONOR CANDIDATE STATE": "", "CONTRIBUTOR STREET 1": "100 WEST ROSEMONT AVENUE", "CONTRIBUTOR MIDDLE NAME": "", "DONOR CANDIDATE FEC ID": "", "DONOR CANDIDATE MIDDLE NAME": "", "CONTRIBUTOR STATE": "VA", "DONOR CANDIDATE FIRST NAME": "", "CONTRIBUTOR FIRST NAME": "KIMBERLY", "BACK REFERENCE SCHED NAME": "", "DONOR CANDIDATE DISTRICT": "", "CONTRIBUTION DATE": "20100726", "DONOR COMMITTEE NAME": "", "MEMO TEXT/DESCRIPTION": "", "Reference to SI or SL system code that identifies the Account": "", "FILER COMMITTEE ID NUMBER": "C00472050", "DONOR CANDIDATE LAST NAME": "", "CONTRIBUTOR LAST NAME": "NEWMAN", "_record_type": "fec.version.v7_0.SA", "CONDUIT STREET2": "", "CONDUIT STREET1": "", "DONOR COMMITTEE FEC ID": "", "CONTRIBUTION PURPOSE DESCRIP": "CONTRIBUTION", "CONTRIBUTOR ZIP": "223012626", "CONTRIBUTOR STREET 2": "", "CONDUIT CITY": "", "ENTITY TYPE": "IND", "CONTRIBUTOR CITY": "ALEXANDRIA", "CONTRIBUTOR SUFFIX": "", "TRANSACTION ID": "SA11.244", "DONOR CANDIDATE SUFFIX": "", "DONOR CANDIDATE OFFICE": "", "CONTRIBUTION PURPOSE CODE": "15", "ELECTION OTHER DESCRIPTION": "", "_src_file": "2011/20110504/727361.fec_1.yml", "CONDUIT STATE": "", "CONTRIBUTOR ORGANIZATION NAME": "", "BACK REFERENCE TRAN ID NUMBER": "", "DONOR CANDIDATE PREFIX": "", "CONTRIBUTOR PREFIX": "", "CONDUIT ZIP": "", "CONDUIT NAME": "", "CONTRIBUTION AGGREGATE F3L Semi-annual Bundled": "1000.00", "FORM TYPE": "SA11AI"}); mycallback( {"CONTRIBUTOR OCCUPATION": "LAWYER", "CONTRIBUTION AMOUNT (F3L Bundled)": "500.00", "ELECTION CODE": "G2010", "MEMO CODE": "", "CONTRIBUTOR EMPLOYER": "O'MELVENY & MYERS", "DONOR CANDIDATE STATE": "", "CONTRIBUTOR STREET 1": "100 WEST ROSEMONT AVENUE", "CONTRIBUTOR MIDDLE NAME": "", "DONOR CANDIDATE FEC ID": "", "DONOR CANDIDATE MIDDLE NAME": "", "CONTRIBUTOR STATE": "VA", "DONOR CANDIDATE FIRST NAME": "", "CONTRIBUTOR FIRST NAME": "KIMBERLY", "BACK REFERENCE SCHED NAME": "", "DONOR CANDIDATE DISTRICT": "", "CONTRIBUTION DATE": "20100726", "DONOR COMMITTEE NAME": "", "MEMO TEXT/DESCRIPTION": "", "Reference to SI or SL system code that identifies the Account": "", "FILER COMMITTEE ID NUMBER": "C00472050", "DONOR CANDIDATE LAST NAME": "", "CONTRIBUTOR LAST NAME": "NEWMAN", "_record_type": "fec.version.v7_0.SA", "CONDUIT STREET2": "", "CONDUIT STREET1": "", "DONOR COMMITTEE FEC ID": "", "CONTRIBUTION PURPOSE DESCRIP": "CONTRIBUTION", "CONTRIBUTOR ZIP": "223012626", "CONTRIBUTOR STREET 2": "", "CONDUIT CITY": "", "ENTITY TYPE": "IND", "CONTRIBUTOR CITY": "ALEXANDRIA", "CONTRIBUTOR SUFFIX": "", "TRANSACTION ID": "SA11.244", "DONOR CANDIDATE SUFFIX": "", "DONOR CANDIDATE OFFICE": "", "CONTRIBUTION PURPOSE CODE": "15", "ELECTION OTHER DESCRIPTION": "", "_src_file": "2011/20110504/727361.fec_1.yml", "CONDUIT STATE": "", "CONTRIBUTOR ORGANIZATION NAME": "", "BACK REFERENCE TRAN ID NUMBER": "", "DONOR CANDIDATE PREFIX": "", "CONTRIBUTOR PREFIX": "", "CONDUIT ZIP": "", "CONDUIT NAME": "", "CONTRIBUTION AGGREGATE F3L Semi-annual Bundled": "1000.00", "FORM TYPE": "SA11AI"});
// Include the cluster module var cluster = require('cluster'); // Code to run if we're in the master process if (cluster.isMaster) { // Count the machine's CPUs var cpuCount = require('os').cpus().length; // Create a worker for each CPU for (var i = 0; i < cpuCount; i += 1) { cluster.fork(); } // Listen for dying workers cluster.on('exit', function (worker) { // Replace the dead worker, we're not sentimental console.log('Worker ' + worker.id + ' died :('); cluster.fork(); }); // Code to run if we're in a worker process } else { // Include Express var express = require('express'); var compression = require('compression') var bodyParser = require('body-parser'); // Create a new Express application var app = express(); var path = require('path'); var util=require('util'); app.use(express.static(path.join(__dirname, 'public'))); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); app.use(compression({filter: shouldCompress})) app.set('port', process.env.PORT || 3000); function shouldCompress(req, res) { if (req.headers['x-no-compression']) { // don't compress responses with this request header return false } // fallback to standard filter function return compression.filter(req, res) } app.route('/smart-search').get(function(req, res, next) { var json=JSON.parse(req.query.qs); var options={ search_intent: json.search_intent, cityName:json.cityName, minRent:json.min_inr, maxRent:json.max_inr, houseTypes:json.houseTypes, bedRooms:json.bedRooms, lat1:json.lat1, lng1:json.lng1, lat2:json.lat2, lng2:json.lng2 }; var api=require('./solrApi'); api.getJsonData(options, function(err, response){ if(err){ res.redirect("https://www.commonfloor.com"); }else { var defaultSearchIntent="search_intent="+options.search_intent; var defaultRentParams="&min_inr="+options.minRent+"&max_inr="+options.maxRent; var defaultBedParams="&bed_rooms="+options.bedRooms; var defaultHouseType="&house_type="+options.houseTypes; var url="https://www.commonfloor.com/listing-search?"+defaultSearchIntent+"&page=1&city="+options.cityName+ "&use_pp=0&set_pp=0&fetch_max=1&number_of_children=2&page_size=30&physically_verified=1&polygon=1&mapBounds="; url+=options.lat1+","+options.lng1+","+options.lat2+","+options.lng2; url+=defaultRentParams; url+=defaultBedParams; url+=defaultHouseType; var data=JSON.parse(response); var obj={}; data.data.forEach(function(item){ if(item.children && item.children.length>0){ var name= item.children[0].listing_area; var isRoad=name.toLowerCase().indexOf('road'); var id= item.children[0].listing_area_id; if(isRoad==-1){ if(!obj["area_"+id]) { obj["area_"+id]={ id: "area_"+id, name:name, count:1 }; } else{ obj["area_"+id].count=obj["area_"+id].count+1; } } } }) var dataArray = Object.keys(obj).map(function(k){return obj[k]}); dataArray.sort(function compare(a,b) { if(a.count==b.count) return 0; else if(a.count>b.count){ return -1; } else { return 1; } }); var CF_RESULT=dataArray.splice(0,5); if(CF_RESULT){ var nameArray = Object.keys(CF_RESULT).map(function(k){return CF_RESULT[k].name}); var idArray = Object.keys(CF_RESULT).map(function(k){return CF_RESULT[k].id}); url+="&prop_name="+nameArray.join(","); url+="&property_location_filter="+idArray.join(","); } res.redirect(url); } }); }); app.route('/location').post(function(req, res, next) { var api=require('./solrApi'); var json=req.body; var timeStamp=new Date().getTime(); var md5 = require('md5'); var request_id=md5(timeStamp) var options={ search_intent: json.search_intent, cityName:json.cityName, minRent:json.min_inr, maxRent:json.max_inr, houseTypes:json.houseTypes, bedRooms:json.bedRooms, lat1:json.lat1, lng1:json.lng1, lat2:json.lat2, lng2:json.lng2, time_stamp: timeStamp, request_id:request_id }; api.getJsonData(options, function(err, response){ if(err){ res.json(null); }else { var response=JSON.parse(response); response.request_id=request_id; res.json(); } }) }); app.route('/process').post(function(req, res, next) { var turf=require('turf'); var json=req.body.params; var unit='kilometers'; var intersect=null; var somethingWentWrong=false; var features=[]; for(var index in json) { var location=json[index].location; var point=turf.point([Number(location.lng), Number(location.lat)]); features.push(point); var buffered = turf.buffer( point, Number(json[index].distance), unit); var polygon = turf.polygon(buffered.features[0].geometry.coordinates, { "fill": "#6BC65F", "stroke": "#6BC65F", "stroke-width": 5 }); if(!intersect){ intersect=polygon; } else { var intersection=turf.intersect(intersect, polygon) if(intersection){ intersect = intersection; } else { console.log('somethingWentWrong1'); somethingWentWrong=true; } } if(!intersect) { console.log('somethingWentWrong2'); somethingWentWrong=true; } } if(!somethingWentWrong){ var square = turf.bboxPolygon(turf.square(turf.extent(intersect))); res.json(square); } else { var points = turf.featurecollection(features); if(points.length>2){ var hull = turf.convex(points); res.json(hull); } else { res.json(null); } } }); app.route('/singapore/listings').get(function(req, res, next) { var json=JSON.parse(req.query.qs); var SG_RENT=[{"min":500,"max":2000},{"min":2000,"max":5000},{"min":5000,"max":10000},{"min":10000,"max":20000},{"min":20000,"max":50000}]; var SG_BEDS=[{"min":1,"max":2},{"min":3,"max":3},{"min":4,"max":4},{"min":5,"max":5},{"min":6,"max":10}]; var SG_PT=[ "&property_type=L&property_type_code%5B%5D=TERRA&property_type_code%5B%5D=DETAC&property_type_code%5B%5D=SEMI&property_type_code%5B%5D=CORN&property_type_code%5B%5D=LBUNG&property_type_code%5B%5D=BUNG&property_type_code%5B%5D=SHOPH&property_type_code%5B%5D=RLAND&property_type_code%5B%5D=TOWN&property_type_code%5B%5D=CON&property_type_code%5B%5D=LCLUS", "&property_type=N&property_type_code%5B%5D=CONDO&property_type_code%5B%5D=APT&property_type_code%5B%5D=WALK&property_type_code%5B%5D=CLUS&property_type_code%5B%5D=EXCON", "&property_type=H&property_type_code%5B%5D=HDB" ]; function createLinkSg (propertyTypeIndex,rentIndex,bedIndex, radius, centerLat,centerLon ) { var linkFormat="/ps_xmlhttp_fullmapsearch?listing_type=rent%s&minprice=%d&maxprice=%d&minbed=%d&maxbed=%d&distance=%d&center_lat=%d&center_long=%d&latitude=%d&longitude=%d"; return util.format(linkFormat, SG_PT[json.propertyTypeIndex], SG_RENT[json.rentIndex].min, SG_RENT[json.rentIndex].max, SG_BEDS[json.bedIndex].min, SG_BEDS[json.bedIndex].max, json.radius, json.centerLat, json.centerLon, json.centerLat, json.centerLon); } var link=createLinkSg(json); var api=require('./solrApi'); var options = { host: 'www.propertyguru.com.sg', path: link }; api.getJsonDataFromUrl(options, function(err, response){ if(err){ res.json(null); }else { console.log(options) //var responseObj=JSON.parse(response); res.json({ r: response }); } }) }); app.listen(app.get('port')); console.log('Worker ' + cluster.worker.id + ' running!'); }
const express = require('express'); const router = express.Router(); const customers = require('../data/helpers/customer_helper'); const messages = require('./constants'); const checkAndRespond = (res, customer, message) => { customer ? res.status(200).json(customer) : res.status(404).json({ message: message }) } router.get('/', async (req, res) => { try{ const customer = await customers.getAllCustomers(); checkAndRespond(res, customer, messages.cantFind); } catch (err) { res.status(500).json(err) } }); router.get('/id/:id', async (req, res) => { const { id } = req.params; try { const customer = await customers.getCustomerById(id); checkAndRespond(res, customer, messages.cantFindId); } catch (error) { res.status(500).json(error) } }) router.get('/email/:email', async (req, res) => { const { email } = req.params; try { const customer = await customers.getCustomerByEmail(email); checkAndRespond(res, customer, messages.cantFindEmail); } catch (error) { res.status(500).json(error) } }) router.put('/update-customer-info', async (req, res) => { const user = req.body; try { const customer = await customers.updateExistingCustomerInfo(user); checkAndRespond(res, customer, messages.tryAgainLater) } catch (error) { res.status(500).json(error) } }) router.delete('/delete-customer/:id', async (req, res) => { const id = req.params; try { const customer = await customers.deleteExistingCustomer(id); res.status(200).json(customer) } catch (error) { res.status(500).json(error) } }) module.exports = router;
/* * Copyright 2018 The boardgame.io Authors. * * Use of this source code is governed by a MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. */ import React from 'react'; import { Image, StyleSheet, View } from 'react-native'; import { Client } from 'boardgame.io/react-native'; import logo from './logo.png'; import TicTacToe from './game'; import Board from './board'; const App = Client({ game: TicTacToe, board: Board, }); const Singleplayer = () => ( <View style={styles.container}> <Image source={logo} style={styles.logo} /> <App gameID="single" /> </View> ); export default Singleplayer; const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center', }, logo: { width: 300, height: 90, marginBottom: 24, }, });
$(document).ready(function(){ $("#home").click(function(){ window.location = "https://brainstorming.000webhostapp.com/index.html"; //index.html return false; }); $("#id1").click(function(){ window.location = "https://brainstorming.000webhostapp.com/menu.php"; //menu.php return false; }); $("#id2").click(function(){ window.location = "https://brainstorming.000webhostapp.com/archive.php"; //archive.php return false; }); $("#id3").click(function(){ window.location = "https://brainstorming.000webhostapp.com/main_info.php"; //main_info.php return false; }); $("#id4").click(function(){ window.location = "https://brainstorming.000webhostapp.com/contacts.php"; //contacts.php return false; }); });
"use strict"; var _ = require('lodash'); var jsonave = require('jsonave'); var value = require('./value'); var jp = jsonave.instance; var repeat = { content: { 'period.value': { dataKey: 'duration' }, 'period.unit': { dataKey: 'durationUnits' }, frequency: true } }; exports.template = { type: 'medication', content: { status: 'Prescribed', 'date_time.low': { value: value.datetime, dataKey: 'dateWritten', existsWhen: _.negate(_.partialRight(_.has, 'dosageInstruction[0].scheduledDateTime')) }, 'date_time.point': { value: value.datetime, dataKey: 'dateWritten', existsWhen: _.partialRight(_.has, 'dosageInstruction[0].scheduledDateTime') }, 'product.product': { value: value.concept, dataKey: jp('medication.reference.getResource().code.coding[0]') }, 'administration.site': { value: value.concept, dataKey: 'dosageInstruction[0].site.coding[0]' }, 'administration.route': { value: value.concept, dataKey: 'dosageInstruction[0].route.coding[0]' }, 'administration.dose.value': { dataKey: 'dosageInstruction[0].doseQuantity.value' }, 'administration.dose.unit': { dataKey: 'dosageInstruction[0].doseQuantity.units' }, 'administration.interval': { value: repeat, dataKey: 'dosageInstruction[0].scheduledTiming.repeat', existsWhen: _.negate(_.partialRight(_.has, 'dosageInstruction[0].scheduledTiming.repeat.when')) }, 'administration.interval.event': { value: value.codeToValueSet('scheduleWhen'), dataKey: 'dosageInstruction[0].scheduledTiming.repeat.when' }, 'precondition.value': { value: value.concept, dataKey: 'dosageInstruction[0].asNeededCodeableConcept.coding[0]' }, 'date_time.high': { value: value.datetime, dataKey: ['dosageInstruction[0].scheduledTiming.repeat.bounds.end', 'dosageInstruction[0].scheduledPeriod.end'] }, sig: { dataKey: 'text.div' } } };
import React from 'react'; import ReactTestUtils from 'react-addons-test-utils'; import ReactDOM from 'react-dom'; import ListGroupItem from '../src/ListGroupItem'; describe('<ListGroupItem>', () => { it('Should output a "span" with the class "list-group-item"', () => { let instance = ReactTestUtils.renderIntoDocument( <ListGroupItem>Text</ListGroupItem> ); assert.equal(ReactDOM.findDOMNode(instance).nodeName, 'SPAN'); assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'list-group-item')); }); it('Should output an "anchor" if "href" prop is set', () => { let instance = ReactTestUtils.renderIntoDocument( <ListGroupItem href="#test">Anchor</ListGroupItem> ); assert.equal(ReactDOM.findDOMNode(instance).nodeName, 'A'); assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'list-group-item')); }); it('Should output a "button" if an "onClick" handler is set', () => { let noop = () => {}; let instance = ReactTestUtils.renderIntoDocument( <ListGroupItem onClick={noop}>Button</ListGroupItem> ); assert.equal(ReactDOM.findDOMNode(instance).nodeName, 'BUTTON'); assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'list-group-item')); }); it('Should output an "li" if "listItem" prop is set', () => { let instance = ReactTestUtils.renderIntoDocument( <ListGroupItem listItem>Item 1</ListGroupItem> ); assert.equal(ReactDOM.findDOMNode(instance).nodeName, 'LI'); assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'list-group-item')); }); it('Should support "bsStyle" prop', () => { let instance = ReactTestUtils.renderIntoDocument( <ListGroupItem bsStyle="success">Item 1</ListGroupItem> ); assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'list-group-item-success')); }); it('Should support "active" and "disabled" prop', () => { let instance = ReactTestUtils.renderIntoDocument( <ListGroupItem active>Item 1</ListGroupItem> ); assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'active')); }); it('Should support "disabled" prop', () => { let instance = ReactTestUtils.renderIntoDocument( <ListGroupItem disabled>Item 2</ListGroupItem> ); assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'disabled')); }); it('Should support "header" prop as a string', () => { let instance = ReactTestUtils.renderIntoDocument( <ListGroupItem header="Heading">Item text</ListGroupItem> ); let node = ReactDOM.findDOMNode(instance); assert.equal(node.firstChild.nodeName, 'H4'); assert.equal(node.firstChild.textContent, 'Heading'); assert.ok(node.firstChild.className.match(/\blist-group-item-heading\b/)); assert.equal(node.lastChild.nodeName, 'P'); assert.equal(node.lastChild.textContent, 'Item text'); assert.ok(node.lastChild.className.match(/\blist-group-item-text\b/)); }); it('Should support "header" prop as a ReactComponent', () => { let header = <h2>Heading</h2>; let instance = ReactTestUtils.renderIntoDocument( <ListGroupItem header={header}>Item text</ListGroupItem> ); let node = ReactDOM.findDOMNode(instance); assert.equal(node.firstChild.nodeName, 'H2'); assert.equal(node.firstChild.textContent, 'Heading'); assert.ok(node.firstChild.className.match(/\blist-group-item-heading\b/)); assert.equal(node.lastChild.nodeName, 'P'); assert.equal(node.lastChild.textContent, 'Item text'); assert.ok(node.lastChild.className.match(/\blist-group-item-text\b/)); }); });
class ApplicationRoot{ // @ngInject constructor($http, mediaService) { this.$http = $http; this.mediaService = mediaService; } } export default { controller: ApplicationRoot, templateUrl: 'application-root/application.root.tpl.html' };